Fix Jest moduleNameMapper pattern order for @objectql/runtime resolution#182
Merged
hotlong merged 2 commits intocopilot/release-new-versionfrom Jan 24, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Check action job status in objectql
Fix Jest moduleNameMapper pattern order for @objectql/runtime resolution
Jan 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Jest module resolution for @objectql/runtime in the @objectql/core package so that core test suites can run against the in-repo runtime implementation instead of a non-existent path.
Changes:
- Added a specific
moduleNameMapperentry for^@objectql/runtime$pointing topackages/objectstack/runtime/src. - Ordered the specific
@objectql/runtimepattern before the generic^@objectql/(.*)$mapper to ensure correct matching precedence. - Removed the outdated mapping to a non-existent mock file under
test/__mocks__/@objectql/runtime.ts.
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.
Jest test suites in
@objectql/corefailed to run due to module resolution error:@objectql/runtimewas being mapped to the non-existentpackages/foundation/runtime/srcinstead ofpackages/objectstack/runtime/src.Changes
Pattern matching order in moduleNameMapper:
@objectql/runtimepattern before generic@objectql/(.*)pattern../../objectstack/runtime/srcmoduleNameMapper: { + '^@objectql/runtime$': '<rootDir>/../../objectstack/runtime/src', '^@objectql/(.*)$': '<rootDir>/../$1/src', - '^@objectql/runtime$': '<rootDir>/test/__mocks__/@objectql/runtime.ts', },The generic pattern was matching first and mapping
@objectql/runtimetopackages/foundation/runtime/src(doesn't exist). More specific patterns must precede general ones in Jest's moduleNameMapper.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
fonts.googleapis.com/usr/local/bin/node node /home/REDACTED/work/objectql/objectql/apps/site/node_modules/.bin/../next/dist/bin/next build(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.