fix(cli): Support deno.lock with only package.json present + fix DENO_FUTURE install interactions with lockfile #23918
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.
Fixes #23571.
Previously, we required a
deno.json
to be present (or the--lock
flag) in order for us to resolve adeno.lock
file. This meant that if you were using deno in an npm-first project deno wouldn't use a lockfile.Additionally, while I was fixing that, I discovered there were a couple bugs keeping the future
install
command from using a lockfile.With this PR,
install
will actually resolve the lockfile (or create one if not present), and update it if it's not up-to-date. This also speeds updeno install
, as we can use the lockfile to skip work during npm resolution.