From d94b95af1f7c0bc0a6ad77010e831dfeb6cf6b83 Mon Sep 17 00:00:00 2001 From: Vladimir Reznichenko Date: Thu, 19 Sep 2024 11:58:16 +0200 Subject: [PATCH] pnpm: settings tweaks. --- .github/actions/setup-woocommerce-monorepo/action.yml | 4 ++-- .github/workflows/pr-assess-bundle-size.yml | 2 +- .husky/post-merge | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-woocommerce-monorepo/action.yml b/.github/actions/setup-woocommerce-monorepo/action.yml index c6a7031c7af..900a86042d5 100644 --- a/.github/actions/setup-woocommerce-monorepo/action.yml +++ b/.github/actions/setup-woocommerce-monorepo/action.yml @@ -91,9 +91,9 @@ runs: # PHPUnit/REST testing optimized installation of the deps: minimalistic and parallellized between PHP/JS. # JS deps installation is abit hard-core, but all we need actually is wp-env and playwright - we are good at that regard. composer install --working-dir=./plugins/woocommerce --quiet & - pnpm install --filter='@woocommerce/plugin-woocommerce' --frozen-lockfile --config.dedupe-peer-dependents=false --ignore-scripts + pnpm install --filter='@woocommerce/plugin-woocommerce' --frozen-lockfile --prefer-offline --config.dedupe-peer-dependents=false --ignore-scripts else - pnpm install ${{ steps.project-filters.outputs.install }} --frozen-lockfile ${{ steps.project-filters.outputs.install != '' && '--config.dedupe-peer-dependents=false' || '' }} + pnpm install ${{ steps.project-filters.outputs.install }} --frozen-lockfile --prefer-offline ${{ steps.project-filters.outputs.install != '' && '--config.dedupe-peer-dependents=false' || '' }} fi # We want to include an option to build projects using this action so that we can make # sure that the build cache is always used when building projects. diff --git a/.github/workflows/pr-assess-bundle-size.yml b/.github/workflows/pr-assess-bundle-size.yml index 8e6b2272f8a..134bc30e7a5 100644 --- a/.github/workflows/pr-assess-bundle-size.yml +++ b/.github/workflows/pr-assess-bundle-size.yml @@ -50,7 +50,7 @@ jobs: with: repo-token: '${{ secrets.GITHUB_TOKEN }}' pattern: './{packages/js/!(*e2e*|*internal*|*test*|*plugin*|*create*),plugins/woocommerce-blocks}/{build,build-style}/**/*.{js,css}' - install-script: 'pnpm install --filter="@woocommerce/plugin-woocommerce..." --frozen-lockfile --config.dedupe-peer-dependents=false --ignore-scripts' + install-script: 'pnpm install --filter="@woocommerce/plugin-woocommerce..." --frozen-lockfile --prefer-offline --config.dedupe-peer-dependents=false --ignore-scripts' build-script: '--filter="@woocommerce/plugin-woocommerce" build' clean-script: '--if-present buildclean' minimum-change-threshold: 100 diff --git a/.husky/post-merge b/.husky/post-merge index 7ff64bebced..c1e3007296c 100755 --- a/.husky/post-merge +++ b/.husky/post-merge @@ -6,5 +6,5 @@ if [ -n "$changedManifests" ]; then printf "It was a change in the following file(s) - refreshing dependencies:\n" printf " %s\n" $changedManifests - pnpm install --frozen-lockfile + pnpm install --frozen-lockfile --prefer-offline fi