feat: resolve core_version at install time instead of at runtime - #116
Open
marcalexiei wants to merge 2 commits into
Open
feat: resolve core_version at install time instead of at runtime#116marcalexiei wants to merge 2 commits into
core_version at install time instead of at runtime#116marcalexiei wants to merge 2 commits into
Conversation
marcalexiei
commented
Aug 15, 2026
Comment on lines
+7
to
+8
| // ci.yml runs `pnpm info`; knip reads the unknown subcommand as a binary. | ||
| "ignoreBinaries": ["info"] |
Contributor
Author
There was a problem hiding this comment.
Contributor
Author
|
Hi @martin-mfg, |
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.
core_versionat install time instead of at runtime #113core_versionis resolved at run time:index.jscallsnpm install --no-save --no-package-lockinto amkdtempdirectory and loads the resultthrough
createRequire+pathToFileURL.Change
The action resolves
core_versionat install time, andindex.jsdrops to a plainawait import().An invalid input now fails before any of our code runs; it is validated and passed via env, never interpolated.
Core has to leave the lockfile before it can be re-resolved:
pnpm addalone returns thelocked version whenever it satisfies the spec, so
v2would reinstall the pin.pnpm removewould delete and prune in one step, but it reinstalls the devDependencies--prodskipped.The frozen install always runs first, so only core's subtree can move.
Diffing the resolved prod tree against a plain frozen install,
2.1.3is identical andv2/latest/2.1differ only in core itself.