build system: get rid of prepare scripts

These don't seem to be the right location to compile packages.
The newest version of pnpm runs all those scripts on "pnpm install",
even if we filter for only one package.  That results in a build
performance issue.
This commit is contained in:
Florian Dold 2023-06-06 15:25:53 +02:00
parent 265d88b6b7
commit f56a563533
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
11 changed files with 2 additions and 12 deletions

View File

@ -106,7 +106,7 @@ webextension-dev:
.PHONY: embedded .PHONY: embedded
embedded: embedded:
pnpm install --frozen-lockfile --ignore-scripts --filter @gnu-taler/taler-wallet-embedded... pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-embedded...
pnpm run --filter @gnu-taler/taler-wallet-embedded... compile pnpm run --filter @gnu-taler/taler-wallet-embedded... compile
@echo built packages/taler-wallet-embedded/dist/taler-wallet-core-qjs.mjs @echo built packages/taler-wallet-embedded/dist/taler-wallet-core-qjs.mjs
@ -120,7 +120,7 @@ install: compile
# Install taler-wallet-cli and taler-harness # Install taler-wallet-cli and taler-harness
install-tools: install-tools:
pnpm install --frozen-lockfile --ignore-scripts --filter @gnu-taler/taler-wallet-cli... --filter @gnu-taler/taler-harness... pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-cli... --filter @gnu-taler/taler-harness...
pnpm run --filter @gnu-taler/taler-wallet-cli... --filter @gnu-taler/taler-harness... compile pnpm run --filter @gnu-taler/taler-wallet-cli... --filter @gnu-taler/taler-harness... compile
make -C packages/taler-wallet-cli install-nodeps make -C packages/taler-wallet-cli install-nodeps
make -C packages/taler-harness install-nodeps make -C packages/taler-harness install-nodeps

View File

@ -6,7 +6,6 @@
"module": "./lib/index.js", "module": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"scripts": { "scripts": {
"prepare": "tsc",
"compile": "tsc", "compile": "tsc",
"pretty": "prettier --write src", "pretty": "prettier --write src",
"test": "tsc && ava", "test": "tsc && ava",

View File

@ -8,7 +8,6 @@
"build": "./build.mjs", "build": "./build.mjs",
"compile": "tsc && ./build.mjs", "compile": "tsc && ./build.mjs",
"dev": "./dev.mjs", "dev": "./dev.mjs",
"prepare": "pnpm compile",
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
"test": "./test.mjs && mocha --require source-map-support/register --enable-source-maps 'dist/**/*test.js'", "test": "./test.mjs && mocha --require source-map-support/register --enable-source-maps 'dist/**/*test.js'",
"pretty": "prettier --write src" "pretty": "prettier --write src"

View File

@ -11,7 +11,6 @@
"private": false, "private": false,
"scripts": { "scripts": {
"test": "tsc && ava", "test": "tsc && ava",
"prepare": "tsc",
"compile": "tsc", "compile": "tsc",
"clean": "rimraf dist lib tsconfig.tsbuildinfo", "clean": "rimraf dist lib tsconfig.tsbuildinfo",
"pretty": "prettier --write src" "pretty": "prettier --write src"

View File

@ -6,7 +6,6 @@
"scripts": { "scripts": {
"compile": "tsc && ./build.mjs", "compile": "tsc && ./build.mjs",
"build": "pnpm compile", "build": "pnpm compile",
"prepare": "tsc",
"render-examples": "ts-node -O '{\"module\": \"commonjs\"}' -T render-examples.ts dist/pages dist/examples", "render-examples": "ts-node -O '{\"module\": \"commonjs\"}' -T render-examples.ts dist/pages dist/examples",
"lint-check": "eslint '{src,tests}/**/*.{js,jsx,ts,tsx}'", "lint-check": "eslint '{src,tests}/**/*.{js,jsx,ts,tsx}'",
"lint-fix": "eslint --fix '{src,tests}/**/*.{js,jsx,ts,tsx}'", "lint-fix": "eslint --fix '{src,tests}/**/*.{js,jsx,ts,tsx}'",

View File

@ -7,7 +7,6 @@
"author": "Florian Dold", "author": "Florian Dold",
"license": "GPL-2.0+", "license": "GPL-2.0+",
"scripts": { "scripts": {
"prepare": "tsc",
"compile": "tsc" "compile": "tsc"
}, },
"devDependencies": { "devDependencies": {

View File

@ -52,7 +52,6 @@
} }
}, },
"scripts": { "scripts": {
"prepare": "tsc",
"compile": "tsc", "compile": "tsc",
"test": "tsc && ava", "test": "tsc && ava",
"clean": "rimraf dist lib tsconfig.tsbuildinfo", "clean": "rimraf dist lib tsconfig.tsbuildinfo",

View File

@ -16,7 +16,6 @@
}, },
"type": "module", "type": "module",
"scripts": { "scripts": {
"prepare": "true",
"compile": "./build-node.mjs", "compile": "./build-node.mjs",
"test": "tsc", "test": "tsc",
"clean": "rimraf lib dist tsconfig.tsbuildinfo", "clean": "rimraf lib dist tsconfig.tsbuildinfo",

View File

@ -12,7 +12,6 @@
"author": "Florian Dold", "author": "Florian Dold",
"license": "GPL-3.0", "license": "GPL-3.0",
"scripts": { "scripts": {
"prepare": "tsc",
"compile": "tsc", "compile": "tsc",
"pretty": "prettier --write src", "pretty": "prettier --write src",
"test": "tsc && ava", "test": "tsc && ava",

View File

@ -13,7 +13,6 @@
"test": "./test.mjs && mocha --require source-map-support/register 'dist/test/**/*.test.js' 'dist/test/**/test.js'", "test": "./test.mjs && mocha --require source-map-support/register 'dist/test/**/*.test.js' 'dist/test/**/test.js'",
"test:coverage": "nyc pnpm test", "test:coverage": "nyc pnpm test",
"compile": "./patch-linaria.sh && tsc && ./build.mjs", "compile": "./patch-linaria.sh && tsc && ./build.mjs",
"prepare": "tsc",
"dev": "./dev.mjs", "dev": "./dev.mjs",
"pretty": "prettier --write src", "pretty": "prettier --write src",
"i18n:extract": "pogen extract", "i18n:extract": "pogen extract",

View File

@ -27,7 +27,6 @@
} }
}, },
"scripts": { "scripts": {
"prepare": "tsc && ./build.mjs",
"compile": "tsc && ./build.mjs", "compile": "tsc && ./build.mjs",
"clean": "rimraf dist lib tsconfig.tsbuildinfo", "clean": "rimraf dist lib tsconfig.tsbuildinfo",
"pretty": "prettier --write src" "pretty": "prettier --write src"