Upgrade to pnpm 7 (#34661)
* Remove -- -- from scripts that fixed issue in pnpm 6, fix a couple TS issues in sep packages * Minor fixes to analyzer scripts and doco based on pnpm 7 * Add dompurify types to data package to avoid TS errors * Remove pnpx in favor of pnpm exec * Modify the code analyzer to respect pnpm version if present. * Update instructions for running recursive lint, add comments to explain
This commit is contained in:
parent
cd31ec0dd5
commit
04b74c1053
|
@ -28,7 +28,7 @@ runs:
|
|||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@10693b3829bf86eb2572aef5f3571dcf5ca9287d
|
||||
with:
|
||||
version: 6
|
||||
version: 7
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93
|
||||
|
@ -51,7 +51,9 @@ runs:
|
|||
|
||||
- name: Install Node and PHP Dependencies
|
||||
shell: bash
|
||||
run: pnpm install ${{ steps.parse-input.outputs.INSTALL_FILTERS }}
|
||||
run: |
|
||||
pnpm -w install turbo
|
||||
pnpm install ${{ steps.parse-input.outputs.INSTALL_FILTERS }}
|
||||
|
||||
- name: Cache Build Output
|
||||
uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77
|
||||
|
|
|
@ -52,7 +52,8 @@ jobs:
|
|||
composer --version
|
||||
|
||||
- name: Build Admin feature config
|
||||
run: pnpm build:feature-config --filter=woocommerce
|
||||
working-directory: plugins/woocommerce
|
||||
run: pnpm run build:feature-config
|
||||
|
||||
- name: Add PHP8 Compatibility.
|
||||
run: |
|
||||
|
@ -72,4 +73,5 @@ jobs:
|
|||
run: ./tests/bin/install.sh woo_test root root 127.0.0.1 ${{ matrix.wp }}
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm run test --filter="woocommerce" --color
|
||||
working-directory: plugins/woocommerce
|
||||
run: pnpm run test --color
|
||||
|
|
|
@ -23,7 +23,7 @@ jobs:
|
|||
|
||||
- name: Download and install Chromium browser.
|
||||
working-directory: plugins/woocommerce
|
||||
run: pnpx playwright install chromium
|
||||
run: pnpm exec playwright install chromium
|
||||
|
||||
- name: Run Playwright E2E tests.
|
||||
timeout-minutes: 60
|
||||
|
@ -31,7 +31,7 @@ jobs:
|
|||
env:
|
||||
USE_WP_ENV: 1
|
||||
working-directory: plugins/woocommerce
|
||||
run: pnpx playwright test --config=tests/e2e-pw/playwright.config.js
|
||||
run: pnpm exec playwright test --config=tests/e2e-pw/playwright.config.js
|
||||
|
||||
- name: Generate Playwright E2E Test report.
|
||||
id: generate_e2e_report
|
||||
|
@ -42,7 +42,7 @@ jobs:
|
|||
steps.run_playwright_e2e_tests.conclusion != 'skipped'
|
||||
)
|
||||
working-directory: plugins/woocommerce
|
||||
run: pnpx allure generate --clean e2e/allure-results --output e2e/allure-report
|
||||
run: pnpm exec allure generate --clean e2e/allure-results --output e2e/allure-report
|
||||
|
||||
- name: Archive Playwright E2E test report
|
||||
if: |
|
||||
|
|
|
@ -37,8 +37,9 @@ jobs:
|
|||
composer --version
|
||||
|
||||
- name: Build Admin feature config
|
||||
run: |
|
||||
pnpm build:feature-config --filter=woocommerce
|
||||
working-directory: plugins/woocommerce
|
||||
run:
|
||||
pnpm run build:feature-config
|
||||
|
||||
- name: Init DB and WP
|
||||
working-directory: plugins/woocommerce
|
||||
|
|
|
@ -11,14 +11,15 @@ jobs:
|
|||
uses: actions/checkout@v3
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
npm install -g pnpm@^6.24.2
|
||||
npm install -g pnpm
|
||||
npm -g i @wordpress/env@5.1.0
|
||||
pnpm install --filter code-analyzer --filter cli-core
|
||||
- name: Run analyzer
|
||||
id: run
|
||||
working-directory: tools/code-analyzer
|
||||
run: |
|
||||
version=$(pnpm run analyzer --filter code-analyzer -- major-minor "${{ github.head_ref || github.ref_name }}" "plugins/woocommerce/woocommerce.php" | tail -n 1)
|
||||
pnpm run analyzer --filter code-analyzer -- "$GITHUB_HEAD_REF" $version -o "github"
|
||||
version=$(pnpm run analyzer major-minor "${{ github.head_ref || github.ref_name }}" "plugins/woocommerce/woocommerce.php" | tail -n 1)
|
||||
pnpm run analyzer "$GITHUB_HEAD_REF" $version -o "github"
|
||||
- name: Print results
|
||||
id: results
|
||||
run: echo "::set-output name=results::${{ steps.run.outputs.templates }}${{ steps.run.outputs.wphooks }}${{ steps.run.outputs.schema }}${{ steps.run.outputs.database }}"
|
||||
|
|
|
@ -29,4 +29,4 @@ jobs:
|
|||
run: php tools/monorepo/check-changelogger-use.php --debug "$BASE" "$HEAD"
|
||||
|
||||
- name: Run changelog validation
|
||||
run: pnpm changelog --filter=* -- validate
|
||||
run: pnpm run -r changelog validate
|
||||
|
|
|
@ -13,12 +13,10 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup WooCommerce Monorepo
|
||||
uses: ./.github/actions/setup-woocommerce-monorepo
|
||||
with:
|
||||
install-filters: 'woocommerce/client/admin...'
|
||||
uses: ./.github/actions/setup-woocommerce-monorepo
|
||||
|
||||
- name: Lint
|
||||
run: pnpm run lint --filter='woocommerce/client/admin...' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color
|
||||
run: pnpm run -r --filter='woocommerce/client/admin...' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color lint
|
||||
|
||||
- name: Test
|
||||
run: pnpm run test --filter='woocommerce/client/admin...' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color
|
||||
run: pnpm run test --filter='woocommerce/client/admin...' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color
|
||||
|
|
|
@ -65,4 +65,5 @@ jobs:
|
|||
run: ./tests/bin/install.sh woo_test root root 127.0.0.1 ${{ matrix.wp }}
|
||||
|
||||
- name: Run tests
|
||||
working-directory: plugins/woocommerce
|
||||
run: pnpm run test --filter=woocommerce --color
|
||||
|
|
|
@ -93,7 +93,7 @@ jobs:
|
|||
UPDATE_WC: 1
|
||||
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
||||
run: |
|
||||
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js
|
||||
pnpm exec wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js
|
||||
continue-on-error: true
|
||||
|
||||
- name: Install k6
|
||||
|
|
3
.npmrc
3
.npmrc
|
@ -1,2 +1,3 @@
|
|||
; adding this as npm 7 automatically installs peer dependencies but pnpm does not
|
||||
auto-install-peers=true
|
||||
auto-install-peers=true
|
||||
strict-peer-dependencies=false
|
||||
|
|
|
@ -21,14 +21,16 @@ If you would like to read more about the syntax, please check out [the Turborepo
|
|||
Here are some examples of the ways you can use Turborepo / pnpm commands:
|
||||
|
||||
```bash
|
||||
# Lint and build all plugins, packages, and tools
|
||||
pnpm run lint && pnpm run build
|
||||
# Lint and build all plugins, packages, and tools. Note the use of `-r` for lint,
|
||||
# turbo does not run the lint at this time.
|
||||
pnpm run -r lint && pnpm run build
|
||||
|
||||
# Build WooCommerce Core and all of its dependencies
|
||||
pnpm run build --filter='woocommerce'
|
||||
|
||||
# Lint the @woocommerce/components package
|
||||
pnpm run lint --filter='@woocommerce/components'
|
||||
# Lint the @woocommerce/components package - note the different argument order, turbo scripts
|
||||
# are not running lints at this point in time.
|
||||
pnpm run -r --filter='@woocommerce/components' lint
|
||||
|
||||
# Test all of the @woocommerce scoped packages
|
||||
pnpm run test --filter='@woocommerce/*'
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
"url": "https://github.com/woocommerce/woocommerce/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "pnpm exec turbo run turbo:build -- -- ",
|
||||
"test": "pnpm exec turbo run turbo:test -- --",
|
||||
"build": "pnpm exec turbo run turbo:build",
|
||||
"test": "pnpm exec turbo run turbo:test",
|
||||
"build-storybook": "build-storybook -c ./tools/storybook/.storybook",
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"postinstall": "pnpm git:update-hooks",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -55,7 +55,7 @@
|
|||
"turbo:build": "tsc --build",
|
||||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"start": "tsc --build --watch",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -28,13 +28,13 @@
|
|||
"scripts": {
|
||||
"turbo:build": "pnpm run clean && npm run compile",
|
||||
"turbo:test": "jest",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "rm -rf ./dist ./tsconfig.tsbuildinfo",
|
||||
"compile": "tsc -b",
|
||||
"prepack": "pnpm run build",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"lint:fix": "eslint src --fix"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -127,8 +127,8 @@
|
|||
"turbo:test": "jest --config ./jest.config.json",
|
||||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "eslint src --ext=js,ts,tsx",
|
||||
"build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
|
||||
"build:css": "webpack",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -34,8 +34,8 @@
|
|||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"start": "tsc --build --watch",
|
||||
"prepack": "pnpm run clean && pnpm run build",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -37,8 +37,8 @@
|
|||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"start": "tsc --build --watch",
|
||||
"prepack": "pnpm run clean && pnpm run build",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -69,8 +69,8 @@
|
|||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
|
||||
"build:css": "webpack",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -48,6 +48,7 @@
|
|||
"@babel/runtime": "^7.17.2",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/react-hooks": "^7.0.2",
|
||||
"@types/dompurify": "^2.3.3",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/lodash": "^4.14.182",
|
||||
"@types/md5": "^2.3.2",
|
||||
|
@ -78,8 +79,8 @@
|
|||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"start": "tsc --build --watch",
|
||||
"prepack": "pnpm run clean && pnpm run build",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -55,8 +55,8 @@
|
|||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"start": "tsc --build --watch",
|
||||
"prepack": "pnpm run clean && pnpm run build",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Remove direct dependency on eslint so that linting works properly with pnpm7
|
|
@ -49,7 +49,7 @@
|
|||
"scripts": {
|
||||
"turbo:build": "./bin/build.sh && pnpm run clean && pnpm run compile",
|
||||
"prepare": "pnpm run build",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"clean": "rm -rf ./build ./build-module",
|
||||
"compile": "e2e-builds",
|
||||
"lint": "eslint src --ext=js,ts,tsx",
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
|
||||
"@wordpress/babel-preset-default": "3.0.2",
|
||||
"@wordpress/browserslist-config": "^4.1.0",
|
||||
"eslint": "^8.1.0",
|
||||
"ndb": "^1.1.5",
|
||||
"semver": "^7.3.2"
|
||||
},
|
||||
|
@ -63,7 +62,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"turbo:build": "pnpm run clean && pnpm run compile",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"clean": "rm -rf ./build ./build-module",
|
||||
"compile": "e2e-builds",
|
||||
"prepare": "pnpm run build",
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
"@babel/polyfill": "7.12.1",
|
||||
"@babel/preset-env": "7.12.7",
|
||||
"@typescript-eslint/eslint-plugin": "^5.3.0",
|
||||
"@woocommerce/eslint-plugin": "workspace:*",
|
||||
"@typescript-eslint/parser": "^5.3.0",
|
||||
"@woocommerce/internal-e2e-builds": "workspace:*",
|
||||
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
|
||||
|
@ -42,7 +43,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"turbo:build": "pnpm run clean && pnpm run compile",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"clean": "rm -rf ./build ./build-module",
|
||||
"compile": "e2e-builds",
|
||||
"prepare": "pnpm run build",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -82,8 +82,8 @@
|
|||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
|
||||
"build:css": "webpack",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -54,8 +54,8 @@
|
|||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"start": "tsc --build --watch",
|
||||
"prepack": "pnpm run clean && pnpm run build",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"module": "build-module/util/index.js",
|
||||
"scripts": {
|
||||
"turbo:build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"ts:check": "tsc --noEmit --project ./tsconfig.json",
|
||||
"clean": "pnpm exec rimraf *.tsbuildinfo build build-*",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -45,8 +45,8 @@
|
|||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"start": "tsc --build --watch",
|
||||
"prepack": "pnpm run clean && pnpm run build",
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
"scripts": {
|
||||
"turbo:build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"start": "tsc --build --watch",
|
||||
"prepack": "pnpm run clean && pnpm run build",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -32,8 +32,8 @@
|
|||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"start": "tsc --build --watch",
|
||||
"prepack": "pnpm run clean && pnpm run build",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -60,7 +60,7 @@
|
|||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"build:js": "tsc --build ./tsconfig.json ./tsconfig-cjs.json",
|
||||
"build:css": "webpack",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -32,7 +32,7 @@
|
|||
"prepare": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"lint": "eslint src",
|
||||
"start": "tsc --build --watch",
|
||||
"prepack": "pnpm run clean && pnpm run build",
|
||||
|
|
|
@ -75,7 +75,6 @@ export const Plugins: React.FC< Props > = ( {
|
|||
return (
|
||||
<>
|
||||
<PluginInstaller
|
||||
// @ts-expect-error PluginInstaller has onComplete props but it is a pure js component and doesn't export the right types.
|
||||
onComplete={ (
|
||||
activatedPlugins: string[],
|
||||
response: InstallPluginsResponse
|
||||
|
|
|
@ -74,7 +74,6 @@ export const Plugins: React.FC< SetupStepProps > = ( {
|
|||
return (
|
||||
<>
|
||||
<PluginInstaller
|
||||
// @ts-expect-error PluginInstaller has onComplete props but it is a pure js component and doesn't export the right types.
|
||||
onComplete={ (
|
||||
activatedPlugins: string[],
|
||||
response: InstallPluginsResponse
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
"url": "https://github.com:woocommerce/woocommerce.git"
|
||||
},
|
||||
"scripts": {
|
||||
"changelog": "pnpm run changelog --filter=woocommerce --",
|
||||
"changelog": "pnpm --filter=woocommerce -r run changelog ",
|
||||
"turbo:build": "pnpm run clean && cross-env NODE_ENV=production WC_ADMIN_PHASE=core webpack",
|
||||
"turbo:test": "pnpm run test:client",
|
||||
"analyze": "cross-env NODE_ENV=production ANALYZE=true webpack",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "pnpm run lint:js && pnpm run lint:css",
|
||||
"build:feature-config": "php ../woocommerce/bin/generate-feature-config.php",
|
||||
"clean": "rimraf ../woocommerce/assets/client/admin/*",
|
||||
|
@ -226,7 +226,6 @@
|
|||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.13.1",
|
||||
"pnpm": "^6.24.2"
|
||||
"node": "^16.13.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Adjust build/test scripts to remove -- -- that was required for pnpm 6.
|
|
@ -26,7 +26,8 @@
|
|||
"@wordpress/data": "^4.26.7",
|
||||
"@wordpress/data-controls": "^1.20.7",
|
||||
"@wordpress/element": "^2.19.1",
|
||||
"@wordpress/hooks": "^2.11.1"
|
||||
"@wordpress/hooks": "^2.11.1",
|
||||
"prop-types": "^15.8.1"
|
||||
},
|
||||
"assets": {
|
||||
"js": {
|
||||
|
@ -37,7 +38,7 @@
|
|||
"scripts": {
|
||||
"postinstall": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"turbo:build": "pnpm run build:admin && pnpm run uglify",
|
||||
"build:admin": "wp-scripts build",
|
||||
"build:zip": "./bin/build-zip.sh",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Remove version fixing to pnpm 6 now we use pnpm 7.
|
|
@ -7,7 +7,7 @@
|
|||
"main": "Gruntfile.js",
|
||||
"scripts": {
|
||||
"turbo:build": "grunt assets",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"lint": "grunt eslint stylelint --force"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
"preinstall": "npx only-allow pnpm",
|
||||
"postinstall": "composer install",
|
||||
"changelog": "composer exec -- changelogger",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
|
||||
"lint": "pnpm lint:js && pnpm lint:php",
|
||||
"build:feature-config": "php bin/generate-feature-config.php",
|
||||
"build:zip": "./bin/build-zip.sh",
|
||||
|
@ -99,8 +99,7 @@
|
|||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.13.1",
|
||||
"pnpm": "^6.24.2"
|
||||
"node": "^16.13.1"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 0.1%",
|
||||
|
|
11687
pnpm-lock.yaml
11687
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -11,8 +11,7 @@
|
|||
"license": "GPLv3",
|
||||
"repository": "woocommerce/woocommerce",
|
||||
"engines": {
|
||||
"node": "^16.13.1",
|
||||
"pnpm": "^6.24.2"
|
||||
"node": "^16.13.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-fetch": "^3.2.6",
|
||||
|
|
|
@ -10,7 +10,7 @@ Currently there are just 2 commands:
|
|||
|
||||
1. `lint`. Analyzer is used as a linter for PRs to check if hook/template/db changes were introduced. It produces output either directly on CI or via GH actions `set-output`.
|
||||
|
||||
Here is an example `analyzer` command:
|
||||
Here is an example `analyzer` command, run from this directory:
|
||||
|
||||
`pnpm run analyzer -- lint "release/6.8" "6.8.0" -b release/6.7`
|
||||
|
||||
|
@ -20,7 +20,7 @@ To find out more about the other arguments to the command you can run `pnpm run
|
|||
|
||||
2. `major-minor`. This simple CLI tool gives you the latest `.0` major/minor released version of a plugin's mainfile based on Woo release conventions.
|
||||
|
||||
Here is an example `major-minor` command:
|
||||
Here is an example `major-minor` command, run from this directory:
|
||||
|
||||
`pnpm run analyzer major-minor -- "release/6.8" "plugins/woocommerce/woocommerce.php"`
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ import { scanForDBChanges } from './db-changes';
|
|||
import { scanForHookChanges } from './hook-changes';
|
||||
import { scanForTemplateChanges } from './template-changes';
|
||||
import { SchemaDiff, generateSchemaDiff } from '../git';
|
||||
import { readFile } from 'fs/promises';
|
||||
|
||||
export const scanForChanges = async (
|
||||
compareVersion: string,
|
||||
|
@ -54,6 +55,19 @@ export const scanForChanges = async (
|
|||
|
||||
if ( ! skipSchemaCheck ) {
|
||||
const build = async () => {
|
||||
const fileStr = await readFile(
|
||||
join( pluginPath, 'package.json' ),
|
||||
'utf-8'
|
||||
);
|
||||
const packageJSON = JSON.parse( fileStr );
|
||||
|
||||
if ( packageJSON.engines && packageJSON.engines.pnpm ) {
|
||||
await execAsync(
|
||||
`npm i -g pnpm@${ packageJSON.engines.pnpm }`,
|
||||
{ cwd: pluginPath }
|
||||
);
|
||||
}
|
||||
|
||||
// Note doing the minimal work to get a DB scan to work, avoiding full build for speed.
|
||||
await execAsync( 'composer install', { cwd: pluginPath } );
|
||||
await execAsync(
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"turbo:build": "shx rm -rf dist && tsc -b",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"lint": "eslint . --ext .ts --config .eslintrc",
|
||||
"postpack": "shx rm -f oclif.manifest.json",
|
||||
"posttest": "pnpm lint",
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"turbo:build": "shx rm -rf dist && tsc -b",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name -- --",
|
||||
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
|
||||
"lint": "eslint . --ext .ts --config .eslintrc",
|
||||
"postpack": "shx rm -f oclif.manifest.json",
|
||||
"posttest": "pnpm lint",
|
||||
|
|
Loading…
Reference in New Issue