Skip to content

Commit 43f54d8

Browse files
committed
build(node.js)!: pf-3843 remove 20 support
* audit, move dep audit, publishing baselines moved to node.js 24 * build, engine, moved to node.js 22 minimum * docs, references moved to node.js 22 * package, min engine version, cleaned test scripts * src, drop node.js 20 reference * e2e, cleaned node.js 20 checks, left itSkip, envNodeVersion
1 parent 0a3420d commit 43f54d8

15 files changed

Lines changed: 65 additions & 95 deletions

.github/workflows/audit.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
name: Data Audit
1+
name: Security & Data Audit
22

33
on:
44
pull_request:
55
paths:
66
- 'src/docs.json'
77
- 'tests/audit/**'
8+
- 'package.json'
9+
- 'package-lock.json'
810
schedule:
911
- cron: '0 0 * * *' # Daily at midnight
1012
workflow_dispatch:
1113

1214
jobs:
13-
audit-links:
15+
documentation-audit:
16+
name: Documentation Audit
1417
runs-on: ubuntu-latest
1518
permissions:
1619
contents: read
@@ -19,7 +22,7 @@ jobs:
1922
- name: Setup Node.js
2023
uses: actions/setup-node@v6.3.0
2124
with:
22-
node-version: 22.x
25+
node-version: '24'
2326
cache: npm
2427
- name: Install dependencies
2528
run: npm ci
@@ -30,3 +33,20 @@ jobs:
3033
DOCS_AUDIT_MAX_TOTAL: ${{ github.event_name == 'schedule' && '0' || '50' }}
3134
# Advisories are non-blocking for PRs
3235
continue-on-error: ${{ github.event_name == 'pull_request' }}
36+
37+
dependency-audit:
38+
name: Dependency Audit
39+
runs-on: ubuntu-latest
40+
permissions:
41+
contents: read
42+
steps:
43+
- uses: actions/checkout@v6
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v6.3.0
46+
with:
47+
node-version: '24'
48+
cache: npm
49+
- name: Run npm audit
50+
run: npm audit --omit=dev --audit-level=critical
51+
# Advisories are non-blocking for PRs
52+
continue-on-error: ${{ github.event_name == 'pull_request' }}

.github/workflows/integration.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,21 @@ jobs:
1313
contents: read
1414
strategy:
1515
matrix:
16-
node-version: [20.x, 22.x, 24.x]
16+
node-version: [22.x, 24.x]
1717
steps:
1818
- uses: actions/checkout@v6
19+
1920
- name: Setup Node.js ${{ matrix.node-version }}
2021
uses: actions/setup-node@v6.3.0
2122
with:
2223
node-version: ${{ matrix.node-version }}
2324
cache: npm
24-
- name: Node.js modules cache
25-
uses: actions/cache@v5
26-
id: modules-cache
27-
with:
28-
path: ${{ github.workspace }}/node_modules
29-
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/package-lock.json') }}
30-
restore-keys: |
31-
${{ runner.os }}-${{ matrix.node-version }}-modules
25+
3226
- name: Install Node.js packages
33-
if: ${{ steps.modules-cache.outputs.cache-hit != 'true' }}
3427
run: npm ci
35-
- name: Audit packages
36-
run: npm audit --audit-level=high
37-
continue-on-error: true
28+
3829
- name: Lint and test
3930
run: npm run test:ci
31+
4032
- name: Confirm integration
41-
if: ${{ success() }}
4233
run: npm run test:integration

