Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: clean node_modules before building subgraph #884

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
18 changes: 12 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"scripts": {
"build": "yarn build:libraries && yarn build:subgraph && yarn build:website && yarn build:docs",
"build:libraries": "yarn workspaces foreach -Apt --no-private run build",
"build:subgraph": "yarn workspace semaphore-subgraph build:sepolia",
"clean:subgraph": "rimraf apps/subgraph/node_modules",
"build:subgraph": "yarn clean:subgraph && yarn workspace semaphore-subgraph build:sepolia",
Comment on lines +12 to +13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this issue is solved with these two lines. Why it is necessary to add clean:branch and update the workspaces object?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it was a testing error as i checking for test cases - clean:branch is not needed at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @vplasencia, let me know if there is any update.

"build:website": "yarn workspace semaphore-website build",
"build:docs": "yarn workspace semaphore-docs build",
"compile:contracts": "yarn workspace semaphore-contracts compile",
Expand Down Expand Up @@ -45,11 +46,16 @@
"proof-of-membership",
"monorepo"
],
"workspaces": [
"apps/*",
"packages/*",
"packages/contracts/contracts"
],
"workspaces": {
"packages": [
"packages/*",
"apps/*",
"packages/contracts/contracts"
],
"nohoist": [
"**/semaphore-subgraph/**"
]
Comment on lines +55 to +57
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it necessary to add this section? It looks like the changes in the script work well and solve the issue.

},
"packageManager": "yarn@4.1.0",
"devDependencies": {
"@commitlint/cli": "^18.6.1",
Expand Down