mirror of
https://github.com/hanzoai/swc.git
synced 2026-10-30 19:42:53 +00:00
**Description:** Adds an independent Rust/WebAssembly binding at `bindings/binding_nodejs_support_wasm`, published as `@swc/nodejs-support-wasm`. The package has its own Rust crate, sources, build scripts, tests, README, Cargo entry, and npm workspace entry. It does not build from `binding_typescript_wasm` and does not add features or exports to the existing `@swc/wasm-typescript` or `@swc/wasm-typescript-esm` packages. The new CommonJS package embeds its wasm binary and exposes these APIs at the top level: - `transform` - `transformSync` - `transformModuleSyntax` - `getFirstExpression` - `isValidSyntax` - `isRecoverableError` It also exports the related `Options`, `TransformOutput`, and `ModuleSyntaxTransformOutput` TypeScript types. The npm publish matrix, wasm CI matrix, release versioning, Cargo lockfile, and pnpm lockfile now reference the standalone `binding_nodejs_support_wasm` crate. Validation performed: - `git submodule update --init --recursive` - `cargo fmt --all -- --check` - `cargo test -p binding_typescript_wasm -p binding_nodejs_support_wasm` - `cargo clippy --all --all-targets -- -D warnings` - `(cd bindings/binding_nodejs_support_wasm && ./scripts/test.sh)` - `(cd bindings/binding_typescript_wasm && ./scripts/test.sh)` - `(cd bindings/binding_core_wasm && ./scripts/test.sh)` - `(cd bindings/binding_minifier_wasm && ./scripts/test.sh)` - `(cd bindings/binding_es_ast_viewer && ./scripts/test.sh)` - `(cd bindings/binding_nodejs_support_wasm/pkg && npm pack --dry-run --json)` - `pnpm install --frozen-lockfile --ignore-scripts` - `go run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/CI.yml .github/workflows/publish-npm-package.yml` **BREAKING CHANGE:** None. The existing TypeScript wasm packages and their public APIs are unchanged. **Related issue (if exists):** - Supports nodejs/node#64034 - Follow-up context from swc-project/swc#11973
6 lines
68 B
JSON
6 lines
68 B
JSON
{
|
|
"devDependencies": {
|
|
"@rstest/core": "^0.7.8"
|
|
}
|
|
}
|