deno icon indicating copy to clipboard operation
deno copied to clipboard

`deno install` and `deno add` online help missing required specifiers

Open kuchta opened this issue 1 year ago • 2 comments

Version: Deno 2.0.0

I suppose the specifiers haven't been required in the past, but now they are and so the examples are not correct.

kuchta avatar Oct 16 '24 08:10 kuchta

What do you mean with "online help"? I've checked our documentation on docs.deno.com but wasn't able to find a case where we were the deno install command is incorrect.

Can you share the link where you found the incorrect usage?

marvinhagemeister avatar Oct 16 '24 10:10 marvinhagemeister

It's unix terminology. Online help used to refer to built-in documentation deno <add | install> --help

: deno -h
Deno: A modern JavaScript and TypeScript runtime

Usage: deno [OPTIONS] [COMMAND]

Commands:
...
  Dependency management:
    add          Add dependencies
                  deno add @std/assert  |  deno add npm:express
...
: deno add -h
Add dependencies to your configuration file.
  deno add @std/path

You can add multiple dependencies at once:
  deno add @std/path @std/assert

Usage: deno add [OPTIONS] [packages]...

Arguments:
  [packages]...  List of packages to add

Options:
  -D, --dev    Add as a dev dependency
  -q, --quiet  Suppress diagnostic output
: deno install -h
Installs dependencies either in the local project or globally to a bin directory.

Local installation

Add dependencies to the local project's configuration (deno.json / package.json) and installs them
in the package cache. If no dependency is specified, installs all dependencies listed in the config file.
If the --entrypoint flag is passed, installs the dependencies of the specified entrypoint(s).

  deno install
  deno install @std/bytes
  deno install npm:chalk
  deno install --entrypoint entry1.ts entry2.ts
...

kuchta avatar Oct 16 '24 10:10 kuchta

Gotcha, in that case this is fixed in Deno 2.0.1. You can upgrade by running deno upgrade. PR that fixed it https://github.com/denoland/deno/pull/26318

marvinhagemeister avatar Oct 17 '24 09:10 marvinhagemeister

Super, looking forward 👏🏻

But unfortunately it seems like it's not available yet:

: deno upgrade                                                                                    10/17/2024 12:55:36 PM
Current Deno version: v2.0.0
Looking up stable version

Local deno version 2.0.0 is the most recent release

kuchta avatar Oct 17 '24 10:10 kuchta

Yeah we pulled 2.0.1 due to a regression, see https://github.com/denoland/deno/issues/26343 . We'll cut a new release shortly.

marvinhagemeister avatar Oct 17 '24 13:10 marvinhagemeister

@marvinhagemeister deno -h still references @std/assert without specifier.

kuchta avatar Oct 18 '24 07:10 kuchta

Thanks for pointing that out. Not sure how I missed that. Filed https://github.com/denoland/deno/pull/26380 for it.

marvinhagemeister avatar Oct 18 '24 07:10 marvinhagemeister