Skip to content

Commit

Permalink
chore: set up a yarn v3 workspace (#2692)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Sep 14, 2023
1 parent bfd68c6 commit 35a1012
Show file tree
Hide file tree
Showing 15 changed files with 8,661 additions and 5,338 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/abi_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

- name: Install workspace dependencies
run: |
yarn install --non-interactive --pure-lockfile
yarn install --immutable
- name: Run node tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
if: matrix.target == 'x86_64-apple-darwin'
run: |
cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/
yarn install --non-interactive --pure-lockfile
yarn install --immutable
yarn workspace release-tests test
- name: Upload binaries to release tag
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
if: startsWith(matrix.target, 'x86_64-unknown-linux')
run: |
cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/
yarn install --non-interactive --pure-lockfile
yarn install --immutable
yarn workspace release-tests test
- name: Upload binaries to release tag
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:

- name: Run `integration-tests`
run: |
yarn install --non-interactive --pure-lockfile
yarn install --immutable
yarn test:integration
- name: Alert on nightly test failure
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
npx playwright install-deps
cp -r ./compiler/wasm/downloaded/nodejs ./compiler/wasm
cp -r ./compiler/wasm/downloaded/web ./compiler/wasm
yarn install --non-interactive --pure-lockfile
yarn install --immutable
yarn workspace @noir-lang/noir-source-resolver build
- name: Run tests
Expand Down
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ examples/9
node_modules
pkg/

# Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Source resolver
compiler/source-resolver/node_modules
compiler/source-resolver/lib
Expand Down Expand Up @@ -36,4 +45,4 @@ libbarretenberg-wasm32
compiler/wasm/nodejs
compiler/wasm/web
tooling/noirc_abi_wasm/nodejs
tooling/noirc_abi_wasm/web
tooling/noirc_abi_wasm/web
9 changes: 9 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.6.3.cjs
10 changes: 7 additions & 3 deletions compiler/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
"dependencies": {
"@aztec/bb.js": "^0.5.1",
"@noir-lang/acvm_js": "^0.26.0",
"@noir-lang/noir-source-resolver": "1.1.4",
"@noir-lang/noir_wasm": "0.11.1",
"@noir-lang/noirc_abi": "0.10.3"
"@noir-lang/noir-source-resolver": "workspace:*",
"@noir-lang/noir_wasm": "workspace:*",
"@noir-lang/noirc_abi": "workspace:*",
"@web/dev-server-esbuild": "^0.3.6",
"@web/test-runner": "^0.15.3",
"@web/test-runner-playwright": "^0.10.0",
"@web/test-runner-webdriver": "^0.7.0"
}
}
9 changes: 8 additions & 1 deletion compiler/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,12 @@
},
"peerDependencies": {
"@noir-lang/noir-source-resolver": "^1.1.3"
},
"devDependencies": {
"@web/dev-server-esbuild": "^0.3.6",
"@web/test-runner": "^0.15.3",
"@web/test-runner-playwright": "^0.10.0",
"@web/test-runner-webdriver": "^0.7.0",
"mocha": "^10.2.0"
}
}
}
28 changes: 11 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,23 @@
"release-tests"
],
"scripts": {
"build": "yarn workspaces run build",
"test": "yarn workspaces run test",
"build": "yarn workspaces foreach run build",
"test": "yarn workspaces foreach run test",
"test:integration": "yarn workspace integration-tests test"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4-fix.0",
"@web/dev-server-esbuild": "^0.3.6",
"@web/test-runner": "^0.15.3",
"@web/test-runner-webdriver": "^0.7.0",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"chai": "^4.3.7",
"eslint": "^8.40.0",
"eslint-plugin-prettier": "^4.2.1",
"fflate": "^0.8.0",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"smol-toml": "^1.1.2",
"ts-node": "^10.9.1",
"typescript": "^5.0.4",
"@noir-lang/noir-source-resolver": "^1.1.4",
"@web/test-runner-playwright": "^0.10.0",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"eslint": "^8.40.0",
"eslint-plugin-prettier": "^4.2.1",
"uvu": "0.5.6",
"zx": "7.1.1",
"prettier": "^2.8.8"
}
}
"typescript": "^5.0.4"
},
"packageManager": "yarn@3.6.3"
}
4 changes: 4 additions & 0 deletions release-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
"type": "module",
"scripts": {
"test": "uvu test"
},
"devDependencies": {
"uvu": "0.5.6",
"zx": "7.1.1"
}
}
8 changes: 8 additions & 0 deletions tooling/noirc_abi_wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,13 @@
"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"
},
"devDependencies": {
"@web/dev-server-esbuild": "^0.3.6",
"@web/test-runner": "^0.15.3",
"@web/test-runner-playwright": "^0.10.0",
"@web/test-runner-webdriver": "^0.7.0",
"eslint": "^8.40.0",
"mocha": "^10.2.0"
}
}
Loading

0 comments on commit 35a1012

Please sign in to comment.