fix: resolve bundled text assets relative to the require module - #14
Merged
Haleclipse merged 1 commit intoSep 10, 2026
Merged
Haleclipse merged 1 commit into
Haleclipse merged 1 commit into
Conversation
Contributor
Author
|
我又来啦!!!彗星佬 |
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.
Starting
@cometix/claude-code@2.1.261from a project directory fails withENOENTforloopAutonomousPreamble-5hfhrxrk.md, even though the file exists in the installed package. The runtime-path rewrite now emits relative paths, but the.md/.txtbranch passes them directly toreadFileSync, which resolves againstprocess.cwd().Resolve text paths through the module-scoped
require.resolve()before reading them, matching the resolver used for other require targets.#, and Unicode. Check execution from inside and outside the package, same-named files in the working directory, absolute text paths, and ordinary JSON loading.Validation:
GitHub Actions: Node 24 regression tests pass on both Windows and Ubuntu.
All four regression tests fail with
ENOENTbefore the fix and pass afterward on Windows / Node 24.18.0.An isolated copy of the installed
2.1.261package reproduces the error withnode <package>/cli.js --helpfrom an external directory. Replacing only its generated require shim makes the same command exit 0. The global installation was left unchanged.node --check scripts/esm-chunk-patch.mjs,node --check test/esm-text-assets.test.mjs, workflow YAML parsing, release verification shell syntax, andgit diff --checkpass.The full cross-platform release build was not run locally.