Migrate from Jest to Node test runner and restructure build#1
Merged
Conversation
- Move source from root to src/ with dedicated tsconfig.json - Build output to dist/ and dist-test/ directories - Replace Jest with Node native test runner + @hapi/code - Remove unnecessary devDeps: browserify, esbuild, es-jest, jest, prettier - Add @hapi/code, @types/node; update TypeScript to ^5.8.2 - Update TS target from ES2019 to ES2021 - Update CI: Node 22.x, actions/checkout@v4, actions/setup-node@v4, remove Coveralls - Update package.json main/types to dist/, add files field - Clean compiled artifacts from root and test/ https://claude.ai/code/session_012dToG4AUYryeoDwpaR7dV2
- CI matrix: Node 22.x -> 24.x - typescript: ^5.8.2 -> ^5.9.3 - @types/node: ^22.13.10 -> ^25.5.0 https://claude.ai/code/session_012dToG4AUYryeoDwpaR7dV2
- go/path.go: Path plugin tracking property paths during parsing - go/path_test.go: Tests for path tracking, meta base, objects, arrays - CI: Add build-go job with Go 1.24 on all platforms https://claude.ai/code/session_012dToG4AUYryeoDwpaR7dV2
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.
Summary
This PR migrates the project from Jest to Node's native test runner and restructures the build system to use TypeScript project references with separate
src/andtest/directories.Key Changes
Test Framework Migration: Replaced Jest with Node's native
node:testmodule and@hapi/codefor assertionsnode:testand@hapi/codeinstead of Jest.toEqual()to.to.equal()Build Structure Reorganization:
src/directory with dedicatedtsconfig.jsontest/tsconfig.jsonfor test compilationdist/(source) anddist-test/(tests)Package Configuration Updates:
mainentry point frompath.jstodist/path.jstypesentry point frompath.d.tstodist/path.d.tsfilesfield to includesrc/anddist/directories@hapi/codeand@types/nodedev dependenciesBuild Scripts:
buildscript to usetsc --build src testtestscript to run Node test runner with source maps enabledwatchscript to build both src and test directoriesCI/CD Updates:
Cleanup:
path.js,path.min.js,path.d.ts, etc.).gitignoreto excludedist/,dist-test/, and*.tsbuildinfoImplementation Details
The migration maintains full test coverage while modernizing the toolchain. TypeScript project references ensure proper compilation order and incremental builds. The test import path was updated to reference the compiled output (
../dist/path) rather than the source.https://claude.ai/code/session_012dToG4AUYryeoDwpaR7dV2