Skip to content

Commit

Permalink
chore(*): update wasi browser binding
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Apr 23, 2024
1 parent 5b22f19 commit b3a8654
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 64 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
"postinstall": "husky install"
},
"devDependencies": {
"@napi-rs/cli": "^3.0.0-alpha.53",
"@napi-rs/cli": "^3.0.0-alpha.54",
"@napi-rs/wasm-runtime": "^0.2.3",
"@swc-node/core": "^1.13.0",
"@swc-node/register": "^1.9.0",
"@swc/core": "^1.4.16",
"@taplo/cli": "^0.7.0",
"@tybys/wasm-util": "^0.8.1",
"@tybys/wasm-util": "^0.8.3",
"@types/node": "^20.12.7",
"ava": "^6.1.2",
"benchmark": "^2.1.4",
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.53",
"@napi-rs/cli": "^3.0.0-alpha.54",
"argon2": "^0.40.1",
"cross-env": "^7.0.3"
}
Expand Down
8 changes: 1 addition & 7 deletions packages/argon2/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { instantiateNapiModuleSync, MessageHandler, WASI, createFsProxy } from '@napi-rs/wasm-runtime'

const fs = null
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
const wasi = new WASI({
fs,
preopens: {
'/': '/',
},
print: function () {
// eslint-disable-next-line no-console
console.log.apply(console, arguments)
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.53",
"@napi-rs/cli": "^3.0.0-alpha.54",
"@types/bcrypt": "^5.0.2",
"bcrypt": "^5.1.1",
"bcryptjs": "^2.4.3",
Expand Down
8 changes: 1 addition & 7 deletions packages/bcrypt/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { instantiateNapiModuleSync, MessageHandler, WASI, createFsProxy } from '@napi-rs/wasm-runtime'

const fs = null
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
const wasi = new WASI({
fs,
preopens: {
'/': '/',
},
print: function () {
// eslint-disable-next-line no-console
console.log.apply(console, arguments)
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.53",
"@napi-rs/cli": "^3.0.0-alpha.54",
"@types/crc": "^3.8.3",
"buffer": "^6.0.3",
"crc": "^4.3.2",
Expand Down
8 changes: 1 addition & 7 deletions packages/crc32/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { instantiateNapiModuleSync, MessageHandler, WASI, createFsProxy } from '@napi-rs/wasm-runtime'

const fs = null
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
const wasi = new WASI({
fs,
preopens: {
'/': '/',
},
print: function () {
// eslint-disable-next-line no-console
console.log.apply(console, arguments)
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.53",
"@napi-rs/cli": "^3.0.0-alpha.54",
"@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.53",
"@napi-rs/cli": "^3.0.0-alpha.54",
"nodejieba": "^2.6.0"
},
"funding": {
Expand Down
8 changes: 1 addition & 7 deletions packages/jieba/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { instantiateNapiModuleSync, MessageHandler, WASI, createFsProxy } from '@napi-rs/wasm-runtime'

const fs = null
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
const wasi = new WASI({
fs,
preopens: {
'/': '/',
},
print: function () {
// eslint-disable-next-line no-console
console.log.apply(console, arguments)
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.53",
"@napi-rs/cli": "^3.0.0-alpha.54",
"@types/jsonwebtoken": "^9.0.6",
"jsonwebtoken": "^9.0.2"
}
Expand Down
8 changes: 1 addition & 7 deletions packages/jsonwebtoken/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { instantiateNapiModuleSync, MessageHandler, WASI, createFsProxy } from '@napi-rs/wasm-runtime'

const fs = null
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
const wasi = new WASI({
fs,
preopens: {
'/': '/',
},
print: function () {
// eslint-disable-next-line no-console
console.log.apply(console, arguments)
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.53",
"@napi-rs/cli": "^3.0.0-alpha.54",
"@types/xxhashjs": "^0.2.4",
"webpack": "^5.91.0",
"xxhash": "^0.3.0",
Expand Down
8 changes: 1 addition & 7 deletions packages/xxhash/wasi-worker-browser.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { instantiateNapiModuleSync, MessageHandler, WASI, createFsProxy } from '@napi-rs/wasm-runtime'

const fs = null
import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime'

const handler = new MessageHandler({
onLoad({ wasmModule, wasmMemory }) {
const wasi = new WASI({
fs,
preopens: {
'/': '/',
},
print: function () {
// eslint-disable-next-line no-console
console.log.apply(console, arguments)
Expand Down
26 changes: 13 additions & 13 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.53":
version: 3.0.0-alpha.53
resolution: "@napi-rs/cli@npm:3.0.0-alpha.53"
"@napi-rs/cli@npm:^3.0.0-alpha.54":
version: 3.0.0-alpha.54
resolution: "@napi-rs/cli@npm:3.0.0-alpha.54"
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/9d40ae06c536d289a03aa5abf8832fd2c9e42d148a6c4f8f1516192ca9ab4fbd3bcc223e4775c27ce16818c2408927af2f13cd24625dc2af663527725271d152
checksum: 10c0/61fe51bce4495b571dc8af84c5e89c654a9cb705827607e613df5fd0da732067b4a8bf820f9e53375bfe9c05842949c4a62b489437719ffd39d132542fa0122b
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.53"
"@napi-rs/cli": "npm:^3.0.0-alpha.54"
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.53"
"@napi-rs/cli": "npm:^3.0.0-alpha.54"
"@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.53"
"@napi-rs/cli": "npm:^3.0.0-alpha.54"
"@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.53"
"@napi-rs/cli": "npm:^3.0.0-alpha.54"
"@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.53"
"@napi-rs/cli": "npm:^3.0.0-alpha.54"
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.53"
"@napi-rs/cli": "npm:^3.0.0-alpha.54"
"@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.53"
"@napi-rs/cli": "npm:^3.0.0-alpha.54"
"@types/xxhashjs": "npm:^0.2.4"
webpack: "npm:^5.91.0"
xxhash: "npm:^0.3.0"
Expand Down Expand Up @@ -6209,13 +6209,13 @@ __metadata:
version: 0.0.0-use.local
resolution: "node-rs@workspace:."
dependencies:
"@napi-rs/cli": "npm:^3.0.0-alpha.53"
"@napi-rs/cli": "npm:^3.0.0-alpha.54"
"@napi-rs/wasm-runtime": "npm:^0.2.3"
"@swc-node/core": "npm:^1.13.0"
"@swc-node/register": "npm:^1.9.0"
"@swc/core": "npm:^1.4.16"
"@taplo/cli": "npm:^0.7.0"
"@tybys/wasm-util": "npm:^0.8.1"
"@tybys/wasm-util": "npm:^0.8.3"
"@types/node": "npm:^20.12.7"
ava: "npm:^6.1.2"
benchmark: "npm:^2.1.4"
Expand Down

0 comments on commit b3a8654

Please sign in to comment.