Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3cbd577
fix(git): strip GIT environs when running git
isaacs Jul 2, 2019
429226a
lru-cache@5.1.1
isaacs Jul 1, 2019
175670e
npm-registry-fetch@3.9.1
isaacs Jul 2, 2019
0d0517f
call-limit@1.1.1
isaacs Jul 2, 2019
7414004
glob@7.1.4
isaacs Jul 2, 2019
bddd60e
inherits@2.0.4
isaacs Jul 2, 2019
4acf03f
libnpmsearch@2.0.1
isaacs Jul 2, 2019
c2bd172
marked@0.6.3
isaacs Jul 2, 2019
7f0221b
marked-man@0.6.0
isaacs Jul 2, 2019
f458fe7
npm-lifecycle@2.1.1
isaacs Jul 2, 2019
0097529
node-gyp@4.0.0
isaacs Jul 2, 2019
0fa2bb4
query-string@6.8.1
isaacs Jul 2, 2019
b864509
tar-stream@2.1.0
isaacs Jul 2, 2019
25db00f
worker-farm@1.7.0
isaacs Jul 2, 2019
8dfbe86
readable-stream@3.4.0
isaacs Jul 2, 2019
a81a8c4
install: improve isOnly(Dev,Optional)
larsgw Jul 1, 2019
172f9ac
fix-xmas-underline
raywu0123 Mar 22, 2019
027742e
mailmap: Fix 'isaacs' for the gen-changelog script
isaacs Jul 2, 2019
3013a2d
doc: changelog for 6.10.1
isaacs Jul 2, 2019
900e8f6
update AUTHORS
Jul 3, 2019
08e0fa6
6.10.1-next.0
Jul 3, 2019
f6164d5
chownr@1.1.2
isaacs Jul 3, 2019
a7f1665
docs: add chownr@1.1.2 to 6.10.1 changelog
isaacs Jul 3, 2019
61b2beb
update AUTHORS
isaacs Jul 3, 2019
c2a4aed
6.10.1-next.1
isaacs Jul 3, 2019
ef4445a
node-gyp@5.0.2
Jul 9, 2019
c0d6113
npm-lifecycle@3.0.0
Jul 10, 2019
7716ba9
libcipm@4.0.0
Jul 10, 2019
42d22e8
libnpm@3.0.0
Jul 10, 2019
a2ea7f9
semver@5.7.0
Jul 10, 2019
f52673f
build: use /usr/bin/env to load bash
rsmarples Jul 10, 2019
7c92800
Replace var with const for unbuild.js
RobertJGabriel Jul 10, 2019
ff5458a
Replaced var with const for root.js
RobertJGabriel Jul 10, 2019
1db001f
docs: changelog for 6.10.1
Jul 10, 2019
6ec8233
update AUTHORS
Jul 10, 2019
9a693d0
6.10.1-next.2
Jul 10, 2019
5f0064d
doc: update semver documentation
isaacs Jul 11, 2019
ba7f146
6.10.1
isaacs Jul 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Geoff Flarity <geoff.flarity@gmail.com> <gflarity@raptvm-x02.(none)>
Gregers Gram Rygg <gregers.gram.rygg@finn.no>
Ifeanyi Oraelosi <ifeanyioraelosi@gmail.com>
Isaac Z. Schlueter <i@izs.me> <i@foohack.com>
Isaac Z. Schlueter <i@izs.me> isaacs <i@izs.me>
Isaac Z. Schlueter <i@izs.me>
isaacs <i@izs.me>
Jake Verbaten <raynos2@gmail.com>
James Sanders <jimmyjazz14@gmail.com>
James Treworgy <jamietre@gmail.com>
Expand Down
7 changes: 7 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Authors sorted by whether or not they're me
Isaac Z. Schlueter <i@izs.me>
isaacs <i@izs.me>
Steve Steiner <ssteinerX@gmail.com>
Mikeal Rogers <mikeal.rogers@gmail.com>
Aaron Blohowiak <aaron.blohowiak@gmail.com>
Expand Down Expand Up @@ -641,3 +642,9 @@ COURIER, CALEB [AG/1000] <caleb.courier@monsanto.com>
CalebCourier <caleb.courier@monsanto.com>
Florian Keller <florian.keller@wire.com>
Sreeram Jayan <sreeram.jayan@cerner.com>
--get <lars.willighagen@gmail.com>
raywu0123 <b05901189@ntu.edu.tw>
isaacs <nope@not.real>
Iván Reinoso García <ireinoso@plainconcepts.com>
Roy Marples <roy@marples.name>
Robert James Gabriel <robert_gabriel@outlook.com>
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
## v6.10.1 (2019-07-11):

