Skip to content

Commit

Permalink
fix(*): update browser worker bindings (#830)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn authored Apr 22, 2024
1 parent fe7fafd commit 02d2bd9
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 56 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"postinstall": "husky install"
},
"devDependencies": {
"@napi-rs/cli": "^3.0.0-alpha.51",
"@napi-rs/cli": "^3.0.0-alpha.52",
"@napi-rs/wasm-runtime": "^0.2.0",
"@swc-node/core": "^1.13.0",
"@swc-node/register": "^1.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/argon2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"version": "napi version && git add npm"
},
"devDependencies": {
"@napi-rs/cli": "^3.0.0-alpha.51",
"@napi-rs/cli": "^3.0.0-alpha.52",
"argon2": "^0.40.1",
"cross-env": "^7.0.3"
}
Expand Down
7 changes: 1 addition & 6 deletions packages/argon2/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'
import { Volume, createFsFromVolume } from '@napi-rs/wasm-runtime/fs'

const fs = createFsFromVolume(
Volume.fromJSON({
'/': null,
}),
)
const fs = null

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
Expand Down
2 changes: 1 addition & 1 deletion packages/bcrypt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"url": "https://github.com/napi-rs/node-rs/issues"
},
"devDependencies": {
"@napi-rs/cli": "^3.0.0-alpha.51",
"@napi-rs/cli": "^3.0.0-alpha.52",
"@types/bcrypt": "^5.0.2",
"bcrypt": "^5.1.1",
"bcryptjs": "^2.4.3",
Expand Down
7 changes: 1 addition & 6 deletions packages/bcrypt/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'
import { Volume, createFsFromVolume } from '@napi-rs/wasm-runtime/fs'

const fs = createFsFromVolume(
Volume.fromJSON({
'/': null,
}),
)
const fs = null

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
Expand Down
2 changes: 1 addition & 1 deletion packages/crc32/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"url": "https://github.com/napi-rs/node-rs/issues"
},
"devDependencies": {
"@napi-rs/cli": "^3.0.0-alpha.51",
"@napi-rs/cli": "^3.0.0-alpha.52",
"@types/crc": "^3.8.3",
"buffer": "^6.0.3",
"crc": "^4.3.2",
Expand Down
7 changes: 1 addition & 6 deletions packages/crc32/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'
import { Volume, createFsFromVolume } from '@napi-rs/wasm-runtime/fs'

const fs = createFsFromVolume(
Volume.fromJSON({
'/': null,
}),
)
const fs = null

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
Expand Down
2 changes: 1 addition & 1 deletion packages/deno-lint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"typanion": "^3.14.0"
},
"devDependencies": {
"@napi-rs/cli": "^3.0.0-alpha.51",
"@napi-rs/cli": "^3.0.0-alpha.52",
"@types/webpack": "^5.28.5"
},
"funding": {
Expand Down
2 changes: 1 addition & 1 deletion packages/jieba/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"url": "https://github.com/napi-rs/node-rs/issues"
},
"devDependencies": {
"@napi-rs/cli": "^3.0.0-alpha.51",
"@napi-rs/cli": "^3.0.0-alpha.52",
"nodejieba": "^2.6.0"
},
"funding": {
Expand Down
7 changes: 1 addition & 6 deletions packages/jieba/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'
import { Volume, createFsFromVolume } from '@napi-rs/wasm-runtime/fs'

const fs = createFsFromVolume(
Volume.fromJSON({
'/': null,
}),
)
const fs = null

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsonwebtoken/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"node": ">= 10"
},
"devDependencies": {
"@napi-rs/cli": "^3.0.0-alpha.51",
"@napi-rs/cli": "^3.0.0-alpha.52",
"@types/jsonwebtoken": "^9.0.6",
"jsonwebtoken": "^9.0.2"
}
Expand Down
7 changes: 1 addition & 6 deletions packages/jsonwebtoken/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'
import { Volume, createFsFromVolume } from '@napi-rs/wasm-runtime/fs'

