Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -655,3 +655,4 @@ gall0ws <g4ll0ws@gmail.com>
Olivier Chevet <olivr70@outlook.fr>
Maël Nison <nison.mael@gmail.com>
Sara Ahbabou <ahbabousara@gmail.com>
Gareth Jones <Jones258@Gmail.com>
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
## 6.11.3 (2019-09-03):

Fix npm ci regressions and npm outdated depth.

### BUG FIXES

* [`235ed1d28`](https://github.com/npm/cli/commit/235ed1d2838ef302bb995e183980209d16c51b9b)
[#239](https://github.com/npm/cli/pull/239)
Don't override user specified depth in outdated
Restores ability to update packages using `--depth` as suggested by `npm audit`.
([@G-Rath](https://github.com/G-Rath))
* [`1fafb5151`](https://github.com/npm/cli/commit/1fafb51513466cd793866b576dfea9a8963a3335)
[#242](https://github.com/npm/cli/pull/242)
[npm.community#9586](https://npm.community/t/6-11-1-some-dependencies-are-no-longer-being-installed/9586/4)
Revert "install: do not descend into directory deps' child modules"
([@isaacs](https://github.com/isaacs))
* [`cebf542e6`](https://github.com/npm/cli/commit/cebf542e61dcabdd2bd3b876272bf8eebf7d01cc)
[#243](https://github.com/npm/cli/pull/243)
[npm.community#9720](https://npm.community/t/6-11-2-npm-ci-installs-package-with-wrong-permissions/9720)
ci: pass appropriate configs for file/dir modes
([@isaacs](https://github.com/isaacs))

### DEPENDENCIES

* [`e5fbb7ed1`](https://github.com/npm/cli/commit/e5fbb7ed1fc7ef5c6ca4790e2d0dc441e0ac1596)
`read-cmd-shim@1.0.4`
([@claudiahdz](https://github.com/claudiahdz))
* [`23ce65616`](https://github.com/npm/cli/commit/23ce65616c550647c586f7babc3c2f60115af2aa)
`npm-pick-manifest@3.0.2`
([@claudiahdz](https://github.com/claudiahdz))

## 6.11.2 (2019-08-22):

Fix a recent Windows regression, and two long-standing Windows bugs. Also,
Expand Down
26 changes: 23 additions & 3 deletions lib/ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,42 @@

const npm = require('./npm.js')
const Installer = require('libcipm')
const npmlog = require('npmlog')
const log = require('npmlog')
const path = require('path')

ci.usage = 'npm ci'

ci.completion = (cb) => cb(null, [])

module.exports = ci
function ci (args, cb) {
const opts = Object.create({ log: npmlog })
const opts = {
// Add some non-npm-config opts by hand.
cache: path.join(npm.config.get('cache'), '_cacache'),
// NOTE: npm has some magic logic around color distinct from the config
// value, so we have to override it here
color: !!npm.color,
hashAlgorithm: 'sha1',
includeDeprecated: false,
log,
'npm-session': npm.session,
'project-scope': npm.projectScope,
refer: npm.referer,
dmode: npm.modes.exec,
fmode: npm.modes.file,
umask: npm.modes.umask,
npmVersion: npm.version,
tmp: npm.tmp
}

for (const key in npm.config.list[0]) {
if (key !== 'log') {
opts[key] = npm.config.list[0][key]
}
}

return new Installer(opts).run().then(details => {
npmlog.disableProgress()
log.disableProgress()
console.log(`added ${details.pkgCount} packages in ${
details.runTime / 1000
}s`)
Expand Down
2 changes: 1 addition & 1 deletion lib/config/figgy-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const npm = require('../npm.js')
const pack = require('../pack.js')
const path = require('path')

const npmSession = crypto.randomBytes(8).toString('hex')
const npmSession = npm.session = crypto.randomBytes(8).toString('hex')
log.verbose('npm-session', npmSession)

const SCOPE_REGISTRY_REGEX = /@.*:registry$/gi
Expand Down
20 changes: 6 additions & 14 deletions lib/install/inflate-shrinkwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,8 @@ function inflateShrinkwrap (topPath, tree, swdeps, opts) {

return BB.each(Object.keys(swdeps), (name) => {
const sw = swdeps[name]
const dependencies = sw.dependencies || {}
const requested = realizeShrinkwrapSpecifier(name, sw, topPath)
// We should not muck about in the node_modules folder of
// symlinked packages. Treat its dependencies as if they
// were empty, since it's none of our business.
const dependencies = requested.type === 'directory' ? {}
: sw.dependencies || {}
return inflatableChild(
onDisk[name], name, topPath, tree, sw, requested, opts
).then((child) => {
Expand Down Expand Up @@ -145,10 +141,6 @@ function isGit (sw) {
}

function makeFakeChild (name, topPath, tree, sw, requested) {
// We should not muck about in the node_modules folder of
// symlinked packages. Treat its dependencies as if they
// were empty, since it's none of our business.
const isDirectory = requested.type === 'directory'
const from = sw.from || requested.raw
const pkg = {
name: name,
Expand All @@ -164,7 +156,7 @@ function makeFakeChild (name, topPath, tree, sw, requested) {
_spec: requested.rawSpec,
_where: topPath,
_args: [[requested.toString(), topPath]],
dependencies: isDirectory ? {} : sw.requires
dependencies: sw.requires
}

if (!sw.bundled) {
Expand All @@ -175,16 +167,16 @@ function makeFakeChild (name, topPath, tree, sw, requested) {
}
const child = createChild({
package: pkg,
loaded: isDirectory,
loaded: true,
parent: tree,
children: [],
fromShrinkwrap: requested,
fakeChild: sw,
fromBundle: sw.bundled ? tree.fromBundle || tree : null,
path: childPath(tree.path, pkg),
realpath: isDirectory ? requested.fetchSpec : childPath(tree.realpath, pkg),
realpath: requested.type === 'directory' ? requested.fetchSpec : childPath(tree.realpath, pkg),
location: (tree.location === '/' ? '' : tree.location + '/') + pkg.name,
isLink: isDirectory,
isLink: requested.type === 'directory',
isInLink: tree.isLink || tree.isInLink,
swRequires: sw.requires
})
Expand All @@ -203,7 +195,7 @@ function fetchChild (topPath, tree, sw, requested) {
var isLink = pkg._requested.type === 'directory'
const child = createChild({
package: pkg,
loaded: isLink,
loaded: false,
parent: tree,
fromShrinkwrap: requested,
path: childPath(tree.path, pkg),
Expand Down
2 changes: 1 addition & 1 deletion lib/outdated.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function outdated (args, silent, cb) {
var dir = path.resolve(npm.dir, '..')

// default depth for `outdated` is 0 (cf. `ls`)
if (opts.depth) opts = opts.concat({depth: 0})
if (opts.depth === Infinity) opts = opts.concat({depth: 0})

readPackageTree(dir, andComputeMetadata(function (er, tree) {
if (!tree) return cb(er)
Expand Down
67 changes: 41 additions & 26 deletions node_modules/npm-pick-manifest/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions node_modules/npm-pick-manifest/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions node_modules/npm-pick-manifest/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading