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

Handling of deprecated / hidden commands hydrate & prepare #624

Open
MikeMcC399 opened this issue Feb 1, 2025 · 1 comment
Open

Handling of deprecated / hidden commands hydrate & prepare #624

MikeMcC399 opened this issue Feb 1, 2025 · 1 comment

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Feb 1, 2025

Issue

These commands:

  1. are not documented in the README
  2. have no migration guide to their replacement commands
  3. do not appear in the output of corepack --help
  4. are described in the output of corepack hydrate --help and corepack prepare --help
  5. neither their usage, nor their help text indicates that the commands are deprecated

Several issues lately have shown users reporting problems when executing corepack prepare.

corepack prepare is listed as a valid command in Node.js documentation Corepack latest v18. (Node.js v20, v22 & v23 describe instead corepack use / corepack install.)

Suggestion

  1. Describe the above commands as deprecated and either add the a migration table from RFC: New command names (and alias the old ones) #274 to the README or create a separate Migration Guide document. Edit: the migration table in the PR contains inaccuracies and cannot be used as it stands.
  2. Extend the help text for the commands to indicate that they are deprecated.
  3. Output a deprecation warning if deprecated commands are used.

Also review Node.js documentation Corepack latest v18 and initiate an update if possible.

@MikeMcC399
Copy link
Contributor Author

I would like to submit a PR to add a migration table to the README. As a first pass to creating the table it would look like this:

Deprecated command Replacement command
corepack hydrate path/to/archive.tgz corepack install -g --cache-only path/to/archive.tgz
corepack hydrate path/to/archive.tgz --activate corepack install -g path/to/archive.tgz
corepack prepare [email protected] corepack install -g --cache-only [email protected]
corepack prepare [email protected] --activate corepack install -g [email protected]
corepack prepare -o ... corepack pack -o ...

Is this something that maintainers would welcome to have added to the README?

For consistency, --cache-only should probably also be added to the corepack install <-g,--global> [... name[@]] section as an option as well.

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

No branches or pull requests

1 participant