v3.7.0
Pre-releasev3.7.0 (2016-01-20):
Hi all! This week brings us some important performance improvements, support for git submodules(!) and a bunch of bug fixes.
PERFORMANCE
gauge, the module responsible for drawing npm's progress bars, had an embarrassing bug in its debounce implementation that resulted in it, on many systems, actually being slower than if it hadn't been debouncing. This was due to it destroying and then creating a timer object any time it got an update while waiting on its minimum update period to elapse. This only was a measurable slowdown when sending thousands of updates a second, but unfortunately parts of npm's logging do exactly that. This has been patched to eliminate that churn, and our testing shows the progress bar as being eliminated as a source of slow down.
Meanwhile, are-we-there-yet is the module that tracks just how complete our big asynchronous install process is. @STRML spent some time auditing its source and made a few smaller performance improvements to it. Most impactful was eliminating a bizarre bit of code that was both binding to AND closing over the current object. I don't have any explanation for how that crept in. =D
c680fa9npmlog@2.0.2: Neware-we-there-yetwith performance patches from @STRML. Newgaugewith timer churn performance patch. (@iarna)
We were also using lodash's cloneDeep on package.json data which is definitely overkill, seeing as package.json data has all the restrictions of being json. The fix for this is just swapping that out for something that does a pair of JSON.stringify/JSON.parse, which is distinctly more speedy.
NEW FEATURE: GIT SUBMODULE SUPPORT
Long, long requested– the referenced issue is from 2011– we're finally getting rudimentary git submodule support.
39dea9c#1876 Add support for git submodules in git remotes. This is a fairly simple approach, which does not leverage the git caching mechanism to cache submodules. It also doesn't provide a means to disable automatic initialization, e.g. via a setting in the.gitmodulesfile. (@gagern)
ROBUSTNESS
5dec02a#10347 There is an obscure feature that lets you monkey-patch npm when it starts up. If the module being required with this feature failed, it would previously just makenpmerror out– this reduces that to a warning. (@evanlucas)
BUG FIXES
9ab8b8d#10820 Fix a bug withnpm lswhere if you asked for ONLY production dependencies in output it would exclude dependencies that were BOTH production AND development dependencies. (@davidvgalbraith)6803fed#8982 Fix a bug where, under some circumstances, if you had a path that contained the name of a package being installed somewhere in it,npmwould incorrectly refuse to run lifecycle scripts. (@elvanja)3eae40b#9253 Fix a bug where, when running lifecycle scripts, if the Node.js binary you rannpmwith wasn't in yourPATH,npmwouldn't use it to run your scripts. (@segrey)61daa6a#11014 Fix a bug where runningrimraf node_modules/<package>followed bynpm rm --save <package>would fail.npmnow correctly removes the module from yourpackage.jsoneven though it doesn't exist on disk. (@davidvgalbraith)a605586#9679 Fix a bug wherenpm install --save git+https://…would save ahttps://url to yourpackage.jsonwhich was a problem becausenpmwouldn't then know that it was a git repo. (@gagern)bbdc700#10063 Fix a bug wherenpmwould change the order of array properties in thepackage.jsonfiles of dependencies.npmadds a bunch of stuff topackage.jsonfiles in yournode_modulesfolder for debugging and bookkeeping purposes. As a part of this process it sorts the object to reduce file churn when it does updates. This fixes a bug where the arrays in the object were also getting sorted. This wasn't a problem for properties thatnpmitself maintains, but is a problem for properties used by other packages. (@substack)
DOCS IMPROVEMENTS
2609a29#11273 Include an example of viewing package version history in thenpm viewdocumentation. (@vedatmahir)719ea9c#11272 Fix typographical issue innpm updatedocumentation. (@jonathanp)cb9df5a#11215 Do not callSEE LICENSE IN <filename>an SPDX expression, as it's not. (@kemitchell)f427934#11196 Correct thepackage.jsonexamples in thenpm updatedocumentation to actually be valid JSON and not just JavaScript object literals. (@s100)
DEPENDENCY UPDATES
a7b2407retry@0.9.0: New features and interface agnostic refactoring. (@tim-kos)220fc77request@2.69.0: A bunch of small bug fixes and module updates. (@simov)9e5c84fwhich@1.2.4: Updateisexeand fix bug inpathExt, in which files without extensions would sometimes be preferred to files with extensions on Windows, even though those without extensions aren't executable.pathExtis a list of extensions that are considered executable (exe, cmd, bat, com on Windows). (@isaacs)375b9c4rimraf@2.5.1: Minor doc formatting fixes. (@isaacs)ef1971elodash.clonedeep@4.0.2: Misc minor code cleanup. No functional changes. (@jdalton)