Skip to content

Commit 11de83c

Browse files
kobyhallxTomAFrench
authored andcommitted
chore: improve workspace clean (noir-lang#2870)
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
1 parent c58f24f commit 11de83c

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

acvm-repo/acvm_js/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"build": "bash ./build.sh",
2828
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
2929
"test:browser": "web-test-runner",
30-
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
30+
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0",
31+
"clean": "chmod u+w web nodejs && rm -rf web nodejs"
3132
},
3233
"devDependencies": {
3334
"@esm-bundle/chai": "^4.3.4-fix.0",

compiler/wasm/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
2424
"test:node": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
2525
"test:browser": "web-test-runner",
26-
"clean": "rm -rf ./nodejs ./web ./target ./result",
26+
"clean": "chmod u+w web nodejs && rm -rf ./nodejs ./web ./target ./result",
2727
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
2828
},
2929
"peerDependencies": {
@@ -37,4 +37,4 @@
3737
"@web/test-runner-webdriver": "^0.7.0",
3838
"mocha": "^10.2.0"
3939
}
40-
}
40+
}

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@
235235
# Nix flakes cannot build more than one derivation in one command (see https://github.com/NixOS/nix/issues/5591)
236236
# so we use `symlinkJoin` to build everything as the "all" package.
237237
all = pkgs.symlinkJoin { name = "all"; paths = [ nargo noir_wasm noirc_abi_wasm acvm_js ]; };
238+
all_wasm = pkgs.symlinkJoin { name = "all_wasm"; paths = [ noir_wasm noirc_abi_wasm acvm_js ]; };
238239

239240
# We also export individual packages to enable `nix build .#nargo -L`, etc.
240241
inherit nargo;

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
"clean:root": "rm -rf ./result ./target",
2020
"clean": "yarn clean:workspaces && yarn clean:root",
2121
"lint": "yarn workspaces foreach run lint",
22-
"build:with:nix": "nix build -L .#wasm",
22+
"build:with:nix": "nix build -L .#all_wasm",
2323
"install:from:nix:noirc_abi_wasm": "cp -r ./result/noirc_abi_wasm/nodejs ./tooling/noirc_abi_wasm && cp -r ./result/noirc_abi_wasm/web ./tooling/noirc_abi_wasm",
2424
"install:from:nix:noir_wasm": "cp -r ./result/noir_wasm/nodejs ./compiler/wasm && cp -r ./result/noir_wasm/web ./compiler/wasm",
25-
"install:from:nix": "yarn build:with:nix && yarn install:from:nix:noirc_abi_wasm && yarn install:from:nix:noir_wasm"
25+
"install:from:nix:acvm_js": "cp -rf ./result/acvm_js/nodejs ./acvm-repo/acvm_js && cp -rf ./result/acvm_js/web ./acvm-repo/acvm_js",
26+
"install:from:nix": "yarn build:with:nix && yarn install:from:nix:noirc_abi_wasm && yarn install:from:nix:noir_wasm && yarn install:from:nix:acvm_js"
2627
},
2728
"devDependencies": {
2829
"@typescript-eslint/eslint-plugin": "^5.59.5",
@@ -39,4 +40,4 @@
3940
"dependencies": {
4041
"tslog": "^4.9.2"
4142
}
42-
}
43+
}

tooling/noir_js/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
],
1919
"source": "src/index.ts",
2020
"main": "lib/index.cjs",
21-
"module": "lib/index.js",
21+
"module": "lib/index.mjs",
2222
"exports": {
2323
"require": "./lib/index.cjs",
24-
"default": "./lib/index.js",
24+
"default": "./lib/index.mjs",
2525
"types": "./lib/index.d.ts"
2626
},
2727
"types": "lib/index.d.ts",
@@ -33,7 +33,9 @@
3333
"test:node:cjs": "mocha --timeout 25000 --exit --config ./.mocharc.cjs.json",
3434
"prettier": "prettier 'src/**/*.ts'",
3535
"prettier:fix": "prettier --write 'src/**/*.ts' 'test/**/*.ts'",
36-
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
36+
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0",
37+
"clean": "rm -rf ./lib"
38+
3739
},
3840
"devDependencies": {
3941
"@aztec/bb.js": "0.7.2",

tooling/noirc_abi_wasm/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"build": "bash ./build.sh",
2626
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
2727
"test:browser": "web-test-runner",
28-
"clean": "rm -rf ./nodejs ./web ./target ./result",
28+
"clean": "chmod u+w web nodejs && rm -rf ./nodejs ./web ./target ./result",
2929
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
3030
},
3131
"devDependencies": {
@@ -37,4 +37,4 @@
3737
"eslint": "^8.40.0",
3838
"mocha": "^10.2.0"
3939
}
40-
}
40+
}

0 commit comments

Comments
 (0)