Skip to content

Commit

Permalink
Resolve segfault on usage (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codex- authored Jan 23, 2024
2 parents 21705de + dbba044 commit 13a1e03
Show file tree
Hide file tree
Showing 9 changed files with 1,898 additions and 62 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: wasm32-wasi
- name: Configure path (windows)
shell: bash
if: runner.os == 'Windows'
Expand All @@ -43,6 +44,5 @@ jobs:
with:
shared-key: "cargo-test"
cache-on-failure: true
- name: Run cargo test
run: |
cargo test --color always
- name: Run tests
run: pnpm run test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ node_modules
target

*.wasm

.swc
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "Apache-2.0"
crate-type = ["cdylib"]

[dependencies]
swc_core = { version = "0.88.*", features = [
swc_core = { version = "0.87.*", features = [
"ecma_plugin_transform",
"trace_macro",
] }
Expand Down
19 changes: 14 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,30 @@
],
"main": "swc_plugin_import_meta_env.wasm",
"scripts": {
"build": "cargo build-wasi",
"build:release": "pnpm run build --release",
"prepublishOnly": "cargo build-wasi --release",
"prepack": "cargo build-wasi --release && cp target/wasm32-wasi/release/swc_plugin_import_meta_env.wasm .",
"release": "release-it"
"prepack": "pnpm run build:release && cp target/wasm32-wasi/release/swc_plugin_import_meta_env.wasm .",
"release": "release-it",
"test": "pnpm run test:setup && pnpm run test:unit && pnpm run test:integration",
"test:setup": "pnpm run build && cp target/wasm32-wasi/debug/swc_plugin_import_meta_env.wasm .",
"test:unit": "cargo test --color always",
"test:integration": "pnpm exec jest --config ./tests/integration/jest.config.cjs --no-cache"
},
"files": [
"swc_plugin_import_meta_env.wasm"
],
"preferUnplugged": true,
"packageManager": "[email protected]",
"devDependencies": {
"@swc/core": "^1.3.68",
"@swc/core": "^1.3.105",
"@swc/jest": "^0.2.31",
"@types/jest": "^29.5.11",
"auto-changelog": "^2.4.0",
"release-it": "^17.0.0"
"jest": "^29.7.0",
"release-it": "^17.0.1"
},
"peerDependencies": {
"@swc/core": "^1.3.68"
"@swc/core": "^1.3.105"
}
}
Loading

0 comments on commit 13a1e03

Please sign in to comment.