jest-runtime - enable independent usage with build, test, and lint scripts #15914
+5
−0
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 :
Added build, test, and lint scripts to the package.json of jest-runtime to streamline development and make the package usable independently outside the Jest monorepo. Updated all workspace .
Motivation :
Previously, jest-runtime was tightly coupled to the Jest monorepo using workspace:* dependencies and lacked development scripts. This made it difficult for developers to use or contribute to the package independently. Adding scripts for build, test, and lint, and replacing workspace dependencies with versioned packages, resolves this limitation and provides a ready-to-use, publishable setup.
Test Plan :
Build Script:
Ran npm run build and verified that ./build/index.js and index.d.ts are generated correctly.
Test Script:
Ran npm test and confirmed all Jest tests execute without errors.
Lint Script:
Ran npm run lint on the src directory and confirmed ESLint detects no critical issues.
Dependency Verification:
Installed the package in a fresh project to ensure all dependencies resolve correctly and the package works independently from the monorepo.
Node Version Compliance:
Verified the package runs successfully on Node versions >=18.14.0.