diff --git a/apps/admin/backend/package.json b/apps/admin/backend/package.json index 4cc4d31e50..7be8521908 100644 --- a/apps/admin/backend/package.json +++ b/apps/admin/backend/package.json @@ -9,8 +9,10 @@ "schema.sql" ], "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", diff --git a/apps/admin/frontend/Makefile b/apps/admin/frontend/Makefile index 8a289094ec..4ae3a03be1 100644 --- a/apps/admin/frontend/Makefile +++ b/apps/admin/frontend/Makefile @@ -5,9 +5,7 @@ FORCE: install: build: FORCE - pnpm install && \ - pnpm --dir ../backend build && \ - pnpm build + pnpm install && pnpm build bootstrap: install build diff --git a/apps/admin/frontend/package.json b/apps/admin/frontend/package.json index 16d3ab1546..77cfc18f11 100644 --- a/apps/admin/frontend/package.json +++ b/apps/admin/frontend/package.json @@ -8,8 +8,11 @@ "prodserver" ], "scripts": { - "build": "pnpm type-check && vite build", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "pnpm type-check && vite build", "build:stubs": "script/build-stubs fs:src/stubs/fs.ts glob:src/stubs/glob.ts os:src/stubs/os.ts jsdom:src/stubs/jsdom.ts", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint . && pnpm stylelint:run", "lint:fix": "pnpm type-check && eslint . --fix && pnpm stylelint:run:fix", diff --git a/apps/admin/integration-testing/Makefile b/apps/admin/integration-testing/Makefile index c198f2d75a..180d406b46 100644 --- a/apps/admin/integration-testing/Makefile +++ b/apps/admin/integration-testing/Makefile @@ -1,15 +1,10 @@ APP := .. export ADMIN_WORKSPACE=/tmp/admin-integration-testing -build-frontend: +build: + # building the frontend builds the backend too make -C $(APP)/frontend install; \ - make -C $(APP)/frontend build; \ - -build-backend: - make -C $(APP)/backend install; \ - make -C $(APP)/backend build; \ - -build: build-frontend build-backend + make -C $(APP)/frontend build run: rm -rf $(ADMIN_WORKSPACE) diff --git a/apps/central-scan/backend/package.json b/apps/central-scan/backend/package.json index d33be0c982..adc1dd7b25 100644 --- a/apps/central-scan/backend/package.json +++ b/apps/central-scan/backend/package.json @@ -11,8 +11,10 @@ "schema.sql" ], "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", diff --git a/apps/central-scan/frontend/Makefile b/apps/central-scan/frontend/Makefile index 6ea7ddd43d..4ae3a03be1 100644 --- a/apps/central-scan/frontend/Makefile +++ b/apps/central-scan/frontend/Makefile @@ -5,10 +5,7 @@ FORCE: install: build: FORCE - pnpm install && \ - pnpm --dir ../../../libs/ballot-interpreter build && \ - pnpm --dir ../backend build && \ - pnpm build + pnpm install && pnpm build bootstrap: install build diff --git a/apps/central-scan/frontend/package.json b/apps/central-scan/frontend/package.json index 8af46b267d..d1634c5cec 100644 --- a/apps/central-scan/frontend/package.json +++ b/apps/central-scan/frontend/package.json @@ -8,7 +8,10 @@ "prodserver" ], "scripts": { - "build": "pnpm type-check && vite build", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "pnpm type-check && vite build", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint . && pnpm stylelint:run", "lint:fix": "pnpm type-check && eslint . --fix && pnpm stylelint:run:fix", diff --git a/apps/design/backend/package.json b/apps/design/backend/package.json index ccd578cec3..46a5e89998 100644 --- a/apps/design/backend/package.json +++ b/apps/design/backend/package.json @@ -11,8 +11,10 @@ "schema.sql" ], "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", diff --git a/apps/design/frontend/package.json b/apps/design/frontend/package.json index ff6ffd3c9f..86e8b227b5 100644 --- a/apps/design/frontend/package.json +++ b/apps/design/frontend/package.json @@ -8,7 +8,10 @@ "prodserver" ], "scripts": { - "build": "pnpm type-check && vite build", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "pnpm type-check && vite build", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint . && pnpm stylelint:run", "lint:fix": "pnpm type-check && eslint . --fix && pnpm stylelint:run:fix", diff --git a/apps/mark-scan/backend/package.json b/apps/mark-scan/backend/package.json index 6e373e61df..39414b84f5 100644 --- a/apps/mark-scan/backend/package.json +++ b/apps/mark-scan/backend/package.json @@ -8,8 +8,10 @@ "build" ], "scripts": { - "build": "tsc --build tsconfig.build.json && copyfiles -u 3 src/custom-paper-handler/diagnostic/*.json build/custom-paper-handler/diagnostic", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json && copyfiles -u 3 src/custom-paper-handler/diagnostic/*.json build/custom-paper-handler/diagnostic", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", diff --git a/apps/mark-scan/frontend/Makefile b/apps/mark-scan/frontend/Makefile index ee6607141c..3b9f943788 100644 --- a/apps/mark-scan/frontend/Makefile +++ b/apps/mark-scan/frontend/Makefile @@ -17,10 +17,7 @@ run-all: (trap 'kill 0' SIGINT SIGHUP; make -C $(BACKEND) run & cd prodserver && node index.js) build: FORCE - pnpm install && \ - pnpm --dir ../../../libs/ballot-interpreter build && \ - pnpm --dir ../backend build && \ - pnpm build + pnpm install && pnpm build bootstrap: install build diff --git a/apps/mark-scan/frontend/package.json b/apps/mark-scan/frontend/package.json index f7267875fb..4c81972dab 100644 --- a/apps/mark-scan/frontend/package.json +++ b/apps/mark-scan/frontend/package.json @@ -8,7 +8,10 @@ "prodserver" ], "scripts": { - "build": "pnpm type-check && vite build", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "pnpm type-check && vite build", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint . && pnpm stylelint:run", "lint:fix": "pnpm type-check && eslint . --fix && pnpm stylelint:run:fix", diff --git a/apps/mark/backend/package.json b/apps/mark/backend/package.json index f864717dba..1d6d75d7a1 100644 --- a/apps/mark/backend/package.json +++ b/apps/mark/backend/package.json @@ -8,8 +8,10 @@ "build" ], "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", diff --git a/apps/mark/frontend/package.json b/apps/mark/frontend/package.json index 9197a0692b..64a5b04a17 100644 --- a/apps/mark/frontend/package.json +++ b/apps/mark/frontend/package.json @@ -8,7 +8,10 @@ "prodserver" ], "scripts": { - "build": "pnpm type-check && vite build", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "pnpm type-check && vite build", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint . && pnpm stylelint:run", "lint:fix": "pnpm type-check && eslint . --fix && pnpm stylelint:run:fix", diff --git a/apps/scan/backend/package.json b/apps/scan/backend/package.json index 2210732564..1604f9536f 100644 --- a/apps/scan/backend/package.json +++ b/apps/scan/backend/package.json @@ -11,8 +11,10 @@ "schema.sql" ], "scripts": { - "build": "tsc --build tsconfig.build.json && copyfiles -u 2 src/printing/test-print.pdf build/printing", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json && copyfiles -u 2 src/printing/test-print.pdf build/printing", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", diff --git a/apps/scan/frontend/Makefile b/apps/scan/frontend/Makefile index efcbdaba26..4ae3a03be1 100644 --- a/apps/scan/frontend/Makefile +++ b/apps/scan/frontend/Makefile @@ -5,11 +5,7 @@ FORCE: install: build: FORCE - pnpm install && \ - pnpm --dir ../../../libs/ballot-interpreter build && \ - pnpm --dir ../../../libs/pdi-scanner build && \ - pnpm --dir ../backend build && \ - pnpm build + pnpm install && pnpm build bootstrap: install build diff --git a/apps/scan/frontend/package.json b/apps/scan/frontend/package.json index 2a31a5614d..e63f2c5fbd 100644 --- a/apps/scan/frontend/package.json +++ b/apps/scan/frontend/package.json @@ -8,8 +8,11 @@ "prodserver" ], "scripts": { - "build": "pnpm type-check && vite build", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "pnpm type-check && vite build", "build:stubs": "script/build-stubs fs:src/stubs/fs.ts os:src/stubs/os.ts", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "lint": "pnpm type-check && eslint . && pnpm stylelint:run", "lint:fix": "pnpm type-check && eslint . --fix && pnpm stylelint:run:fix", diff --git a/libs/api/package.json b/libs/api/package.json index 7f77840066..b38657071f 100644 --- a/libs/api/package.json +++ b/libs/api/package.json @@ -11,8 +11,10 @@ "build" ], "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build *.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/auth/package.json b/libs/auth/package.json index b697428837..2c63b028cb 100644 --- a/libs/auth/package.json +++ b/libs/auth/package.json @@ -8,8 +8,10 @@ "main": "build/index.js", "types": "build/index.d.ts", "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build *.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/backend/package.json b/libs/backend/package.json index fec35460ac..b92db62ffb 100644 --- a/libs/backend/package.json +++ b/libs/backend/package.json @@ -11,8 +11,10 @@ "build" ], "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/ballot-encoder/package.json b/libs/ballot-encoder/package.json index 6a542336c2..5eb8b000b8 100644 --- a/libs/ballot-encoder/package.json +++ b/libs/ballot-encoder/package.json @@ -8,8 +8,10 @@ ], "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "test": "is-ci test:ci test:watch", diff --git a/libs/ballot-interpreter/package.json b/libs/ballot-interpreter/package.json index 509a3dccaa..7aca12505c 100644 --- a/libs/ballot-interpreter/package.json +++ b/libs/ballot-interpreter/package.json @@ -12,10 +12,12 @@ ], "scripts": { "benchmark": "jest --runInBand --projects benchmarks", - "build": "pnpm install:rust-addon && pnpm build:rust-addon && pnpm build:ts", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "pnpm install:rust-addon && pnpm build:rust-addon && pnpm build:ts", "build:rust-addon": "cargo-cp-artifact -nc build/hmpb-ts/rust_addon.node -- cargo build --message-format=json-render-diagnostics --release --offline", "build:ts": "tsc --build tsconfig.build.json", - "clean": "cargo clean && rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "cargo clean --release --package ballot-interpreter && rm -rf build && tsc --build --clean tsconfig.build.json", "install:rust-addon": "cargo fetch", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", diff --git a/libs/basics/package.json b/libs/basics/package.json index 25f9221f2f..8239d6961e 100644 --- a/libs/basics/package.json +++ b/libs/basics/package.json @@ -8,8 +8,10 @@ "main": "build/index.js", "types": "build/index.d.js", "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build *.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/bmd-ballot-fixtures/package.json b/libs/bmd-ballot-fixtures/package.json index f162aa5dfd..f00ac4ea6f 100644 --- a/libs/bmd-ballot-fixtures/package.json +++ b/libs/bmd-ballot-fixtures/package.json @@ -12,8 +12,10 @@ ], "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint . && pnpm stylelint:run", "lint:fix": "pnpm type-check && eslint . --fix && pnpm stylelint:run:fix", "stylelint:run": "stylelint 'src/**/*.{js,jsx,ts,tsx}'", diff --git a/libs/cdf-schema-builder/package.json b/libs/cdf-schema-builder/package.json index 27fc6b506b..be62905eb1 100644 --- a/libs/cdf-schema-builder/package.json +++ b/libs/cdf-schema-builder/package.json @@ -11,8 +11,10 @@ "build" ], "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/custom-paper-handler/package.json b/libs/custom-paper-handler/package.json index 0640351333..da409e0234 100644 --- a/libs/custom-paper-handler/package.json +++ b/libs/custom-paper-handler/package.json @@ -7,8 +7,10 @@ "author": "VotingWorks Eng ", "main": "build/index.js", "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/custom-scanner/package.json b/libs/custom-scanner/package.json index 40645d6794..1e0fec4e8c 100644 --- a/libs/custom-scanner/package.json +++ b/libs/custom-scanner/package.json @@ -8,8 +8,10 @@ "main": "build/index.js", "scripts": { "analyze-packets": "cd tools/analyze-packets && vite", - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/db/package.json b/libs/db/package.json index e6c2dd90f1..26003522e0 100644 --- a/libs/db/package.json +++ b/libs/db/package.json @@ -7,8 +7,10 @@ "types": "build/index.d.ts", "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "test": "is-ci test:ci test:watch", diff --git a/libs/dev-dock/backend/package.json b/libs/dev-dock/backend/package.json index 4773e18627..d29ad27fb6 100644 --- a/libs/dev-dock/backend/package.json +++ b/libs/dev-dock/backend/package.json @@ -8,8 +8,10 @@ "main": "build/index.js", "types": "build/index.d.js", "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build *.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/dev-dock/frontend/package.json b/libs/dev-dock/frontend/package.json index cf60bd84d0..798ca3b7e2 100644 --- a/libs/dev-dock/frontend/package.json +++ b/libs/dev-dock/frontend/package.json @@ -8,8 +8,10 @@ "main": "build/index.js", "types": "build/index.d.js", "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build *.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/eslint-plugin-vx/package.json b/libs/eslint-plugin-vx/package.json index 34041e67e8..b74bae9332 100644 --- a/libs/eslint-plugin-vx/package.json +++ b/libs/eslint-plugin-vx/package.json @@ -13,9 +13,11 @@ "scripts": { "type-check": "tsc --build", "type-check:watch": "tsc --build --watch", - "build": "tsc --build tsconfig.build.json", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", "build:watch": "tsc --build --watch tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "echo eslint-plugin-vs linting temporarily disabled", "lint:fix": "echo eslint-plugin-vs linting temporarily disabled", "test": "is-ci test:ci test:watch", diff --git a/libs/fixture-generators/package.json b/libs/fixture-generators/package.json index b679f1c8a9..6af184b20c 100644 --- a/libs/fixture-generators/package.json +++ b/libs/fixture-generators/package.json @@ -11,8 +11,10 @@ }, "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "generate-cvr-fixtures": "./bin/generate-cvr-fixtures", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", diff --git a/libs/fixtures/package.json b/libs/fixtures/package.json index 5fe73460f0..0f3e8dc278 100644 --- a/libs/fixtures/package.json +++ b/libs/fixtures/package.json @@ -13,9 +13,11 @@ ], "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", "build:resources": "bash build_resources.sh", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "test": "is-ci test:ci test:watch", diff --git a/libs/fs/package.json b/libs/fs/package.json index d424201ec9..c29e14d5fd 100644 --- a/libs/fs/package.json +++ b/libs/fs/package.json @@ -11,8 +11,10 @@ "build" ], "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/fujitsu-thermal-printer/package.json b/libs/fujitsu-thermal-printer/package.json index 56cd83bab4..bf62947bbd 100644 --- a/libs/fujitsu-thermal-printer/package.json +++ b/libs/fujitsu-thermal-printer/package.json @@ -7,8 +7,10 @@ "author": "VotingWorks Eng ", "main": "build/index.js", "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/grout/package.json b/libs/grout/package.json index d2ac26f9ab..7f0b36a4ce 100644 --- a/libs/grout/package.json +++ b/libs/grout/package.json @@ -8,8 +8,10 @@ "main": "build/index.js", "types": "build/index.d.ts", "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build *.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/grout/test-utils/package.json b/libs/grout/test-utils/package.json index 0b26297ae1..00b7a9e1f9 100644 --- a/libs/grout/test-utils/package.json +++ b/libs/grout/test-utils/package.json @@ -8,8 +8,10 @@ "main": "./build/index.js", "types": "./build/index.d.ts", "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build *.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/hmpb/package.json b/libs/hmpb/package.json index 2dfc07bf48..e9c82bdef2 100644 --- a/libs/hmpb/package.json +++ b/libs/hmpb/package.json @@ -9,8 +9,10 @@ "bin" ], "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "format": "prettier '**/*.+(css|graphql|json|less|md|mdx|sass|scss|yaml|yml)' --write", "generate-fixtures": "DEBUG=hmpb:ballot_fixtures ./bin/generate-fixtures", "lint": "pnpm type-check && eslint .", diff --git a/libs/image-utils/package.json b/libs/image-utils/package.json index df7862306c..a3c2bc2197 100644 --- a/libs/image-utils/package.json +++ b/libs/image-utils/package.json @@ -6,8 +6,10 @@ "main": "build/index.js", "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "test": "is-ci test:ci test:watch", diff --git a/libs/logging/package.json b/libs/logging/package.json index 809f0ae552..060f710a10 100644 --- a/libs/logging/package.json +++ b/libs/logging/package.json @@ -12,12 +12,14 @@ ], "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", "build:generate-docs": "pnpm esr --cache ./scripts/generate_documentation.ts", "build:generate-typescript-types": "pnpm esr --cache ./scripts/generate_types_from_toml.ts", "build:generate-rust-types": "pnpm esr --cache ./scripts/generate_rust_enums_from_toml.ts", "build:generate-types": "pnpm build:generate-typescript-types && pnpm build:generate-rust-types", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "test": "is-ci test:ci test:watch", diff --git a/libs/mark-flow-ui/package.json b/libs/mark-flow-ui/package.json index 5b8e6a338b..a9f7c00073 100644 --- a/libs/mark-flow-ui/package.json +++ b/libs/mark-flow-ui/package.json @@ -12,8 +12,10 @@ ], "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint . && pnpm stylelint:run", "lint:fix": "pnpm type-check && eslint . --fix && pnpm stylelint:run:fix", "start": "storybook dev -p 6060", diff --git a/libs/message-coder/package.json b/libs/message-coder/package.json index f1b0509d0b..2a876b5f45 100644 --- a/libs/message-coder/package.json +++ b/libs/message-coder/package.json @@ -7,8 +7,10 @@ "author": "VotingWorks Eng ", "main": "build/index.js", "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/monorepo-utils/package.json b/libs/monorepo-utils/package.json index d21d54e5c5..5f79d572e7 100644 --- a/libs/monorepo-utils/package.json +++ b/libs/monorepo-utils/package.json @@ -9,8 +9,10 @@ "types": "build/index.d.ts", "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "test": "is-ci test:ci test:watch", diff --git a/libs/pdi-scanner/package.json b/libs/pdi-scanner/package.json index 1020de2249..57cd294f20 100644 --- a/libs/pdi-scanner/package.json +++ b/libs/pdi-scanner/package.json @@ -11,10 +11,12 @@ "build" ], "scripts": { - "build": "pnpm install:rust-addon && pnpm build:rust-addon && pnpm build:ts", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "pnpm install:rust-addon && pnpm build:rust-addon && pnpm build:ts", "build:ts": "tsc --build tsconfig.build.json", "build:rust-addon": "cargo build --release --offline", - "clean": "cargo clean && rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "cargo clean --release --package pdi-scanner && rm -rf build && tsc --build --clean tsconfig.build.json", "install:rust-addon": "cargo fetch", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", diff --git a/libs/printing/package.json b/libs/printing/package.json index 046e33315a..e9690a0abc 100644 --- a/libs/printing/package.json +++ b/libs/printing/package.json @@ -8,8 +8,10 @@ "main": "build/index.js", "types": "build/index.d.js", "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build *.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "postinstall": "test -f /usr/bin/chromium || playwright install --with-deps chromium", diff --git a/libs/res-to-ts/package.json b/libs/res-to-ts/package.json index a4700d53ac..f7a453ffe3 100644 --- a/libs/res-to-ts/package.json +++ b/libs/res-to-ts/package.json @@ -12,8 +12,10 @@ }, "scripts": { "type-check": "tsc --build", - "build": "pnpm type-check", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "pnpm type-check", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "test": "is-ci test:ci test:watch", diff --git a/libs/test-utils/package.json b/libs/test-utils/package.json index 434e39a1be..073807fd85 100644 --- a/libs/test-utils/package.json +++ b/libs/test-utils/package.json @@ -11,8 +11,10 @@ ], "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "test": "is-ci test:ci test:watch", diff --git a/libs/types-rs/package.json b/libs/types-rs/package.json index 53330d9eb2..f47dec93d8 100644 --- a/libs/types-rs/package.json +++ b/libs/types-rs/package.json @@ -7,6 +7,7 @@ "author": "VotingWorks Eng ", "scripts": { "build": "cargo build", + "clean": "cargo clean", "lint": "cargo clippy", "test": "cargo test" }, diff --git a/libs/types/package.json b/libs/types/package.json index 1762f900f6..cd700448fd 100644 --- a/libs/types/package.json +++ b/libs/types/package.json @@ -12,8 +12,10 @@ ], "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "test": "is-ci test:ci test:watch", diff --git a/libs/ui/package.json b/libs/ui/package.json index f617305b00..10b72b3682 100644 --- a/libs/ui/package.json +++ b/libs/ui/package.json @@ -12,10 +12,12 @@ ], "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json && pnpm build:app-strings-catalog", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json && pnpm build:app-strings-catalog", "build:app-strings-catalog": "i18next && ./scripts/finalize-app-strings-catalog", "check:app-strings-catalog": "./scripts/check-app-strings-catalog", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint . && pnpm stylelint:run && pnpm check:app-strings-catalog", "lint:fix": "pnpm type-check && eslint . --fix && pnpm stylelint:run:fix", "start": "storybook dev -p 6060", diff --git a/libs/usb-drive/package.json b/libs/usb-drive/package.json index 5ebb7410e7..498753a7fb 100644 --- a/libs/usb-drive/package.json +++ b/libs/usb-drive/package.json @@ -8,8 +8,10 @@ "main": "build/index.js", "types": "build/index.d.js", "scripts": { - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build *.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "pre-commit": "lint-staged", diff --git a/libs/utils/package.json b/libs/utils/package.json index cb687e8f51..4253493a21 100644 --- a/libs/utils/package.json +++ b/libs/utils/package.json @@ -12,8 +12,10 @@ ], "scripts": { "type-check": "tsc --build", - "build": "tsc --build tsconfig.build.json", - "clean": "rm -rf build tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo", + "build": "pnpm --filter $npm_package_name... build:self", + "build:self": "tsc --build tsconfig.build.json", + "clean": "pnpm --filter $npm_package_name... clean:self", + "clean:self": "rm -rf build && tsc --build --clean tsconfig.build.json", "lint": "pnpm type-check && eslint .", "lint:fix": "pnpm type-check && eslint . --fix", "test": "is-ci test:ci test:watch",