This repository was archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix npm ls for filters on prerelease packages #12685
Closed
Closed
Conversation
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
fd8ded4 to
6df7239
Compare
Contributor
|
Love the tests, and the change looks sound. Could you add a few comments explaining what's going on in that chunk of the code so that in the future we know which pieces are being used for that ls, and why? I read #9436 and the tests, and it still took me a little while to understand the purpose of this patch. (Also, a little context in the commit message would be helpful.) Aside from that, LGTM. |
6df7239 to
7b31984
Compare
Contributor
Author
|
(for record-keeping, @othiym23 gave this a 🐑 on slack) |
7b31984 to
9e06eb8
Compare
Partially addresses a race condition that caused missing files during publish. Credit: @evanlucas PR-URL: npm/fstream#50
`fstream-npm` always includes NOTICE files now. Credit: @kemitchell PR-URL: npm/fstream-npm#17
Stop using `package` for a variable, which defeats some bundlers and linters. Credit: @adius PR-URL: npm/init-package-json#62
Node 6 build and buffer updates Credit: @calvinmetcalf
Fix for paths startin with ../ Credit: @isaacs
9e06eb8 to
ad022b2
Compare
If `ls` for a package without using a semver filter, for example, `npm ls foo` vs `[email protected]`, `ls` was using semver ranges based on `*`, which doesn't match prerelease versions. So, if you had installed a prerelease version (`[email protected]`), the `npm ls` will return no results for `foo`, at all. This patch bypasses the semver check entirely when there's no semver filter for the search. Fixes: #9436 Credit: @zkat PR-URL: #12685
ad022b2 to
6fde733
Compare
zkat
added a commit
that referenced
this pull request
May 19, 2016
If `ls` for a package without using a semver filter, for example, `npm ls foo` vs `[email protected]`, `ls` was using semver ranges based on `*`, which doesn't match prerelease versions. So, if you had installed a prerelease version (`[email protected]`), the `npm ls` will return no results for `foo`, at all. This patch bypasses the semver check entirely when there's no semver filter for the search. Fixes: #9436 Credit: @zkat PR-URL: #12685 Reviewed-By: @othiym23
Contributor
Author
|
@evanlucas I just didn't rebase and repush this branch properly -- The |
4 tasks
lukesampson
pushed a commit
to ScoopInstaller/Scoop
that referenced
this pull request
Jun 4, 2016
# Notable changes ## Notable changes * **buffer**: Ignore negative lengths in calls to `Buffer()` and `Buffer.allocUnsafe()`. This fixes a possible security concern (reported by Feross Aboukhadijeh) where user input is passed unchecked to the Buffer constructor or `allocUnsafe()` as it can expose parts of the memory slab used by other Buffers in the application. Note that negative lengths are not supported by the Buffer API and user input to the constructor should always be sanitised and type-checked. (Anna Henningsen) [#7051](nodejs/node#7051) * **npm**: Upgrade npm to 3.9.3 (Kat Marchán) [#7030](nodejs/node#7030) - [`npm/npm@42d71be`](npm/npm@42d71be) [npm/npm#12685](npm/npm#12685) When using `npm ls <pkg>` without a semver specifier, `npm ls` would skip any packages in your tree that matched by name, but had a prerelease version in their `package.json`. ([@zkat](https://github.com/zkat)) - [`npm/npm@f04e05`](npm/npm@df04e05) [npm/npm#10013](npm/npm#10013) `[email protected]`: Fixes an issue where `npm install` would fail if your `node_modules` was symlinked. ([@iarna](https://github.com/iarna)) - [`b894413`](npm/npm@b894413) [#12372](npm/npm#12372) Changing a nested dependency in an `npm-shrinkwrap.json` and then running `npm install` would not get up the updated package. This corrects that. ([@misterbyrne](https://github.com/misterbyrne)) - This release includes `[email protected]`, which is the result of our Windows testing push -- the test suite (should) pass on Windows now. We're working on getting AppVeyor to a place where we can just rely on it like Travis. * **tty**: Default to blocking mode for stdio on OS X. A bug fix in libuv 1.9.0, introduced in Node.js v6.0.0, exposed problems with Node's use of non-blocking stdio, particularly on OS X which has a small output buffer. This change should fix CLI applications that have been having problems with output since Node.js v6.0.0 on OS X. The core team is continuing to address stdio concerns that exist across supported platforms and progress can be tracked at <nodejs/node#6980>. (Jeremiah Senkpiel) [#6895](nodejs/node#6895) * **V8**: Upgrade to V8 5.0.71.52. This includes a fix that addresses problems experienced by users of node-inspector since Node.js v6.0.0, see <node-inspector/node-inspector#864> for details. (Michaël Zasso) [#6928](nodejs/node#6928)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
treat a plain package name in ls as a versionless match. This fixes #9436