From 358cdd2725444091b3322c47754e3cbd9b1d3614 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:29:34 +0000 Subject: [PATCH] fix: fixup exports from `noir_wasm` (#4022) # Description ## Problem\* Resolves ## Summary\* The ordering on `exports` is important plus we have `types` missing which was causing issues in `aztec-packages`. ## Additional Context ## Documentation\* Check one: - [ ] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR. # PR Checklist\* - [ ] I have tested the changes locally. - [ ] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --- .github/workflows/test-js-packages.yml | 4 +++- compiler/wasm/.gitignore | 1 - compiler/wasm/package.json | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index 31bd1219654..addc9ce3d83 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -80,7 +80,9 @@ jobs: uses: actions/upload-artifact@v3 with: name: noir_wasm - path: ./compiler/wasm + path: | + ./compiler/wasm/dist + ./compiler/wasm/build retention-days: 3 build-acvm-js: diff --git a/compiler/wasm/.gitignore b/compiler/wasm/.gitignore index f9d4af3fe3b..1b823a2c19a 100644 --- a/compiler/wasm/.gitignore +++ b/compiler/wasm/.gitignore @@ -1,3 +1,2 @@ -noir-script/target dist build diff --git a/compiler/wasm/package.json b/compiler/wasm/package.json index 1235a748d13..4a71d8aa77d 100644 --- a/compiler/wasm/package.json +++ b/compiler/wasm/package.json @@ -9,9 +9,10 @@ "types": "./dist/types/src/index.d.cts", "exports": { "node": "./dist/node/main.js", - "default": "./dist/web/main.mjs", "import": "./dist/web/main.mjs", - "require": "./dist/node/main.js" + "require": "./dist/node/main.js", + "types": "./dist/types/src/index.d.cts", + "default": "./dist/web/main.mjs" }, "files": [ "dist",