Skip to content

Modernize Node support and migrate unit tests to Vitest#2892

Merged
schani merged 6 commits into
masterfrom
codex/modernize-node24-vitest
Jul 10, 2026
Merged

Modernize Node support and migrate unit tests to Vitest#2892
schani merged 6 commits into
masterfrom
codex/modernize-node24-vitest

Conversation

@schani

@schani schani commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

  • require Node 20 or newer for published npm packages while using Node 24 for development, full CI fixtures, and publishing
  • build and run unit tests on both Node 20 and Node 24 in CI
  • remove direct fetch polyfills and cover native fetch with local HTTP tests for URL input, remote schema references, and GraphQL introspection
  • migrate standalone regression checks to Vitest while retaining the custom cross-language fixture harness
  • update the JavaScript PropTypes fixture to use the maintained prop-types API without the legacy fetch dependency chain
  • bump the release line to 24.0.0 and add migration documentation
  • retain TypeScript 5.8 for builds and TypeScript 4.9 for the TypeScript-to-schema integration

Verification

  • clean install with npm ci
  • full build on Node 20 and Node 24
  • 4 Vitest files / 9 tests on Node 20 and Node 24
  • focused JavaScript, TypeScript, and JavaScript PropTypes fixtures
  • test TypeScript typecheck and Biome formatting checks
  • VS Code extension bundle build
  • npm package dry runs for the CLI and all three library packages

The full cross-language matrix remains in GitHub Actions because it requires the external language toolchains described in AGENTS.md.

schani and others added 3 commits July 10, 2026 09:06
…e24-vitest

# Conflicts:
#	.github/workflows/publish-vscode.yaml
#	package-lock.json
#	package.json
#	packages/quicktype-graphql-input/package.json
#	src/GraphQLIntrospection.ts
- Port the rationale comments from the deleted standalone checks into the
  migrated Vitest tests, including the issue links.
- Guard the javascript-prop-types fixture against prop-types' production
  no-op shims with a sentinel self-check.
- Remove the unused node_modules_key/source_key cache keys from the setup
  action.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
npm test now runs the Vitest unit suite before the fixture harness, so
the documented FIXTURE=... npm test forms were misleading. Point them at
npm run test:fixtures and mention npm run test:unit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread MIGRATING.md
@schani
schani merged commit 8969b56 into master Jul 10, 2026
23 checks passed
@schani
schani deleted the codex/modernize-node24-vitest branch July 10, 2026 16:21
schani added a commit that referenced this pull request Jul 10, 2026
Master (#2892) migrated the standalone test/check-*.ts regression checks
into Vitest unit tests and removed their wiring from test/test.ts, so this
PR's check-language-named.ts is now test/unit/language-named.test.ts.
schani added a commit that referenced this pull request Jul 10, 2026
Master (#2892) migrated the standalone test/check-*.ts regression checks
into Vitest unit tests and removed their wiring from test/test.ts, so this
PR's check-windows-schema-paths.ts is now test/unit/windows-schema-paths.test.ts.
Also adapted NodeIO's new file:-URI branch to master's globalThis.fetch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant