fix(install): resolve package.json dependencies in global install#35135
Open
bartlomieju wants to merge 1 commit into
Open
fix(install): resolve package.json dependencies in global install#35135bartlomieju wants to merge 1 commit into
bartlomieju wants to merge 1 commit into
Conversation
Flatten dependencies from the entrypoint's closest package.json into the import map of the config that deno install --global copies into the per-binary directory, so bare specifiers keep resolving both while building the install graph and when running the installed command. Fixes #26412
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.
deno install --globalwith a local file entrypoint failed when the projectdeclared its dependencies in package.json: the installer copies the supplied
config (or an empty one) into a per-binary directory and builds and runs the
command with that config, so the project's package.json was never consulted
and bare specifiers errored with
Import "x" not a dependency.This flattens the dependencies of the entrypoint's closest package.json into
the copied config's import map, the same way workspace members are already
flattened there (#32057). Aliased npm and jsr dependencies map verbatim, and
subpath imports get a trailing-slash entry in the
npm:/pkg@req/form (thenpm:pkg@req/form is an opaque-path URL that subpaths cannot be URL-joinedonto). Non-registry dependencies (file:, workspace:, catalog:) are skipped
with a warning. Explicit import map entries and workspace member entries take
precedence.
Fixes #26412