Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Setup node
uses: actions/setup-node@v6
Expand Down Expand Up @@ -119,15 +119,15 @@ jobs:
- host: ubuntu-latest
target: wasm32-wasip1-threads
build: |
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sdk-27.0-x86_64-linux.tar.gz
tar -xvf wasi-sdk-27.0-x86_64-linux.tar.gz
export WASI_SDK_PATH="$(pwd)/wasi-sdk-27.0-x86_64-linux"
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-33/wasi-sdk-33.0-x86_64-linux.tar.gz
tar -xvf wasi-sdk-33.0-x86_64-linux.tar.gz
export WASI_SDK_PATH="$(pwd)/wasi-sdk-33.0-x86_64-linux"
yarn build --target wasm32-wasip1-threads
rm tar.linux-x64-gnu.node
name: stable - ${{ matrix.settings.target }} - node@22
name: stable - ${{ matrix.settings.target }} - node@24
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup node
uses: actions/setup-node@v6
if: ${{ !matrix.settings.docker }}
Expand All @@ -143,7 +143,7 @@ jobs:
toolchain: stable
targets: ${{ matrix.settings.target }}
- name: Cache cargo
uses: actions/cache@v5
uses: actions/cache@v6
with:
path: |
~/.cargo
Expand Down Expand Up @@ -182,10 +182,10 @@ jobs:
runs-on: ubuntu-latest
name: Build FreeBSD
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Build
id: build
uses: cross-platform-actions/action@v1.1.0
uses: cross-platform-actions/action@v1.3.0
env:
DEBUG: napi:*
RUSTUP_IO_THREADS: 1
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
node: '24'
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup node
uses: actions/setup-node@v6
with:
Expand Down Expand Up @@ -311,7 +311,7 @@ jobs:
node: '24'
runs-on: ${{ contains(matrix.target, 'aarch64') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup node
uses: actions/setup-node@v6
with:
Expand Down Expand Up @@ -383,7 +383,7 @@ jobs:
- '24'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup node
uses: actions/setup-node@v6
with:
Expand Down Expand Up @@ -416,7 +416,7 @@ jobs:
- test-linux-binding
- test-nodejs-wasi
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup node
uses: actions/setup-node@v6
with:
Expand Down
201 changes: 140 additions & 61 deletions index.js

Large diffs are not rendered by default.

30 changes: 16 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,25 @@
"version": "napi version"
},
"devDependencies": {
"@napi-rs/cli": "^3.1.3",
"@napi-rs/lzma": "^1.4.4",
"@napi-rs/wasm-runtime": "^1.0.3",
"@emnapi/core": "^1.11.2",
"@emnapi/runtime": "^1.11.2",
"@napi-rs/cli": "^3.7.3",
"@napi-rs/lzma": "^1.4.5",
"@napi-rs/wasm-runtime": "^1.1.6",
"@oxc-node/core": "^0.1.0",
"@taplo/cli": "^0.7.0",
"@types/node": "^24.2.1",
"@types/tar": "^7.0.0",
"ava": "^8.0.0",
"chalk": "^5.5.0",
"@types/node": "^26.1.1",
"@types/tar": "^7.0.87",
"ava": "^8.0.1",
"chalk": "^5.6.2",
"husky": "^9.1.7",
"lint-staged": "^17.0.0",
"npm-run-all2": "^8.0.4",
"oxlint": "^1.11.1",
"prettier": "^3.6.2",
"tar": "^7.4.3",
"tinybench": "^6.0.0",
"typescript": "^6.0.0"
"lint-staged": "^17.0.8",
"npm-run-all2": "^9.0.2",
"oxlint": "^1.73.0",
"prettier": "^3.9.5",
"tar": "^7.5.20",
"tinybench": "^6.0.2",
"typescript": "^6.0.3"
},
"lint-staged": {
"*.@(js|ts|tsx)": [
Expand Down
1 change: 1 addition & 0 deletions tar.wasi-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const {
type: 'module',
})


return worker
},
overwriteImports(importObject) {
Expand Down
2 changes: 1 addition & 1 deletion tar.wasi.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if (__nodeFs.existsSync(__wasmDebugFilePath)) {
__wasmFilePath = __wasmDebugFilePath
} else if (!__nodeFs.existsSync(__wasmFilePath)) {
try {
__wasmFilePath = __nodePath.resolve('@napi-rs/tar-wasm32-wasi')
__wasmFilePath = require.resolve('@napi-rs/tar-wasm32-wasi/tar.wasm32-wasi.wasm')
} catch {
throw new Error('Cannot find tar.wasm32-wasi.wasm file, and @napi-rs/tar-wasm32-wasi package is not installed.')
}
Expand Down
2 changes: 2 additions & 0 deletions wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const handler = new MessageHandler({
printErr: function() {
// eslint-disable-next-line no-console
console.error.apply(console, arguments)

},
})
return instantiateNapiModuleSync(wasmModule, {
Expand All @@ -25,6 +26,7 @@ const handler = new MessageHandler({
},
})
},

})

globalThis.onmessage = function (e) {
Expand Down
Loading
Loading