### BUGFIXES

* [`3cbd57712`](https://github.com/npm/cli/commit/3cbd577120a9da6e51bb8b13534d1bf71ea5712c)
fix(git): strip GIT environs when running git
([@isaacs](https://github.com/isaacs))
* [`a81a8c4c4`](https://github.com/npm/cli/commit/a81a8c4c466f510215a51cef1bb08544d11844fe)
[#206](https://github.com/npm/cli/pull/206) improve isOnly(Dev,Optional)
([@larsgw](https://github.com/larsgw))
* [`172f9aca6`](https://github.com/npm/cli/commit/172f9aca67a66ee303c17f90a994cd52fc66552a)
[#179](https://github.com/npm/cli/pull/179) fix-xmas-underline
([@raywu0123](https://github.com/raywu0123))
* [`f52673fc7`](https://github.com/npm/cli/commit/f52673fc7284e58af8c04533e82b76bf7add72cf)
[#212](https://github.com/npm/cli/pull/212) build: use `/usr/bin/env` to
load bash ([@rsmarples](https://github.com/rsmarples))

### DEPENDENCIES

* [`ef4445ad3`](https://github.com/npm/cli/commit/ef4445ad34a53b5639499c8e3c9752f62ee6f37c)
[#208](https://github.com/npm/cli/pull/208) `node-gyp@5.0.2`
([@irega](https://github.com/irega))
* [`c0d611356`](https://github.com/npm/cli/commit/c0d611356f7b23077e97574b01c8886e544db425)
`npm-lifecycle@3.0.0` ([@isaacs](https://github.com/isaacs))
* [`7716ba972`](https://github.com/npm/cli/commit/7716ba9720270d5b780755a5bb1ce79702067f1f)
`libcipm@4.0.0` ([@isaacs](https://github.com/isaacs))
* [`42d22e837`](https://github.com/npm/cli/commit/42d22e8374c7d303d94e405d7385d94dd2558814)
`libnpm@3.0.0` ([@isaacs](https://github.com/isaacs))
* [`a2ea7f9ff`](https://github.com/npm/cli/commit/a2ea7f9ff64ae743d05fdbf7d46fb9afafa8aa6f)
`semver@5.7.0` ([@isaacs](https://github.com/isaacs))
* [`429226a5e`](https://github.com/npm/cli/commit/429226a5e992cd907d4f19bd738037007cf78c1f)
`lru-cache@5.1.1` ([@isaacs](https://github.com/isaacs))
* [`175670ea6`](https://github.com/npm/cli/commit/175670ea65cca03f8b2e957df3dd4b8b0efd0e1f)
`npm-registry-fetch@3.9.1`: ([@isaacs](https://github.com/isaacs))
* [`0d0517f7f`](https://github.com/npm/cli/commit/0d0517f7f8c902b5064ac18fb4015b31750ad2b2)
`call-limit@1.1.1` ([@isaacs](https://github.com/isaacs))
* [`741400429`](https://github.com/npm/cli/commit/74140042917ea241062a812ceb65c5423c2bafa9)
`glob@7.1.4` ([@isaacs](https://github.com/isaacs))
* [`bddd60e30`](https://github.com/npm/cli/commit/bddd60e302283a4a70d35f8f742e42bd13f4dabf)
`inherits@2.0.4` ([@isaacs](https://github.com/isaacs))
* [`4acf03fd1`](https://github.com/npm/cli/commit/4acf03fd140ed3ddb2dcf3fdc9756bc3f5a8bcbb)
`libnpmsearch@2.0.1` ([@isaacs](https://github.com/isaacs))
* [`c2bd17291`](https://github.com/npm/cli/commit/c2bd17291a86bea7ced2fbd07d66d013bd7a7560)
`marked@0.6.3` ([@isaacs](https://github.com/isaacs))
* [`7f0221bb1`](https://github.com/npm/cli/commit/7f0221bb1bb41ffc933c785940e227feae38c80c)
`marked-man@0.6.0` ([@isaacs](https://github.com/isaacs))
* [`f458fe7dd`](https://github.com/npm/cli/commit/f458fe7dd3bebddf603aaae183a424ea8aaa018f)
`npm-lifecycle@2.1.1` ([@isaacs](https://github.com/isaacs))
* [`009752978`](https://github.com/npm/cli/commit/0097529780269c28444f1efa0d7c131d47a933eb)
`node-gyp@4.0.0` ([@isaacs](https://github.com/isaacs))
* [`0fa2bb438`](https://github.com/npm/cli/commit/0fa2bb4386379d6e9d8c95db08662ec0529964f9)
`query-string@6.8.1` ([@isaacs](https://github.com/isaacs))
* [`b86450929`](https://github.com/npm/cli/commit/b86450929796950a1fe4b1f9b02b1634c812f3bb)
`tar-stream@2.1.0` ([@isaacs](https://github.com/isaacs))
* [`25db00fe9`](https://github.com/npm/cli/commit/25db00fe953453198adb9e1bd71d1bc2a9f04aaa)
`worker-farm@1.7.0` ([@isaacs](https://github.com/isaacs))
* [`8dfbe8610`](https://github.com/npm/cli/commit/8dfbe861085dfa8fa56bb504b4a00fba04c34f9d)
`readable-stream@3.4.0` ([@isaacs](https://github.com/isaacs))
* [`f6164d5dd`](https://github.com/npm/cli/commit/f6164d5ddd072eabdf2237f1694a31efd746eb1d)
[isaacs/chownr#21](https://github.com/isaacs/chownr/pull/21)
[isaacs/chownr#20](https://github.com/isaacs/chownr/issues/20)
[npm.community#7901](https://npm.community/t/7901/)
[npm.community#8203](https://npm.community/t/8203) `chownr@1.1.2` This
fixes an EISDIR error from cacache on Darwin in Node versions prior to
10.6. ([@isaacs](https://github.com/isaacs))

## v6.10.0 (2019-07-03):

### FEATURES
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# set configurations that will be "sticky" on this system,
# surviving npm self-updates.
Expand Down
16 changes: 14 additions & 2 deletions doc/misc/semver.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ semver.clean(' =v1.2.3 ') // '1.2.3'
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
semver.gt('1.2.3', '9.8.7') // false
semver.lt('1.2.3', '9.8.7') // true
semver.minVersion('>=1.0.0') // '1.0.0'
semver.valid(semver.coerce('v2')) // '2.0.0'
semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
```
Expand All @@ -29,7 +30,7 @@ As a command-line utility:
```
$ semver -h

A JavaScript implementation of the http://semver.org/ specification
A JavaScript implementation of the https://semver.org/ specification
Copyright Isaac Z. Schlueter

Usage: semver [options] <version> [<version> [...]]
Expand Down Expand Up @@ -71,7 +72,7 @@ multiple versions to the utility will just sort them.
## Versions

A "version" is described by the `v2.0.0` specification found at
<http://semver.org/>.
<https://semver.org/>.

A leading `"="` or `"v"` character is stripped off and ignored.

Expand Down Expand Up @@ -137,6 +138,13 @@ the user is indicating that they are aware of the risk. However, it
is still not appropriate to assume that they have opted into taking a
similar risk on the *next* set of prerelease versions.

Note that this behavior can be suppressed (treating all prerelease
versions as if they were normal versions, for the purpose of range
matching) by setting the `includePrerelease` flag on the options
object to any
[functions](https://github.com/npm/node-semver#functions) that do
range matching.

#### Prerelease Identifiers

The method `.inc` takes an additional `identifier` string argument that
Expand Down Expand Up @@ -325,6 +333,8 @@ strings that they parse.
* `patch(v)`: Return the patch version number.
* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
or comparators intersect.
* `parse(v)`: Attempt to parse a string as a semantic version, returning either
a `SemVer` object or `null`.

### Comparison

Expand Down Expand Up @@ -361,6 +371,8 @@ strings that they parse.
that satisfies the range, or `null` if none of them do.
* `minSatisfying(versions, range)`: Return the lowest version in the list
that satisfies the range, or `null` if none of them do.
* `minVersion(range)`: Return the lowest version that can possibly match
the given range.
* `gtr(version, range)`: Return `true` if version is greater than all the
versions possible in the range.
* `ltr(version, range)`: Return `true` if version is less than all the
Expand Down
3 changes: 2 additions & 1 deletion lib/fetch-package-metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ function andLogAndFinish (spec, tracker, done) {
}
}

const CACHE = require('lru-cache')({
const LRUCache = require('lru-cache')
const CACHE = new LRUCache({
max: 300 * 1024 * 1024,
length: (p) => p._contentLength
})
Expand Down
5 changes: 3 additions & 2 deletions lib/install/is-only-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ function andIsOnlyDev (name, seen) {
return isDev && !isProd
} else {
if (seen.has(req)) return true
seen = new Set(seen)
seen.add(req)
return isOnlyDev(req, seen)
const result = isOnlyDev(req, seen)
seen.delete(req)
return result
}
}
}
5 changes: 3 additions & 2 deletions lib/install/is-only-optional.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ function isOptional (node, seen) {
if (seen.has(node) || node.requiredBy.length === 0) {
return false
}
seen = new Set(seen)
seen.add(node)
const swOptional = node.fromShrinkwrap && node.package._optional
return node.requiredBy.every(function (req) {
const result = node.requiredBy.every(function (req) {
if (req.fakeChild && swOptional) return true
return isOptDep(req, moduleName(node)) || isOptional(req, seen)
})
seen.delete(node)
return result
}
4 changes: 2 additions & 2 deletions lib/root.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = root

var npm = require('./npm.js')
var output = require('./utils/output.js')
const npm = require('./npm.js')
const output = require('./utils/output.js')

root.usage = 'npm root [-g]'

Expand Down
50 changes: 25 additions & 25 deletions lib/unbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ module.exports = unbuild
module.exports.rmStuff = rmStuff
unbuild.usage = 'npm unbuild <folder>\n(this is plumbing)'

var readJson = require('read-package-json')
var gentlyRm = require('./utils/gently-rm.js')
var npm = require('./npm.js')
var path = require('path')
var isInside = require('path-is-inside')
var lifecycle = require('./utils/lifecycle.js')
var asyncMap = require('slide').asyncMap
var chain = require('slide').chain
var log = require('npmlog')
var build = require('./build.js')
var output = require('./utils/output.js')
const readJson = require('read-package-json')
const gentlyRm = require('./utils/gently-rm.js')
const npm = require('./npm.js')
const path = require('path')
const isInside = require('path-is-inside')
const lifecycle = require('./utils/lifecycle.js')
const asyncMap = require('slide').asyncMap
const chain = require('slide').chain
const log = require('npmlog')
const build = require('./build.js')
const output = require('./utils/output.js')

// args is a list of folders.
// remove any bins/etc, and then delete the folder.
Expand All @@ -30,7 +30,7 @@ function unbuild_ (silent) {
cb_(er, path.relative(npm.root, folder))
}
folder = path.resolve(folder)
var base = isInside(folder, npm.prefix) ? npm.prefix : folder
const base = isInside(folder, npm.prefix) ? npm.prefix : folder
delete build._didBuild[folder]
log.verbose('unbuild', folder.substr(npm.prefix.length + 1))
readJson(path.resolve(folder, 'package.json'), function (er, pkg) {
Expand Down Expand Up @@ -58,13 +58,13 @@ function rmStuff (pkg, folder, cb) {
// if it's global, and folder is in {prefix}/node_modules,
// then bins are in {prefix}/bin
// otherwise, then bins are in folder/../.bin
var dir = path.dirname(folder)
var scope = path.basename(dir)
var parent = scope.charAt(0) === '@' ? path.dirname(dir) : dir
var gnm = npm.dir
const dir = path.dirname(folder)
const scope = path.basename(dir)
const parent = scope.charAt(0) === '@' ? path.dirname(dir) : dir
const gnm = npm.dir
// gnm might be an absolute path, parent might be relative
// this checks they're the same directory regardless
var top = path.relative(gnm, parent) === ''
const top = path.relative(gnm, parent) === ''

log.verbose('unbuild rmStuff', pkg._id, 'from', gnm)
if (!top) log.verbose('unbuild rmStuff', 'in', parent)
Expand All @@ -75,7 +75,7 @@ function rmStuff (pkg, folder, cb) {

function rmBins (pkg, folder, parent, top, cb) {
if (!pkg.bin) return cb()
var binRoot = top ? npm.bin : path.resolve(parent, '.bin')
const binRoot = top ? npm.bin : path.resolve(parent, '.bin')
asyncMap(Object.keys(pkg.bin), function (b, cb) {
if (process.platform === 'win32') {
chain([ [gentlyRm, path.resolve(binRoot, b) + '.cmd', true, folder],
Expand All @@ -98,7 +98,7 @@ function rmMans (pkg, folder, parent, top, cb) {
!npm.config.get('global')) {
return cb()
}
var manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man')
const manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man')
log.verbose('rmMans', 'man files are', pkg.man, 'in', manRoot)
asyncMap(pkg.man, function (man, cb) {
if (Array.isArray(man)) {
Expand All @@ -109,7 +109,7 @@ function rmMans (pkg, folder, parent, top, cb) {

function rmMan (man) {
log.silly('rmMan', 'preparing to remove', man)
var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/)
const parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/)
if (!parseMan) {
log.error(
'rmMan', man, 'is not a valid name for a man file.',
Expand All @@ -119,11 +119,11 @@ function rmMans (pkg, folder, parent, top, cb) {
return cb()
}

var stem = parseMan[1]
var sxn = parseMan[2]
var gz = parseMan[3] || ''
var bn = path.basename(stem)
var manDest = path.join(
const stem = parseMan[1]
const sxn = parseMan[2]
const gz = parseMan[3] || ''
const bn = path.basename(stem)
const manDest = path.join(
manRoot,
'man' + sxn,
(bn.indexOf(pkg.name) === 0 ? bn : pkg.name + '-' + bn) + '.' + sxn + gz
Expand Down
10 changes: 10 additions & 0 deletions lib/utils/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ function execGit (args, options, cb) {

function spawnGit (args, options) {
log.info('git', args)
// If we're already in a git command (eg, running test as an exec
// line in an interactive rebase) then these environment variables
// will force git to operate on the current project, instead of
// checking out/fetching/etc. whatever the user actually intends.
options.env = options.env || Object.keys(process.env)
.filter(k => !/^GIT/.test(k))
.reduce((set, k) => {
set[k] = process.env[k]
return set
}, {})
return spawn(git, prefixGitArgs().concat(args || []), options)
}

Expand Down
4 changes: 3 additions & 1 deletion lib/xmas.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = function (args, cb) {
'\u0020', '\u0020', '\u0020', '\u0020', '\u0020', '\u0020',
'\u0020', '\u2E1B', '\u2042', '\u2E2E', '&', '@', '\uFF61'
]
var oc = [21, 33, 34, 35, 36, 37]
var oc = [33, 34, 35, 36, 37]
var l = '\u005e'

function w (s) { process.stderr.write(s) }
Expand All @@ -25,6 +25,7 @@ module.exports = function (args, cb) {
var O = L * 2 - 2
var S = (M - O) / 2
for (i = 0; i < S; i++) w(' ')
w(x + '\u001b[21m')
w(x + '\u001b[32m' + f)
for (i = 0; i < O; i++) {
w(
Expand All @@ -33,6 +34,7 @@ module.exports = function (args, cb) {
)
}
w(x + '\u001b[32m' + b + '\n')
w(x + '\u001b[0m')
}
w(' ')
for (i = 1; i < H; i++) w('\u001b[32m' + l)
Expand Down
25 changes: 0 additions & 25 deletions node_modules/block-stream/LICENCE

This file was deleted.

14 changes: 0 additions & 14 deletions node_modules/block-stream/README.md

This file was deleted.

Loading