Skip to content

Commit

Permalink
Bundle napi-wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett committed Aug 20, 2023
1 parent ef114ec commit bdda32d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ jobs:
with:
cache: yarn
node-version: 16
- run: yarn --frozen-lockfile --ignore-scripts
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Build npm packages
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@parcel/watcher",
"version": "2.3.0-alpha.2",
"version": "2.3.0-alpha.3",
"main": "index.js",
"types": "index.d.ts",
"repository": {
Expand All @@ -20,6 +20,7 @@
"index.js",
"index.js.flow",
"index.d.ts",
"wrapper.js",
"package.json",
"README.md"
],
Expand Down
2 changes: 2 additions & 0 deletions scripts/build-wasm.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ fs.writeFileSync(`${dir}/npm/wasm/index.mjs`, js);

fs.copyFileSync(`${dir}/wrapper.js`, `${dir}/npm/wasm/wrapper.js`);
fs.copyFileSync(`${dir}/wasm/watcher.wasm`, `${dir}/npm/wasm/watcher.wasm`);
fs.cpSync(`${dir}/node_modules/napi-wasm`, `${dir}/npm/wasm/node_modules/napi-wasm`, {recursive: true});

let wasmPkg = { ...pkg };
wasmPkg.name = '@parcel/watcher-wasm';
Expand All @@ -38,6 +39,7 @@ wasmPkg.dependencies = {
'is-glob': pkg.dependencies['is-glob'],
'micromatch': pkg.dependencies['micromatch']
};
wasmPkg.bundledDependencies = ['napi-wasm']; // for stackblitz
delete wasmPkg.exports;
delete wasmPkg.binary;
delete wasmPkg['lint-staged'];
Expand Down

0 comments on commit bdda32d

Please sign in to comment.