Repository navigation
ci: test against multiple node versions - #476
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
Can you make this PR into a single commit instead? |
|
Also not sure why we gotta put pinned hashes Do actions not follow semver? |
You can squash and merge this commit, doing a force push is a hassle.
A good security practice that most people (security engineers) recently due. |
Node.js v24 introduces several breaking changes that affect tests:
1. Cache-Control headers: Node.js v24's fetch automatically adds
'cache-control: no-cache' headers, preventing 304 Not Modified
responses. Updated tests to explicitly set 'Cache-Control: max-age=3600'
to allow conditional GET behavior.
2. IP/Hostname handling: Node.js v24 may connect via IPv6 (::1) even
with Agent({ family: 4 }), and ignores custom Host headers for
security. Updated tests to handle both IPv4 and IPv6 connections
and accept 'localhost' hostname on v24+.
3. TRACE method: Node.js v24 blocks TRACE HTTP method for security
(XST attack prevention). Added version check to skip test on v24+.
4. Host header validation: Node.js v24 has stricter validation for
malformed headers. Updated tests to accept either 200 or 500
status codes depending on Node.js version.
All changes maintain backward compatibility with Node.js v20 and v22
while supporting the new security-focused behavior in v24.
Fixes #476
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Node.js v24 introduces several breaking changes that affect tests:
1. Cache-Control headers: Node.js v24's fetch automatically adds
'cache-control: no-cache' headers, preventing 304 Not Modified
responses. Updated tests to explicitly set 'Cache-Control: max-age=3600'
to allow conditional GET behavior.
2. IP/Hostname handling: Node.js v24 may connect via IPv6 (::1) even
with Agent({ family: 4 }), and ignores custom Host headers for
security. Updated tests to handle both IPv4 and IPv6 connections
and accept 'localhost' hostname on v24+.
3. TRACE method: Node.js v24 blocks TRACE HTTP method for security
(XST attack prevention). Added version check to skip test on v24+.
4. Host header validation: Node.js v24 has stricter validation for
malformed headers. Updated tests to accept either 200 or 500
status codes depending on Node.js version.
All changes maintain backward compatibility with Node.js v20 and v22
while supporting the new security-focused behavior in v24.
Fixes #476
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* docs: add CLAUDE.md for AI-assisted development
Add comprehensive documentation for Claude Code to understand:
- Common development commands (build, test, lint)
- High-level architecture (App class, Router, extensions)
- Project structure and monorepo layout
- Testing patterns and helpers
- Release process with changesets
- Code style and dependencies
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* chore: bump dev dependencies and configure workspace trust policy
Update development dependencies:
- @biomejs/biome: 2.2.4 → 2.3.7
- @commitlint/cli: 19.8.1 → 20.1.0
- @commitlint/config-conventional: 19.8.1 → 20.0.0
- @types/node: 22.10.7 → 24.10.1
- @vitest/coverage-v8: 3.2.4 → 4.0.13
- supertest-fetch: 1.5.0 → 2.0.0
- typescript: 5.9.2 → 5.9.3
- vite: 7.1.11 → 7.2.4
- vitest: 3.2.4 → 4.0.13
Add pnpm workspace trust policy configuration:
- Enable no-downgrade trust policy
- Set minimum release age to 24 hours
- Configure trust policy timeout
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* test: fix compatibility with Node.js v24
Node.js v24 introduces several breaking changes that affect tests:
1. Cache-Control headers: Node.js v24's fetch automatically adds
'cache-control: no-cache' headers, preventing 304 Not Modified
responses. Updated tests to explicitly set 'Cache-Control: max-age=3600'
to allow conditional GET behavior.
2. IP/Hostname handling: Node.js v24 may connect via IPv6 (::1) even
with Agent({ family: 4 }), and ignores custom Host headers for
security. Updated tests to handle both IPv4 and IPv6 connections
and accept 'localhost' hostname on v24+.
3. TRACE method: Node.js v24 blocks TRACE HTTP method for security
(XST attack prevention). Added version check to skip test on v24+.
4. Host header validation: Node.js v24 has stricter validation for
malformed headers. Updated tests to accept either 200 or 500
status codes depending on Node.js version.
All changes maintain backward compatibility with Node.js v20 and v22
while supporting the new security-focused behavior in v24.
Fixes #476
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* test: fix compatibility with Node.js v24
Node.js v24 introduces several breaking changes that affect tests:
1. Cache-Control headers: Node.js v24's fetch automatically adds
'cache-control: no-cache' headers, preventing 304 Not Modified
responses. Updated tests to explicitly set 'Cache-Control: max-age=3600'
to allow conditional GET behavior.
2. IP/Hostname handling: Node.js v24 may connect via IPv6 (::1) even
with Agent({ family: 4 }), and ignores custom Host headers for
security. Updated tests to handle both IPv4 and IPv6 connections
and accept 'localhost' hostname on v24+.
3. TRACE method: Node.js v24 blocks TRACE HTTP method for security
(XST attack prevention). Added version check to skip test on v24+.
4. Host header validation: Node.js v24 has stricter validation for
malformed headers. Updated tests to accept either 200 or 500
status codes depending on Node.js version.
All changes maintain backward compatibility with Node.js v20 and v22
while supporting the new security-focused behavior in v24.
Fixes #476
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* chore: fix biome check errors
- Update biome schema version from 2.2.4 to 2.3.7
- Ignore HTML template files with interpolation syntax
- Remove unused biome-ignore comment in firebase example
- Apply biome formatting to test files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: fix biome-ignore placeholder explanations
Replace <explanation> placeholders with actual descriptions for:
- jsonp: escape shadows global function
- cookie: RFC 7230 field-content regex
- content-disposition: RFC 5987/6266 parsing regexes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* ci: update Biome version to 2.3.7
Sync CI Biome version with package.json to fix check failures.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test: fix Node.js security backport compatibility
- Skip TRACE test (security restriction backported to Node 20.19+, 22.13+)
- Make hostname tests flexible for both old and new Host header behavior
- Make malformed host tests accept both behaviors
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
We're testing against Node 20, which is on maintenance mode right now. Let's test against new versions as well.
Also pinned GHA versions to the commit hash (using actions-up).