Skip to content

Target Node.js 18, expose options, gracefully handle errors#7

Open
tommy-mitchell wants to merge 2 commits intosindresorhus:mainfrom
tommy-mitchell:feat/updates
Open

Target Node.js 18, expose options, gracefully handle errors#7
tommy-mitchell wants to merge 2 commits intosindresorhus:mainfrom
tommy-mitchell:feat/updates

Conversation

@tommy-mitchell
Copy link
Copy Markdown

@tommy-mitchell tommy-mitchell commented Feb 27, 2024

Adds --registry-url and --no-deprecated and handles package-json errors:

$ latest-version nnnope
✖ Package `nnnope` could not be found.
$ latest-version ava --range=next
✖ Version `next` for package `ava` could not be found.

Blocker: sindresorhus/package-json#82

Comment thread cli.js
Comment on lines +52 to +54
if (error instanceof PackageNotFoundError || error instanceof VersionNotFoundError) {
console.error(`${logSymbols.error} ${error.message}.`);
process.exitCode = 1;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Realized it's easier to just use the verbiage from package-json here - could maybe do a quick update on package-json-cli to do the same.

Comment thread test.js
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.

2 participants