const fs = createFsFromVolume(
Volume.fromJSON({
'/': null,
}),
)
const fs = null

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
Expand Down
2 changes: 1 addition & 1 deletion packages/xxhash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"url": "https://github.com/napi-rs/node-rs/issues"
},
"devDependencies": {
"@napi-rs/cli": "^3.0.0-alpha.51",
"@napi-rs/cli": "^3.0.0-alpha.52",
"@types/xxhashjs": "^0.2.4",
"webpack": "^5.91.0",
"xxhash": "^0.3.0",
Expand Down
7 changes: 1 addition & 6 deletions packages/xxhash/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'
import { Volume, createFsFromVolume } from '@napi-rs/wasm-runtime/fs'

const fs = createFsFromVolume(
Volume.fromJSON({
'/': null,
}),
)
const fs = null

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
Expand Down
24 changes: 12 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ __metadata:
languageName: node
linkType: hard

"@napi-rs/cli@npm:^3.0.0-alpha.51":
version: 3.0.0-alpha.51
resolution: "@napi-rs/cli@npm:3.0.0-alpha.51"
"@napi-rs/cli@npm:^3.0.0-alpha.52":
version: 3.0.0-alpha.52
resolution: "@napi-rs/cli@npm:3.0.0-alpha.52"
dependencies:
"@napi-rs/cross-toolchain": "npm:^0.0.14"
"@napi-rs/wasm-tools": "npm:^0.0.1"
Expand All @@ -289,7 +289,7 @@ __metadata:
bin:
napi: dist/cli.js
napi-raw: cli.mjs
checksum: 10c0/427f1bab4cd7efcf6ca8e997b253bfc6b6a646f4e7ced918b115b2d5df3fc8ff8ed9c7e81fb3d93368f0949388adc2aa7376415cc8ab97c589caf03869585696
checksum: 10c0/0976c5bc3714c74c8236d1b48e087a7579448efa4a0b4e8f0fc7ce05a2af9e18e20e7cfc91ac75b67f0f3f459c5363047b17116b32d2eda602da651e9593824b
languageName: node
linkType: hard

Expand Down Expand Up @@ -776,7 +776,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@node-rs/argon2@workspace:packages/argon2"
dependencies:
"@napi-rs/cli": "npm:^3.0.0-alpha.51"
"@napi-rs/cli": "npm:^3.0.0-alpha.52"
argon2: "npm:^0.40.1"
cross-env: "npm:^7.0.3"
languageName: unknown
Expand All @@ -786,7 +786,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@node-rs/bcrypt@workspace:packages/bcrypt"
dependencies:
"@napi-rs/cli": "npm:^3.0.0-alpha.51"
"@napi-rs/cli": "npm:^3.0.0-alpha.52"
"@types/bcrypt": "npm:^5.0.2"
bcrypt: "npm:^5.1.1"
bcryptjs: "npm:^2.4.3"
Expand All @@ -798,7 +798,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@node-rs/crc32@workspace:packages/crc32"
dependencies:
"@napi-rs/cli": "npm:^3.0.0-alpha.51"
"@napi-rs/cli": "npm:^3.0.0-alpha.52"
"@types/crc": "npm:^3.8.3"
buffer: "npm:^6.0.3"
crc: "npm:^4.3.2"
Expand All @@ -810,7 +810,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@node-rs/deno-lint@workspace:packages/deno-lint"
dependencies:
"@napi-rs/cli": "npm:^3.0.0-alpha.51"
"@napi-rs/cli": "npm:^3.0.0-alpha.52"
"@types/webpack": "npm:^5.28.5"
clipanion: "npm:^4.0.0-rc.3"
typanion: "npm:^3.14.0"
Expand All @@ -831,7 +831,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@node-rs/jieba@workspace:packages/jieba"
dependencies:
"@napi-rs/cli": "npm:^3.0.0-alpha.51"
"@napi-rs/cli": "npm:^3.0.0-alpha.52"
nodejieba: "npm:^2.6.0"
languageName: unknown
linkType: soft
Expand All @@ -840,7 +840,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@node-rs/jsonwebtoken@workspace:packages/jsonwebtoken"
dependencies:
"@napi-rs/cli": "npm:^3.0.0-alpha.51"
"@napi-rs/cli": "npm:^3.0.0-alpha.52"
"@types/jsonwebtoken": "npm:^9.0.6"
jsonwebtoken: "npm:^9.0.2"
languageName: unknown
Expand All @@ -850,7 +850,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@node-rs/xxhash@workspace:packages/xxhash"
dependencies:
"@napi-rs/cli": "npm:^3.0.0-alpha.51"
"@napi-rs/cli": "npm:^3.0.0-alpha.52"
"@types/xxhashjs": "npm:^0.2.4"
webpack: "npm:^5.91.0"
xxhash: "npm:^0.3.0"
Expand Down Expand Up @@ -6209,7 +6209,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "node-rs@workspace:."
dependencies:
"@napi-rs/cli": "npm:^3.0.0-alpha.51"
"@napi-rs/cli": "npm:^3.0.0-alpha.52"
"@napi-rs/wasm-runtime": "npm:^0.2.0"
"@swc-node/core": "npm:^1.13.0"
"@swc-node/register": "npm:^1.9.0"
Expand Down

0 comments on commit 02d2bd9

Please sign in to comment.