Skip to content

Commit 063330f

Browse files
committed
0.3.3
1 parent c8f0e96 commit 063330f

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const fs = require("fs");
2+
const path = require("path");
3+
4+
const pkgPath = path.join("npm", "wasm32-wasi", "package.json");
5+
6+
const json = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
7+
8+
delete json.cpu;
9+
delete json.os;
10+
delete json.napi;
11+
12+
fs.writeFileSync(pkgPath, JSON.stringify(json, null, 2));
13+
console.log("✓ Patched WASM package.json successfully");

.github/workflows/CI.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -314,22 +314,7 @@ jobs:
314314
run: yarn artifacts
315315

316316
- name: Patch WASM package.json for Universal Install
317-
run: |
318-
WASM_PACKAGE_DIR="./npm/wasm32-wasi"
319-
320-
if [ -d "$WASM_PACKAGE_DIR" ]; then
321-
echo "Patching WASM package in $WASM_PACKAGE_DIR"
322-
323-
SED="sed -i"
324-
$SED '/"cpu":/d' "$WASM_PACKAGE_DIR/package.json"
325-
$SED '/"os":/d' "$WASM_PACKAGE_DIR/package.json"
326-
$SED '/"napi":/d' "$WASM_PACKAGE_DIR/package.json"
327-
328-
echo "WASM Package.json patched successfully."
329-
else
330-
echo "WASM package directory not found, skipping patch."
331-
fi
332-
shell: bash
317+
run: node .github/actions/patch-wasm-package.js
333318

334319
- name: List packages
335320
run: ls -R ./npm

0 commit comments

Comments
 (0)