-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix(view): error on missing version #5035
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
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
19e125e
Fixed bug in "npm show"
lukaskuhn-lku d8afc9f
Update lib/commands/view.js
lukaskuhn-lku ad11084
fixed linting errors
lukaskuhn-lku 2abbd4d
added check if versions exist
lukaskuhn-lku 66c4396
Merge branch 'latest' of https://github.com/lukaskuhn-lku/npm.cli int…
lukaskuhn-lku 8653b05
changed to check for latest
lukaskuhn-lku 39df374
Update lib/commands/view.js
lukaskuhn-lku 10fadbc
Changed double quotes to singles
lukaskuhn-lku 7674df2
Delete 2022-06-12T19_00_57_659Z-debug-0.log
lukaskuhn-lku 6739ae7
Delete 2022-06-12T19_00_57_809Z-debug-0.log
lukaskuhn-lku 3f42901
Delete package.json
lukaskuhn-lku 6754d60
Delete package.json
lukaskuhn-lku 367beb4
changed space for linting
lukaskuhn-lku 9ee8be7
added test coverage for the bug fix
lukaskuhn-lku 3f19aeb
fixup! added test coverage for the bug fix
wraithgar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ const packument = (nv, opts) => { | |
}, | ||
}, | ||
blue: { | ||
_id: 'blue', | ||
name: 'blue', | ||
'dist-tags': { | ||
latest: '1.0.0', | ||
|
@@ -464,6 +465,14 @@ t.test('throws when unpublished', async t => { | |
) | ||
}) | ||
|
||
t.test('throws when version not matched', async t => { | ||
const { npm } = await loadMockNpm(t) | ||
await t.rejects( | ||
npm.exec('view', ['[email protected]']), | ||
{ code: 'E404', pkgid: '[email protected]', message: 'No match found for version 2.0.0' } | ||
) | ||
}) | ||
|
||
t.test('workspaces', async t => { | ||
const prefixDir = { | ||
'package.json': JSON.stringify({ | ||
|
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.
Uh oh!
There was an error while loading. Please reload this page.