Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minimal node and npm upgrade #53426

Merged
merged 3 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/create-block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ['14']
node: ['16']
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:

- name: Running the tests
run: |
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % ${{ matrix.totalParts }} == ${{ matrix.part }} - 1' < ~/.jest-e2e-tests )
npx wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
npx wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % ${{ matrix.totalParts }} == ${{ matrix.part }} - 1' < ~/.jest-e2e-tests )

- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node

- name: Install NVM
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm -v

- name: Compare performance with trunk
if: github.event_name == 'pull_request'
run: ./bin/plugin/cli.js perf $GITHUB_SHA trunk --tests-branch $GITHUB_SHA
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: ${{ github.repository == 'WordPress/gutenberg' }}
strategy:
matrix:
node: ['14']
node: ['16']

steps:
# Checkout defaults to using the branch which triggered the event, which
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ['14']
node: ['16']

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
save-exact = true
engine-strict = true
legacy-peer-deps = true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
16
4 changes: 2 additions & 2 deletions bin/plugin/commands/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ async function runPerformanceTests( branches, options ) {

log( ' >> Installing dependencies and building packages' );
await runShellScript(
'npm ci && node ./bin/packages/build.js',
'bash -c "source $HOME/.nvm/nvm.sh && nvm install && npm ci && node ./bin/packages/build.js"',
performanceTestDirectory
);
log( ' >> Creating the environment folders' );
Expand Down Expand Up @@ -321,7 +321,7 @@ async function runPerformanceTests( branches, options ) {

log( ` >> Building the ${ fancyBranch } branch` );
await runShellScript(
'npm ci && npm run prebuild:packages && node ./bin/packages/build.js && npx wp-scripts build',
'bash -c "source $HOME/.nvm/nvm.sh && nvm install && npm ci && npm run prebuild:packages && node ./bin/packages/build.js && npx wp-scripts build"',
buildPath
);

Expand Down
2 changes: 1 addition & 1 deletion bin/validate-package-lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { red, yellow } = require( 'chalk' );
// @ts-ignore
const packageLock = require( '../package-lock' );

const dependencies = Object.entries( packageLock.dependencies );
const dependencies = Object.entries( packageLock.packages );
for ( const [ name, dependency ] of dependencies ) {
if ( dependency.resolved === false ) {
console.log(
Expand Down
Loading
Loading