.github/workflows/publishing.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,12 @@ jobs:
1010
permissions:
1111
contents: read
1212
id-token: write
13-
strategy:
14-
matrix:
15-
node: [22.x]
1613
steps:
1714
- uses: actions/checkout@v6
18-
- name: Setup Node.js ${{ matrix.node-version }}
15+
- name: Setup Node.js
1916
uses: actions/setup-node@v6.3.0
2017
with:
21-
node-version: ${{ matrix.node-version }}
22-
cache: npm
18+
node-version: '24'
2319
registry-url: 'https://registry.npmjs.org'
2420
- name: Install dependencies
2521
run: npm ci

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ It is intended to be extensible to meet the needs of different teams and project
77
[Read more about our roadmap and how we've structured the server in our architecture docs](./docs/architecture.md).
88

99
## Requirements
10-
- [Node.js 20+](https://nodejs.org/)
10+
- [Node.js 22+](https://nodejs.org/)
1111
- NPM (or equivalent package manager)
1212

1313
## Quick start

docs/development.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ The documentation catalog `src/docs.json` pins remote resources to specific comm
158158

159159
#### Programmatic runtime requirements
160160

161-
- **Node.js 20+**: Required to run the core MCP server.
162-
- **Node.js 22+**: Required for loading external tool plugins (`--tool`) and for developers working on advanced process isolation features.
161+
- **Node.js 22+**: Required to run the MCP server, load external tool plugins (`--tool`), and use advanced process isolation features.
163162

164163
**Example: Programmatic test mode**
165164
```typescript
@@ -411,7 +410,7 @@ These terms describe **how tools and their related properties are represented**
411410

412411
### Tool plugins
413412

414-
- **Plugins don't appear**: Verify the Node version (requires Node.js >= 20; >= 22 for tool plugins) and check logs (enable `--log-stderr`).
413+
- **Plugins don't appear**: Verify the Node version (requires Node.js >= 22 for tool plugins) and check logs (enable `--log-stderr`).
415414
- **Startup warnings/errors**: Startup `load:ack` warnings/errors from tool plugins are logged when stderr/protocol logging is enabled.
416415
- **Schema errors**: If `tools/call` rejects with schema errors, ensure `inputSchema` is valid. See [Authoring tools](#authoring-tools) for details.
417416
- **Network access issues**: If the tool is having network access issues, you may need to configure `--plugin-isolation none`. This is generally discouraged for security reasons but may be necessary in some cases.
@@ -424,7 +423,7 @@ These terms describe **how tools and their related properties are represented**
424423

425424
### General issues
426425

427-
- **Server won't start**: Check Node.js version (requires Node.js >= 20; >= 22 for tool plugins).
426+
- **Server won't start**: Check Node.js version (requires Node.js >= 22 for tool plugins).
428427
- **Missing tools/resources**: Verify the server started successfully and check logs with `--log-stderr`.
429428
- **Type errors**: Ensure TypeScript types are installed: `npm install --save-dev @types/node`
430429

docs/usage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ These are **first-step checks** for common setup problems, not full diagnostics.
183183
> **Agents**: PatternFly MCP server information is available internally through the `patternfly://context` MCP resource.
184184
185185
### 1. Verify Node.js Version
186-
The PatternFly MCP server requires **Node.js 20 or higher**.
186+
The PatternFly MCP server requires **Node.js 22 or higher**.
187187

188188
- **How to check**:
189189
- **macOS/Linux**: Open **Terminal** and type `node -v`.
190190
- **Windows**: Open **PowerShell** or **Command Prompt** and type `node -v`.
191-
- **Requirement**: You should see a version starting with `v20`, `v22`, or higher.
192-
- **Solution**: If your version is lower than 20, please download and install the latest "LTS" (Long Term Support) version from [nodejs.org](https://nodejs.org/).
191+
- **Requirement**: You should see a version starting with `v22`, or higher.
192+
- **Solution**: If your version is lower than 22, please download and install the latest "LTS" (Long Term Support) version from [nodejs.org](https://nodejs.org/).
193193

194194
### 2. Reset the npx Cache
195195
If you encounter an `ERR_MODULE_NOT_FOUND` error or don't see the latest features, your system may be using a "stale" or corrupted version in its cache.

guidelines/agent_behaviors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ For a detailed overview of the system design and roadmap, see [docs/architecture
4545
- **Validation Required**: Follow checklists; verify requirements; test thoroughly. Review [pull request warning signs](../CONTRIBUTING.md#pull-requests) to avoid common pitfalls.
4646
- **Confirmation Required**: Confirm success; summarize changes; explain impact; verify understanding.
4747
- **Guidance Review Scope**: Unless the user explicitly asks, do not make recommendations on improving guidance if all you're asked to do is review guidance.
48-
- **Environment Awareness**:
48+
- **Environment Awareness**:
4949
- Server and plugin execution requirements are defined in `package.json`.
5050
- Always verify environment compatibility by checking `patternfly://context` or `package.json`.
5151
- Proactively check for environment mismatches (e.g., Node.js version) if tools fail to load.

jest.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default {
3636
projects: [
3737
{
3838
displayName: 'unit',
39-
roots: ['src'],
39+
roots: ['<rootDir>/src'],
4040
testMatch: ['<rootDir>/src/**/*.test.ts'],
4141
setupFilesAfterEnv: ['<rootDir>/jest.setupTests.ts'],
4242
...baseConfig,
@@ -64,7 +64,7 @@ export default {
6464
},
6565
{
6666
displayName: 'e2e',
67-
roots: ['tests/e2e'],
67+
roots: ['<rootDir>/tests/e2e'],
6868
testMatch: ['<rootDir>/tests/e2e/**/*.test.ts'],
6969
setupFilesAfterEnv: ['<rootDir>/tests/e2e/jest.setupTests.ts'],
7070
transformIgnorePatterns: [
@@ -74,7 +74,7 @@ export default {
7474
},
7575
{
7676
displayName: 'audit',
77-
roots: ['tests/audit'],
77+
roots: ['<rootDir>/tests/audit'],
7878
testMatch: ['<rootDir>/tests/audit/**/*.test.ts'],
7979
...baseConfig
8080
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
"release": "changelog --non-cc --link-url https://github.com/patternfly/patternfly-mcp.git",
3232
"start": "node dist/cli.js --log-stderr",
3333
"start:dev": "tsx watch src/cli.ts --verbose --log-stderr",
34-
"test": "npm run test:spell && npm run test:spell-docs && npm run test:lint && npm run test:types && jest --selectProjects unit --roots=src/",
35-
"test:audit": "jest --selectProjects audit --roots=tests/audit/",
34+
"test": "npm run test:spell && npm run test:spell-docs && npm run test:lint && npm run test:types && jest --selectProjects unit",
35+
"test:audit": "jest --selectProjects audit",
3636
"test:ci": "npm test -- --coverage",
3737
"test:dev": "npm test -- --watchAll",
38-
"test:integration": "npm run build && NODE_OPTIONS='--experimental-vm-modules' jest --selectProjects e2e --roots=tests/e2e/",
38+
"test:integration": "npm run build && NODE_OPTIONS='--experimental-vm-modules' jest --selectProjects e2e",
3939
"test:integration-dev": "npm run test:integration -- --watchAll",
4040
"test:lint": "eslint .",
4141
"test:lint-fix": "eslint . --fix",
@@ -84,7 +84,7 @@
8484
"typescript-eslint": "^8.59.1"
8585
},
8686
"engines": {
87-
"node": ">=20.0.0"
87+
"node": ">=22.0.0"
8888
},
8989
"repository": {
9090
"type": "git",

0 commit comments

Comments
 (0)