Skip to content

Commit

Permalink
fix: update turbo.json
Browse files Browse the repository at this point in the history
reorder `dependsOn` tasks
exclude `build` task from `style` script
  • Loading branch information
sripwoud committed Apr 5, 2024
1 parent 9d85dee commit c29c22c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
"private": true,
"scripts": {
"build": "turbo build",
"build:libraries": "yarn workspaces foreach -A -t --no-private run build",
"test": "turbo test:libraries test:circuits test:coverage",
"test:libraries": "jest --coverage",
"_build:libraries": "yarn workspaces foreach -A -t --no-private run build",
"build:libraries": "turbo _build:libraries",
"test": "turbo _test:libraries _test:circuits test:coverage",
"_test:libraries": "jest --coverage",
"test:libraries": "turbo _test:libraries",
"test:library": "jest packages/${0}",
"test:circuits": "yarn workspace @zk-kit/circuits test",
"_test:circuits": "yarn workspace @zk-kit/circuits test",
"test:circuits": "turbo _test:circuits",
"test:contracts": "turbo test:coverage",
"version:bump": "yarn workspace @zk-kit/${0} version ${1} && yarn remove:stable-version-field ${0} && NO_HOOK=1 git commit -am \"chore(${0}): v${1}\" && git tag ${0}-v${1}",
"version:publish": "yarn workspaces foreach -A --no-private npm publish --tolerate-republish --access public",
Expand All @@ -28,7 +31,7 @@
"remove:stable-version-field": "ts-node scripts/remove-stable-version-field.ts ${0} && yarn prettier:write",
"precommit": "lint-staged",
"postinstall": "husky install",
"style": "turbo build lint:eslint lint format:prettier"
"style": "turbo lint:eslint lint format:prettier"
},
"keywords": [
"javascript",
Expand Down
36 changes: 29 additions & 7 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"dependsOn": ["^build", "typechain"],
"dependsOn": ["^build"],
"inputs": [
"**/tsconfig.json",
"packages/**/*.{js,json,ts,sol}",
"!packages/**/{artifacts,cache,dist,typechain-types}/**"
],
"outputs": ["packages/**/{artifacts,dist,typechain-types}/**"]
},
"//#build:libraries": {
"//#_build:libraries": {
"inputs": [
"tsconfig.json",
"packages/**/*.{js,json,ts}",
Expand All @@ -36,7 +36,17 @@
]
},
"//#lint:eslint": {
"dependsOn": ["imt.sol#typechain", "lazytower.sol#typechain"],
"dependsOn": [
"@zk-kit/baby-jubjub#build",
"@zk-kit/eddsa-poseidon#build",
"@zk-kit/imt#build",
"imt.sol#typechain",
"lazytower.sol#typechain",
"@zk-kit/poseidon-cipher#build",
"@zk-kit/rollup-plugin-rust#build",
"@zk-kit/smt#build",
"@zk-kit/utils#build"
],
"inputs": [
".eslintrc.json",
".eslintignore",
Expand All @@ -47,15 +57,27 @@
"lint": {
"inputs": ["**/*.sol"]
},
"//#test:libraries": {
"dependsOn": ["build:libraries"],
"//#_test:libraries": {
"dependsOn": [
"@zk-kit/imt#build",
"@zk-kit/baby-jubjub#build",
"@zk-kit/eddsa-poseidon#build",
"@zk-kit/eddsa-proof#build",
"@zk-kit/groth16#build",
"@zk-kit/lazytower#build",
"@zk-kit/poseidon-cipher#build",
"@zk-kit/poseidon-proof#build",
"@zk-kit/rollup-plugin-rust#build",
"@zk-kit/smt#build",
"@zk-kit/utils#build"
],
"inputs": [
"jest.config.ts",
"packages/**/*.{js,ts}",
"!packages/**/{artifacts,cache,dist,typechain-types}/**"
]
},
"//#test:circuits": {
"//#_test:circuits": {
"dependsOn": [
"@zk-kit/baby-jubjub#build",
"@zk-kit/eddsa-poseidon#build",
Expand All @@ -67,7 +89,7 @@
"inputs": ["packages/circuits/**/*.{circom,nr,ts}"]
},
"test:coverage": {
"dependsOn": ["^build"],
"dependsOn": ["@zk-kit/imt#build", "^build"],
"inputs": ["**/*.sol"]
},
"typechain": {
Expand Down

0 comments on commit c29c22c

Please sign in to comment.