Skip to content

Commit

Permalink
Improve how Renovate groups NodeJS PRs (#80652)
Browse files Browse the repository at this point in the history
- Setup the group manually
- Match node packages in CircleCI
- Regex match main docker image node version
- Use nvm for GitHub actions since it's easy
- Avoid referencing explicit Node version
  • Loading branch information
noahtallen authored Aug 16, 2023
1 parent 48fbd07 commit 839f74f
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 23 deletions.
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/tooling_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ body:
attributes:
label: Context
description: Provide more context as applicable.
placeholder: |
eg. nodeJS: 18.13.0
browser: Firefox Nightly 92.0a1
placeholder: 'e.g. OS: ubuntu'
8 changes: 3 additions & 5 deletions .github/workflows/editing-toolkit-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ jobs:
name: Run PHPunit tests.
runs-on: ubuntu-latest
steps:
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '^18.13.0'

- name: Checkout code
uses: actions/checkout@HEAD
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Composer install
uses: nick-zh/composer-php@HEAD
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gardening.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ^18.13.0
node-version-file: '.nvmrc'

- name: Wait for prior instances of the workflow to finish
uses: softprops/turnstyle@v1
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/icfy-stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ jobs:
env:
NODE_OPTIONS: --max-old-space-size=4096
steps:
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '^18.13.0'
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Fetch git history
run: git fetch --prune --unshallow
- name: Install dependencies
Expand Down
4 changes: 0 additions & 4 deletions packages/calypso-package-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
"bugs": "https://github.com/Automattic/wp-calypso/issues",
"homepage": "https://github.com/Automattic/wp-calypso/tree/HEAD/packages/generators#readme",
"type": "module",
"engines": {
"node": "^16.17.0",
"yarn": "^3.1.1"
},
"scripts": {
"generate": "generate-calypso-package"
},
Expand Down
21 changes: 19 additions & 2 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,21 @@
minimumReleaseAge: '0 days',
},
{
matchDepNames: [ 'node' ],
groupName: 'nodejs',
matchPackagePatterns: [ '/node$' ],
matchDepNames: [ 'node', 'cimg/node' ],
matchDatasources: [ 'docker', 'node' ],
prPriority: 2,
},
{
groupName: 'nodejs',
matchDepNames: [ 'node' ],
// This gets published with broader Node support, so we'll update it when needed.
ignorePaths: [ 'packages/eslint-plugin-wpcalypso' ]
ignorePaths: [ 'packages/eslint-plugin-wpcalypso' ],
},
{
groupName: 'nodejs',
matchDepNames: [ '@types/node' ],
},
{
extends: [ 'monorepo:react', ':widenPeerDependencies' ],
Expand Down Expand Up @@ -73,6 +84,12 @@
depNameTemplate: 'renovate',
packageNameTemplate: 'ghcr.io/renovatebot/renovate',
},
{
fileMatch: [ '^Dockerfile$' ],
matchStrings: [ 'ARG node_version=(?<currentValue>.*?)\\n' ],
depNameTemplate: 'node',
datasourceTemplate: 'node',
},
],

// --- Update & schedule settings ---
Expand Down
7 changes: 3 additions & 4 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ Automated end-to-end acceptance tests for the [wp-calypso](https://github.com/Au

Calypso E2E requires the following:

- [NodeJS 18.13.0](https://nodejs.org/en/blog/release/v16.17.0/) or higher
- [TypeScript 4.5](https://www.staging-typescript.org/docs/handbook/release-notes/typescript-4-5.html) or higher
- [Playwright 1.28](https://playwright.dev/docs/release-notes#version-128) or higher
- [yarn 3.1](https://github.com/yarnpkg/berry) or higher
- [NodeJS](https://nodejs.org/) at the version in the root package.json "engines" field. (Typically latest LTS.)
- The [yarn](https://github.com/yarnpkg/berry) version available in the repo.
- Dependencies such as [Typescript](https://typescript.org) and [Playwright](https://playwright.dev) are installed via yarn, and you can find information about the versions we use in ./package.json.

## Quick start

Expand Down

0 comments on commit 839f74f

Please sign in to comment.