Skip to content

Commit

Permalink
chore: improve workspace clean (noir-lang#2870)
Browse files Browse the repository at this point in the history
Co-authored-by: Tom French <[email protected]>
  • Loading branch information
2 people authored and Sakapoi committed Oct 19, 2023
1 parent c58f24f commit 11de83c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
3 changes: 2 additions & 1 deletion acvm-repo/acvm_js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"build": "bash ./build.sh",
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
"test:browser": "web-test-runner",
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0",
"clean": "chmod u+w web nodejs && rm -rf web nodejs"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4-fix.0",
Expand Down
4 changes: 2 additions & 2 deletions compiler/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
"test:node": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
"test:browser": "web-test-runner",
"clean": "rm -rf ./nodejs ./web ./target ./result",
"clean": "chmod u+w web nodejs && rm -rf ./nodejs ./web ./target ./result",
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
},
"peerDependencies": {
Expand All @@ -37,4 +37,4 @@
"@web/test-runner-webdriver": "^0.7.0",
"mocha": "^10.2.0"
}
}
}
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
# Nix flakes cannot build more than one derivation in one command (see https://github.com/NixOS/nix/issues/5591)
# so we use `symlinkJoin` to build everything as the "all" package.
all = pkgs.symlinkJoin { name = "all"; paths = [ nargo noir_wasm noirc_abi_wasm acvm_js ]; };
all_wasm = pkgs.symlinkJoin { name = "all_wasm"; paths = [ noir_wasm noirc_abi_wasm acvm_js ]; };

# We also export individual packages to enable `nix build .#nargo -L`, etc.
inherit nargo;
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
"clean:root": "rm -rf ./result ./target",
"clean": "yarn clean:workspaces && yarn clean:root",
"lint": "yarn workspaces foreach run lint",
"build:with:nix": "nix build -L .#wasm",
"build:with:nix": "nix build -L .#all_wasm",
"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",
"install:from:nix:noir_wasm": "cp -r ./result/noir_wasm/nodejs ./compiler/wasm && cp -r ./result/noir_wasm/web ./compiler/wasm",
"install:from:nix": "yarn build:with:nix && yarn install:from:nix:noirc_abi_wasm && yarn install:from:nix:noir_wasm"
"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",
"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"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.59.5",
Expand All @@ -39,4 +40,4 @@
"dependencies": {
"tslog": "^4.9.2"
}
}
}
8 changes: 5 additions & 3 deletions tooling/noir_js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
],
"source": "src/index.ts",
"main": "lib/index.cjs",
"module": "lib/index.js",
"module": "lib/index.mjs",
"exports": {
"require": "./lib/index.cjs",
"default": "./lib/index.js",
"default": "./lib/index.mjs",
"types": "./lib/index.d.ts"
},
"types": "lib/index.d.ts",
Expand All @@ -33,7 +33,9 @@
"test:node:cjs": "mocha --timeout 25000 --exit --config ./.mocharc.cjs.json",
"prettier": "prettier 'src/**/*.ts'",
"prettier:fix": "prettier --write 'src/**/*.ts' 'test/**/*.ts'",
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0",
"clean": "rm -rf ./lib"

},
"devDependencies": {
"@aztec/bb.js": "0.7.2",
Expand Down
4 changes: 2 additions & 2 deletions tooling/noirc_abi_wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"build": "bash ./build.sh",
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
"test:browser": "web-test-runner",
"clean": "rm -rf ./nodejs ./web ./target ./result",
"clean": "chmod u+w web nodejs && rm -rf ./nodejs ./web ./target ./result",
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
},
"devDependencies": {
Expand All @@ -37,4 +37,4 @@
"eslint": "^8.40.0",
"mocha": "^10.2.0"
}
}
}

0 comments on commit 11de83c

Please sign in to comment.