From fcd2e9c1dbf6ad324a790603502dd081ec8033e9 Mon Sep 17 00:00:00 2001 From: "compulim-workflow-bot[bot]" <145930250+compulim-workflow-bot[bot]@users.noreply.github.com> Date: Thu, 30 May 2024 08:42:47 +0000 Subject: [PATCH] Bump scaffold (#56) * Bump scaffold * Adapt * Update pull-request-validation.yml --------- Co-authored-by: @compulim <@compulim> Co-authored-by: William Wong --- package.json | 4 ++-- packages/integration-test/package.json | 4 ++-- packages/pages/package.json | 4 ++-- packages/react-chain-of-responsibility/package.json | 4 ++-- .../src/tsconfig.declaration.json | 3 ++- packages/react-chain-of-responsibility/src/tsconfig.json | 7 ++++--- .../src/tsconfig.precommit.production.json | 7 ++++--- .../src/tsconfig.precommit.test.json | 7 ++++--- 8 files changed, 22 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 0ec3c69..aee4709 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,10 @@ "build": "npm run build --if-present --workspaces", "bump": "npm run bump:prod && npm run bump:dev && npm run bump:auditfix && npm run bump:packages && npm run bump:eslintrc", "bump:auditfix": "npm audit fix || exit 0", - "bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '.localPeerDependencies // {} as $L | .devDependencies // {} | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", + "bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // {}) as $L | (.devDependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", "bump:eslintrc": "if [ -f node_modules/react/package.json ]; then docker run -e VERSION=$(cat node_modules/react/package.json | jq -r '.version') -i --rm mikefarah/yq '.settings.react.version = strenv(VERSION)' < ./.eslintrc.react.yml | tee /tmp/output.tmp && mv /tmp/output.tmp ./.eslintrc.react.yml; fi", "bump:packages": "npm run bump --if-present --workspaces", - "bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '.localPeerDependencies // {} as $L | .dependencies // {} | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", + "bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // {}) as $L | (.dependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", "postscaffold": "npm run postscaffold:eslint:react && npm run postscaffold --if-present --workspaces", "postscaffold:eslint:react": "npm run bump:eslintrc", "precommit": "npm run precommit --if-present --workspaces", diff --git a/packages/integration-test/package.json b/packages/integration-test/package.json index 8a8031d..869ade3 100644 --- a/packages/integration-test/package.json +++ b/packages/integration-test/package.json @@ -6,8 +6,8 @@ "scripts": { "bump": "npm run bump:prod && npm run bump:dev && npm run bump:auditfix", "bump:auditfix": "npm audit fix || exit 0", - "bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '.localPeerDependencies // {} as $L | .devDependencies // {} | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", - "bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '.localPeerDependencies // {} as $L | .dependencies // {} | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", + "bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // {}) as $L | (.devDependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", + "bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // {}) as $L | (.dependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", "precommit": "eslint --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts ./", "switch": "cat package.json | jq --arg SWITCH_NAME $SWITCH_NAME -r '(.[\"switch:\" + $SWITCH_NAME] // {}) as $TEMPLATE | .devDependencies += ($TEMPLATE.devDependencies // {}) | .dependencies += ($TEMPLATE.dependencies // {})' | tee ./package.json.tmp && mv ./package.json.tmp ./package.json", "test": "jest" diff --git a/packages/pages/package.json b/packages/pages/package.json index fff6d43..4c6e425 100644 --- a/packages/pages/package.json +++ b/packages/pages/package.json @@ -6,8 +6,8 @@ "build": "esbuild --bundle --entry-names=[name]/[ext]/main --jsx=automatic --minify --outdir=./public/static/ --sourcemap app=./src/app/index.tsx", "bump": "npm run bump:prod && npm run bump:dev && npm run bump:auditfix", "bump:auditfix": "npm audit fix || exit 0", - "bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '.localPeerDependencies // {} as $L | .devDependencies // {} | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", - "bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '.localPeerDependencies // {} as $L | .dependencies // {} | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", + "bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // {}) as $L | (.devDependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", + "bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // {}) as $L | (.dependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", "precommit": "npm run precommit:typescript", "precommit:typescript": "tsc --project ./src/tsconfig.json", "reinstall": "rm -r node_modules package-lock.json && npm install", diff --git a/packages/react-chain-of-responsibility/package.json b/packages/react-chain-of-responsibility/package.json index a2a0bf8..b9fb41c 100644 --- a/packages/react-chain-of-responsibility/package.json +++ b/packages/react-chain-of-responsibility/package.json @@ -33,8 +33,8 @@ "build": "tsup", "bump": "npm run bump:prod && npm run bump:dev && npm run bump:auditfix", "bump:auditfix": "npm audit fix || exit 0", - "bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '.localPeerDependencies // {} as $L | .devDependencies // {} | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", - "bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '.localPeerDependencies // {} as $L | .dependencies // {} | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@latest\") | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", + "bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // {}) as $L | (.devDependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", + "bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // {}) as $L | (.dependencies // {}) | to_entries | map(select(.key as $K | $L | has($K) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true", "precommit": "npm run precommit:eslint && npm run precommit:typescript:production && npm run precommit:typescript:test", "precommit:eslint": "eslint ./src/", "precommit:typescript:production": "tsc --noEmit --project ./src/tsconfig.precommit.production.json", diff --git a/packages/react-chain-of-responsibility/src/tsconfig.declaration.json b/packages/react-chain-of-responsibility/src/tsconfig.declaration.json index abfb987..25d0cc5 100644 --- a/packages/react-chain-of-responsibility/src/tsconfig.declaration.json +++ b/packages/react-chain-of-responsibility/src/tsconfig.declaration.json @@ -4,7 +4,8 @@ "emitDeclarationOnly": true, "esModuleInterop": true, "jsx": "react", - "noEmit": false + "noEmit": false, + "target": "ESNext" }, "exclude": ["**/*.spec.*", "**/*.test.*", "__tests__/**/*"], "extends": "@tsconfig/strictest/tsconfig.json" diff --git a/packages/react-chain-of-responsibility/src/tsconfig.json b/packages/react-chain-of-responsibility/src/tsconfig.json index 78960e2..ebe1e5a 100644 --- a/packages/react-chain-of-responsibility/src/tsconfig.json +++ b/packages/react-chain-of-responsibility/src/tsconfig.json @@ -3,10 +3,11 @@ "compilerOptions": { "esModuleInterop": true, "jsx": "react", - "module": "NodeNext", - "moduleResolution": "NodeNext", + "module": "ESNext", + "moduleResolution": "Bundler", "noEmit": true, - "strict": true + "strict": true, + "target": "ESNext" }, "extends": "@tsconfig/strictest/tsconfig.json" } diff --git a/packages/react-chain-of-responsibility/src/tsconfig.precommit.production.json b/packages/react-chain-of-responsibility/src/tsconfig.precommit.production.json index 1cbac25..40cc24f 100644 --- a/packages/react-chain-of-responsibility/src/tsconfig.precommit.production.json +++ b/packages/react-chain-of-responsibility/src/tsconfig.precommit.production.json @@ -2,10 +2,11 @@ "compilerOptions": { "esModuleInterop": true, "jsx": "react", - "module": "NodeNext", - "moduleResolution": "NodeNext", + "module": "ESNext", + "moduleResolution": "Bundler", "noEmit": true, - "strict": true + "strict": true, + "target": "ESNext" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "__tests__/**/*"], "extends": "@tsconfig/strictest/tsconfig.json" diff --git a/packages/react-chain-of-responsibility/src/tsconfig.precommit.test.json b/packages/react-chain-of-responsibility/src/tsconfig.precommit.test.json index 55eb86c..7f4ffb7 100644 --- a/packages/react-chain-of-responsibility/src/tsconfig.precommit.test.json +++ b/packages/react-chain-of-responsibility/src/tsconfig.precommit.test.json @@ -2,10 +2,11 @@ "compilerOptions": { "esModuleInterop": true, "jsx": "react", - "module": "NodeNext", - "moduleResolution": "NodeNext", + "module": "ESNext", + "moduleResolution": "Bundler", "noEmit": true, - "strict": true + "strict": true, + "target": "ESNext" }, "extends": "@tsconfig/recommended/tsconfig.json", "include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "__tests__/**/*"]