Repository navigation
chore: migrate tests to node:test and remove dependencies - #13
Merged
Merged
Conversation
- Replace mocha, ts-node, and ts-node-test-register with node:test and node:assert - Inline upperBound and remove the boundary runtime dependency - Update TypeScript to 5.9 and @types/node to 22 - Run CI on Node.js 22 and 24 and tidy the workflow with actionlint Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSdrAHhCYSLRo6b3xvNrX3 Co-authored-by: azu <azu@users.noreply.github.com>
- Update typescript to 7.0.2 and packageManager to npm@12.2.2 - Switch to module node20 because TypeScript 7 removed moduleResolution node10 - Keep the boundary dependency as before Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSdrAHhCYSLRo6b3xvNrX3 Co-authored-by: azu <azu@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by azu · project thread
Summary
node:testandnode:assert.mocha,@types/mocha,ts-node, andts-node-test-register. The test file runs through Node.js type stripping, so no TypeScript loader is needed.typescriptto 7.0.2,@types/nodeto 22, andpackageManagertonpm@12.2.2.moduleResolution: node10, sotsconfig.jsonnow usesmodule: node20(which still emits CommonJS becausepackage.jsonhas notype) and setsrootDir.permissions,concurrency,timeout-minutes,pushlimited tomaster).boundaryruntime dependency is kept as is.Notes
src/is not modified.lib/structured-source.js, sonpm testrunsnpm run buildfirst. This tests the published output and avoids theMODULE_TYPELESS_PACKAGE_JSONwarning that importingsrc/*.tsfrom a typeless package would cause.test/package.jsonsets"type": "module"for the test directory only.tsc -p teststill type-checks the tests, which ts-node did before.enginesfield was added, so consumers are not affected. Only the development and CI environment now needs Node.js 22.18+ (type stripping on by default).Verification
npm test: 5 tests pass on Node.js 22.23. A deliberately broken assertion makes it fail.lib/structured-source.jsandlib/structured-source.d.tsbuilt with TypeScript 7 are identical to the ones built frommasterwith TypeScript 4.9 (ignoring trailing whitespace).actionlintreports no errors.🤖 Generated with Claude Code
https://claude.ai/code/session_01TSdrAHhCYSLRo6b3xvNrX3