Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FUTURE: deno install changes #23498

Merged
merged 32 commits into from May 8, 2024
Merged

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Apr 22, 2024

This PR implements the changes we plan to make to deno install in deno 2.0.

  • deno install without arguments caches dependencies from package.json / deno.json and sets up the node_modules folder
  • deno install <pkg> adds the package to the config file (either package.json or deno.json), i.e. it aliases deno add
  • deno add can also add deps to package.json (this is gated behind DENO_FUTURE due to uncertainty around handling projects with both deno.json and package.json)
  • deno install -g <bin> installs a package as a globally available binary (the same as deno install <bin> in 1.0)

@bartlomieju bartlomieju changed the title [WIP] FUTURE: deno install changes FUTURE: deno install changes [WIP] Apr 25, 2024
@nathanwhit nathanwhit force-pushed the deno_future_install branch 6 times, most recently from c707dc3 to a16ea92 Compare April 30, 2024 01:21
@nathanwhit nathanwhit changed the title FUTURE: deno install changes [WIP] FUTURE: deno install changes May 1, 2024
@nathanwhit nathanwhit requested a review from dsherret May 1, 2024 21:03
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Almost there.

cli/args/flags.rs Outdated Show resolved Hide resolved
cli/args/flags.rs Outdated Show resolved Hide resolved
cli/args/flags.rs Show resolved Hide resolved

flags.subcommand = DenoSubcommand::Install(InstallFlags {
// TODO(bartlomieju): remove once `deno install` supports both local and
// global installs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this todo still relevant?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it still applies, but the message is wrong - we want to keep the field for now so we can warn about the behavior change if the user doesn't pass --global. Updated to reflect that

cli/args/mod.rs Outdated Show resolved Hide resolved
cli/tools/registry/pm.rs Outdated Show resolved Hide resolved
tests/specs/install/future_install_global/__test__.jsonc Outdated Show resolved Hide resolved
tests/specs/install/future_install_global/main.out Outdated Show resolved Hide resolved
tests/specs/install/future_install_local_add_deno/main.out Outdated Show resolved Hide resolved
tests/specs/install/future_install_local_add_npm/main.out Outdated Show resolved Hide resolved
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

cli/tools/registry/pm.rs Show resolved Hide resolved
@nathanwhit nathanwhit merged commit 4e23a5b into denoland:main May 8, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants