From 0abf706a908cfd00d14cbb0bc1092f9c0b4ef352 Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Wed, 27 Sep 2023 16:56:04 +0000 Subject: [PATCH 1/6] Provide cross compile to cjs. --- barretenberg/ts/cjs-entry/index.cjs | 10 -------- barretenberg/ts/cjs-entry/index.d.ts | 1 - barretenberg/ts/package.json | 13 +++++------ barretenberg/ts/scripts/write_package_type.sh | 14 +++++++++++ .../factory/node/index.ts | 12 +++++++++- .../factory/node/index.ts | 12 +++++++++- .../fetch_code/node/index.ts | 12 +++++++++- barretenberg/ts/src/bindgen/index.ts | 4 ++-- .../ts/src/crs/node/ignition_files_crs.ts | 12 +++++++++- barretenberg/ts/src/info.json | 22 ------------------ barretenberg/ts/src/info.ts | 23 +++++++++++++++++++ barretenberg/ts/src/main.ts | 2 +- barretenberg/ts/tsconfig.cjs.json | 8 +++++++ barretenberg/ts/tsconfig.json | 5 +++- 14 files changed, 102 insertions(+), 48 deletions(-) delete mode 100644 barretenberg/ts/cjs-entry/index.cjs delete mode 100644 barretenberg/ts/cjs-entry/index.d.ts create mode 100755 barretenberg/ts/scripts/write_package_type.sh delete mode 100644 barretenberg/ts/src/info.json create mode 100644 barretenberg/ts/src/info.ts create mode 100644 barretenberg/ts/tsconfig.cjs.json diff --git a/barretenberg/ts/cjs-entry/index.cjs b/barretenberg/ts/cjs-entry/index.cjs deleted file mode 100644 index 1e87567d254..00000000000 --- a/barretenberg/ts/cjs-entry/index.cjs +++ /dev/null @@ -1,10 +0,0 @@ -let loadedModule; - -async function loadModule() { - if (!loadedModule) { - loadedModule = await import('../dest/node/index.js'); - } - return loadedModule; -} - -module.exports = { loadModule }; diff --git a/barretenberg/ts/cjs-entry/index.d.ts b/barretenberg/ts/cjs-entry/index.d.ts deleted file mode 100644 index 405d72d5650..00000000000 --- a/barretenberg/ts/cjs-entry/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function loadModule(): Promise; diff --git a/barretenberg/ts/package.json b/barretenberg/ts/package.json index 97ac8ae3980..01f17b4aee8 100644 --- a/barretenberg/ts/package.json +++ b/barretenberg/ts/package.json @@ -4,17 +4,15 @@ "homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/barretenberg/ts", "license": "MIT", "type": "module", - "types": "./cjs-entry/index.d.ts", + "types": "./dest/node-cjs/index.d.ts", "exports": { ".": { - "require": "./cjs-entry/index.cjs", + "require": "./dest/node-cjs/index.js", "browser": "./dest/browser/index.js", "default": "./dest/node/index.js" } }, - "bin": { - "bb.js": "./dest/node/main.js" - }, + "bin": "./dest/node/main.js", "files": [ "src/", "dest/", @@ -22,11 +20,12 @@ "README.md" ], "scripts": { - "clean": "rm -rf ./dest .tsbuildinfo", - "build": "yarn clean && yarn build:wasm && yarn build:ts", + "clean": "rm -rf ./dest .tsbuildinfo*", + "build": "yarn clean && yarn build:wasm && yarn build:ts && yarn build:ts:cjs", "build:dev": "tsc -b --watch", "build:wasm": "cd ../cpp && cmake --preset wasm-threads && cmake --build --preset wasm-threads && cmake --preset wasm && cmake --build --preset wasm && ./scripts/strip-wasm.sh", "build:ts": "tsc -b && cp ./src/barretenberg-threads.wasm ./dest/node && webpack && chmod +x ./dest/node/main.js", + "build:ts:cjs": "tsc -b tsconfig.cjs.json && cp ./src/barretenberg-threads.wasm ./dest/node-cjs && ./scripts/write_package_type.sh", "build:bindings": "cd .. && ./scripts/bindgen.sh", "formatting": "prettier --check ./src && eslint --max-warnings 0 ./src", "formatting:fix": "prettier -w ./src", diff --git a/barretenberg/ts/scripts/write_package_type.sh b/barretenberg/ts/scripts/write_package_type.sh new file mode 100755 index 00000000000..0c2d37565bf --- /dev/null +++ b/barretenberg/ts/scripts/write_package_type.sh @@ -0,0 +1,14 @@ +#!/bin/sh +cat >dest/node-cjs/package.json < Date: Wed, 27 Sep 2023 17:10:54 +0000 Subject: [PATCH 2/6] fix. --- barretenberg/ts/tsconfig.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/barretenberg/ts/tsconfig.json b/barretenberg/ts/tsconfig.json index 49a65c24eeb..aff973758de 100644 --- a/barretenberg/ts/tsconfig.json +++ b/barretenberg/ts/tsconfig.json @@ -17,8 +17,5 @@ "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": ["src"], - "exclude": [ - "**/browser/*" - ] + "include": ["src"] } From d114fd1a5b975a5bcd66b2f0dcf2e08b2d93a034 Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Thu, 28 Sep 2023 13:21:38 +0000 Subject: [PATCH 3/6] Ensure only one copy of wasm in dest. --- .ignore | 2 -- barretenberg/ts/README.md | 9 -------- barretenberg/ts/package.json | 14 +++++++------ barretenberg/ts/scripts/build_wasm.sh | 21 +++++++++++++++++++ ...ite_package_type.sh => cjs_postprocess.sh} | 0 barretenberg/ts/src/barretenberg-threads.wasm | 1 - barretenberg/ts/src/barretenberg.wasm | 1 - .../barretenberg-threads.wasm | 1 + .../src/barretenberg_wasm/barretenberg.wasm | 1 + .../factory/node/index.ts | 4 ++-- .../factory/node/index.ts | 4 ++-- .../fetch_code/browser/index.ts | 4 ++-- .../fetch_code/node/index.ts | 6 +++--- .../ts/src/crs/node/ignition_files_crs.ts | 4 ++-- 14 files changed, 42 insertions(+), 30 deletions(-) delete mode 100644 .ignore create mode 100755 barretenberg/ts/scripts/build_wasm.sh rename barretenberg/ts/scripts/{write_package_type.sh => cjs_postprocess.sh} (100%) delete mode 120000 barretenberg/ts/src/barretenberg-threads.wasm delete mode 120000 barretenberg/ts/src/barretenberg.wasm create mode 120000 barretenberg/ts/src/barretenberg_wasm/barretenberg-threads.wasm create mode 120000 barretenberg/ts/src/barretenberg_wasm/barretenberg.wasm diff --git a/.ignore b/.ignore deleted file mode 100644 index d263d2fa829..00000000000 --- a/.ignore +++ /dev/null @@ -1,2 +0,0 @@ -/barretenberg/ts -/barretenberg/foundation \ No newline at end of file diff --git a/barretenberg/ts/README.md b/barretenberg/ts/README.md index ae92a04e90d..2993b8c9132 100644 --- a/barretenberg/ts/README.md +++ b/barretenberg/ts/README.md @@ -104,15 +104,6 @@ in size) is loaded and keeps page load times responsive. const { Barretenberg, RawBuffer, Crs } = await import('@aztec/bb.js'); ``` -### CommonJS Usage - -The import syntax is slightly different in a CommonJS environment. - -```typescript -const { loadModule } = await import('@aztec/bb.js'); -const { Barretenberg, RawBuffer, Crs } = await loadModule(); -``` - ## Development Create a symlink to the root script `bb.js-dev` in your path. You can now run the current state of the code from diff --git a/barretenberg/ts/package.json b/barretenberg/ts/package.json index 01f17b4aee8..e5a0986532f 100644 --- a/barretenberg/ts/package.json +++ b/barretenberg/ts/package.json @@ -12,7 +12,9 @@ "default": "./dest/node/index.js" } }, - "bin": "./dest/node/main.js", + "bin": { + "bb.js": "./dest/node/main.js" + }, "files": [ "src/", "dest/", @@ -21,11 +23,11 @@ ], "scripts": { "clean": "rm -rf ./dest .tsbuildinfo*", - "build": "yarn clean && yarn build:wasm && yarn build:ts && yarn build:ts:cjs", - "build:dev": "tsc -b --watch", - "build:wasm": "cd ../cpp && cmake --preset wasm-threads && cmake --build --preset wasm-threads && cmake --preset wasm && cmake --build --preset wasm && ./scripts/strip-wasm.sh", - "build:ts": "tsc -b && cp ./src/barretenberg-threads.wasm ./dest/node && webpack && chmod +x ./dest/node/main.js", - "build:ts:cjs": "tsc -b tsconfig.cjs.json && cp ./src/barretenberg-threads.wasm ./dest/node-cjs && ./scripts/write_package_type.sh", + "build": "yarn clean && yarn build:wasm && yarn build:esm && yarn build:cjs && yarn build:browser", + "build:wasm": "./scripts/build_wasm.sh", + "build:esm": "tsc -b && chmod +x ./dest/node/main.js", + "build:cjs": "tsc -b tsconfig.cjs.json && ./scripts/cjs_postprocess.sh", + "build:browser": "webpack", "build:bindings": "cd .. && ./scripts/bindgen.sh", "formatting": "prettier --check ./src && eslint --max-warnings 0 ./src", "formatting:fix": "prettier -w ./src", diff --git a/barretenberg/ts/scripts/build_wasm.sh b/barretenberg/ts/scripts/build_wasm.sh new file mode 100755 index 00000000000..4f96e164f78 --- /dev/null +++ b/barretenberg/ts/scripts/build_wasm.sh @@ -0,0 +1,21 @@ +#!/bin/sh +set -eu + +# Build the wasms and strip debug symbols. +cd ../cpp +cmake --preset wasm-threads && cmake --build --preset wasm-threads +cmake --preset wasm && cmake --build --preset wasm +./scripts/strip-wasm.sh + +# Copy the wasm to its home in the bb.js dest folder. +# We only need the threads wasm, as node always uses threads. +# When building the the browser bundle, both wasms are inlined directly +mkdir -p ../ts/dest +cp build-wasm-threads/bin/barretenberg.wasm ../ts/dest/barretenberg-threads.wasm + +# Make symlinks to point to this file from location fetchCode reads from. +cd ../ts/dest +mkdir -p ./node/barretenberg_wasm +mkdir -p ./node-cjs/barretenberg_wasm +ln -s ../../barretenberg-threads.wasm ./node/barretenberg_wasm/barretenberg-threads.wasm +ln -s ../../barretenberg-threads.wasm ./node-cjs/barretenberg_wasm/barretenberg-threads.wasm \ No newline at end of file diff --git a/barretenberg/ts/scripts/write_package_type.sh b/barretenberg/ts/scripts/cjs_postprocess.sh similarity index 100% rename from barretenberg/ts/scripts/write_package_type.sh rename to barretenberg/ts/scripts/cjs_postprocess.sh diff --git a/barretenberg/ts/src/barretenberg-threads.wasm b/barretenberg/ts/src/barretenberg-threads.wasm deleted file mode 120000 index 1474d5ebb4a..00000000000 --- a/barretenberg/ts/src/barretenberg-threads.wasm +++ /dev/null @@ -1 +0,0 @@ -../../cpp/build-wasm-threads/bin/barretenberg.wasm \ No newline at end of file diff --git a/barretenberg/ts/src/barretenberg.wasm b/barretenberg/ts/src/barretenberg.wasm deleted file mode 120000 index 69e221f70ed..00000000000 --- a/barretenberg/ts/src/barretenberg.wasm +++ /dev/null @@ -1 +0,0 @@ -../../cpp/build-wasm/bin/barretenberg.wasm \ No newline at end of file diff --git a/barretenberg/ts/src/barretenberg_wasm/barretenberg-threads.wasm b/barretenberg/ts/src/barretenberg_wasm/barretenberg-threads.wasm new file mode 120000 index 00000000000..7e9341265ab --- /dev/null +++ b/barretenberg/ts/src/barretenberg_wasm/barretenberg-threads.wasm @@ -0,0 +1 @@ +../../../cpp/build-wasm-threads/bin/barretenberg.wasm \ No newline at end of file diff --git a/barretenberg/ts/src/barretenberg_wasm/barretenberg.wasm b/barretenberg/ts/src/barretenberg_wasm/barretenberg.wasm new file mode 120000 index 00000000000..f6e5fe2c735 --- /dev/null +++ b/barretenberg/ts/src/barretenberg_wasm/barretenberg.wasm @@ -0,0 +1 @@ +../../../cpp/build-wasm/bin/barretenberg.wasm \ No newline at end of file diff --git a/barretenberg/ts/src/barretenberg_wasm/barretenberg_wasm_main/factory/node/index.ts b/barretenberg/ts/src/barretenberg_wasm/barretenberg_wasm_main/factory/node/index.ts index 2ed78c147f9..d018956a424 100644 --- a/barretenberg/ts/src/barretenberg_wasm/barretenberg_wasm_main/factory/node/index.ts +++ b/barretenberg/ts/src/barretenberg_wasm/barretenberg_wasm_main/factory/node/index.ts @@ -4,11 +4,11 @@ import { fileURLToPath } from 'url'; function getCurrentDir() { if (typeof __dirname !== 'undefined') { - return __dirname; // CJS + return __dirname; } else { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - return dirname(fileURLToPath(import.meta.url)); // ESM + return dirname(fileURLToPath(import.meta.url)); } } diff --git a/barretenberg/ts/src/barretenberg_wasm/barretenberg_wasm_thread/factory/node/index.ts b/barretenberg/ts/src/barretenberg_wasm/barretenberg_wasm_thread/factory/node/index.ts index f11e4e8f240..69195430a30 100644 --- a/barretenberg/ts/src/barretenberg_wasm/barretenberg_wasm_thread/factory/node/index.ts +++ b/barretenberg/ts/src/barretenberg_wasm/barretenberg_wasm_thread/factory/node/index.ts @@ -4,11 +4,11 @@ import { fileURLToPath } from 'url'; function getCurrentDir() { if (typeof __dirname !== 'undefined') { - return __dirname; // CJS + return __dirname; } else { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - return dirname(fileURLToPath(import.meta.url)); // ESM + return dirname(fileURLToPath(import.meta.url)); } } diff --git a/barretenberg/ts/src/barretenberg_wasm/fetch_code/browser/index.ts b/barretenberg/ts/src/barretenberg_wasm/fetch_code/browser/index.ts index 4f6e5b8a789..981b9a8e795 100644 --- a/barretenberg/ts/src/barretenberg_wasm/fetch_code/browser/index.ts +++ b/barretenberg/ts/src/barretenberg_wasm/fetch_code/browser/index.ts @@ -1,5 +1,5 @@ -import barretenbergModule from '../../../barretenberg.wasm'; -import barretenbergThreadsModule from '../../../barretenberg-threads.wasm'; +import barretenbergModule from '../../barretenberg.wasm'; +import barretenbergThreadsModule from '../../barretenberg-threads.wasm'; // Annoyingly the wasm declares if it's memory is shared or not. So now we need two wasms if we want to be // able to fallback on "non shared memory" situations. diff --git a/barretenberg/ts/src/barretenberg_wasm/fetch_code/node/index.ts b/barretenberg/ts/src/barretenberg_wasm/fetch_code/node/index.ts index 520f9d81c98..998926d5b06 100644 --- a/barretenberg/ts/src/barretenberg_wasm/fetch_code/node/index.ts +++ b/barretenberg/ts/src/barretenberg_wasm/fetch_code/node/index.ts @@ -4,16 +4,16 @@ import { fileURLToPath } from 'url'; function getCurrentDir() { if (typeof __dirname !== 'undefined') { - return __dirname; // CJS + return __dirname; } else { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - return dirname(fileURLToPath(import.meta.url)); // ESM + return dirname(fileURLToPath(import.meta.url)); } } // eslint-disable-next-line @typescript-eslint/no-unused-vars export async function fetchCode(multithreaded: boolean) { - const path = getCurrentDir() + '/../../../barretenberg-threads.wasm'; + const path = getCurrentDir() + '/../../barretenberg-threads.wasm'; return await readFile(path); } diff --git a/barretenberg/ts/src/crs/node/ignition_files_crs.ts b/barretenberg/ts/src/crs/node/ignition_files_crs.ts index fa5eaa12ffc..ce565224b86 100644 --- a/barretenberg/ts/src/crs/node/ignition_files_crs.ts +++ b/barretenberg/ts/src/crs/node/ignition_files_crs.ts @@ -5,11 +5,11 @@ import { fileURLToPath } from 'url'; function getCurrentDir() { if (typeof __dirname !== 'undefined') { - return __dirname; // CJS + return __dirname; } else { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - return dirname(fileURLToPath(import.meta.url)); // ESM + return dirname(fileURLToPath(import.meta.url)); } } From f8d7fcae91585470c9eea4f51e530e8873d06d1a Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Thu, 28 Sep 2023 14:11:39 +0000 Subject: [PATCH 4/6] Fix Dockerfile. Remove symlinks as won't work when we publish. --- barretenberg/ts/Dockerfile | 2 +- barretenberg/ts/scripts/build_wasm.sh | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/barretenberg/ts/Dockerfile b/barretenberg/ts/Dockerfile index 619a377532f..509aa1d1e55 100644 --- a/barretenberg/ts/Dockerfile +++ b/barretenberg/ts/Dockerfile @@ -10,5 +10,5 @@ COPY yarn.lock yarn.lock COPY .yarnrc.yml .yarnrc.yml RUN yarn --immutable COPY . . -RUN yarn formatting && yarn build:ts +RUN yarn formatting && yarn build:esm && yarn build:cjs && yarn build:browser CMD ["yarn", "test"] diff --git a/barretenberg/ts/scripts/build_wasm.sh b/barretenberg/ts/scripts/build_wasm.sh index 4f96e164f78..c17775b5c91 100755 --- a/barretenberg/ts/scripts/build_wasm.sh +++ b/barretenberg/ts/scripts/build_wasm.sh @@ -9,13 +9,10 @@ cmake --preset wasm && cmake --build --preset wasm # Copy the wasm to its home in the bb.js dest folder. # We only need the threads wasm, as node always uses threads. -# When building the the browser bundle, both wasms are inlined directly -mkdir -p ../ts/dest -cp build-wasm-threads/bin/barretenberg.wasm ../ts/dest/barretenberg-threads.wasm - -# Make symlinks to point to this file from location fetchCode reads from. -cd ../ts/dest -mkdir -p ./node/barretenberg_wasm -mkdir -p ./node-cjs/barretenberg_wasm -ln -s ../../barretenberg-threads.wasm ./node/barretenberg_wasm/barretenberg-threads.wasm -ln -s ../../barretenberg-threads.wasm ./node-cjs/barretenberg_wasm/barretenberg-threads.wasm \ No newline at end of file +# We need to take two copies for both esm and cjs builds. You can't use symlinks when publishing. +# This probably isn't a big deal however due to compression. +# When building the the browser bundle, both wasms are inlined directly. +mkdir -p ../ts/dest/node/barretenberg_wasm +mkdir -p ../ts/dest/node-cjs/barretenberg_wasm +cp build-wasm-threads/bin/barretenberg.wasm ../ts/dest/node/barretenberg_wasm/barretenberg-threads.wasm +cp build-wasm-threads/bin/barretenberg.wasm ../ts/dest/node-cjs/barretenberg_wasm/barretenberg-threads.wasm \ No newline at end of file From 41ee244e03bfd3f86afd03f20423b30d10a1176f Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Thu, 28 Sep 2023 15:06:09 +0000 Subject: [PATCH 5/6] Fixes. --- barretenberg/cpp/.rebuild_patterns | 6 +++--- barretenberg/ts/Dockerfile | 2 +- barretenberg/ts/scripts/build_wasm.sh | 21 ++++++++++++--------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/barretenberg/cpp/.rebuild_patterns b/barretenberg/cpp/.rebuild_patterns index 24dc32bd6de..c5fea1fede5 100644 --- a/barretenberg/cpp/.rebuild_patterns +++ b/barretenberg/cpp/.rebuild_patterns @@ -1,4 +1,4 @@ -^barretenberg/.*\\.(cpp|cc|cxx|c\\+\\+|h|hpp|hxx|h\\+\\+|c|h|inl|inc|ipp|tpp|cmake)$ -^barretenberg/.*CMakeLists\\.txt$ -^barretenberg/.*Dockerfile.*$ +^barretenberg/cpp/.*\\.(cpp|cc|cxx|c\\+\\+|h|hpp|hxx|h\\+\\+|c|h|inl|inc|ipp|tpp|cmake)$ +^barretenberg/cpp/.*CMakeLists\\.txt$ +^barretenberg/cpp/.*Dockerfile.*$ ^barretenberg/cpp/scripts/ diff --git a/barretenberg/ts/Dockerfile b/barretenberg/ts/Dockerfile index 509aa1d1e55..faa17cca907 100644 --- a/barretenberg/ts/Dockerfile +++ b/barretenberg/ts/Dockerfile @@ -10,5 +10,5 @@ COPY yarn.lock yarn.lock COPY .yarnrc.yml .yarnrc.yml RUN yarn --immutable COPY . . -RUN yarn formatting && yarn build:esm && yarn build:cjs && yarn build:browser +RUN yarn formatting && SKIP_CPP_BUILD=1 yarn build CMD ["yarn", "test"] diff --git a/barretenberg/ts/scripts/build_wasm.sh b/barretenberg/ts/scripts/build_wasm.sh index c17775b5c91..340bbf99c7b 100755 --- a/barretenberg/ts/scripts/build_wasm.sh +++ b/barretenberg/ts/scripts/build_wasm.sh @@ -1,18 +1,21 @@ #!/bin/sh set -eu -# Build the wasms and strip debug symbols. -cd ../cpp -cmake --preset wasm-threads && cmake --build --preset wasm-threads -cmake --preset wasm && cmake --build --preset wasm -./scripts/strip-wasm.sh +if [ -z "$SKIP_CPP_BUILD" ]; then + # Build the wasms and strip debug symbols. + cd ../cpp + cmake --preset wasm-threads && cmake --build --preset wasm-threads + cmake --preset wasm && cmake --build --preset wasm + ./scripts/strip-wasm.sh + cd ../ts +fi # Copy the wasm to its home in the bb.js dest folder. # We only need the threads wasm, as node always uses threads. # We need to take two copies for both esm and cjs builds. You can't use symlinks when publishing. # This probably isn't a big deal however due to compression. # When building the the browser bundle, both wasms are inlined directly. -mkdir -p ../ts/dest/node/barretenberg_wasm -mkdir -p ../ts/dest/node-cjs/barretenberg_wasm -cp build-wasm-threads/bin/barretenberg.wasm ../ts/dest/node/barretenberg_wasm/barretenberg-threads.wasm -cp build-wasm-threads/bin/barretenberg.wasm ../ts/dest/node-cjs/barretenberg_wasm/barretenberg-threads.wasm \ No newline at end of file +mkdir -p ./dest/node/barretenberg_wasm +mkdir -p ./dest/node-cjs/barretenberg_wasm +cp ../cpp/build-wasm-threads/bin/barretenberg.wasm ./dest/node/barretenberg_wasm/barretenberg-threads.wasm +cp ../cpp/build-wasm-threads/bin/barretenberg.wasm ./dest/node-cjs/barretenberg_wasm/barretenberg-threads.wasm \ No newline at end of file From dacc95c64a086a42da547150530d6fcc032fbfce Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Thu, 28 Sep 2023 15:32:08 +0000 Subject: [PATCH 6/6] Fix --- barretenberg/ts/.dockerignore | 2 +- barretenberg/ts/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/barretenberg/ts/.dockerignore b/barretenberg/ts/.dockerignore index 6a3231fc51c..ab18ce85c3d 100644 --- a/barretenberg/ts/.dockerignore +++ b/barretenberg/ts/.dockerignore @@ -4,4 +4,4 @@ node_modules Dockerfile .yarn !.yarn/releases -.tsbuildinfo \ No newline at end of file +.tsbuildinfo* \ No newline at end of file diff --git a/barretenberg/ts/package.json b/barretenberg/ts/package.json index e5a0986532f..f00226ec369 100644 --- a/barretenberg/ts/package.json +++ b/barretenberg/ts/package.json @@ -22,7 +22,7 @@ "README.md" ], "scripts": { - "clean": "rm -rf ./dest .tsbuildinfo*", + "clean": "rm -rf ./dest .tsbuildinfo .tsbuildinfo.cjs", "build": "yarn clean && yarn build:wasm && yarn build:esm && yarn build:cjs && yarn build:browser", "build:wasm": "./scripts/build_wasm.sh", "build:esm": "tsc -b && chmod +x ./dest/node/main.js",