Skip to content

Commit d33f2f4

Browse files
committed
docs: align Node support statements
# Conflicts: # docs/runtime-requirements.md
1 parent fe5f180 commit d33f2f4

3 files changed

Lines changed: 25 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ npm install
5757

5858
- **Node.js >= 20**: The SDK requires Node.js 20 or later. It relies on the built-in global `fetch`, `AbortController`, and DOM `Headers` APIs available natively from Node 20+.
5959
- **Global Fetch**: A standards-compliant `fetch` implementation must be available globally. If running in an environment without native fetch, provide a compatible polyfill via the `config.fetch` option when constructing the SDK.
60-
- **CI-Supported Versions**: Automated tests run against Node.js 20 and Node.js 22.
60+
- **CI-Supported Versions**: Automated tests run against Node.js 20, 22, and 24.
6161
- **Browser Considerations**: When using the SDK in browser environments, be aware of CORS restrictions and ensure that the `Headers` API is supported. The SDK does not include browser-specific polyfills; configure your bundler or runtime accordingly.
6262
- **Custom Fetch Fallback**: For unsupported runtimes (e.g., older Node versions or specialized environments), pass a custom fetch implementation through the SDK configuration to override the global default.
6363

docs/runtime-requirements.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
## Node.js
44

5-
- Minimum: Node.js 18 (LTS)
6-
- Recommended: Node.js 20+ (LTS)
7-
- Tested: Node.js 18, 20, 22, 24
5+
- Minimum: Node.js 20
6+
- Recommended: the latest active LTS release of Node.js
7+
- Tested in CI: Node.js 20, 22, and 24
88

9-
Uses native global `fetch` (Node.js 18+).
9+
The SDK relies on the native global `fetch`, `AbortController`, and DOM `Headers`
10+
APIs available in Node.js 20 and later.
1011

1112
## Browser
1213

tests/ci-matrix-node24.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,23 @@ describe('CI matrix includes Node 24', () => {
4343
);
4444
expect(uniqueVersions.size).toBeGreaterThanOrEqual(2);
4545
});
46+
47+
it('keeps the documented Node support aligned with package engines and CI', () => {
48+
const packageJson = JSON.parse(
49+
readFileSync(resolve(process.cwd(), 'package.json'), 'utf8'),
50+
) as { engines?: { node?: string } };
51+
const readme = readFileSync(resolve(process.cwd(), 'README.md'), 'utf8');
52+
const runtimeRequirements = readFileSync(
53+
resolve(process.cwd(), 'docs/runtime-requirements.md'),
54+
'utf8',
55+
);
56+
57+
expect(packageJson.engines?.node).toBe('>=20.0.0');
58+
expect(readme).toContain('Node.js 20, 22, and 24');
59+
expect(runtimeRequirements).toContain('Minimum: Node.js 20');
60+
expect(runtimeRequirements).toContain(
61+
'Tested in CI: Node.js 20, 22, and 24',
62+
);
63+
expect(runtimeRequirements).not.toMatch(/Node\.js 18/);
64+
});
4665
});

0 commit comments

Comments
 (0)