@tailwindcss/oxide-wasm32-wasi 0.0.0-insiders.f3157cd → 0.0.0-insiders.f4a7eea

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,7 +88,7 @@ const encodeValue = (memfs, value, type) => {
88
88
  const decodeValue = (memfs, payload, type) => {
89
89
  if (type === 0) return undefined
90
90
  if (type === 1) return null
91
- if (type === 2) return Boolean(payload[0])
91
+ if (type === 2) return Boolean(new Int32Array(payload.buffer, payload.byteOffset, 1)[0])
92
92
  if (type === 3) return new Float64Array(payload.buffer, payload.byteOffset, 1)[0]
93
93
  if (type === 4) return new TextDecoder().decode(payload.slice())
94
94
  if (type === 6) {
@@ -152,20 +152,20 @@ module.exports.createOnMessage = (fs) => function onMessage(e) {
152
152
  const fn = fs[type]
153
153
  try {
154
154
  const ret = fn.apply(fs, payload)
155
- Atomics.store(sab, 0, 0)
156
155
  const t = getType(ret)
157
156
  Atomics.store(sab, 1, t)
158
157
  const v = encodeValue(fs, ret, t)
159
158
  Atomics.store(sab, 2, v.length)
160
159
  new Uint8Array(sab.buffer).set(v, 16)
160
+ Atomics.store(sab, 0, 0) // success
161
161
 
162
162
  } catch (/** @type {any} */ err) {
163
- Atomics.store(sab, 0, 1)
164
163
  const t = getType(err)
165
164
  Atomics.store(sab, 1, t)
166
165
  const v = encodeValue(fs, err, t)
167
166
  Atomics.store(sab, 2, v.length)
168
167
  new Uint8Array(sab.buffer).set(v, 16)
168
+ Atomics.store(sab, 0, 1) // error
169
169
  } finally {
170
170
  Atomics.notify(sab, 0)
171
171
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@napi-rs/wasm-runtime",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "type": "module",
5
5
  "description": "Runtime and polyfill for wasm targets",
6
6
  "author": {
@@ -40,8 +40,8 @@
40
40
  "tslib": "^2.8.1"
41
41
  },
42
42
  "dependencies": {
43
- "@emnapi/core": "^1.4.0",
44
- "@emnapi/runtime": "^1.4.0",
43
+ "@emnapi/core": "^1.4.3",
44
+ "@emnapi/runtime": "^1.4.3",
45
45
  "@tybys/wasm-util": "^0.9.0"
46
46
  },
47
47
  "scripts": {
@@ -57,5 +57,5 @@
57
57
  "import": "./dist/fs.js"
58
58
  }
59
59
  },
60
- "gitHead": "84209fc82931e8c6ef93e61e4a0e1d1a0ffaf511"
60
+ "gitHead": "984d166275f29e24e4bcf9d6189fe9bbe2e96bfe"
61
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailwindcss/oxide-wasm32-wasi",
3
- "version": "0.0.0-insiders.f3157cd",
3
+ "version": "0.0.0-insiders.f4a7eea",
4
4
  "cpu": [
5
5
  "wasm32"
6
6
  ],
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "browser": "tailwindcss-oxide.wasi-browser.js",
29
29
  "dependencies": {
30
- "@napi-rs/wasm-runtime": "^0.2.9",
30
+ "@napi-rs/wasm-runtime": "^0.2.11",
31
31
  "@emnapi/core": "^1.4.3",
32
32
  "@emnapi/runtime": "^1.4.3",
33
33
  "@tybys/wasm-util": "^0.9.0",
Binary file