From 64025516c0ceeb25f39ec3a1d3c29ba087258b85 Mon Sep 17 00:00:00 2001 From: Shikhar Singh Date: Tue, 26 Nov 2024 15:42:42 +0700 Subject: [PATCH] feat: clean node_modules before building subgraph (#884) * feat(cli): remove @semaphore-protocol/cli prepublish script The idea is to remove the prepublish script from the scripts object of the package.json file of every cli template when the template is downloaded using the CLI. BREAKING CHANGE: n * refactor(cli): add comment * refactor(cli): create seperate file for removePrePublishScript function * refactor(cli): using updatedPackageJsonContent var instead of calling readFileSync again * fix(subgraph): clean node_modules before building subgraph * refactor(subgraph): fix: test typo * refactor(subgraph): refactor: remove nohoist * refactor(subgraph): refactor: workspaces structure --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 825fd7941..35ad2c67d 100644 --- a/package.json +++ b/package.json @@ -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", "build:website": "yarn workspace semaphore-website build", "build:docs": "yarn workspace semaphore-docs build", "compile:contracts": "yarn workspace semaphore-contracts compile",