diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dd8d3f8..ca553bfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ### [Check compatibility with Neard](https://github.com/crazy-max/neard/wiki/binNode.js#latest) before downloading. +## r6 (2016/10/11) + +* New bundles : 0.10.47, 0.12.16, 4.6.0, 5.12.0, 6.7.0 + ## r5 (2016/06/20) * New bundles : 4.4.5, 6.2.2 diff --git a/bin/nodejs0.10.47/etc/.npmignore b/bin/nodejs0.10.47/etc/.npmignore new file mode 100644 index 00000000..d3f5a12f --- /dev/null +++ b/bin/nodejs0.10.47/etc/.npmignore @@ -0,0 +1 @@ + diff --git a/bin/nodejs0.10.47/etc/npmrc b/bin/nodejs0.10.47/etc/npmrc new file mode 100644 index 00000000..bd37b32b --- /dev/null +++ b/bin/nodejs0.10.47/etc/npmrc @@ -0,0 +1,5 @@ +cache = ~NEARD_WIN_PATH~\tmp\npm-cache +globalconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.10.47\etc\npmrc +globalignorefile = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.10.47\etc\.npmignore +init-module = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.10.47\etc\.npm-init.js +userconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.10.47\etc\npmrc diff --git a/bin/nodejs0.10.47/etc/npmrc.nrd b/bin/nodejs0.10.47/etc/npmrc.nrd new file mode 100644 index 00000000..bd37b32b --- /dev/null +++ b/bin/nodejs0.10.47/etc/npmrc.nrd @@ -0,0 +1,5 @@ +cache = ~NEARD_WIN_PATH~\tmp\npm-cache +globalconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.10.47\etc\npmrc +globalignorefile = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.10.47\etc\.npmignore +init-module = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.10.47\etc\.npm-init.js +userconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.10.47\etc\npmrc diff --git a/bin/nodejs0.10.47/launch.bat b/bin/nodejs0.10.47/launch.bat new file mode 100644 index 00000000..62238ad6 --- /dev/null +++ b/bin/nodejs0.10.47/launch.bat @@ -0,0 +1,12 @@ +@ECHO OFF +SETLOCAL EnableDelayedExpansion + +SET NEARD_NODEJS_PATH=%~dp0 +SET NEARD_NODEJS_PATH=!NEARD_NODEJS_PATH:~0,-1! +SET NEARD_NODEJS_NPM_PATH=%NEARD_NODEJS_PATH%\node_modules\npm +SET NEARD_NODEJS_CONFIG_PATH=%NEARD_NODEJS_NPM_PATH%\npmrc +ECHO prefix = %NEARD_NODEJS_PATH%>%NEARD_NODEJS_CONFIG_PATH% + +"%NEARD_NODEJS_PATH%\nodevars.bat" & "%NEARD_NODEJS_PATH%\npm" config set globalconfig "%NEARD_NODEJS_CONFIG_PATH%" --global + +ENDLOCAL \ No newline at end of file diff --git a/bin/nodejs0.10.47/neard.conf b/bin/nodejs0.10.47/neard.conf new file mode 100644 index 00000000..c0eb32db --- /dev/null +++ b/bin/nodejs0.10.47/neard.conf @@ -0,0 +1,8 @@ +nodejsVersion = "0.10.47" +nodejsExe = "node.exe" +nodejsVars = "nodevars.bat" +nodejsNpm = "npm.cmd" +nodejsLaunch = "launch.bat" +nodejsConf = "node_modules/npm/npmrc" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/nodejs0.10.47/node.exe b/bin/nodejs0.10.47/node.exe new file mode 100644 index 00000000..ab4f1279 Binary files /dev/null and b/bin/nodejs0.10.47/node.exe differ diff --git a/bin/nodejs0.10.47/node_etw_provider.man b/bin/nodejs0.10.47/node_etw_provider.man new file mode 100644 index 00000000..8b42f409 --- /dev/null +++ b/bin/nodejs0.10.47/node_etw_provider.man @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bin/nodejs0.10.47/node_modules/npm/.mailmap b/bin/nodejs0.10.47/node_modules/npm/.mailmap new file mode 100644 index 00000000..ae0b4d28 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/.mailmap @@ -0,0 +1,53 @@ +Alex K. Wolfe +Andrew Bradley +Andrew Lunny +Arlo Breault +Benjamin Coe +Benjamin Coe +Brian White +Cedric Nelson +Charlie Robbins +Dalmais Maxence +Danila Gerasimov +David Beitey +Domenic Denicola +Einar Otto Stangvik +Erik Wienhold +Evan Lucas +Evan Lucas +Faiq Raza +Forbes Lindesay +Forrest L Norvell +Gabriel Barros +Geoff Flarity +Isaac Z. Schlueter +Isaac Z. Schlueter isaacs +Jake Verbaten +James Sanders +Jason Smith +Jonas Weber +Julien Meddah +Kris Windham +Lin Clark +Luke Arduini +Maciej Małecki +Max Goodman +Maxim Bogushevich +Maximilian Antoni +Michael Hayes +Nicolas Morel +Olivier Melcher +Ra'Shaun Stovall +Rebecca Turner +Rebecca Turner +Ryan Emery +Sam Mikes +Takaya Kobayashi +Timo Weiß +Tony +Trent Mick +Visnu Pitiyanuvath +Will Elwood +Wout Mertens +Yeonghoon Park +Zeke Sikelianos diff --git a/bin/nodejs0.10.47/node_modules/npm/.npmignore b/bin/nodejs0.10.47/node_modules/npm/.npmignore new file mode 100644 index 00000000..4bff9d51 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/.npmignore @@ -0,0 +1,30 @@ +*.swp +.*.swp +npm-debug.log +/test/bin +/test/output.log +/test/packages/*/node_modules +/test/packages/npm-test-depends-on-spark/which-spark.log +/test/packages/test-package/random-data.txt +/test/root +/test/npm_cache +node_modules/marked +node_modules/ronn +node_modules/tap +node_modules/.bin +node_modules/npm-registry-mock +/npmrc +/release/ + +# don't need these in the npm package. +html/*.png + +# don't ignore .npmignore files +# these are used in some tests. +!.npmignore + +/npm-*.tgz + +*.pyc + +/test/tap/builtin-config diff --git a/bin/nodejs0.10.47/node_modules/npm/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/.travis.yml new file mode 100644 index 00000000..16ecb2f3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/.travis.yml @@ -0,0 +1,18 @@ +language: node_js +sudo: false +node_js: + - "5" + - "4" + - iojs + - "0.12" + - "0.10" + - "0.8" +env: + - DEPLOY_VERSION=testing +before_install: + - "npm config set spin false" + - "npm install -g npm/npm#2.x" + - "mkdir -p /var/run/couchdb" +script: "npm test" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/bin/nodejs0.10.47/node_modules/npm/AUTHORS b/bin/nodejs0.10.47/node_modules/npm/AUTHORS new file mode 100644 index 00000000..71e081cc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/AUTHORS @@ -0,0 +1,357 @@ +# Authors sorted by whether or not they're me +Isaac Z. Schlueter +Steve Steiner +Mikeal Rogers +Aaron Blohowiak +Martyn Smith +Charlie Robbins +Francisco Treacy +Cliffano Subagio +Christian Eager +Dav Glass +Alex K. Wolfe +James Sanders +Reid Burke +Arlo Breault +Timo Derstappen +Bart Teeuwisse +Ben Noordhuis +Tor Valamo +Whyme.Lyu <5longluna@gmail.com> +Olivier Melcher +Tomaž Muraus +Evan Meagher +Orlando Vazquez +Kai Chen +George Miroshnykov +Geoff Flarity +Max Goodman +Pete Kruckenberg +Laurie Harper +Chris Wong +Scott Bronson +Federico Romero +Visnu Pitiyanuvath +Irakli Gozalishvili +Mark Cahill +Tony +Iain Sproat +Trent Mick +Felix Geisendörfer +Jameson Little +Conny Brunnkvist +Will Elwood +Dean Landolt +Oleg Efimov +Martin Cooper +Jann Horn +Andrew Bradley +Maciej Małecki +Stephen Sugden +Michael Budde +Jason Smith +Gautham Pai +David Trejo +Paul Vorbach +George Ornbo +Tim Oxley +Tyler Green +Dave Pacheco +Danila Gerasimov +Rod Vagg +Christian Howe +Andrew Lunny +Henrik Hodne +Adam Blackburn +Kris Windham +Jens Grunert +Joost-Wim Boekesteijn +Dalmais Maxence +Marcus Ekwall +Aaron Stacy +Phillip Howell +Domenic Denicola +James Halliday +Jeremy Cantrell +Ribettes +Don Park +Einar Otto Stangvik +Kei Son +Nicolas Morel +Mark Dube +Nathan Rajlich +Maxim Bogushevich +Meaglin +Ben Evans +Nathan Zadoks +Brian White +Jed Schmidt +Ian Livingstone +Patrick Pfeiffer +Paul Miller +Ryan Emery +Carl Lange +Jan Lehnardt +Stuart P. Bentley +Johan Sköld +Stuart Knightley +Niggler +Paolo Fragomeni +Jaakko Manninen +Luke Arduini +Larz Conwell +Marcel Klehr +Robert Kowalski +Forbes Lindesay +Vaz Allen +Jake Verbaten +Schabse Laks +Florian Margaine +Johan Nordberg +Ian Babrou +Di Wu +Mathias Bynens +Matt McClure +Matt Lunn +Alexey Kreschuk +elisee +Robert Gieseke +François Frisch +Trevor Burnham +Alan Shaw +TJ Holowaychuk +Nicholas Kinsey +Paulo Cesar +Elan Shanker +Jon Spencer +Jason Diamond +Maximilian Antoni +Thom Blake +Jess Martin +Spain Train +Alex Rodionov +Matt Colyer +Evan You +bitspill +Gabriel Falkenberg +Alexej Yaroshevich +Quim Calpe +Steve Mason +Wil Moore III +Sergey Belov +Tom Huang +CamilleM +Sébastien Santoro +Evan Lucas +Quinn Slack +Alex Kocharin +Daniel Santiago +Denis Gladkikh +Andrew Horton +Zeke Sikelianos +Dylan Greene +Franck Cuny +Yeonghoon Park +Rafael de Oleza +Mikola Lysenko +Yazhong Liu +Neil Gentleman +Kris Kowal +Alex Gorbatchev +Shawn Wildermuth +Wesley de Souza +yoyoyogi +J. Tangelder +Jean Lauliac +Andrey Kislyuk +Thorsten Lorenz +Julian Gruber +Benjamin Coe +Alex Ford +Matt Hickford +Sean McGivern +C J Silverio +Robin Tweedie +Miroslav Bajtoš +David Glasser +Gianluca Casati +Forrest L Norvell +Karsten Tinnefeld +Bryan Burgers +David Beitey +Evan You +Zach Pomerantz +Chris Williams +sudodoki +Mick Thompson +Felix Rabe +Michael Hayes +Chris Dickinson +Bradley Meck +GeJ +Andrew Terris +Michael Nisi +fengmk2 +Adam Meadows +Chulki Lee +不四 +dead_horse +Kenan Yildirim +Laurie Voss +Rebecca Turner +Hunter Loftis +Peter Richardson +Jussi Kalliokoski +Filip Weiss +Timo Weiß +Christopher Hiller +Jérémy Lal +Anders Janmyr +Chris Meyers +Ludwig Magnusson +Wout Mertens +Nick Santos +Terin Stock +Faiq Raza +Thomas Torp +Sam Mikes +Mat Tyndall +Tauren Mills +Ron Martinez +Kazuhito Hokamura +Tristan Davies +David Volm +Lin Clark +Ben Page +Jeff Jo +martinvd +Mark J. Titorenko +Oddur Sigurdsson +Eric Mill +Gabriel Barros +KevinSheedy +Aleksey Smolenchuk +Ed Morley +Blaine Bublitz +Andrey Fedorov +Daijiro Wachi +Luc Thevenard +Aria Stewart +Charlie Rudolph +Vladimir Rutsky +Isaac Murchie +Marcin Wosinek +David Marr +Bryan English +Anthony Zotti +Karl Horky +Jordan Harband +Guðlaugur Stefán Egilsson +Helge Skogly Holm +Peter A. Shevtsov +Alain Kalker +Bryant Williams +Jonas Weber +Tim Whidden +Andreas +Karolis Narkevicius +Adrian Lynch +Richard Littauer +Oli Evans +Matt Brennan +Jeff Barczewski +Danny Fritz +Takaya Kobayashi +Ra'Shaun Stovall +Julien Meddah +Michiel Sikma +Jakob Krigovsky +Charmander <~@charmander.me> +Erik Wienhold +James Butler +Kevin Kragenbrink +Arnaud Rinquin +Mike MacCana +Antti Mattila +laiso +Matt Zorn +Kyle Mitchell +Jeremiah Senkpiel +Michael Klein +Simen Bekkhus +Victor +thefourtheye +Clay Carpenter +bangbang93 +Nick Malaguti +Cedric Nelson +Kat Marchán +Andrew +Eduardo Pinho +Rachel Hutchison +Ryan Temple +Eugene Sharygin +Nick Heiner +James Talmage +jane arc +Joseph Dykstra +Joshua Egan +Thomas Cort +Thaddee Tyl +Steve Klabnik +Andrew Murray +Stephan Bönnemann +Kyle M. Tarplee +Derek Peterson +Greg Whiteley +murgatroid99 +Marcin Cieslak +João Reis +Matthew Hasbach +Anna Henningsen +Jon Hall +James Hartig +snopeks +Jason Kurian +Juan Caicedo +Ashley Williams +Andrew Marcinkevičius +Jorrit Schippers +Alex Lukin +Aria Stewart +Tim +Nick Williams +Louis Larry +Jakub Gieryluk +Martin von Gagern +Eymen Gunay +ekmartin +Rafał Pocztarski +Ashley Williams +Mark Reeder +Tiago Rodrigues +Chris Rebert +Jeff McMahan +Scott Addie +Julian Simioni +Jimb Esser +Hal Henke +Alexis Campailla +Beau Gunderson +s100 +Jonathan Persson +Vedat Mahir YILMAZ +Jan Schär +Xcat Liu +Neil Kistner +Hutson Betts +Sergey Simonchik +Lewis Cowper +Arturo Coronel +Scott Plumlee +gnerkus +Robert Ludwig +Adam Byrne +GriffinSchneider +doug.wade +rhgb diff --git a/bin/nodejs0.10.47/node_modules/npm/CHANGELOG.md b/bin/nodejs0.10.47/node_modules/npm/CHANGELOG.md new file mode 100644 index 00000000..5b5ad75e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/CHANGELOG.md @@ -0,0 +1,5260 @@ +### v2.15.1 (2016-03-17): + +It's another one of those releases again! Docs and tests, it turns out, have a +pretty easy time getting into LTS releases, and boring is exactly how LTS should +be. 💁 + +#### DOCS + +* [`981c89c`](https://github.com/npm/npm/commit/981c89c8e398ca22ab6bf466123b25728ef6f543) + [#11820](https://github.com/npm/npm/pull/11820) + The basic explanation for how `npm link` works was a bit confusing, and + somewhat incorrect. It should be clearer now. + ([@rhgb](https://github.com/rhgb)) +* [`35b2b45`](https://github.com/npm/npm/commit/35b2b45f181dcbfb297f53b577dc1f26efcf3aba) + [#11787](https://github.com/npm/npm/pull/11787) + The `verison` alias for `npm version` no longer shows up in the command list + when you do `npm -h`. + ([@doug-wade](https://github.com/doug-wade)) +* [`1c9d00f`](https://github.com/npm/npm/commit/1c9d00f788298a81a8a7293d7dcf430f01bdd7fd) + [#11786](https://github.com/npm/npm/pull/11786) + Add a comment to the `npm-scope.md` docs about `npm@>=2` being required in + order to use scoped packaged. + ([@doug-wade](https://github.com/doug-wade)) +* [`7d64fb1`](https://github.com/npm/npm/commit/7d64fb1452d360aa736f31c85d6776ce570b2365) + [#11762](https://github.com/npm/npm/pull/11762) + Roll back patch that previously advised people to use `--depth Infinity` + instead of `--depth 9999`. Just keep using `--depth 9999`. + ([@GriffinSchneider](https://github.com/GriffinSchneider)) + +#### TESTS + +* [`98a9ee4`](https://github.com/npm/npm/commit/98a9ee4773f83994b8eb63c0ff75a9283408ba1a) + [#11912](https://github.com/npm/npm/pull/11912) + Did you know npm can install itself? `npm install -g npm` is the way to + upgrade! Turns out that one of the tests that verified this functionality got + rewritten as part of our recent push for better tests, and in the process + omitted a detail about *how* the test ran. We're testing that corner case + again, now, by moving the install folder to `/tmp`, where the original legacy + test ran. + ([@iarna](https://github.com/iarna)) + +### v2.15.0 (2016-03-10): + +#### WHY IS THIS SEMVER-MINOR I THOUGHT THIS WAS LTS + +A brief note about LTS this week! + +npm, as you may know if you're using this `2.x` branch, has an LTS process for +releases. We also try and play nice with [Node.js' own LTS release +process](https://github.com/nodejs/LTS#lts-plan). That means we generally try to +avoid things like minor version bumps on our `2.x` branch (which is also tagged +`lts` in the `dist-tag`s). + +That said, we had a minor-bump update recently for `npm@3.8.0` which added a +`maxsockets` option to allow users to configure the number of concurrent sockets +that npm would keep open at a time -- a setting that has the potential to help a +bunch for people with fussy routers or internet connections that aren't very +happy with Node.js applications' usual concurrency storm. This change was done +to `npm-registry-client`, which we don't have a parallel LTS-tracking branch +for. + +After talking it over, we ended up deciding that this was a reasonable enough +addition to LTS, even though it's *technically* a `semver-minor` bump, taking +into account both its potential for bugfixing (specially on `2.x`!) and the +general hassle it would be to maintain another branch for `npm-registry-client`. + + +* [`6dd61e7`](https://github.com/npm/npm/commit/6dd61e781c145480dc255a3e6a748729868443fd) + Expose `maxsockets` config setting from new `npm-registry-client`. + ([@misterbyrne](https://github.com/misterbyrne)) +* [`8a021c3`](https://github.com/npm/npm/commit/8a021c35184e665bd1f3f70ae2f478af812ab614) + `npm-registry-client@7.1.0`: + Adds support for configuring the max number of concurrent sockets, defaulting + to `50`. + ([@iarna](https://github.com/iarna)) + +#### DOC PATCH IS HERE TOO + +* [`0ae9f74`](https://github.com/npm/npm/commit/0ae9f740001a1bdf5920bc464cf9e284d5d139f0) + [#11748](https://github.com/npm/npm/pull/11748) + Add command aliases as a separate section in documentation for npm + subcommands. + ([@watilde](https://github.com/watilde)) + +#### DEP UPDATES + +* [`bfc3888`](https://github.com/npm/npm/commit/bfc38887f832f701c16b7ee410c4e0220a90399f) + `strip-ansi@3.0.1` + ([@jbnicolai](https://github.com/jbnicolai)) +* [`d5f4d51`](https://github.com/npm/npm/commit/d5f4d51a1b7ea78d7431c7ed4fed30200b2622f8) + `node-gyp@3.3.1`: Fixes Android generator + ([@bnoordhuis](https://github.com/bnoordhuis)) +* [`4119df8`](https://github.com/npm/npm/commit/4119df8aecd2ae57b0492ad8c9a480d900833008) + `glob@7.0.3`: Some path-related fixes for Windows. + ([@isaacs](https://github.com/isaacs)) + +### v2.14.22 (2016-03-03): + +This week is all documentation improvements. In case you hadn't noticed, we +*love* doc patches. We love them so much, we give socks away if you submit +documentation PRs! + +These folks are all getting socks if they ask for them. The socks are +super-sweet. Do you have yours yet? 👣 + +* [`3f3c7d0`](https://github.com/npm/npm/commit/3f3c7d080f052a5db91ff6091f8b1b13f26b53d6) + [#11441](https://github.com/npm/npm/pull/11441) + Add a link to the [Contribution + Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines) to the + main npm docs. + ([@watilde](https://github.com/watilde)) +* [`9f87bb1`](https://github.com/npm/npm/commit/9f87bb1934acb33b678c17b7827165b17c071a82) + [#11441](https://github.com/npm/npm/pull/11441) + Remove Google Group email from npm docs about contributing. + ([@watilde](https://github.com/watilde)) +* [`93eaab3`](https://github.com/npm/npm/commit/93eaab3ee5ad16c7d90d1a4b38a95403fcf3f0f6) + [#11474](https://github.com/npm/npm/pull/11474) + Fix an invalid JSON error overlooked in + [#11196](https://github.com/npm/npm/pull/11196). + ([@robludwig](https://github.com/robludwig)) +* [`a407ca2`](https://github.com/npm/npm/commit/a407ca2bcf6a05117e55cf2ab69376e09094995e) + [#11483](https://github.com/npm/npm/pull/11483) + Add more details and an example to the documentation for bundledDependencies. + ([@gnerkus](https://github.com/gnerkus)) +* [`2c851a2`](https://github.com/npm/npm/commit/2c851a231afd874baa77c42ea5ba539c454ac79c) + [#11490](https://github.com/npm/npm/pull/11490) + Document the `--registry` flag for `npm search`. + ([@plumlee](https://github.com/plumlee)) + +### v2.14.21 (2016-02-25): + +Good news, everyone! There's a new LTS release with a few shinies here and there! + +#### USE THIS ONE INSTEAD + +We had some cases where the versions of npm and node used in some scripting situations were different than the ideal, or what folks actually expected. These should be particularly helpful to our Windows friends! <3 + +* [`02813c5`](https://github.com/npm/npm/commit/02813c55782a9def23f7f1e614edc38c6c88aed3) [#9253](https://github.com/npm/npm/issues/9253) Fix a bug where, when running lifecycle scripts, if the Node.js binary you ran `npm` with wasn't in your `PATH`, `npm` wouldn't use it to run your scripts. ([@segrey](https://github.com/segrey) and [@narqo](https://github.com/narqo)) +* [`a985dd5`](https://github.com/npm/npm/commit/a985dd50e06ee51ba5544577f977c7440c227ba2) [#11526](https://github.com/npm/npm/pull/11526) Prefer locally installed npm in Git Bash -- previous behavior was to use the global one. This was done previously for other shells, but not for Git Bash. ([@destroyerofbuilds](https://github.com/destroyerofbuilds)) + +#### SOCKS FOR THE SOCK GOD + +* [`f961092`](https://github.com/npm/npm/commit/f9610920079d8b88ae464b30007a92c594bd85a8) + [#11636.](https://github.com/npm/npm/issues/11636.) + Document the `--save-bundle` option for `npm install`. + ([@datyayu](https://github.com/datyayu)) +* [`7c908b6`](https://github.com/npm/npm/commit/7c908b618f7123f0a3b860c71eb779e33df35964) + [#11644](https://github.com/npm/npm/pull/11644) + Add documentation for the `test` directory for packages. + ([@lewiscowper](https://github.com/lewiscowper)) + +#### INTERNAL TEST IMPROVEMENTS + +The npm CLI team's time recently has been sunk into npm's many years of tech debt. Specifically, we've been working on improving the test suite. This isn't user visible, but in future should mean a more stable, easier to contribute to npm. Ordinarily we don't report these kinds of changes in the change log, but I thought I might share this week as this chunk is bigger than usual. + +These patches were previously released for `npm@3`, and then ported back to `npm@2` LTS. + +* [`437c537`](https://github.com/npm/npm/commit/437c537e2be5923c6d2c2753154564ba13db8fd9) [#11613](https://github.com/npm/npm/pull/11613) Fix up one of the tests after rebasing the legacy test rewrite to `npm@2`. ([@zkat](https://github.com/zkat)) +* [`55abd0c`](https://github.com/npm/npm/commit/55abd0cc20e87a144d33ce2d459f65e7506da576) [#11613](https://github.com/npm/npm/pull/11613) Test that the `package.json` `files` section and `.npmignore` do what they're supposed to. ([@zkat](https://github.com/zkat)) +* [`a2b99b6`](https://github.com/npm/npm/commit/a2b99b6273ada14b2121ebc0acb7933e630edd9d) [#11613](https://github.com/npm/npm/pull/11613) Test that npm's distribution binary is complete and can be installed and used. ([@iarna](https://github.com/iarna)) +* [`8a8c36c`](https://github.com/npm/npm/commit/8a8c36ce51166006022e5c5d4f8655bbc458d651) [#11613](https://github.com/npm/npm/pull/11613) Test that environment variables are properly passed into scripts. + ([@iarna](https://github.com/zkat)) +* [`a95b550`](https://github.com/npm/npm/commit/a95b5507616bd51e83d7eab5f2337b1aff6480b1) [#11613](https://github.com/npm/npm/pull/11613) Test that we don't leak auth info into the environment. ([@iarna](https://github.com/iarna)) +* [`a1c1c52`](https://github.com/npm/npm/commit/a1c1c52efeab24f6dba154d054f85d9efc833486) [#11613](https://github.com/npm/npm/pull/11613) Remove all the relatively cryptic legacy tests and creates new tap tests that check the same functionality. The *legacy* tests were tests that were originally a shell script that was ported to javascript early in `npm`'s history. ([@iarna](https:\\github.com/iarna) and [@zkat](https://github.com/zkat)) +* [`9d89581`](https://github.com/npm/npm/commit/9d895811d3ee70c2e672f3d8fa06574495b5b488) [#11613](https://github.com/npm/npm/pull/11613) `tacks@1.0.9`: Add a package that provides a tool to generate fixtures from folders and, relatedly, a module that an create and tear down filesystem fixtures easily. ([@iarna](https://github.com/iarna)) + +### v2.14.20 (2016-02-18): + +Hope y'all are having a nice week! As usual, it's a fairly limited release. The +most notable thing is some dependency updates that might help the Node.js CI +setup for Windows run a little better, even if we have some work to do on that +path length things, still. + +#### WHITTLING AWAY AT PATH LENGTHS + +So for all of you who don't know -- Node.js does, in fact, support long Windows +paths. Unfortunately, depending on the tool and the Windows version, a lot of +external tooling does not. This means, for example, that some (all?) versions of +Windows Explorer *can literally never delete npm from their system entirely +because of deeply-nested npm dependencies*. Which is pretty gnarly. + +Incidentally, if you run into that in particularly, you can use +[rimraf](npm.im/rimraf) to remove such files 💁. + +The latest victim of this issue was the Node.js CI setup for testing on Windows, +which uses some tooling or another that croaks on the usual path length limit +for that OS: 255 characters. + +This issue, of course, is largely not a problem as of `npm@3`, with its flat +trees, but it still occasionally and viciously bites LTS. + +We've taken another baby step towards alleviating this in this release by +updating a couple of dependencies that were preventing `npmlog` from deduping, +and then doing a dedupe on that and `gauge`. Hopefully it helps. + +* [`4199551`](https://github.com/npm/npm/commit/41995517e617674710748ab6d262670c96124393) + [#11528](https://github.com/npm/npm/pull/11528) + `npm-install-checks@1.0.7`: Just updates the version of npmlog so we can + dedupe it better. + ([@zkat](https://github.com/zkat)) +* [`14d72c7`](https://github.com/npm/npm/commit/14d72c756b89e2d167eb52c1849263dbddcb9f35) + [#11552](https://github.com/npm/npm/pull/11552) + [#11528](https://github.com/npm/npm/pull/11528) + `node-gyp@3.3.0`: AIX support, new `gyp`, update `npmlog` (for the dedupe), + adds `--cafile` command line option, and allows configuration of Node.js and + io.js mirrors. + ([@rvagg](https://github.com/rvagg)) +* [`0453cb9`](https://github.com/npm/npm/commit/0453cb94b33520eb723b7072cd2654b1d0142533) + [#11528](https://github.com/npm/npm/pull/11528) + Do a `dedupe` on `gauge` to flatten our dependencies a bit more. + ([@zkat](https://github.com/zkat)) + +#### OTHER DEP STUFF + +* [`686c0b3`](https://github.com/npm/npm/commit/686c0b37ec3a7b65f9b3849e1099805e5221c408) + `rimraf@2.5.2`: Just updates to glob@7. + ([@isaacs](https://github.com/isaacs)) + +#### @wyze, DOCUMENTATION HERO OF THE PEOPLE, GETS THEIR OWN HEADER + +* [`7232948`](https://github.com/npm/npm/commit/72329484c775376cb40d5b348f453eaaf2f0b821) + [#11416](https://github.com/npm/npm/pull/11416) + Logout docs were using a section copy-pasted from the adduser docs. + ([@wyze](https://github.com/wyze)) +* [`922b33a`](https://github.com/npm/npm/commit/922b33aba4362e1e90f42e9348f061a1cc73eafb) + [#11414](https://github.com/npm/npm/pull/11414) + Add colon for consistency. + ([@wyze](https://github.com/wyze)) + +### v2.14.19 (2016-02-11): + +Really tiny micro-release this week! The main thing to note is a dependency +update that means we no longer have `graceful-fs@3` in our dependency tree. This +has some implications for being able to run on future Node.js releases, so +better to get this out the door. 😁 + +#### DEPS + +* [`a556e0f`](https://github.com/npm/npm/commit/a556e0f9dcb5d7b44224ba9c16c9d0dc6c8d2532) + `cmd-shim@2.0.2`: Final straggler using `graceful-fs@<4`. + ([@ForbesLindesay](https://github.com/ForbesLindesay)) + +#### DOCS + +* [`69a2d59`](https://github.com/npm/npm/commit/69a2d599bf0cba674ee268483e9bd5c14333b89f) + [#11391](https://github.com/npm/npm/pull/11391) + Fixed versions of `shrinkwrap.json` in examples in documentation for `npm + shrinkwrap`, which did not quite match up. + ([@xcatliu](https://github.com/xcatliu)) + +### v2.14.18 (2016-02-04): + +Clearly our docs are perfect after all those wonderful PRs, 'cause this week's +gonna be all about dependency updates. Note: There is a small security-related +fix included here! + +#### SECURITY-RELATED DEPENDENCY UPDATE + +* [`5c095ef`](https://github.com/npm/npm/commit/5c095eff8dc006980d4d083f2007e4dacff23be3) + [#11341](https://github.com/npm/npm/pull/11341) + `request@2.69.0`: Includes security-related dependency updates involving + `hawk` and `is-my-json-valid` + ([@remy](https://github.com/remy) and [@simov](https://github.com/simov)) + +#### OTHER DEPENDENCY UPDATES + +* [`f9c2668`](https://github.com/npm/npm/commit/f9c2668ca3e6e2602d91250ce61280e5e12d0a00) + `which@1.2.4` + ([@isaacs](https://github.com/isaacs)) +* [`2907c43`](https://github.com/npm/npm/commit/2907c43ad4ef87e5f730c2576f680d6837fcbad0) + `spdx-license-ids@1.2.0` + ([@shinnn](https://github.com/shinnn)) +* [`7734069`](https://github.com/npm/npm/commit/773406960bf7f4a87b2ecb6ebf593c62d0e9f95d) + `rimraf@2.5.1` + ([@isaacs](https://github.com/isaacs)) +* [`f4b39a7`](https://github.com/npm/npm/commit/f4b39a7dd5e1335d92aa22c46d99abb33f271b8b) + `retry@0.9.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`ded1e7a`](https://github.com/npm/npm/commit/ded1e7a1c9c7bec29bb7c30a8f85546670e75b56) + Nest `retry@0.8.0` inside `npm-registry-client` to prevent invalid + dependency issue until the latter gets a dependency update. + ([@zkat](https://github.com/zkat)) +* [`ab9f867`](https://github.com/npm/npm/commit/ab9f8679f9687f91ad03adaab6211a897aeebbae) + `read-package-json@2.0.3` + ([@iarna](https://github.com/iarna)) +* [`b638c41`](https://github.com/npm/npm/commit/b638c41607bb936b9eaaceba2aeeda1d34e3a9b2) + `npmlog@2.0.2` + ([@iarna](https://github.com/iarna)) +* [`49f34af`](https://github.com/npm/npm/commit/49f34af463a674359269025d8438feb6a7c69960) + `init-package-json@1.9.3` + ([@iarna](https://github.com/iarna)) +* [`2305dab`](https://github.com/npm/npm/commit/2305dab4e7bff09bb7686cec653cf1e663dbf15d) + `graceful-fs@4.1.3`: Fixed `.close()` not being patched. + ([@isaacs](https://github.com/isaacs)) +* [`18496d9`](https://github.com/npm/npm/commit/18496d9a0fff94e3652655998e8333056aa52b15) + `fs-write-stream-atomic@1.0.8` + ([@iarna](https://github.com/iarna)) +* [`6637bc7`](https://github.com/npm/npm/commit/6637bc7a0e194d82554cd7c91e1794018fef5943) + `config-chain@1.1.10` + ([@dominictarr](https://github.com/dominictarr)) +* [`4222bad`](https://github.com/npm/npm/commit/4222badffed9e9edacea6a8a96a99a164d376158) + `columnify@1.5.4` + ([@timoxley](https://github.com/timoxley)) +* [`df9016f`](https://github.com/npm/npm/commit/df9016f327a2a9ce492ebc75b882b03069438e13) + `ansi@0.3.1`: Added a license file. + ([@TooTallNate](https://github.com/TooTallNate)) + +### v2.14.17 (2016-01-28): + +Another week, another small LTS release! + +#### BETTER ERROR REPORTING YAY + +So as it turns out, when stuff goes wrong, it's actually nice to give people a +better clue rather than just say "oh well 😏". + +* [`5b8ccb9`](https://github.com/npm/npm/commit/5b8ccb91cf11b4edb463609cd4ed1dee84ed4db0) + [#11289](https://github.com/npm/npm/pull/11289) + 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 previous just + make npm error out– this reduces that to a warning. + ([@evanlucas](https://github.com/evanlucas)) +* [`556e42a`](https://github.com/npm/npm/commit/556e42ac6bab078722ddc1dc6cce4428d001133b) + [#11300](https://github.com/npm/npm/pull/11300) + Report symlinked packages as 'linked' in the output for `npm outdated`. + ([@halhenke](https://github.com/halhenke)) +* [`3842317`](https://github.com/npm/npm/commit/3842317583e0ea2eca78e39aa03f5bc06ba21de7) + [#11290](https://github.com/npm/npm/pull/11290) + Suppress warnings about pre-release node versions. This should get node's CI + passing on non-Windows platforms without needing to modify the node version to + get rid of the pre-release suffix. + ([@iarna](https://github.com/iarna)) + +#### EVERYONE WANTS THOSE NPM SOCKS, GEEZE + +Did you know that you can get npm socks for contributing to our docs? I bet +these people do, and now so do you! + +* [`dcde451`](https://github.com/npm/npm/commit/dcde451cb85a6ca08acc6ef45782c652f1d8fc89) + [#11232](https://github.com/npm/npm/pull/11232) + Update automatically included/excluded packages in `package.json`. + ([@jscissr](https://github.com/jscissr)) +* [`e3f8d5b`](https://github.com/npm/npm/commit/e3f8d5be5ac5ec1d72db42f7abf50cc4a8c5935c) + [#11273](https://github.com/npm/npm/pull/11273) + Add an example for `npm view versions`. + ([@vedatmahir](https://github.com/vedatmahir)) +* [`6a06ef2`](https://github.com/npm/npm/commit/6a06ef2252748089f0013de951f2d06160b90306) + [#11272](https://github.com/npm/npm/pull/11272) + Fix a typo in `npm-update.md`. + ([@jonathanp](https://github.com/jonathanp)) +* [`2515ff1`](https://github.com/npm/npm/commit/2515ff1de28f0b261fb25c79a66bd762a65961c4) + [#11215](https://github.com/npm/npm/pull/11215) + Correct small thinko in docs for SPDX expressions. + ([@kemitchell](https://github.com/kemitchell)) +* [`70f897b`](https://github.com/npm/npm/commit/70f897b03da9a5d5d4fd34614e9ee40e6f9e9653) + [#11196](https://github.com/npm/npm/pull/11196) + Make JSON snippets valid JSON in `npm update` docs. + ([@s100](https://github.com/s100)) + +### v2.14.16 (2016-01-21): + +Good to see you all again! It's been a while since we had an LTS release, and +the team continues to work hard to both get the issue tracker under control, and +get our test suite to be awesome and reliable. + +This is also the first LTS release of this year. + +We're gonna have an interesting time -- most of our focus this year will be +around stability and maintainability of the CLI, so you might actually end up +seeing a number of updates even over here, just for the sake of making sure +we're stable, that bugs get fixed, and tests have proper coverage. + +What better way to start this effort, then, than getting Travis tests green, fix +a few things here and there, and tweak a bunch of documentation? 😁 + +#### FIX ALL THE BUGS AND TWEAK ALL THE THINGS + +* [`24b13fb`](https://github.com/npm/npm/commit/24b13fbc57d34db1d5b0a37bcca122c00deba978) + [#11158](https://github.com/npm/npm/pull/11158) + Fix custom node-gyp env var quoting on Windows. + ([@orangemocha](https://github.com/orangemocha)) +* [`e2503f2`](https://github.com/npm/npm/commit/e2503f2be40157b05a9c500ec3b5d16090ffee50) + [#11142](https://github.com/npm/npm/pull/11142) + Fix race condition with `correctMkdir` in the cache directory. + ([@Jimbly](https://github.com/Jimbly)) + +* [`5c0e4c4`](https://github.com/npm/npm/commit/5c0e4c45a29d774ab729e86044377d4e5e424252) + [#10940](https://github.com/npm/npm/pull/10940) + Ignore failures replacing `package.json`. writeFileAtomic is not atomic in + Windows, it fails if the file is being accessed concurrently. + ([@orangemocha](https://github.com/orangemocha)) +* [`2c44d8d`](https://github.com/npm/npm/commit/2c44d8dc8c267d5e054d0175ce2f4750f0986463) + [#10903](https://github.com/npm/npm/pull/10903) + Add tests for `npm adduser --scope`. + ([@ekmartin](https://github.com/ekmartin)) +* [`4cb25d0`](https://github.com/npm/npm/commit/4cb25d0fed5c7792dfd1aec891380ecc1f8a5761) + [#10903](https://github.com/npm/npm/pull/10903) + Add a message informing users when they have been successfully logged in. + ([@ekmartin](https://github.com/ekmartin)) +* [`fe3ec6d`](https://github.com/npm/npm/commit/fe3ec6d6658262054c0c19c55373c21e84ab9f17) + [#10628](https://github.com/npm/npm/pull/10628) + Tell users how to open an issue with a package that has errored. + ([@trodrigues](https://github.com/trodrigues)) + +#### DOCS DOCS DOCS + +We got a TON of lovely documentation patches, too! Thanks all for submitting! + +* [`22482a1`](https://github.com/npm/npm/commit/22482a1f22079d72c3f8ca55c2f0c153bdd024c0) + [#11188](https://github.com/npm/npm/pull/11188) + Briefly explain what's included when you publish. + ([@beaugunderson](https://github.com/beaugunderson)) +* [`fa47724`](https://github.com/npm/npm/commit/fa4772438df0c66a19309dd1c1a3ce43cbee5461) + [#11150](https://github.com/npm/npm/pull/11150) + Advise use of `--depth Infinity` instead of `--depth 9999` in `npm update`. + ([@halhenke](https://github.com/halhenke)) +* [`248ddfe`](https://github.com/npm/npm/commit/248ddfe8f7ddd3318e14bf61de41cab4a638c8a3) + [#11130](https://github.com/npm/npm/pull/11130) + Nuke "using npm programmatically" section from README. The programmatic npm + API is unsupported, and is not guaranteed not to break in non-major versions. + Removing this section so newcomers aren't encouraged to discover or use it. + ([@ljharb](https://github.com/ljharb)) +* [`ae9c452`](https://github.com/npm/npm/commit/ae9c4521222d60ab4a69c19fee5e361c62f41fae) + [#11128](https://github.com/npm/npm/pull/11128) + Add link to local paths section indocs for `package.json`. + ([@orangejulius](https://github.com/orangejulius)) +* [`663a8c6`](https://github.com/npm/npm/commit/663a8c6b4b1647f9b86c15ef32e30023edc8c060) + [#11044](https://github.com/npm/npm/pull/11044) + Update default value documentation for the color option in npm's config. + ([@scottaddie](https://github.com/scottaddie)) +* [`5c1dda0`](https://github.com/npm/npm/commit/5c1dda0d3a18b2954872dba33fbc696ff0700ffe) + [#11037](https://github.com/npm/npm/pull/11037) + Correct the name property max length constraint verbiage. + ([@scottaddie](https://github.com/scottaddie)) +* [`8288365`](https://github.com/npm/npm/commit/8288365d08e97fa3a5b0d31703c015a8be49e07f) + [#10990](https://github.com/npm/npm/pull/10990) + Update folder docs to reflect that process.installPrefix was removed as of + 0.8.x. + ([@jeffmcmahan](https://github.com/jeffmcmahan)) +* [`61d63fa`](https://github.com/npm/npm/commit/61d63fa22c4f09742180c2de460a4ffb6c32738e) + [#10790](https://github.com/npm/npm/pull/10790) + Clarify that `npm install foo` is the same as `npm install foo@latest` now. + ([@cvrebert](https://github.com/cvrebert)) +* [`442c920`](https://github.com/npm/npm/commit/442c9207f375354c91d36df8711ba2d33e1c97f3) + [#10789](https://github.com/npm/npm/pull/10789) + Link over to `npm-dist-tag(1)` in `npm install` docs when they talk about the + `pkg@` syntax. + ([@cvrebert](https://github.com/cvrebert)) +* [`dca7a5e`](https://github.com/npm/npm/commit/dca7a5e2be3bfa306a870a123707d35c732406c0) + [#10788](https://github.com/npm/npm/pull/10788) + Link to tag docs in docs for `npm publish --tag`. + ([@cvrebert](https://github.com/cvrebert)) +* [`a72904e`](https://github.com/npm/npm/commit/a72904e8d4ab1d43ae8150fbe3f6468b0cbb1efd) + [#10787](https://github.com/npm/npm/pull/10787) + Explain why the `latest` tag matters. + ([@cvrebert](https://github.com/cvrebert)) +* [`9d0697a`](https://github.com/npm/npm/commit/9d0697a534046df7efda32170014041bbc1f4e7d) + [#10785](https://github.com/npm/npm/pull/10785) + Replace some quite marks in `npm dist-tag` docs for the sake of consistency. + ([@cvrebert](https://github.com/cvrebert)) + +#### I REALLY LIKE GREEN. CAN YOU TELL? + +So Travis is all green now on `npm@2`, thanks to the removal of nock and a few +other test suite tweaks. This is a fantastic step towards making sure we can all +have confidence in our test suite! 🎉 + +* [`64995be`](https://github.com/npm/npm/commit/64995be6d874356b15c136f9867302d805dfe1e9) [`75ab216`](https://github.com/npm/npm/commit/75ab2164cf79e28ac7f7ebe714f3c5aee99c6626) [`a9f6fe9`](https://github.com/npm/npm/commit/a9f6fe9dc558f17c4a7b9eb83329ac080f7df4b7) [`649c193`](https://github.com/npm/npm/commit/649c193adadf714c2819837f9372a29d724a5ec0) [`94cb05e`](https://github.com/npm/npm/commit/94cb05eaa9e5ad6675cf15c4ac0a44fbdde05900) [`6541690`](https://github.com/npm/npm/commit/65416907008061ac5a5f66b1630a57776803b526) [`255be6f`](https://github.com/npm/npm/commit/255be6f5bca9e3d216f3a5cbdf6714c6c9fcf132) [`9e84fa4`](https://github.com/npm/npm/commit/9e84fa43c49d04cf86ca1678e2a61412f5559cb9) [`8a587b0`](https://github.com/npm/npm/commit/8a587b0c1696ae7302891fa6355fc3e8670e00d3) [`bf812a5`](https://github.com/npm/npm/commit/bf812a54e497a573493346399798aa0b9373ac24) + [#10903](https://github.com/npm/npm/pull/10903) + Get rid of nock from tests, and get Travis green. + ([@zkat](https://github.com/zkat) and [@iarna](https://github.com/iarna)) +* [`70a5310`](https://github.com/npm/npm/commit/70a5310712c6666e753ca8f3bfff4a780ec6292d) + `npm-registry-couchapp@2.6.12`: + Better 0.8 compatibility, and ability to run in travis docker stuff. This + means the test suite should run a lot faster, too! + ([@iarna](https://github.com/iarna)) +* [`28fae39`](https://github.com/npm/npm/commit/28fae399212eda5554e6c0ffd8c9591144ab7b9d) + Get rid of sudo, for Travis! + ([@zkat](https://github.com/zkat)) + +### v2.14.15 (2015-12-10): + +Did you know that Bob Ross reached the rank of master sergeant in the US Air +Force before becoming perhaps the most soothing painter of all time? + +#### TWO HAPPY LITTLE BUG FIXES + +* [`f482664`](https://github.com/npm/npm/commit/f4826645dc6b5c0f05c5f9187efb28c1a293554f) + [#10505](https://github.com/npm/npm/issues/10505) `npm ls --json --depth=0` + now respects the depth parameter, when it is zero and when it is not zero. + ([@MarkReeder](https://github.com/MarkReeder)) +* [`529fa1f`](https://github.com/npm/npm/commit/529fa1ff2c6432a773af99a1c5209c0865f7a19c) + [#9099](https://github.com/npm/npm/issues/9099) I had always thought you + could run `npm version` from subdirectories in your project, which is great, + because now you can. I guess I was just ahead of my time. + ([@ekmartin](https://github.com/ekmartin)) + +#### NOW PAINT IN SOME NICE DOCS CHANGES + +* [`1fc7f2b`](https://github.com/npm/npm/commit/1fc7f2b523ea760e08adb9b861b28e3ba450e565) + [#10546](https://github.com/npm/npm/issues/10546) Goodbye, FAQ! You were + cheeky and fun until you weren't! Don't worry: npm still loves everyone, + especially you! ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`7fe6950`](https://github.com/npm/npm/commit/7fe6950b44d241bb4d90857a44d89d750af1e2b3) + [#10570](https://github.com/npm/npm/issues/10570) Update documentation URLs + to be HTTPS everywhere sensible. No HTTP shall be spared! + ([@rsp](https://github.com/rsp)) +* [`96ebb90`](https://github.com/npm/npm/commit/96ebb902439e4f6f37f8beffb589769146fecf24) + [#10650](https://github.com/npm/npm/issues/10650) Correctly note that there + are two lifecycle scripts run by an install phase in an example, instead of + three. ([@eymengunay](https://github.com/eymengunay)) +* [`5196893`](https://github.com/npm/npm/commit/5196893a7496f68a514b83641ff6b72f14d664dd) + [#10687](https://github.com/npm/npm/issues/10687) `npm outdated`'s output can + be a little puzzling sometimes. I've attempted to make it clearer, with some + examples, of what's going on with "wanted" and "latest" in more cases. + ([@othiym23](https://github.com/othiym23)) +* [`8e6712d`](https://github.com/npm/npm/commit/8e6712d4ee128858cab36c77723e35bddbb977ba) + [#10700](https://github.com/npm/npm/issues/10700) Hey, do you remember when + `search.npmjs.org` was a thing? I think I do? The last time I used it was in + like 2012, and it's gone now, so remove it from the docs. + ([@gagern](https://github.com/gagern)) +* [`27d2612`](https://github.com/npm/npm/commit/27d2612b3f5aa88b12c943d04e162ce4c3a350ae) + `semver@5.1.0`: Include BNF for SemVer expression grammar (which is also now + included in `npm help semver`). ([@isaacs](https://github.com/isaacs)) + +#### LAND YOUR DEPENDENCY UPGRADES IN PAIRS SO EVERYONE HAS A FRIEND + +* [`fc6c3c5`](https://github.com/npm/npm/commit/fc6c3c53a31e9e11c2616fcd378202e5b80bf286) + `request@2.67.0` ([@simov](https://github.com/simov)) +* [`07013fd`](https://github.com/npm/npm/commit/07013fd0fd55a2eb31fb9334631ee5d0dd5c41bb) + [isaacs/rimraf#89](https://github.com/isaacs/rimraf/pull/89) `rimraf@2.4.4` + ([@zerok](https://github.com/zerok)) +* [`bc149be`](https://github.com/npm/npm/commit/bc149bef871f0f00639509898cece531af3aa8b3) + [isaacs/once#7](https://github.com/isaacs/once/pull/7) `once@1.3.3` + ([@floatdrop](https://github.com/floatdrop)) +* [`ac598d3`](https://github.com/npm/npm/commit/ac598d36e1ad207bc0d8a7eadfd84b26146aec1f) + `lru-cache@3.2.0` ([@isaacs](https://github.com/isaacs)) +* [`1b915ce`](https://github.com/npm/npm/commit/1b915ce1e0787ccb6d8aa235d002d66565f2175d) + `npm-registry-client@7.0.9` ([@othiym23](https://github.com/othiym23)) +* [`df7dd78`](https://github.com/npm/npm/commit/df7dd78b8fe3cc58202996fa6c994fc55419bfa5) + `tap@2.3.1` ([@isaacs](https://github.com/isaacs)) + +### v2.14.14 (2015-12-03): + +#### FIX URL IN LICENSE + +The license incorrectly identified the registry URL as `registry.npmjs.com` and +this has been corrected to `registry.npmjs.org`. + +* [`6051a69`](https://github.com/npm/npm/commit/6051a69b1adc80f5f200077067e831643f655bd4) + [#10685](https://github.com/npm/npm/pull/10685) + Fix npm public registry URL in notices. + ([@kemitchell](https://github.com/kemitchell)) + +#### NO MORE MD5 + +We updated modules that had been using MD5 for non-security purposes. While +this is perfectly safe, if you compile Node in FIPS-compliance mode it will +explode if you try to use MD5. We've replaced MD5 with Murmur, which conveys +our intent better and is faster to boot. + +* [`30b5994`](https://github.com/npm/npm/commit/30b599496a9762482e1cef945a378e3a534fd366) + [#10629](https://github.com/npm/npm/issues/10629) + `write-file-atomic@1.1.4` + ([@othiym23](https://github.com/othiym23)) +* [`68c63ff`](https://github.com/npm/npm/commit/68c63ff1279d3d5ea7b2c970ab5562a8e0536f27) + [#10629](https://github.com/npm/npm/issues/10629) + `fs-write-stream-atomic@1.0.5` + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`e48e5a9`](https://github.com/npm/npm/commit/e48e5a90b4dcf76124b7e9ea3b295c1383e7f0c8) + [nodejs/node-gyp#831](https://github.com/nodejs/node-gyp/pull/831) + `node-gyp@3.2.1`: Improved \*BSD support. + ([@bnoordhuis](https://github.com/bnoordhuis)) + +### v2.14.13 (2015-11-25): + +#### THE npm CLI !== THE npm REGISTRY !== npm, INC. + +npm-the-CLI is licensed under the terms of the [Artistic License +2.0](https://github.com/npm/npm/blob/8d79c1a39dae908f27eaa37ff6b23515d505ef29/LICENSE), +which is a liberal open-source license that allows you to take this code and do +pretty much whatever you like with it (that is, of course, not legal language, +and if you're doing anything with npm that leaves you in doubt about your legal +rights, please seek the review of qualified counsel, which is to say, not +members of the CLI team, none of whom have passed the bar, to my knowledge). At +the same time the primary registry the CLI uses when looking up and downloading +packages is a commercial service run by npm, Inc., and it has its own [Terms of +Use](https://www.npmjs.com/policies/terms). + +Aside from clarifying the terms of use (and trying to make sure they're more +widely known), the only recent changes to npm's licenses have been making the +split between the CLI and registry clearer. You are still free to do whatever +you like with the CLI's source, and you are free to view, download, and publish +packages to and from `registry.npmjs.org`, but now the existing terms under +which you can do so are more clearly documented. Aside from the two commits +below, see also [the release notes for +`npm@2.14.11`](https://github.com/npm/npm/releases/tag/v2.14.11), which is where +the split between the CLI's code and the terms of use for the registry was +first made more clear. + +* [`1f3e936`](https://github.com/npm/npm/commit/1f3e936aab6840667948ef281e0c3621df365131) + [#10532](https://github.com/npm/npm/issues/10532) Clarify that + `registry.npmjs.org` is the default, but that you're free to use the npm CLI + with whatever registry you wish. ([@kemitchell](https://github.com/kemitchell)) +* [`6733539`](https://github.com/npm/npm/commit/6733539eeb9b32a5f2d1a6aa797987e2252fa760) + [#10532](https://github.com/npm/npm/issues/10532) Having semi-duplicate + release information in `README.md` was confusing and potentially inaccurate, + so remove it. ([@kemitchell](https://github.com/kemitchell)) + +#### EASE UP ON WINDOWS BASH USERS + +It turns out that a fair number of us use bash on Windows (through MINGW or +bundled with Git, plz – Cygwin is still a bridge too far, for both npm and +Node.js). [@jakub-g](https://github.com/jakub-g) did us all a favor and relaxed +the check for npm completion to support MINGW bash. Thanks, Jakub! + +* [`460cc09`](https://github.com/npm/npm/commit/460cc0950fd6a005c4e5c4f85af807814209b2bb) + [#10156](https://github.com/npm/npm/issues/10156) completion: enable on + Windows in git bash ([@jakub-g](https://github.com/jakub-g)) + +#### MAKE NODE-GYP A LITTLE BLUER + +* [`333e118`](https://github.com/npm/npm/commit/333e1181082842c21edc62f0ce515928424dff1f) + `node-gyp@3.2.0`: Support AIX, use `which` to find Python, updated to a newer + version of `gyp`, and more! ([@bnoordhuis](https://github.com/bnoordhuis)) + +#### WE LIKE SPDX AND ALL BUT IT'S NOT ACTUALLY A DIRECT DEP, SORRY + +* [`1f4b4bb`](https://github.com/npm/npm/commit/1f4b4bbdf8758281beecb7eaf75d05a6c4a77c15) + Removed `spdx` as a direct npm dependency, since we don't actually need it at + that level, and updated subdeps for `validate-npm-package-license` + ([@othiym23](https://github.com/othiym23)) + +#### A BOUNTEOUS THANKSGIVING CORNUCOPIA OF DOC TWEAKS + +These are great! Keep them coming! Sorry for letting them pile up so deep, +everybody. Also, a belated Thanksgiving to our Canadian friends, and a happy +Thanksgiving to all our friends in the USA. + +* [`6101f44`](https://github.com/npm/npm/commit/6101f44737645d9379c3396fae81bbc4d94e1f7e) + [#10250](https://github.com/npm/npm/issues/10250) Correct order of `org:team` + in `npm team` documentation. ([@louislarry](https://github.com/louislarry)) +* [`e8769f9`](https://github.com/npm/npm/commit/e8769f9807b91582c15ef130733e2e72b6c7bda4) + [#10371](https://github.com/npm/npm/issues/10371) Remove broken / duplicate + link to tag. ([@WickyNilliams](https://github.com/WickyNilliams)) +* [`1ae2dbe`](https://github.com/npm/npm/commit/1ae2dbe759feb80d8634569221ec6ee2c6d1d1ff) + [#10419](https://github.com/npm/npm/issues/10419) Remove references to + nonexistent `npm-rm(1)` documentation. ([@KenanY](https://github.com/KenanY)) +* [`777a271`](https://github.com/npm/npm/commit/777a271830a42d4ee62540a89f764a6e7d62de19) + [#10474](https://github.com/npm/npm/issues/10474) Clarify that install finds + dependencies in `package.json`. ([@sleekweasel](https://github.com/sleekweasel)) +* [`dcf4b5c`](https://github.com/npm/npm/commit/dcf4b5cbece1b0ef55ab7665d9acacc0b6b7cd6e) + [#10497](https://github.com/npm/npm/issues/10497) Clarify what a package is + slightly. ([@aredridel](https://github.com/aredridel)) +* [`447b3d6`](https://github.com/npm/npm/commit/447b3d669b2b6c483b8203754ac0a002c67bf015) + [#10539](https://github.com/npm/npm/issues/10539) Remove an extra, spuriously + capitalized letter. ([@alexlukin-softgrad](https://github.com/alexlukin-softgrad)) + +### v2.14.12 (2015-11-19): + +#### TEEN ORCS AT THE GATES + +This week heralds the general release of the primary npm registry's [new +support for private packages for +organizations](http://blog.npmjs.org/post/133542170540/private-packages-for-organizations). +For many potential users, it's the missing piece needed to make it easy for you +to move your organization's private work onto npm. And now it's here! The +functionality to support it has been in place in the CLI for a while now, +thanks to [@zkat](https://github.com/zkat)'s hard work. + +During our final testing before the release, our ace support team member +[@snopeks](https://github.com/snopeks) noticed that there had been some drift +between the CLI team's implementation and what npm was actually preparing to +ship. In the interests of everyone having a smooth experience with this +_extremely useful_ new feature, we quickly made a few changes to square up the +CLI and the web site experiences. + +* [`0e8b15e`](https://github.com/npm/npm/commit/0e8b15e9fbc89e31bd00e573b648846beddfb835) + [#9327](https://github.com/npm/npm/issues/9327) `npm access` no longer has + problems when run in a directory that doesn't contain a `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`c4e939c`](https://github.com/npm/npm/commit/c4e939c1d493601d25dcb88e6ffcca73076fd3fd) + [npm/npm-registry-client#126](https://github.com/npm/npm-registry-client/issues/126) + `npm-registry-client@7.0.8`: Allow the CLI to grant, revoke, and list + permissions on unscoped (public) packages on the primary registry. + ([@othiym23](https://github.com/othiym23)) + +#### A BRIEF NOTE ON NPM'S BACKWARDS COMPATIBILITY + +We don't often have much to say about the changes we make to our internal +testing and tooling, but I'm going to take this opportunity to reiterate that +npm tries hard to maintain compatibility with a wide variety of Node versions. +As this change shows, we want to ensure that npm works the same across: + +* Node.js 0.8 +* Node.js 0.10 +* Node.js 0.12 +* the latest io.js release +* Node.js 4 LTS +* Node.js 5 + +Contributors who send us pull requests often notice that it's very rare that +our tests pass across all of those versions (ironically, almost entirely due to +the packages we use for testing instead of any issues within npm itself). We're +currently beginning an effort, lasting the rest of 2015, to clean up our test +suite, and not only get it passing on all of the above versions of Node.js, but +working solidly on Windows as well. This is a compounding form of technical +debt that we're finally paying down, and our hope is that cleaning up the tests +will produce a more robust CLI that's a lot easier to write patches for. + +* [`d743620`](https://github.com/npm/npm/commit/d743620a0005213a65d25de771661b4d48a09717) + [#10233](https://github.com/npm/npm/issues/10233) Update Node.js versions + that Travis uses to test npm. ([@iarna](https://github.com/iarna)) + +#### TYPOS IN THE LICENSE, OH MY + +* [`58ac241`](https://github.com/npm/npm/commit/58ac241f556b2c202a8ee33321965e2540361ca7) + [#10478](https://github.com/npm/npm/issues/10478) Correct two typos in npm's + LICENSE. ([@jorrit](https://github.com/jorrit)) + +### v2.14.11 (2015-11-12): + +#### ASK FOR NOTHING, GET LATEST + +When you run `npm install foo`, you probably expect that you'll get the +`latest` version of `foo`, whatever that is. And good news! That's what this +change makes it do. + +We _think_ this is what everyone wants, but if this causes problems for you, we +want to know! If it proves problematic for people we will consider reverting it +(preferrably before this becomes `npm@latest`). + +Previously, when you ran `npm install foo` we would act as if you typed `npm +install foo@*`. Now, like any range-type specifier, in addition to matching the +range, it would also have to be `<=` the value of the `latest` dist-tag. +Further, it would exclude prerelease versions from the list of versions +considered for a match. + +This worked as expected most of the time, unless your `latest` was a prerelease +version, in which case that version wouldn't be used, to everyone's surprise. + +* [`6f0a646`](https://github.com/npm/npm/commit/6f0a646cd865b24fe3ff25365bf5421780e63e01) + [#10189](https://github.com/npm/npm/issues/10189) `npm-package-arg@4.1.0`: + Change the default version from `*` to `latest`. + ([@zkat](https://github.com/zkat)) + +#### LICENSE CLARIFICATION + +* [`54a9046`](https://github.com/npm/npm/commit/54a90461f068ea89baa5d70248cdf1581897936d) + [#10326](https://github.com/npm/npm/issues/10326) Clarify what-all is covered + by npm's license and point to the registry's terms of use. + ([@kemitchell](https://github.com/kemitchell)) + +#### CLOSER TO GREEN TRAVIS + +* [`28efd3d`](https://github.com/npm/npm/commit/28efd3d7dfb2fa3755076ae706ea4d38c6ee6900) + [#10232](https://github.com/npm/npm/issues/10232) `nock@1.9.0`: Downgrade + nock to a version that doesn't depend on streams2 in core so that more of our + tests can pass in 0.8. ([@iarna](https://github.com/iarna)) + +#### A BUG FIX + +* [`eacac8f`](https://github.com/npm/npm/commit/eacac8f05014d15217c3d8264d0b00a72eafe2d2) + [#9965](https://github.com/npm/npm/issues/9965) Fix a corrupt `package.json` + file introduced by a merge conflict in + [`022691a`](https://github.com/npm/npm/commit/022691a). + ([@waynebloss](https://github.com/waynebloss)) + +#### A DEPENDENCY UPGRADE + +* [`ea7d8e0`](https://github.com/npm/npm/commit/ea7d8e00a67a3d5877ed72c9728909c848468a9b) + [npm/nopt#51](https://github.com/npm/nopt/pull/51) `nopt@3.0.6`: Allow + types checked to be validated by passed-in name in addition to the JS name of + the type / class. ([@wbecker](https://github.com/wbecker)) + +### v2.14.10 (2015-11-05): + +There's nothing in here that that isn't in the `npm@3.4.0` release notes, but +all of the commit shasums have been adjusted to be correct. Enjoy! + +#### BUG FIXES VIA DEPENDENCY UPDATES + +* [`204c558`](https://github.com/npm/npm/commit/204c558c06637a753c0b41d0cf19f564a1ac3715) + [#8640](https://github.com/npm/npm/issues/8640) + [npm/normalize-package-data#69](https://github.com/npm/normalize-package-data/pull/69) + `normalize-package-data@2.3.5`: Fix a bug where if you didn't specify the + name of a scoped module's binary, it would install it such that it was + impossible to call it. ([@iarna](https://github.com/iarna)) +* [`bbdf4ee`](https://github.com/npm/npm/commit/bbdf4ee0a3cd12be6a2ace255b67d573a72f1f8f) + [npm/fstream-npm#14](https://github.com/npm/fstream-npm/pull/14) + `fstream-npm@1.0.7`: Only filter `config.gypi` when it's in the build + directory. ([@mscdex](https://github.com/mscdex)) +* [`d82ff81`](https://github.com/npm/npm/commit/d82ff81403e906931fac701775723626dcb443b3) + [npm/fstream-npm#15](https://github.com/npm/fstream-npm/pull/15) + `fstream-npm@1.0.6`: Stop including directories that happened to have names + matching whitelisted npm files in npm module tarballs. The most common cause + was that if you had a README directory then everything in it would be + included if wanted it or not. ([@taion](https://github.com/taion)) + +#### DOCUMENTATION FIXES + +* [`16361d1`](https://github.com/npm/npm/commit/16361d122f2ff6d1a4729c66153b7c24c698fd19) + [#10036](https://github.com/npm/npm/pull/10036) Fix typo / over-abbreviation. + ([@ifdattic](https://github.com/ifdattic)) +* [`d1343dd`](https://github.com/npm/npm/commit/d1343dda42f113dc322f95687f5a8c7d71a97c35) + [#10176](https://github.com/npm/npm/pull/10176) Fix broken link, scopes => + scope. ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`110663d`](https://github.com/npm/npm/commit/110663d000a3908a4853393d9abae481700cf4dc) + [#9460](https://github.com/npm/npm/issue/9460) Specifying the default command + run by "npm start" and the fact that you can pass it arguments. + ([@JuanCaicedo](https://github.com/JuanCaicedo)) + +#### DEPENDENCY UPDATES FOR THEIR OWN SAKE + +* [`7476d2d`](https://github.com/npm/npm/commit/7476d2d31552a41671c425aa7fcc2844e0381008) + [npm/npmlog#19](https://github.com/npm/npmlog/pull/19) + `npmlog@2.0.0`: Make it possible to emit log messages with `error` as the + prefix. + ([@bengl](https://github.com/bengl)) +* [`6ca7888`](https://github.com/npm/npm/commit/6ca7888862cfe8bf802dc7c66632c102acd94cf5) + `read-package-json@2.0.2`: Minor cleanups. + ([@KenanY](https://github.com/KenanY)) + +### v2.14.9 (2015-10-29): + +There's still life in `npm@2`, but for now, enjoy these dependency upgrades! +Also, [@othiym23](https://github.com/othiym23) says hi! _waves_ +[@zkat](https://github.com/zkat) has her hands full, and +[@iarna](https://github.com/iarna)'s handling `npm@3`, so I'm dealing with +`npm@2` and the totally nonexistent weird bridge `npm@1.4` LTS release that may +or may not be happening this week. + +#### CAN'T STOP WON'T STOP UPDATING THOSE DEPENDENCIES + +* [`f52f0cb`](https://github.com/npm/npm/commit/f52f0cb51526314197e9d67619feebbd82a397b7) + [#10150](https://github.com/npm/npm/issues/10150) `chmodr@1.0.2`: Use + `fs.lstat()` to check if an entry is a directory, making `chmodr()` work + properly with NFS mounts on Windows. ([@sheerun](https://github.com/sheerun)) +* [`f7011d7`](https://github.com/npm/npm/commit/f7011d7b3b1d9148a6cd8f7b8359d6fe3269a912) + [#10150](https://github.com/npm/npm/issues/10150) `which@1.2.0`: Additional + command-line parameters, which is nice but not used by npm. + ([@isaacs](https://github.com/isaacs)) +* [`ebcc0d8`](https://github.com/npm/npm/commit/ebcc0d8629388da0b849bbbad590382cd7268f51) + [#10150](https://github.com/npm/npm/issues/10150) `minimatch@3.0.0`: Don't + package browser version. ([@isaacs](https://github.com/isaacs)) +* [`8c98dce`](https://github.com/npm/npm/commit/8c98dce5ffe242bafbe92b849e73e8de1803e256) + [#10150](https://github.com/npm/npm/issues/10150) `fstream-ignore@1.0.3`: + Upgrade to use `minimatch@3` (for deduping purposes). + ([@othiym23](https://github.com/othiym23)) +* [`db9ef33`](https://github.com/npm/npm/commit/db9ef337c253ecf21c921055bf8742e10d1cb3bb) + [#10150](https://github.com/npm/npm/issues/10150) `request@2.65.0`: + Dependency upgrades and a few bug fixes, mostly related to cookie handling. + ([@simov](https://github.com/simov)) + +#### DEVDEPENDENCIES TOO, I GUESS, IT'S COOL + +* [`dfbf621`](https://github.com/npm/npm/commit/dfbf621afa09c46991249b4f9a995d1823ea7ede) + [#10150](https://github.com/npm/npm/issues/10150) `tap@2.2.0`: Better + handling of test order handling (including some test fixes for npm). + ([@isaacs](https://github.com/isaacs)) +* [`cf5ad5a`](https://github.com/npm/npm/commit/cf5ad5a8c88bfd72e30ef8a8d1d3c5508e0b3c23) + [#10150](https://github.com/npm/npm/issues/10150) `nock@2.16.0`: More + expectations, documentation, and bug fixes. + ([@pgte](https://github.com/pgte)) + +### v2.14.8 (2015-10-08): + +#### SLOWLY RECOVERING FROM FEELINGS + +OS&F is definitely my favorite convention I've gone to. Y'all should check it +out next year! Rebecca and Kat are back, although Forrest is out at +[&yet conf](http://andyetconf.com/). + +This week sees another tiny LTS release with non-code-related patches -- just +CI/release things. + +Meanwhile, have you heard? `npm@3` is much faster now! Go upgrade with `npm +install -g npm@latest` and give it a whirl if you haven't already! + +#### IF YOU CHANGE CASING ON A FILE, YOU ARE NOT MY FRIEND + +Seriously. I love me some case-sensitive filesystems, but a lot of us have to +deal with `git` and its funky support for case normalizing systems. Have mercy +and just don't bother if all you're changing is casing, please? Otherwise, I +have to do this little dance to prevent horrible conflicts. + +* [`c3a7b61`](https://github.com/npm/npm/commit/c3a7b619786650a45653c8b55b8741fc7bb5cfda) + [#9804](https://github.com/npm/npm/pulls/9804) Remove the readme file with + weird casing. + ([@zkat](https://github.com/zkat)) +* [`f3f619e`](https://github.com/npm/npm/commit/f3f619e06e4be1378dbf286f897b50e9c69c9557) + [#9804](https://github.com/npm/npm/pulls/9804) Add the readme file back in, + with desired casing. + ([@zkat](https://github.com/zkat)) + +#### IDK. OUR CI DOESN'T EVEN FULLY WORK YET BUT SURE + +Either way, it's nice to make sure we're running stuff on the latest Node. `4.2` +is getting released very soon, though (this week?), and that'll be the first +official LTS release! + +* [`bd0b9ab`](https://github.com/npm/npm/commit/bd0b9ab6e60a31448794bbd88f94672572c3cb55) + [#9827](https://github.com/npm/npm/pulls/9827) Add node `4.0` and `4.1` to + TravisCI + ([@JaKXz](https://github.com/JaKXz)) + +### v2.14.7 (2015-10-01): + +#### MORE RELEASE STAGGERING?! + +Hi all, and greetings from [Open Source & Feelings](http://osfeels.com)! + +So we're switching gears a little with how we handle our weekly releases: from +now on, we're going to stagger release weeks between dependency bumps and +regular patches. So, this week, aside from a doc change, we'll be doing only +version bumps. Expect actual patches next week! + +#### TOTALLY FOLLOWING THE RULES ALREADY + +So I snuck this in, because it's our own [@snopeks](https://github.com/snopeks)' +first contribution to the main `npm` repo. She's been helping with building +support documents for Orgs, and contributed her general intro guide to the new +feature so you can read it with `npm help orgs` right in your terminal! + +* [`8324ea0`](https://github.com/npm/npm/commit/8324ea023ace4e08b6b8959ad199e2457af9f9cf) + [#9761](https://github.com/npm/npm/pull/9761) Added general user guide for + Orgs. + ([@snopeks](https://github.com/snopeks)) + +#### JUST. ONE. MORE. + +* [`9a502ca`](https://github.com/npm/npm/commit/9a502ca96e2d43ec75a8f684c9ca33af7e910f0a) + Use unique package name in tests to work around weird test-state-based + failures. + ([@iarna](https://github.com/iarna)) + +#### OKAY ACTUALLY THE THING I WAS SUPPOSED TO DO + +Anyway -- here's your version bump! :) + +* [`4aeb94c`](https://github.com/npm/npm/commit/4aeb94c9f0df3f41802cf2e0397a998f3b527c25) + `request@2.64.0`: No longer defaulting to `application/json` for `json` + requests. Also some minor doc and packaging patches. + ([@simov](https://github.com/simov)) +* [`a18b213`](https://github.com/npm/npm/commit/a18b213e6945a8f5faf882927829ac95f844e2aa) + `glob@5.0.15`: Upgraded `minimatch` dependency. + ([@isaacs](https://github.com/isaacs)) +* [`9eb64d4`](https://github.com/npm/npm/commit/9eb64e44509519ca9d788502edb2eba4cea5c86b) + `nock@2.13.0` + ([@pgte](https://github.com/pgte)) + +### v2.14.6 (2015-09-24): + +#### `¯\_(ツ)_/¯` + +Since `2.x` is LTS now, you can expect a slowdown in overall release sizes. On +top of that, we had our all-company-npm-internal-conf thing on Monday and +Tuesday so there wasn't really time to do much at all. + +Still, we're bringing you a couple of tiny little changes this week! + +* [`7b7da13`](https://github.com/npm/npm/commit/7b7da13c6cdf5eae53c20d5c69afc4c16e6f715d) + [#9471](https://github.com/npm/npm/pull/9471) When the port for a tarball is + different than the registry it's in, but the hostname is the same, the + protocol is now allowed to change, too. + ([@fastest963](https://github.com/fastest963)) +* [`6643ada`](https://github.com/npm/npm/commit/6643adaf9f37f08893e3ad28b797c55a36b2a152) + `request@2.63.0`: Use `application/json` as the default content type when + making `json` requests. + ([@simov](https://github.com/simov)) + +### v2.14.5 (2015-09-17): + +#### NPM IS DEAD. LONG LIVE NPM + +That's right folks. As of this week, `npm@latest` is `npm@3`! There's some +really great shiny new things over there, and you should really take a look. + +Many kudos to [@iarna](https://github.com/iarna) for her hard work on `npm@3`! + +Don't worry, we'll keep `2.x` around for a while (as LTS), but you won't see +many, if any, new features on this end. From now on, we're going to use +`latest-2` and `next-2` as the dist tags for the `npm@2` branch. + +#### OKAY THAT'S FINE CAN I DEPRECATE THINGS NOW? + +Yes! Specially if you're using scoped packages. Apparently, deprecating them +never worked, but that should be better now. :) + +* [`eca7b24`](https://github.com/npm/npm/commit/eca7b24de9a0090da02a93a69726f5e70ab80543) + [#9558](https://github.com/npm/npm/issues/9558) Add tests for npm deprecate. + ([@zkat](https://github.com/zkat)) +* [`648fe16`](https://github.com/npm/npm/commit/648fe16157ef0db22395ae056d1dd4b4c1605bf4) + [#9558](https://github.com/npm/npm/issues/9558) `npm-registry-client@7.0.7`: + Fixes `npm deprecate` so you can actually deprecate scoped modules now (it + never worked). + ([@zkat](https://github.com/zkat)) + +#### WTF IS `node-waf` + +idk. Some old thing. We don't talk about it anymore. + +* [`cf1b39f`](https://github.com/npm/npm/commit/cf1b39fc95a9ffad7fba4c2fee705c53b19d1d16) + [#9584](https://github.com/npm/npm/issues/9584) Fix ancient references to + `node-waf` in the docs to refer to the `node-gyp` version of things. + ([@KenanY](https://github.com/KenanY)) + +#### THE `graceful-fs` AND `node-gyp` SAGA CONTINUES + +Last week had some sweeping `graceful-fs` upgrades, and this takes care of one +of the stragglers, as well as bumping `node-gyp`. `node@4` users might be +excited about this, or even `node@<4` users who previously had to cherry-pick a +bunch of patches to get the latest npm working. + +* [`e07354f`](https://github.com/npm/npm/commit/e07354f3ff3a6be568fe950f1f825897f72912d8) + `sha@2.0.1`: Upgraded graceful-fs! + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`83cb6ee`](https://github.com/npm/npm/commit/83cb6ee4045b85e565e9678ca1878877e1dc75bd) + `node-gyp@3.0.3` + ([@rvagg](https://github.com/rvagg)) + +#### DEPS! DEPS! MORE DEPS! OK STOP DEPS + +* [`0d60888`](https://github.com/npm/npm/commit/0d608889615a1cb63f5f852337e955053f201aeb) + `normalize-package-data@2.3.4`: Use an external package to check for built-in + node modules. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`79b4dac`](https://github.com/npm/npm/commit/79b4dac11f1c2d8ad5489fc3104734e1c10d4793) + `retry@0.8.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`c164941`](https://github.com/npm/npm/commit/c164941d3c792904d5b126a4fd36eefbe0699f52) + `request@2.62.0`: node 4 added to build targets. Option initialization issues + fixed. + ([@simov](https://github.com/simov)) +* [`0fd878a`](https://github.com/npm/npm/commit/0fd878a44d5ae303325808d1f00df4dce7549d50) + `lru-cache@2.7.0`: Cache serialization support and fixes a cache length bug. + ([@isaacs](https://github.com/isaacs)) +* [`6a7a114`](https://github.com/npm/npm/commit/6a7a114a45b4699995d6e09164fdfd0fa1274591) + `nock@2.12.0` + ([@pgte](https://github.com/pgte)) +* [`6b25e6d`](https://github.com/npm/npm/commit/6b25e6d2235c11f4444104db4545cb42a0267666) + `semver@5.0.3`: Removed uglify-js dead code. + ([@isaacs](https://github.com/isaacs)) + +### v2.14.4 (2015-09-10): + +#### THE GREAT NODEv4 SAGA + +So [Node 4 is out now](https://nodejs.org/en/blog/release/v4.0.0/) and that's +going to involve a number of things over in npm land. Most importantly, it's the +last major release that will include the `2.x` branch of npm. That also means +that `2.x` is going to go into LTS mode in the coming weeks -- once `npm@3` +becomes our official `latest` release. You can most likely expect Node 5 to +include `npm@3` by default, whenever that happens. We'll go into more detail +about LTS at that point, as well, so keep your eyes peeled for announcements! + +#### NODE IS DEAD. LONG LIVE NODE! + +Node 4 being released means that a few things that used to be floating patches +are finally making it right into npm proper. This week, we've got two such +updates, both to dependencies: + +* [`505d9e4`](https://github.com/npm/npm/commit/505d9e40c13b8b0bb3f70ee9886f7b73ba569407) + `node-gyp@3.0.1`: Support for node nightlies and compilation for both node and + io.js without extra patching + ([@rvagg](https://github.com/rvagg)) + +[@thefourtheye](https://github.com/thefourtheye) was kind enough to submit a +*bunch* of PRs to npm's dependencies updating them to `graceful-fs@4.1.2`, which +mainly makes it so we're no longer monkey-patching `fs`. The following are all +updates related to this: + +* [`10cb189`](https://github.com/npm/npm/commit/10cb189c773fef804214018d57509cc7a943184b) + `write-file-atomic@1.1.3` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`edfb80b`](https://github.com/npm/npm/commit/edfb80b39f8cfce9a993f139eb98248001198e09) + `tar@2.2.1` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`aa6e1ee`](https://github.com/npm/npm/commit/aa6e1eede7d71fa69d7256afdfbaa3406bc39a5b) + `read-package-json@2.0.1` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`18971a3`](https://github.com/npm/npm/commit/18971a361635ed3958ecd39b63930ae1e56f8612) + `read-installed@4.0.3` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`a4cba71`](https://github.com/npm/npm/commit/a4cba71bd2532236fda7385bf55e8790cafd4f0a) + `fstream@1.0.8` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`70a38e2`](https://github.com/npm/npm/commit/70a38e29418951ac61ab6cf269d188074fe8ac3a) + `fs-write-stream-atomic@1.0.4` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`9cbd20f`](https://github.com/npm/npm/commit/9cbd20f691e37960e4ba12d401abd1069657cb47) + `fs-vacuum@1.2.7` + ([@thefourtheye](https://github.com/thefourtheye)) + +#### OTHER PATCHES + +* [`c4dd521`](https://github.com/npm/npm/commit/c4dd5213b2f3283ea0392845e5f78cac4573529e) + [#9506](https://github.com/npm/npm/issues/9506) Make `npm link` work on + Windows when using node pre-release/RC releases. + ([@jon-hall](https://github.com/jon-hall)) +* [`b6bc29c`](https://github.com/npm/npm/commit/b6bc29c1401b3d6b570c09cbef1866bdb0436b59) + [#9544](https://github.com/npm/npm/issues/9549) `process.binding` is being + deprecated, so our only direct usage has been removed. + ([@ChALkeR](https://github.com/ChALkeR)) + +#### MORE DEPENDENCIES! + +* [`d940594`](https://github.com/npm/npm/commit/d940594e479a7f012b6dd6952e8ef985ba2a6216) + `tap@1.4.1` + ([@isaacs](https://github.com/isaacs)) +* [`ee38486`](https://github.com/npm/npm/commit/ee3848669331fd98879a3175789d963543f67ce3) + `which@1.1.2`: Added tests for Windows-related dead code that was previously + helping a silent failure happen. Travis stuff, too. + ([@isaacs](https://github.com/isaacs)) + +#### DOC UPDATES + +* [`475daf5`](https://github.com/npm/npm/commit/475daf54ad07777938d1d7ee1a3e576961e84510) + [#9492](https://github.com/npm/npm/issues/9492) Clarify how `.npmignore` and + `.gitignore` are found and used by npm. + ([@addaleax](https://github.com/addaleax)) +* [`b2c391d`](https://github.com/npm/npm/commit/b2c391d7833249626a6d7650363a83bcc778717a) + `nopt@3.0.4`: Minor clarifications to docs about how array and errors work. + ([@zkat](https://github.com/zkat)) + +### v2.14.3 (2015-09-03): + +#### TEAMS AND ORGS STILL BETA. CLI CODE STILL SOLID. + +Our closed beta for Teens and Orcs is happening! The web team is hard at work +making sure everything looks pretty and usable and such. Once we fix things +stemming from that beta, you can expect the feature to be available publicly. +Some time after that, it'll even be available for free for FOSS orgs. It'll Be +Done When It's Done™. + +#### OH GOOD, I CAN ACTUALLY UPSTREAM NOW + +Looks like last week's release foiled our own test suite when trying to upstream +it to Node! Just a friendly reminder that no, `.npmrc` is no longer included +then you pack/release a package! [@othiym23](https://github.com/othiym23) and +[@isaacs](https://github.com/isaacs) managed to suss the really strange test +failures resulting from that, and we've patched it in this release. + +* [`01a3428`](https://github.com/npm/npm/commit/01a3428534b754dca89a56fd1e49f55cb22f6f25) + [#9476](https://github.com/npm/npm/issues/9476) test: Recreate missing + `.npmrc` files when missing so downstream packagers can run tests on packed + npm. + ([@othiym23](https://github.com/othiym23)) + +#### TALKING ABOUT THE CHANGELOG IN THE CHANGELOG IS LIKE, POMO OR SOMETHING + +* [`c1e7a83`](https://github.com/npm/npm/commit/c1e7a83c0ae7aadf01aecc57cf8a0ae2009d4da8) + [#9431](https://github.com/npm/npm/issues/9431) CHANGELOG: clarify + windows-related nature of patch + ([@saper](https://github.com/saper)) + +#### devDependencies UPDATED + +No actual dep updates this week, but we're bumping a couple of devDeps: + +* [`8454835`](https://github.com/npm/npm/commit/84548351bfd63e3e305d195abbcad24c6b7c3e8e) + `tap@1.4.0`: Add `t.contains()` as alias to `t.match()` + ([@isaacs](https://github.com/isaacs)) +* [`13d2216`](https://github.com/npm/npm/commit/13d22161bcdeb6e1ed095d5ba2f77e6abfffa5eb) + `deep-equal@1.0.1`: Make `null == undefined` in non-strict mode + ([@isaacs](https://github.com/isaacs)) + +### v2.14.2 (2015-08-27): + +#### GETTING THAT PESKY `preferGlobal` WARNING RIGHT + +So apparently the `preferGlobal` option hasn't quite been warning correctly for +some time. But now it should be all better! tl;dr: if you try and install a +dependency with `preferGlobal: true`, and it's _not already_ in your +`package.json`, you'll get a warning that the author would really rather you +install it with `--global`. This should prevent Windows PowerShell from thinking +npm has failed just because of a benign warning. + +* [`bbb25f3`](https://github.com/npm/npm/commit/bbb25f30d582f8979168c79233a9f8f840974f90) + [#8841](https://github.com/npm/npm/issues/8841) + [#9409](https://github.com/npm/npm/issues/9409) The `preferGlobal` + warning shouldn't happen if the dependency being installed is listed in + `devDependencies`. ([@saper](https://github.com/saper)) +* [`222fcec`](https://github.com/npm/npm/commit/222fcec85ccd30d35899e5037079fb14625af4e2) + [#9409](https://github.com/npm/npm/issues/9409) `preferGlobal` now prints a + warning when there are no dependencies for the current package. + ([@zkat](https://github.com/zkat)) +* [`5cfed6d`](https://github.com/npm/npm/commit/5cfed6d7a1a5f2731688cfc8293b5e43a6355393) + [#9409](https://github.com/npm/npm/issues/9409) Verify that + `preferGlobal` is warning as expected (when a `preferGlobal` dependency is + installed, but isn't listed in either `dependencies` or `devDependencies`). + ([@zkat](https://github.com/zkat)) + +#### BUMP +1 + +* [`eeafce2`](https://github.com/npm/npm/commit/eeafce2d06883c0f51bf403415b6bc5f2647eba3) + `validate-npm-package-license@3.0.1`: Include additional metadata in parsed license object, + useful for license checkers. ([@kemitchell](https://github.com/kemitchell)) +* [`1502a28`](https://github.com/npm/npm/commit/1502a285f84aa548806b3eafc8889e6288e810f3) + `normalise-package-data@2.3.2`: Updated to use `validate-npm-package-license@3.0.1`. + ([@othiym23](https://github.com/othiym23)) +* [`cbde823`](https://github.com/npm/npm/commit/cbde8233436bf0ea62a4740869b4990322c20659) + `init-package-json@1.9.1`: Add a `silent` option to suppress output on writing the + generated `package.json`. Also, updated to use `validate-npm-package-license@3.0.1`. + ([@zkat](https://github.com/zkat)) +* [`08fda46`](https://github.com/npm/npm/commit/08fda465452b4d77f1ced8050ee3a35a77fc30a5) + `tar@2.2.0`: Minor improvements. ([@othiym23](https://github.com/othiym23)) +* [`dc2f20b`](https://github.com/npm/npm/commit/dc2f20b53fff77203139c863b48da0e959df2ac9) + `rimraf@2.4.3`: `EPERM` now triggers a delay / retry loop (since Windows throws + this when things still hold a handle). ([@isaacs](https://github.com/isaacs)) +* [`e8acb27`](https://github.com/npm/npm/commit/e8acb273aa67ee0394d0431650e1b2a7d09c8554) + `read@1.0.7`: Fix licensing ambiguity. ([@isaacs](https://github.com/isaacs)) + +#### OTHER STUFF THAT'S RELEVANT + +* [`73a1ee0`](https://github.com/npm/npm/commit/73a1ee0be90fa1928521b63f28bef83b8ffab61d) + [#9386](https://github.com/npm/npm/issues/9386) Include additional unignorable files in + documentation. + ([@mjhasbach](https://github.com/mjhasbach)) +* [`0313e40`](https://github.com/npm/npm/commit/0313e40ee0f757fce8861be590ad668c23d7be53) + [#9396](https://github.com/npm/npm/issues/9396) Improve the `EISDIR` error + message returned by npm's error-handling code to give users a better hint of + what's most likely going on. Usually, error reports with this error code are + about people trying to install things without a `package.json`. + ([@KenanY](https://github.com/KenanY)) +* [`2677457`](https://github.com/npm/npm/commit/26774579c739c5951351e58263cf4d6ea3d66ec8) + [#9360](https://github.com/npm/npm/issues/9360) Make it easier to run + only _some_ of npm tests with lifecycle scripts via `npm tap test/tap/testname.js`. + ([@iarna](https://github.com/iarna)) + +### v2.14.1 (2015-08-20): + +#### SECURITY FIX + +There are patches for two information leaks of moderate severity in `npm@2.14.1`: + +1. In some cases, npm was leaking sensitive credential information into the + child environment when running package and lifecycle scripts. This could + lead to packages being published with files (most notably `config.gypi`, a + file created by `node-gyp` that is a cache of environmental information + regenerated on every run) containing the bearer tokens used to authenticate + users to the registry. Users with affected packages have been notified (and + the affected tokens invalidated), and now npm has been modified to not + upload files that could contain this information, as well as scrubbing the + sensitive information out of the environment passed to child scripts. +2. Per-package `.npmrc` files are used by some maintainers as a way to scope + those packages to a specific registry and its credentials. This is a + reasonable use case, but by default `.npmrc` was packed into packages, + leaking those credentials. npm will no longer include `.npmrc` when packing + tarballs. + +If you maintain packages and believe you may be affected by either +of the above scenarios (especially if you've received a security +notification from npm recently), please upgrade to `npm@2.14.1` as +soon as possible. If you believe you may have inadvertently leaked +your credentials, upgrade to `npm@2.14.1` on the affected machine, +and run `npm logout` and then `npm login`. Your access tokens will be +invalidated, which will eliminate any risk posed by tokens inadvertently +included in published packages. We apologize for the inconvenience this +causes, as well as the oversight that led to the existence of this issue +in the first place. + +Huge thanks to [@ChALkeR](https://github.com/ChALkeR) for bringing these +issues to our attention, and for helping us identify affected packages +and maintainers. Thanks also to the Node.js security working group for +their coördination with the team in our response to this issue. We +appreciate everybody's patience and understanding tremendously. + +* [`b9474a8`](https://github.com/npm/npm/commit/b9474a843ca55b7c5fac6da33989e8eb39aff8b1) + `fstream-npm@1.0.5`: Stop publishing build cruft (`config.gypi`) and per-project + `.npmrc` files to keep local configuration out of published packages. + ([@othiym23](https://github.com/othiym23)) +* [`13c286d`](https://github.com/npm/npm/commit/13c286dbdc3fa8fec4cb79fc4d1ee505c8a41b2e) + [#9348](https://github.com/npm/npm/issues/9348) Filter "private" + (underscore-prefixed, even when scoped to a registry) configuration values + out of child environments. ([@othiym23](https://github.com/othiym23)) + +#### BETTER WINDOWS INTEGRATION, ONE STEP AT A TIME + +* [`e40e71f`](https://github.com/npm/npm/commit/e40e71f2f838a8a42392f44e3eeec04e323ab743) + [#6412](https://github.com/npm/npm/issues/6412) Improve the search strategy + used by the npm shims for Windows to prioritize your own local npm installs. + npm has really needed this tweak for a long time, so hammer on it and let us + know if you run into issues, but with luck it will Just Work. + ([@joaocgreis](https://github.com/joaocgreis)) +* [`204ebbb`](https://github.com/npm/npm/commit/204ebbb3e0cab696a429a878ceeb4a7e78ec2b94) + [#8751](https://github.com/npm/npm/issues/8751) + [#7333](https://github.com/npm/npm/issues/7333) Keep [autorun + scripts](https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) from + interfering with npm package and lifecycle script execution on Windows by + adding `/d` and `/s` when invoking `cmd.exe`. + ([@saper](https://github.com/saper)) + +#### IT SEEMED LIKE AN IDEA AT THE TIME + +* [`286f3d9`](https://github.com/npm/npm/commit/286f3d97103812f0fd84b70352addbe899e258f9) + [#9201](https://github.com/npm/npm/pull/9201) For a while npm was building + HTML partials for use on [`docs.npmjs.com`](https://docs.npmjs.com), but we + weren't actually using them. Stop building them, which makes running the full + test suite and installation process around a third faster. + ([@isaacs](https://github.com/isaacs)) + +#### A SINGLE LONELY DEPENDENCY UPGRADE + +* [`b343b95`](https://github.com/npm/npm/commit/b343b956ef777e321e4251ddc96ec6d80827d9e2) + `request@2.61.0`: Bug fixes and keep-alive tweaks. + ([@simov](https://github.com/simov)) + +### v2.14.0 (2015-08-13): + +#### IT'S HERE! KINDA! + +This release adds support for teens and orcs (err, teams and organizations) to +the npm CLI! Note that the web site and registry-side features of this are +still not ready for public consumption. + +A beta should be starting in the next couple of weeks, and the features +themselves will become public once all that's done. Keep an eye out for more +news! + +All of these changes were done under [`#9011`](https://github.com/npm/npm/pull/9011): + +* [`6424170`](https://github.com/npm/npm/commit/6424170fc17c666a6efc090370ec691e0cab1792) + Added new `npm team` command and subcommands. + ([@zkat](https://github.com/zkat)) +* [`52220d1`](https://github.com/npm/npm/commit/52220d146d474ec29b683bd99c06f75cbd46a9f4) + Added documentation for new `npm team` command. + ([@zkat](https://github.com/zkat)) +* [`4e66830`](https://github.com/npm/npm/commit/4e668304850d02df8eb27a779fda76fe5de645e7) + Updated `npm access` to support teams and organizations. + ([@zkat](https://github.com/zkat)) +* [`ea3eb87`](https://github.com/npm/npm/commit/ea3eb8733d9fa09ce34106b1b19fb1a8f95844a5) + Gussied up docs for `npm access` with new commands. + ([@zkat](https://github.com/zkat)) +* [`6e0b431`](https://github.com/npm/npm/commit/6e0b431c1de5e329c86e57d097aa88ebfedea864) + Fix up `npm whoami` to make the underlying API usable elsewhere. + ([@zkat](https://github.com/zkat)) +* [`f29c931`](https://github.com/npm/npm/commit/f29c931012ce5ccd69c29d83548f27e443bf7e62) + `npm-registry-client@7.0.1`: Upgrade `npm-registry-client` API to support + `team` and `access` calls against the registry. + ([@zkat](https://github.com/zkat)) + +#### A FEW EXTRA VERSION BUMPS + +* [`c977e12`](https://github.com/npm/npm/commit/c977e12cbfa50c2f52fc807f5cc19ba1cc1b39bf) + `init-package-json@1.8.0`: Checks for some `npm@3` metadata. + ([@iarna](https://github.com/iarna)) +* [`5c8c9e5`](https://github.com/npm/npm/commit/5c8c9e5ae177ba7d0d298cfa42f3fc7f0271e4ec) + `columnify@1.5.2`: Updated some dependencies. + ([@timoxley](https://github.com/timoxley)) +* [`5d56742`](https://github.com/npm/npm/commit/5d567425768b75aeab402c817a53d8b2bc60d8de) + `chownr@1.0.1`: Tests, docs, and minor style nits. + ([@isaacs](https://github.com/isaacs)) + +#### ALSO A DOC FIX + +* [`846fcc7`](https://github.com/npm/npm/commit/846fcc79b86984b109a97366b0422f995a45f8bf) + [`#9200`](https://github.com/npm/npm/pull/9200) Remove single quotes + around semver range, thus making it valid semver. + ([@KenanY](https://github.com/KenanY)) + +### v2.13.5 (2015-08-07): + +This is another quiet week for the `npm@2` release. +[@zkat](https://github.com/zkat) has been working hard on polishing the CLI +bits of the registry's new feature to support direct management of teams and +organizations, and [@iarna](https://github.com/iarna) continues to work through +the list of issues blocking the general release of `npm@3`, which is looking +more and more solid all the time. + +[@othiym23](https://github.com/othiym23) and [@zkat](https://github.com/zkat) +have also been at this week's Node.js / io.js [collaborator +summit](https://github.com/nodejs/summit/tree/master), both as facilitators and +participants. This is a valuable opportunity to get some face time with other +contributors and to work through a bunch of important discussions, but it does +leave us feeling kind of sleepy. Running meetings is hard! + +What does that leave for this release? A few of the more tricky bug fixes that +have been sitting around for a little while now, and a couple dependency +upgrades. Nothing too fancy, but most of these were contributed by developers +like _you_, which we think is swell. Thanks! + +#### BUG FIXES + +* [`d7271b8`](https://github.com/npm/npm/commit/d7271b8226712479cdd339bf85faf7e394923e0d) + [#4530](https://github.com/npm/npm/issues/4530) The bash completion script + for npm no longer alters global completion behavior around word breaks. + ([@whitty](https://github.com/whitty)) +* [`c9ce294`](https://github.com/npm/npm/commit/c9ce29415a0a8fc610690b6e9d91b64d6e36cfcc) + [#7198](https://github.com/npm/npm/issues/7198) When setting up dependencies + to be shared via `npm link `, only run the lifecycle scripts during + the original link, not when running `npm link ` or `npm install + --link` against them. ([@murgatroid99](https://github.com/murgatroid99)) +* [`422da66`](https://github.com/npm/npm/commit/422da664bd3ce71313da447f170507faf5aac46a) + [#9108](https://github.com/npm/npm/issues/9108) Clear up minor confusion + around wording in `bundledDependencies` section of `package.json` docs. + ([@derekpeterson](https://github.com/derekpeterson)) +* [`6b42d99`](https://github.com/npm/npm/commit/6b42d99460885e715772d3487b1c548d2bc8a738) + [#9146](https://github.com/npm/npm/issues/9146) Include scripts that run for + `preversion`, `version`, and `postversion` in the section for lifecycle + scripts rather than the generic `npm run-script` output. + ([@othiym23](https://github.com/othiym23)) + +#### NOPE, NOT DONE WITH DEPENDENCY UPDATES + +* [`91a48bb`](https://github.com/npm/npm/commit/91a48bb5ef5a990781c86f8b69b8a32cf4fac2d9) + `chmodr@1.0.1`: Ignore symbolic links when recursively changing mode, just + like the Unix command. ([@isaacs](https://github.com/isaacs)) +* [`4bbc86e`](https://github.com/npm/npm/commit/4bbc86e3825e2eee9a8758ba26bdea0cb6a2581e) + `nock@2.10.0` ([@pgte](https://github.com/pgte)) + +### v2.13.4 (2015-07-30): + +#### JULY ENDS ON A FAIRLY QUIET NOTE + +Hey everyone! I hope you've had a great week. We're having a fairly small +release this week while we wrap up Teams and Orgs (or, as we've taken to calling +it internally, _Teens and Orcs_). + +In other exciting news, a bunch of us are gonna be at the [Node.js Collaborator +Summit](https://github.com/nodejs/summit/issues/1), and you can also find us at +[wafflejs](https://wafflejs.com/) on Wednesday. Hopefully we'll be seeing some +of you there. :) + +#### THE PATCH!!! + +So here it is. The patch. Hope it helps. (Thanks, +[@ktarplee](https://github.com/ktarplee)!) + +* [`2e58c48`](https://github.com/npm/npm/commit/2e58c4819e3cafe4ae23ab7f4a520fe09258cfd7) + [#9033](https://github.com/npm/npm/pull/9033) `npm version` now works on git + submodules + ([@ktarplee](https://github.com/ktarplee)) + +#### OH AND THERE'S A DEV DEPENDENCIES UPDATE + +Hooray. + +* [`d204683`](https://github.com/npm/npm/commit/d2046839d471322e61e3ceb0f00e78e5c481f967) + nock@2.9.1 + ([@pgte](https://github.com/pgte)) + +### v2.13.3 (2015-07-23): + +#### I'M SAVING THE GOOD JOKES FOR MORE INTERESTING RELEASES + +It's pretty hard to outdo last week's release buuuuut~ I promise I'll have a +treat when we release our shiny new **Teams and Organizations** feature! :D +(Coming Soon™). It'll be a real *gem*. + +That means it's a pretty low-key release this week. We got some nice +documentation tweaks, a few bugfixes, and other such things, though! + +Oh, and a _bunch of version bumps_. Thanks, `semver`! + +#### IT'S THE LITTLE THINGS THAT MATTER + +* [`2fac6ae`](https://github.com/npm/npm/commit/2fac6aeffefba2934c3db395b525d931599c34d8) + [#9012](https://github.com/npm/npm/issues/9012) A convenience for releases -- + using the globally-installed npm before now was causing minor annoyances, so + we just use the exact same npm we're releasing to build the new release. + ([@zkat](https://github.com/zkat)) + +#### WHAT DOES THIS BUTTON DO? + +There's a couple of doc updates! The last one might be interesting. + +* [`4cd3205`](https://github.com/npm/npm/commit/4cd32050c0f89b7f1ae486354fa2c35eea302ba5) + [#9002](https://github.com/npm/npm/issues/9002) Updated docs to list the + various files that npm automatically includes and excludes, regardless of + settings. + ([@SimenB](https://github.com/SimenB)) +* [`cf09e75`](https://github.com/npm/npm/commit/cf09e754931739af32647d667b671e72a4c79081) + [#9022](https://github.com/npm/npm/issues/9022) Document the `"access"` field + in `"publishConfig"`. Did you know you don't need to use `--access=public` + when publishing scoped packages?! Just put it in your `package.json`! + Go refresh yourself on scopes packages by [checking our docs](https://docs.npmjs.com/getting-started/scoped-packages) on them. + ([@boennemann](https://github.com/boennemann)) +* [`bfd73da`](https://github.com/npm/npm/commit/bfd73da33349cc2afb8278953b2ae16ea95023de) + [#9013](https://github.com/npm/npm/issues/9013) fixed typo in changelog + ([@radarhere](https://github.com/radarhere)) + +#### THE SEMVER MAJOR VERSION APOCALYPSE IS UPON US + +Basically, `semver` is up to `@5`, and that meant we needed to go in an update a +bunch of our dependencies manually. `node-gyp` is still pending update, since +it's not ours, though! + +* [`9232e58`](https://github.com/npm/npm/commit/9232e58d54c032c23716ef976023d36a42bfdcc9) + [#8972](https://github.com/npm/npm/issues/8972) `init-package-json@1.7.1` + ([@othiym23](https://github.com/othiym23)) +* [`ba44f6b`](https://github.com/npm/npm/commit/ba44f6b4201a4faee025341b123e372d8f45b6d9) + [#8972](https://github.com/npm/npm/issues/8972) `normalize-package-data@2.3.1` + ([@othiym23](https://github.com/othiym23)) +* [`3901d3c`](https://github.com/npm/npm/commit/3901d3cf191880bb4420b1d6b8aedbcd8fc26cdf) + [#8972](https://github.com/npm/npm/issues/8972) `npm-install-checks@1.0.6` + ([@othiym23](https://github.com/othiym23)) +* [`ffcc7dd`](https://github.com/npm/npm/commit/ffcc7dd12f8bb94ff0f64c465c57e460b3f24a24) + [#8972](https://github.com/npm/npm/issues/8972) `npm-package-arg@4.0.2` + ([@othiym23](https://github.com/othiym23)) +* [`7128f9e`](https://github.com/npm/npm/commit/7128f9ec10c0c8482087511b716dbddb54249626) + [#8972](https://github.com/npm/npm/issues/8972) `npm-registry-client@6.5.1` + ([@othiym23](https://github.com/othiym23)) +* [`af28911`](https://github.com/npm/npm/commit/af28911ecd54a844f848c6ae41887097d6aa2f3b) + [#8972](https://github.com/npm/npm/issues/8972) `read-installed@4.0.2` + ([@othiym23](https://github.com/othiym23)) +* [`3cc817a`](https://github.com/npm/npm/commit/3cc817a0f34f698b580ff6ff02308700efc54f7c) + [#8972](https://github.com/npm/npm/issues/8972) node-gyp needs its own version + of semver + ([@othiym23](https://github.com/othiym23)) +* [`f98eccc`](https://github.com/npm/npm/commit/f98eccc6e3a6699ca0aa9ecbad93a3b995583871) + [#8972](https://github.com/npm/npm/issues/8972) `semver@5.0.1`: Stop including + browser builds. + ([@isaacs](https://github.com/isaacs)) + +#### \*BUMP\* + +And some other version bumps for good measure. + +* [`254ecfb`](https://github.com/npm/npm/commit/254ecfb04f026c2fd16427db01a53600c1892c8b) + [#8990](https://github.com/npm/npm/issues/8990) `marked-man@0.1.5`: Fixes an + issue with documentation rendering where backticks in 2nd-level headers would + break rendering (?!?!) + ([@steveklabnik](https://github.com/steveklabnik)) +* [`79efd79`](https://github.com/npm/npm/commit/79efd79ac216da8cee8636fb2ed926b0196a4eb6) + `minimatch@2.0.10`: A pattern like `'*.!(x).!(y)'` should not match a name + like `'a.xyz.yab'`. + ([@isaacs](https://github.com/isaacs)) +* [`39c7dc9`](https://github.com/npm/npm/commit/39c7dc9a4e17cd35a5ed882ba671821c9a900f9e) + `request@2.60.0`: A few bug fixes and doc updates. + ([@simov](https://github.com/simov)) +* [`72d3c3a`](https://github.com/npm/npm/commit/72d3c3a9e1e461608aa21b14c01a650333330da9) + `rimraf@2.4.2`: Minor doc and dep updates + ([@isaacs](https://github.com/isaacs)) +* [`7513035`](https://github.com/npm/npm/commit/75130356a06f5f4fbec3786aac9f9f0b36dfe010) + `nock@2.9.1` + ([@pgte](https://github.com/pgte)) +* [`3d9aa82`](https://github.com/npm/npm/commit/3d9aa82260f0643a32c13d0c1ed16f644b6fd4ab) + Fixes this thing where Kat decided to save `nock` as a regular dependency ;) + ([@othiym23](https://github.com/othiym23)) + +### v2.13.2 (2015-07-16): + +#### HOLD ON TO YOUR TENTACLES... IT'S NPM RELEASE TIME! + +Kat: Hooray! Full team again, and we've got a pretty small patch release this +week, about everyone's favorite recurring issue: git URLs! + +Rebecca: No Way! Again? + +Kat: The ride never ends! In the meantime, there's some fun, exciting work in +the background to get orgs and teams out the door. Keep an eye out for news. :) + +Rebecca: And make sure to keep an eye out for patches for the super-fresh +`npm@3`! + +#### LET'S GIT INKY + +Rebecca: So what's this about another git URL issue? + +Kat: Welp, I apparently broke backwards-compatibility on what are actually +invalid `git+https` URLs! So I'm making it work, but we're gonna deprecate URLs +that look like `git+https://user@host:path/is/here`. + +Rebecca: What should we use instead?! + +Kat: Just do me a solid and use `git+ssh://user@host:path/here` or +`git+https://user@host/absolute/https/path` instead! + +* [`769f06e`](https://github.com/npm/npm/commit/769f06e5455d7a9fc738379de2e05868df0dab6f) + Updated tests for `getResolved` so the URLs are run through + `normalize-git-url`. + ([@zkat](https://github.com/zkat)) +* [`edbae68`](https://github.com/npm/npm/commit/edbae685bf48971e878ced373d6825fc1891ee47) + [#8881](https://github.com/npm/npm/issues/8881) Added tests to verify that `git+https:` URLs are handled compatibly. + ([@zkat](https://github.com/zkat)) + +#### NEWS FLASH! DOCUMENTATION IMPROVEMENTS! + +* [`bad4e014`](https://github.com/npm/npm/commit/bad4e0143cc95754a682f1da543b2b4e196e924b) + [#8924](https://github.com/npm/npm/pull/8924) Make sure documented default + values in `lib/cache.js` properly correspond to current code. + ([@watilde](https://github.com/watilde)) +* [`e7a11fd`](https://github.com/npm/npm/commit/e7a11fdf70e333cdfe3dac94a1a30907adb76d59) + [#8036](https://github.com/npm/npm/issues/8036) Clarify the documentation for + `.npmrc` to clarify that it's not read at the project level when doing global + installs. + ([@espadrine](https://github.com/espadrine)) + +#### STAY FRESH~ + +Kat: That's it for npm core changes! + +Rebecca: Great! Let's look at the fresh new dependencies, then! + +Kat: See you all next week! + +Both: Stay Freeesh~ + +(some cat form of Forrest can be seen snoring in the corner) + +* [`bfa1f45`](https://github.com/npm/npm/bfa1f45ee760d05039557d2245b7e3df9fda8def) + `normalize-git-url@3.0.1`: Fixes url normalization such that `git+https:` + accepts scp syntax, but get converted into absolute-path `https:` URLs. Also + fixes scp syntax so you can have absolute paths after the `:` + (`git@myhost.org:/some/absolute/place.git`) + ([@zkat](https://github.com/zkat)) +* [`6f757d2`](https://github.com/npm/npm/6f757d22b53f91da0bebec6b5d16c1f4dbe130b4) + `glob@5.0.15`: Better handling of ENOTSUP + ([@isaacs](https://github.com/isaacs)) +* [`0920819`](https://github.com/npm/npm/09208197fb8b0c6d5dbf6bd7f59970cf366de989) + `node-gyp@2.0.2`: Fixes an issue with long paths on Win32 + ([@TooTallNate](https://github.com/TooTallNate)) + +### v2.13.1 (2015-07-09): + +#### KAUAI WAS NICE. I MISS IT. + +But Forrest's still kinda on vacation, and not just mentally, because he's +hanging out with the fine meatbags at CascadiaFest. Enjoy this small bug +release. + +#### MAKE OURSELVES HAPPY + +* [`40981f2`](https://github.com/npm/npm/commit/40981f2e0c9c12bb003ccf188169afd1d201f5af) + [#8862](https://github.com/npm/npm/issues/8862) Make the lifecycle's safety + check work with scoped packages. ([@tcort](https://github.com/tcort)) +* [`5125856`](https://github.com/npm/npm/commit/512585622481dbbda9a0306932468d59efaff658) + [#8855](https://github.com/npm/npm/issues/8855) Make dependency versions of + `"*"` match `"latest"` when all versions are prerelease. + ([@iarna](https://github.com/iarna)) +* [`22fdc1d`](https://github.com/npm/npm/commit/22fdc1d52602ba7098af978c75fca8f7d1060141) + Visually emphasize the correct way to write lifecycle scripts. + ([@josh-egan](https://github.com/josh-egan)) + +#### MAKE TRAVIS HAPPY + +* [`413c3ac`](https://github.com/npm/npm/commit/413c3ac2ab2437f3011c6ca0d1630109ec14e604) + Use npm's `2.x` branch for testing its `2.x` branch. + ([@iarna](https://github.com/iarna)) +* [`7602f64`](https://github.com/npm/npm/commit/7602f64826f7a465d9f3a20bd87a376d992607e6) + Don't prompt for GnuPG passphrase in version lifecycle tests. + ([@othiym23](https://github.com/othiym23)) + +#### MAKE `npm outdated` HAPPY + +* [`d338668`](https://github.com/npm/npm/commit/d338668601d1ebe5247a26237106e80ea8cd7f48) + [#8796](https://github.com/npm/npm/issues/8796) `fstream-npm@1.0.4`: When packing the + package tarball, npm no longer crashes for packages with certain combinations of + `.npmignore` entries, `.gitignore` entries, and lifecycle scripts. + ([@iarna](https://github.com/iarna)) +* [`dbe7c9c`](https://github.com/npm/npm/commit/dbe7c9c74734be870d16dd61b9e7f746123011f6) + `nock@2.7.0`: Add matching based on query strings. + ([@othiym23](https://github.com/othiym23)) + +There are new versions of `strip-ansi` and `ansi-regex`, but npm only uses them +indirectly, so we pushed them down into their dependencies where they can get +updated at their own pace. + +* [`06b6ca5`](https://github.com/npm/npm/commit/06b6ca5b5333025f10c8d901628859bd4678e027) + undeduplicate `ansi-regex` ([@othiym23](https://github.com/othiym23)) +* [`b168e33`](https://github.com/npm/npm/commit/b168e33ad46faf47020a45f72ba8cec8c644bdb9) + undeduplicate `strip-ansi` ([@othiym23](https://github.com/othiym23)) + +### v2.13.0 (2015-07-02): + +#### FORREST IS OUT! LET'S SNEAK IN ALL THE THINGS! + +Well, not _everything_. Just a couple of goodies, like the new `npm ping` +command, and the ability to add files to the commits created by `npm version` +with the new version hooks. There's also a couple of bugfixes in `npm` itself +and some of its dependencies. Here we go! + +#### YES HELLO THIS IS NPM REGISTRY SORRY NO DOG HERE + +Yes, that's right! We now have a dedicated `npm ping` command. It's super simple +and super easy. You ping. We tell you whether you pinged right by saying hello +right back. This should help out folks dealing with things like proxy issues or +other registry-access debugging issues. Give it a shot! + +This addresses [#5750](https://github.com/npm/npm/issues/5750), and will help +with the `npm doctor` stuff described in +[#6756](https://github.com/npm/npm/issues/6756). + +* [`f1f7a85`](https://github.com/npm/npm/commit/f1f7a85) + Add ping command to CLI + ([@michaelnisi](https://github.com/michaelnisi)) +* [`8cec629`](https://github.com/npm/npm/commit/8cec629) + Add ping command to npm-registry-client + ([@michaelnisi](https://github.com/michaelnisi)) +* [`0c0c92d`](https://github.com/npm/npm/0c0c92d) + Fixed ping command issues (added docs, tests, fixed minor bugs, etc) + ([@zkat](https://github.com/zkat)) + +#### I'VE WANTED THIS FOR `version` SINCE LIKE LITERALLY FOREVER AND A DAY + +Seriously! This patch lets you add files to the `version` commit before it's +made, So you can add additional metadata files, more automated changes to +`package.json`, or even generate `CHANGELOG.md` automatically pre-commit if +you're into that sort of thing. I'm so happy this is there I can't even. Do you +have other fun usecases for this? Tell +[npmbot (@npmjs)](http://twitter.com/npmjs) about it! + +* [`582f170`](https://github.com/npm/npm/commit/582f170) + [#8620](https://github.com/npm/npm/issues/8620) version: Allow scripts to add + files to the commit. + ([@jamestalmage](https://github.com/jamestalmage)) + +#### ALL YOUR FILE DESCRIPTORS ARE BELONG TO US + +We've had problems in the past with things like `EMFILE` errors popping up when +trying to install packages with a bunch of dependencies. Isaac patched up +[`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to handle this case +better, so we should be seeing fewer of those. + +* [`022691a`](https://github.com/npm/npm/commit/022691a) + `graceful-fs@4.1.2`: Updated so we can monkey patch globally. + ([@isaacs](https://github.com/isaacs)) +* [`c9fb0fd`](https://github.com/npm/npm/commit/c9fb0fd) + Globally monkey-patch graceful-fs. This should fix some errors when installing + packages with lots of dependencies. + ([@isaacs](https://github.com/isaacs)) + +#### READ THE FINE DOCS. THEY'VE IMPROVED + +* [`5587d0d`](https://github.com/npm/npm/commit/5587d0d) + Nice clarification for `directories.bin` + ([@ujane](https://github.com/ujane)) +* [`20673c7`](https://github.com/npm/npm/commit/20673c7) + Hey, Windows folks! Check out + [`nvm-windows`](https://github.com/coreybutler/nvm-windows) + ([@ArtskydJ](https://github.com/ArtskydJ)) + +#### MORE NUMBERS! MORE VALUE! + +* [`5afa2d5`](https://github.com/npm/npm/commit/5afa2d5) + `validate-npm-package-name@2.2.2`: Documented package name rules in README + ([@zeusdeux](https://github.com/zeusdeux)) +* [`021f4d9`](https://github.com/npm/npm/commit/021f4d9) + `rimraf@2.4.1`: [#74](https://github.com/isaacs/rimraf/issues/74) Use async + function for bin (to better handle Window's `EBUSY`) + ([@isaacs](https://github.com/isaacs)) +* [`5223432`](https://github.com/npm/npm/commit/5223432) + `osenv@0.1.3`: Use `os.homedir()` polyfill for more reliable output. io.js + added the function and the polyfill does a better job than the prior solution. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`8ebbc90`](https://github.com/npm/npm/commit/8ebbc90) + `npm-cache-filename@1.0.2`: Make sure different git references get different + cache folders. This should prevent `foo/bar#v1.0` and `foo/bar#master` from + sharing the same cache folder. + ([@tomekwi](https://github.com/tomekwi)) +* [`367b854`](https://github.com/npm/npm/commit/367b854) + `lru-cache@2.6.5`: Minor test/typo changes + ([@isaacs](https://github.com/isaacs)) +* [`9fcae61`](https://github.com/npm/npm/commit/9fcae61) + `glob@5.0.13`: Tiny doc change + stop firing 'match' events for ignored items. + ([@isaacs](https://github.com/isaacs)) + +#### OH AND ONE MORE THING + +* [`7827249`](https://github.com/npm/npm/commit/7827249) + `PeerDependencies` errors now include the package version. + ([@NickHeiner](https://github.com/NickHeiner)) + +### v2.12.1 (2015-06-25): + +#### HEY WHERE DID EVERYBODY GO + +I keep [hearing some commotion](https://github.com/npm/npm/releases/tag/v3.0.0). +Is there something going on? Like, a party or something? Anyway, here's a small +release with at least two significant bug fixes, at least one of which some of +you have been waiting for for quite a while. + +#### REMEMBER WHEN I SAID "REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS?"? + +`npm@2.12.0` has a change that introduces a fix for a permissions problem +whereby the `_locks` directory in the cache directory can up being owned by +root. The fix in 2.12.0 takes care of that problem, but introduces a new +problem for Windows users where npm tries to call `process.getuid()`, which +doesn't exist on Windows. It was easy enough to fix (but more or less +impossible to test, thanks to all the external dependencies involved with +permissions and platforms and whatnot), but as a result, Windows users might +want to skip `npm@2.12.0` and go straight to `npm@2.12.1`. Sorry about that! + +* [`7e5da23`](https://github.com/npm/npm/commit/7e5da238ee869201fdb9027c27b79b0f76b440a8) + When using the new, "fixed" cache directory creator, be extra-careful to not + call `process.getuid()` on platforms that lack it. + ([@othiym23](https://github.com/othiym23)) + +#### WHEW! ALL DONE FIXING GIT FOREVER! + +New npm CLI team hero [@zkat](https://github.com/zkat) has finally (FINALLY) +fixed the regression somebody (hi!) introduced a couple months ago whereby git +URLs of the format `git+ssh://user@githost.com:org/repo.git` suddenly stopped +working, and also started being saved (and cached) incorrectly. I am 100% sure +there are absolutely no more bugs in the git caching code at all ever. Mm hm. +Yep. Pretty sure. Maybe. Hmm... I hope. + +*Sighs audibly.* + +[Let us know](http://github.com/npm/npm/issues/new) if we broke something else +with this fix. + +* [`94ca4a7`](https://github.com/npm/npm/commit/94ca4a711619ba8e40ce3d20bc42b13cdb7611b7) + [#8031](https://github.com/npm/npm/issues/8031) Even though + `git+ssh://user@githost.com:org/repo.git` isn't a URL, treat it like one for + the purposes of npm. ([@zkat](https://github.com/zkat)) +* [`e7f56e5`](https://github.com/npm/npm/commit/e7f56e5a97fcf1c52d5c5bee71303b0126129815) + [#8031](https://github.com/npm/npm/issues/8031) `normalize-git-url@2.0.0`: + Handle git URLs (and URL-like remote refs) in a manner consistent with npm's + docs. ([@zkat](https://github.com/zkat)) + +#### YEP, THERE ARE STILL DEPENDENCY UPGRADES + +* [`679bf47`](https://github.com/npm/npm/commit/679bf4745ac2cfbb01c9ce273e189807fd04fa33) + [#40](http://github.com/npm/read-installed/issues/40) `read-installed@4.0.1`: + Handle prerelease versions in top-level dependencies not in `package.json` + without marking those packages as invalid. + ([@benjamn](https://github.com/benjamn)) +* [`3a67410`](https://github.com/npm/npm/commit/3a6741068c9119174c920496778aeee870ebdac0) + `tap@1.3.1` ([@isaacs](https://github.com/isaacs)) +* [`151904a`](https://github.com/npm/npm/commit/151904af39dc24567f8c98529a2a64a4dbcc960a) + `nopt@3.0.3` ([@isaacs](https://github.com/isaacs)) + +### v2.12.0 (2015-06-18): + +#### REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS? + +About [a million people](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+EACCES+_locks) +have filed issues related to having a tough time using npm after they've run +npm once or twice with sudo. "Don't worry about it!" I said. "We've fixed all +those permissions problems ages ago! Use this one weird trick and you'll never +have to deal with this again!" + +Well, uh, if you run npm with root the first time you run npm on a machine, it +turns out that the directory npm uses to store lockfiles ends up being owned by +the wrong user (almost always root), and that can, well, it can cause problems +sometimes. By which I mean every time you run npm without being root it'll barf +with `EACCES` errors. Whoops! + +This is an obnoxious regression, and to prevent it from recurring, we've made +it so that the cache, cached git remotes, and the lockfile directories are all +created and maintained using the same utilty module, which not only creates the +relevant paths with the correct permissions, but will fix the permissions on +those directories (if it can) when it notices that they're broken. An `npm +install` run as root ought to be sufficient to fix things up (and if that +doesn't work, first tell us about it, and then run `sudo chown -R $(whoami) +$HOME/.npm`) + +Also, I apologize for inadvertently gaslighting any of you by claiming this bug +wasn't actually a bug. I do think we've got this permanently dealt with now, +but I'll be paying extra-close attention to permissions issues related to the +cache for a while. + +* [`85d1a53`](https://github.com/npm/npm/commit/85d1a53d7b5e0fc04823187e522ae3711ede61fa) + Set permissions on lock directory to the owner of the process. + ([@othiym23](https://github.com/othiym23)) + +#### I WENT TO NODECONF AND ALL I GOT WAS THIS LOUSY SPDX T-SHIRT + +That's not literally true. We spent very little time discussing SPDX, +[@kemitchell](https://github.com/kemitchell) is a champ, and I had a lot of fun +playing drum & bass to a mostly empty Boogie Barn and only ended up with one +moderately severe cold for my pains. Another winner of a NodeConf! (I would +probably wear a SPDX T-shirt if somebody gave me one, though.) + +A bunch of us did have a spirited discussion of the basics of open-source +intellectual property, and the convergence of me, +[@kemitchell](https://github.com/kemitchell), and +[@jandrieu](https://github.com/jandrieu) in one place allowed us to hammmer out +a small but significant issue that had been bedeviling early adopters of the +new SPDX expression syntax in `package.json` license fields: how to deal with +packages that are left without a license on purpose. + +Refer to [the docs](https://github.com/npm/npm/blob/16a3dd545b10f8a2464e2037506ce39124739b41/doc/files/package.json.md#license) +for the specifics, but the short version is that instead of using +`LicenseRef-LICENSE` for proprietary licenses, you can now use either +`UNLICENSED` if you want to make it clear that you don't _want_ your software +to be licensed (and want npm to stop warning you about this), or `SEE LICENSE +IN ` if there's a license with custom text you want to use. At some +point in the near term, we'll be updating npm to verify that the mentioned +file actually exists, but for now you're all on the honor system. + +* [`4827fc7`](https://github.com/npm/npm/commit/4827fc784117c17f35dd9b51b21d1eff6094f661) + [#8557](https://github.com/npm/npm/issues/8557) + `normalize-package-data@2.2.1`: Allow `UNLICENSED` and `SEE LICENSE IN + ` in "license" field of `package.json`. + ([@kemitchell](https://github.com/kemitchell)) +* [`16a3dd5`](https://github.com/npm/npm/commit/16a3dd545b10f8a2464e2037506ce39124739b41) + [#8557](https://github.com/npm/npm/issues/8557) Document the new accepted + values for the "license" field. + ([@kemitchell](https://github.com/kemitchell)) +* [`8155311`](https://github.com/npm/npm/commit/81553119350deaf199e79e38e35b52a5c8ad206c) + [#8557](https://github.com/npm/npm/issues/8557) `init-package-json@1.7.0`: + Support new "license" field values at init time. + ([@kemitchell](https://github.com/kemitchell)) + +#### SMALLISH BUG FIXES + +* [`9d8cac9`](https://github.com/npm/npm/commit/9d8cac94a258db648a2b1069b1c8c6529c79d013) + [#8548](https://github.com/npm/npm/issues/8548) Remove extraneous newline + from `npm view` output, making it easier to use in shell scripts. + ([@eush77](https://github.com/eush77)) +* [`765fd4b`](https://github.com/npm/npm/commit/765fd4bfca8ea3e2a4a399765b17eec40a3d893d) + [#8521](https://github.com/npm/npm/issues/8521) When checking for outdated + packages, or updating packages, raise an error when the registry is + unreachable instead of silently "succeeding". + ([@ryantemple](https://github.com/ryantemple)) + +#### SMALLERISH DOCUMENTATION TWEAKS + +* [`5018335`](https://github.com/npm/npm/commit/5018335ce1754a9f771954ecbc1a93acde9b8c0a) + [#8365](https://github.com/npm/npm/issues/8365) Add details about which git + environment variables are whitelisted by npm. + ([@nmalaguti](https://github.com/nmalaguti)) +* [`bed9edd`](https://github.com/npm/npm/commit/bed9edddfdcc6d22a80feab33b53e4ef9172ec72) + [#8554](https://github.com/npm/npm/issues/8554) Fix typo in version docs. + ([@rainyday](https://github.com/rainyday)) + +#### WELL, I GUESS THERE ARE MORE DEPENDENCY UPGRADES + +* [`7ce2f06`](https://github.com/npm/npm/commit/7ce2f06f6f34d469b1d2e248084d4f3fef10c05e) + `request@2.58.0`: Refactor tunneling logic, and use `extend` instead of + abusing `util._extend`. ([@simov](https://github.com/simov)) +* [`e6c6195`](https://github.com/npm/npm/commit/e6c61954aad42e20eec49745615c7640b2026a6c) + `nock@2.6.0`: Refined interception behavior. + ([@pgte](https://github.com/pgte)) +* [`9583cc3`](https://github.com/npm/npm/commit/9583cc3cb192c2fced006927cfba7cd37b588605) + `fstream-npm@1.0.3`: Ensure that `main` entry in `package.json` is always + included in the bundled package tarball. + ([@coderhaoxin](https://github.com/coderhaoxin)) +* [`df89493`](https://github.com/npm/npm/commit/df894930f2716adac28740b29b2e863170919990) + `fstream@1.0.7` ([@isaacs](https://github.com/isaacs)) +* [`9744049`](https://github.com/npm/npm/commit/974404934758124aa8ae5b54f7d5257c3bd6b588) + `dezalgo@1.0.3`: `dezalgo` should be usable in the browser, and can be now + that `asap` has been upgraded to be browserifiable. + ([@mvayngrib](https://github.com/mvayngrib)) + +### v2.11.3 (2015-06-11): + +This was a very quiet week. This release was done by +[@iarna](https://github.com/iarna), while the rest of the team hangs out at +NodeConf Adventure! + +#### TESTS IN 0.8 FAIL LESS + +* [`5b3b3c2`](https://github.com/npm/npm/commit/5b3b3c2) + [#8491](//github.com/npm/npm/pull/8491) + Updates a test to use only 0.8 compatible features + ([@watilde](https://github.com/watilde)) + +#### THE TREADMILL OF UPDATES NEVER CEASES + +* [`9f439da`](https://github.com/npm/npm/commit/9f439da) + `spdx@0.4.1`: License range updates + ([@kemitchell](https://github.com/kemitchell)) +* [`2dd055b`](https://github.com/npm/npm/commit/2dd055b) + `normalize-package-data@2.2.1`: Fixes a crashing bug when the package.json + `scripts` property is not an object. + ([@iarna](https://github.com/iarna)) +* [`e02e85d`](https://github.com/npm/npm/commit/e02e85d) + `osenv@0.1.2`: Switches to using the `os-tmpdir` module instead of + `os.tmpdir()` for greate consistency in behavior between node versions. + ([@iarna](https://github.com/iarna)) +* [`a6f0265`](https://github.com/npm/npm/commit/a6f0265) + `ini@1.3.4` ([@isaacs](https://github.com/isaacs)) +* [`7395977`](https://github.com/npm/npm/commit/7395977) + `rimraf@2.4.0` ([@isaacs](https://github.com/isaacs)) + +### v2.11.2 (2015-06-04): + +Another small release this week, brought to you by the latest addition to the +CLI team, [@zkat](https://github.com/zkat) (Hi, all!) + +Mostly small documentation tweaks and version updates. Oh! And `npm outdated` +is actually sorted now. Rejoice! + +It's gonna be a while before we get another palindromic version number. Enjoy it +while it lasts. :3 + +#### QUALITY OF LIFE HAS NEVER BEEN BETTER + +* [`31aada4`](https://github.com/npm/npm/commit/31aada4ccc369c0903ff7f233f464955d12c6fe2) + [#8401](https://github.com/npm/npm/issues/8401) `npm outdated` output is just + that much nicer to consume now, due to sorting by name. + ([@watilde](https://github.com/watilde)) +* [`458a919`](https://github.com/npm/npm/commit/458a91925d8b20c5e672ba71a86745aad654abaf) + [#8469](https://github.com/npm/npm/pull/8469) Explicitly set `cwd` for + `preversion`, `version`, and `postversion` scripts. This makes the scripts + findable relative to the root dir. + ([@alexkwolfe](https://github.com/alexkwolfe)) +* [`55d6d71`](https://github.com/npm/npm/commit/55d6d71562e979e745c9db88861cc39f99b9f3ec) + Ensure package name and version are included in display during `npm version` + lifecycle execution. Gets rid of those little `undefined`s in the console. + ([@othiym23](https://github.com/othiym23)) + +#### WORDS HAVE NEVER BEEN QUITE THIS READABLE + +* [`3901e49`](https://github.com/npm/npm/commit/3901e4974c800e7f9fba4a5b2ff88da1126d5ef8) + [#8462](https://github.com/npm/npm/pull/8462) English apparently requires + correspondence between indefinite articles and attached nouns. + ([@Enet4](https://github.com/Enet4)) +* [`5a744e4`](https://github.com/npm/npm/commit/5a744e4b143ef7b2f50c80a1d96fdae4204d452b) + [#8421](https://github.com/npm/npm/pull/8421) The effect of `npm prune`'s + `--production` flag and how to use it have been documented a bit better. + ([@foiseworth](https://github.com/foiseworth)) +* [`eada625`](https://github.com/npm/npm/commit/eada625993485f0a2c5324b06f02bfa0a95ce4bc) + We've updated our `.mailmap` and `AUTHORS` files to make sure credit is given + where credit is due. ([@othiym23](https://github.com/othiym23)) + +#### VERSION NUMBERS HAVE NEVER BEEN BIGGER + +* [`c929fd1`](https://github.com/npm/npm/commit/c929fd1d0604b5878ed05706447e078d3e41f5b3) + `readable-stream@1.1.13`: Manually deduped `v1.1.13` (streams3) to make + deduping more reliable on `npm@<3`. ([@othiym23](https://github.com/othiym23)) +* [`a9b4b78`](https://github.com/npm/npm/commit/a9b4b78dcc85571fd1cdd737903f7f37a5e6a755) + `request@2.57.0`: Replace dependency on IncomingMessage's `.client` with + `.socket` as the former was deprecated in io.js 2.2.0. + ([@othiym23](https://github.com/othiym23)) +* [`4b5e557`](https://github.com/npm/npm/commit/4b5e557a23cdefd521ad154111e3d4dcc81f1cdb) + `abbrev@1.0.7`: Better testing, with coverage. + ([@othiym23](https://github.com/othiym23)) +* [`561affe`](https://github.com/npm/npm/commit/561affee21df9bbea5a47298f2452f533be8f359) + `semver@4.3.6`: .npmignore added for less cruft, and better testing, with coverage. + ([@othiym23](https://github.com/othiym23)) +* [`60aef3c`](https://github.com/npm/npm/commit/60aef3cf5d84d757752db3eb8ede2cb385469e7b) + `graceful-fs@3.0.8`: io.js fixes. + ([@zkat](https://github.com/zkat)) +* [`f8bd453`](https://github.com/npm/npm/commit/f8bd453b1a1c46ba7666cb166595e8a011eae443) + `config-chain@1.1.9`: Added MIT license to package.json + ([@zkat](https://github.com/zkat)) + +### v2.11.1 (2015-05-28): + +This release brought to you from poolside at the Omni Amelia Island Resort and +JSConf 2015, which is why it's so tiny. + +#### CONFERENCE WIFI CAN'T STOP THESE BUG FIXES + +* [`cf109a6`](https://github.com/npm/npm/commit/cf109a682f38a059a994da953d5c1b4aaece5e2f) + [#8381](https://github.com/npm/npm/issues/8381) Documented a subtle gotcha + with `.npmrc`, which is that it needs to have its permissions set such that + only the owner can read or write the file. + ([@colakong](https://github.com/colakong)) +* [`180da67`](https://github.com/npm/npm/commit/180da67c9fa53103d625e2f031626c2453c7ebcd) + [#8365](https://github.com/npm/npm/issues/8365) Git 2.3 adds support for + `GIT_SSH_COMMAND`, which allows you to pass an explicit git command (with, + for example, a specific identity passed in on the command line). + ([@nmalaguti](https://github.com/nmalaguti)) + +#### MY (VIRGIN) PINA COLADA IS GETTING LOW, BETTER UPGRADE THESE DEPENDENCIES + +* [`b72de41`](https://github.com/npm/npm/commit/b72de41c5cc9f0c46d3fa8f062c75bd273641474) + `node-gyp@2.0.0`: Use a newer version of `gyp`, and generally improve support + for Visual Studios and Windows. + ([@TooTallNate](https://github.com/TooTallNate)) +* [`8edbe21`](https://github.com/npm/npm/commit/8edbe210af41e8f248f5bb92c72de92f54fda3b1) + `node-gyp@2.0.1`: Don't crash when Python's version doesn't parse as valid + semver. ([@TooTallNate](https://github.com/TooTallNate)) +* [`ba0e0a8`](https://github.com/npm/npm/commit/ba0e0a845a4f29717aba566b416a27d1a22f5d08) + `glob@5.0.10`: Add coverage to tests. ([@isaacs](https://github.com/isaacs)) +* [`7333701`](https://github.com/npm/npm/commit/7333701b5d4f01673f37d64992c63c4e15864d6d) + `request@2.56.0`: Bug fixes and dependency upgrades. + ([@simov](https://github.com/simov)) + +### v2.11.0 (2015-05-21): + +For the first time in a very long time, we've added new events to the life +cycle used by `npm run-script`. Since running `npm version (major|minor|patch)` +is typically the last thing many developers do before publishing their updated +packages, it makes sense to add life cycle hooks to run tests or otherwise +preflight the package before doing a full publish. Thanks, as always, to the +indefatigable [@watilde](https://github.com/watilde) for yet another great +usability improvement for npm! + +#### FEATURELETS + +* [`b07f7c7`](https://github.com/npm/npm/commit/b07f7c7c1e5021730b3c320f1b3a46e70f8a21ff) + [#7906](https://github.com/npm/npm/issues/7906) + Add new [`scripts`](https://github.com/npm/npm/blob/master/doc/misc/npm-scripts.md) to + allow you to run scripts before and after + the [`npm version`](https://github.com/npm/npm/blob/master/doc/cli/npm-version.md) + command has run. This makes it easy to, for instance, require that your + test suite passes before bumping the version by just adding `"preversion": + "npm test"` to the scripts section of your `package.json`. + ([@watilde](https://github.com/watilde)) +* [`8a46136`](https://github.com/npm/npm/commit/8a46136f42e416cbadb533bcf89d73d681ed421d) + [#8185](https://github.com/npm/npm/issues/8185) + When we get a "not found" error from the registry, we'll now check to see + if the package name you specified is invalid and if so, give you a better + error message. ([@thefourtheye](https://github.com/thefourtheye)) + +#### BUG FIXES + +* [`9bcf573`](https://github.com/npm/npm/commit/9bcf5730bd0316f210dafea898afe9103849cea9) + [#8324](https://github.com/npm/npm/pull/8324) On Windows, when you've configured a + custom `node-gyp`, run it with node itself instead of using the default open action (which + is almost never what you want). ([@bangbang93](https://github.com/bangbang93)) +* [`1da9b04`](https://github.com/npm/npm/commit/1da9b0411d3416c7fca17d08cbbcfca7ae86e92d) + [#7195](https://github.com/npm/npm/issues/7195) + [#7260](https://github.com/npm/npm/issues/7260) `npm-registry-client@6.4.0`: + (Re-)allow publication of existing mixed-case packages (part 1). + ([@smikes](https://github.com/smikes)) +* [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) + [#7195](https://github.com/npm/npm/issues/7195) + [#7260](https://github.com/npm/npm/issues/7260) + `normalize-package-data@2.2.0`: (Re-)allow publication of existing mixed-case + packages (part 2). ([@smikes](https://github.com/smikes)) + +#### DOCUMENTATION IMPROVEMENTS + +* [`f62ee05`](https://github.com/npm/npm/commit/f62ee05333b141539a8e851c620dd2e82ff06860) + [#8314](https://github.com/npm/npm/issues/8314) Update the README to warn + folks away from using the CLI's internal API. For the love of glob, just use a + child process to run the CLI! ([@claycarpenter](https://github.com/claycarpenter)) +* [`1093921`](https://github.com/npm/npm/commit/1093921c04db41ab46db24a170a634a4b2acd8d9) + [#8279](https://github.com/npm/npm/pull/8279) + Update the documentation to note that, yes, you can publish scoped packages to the + public registry now! ([@mantoni](https://github.com/mantoni)) +* [`f87cde5`](https://github.com/npm/npm/commit/f87cde5234a760d3e515ffdaacaed6f5b71dbf44) + [#8292](https://github.com/npm/npm/pull/8292) + Fix typo in an example and grammar in the description in + the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). + ([@vshih](https://github.com/vshih)) +* [`d3526ce`](https://github.com/npm/npm/commit/d3526ceb09a0c29fdb7d4124536ae09057d033e7) + Improve the formatting in + the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). + ([@othiym23](https://github.com/othiym23)) +* [`19fe6d2`](https://github.com/npm/npm/commit/19fe6d20883e28956ff916fe4dae42d73ee6195b) + [#8311](https://github.com/npm/npm/pull/8311) + Update [README.md](https://github.com/npm/npm#readme) to use syntax highlighting in + its code samples and bits of shell scripts. ([@SimenB](https://github.com/SimenB)) + +#### DEPENDENCY UPDATES! ALWAYS AND FOREVER! + +* [`fc52160`](https://github.com/npm/npm/commit/fc52160d0223226fffe4166f42fdfd3b899b3c1e) + [#4700](https://github.com/npm/npm/issues/4700) [#5044](https://github.com/npm/npm/issues/5044) + `init-package-json@1.6.0`: Make entering an invalid version while running `npm init` give + you an immediate error and prompt you to correct it. ([@watilde](https://github.com/watilde)) +* [`738853e`](https://github.com/npm/npm/commit/738853eb1f55636476a2a410c2c04732eec9d51e) + [#7763](https://github.com/npm/npm/issues/7763) `fs-write-stream-atomic@1.0.3`: Fix a bug + where errors would not propagate, making error messages unhelpful. + ([@iarna](https://github.com/iarna)) +* [`6d74a2d`](https://github.com/npm/npm/commit/6d74a2d2ac7f92750cf6a2cfafae1af23b569098) + `npm-package-arg@4.0.1`: Fix tests on windows ([@Bacra](https://github.com)) and with + more recent `hosted-git-info`. ([@iarna](https://github.com/iarna)) +* [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) + `hosted-git-info@2.1.4`: Correct spelling in its documentation. + ([@iarna](https://github.com/iarna)) +* [`d7956ca`](https://github.com/npm/npm/commit/d7956ca17c057d5383ff0d3fc5cf6ac2940b034d) + `glob@5.0.7`: Fix a bug where unusual error conditions could make + further use of the module fail. ([@isaacs](https://github.com/isaacs)) +* [`44f7d74`](https://github.com/npm/npm/commit/44f7d74c5d3181d37da7ea7949c86b344153f8d9) + `tap@1.1.0`: Update to the most recent tap to get a whole host of bug + fixes and integration with [coveralls](https://coveralls.io/). + ([@isaacs](https://github.com/isaacs)) +* [`c21e8a8`](https://github.com/npm/npm/commit/c21e8a8d94bcf0ad79dc583ddc53f8366d4813b3) + `nock@2.2.0` ([@othiym23](https://github.com/othiym23)) + +#### LICENSE FILES FOR THE LICENSE GOD + +* Add missing ISC license file to package ([@kasicka](https://github.com/kasicka)): + * [`aa9908c`](https://github.com/npm/npm/commit/aa9908c20017729673b9d410b77f9a16b7aae8a4) `realize-package-specifier@3.0.1` + * [`23a3b1a`](https://github.com/npm/npm/commit/23a3b1a726b9176c70ce0ccf3cd9d25c54429bdf) `fs-vacuum@1.2.6` + * [`8e04bba`](https://github.com/npm/npm/commit/8e04bba830d4353d84751d21803cd127c96153a7) `dezalgo@1.0.2` + * [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) `hosted-git-info@2.1.4` + * [`6a54917`](https://github.com/npm/npm/commit/6a54917fbd4df995495a95d4b548defd44b77c93) `write-file-atomic@1.1.2` + * [`971f92c`](https://github.com/npm/npm/commit/971f92c4a4e5514217d1e4db45d1ccf71a60ff19) `async-some@1.0.2` + * [`67b50b7`](https://github.com/npm/npm/commit/67b50b7667a42bb3340a660eb2e617e1a554d2d4) `normalize-git-url@1.0.1` + +#### SPDX LICENSE UPDATES + +* Switch license to + [BSD-2-Clause](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) from + plain "BSD" ([@isaacs](https://github.com/isaacs)): + * [`efdb733`](https://github.com/npm/npm/commit/efdb73332eeedcad4c609796929070b62abb37ab) `npm-user-validate@0.1.2` + * [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) `normalize-package-data@2.2.0` +* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from + [BSD](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) + ([@isaacs](https://github.com/isaacs)): + * [`c300956`](https://github.com/npm/npm/commit/c3009565a964f0ead4ac4ab234b1a458e2365f17) `block-stream@0.0.8` + * [`1de1253`](https://github.com/npm/npm/commit/1de125355765fecd31e682ed0ff9d2edbeac0bb0) `lockfile@1.0.1` + * [`0d5698a`](https://github.com/npm/npm/commit/0d5698ab132e376c7aec93ae357c274932116220) `osenv@0.1.1` + * [`2e84921`](https://github.com/npm/npm/commit/2e84921474e1ffb18de9fce4616e73171fa8046d) `abbrev@1.0.6` + * [`872fac9`](https://github.com/npm/npm/commit/872fac9d10c11607e4d0348c08a683b84e64d30b) `chmodr@0.1.1` + * [`01eb7f6`](https://github.com/npm/npm/commit/01eb7f60acba584346ad8aae846657899f3b6887) `chownr@0.0.2` + * [`294336f`](https://github.com/npm/npm/commit/294336f0f31c7b9fe31a50075ed750db6db134d1) `read@1.0.6` + * [`ebdf6a1`](https://github.com/npm/npm/commit/ebdf6a14d17962cdb7128402c53b452f91d44ca7) `graceful-fs@3.0.7` +* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from + [MIT](http://spdx.org/licenses/MIT.html#licenseText) + ([@isaacs](https://github.com/isaacs)): + * [`e5d237f`](https://github.com/npm/npm/commit/e5d237fc0f436dd2a89437ebf8a9632a2e35ccbe) `nopt@3.0.2` + * [`79fef14`](https://github.com/npm/npm/commit/79fef1421b78f044980f0d1bf0e97039b6992710) `rimraf@2.3.4` + * [`22527da`](https://github.com/npm/npm/commit/22527da4816e7c2746cdc0317c5fb4a85152d554) `minimatch@2.0.8` + * [`882ac87`](https://github.com/npm/npm/commit/882ac87a6c4123ca985d7ad4394ea5085e5b0ef5) `lru-cache@2.6.4` + * [`9d9d015`](https://github.com/npm/npm/commit/9d9d015a2e972f68664dda54fbb204db28b21ede) `npmlog@1.2.1` + +### v2.10.1 (2015-05-14): + +#### BUG FIXES & DOCUMENTATION TWEAKS + +* [`dc77520`](https://github.com/npm/npm/commit/dc7752013ffce13a3d3f13e518a0052c22fc1158) + When getting back a 404 from a request to a private registry that uses a + registry path that extends past the root + (`http://registry.enterprise.co/path/to/registry`), display the name of the + nonexistent package, rather than the first element in the registry API path. + Sorry, Artifactory users! ([@hayes](https://github.com/hayes)) +* [`f70dea9`](https://github.com/npm/npm/commit/f70dea9b4766f6eaa55012c3e8087e9cb04fd4ce) + Make clearer that `--registry` can be used on a per-publish basis to push a + package to a non-default registry. ([@mischkl](https://github.com/mischkl)) +* [`a3e26f5`](https://github.com/npm/npm/commit/a3e26f5b4465991a941a325468ab7725670d2a94) + Did you know that GitHub shortcuts can have commit-ishes included + (`org/repo#branch`)? They can! ([@iarna](https://github.com/iarna)) +* [`0e2c091`](https://github.com/npm/npm/commit/0e2c091a539b61fdc60423b6bbaaf30c24e4b1b8) + Some errors from `readPackage` were being swallowed, potentially leading to + invalid package trees on disk. ([@smikes](https://github.com/smikes)) + +#### DEPENDENCY UPDATES! STILL! MORE! AGAIN! + +* [`0b901ad`](https://github.com/npm/npm/commit/0b901ad0811d84dda6ca0755a9adc8d47825edd0) + `lru-cache@2.6.3`: Removed some cruft from the published package. + ([@isaacs](https://github.com/isaacs)) +* [`d713e0b`](https://github.com/npm/npm/commit/d713e0b14930c563e3fdb6ac6323bae2a8924652) + `mkdirp@0.5.1`: Made compliant with `standard`, dropped support for Node 0.6, + added (Travis) support for Node 0.12 and io.js. + ([@isaacs](https://github.com/isaacs)) +* [`a2d6578`](https://github.com/npm/npm/commit/a2d6578b6554c5c9d48fe2006751759f4da57520) + `glob@1.0.3`: Updated to use `tap@1`. ([@isaacs](https://github.com/isaacs)) +* [`64cd1a5`](https://github.com/npm/npm/commit/64cd1a570aaa5f24ccba190948ec9456297c97f5) + `fstream@ 1.0.6`: Made compliant with [`standard`](http://npm.im/standard) + (done by [@othiym23](https://github.com/othiym23), and then debugged and + fixed by [@iarna](https://github.com/iarna)), and license changed to ISC. + ([@othiym23](https://github.com/othiym23) / + [@iarna](https://github.com/iarna)) +* [`b527a7c`](https://github.com/npm/npm/commit/b527a7c2ba3c4002f443dd2c536ff4ff41a38b86) + `which@1.1.1`: Callers can pass in their own `PATH` instead of relying on + `process.env`. ([@isaacs](https://github.com/isaacs)) + +### v2.10.0 (2015-05-8): + +#### THE IMPLICATIONS ARE MORE PROFOUND THAN THEY APPEAR + +If you've done much development in The Enterprise®™, you know that keeping +track of software licenses is far more important than one might expect / hope / +fear. Tracking licenses is a hassle, and while many (if not most) of us have +(reluctantly) gotten around to setting a license to use by default with all our +new projects (even if it's just WTFPL), that's about as far as most of us think +about it. In big enterprise shops, ensuring that projects don't inadvertently +use software with unacceptably encumbered licenses is serious business, and +developers spend a surprising (and appalling) amount of time ensuring that +licensing is covered by writing automated checkers and other license auditing +tools. + +The Linux Foundation has been working on a machine-parseable syntax for license +expressions in the form of [SPDX](https://spdx.org/), an appropriately +enterprisey acronym. IP attorney and JavaScript culture hero [Kyle +Mitchell](http://kemitchell.com/) has put a considerable amount of effort into +bringing SPDX to JavaScript and Node. He's written +[`spdx.js`](https://github.com/kemitchell/spdx.js), a JavaScript SPDX +expression parser, and has integrated it into npm in a few different ways. + +For you as a user of npm, this means: + +* npm now has proper support for dual licensing in `package.json`, due to + SPDX's compound expression syntax. Run `npm help package.json` for details. +* npm will warn you if the `package.json` for your project is either missing a + `"license"` field, or if the value of that field isn't a valid SPDX + expression (pro tip: `"BSD"` becomes `"BSD-2-Clause"` in SPDX (unless you + really want one of its variants); `"MIT"` and `"ISC"` are fine as-is; the + [full list](https://github.com/shinnn/spdx-license-ids/blob/master/spdx-license-ids.json) + is its own package). +* `npm init` now demands that you use a valid SPDX expression when using it + interactively (pro tip: I mostly use `npm init -y`, having previously run + `npm config set init.license=MIT` / `npm config set init.author.email=foo` / + `npm config set init.author.name=me`). +* The documentation for `package.json` has been updated to tell you how to use + the `"license"` field properly with SPDX. + +In general, this shouldn't be a big deal for anybody other than people trying +to run their own automated license validators, but in the long run, if +everybody switches to this format, many people's lives will be made much +simpler. I think this is an important improvement for npm and am very thankful +to Kyle for taking the lead on this. Also, even if you think all of this is +completely stupid, just [choose a license](http://en.wikipedia.org/wiki/License-free_software) +anyway. Future you will thank past you someday, unless you are +[djb](http://cr.yp.to/), in which case you are djb, and more power to you. + +* [`8669f7d`](https://github.com/npm/npm/commit/8669f7d88c472ccdd60e140106ac43cca636a648) + [#8179](https://github.com/npm/npm/issues/8179) Document how to use SPDX in + `license` stanzas in `package.json`, including how to migrate from old busted + license declaration arrays to fancy new compound-license clauses. + ([@kemitchell](https://github.com/kemitchell)) +* [`98ad98c`](https://github.com/npm/npm/commit/98ad98cb11f3d3ba29a488ef1ab050b066d9c7f6) + [#8197](https://github.com/npm/npm/issues/8197) `init-package-json@1.5.0` + Ensure that packages bootstrapped with `npm init` use an SPDX-compliant + license expression. ([@kemitchell](https://github.com/kemitchell)) +* [`2ad3905`](https://github.com/npm/npm/commit/2ad3905e9139b0be2b22accf707b814469de813e) + [#8197](https://github.com/npm/npm/issues/8197) + `normalize-package-data@2.1.0`: Warn when a package is missing a license + declaration, or using a license expression that isn't valid SPDX. + ([@kemitchell](https://github.com/kemitchell)) +* [`127bb73`](https://github.com/npm/npm/commit/127bb73ccccc59a1267851c702d8ebd3f3a97e81) + [#8197](https://github.com/npm/npm/issues/8197) `tar@2.1.1`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`e9a933a`](https://github.com/npm/npm/commit/e9a933a9148180d9d799f99f4154f5110ff2cace) + [#8197](https://github.com/npm/npm/issues/8197) `once@1.3.2`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`412401f`](https://github.com/npm/npm/commit/412401fb6a19b18f3e02d97a24d4dafed650c186) + [#8197](https://github.com/npm/npm/issues/8197) `semver@4.3.4`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) + +As a corollary to the previous changes, I've put some work into making `npm +install` spew out fewer pointless warnings about missing values in transitive +dependencies. From now on, npm will only warn you about missing READMEs, +license fields, and the like for top-level projects (including packages you +directly install into your application, but we may relax that eventually). + +Practically _nobody_ liked having those warnings displayed for child +dependencies, for the simple reason that there was very little that anybody +could _do_ about those warnings, unless they happened to be the maintainers of +those dependencies themselves. Since many, many projects don't have +SPDX-compliant licenses, the number of warnings reached a level where they ran +the risk of turning into a block of visual noise that developers (read: me, and +probably you) would ignore forever. + +So I fixed it. If you still want to see the messages about child dependencies, +they're still there, but have been pushed down a logging level to `info`. You +can display them by running `npm install -d` or `npm install --loglevel=info`. + +* [`eb18245`](https://github.com/npm/npm/commit/eb18245f55fb4cd62a36867744bcd1b7be0a33e2) + Only warn on normalization errors for top-level dependencies. Transitive + dependency validation warnings are logged at `info` level. + ([@othiym23](https://github.com/othiym23)) + +#### BUG FIXES + +* [`e40e809`](https://github.com/npm/npm/commit/e40e8095d2bc9fa4eb8f01aa22067e0068fa8a54) + `tap@1.0.1`: TAP: The Next Generation. Fix up many tests to they work + properly with the new major version of `node-tap`. Look at all the colors! + ([@isaacs](https://github.com/isaacs)) +* [`f9314e9`](https://github.com/npm/npm/commit/f9314e97d26532c0ef2b03e98f3ed300b7cd5026) + `nock@1.9.0`: Minor tweaks and bug fixes. ([@pgte](https://github.com/pgte)) +* [`45c2b1a`](https://github.com/npm/npm/commit/45c2b1aaa051733fa352074994ae6e569fd51e8b) + [#8187](https://github.com/npm/npm/issues/8187) `npm ls` wasn't properly + recognizing dependencies installed from GitHub repositories as git + dependencies, and so wasn't displaying them as such. + ([@zornme](https://github.com/zornme)) +* [`1ab57c3`](https://github.com/npm/npm/commit/1ab57c38116c0403965c92bf60121f0f251433e4) + In some cases, `npm help` was using something that looked like a regular + expression where a glob pattern should be used, and vice versa. + ([@isaacs](https://github.com/isaacs)) + +### v2.9.1 (2015-04-30): + +#### WOW! MORE GIT FIXES! YOU LOVE THOSE! + +The first item below is actually a pretty big deal, as it fixes (with a +one-word change and a much, much longer test case (thanks again, +[@iarna](https://github.com/iarna))) a regression that's been around for months +now. If you're depending on multiple branches of a single git dependency in a +single project, you probably want to check out `npm@2.9.1` and verify that +things (again?) work correctly in your project. + +* [`178a6ad`](https://github.com/npm/npm/commit/178a6ad540215820d16217465a5f220d8c95a313) + [#7202](https://github.com/npm/npm/issues/7202) When caching git + dependencies, do so by the whole URL, including the branch name, so that if a + single application depends on multiple branches from the same repository (in + practice, multiple version tags), every install is of the correct version, + instead of reusing whichever branch the caching process happened to check out + first. ([@iarna](https://github.com/iarna)) +* [`63b79cc`](https://github.com/npm/npm/commit/63b79ccde092a9cb3b1f34abe43e1d2ba69c0dbf) + [#8084](https://github.com/npm/npm/issues/8084) Ensure that Bitbucket, + GitHub, and Gitlab dependencies are installed the same way as non-hosted git + dependencies, fixing `npm install --link`. + ([@laiso](https://github.com/laiso)) + +#### DOCUMENTATION FIXES AND TWEAKS + +These changes may seem simple and small (except Lin's fix to the package name +restrictions, which was more an egregious oversight on our part), but cleaner +documentation makes npm significantly more pleasant to use. I really appreciate +all the typo fixes, clarifications, and formatting tweaks people send us, and +am delighted that we get so many of these pull requests. Thanks, everybody! + +* [`ca478dc`](https://github.com/npm/npm/commit/ca478dcaa29b8f07cd6fe515a3c4518166819291) + [#8137](https://github.com/npm/npm/issues/8137) Somehow, we had failed to + clearly document the full restrictions on package names. + [@linclark](https://github.com/linclark) has now fixed that, although we will + take with us to our graves the reasons why the maximum package name length is 214 + characters (well, OK, it was that that was the longest name in the registry + when we decided to put a cap on the name length). + ([@linclark](https://github.com/linclark)) +* [`b574076`](https://github.com/npm/npm/commit/b5740767c320c1eff3576a8d63952534a0fbb936) + [#8079](https://github.com/npm/npm/issues/8079) Make the `npm shrinkwrap` + documentation use code formatting for examples consistently. It would be + great to do this for more commands HINT HINT. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`1ff636e`](https://github.com/npm/npm/commit/1ff636e2db3852a53e38c866fed7eafdacd307fc) + [#8105](https://github.com/npm/npm/issues/8105) Document that the global + `npmrc` goes in `$PREFIX/etc/npmrc`, instead of `$PREFIX/npmrc`. + ([@anttti](https://github.com/anttti)) +* [`c3f2f7c`](https://github.com/npm/npm/commit/c3f2f7c299342e1c1eccc55a976a63c607f51621) + [#8127](https://github.com/npm/npm/issues/8127) Document how to use `npm run + build` directly (hint: it's different from `npm build`!). + ([@mikemaccana](https://github.com/mikemaccana)) +* [`873e467`](https://github.com/npm/npm/commit/873e46757e1986761b15353f94580a071adcb383) + [#8069](https://github.com/npm/npm/issues/8069) Take the old, dead npm + mailing list address out of `package.json`. It seems that people don't have + much trouble figuring out how to report errors to npm. + ([@robertkowalski](https://github.com/robertkowalski)) + +#### ENROBUSTIFICATIONMENT + +* [`5abfc9c`](https://github.com/npm/npm/commit/5abfc9c9017da714e47a3aece750836b4f9af6a9) + [#7973](https://github.com/npm/npm/issues/7973) `npm run-script` completion + will only suggest run scripts, instead of including dependencies. If for some + reason you still wanted it to suggest dependencies, let us know. + ([@mantoni](https://github.com/mantoni)) +* [`4b564f0`](https://github.com/npm/npm/commit/4b564f0ce979dc74c09604f4d46fd25a2ee63804) + [#8081](https://github.com/npm/npm/issues/8081) Use `osenv` to parse the + environment's `PATH` in a platform-neutral way. + ([@watilde](https://github.com/watilde)) +* [`a4b6238`](https://github.com/npm/npm/commit/a4b62387b41848818973eeed056fd5c6570274f3) + [#8094](https://github.com/npm/npm/issues/8094) When we refactored the + configuration code to split out checking for IPv4 local addresses, we + inadvertently completely broke it by failing to return the values. In + addition, just the call to `os.getInterfaces()` could throw on systems where + querying the network configuration requires elevated privileges (e.g. Amazon + Lambda). Add the return, and trap errors so they don't cause npm to explode. + Thanks to [@mhart](https://github.com/mhart) for bringing this to our + attention! ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES WAIT FOR NO SOPHONT + +* [`000cd8b`](https://github.com/npm/npm/commit/000cd8b52104942ac3404f0ad0651d82f573da37) + `rimraf@2.3.3`: More informative assertions on argument validation failure. + ([@isaacs](https://github.com/isaacs)) +* [`530a2e3`](https://github.com/npm/npm/commit/530a2e369128270f3e098f0e9be061533003b0eb) + `lru-cache@2.6.2`: Revert to old key access-time behavior, as it was correct + all along. ([@isaacs](https://github.com/isaacs)) +* [`d88958c`](https://github.com/npm/npm/commit/d88958ca02ce81b027b9919aec539d0145875a59) + `minimatch@2.0.7`: Feature detection and test improvements. + ([@isaacs](https://github.com/isaacs)) +* [`3fa39e4`](https://github.com/npm/npm/commit/3fa39e4d492609d5d045033896dcd99f7b875329) + `nock@1.7.1` ([@pgte](https://github.com/pgte)) + +### v2.9.0 (2015-04-23): + +This week was kind of a breather to concentrate on fixing up the tests on the +`multi-stage` branch, and not mess with git issues for a little while. +Unfortunately, There are now enough severe git issues that we'll probably have +to spend another couple weeks tackling them. In the meantime, enjoy these two +small features. They're just enough to qualify for a semver-minor bump: + +#### NANOFEATURES + +* [`2799322`](https://github.com/npm/npm/commit/279932298ce5b589c5eea9439ac40b88b99c6a4a) + [#7426](https://github.com/npm/npm/issues/7426) Include local modules in `npm + outdated` and `npm update`. ([@ArnaudRinquin](https://github.com/ArnaudRinquin)) +* [`2114862`](https://github.com/npm/npm/commit/21148620fa03a582f4ec436bb16bd472664f2737) + [#8014](https://github.com/npm/npm/issues/8014) The prefix used before the + version on version tags is now configurable via `tag-version-prefix`. Be + careful with this one and read the docs before using it. + ([@kkragenbrink](https://github.com/kkragenbrink)) + +#### OTHER MINOR TWEAKS + +* [`18ce0ec`](https://github.com/npm/npm/commit/18ce0ecd2d94ad3af01e997f1396515892dd363c) + [#3032](https://github.com/npm/npm/issues/3032) `npm unpublish` will now use + the registry set in `package.json`, just like `npm publish`. This only + applies, for now, when unpublishing the entire package, as unpublishing a + single version requires the name be included on the command line and + therefore doesn't read from `package.json`. ([@watilde](https://github.com/watilde)) +* [`9ad2100`](https://github.com/npm/npm/commit/9ad210042242e51d52b2a8b633d8e59248f5faa4) + [#8008](https://github.com/npm/npm/issues/8008) Once again, when considering + what to install on `npm install`, include `devDependencies`. + ([@smikes](https://github.com/smikes)) +* [`5466260`](https://github.com/npm/npm/commit/546626059909dca1906454e820ca4e315c1795bd) + [#8003](https://github.com/npm/npm/issues/8003) Clarify the documentation + around scopes to make it easier to understand how they support private + packages. ([@smikes](https://github.com/smikes)) + +#### DEPENDENCIES WILL NOT STOP UNTIL YOU ARE VERY SLEEPY + +* [`faf65a7`](https://github.com/npm/npm/commit/faf65a7bbb2fad13216f64ed8f1243bafe743f97) + `init-package-json@1.4.2`: If there are multiple validation errors and + warnings, ensure they all get displayed (includes a rad new way of testing + `init-package-json` contributed by + [@michaelnisi](https://github.com/michaelnisi)). + ([@MisumiRize](https://github.com/MisumiRize)) +* [`7f10f38`](https://github.com/npm/npm/commit/7f10f38d29a8423d7cde8103fa7b64ac728da1e0) + `editor@1.0.0`: `1.0.0` is literally more than `0.1.0` (no change aside from + version number). ([@substack](https://github.com/substack)) +* [`4979af3`](https://github.com/npm/npm/commit/4979af3fcae5a3962383b7fdad3162381e62eefe) + [#6805](https://github.com/npm/npm/issues/6805) `npm-registry-client@6.3.3`: + Decode scoped package names sent by the registry so they look nicer. + ([@mmalecki](https://github.com/mmalecki)) + +### v2.8.4 (2015-04-16): + +This is the fourth release of npm this week, so it's mostly just landing a few +small outstanding PRs on dependencies and some tiny documentation tweaks. +`npm@2.8.3` is where the real action is. + +* [`ee2bd77`](https://github.com/npm/npm/commit/ee2bd77f3c64d38735d1d31028224a5c40422a9b) + [#7983](https://github.com/npm/npm/issues/7983) `tar@2.1.0`: Better error + reporting in corrupted tar files, and add support for the `fromBase` flag + (rescued from the dustbin of history by + [@deanmarano](https://github.com/deanmarano)). + ([@othiym23](https://github.com/othiym23)) +* [`d8eee6c`](https://github.com/npm/npm/commit/d8eee6cf9d2ff7aca68dfaed2de76824a3e0d9af) + `init-package-json@1.4.1`: Add support for a default author, and only add + scope to a package name once. ([@othiym23](https://github.com/othiym23)) +* [`4fc5d98`](https://github.com/npm/npm/commit/4fc5d98b785f601c60d4dc0a2c8674f0cccf6262) + `lru-cache@2.6.1`: Small tweaks to cache value aging and entry counting that + are irrelevant to npm. ([@isaacs](https://github.com/isaacs)) +* [`1fe5840`](https://github.com/npm/npm/commit/1fe584089f5bef133de5518aa26eaf6064be2bf7) + [#7946](https://github.com/npm/npm/issues/7946) Make `npm init` text + friendlier. ([@sandfox](https://github.com/sandfox)) + +### v2.8.3 (2015-04-15): + +#### TWO SMALL GIT TWEAKS + +This is the last of a set of releases intended to ensure npm's git support is +robust enough that we can stop working on it for a while. These fixes are +small, but prevent a common crasher and clear up one of the more confusing +error messages coming out of npm when working with repositories hosted on git. + +* [`387f889`](https://github.com/npm/npm/commit/387f889c0e8fb617d9cc9a42ed0a3ec49424ab5d) + [#7961](https://github.com/npm/npm/issues/7961) Ensure that hosted git SSH + URLs always have a valid protocol when stored in `resolved` fields in + `npm-shrinkwrap.json`. ([@othiym23](https://github.com/othiym23)) +* [`394c2f5`](https://github.com/npm/npm/commit/394c2f5a1227232c0baf42fbba1402aafe0d6ffb) + Switch the order in which hosted Git providers are checked to `git:`, + `git+https:`, then `git+ssh:` (from `git:`, `git+ssh:`, then `git+https:`) in + an effort to go from most to least likely to succeed, to make for less + confusing error message. ([@othiym23](https://github.com/othiym23)) + +### v2.8.2 (2015-04-14): + +#### PEACE IN OUR TIME + +npm has been having an issue with CouchDB's web server since the release +of io.js and Node.js 0.12.0 that has consumed a huge amount of my time +to little visible effect. Sam Mikes picked up the thread from me, and +after a [_lot_ of effort](https://github.com/npm/npm/issues/7699#issuecomment-93091111) +figured out that ultimately there are probably a couple problems with +the new HTTP Agent keep-alive handling in new versions of Node. In +addition, `npm-registry-client` was gratuitously sending a body along +with a GET request which was triggering the bugs. Sam removed about 10 bytes from +one file in `npm-registry-client`, and this problem, which has been bugging us for months, +completely went away. + +In conclusion, Sam Mikes is great, and anybody using a private registry +hosted on CouchDB should thank him for his hard work. Also, thanks to +the community at large for pitching in on this bug, which has been +around for months now. + +* [`431c3bf`](https://github.com/npm/npm/commit/431c3bf6cdec50f9f0c735f478cb2f3f337d3313) + [#7699](https://github.com/npm/npm/issues/7699) `npm-registry-client@6.3.2`: + Don't send body with HTTP GET requests when logging in. + ([@smikes](https://github.com/smikes)) + +### v2.8.1 (2015-04-12): + +#### CORRECTION: NPM'S GIT INTEGRATION IS DOING OKAY + +A [helpful bug report](https://github.com/npm/npm/issues/7872#issuecomment-91809553) +led to another round of changes to +[`hosted-git-info`](https://github.com/npm/hosted-git-info/commit/827163c74531b69985d1ede7abced4861e7b0cd4), +some additional test-writing, and a bunch of hands-on testing against actual +private repositories. While the complexity of npm's git dependency handling is +nearly fractal (because npm is very complex, and git is even more complex), +it's feeling way more solid than it has for a while. We think this is a +substantial improvement over what we had before, so give `npm@2.8.1` a shot if +you have particularly complex git use cases and +[let us know](https://github.com/npm/npm/issues/new) how it goes. + +(NOTE: These changes mostly affect cloning and saving references to packages +hosted in git repositories, and don't address some known issues with things +like lifecycle scripts not being run on npm dependencies. Work continues on +other issues that affect parity between git and npm registry packages.) + +* [`66377c6`](https://github.com/npm/npm/commit/66377c6ece2cf4d53d9a618b7d9824e1452bc293) + [#7872](https://github.com/npm/npm/issues/7872) `hosted-git-info@2.1.2`: Pass + through credentials embedded in SSH and HTTPs git URLs. + ([@othiym23](https://github.com/othiym23)) +* [`15efe12`](https://github.com/npm/npm/commit/15efe124753257728a0ddc64074fa5a4b9c2eb30) + [#7872](https://github.com/npm/npm/issues/7872) Use the new version of + `hosted-git-info` to pass along credentials embedded in git URLs. Test it. + Test it a lot. ([@othiym23](https://github.com/othiym23)) + +#### SCOPED DEPENDENCIES AND PEER DEPENDENCIES: NOT QUITE REESE'S + +Big thanks to [@ewie](https://github.com/ewie) for identifying an issue with +how npm was handling `peerDependencies` that were implicitly installed from the +`package.json` files of scoped dependencies. This +[will be a moot point](https://github.com/npm/npm/issues/6565#issuecomment-74971689) +with the release of `npm@3`, but until then, it's important that +`peerDependency` auto-installation work as expected. + +* [`b027319`](https://github.com/npm/npm/commit/b0273190c71eba14395ddfdd1d9f7ba625297523) + [#7920](https://github.com/npm/npm/issues/7920) Scoped packages with + `peerDependencies` were installing the `peerDependencies` into the wrong + directory. ([@ewie](https://github.com/ewie)) +* [`649e31a`](https://github.com/npm/npm/commit/649e31ae4fd02568bae5dc6b4ea783431ce3d63e) + [#7920](https://github.com/npm/npm/issues/7920) Test `peerDependency` + installs involving scoped packages using `npm-package-arg` instead of simple + path tests, for consistency. ([@othiym23](https://github.com/othiym23)) + +#### MAKING IT EASIER TO WRITE NPM TESTS, VERSION 0.0.1 + +[@iarna](https://github.com/iarna) and I +([@othiym23](https://github.com/othiym23)) have been discussing a +[candidate plan](https://github.com/npm/npm/wiki/rewriting-npm's-tests:-a-plan-maybe) +for improving npm's test suite, with the goal of making it easier for new +contributors to get involved with npm by reducing the learning curve +necessary to be able to write good tests for proposed changes. This is the +first substantial piece of that effort. Here's what the commit message for +[`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) +had to say about this work: + +> It's too difficult for npm contributors to figure out what the conventional +> style is for tests. Part of the problem is that the documentation in +> CONTRIBUTING.md is inadequate, but another important factor is that the tests +> themselves are written in a variety of styles. One of the most notable +> examples of this is the fact that many tests use fixture directories to store +> precooked test scenarios and package.json files. +> +> This had some negative consequences: +> +> * tests weren't idempotent +> * subtle dependencies between tests existed +> * new tests get written in this deprecated style because it's not +> obvious that the style is out of favor +> * it's hard to figure out why a lot of those directories existed, +> because they served a variety of purposes, so it was difficult to +> tell when it was safe to remove them +> +> All in all, the fixture directories were a major source of technical debt, and +> cleaning them up, while time-consuming, makes the whole test suite much more +> approachable, and makes it more likely that new tests written by outside +> contributors will follow a conventional style. To support that, all of the +> tests touched by this changed were cleaned up to pass the `standard` style +> checker. + +And here's a little extra context from a comment I left on [#7929](https://github.com/npm/npm/issues/7929): + +> One of the other things that encouraged me was looking at this +> [presentation on technical debt](http://www.slideshare.net/nnja/pycon-2015-technical-debt-the-monster-in-your-closet) +> from Pycon 2015, especially slide 53, which I interpreted in terms of +> difficulty getting new contributors to submit patches to an OSS project like +> npm. npm has a long ways to go, but I feel good about this change. + +* [`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) + [#7929](https://github.com/npm/npm/issues/7929) Eliminate fixture directories + from `test/tap`, leaving each test self-contained. + ([@othiym23](https://github.com/othiym23)) +* [`4928d30`](https://github.com/npm/npm/commit/4928d30140821c63e03fffed73f8d88ebdc43710) + [#7929](https://github.com/npm/npm/issues/7929) Move fixture files from + `test/tap/*` to `test/fixtures`. ([@othiym23](https://github.com/othiym23)) +* [`e925deb`](https://github.com/npm/npm/commit/e925debca91092a814c1a00933babc3a8cf975be) + [#7929](https://github.com/npm/npm/issues/7929) Tweak the run scripts to stop + slaughtering the CPU on doc rebuild. + ([@othiym23](https://github.com/othiym23)) +* [`65bf7cf`](https://github.com/npm/npm/commit/65bf7cffaf91c426b676c47529eee796f8b8b75c) + [#7923](https://github.com/npm/npm/issues/7923) Use an alias of scripts and + run-scripts in `npm run test-all` ([@watilde](https://github.com/watilde)) +* [`756a3fb`](https://github.com/npm/npm/commit/756a3fbb852a2469afe706635ed88d22c37743e5) + [#7923](https://github.com/npm/npm/issues/7923) Sync timeout time of `npm + run-script test-all` to be the same as `test` and `tap` scripts. + ([@watilde](https://github.com/watilde)) +* [`8299b5f`](https://github.com/npm/npm/commit/8299b5fb6373354a7fbaab6f333863758812ae90) + Set a timeout for tap tests for `npm run-script test-all`. + ([@othiym23](https://github.com/othiym23)) + +#### THE EVER-BEATING DRUM OF DEPENDENCY UPDATES + +* [`d90d0b9`](https://github.com/npm/npm/commit/d90d0b992acbf62fd5d68debf9d1dbd6cfa20804) + [#7924](https://github.com/npm/npm/issues/7924) Remove `child-process-close`, + as it was included for Node 0.6 compatibility, and npm no longer supports + 0.6. ([@robertkowalski](https://github.com/robertkowalski)) +* [`16427c1`](https://github.com/npm/npm/commit/16427c1f3ea3d71ee753c62eb4c2663c7b32b84f) + `lru-cache@2.5.2`: More accurate updating of expiry times when `maxAge` is + set. ([@isaacs](https://github.com/isaacs)) +* [`03cce83`](https://github.com/npm/npm/commit/03cce83b64344a9e0fe036dce214f4d68cfcc9e7) + `nock@1.6.0`: Mocked network error handling. + ([@pgte](https://github.com/pgte)) +* [`f93b1f0`](https://github.com/npm/npm/commit/f93b1f0b7eb5d1b8a7967e837bbd756db1091d00) + `glob@5.0.5`: Use `path-is-absolute` polyfill, allowing newer Node.js and + io.js versions to use `path.isAbsolute()`. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`a70d694`](https://github.com/npm/npm/commit/a70d69495a6e96997e64855d9e749d943ee6d64f) + `request@2.55.0`: Bug fixes and simplification. + ([@simov](https://github.com/simov)) +* [`2aecc6f`](https://github.com/npm/npm/commit/2aecc6f4083526feeb14615b4e5484edc66175b5) + `columnify@1.5.1`: Switch to using babel from 6to5. + ([@timoxley](https://github.com/timoxley)) + +### v2.8.0 (2015-04-09): + +#### WE WILL NEVER BE DONE FIXING NPM'S GIT SUPPORT + +If you look at [the last release's release +notes](https://github.com/npm/npm/blob/master/CHANGELOG.md#git-mean-git-tuff-git-all-the-way-away-from-my-stuff), +you will note that they confidently assert that it's perfectly OK to force all +GitHub URLs through the same `git:` -> `git+ssh:` fallback flow for cloning. It +turns out that many users depend on `git+https:` URLs in their build +environments because they use GitHub auth tokens instead of SSH keys. Also, in +some cases you just want to be able to explicitly say how a given dependency +should be cloned from GitHub. + +Because of the way we resolved the inconsistency in GitHub shorthand handling +[before](https://github.com/npm/npm/blob/master/CHANGELOG.md#bug-fixes-1), this +turned out to be difficult to work around. So instead of hacking around it, we +completely redid how git is handled within npm and its attendant packages. +Again. This time, we changed things so that `normalize-package-data` and +`read-package-json` leave more of the git logic to npm itself, which makes +handling shorthand syntax consistently much easier, and also allows users to +resume using explicit, fully-qualified git URLs without npm messing with them. + +Here's a summary of what's changed: + +* Instead of converting the GitHub shorthand syntax to a `git+ssh:`, `git:`, or + `git+https:` URL and saving that, save the shorthand itself to + `package.json`. +* If presented with shortcuts, try cloning via the git protocol, SSH, and HTTPS + (in that order). +* No longer prompt for credentials -- it didn't work right with the spinner, + and wasn't guaranteed to work anyway. We may experiment with doing this a + better way in the future. Users can override this by setting `GIT_ASKPASS` in + their environment if they want to experiment with interactive cloning, but + should also set `--no-spin` on the npm command line (or run `npm config set + spin=false`). +* **EXPERIMENTAL FEATURE**: Add support for `github:`, `gist:`, `bitbucket:`, + and `gitlab:` shorthand prefixes. GitHub shortcuts will continue to be + normalized to `org/repo` instead of being saved as `github:org/repo`, but + `gitlab:`, `gist:`, and `bitbucket:` prefixes will be used on the command + line and from `package.json`. BE CAREFUL WITH THIS. `package.json` files + published with the new shorthand syntax can _only_ be read by `npm@2.8.0` and + later, and this feature is mostly meant for playing around with it. If you + want to save git dependencies in a form that older versions of npm can read, + use `--save-exact`, which will save the git URL and resolved commit hash of + the head of the branch in a manner similar to the way that `--save-exact` + pins versions for registry dependencies. This is documented (so check `npm + help install` for details), but we're not going to make a lot of noise about + it until it has a chance to bake in a little more. + +It is [@othiym23](https://github.com/othiym23)'s sincere hope that this will +resolve all of the inconsistencies users were seeing with GitHub and git-hosted +packages, but given the level of change here, that may just be a fond wish. +Extra testing of this change is requested. + +* [`6b0f588`](https://github.com/npm/npm/commit/6b0f58877f37df9904490ffbaaad33862bd36dce) + [#7867](https://github.com/npm/npm/issues/7867) Use git shorthand and git + URLs as presented by user. Support new `hosted-git-info` shortcut syntax. + Save shorthand in `package.json`. Try cloning via `git:`, `git+ssh:`, and + `git+https:`, in that order, when supported by the underlying hosting + provider. ([@othiym23](https://github.com/othiym23)) +* [`75d4267`](https://github.com/npm/npm/commit/75d426787869d54ca7400408f562f971b34649ef) + [#7867](https://github.com/npm/npm/issues/7867) Document new GitHub, GitHub + gist, Bitbucket, and GitLab shorthand syntax. + ([@othiym23](https://github.com/othiym23)) +* [`7d92c75`](https://github.com/npm/npm/commit/7d92c7592998d90ec883fa989ca74f04ec1b93de) + [#7867](https://github.com/npm/npm/issues/7867) When `--save-exact` is used + with git shorthand or URLs, save the fully-resolved URL, with branch name + resolved to the exact hash for the commit checked out. + ([@othiym23](https://github.com/othiym23)) +* [`9220e59`](https://github.com/npm/npm/commit/9220e59f8def8c82c6d331a39ba29ad4c44e3a9b) + [#7867](https://github.com/npm/npm/issues/7867) Ensure that non-prefixed and + non-normalized GitHub shortcuts are saved to `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`dd398e9`](https://github.com/npm/npm/commit/dd398e98a8eba27eeba84378200da3d078fdf980) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.1`: + Ensure that `gist:` shorthand survives being round-tripped through + `package.json`. ([@othiym23](https://github.com/othiym23)) +* [`33d1420`](https://github.com/npm/npm/commit/33d1420bf2f629332fceb2ac7e174e63ac48f96a) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.0`: Add + support for auth embedded directly in git URLs. + ([@othiym23](https://github.com/othiym23)) +* [`23a1d5a`](https://github.com/npm/npm/commit/23a1d5a540e8db27f5cd0245de7c3694e2bddad1) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.0.2`: Make + it possible to determine in which form a hosted git URL was passed. + ([@iarna](https://github.com/iarna)) +* [`eaf75ac`](https://github.com/npm/npm/commit/eaf75acb718611ad5cfb360084ec86938d9c66c5) + [#7867](https://github.com/npm/npm/issues/7867) + `normalize-package-data@2.0.0`: Normalize GitHub specifiers so they pass + through shortcut syntax and preserve explicit URLs. + ([@iarna](https://github.com/iarna)) +* [`95e0535`](https://github.com/npm/npm/commit/95e0535e365e0aca49c634dd2061a0369b0475f1) + [#7867](https://github.com/npm/npm/issues/7867) `npm-package-arg@4.0.0`: Add + git URL and shortcut to hosted git spec and use `hosted-git-info@2.0.2`. + ([@iarna](https://github.com/iarna)) +* [`a808926`](https://github.com/npm/npm/commit/a8089268d5f3d57f42dbaba02ff6437da5121191) + [#7867](https://github.com/npm/npm/issues/7867) + `realize-package-specifier@3.0.0`: Use `npm-package-arg@4.0.0` and test + shortcut specifier behavior. ([@iarna](https://github.com/iarna)) +* [`6dd1e03`](https://github.com/npm/npm/commit/6dd1e039bddf8cf5383343f91d84bc5d78acd083) + [#7867](https://github.com/npm/npm/issues/7867) `init-package-json@1.4.0`: + Allow dependency on `read-package-json@2.0.0`. + ([@iarna](https://github.com/iarna)) +* [`63254bb`](https://github.com/npm/npm/commit/63254bb6358f66752aca6aa1a275271b3ae03f7c) + [#7867](https://github.com/npm/npm/issues/7867) `read-installed@4.0.0`: Use + `read-package-json@2.0.0`. ([@iarna](https://github.com/iarna)) +* [`254b887`](https://github.com/npm/npm/commit/254b8871f5a173bb464cc5b0ace460c7878b8097) + [#7867](https://github.com/npm/npm/issues/7867) `read-package-json@2.0.0`: + Use `normalize-package-data@2.0.0`. ([@iarna](https://github.com/iarna)) +* [`0b9f8be`](https://github.com/npm/npm/commit/0b9f8be62fe5252abe54d49e36a696f4816c2eca) + [#7867](https://github.com/npm/npm/issues/7867) `npm-registry-client@6.3.0`: + Mark compatibility with `normalize-package-data@2.0.0` and + `npm-package-arg@4.0.0`. ([@iarna](https://github.com/iarna)) +* [`f40ecaa`](https://github.com/npm/npm/commit/f40ecaad68f77abc50eb6f5b224e31dec3d250fc) + [#7867](https://github.com/npm/npm/issues/7867) Extract a common method to + use when cloning git repos for testing. + ([@othiym23](https://github.com/othiym23)) + +#### TEST FIXES FOR NODE 0.8 + +npm continues to [get closer](https://github.com/npm/npm/issues/7842) to being +completely green on Travis for Node 0.8. + +* [`26d36e9`](https://github.com/npm/npm/commit/26d36e9cf0eca69fe1863d2ea536c28555b9e8de) + [#7842](https://github.com/npm/npm/issues/7842) When spawning child + processes, map exit code 127 to ENOENT so Node 0.8 handles child process + failures the same as later versions. + ([@SonicHedgehog](https://github.com/SonicHedgehog)) +* [`54cd895`](https://github.com/npm/npm/commit/54cd8956ea783f96749e46597d8c2cb9397c5d5f) + [#7842](https://github.com/npm/npm/issues/7842) Node 0.8 requires -e with -p + when evaluating snippets; fix test. + ([@SonicHedgehog](https://github.com/SonicHedgehog)) + +#### SMALL FIX AND DOC TWEAK + +* [`20e9003`](https://github.com/npm/npm/commit/20e90031b847e9f7c7168f3dad8b1e526f9a2586) + `tar@2.0.1`: Fix regression where relative symbolic links within an + extraction root that pointed within an extraction root would get normalized + to absolute symbolic links. ([@isaacs](https://github.com/isaacs)) +* [`2ef8898`](https://github.com/npm/npm/commit/2ef88989c41bee1578570bb2172c90ede129dbd1) + [#7879](https://github.com/npm/npm/issues/7879) Better document that `npm + publish --tag=foo` will not set `latest` to that version. + ([@linclark](https://github.com/linclark)) + +### v2.7.6 (2015-04-02): + +#### GIT MEAN, GIT TUFF, GIT ALL THE WAY AWAY FROM MY STUFF + +Part of the reason that we're reluctant to take patches to how npm deals with +git dependencies is that every time we touch the git support, something breaks. +The last few releases are a case in point. `npm@2.7.4` completely broke +installing private modules from GitHub, and `npm@2.7.5` fixed them at the cost +of logging a misleading error message that caused many people to believe that +their dependencies hadn't been successfully installed when they actually had +been. + +This all started from a desire to ensure that GitHub shortcut syntax is being +handled correctly. The correct behavior is for npm to try to clone all +dependencies on GitHub (whether they're specified with the GitHub +`organization/repository` shortcut syntax or not) via the plain `git:` protocol +first, and to fall back to using `git+ssh:` if `git:` doesn't work. Previously, +sometimes npm would use `git:` and `git+ssh:` in some cases (most notably when +using GitHub shortcut syntax on the command line), and use `git+https:` in +others (when the GitHub shortcut syntax was present in `package.json`). This +led to subtle and hard-to-understand inconsistencies, and we're glad that as of +`npm@2.7.6`, we've finally gotten things to where they were before we started, +only slightly more consistent overall. + +We are now going to go back to our policy of being extremely reluctant to touch +the code that handles Git dependencies. + +* [`b747593`](https://github.com/npm/npm/commit/b7475936f473f029e6a027ba1b16277523747d0b) + [#7630](https://github.com/npm/npm/issues/7630) Don't automatically log all + git failures as errors. `maybeGithub` needs to be able to fail without + logging to support its fallback logic. + ([@othiym23](https://github.com/othiym23)) +* [`cd67a0d`](https://github.com/npm/npm/commit/cd67a0db07891d20871822696c26692c8a84866a) + [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote + URL, handle failures gracefully (without assuming standard output exists). + ([@othiym23](https://github.com/othiym23)) +* [`637c7d1`](https://github.com/npm/npm/commit/637c7d1411fe07f409cf91f2e65fd70685cb253c) + [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote + URL, handle failures gracefully (without assuming standard _error_ exists). + ([@othiym23](https://github.com/othiym23)) + +#### OTHER SIGNIFICANT FIXES + +* [`78005eb`](https://github.com/npm/npm/commit/78005ebb6f4103c20f077669c3929b7ea46a4c0d) + [#7743](https://github.com/npm/npm/issues/7743) Always quote arguments passed + to `npm run-script`. This allows build systems and the like to safely escape + glob patterns passed as arguments to `run-scripts` with `npm run-script + + + +
+ +

npm

a JavaScript package manager

+

Build Status

+

SYNOPSIS

+

This is just enough info to get you up and running.

+

Much more info available via npm help once it's installed.

+

IMPORTANT

+

You need node v0.8 or higher to run this program.

+

To install an old and unsupported version of npm that works on node 0.3 +and prior, clone the git repo and dig through the old tags and branches.

+

npm is configured to use npm, Inc.'s public package registry at +https://registry.npmjs.org by default.

+

You can configure npm to use any compatible registry you +like, and even run your own registry. Check out the doc on +registries.

+

Use of someone else's registry may be governed by terms of use. The +terms of use for the default public registry are available at +https://www.npmjs.com.

+

Super Easy Install

+

npm is bundled with node.

+

Windows Computers

+

Get the MSI. npm is in it.

+

Apple Macintosh Computers

+

Get the pkg. npm is in it.

+

Other Sorts of Unices

+

Run make install. npm will be installed with node.

+

If you want a more fancy pants install (a different version, customized +paths, etc.) then read on.

+

Fancy Install (Unix)

+

There's a pretty robust install script at +https://www.npmjs.com/install.sh. You can download that and run it.

+

Here's an example using curl:

+
curl -L https://www.npmjs.com/install.sh | sh
+
+

Slightly Fancier

+

You can set any npm configuration params with that script:

+
npm_config_prefix=/some/path sh install.sh
+
+

Or, you can run it in uber-debuggery mode:

+
npm_debug=1 sh install.sh
+
+

Even Fancier

+

Get the code with git. Use make to build the docs and do other stuff. +If you plan on hacking on npm, make link is your friend.

+

If you've got the npm source code, you can also semi-permanently set +arbitrary config keys using the ./configure --key=val ..., and then +run npm commands by doing node cli.js <cmd> <args>. (This is helpful +for testing, or running stuff without actually installing npm itself.)

+

Windows Install or Upgrade

+

You can download a zip file from https://github.com/npm/npm/releases, and +unpack it in the node_modules\npm\ folder inside node's installation folder.

+

To upgrade to npm 2, follow the Windows upgrade instructions in +the npm Troubleshooting Guide:

+

https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

+

If that's not fancy enough for you, then you can fetch the code with +git, and mess with it directly.

+

Installing on Cygwin

+

No.

+

Uninstalling

+

So sad to see you go.

+
sudo npm uninstall npm -g
+
+

Or, if that fails,

+
sudo make uninstall
+
+

More Severe Uninstalling

+

Usually, the above instructions are sufficient. That will remove +npm, but leave behind anything you've installed.

+

If you would like to remove all the packages that you have installed, +then you can use the npm ls command to find them, and then npm rm to +remove them.

+

To remove cruft left behind by npm 0.x, you can use the included +clean-old.sh script file. You can run it conveniently like this:

+
npm explore npm -g -- sh scripts/clean-old.sh
+
+

npm uses two configuration files, one for per-user configs, and another +for global (every-user) configs. You can view them by doing:

+
npm config get userconfig   # defaults to ~/.npmrc
+npm config get globalconfig # defaults to /usr/local/etc/npmrc
+
+

Uninstalling npm does not remove configuration files by default. You +must remove them yourself manually if you want them gone. Note that +this means that future npm installs will not remember the settings that +you have chosen.

+

More Docs

+

Check out the docs, +especially the faq.

+

You can use the npm help command to read any of them.

+

If you're a developer, and you want to use npm to publish your program, +you should read this

+

BUGS

+

When you find issues, please report them:

+ +

Be sure to include all of the output from the npm command that didn't work +as expected. The npm-debug.log file is also helpful to provide.

+

You can also look for isaacs in #node.js on irc://irc.freenode.net. He +will no doubt tell you to put the output in a gist or email.

+

SEE ALSO

+ + +
+ + + + + + + + + + + + diff --git a/bin/nodejs0.10.47/node_modules/npm/html/doc/index.html b/bin/nodejs0.10.47/node_modules/npm/html/doc/index.html new file mode 100644 index 00000000..c66eaaf2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/html/doc/index.html @@ -0,0 +1,246 @@ + + + npm-index + + + + + + +
+ +

npm-index

Index of all npm documentation

+

README

+

a JavaScript package manager

+

Command Line Documentation

+

Using npm on the command line

+

npm(1)

+

javascript package manager

+

npm-access(1)

+

Set access level on published packages

+

npm-adduser(1)

+

Add a registry user account

+

npm-bin(1)

+

Display npm bin folder

+

npm-bugs(1)

+

Bugs for a package in a web browser maybe

+

npm-build(1)

+

Build a package

+

npm-bundle(1)

+

REMOVED

+

npm-cache(1)

+

Manipulates packages cache

+

npm-completion(1)

+

Tab Completion for npm

+

npm-config(1)

+

Manage the npm configuration files

+

npm-dedupe(1)

+

Reduce duplication

+

npm-deprecate(1)

+

Deprecate a version of a package

+

npm-dist-tag(1)

+

Modify package distribution tags

+

npm-docs(1)

+

Docs for a package in a web browser maybe

+

npm-edit(1)

+

Edit an installed package

+

npm-explore(1)

+

Browse an installed package

+

npm-help-search(1)

+

Search npm help documentation

+

npm-help(1)

+

Get help on npm

+

npm-init(1)

+

Interactively create a package.json file

+

npm-install(1)

+

Install a package

+ +

Symlink a package folder

+

npm-logout(1)

+

Log out of the registry

+

npm-ls(1)

+

List installed packages

+

npm-outdated(1)

+

Check for outdated packages

+

npm-owner(1)

+

Manage package owners

+

npm-pack(1)

+

Create a tarball from a package

+

npm-ping(1)

+

Ping npm registry

+

npm-prefix(1)

+

Display prefix

+

npm-prune(1)

+

Remove extraneous packages

+

npm-publish(1)

+

Publish a package

+

npm-rebuild(1)

+

Rebuild a package

+

npm-repo(1)

+

Open package repository page in the browser

+

npm-restart(1)

+

Restart a package

+

npm-rm(1)

+

Remove a package

+

npm-root(1)

+

Display npm root

+

npm-run-script(1)

+

Run arbitrary package scripts

+

npm-search(1)

+

Search for packages

+

npm-shrinkwrap(1)

+

Lock down dependency versions

+

npm-star(1)

+

Mark your favorite packages

+

npm-stars(1)

+

View packages marked as favorites

+

npm-start(1)

+

Start a package

+

npm-stop(1)

+

Stop a package

+

npm-tag(1)

+

Tag a published version

+

npm-team(1)

+

Manage organization teams and team memberships

+

npm-test(1)

+

Test a package

+

npm-uninstall(1)

+

Remove a package

+

npm-unpublish(1)

+

Remove a package from the registry

+

npm-update(1)

+

Update a package

+

npm-version(1)

+

Bump a package version

+

npm-view(1)

+

View registry info

+

npm-whoami(1)

+

Display npm username

+

API Documentation

+

Using npm in your Node programs

+

npm(3)

+

javascript package manager

+

npm-bin(3)

+

Display npm bin folder

+

npm-bugs(3)

+

Bugs for a package in a web browser maybe

+

npm-cache(3)

+

manage the npm cache programmatically

+

npm-commands(3)

+

npm commands

+

npm-config(3)

+

Manage the npm configuration files

+

npm-deprecate(3)

+

Deprecate a version of a package

+

npm-docs(3)

+

Docs for a package in a web browser maybe

+

npm-edit(3)

+

Edit an installed package

+

npm-explore(3)

+

Browse an installed package

+

npm-help-search(3)

+

Search the help pages

+

npm-init(3)

+

Interactively create a package.json file

+

npm-install(3)

+

install a package programmatically

+ +

Symlink a package folder

+

npm-load(3)

+

Load config settings

+

npm-ls(3)

+

List installed packages

+

npm-outdated(3)

+

Check for outdated packages

+

npm-owner(3)

+

Manage package owners

+

npm-pack(3)

+

Create a tarball from a package

+

npm-ping(3)

+

Ping npm registry

+

npm-prefix(3)

+

Display prefix

+

npm-prune(3)

+

Remove extraneous packages

+

npm-publish(3)

+

Publish a package

+

npm-rebuild(3)

+

Rebuild a package

+

npm-repo(3)

+

Open package repository page in the browser

+

npm-restart(3)

+

Restart a package

+

npm-root(3)

+

Display npm root

+

npm-run-script(3)

+

Run arbitrary package scripts

+

npm-search(3)

+

Search for packages

+

npm-shrinkwrap(3)

+

programmatically generate package shrinkwrap file

+

npm-start(3)

+

Start a package

+

npm-stop(3)

+

Stop a package

+

npm-tag(3)

+

Tag a published version

+

npm-test(3)

+

Test a package

+

npm-uninstall(3)

+

uninstall a package programmatically

+

npm-unpublish(3)

+

Remove a package from the registry

+

npm-update(3)

+

Update a package

+

npm-version(3)

+

Bump a package version

+

npm-view(3)

+

View registry info

+

npm-whoami(3)

+

Display npm username

+

Files

+

File system structures npm uses

+

npm-folders(5)

+

Folder Structures Used by npm

+

npmrc(5)

+

The npm config files

+

package.json(5)

+

Specifics of npm's package.json handling

+

Misc

+

Various other bits and bobs

+

npm-coding-style(7)

+

npm's "funny" coding style

+

npm-config(7)

+

More than you probably want to know about npm configuration

+

npm-developers(7)

+

Developer Guide

+

npm-disputes(7)

+

Handling Module Name Disputes

+

npm-index(7)

+

Index of all npm documentation

+

npm-orgs(7)

+

Working with Teams & Orgs

+

npm-registry(7)

+

The JavaScript Package Registry

+

npm-scope(7)

+

Scoped packages

+

npm-scripts(7)

+

How npm handles the "scripts" field

+

removing-npm(7)

+

Cleaning the Slate

+

semver(7)

+

The semantic versioner for npm

+ +
+ + + + + + + + + + + + diff --git a/bin/nodejs0.10.47/node_modules/npm/html/docfoot.html b/bin/nodejs0.10.47/node_modules/npm/html/docfoot.html new file mode 100644 index 00000000..0cf4145d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/html/docfoot.html @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/bin/nodejs0.10.47/node_modules/npm/html/dochead.html b/bin/nodejs0.10.47/node_modules/npm/html/dochead.html new file mode 100644 index 00000000..4d52bb8d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/html/dochead.html @@ -0,0 +1,11 @@ + + + @NAME@ + + + + + + +
+ diff --git a/bin/nodejs0.10.47/node_modules/npm/html/favicon.ico b/bin/nodejs0.10.47/node_modules/npm/html/favicon.ico new file mode 100644 index 00000000..9e0d4eef Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/html/favicon.ico differ diff --git a/bin/nodejs0.10.47/node_modules/npm/html/index.html b/bin/nodejs0.10.47/node_modules/npm/html/index.html new file mode 100644 index 00000000..4b33c075 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/html/index.html @@ -0,0 +1,95 @@ + + + + + + npm - JavaScript Package Manager + +

npm

+ +

npm is a package manager for node. You can use it to install + and publish your node programs. It manages dependencies and does other cool stuff.

+ +

Easy Zero Line Install

+ +

Install Node.js
+(npm comes with it.)

+ +

Because a one-line install is one too many.

+ +

Fancy Install

+ +
    +
  1. Get the code. +
  2. Do what the README + says to do. +
+ +

There's a pretty thorough install script at +https://npmjs.org/install.sh

+ +

For maximum security, make sure to thorougly inspect every +program that you run on your computer!

+ +

Other Cool Stuff

+ + + + + diff --git a/bin/nodejs0.10.47/node_modules/npm/html/static/style.css b/bin/nodejs0.10.47/node_modules/npm/html/static/style.css new file mode 100644 index 00000000..fc26fee7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/html/static/style.css @@ -0,0 +1,336 @@ +/* reset */ +* { + margin:0; + padding:0; + border:none; + font-family:inherit; + font-size:inherit; + font-weight:inherit; +} +:target::before { + content:" >>> "; + position:absolute; + display:block; + opacity:0.5; + color:#f00; + margin:0 0 0 -2em; +} +abbr, acronym { + border-bottom:1px dotted #aaa; +} +kbd, code, pre { + font-family:monospace; + margin:0; + font-size:18px; + line-height:24px; + background:#eee; + outline:1px solid #ccc; +} +kbd code, kbd pre, kbd kbd, +pre code, pre pre, pre kbd, +code code, code pre, code kbd { outline: none } +.dollar::before { + content:"$ "; + display:inline; +} +p, ul, ol, dl, pre { + margin:30px 0; + line-height:30px; +} +hr { + margin:30px auto 29px; + width:66%; + height:1px; + background:#aaa; +} +pre { + display:block; +} +dd :first-child { + margin-top:0; +} + +body { + quotes:"“" "”" "‘" "’"; + width:666px; + margin:30px auto 120px; + font-family:Times New Roman, serif; + font-size:20px; + background:#fff; + line-height:30px; + color:#111; +} + +blockquote { + position:relative; + font-size:16px; + line-height:30px; + font-weight:bold; + width:85%; + margin:0 auto; +} +blockquote::before { + font-size:90px; + display:block; + position:absolute; + top:20px; + right:100%; + content:"“"; + padding-right:10px; + color:#ccc; +} +.source cite::before { + content:"— "; +} +.source { + padding-left:20%; + margin-top:30px; +} +.source cite span { + font-style:normal; +} +blockquote p { + margin-bottom:0; +} +.quote blockquote { + font-weight:normal; +} + +h1, h2, h3, h4, h5, h6, dt, #header { + font-family:serif; + font-size:20px; + font-weight:bold; +} +h2 { + background:#eee; +} +h1, h2 { + line-height:40px; +} + +i, em, cite { + font-style:italic; +} +b, strong { + font-weight:bold; +} +i, em, cite, b, strong, small { + line-height:28px; +} +small, .small, .small *, aside { + font-style:italic; + color:#669; + font-size:18px; +} +small a, .small a { + text-decoration:underline; +} +del { + text-decoration:line-through; +} +ins { + text-decoration:underline; +} +.alignright { display:block; float:right; margin-left:1em; } +.alignleft { display:block; float:left; margin-right:1em; } + +q:before, q q q:before, q q q q q:before, q q q q q q q:before { content:"“"; } +q q:before, q q q q:before, q q q q q q:before, q q q q q q q q:before { content:"‘"; } +q:after, q q q:after, q q q q q:after, q q q q q q q:after { content:"”"; } +q q:after, q q q q:after, q q q q q q:after, q q q q q q q q:after { content:"’"; } + +a { color:#00f; text-decoration:none; } +a:visited { color:#636; } +a:hover, a:active { color:#c00!important; text-decoration:underline; } + +h1 { + font-weight:bold; + background:#fff; +} +h1 a, h1 a:visited { + font-family:monospace; + font-size:60px; + color:#c00; + display:block; +} +h1 a:focus, h1 a:hover, h1 a:active { + color:#f00!important; + text-decoration:none; +} + +.navigation { + display:table; + width:100%; + margin:0 0 30px 0; + position:relative; +} +#nav-above { + margin-bottom:0; +} +.navigation .nav-previous { + display:table-cell; + text-align:left; + width:50%; +} +/* hang the » and « off into the margins */ +.navigation .nav-previous a:before, .navigation .nav-next a:after { + content: "«"; + display:block; + height:30px; + margin-bottom:-30px; + text-decoration:none; + margin-left:-15px; +} +.navigation .nav-next a:after { + content: "»"; + text-align:right; + margin-left:0; + margin-top:-30px; + margin-right:-15px; +} + + +.navigation .nav-next { + display:table-cell; + text-align:right; + width:50%; +} +.navigation a { + display:block; + width:100%; + height:100%; +} + +input, button, textarea { + border:0; + line-height:30px; +} +textarea { + height:300px; +} +input { + height:30px; + line-height:30px; +} +input.submit, input#submit, input.button, button, input[type=submit] { + cursor:hand; cursor:pointer; + outline:1px solid #ccc; +} + +#wrapper { + margin-bottom:90px; + position:relative; + z-index:1; + *zoom:1; + background:#fff; +} +#wrapper:after { + display:block; + content:"."; + visibility:hidden; + width:0; + height:0; + clear:both; +} + +.sidebar .xoxo > li { + float:left; + width:50%; +} +.sidebar li { + list-style:none; +} +.sidebar #elsewhere { + margin-left:-10%; + margin-right:-10%; +} +.sidebar #rss-links, .sidebar #twitter-feeds { + float:right; + clear:right; + width:20%; +} +.sidebar #comment { + clear:both; + float:none; + width:100%; +} +.sidebar #search { + clear:both; + float:none; + width:100%; +} +.sidebar #search h2 { + margin-left:40%; +} +.sidebar #search #s { + width:90%; + float:left; +} +.sidebar #search #searchsubmit { + width:10%; + float:right; +} +.sidebar * { + font-size:15px; + line-height:30px; +} + +#footer, #footer * { + text-align:center; + font-size:16px; + color:#ccc; + font-style:italic; + word-spacing:1em; + margin-top:0; +} + +#toc { + position:absolute; + top:0; + right:0; + padding:40px 0 40px 20px; + margin:0; + width:200px; + opacity:0.2; + z-index:-1; +} +#toc:hover { + opacity:1; + background:#fff; + z-index:999; +} +#toc ul { + padding:0; + margin:0; +} +#toc, #toc li { + list-style-type:none; + font-size:15px; + line-height:15px; +} +#toc li { + padding:0 0 0 10px; +} +#toc li a { + position:relative; + display:block; +} + +table#npmlogo { + line-height:10px; + width:180px; + margin:0 auto; +} + +@media print { + a[href] { + color:inherit; + } + a[href]:after { + white-space:nowrap; + content:" " attr(href); + } + a[href^=\#], .navigation { + display:none; + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/html/static/toc.js b/bin/nodejs0.10.47/node_modules/npm/html/static/toc.js new file mode 100644 index 00000000..87061543 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/html/static/toc.js @@ -0,0 +1,29 @@ +;(function () { +var wrapper = document.getElementById("wrapper") +var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) + .filter(function (el) { + return el.parentNode === wrapper + && el.tagName.match(/H[1-6]/) + && el.id + }) +var l = 2 + , toc = document.createElement("ul") +toc.innerHTML = els.map(function (el) { + var i = el.tagName.charAt(1) + , out = "" + while (i > l) { + out += "
    " + l ++ + } + while (i < l) { + out += "
" + l -- + } + out += "
  • " + + ( el.innerText || el.text || el.innerHTML) + + "" + return out +}).join("\n") +toc.id = "toc" +document.body.appendChild(toc) +})(); diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/access.js b/bin/nodejs0.10.47/node_modules/npm/lib/access.js new file mode 100644 index 00000000..e6398eb1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/access.js @@ -0,0 +1,127 @@ +'use strict' + +var resolve = require('path').resolve + +var readPackageJson = require('read-package-json') +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm.js') + +var whoami = require('./whoami') + +module.exports = access + +access.usage = + 'npm access public []\n' + + 'npm access restricted []\n' + + 'npm access grant []\n' + + 'npm access revoke []\n' + + 'npm access ls-packages [||]\n' + + 'npm access ls-collaborators [ []]\n' + + 'npm access edit []' + +access.subcommands = ['public', 'restricted', 'grant', 'revoke', + 'ls-packages', 'ls-collaborators', 'edit'] + +access.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, access.subcommands) + } + + switch (argv[2]) { + case 'grant': + if (argv.length === 3) { + return cb(null, ['read-only', 'read-write']) + } else { + return cb(null, []) + } + break + case 'public': + case 'restricted': + case 'ls-packages': + case 'ls-collaborators': + case 'edit': + return cb(null, []) + case 'revoke': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function access (args, cb) { + var cmd = args.shift() + var params + return parseParams(cmd, args, function (err, p) { + if (err) { return cb(err) } + params = p + return mapToRegistry(params.package, npm.config, invokeCmd) + }) + + function invokeCmd (err, uri, auth, base) { + if (err) { return cb(err) } + params.auth = auth + try { + return npm.registry.access(cmd, uri, params, function (err, data) { + !err && data && console.log(JSON.stringify(data, undefined, 2)) + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + access.usage) + } + } +} + +function parseParams (cmd, args, cb) { + // mapToRegistry will complain if package is undefined, + // but it's not needed for ls-packages + var params = { 'package': '' } + if (cmd === 'grant') { + params.permissions = args.shift() + } + if (['grant', 'revoke', 'ls-packages'].indexOf(cmd) !== -1) { + var entity = (args.shift() || '').split(':') + params.scope = entity[0] + params.team = entity[1] + } + + if (cmd === 'ls-packages') { + if (!params.scope) { + whoami([], true, function (err, scope) { + params.scope = scope + cb(err, params) + }) + } else { + cb(null, params) + } + } else { + getPackage(args.shift(), function (err, pkg) { + if (err) return cb(err) + params.package = pkg + + if (cmd === 'ls-collaborators') params.user = args.shift() + cb(null, params) + }) + } +} + +function getPackage (name, cb) { + if (name && name.trim()) { + cb(null, name.trim()) + } else { + readPackageJson( + resolve(npm.prefix, 'package.json'), + function (err, data) { + if (err) { + if (err.code === 'ENOENT') { + cb(new Error('no package name passed to command and no package.json found')) + } else { + cb(err) + } + } else { + cb(null, data.name) + } + } + ) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/adduser.js b/bin/nodejs0.10.47/node_modules/npm/lib/adduser.js new file mode 100644 index 00000000..0f9386b5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/adduser.js @@ -0,0 +1,177 @@ + +module.exports = adduser + +var log = require("npmlog") + , npm = require("./npm.js") + , read = require("read") + , userValidate = require("npm-user-validate") + , crypto + +try { + crypto = require("crypto") +} catch (ex) {} + +adduser.usage = "npm adduser\nThen enter stuff at the prompts" + +function adduser (args, cb) { + npm.spinner.stop() + if (!crypto) return cb(new Error( + "You must compile node with ssl support to use the adduser feature")) + + var creds = npm.config.getCredentialsByURI(npm.config.get("registry")) + var c = { u : creds.username || "" + , p : creds.password || "" + , e : creds.email || "" + } + , u = {} + , fns = [readUsername, readPassword, readEmail, save] + + loop() + function loop (er) { + if (er) return cb(er) + var fn = fns.shift() + if (fn) return fn(c, u, loop) + cb() + } +} + +function readUsername (c, u, cb) { + var v = userValidate.username + read({prompt: "Username: ", default: c.u || ""}, function (er, un) { + if (er) { + return cb(er.message === "cancelled" ? er.message : er) + } + + // make sure it's valid. we have to do this here, because + // couchdb will only ever say "bad password" with a 401 when + // you try to PUT a _users record that the validate_doc_update + // rejects for *any* reason. + + if (!un) { + return readUsername(c, u, cb) + } + + var error = v(un) + if (error) { + log.warn(error.message) + return readUsername(c, u, cb) + } + + c.changed = c.u !== un + u.u = un + cb(er) + }) +} + +function readPassword (c, u, cb) { + var v = userValidate.pw + + var prompt + if (c.p && !c.changed) { + prompt = "Password: (or leave unchanged) " + } else { + prompt = "Password: " + } + + read({prompt: prompt, silent: true}, function (er, pw) { + if (er) { + return cb(er.message === "cancelled" ? er.message : er) + } + + if (!c.changed && pw === "") { + // when the username was not changed, + // empty response means "use the old value" + pw = c.p + } + + if (!pw) { + return readPassword(c, u, cb) + } + + var error = v(pw) + if (error) { + log.warn(error.message) + return readPassword(c, u, cb) + } + + c.changed = c.changed || c.p !== pw + u.p = pw + cb(er) + }) +} + +function readEmail (c, u, cb) { + var v = userValidate.email + var r = { prompt: "Email: (this IS public) ", default: c.e || "" } + read(r, function (er, em) { + if (er) { + return cb(er.message === "cancelled" ? er.message : er) + } + + if (!em) { + return readEmail(c, u, cb) + } + + var error = v(em) + if (error) { + log.warn(error.message) + return readEmail(c, u, cb) + } + + u.e = em + cb(er) + }) +} + +function save (c, u, cb) { + npm.spinner.start() + + // save existing configs, but yank off for this PUT + var uri = npm.config.get("registry") + var scope = npm.config.get("scope") + + // there may be a saved scope and no --registry (for login) + if (scope) { + if (scope.charAt(0) !== "@") scope = "@" + scope + + var scopedRegistry = npm.config.get(scope + ":registry") + var cliRegistry = npm.config.get("registry", "cli") + if (scopedRegistry && !cliRegistry) uri = scopedRegistry + } + + var params = { + auth : { + username : u.u, + password : u.p, + email : u.e + } + } + npm.registry.adduser(uri, params, function (er, doc) { + npm.spinner.stop() + if (er) return cb(er) + + // don't want this polluting the configuration + npm.config.del("_token", "user") + + if (scope) npm.config.set(scope + ":registry", uri, "user") + + if (doc && doc.token) { + npm.config.setCredentialsByURI(uri, { + token : doc.token + }) + } + else { + npm.config.setCredentialsByURI(uri, { + username : u.u, + password : u.p, + email : u.e, + alwaysAuth : npm.config.get("always-auth") + }) + } + + log.info('adduser', 'Authorized user %s', u.u) + var scopeMessage = scope ? ' to scope ' + scope : '' + console.log('Logged in as %s%s on %s.', u.u, scopeMessage, uri) + npm.config.save('user', cb) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/bin.js b/bin/nodejs0.10.47/node_modules/npm/lib/bin.js new file mode 100644 index 00000000..a019852f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/bin.js @@ -0,0 +1,19 @@ +module.exports = bin + +var npm = require("./npm.js") +var osenv = require("osenv") + +bin.usage = "npm bin\nnpm bin -g\n(just prints the bin folder)" + +function bin (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + var b = npm.bin + , PATH = osenv.path() + + if (!silent) console.log(b) + process.nextTick(cb.bind(this, null, b)) + + if (npm.config.get("global") && PATH.indexOf(b) === -1) { + npm.config.get("logstream").write("(not in PATH env variable)\n") + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/bugs.js b/bin/nodejs0.10.47/node_modules/npm/lib/bugs.js new file mode 100644 index 00000000..aa013a1e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/bugs.js @@ -0,0 +1,69 @@ + +module.exports = bugs + +bugs.usage = "npm bugs " + +var npm = require("./npm.js") + , log = require("npmlog") + , opener = require("opener") + , path = require("path") + , readJson = require("read-package-json") + , npa = require("npm-package-arg") + , fs = require("fs") + , mapToRegistry = require("./utils/map-to-registry.js") + +bugs.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function bugs (args, cb) { + var n = args.length && npa(args[0]).name || "." + fs.stat(n, function (er, s) { + if (er) { + if (er.code === "ENOENT") return callRegistry(n, cb) + return cb(er) + } + if (!s.isDirectory()) return callRegistry(n, cb) + readJson(path.resolve(n, "package.json"), function(er, d) { + if (er) return cb(er) + getUrlAndOpen(d, cb) + }) + }) +} + +function getUrlAndOpen (d, cb) { + var repo = d.repository || d.repositories + , url + if (d.bugs) { + url = (typeof d.bugs === "string") ? d.bugs : d.bugs.url + } + else if (repo) { + if (Array.isArray(repo)) repo = repo.shift() + if (repo.hasOwnProperty("url")) repo = repo.url + log.verbose("bugs", "repository", repo) + if (repo && repo.match(/^(https?:\/\/|git(:\/\/|@))github.com/)) { + url = repo.replace(/^git(@|:\/\/)/, "https://") + .replace(/^https?:\/\/github.com:/, "https://github.com/") + .replace(/\.git$/, "")+"/issues" + } + } + if (!url) { + url = "https://www.npmjs.org/package/" + d.name + } + log.silly("bugs", "url", url) + opener(url, { command: npm.config.get("browser") }, cb) +} + +function callRegistry (name, cb) { + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri + "/latest", { auth : auth }, function (er, d) { + if (er) return cb(er) + + getUrlAndOpen(d, cb) + }) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/build.js b/bin/nodejs0.10.47/node_modules/npm/lib/build.js new file mode 100644 index 00000000..e1e99de2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/build.js @@ -0,0 +1,253 @@ +// npm build command + +// everything about the installation after the creation of +// the .npm/{name}/{version}/package folder. +// linking the modules into the npm.root, +// resolving dependencies, etc. + +// This runs AFTER install or link are completed. + +var npm = require("./npm.js") + , log = require("npmlog") + , chain = require("slide").chain + , fs = require("graceful-fs") + , path = require("path") + , lifecycle = require("./utils/lifecycle.js") + , readJson = require("read-package-json") + , link = require("./utils/link.js") + , linkIfExists = link.ifExists + , cmdShim = require("cmd-shim") + , cmdShimIfExists = cmdShim.ifExists + , asyncMap = require("slide").asyncMap + , ini = require("ini") + , writeFile = require("write-file-atomic") + +module.exports = build +build.usage = "npm build \n(this is plumbing)" + +build._didBuild = {} +build._noLC = {} +function build (args, global, didPre, didRB, cb) { + if (typeof cb !== "function") cb = didRB, didRB = false + if (typeof cb !== "function") cb = didPre, didPre = false + if (typeof cb !== "function") { + cb = global, global = npm.config.get("global") + } + // it'd be nice to asyncMap these, but actually, doing them + // in parallel generally munges up the output from node-waf + var builder = build_(global, didPre, didRB) + chain(args.map(function (arg) { return function (cb) { + builder(arg, cb) + }}), cb) +} + +function build_ (global, didPre, didRB) { return function (folder, cb) { + folder = path.resolve(folder) + if (build._didBuild[folder]) log.info("build", "already built", folder) + build._didBuild[folder] = true + log.info("build", folder) + readJson(path.resolve(folder, "package.json"), function (er, pkg) { + if (er) return cb(er) + chain + ( [ !didPre && [lifecycle, pkg, "preinstall", folder] + , [linkStuff, pkg, folder, global, didRB] + , [writeBuiltinConf, pkg, folder] + , didPre !== build._noLC && [lifecycle, pkg, "install", folder] + , didPre !== build._noLC && [lifecycle, pkg, "postinstall", folder] + , didPre !== build._noLC + && npm.config.get("npat") + && [lifecycle, pkg, "test", folder] ] + , cb ) + }) +}} + +function writeBuiltinConf (pkg, folder, cb) { + // the builtin config is "sticky". Any time npm installs + // itself globally, it puts its builtin config file there + var parent = path.dirname(folder) + var dir = npm.globalDir + + if (pkg.name !== "npm" || + !npm.config.get("global") || + !npm.config.usingBuiltin || + dir !== parent) { + return cb() + } + + var data = ini.stringify(npm.config.sources.builtin.data) + writeFile(path.resolve(folder, "npmrc"), data, cb) +} + +function linkStuff (pkg, folder, global, didRB, cb) { + // allow to opt out of linking binaries. + if (npm.config.get("bin-links") === false) return 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 parent = pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder) + var gnm = global && npm.globalDir + var gtop = parent === gnm + + log.info('linkStuff', pkg._id) + log.silly('linkStuff', pkg._id, 'has', parent, 'as its parent node_modules') + if (global) log.silly('linkStuff', pkg._id, 'is part of a global install') + if (gnm) log.silly('linkStuff', pkg._id, 'is installed into a global node_modules') + if (gtop) log.silly('linkStuff', pkg._id, 'is installed into the top-level global node_modules') + + shouldWarn(pkg, folder, global, function () { + asyncMap( + [linkBins, linkMans, !didRB && rebuildBundles], + function (fn, cb) { + if (!fn) return cb() + log.verbose(fn.name, pkg._id) + fn(pkg, folder, parent, gtop, cb) + }, + cb + ) + }) +} + +function shouldWarn(pkg, folder, global, cb) { + var parent = path.dirname(folder) + , top = parent === npm.dir + , cwd = npm.localPrefix + + readJson(path.resolve(cwd, "package.json"), function(er, topPkg) { + if (er) return cb(er) + + var linkedPkg = path.basename(cwd) + , currentPkg = path.basename(folder) + + // current searched package is the linked package on first call + if (linkedPkg !== currentPkg) { + + // don't generate a warning if it's listed in dependencies + if (Object.keys(topPkg.dependencies || {}) + .concat(Object.keys(topPkg.devDependencies || {})) + .indexOf(currentPkg) === -1) { + + if (top && pkg.preferGlobal && !global) { + log.warn("prefer global", pkg._id + " should be installed with -g") + } + } + } + + cb() + }) +} + +function rebuildBundles (pkg, folder, parent, gtop, cb) { + if (!npm.config.get("rebuild-bundle")) return cb() + + var deps = Object.keys(pkg.dependencies || {}) + .concat(Object.keys(pkg.devDependencies || {})) + , bundles = pkg.bundleDependencies || pkg.bundledDependencies || [] + + fs.readdir(path.resolve(folder, "node_modules"), function (er, files) { + // error means no bundles + if (er) return cb() + + log.verbose("rebuildBundles", files) + // don't asyncMap these, because otherwise build script output + // gets interleaved and is impossible to read + chain(files.filter(function (file) { + // rebuild if: + // not a .folder, like .bin or .hooks + return !file.match(/^[\._-]/) + // not some old 0.x style bundle + && file.indexOf("@") === -1 + // either not a dep, or explicitly bundled + && (deps.indexOf(file) === -1 || bundles.indexOf(file) !== -1) + }).map(function (file) { + file = path.resolve(folder, "node_modules", file) + return function (cb) { + if (build._didBuild[file]) return cb() + log.verbose("rebuild bundle", file) + // if file is not a package dir, then don't do it. + fs.lstat(path.resolve(file, "package.json"), function (er) { + if (er) return cb() + build_(false)(file, cb) + }) + }}), cb) + }) +} + +function linkBins (pkg, folder, parent, gtop, cb) { + if (!pkg.bin || !gtop && path.basename(parent) !== "node_modules") { + return cb() + } + var binRoot = gtop ? npm.globalBin + : path.resolve(parent, ".bin") + log.verbose("link bins", [pkg.bin, binRoot, gtop]) + + asyncMap(Object.keys(pkg.bin), function (b, cb) { + linkBin( path.resolve(folder, pkg.bin[b]) + , path.resolve(binRoot, b) + , gtop && folder + , function (er) { + if (er) return cb(er) + // bins should always be executable. + // XXX skip chmod on windows? + var src = path.resolve(folder, pkg.bin[b]) + fs.chmod(src, npm.modes.exec, function (er) { + if (er && er.code === "ENOENT" && npm.config.get("ignore-scripts")) { + return cb() + } + if (er || !gtop) return cb(er) + var dest = path.resolve(binRoot, b) + , out = npm.config.get("parseable") + ? dest + "::" + src + ":BINFILE" + : dest + " -> " + src + console.log(out) + cb() + }) + }) + }, cb) +} + +function linkBin (from, to, gently, cb) { + if (process.platform !== "win32") { + return linkIfExists(from, to, gently, cb) + } else { + return cmdShimIfExists(from, to, cb) + } +} + +function linkMans (pkg, folder, parent, gtop, cb) { + if (!pkg.man || !gtop || process.platform === "win32") return cb() + + var manRoot = path.resolve(npm.config.get("prefix"), "share", "man") + log.verbose("linkMans", "man files are", pkg.man, "in", manRoot) + + // make sure that the mans are unique. + // otherwise, if there are dupes, it'll fail with EEXIST + var set = pkg.man.reduce(function (acc, man) { + acc[path.basename(man)] = man + return acc + }, {}) + pkg.man = pkg.man.filter(function (man) { + return set[path.basename(man)] === man + }) + + asyncMap(pkg.man, function (man, cb) { + if (typeof man !== "string") return cb() + log.silly("linkMans", "preparing to link", man) + var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) + if (!parseMan) { + return cb(new Error( + man+" is not a valid name for a man file. " + + "Man files must end with a number, " + + "and optionally a .gz suffix if they are compressed." + )) + } + + var stem = parseMan[1] + var sxn = parseMan[2] + var bn = path.basename(stem) + var manSrc = path.resolve(folder, man) + var manDest = path.join(manRoot, "man" + sxn, bn) + + linkIfExists(manSrc, manDest, gtop && folder, cb) + }, cb) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/cache.js b/bin/nodejs0.10.47/node_modules/npm/lib/cache.js new file mode 100644 index 00000000..6dcf2d7e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/cache.js @@ -0,0 +1,354 @@ +// XXX lib/utils/tar.js and this file need to be rewritten. + +// URL-to-cache folder mapping: +// : -> ! +// @ -> _ +// http://registry.npmjs.org/foo/version -> cache/http!/... +// + +/* +fetching a URL: +1. Check for URL in inflight URLs. If present, add cb, and return. +2. Acquire lock at {cache}/{sha(url)}.lock + retries = {cache-lock-retries, def=10} + stale = {cache-lock-stale, def=60000} + wait = {cache-lock-wait, def=10000} +3. if lock can't be acquired, then fail +4. fetch url, clear lock, call cbs + +cache folders: +1. urls: http!/server.com/path/to/thing +2. c:\path\to\thing: file!/c!/path/to/thing +3. /path/to/thing: file!/path/to/thing +4. git@ private: git_github.com!npm/npm +5. git://public: git!/github.com/npm/npm +6. git+blah:// git-blah!/server.com/foo/bar + +adding a folder: +1. tar into tmp/random/package.tgz +2. untar into tmp/random/contents/package, stripping one dir piece +3. tar tmp/random/contents/package to cache/n/v/package.tgz +4. untar cache/n/v/package.tgz into cache/n/v/package +5. rm tmp/random + +Adding a url: +1. fetch to tmp/random/package.tgz +2. goto folder(2) + +adding a name@version: +1. registry.get(name/version) +2. if response isn't 304, add url(dist.tarball) + +adding a name@range: +1. registry.get(name) +2. Find a version that satisfies +3. add name@version + +adding a local tarball: +1. untar to tmp/random/{blah} +2. goto folder(2) + +adding a namespaced package: +1. lookup registry for @namespace +2. namespace_registry.get('name') +3. add url(namespace/latest.tarball) +*/ + +exports = module.exports = cache + +cache.unpack = unpack +cache.clean = clean +cache.read = read + +var npm = require("./npm.js") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , assert = require("assert") + , rm = require("./utils/gently-rm.js") + , readJson = require("read-package-json") + , log = require("npmlog") + , path = require("path") + , asyncMap = require("slide").asyncMap + , tar = require("./utils/tar.js") + , fileCompletion = require("./utils/completion/file-completion.js") + , deprCheck = require("./utils/depr-check.js") + , addNamed = require("./cache/add-named.js") + , addLocal = require("./cache/add-local.js") + , addRemoteTarball = require("./cache/add-remote-tarball.js") + , addRemoteGit = require("./cache/add-remote-git.js") + , inflight = require("inflight") + , realizePackageSpecifier = require("realize-package-specifier") + , npa = require("npm-package-arg") + , getStat = require("./cache/get-stat.js") + , cachedPackageRoot = require("./cache/cached-package-root.js") + , mapToRegistry = require("./utils/map-to-registry.js") + +cache.usage = "npm cache add " + + "\nnpm cache add " + + "\nnpm cache add " + + "\nnpm cache add " + + "\nnpm cache add @" + + "\nnpm cache ls []" + + "\nnpm cache clean [[@]]" + +cache.completion = function (opts, cb) { + + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, ["add", "ls", "clean"]) + } + + switch (argv[2]) { + case "clean": + case "ls": + // cache and ls are easy, because the completion is + // what ls_ returns anyway. + // just get the partial words, minus the last path part + var p = path.dirname(opts.partialWords.slice(3).join("/")) + if (p === ".") p = "" + return ls_(p, 2, cb) + case "add": + // Same semantics as install and publish. + return npm.commands.install.completion(opts, cb) + } +} + +function cache (args, cb) { + var cmd = args.shift() + switch (cmd) { + case "rm": case "clear": case "clean": return clean(args, cb) + case "list": case "sl": case "ls": return ls(args, cb) + case "add": return add(args, npm.prefix, cb) + default: return cb("Usage: "+cache.usage) + } +} + +// if the pkg and ver are in the cache, then +// just do a readJson and return. +// if they're not, then fetch them from the registry. +function read (name, ver, forceBypass, cb) { + assert(typeof name === "string", "must include name of module to install") + assert(typeof cb === "function", "must include callback") + + if (forceBypass === undefined || forceBypass === null) forceBypass = true + + var root = cachedPackageRoot({name : name, version : ver}) + function c (er, data) { + if (er) log.verbose("cache", "addNamed error for", name+"@"+ver, er) + if (data) deprCheck(data) + + return cb(er, data) + } + + if (forceBypass && npm.config.get("force")) { + log.verbose("using force", "skipping cache") + return addNamed(name, ver, null, c) + } + + readJson(path.join(root, "package", "package.json"), function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + + if (data) { + if (!data.name) return cb(new Error("No name provided")) + if (!data.version) return cb(new Error("No version provided")) + } + + if (er) return addNamed(name, ver, null, c) + else c(er, data) + }) +} + +function normalize (args) { + var normalized = "" + if (args.length > 0) { + var a = npa(args[0]) + if (a.name) normalized = a.name + if (a.rawSpec) normalized = [normalized, a.rawSpec].join("/") + if (args.length > 1) normalized = [normalized].concat(args.slice(1)).join("/") + } + + if (normalized.substr(-1) === "/") { + normalized = normalized.substr(0, normalized.length - 1) + } + normalized = path.normalize(normalized) + log.silly("ls", "normalized", normalized) + + return normalized +} + +// npm cache ls [] +function ls (args, cb) { + var prefix = npm.config.get("cache") + if (prefix.indexOf(process.env.HOME) === 0) { + prefix = "~" + prefix.substr(process.env.HOME.length) + } + ls_(normalize(args), npm.config.get("depth"), function (er, files) { + console.log(files.map(function (f) { + return path.join(prefix, f) + }).join("\n").trim()) + cb(er, files) + }) +} + +// Calls cb with list of cached pkgs matching show. +function ls_ (req, depth, cb) { + return fileCompletion(npm.cache, req, depth, cb) +} + +// npm cache clean [] +function clean (args, cb) { + assert(typeof cb === "function", "must include callback") + + if (!args) args = [] + + var f = path.join(npm.cache, normalize(args)) + if (f === npm.cache) { + fs.readdir(npm.cache, function (er, files) { + if (er) return cb() + asyncMap( files.filter(function (f) { + return npm.config.get("force") || f !== "-" + }).map(function (f) { + return path.join(npm.cache, f) + }) + , rm, cb ) + }) + } + else { + rm(f, cb) + } +} + +// npm cache add +// npm cache add +// npm cache add +// npm cache add +cache.add = function (pkg, ver, where, scrub, cb) { + assert(typeof pkg === "string", "must include name of package to install") + assert(typeof cb === "function", "must include callback") + + if (scrub) { + return clean([], function (er) { + if (er) return cb(er) + add([pkg, ver], where, cb) + }) + } + return add([pkg, ver], where, cb) +} + + +var adding = 0 +function add (args, where, cb) { + // this is hot code. almost everything passes through here. + // the args can be any of: + // ["url"] + // ["pkg", "version"] + // ["pkg@version"] + // ["pkg", "url"] + // This is tricky, because urls can contain @ + // Also, in some cases we get [name, null] rather + // that just a single argument. + + var usage = "Usage:\n" + + " npm cache add \n" + + " npm cache add @\n" + + " npm cache add \n" + + " npm cache add \n" + , spec + + log.silly("cache add", "args", args) + + if (args[1] === undefined) args[1] = null + + // at this point the args length must ==2 + if (args[1] !== null) { + spec = args[0]+"@"+args[1] + } else if (args.length === 2) { + spec = args[0] + } + + log.verbose("cache add", "spec", spec) + + if (!spec) return cb(usage) + + if (adding <= 0) { + npm.spinner.start() + } + adding++ + cb = afterAdd(cb) + + realizePackageSpecifier(spec, where, function (err, p) { + if (err) return cb(err) + + log.silly("cache add", "parsed spec", p) + + switch (p.type) { + case "local": + case "directory": + addLocal(p, null, cb) + break + case "remote": + // get auth, if possible + mapToRegistry(p.raw, npm.config, function (err, uri, auth) { + if (err) return cb(err) + + addRemoteTarball(p.spec, {name : p.name}, null, auth, cb) + }) + break + case "git": + case "hosted": + addRemoteGit(p.rawSpec, cb) + break + default: + if (p.name) return addNamed(p.name, p.spec, null, cb) + + cb(new Error("couldn't figure out how to install " + spec)) + } + }) +} + +function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) { + if (typeof cb !== "function") cb = gid, gid = null + if (typeof cb !== "function") cb = uid, uid = null + if (typeof cb !== "function") cb = fMode, fMode = null + if (typeof cb !== "function") cb = dMode, dMode = null + + read(pkg, ver, false, function (er) { + if (er) { + log.error("unpack", "Could not read data for %s", pkg + "@" + ver) + return cb(er) + } + npm.commands.unbuild([unpackTarget], true, function (er) { + if (er) return cb(er) + tar.unpack( path.join(cachedPackageRoot({name : pkg, version : ver}), "package.tgz") + , unpackTarget + , dMode, fMode + , uid, gid + , cb ) + }) + }) +} + +function afterAdd (cb) { return function (er, data) { + adding-- + if (adding <= 0) npm.spinner.stop() + + if (er || !data || !data.name || !data.version) return cb(er, data) + log.silly("cache", "afterAdd", data.name+"@"+data.version) + + // Save the resolved, shasum, etc. into the data so that the next + // time we load from this cached data, we have all the same info. + // Ignore if it fails. + var pj = path.join(cachedPackageRoot(data), "package", "package.json") + + var done = inflight(pj, cb) + if (!done) return log.verbose("afterAdd", pj, "already in flight; not writing") + log.verbose("afterAdd", pj, "not in flight; writing") + + getStat(function (er, cs) { + if (er) return done(er) + writeFileAtomic(pj, JSON.stringify(data), {chown : cs}, function (er) { + if (!er) log.verbose("afterAdd", pj, "written") + return done(null, data) + }) + }) +}} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-local-tarball.js b/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-local-tarball.js new file mode 100644 index 00000000..ddc0278a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-local-tarball.js @@ -0,0 +1,180 @@ +var mkdir = require("mkdirp") + , assert = require("assert") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , path = require("path") + , sha = require("sha") + , npm = require("../npm.js") + , log = require("npmlog") + , tar = require("../utils/tar.js") + , pathIsInside = require("path-is-inside") + , getCacheStat = require("./get-stat.js") + , cachedPackageRoot = require("./cached-package-root.js") + , chownr = require("chownr") + , inflight = require("inflight") + , once = require("once") + , writeStreamAtomic = require("fs-write-stream-atomic") + , randomBytes = require("crypto").pseudoRandomBytes // only need uniqueness + +module.exports = addLocalTarball + +function addLocalTarball (p, pkgData, shasum, cb) { + assert(typeof p === "string", "must have path") + assert(typeof cb === "function", "must have callback") + + if (!pkgData) pkgData = {} + + // If we don't have a shasum yet, compute it. + if (!shasum) { + return sha.get(p, function (er, shasum) { + if (er) return cb(er) + log.silly("addLocalTarball", "shasum (computed)", shasum) + addLocalTarball(p, pkgData, shasum, cb) + }) + } + + if (pathIsInside(p, npm.cache)) { + if (path.basename(p) !== "package.tgz") { + return cb(new Error("Not a valid cache tarball name: "+p)) + } + log.verbose("addLocalTarball", "adding from inside cache", p) + return addPlacedTarball(p, pkgData, shasum, cb) + } + + addTmpTarball(p, pkgData, shasum, function (er, data) { + if (data) { + data._resolved = p + data._shasum = data._shasum || shasum + } + return cb(er, data) + }) +} + +function addPlacedTarball (p, pkgData, shasum, cb) { + assert(pkgData, "should have package data by now") + assert(typeof cb === "function", "cb function required") + + getCacheStat(function (er, cs) { + if (er) return cb(er) + return addPlacedTarball_(p, pkgData, cs.uid, cs.gid, shasum, cb) + }) +} + +function addPlacedTarball_ (p, pkgData, uid, gid, resolvedSum, cb) { + var folder = path.join(cachedPackageRoot(pkgData), "package") + + // First, make sure we have the shasum, if we don't already. + if (!resolvedSum) { + sha.get(p, function (er, shasum) { + if (er) return cb(er) + addPlacedTarball_(p, pkgData, uid, gid, shasum, cb) + }) + return + } + + mkdir(folder, function (er) { + if (er) return cb(er) + var pj = path.join(folder, "package.json") + var json = JSON.stringify(pkgData, null, 2) + writeFileAtomic(pj, json, function (er) { + cb(er, pkgData) + }) + }) +} + +function addTmpTarball (tgz, pkgData, shasum, cb) { + assert(typeof cb === "function", "must have callback function") + assert(shasum, "must have shasum by now") + + cb = inflight("addTmpTarball:" + tgz, cb) + if (!cb) return log.verbose("addTmpTarball", tgz, "already in flight; not adding") + log.verbose("addTmpTarball", tgz, "not in flight; adding") + + // we already have the package info, so just move into place + if (pkgData && pkgData.name && pkgData.version) { + log.verbose( + "addTmpTarball", + "already have metadata; skipping unpack for", + pkgData.name + "@" + pkgData.version + ) + return addTmpTarball_(tgz, pkgData, shasum, cb) + } + + // This is a tarball we probably downloaded from the internet. The shasum's + // already been checked, but we haven't ever had a peek inside, so we unpack + // it here just to make sure it is what it says it is. + // + // NOTE: we might not have any clue what we think it is, for example if the + // user just did `npm install ./foo.tgz` + + // generate a unique filename + randomBytes(6, function (er, random) { + if (er) return cb(er) + + var target = path.join(npm.tmp, "unpack-" + random.toString("hex")) + getCacheStat(function (er, cs) { + if (er) return cb(er) + + log.verbose("addTmpTarball", "validating metadata from", tgz) + tar.unpack(tgz, target, null, null, cs.uid, cs.gid, function (er, data) { + if (er) return cb(er) + + // check that this is what we expected. + if (!data.name) { + return cb(new Error("No name provided")) + } + else if (pkgData.name && data.name !== pkgData.name) { + return cb(new Error("Invalid Package: expected " + pkgData.name + + " but found " + data.name)) + } + + if (!data.version) { + return cb(new Error("No version provided")) + } + else if (pkgData.version && data.version !== pkgData.version) { + return cb(new Error("Invalid Package: expected " + + pkgData.name + "@" + pkgData.version + + " but found " + data.name + "@" + data.version)) + } + + addTmpTarball_(tgz, data, shasum, cb) + }) + }) + }) +} + +function addTmpTarball_ (tgz, data, shasum, cb) { + assert(typeof cb === "function", "must have callback function") + cb = once(cb) + + assert(data.name, "should have package name by now") + assert(data.version, "should have package version by now") + + var root = cachedPackageRoot(data) + var pkg = path.resolve(root, "package") + var target = path.resolve(root, "package.tgz") + getCacheStat(function (er, cs) { + if (er) return cb(er) + mkdir(pkg, function (er, created) { + + // chown starting from the first dir created by mkdirp, + // or the root dir, if none had to be created, so that + // we know that we get all the children. + function chown () { + chownr(created || root, cs.uid, cs.gid, done) + } + + if (er) return cb(er) + var read = fs.createReadStream(tgz) + var write = writeStreamAtomic(target, { mode: npm.modes.file }) + var fin = cs.uid && cs.gid ? chown : done + read.on("error", cb).pipe(write).on("error", cb).on("close", fin) + }) + + }) + + function done() { + data._shasum = data._shasum || shasum + cb(null, data) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-local.js b/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-local.js new file mode 100644 index 00000000..3e957609 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-local.js @@ -0,0 +1,123 @@ +var assert = require("assert") + , path = require("path") + , mkdir = require("mkdirp") + , chownr = require("chownr") + , pathIsInside = require("path-is-inside") + , readJson = require("read-package-json") + , log = require("npmlog") + , npm = require("../npm.js") + , tar = require("../utils/tar.js") + , deprCheck = require("../utils/depr-check.js") + , getCacheStat = require("./get-stat.js") + , cachedPackageRoot = require("./cached-package-root.js") + , addLocalTarball = require("./add-local-tarball.js") + , sha = require("sha") + , inflight = require("inflight") + +module.exports = addLocal + +function addLocal (p, pkgData, cb_) { + assert(typeof p === "object", "must have spec info") + assert(typeof cb === "function", "must have callback") + + pkgData = pkgData || {} + + function cb (er, data) { + if (er) { + log.error("addLocal", "Could not install %s", p.spec) + return cb_(er) + } + if (data && !data._fromGithub) { + data._from = path.relative(npm.prefix, p.spec) || "." + var resolved = path.relative(npm.prefix, p.spec) + if (resolved) data._resolved = "file:"+resolved + } + return cb_(er, data) + } + + if (p.type === "directory") { + addLocalDirectory(p.spec, pkgData, null, cb) + } + else { + addLocalTarball(p.spec, pkgData, null, cb) + } +} + +// At this point, if shasum is set, it's something that we've already +// read and checked. Just stashing it in the data at this point. +function addLocalDirectory (p, pkgData, shasum, cb) { + assert(pkgData, "must pass package data") + assert(typeof cb === "function", "must have callback") + + // if it's a folder, then read the package.json, + // tar it to the proper place, and add the cache tar + if (pathIsInside(p, npm.cache)) return cb(new Error( + "Adding a cache directory to the cache will make the world implode.")) + + readJson(path.join(p, "package.json"), false, function (er, data) { + if (er) return cb(er) + + if (!data.name) { + return cb(new Error("No name provided in package.json")) + } + else if (pkgData.name && pkgData.name !== data.name) { + return cb(new Error( + "Invalid package: expected " + pkgData.name + " but found " + data.name + )) + } + + if (!data.version) { + return cb(new Error("No version provided in package.json")) + } + else if (pkgData.version && pkgData.version !== data.version) { + return cb(new Error( + "Invalid package: expected " + pkgData.name + "@" + pkgData.version + + " but found " + data.name + "@" + data.version + )) + } + + deprCheck(data) + + // pack to {cache}/name/ver/package.tgz + var root = cachedPackageRoot(data) + var tgz = path.resolve(root, "package.tgz") + var pj = path.resolve(root, "package/package.json") + + var wrapped = inflight(tgz, next) + if (!wrapped) return log.verbose("addLocalDirectory", tgz, "already in flight; waiting") + log.verbose("addLocalDirectory", tgz, "not in flight; packing") + + getCacheStat(function (er, cs) { + mkdir(path.dirname(pj), function (er, made) { + if (er) return cb(er) + var fancy = !pathIsInside(p, npm.tmp) + tar.pack(tgz, p, data, fancy, function (er) { + if (er) { + log.error("addLocalDirectory", "Could not pack", p, "to", tgz) + return cb(er) + } + + if (!cs || isNaN(cs.uid) || isNaN(cs.gid)) wrapped() + + chownr(made || tgz, cs.uid, cs.gid, wrapped) + }) + }) + }) + + function next (er) { + if (er) return cb(er) + // if we have the shasum already, just add it + if (shasum) { + return addLocalTarball(tgz, data, shasum, cb) + } else { + sha.get(tgz, function (er, shasum) { + if (er) { + return cb(er) + } + data._shasum = shasum + return addLocalTarball(tgz, data, shasum, cb) + }) + } + } + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-named.js b/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-named.js new file mode 100644 index 00000000..209a1b1a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-named.js @@ -0,0 +1,299 @@ +var path = require("path") + , assert = require("assert") + , fs = require("graceful-fs") + , http = require("http") + , log = require("npmlog") + , semver = require("semver") + , readJson = require("read-package-json") + , url = require("url") + , npm = require("../npm.js") + , deprCheck = require("../utils/depr-check.js") + , inflight = require("inflight") + , addRemoteTarball = require("./add-remote-tarball.js") + , cachedPackageRoot = require("./cached-package-root.js") + , mapToRegistry = require("../utils/map-to-registry.js") + + +module.exports = addNamed + +function getOnceFromRegistry (name, from, next, done) { + function fixName(err, data, json, resp) { + // this is only necessary until npm/npm-registry-client#80 is fixed + if (err && err.pkgid && err.pkgid !== name) { + err.message = err.message.replace( + new RegExp(': ' + err.pkgid.replace(/(\W)/g, '\\$1') + '$'), + ': ' + name + ) + err.pkgid = name + } + next(err, data, json, resp) + } + + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return done(er) + + var key = "registry:" + uri + next = inflight(key, next) + if (!next) return log.verbose(from, key, "already in flight; waiting") + else log.verbose(from, key, "not in flight; fetching") + + npm.registry.get(uri, { auth : auth }, fixName) + }) +} + +function addNamed (name, version, data, cb_) { + assert(typeof name === "string", "must have module name") + assert(typeof cb_ === "function", "must have callback") + + var key = name + "@" + version + log.silly("addNamed", key) + + function cb (er, data) { + if (data && !data._fromGithub) data._from = key + cb_(er, data) + } + + if (semver.valid(version, true)) { + log.verbose('addNamed', JSON.stringify(version), 'is a plain semver version for', name) + addNameVersion(name, version, data, cb) + } else if (semver.validRange(version, true)) { + log.verbose('addNamed', JSON.stringify(version), 'is a valid semver range for', name) + addNameRange(name, version, data, cb) + } else { + log.verbose('addNamed', JSON.stringify(version), 'is being treated as a dist-tag for', name) + addNameTag(name, version, data, cb) + } +} + +function addNameTag (name, tag, data, cb) { + log.info("addNameTag", [name, tag]) + var explicit = true + if (!tag) { + explicit = false + tag = npm.config.get("tag") + } + + getOnceFromRegistry(name, "addNameTag", next, cb) + + function next (er, data, json, resp) { + if (!er) er = errorResponse(name, resp) + if (er) return cb(er) + + log.silly("addNameTag", "next cb for", name, "with tag", tag) + + engineFilter(data) + if (data["dist-tags"] && data["dist-tags"][tag] + && data.versions[data["dist-tags"][tag]]) { + var ver = data["dist-tags"][tag] + return addNamed(name, ver, data.versions[ver], cb) + } + if (!explicit && Object.keys(data.versions).length) { + return addNamed(name, "*", data, cb) + } + + er = installTargetsError(tag, data) + return cb(er) + } +} + +function engineFilter (data) { + var npmv = npm.version + , nodev = npm.config.get("node-version") + , strict = npm.config.get("engine-strict") + + if (!nodev || npm.config.get("force")) return data + + Object.keys(data.versions || {}).forEach(function (v) { + var eng = data.versions[v].engines + if (!eng) return + if (!strict && !data.versions[v].engineStrict) return + if (eng.node && !semver.satisfies(nodev, eng.node, true) + || eng.npm && !semver.satisfies(npmv, eng.npm, true)) { + delete data.versions[v] + } + }) +} + +function addNameVersion (name, v, data, cb) { + var ver = semver.valid(v, true) + if (!ver) return cb(new Error("Invalid version: "+v)) + + var response + + if (data) { + response = null + return next() + } + + getOnceFromRegistry(name, "addNameVersion", setData, cb) + + function setData (er, d, json, resp) { + if (!er) { + er = errorResponse(name, resp) + } + if (er) return cb(er) + data = d && d.versions[ver] + if (!data) { + er = new Error("version not found: "+name+"@"+ver) + er.package = name + er.statusCode = 404 + return cb(er) + } + response = resp + next() + } + + function next () { + deprCheck(data) + var dist = data.dist + + if (!dist) return cb(new Error("No dist in "+data._id+" package")) + + if (!dist.tarball) return cb(new Error( + "No dist.tarball in " + data._id + " package")) + + if ((response && response.statusCode !== 304) || npm.config.get("force")) { + return fetchit() + } + + // we got cached data, so let's see if we have a tarball. + var pkgroot = cachedPackageRoot({name : name, version : ver}) + var pkgtgz = path.join(pkgroot, "package.tgz") + var pkgjson = path.join(pkgroot, "package", "package.json") + fs.stat(pkgtgz, function (er) { + if (!er) { + readJson(pkgjson, function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + + if (data) { + if (!data.name) return cb(new Error("No name provided")) + if (!data.version) return cb(new Error("No version provided")) + + // check the SHA of the package we have, to ensure it wasn't installed + // from somewhere other than the registry (eg, a fork) + if (data._shasum && dist.shasum && data._shasum !== dist.shasum) { + return fetchit() + } + } + + if (er) return fetchit() + else return cb(null, data) + }) + } else return fetchit() + }) + + function fetchit () { + mapToRegistry(name, npm.config, function (er, _, auth, ruri) { + if (er) return cb(er) + + // Use the same protocol as the registry. https registry --> https + // tarballs, but only if they're the same hostname, or else detached + // tarballs may not work. + var tb = url.parse(dist.tarball) + var rp = url.parse(ruri) + if (tb.hostname === rp.hostname && tb.protocol !== rp.protocol) { + tb.protocol = rp.protocol + // If a different port is associated with the other protocol + // we need to update that as well + if (rp.port !== tb.port) { + tb.port = rp.port + delete tb.host + } + delete tb.href + } + tb = url.format(tb) + + // Only add non-shasum'ed packages if --forced. Only ancient things + // would lack this for good reasons nowadays. + if (!dist.shasum && !npm.config.get("force")) { + return cb(new Error("package lacks shasum: " + data._id)) + } + + addRemoteTarball(tb, data, dist.shasum, auth, cb) + }) + } + } +} + +function addNameRange (name, range, data, cb) { + range = semver.validRange(range, true) + if (range === null) return cb(new Error( + "Invalid version range: " + range + )) + + log.silly("addNameRange", {name:name, range:range, hasData:!!data}) + + if (data) return next() + + getOnceFromRegistry(name, "addNameRange", setData, cb) + + function setData (er, d, json, resp) { + if (!er) { + er = errorResponse(name, resp) + } + if (er) return cb(er) + data = d + next() + } + + function next () { + log.silly( "addNameRange", "number 2" + , {name:name, range:range, hasData:!!data}) + engineFilter(data) + + log.silly("addNameRange", "versions" + , [data.name, Object.keys(data.versions || {})]) + + // if the tagged version satisfies, then use that. + var tagged = data["dist-tags"][npm.config.get("tag")] + if (tagged + && data.versions[tagged] + && semver.satisfies(tagged, range, true)) { + return addNamed(name, tagged, data.versions[tagged], cb) + } + + // find the max satisfying version. + var versions = Object.keys(data.versions || {}) + var ms = semver.maxSatisfying(versions, range, true) + if (!ms) { + if (range === "*" && versions.length) { + return addNameTag(name, "latest", data, cb) + } else { + return cb(installTargetsError(range, data)) + } + } + + // if we don't have a registry connection, try to see if + // there's a cached copy that will be ok. + addNamed(name, ms, data.versions[ms], cb) + } +} + +function installTargetsError (requested, data) { + var targets = Object.keys(data["dist-tags"]).filter(function (f) { + return (data.versions || {}).hasOwnProperty(f) + }).concat(Object.keys(data.versions || {})) + + requested = data.name + (requested ? "@'" + requested + "'" : "") + + targets = targets.length + ? "Valid install targets:\n" + JSON.stringify(targets) + "\n" + : "No valid targets found.\n" + + "Perhaps not compatible with your version of node?" + + var er = new Error( "No compatible version found: " + + requested + "\n" + targets) + er.code = "ETARGET" + return er +} + +function errorResponse (name, response) { + var er + if (response.statusCode >= 400) { + er = new Error(http.STATUS_CODES[response.statusCode]) + er.statusCode = response.statusCode + er.code = "E" + er.statusCode + er.pkgid = name + } + return er +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-remote-git.js b/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-remote-git.js new file mode 100644 index 00000000..b6bec092 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-remote-git.js @@ -0,0 +1,480 @@ +var assert = require('assert') +var crypto = require('crypto') +var fs = require('graceful-fs') +var path = require('path') +var url = require('url') + +var chownr = require('chownr') +var dezalgo = require('dezalgo') +var hostedFromURL = require('hosted-git-info').fromUrl +var inflight = require('inflight') +var log = require('npmlog') +var mkdir = require('mkdirp') +var normalizeGitUrl = require('normalize-git-url') +var npa = require('npm-package-arg') +var realizePackageSpecifier = require('realize-package-specifier') + +var addLocal = require('./add-local.js') +var correctMkdir = require('../utils/correct-mkdir.js') +var git = require('../utils/git.js') +var npm = require('../npm.js') +var rm = require('../utils/gently-rm.js') + +var remotes = path.resolve(npm.config.get('cache'), '_git-remotes') +var templates = path.join(remotes, '_templates') + +var VALID_VARIABLES = [ + 'GIT_ASKPASS', + 'GIT_PROXY_COMMAND', + 'GIT_SSH', + 'GIT_SSH_COMMAND', + 'GIT_SSL_CAINFO', + 'GIT_SSL_NO_VERIFY' +] + +module.exports = addRemoteGit +function addRemoteGit (uri, _cb) { + assert(typeof uri === 'string', 'must have git URL') + assert(typeof _cb === 'function', 'must have callback') + var cb = dezalgo(_cb) + + log.verbose('addRemoteGit', 'caching', uri) + + // the URL comes in exactly as it was passed on the command line, or as + // normalized by normalize-package-data / read-package-json / read-installed, + // so figure out what to do with it using hosted-git-info + var parsed = hostedFromURL(uri) + if (parsed) { + // normalize GitHub syntax to org/repo (for now) + var from + if (parsed.type === 'github' && parsed.default === 'shortcut') { + from = parsed.path() + } else { + from = parsed.toString() + } + + log.verbose('addRemoteGit', from, 'is a repository hosted by', parsed.type) + + // prefer explicit URLs to pushing everything through shortcuts + if (parsed.default !== 'shortcut') { + return tryClone(from, parsed.toString(), false, cb) + } + + // try git:, then git+ssh:, then git+https: before failing + tryGitProto(from, parsed, cb) + } else { + // verify that this is a Git URL before continuing + parsed = npa(uri) + if (parsed.type !== 'git') { + return cb(new Error(uri + 'is not a Git or GitHub URL')) + } + + tryClone(parsed.rawSpec, uri, false, cb) + } +} + +function tryGitProto (from, hostedInfo, cb) { + var gitURL = hostedInfo.git() + if (!gitURL) return trySSH(from, hostedInfo, cb) + + log.silly('tryGitProto', 'attempting to clone', gitURL) + tryClone(from, gitURL, true, function (er) { + if (er) return tryHTTPS(from, hostedInfo, cb) + + cb.apply(this, arguments) + }) +} + +function tryHTTPS (from, hostedInfo, cb) { + var httpsURL = hostedInfo.https() + if (!httpsURL) { + return cb(new Error(from + ' can not be cloned via Git, SSH, or HTTPS')) + } + + log.silly('tryHTTPS', 'attempting to clone', httpsURL) + tryClone(from, httpsURL, true, function (er) { + if (er) return trySSH(from, hostedInfo, cb) + + cb.apply(this, arguments) + }) +} + +function trySSH (from, hostedInfo, cb) { + var sshURL = hostedInfo.ssh() + if (!sshURL) return tryHTTPS(from, hostedInfo, cb) + + log.silly('trySSH', 'attempting to clone', sshURL) + tryClone(from, sshURL, false, cb) +} + +function tryClone (from, combinedURL, silent, cb) { + log.silly('tryClone', 'cloning', from, 'via', combinedURL) + + var normalized = normalizeGitUrl(combinedURL) + var cloneURL = normalized.url + var treeish = normalized.branch + + // ensure that similarly-named remotes don't collide + var repoID = cloneURL.replace(/[^a-zA-Z0-9]+/g, '-') + '-' + + crypto.createHash('sha1').update(combinedURL).digest('hex').slice(0, 8) + var cachedRemote = path.join(remotes, repoID) + + cb = inflight(repoID, cb) + if (!cb) { + return log.verbose('tryClone', repoID, 'already in flight; waiting') + } + log.verbose('tryClone', repoID, 'not in flight; caching') + + // initialize the remotes cache with the correct perms + getGitDir(function (er) { + if (er) return cb(er) + fs.stat(cachedRemote, function (er, s) { + if (er) return mirrorRemote(from, cloneURL, treeish, cachedRemote, silent, finish) + if (!s.isDirectory()) return resetRemote(from, cloneURL, treeish, cachedRemote, finish) + + validateExistingRemote(from, cloneURL, treeish, cachedRemote, finish) + }) + + // always set permissions on the cached remote + function finish (er, data) { + if (er) return cb(er, data) + addModeRecursive(cachedRemote, npm.modes.file, function (er) { + return cb(er, data) + }) + } + }) +} + +// don't try too hard to hold on to a remote +function resetRemote (from, cloneURL, treeish, cachedRemote, cb) { + log.info('resetRemote', 'resetting', cachedRemote, 'for', from) + rm(cachedRemote, function (er) { + if (er) return cb(er) + mirrorRemote(from, cloneURL, treeish, cachedRemote, false, cb) + }) +} + +// reuse a cached remote when possible, but nuke it if it's in an +// inconsistent state +function validateExistingRemote (from, cloneURL, treeish, cachedRemote, cb) { + git.whichAndExec( + ['config', '--get', 'remote.origin.url'], + { cwd: cachedRemote, env: gitEnv() }, + function (er, stdout, stderr) { + var originURL + if (stdout) { + originURL = stdout.trim() + log.silly('validateExistingRemote', from, 'remote.origin.url:', originURL) + } + + if (stderr) stderr = stderr.trim() + if (stderr || er) { + log.warn('addRemoteGit', from, 'resetting remote', cachedRemote, 'because of error:', stderr || er) + return resetRemote(from, cloneURL, treeish, cachedRemote, cb) + } else if (cloneURL !== originURL) { + log.warn( + 'addRemoteGit', + from, + 'pre-existing cached repo', cachedRemote, 'points to', originURL, 'and not', cloneURL + ) + return resetRemote(from, cloneURL, treeish, cachedRemote, cb) + } + + log.verbose('validateExistingRemote', from, 'is updating existing cached remote', cachedRemote) + updateRemote(from, cloneURL, treeish, cachedRemote, cb) + } + ) +} + +// make a complete bare mirror of the remote repo +// NOTE: npm uses a blank template directory to prevent weird inconsistencies +// https://github.com/npm/npm/issues/5867 +function mirrorRemote (from, cloneURL, treeish, cachedRemote, silent, cb) { + mkdir(cachedRemote, function (er) { + if (er) return cb(er) + + var args = [ + 'clone', + '--template=' + templates, + '--mirror', + cloneURL, cachedRemote + ] + git.whichAndExec( + ['clone', '--template=' + templates, '--mirror', cloneURL, cachedRemote], + { cwd: cachedRemote, env: gitEnv() }, + function (er, stdout, stderr) { + if (er) { + var combined = (stdout + '\n' + stderr).trim() + var command = 'git ' + args.join(' ') + ':' + if (silent) { + log.verbose(command, combined) + } else { + log.error(command, combined) + } + return cb(er) + } + log.verbose('mirrorRemote', from, 'git clone ' + cloneURL, stdout.trim()) + setPermissions(from, cloneURL, treeish, cachedRemote, cb) + } + ) + }) +} + +function setPermissions (from, cloneURL, treeish, cachedRemote, cb) { + if (process.platform === 'win32') { + log.verbose('setPermissions', from, 'skipping chownr on Windows') + resolveHead(from, cloneURL, treeish, cachedRemote, cb) + } else { + getGitDir(function (er, cs) { + if (er) { + log.error('setPermissions', from, 'could not get cache stat') + return cb(er) + } + + chownr(cachedRemote, cs.uid, cs.gid, function (er) { + if (er) { + log.error( + 'setPermissions', + 'Failed to change git repository ownership under npm cache for', + cachedRemote + ) + return cb(er) + } + + log.verbose('setPermissions', from, 'set permissions on', cachedRemote) + resolveHead(from, cloneURL, treeish, cachedRemote, cb) + }) + }) + } +} + +// always fetch the origin, even right after mirroring, because this way +// permissions will get set correctly +function updateRemote (from, cloneURL, treeish, cachedRemote, cb) { + git.whichAndExec( + ['fetch', '-a', 'origin'], + { cwd: cachedRemote, env: gitEnv() }, + function (er, stdout, stderr) { + if (er) { + var combined = (stdout + '\n' + stderr).trim() + log.error('git fetch -a origin (' + cloneURL + ')', combined) + return cb(er) + } + log.verbose('updateRemote', 'git fetch -a origin (' + cloneURL + ')', stdout.trim()) + + setPermissions(from, cloneURL, treeish, cachedRemote, cb) + } + ) +} + +// branches and tags are both symbolic labels that can be attached to different +// commits, so resolve the commit-ish to the current actual treeish the label +// corresponds to +// +// important for shrinkwrap +function resolveHead (from, cloneURL, treeish, cachedRemote, cb) { + log.verbose('resolveHead', from, 'original treeish:', treeish) + var args = ['rev-list', '-n1', treeish] + git.whichAndExec( + args, + { cwd: cachedRemote, env: gitEnv() }, + function (er, stdout, stderr) { + if (er) { + log.error('git ' + args.join(' ') + ':', stderr) + return cb(er) + } + + var resolvedTreeish = stdout.trim() + log.silly('resolveHead', from, 'resolved treeish:', resolvedTreeish) + + var resolvedURL = getResolved(cloneURL, resolvedTreeish) + if (!resolvedURL) { + return cb(new Error( + 'unable to clone ' + from + ' because git clone string ' + + cloneURL + ' is in a form npm can\'t handle' + )) + } + log.verbose('resolveHead', from, 'resolved Git URL:', resolvedURL) + + // generate a unique filename + var tmpdir = path.join( + npm.tmp, + 'git-cache-' + crypto.pseudoRandomBytes(6).toString('hex'), + resolvedTreeish + ) + log.silly('resolveHead', 'Git working directory:', tmpdir) + + mkdir(tmpdir, function (er) { + if (er) return cb(er) + + cloneResolved(from, resolvedURL, resolvedTreeish, cachedRemote, tmpdir, cb) + }) + } + ) +} + +// make a clone from the mirrored cache so we have a temporary directory in +// which we can check out the resolved treeish +function cloneResolved (from, resolvedURL, resolvedTreeish, cachedRemote, tmpdir, cb) { + var args = ['clone', cachedRemote, tmpdir] + git.whichAndExec( + args, + { cwd: cachedRemote, env: gitEnv() }, + function (er, stdout, stderr) { + stdout = (stdout + '\n' + stderr).trim() + if (er) { + log.error('git ' + args.join(' ') + ':', stderr) + return cb(er) + } + log.verbose('cloneResolved', from, 'clone', stdout) + + checkoutTreeish(from, resolvedURL, resolvedTreeish, tmpdir, cb) + } + ) +} + +// there is no safe way to do a one-step clone to a treeish that isn't +// guaranteed to be a branch, so explicitly check out the treeish once it's +// cloned +function checkoutTreeish (from, resolvedURL, resolvedTreeish, tmpdir, cb) { + var args = ['checkout', resolvedTreeish] + git.whichAndExec( + args, + { cwd: tmpdir, env: gitEnv() }, + function (er, stdout, stderr) { + stdout = (stdout + '\n' + stderr).trim() + if (er) { + log.error('git ' + args.join(' ') + ':', stderr) + return cb(er) + } + log.verbose('checkoutTreeish', from, 'checkout', stdout) + + // convince addLocal that the checkout is a local dependency + realizePackageSpecifier(tmpdir, function (er, spec) { + if (er) { + log.error('addRemoteGit', 'Failed to map', tmpdir, 'to a package specifier') + return cb(er) + } + + // ensure pack logic is applied + // https://github.com/npm/npm/issues/6400 + addLocal(spec, null, function (er, data) { + if (data) { + if (npm.config.get('save-exact')) { + log.verbose('addRemoteGit', 'data._from:', resolvedURL, '(save-exact)') + data._from = resolvedURL + } else { + log.verbose('addRemoteGit', 'data._from:', from) + data._from = from + } + + log.verbose('addRemoteGit', 'data._resolved:', resolvedURL) + data._resolved = resolvedURL + } + + cb(er, data) + }) + }) + } + ) +} + +function getGitDir (cb) { + correctMkdir(remotes, function (er, stats) { + if (er) return cb(er) + + // We don't need global templates when cloning. Use an empty directory for + // the templates, creating it (and setting its permissions) if necessary. + mkdir(templates, function (er) { + if (er) return cb(er) + + // Ensure that both the template and remotes directories have the correct + // permissions. + fs.chown(templates, stats.uid, stats.gid, function (er) { + cb(er, stats) + }) + }) + }) +} + +var gitEnv_ +function gitEnv () { + // git responds to env vars in some weird ways in post-receive hooks + // so don't carry those along. + if (gitEnv_) return gitEnv_ + + // allow users to override npm's insistence on not prompting for + // passphrases, but default to just failing when credentials + // aren't available + gitEnv_ = { GIT_ASKPASS: 'echo' } + + for (var k in process.env) { + if (!~VALID_VARIABLES.indexOf(k) && k.match(/^GIT/)) continue + gitEnv_[k] = process.env[k] + } + return gitEnv_ +} + +addRemoteGit.getResolved = getResolved +function getResolved (uri, treeish) { + // normalize hosted-git-info clone URLs back into regular URLs + // this will only work on URLs that hosted-git-info recognizes + // https://github.com/npm/npm/issues/7961 + var rehydrated = hostedFromURL(uri) + if (rehydrated) uri = rehydrated.toString() + + var parsed = url.parse(uri) + + // Checks for known protocols: + // http:, https:, ssh:, and git:, with optional git+ prefix. + if (!parsed.protocol || + !parsed.protocol.match(/^(((git\+)?(https?|ssh))|git|file):$/)) { + uri = 'git+ssh://' + uri + } + + if (!/^git[+:]/.test(uri)) { + uri = 'git+' + uri + } + + // Not all URIs are actually URIs, so use regex for the treeish. + return uri.replace(/(?:#.*)?$/, '#' + treeish) +} + +// similar to chmodr except it add permissions rather than overwriting them +// adapted from https://github.com/isaacs/chmodr/blob/master/chmodr.js +function addModeRecursive (cachedRemote, mode, cb) { + fs.readdir(cachedRemote, function (er, children) { + // Any error other than ENOTDIR means it's not readable, or doesn't exist. + // Give up. + if (er && er.code !== 'ENOTDIR') return cb(er) + if (er || !children.length) return addMode(cachedRemote, mode, cb) + + var len = children.length + var errState = null + children.forEach(function (child) { + addModeRecursive(path.resolve(cachedRemote, child), mode, then) + }) + + function then (er) { + if (errState) return undefined + if (er) return cb(errState = er) + if (--len === 0) return addMode(cachedRemote, dirMode(mode), cb) + } + }) +} + +function addMode (cachedRemote, mode, cb) { + fs.stat(cachedRemote, function (er, stats) { + if (er) return cb(er) + mode = stats.mode | mode + fs.chmod(cachedRemote, mode, cb) + }) +} + +// taken from https://github.com/isaacs/chmodr/blob/master/chmodr.js +function dirMode (mode) { + if (mode & parseInt('0400', 8)) mode |= parseInt('0100', 8) + if (mode & parseInt('040', 8)) mode |= parseInt('010', 8) + if (mode & parseInt('04', 8)) mode |= parseInt('01', 8) + return mode +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-remote-tarball.js b/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-remote-tarball.js new file mode 100644 index 00000000..bbc819a4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/cache/add-remote-tarball.js @@ -0,0 +1,120 @@ +var mkdir = require("mkdirp") + , assert = require("assert") + , log = require("npmlog") + , path = require("path") + , sha = require("sha") + , retry = require("retry") + , writeStreamAtomic = require("fs-write-stream-atomic") + , PassThrough = require('readable-stream').PassThrough + , npm = require("../npm.js") + , inflight = require("inflight") + , addLocalTarball = require("./add-local-tarball.js") + , cacheFile = require("npm-cache-filename") + +module.exports = addRemoteTarball + +function addRemoteTarball (u, pkgData, shasum, auth, cb_) { + assert(typeof u === "string", "must have module URL") + assert(typeof cb_ === "function", "must have callback") + + function cb (er, data) { + if (data) { + data._from = u + data._resolved = u + data._shasum = data._shasum || shasum + } + cb_(er, data) + } + + cb_ = inflight(u, cb_) + if (!cb_) return log.verbose("addRemoteTarball", u, "already in flight; waiting") + log.verbose("addRemoteTarball", u, "not in flight; adding") + + // XXX Fetch direct to cache location, store tarballs under + // ${cache}/registry.npmjs.org/pkg/-/pkg-1.2.3.tgz + var tmp = cacheFile(npm.tmp, u) + + function next (er, resp, shasum) { + if (er) return cb(er) + addLocalTarball(tmp, pkgData, shasum, cb) + } + + log.verbose("addRemoteTarball", [u, shasum]) + mkdir(path.dirname(tmp), function (er) { + if (er) return cb(er) + addRemoteTarball_(u, tmp, shasum, auth, next) + }) +} + +function addRemoteTarball_ (u, tmp, shasum, auth, cb) { + // Tuned to spread 3 attempts over about a minute. + // See formula at . + var operation = retry.operation({ + retries: npm.config.get("fetch-retries") + , factor: npm.config.get("fetch-retry-factor") + , minTimeout: npm.config.get("fetch-retry-mintimeout") + , maxTimeout: npm.config.get("fetch-retry-maxtimeout") + }) + + operation.attempt(function (currentAttempt) { + log.info("retry", "fetch attempt " + currentAttempt + + " at " + (new Date()).toLocaleTimeString()) + fetchAndShaCheck(u, tmp, shasum, auth, function (er, response, shasum) { + // Only retry on 408, 5xx or no `response`. + var sc = response && response.statusCode + var statusRetry = !sc || (sc === 408 || sc >= 500) + if (er && statusRetry && operation.retry(er)) { + log.warn("retry", "will retry, error on last attempt: " + er) + return + } + cb(er, response, shasum) + }) + }) +} + +function fetchAndShaCheck (u, tmp, shasum, auth, cb) { + npm.registry.fetch(u, { auth : auth }, function (er, response) { + if (er) { + log.error("fetch failed", u) + return cb(er, response) + } + + var tarball = writeStreamAtomic(tmp, { mode: npm.modes.file }) + tarball.on('error', function (er) { + cb(er) + tarball.destroy() + }) + + tarball.on("finish", function () { + if (!shasum) { + // Well, we weren't given a shasum, so at least sha what we have + // in case we want to compare it to something else later + return sha.get(tmp, function (er, shasum) { + log.silly("fetchAndShaCheck", "shasum", shasum) + cb(er, response, shasum) + }) + } + + // validate that the url we just downloaded matches the expected shasum. + log.silly("fetchAndShaCheck", "shasum", shasum) + sha.check(tmp, shasum, function (er) { + if (er && er.message) { + // add original filename for better debuggability + er.message = er.message + "\n" + "From: " + u + } + return cb(er, response, shasum) + }) + }) + + // 0.8 http streams have a bug, where if they're paused with data in + // their buffers when the socket closes, they call `end` before emptying + // those buffers, which results in the entire pipeline ending and thus + // the point that applied backpressure never being able to trigger a + // `resume`. + // We work around this by piping into a pass through stream that has + // unlimited buffering. The pass through stream is from readable-stream + // and is thus a current streams3 implementation that is free of these + // bugs even on 0.8. + response.pipe(PassThrough({highWaterMark: Infinity})).pipe(tarball) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/cache/cached-package-root.js b/bin/nodejs0.10.47/node_modules/npm/lib/cache/cached-package-root.js new file mode 100644 index 00000000..b4a4924b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/cache/cached-package-root.js @@ -0,0 +1,14 @@ +var assert = require("assert") +var resolve = require("path").resolve + +var npm = require("../npm.js") + +module.exports = getCacheRoot + +function getCacheRoot (data) { + assert(data, "must pass package metadata") + assert(data.name, "package metadata must include name") + assert(data.version, "package metadata must include version") + + return resolve(npm.cache, data.name, data.version) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/cache/caching-client.js b/bin/nodejs0.10.47/node_modules/npm/lib/cache/caching-client.js new file mode 100644 index 00000000..eb35c58c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/cache/caching-client.js @@ -0,0 +1,218 @@ +module.exports = CachingRegistryClient + +var path = require("path") + , fs = require("graceful-fs") + , url = require("url") + , assert = require("assert") + , inherits = require("util").inherits + +var RegistryClient = require("npm-registry-client") + , npm = require("../npm.js") + , log = require("npmlog") + , getCacheStat = require("./get-stat.js") + , cacheFile = require("npm-cache-filename") + , mkdirp = require("mkdirp") + , rimraf = require("rimraf") + , chownr = require("chownr") + , writeFile = require("write-file-atomic") + +function CachingRegistryClient (config) { + RegistryClient.call(this, adaptConfig(config)) + + this._mapToCache = cacheFile(config.get("cache")) + + // swizzle in our custom cache invalidation logic + this._request = this.request + this.request = this._invalidatingRequest + this.get = get +} +inherits(CachingRegistryClient, RegistryClient) + +CachingRegistryClient.prototype._invalidatingRequest = function (uri, params, cb) { + var client = this + this._request.call(this, uri, params, function () { + var args = arguments + + var method = params.method + if (method !== "HEAD" && method !== "GET") { + var invalidated = client._mapToCache(uri) + // invalidate cache + // + // This is irrelevant for commands that do etag / last-modified caching, + // but ls and view also have a timed cache, so this keeps the user from + // thinking that it didn't work when it did. + // Note that failure is an acceptable option here, since the only + // result will be a stale cache for some helper commands. + log.verbose("request", "invalidating", invalidated, "on", method) + return rimraf(invalidated, function () { + cb.apply(undefined, args) + }) + } + + cb.apply(undefined, args) + }) +} + +function get (uri, params, cb) { + assert(typeof uri === "string", "must pass registry URI to get") + assert(params && typeof params === "object", "must pass params to get") + assert(typeof cb === "function", "must pass callback to get") + + var parsed = url.parse(uri) + assert( + parsed.protocol === "http:" || parsed.protocol === "https:", + "must have a URL that starts with http: or https:" + ) + + var cacheBase = cacheFile(npm.config.get("cache"))(uri) + var cachePath = path.join(cacheBase, ".cache.json") + + // If the GET is part of a write operation (PUT or DELETE), then + // skip past the cache entirely, but still save the results. + if (uri.match(/\?write=true$/)) { + log.verbose("get", "GET as part of write; not caching result") + return get_.call(this, uri, cachePath, params, cb) + } + + var client = this + fs.stat(cachePath, function (er, stat) { + if (!er) { + fs.readFile(cachePath, function (er, data) { + try { + data = JSON.parse(data) + } + catch (ex) { + data = null + } + + params.stat = stat + params.data = data + + get_.call(client, uri, cachePath, params, cb) + }) + } + else { + get_.call(client, uri, cachePath, params, cb) + } + }) +} + +function get_ (uri, cachePath, params, cb) { + var staleOk = params.staleOk === undefined ? false : params.staleOk + , timeout = params.timeout === undefined ? -1 : params.timeout + , data = params.data + , stat = params.stat + , etag + , lastModified + + timeout = Math.min(timeout, npm.config.get("cache-max") || 0) + timeout = Math.max(timeout, npm.config.get("cache-min") || -Infinity) + if (process.env.COMP_CWORD !== undefined && + process.env.COMP_LINE !== undefined && + process.env.COMP_POINT !== undefined) { + timeout = Math.max(timeout, 60000) + } + + if (data) { + if (data._etag) etag = data._etag + if (data._lastModified) lastModified = data._lastModified + + if (stat && timeout && timeout > 0) { + if ((Date.now() - stat.mtime.getTime())/1000 < timeout) { + log.verbose("get", uri, "not expired, no request") + delete data._etag + delete data._lastModified + return cb(null, data, JSON.stringify(data), { statusCode : 304 }) + } + + if (staleOk) { + log.verbose("get", uri, "staleOk, background update") + delete data._etag + delete data._lastModified + process.nextTick( + cb.bind(null, null, data, JSON.stringify(data), { statusCode : 304 } ) + ) + cb = function () {} + } + } + } + + var options = { + etag : etag, + lastModified : lastModified, + follow : params.follow, + auth : params.auth + } + this.request(uri, options, function (er, remoteData, raw, response) { + // if we get an error talking to the registry, but we have it + // from the cache, then just pretend we got it. + if (er && cachePath && data && !data.error) { + er = null + response = { statusCode: 304 } + } + + if (response) { + log.silly("get", "cb", [response.statusCode, response.headers]) + if (response.statusCode === 304 && (etag || lastModified)) { + remoteData = data + log.verbose(etag ? "etag" : "lastModified", uri+" from cache") + } + } + + data = remoteData + if (!data) er = er || new Error("failed to fetch from registry: " + uri) + + if (er) return cb(er, data, raw, response) + + saveToCache(cachePath, data, saved) + + // just give the write the old college try. if it fails, whatever. + function saved () { + delete data._etag + delete data._lastModified + cb(er, data, raw, response) + } + + function saveToCache (cachePath, data, saved) { + log.verbose("get", "saving", data.name, "to", cachePath) + getCacheStat(function (er, st) { + mkdirp(path.dirname(cachePath), function (er, made) { + if (er) return saved() + + writeFile(cachePath, JSON.stringify(data), function (er) { + if (er) return saved() + + chownr(made || cachePath, st.uid, st.gid, saved) + }) + }) + }) + } + }) +} + +function adaptConfig (config) { + return { + proxy : { + http : config.get("proxy"), + https : config.get("https-proxy"), + localAddress : config.get("local-address") + }, + ssl : { + certificate : config.get("cert"), + key : config.get("key"), + ca : config.get("ca"), + strict : config.get("strict-ssl") + }, + retry : { + retries : config.get("fetch-retries"), + factor : config.get("fetch-retry-factor"), + minTimeout : config.get("fetch-retry-mintimeout"), + maxTimeout : config.get("fetch-retry-maxtimeout") + }, + userAgent : config.get("user-agent"), + log : log, + defaultTag : config.get("tag"), + couchToken : config.get("_token"), + maxSockets : config.get('maxsockets') + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/cache/get-stat.js b/bin/nodejs0.10.47/node_modules/npm/lib/cache/get-stat.js new file mode 100644 index 00000000..309f5622 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/cache/get-stat.js @@ -0,0 +1,6 @@ +var npm = require('../npm.js') +var correctMkdir = require('../utils/correct-mkdir.js') + +module.exports = function getCacheStat (cb) { + correctMkdir(npm.cache, cb) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/cache/update-index.js b/bin/nodejs0.10.47/node_modules/npm/lib/cache/update-index.js new file mode 100644 index 00000000..57e9a866 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/cache/update-index.js @@ -0,0 +1,104 @@ +module.exports = updateIndex + +var fs = require('graceful-fs') +var assert = require('assert') +var path = require('path') +var mkdir = require('mkdirp') +var chownr = require('chownr') +var npm = require('../npm.js') +var log = require('npmlog') +var cacheFile = require('npm-cache-filename') +var getCacheStat = require('./get-stat.js') +var mapToRegistry = require('../utils/map-to-registry.js') + +/* /-/all is special. + * It uses timestamp-based caching and partial updates, + * because it is a monster. + */ +function updateIndex (staleness, cb) { + assert(typeof cb === 'function', 'must pass callback to updateIndex') + + mapToRegistry('-/all', npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + timeout: staleness, + follow: true, + staleOk: true, + auth: auth + } + var cacheBase = cacheFile(npm.config.get('cache'))(uri) + var cachePath = path.join(cacheBase, '.cache.json') + log.info('updateIndex', cachePath) + + getCacheStat(function (er, st) { + if (er) return cb(er) + + mkdir(cacheBase, function (er, made) { + if (er) return cb(er) + + fs.readFile(cachePath, function (er, data) { + if (er) { + log.warn('', 'Building the local index for the first time, please be patient') + return updateIndex_(uri, params, {}, cachePath, cb) + } + + chownr(made || cachePath, st.uid, st.gid, function (er) { + if (er) return cb(er) + + try { + data = JSON.parse(data) + } catch (ex) { + fs.writeFile(cachePath, '{}', function (er) { + if (er) return cb(new Error('Broken cache.')) + + log.warn('', 'Building the local index for the first time, please be patient') + return updateIndex_(uri, params, {}, cachePath, cb) + }) + } + + var t = +data._updated || 0 + // use the cache and update in the background if it's not too old + if (Date.now() - t < 60000) { + cb(null, data) + cb = function () {} + } + + if (t === 0) { + log.warn('', 'Building the local index for the first time, please be patient') + } else { + log.verbose('updateIndex', 'Cached search data present with timestamp', t) + uri += '/since?stale=update_after&startkey=' + t + } + updateIndex_(uri, params, data, cachePath, cb) + }) + }) + }) + }) + }) +} + +function updateIndex_ (all, params, data, cachePath, cb) { + log.silly('update-index', 'fetching', all) + npm.registry.request(all, params, function (er, updates, _, res) { + if (er) return cb(er, data) + + var headers = res.headers + var updated = updates._updated || Date.parse(headers.date) + + Object.keys(updates).forEach(function (p) { data[p] = updates[p] }) + + data._updated = updated + getCacheStat(function (er, st) { + if (er) return cb(er) + + fs.writeFile(cachePath, JSON.stringify(data), function (er) { + delete data._updated + if (er) return cb(er) + chownr(cachePath, st.uid, st.gid, function (er) { + cb(er, data) + }) + }) + }) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/completion.js b/bin/nodejs0.10.47/node_modules/npm/lib/completion.js new file mode 100644 index 00000000..07e21e58 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/completion.js @@ -0,0 +1,248 @@ + +module.exports = completion + +completion.usage = "npm completion >> ~/.bashrc\n" + + "npm completion >> ~/.zshrc\n" + + "source <(npm completion)" + +var npm = require("./npm.js") + , npmconf = require("./config/core.js") + , configDefs = npmconf.defs + , configTypes = configDefs.types + , shorthands = configDefs.shorthands + , nopt = require("nopt") + , configNames = Object.keys(configTypes).filter(function (e) { + return e.charAt(0) !== "_" + }) + , shorthandNames = Object.keys(shorthands) + , allConfs = configNames.concat(shorthandNames) + , once = require("once") + + +completion.completion = function (opts, cb) { + if (opts.w > 3) return cb() + + var fs = require("graceful-fs") + , path = require("path") + , bashExists = null + , zshExists = null + fs.stat(path.resolve(process.env.HOME, ".bashrc"), function (er) { + bashExists = !er + next() + }) + fs.stat(path.resolve(process.env.HOME, ".zshrc"), function (er) { + zshExists = !er + next() + }) + function next () { + if (zshExists === null || bashExists === null) return + var out = [] + if (zshExists) out.push("~/.zshrc") + if (bashExists) out.push("~/.bashrc") + if (opts.w === 2) out = out.map(function (m) { + return [">>", m] + }) + cb(null, out) + } +} + +function completion (args, cb) { + if (process.platform === 'win32' && !(/^MINGW(32|64)$/.test(process.env.MSYSTEM))) { + var e = new Error('npm completion supported only in MINGW / Git bash on Windows') + e.code = 'ENOTSUP' + e.errno = require('constants').ENOTSUP + return cb(e) + } + + // if the COMP_* isn't in the env, then just dump the script. + if (process.env.COMP_CWORD === undefined + ||process.env.COMP_LINE === undefined + ||process.env.COMP_POINT === undefined + ) return dumpScript(cb) + + console.error(process.env.COMP_CWORD) + console.error(process.env.COMP_LINE) + console.error(process.env.COMP_POINT) + + //console.log("abracadabrasauce\nabracad cat monger") + //if (Math.random() * 3 < 1) console.log("man\\ bear\\ pig") + //else if (Math.random() * 3 < 1) + // console.log("porkchop\\ sandwiches\nporkman") + //else console.log("encephylophagy") + + // get the partial line and partial word, + // if the point isn't at the end. + // ie, tabbing at: npm foo b|ar + var w = +process.env.COMP_CWORD + , words = args.map(unescape) + , word = words[w] + , line = process.env.COMP_LINE + , point = +process.env.COMP_POINT + , partialLine = line.substr(0, point) + , partialWords = words.slice(0, w) + + // figure out where in that last word the point is. + var partialWord = args[w] + , i = partialWord.length + while (partialWord.substr(0, i) !== partialLine.substr(-1*i) && i > 0) { + i -- + } + partialWord = unescape(partialWord.substr(0, i)) + partialWords.push(partialWord) + + var opts = { words : words + , w : w + , word : word + , line : line + , lineLength : line.length + , point : point + , partialLine : partialLine + , partialWords : partialWords + , partialWord : partialWord + , raw: args + } + + cb = wrapCb(cb, opts) + + console.error(opts) + + if (partialWords.slice(0, -1).indexOf("--") === -1) { + if (word.charAt(0) === "-") return configCompl(opts, cb) + if (words[w - 1] + && words[w - 1].charAt(0) === "-" + && !isFlag(words[w - 1])) { + // awaiting a value for a non-bool config. + // don't even try to do this for now + console.error("configValueCompl") + return configValueCompl(opts, cb) + } + } + + // try to find the npm command. + // it's the first thing after all the configs. + // take a little shortcut and use npm's arg parsing logic. + // don't have to worry about the last arg being implicitly + // boolean'ed, since the last block will catch that. + var parsed = opts.conf = + nopt(configTypes, shorthands, partialWords.slice(0, -1), 0) + // check if there's a command already. + console.error(parsed) + var cmd = parsed.argv.remain[1] + if (!cmd) return cmdCompl(opts, cb) + + Object.keys(parsed).forEach(function (k) { + npm.config.set(k, parsed[k]) + }) + + // at this point, if words[1] is some kind of npm command, + // then complete on it. + // otherwise, do nothing + cmd = npm.commands[cmd] + if (cmd && cmd.completion) return cmd.completion(opts, cb) + + // nothing to do. + cb() +} + +function dumpScript (cb) { + var fs = require("graceful-fs") + , path = require("path") + , p = path.resolve(__dirname, "utils/completion.sh") + + // The Darwin patch below results in callbacks first for the write and then + // for the error handler, so make sure we only call our callback once. + cb = once(cb) + + fs.readFile(p, "utf8", function (er, d) { + if (er) return cb(er) + d = d.replace(/^\#\!.*?\n/, "") + + process.stdout.write(d, function () { cb() }) + process.stdout.on("error", function (er) { + // Darwin is a real dick sometimes. + // + // This is necessary because the "source" or "." program in + // bash on OS X closes its file argument before reading + // from it, meaning that you get exactly 1 write, which will + // work most of the time, and will always raise an EPIPE. + // + // Really, one should not be tossing away EPIPE errors, or any + // errors, so casually. But, without this, `. <(npm completion)` + // can never ever work on OS X. + if (er.errno === "EPIPE") er = null + cb(er) + }) + + }) +} + +function unescape (w) { + if (w.charAt(0) === "\"") return w.replace(/^"|"$/g, "") + else return w.replace(/\\ /g, " ") +} + +function escape (w) { + if (!w.match(/\s+/)) return w + return "\"" + w + "\"" +} + +// The command should respond with an array. Loop over that, +// wrapping quotes around any that have spaces, and writing +// them to stdout. Use console.log, not the outfd config. +// If any of the items are arrays, then join them with a space. +// Ie, returning ["a", "b c", ["d", "e"]] would allow it to expand +// to: "a", "b c", or "d" "e" +function wrapCb (cb, opts) { return function (er, compls) { + if (!Array.isArray(compls)) compls = compls ? [compls] : [] + compls = compls.map(function (c) { + if (Array.isArray(c)) c = c.map(escape).join(" ") + else c = escape(c) + return c + }) + if (opts.partialWord) compls = compls.filter(function (c) { + return c.indexOf(opts.partialWord) === 0 + }) + console.error([er && er.stack, compls, opts.partialWord]) + if (er || compls.length === 0) return cb(er) + + console.log(compls.join("\n")) + cb() +}} + +// the current word has a dash. Return the config names, +// with the same number of dashes as the current word has. +function configCompl (opts, cb) { + var word = opts.word + , split = word.match(/^(-+)((?:no-)*)(.*)$/) + , dashes = split[1] + , no = split[2] + , flags = configNames.filter(isFlag) + console.error(flags) + + return cb(null, allConfs.map(function (c) { + return dashes + c + }).concat(flags.map(function (f) { + return dashes + (no || "no-") + f + }))) +} + +// expand with the valid values of various config values. +// not yet implemented. +function configValueCompl (opts, cb) { + console.error("configValue", opts) + return cb(null, []) +} + +// check if the thing is a flag or not. +function isFlag (word) { + // shorthands never take args. + var split = word.match(/^(-*)((?:no-)+)?(.*)$/) + , no = split[2] + , conf = split[3] + return no || configTypes[conf] === Boolean || shorthands[conf] +} + +// complete against the npm commands +function cmdCompl (opts, cb) { + return cb(null, npm.fullList) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config.js b/bin/nodejs0.10.47/node_modules/npm/lib/config.js new file mode 100644 index 00000000..3c58a798 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config.js @@ -0,0 +1,285 @@ + +module.exports = config + +config.usage = "npm config set " + + "\nnpm config get []" + + "\nnpm config delete " + + "\nnpm config list" + + "\nnpm config edit" + + "\nnpm set " + + "\nnpm get []" + +var log = require("npmlog") + , npm = require("./npm.js") + , npmconf = require("./config/core.js") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , types = npmconf.defs.types + , ini = require("ini") + , editor = require("editor") + , os = require("os") + , umask = require("./utils/umask") + +config.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv[1] !== "config") argv.unshift("config") + if (argv.length === 2) { + var cmds = ["get", "set", "delete", "ls", "rm", "edit"] + if (opts.partialWord !== "l") cmds.push("list") + return cb(null, cmds) + } + + var action = argv[2] + switch (action) { + case "set": + // todo: complete with valid values, if possible. + if (argv.length > 3) return cb(null, []) + // fallthrough + case "get": + case "delete": + case "rm": + return cb(null, Object.keys(types)) + case "edit": + case "list": case "ls": + return cb(null, []) + default: return cb(null, []) + } +} + +// npm config set key value +// npm config get key +// npm config list +function config (args, cb) { + var action = args.shift() + switch (action) { + case "set": return set(args[0], args[1], cb) + case "get": return get(args[0], cb) + case "delete": case "rm": case "del": return del(args[0], cb) + case "list": case "ls": return list(cb) + case "edit": return edit(cb) + default: return unknown(action, cb) + } +} + +function edit (cb) { + var e = npm.config.get("editor") + , which = npm.config.get("global") ? "global" : "user" + , f = npm.config.get(which + "config") + if (!e) return cb(new Error("No EDITOR config or environ set.")) + npm.config.save(which, function (er) { + if (er) return cb(er) + fs.readFile(f, "utf8", function (er, data) { + if (er) data = "" + data = [ ";;;;" + , "; npm "+(npm.config.get("global") ? + "globalconfig" : "userconfig")+" file" + , "; this is a simple ini-formatted file" + , "; lines that start with semi-colons are comments." + , "; read `npm help config` for help on the various options" + , ";;;;" + , "" + , data + ].concat( [ ";;;;" + , "; all options with default values" + , ";;;;" + ] + ) + .concat(Object.keys(npmconf.defaults).reduce(function (arr, key) { + var obj = {} + obj[key] = npmconf.defaults[key] + if (key === "logstream") return arr + return arr.concat( + ini.stringify(obj) + .replace(/\n$/m, "") + .replace(/^/g, "; ") + .replace(/\n/g, "\n; ") + .split("\n")) + }, [])) + .concat([""]) + .join(os.EOL) + writeFileAtomic + ( f + , data + , function (er) { + if (er) return cb(er) + editor(f, { editor: e }, cb) + } + ) + }) + }) +} + +function del (key, cb) { + if (!key) return cb(new Error("no key provided")) + var where = npm.config.get("global") ? "global" : "user" + npm.config.del(key, where) + npm.config.save(where, cb) +} + +function set (key, val, cb) { + if (key === undefined) { + return unknown("", cb) + } + if (val === undefined) { + if (key.indexOf("=") !== -1) { + var k = key.split("=") + key = k.shift() + val = k.join("=") + } else { + val = "" + } + } + key = key.trim() + val = val.trim() + log.info("config", "set %j %j", key, val) + var where = npm.config.get("global") ? "global" : "user" + if (key.match(/umask/)) val = umask.fromString(val) + npm.config.set(key, val, where) + npm.config.save(where, cb) +} + +function get (key, cb) { + if (!key) return list(cb) + if (!public(key)) { + return cb(new Error("---sekretz---")) + } + var val = npm.config.get(key) + if (key.match(/umask/)) val = umask.toString(val) + console.log(val) + cb() +} + +function sort (a, b) { + return a > b ? 1 : -1 +} + +function public (k) { + return !(k.charAt(0) === "_" || + k.indexOf(":_") !== -1 || + types[k] !== types[k]) +} + +function getKeys (data) { + return Object.keys(data).filter(public).sort(sort) +} + +function list (cb) { + var msg = "" + , long = npm.config.get("long") + + var cli = npm.config.sources.cli.data + , cliKeys = getKeys(cli) + if (cliKeys.length) { + msg += "; cli configs\n" + cliKeys.forEach(function (k) { + if (cli[k] && typeof cli[k] === "object") return + if (k === "argv") return + msg += k + " = " + JSON.stringify(cli[k]) + "\n" + }) + msg += "\n" + } + + // env configs + var env = npm.config.sources.env.data + , envKeys = getKeys(env) + if (envKeys.length) { + msg += "; environment configs\n" + envKeys.forEach(function (k) { + if (env[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + JSON.stringify(env[k]) + + " (overridden)\n" + } else msg += k + " = " + JSON.stringify(env[k]) + "\n" + }) + msg += "\n" + } + + // user config file + var uconf = npm.config.sources.user.data + , uconfKeys = getKeys(uconf) + if (uconfKeys.length) { + msg += "; userconfig " + npm.config.get("userconfig") + "\n" + uconfKeys.forEach(function (k) { + var val = (k.charAt(0) === "_") + ? "---sekretz---" + : JSON.stringify(uconf[k]) + if (uconf[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + } + + // global config file + var gconf = npm.config.sources.global.data + , gconfKeys = getKeys(gconf) + if (gconfKeys.length) { + msg += "; globalconfig " + npm.config.get("globalconfig") + "\n" + gconfKeys.forEach(function (k) { + var val = (k.charAt(0) === "_") + ? "---sekretz---" + : JSON.stringify(gconf[k]) + if (gconf[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + } + + // builtin config file + var builtin = npm.config.sources.builtin || {} + if (builtin && builtin.data) { + var bconf = builtin.data + , bpath = builtin.path + , bconfKeys = getKeys(bconf) + if (bconfKeys.length) { + msg += "; builtin config " + bpath + "\n" + bconfKeys.forEach(function (k) { + var val = (k.charAt(0) === "_") + ? "---sekretz---" + : JSON.stringify(bconf[k]) + if (bconf[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + } + } + + // only show defaults if --long + if (!long) { + msg += "; node bin location = " + process.execPath + "\n" + + "; cwd = " + process.cwd() + "\n" + + "; HOME = " + process.env.HOME + "\n" + + "; 'npm config ls -l' to show all defaults.\n" + + console.log(msg) + return cb() + } + + var defaults = npmconf.defaults + , defKeys = getKeys(defaults) + msg += "; default values\n" + defKeys.forEach(function (k) { + if (defaults[k] && typeof defaults[k] === "object") return + var val = JSON.stringify(defaults[k]) + if (defaults[k] !== npm.config.get(k)) { + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + + console.log(msg) + return cb() +} + +function unknown (action, cb) { + cb("Usage:\n" + config.usage) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config/clear-credentials-by-uri.js b/bin/nodejs0.10.47/node_modules/npm/lib/config/clear-credentials-by-uri.js new file mode 100644 index 00000000..1944a6ef --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config/clear-credentials-by-uri.js @@ -0,0 +1,16 @@ +var assert = require("assert") + +var toNerfDart = require("./nerf-dart.js") + +module.exports = clearCredentialsByURI + +function clearCredentialsByURI (uri) { + assert(uri && typeof uri === "string", "registry URL is required") + + var nerfed = toNerfDart(uri) + + this.del(nerfed + ":_authToken", "user") + this.del(nerfed + ":_password", "user") + this.del(nerfed + ":username", "user") + this.del(nerfed + ":email", "user") +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config/core.js b/bin/nodejs0.10.47/node_modules/npm/lib/config/core.js new file mode 100644 index 00000000..b432a288 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config/core.js @@ -0,0 +1,441 @@ + +var CC = require("config-chain").ConfigChain +var inherits = require("inherits") +var configDefs = require("./defaults.js") +var types = configDefs.types +var once = require("once") +var fs = require("fs") +var path = require("path") +var nopt = require("nopt") +var ini = require("ini") +var Umask = configDefs.Umask +var mkdirp = require("mkdirp") +var umask = require("../utils/umask") + +exports.load = load +exports.Conf = Conf +exports.loaded = false +exports.rootConf = null +exports.usingBuiltin = false +exports.defs = configDefs + +Object.defineProperty(exports, "defaults", { get: function () { + return configDefs.defaults +}, enumerable: true }) + +Object.defineProperty(exports, "types", { get: function () { + return configDefs.types +}, enumerable: true }) + +exports.validate = validate + +var myUid = process.env.SUDO_UID !== undefined + ? process.env.SUDO_UID : (process.getuid && process.getuid()) +var myGid = process.env.SUDO_GID !== undefined + ? process.env.SUDO_GID : (process.getgid && process.getgid()) + + +var loading = false +var loadCbs = [] +function load () { + var cli, builtin, cb + for (var i = 0; i < arguments.length; i++) + switch (typeof arguments[i]) { + case "string": builtin = arguments[i]; break + case "object": cli = arguments[i]; break + case "function": cb = arguments[i]; break + } + + if (!cb) + cb = function () {} + + if (exports.loaded) { + var ret = exports.loaded + if (cli) { + ret = new Conf(ret) + ret.unshift(cli) + } + return process.nextTick(cb.bind(null, null, ret)) + } + + // either a fresh object, or a clone of the passed in obj + if (!cli) + cli = {} + else + cli = Object.keys(cli).reduce(function (c, k) { + c[k] = cli[k] + return c + }, {}) + + loadCbs.push(cb) + if (loading) + return + + loading = true + + cb = once(function (er, conf) { + if (!er) { + exports.loaded = conf + loading = false + } + loadCbs.forEach(function (fn) { + fn(er, conf) + }) + loadCbs.length = 0 + }) + + // check for a builtin if provided. + exports.usingBuiltin = !!builtin + var rc = exports.rootConf = new Conf() + if (builtin) + rc.addFile(builtin, "builtin") + else + rc.add({}, "builtin") + + rc.on("load", function () { + load_(builtin, rc, cli, cb) + }) + rc.on("error", cb) +} + +function load_(builtin, rc, cli, cb) { + var defaults = configDefs.defaults + var conf = new Conf(rc) + + conf.usingBuiltin = !!builtin + conf.add(cli, "cli") + conf.addEnv() + + conf.loadPrefix(function(er) { + if (er) + return cb(er) + + // If you're doing `npm --userconfig=~/foo.npmrc` then you'd expect + // that ~/.npmrc won't override the stuff in ~/foo.npmrc (or, indeed + // be used at all). + // + // However, if the cwd is ~, then ~/.npmrc is the home for the project + // config, and will override the userconfig. + // + // If you're not setting the userconfig explicitly, then it will be loaded + // twice, which is harmless but excessive. If you *are* setting the + // userconfig explicitly then it will override your explicit intent, and + // that IS harmful and unexpected. + // + // Solution: Do not load project config file that is the same as either + // the default or resolved userconfig value. npm will log a "verbose" + // message about this when it happens, but it is a rare enough edge case + // that we don't have to be super concerned about it. + var projectConf = path.resolve(conf.localPrefix, ".npmrc") + var defaultUserConfig = rc.get("userconfig") + var resolvedUserConfig = conf.get("userconfig") + if (!conf.get("global") && + projectConf !== defaultUserConfig && + projectConf !== resolvedUserConfig) { + conf.addFile(projectConf, "project") + conf.once("load", afterPrefix) + } else { + conf.add({}, "project") + afterPrefix() + } + }) + + function afterPrefix() { + conf.addFile(conf.get("userconfig"), "user") + conf.once("error", cb) + conf.once("load", afterUser) + } + + function afterUser () { + // globalconfig and globalignorefile defaults + // need to respond to the 'prefix' setting up to this point. + // Eg, `npm config get globalconfig --prefix ~/local` should + // return `~/local/etc/npmrc` + // annoying humans and their expectations! + if (conf.get("prefix")) { + var etc = path.resolve(conf.get("prefix"), "etc") + mkdirp(etc, function (err) { + defaults.globalconfig = path.resolve(etc, "npmrc") + defaults.globalignorefile = path.resolve(etc, "npmignore") + afterUserContinuation() + }) + } else { + afterUserContinuation() + } + } + + function afterUserContinuation() { + conf.addFile(conf.get("globalconfig"), "global") + + // move the builtin into the conf stack now. + conf.root = defaults + conf.add(rc.shift(), "builtin") + conf.once("load", function () { + conf.loadExtras(afterExtras) + }) + } + + function afterExtras(er) { + if (er) + return cb(er) + + // warn about invalid bits. + validate(conf) + + var cafile = conf.get("cafile") + + if (cafile) { + return conf.loadCAFile(cafile, finalize) + } + + finalize() + } + + function finalize(er) { + if (er) { + return cb(er) + } + + exports.loaded = conf + cb(er, conf) + } +} + +// Basically the same as CC, but: +// 1. Always ini +// 2. Parses environment variable names in field values +// 3. Field values that start with ~/ are replaced with process.env.HOME +// 4. Can inherit from another Conf object, using it as the base. +inherits(Conf, CC) +function Conf (base) { + if (!(this instanceof Conf)) + return new Conf(base) + + CC.apply(this) + + if (base) + if (base instanceof Conf) + this.root = base.list[0] || base.root + else + this.root = base + else + this.root = configDefs.defaults +} + +Conf.prototype.loadPrefix = require("./load-prefix.js") +Conf.prototype.loadCAFile = require("./load-cafile.js") +Conf.prototype.loadUid = require("./load-uid.js") +Conf.prototype.setUser = require("./set-user.js") +Conf.prototype.findPrefix = require("./find-prefix.js") +Conf.prototype.getCredentialsByURI = require("./get-credentials-by-uri.js") +Conf.prototype.setCredentialsByURI = require("./set-credentials-by-uri.js") +Conf.prototype.clearCredentialsByURI = require("./clear-credentials-by-uri.js") + +Conf.prototype.loadExtras = function(cb) { + this.setUser(function(er) { + if (er) + return cb(er) + this.loadUid(function(er) { + if (er) + return cb(er) + // Without prefix, nothing will ever work + mkdirp(this.prefix, cb) + }.bind(this)) + }.bind(this)) +} + +Conf.prototype.save = function (where, cb) { + var target = this.sources[where] + if (!target || !(target.path || target.source) || !target.data) { + if (where !== "builtin") + var er = new Error("bad save target: " + where) + if (cb) { + process.nextTick(cb.bind(null, er)) + return this + } + return this.emit("error", er) + } + + if (target.source) { + var pref = target.prefix || "" + Object.keys(target.data).forEach(function (k) { + target.source[pref + k] = target.data[k] + }) + if (cb) process.nextTick(cb) + return this + } + + var data = ini.stringify(target.data) + + then = then.bind(this) + done = done.bind(this) + this._saving ++ + + var mode = where === "user" ? "0600" : "0666" + if (!data.trim()) { + fs.unlink(target.path, function () { + // ignore the possible error (e.g. the file doesn't exist) + done(null) + }) + } else { + mkdirp(path.dirname(target.path), function (er) { + if (er) + return then(er) + fs.writeFile(target.path, data, "utf8", function (er) { + if (er) + return then(er) + if (where === "user" && myUid && myGid) + fs.chown(target.path, +myUid, +myGid, then) + else + then() + }) + }) + } + + function then (er) { + if (er) + return done(er) + fs.chmod(target.path, mode, done) + } + + function done (er) { + if (er) { + if (cb) return cb(er) + else return this.emit("error", er) + } + this._saving -- + if (this._saving === 0) { + if (cb) cb() + this.emit("save") + } + } + + return this +} + +Conf.prototype.addFile = function (file, name) { + name = name || file + var marker = {__source__:name} + this.sources[name] = { path: file, type: "ini" } + this.push(marker) + this._await() + fs.readFile(file, "utf8", function (er, data) { + if (er) // just ignore missing files. + return this.add({}, marker) + this.addString(data, file, "ini", marker) + }.bind(this)) + return this +} + +// always ini files. +Conf.prototype.parse = function (content, file) { + return CC.prototype.parse.call(this, content, file, "ini") +} + +Conf.prototype.add = function (data, marker) { + try { + Object.keys(data).forEach(function (k) { + data[k] = parseField(data[k], k) + }) + } + catch (e) { + this.emit("error", e) + return this + } + return CC.prototype.add.call(this, data, marker) +} + +Conf.prototype.addEnv = function (env) { + env = env || process.env + var conf = {} + Object.keys(env) + .filter(function (k) { return k.match(/^npm_config_/i) }) + .forEach(function (k) { + if (!env[k]) + return + + // leave first char untouched, even if + // it is a "_" - convert all other to "-" + var p = k.toLowerCase() + .replace(/^npm_config_/, "") + .replace(/(?!^)_/g, "-") + conf[p] = env[k] + }) + return CC.prototype.addEnv.call(this, "", conf, "env") +} + +function parseField (f, k) { + if (typeof f !== "string" && !(f instanceof String)) + return f + + // type can be an array or single thing. + var typeList = [].concat(types[k]) + var isPath = -1 !== typeList.indexOf(path) + var isBool = -1 !== typeList.indexOf(Boolean) + var isString = -1 !== typeList.indexOf(String) + var isUmask = -1 !== typeList.indexOf(Umask) + var isNumber = -1 !== typeList.indexOf(Number) + + f = (""+f).trim() + + if (f.match(/^".*"$/)) { + try { + f = JSON.parse(f) + } + catch (e) { + throw new Error("Failed parsing JSON config key " + k + ": " + f) + } + } + + if (isBool && !isString && f === "") + return true + + switch (f) { + case "true": return true + case "false": return false + case "null": return null + case "undefined": return undefined + } + + f = envReplace(f) + + if (isPath) { + var homePattern = process.platform === "win32" ? /^~(\/|\\)/ : /^~\// + if (f.match(homePattern) && process.env.HOME) { + f = path.resolve(process.env.HOME, f.substr(2)) + } + f = path.resolve(f) + } + + if (isUmask) + f = umask.fromString(f) + + if (isNumber && !isNaN(f)) + f = +f + + return f +} + +function envReplace (f) { + if (typeof f !== "string" || !f) return f + + // replace any ${ENV} values with the appropriate environ. + var envExpr = /(\\*)\$\{([^}]+)\}/g + return f.replace(envExpr, function (orig, esc, name) { + esc = esc.length && esc.length % 2 + if (esc) + return orig + if (undefined === process.env[name]) + throw new Error("Failed to replace env in config: "+orig) + return process.env[name] + }) +} + +function validate (cl) { + // warn about invalid configs at every level. + cl.list.forEach(function (conf) { + nopt.clean(conf, configDefs.types) + }) + + nopt.clean(cl.root, configDefs.types) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config/defaults.js b/bin/nodejs0.10.47/node_modules/npm/lib/config/defaults.js new file mode 100644 index 00000000..7a2789e1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config/defaults.js @@ -0,0 +1,380 @@ +// defaults, types, and shorthands. + + +var path = require("path") + , url = require("url") + , Stream = require("stream").Stream + , semver = require("semver") + , stableFamily = semver.parse(process.version) + , nopt = require("nopt") + , os = require("os") + , osenv = require("osenv") + , umask = require("../utils/umask") + +var log +try { + log = require("npmlog") +} catch (er) { + var util = require("util") + log = { warn: function (m) { + console.warn(m + " " + util.format.apply(util, [].slice.call(arguments, 1))) + } } +} + +exports.Umask = Umask +function Umask () {} +function validateUmask (data, k, val) { + return umask.validate(data, k, val) +} + +function validateSemver (data, k, val) { + if (!semver.valid(val)) return false + data[k] = semver.valid(val) +} + +function validateStream (data, k, val) { + if (!(val instanceof Stream)) return false + data[k] = val +} + +nopt.typeDefs.semver = { type: semver, validate: validateSemver } +nopt.typeDefs.Stream = { type: Stream, validate: validateStream } +nopt.typeDefs.Umask = { type: Umask, validate: validateUmask } + +nopt.invalidHandler = function (k, val, type) { + log.warn("invalid config", k + "=" + JSON.stringify(val)) + + if (Array.isArray(type)) { + if (type.indexOf(url) !== -1) type = url + else if (type.indexOf(path) !== -1) type = path + } + + switch (type) { + case Umask: + log.warn("invalid config", "Must be umask, octal number in range 0000..0777") + break + case url: + log.warn("invalid config", "Must be a full url with 'http://'") + break + case path: + log.warn("invalid config", "Must be a valid filesystem path") + break + case Number: + log.warn("invalid config", "Must be a numeric value") + break + case Stream: + log.warn("invalid config", "Must be an instance of the Stream class") + break + } +} + +if (!stableFamily || (+stableFamily.minor % 2)) stableFamily = null +else stableFamily = stableFamily.major + "." + stableFamily.minor + +var defaults + +var temp = osenv.tmpdir() +var home = osenv.home() + +var uidOrPid = process.getuid ? process.getuid() : process.pid + +if (home) process.env.HOME = home +else home = path.resolve(temp, "npm-" + uidOrPid) + +var cacheExtra = process.platform === "win32" ? "npm-cache" : ".npm" +var cacheRoot = process.platform === "win32" && process.env.APPDATA || home +var cache = path.resolve(cacheRoot, cacheExtra) + + +var globalPrefix +Object.defineProperty(exports, "defaults", {get: function () { + if (defaults) return defaults + + if (process.env.PREFIX) { + globalPrefix = process.env.PREFIX + } else if (process.platform === "win32") { + // c:\node\node.exe --> prefix=c:\node\ + globalPrefix = path.dirname(process.execPath) + } else { + // /usr/local/bin/node --> prefix=/usr/local + globalPrefix = path.dirname(path.dirname(process.execPath)) + + // destdir only is respected on Unix + if (process.env.DESTDIR) { + globalPrefix = path.join(process.env.DESTDIR, globalPrefix) + } + } + + defaults = { + access : null + , "always-auth" : false + + , "bin-links" : true + , browser : null + + , ca: null + , cafile: null + + , cache : cache + + , "cache-lock-stale": 60000 + , "cache-lock-retries": 10 + , "cache-lock-wait": 10000 + + , "cache-max": Infinity + , "cache-min": 10 + + , cert: null + + , color : true + , depth: Infinity + , description : true + , dev : false + , editor : osenv.editor() + , "engine-strict": false + , force : false + + , "fetch-retries": 2 + , "fetch-retry-factor": 10 + , "fetch-retry-mintimeout": 10000 + , "fetch-retry-maxtimeout": 60000 + + , git: "git" + , "git-tag-version": true + + , global : false + , globalconfig : path.resolve(globalPrefix, "etc", "npmrc") + , group : process.platform === "win32" ? 0 + : process.env.SUDO_GID || (process.getgid && process.getgid()) + , heading: "npm" + , "if-present": false + , "ignore-scripts": false + , "init-module": path.resolve(home, ".npm-init.js") + , "init-author-name" : "" + , "init-author-email" : "" + , "init-author-url" : "" + , "init-version": "1.0.0" + , "init-license": "ISC" + , json: false + , key: null + , link: false + , "local-address" : undefined + , loglevel : "warn" + , logstream : process.stderr + , long : false + , maxsockets : 50 + , message : "%s" + , "node-version" : process.version + , npat : false + , "onload-script" : false + , optional: true + , parseable : false + , prefix : globalPrefix + , production: process.env.NODE_ENV === "production" + , "proprietary-attribs": true + , proxy : null + , "https-proxy" : null + , "user-agent" : "npm/{npm-version} " + + "node/{node-version} " + + "{platform} " + + "{arch}" + , "rebuild-bundle" : true + , registry : "https://registry.npmjs.org/" + , rollback : true + , save : false + , "save-bundle": false + , "save-dev" : false + , "save-exact" : false + , "save-optional" : false + , "save-prefix": "^" + , scope : "" + , searchopts: "" + , searchexclude: null + , searchsort: "name" + , shell : osenv.shell() + , shrinkwrap: true + , "sign-git-tag": false + , spin: true + , "strict-ssl": true + , tag : "latest" + , "tag-version-prefix" : "v" + , tmp : temp + , unicode : true + , "unsafe-perm" : process.platform === "win32" + || process.platform === "cygwin" + || !( process.getuid && process.setuid + && process.getgid && process.setgid ) + || process.getuid() !== 0 + , usage : false + , user : process.platform === "win32" ? 0 : "nobody" + , userconfig : path.resolve(home, ".npmrc") + , umask: process.umask ? process.umask() : umask.fromString("022") + , version : false + , versions : false + , viewer: process.platform === "win32" ? "browser" : "man" + + , _exit : true + } + + return defaults +}}) + +exports.types = + { access : [null, "restricted", "public"] + , "always-auth" : Boolean + , "bin-links": Boolean + , browser : [null, String] + , ca: [null, String, Array] + , cafile : path + , cache : path + , "cache-lock-stale": Number + , "cache-lock-retries": Number + , "cache-lock-wait": Number + , "cache-max": Number + , "cache-min": Number + , cert: [null, String] + , color : ["always", Boolean] + , depth : Number + , description : Boolean + , dev : Boolean + , editor : String + , "engine-strict": Boolean + , force : Boolean + , "fetch-retries": Number + , "fetch-retry-factor": Number + , "fetch-retry-mintimeout": Number + , "fetch-retry-maxtimeout": Number + , git: String + , "git-tag-version": Boolean + , global : Boolean + , globalconfig : path + , group : [Number, String] + , "https-proxy" : [null, url] + , "user-agent" : String + , "heading": String + , "if-present": Boolean + , "ignore-scripts": Boolean + , "init-module": path + , "init-author-name" : String + , "init-author-email" : String + , "init-author-url" : ["", url] + , "init-license": String + , "init-version": semver + , json: Boolean + , key: [null, String] + , link: Boolean + // local-address must be listed as an IP for a local network interface + // must be IPv4 due to node bug + , "local-address" : getLocalAddresses() + , loglevel : ["silent", "error", "warn", "http", "info", "verbose", "silly"] + , logstream : Stream + , long : Boolean + , maxsockets : Number + , message: String + , "node-version" : [null, semver] + , npat : Boolean + , "onload-script" : [null, String] + , optional: Boolean + , parseable : Boolean + , prefix: path + , production: Boolean + , "proprietary-attribs": Boolean + , proxy : [null, false, url] // allow proxy to be disabled explicitly + , "rebuild-bundle" : Boolean + , registry : [null, url] + , rollback : Boolean + , save : Boolean + , "save-bundle": Boolean + , "save-dev" : Boolean + , "save-exact" : Boolean + , "save-optional" : Boolean + , "save-prefix": String + , scope : String + , searchopts : String + , searchexclude: [null, String] + , searchsort: [ "name", "-name" + , "description", "-description" + , "author", "-author" + , "date", "-date" + , "keywords", "-keywords" ] + , shell : String + , shrinkwrap: Boolean + , "sign-git-tag": Boolean + , spin: ["always", Boolean] + , "strict-ssl": Boolean + , tag : String + , tmp : path + , unicode : Boolean + , "unsafe-perm" : Boolean + , usage : Boolean + , user : [Number, String] + , userconfig : path + , umask: Umask + , version : Boolean + , "tag-version-prefix" : String + , versions : Boolean + , viewer: String + , _exit : Boolean + } + +function getLocalAddresses () { + var interfaces + // #8094: some environments require elevated permissions to enumerate + // interfaces, and synchronously throw EPERM when run without + // elevated privileges + try { + interfaces = os.networkInterfaces() + } catch (e) { + interfaces = {} + } + + return Object.keys(interfaces).map(function (nic) { + return interfaces[nic].filter(function (addr) { + return addr.family === 'IPv4' + }) + .map(function (addr) { + return addr.address + }) + }).reduce(function (curr, next) { + return curr.concat(next) + }, []).concat(undefined) +} + +exports.shorthands = + { s : ["--loglevel", "silent"] + , d : ["--loglevel", "info"] + , dd : ["--loglevel", "verbose"] + , ddd : ["--loglevel", "silly"] + , noreg : ["--no-registry"] + , N : ["--no-registry"] + , reg : ["--registry"] + , "no-reg" : ["--no-registry"] + , silent : ["--loglevel", "silent"] + , verbose : ["--loglevel", "verbose"] + , quiet: ["--loglevel", "warn"] + , q: ["--loglevel", "warn"] + , h : ["--usage"] + , H : ["--usage"] + , "?" : ["--usage"] + , help : ["--usage"] + , v : ["--version"] + , f : ["--force"] + , gangster : ["--force"] + , gangsta : ["--force"] + , desc : ["--description"] + , "no-desc" : ["--no-description"] + , "local" : ["--no-global"] + , l : ["--long"] + , m : ["--message"] + , p : ["--parseable"] + , porcelain : ["--parseable"] + , g : ["--global"] + , S : ["--save"] + , D : ["--save-dev"] + , E : ["--save-exact"] + , O : ["--save-optional"] + , y : ["--yes"] + , n : ["--no-yes"] + , B : ["--save-bundle"] + , C : ["--prefix"] + } diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config/find-prefix.js b/bin/nodejs0.10.47/node_modules/npm/lib/config/find-prefix.js new file mode 100644 index 00000000..8206612e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config/find-prefix.js @@ -0,0 +1,56 @@ +// try to find the most reasonable prefix to use + +module.exports = findPrefix + +var fs = require("fs") +var path = require("path") + +function findPrefix (p, cb_) { + function cb (er, p) { + process.nextTick(function () { + cb_(er, p) + }) + } + + p = path.resolve(p) + // if there's no node_modules folder, then + // walk up until we hopefully find one. + // if none anywhere, then use cwd. + var walkedUp = false + while (path.basename(p) === "node_modules") { + p = path.dirname(p) + walkedUp = true + } + if (walkedUp) return cb(null, p) + + findPrefix_(p, p, cb) +} + +function findPrefix_ (p, original, cb) { + if (p === "/" + || (process.platform === "win32" && p.match(/^[a-zA-Z]:(\\|\/)?$/))) { + return cb(null, original) + } + fs.readdir(p, function (er, files) { + // an error right away is a bad sign. + // unless the prefix was simply a non + // existent directory. + if (er && p === original) { + if (er.code === "ENOENT") return cb(null, original); + return cb(er) + } + + // walked up too high or something. + if (er) return cb(null, original) + + if (files.indexOf("node_modules") !== -1 + || files.indexOf("package.json") !== -1) { + return cb(null, p) + } + + var d = path.dirname(p) + if (d === p) return cb(null, original) + + return findPrefix_(d, original, cb) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config/get-credentials-by-uri.js b/bin/nodejs0.10.47/node_modules/npm/lib/config/get-credentials-by-uri.js new file mode 100644 index 00000000..f7477c6e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config/get-credentials-by-uri.js @@ -0,0 +1,74 @@ +var assert = require("assert") + +var toNerfDart = require("./nerf-dart.js") + +module.exports = getCredentialsByURI + +function getCredentialsByURI (uri) { + assert(uri && typeof uri === "string", "registry URL is required") + var nerfed = toNerfDart(uri) + var defnerf = toNerfDart(this.get("registry")) + + // hidden class micro-optimization + var c = { + scope : nerfed, + token : undefined, + password : undefined, + username : undefined, + email : undefined, + auth : undefined, + alwaysAuth : undefined + } + + // used to override scope matching for tokens as well as legacy auth + if (this.get(nerfed + ':always-auth') !== undefined) { + var val = this.get(nerfed + ':always-auth') + c.alwaysAuth = val === 'false' ? false : !!val + } else if (this.get('always-auth') !== undefined) { + c.alwaysAuth = this.get('always-auth') + } + + if (this.get(nerfed + ':_authToken')) { + c.token = this.get(nerfed + ':_authToken') + // the bearer token is enough, don't confuse things + return c + } + + // Handle the old-style _auth= style for the default + // registry, if set. + // + // XXX(isaacs): Remove when npm 1.4 is no longer relevant + var authDef = this.get("_auth") + var userDef = this.get("username") + var passDef = this.get("_password") + if (authDef && !(userDef && passDef)) { + authDef = new Buffer(authDef, "base64").toString() + authDef = authDef.split(":") + userDef = authDef.shift() + passDef = authDef.join(":") + } + + if (this.get(nerfed + ":_password")) { + c.password = new Buffer(this.get(nerfed + ":_password"), "base64").toString("utf8") + } else if (nerfed === defnerf && passDef) { + c.password = passDef + } + + if (this.get(nerfed + ":username")) { + c.username = this.get(nerfed + ":username") + } else if (nerfed === defnerf && userDef) { + c.username = userDef + } + + if (this.get(nerfed + ":email")) { + c.email = this.get(nerfed + ":email") + } else if (this.get("email")) { + c.email = this.get("email") + } + + if (c.username && c.password) { + c.auth = new Buffer(c.username + ":" + c.password).toString("base64") + } + + return c +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config/load-cafile.js b/bin/nodejs0.10.47/node_modules/npm/lib/config/load-cafile.js new file mode 100644 index 00000000..0037e4c9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config/load-cafile.js @@ -0,0 +1,34 @@ +module.exports = loadCAFile + +var fs = require("fs") + +function loadCAFile(cafilePath, cb) { + if (!cafilePath) + return process.nextTick(cb) + + fs.readFile(cafilePath, "utf8", afterCARead.bind(this)) + + function afterCARead(er, cadata) { + + if (er) { + // previous cafile no longer exists, so just continue on gracefully + if (er.code === 'ENOENT') return cb() + return cb(er) + } + + var delim = "-----END CERTIFICATE-----" + var output + + output = cadata + .split(delim) + .filter(function(xs) { + return !!xs.trim() + }) + .map(function(xs) { + return xs.trimLeft() + delim + }) + + this.set("ca", output) + cb(null) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config/load-prefix.js b/bin/nodejs0.10.47/node_modules/npm/lib/config/load-prefix.js new file mode 100644 index 00000000..f9ef7cf0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config/load-prefix.js @@ -0,0 +1,49 @@ +module.exports = loadPrefix + +var findPrefix = require("./find-prefix.js") +var path = require("path") + +function loadPrefix (cb) { + var cli = this.list[0] + + Object.defineProperty(this, "prefix", + { set : function (prefix) { + var g = this.get("global") + this[g ? "globalPrefix" : "localPrefix"] = prefix + }.bind(this) + , get : function () { + var g = this.get("global") + return g ? this.globalPrefix : this.localPrefix + }.bind(this) + , enumerable : true + }) + + Object.defineProperty(this, "globalPrefix", + { set : function (prefix) { + this.set("prefix", prefix) + }.bind(this) + , get : function () { + return path.resolve(this.get("prefix")) + }.bind(this) + , enumerable : true + }) + + var p + Object.defineProperty(this, "localPrefix", + { set : function (prefix) { p = prefix }, + get : function () { return p } + , enumerable: true }) + + // try to guess at a good node_modules location. + // If we are *explicitly* given a prefix on the cli, then + // always use that. otherwise, infer local prefix from cwd. + if (Object.prototype.hasOwnProperty.call(cli, "prefix")) { + p = path.resolve(cli.prefix) + process.nextTick(cb) + } else { + findPrefix(process.cwd(), function (er, found) { + p = found + cb(er) + }) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config/load-uid.js b/bin/nodejs0.10.47/node_modules/npm/lib/config/load-uid.js new file mode 100644 index 00000000..f90fc53f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config/load-uid.js @@ -0,0 +1,15 @@ +module.exports = loadUid + +var getUid = require("uid-number") + +// Call in the context of a npmconf object + +function loadUid (cb) { + // if we're not in unsafe-perm mode, then figure out who + // to run stuff as. Do this first, to support `npm update npm -g` + if (!this.get("unsafe-perm")) { + getUid(this.get("user"), this.get("group"), cb) + } else { + process.nextTick(cb) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config/nerf-dart.js b/bin/nodejs0.10.47/node_modules/npm/lib/config/nerf-dart.js new file mode 100644 index 00000000..c1bfa1de --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config/nerf-dart.js @@ -0,0 +1,23 @@ +var url = require("url") + +module.exports = toNerfDart + +/** + * Maps a URL to an identifier. + * + * Name courtesy schiffertronix media LLC, a New Jersey corporation + * + * @param {String} uri The URL to be nerfed. + * + * @returns {String} A nerfed URL. + */ +function toNerfDart(uri) { + var parsed = url.parse(uri) + delete parsed.protocol + delete parsed.auth + delete parsed.query + delete parsed.search + delete parsed.hash + + return url.resolve(url.format(parsed), ".") +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config/set-credentials-by-uri.js b/bin/nodejs0.10.47/node_modules/npm/lib/config/set-credentials-by-uri.js new file mode 100644 index 00000000..de7abd00 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config/set-credentials-by-uri.js @@ -0,0 +1,42 @@ +var assert = require("assert") + +var toNerfDart = require("./nerf-dart.js") + +module.exports = setCredentialsByURI + +function setCredentialsByURI (uri, c) { + assert(uri && typeof uri === "string", "registry URL is required") + assert(c && typeof c === "object", "credentials are required") + + var nerfed = toNerfDart(uri) + + if (c.token) { + this.set(nerfed + ":_authToken", c.token, "user") + this.del(nerfed + ":_password", "user") + this.del(nerfed + ":username", "user") + this.del(nerfed + ":email", "user") + this.del(nerfed + ":always-auth", "user") + } + else if (c.username || c.password || c.email) { + assert(c.username, "must include username") + assert(c.password, "must include password") + assert(c.email, "must include email address") + + this.del(nerfed + ":_authToken", "user") + + var encoded = new Buffer(c.password, "utf8").toString("base64") + this.set(nerfed + ":_password", encoded, "user") + this.set(nerfed + ":username", c.username, "user") + this.set(nerfed + ":email", c.email, "user") + + if (c.alwaysAuth !== undefined) { + this.set(nerfed + ":always-auth", c.alwaysAuth, "user") + } + else { + this.del(nerfed + ":always-auth", "user") + } + } + else { + throw new Error("No credentials to set.") + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/config/set-user.js b/bin/nodejs0.10.47/node_modules/npm/lib/config/set-user.js new file mode 100644 index 00000000..f059c7d2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/config/set-user.js @@ -0,0 +1,29 @@ +module.exports = setUser + +var assert = require("assert") +var path = require("path") +var fs = require("fs") +var mkdirp = require("mkdirp") + +function setUser (cb) { + var defaultConf = this.root + assert(defaultConf !== Object.prototype) + + // If global, leave it as-is. + // If not global, then set the user to the owner of the prefix folder. + // Just set the default, so it can be overridden. + if (this.get("global")) return cb() + if (process.env.SUDO_UID) { + defaultConf.user = +(process.env.SUDO_UID) + return cb() + } + + var prefix = path.resolve(this.get("prefix")) + mkdirp(prefix, function (er) { + if (er) return cb(er) + fs.stat(prefix, function (er, st) { + defaultConf.user = st && st.uid + return cb(er) + }) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/dedupe.js b/bin/nodejs0.10.47/node_modules/npm/lib/dedupe.js new file mode 100644 index 00000000..c650ea26 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/dedupe.js @@ -0,0 +1,375 @@ +// traverse the node_modules/package.json tree +// looking for duplicates. If any duplicates are found, +// then move them up to the highest level necessary +// in order to make them no longer duplicated. +// +// This is kind of ugly, and really highlights the need for +// much better "put pkg X at folder Y" abstraction. Oh well, +// whatever. Perfect enemy of the good, and all that. + +var fs = require("fs") +var asyncMap = require("slide").asyncMap +var path = require("path") +var readJson = require("read-package-json") +var semver = require("semver") +var rm = require("./utils/gently-rm.js") +var log = require("npmlog") +var npm = require("./npm.js") +var mapToRegistry = require("./utils/map-to-registry.js") + +module.exports = dedupe + +dedupe.usage = "npm dedupe [pkg pkg...]" + +function dedupe (args, silent, cb) { + if (typeof silent === "function") cb = silent, silent = false + var dryrun = false + if (npm.command.match(/^find/)) dryrun = true + return dedupe_(npm.prefix, args, {}, dryrun, silent, cb) +} + +function dedupe_ (dir, filter, unavoidable, dryrun, silent, cb) { + readInstalled(path.resolve(dir), {}, null, function (er, data, counter) { + if (er) { + return cb(er) + } + + if (!data) { + return cb() + } + + // find out which things are dupes + var dupes = Object.keys(counter || {}).filter(function (k) { + if (filter.length && -1 === filter.indexOf(k)) return false + return counter[k] > 1 && !unavoidable[k] + }).reduce(function (s, k) { + s[k] = [] + return s + }, {}) + + // any that are unavoidable need to remain as they are. don't even + // try to touch them or figure it out. Maybe some day, we can do + // something a bit more clever here, but for now, just skip over it, + // and all its children. + ;(function U (obj) { + if (unavoidable[obj.name]) { + obj.unavoidable = true + } + if (obj.parent && obj.parent.unavoidable) { + obj.unavoidable = true + } + Object.keys(obj.children).forEach(function (k) { + U(obj.children[k]) + }) + })(data) + + // then collect them up and figure out who needs them + ;(function C (obj) { + if (dupes[obj.name] && !obj.unavoidable) { + dupes[obj.name].push(obj) + obj.duplicate = true + } + obj.dependents = whoDepends(obj) + Object.keys(obj.children).forEach(function (k) { + C(obj.children[k]) + }) + })(data) + + if (dryrun) { + var k = Object.keys(dupes) + if (!k.length) return cb() + return npm.commands.ls(k, silent, cb) + } + + var summary = Object.keys(dupes).map(function (n) { + return [n, dupes[n].filter(function (d) { + return d && d.parent && !d.parent.duplicate && !d.unavoidable + }).map(function M (d) { + return [d.path, d.version, d.dependents.map(function (k) { + return [k.path, k.version, k.dependencies[d.name] || ""] + })] + })] + }).map(function (item) { + var set = item[1] + + var ranges = set.map(function (i) { + return i[2].map(function (d) { + return d[2] + }) + }).reduce(function (l, r) { + return l.concat(r) + }, []).map(function (v, i, set) { + if (set.indexOf(v) !== i) return false + return v + }).filter(function (v) { + return v !== false + }) + + var locs = set.map(function (i) { + return i[0] + }) + + var versions = set.map(function (i) { + return i[1] + }).filter(function (v, i, set) { + return set.indexOf(v) === i + }) + + var has = set.map(function (i) { + return [i[0], i[1]] + }).reduce(function (set, kv) { + set[kv[0]] = kv[1] + return set + }, {}) + + var loc = locs.length ? locs.reduce(function (a, b) { + // a=/path/to/node_modules/foo/node_modules/bar + // b=/path/to/node_modules/elk/node_modules/bar + // ==/path/to/node_modules/bar + var nmReg = new RegExp("\\" + path.sep + "node_modules\\" + path.sep) + a = a.split(nmReg) + b = b.split(nmReg) + var name = a.pop() + b.pop() + // find the longest chain that both A and B share. + // then push the name back on it, and join by /node_modules/ + for (var i = 0, al = a.length, bl = b.length; i < al && i < bl && a[i] === b[i]; i++); + return a.slice(0, i).concat(name).join(path.sep + "node_modules" + path.sep) + }) : undefined + + return [item[0], { item: item + , ranges: ranges + , locs: locs + , loc: loc + , has: has + , versions: versions + }] + }).filter(function (i) { + return i[1].loc + }) + + findVersions(npm, summary, function (er, set) { + if (er) return cb(er) + if (!set.length) return cb() + installAndRetest(set, filter, dir, unavoidable, silent, cb) + }) + }) +} + +function installAndRetest (set, filter, dir, unavoidable, silent, cb) { + //return cb(null, set) + var remove = [] + + asyncMap(set, function (item, cb) { + // [name, has, loc, locMatch, regMatch, others] + var name = item[0] + var has = item[1] + var where = item[2] + var locMatch = item[3] + var regMatch = item[4] + var others = item[5] + + // nothing to be done here. oh well. just a conflict. + if (!locMatch && !regMatch) { + log.warn("unavoidable conflict", item[0], item[1]) + log.warn("unavoidable conflict", "Not de-duplicating") + unavoidable[item[0]] = true + return cb() + } + + // nothing to do except to clean up the extraneous deps + if (locMatch && has[where] === locMatch) { + remove.push.apply(remove, others) + return cb() + } + + if (regMatch) { + var what = name + "@" + regMatch + // where is /path/to/node_modules/foo/node_modules/bar + // for package "bar", but we need it to be just + // /path/to/node_modules/foo + var nmReg = new RegExp("\\" + path.sep + "node_modules\\" + path.sep) + where = where.split(nmReg) + where.pop() + where = where.join(path.sep + "node_modules" + path.sep) + remove.push.apply(remove, others) + + return npm.commands.install(where, what, cb) + } + + // hrm? + return cb(new Error("danger zone\n" + name + " " + + regMatch + " " + locMatch)) + + }, function (er) { + if (er) return cb(er) + asyncMap(remove, rm, function (er) { + if (er) return cb(er) + remove.forEach(function (r) { + log.info("rm", r) + }) + dedupe_(dir, filter, unavoidable, false, silent, cb) + }) + }) +} + +function findVersions (npm, summary, cb) { + // now, for each item in the summary, try to find the maximum version + // that will satisfy all the ranges. next step is to install it at + // the specified location. + asyncMap(summary, function (item, cb) { + var name = item[0] + var data = item[1] + var loc = data.loc + var locs = data.locs.filter(function (l) { + return l !== loc + }) + + // not actually a dupe, or perhaps all the other copies were + // children of a dupe, so this'll maybe be picked up later. + if (locs.length === 0) { + return cb(null, []) + } + + // { : } + var has = data.has + + // the versions that we already have. + // if one of these is ok, then prefer to use that. + // otherwise, try fetching from the registry. + var versions = data.versions + + var ranges = data.ranges + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, next) + }) + + function next (er, data) { + var regVersions = er ? [] : Object.keys(data.versions) + var locMatch = bestMatch(versions, ranges) + var tag = npm.config.get("tag") + var distTag = data["dist-tags"] && data["dist-tags"][tag] + + var regMatch + if (distTag && data.versions[distTag] && matches(distTag, ranges)) { + regMatch = distTag + } else { + regMatch = bestMatch(regVersions, ranges) + } + + cb(null, [[name, has, loc, locMatch, regMatch, locs]]) + } + }, cb) +} + +function matches (version, ranges) { + return !ranges.some(function (r) { + return !semver.satisfies(version, r, true) + }) +} + +function bestMatch (versions, ranges) { + return versions.filter(function (v) { + return matches(v, ranges) + }).sort(semver.compareLoose).pop() +} + + +function readInstalled (dir, counter, parent, cb) { + var pkg, children, realpath + + fs.realpath(dir, function (er, rp) { + realpath = rp + next() + }) + + readJson(path.resolve(dir, "package.json"), function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb() // not a package, probably. + counter[data.name] = counter[data.name] || 0 + counter[data.name]++ + pkg = + { _id: data._id + , name: data.name + , version: data.version + , dependencies: data.dependencies || {} + , optionalDependencies: data.optionalDependencies || {} + , devDependencies: data.devDependencies || {} + , bundledDependencies: data.bundledDependencies || [] + , path: dir + , realPath: dir + , children: {} + , parent: parent + , family: Object.create(parent ? parent.family : null) + , unavoidable: false + , duplicate: false + } + if (parent) { + parent.children[data.name] = pkg + parent.family[data.name] = pkg + } + next() + }) + + fs.readdir(path.resolve(dir, "node_modules"), function (er, c) { + children = children || [] // error is ok, just means no children. + // check if there are scoped packages. + asyncMap(c || [], function (child, cb) { + if (child.indexOf('@') === 0) { + fs.readdir(path.resolve(dir, "node_modules", child), function (er, scopedChildren) { + // error is ok, just means no children. + (scopedChildren || []).forEach(function (sc) { + children.push(path.join(child, sc)) + }) + cb() + }) + } else { + children.push(child) + cb() + } + }, function (er) { + if (er) return cb(er) + children = children.filter(function (p) { + return !p.match(/^[\._-]/) + }) + next(); + }); + }) + + function next () { + if (!children || !pkg || !realpath) return + + // ignore devDependencies. Just leave them where they are. + children = children.filter(function (c) { + return !pkg.devDependencies.hasOwnProperty(c) + }) + + pkg.realPath = realpath + if (pkg.realPath !== pkg.path) children = [] + var d = path.resolve(dir, "node_modules") + asyncMap(children, function (child, cb) { + readInstalled(path.resolve(d, child), counter, pkg, cb) + }, function (er) { + cb(er, pkg, counter) + }) + } +} + +function whoDepends (pkg) { + var start = pkg.parent || pkg + return whoDepends_(pkg, [], start) +} + +function whoDepends_ (pkg, who, test) { + if (test !== pkg && + test.dependencies[pkg.name] && + test.family[pkg.name] === pkg) { + who.push(test) + } + Object.keys(test.children).forEach(function (n) { + whoDepends_(pkg, who, test.children[n]) + }) + return who +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/deprecate.js b/bin/nodejs0.10.47/node_modules/npm/lib/deprecate.js new file mode 100644 index 00000000..56c9b06b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/deprecate.js @@ -0,0 +1,50 @@ +var npm = require("./npm.js") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + +module.exports = deprecate + +deprecate.usage = "npm deprecate [@] " + +deprecate.completion = function (opts, cb) { + // first, get a list of remote packages this user owns. + // once we have a user account, then don't complete anything. + if (opts.conf.argv.remain.length > 2) return cb() + // get the list of packages by user + var path = "/-/by-user/" + mapToRegistry(path, npm.config, function (er, uri, c) { + if (er) return cb(er) + + if (!(c && c.username)) return cb() + + var params = { + timeout : 60000, + auth : c + } + npm.registry.get(uri + c.username, params, function (er, list) { + if (er) return cb() + console.error(list) + return cb(null, list[c.username]) + }) + }) +} + +function deprecate (args, cb) { + var pkg = args[0] + , msg = args[1] + if (msg === undefined) return cb("Usage: " + deprecate.usage) + + // fetch the data and make sure it exists. + var p = npa(pkg) + + mapToRegistry(p.name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version : p.spec, + message : msg, + auth : auth + } + npm.registry.deprecate(uri, params, cb) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/dist-tag.js b/bin/nodejs0.10.47/node_modules/npm/lib/dist-tag.js new file mode 100644 index 00000000..6bbdc0a9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/dist-tag.js @@ -0,0 +1,151 @@ +module.exports = distTag + +var log = require("npmlog") +var npa = require("npm-package-arg") +var semver = require("semver") + +var npm = require("./npm.js") +var mapToRegistry = require("./utils/map-to-registry.js") +var readLocalPkg = require("./utils/read-local-package.js") + +distTag.usage = "npm dist-tag add @ []" + + "\nnpm dist-tag rm " + + "\nnpm dist-tag ls []" + +distTag.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, ["add", "rm", "ls"]) + } + + switch (argv[2]) { + default: + return cb() + } +} + +function distTag (args, cb) { + var cmd = args.shift() + switch (cmd) { + case "add": case "a": case "set": case "s": + return add(args[0], args[1], cb) + case "rm": case "r": case "del": case "d": case "remove": + return remove(args[1], args[0], cb) + case "ls": case "l": case "sl": case "list": + return list(args[0], cb) + default: + return cb("Usage:\n"+distTag.usage) + } +} + +function add (spec, tag, cb) { + var thing = npa(spec || "") + var pkg = thing.name + var version = thing.rawSpec + var t = (tag || npm.config.get("tag")).trim() + + log.verbose("dist-tag add", t, "to", pkg+"@"+version) + + if (!pkg || !version || !t) return cb("Usage:\n"+distTag.usage) + + if (semver.validRange(t)) { + var er = new Error("Tag name must not be a valid SemVer range: " + t) + return cb(er) + } + + fetchTags(pkg, function (er, tags) { + if (er) return cb(er) + + if (tags[t] === version) { + log.warn("dist-tag add", t, "is already set to version", version) + return cb() + } + tags[t] = version + + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + var params = { + package : pkg, + distTag : t, + version : version, + auth : auth + } + + npm.registry.distTags.add(base, params, function (er) { + if (er) return cb(er) + + console.log("+"+t+": "+pkg+"@"+version) + cb() + }) + }) + }) +} + +function remove (tag, pkg, cb) { + log.verbose("dist-tag del", tag, "from", pkg) + + fetchTags(pkg, function (er, tags) { + if (er) return cb(er) + + if (!tags[tag]) { + log.info("dist-tag del", tag, "is not a dist-tag on", pkg) + return cb(new Error(tag+" is not a dist-tag on "+pkg)) + } + + var version = tags[tag] + delete tags[tag] + + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + var params = { + package : pkg, + distTag : tag, + auth : auth + } + + npm.registry.distTags.rm(base, params, function (er) { + if (er) return cb(er) + + console.log("-"+tag+": "+pkg+"@"+version) + cb() + }) + }) + }) +} + +function list (pkg, cb) { + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(distTag.usage) + list(pkg, cb) + }) + + fetchTags(pkg, function (er, tags) { + if (er) { + log.error("dist-tag ls", "Couldn't get dist-tag data for", pkg) + return cb(er) + } + var msg = Object.keys(tags).map(function (k) { + return k+": "+tags[k] + }).sort().join("\n") + console.log(msg) + cb(er, tags) + }) +} + +function fetchTags (pkg, cb) { + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + if (er) return cb(er) + + var params = { + package : pkg, + auth : auth + } + npm.registry.distTags.fetch(base, params, function (er, tags) { + if (er) return cb(er) + if (!tags || !Object.keys(tags).length) { + return cb(new Error("No dist-tags found for " + pkg)) + } + + cb(null, tags) + }) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/docs.js b/bin/nodejs0.10.47/node_modules/npm/lib/docs.js new file mode 100644 index 00000000..f484f01f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/docs.js @@ -0,0 +1,71 @@ +module.exports = docs + +docs.usage = "npm docs " +docs.usage += "\n" +docs.usage += "npm docs ." + +var npm = require("./npm.js") + , opener = require("opener") + , path = require("path") + , log = require("npmlog") + , mapToRegistry = require("./utils/map-to-registry.js") + +docs.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function url (json) { + return json.homepage ? json.homepage : "https://npmjs.org/package/" + json.name +} + +function docs (args, cb) { + args = args || [] + var pending = args.length + if (!pending) return getDoc(".", cb) + args.forEach(function(proj) { + getDoc(proj, function(err) { + if (err) { + return cb(err) + } + --pending || cb() + }) + }) +} + +function getDoc (project, cb) { + project = project || "." + var package = path.resolve(npm.localPrefix, "package.json") + + if (project === "." || project === "./") { + var json + try { + json = require(package) + if (!json.name) throw new Error('package.json does not have a valid "name" property') + project = json.name + } catch (e) { + log.error(e.message) + return cb(docs.usage) + } + + return opener(url(json), { command: npm.config.get("browser") }, cb) + } + + mapToRegistry(project, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri + "/latest", { timeout : 3600, auth : auth }, next) + }) + + function next (er, json) { + var github = "https://github.com/" + project + "#readme" + + if (er) { + if (project.split("/").length !== 2) return cb(er) + return opener(github, { command: npm.config.get("browser") }, cb) + } + + return opener(url(json), { command: npm.config.get("browser") }, cb) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/edit.js b/bin/nodejs0.10.47/node_modules/npm/lib/edit.js new file mode 100644 index 00000000..df2a6aaf --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/edit.js @@ -0,0 +1,31 @@ +// npm edit [@] +// open the package folder in the $EDITOR + +module.exports = edit +edit.usage = "npm edit " + +edit.completion = require("./utils/completion/installed-shallow.js") + +var npm = require("./npm.js") + , path = require("path") + , fs = require("graceful-fs") + , editor = require("editor") + +function edit (args, cb) { + var p = args[0] + if (args.length !== 1 || !p) return cb(edit.usage) + var e = npm.config.get("editor") + if (!e) return cb(new Error( + "No editor set. Set the 'editor' config, or $EDITOR environ.")) + p = p.split("/") + .join("/node_modules/") + .replace(/(\/node_modules)+/, "/node_modules") + var f = path.resolve(npm.dir, p) + fs.lstat(f, function (er) { + if (er) return cb(er) + editor(f, { editor: e }, function (er) { + if (er) return cb(er) + npm.commands.rebuild(args, cb) + }) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/explore.js b/bin/nodejs0.10.47/node_modules/npm/lib/explore.js new file mode 100644 index 00000000..1bd9ee0b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/explore.js @@ -0,0 +1,37 @@ +// npm explore [@] +// open a subshell to the package folder. + +module.exports = explore +explore.usage = "npm explore [ -- ]" +explore.completion = require("./utils/completion/installed-shallow.js") + +var npm = require("./npm.js") + , spawn = require("./utils/spawn") + , path = require("path") + , fs = require("graceful-fs") + +function explore (args, cb) { + if (args.length < 1 || !args[0]) return cb(explore.usage) + var p = args.shift() + args = args.join(" ").trim() + if (args) args = ["-c", args] + else args = [] + + var cwd = path.resolve(npm.dir, p) + var sh = npm.config.get("shell") + fs.stat(cwd, function (er, s) { + if (er || !s.isDirectory()) return cb(new Error( + "It doesn't look like "+p+" is installed.")) + if (!args.length) console.log( + "\nExploring "+cwd+"\n"+ + "Type 'exit' or ^D when finished\n") + + npm.spinner.stop() + var shell = spawn(sh, args, { cwd: cwd, stdio: "inherit" }) + shell.on("close", function (er) { + // only fail if non-interactive. + if (!args.length) return cb() + cb(er) + }) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/faq.js b/bin/nodejs0.10.47/node_modules/npm/lib/faq.js new file mode 100644 index 00000000..a1d515aa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/faq.js @@ -0,0 +1,8 @@ + +module.exports = faq + +faq.usage = "npm faq" + +var npm = require("./npm.js") + +function faq (args, cb) { npm.commands.help(["faq"], cb) } diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/get.js b/bin/nodejs0.10.47/node_modules/npm/lib/get.js new file mode 100644 index 00000000..67fe602d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/get.js @@ -0,0 +1,12 @@ + +module.exports = get + +get.usage = "npm get (See `npm config`)" + +var npm = require("./npm.js") + +get.completion = npm.commands.config.completion + +function get (args, cb) { + npm.commands.config(["get"].concat(args), cb) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/help-search.js b/bin/nodejs0.10.47/node_modules/npm/lib/help-search.js new file mode 100644 index 00000000..44c8c95d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/help-search.js @@ -0,0 +1,210 @@ + +module.exports = helpSearch + +var fs = require("graceful-fs") + , path = require("path") + , asyncMap = require("slide").asyncMap + , npm = require("./npm.js") + , glob = require("glob") + , color = require("ansicolors") + +helpSearch.usage = "npm help-search " + +function helpSearch (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + if (!args.length) return cb(helpSearch.usage) + + var docPath = path.resolve(__dirname, "..", "doc") + return glob(docPath + "/*/*.md", function (er, files) { + if (er) + return cb(er) + readFiles(files, function (er, data) { + if (er) + return cb(er) + searchFiles(args, data, function (er, results) { + if (er) + return cb(er) + formatResults(args, results, cb) + }) + }) + }) +} + +function readFiles (files, cb) { + var res = {} + asyncMap(files, function (file, cb) { + fs.readFile(file, 'utf8', function (er, data) { + res[file] = data + return cb(er) + }) + }, function (er) { + return cb(er, res) + }) +} + +function searchFiles (args, files, cb) { + var results = [] + Object.keys(files).forEach(function (file) { + var data = files[file] + + // skip if no matches at all + var match + for (var a = 0, l = args.length; a < l && !match; a++) { + match = data.toLowerCase().indexOf(args[a].toLowerCase()) !== -1 + } + if (!match) + return + + var lines = data.split(/\n+/) + + // if a line has a search term, then skip it and the next line. + // if the next line has a search term, then skip all 3 + // otherwise, set the line to null. then remove the nulls. + l = lines.length + for (var i = 0; i < l; i ++) { + var line = lines[i] + , nextLine = lines[i + 1] + , ll + + match = false + if (nextLine) { + for (a = 0, ll = args.length; a < ll && !match; a ++) { + match = nextLine.toLowerCase() + .indexOf(args[a].toLowerCase()) !== -1 + } + if (match) { + // skip over the next line, and the line after it. + i += 2 + continue + } + } + + match = false + for (a = 0, ll = args.length; a < ll && !match; a ++) { + match = line.toLowerCase().indexOf(args[a].toLowerCase()) !== -1 + } + if (match) { + // skip over the next line + i ++ + continue + } + + lines[i] = null + } + + // now squish any string of nulls into a single null + lines = lines.reduce(function (l, r) { + if (!(r === null && l[l.length-1] === null)) l.push(r) + return l + }, []) + + if (lines[lines.length - 1] === null) lines.pop() + if (lines[0] === null) lines.shift() + + // now see how many args were found at all. + var found = {} + , totalHits = 0 + lines.forEach(function (line) { + args.forEach(function (arg) { + var hit = (line || "").toLowerCase() + .split(arg.toLowerCase()).length - 1 + if (hit > 0) { + found[arg] = (found[arg] || 0) + hit + totalHits += hit + } + }) + }) + + var cmd = "npm help " + if (path.basename(path.dirname(file)) === "api") { + cmd = "npm apihelp " + } + cmd += path.basename(file, ".md").replace(/^npm-/, "") + results.push({ file: file + , cmd: cmd + , lines: lines + , found: Object.keys(found) + , hits: found + , totalHits: totalHits + }) + }) + + // if only one result, then just show that help section. + if (results.length === 1) { + return npm.commands.help([results[0].file.replace(/\.md$/, "")], cb) + } + + if (results.length === 0) { + console.log("No results for " + args.map(JSON.stringify).join(" ")) + return cb() + } + + // sort results by number of results found, then by number of hits + // then by number of matching lines + results = results.sort(function (a, b) { + return a.found.length > b.found.length ? -1 + : a.found.length < b.found.length ? 1 + : a.totalHits > b.totalHits ? -1 + : a.totalHits < b.totalHits ? 1 + : a.lines.length > b.lines.length ? -1 + : a.lines.length < b.lines.length ? 1 + : 0 + }) + + cb(null, results) +} + +function formatResults (args, results, cb) { + if (!results) return cb(null) + + var cols = Math.min(process.stdout.columns || Infinity, 80) + 1 + + var out = results.map(function (res) { + var out = res.cmd + , r = Object.keys(res.hits).map(function (k) { + return k + ":" + res.hits[k] + }).sort(function (a, b) { + return a > b ? 1 : -1 + }).join(" ") + + out += ((new Array(Math.max(1, cols - out.length - r.length))) + .join(" ")) + r + + if (!npm.config.get("long")) return out + + out = "\n\n" + out + + "\n" + (new Array(cols)).join("—") + "\n" + + res.lines.map(function (line, i) { + if (line === null || i > 3) return "" + for (var out = line, a = 0, l = args.length; a < l; a ++) { + var finder = out.toLowerCase().split(args[a].toLowerCase()) + , newOut = "" + , p = 0 + + finder.forEach(function (f) { + newOut += out.substr(p, f.length) + + var hilit = out.substr(p + f.length, args[a].length) + if (npm.color) hilit = color.bgBlack(color.red(hilit)) + newOut += hilit + + p += f.length + args[a].length + }) + } + + return newOut + }).join("\n").trim() + return out + }).join("\n") + + if (results.length && !npm.config.get("long")) { + out = "Top hits for "+(args.map(JSON.stringify).join(" ")) + + "\n" + (new Array(cols)).join("—") + "\n" + + out + + "\n" + (new Array(cols)).join("—") + "\n" + + "(run with -l or --long to see more context)" + } + + console.log(out.trim()) + cb(null, results) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/help.js b/bin/nodejs0.10.47/node_modules/npm/lib/help.js new file mode 100644 index 00000000..5e6c8b8d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/help.js @@ -0,0 +1,240 @@ + +module.exports = help + +help.completion = function (opts, cb) { + if (opts.conf.argv.remain.length > 2) return cb(null, []) + getSections(cb) +} + +var path = require("path") + , spawn = require("./utils/spawn") + , npm = require("./npm.js") + , log = require("npmlog") + , opener = require("opener") + , glob = require("glob") + +function help (args, cb) { + npm.spinner.stop() + var argv = npm.config.get("argv").cooked + + var argnum = 0 + if (args.length === 2 && ~~args[0]) { + argnum = ~~args.shift() + } + + // npm help foo bar baz: search topics + if (args.length > 1 && args[0]) { + return npm.commands["help-search"](args, argnum, cb) + } + + var section = npm.deref(args[0]) || args[0] + + // npm help : show basic usage + if (!section) { + var valid = argv[0] === "help" ? 0 : 1 + return npmUsage(valid, cb) + } + + + // npm -h: show command usage + if ( npm.config.get("usage") + && npm.commands[section] + && npm.commands[section].usage + ) { + npm.config.set("loglevel", "silent") + log.level = "silent" + console.log(npm.commands[section].usage) + return cb() + } + + // npm apihelp
    : Prefer section 3 over section 1 + var apihelp = argv.length && -1 !== argv[0].indexOf("api") + var pref = apihelp ? [3, 1, 5, 7] : [1, 3, 5, 7] + if (argnum) + pref = [ argnum ].concat(pref.filter(function (n) { + return n !== argnum + })) + + // npm help
    : Try to find the path + var manroot = path.resolve(__dirname, "..", "man") + + // legacy + if (section === "global") section = "folders" + else if (section === "json") section = "package.json" + + // find either /section.n or /npm-section.n + // The glob is used in the glob. The regexp is used much + // further down. Globs and regexps are different + var compextglob = ".+(gz|bz2|lzma|[FYzZ]|xz)" + var compextre = "\\.(gz|bz2|lzma|[FYzZ]|xz)$" + var f = "+(npm-" + section + "|" + section + ").[0-9]?(" + compextglob + ")" + return glob(manroot + "/*/" + f, function (er, mans) { + if (er) return cb(er) + + if (!mans.length) return npm.commands["help-search"](args, cb) + + mans = mans.map(function (man) { + var ext = path.extname(man) + if (man.match(new RegExp(compextre))) man = path.basename(man, ext) + + return man + }) + + viewMan(pickMan(mans, pref), cb) + }) +} + +function pickMan (mans, pref_) { + var nre = /([0-9]+)$/ + var pref = {} + pref_.forEach(function (sect, i) { + pref[sect] = i + }) + mans = mans.sort(function (a, b) { + var an = a.match(nre)[1] + var bn = b.match(nre)[1] + return an === bn ? (a > b ? -1 : 1) + : pref[an] < pref[bn] ? -1 + : 1 + }) + return mans[0] +} + +function viewMan (man, cb) { + var nre = /([0-9]+)$/ + var num = man.match(nre)[1] + var section = path.basename(man, "." + num) + + // at this point, we know that the specified man page exists + var manpath = path.join(__dirname, "..", "man") + , env = {} + Object.keys(process.env).forEach(function (i) { + env[i] = process.env[i] + }) + env.MANPATH = manpath + var viewer = npm.config.get("viewer") + + var conf + switch (viewer) { + case "woman": + var a = ["-e", "(woman-find-file \"" + man + "\")"] + conf = { env: env, stdio: "inherit" } + var woman = spawn("emacsclient", a, conf) + woman.on("close", cb) + break + + case "browser": + opener(htmlMan(man), { command: npm.config.get("browser") }, cb) + break + + default: + conf = { env: env, stdio: "inherit" } + var manProcess = spawn("man", [num, section], conf) + manProcess.on("close", cb) + break + } +} + +function htmlMan (man) { + var sect = +man.match(/([0-9]+)$/)[1] + var f = path.basename(man).replace(/([0-9]+)$/, "html") + switch (sect) { + case 1: + sect = "cli" + break + case 3: + sect = "api" + break + case 5: + sect = "files" + break + case 7: + sect = "misc" + break + default: + throw new Error("invalid man section: " + sect) + } + return path.resolve(__dirname, "..", "html", "doc", sect, f) +} + +function npmUsage (valid, cb) { + npm.config.set("loglevel", "silent") + log.level = "silent" + console.log( + [ "\nUsage: npm " + , "" + , "where is one of:" + , npm.config.get("long") ? usages() + : " " + wrap(Object.keys(npm.commands)) + , "" + , "npm -h quick help on " + , "npm -l display full usage info" + , "npm faq commonly asked questions" + , "npm help search for help on " + , "npm help npm involved overview" + , "" + , "Specify configs in the ini-formatted file:" + , " " + npm.config.get("userconfig") + , "or on the command line via: npm --key value" + , "Config info can be viewed via: npm help config" + , "" + , "npm@" + npm.version + " " + path.dirname(__dirname) + ].join("\n")) + cb(valid) +} + +function usages () { + // return a string of : + var maxLen = 0 + return Object.keys(npm.commands).filter(function (c) { + return c === npm.deref(c) + }).reduce(function (set, c) { + set.push([c, npm.commands[c].usage || ""]) + maxLen = Math.max(maxLen, c.length) + return set + }, []).map(function (item) { + var c = item[0] + , usage = item[1] + return "\n " + c + (new Array(maxLen - c.length + 2).join(" ")) + + (usage.split("\n") + .join("\n" + (new Array(maxLen + 6).join(" ")))) + }).join("\n") +} + + +function wrap (arr) { + var out = [""] + , l = 0 + , line + + line = process.stdout.columns + if (!line) + line = 60 + else + line = Math.min(60, Math.max(line - 16, 24)) + + arr.sort(function (a,b) { return a --save` afterwards to install a package and" + ,"save it as a dependency in the package.json file." + ,"" + ,"Press ^C at any time to quit." + ].join("\n")) + } + initJson(dir, initFile, npm.config, function (er, data) { + log.resume() + log.silly("package data", data) + if (er && er.message === "canceled") { + log.warn("init", "canceled") + return cb(null, data) + } + log.info("init", "written successfully") + cb(er, data) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/install.js b/bin/nodejs0.10.47/node_modules/npm/lib/install.js new file mode 100644 index 00000000..c9c40dd3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/install.js @@ -0,0 +1,1196 @@ +// npm install +// +// See doc/install.md for more description + +// Managing contexts... +// there's a lot of state associated with an "install" operation, including +// packages that are already installed, parent packages, current shrinkwrap, and +// so on. We maintain this state in a "context" object that gets passed around. +// every time we dive into a deeper node_modules folder, the "family" list that +// gets passed along uses the previous "family" list as its __proto__. Any +// "resolved precise dependency" things that aren't already on this object get +// added, and then that's passed to the next generation of installation. + +module.exports = install + +install.usage = "npm install" + + "\nnpm install " + + "\nnpm install @" + + "\nnpm install @" + + "\nnpm install @" + + "\nnpm install " + + "\nnpm install " + + "\nnpm install " + + "\nnpm install " + + "\nnpm install /" + + "\n\nCan specify one or more: npm install ./foo.tgz bar@stable /some/folder" + + "\nIf no argument is supplied and ./npm-shrinkwrap.json is " + + "\npresent, installs dependencies specified in the shrinkwrap." + + "\nOtherwise, installs dependencies from ./package.json." + +install.completion = function (opts, cb) { + // install can complete to a folder with a package.json, or any package. + // if it has a slash, then it's gotta be a folder + // if it starts with https?://, then just give up, because it's a url + if (/^https?:\/\//.test(opts.partialWord)) { + // do not complete to URLs + return cb(null, []) + } + + if (/\//.test(opts.partialWord)) { + // Complete fully to folder if there is exactly one match and it + // is a folder containing a package.json file. If that is not the + // case we return 0 matches, which will trigger the default bash + // complete. + var lastSlashIdx = opts.partialWord.lastIndexOf("/") + var partialName = opts.partialWord.slice(lastSlashIdx + 1) + var partialPath = opts.partialWord.slice(0, lastSlashIdx) + if (partialPath === "") partialPath = "/" + + function annotatePackageDirMatch (sibling, cb) { + var fullPath = path.join(partialPath, sibling) + if (sibling.slice(0, partialName.length) !== partialName) { + return cb(null, null) // not name match + } + fs.readdir(fullPath, function (err, contents) { + if (err) return cb(null, { isPackage: false }) + + cb( + null, + { + fullPath: fullPath, + isPackage: contents.indexOf("package.json") !== -1 + } + ) + }) + } + + return fs.readdir(partialPath, function (err, siblings) { + if (err) return cb(null, []) // invalid dir: no matching + + asyncMap(siblings, annotatePackageDirMatch, function (err, matches) { + if (err) return cb(err) + + var cleaned = matches.filter(function (x) { return x !== null }) + if (cleaned.length !== 1) return cb(null, []) + if (!cleaned[0].isPackage) return cb(null, []) + + // Success - only one match and it is a package dir + return cb(null, [cleaned[0].fullPath]) + }) + }) + } + + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +var npm = require("./npm.js") + , semver = require("semver") + , readJson = require("read-package-json") + , readInstalled = require("read-installed") + , log = require("npmlog") + , path = require("path") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , cache = require("./cache.js") + , asyncMap = require("slide").asyncMap + , chain = require("slide").chain + , url = require("url") + , mkdir = require("mkdirp") + , lifecycle = require("./utils/lifecycle.js") + , archy = require("archy") + , npmInstallChecks = require("npm-install-checks") + , sortedObject = require("sorted-object") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , inflight = require("inflight") + , locker = require("./utils/locker.js") + , lock = locker.lock + , unlock = locker.unlock + , warnStrict = require("./utils/warn-deprecated.js")("engineStrict") + , warnPeers = require("./utils/warn-deprecated.js")("peerDependencies") + +function install (args, cb_) { + var hasArguments = !!args.length + + function cb (er, installed) { + if (er) return cb_(er) + + validateInstall(where, function (er, problem) { + if (er) return cb_(er) + + if (problem) { + var peerInvalidError = new Error("The package " + problem._id + + " does not satisfy its siblings' peerDependencies requirements!") + peerInvalidError.code = "EPEERINVALID" + peerInvalidError.packageName = problem.name + peerInvalidError.packageVersion = problem.version + peerInvalidError.peersDepending = problem.peersDepending + return cb(peerInvalidError) + } + + var tree = treeify(installed || []) + , pretty = prettify(tree, installed).trim() + + if (pretty) console.log(pretty) + save(where, installed, tree, pretty, hasArguments, cb_) + }) + } + + // the /path/to/node_modules/.. + var where = path.resolve(npm.dir, "..") + + // internal api: install(where, what, cb) + if (arguments.length === 3) { + where = args + args = [].concat(cb_) // pass in [] to do default dep-install + cb_ = arguments[2] + log.verbose("install", "where, what", [where, args]) + } + + if (!npm.config.get("global")) { + args = args.filter(function (a) { + return path.resolve(a) !== where + }) + } + + mkdir(where, function (er) { + if (er) return cb(er) + // install dependencies locally by default, + // or install current folder globally + if (!args.length) { + var opt = { dev: npm.config.get("dev") || !npm.config.get("production") } + + if (npm.config.get("global")) args = ["."] + else return readDependencies(null, where, opt, function (er, data) { + if (er) { + log.error("install", "Couldn't read dependencies") + return cb(er) + } + var deps = Object.keys(data.dependencies || {}) + log.verbose("install", "where, deps", [where, deps]) + + // FIXME: Install peerDependencies as direct dependencies, but only at + // the top level. Should only last until peerDependencies are nerfed to + // no longer implicitly install themselves. + var peers = [] + Object.keys(data.peerDependencies || {}).forEach(function (dep) { + if (!data.dependencies[dep]) { + log.verbose( + "install", + "peerDependency", dep, "wasn't going to be installed; adding" + ) + warnPeers([ + "The peer dependency "+dep+" included from "+data.name+" will no", + "longer be automatically installed to fulfill the peerDependency ", + "in npm 3+. Your application will need to depend on it explicitly." + ], dep+","+data.name) + peers.push(dep) + } + }) + log.verbose("install", "where, peers", [where, peers]) + + var context = { family: {} + , ancestors: {} + , explicit: false + , parent: data + , root: true + , wrap: null } + + if (data.name === path.basename(where) && + path.basename(path.dirname(where)) === "node_modules") { + // Only include in ancestry if it can actually be required. + // Otherwise, it does not count. + context.family[data.name] = + context.ancestors[data.name] = data.version + } + + installManyTop(deps.map(function (dep) { + var target = data.dependencies[dep] + return dep + "@" + target + }).concat(peers.map(function (dep) { + var target = data.peerDependencies[dep] + return dep + "@" + target + })), where, context, function(er, results) { + if (er || npm.config.get("production")) return cb(er, results) + lifecycle(data, "prepublish", where, function(er) { + return cb(er, results) + }) + }) + }) + } + + // initial "family" is the name:version of the root, if it's got + // a package.json file. + var jsonPath = path.resolve(where, "package.json") + log.verbose('install', 'initial load of', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + if (er + && er.code !== "ENOENT" + && er.code !== "ENOTDIR") return cb(er) + if (er) data = null + var context = { family: {} + , ancestors: {} + , explicit: true + , parent: data + , root: true + , wrap: null } + if (data && data.name === path.basename(where) && + path.basename(path.dirname(where)) === "node_modules") { + context.family[data.name] = context.ancestors[data.name] = data.version + } + var fn = npm.config.get("global") ? installMany : installManyTop + fn(args, where, context, cb) + }) + }) +} + +function validateInstall (where, cb) { + var jsonPath = path.resolve(where, 'package.json') + log.verbose('validateInstall', 'loading', jsonPath, 'for validation') + readJson(jsonPath, log.warn, function (er, data) { + if (er + && er.code !== 'ENOENT' + && er.code !== 'ENOTDIR') return cb(er) + + if (data && data.engineStrict) { + warnStrict([ + "Per-package engineStrict (found in this package's package.json) ", + "won't be used in npm 3+. Use the config setting `engine-strict` instead." + ], data.name) + } + + readInstalled(where, { log: log.warn, dev: true }, function (er, data) { + if (er) return cb(er) + + cb(null, findPeerInvalid_(data.dependencies, [])) + }) + }) +} + +function findPeerInvalid_ (packageMap, fpiList) { + if (fpiList.indexOf(packageMap) !== -1) + return undefined + + fpiList.push(packageMap) + + for (var packageName in packageMap) { + var pkg = packageMap[packageName] + + if (pkg.peerInvalid) { + var peersDepending = {} + for (var peerName in packageMap) { + var peer = packageMap[peerName] + if (peer.peerDependencies && peer.peerDependencies[packageName]) { + peersDepending[peer.name + "@" + peer.version] = + peer.peerDependencies[packageName] + } + } + return { name: pkg.name, peersDepending: peersDepending, version: pkg.version, _id: pkg._id } + } + + if (pkg.dependencies) { + var invalid = findPeerInvalid_(pkg.dependencies, fpiList) + if (invalid) + return invalid + } + } + + return null +} + +// reads dependencies for the package at "where". There are several cases, +// depending on our current state and the package's configuration: +// +// 1. If "context" is specified, then we examine the context to see if there's a +// shrinkwrap there. In that case, dependencies are read from the shrinkwrap. +// 2. Otherwise, if an npm-shrinkwrap.json file is present, dependencies are +// read from there. +// 3. Otherwise, dependencies come from package.json. +// +// Regardless of which case we fall into, "cb" is invoked with a first argument +// describing the full package (as though readJson had been used) but with +// "dependencies" read as described above. The second argument to "cb" is the +// shrinkwrap to use in processing this package's dependencies, which may be +// "wrap" (in case 1) or a new shrinkwrap (in case 2). +function readDependencies (context, where, opts, cb) { + var wrap = context ? context.wrap : null + + var jsonPath = path.resolve(where, 'package.json') + log.verbose('readDependencies', 'loading dependencies from', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + if (er && er.code === "ENOENT") er.code = "ENOPACKAGEJSON" + if (er) return cb(er) + + if (opts && opts.dev) { + if (!data.dependencies) data.dependencies = {} + Object.keys(data.devDependencies || {}).forEach(function (k) { + if (data.dependencies[k]) { + log.warn("package.json", "Dependency '%s' exists in both dependencies " + + "and devDependencies, using '%s@%s' from dependencies", + k, k, data.dependencies[k]) + } else { + data.dependencies[k] = data.devDependencies[k] + } + }) + } + + if (!npm.config.get("optional") && data.optionalDependencies) { + Object.keys(data.optionalDependencies).forEach(function (d) { + delete data.dependencies[d] + }) + } + + // User has opted out of shrinkwraps entirely + if (npm.config.get("shrinkwrap") === false) + return cb(null, data, null) + + if (wrap) { + log.verbose("readDependencies: using existing wrap", [where, wrap]) + var rv = {} + Object.keys(data).forEach(function (key) { + rv[key] = data[key] + }) + rv.dependencies = {} + Object.keys(wrap).forEach(function (key) { + log.verbose("from wrap", [key, wrap[key]]) + rv.dependencies[key] = readWrap(wrap[key]) + }) + log.verbose("readDependencies returned deps", rv.dependencies) + return cb(null, rv, wrap) + } + + var wrapfile = path.resolve(where, "npm-shrinkwrap.json") + + fs.readFile(wrapfile, "utf8", function (er, wrapjson) { + if (er) return cb(null, data, null) + + log.verbose("readDependencies", "npm-shrinkwrap.json is overriding dependencies") + var newwrap + try { + newwrap = JSON.parse(wrapjson) + } catch (ex) { + return cb(ex) + } + + log.info("shrinkwrap", "file %j", wrapfile) + var rv = {} + Object.keys(data).forEach(function (key) { + rv[key] = data[key] + }) + rv.dependencies = {} + Object.keys(newwrap.dependencies || {}).forEach(function (key) { + rv.dependencies[key] = readWrap(newwrap.dependencies[key]) + }) + + // fold in devDependencies if not already present, at top level + if (opts && opts.dev) { + Object.keys(data.devDependencies || {}).forEach(function (k) { + rv.dependencies[k] = rv.dependencies[k] || data.devDependencies[k] + }) + } + + log.verbose("readDependencies returned deps", rv.dependencies) + return cb(null, rv, newwrap.dependencies) + }) + }) +} + +function readWrap (w) { + return (w.resolved) ? w.resolved + : (w.from && url.parse(w.from).protocol) ? w.from + : w.version +} + +// if the -S|--save option is specified, then write installed packages +// as dependencies to a package.json file. +function save (where, installed, tree, pretty, hasArguments, cb) { + if (!hasArguments || + !npm.config.get("save") && + !npm.config.get("save-dev") && + !npm.config.get("save-optional") || + npm.config.get("global")) { + return cb(null, installed, tree, pretty) + } + + var saveBundle = npm.config.get("save-bundle") + var savePrefix = npm.config.get("save-prefix") + + // each item in the tree is a top-level thing that should be saved + // to the package.json file. + // The relevant tree shape is { : {what:} } + var saveTarget = path.resolve(where, "package.json") + + asyncMap(Object.keys(tree), function (k, cb) { + // if "from" is remote, git, or hosted, then save that instead. + var t = tree[k] + , f = npa(t.from) + , a = npa(t.what) + , w = [a.name, a.spec] + + + fs.stat(t.from, function (er){ + if (!er) { + w[1] = "file:" + t.from + } else if (['hosted', 'git', 'remote'].indexOf(f.type) !== -1) { + w[1] = t.from + } + cb(null, [w]) + }) + } + , function (er, arr) { + var things = arr.reduce(function (set, k) { + var rangeDescriptor = semver.valid(k[1], true) && + semver.gte(k[1], "0.1.0", true) && + !npm.config.get("save-exact") + ? savePrefix : "" + set[k[0]] = rangeDescriptor + k[1] + return set + }, {}) + + + // don't use readJson, because we don't want to do all the other + // tricky npm-specific stuff that's in there. + fs.readFile(saveTarget, function (er, data) { + // ignore errors here, just don't save it. + try { + data = JSON.parse(data.toString("utf8")) + } catch (ex) { + er = ex + } + + if (er) { + return cb(null, installed, tree, pretty) + } + + var deps = npm.config.get("save-optional") ? "optionalDependencies" + : npm.config.get("save-dev") ? "devDependencies" + : "dependencies" + + if (saveBundle) { + var bundle = data.bundleDependencies || data.bundledDependencies + delete data.bundledDependencies + if (!Array.isArray(bundle)) bundle = [] + data.bundleDependencies = bundle.sort() + } + + log.verbose("save", "saving", things) + data[deps] = data[deps] || {} + Object.keys(things).forEach(function (t) { + data[deps][t] = things[t] + if (saveBundle) { + var i = bundle.indexOf(t) + if (i === -1) bundle.push(t) + data.bundleDependencies = bundle.sort() + } + }) + + data[deps] = sortedObject(data[deps]) + + log.silly("save", "writing", saveTarget) + data = JSON.stringify(data, null, 2) + "\n" + writeFileAtomic(saveTarget, data, function (er) { + cb(er, installed, tree, pretty) + }) + }) + }) +} + + +// Outputting *all* the installed modules is a bit confusing, +// because the length of the path does not make it clear +// that the submodules are not immediately require()able. +// TODO: Show the complete tree, ls-style, but only if --long is provided +function prettify (tree, installed) { + function red (set, kv) { + set[kv[0]] = kv[1] + return set + } + + if (npm.config.get("json")) { + tree = Object.keys(tree).map(function (p) { + if (!tree[p]) return null + var what = npa(tree[p].what) + , name = what.name + , version = what.spec + , o = { name: name, version: version, from: tree[p].from } + o.dependencies = tree[p].children.map(function P (dep) { + var what = npa(dep.what) + , name = what.name + , version = what.spec + , o = { version: version, from: dep.from } + o.dependencies = dep.children.map(P).reduce(red, {}) + return [name, o] + }).reduce(red, {}) + return o + }) + + return JSON.stringify(tree, null, 2) + } + if (npm.config.get("parseable")) return parseable(installed) + + return Object.keys(tree).map(function (p) { + return archy({ label: tree[p].what + " " + p + , nodes: (tree[p].children || []).map(function P (c) { + if (npm.config.get("long")) { + return { label: c.what, nodes: c.children.map(P) } + } + var g = c.children.map(function (g) { + return g.what + }).join(", ") + if (g) g = " (" + g + ")" + return c.what + g + }) + }, "", { unicode: npm.config.get("unicode") }) + }).join("\n") +} + +function parseable (installed) { + var long = npm.config.get("long") + , cwd = process.cwd() + return installed.map(function (item) { + return path.resolve(cwd, item[1]) + + ( long ? ":" + item[0] : "" ) + }).join("\n") +} + +function treeify (installed) { + // each item is [what, where, parent, parentDir] + // If no parent, then report it. + // otherwise, tack it into the parent's children list. + // If the parent isn't a top-level then ignore it. + var whatWhere = installed.reduce(function (l, r) { + var parentDir = r[3] + , parent = r[2] + , where = r[1] + , what = r[0] + , from = r[4] + l[where] = { parentDir: parentDir + , parent: parent + , children: [] + , where: where + , what: what + , from: from } + return l + }, {}) + + // log.warn("install", whatWhere, "whatWhere") + return Object.keys(whatWhere).reduce(function (l, r) { + var ww = whatWhere[r] + //log.warn("r, ww", [r, ww]) + if (!ww.parent) { + l[r] = ww + } else { + var p = whatWhere[ww.parentDir] + if (p) p.children.push(ww) + else l[r] = ww + } + return l + }, {}) +} + + +// just like installMany, but also add the existing packages in +// where/node_modules to the family object. +function installManyTop (what, where, context, cb_) { + function cb (er, d) { + if (context.explicit || er) return cb_(er, d) + // since this wasn't an explicit install, let's build the top + // folder, so that `npm install` also runs the lifecycle scripts. + npm.commands.build([where], false, true, function (er) { + return cb_(er, d) + }) + } + + if (context.explicit) return next() + + var jsonPath = path.join(where, 'package.json') + log.verbose('installManyTop', 'reading for lifecycle', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + if (er) return next(er) + lifecycle(data, "preinstall", where, next) + }) + + function next (er) { + if (er) return cb(er) + installManyTop_(what, where, context, cb) + } +} + +function installManyTop_ (what, where, context, cb) { + var nm = path.resolve(where, "node_modules") + + fs.readdir(nm, function (er, pkgs) { + if (er) return installMany(what, where, context, cb) + + var scopes = [], unscoped = [] + pkgs.filter(function (p) { + return !p.match(/^[\._-]/) + }).forEach(function (p) { + // @names deserve deeper investigation + if (p[0] === "@") { + scopes.push(p) + } + else { + unscoped.push(p) + } + }) + + maybeScoped(scopes, nm, function (er, scoped) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + // recombine unscoped with @scope/package packages + asyncMap(unscoped.concat(scoped).map(function (p) { + return path.resolve(nm, p, "package.json") + }), function (jsonPath, cb) { + log.verbose('installManyTop', 'reading scoped package data from', jsonPath) + readJson(jsonPath, log.info, function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb(null, []) + cb(null, [[data.name, data.version]]) + }) + }, function (er, packages) { + // if there's nothing in node_modules, then don't freak out. + if (er) packages = [] + // add all the existing packages to the family list. + // however, do not add to the ancestors list. + packages.forEach(function (p) { + context.family[p[0]] = p[1] + }) + installMany(what, where, context, cb) + }) + }) + }) +} + +function maybeScoped (scopes, where, cb) { + // find packages in scopes + asyncMap(scopes, function (scope, cb) { + fs.readdir(path.resolve(where, scope), function (er, scoped) { + if (er) return cb(er) + var paths = scoped.map(function (p) { + return path.join(scope, p) + }) + cb(null, paths) + }) + }, cb) +} + +function installMany (what, where, context, cb) { + // readDependencies takes care of figuring out whether the list of + // dependencies we'll iterate below comes from an existing shrinkwrap from a + // parent level, a new shrinkwrap at this level, or package.json at this + // level, as well as which shrinkwrap (if any) our dependencies should use. + var opt = { dev: npm.config.get("dev") } + readDependencies(context, where, opt, function (er, data, wrap) { + if (er) data = {} + + var parent = data + + // if we're explicitly installing "what" into "where", then the shrinkwrap + // for "where" doesn't apply. This would be the case if someone were adding + // a new package to a shrinkwrapped package. (data.dependencies will not be + // used here except to indicate what packages are already present, so + // there's no harm in using that.) + if (context.explicit) wrap = null + + var deps = data.dependencies || {} + var devDeps = data.devDependencies || {} + + // what is a list of things. + // resolve each one. + asyncMap( what + , targetResolver(where, context, deps, devDeps) + , function (er, targets) { + + if (er) return cb(er) + + var bundled = data.bundleDependencies || data.bundledDependencies || [] + // only take the hit for readInstalled if there are probably bundled + // dependencies to read + if (bundled.length) { + readInstalled(where, { dev: true }, andBuildResolvedTree) + } else { + andBuildResolvedTree() + } + + function andBuildResolvedTree (er, current) { + if (er) return cb(er) + + // each target will be a data object corresponding + // to a package, folder, or whatever that is in the cache now. + var newPrev = Object.create(context.family) + , newAnc = Object.create(context.ancestors) + + if (!context.root) { + newAnc[data.name] = data.version + } + bundled.forEach(function (bundle) { + var bundleData = current.dependencies[bundle] + if ((!bundleData || !bundleData.version) && current.devDependencies) { + log.verbose( + 'installMany', bundle, 'was bundled with', + data.name + '@' + data.version + + ", but wasn't found in dependencies. Trying devDependencies" + ) + bundleData = current.devDependencies[bundle] + } + + if (!bundleData || !bundleData.version) { + log.warn( + 'installMany', bundle, 'was bundled with', + data.name + '@' + data.version + + ", but bundled package wasn't found in unpacked tree" + ) + } else { + log.verbose( + 'installMany', bundle + '@' + bundleData.version, + 'was bundled with', data.name + '@' + data.version + ) + newPrev[bundle] = bundleData.version + } + }) + targets.forEach(function (t) { + newPrev[t.name] = t.version + }) + log.silly("install resolved", targets) + targets.filter(function (t) { return t }).forEach(function (t) { + log.info("install", "%s into %s", t._id, where) + }) + asyncMap(targets, function (target, cb) { + log.info("installOne", target._id) + var wrapData = wrap ? wrap[target.name] : null + var newWrap = wrapData && wrapData.dependencies + ? wrap[target.name].dependencies || {} + : null + var newContext = { family: newPrev + , ancestors: newAnc + , parent: parent + , explicit: false + , wrap: newWrap } + installOne(target, where, newContext, cb) + }, cb) + } + }) + }) +} + +function targetResolver (where, context, deps, devDeps) { + var alreadyInstalledManually = [] + , resolveLeft = 0 + , nm = path.resolve(where, "node_modules") + , parent = context.parent + , wrap = context.wrap + + if (!context.explicit) readdir(nm) + + function readdir(name) { + resolveLeft++ + fs.readdir(name, function (er, inst) { + if (er) return resolveLeft-- + + // don't even mess with non-package looking things + inst = inst.filter(function (p) { + if (!p.match(/^[@\._-]/)) return true + // scoped packages + readdir(path.join(name, p)) + }) + + asyncMap(inst, function (pkg, cb) { + var jsonPath = path.resolve(name, pkg, 'package.json') + log.verbose('targetResolver', 'reading package data from', jsonPath) + readJson(jsonPath, log.info, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + // error means it's not a package, most likely. + if (er) return cb(null, []) + + // if it's a bundled dep, then assume that anything there is valid. + // otherwise, make sure that it's a semver match with what we want. + var bd = parent.bundleDependencies + var isBundled = bd && bd.indexOf(d.name) !== -1 + var expectedVersion = deps[d.name] || (devDeps && devDeps[d.name]) || "*" + var currentIsSatisfactory = semver.satisfies(d.version, expectedVersion, true) + if (isBundled || currentIsSatisfactory || deps[d.name] === d._resolved) { + return cb(null, d.name) + } + + // see if the package had been previously linked + fs.lstat(path.resolve(nm, pkg), function(err, s) { + if (err) return cb(null, []) + if (s.isSymbolicLink()) { + return cb(null, d.name) + } + + // something is there, but it's not satisfactory. Clobber it. + return cb(null, []) + }) + }) + }, function (er, inst) { + // this is the list of things that are valid and should be ignored. + alreadyInstalledManually = alreadyInstalledManually.concat(inst) + resolveLeft-- + }) + }) + } + + var to = 0 + return function resolver (what, cb) { + if (resolveLeft) return setTimeout(function () { + resolver(what, cb) + }, to++) + + // now we know what's been installed here manually, + // or tampered with in some way that npm doesn't want to overwrite. + if (alreadyInstalledManually.indexOf(npa(what).name) !== -1) { + log.verbose("already installed", "skipping %s %s", what, where) + return cb(null, []) + } + + // check for a version installed higher in the tree. + // If installing from a shrinkwrap, it must match exactly. + if (context.family[what]) { + log.verbose('install', what, 'is installed as', context.family[what]) + if (wrap && wrap[what].version === context.family[what]) { + log.verbose("shrinkwrap", "use existing", what) + return cb(null, []) + } + } + + // if it's identical to its parent, then it's probably someone + // doing `npm install foo` inside of the foo project. Print + // a warning, and skip it. + if (parent && parent.name === what && !npm.config.get("force")) { + log.warn("install", "Refusing to install %s as a dependency of itself" + , what) + return cb(null, []) + } + + if (wrap) { + var name = npa(what).name + if (wrap[name]) { + var wrapTarget = readWrap(wrap[name]) + what = name + "@" + wrapTarget + } else { + log.verbose("shrinkwrap", "skipping %s (not in shrinkwrap)", what) + } + } else if (deps[what]) { + what = what + "@" + deps[what] + } + + // This is where we actually fetch the package, if it's not already + // in the cache. + // If it's a git repo, then we want to install it, even if the parent + // already has a matching copy. + // If it's not a git repo, and the parent already has that pkg, then + // we can skip installing it again. + var pkgroot = path.resolve(npm.prefix, (parent && parent._from) || "") + cache.add(what, null, pkgroot, false, function (er, data) { + if (er && parent && parent.optionalDependencies && + parent.optionalDependencies.hasOwnProperty(npa(what).name)) { + log.warn("optional dep failed, continuing", what) + log.verbose("optional dep failed, continuing", [what, er]) + return cb(null, []) + } + + var type = npa(what).type + var isGit = type === "git" || type === "hosted" + + if (!er && + data && + !context.explicit && + context.family[data.name] === data.version && + !npm.config.get("force") && + !isGit) { + log.info("already installed", data.name + "@" + data.version) + return cb(null, []) + } + + + if (data && !data._from) data._from = what + if (er && parent && parent.name) er.parent = parent.name + return cb(er, data || []) + }) + } +} + +// we've already decided to install this. if anything's in the way, +// then uninstall it first. +function installOne (target, where, context, cb) { + // the --link flag makes this a "link" command if it's at the + // the top level. + var isGit = false + var type = npa(target._from).type + if (target && target._from) isGit = type === 'git' || type === 'hosted' + + if (where === npm.prefix && npm.config.get("link") + && !npm.config.get("global") && !isGit) { + return localLink(target, where, context, cb) + } + installOne_(target, where, context, function (er, installedWhat) { + + // check if this one is optional to its parent. + if (er && context.parent && context.parent.optionalDependencies && + context.parent.optionalDependencies.hasOwnProperty(target.name)) { + log.warn("optional dep failed, continuing", target._id) + log.verbose("optional dep failed, continuing", [target._id, er]) + er = null + } + + cb(er, installedWhat) + }) + +} + +function localLink (target, where, context, cb) { + log.verbose("localLink", target._id) + var jsonPath = path.resolve(npm.globalDir, target.name , 'package.json') + var parent = context.parent + + log.verbose('localLink', 'reading data to link', target.name, 'from', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + function thenLink () { + npm.commands.link([target.name], function (er, d) { + log.silly("localLink", "back from link", [er, d]) + cb(er, [resultList(target, where, parent && parent._id)]) + }) + } + + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er || data._id === target._id) { + if (er) { + install( path.resolve(npm.globalDir, "..") + , target._id + , function (er) { + if (er) return cb(er, []) + thenLink() + }) + } else thenLink() + } else { + log.verbose("localLink", "install locally (no link)", target._id) + installOne_(target, where, context, cb) + } + }) +} + +function resultList (target, where, parentId) { + var nm = path.resolve(where, "node_modules") + , targetFolder = path.resolve(nm, target.name) + , prettyWhere = where + + if (!npm.config.get("global")) { + prettyWhere = path.relative(process.cwd(), where) + } + + if (prettyWhere === ".") prettyWhere = null + + if (!npm.config.get("global")) { + // print out the folder relative to where we are right now. + targetFolder = path.relative(process.cwd(), targetFolder) + } + + return [ target._id + , targetFolder + , prettyWhere && parentId + , parentId && prettyWhere + , target._from ] +} + +var installed = Object.create(null) + +function installOne_ (target, where, context, cb_) { + var nm = path.resolve(where, "node_modules") + , targetFolder = path.resolve(nm, target.name) + , prettyWhere = path.relative(process.cwd(), where) + , parent = context.parent + + if (prettyWhere === ".") prettyWhere = null + + cb_ = inflight(target.name + ":" + where, cb_) + if (!cb_) { + return log.verbose("installOne", "of", target.name, "to", where, "already in flight; waiting") + } + else { + log.verbose("installOne", "of", target.name, "to", where, "not in flight; installing") + } + + function cb(er, data) { + unlock(nm, target.name, function () { cb_(er, data) }) + } + + lock(nm, target.name, function (er) { + if (er) return cb(er) + + if (targetFolder in installed) { + log.error("install", "trying to install", target.version, "to", targetFolder) + log.error("install", "but already installed versions", installed[targetFolder]) + installed[targetFolder].push(target.version) + } + else { + installed[targetFolder] = [target.version] + } + + var force = npm.config.get("force") + , nodeVersion = npm.config.get("node-version") + , strict = npm.config.get("engine-strict") + , c = npmInstallChecks + + chain( + [ [c.checkEngine, target, npm.version, nodeVersion, force, strict] + , [c.checkPlatform, target, force] + , [c.checkCycle, target, context.ancestors] + , [c.checkGit, targetFolder] + , [write, target, targetFolder, context] ] + , function (er, d) { + if (er) return cb(er) + + d.push(resultList(target, where, parent && parent._id)) + cb(er, d) + } + ) + }) +} + +function write (target, targetFolder, context, cb_) { + var up = npm.config.get("unsafe-perm") + , user = up ? null : npm.config.get("user") + , group = up ? null : npm.config.get("group") + , family = context.family + + function cb (er, data) { + // cache.unpack returns the data object, and all we care about + // is the list of installed packages from that last thing. + if (!er) return cb_(er, data) + + if (npm.config.get("rollback") === false) return cb_(er) + npm.rollbacks.push(targetFolder) + cb_(er, data) + } + + var bundled = [] + + log.silly("install write", "writing", target.name, target.version, "to", targetFolder) + chain( + [ [ cache.unpack, target.name, target.version, targetFolder, null, null, user, group ], + function writePackageJSON (cb) { + var jsonPath = path.resolve(targetFolder, 'package.json') + log.verbose('write', 'writing to', jsonPath) + writeFileAtomic(jsonPath, JSON.stringify(target, null, 2) + '\n', cb) + }, + [ lifecycle, target, "preinstall", targetFolder ], + function collectBundled (cb) { + if (!target.bundleDependencies) return cb() + + var bd = path.resolve(targetFolder, "node_modules") + fs.readdir(bd, function (er, b) { + // nothing bundled, maybe + if (er) return cb() + bundled = b || [] + cb() + }) + } ] + + // nest the chain so that we can throw away the results returned + // up until this point, since we really don't care about it. + , function X (er) { + if (er) return cb(er) + + // before continuing to installing dependencies, check for a shrinkwrap. + var opt = { dev: npm.config.get("dev") } + readDependencies(context, targetFolder, opt, function (er, data, wrap) { + if (er) return cb(er); + var deps = prepareForInstallMany(data, "dependencies", bundled, wrap, + family) + var depsTargetFolder = targetFolder + var depsContext = { family: family + , ancestors: context.ancestors + , parent: target + , explicit: false + , wrap: wrap } + + var actions = + [ [ installManyAndBuild, deps, depsTargetFolder, depsContext ] ] + + // FIXME: This is an accident waiting to happen! + // + // 1. If multiple children at the same level of the tree share a + // peerDependency that's not in the parent's dependencies, because + // the peerDeps don't get added to the family, they will keep + // getting reinstalled (worked around by inflighting installOne). + // 2. The installer can't safely build at the parent level because + // that's already being done by the parent's installAndBuild. This + // runs the risk of the peerDependency never getting built. + // + // The fix: Don't install peerDependencies; require them to be + // included as explicit dependencies / devDependencies, and warn + // or error when they're missing. See #5080 for more arguments in + // favor of killing implicit peerDependency installs with fire. + var peerDeps = prepareForInstallMany(data, "peerDependencies", bundled, + wrap, family) + peerDeps.forEach(function (pd) { + warnPeers([ + "The peer dependency "+pd+" included from "+data.name+" will no", + "longer be automatically installed to fulfill the peerDependency ", + "in npm 3+. Your application will need to depend on it explicitly." + ], pd+","+data.name) + }) + + // Package scopes cause an addditional tree level which needs to be + // considered when resolving a peerDependency's target folder. + var pdTargetFolder + if (npa(target.name).scope) { + pdTargetFolder = path.resolve(targetFolder, '../../..') + } else { + pdTargetFolder = path.resolve(targetFolder, '../..') + } + + var pdContext = context + if (peerDeps.length > 0) { + actions.push( + [ installMany, peerDeps, pdTargetFolder, pdContext ] + ) + } + + chain(actions, cb) + }) + }) +} + +function installManyAndBuild (deps, targetFolder, context, cb) { + installMany(deps, targetFolder, context, function (er, d) { + log.verbose("about to build", targetFolder) + if (er) return cb(er) + npm.commands.build( [targetFolder] + , npm.config.get("global") + , true + , function (er) { return cb(er, d) }) + }) +} + +function prepareForInstallMany (packageData, depsKey, bundled, wrap, family) { + var deps = Object.keys(packageData[depsKey] || {}) + + // don't install bundleDependencies, unless they're missing. + if (packageData.bundleDependencies) { + deps = deps.filter(function (d) { + return packageData.bundleDependencies.indexOf(d) === -1 || + bundled.indexOf(d) === -1 + }) + } + + return deps.filter(function (d) { + // prefer to not install things that are satisfied by + // something in the "family" list, unless we're installing + // from a shrinkwrap. + if (wrap) return wrap + if (semver.validRange(family[d], true)) { + return !semver.satisfies(family[d], packageData[depsKey][d], true) + } + return true + }).map(function (d) { + var v = packageData[depsKey][d] + var t = d + "@" + v + log.silly("prepareForInstallMany", "adding", t, "from", packageData.name, depsKey) + return t + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/link.js b/bin/nodejs0.10.47/node_modules/npm/lib/link.js new file mode 100644 index 00000000..f0123797 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/link.js @@ -0,0 +1,170 @@ +// link with no args: symlink the folder to the global location +// link with package arg: symlink the global to the local + +var npm = require("./npm.js") + , symlink = require("./utils/link.js") + , fs = require("graceful-fs") + , log = require("npmlog") + , asyncMap = require("slide").asyncMap + , chain = require("slide").chain + , path = require("path") + , build = require("./build.js") + , npa = require("npm-package-arg") + +module.exports = link + +link.usage = "npm link (in package dir)" + + "\nnpm link (link global into local)" + +link.completion = function (opts, cb) { + var dir = npm.globalDir + fs.readdir(dir, function (er, files) { + cb(er, files.filter(function (f) { + return !f.match(/^[\._-]/) + })) + }) +} + +function link (args, cb) { + if (process.platform === 'win32') { + var semver = require('semver') + if (!semver.gte(process.version, '0.7.9')) { + var msg = 'npm link not supported on windows prior to node 0.7.9' + var e = new Error(msg) + e.code = 'ENOTSUP' + e.errno = require('constants').ENOTSUP + return cb(e) + } + } + + if (npm.config.get("global")) { + return cb(new Error("link should never be --global.\n" + +"Please re-run this command with --local")) + } + + if (args.length === 1 && args[0] === ".") args = [] + if (args.length) return linkInstall(args, cb) + linkPkg(npm.prefix, cb) +} + +function linkInstall (pkgs, cb) { + asyncMap(pkgs, function (pkg, cb) { + var t = path.resolve(npm.globalDir, "..") + , pp = path.resolve(npm.globalDir, pkg) + , rp = null + , target = path.resolve(npm.dir, pkg) + + function n (er, data) { + if (er) return cb(er, data) + // install returns [ [folder, pkgId], ... ] + // but we definitely installed just one thing. + var d = data.filter(function (d) { return !d[3] }) + var what = npa(d[0][0]) + pp = d[0][1] + pkg = what.name + target = path.resolve(npm.dir, pkg) + next() + } + + // if it's a folder, a random not-installed thing, or not a scoped package, + // then link or install it first + if (pkg[0] !== "@" && (pkg.indexOf("/") !== -1 || pkg.indexOf("\\") !== -1)) { + return fs.lstat(path.resolve(pkg), function (er, st) { + if (er || !st.isDirectory()) { + npm.commands.install(t, pkg, n) + } else { + rp = path.resolve(pkg) + linkPkg(rp, n) + } + }) + } + + fs.lstat(pp, function (er, st) { + if (er) { + rp = pp + return npm.commands.install(t, pkg, n) + } else if (!st.isSymbolicLink()) { + rp = pp + next() + } else { + return fs.realpath(pp, function (er, real) { + if (er) log.warn("invalid symbolic link", pkg) + else rp = real + next() + }) + } + }) + + function next () { + chain + ( [ [function (cb) { + log.verbose("link", "symlinking %s to %s", pp, target) + cb() + }] + , [symlink, pp, target] + // do not run any scripts + , rp && [build, [target], npm.config.get("global"), build._noLC, true] + , [ resultPrinter, pkg, pp, target, rp ] ] + , cb ) + } + }, cb) +} + +function linkPkg (folder, cb_) { + var me = folder || npm.prefix + , readJson = require("read-package-json") + + log.verbose("linkPkg", folder) + + readJson(path.resolve(me, "package.json"), function (er, d) { + function cb (er) { + return cb_(er, [[d && d._id, target, null, null]]) + } + if (er) return cb(er) + if (!d.name) { + er = new Error("Package must have a name field to be linked") + return cb(er) + } + var target = path.resolve(npm.globalDir, d.name) + symlink(me, target, false, true, function (er) { + if (er) return cb(er) + log.verbose("link", "build target", target) + // also install missing dependencies. + npm.commands.install(me, [], function (er) { + if (er) return cb(er) + // build the global stuff. Don't run *any* scripts, because + // install command already will have done that. + build([target], true, build._noLC, true, function (er) { + if (er) return cb(er) + resultPrinter(path.basename(me), me, target, cb) + }) + }) + }) + }) +} + +function resultPrinter (pkg, src, dest, rp, cb) { + if (typeof cb !== "function") cb = rp, rp = null + var where = dest + rp = (rp || "").trim() + src = (src || "").trim() + // XXX If --json is set, then look up the data from the package.json + if (npm.config.get("parseable")) { + return parseableOutput(dest, rp || src, cb) + } + if (rp === src) rp = null + console.log(where + " -> " + src + (rp ? " -> " + rp: "")) + cb() +} + +function parseableOutput (dest, rp, cb) { + // XXX this should match ls --parseable and install --parseable + // look up the data from package.json, format it the same way. + // + // link is always effectively "long", since it doesn't help much to + // *just* print the target folder. + // However, we don't actually ever read the version number, so + // the second field is always blank. + console.log(dest + "::" + rp) + cb() +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/logout.js b/bin/nodejs0.10.47/node_modules/npm/lib/logout.js new file mode 100644 index 00000000..4c02f056 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/logout.js @@ -0,0 +1,40 @@ +module.exports = logout + +var dezalgo = require("dezalgo") +var log = require("npmlog") + +var npm = require("./npm.js") +var mapToRegistry = require("./utils/map-to-registry.js") + +logout.usage = "npm logout [--registry] [--scope]" + +function logout (args, cb) { + npm.spinner.start() + cb = dezalgo(cb) + + mapToRegistry("/", npm.config, function (err, uri, auth, normalized) { + if (err) return cb(err) + + if (auth.token) { + log.verbose("logout", "clearing session token for", normalized) + npm.registry.logout(normalized, { auth: auth }, function (err) { + if (err) return cb(err) + + npm.config.clearCredentialsByURI(normalized) + npm.spinner.stop() + npm.config.save("user", cb) + }) + } + else if (auth.username || auth.password) { + log.verbose("logout", "clearing user credentials for", normalized) + npm.config.clearCredentialsByURI(normalized) + npm.spinner.stop() + npm.config.save("user", cb) + } + else { + cb(new Error( + "Not logged in to", normalized + ",", "so can't log out." + )) + } + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/ls.js b/bin/nodejs0.10.47/node_modules/npm/lib/ls.js new file mode 100644 index 00000000..b133b414 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/ls.js @@ -0,0 +1,404 @@ + +// show the installed versions of packages +// +// --parseable creates output like this: +// ::: +// Flags are a :-separated list of zero or more indicators + +module.exports = exports = ls + +var npm = require("./npm.js") + , readInstalled = require("read-installed") + , log = require("npmlog") + , path = require("path") + , archy = require("archy") + , semver = require("semver") + , url = require("url") + , color = require("ansicolors") + , npa = require("npm-package-arg") + +ls.usage = "npm ls" + +ls.completion = require("./utils/completion/installed-deep.js") + +function ls (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + var dir = path.resolve(npm.dir, "..") + + // npm ls 'foo@~1.3' bar 'baz@<2' + if (!args) args = [] + else args = args.map(function (a) { + var p = npa(a) + , name = p.name + , ver = semver.validRange(p.rawSpec) || "" + + return [ name, ver ] + }) + + var depth = npm.config.get("depth") + var opt = { depth: depth, log: log.warn, dev: true } + readInstalled(dir, opt, function (er, data) { + pruneNestedExtraneous(data) + filterByEnv(data) + var bfs = bfsify(data, args) + , lite = getLite(bfs) + + if (er || silent) return cb(er, data, lite) + + var long = npm.config.get("long") + , json = npm.config.get("json") + , out + if (json) { + var seen = [] + var d = long ? bfs : lite + // the raw data can be circular + out = JSON.stringify(d, function (k, o) { + if (typeof o === "object") { + if (-1 !== seen.indexOf(o)) return "[Circular]" + seen.push(o) + } + return o + }, 2) + } else if (npm.config.get("parseable")) { + out = makeParseable(bfs, long, dir) + } else if (data) { + out = makeArchy(bfs, long, dir) + } + console.log(out) + + if (args.length && !data._found) process.exitCode = 1 + + // if any errors were found, then complain and exit status 1 + if (lite.problems && lite.problems.length) { + er = lite.problems.join("\n") + } + cb(er, data, lite) + }) +} + +function pruneNestedExtraneous (data, visited) { + visited = visited || [] + visited.push(data) + for (var i in data.dependencies) { + if (data.dependencies[i].extraneous) { + data.dependencies[i].dependencies = {} + } else if (visited.indexOf(data.dependencies[i]) === -1) { + pruneNestedExtraneous(data.dependencies[i], visited) + } + } +} + +function filterByEnv (data) { + var dev = npm.config.get("dev") + var production = npm.config.get("production") + if (dev === production) return + var dependencies = {} + var devDependencies = data.devDependencies || [] + Object.keys(data.dependencies).forEach(function (name) { + var keys = Object.keys(devDependencies) + if (production && keys.indexOf(name) !== -1) return + if (dev && keys.indexOf(name) === -1) return + dependencies[name] = data.dependencies[name] + }) + data.dependencies = dependencies +} + +function alphasort (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return a > b ? 1 + : a < b ? -1 : 0 +} + +function isCruft (data) { + return data.extraneous && data.error && data.error.code === 'ENOTDIR' +} + +function getLite (data, noname, depth) { + var lite = {} + , maxDepth = npm.config.get("depth") + + if (typeof depth === 'undefined') depth = 0 + if (!noname && data.name) lite.name = data.name + if (data.version) lite.version = data.version + if (data.extraneous) { + lite.extraneous = true + lite.problems = lite.problems || [] + lite.problems.push( "extraneous: " + + data.name + "@" + data.version + + " " + (data.path || "") ) + } + + if (data._from) + lite.from = data._from + + if (data._resolved) + lite.resolved = data._resolved + + if (data.invalid) { + lite.invalid = true + lite.problems = lite.problems || [] + lite.problems.push( "invalid: " + + data.name + "@" + data.version + + " " + (data.path || "") ) + } + + if (data.peerInvalid) { + lite.peerInvalid = true + lite.problems = lite.problems || [] + lite.problems.push( "peer invalid: " + + data.name + "@" + data.version + + " " + (data.path || "") ) + } + + if (data.dependencies) { + var deps = Object.keys(data.dependencies) + if (deps.length) lite.dependencies = deps.map(function (d) { + var dep = data.dependencies[d] + if (typeof dep === "string") { + lite.problems = lite.problems || [] + var p + if (data.depth > maxDepth) { + p = "max depth reached: " + } else { + p = "missing: " + } + p += d + "@" + dep + + ", required by " + + data.name + "@" + data.version + lite.problems.push(p) + return [d, { required: dep.requiredBy, missing: true }] + } else if (dep.peerMissing) { + lite.problems = lite.problems || [] + dep.peerMissing.forEach(function (missing) { + var pdm = 'peer dep missing: ' + + missing.requires + + ', required by ' + + missing.requiredBy + lite.problems.push(pdm) + }) + return [d, { required: dep, peerMissing: true }] + } else if (npm.config.get('json')) { + if (depth === maxDepth) delete dep.dependencies + return [d, getLite(dep, true, depth + 1)] + } + return [d, getLite(dep, true)] + }).reduce(function (deps, d) { + if (d[1].problems) { + lite.problems = lite.problems || [] + lite.problems.push.apply(lite.problems, d[1].problems) + } + deps[d[0]] = d[1] + return deps + }, {}) + } + return lite +} + +function bfsify (root, args, current, queue, seen) { + // walk over the data, and turn it from this: + // +-- a + // | `-- b + // | `-- a (truncated) + // `--b (truncated) + // into this: + // +-- a + // `-- b + // which looks nicer + args = args || [] + current = current || root + queue = queue || [] + seen = seen || [root] + var deps = current.dependencies = current.dependencies || {} + Object.keys(deps).forEach(function (d) { + var dep = deps[d] + if (typeof dep !== "object") return + if (seen.indexOf(dep) !== -1) { + if (npm.config.get("parseable") || !npm.config.get("long")) { + delete deps[d] + return + } else { + dep = deps[d] = Object.create(dep) + dep.dependencies = {} + } + } + queue.push(dep) + seen.push(dep) + }) + + if (!queue.length) { + // if there were args, then only show the paths to found nodes. + return filterFound(root, args) + } + return bfsify(root, args, queue.shift(), queue, seen) +} + +function filterFound (root, args) { + if (!args.length) return root + var deps = root.dependencies + if (deps) Object.keys(deps).forEach(function (d) { + var dep = filterFound(deps[d], args) + + // see if this one itself matches + var found = false + for (var i = 0; !found && i < args.length; i ++) { + if (d === args[i][0]) { + found = semver.satisfies(dep.version, args[i][1], true) + } + } + // included explicitly + if (found) dep._found = true + // included because a child was included + if (dep._found && !root._found) root._found = 1 + // not included + if (!dep._found) delete deps[d] + }) + if (!root._found) root._found = false + return root +} + +function makeArchy (data, long, dir) { + var out = makeArchy_(data, long, dir, 0) + return archy(out, "", { unicode: npm.config.get("unicode") }) +} + +function makeArchy_ (data, long, dir, depth, parent, d) { + if (typeof data === "string") { + if (depth -1 <= npm.config.get("depth")) { + // just missing + var unmet = "UNMET DEPENDENCY" + if (npm.color) { + unmet = color.bgBlack(color.red(unmet)) + } + data = unmet + " " + d + "@" + data + } else { + data = d+"@"+ data + } + return data + } + + var out = {} + // the top level is a bit special. + out.label = data._id || "" + if (data._found === true && data._id) { + if (npm.color) { + out.label = color.bgBlack(color.yellow(out.label.trim())) + " " + } else { + out.label = out.label.trim() + " " + } + } + if (data.link) out.label += " -> " + data.link + + if (data.invalid) { + if (data.realName !== data.name) out.label += " ("+data.realName+")" + var invalid = "invalid" + if (npm.color) invalid = color.bgBlack(color.red(invalid)) + out.label += " " + invalid + } + + if (data.peerInvalid) { + var peerInvalid = "peer invalid" + if (npm.color) peerInvalid = color.bgBlack(color.red(peerInvalid)) + out.label += " " + peerInvalid + } + + if (data.extraneous && data.path !== dir) { + var extraneous = "extraneous" + if (npm.color) extraneous = color.bgBlack(color.green(extraneous)) + out.label += " " + extraneous + } + + // add giturl to name@version + if (data._resolved) { + var type = npa(data._resolved).type + var isGit = type === 'git' || type === 'hosted' + if (isGit) { + out.label += ' (' + data._resolved + ')' + } + } + + if (long) { + if (dir === data.path) out.label += "\n" + dir + out.label += "\n" + getExtras(data, dir) + } else if (dir === data.path) { + if (out.label) out.label += " " + out.label += dir + } + + // now all the children. + out.nodes = [] + if (depth <= npm.config.get("depth")) { + out.nodes = Object.keys(data.dependencies || {}) + .sort(alphasort).map(function (d) { + return makeArchy_(data.dependencies[d], long, dir, depth + 1, data, d) + }) + } + + if (out.nodes.length === 0 && data.path === dir) { + out.nodes = ["(empty)"] + } + + return out +} + +function getExtras (data) { + var extras = [] + + if (data.description) extras.push(data.description) + if (data.repository) extras.push(data.repository.url) + if (data.homepage) extras.push(data.homepage) + if (data._from) { + var from = data._from + if (from.indexOf(data.name + "@") === 0) { + from = from.substr(data.name.length + 1) + } + var u = url.parse(from) + if (u.protocol) extras.push(from) + } + return extras.join("\n") +} + + +function makeParseable (data, long, dir, depth, parent, d) { + depth = depth || 0 + + return [ makeParseable_(data, long, dir, depth, parent, d) ] + .concat(Object.keys(data.dependencies || {}) + .sort(alphasort).map(function (d) { + return makeParseable(data.dependencies[d], long, dir, depth + 1, data, d) + })) + .filter(function (x) { return x }) + .join("\n") +} + +function makeParseable_ (data, long, dir, depth, parent, d) { + if (data.hasOwnProperty("_found") && data._found !== true) return "" + + if (typeof data === "string") { + if (data.depth < npm.config.get("depth")) { + data = npm.config.get("long") + ? path.resolve(parent.path, "node_modules", d) + + ":"+d+"@"+JSON.stringify(data)+":INVALID:MISSING" + : "" + } else { + data = path.resolve(data.path || "", "node_modules", d || "") + + (npm.config.get("long") + ? ":" + d + "@" + JSON.stringify(data) + + ":" // no realpath resolved + + ":MAXDEPTH" + : "") + } + + return data + } + + if (!npm.config.get("long")) return data.path + + return data.path + + ":" + (data._id || "") + + ":" + (data.realPath !== data.path ? data.realPath : "") + + (data.extraneous ? ":EXTRANEOUS" : "") + + (data.invalid ? ":INVALID" : "") + + (data.peerInvalid ? ":PEERINVALID" : "") +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/npm.js b/bin/nodejs0.10.47/node_modules/npm/lib/npm.js new file mode 100644 index 00000000..9d3f50c5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/npm.js @@ -0,0 +1,475 @@ +;(function(){ +// windows: running "npm blah" in this folder will invoke WSH, not node. +if (typeof WScript !== "undefined") { + WScript.echo("npm does not work when run\n" + +"with the Windows Scripting Host\n\n" + +"'cd' to a different directory,\n" + +"or type 'npm.cmd ',\n" + +"or type 'node npm '.") + WScript.quit(1) + return +} + + +var EventEmitter = require("events").EventEmitter + , npm = module.exports = new EventEmitter() + , npmconf = require("./config/core.js") + , log = require("npmlog") + , gfs = require('graceful-fs') + , fs = gfs.gracefulify(require('fs')) + , path = require("path") + , abbrev = require("abbrev") + , which = require("which") + , CachingRegClient = require("./cache/caching-client.js") + , charSpin = require("char-spinner") + +npm.config = { + loaded: false, + get: function() { + throw new Error('npm.load() required') + }, + set: function() { + throw new Error('npm.load() required') + } +} + +npm.commands = {} + +npm.rollbacks = [] + +try { + // startup, ok to do this synchronously + var j = JSON.parse(fs.readFileSync( + path.join(__dirname, "../package.json"))+"") + npm.version = j.version +} catch (ex) { + try { + log.info("error reading version", ex) + } catch (er) {} + npm.version = ex +} + +var commandCache = {} + // short names for common things + , aliases = { "rm" : "uninstall" + , "r" : "uninstall" + , "un" : "uninstall" + , "unlink" : "uninstall" + , "remove" : "uninstall" + , "rb" : "rebuild" + , "list" : "ls" + , "la" : "ls" + , "ll" : "ls" + , "ln" : "link" + , "i" : "install" + , "isntall" : "install" + , "up" : "update" + , "upgrade" : "update" + , "c" : "config" + , "dist-tags" : "dist-tag" + , "info" : "view" + , "show" : "view" + , "find" : "search" + , "s" : "search" + , "se" : "search" + , "author" : "owner" + , "home" : "docs" + , "issues": "bugs" + , "unstar": "star" // same function + , "apihelp" : "help" + , "login": "adduser" + , "add-user": "adduser" + , "tst": "test" + , "t": "test" + , "find-dupes": "dedupe" + , "ddp": "dedupe" + , "v": "view" + , "verison": "version" + } + + , aliasNames = Object.keys(aliases) + // these are filenames in . + , cmdList = [ "install" + , "uninstall" + , "cache" + , "config" + , "set" + , "get" + , "update" + , "outdated" + , "prune" + , "pack" + , "dedupe" + + , "rebuild" + , "link" + + , "publish" + , "star" + , "stars" + , "tag" + , "adduser" + , "logout" + , "unpublish" + , "owner" + , "access" + , "team" + , "deprecate" + , "shrinkwrap" + + , "help" + , "help-search" + , "ls" + , "search" + , "view" + , "init" + , "version" + , "edit" + , "explore" + , "docs" + , "repo" + , "bugs" + , "faq" + , "root" + , "prefix" + , "bin" + , "whoami" + , "dist-tag" + , "ping" + + , "test" + , "stop" + , "start" + , "restart" + , "run-script" + , "completion" + ] + , plumbing = [ "build" + , "unbuild" + , "xmas" + , "substack" + , "visnup" + ] + , littleGuys = [ "isntall", "verison" ] + , fullList = cmdList.concat(aliasNames).filter(function (c) { + return plumbing.indexOf(c) === -1 + }) + , abbrevs = abbrev(fullList) + +// we have our reasons +fullList = npm.fullList = fullList.filter(function (c) { + return littleGuys.indexOf(c) === -1 +}) + +npm.spinner = + { int: null + , started: false + , start: function () { + if (npm.spinner.int) return + var c = npm.config.get("spin") + if (!c) return + var stream = npm.config.get("logstream") + var opt = { tty: c !== "always", stream: stream } + opt.cleanup = !npm.spinner.started + npm.spinner.int = charSpin(opt) + npm.spinner.started = true + } + , stop: function () { + clearInterval(npm.spinner.int) + npm.spinner.int = null + } + } + +Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) { + Object.defineProperty(npm.commands, c, { get : function () { + if (!loaded) throw new Error( + "Call npm.load(config, cb) before using this command.\n"+ + "See the README.md or cli.js for example usage.") + var a = npm.deref(c) + if (c === "la" || c === "ll") { + npm.config.set("long", true) + } + + npm.command = c + if (commandCache[a]) return commandCache[a] + + var cmd = require(__dirname+"/"+a+".js") + + commandCache[a] = function () { + var args = Array.prototype.slice.call(arguments, 0) + if (typeof args[args.length - 1] !== "function") { + args.push(defaultCb) + } + if (args.length === 1) args.unshift([]) + + npm.registry.version = npm.version + if (!npm.registry.refer) { + npm.registry.refer = [a].concat(args[0]).map(function (arg) { + // exclude anything that might be a URL, path, or private module + // Those things will always have a slash in them somewhere + if (arg && arg.match && arg.match(/\/|\\/)) { + return "[REDACTED]" + } else { + return arg + } + }).filter(function (arg) { + return arg && arg.match + }).join(" ") + } + + cmd.apply(npm, args) + } + + Object.keys(cmd).forEach(function (k) { + commandCache[a][k] = cmd[k] + }) + + return commandCache[a] + }, enumerable: fullList.indexOf(c) !== -1, configurable: true }) + + // make css-case commands callable via camelCase as well + if (c.match(/\-([a-z])/)) { + addCommand(c.replace(/\-([a-z])/g, function (a, b) { + return b.toUpperCase() + })) + } +}) + +function defaultCb (er, data) { + if (er) console.error(er.stack || er.message) + else console.log(data) +} + +npm.deref = function (c) { + if (!c) return "" + if (c.match(/[A-Z]/)) c = c.replace(/([A-Z])/g, function (m) { + return "-" + m.toLowerCase() + }) + if (plumbing.indexOf(c) !== -1) return c + var a = abbrevs[c] + if (aliases[a]) a = aliases[a] + return a +} + +var loaded = false + , loading = false + , loadErr = null + , loadListeners = [] + +function loadCb (er) { + loadListeners.forEach(function (cb) { + process.nextTick(cb.bind(npm, er, npm)) + }) + loadListeners.length = 0 +} + +npm.load = function (cli, cb_) { + if (!cb_ && typeof cli === "function") cb_ = cli , cli = {} + if (!cb_) cb_ = function () {} + if (!cli) cli = {} + loadListeners.push(cb_) + if (loaded || loadErr) return cb(loadErr) + if (loading) return + loading = true + var onload = true + + function cb (er) { + if (loadErr) return + loadErr = er + if (er) return cb_(er) + if (npm.config.get("force")) { + log.warn("using --force", "I sure hope you know what you are doing.") + } + npm.config.loaded = true + loaded = true + loadCb(loadErr = er) + onload = onload && npm.config.get('onload-script') + if (onload) { + try { + require(onload) + } catch (err) { + log.warn('onload-script', 'failed to require onload script', onload) + log.warn('onload-script', err) + } + onload = false + } + } + + log.pause() + + load(npm, cli, cb) +} + +function load (npm, cli, cb) { + which(process.argv[0], function (er, node) { + if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) { + log.verbose("node symlink", node) + process.execPath = node + process.installPrefix = path.resolve(node, "..", "..") + } + + // look up configs + //console.error("about to look up configs") + + var builtin = path.resolve(__dirname, "..", "npmrc") + npmconf.load(cli, builtin, function (er, config) { + if (er === config) er = null + + npm.config = config + if (er) return cb(er) + + // if the "project" config is not a filename, and we're + // not in global mode, then that means that it collided + // with either the default or effective userland config + if (!config.get("global") + && config.sources.project + && config.sources.project.type !== "ini") { + log.verbose("config" + , "Skipping project config: %s. " + + "(matches userconfig)" + , config.localPrefix + "/.npmrc") + } + + // Include npm-version and node-version in user-agent + var ua = config.get("user-agent") || "" + ua = ua.replace(/\{node-version\}/gi, process.version) + ua = ua.replace(/\{npm-version\}/gi, npm.version) + ua = ua.replace(/\{platform\}/gi, process.platform) + ua = ua.replace(/\{arch\}/gi, process.arch) + config.set("user-agent", ua) + + var color = config.get("color") + + log.level = config.get("loglevel") + log.heading = config.get("heading") || "npm" + log.stream = config.get("logstream") + + switch (color) { + case "always": + log.enableColor() + npm.color = true + break + case false: + log.disableColor() + npm.color = false + break + default: + var tty = require("tty") + if (process.stdout.isTTY) npm.color = true + else if (!tty.isatty) npm.color = true + else if (tty.isatty(1)) npm.color = true + else npm.color = false + break + } + + log.resume() + + // at this point the configs are all set. + // go ahead and spin up the registry client. + npm.registry = new CachingRegClient(npm.config) + + var umask = npm.config.get("umask") + npm.modes = { exec: 0777 & (~umask) + , file: 0666 & (~umask) + , umask: umask } + + var gp = Object.getOwnPropertyDescriptor(config, "globalPrefix") + Object.defineProperty(npm, "globalPrefix", gp) + + var lp = Object.getOwnPropertyDescriptor(config, "localPrefix") + Object.defineProperty(npm, "localPrefix", lp) + + return cb(null, npm) + }) + }) +} + +Object.defineProperty(npm, "prefix", + { get : function () { + return npm.config.get("global") ? npm.globalPrefix : npm.localPrefix + } + , set : function (r) { + var k = npm.config.get("global") ? "globalPrefix" : "localPrefix" + return npm[k] = r + } + , enumerable : true + }) + +Object.defineProperty(npm, "bin", + { get : function () { + if (npm.config.get("global")) return npm.globalBin + return path.resolve(npm.root, ".bin") + } + , enumerable : true + }) + +Object.defineProperty(npm, "globalBin", + { get : function () { + var b = npm.globalPrefix + if (process.platform !== "win32") b = path.resolve(b, "bin") + return b + } + }) + +Object.defineProperty(npm, "dir", + { get : function () { + if (npm.config.get("global")) return npm.globalDir + return path.resolve(npm.prefix, "node_modules") + } + , enumerable : true + }) + +Object.defineProperty(npm, "globalDir", + { get : function () { + return (process.platform !== "win32") + ? path.resolve(npm.globalPrefix, "lib", "node_modules") + : path.resolve(npm.globalPrefix, "node_modules") + } + , enumerable : true + }) + +Object.defineProperty(npm, "root", + { get : function () { return npm.dir } }) + +Object.defineProperty(npm, "cache", + { get : function () { return npm.config.get("cache") } + , set : function (r) { return npm.config.set("cache", r) } + , enumerable : true + }) + +var tmpFolder +var rand = require("crypto").randomBytes(4).toString("hex") +Object.defineProperty(npm, "tmp", + { get : function () { + if (!tmpFolder) tmpFolder = "npm-" + process.pid + "-" + rand + return path.resolve(npm.config.get("tmp"), tmpFolder) + } + , enumerable : true + }) + +// the better to repl you with +Object.getOwnPropertyNames(npm.commands).forEach(function (n) { + if (npm.hasOwnProperty(n) || n === "config") return + + Object.defineProperty(npm, n, { get: function () { + return function () { + var args = Array.prototype.slice.call(arguments, 0) + , cb = defaultCb + + if (args.length === 1 && Array.isArray(args[0])) { + args = args[0] + } + + if (typeof args[args.length - 1] === "function") { + cb = args.pop() + } + + npm.commands[n](args, cb) + } + }, enumerable: false, configurable: true }) +}) + +if (require.main === module) { + require("../bin/npm-cli.js") +} +})() diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/outdated.js b/bin/nodejs0.10.47/node_modules/npm/lib/outdated.js new file mode 100644 index 00000000..ab1c3113 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/outdated.js @@ -0,0 +1,404 @@ +/* + +npm outdated [pkg] + +Does the following: + +1. check for a new version of pkg + +If no packages are specified, then run for all installed +packages. + +--parseable creates output like this: +::: + +*/ + +module.exports = outdated + +outdated.usage = "npm outdated [ [ ...]]" + +outdated.completion = require("./utils/completion/installed-deep.js") + + +var path = require("path") + , readJson = require("read-package-json") + , cache = require("./cache.js") + , asyncMap = require("slide").asyncMap + , npm = require("./npm.js") + , url = require("url") + , color = require("ansicolors") + , styles = require("ansistyles") + , table = require("text-table") + , semver = require("semver") + , os = require("os") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , readInstalled = require("read-installed") + , long = npm.config.get("long") + , log = require("npmlog") + +function outdated (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + var dir = path.resolve(npm.dir, "..") + + // default depth for `outdated` is 0 (cf. `ls`) + if (npm.config.get("depth") === Infinity) npm.config.set("depth", 0) + + outdated_(args, dir, {}, 0, function (er, list) { + if (!list) list = [] + if (er || silent || list.length === 0) return cb(er, list) + list.sort(function(a, b) { + var aa = a[1].toLowerCase() + , bb = b[1].toLowerCase() + return aa === bb ? 0 + : aa < bb ? -1 : 1 + }) + if (npm.config.get("json")) { + console.log(makeJSON(list)) + } else if (npm.config.get("parseable")) { + console.log(makeParseable(list)) + } else { + var outList = list.map(makePretty) + var outHead = [ "Package" + , "Current" + , "Wanted" + , "Latest" + , "Location" + ] + if (long) outHead.push("Package Type") + var outTable = [outHead].concat(outList) + + if (npm.color) { + outTable[0] = outTable[0].map(function(heading) { + return styles.underline(heading) + }) + } + + var tableOpts = { align: ["l", "r", "r", "r", "l"] + , stringLength: function(s) { return ansiTrim(s).length } + } + console.log(table(outTable, tableOpts)) + } + cb(null, list) + }) +} + +// [[ dir, dep, has, want, latest, type ]] +function makePretty (p) { + var dep = p[1] + , dir = path.resolve(p[0], "node_modules", dep) + , has = p[2] + , want = p[3] + , latest = p[4] + , type = p[6] + + if (!npm.config.get("global")) { + dir = path.relative(process.cwd(), dir) + } + + var columns = [ dep + , has || "MISSING" + , want + , latest + , dirToPrettyLocation(dir) + ] + if (long) columns[5] = type + + if (npm.color) { + columns[0] = color[has === want ? "yellow" : "red"](columns[0]) // dep + columns[2] = color.green(columns[2]) // want + columns[3] = color.magenta(columns[3]) // latest + columns[4] = color.brightBlack(columns[4]) // dir + if (long) columns[5] = color.brightBlack(columns[5]) // type + } + + return columns +} + +function ansiTrim (str) { + var r = new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|" + + "\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)", "g") + return str.replace(r, "") +} + +function dirToPrettyLocation (dir) { + return dir.replace(/^node_modules[/\\]/, "") + .replace(/[[/\\]node_modules[/\\]/g, " > ") +} + +function makeParseable (list) { + return list.map(function (p) { + + var dep = p[1] + , dir = path.resolve(p[0], "node_modules", dep) + , has = p[2] + , want = p[3] + , latest = p[4] + , type = p[6] + + var out = [ dir + , dep + "@" + want + , (has ? (dep + "@" + has) : "MISSING") + , dep + "@" + latest + ] + if (long) out.push(type) + + return out.join(":") + }).join(os.EOL) +} + +function makeJSON (list) { + var out = {} + list.forEach(function (p) { + var dir = path.resolve(p[0], "node_modules", p[1]) + if (!npm.config.get("global")) { + dir = path.relative(process.cwd(), dir) + } + out[p[1]] = { current: p[2] + , wanted: p[3] + , latest: p[4] + , location: dir + } + if (long) out[p[1]].type = p[6] + }) + return JSON.stringify(out, null, 2) +} + +function outdated_ (args, dir, parentHas, depth, cb) { + // get the deps from package.json, or {:"*"} + // asyncMap over deps: + // shouldHave = cache.add(dep, req).version + // if has === shouldHave then + // return outdated(args, dir/node_modules/dep, parentHas + has) + // else if dep in args or args is empty + // return [dir, dep, has, shouldHave] + + if (depth > npm.config.get("depth")) { + return cb(null, []) + } + var deps = null + var types = {} + readJson(path.resolve(dir, "package.json"), function (er, d) { + d = d || {} + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + deps = (er) ? true : (d.dependencies || {}) + if (!er) { + Object.keys(deps).forEach(function (k) { + types[k] = "dependencies" + }) + } + + if (npm.config.get("save-dev")) { + deps = d.devDependencies || {} + Object.keys(deps).forEach(function (k) { + types[k] = "devDependencies" + }) + + return next() + } + + if (npm.config.get("save")) { + // remove optional dependencies from dependencies during --save. + Object.keys(d.optionalDependencies || {}).forEach(function (k) { + delete deps[k] + }) + return next() + } + + if (npm.config.get("save-optional")) { + deps = d.optionalDependencies || {} + Object.keys(deps).forEach(function (k) { + types[k] = "optionalDependencies" + }) + return next() + } + + var doUpdate = npm.config.get("dev") || + (!npm.config.get("production") && + !Object.keys(parentHas).length && + !npm.config.get("global")) + + if (!er && d && doUpdate) { + Object.keys(d.devDependencies || {}).forEach(function (k) { + if (!(k in parentHas)) { + deps[k] = d.devDependencies[k] + types[k] = "devDependencies" + } + }) + } + return next() + }) + + var has = null + readInstalled(path.resolve(dir), { dev : true }, function (er, data) { + if (er) { + has = Object.create(parentHas) + return next() + } + var pkgs = Object.keys(data.dependencies) + pkgs = pkgs.filter(function (p) { + return !p.match(/^[\._-]/) + }) + asyncMap(pkgs, function (pkg, cb) { + var jsonFile = path.resolve(dir, "node_modules", pkg, "package.json") + readJson(jsonFile, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (d && d.name && d.private) delete deps[d.name] + cb(null, er ? [] : [[d.name, d.version, d._from]]) + }) + }, function (er, pvs) { + if (er) return cb(er) + has = Object.create(parentHas) + pvs.forEach(function (pv) { + has[pv[0]] = { + link: data.dependencies[pv[0]].link, + version: pv[1], + from: pv[2] + } + }) + + next() + }) + }) + + function next () { + if (!has || !deps) return + if (deps === true) { + deps = Object.keys(has).reduce(function (l, r) { + l[r] = "latest" + return l + }, {}) + } + + // now get what we should have, based on the dep. + // if has[dep] !== shouldHave[dep], then cb with the data + // otherwise dive into the folder + asyncMap(Object.keys(deps), function (dep, cb) { + if (!long) return shouldUpdate(args, dir, dep, has, deps[dep], depth, cb) + + shouldUpdate(args, dir, dep, has, deps[dep], depth, cb, types[dep]) + }, cb) + } +} + +function shouldUpdate (args, dir, dep, has, req, depth, cb, type) { + // look up the most recent version. + // if that's what we already have, or if it's not on the args list, + // then dive into it. Otherwise, cb() with the data. + + // { version: , from: } + var curr = has[dep] + + function skip (er) { + // show user that no viable version can be found + if (er) return cb(er) + outdated_( args + , path.resolve(dir, "node_modules", dep) + , has + , depth + 1 + , cb ) + } + + function doIt (wanted, latest) { + if (!long) { + return cb(null, [[ dir, dep, curr && curr.version, wanted, latest, req]]) + } + cb(null, [[ dir, dep, curr && curr.version, wanted, latest, req, type]]) + } + + if (args.length && args.indexOf(dep) === -1) return skip() + var parsed = npa(dep + '@' + req) + if (parsed.type === "git" || (parsed.hosted && parsed.hosted.type === "github")) { + return doIt("git", "git") + } + if (curr && curr.link) { + return doIt("linked", "linked") + } + + // search for the latest package + mapToRegistry(dep, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, updateDeps) + }) + + function updateLocalDeps (latestRegistryVersion) { + readJson(path.resolve(parsed.spec, 'package.json'), function (er, localDependency) { + if (er) return cb() + + var wanted = localDependency.version + var latest = localDependency.version + + if (latestRegistryVersion) { + latest = latestRegistryVersion + if (semver.lt(wanted, latestRegistryVersion)) { + wanted = latestRegistryVersion + req = dep + '@' + latest + } + } + + if (curr.version !== wanted) { + doIt(wanted, latest) + } else { + skip() + } + }) + } + + function updateDeps (er, d) { + if (er) { + if (parsed.type !== 'local') return cb(er) + return updateLocalDeps() + } + + if (!d || !d["dist-tags"] || !d.versions) return cb() + var l = d.versions[d["dist-tags"].latest] + if (!l) return cb() + + var r = req + if (d["dist-tags"][req]) + r = d["dist-tags"][req] + + if (semver.validRange(r, true)) { + // some kind of semver range. + // see if it's in the doc. + var vers = Object.keys(d.versions) + var v = semver.maxSatisfying(vers, r, true) + if (v) { + return onCacheAdd(null, d.versions[v]) + } + } + + // We didn't find the version in the doc. See if cache can find it. + cache.add(dep, req, null, false, onCacheAdd) + + function onCacheAdd(er, d) { + // if this fails, then it means we can't update this thing. + // it's probably a thing that isn't published. + if (er) { + if (er.code && er.code === "ETARGET") { + // no viable version found + return skip(er) + } + return skip() + } + + // check that the url origin hasn't changed (#1727) and that + // there is no newer version available + var dFromUrl = d._from && url.parse(d._from).protocol + var cFromUrl = curr && curr.from && url.parse(curr.from).protocol + + if (!curr || dFromUrl && cFromUrl && d._from !== curr.from + || d.version !== curr.version + || d.version !== l.version) { + if (parsed.type === 'local') return updateLocalDeps(l.version) + + doIt(d.version, l.version) + } + else { + skip() + } + } + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/owner.js b/bin/nodejs0.10.47/node_modules/npm/lib/owner.js new file mode 100644 index 00000000..b99c8f77 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/owner.js @@ -0,0 +1,254 @@ +module.exports = owner + +owner.usage = "npm owner add " + + "\nnpm owner rm " + + "\nnpm owner ls " + +var npm = require("./npm.js") + , log = require("npmlog") + , mapToRegistry = require("./utils/map-to-registry.js") + , readLocalPkg = require("./utils/read-local-package.js") + +owner.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length > 4) return cb() + if (argv.length <= 2) { + var subs = ["add", "rm"] + if (opts.partialWord === "l") subs.push("ls") + else subs.push("ls", "list") + return cb(null, subs) + } + + npm.commands.whoami([], true, function (er, username) { + if (er) return cb() + + var un = encodeURIComponent(username) + var byUser, theUser + switch (argv[2]) { + case "ls": + // FIXME: there used to be registry completion here, but it stopped + // making sense somewhere around 50,000 packages on the registry + return cb() + + case "rm": + if (argv.length > 3) { + theUser = encodeURIComponent(argv[3]) + byUser = "-/by-user/" + theUser + "|" + un + return mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + console.error(uri) + npm.registry.get(uri, { auth : auth }, function (er, d) { + if (er) return cb(er) + // return the intersection + return cb(null, d[theUser].filter(function (p) { + // kludge for server adminery. + return un === "isaacs" || d[un].indexOf(p) === -1 + })) + }) + }) + } + // else fallthrough + case "add": + if (argv.length > 3) { + theUser = encodeURIComponent(argv[3]) + byUser = "-/by-user/" + theUser + "|" + un + return mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + console.error(uri) + npm.registry.get(uri, { auth : auth }, function (er, d) { + console.error(uri, er || d) + // return mine that they're not already on. + if (er) return cb(er) + var mine = d[un] || [] + , theirs = d[theUser] || [] + return cb(null, mine.filter(function (p) { + return theirs.indexOf(p) === -1 + })) + }) + }) + } + // just list all users who aren't me. + return mapToRegistry("-/users", npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, list) { + if (er) return cb() + return cb(null, Object.keys(list).filter(function (n) { + return n !== un + })) + }) + }) + + default: + return cb() + } + }) +} + +function owner (args, cb) { + var action = args.shift() + switch (action) { + case "ls": case "list": return ls(args[0], cb) + case "add": return add(args[0], args[1], cb) + case "rm": case "remove": return rm(args[0], args[1], cb) + default: return unknown(action, cb) + } +} + +function ls (pkg, cb) { + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(owner.usage) + ls(pkg, cb) + }) + + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, data) { + var msg = "" + if (er) { + log.error("owner ls", "Couldn't get owner data", pkg) + return cb(er) + } + var owners = data.maintainers + if (!owners || !owners.length) msg = "admin party!" + else msg = owners.map(function (o) { + return o.name + " <" + o.email + ">" + }).join("\n") + console.log(msg) + cb(er, owners) + }) + }) +} + +function add (user, pkg, cb) { + if (!user) return cb(owner.usage) + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(new Error(owner.usage)) + add(user, pkg, cb) + }) + + log.verbose("owner add", "%s to %s", user, pkg) + mutate(pkg, user, function (u, owners) { + if (!owners) owners = [] + for (var i = 0, l = owners.length; i < l; i ++) { + var o = owners[i] + if (o.name === u.name) { + log.info( "owner add" + , "Already a package owner: " + o.name + " <" + o.email + ">") + return false + } + } + owners.push(u) + return owners + }, cb) +} + +function rm (user, pkg, cb) { + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(new Error(owner.usage)) + rm(user, pkg, cb) + }) + + log.verbose("owner rm", "%s from %s", user, pkg) + mutate(pkg, user, function (u, owners) { + var found = false + , m = owners.filter(function (o) { + var match = (o.name === user) + found = found || match + return !match + }) + if (!found) { + log.info("owner rm", "Not a package owner: " + user) + return false + } + if (!m.length) return new Error( + "Cannot remove all owners of a package. Add someone else first.") + return m + }, cb) +} + +function mutate (pkg, user, mutation, cb) { + if (user) { + var byUser = "-/user/org.couchdb.user:" + user + mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, mutate_) + }) + } else { + mutate_(null, null) + } + + function mutate_ (er, u) { + if (!er && user && (!u || u.error)) er = new Error( + "Couldn't get user data for " + user + ": " + JSON.stringify(u)) + + if (er) { + log.error("owner mutate", "Error getting user data for %s", user) + return cb(er) + } + + if (u) u = { "name" : u.name, "email" : u.email } + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, data) { + if (er) { + log.error("owner mutate", "Error getting package data for %s", pkg) + return cb(er) + } + + // save the number of maintainers before mutation so that we can figure + // out if maintainers were added or removed + var beforeMutation = data.maintainers.length + + var m = mutation(u, data.maintainers) + if (!m) return cb() // handled + if (m instanceof Error) return cb(m) // error + + data = { + _id : data._id, + _rev : data._rev, + maintainers : m + } + var dataPath = pkg.replace("/", "%2f") + "/-rev/" + data._rev + mapToRegistry(dataPath, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + method : "PUT", + body : data, + auth : auth + } + npm.registry.request(uri, params, function (er, data) { + if (!er && data.error) { + er = new Error("Failed to update package metadata: "+JSON.stringify(data)) + } + + if (er) { + log.error("owner mutate", "Failed to update package metadata") + } + else if (m.length > beforeMutation) { + console.log("+ %s (%s)", user, pkg) + } + else if (m.length < beforeMutation) { + console.log("- %s (%s)", user, pkg) + } + + cb(er, data) + }) + }) + }) + }) + } +} + +function unknown (action, cb) { + cb("Usage: \n" + owner.usage) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/pack.js b/bin/nodejs0.10.47/node_modules/npm/lib/pack.js new file mode 100644 index 00000000..532f7c5a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/pack.js @@ -0,0 +1,69 @@ +// npm pack +// Packs the specified package into a .tgz file, which can then +// be installed. + +module.exports = pack + +var npm = require("./npm.js") + , install = require("./install.js") + , cache = require("./cache.js") + , fs = require("graceful-fs") + , chain = require("slide").chain + , path = require("path") + , cwd = process.cwd() + , writeStreamAtomic = require('fs-write-stream-atomic') + , cachedPackageRoot = require("./cache/cached-package-root.js") + +pack.usage = "npm pack " + +// if it can be installed, it can be packed. +pack.completion = install.completion + +function pack (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + if (args.length === 0) args = ["."] + + chain(args.map(function (arg) { return function (cb) { + pack_(arg, cb) + }}), function (er, files) { + if (er || silent) return cb(er, files) + printFiles(files, cb) + }) +} + +function printFiles (files, cb) { + files = files.map(function (file) { + return path.relative(cwd, file) + }) + console.log(files.join("\n")) + cb() +} + +// add to cache, then cp to the cwd +function pack_ (pkg, cb) { + cache.add(pkg, null, null, false, function (er, data) { + if (er) return cb(er) + + // scoped packages get special treatment + var name = data.name + if (name[0] === "@") name = name.substr(1).replace(/\//g, "-") + var fname = name + "-" + data.version + ".tgz" + + var cached = path.join(cachedPackageRoot(data), "package.tgz") + , from = fs.createReadStream(cached) + , to = writeStreamAtomic(fname) + , errState = null + + from.on("error", cb_) + to.on("error", cb_) + to.on("close", cb_) + from.pipe(to) + + function cb_ (er) { + if (errState) return + if (er) return cb(errState = er) + cb(null, fname) + } + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/ping.js b/bin/nodejs0.10.47/node_modules/npm/lib/ping.js new file mode 100644 index 00000000..90639598 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/ping.js @@ -0,0 +1,20 @@ +var npm = require('./npm.js') + +module.exports = ping + +ping.usage = 'npm ping\nping registry' + +function ping (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + var registry = npm.config.get('registry') + if (!registry) return cb(new Error('no default registry set')) + var auth = npm.config.getCredentialsByURI(registry) + + npm.registry.ping(registry, {auth: auth}, function (er, pong) { + if (!silent) console.log(JSON.stringify(pong)) + cb(er, er ? null : pong) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/prefix.js b/bin/nodejs0.10.47/node_modules/npm/lib/prefix.js new file mode 100644 index 00000000..83d6ad1f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/prefix.js @@ -0,0 +1,11 @@ +module.exports = prefix + +var npm = require("./npm.js") + +prefix.usage = "npm prefix\nnpm prefix -g\n(just prints the prefix folder)" + +function prefix (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + if (!silent) console.log(npm.prefix) + process.nextTick(cb.bind(this, null, npm.prefix)) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/prune.js b/bin/nodejs0.10.47/node_modules/npm/lib/prune.js new file mode 100644 index 00000000..7bfe7680 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/prune.js @@ -0,0 +1,56 @@ +// prune extraneous packages. + +module.exports = prune + +prune.usage = "npm prune" + +var readInstalled = require("read-installed") + , npm = require("./npm.js") + , path = require("path") + , readJson = require("read-package-json") + , log = require("npmlog") + +prune.completion = require("./utils/completion/installed-deep.js") + +function prune (args, cb) { + //check if is a valid package.json file + var jsonFile = path.resolve(npm.dir, "..", "package.json" ) + readJson(jsonFile, log.warn, function (er) { + if (er) return cb(er) + next() + }) + + function next() { + var opt = { + depth: npm.config.get("depth"), + dev: !npm.config.get("production") || npm.config.get("dev") + } + readInstalled(npm.prefix, opt, function (er, data) { + if (er) return cb(er) + prune_(args, data, cb) + }) + } +} + +function prune_ (args, data, cb) { + npm.commands.unbuild(prunables(args, data, []), cb) +} + +function prunables (args, data, seen) { + var deps = data.dependencies || {} + return Object.keys(deps).map(function (d) { + if (typeof deps[d] !== "object" + || seen.indexOf(deps[d]) !== -1) return null + seen.push(deps[d]) + if (deps[d].extraneous + && (args.length === 0 || args.indexOf(d) !== -1)) { + var extra = deps[d] + delete deps[d] + return extra.path + } + return prunables(args, deps[d], seen) + }).filter(function (d) { return d !== null }) + .reduce(function FLAT (l, r) { + return l.concat(Array.isArray(r) ? r.reduce(FLAT,[]) : r) + }, []) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/publish.js b/bin/nodejs0.10.47/node_modules/npm/lib/publish.js new file mode 100644 index 00000000..af56a748 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/publish.js @@ -0,0 +1,151 @@ + +module.exports = publish + +var npm = require("./npm.js") + , log = require("npmlog") + , path = require("path") + , readJson = require("read-package-json") + , lifecycle = require("./utils/lifecycle.js") + , chain = require("slide").chain + , mapToRegistry = require("./utils/map-to-registry.js") + , cachedPackageRoot = require("./cache/cached-package-root.js") + , createReadStream = require("graceful-fs").createReadStream + , npa = require("npm-package-arg") + , semver = require('semver') + , getPublishConfig = require("./utils/get-publish-config.js") + +publish.usage = "npm publish [--tag ]" + + "\nnpm publish [--tag ]" + + "\n\nPublishes '.' if no argument supplied" + + "\n\nSets tag `latest` if no --tag specified" + +publish.completion = function (opts, cb) { + // publish can complete to a folder with a package.json + // or a tarball, or a tarball url. + // for now, not yet implemented. + return cb() +} + +function publish (args, isRetry, cb) { + if (typeof cb !== "function") { + cb = isRetry + isRetry = false + } + if (args.length === 0) args = ["."] + if (args.length !== 1) return cb(publish.usage) + + log.verbose("publish", args) + + var t = npm.config.get('tag').trim() + if (semver.validRange(t)) { + var er = new Error("Tag name must not be a valid SemVer range: " + t) + return cb(er) + } + + var arg = args[0] + // if it's a local folder, then run the prepublish there, first. + readJson(path.resolve(arg, "package.json"), function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + + if (data) { + if (!data.name) return cb(new Error("No name provided")) + if (!data.version) return cb(new Error("No version provided")) + } + + // Error is OK. Could be publishing a URL or tarball, however, that means + // that we will not have automatically run the prepublish script, since + // that gets run when adding a folder to the cache. + if (er) return cacheAddPublish(arg, false, isRetry, cb) + else cacheAddPublish(arg, true, isRetry, cb) + }) +} + +// didPre in this case means that we already ran the prepublish script, +// and that the "dir" is an actual directory, and not something silly +// like a tarball or name@version thing. +// That means that we can run publish/postpublish in the dir, rather than +// in the cache dir. +function cacheAddPublish (dir, didPre, isRetry, cb) { + npm.commands.cache.add(dir, null, null, false, function (er, data) { + if (er) return cb(er) + log.silly("publish", data) + var cachedir = path.resolve(cachedPackageRoot(data), "package") + chain([ !didPre && + [lifecycle, data, "prepublish", cachedir] + , [publish_, dir, data, isRetry, cachedir] + , [lifecycle, data, "publish", didPre ? dir : cachedir] + , [lifecycle, data, "postpublish", didPre ? dir : cachedir] ] + , cb ) + }) +} + +function publish_ (arg, data, isRetry, cachedir, cb) { + if (!data) return cb(new Error("no package.json file found")) + + var mappedConfig = getPublishConfig( + data.publishConfig, + npm.config, + npm.registry + ) + var config = mappedConfig.config + var registry = mappedConfig.client + + data._npmVersion = npm.version + data._nodeVersion = process.versions.node + + delete data.modules + if (data.private) return cb( + new Error( + "This package has been marked as private\n" + + "Remove the 'private' field from the package.json to publish it." + ) + ) + + mapToRegistry(data.name, config, function (er, registryURI, auth, registryBase) { + if (er) return cb(er) + + var tarballPath = cachedir + ".tgz" + + // we just want the base registry URL in this case + log.verbose("publish", "registryBase", registryBase) + log.silly("publish", "uploading", tarballPath) + + data._npmUser = { + name : auth.username, + email : auth.email + } + + var params = { + metadata : data, + body : createReadStream(tarballPath), + auth : auth + } + + // registry-frontdoor cares about the access level, which is only + // configurable for scoped packages + if (config.get("access")) { + if (!npa(data.name).scope && config.get("access") === "restricted") { + return cb(new Error("Can't restrict access to unscoped packages.")) + } + + params.access = config.get("access") + } + + registry.publish(registryBase, params, function (er) { + if (er && er.code === "EPUBLISHCONFLICT" && + npm.config.get("force") && !isRetry) { + log.warn("publish", "Forced publish over " + data._id) + return npm.commands.unpublish([data._id], function (er) { + // ignore errors. Use the force. Reach out with your feelings. + // but if it fails again, then report the first error. + publish([arg], er || true, cb) + }) + } + // report the unpublish error if this was a retry and unpublish failed + if (er && isRetry && isRetry !== true) return cb(isRetry) + if (er) return cb(er) + console.log("+ " + data._id) + cb() + }) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/rebuild.js b/bin/nodejs0.10.47/node_modules/npm/lib/rebuild.js new file mode 100644 index 00000000..c6b45e55 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/rebuild.js @@ -0,0 +1,73 @@ + +module.exports = rebuild + +var readInstalled = require("read-installed") + , semver = require("semver") + , log = require("npmlog") + , npm = require("./npm.js") + , npa = require("npm-package-arg") + +rebuild.usage = "npm rebuild [[@] [name[@] ...]]" + +rebuild.completion = require("./utils/completion/installed-deep.js") + +function rebuild (args, cb) { + var opt = { depth: npm.config.get("depth"), dev: true } + readInstalled(npm.prefix, opt, function (er, data) { + log.info("readInstalled", typeof data) + if (er) return cb(er) + var set = filter(data, args) + , folders = Object.keys(set).filter(function (f) { + return f !== npm.prefix + }) + if (!folders.length) return cb() + log.silly("rebuild set", folders) + cleanBuild(folders, set, cb) + }) +} + +function cleanBuild (folders, set, cb) { + npm.commands.build(folders, function (er) { + if (er) return cb(er) + console.log(folders.map(function (f) { + return set[f] + " " + f + }).join("\n")) + cb() + }) +} + +function filter (data, args, set, seen) { + if (!set) set = {} + if (!seen) seen = {} + if (set.hasOwnProperty(data.path)) return set + if (seen.hasOwnProperty(data.path)) return set + seen[data.path] = true + var pass + if (!args.length) pass = true // rebuild everything + else if (data.name && data._id) { + for (var i = 0, l = args.length; i < l; i ++) { + var arg = args[i] + , nv = npa(arg) + , n = nv.name + , v = nv.rawSpec + if (n !== data.name) continue + if (!semver.satisfies(data.version, v, true)) continue + pass = true + break + } + } + if (pass && data._id) { + log.verbose("rebuild", "path, id", [data.path, data._id]) + set[data.path] = data._id + } + // need to also dive through kids, always. + // since this isn't an install these won't get auto-built unless + // they're not dependencies. + Object.keys(data.dependencies || {}).forEach(function (d) { + // return + var dep = data.dependencies[d] + if (typeof dep === "string") return + filter(dep, args, set, seen) + }) + return set +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/repo.js b/bin/nodejs0.10.47/node_modules/npm/lib/repo.js new file mode 100644 index 00000000..9aaa2e93 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/repo.js @@ -0,0 +1,78 @@ + +module.exports = repo + +repo.usage = "npm repo " + +var npm = require("./npm.js") + , opener = require("opener") + , github = require("github-url-from-git") + , githubUserRepo = require("github-url-from-username-repo") + , path = require("path") + , readJson = require("read-package-json") + , fs = require("fs") + , url_ = require("url") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + +repo.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function repo (args, cb) { + var n = args.length && npa(args[0]).name || "." + fs.stat(n, function (er, s) { + if (er && er.code === "ENOENT") return callRegistry(n, cb) + else if (er) return cb(er) + if (!s.isDirectory()) return callRegistry(n, cb) + readJson(path.resolve(n, "package.json"), function (er, d) { + if (er) return cb(er) + getUrlAndOpen(d, cb) + }) + }) +} + +function getUrlAndOpen (d, cb) { + var r = d.repository + if (!r) return cb(new Error("no repository")) + // XXX remove this when npm@v1.3.10 from node 0.10 is deprecated + // from https://github.com/npm/npm-www/issues/418 + if (githubUserRepo(r.url)) + r.url = githubUserRepo(r.url) + + var url = (r.url && ~r.url.indexOf("github")) + ? github(r.url) + : nonGithubUrl(r.url) + + if (!url) + return cb(new Error("no repository: could not get url")) + opener(url, { command: npm.config.get("browser") }, cb) +} + +function callRegistry (n, cb) { + mapToRegistry(n, npm.config, function (er, uri) { + if (er) return cb(er) + + npm.registry.get(uri + "/latest", { timeout : 3600 }, function (er, d) { + if (er) return cb(er) + getUrlAndOpen(d, cb) + }) + }) +} + +function nonGithubUrl (url) { + try { + var idx = url.indexOf("@") + if (idx !== -1) { + url = url.slice(idx+1).replace(/:([^\d]+)/, "/$1") + } + url = url_.parse(url) + var protocol = url.protocol === "https:" + ? "https:" + : "http:" + return protocol + "//" + (url.host || "") + + url.path.replace(/\.git$/, "") + } + catch(e) {} +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/restart.js b/bin/nodejs0.10.47/node_modules/npm/lib/restart.js new file mode 100644 index 00000000..ea06e687 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/restart.js @@ -0,0 +1 @@ +module.exports = require("./utils/lifecycle.js").cmd("restart") diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/root.js b/bin/nodejs0.10.47/node_modules/npm/lib/root.js new file mode 100644 index 00000000..a7a0645a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/root.js @@ -0,0 +1,11 @@ +module.exports = root + +var npm = require("./npm.js") + +root.usage = "npm root\nnpm root -g\n(just prints the root folder)" + +function root (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + if (!silent) console.log(npm.dir) + process.nextTick(cb.bind(this, null, npm.dir)) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/run-script.js b/bin/nodejs0.10.47/node_modules/npm/lib/run-script.js new file mode 100644 index 00000000..1c1d9be9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/run-script.js @@ -0,0 +1,172 @@ +module.exports = runScript + +var lifecycle = require("./utils/lifecycle.js") + , npm = require("./npm.js") + , path = require("path") + , readJson = require("read-package-json") + , log = require("npmlog") + , chain = require("slide").chain + +runScript.usage = "npm run-script [-- ]" + +runScript.completion = function (opts, cb) { + + // see if there's already a package specified. + var argv = opts.conf.argv.remain + + if (argv.length >= 4) return cb() + + if (argv.length === 3) { + // either specified a script locally, in which case, done, + // or a package, in which case, complete against its scripts + var json = path.join(npm.localPrefix, "package.json") + return readJson(json, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) d = {} + var scripts = Object.keys(d.scripts || {}) + console.error("local scripts", scripts) + if (scripts.indexOf(argv[2]) !== -1) return cb() + // ok, try to find out which package it was, then + var pref = npm.config.get("global") ? npm.config.get("prefix") + : npm.localPrefix + var pkgDir = path.resolve( pref, "node_modules" + , argv[2], "package.json" ) + readJson(pkgDir, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) d = {} + var scripts = Object.keys(d.scripts || {}) + return cb(null, scripts) + }) + }) + } + + readJson(path.join(npm.localPrefix, "package.json"), function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + d = d || {} + cb(null, Object.keys(d.scripts || {})) + }) +} + +function runScript (args, cb) { + if (!args.length) return list(cb) + + var pkgdir = npm.localPrefix + , cmd = args.shift() + + readJson(path.resolve(pkgdir, "package.json"), function (er, d) { + if (er) return cb(er) + run(d, pkgdir, cmd, args, cb) + }) +} + +function list(cb) { + var json = path.join(npm.localPrefix, "package.json") + var cmdList = [ "publish", "install", "uninstall" + , "test", "stop", "start", "restart", "version" + ].reduce(function (l, p) { + return l.concat(["pre" + p, p, "post" + p]) + }, []) + return readJson(json, function(er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) d = {} + var allScripts = Object.keys(d.scripts || {}) + var scripts = [] + var runScripts = [] + allScripts.forEach(function (script) { + if (cmdList.indexOf(script) !== -1) scripts.push(script) + else runScripts.push(script) + }) + + if (log.level === "silent") { + return cb(null, allScripts) + } + + if (npm.config.get("json")) { + console.log(JSON.stringify(d.scripts || {}, null, 2)) + return cb(null, allScripts) + } + + if (npm.config.get("parseable")) { + allScripts.forEach(function(script) { + console.log(script + ":" + d.scripts[script]) + }) + return cb(null, allScripts) + } + + var s = "\n " + var prefix = " " + if (scripts.length) { + console.log("Lifecycle scripts included in %s:", d.name) + } + scripts.forEach(function(script) { + console.log(prefix + script + s + d.scripts[script]) + }) + if (!scripts.length && runScripts.length) { + console.log("Scripts available in %s via `npm run-script`:", d.name) + } + else if (runScripts.length) { + console.log("\navailable via `npm run-script`:") + } + runScripts.forEach(function(script) { + console.log(prefix + script + s + d.scripts[script]) + }) + return cb(null, allScripts) + }) +} + +function run (pkg, wd, cmd, args, cb) { + if (!pkg.scripts) pkg.scripts = {} + + var cmds + if (cmd === "restart" && !pkg.scripts.restart) { + cmds = [ + "prestop", "stop", "poststop", + "restart", + "prestart", "start", "poststart" + ] + } else { + if (!pkg.scripts[cmd]) { + if (cmd === "test") { + pkg.scripts.test = "echo \"Error: no test specified\"" + } else if (cmd === "env") { + if (process.platform === "win32") { + log.verbose("run-script using default platform env: SET (Windows)") + pkg.scripts[cmd] = "SET" + } else { + log.verbose("run-script using default platform env: env (Unix)") + pkg.scripts[cmd] = "env" + } + } else if (npm.config.get("if-present")) { + return cb(null); + } else { + return cb(new Error("missing script: " + cmd)) + } + } + cmds = [cmd] + } + + if (!cmd.match(/^(pre|post)/)) { + cmds = ["pre"+cmd].concat(cmds).concat("post"+cmd) + } + + log.verbose("run-script", cmds) + chain(cmds.map(function (c) { + // pass cli arguments after -- to script. + if (pkg.scripts[c] && c === cmd) { + pkg.scripts[c] = pkg.scripts[c] + joinArgs(args) + } + + // when running scripts explicitly, assume that they're trusted. + return [lifecycle, pkg, c, wd, true] + }), cb) +} + +// join arguments after '--' and pass them to script, +// handle special characters such as ', ", ' '. +function joinArgs (args) { + var joinedArgs = "" + args.forEach(function(arg) { + joinedArgs += ' "' + arg.replace(/"/g, '\\"') + '"' + }) + return joinedArgs +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/search.js b/bin/nodejs0.10.47/node_modules/npm/lib/search.js new file mode 100644 index 00000000..e60091cd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/search.js @@ -0,0 +1,269 @@ + +module.exports = exports = search + +var npm = require("./npm.js") + , columnify = require("columnify") + , updateIndex = require("./cache/update-index.js") + +search.usage = "npm search [some search terms ...]" + +search.completion = function (opts, cb) { + var compl = {} + , partial = opts.partialWord + , ipartial = partial.toLowerCase() + , plen = partial.length + + // get the batch of data that matches so far. + // this is an example of using npm.commands.search programmatically + // to fetch data that has been filtered by a set of arguments. + search(opts.conf.argv.remain.slice(2), true, function (er, data) { + if (er) return cb(er) + Object.keys(data).forEach(function (name) { + data[name].words.split(" ").forEach(function (w) { + if (w.toLowerCase().indexOf(ipartial) === 0) { + compl[partial + w.substr(plen)] = true + } + }) + }) + cb(null, Object.keys(compl)) + }) +} + +function search (args, silent, staleness, cb) { + if (typeof cb !== "function") cb = staleness, staleness = 600 + if (typeof cb !== "function") cb = silent, silent = false + + var searchopts = npm.config.get("searchopts") + var searchexclude = npm.config.get("searchexclude") + + if (typeof searchopts !== "string") searchopts = "" + searchopts = searchopts.split(/\s+/) + var opts = searchopts.concat(args).map(function (s) { + return s.toLowerCase() + }).filter(function (s) { return s }) + + if (typeof searchexclude === "string") { + searchexclude = searchexclude.split(/\s+/) + } else { + searchexclude = [] + } + searchexclude = searchexclude.map(function (s) { + return s.toLowerCase() + }) + + getFilteredData(staleness, opts, searchexclude, function (er, data) { + // now data is the list of data that we want to show. + // prettify and print it, and then provide the raw + // data to the cb. + if (er || silent) return cb(er, data) + console.log(prettify(data, args)) + cb(null, data) + }) +} + +function getFilteredData (staleness, args, notArgs, cb) { + updateIndex(staleness, function (er, data) { + if (er) return cb(er) + return cb(null, filter(data, args, notArgs)) + }) +} + +function filter (data, args, notArgs) { + // data={:{package data}} + return Object.keys(data).map(function (d) { + return data[d] + }).filter(function (d) { + return typeof d === "object" + }).map(stripData).map(getWords).filter(function (data) { + return filterWords(data, args, notArgs) + }).reduce(function (l, r) { + l[r.name] = r + return l + }, {}) +} + +function stripData (data) { + return { name: data.name + , description: npm.config.get("description") ? data.description : "" + , maintainers: (data.maintainers || []).map(function (m) { + return "=" + m.name + }) + , url: !Object.keys(data.versions || {}).length ? data.url : null + , keywords: data.keywords || [] + , version: Object.keys(data.versions || {})[0] || [] + , time: data.time + && data.time.modified + && (new Date(data.time.modified).toISOString() + .split("T").join(" ") + .replace(/:[0-9]{2}\.[0-9]{3}Z$/, "")) + .slice(0, -5) // remove time + || "prehistoric" + } +} + +function getWords (data) { + data.words = [ data.name ] + .concat(data.description) + .concat(data.maintainers) + .concat(data.url && ("<" + data.url + ">")) + .concat(data.keywords) + .map(function (f) { return f && f.trim && f.trim() }) + .filter(function (f) { return f }) + .join(" ") + .toLowerCase() + return data +} + +function filterWords (data, args, notArgs) { + var words = data.words + for (var i = 0, l = args.length; i < l; i ++) { + if (!match(words, args[i])) return false + } + for (i = 0, l = notArgs.length; i < l; i ++) { + if (match(words, notArgs[i])) return false + } + return true +} + +function match (words, arg) { + if (arg.charAt(0) === "/") { + arg = arg.replace(/\/$/, "") + arg = new RegExp(arg.substr(1, arg.length - 1)) + return words.match(arg) + } + return words.indexOf(arg) !== -1 +} + +function prettify (data, args) { + var searchsort = (npm.config.get("searchsort") || "NAME").toLowerCase() + , sortField = searchsort.replace(/^\-+/, "") + , searchRev = searchsort.charAt(0) === "-" + , truncate = !npm.config.get("long") + + if (Object.keys(data).length === 0) { + return "No match found for "+(args.map(JSON.stringify).join(" ")) + } + + var lines = Object.keys(data).map(function (d) { + // strip keyname + return data[d] + }).map(function(dat) { + dat.author = dat.maintainers + delete dat.maintainers + dat.date = dat.time + delete dat.time + return dat + }).map(function(dat) { + // split keywords on whitespace or , + if (typeof dat.keywords === "string") { + dat.keywords = dat.keywords.split(/[,\s]+/) + } + if (Array.isArray(dat.keywords)) { + dat.keywords = dat.keywords.join(" ") + } + + // split author on whitespace or , + if (typeof dat.author === "string") { + dat.author = dat.author.split(/[,\s]+/) + } + if (Array.isArray(dat.author)) { + dat.author = dat.author.join(" ") + } + return dat + }) + + lines.sort(function(a, b) { + var aa = a[sortField].toLowerCase() + , bb = b[sortField].toLowerCase() + return aa === bb ? 0 + : aa < bb ? -1 : 1 + }) + + if (searchRev) lines.reverse() + + var columns = npm.config.get("description") + ? ["name", "description", "author", "date", "version", "keywords"] + : ["name", "author", "date", "version", "keywords"] + + var output = columnify(lines, { + include: columns + , truncate: truncate + , config: { + name: { maxWidth: 40, truncate: false, truncateMarker: "" } + , description: { maxWidth: 60 } + , author: { maxWidth: 20 } + , date: { maxWidth: 11 } + , version: { maxWidth: 11 } + , keywords: { maxWidth: Infinity } + } + }) + output = trimToMaxWidth(output) + output = highlightSearchTerms(output, args) + + return output +} + +var colors = [31, 33, 32, 36, 34, 35 ] + , cl = colors.length + +function addColorMarker (str, arg, i) { + var m = i % cl + 1 + , markStart = String.fromCharCode(m) + , markEnd = String.fromCharCode(0) + + if (arg.charAt(0) === "/") { + //arg = arg.replace(/\/$/, "") + return str.replace( new RegExp(arg.substr(1, arg.length - 2), "gi") + , function (bit) { return markStart + bit + markEnd } ) + + } + + // just a normal string, do the split/map thing + var pieces = str.toLowerCase().split(arg.toLowerCase()) + , p = 0 + + return pieces.map(function (piece) { + piece = str.substr(p, piece.length) + var mark = markStart + + str.substr(p+piece.length, arg.length) + + markEnd + p += piece.length + arg.length + return piece + mark + }).join("") +} + +function colorize (line) { + for (var i = 0; i < cl; i ++) { + var m = i + 1 + var color = npm.color ? "\033["+colors[i]+"m" : "" + line = line.split(String.fromCharCode(m)).join(color) + } + var uncolor = npm.color ? "\033[0m" : "" + return line.split("\u0000").join(uncolor) +} + +function getMaxWidth() { + var cols + try { + var tty = require("tty") + , stdout = process.stdout + cols = !tty.isatty(stdout.fd) ? Infinity : process.stdout.getWindowSize()[0] + cols = (cols === 0) ? Infinity : cols + } catch (ex) { cols = Infinity } + return cols +} + +function trimToMaxWidth(str) { + var maxWidth = getMaxWidth() + return str.split("\n").map(function(line) { + return line.slice(0, maxWidth) + }).join("\n") +} + +function highlightSearchTerms(str, terms) { + terms.forEach(function (arg, i) { + str = addColorMarker(str, arg, i) + }) + + return colorize(str).trim() +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/set.js b/bin/nodejs0.10.47/node_modules/npm/lib/set.js new file mode 100644 index 00000000..8bd8a857 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/set.js @@ -0,0 +1,13 @@ + +module.exports = set + +set.usage = "npm set (See `npm config`)" + +var npm = require("./npm.js") + +set.completion = npm.commands.config.completion + +function set (args, cb) { + if (!args.length) return cb(set.usage) + npm.commands.config(["set"].concat(args), cb) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/shrinkwrap.js b/bin/nodejs0.10.47/node_modules/npm/lib/shrinkwrap.js new file mode 100644 index 00000000..210e3ee0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/shrinkwrap.js @@ -0,0 +1,86 @@ +// emit JSON describing versions of all packages currently installed (for later +// use with shrinkwrap install) + +module.exports = exports = shrinkwrap + +var npm = require("./npm.js") + , log = require("npmlog") + , fs = require("fs") + , writeFileAtomic = require("write-file-atomic") + , path = require("path") + , readJson = require("read-package-json") + , sortedObject = require("sorted-object") + +shrinkwrap.usage = "npm shrinkwrap" + +function shrinkwrap (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + if (args.length) { + log.warn("shrinkwrap", "doesn't take positional args") + } + + // https://github.com/npm/npm/issues/7641 + // introduced because `npm ls` can now show dev and prod depenednecy + // trees separately + if (npm.config.get("dev")) { + npm.config.set("production", true) + } + npm.commands.ls([], true, function (er, _, pkginfo) { + if (er) return cb(er) + shrinkwrap_(pkginfo, silent, npm.config.get("dev"), cb) + }) +} + +function shrinkwrap_ (pkginfo, silent, dev, cb) { + if (pkginfo.problems) { + return cb(new Error("Problems were encountered\n" + +"Please correct and try again.\n" + +pkginfo.problems.join("\n"))) + } + + if (!dev) { + // remove dev deps unless the user does --dev + readJson(path.resolve(npm.prefix, "package.json"), function (er, data) { + if (er) + return cb(er) + if (data.devDependencies) { + Object.keys(data.devDependencies).forEach(function (dep) { + if (data.dependencies && data.dependencies[dep]) { + // do not exclude the dev dependency if it's also listed as a dependency + return + } + + log.warn("shrinkwrap", "Excluding devDependency: %s", dep, data.dependencies) + delete pkginfo.dependencies[dep] + }) + } + save(pkginfo, silent, cb) + }) + } else { + save(pkginfo, silent, cb) + } +} + + +function save (pkginfo, silent, cb) { + // copy the keys over in a well defined order + // because javascript objects serialize arbitrarily + pkginfo.dependencies = sortedObject(pkginfo.dependencies || {}) + var swdata + try { + swdata = JSON.stringify(pkginfo, null, 2) + "\n" + } catch (er) { + log.error("shrinkwrap", "Error converting package info to json") + return cb(er) + } + + var file = path.resolve(npm.prefix, "npm-shrinkwrap.json") + + writeFileAtomic(file, swdata, function (er) { + if (er) return cb(er) + if (silent) return cb(null, pkginfo) + console.log("wrote npm-shrinkwrap.json") + cb(null, pkginfo) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/star.js b/bin/nodejs0.10.47/node_modules/npm/lib/star.js new file mode 100644 index 00000000..03620e6b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/star.js @@ -0,0 +1,41 @@ + +module.exports = star + +var npm = require("./npm.js") + , log = require("npmlog") + , asyncMap = require("slide").asyncMap + , mapToRegistry = require("./utils/map-to-registry.js") + +star.usage = "npm star [pkg, pkg, ...]\n" + + "npm unstar [pkg, pkg, ...]" + +star.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function star (args, cb) { + if (!args.length) return cb(star.usage) + var s = npm.config.get("unicode") ? "\u2605 " : "(*)" + , u = npm.config.get("unicode") ? "\u2606 " : "( )" + , using = !(npm.command.match(/^un/)) + if (!using) s = u + asyncMap(args, function (pkg, cb) { + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + starred : using, + auth : auth + } + npm.registry.star(uri, params, function (er, data, raw, req) { + if (!er) { + console.log(s + " "+pkg) + log.verbose("star", data) + } + cb(er, data, raw, req) + }) + }) + }, cb) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/stars.js b/bin/nodejs0.10.47/node_modules/npm/lib/stars.js new file mode 100644 index 00000000..9307d6ce --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/stars.js @@ -0,0 +1,46 @@ +module.exports = stars + +stars.usage = "npm stars [username]" + +var npm = require("./npm.js") + , log = require("npmlog") + , mapToRegistry = require("./utils/map-to-registry.js") + +function stars (args, cb) { + npm.commands.whoami([], true, function (er, username) { + var name = args.length === 1 ? args[0] : username + + if (er) { + if (er.code === 'ENEEDAUTH' && !name) { + var needAuth = new Error("'npm stars' on your own user account requires auth") + needAuth.code = 'ENEEDAUTH' + return cb(needAuth) + } + + if (er.code !== 'ENEEDAUTH') return cb(er) + } + + mapToRegistry("", npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + username : name, + auth : auth + } + npm.registry.stars(uri, params, showstars) + }) + }) + + function showstars (er, data) { + if (er) return cb(er) + + if (data.rows.length === 0) { + log.warn("stars", "user has not starred any packages.") + } else { + data.rows.forEach(function(a) { + console.log(a.value) + }) + } + cb() + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/start.js b/bin/nodejs0.10.47/node_modules/npm/lib/start.js new file mode 100644 index 00000000..c2093f7a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/start.js @@ -0,0 +1 @@ +module.exports = require("./utils/lifecycle.js").cmd("start") diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/stop.js b/bin/nodejs0.10.47/node_modules/npm/lib/stop.js new file mode 100644 index 00000000..f3af33e7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/stop.js @@ -0,0 +1 @@ +module.exports = require("./utils/lifecycle.js").cmd("stop") diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/substack.js b/bin/nodejs0.10.47/node_modules/npm/lib/substack.js new file mode 100644 index 00000000..e8fd3d24 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/substack.js @@ -0,0 +1,20 @@ +module.exports = substack +var npm = require("./npm.js") + +var isms = + [ "\033[32mbeep \033[35mboop\033[m" + , "Replace your configs with services" + , "SEPARATE ALL THE CONCERNS!" + , "MODULE ALL THE THINGS!" + , "\\o/" + , "but first, burritos" + , "full time mad scientist here" + , "c/,,\\" ] + +function substack (args, cb) { + var i = Math.floor(Math.random() * isms.length) + console.log(isms[i]) + var c = args.shift() + if (c) npm.commands[c](args, cb) + else cb() +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/tag.js b/bin/nodejs0.10.47/node_modules/npm/lib/tag.js new file mode 100644 index 00000000..6a958179 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/tag.js @@ -0,0 +1,41 @@ +// turns out tagging isn't very complicated +// all the smarts are in the couch. +module.exports = tag +tag.usage = "npm tag @ []" + +tag.completion = require("./unpublish.js").completion + +var npm = require("./npm.js") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , semver = require("semver") + , log = require("npmlog") + +function tag (args, cb) { + var thing = npa(args.shift() || "") + , project = thing.name + , version = thing.rawSpec + , t = args.shift() || npm.config.get("tag") + + t = t.trim() + + if (!project || !version || !t) return cb("Usage:\n"+tag.usage) + + if (semver.validRange(t)) { + var er = new Error("Tag name must not be a valid SemVer range: " + t) + return cb(er) + } + + log.warn("tag", "This command is deprecated. Use `npm dist-tag` instead.") + + mapToRegistry(project, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version : version, + tag : t, + auth : auth + } + npm.registry.tag(uri, params, cb) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/team.js b/bin/nodejs0.10.47/node_modules/npm/lib/team.js new file mode 100644 index 00000000..221e01bf --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/team.js @@ -0,0 +1,54 @@ +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm') + +module.exports = team + +team.subcommands = ['create', 'destroy', 'add', 'rm', 'ls', 'edit'] + +team.usage = + 'npm team create \n' + + 'npm team destroy \n' + + 'npm team add \n' + + 'npm team rm \n' + + 'npm team ls |\n' + + 'npm team edit ' + +team.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, team.subcommands) + } + switch (argv[2]) { + case 'ls': + case 'create': + case 'destroy': + case 'add': + case 'rm': + case 'edit': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function team (args, cb) { + // Entities are in the format : + var cmd = args.shift() + var entity = (args.shift() || '').split(':') + return mapToRegistry('/', npm.config, function (err, uri, auth) { + if (err) { return cb(err) } + try { + return npm.registry.team(cmd, uri, { + auth: auth, + scope: entity[0], + team: entity[1], + user: args.shift() + }, function (err, data) { + !err && data && console.log(JSON.stringify(data, undefined, 2)) + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + team.usage) + } + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/test.js b/bin/nodejs0.10.47/node_modules/npm/lib/test.js new file mode 100644 index 00000000..bb86d113 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/test.js @@ -0,0 +1,13 @@ +module.exports = test + +var testCmd = require("./utils/lifecycle.js").cmd("test") + +function test (args, cb) { + testCmd(args, function (er) { + if (!er) return cb() + if (er.code === "ELIFECYCLE") { + return cb("Test failed. See above for more details.") + } + return cb(er) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/unbuild.js b/bin/nodejs0.10.47/node_modules/npm/lib/unbuild.js new file mode 100644 index 00000000..69b53e06 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/unbuild.js @@ -0,0 +1,115 @@ +module.exports = unbuild +unbuild.usage = "npm unbuild \n(this is plumbing)" + +var readJson = require("read-package-json") + , gentlyRm = require("./utils/gently-rm.js") + , npm = require("./npm.js") + , path = require("path") + , isInside = require("path-is-inside") + , lifecycle = require("./utils/lifecycle.js") + , asyncMap = require("slide").asyncMap + , chain = require("slide").chain + , log = require("npmlog") + , build = require("./build.js") + +// args is a list of folders. +// remove any bins/etc, and then delete the folder. +function unbuild (args, silent, cb) { + if (typeof silent === "function") cb = silent, silent = false + asyncMap(args, unbuild_(silent), cb) +} + +function unbuild_ (silent) { return function (folder, cb_) { + function cb (er) { + cb_(er, path.relative(npm.root, folder)) + } + folder = path.resolve(folder) + var 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) { + // if no json, then just trash it, but no scripts or whatever. + if (er) return gentlyRm(folder, false, base, cb) + chain + ( [ [lifecycle, pkg, "preuninstall", folder, false, true] + , [lifecycle, pkg, "uninstall", folder, false, true] + , !silent && function(cb) { + console.log("unbuild " + pkg._id) + cb() + } + , [rmStuff, pkg, folder] + , [lifecycle, pkg, "postuninstall", folder, false, true] + , [gentlyRm, folder, false, base] ] + , cb ) + }) +}} + +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 parent = path.dirname(folder) + , gnm = npm.dir + , top = gnm === parent + + log.verbose("unbuild rmStuff", pkg._id, "from", gnm) + if (!top) log.verbose("unbuild rmStuff", "in", parent) + asyncMap([rmBins, rmMans], function (fn, cb) { + fn(pkg, folder, parent, top, cb) + }, cb) +} + +function rmBins (pkg, folder, parent, top, cb) { + if (!pkg.bin) return cb() + var 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] + , [gentlyRm, path.resolve(binRoot, b), true] ], cb) + } else { + gentlyRm(path.resolve(binRoot, b), true, cb) + } + }, cb) +} + +function rmMans (pkg, folder, parent, top, cb) { + if (!pkg.man + || !top + || process.platform === "win32" + || !npm.config.get("global")) { + return cb() + } + var 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)) { + man.forEach(rmMan) + } else { + rmMan(man) + } + + function rmMan (man) { + log.silly("rmMan", "preparing to remove", man) + var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) + if (!parseMan) { + log.error( + "rmMan", man, "is not a valid name for a man file.", + "Man files must end with a number, " + + "and optionally a .gz suffix if they are compressed." + ) + return cb() + } + + var stem = parseMan[1] + var sxn = parseMan[2] + var gz = parseMan[3] || "" + var bn = path.basename(stem) + var manDest = path.join( + manRoot, + "man"+sxn, + (bn.indexOf(pkg.name) === 0 ? bn : pkg.name+"-"+bn)+"."+sxn+gz + ) + gentlyRm(manDest, true, cb) + } + }, cb) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/uninstall.js b/bin/nodejs0.10.47/node_modules/npm/lib/uninstall.js new file mode 100644 index 00000000..2386cdf4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/uninstall.js @@ -0,0 +1,128 @@ + +// remove a package. + +module.exports = uninstall + +uninstall.usage = "npm uninstall [@ [[@] ...]" + + "\nnpm rm [@ [[@] ...]" + +uninstall.completion = require("./utils/completion/installed-shallow.js") + +var fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , log = require("npmlog") + , readJson = require("read-package-json") + , path = require("path") + , npm = require("./npm.js") + , asyncMap = require("slide").asyncMap + +function uninstall (args, cb) { + // this is super easy + // get the list of args that correspond to package names in either + // the global npm.dir, + // then call unbuild on all those folders to pull out their bins + // and mans and whatnot, and then delete the folder. + + var nm = npm.dir + if (args.length === 1 && args[0] === ".") args = [] + if (args.length) return uninstall_(args, nm, cb) + + // remove this package from the global space, if it's installed there + readJson(path.resolve(npm.localPrefix, "package.json"), function (er, pkg) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb(uninstall.usage) + uninstall_( [pkg.name] + , npm.globalDir + , cb ) + }) + +} + +function uninstall_ (args, nm, cb) { + // if we've been asked to --save or --save-dev or --save-optional, + // then also remove it from the associated dependencies hash. + var s = npm.config.get('save') + , d = npm.config.get('save-dev') + , o = npm.config.get('save-optional') + if (s || d || o) { + cb = saver(args, nm, cb) + } + + asyncMap(args, function (arg, cb) { + // uninstall .. should not delete /usr/local/lib/node_modules/.. + var p = path.join(path.resolve(nm), path.join("/", arg)) + if (path.resolve(p) === nm) { + log.warn("uninstall", "invalid argument: %j", arg) + return cb(null, []) + } + fs.lstat(p, function (er) { + if (er) { + log.warn("uninstall", "not installed in %s: %j", nm, arg) + return cb(null, []) + } + cb(null, p) + }) + }, function (er, folders) { + if (er) return cb(er) + asyncMap(folders, npm.commands.unbuild, cb) + }) +} + +function saver (args, nm, cb_) { + return cb + function cb (er, data) { + var s = npm.config.get('save') + , d = npm.config.get('save-dev') + , o = npm.config.get('save-optional') + if (er || !(s || d || o)) return cb_(er, data) + var pj = path.resolve(nm, '..', 'package.json') + // don't use readJson here, because we don't want all the defaults + // filled in, for mans and other bs. + fs.readFile(pj, 'utf8', function (er, json) { + var pkg + try { + pkg = JSON.parse(json) + } catch (_) {} + if (!pkg) return cb_(null, data) + + var bundle + if (npm.config.get('save-bundle')) { + bundle = pkg.bundleDependencies || pkg.bundledDependencies + if (!Array.isArray(bundle)) bundle = undefined + } + + var changed = false + args.forEach(function (a) { + ; [ [s, 'dependencies'] + , [o, 'optionalDependencies'] + , [d, 'devDependencies'] ].forEach(function (f) { + var flag = f[0] + , field = f[1] + if (!flag || !pkg[field] || !pkg[field].hasOwnProperty(a)) return + changed = true + + if (bundle) { + var i = bundle.indexOf(a) + if (i !== -1) bundle.splice(i, 1) + } + + delete pkg[field][a] + }) + }) + if (!changed) return cb_(null, data) + + if (bundle) { + delete pkg.bundledDependencies + if (bundle.length) { + pkg.bundleDependencies = bundle + } else { + delete pkg.bundleDependencies + } + } + + writeFileAtomic(pj, JSON.stringify(pkg, null, 2) + "\n", function (er) { + return cb_(er, data) + }) + }) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/unpublish.js b/bin/nodejs0.10.47/node_modules/npm/lib/unpublish.js new file mode 100644 index 00000000..b1230c78 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/unpublish.js @@ -0,0 +1,115 @@ + +module.exports = unpublish + +var log = require("npmlog") +var npm = require("./npm.js") +var readJson = require("read-package-json") +var path = require("path") +var mapToRegistry = require("./utils/map-to-registry.js") +var npa = require("npm-package-arg") +var getPublishConfig = require("./utils/get-publish-config.js") + +unpublish.usage = "npm unpublish [@]" + +unpublish.completion = function (opts, cb) { + if (opts.conf.argv.remain.length >= 3) return cb() + npm.commands.whoami([], true, function (er, username) { + if (er) return cb() + + var un = encodeURIComponent(username) + if (!un) return cb() + var byUser = "-/by-user/" + un + mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, pkgs) { + // do a bit of filtering at this point, so that we don't need + // to fetch versions for more than one thing, but also don't + // accidentally a whole project. + pkgs = pkgs[un] + if (!pkgs || !pkgs.length) return cb() + var pp = npa(opts.partialWord).name + pkgs = pkgs.filter(function (p) { + return p.indexOf(pp) === 0 + }) + if (pkgs.length > 1) return cb(null, pkgs) + mapToRegistry(pkgs[0], npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, d) { + if (er) return cb(er) + var vers = Object.keys(d.versions) + if (!vers.length) return cb(null, pkgs) + return cb(null, vers.map(function (v) { + return pkgs[0] + "@" + v + })) + }) + }) + }) + }) + }) +} + +function unpublish (args, cb) { + if (args.length > 1) return cb(unpublish.usage) + + var thing = args.length ? npa(args[0]) : {} + , project = thing.name + , version = thing.rawSpec + + log.silly("unpublish", "args[0]", args[0]) + log.silly("unpublish", "thing", thing) + if (!version && !npm.config.get("force")) { + return cb("Refusing to delete entire project.\n" + + "Run with --force to do this.\n" + + unpublish.usage) + } + + if (!project || path.resolve(project) === npm.localPrefix) { + // if there's a package.json in the current folder, then + // read the package name and version out of that. + var cwdJson = path.join(npm.localPrefix, "package.json") + return readJson(cwdJson, function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb("Usage:\n" + unpublish.usage) + log.verbose('unpublish', data) + gotProject(data.name, data.version, data.publishConfig, cb) + }) + } + return gotProject(project, version, cb) +} + +function gotProject (project, version, publishConfig, cb_) { + if (typeof cb_ !== 'function') { + cb_ = publishConfig + publishConfig = null + } + + function cb (er) { + if (er) return cb_(er) + console.log("- " + project + (version ? "@" + version : "")) + cb_() + } + + var mappedConfig = getPublishConfig(publishConfig, npm.config, npm.registry) + var config = mappedConfig.config + var registry = mappedConfig.client + + // remove from the cache first + npm.commands.cache(["clean", project, version], function (er) { + if (er) { + log.error("unpublish", "Failed to clean cache") + return cb(er) + } + + mapToRegistry(project, config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version: version, + auth: auth + } + registry.unpublish(uri, params, cb) + }) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/update.js b/bin/nodejs0.10.47/node_modules/npm/lib/update.js new file mode 100644 index 00000000..389f3dad --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/update.js @@ -0,0 +1,58 @@ +/* +for each pkg in prefix that isn't a git repo + look for a new version of pkg that satisfies dep + if so, install it. + if not, then update it +*/ + +module.exports = update + +update.usage = "npm update [pkg]" + +var npm = require("./npm.js") + , asyncMap = require("slide").asyncMap + , log = require("npmlog") + + // load these, just so that we know that they'll be available, in case + // npm itself is getting overwritten. + , install = require("./install.js") + , build = require("./build.js") + +update.completion = npm.commands.outdated.completion + +function update (args, cb) { + npm.commands.outdated(args, true, function (er, outdated) { + if (er) return cb(er) + + var wanted = outdated.filter(function (ww) { + var dep = ww[1] + var current = ww[2] + var wanted = ww[3] + var latest = ww[4] + if (current === wanted && wanted !== latest) { + log.verbose( + 'outdated', + 'not updating', dep, + "because it's currently at the maximum version that matches its specified semver range" + ) + } + return current !== wanted + }) + if (wanted.length === 0) return cb() + + log.info('outdated', 'updating', wanted) + asyncMap(wanted, function (ww, cb) { + // [[ dir, dep, has, want, req ]] + var where = ww[0] + , dep = ww[1] + , want = ww[3] + , what = dep + "@" + want + , req = ww[5] + , url = require('url') + + // use the initial installation method (repo, tar, git) for updating + if (url.parse(req).protocol) what = req + npm.commands.install(where, what, cb) + }, cb) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/completion.sh b/bin/nodejs0.10.47/node_modules/npm/lib/utils/completion.sh new file mode 100644 index 00000000..3d524cb4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/completion.sh @@ -0,0 +1,58 @@ +#!/bin/bash +###-begin-npm-completion-### +# +# npm command completion script +# +# Installation: npm completion >> ~/.bashrc (or ~/.zshrc) +# Or, maybe: npm completion > /usr/local/etc/bash_completion.d/npm +# + +if type complete &>/dev/null; then + _npm_completion () { + local words cword + if type _get_comp_words_by_ref &>/dev/null; then + _get_comp_words_by_ref -n = -n @ -w words -i cword + else + cword="$COMP_CWORD" + words=("${COMP_WORDS[@]}") + fi + + local si="$IFS" + IFS=$'\n' COMPREPLY=($(COMP_CWORD="$cword" \ + COMP_LINE="$COMP_LINE" \ + COMP_POINT="$COMP_POINT" \ + npm completion -- "${words[@]}" \ + 2>/dev/null)) || return $? + IFS="$si" + } + complete -o default -F _npm_completion npm +elif type compdef &>/dev/null; then + _npm_completion() { + local si=$IFS + compadd -- $(COMP_CWORD=$((CURRENT-1)) \ + COMP_LINE=$BUFFER \ + COMP_POINT=0 \ + npm completion -- "${words[@]}" \ + 2>/dev/null) + IFS=$si + } + compdef _npm_completion npm +elif type compctl &>/dev/null; then + _npm_completion () { + local cword line point words si + read -Ac words + read -cn cword + let cword-=1 + read -l line + read -ln point + si="$IFS" + IFS=$'\n' reply=($(COMP_CWORD="$cword" \ + COMP_LINE="$line" \ + COMP_POINT="$point" \ + npm completion -- "${words[@]}" \ + 2>/dev/null)) || return $? + IFS="$si" + } + compctl -K _npm_completion npm +fi +###-end-npm-completion-### diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/correct-mkdir.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/correct-mkdir.js new file mode 100644 index 00000000..4425b23f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/correct-mkdir.js @@ -0,0 +1,117 @@ +var chownr = require('chownr') +var dezalgo = require('dezalgo') +var fs = require('graceful-fs') +var inflight = require('inflight') +var log = require('npmlog') +var mkdirp = require('mkdirp') + +// memoize the directories created by this step +var stats = {} +var effectiveOwner +module.exports = function correctMkdir (path, cb) { + cb = dezalgo(cb) + cb = inflight('correctMkdir:' + path, cb) + if (!cb) { + return log.verbose('correctMkdir', path, 'correctMkdir already in flight; waiting') + } else { + log.verbose('correctMkdir', path, 'correctMkdir not in flight; initializing') + } + + if (stats[path]) return cb(null, stats[path]) + + fs.stat(path, function (er, st) { + if (er) return makeDirectory(path, cb) + + if (!st.isDirectory()) { + log.error('correctMkdir', 'invalid dir %s', path) + return cb(er) + } + + var ownerStats = calculateOwner() + // there's always a chance the permissions could have been frobbed, so fix + if (st.uid !== ownerStats.uid) { + stats[path] = ownerStats + setPermissions(path, ownerStats, cb) + } else { + stats[path] = st + cb(null, stats[path]) + } + }) +} + +function calculateOwner () { + if (!effectiveOwner) { + effectiveOwner = { uid: 0, gid: 0 } + + if (process.getuid) effectiveOwner.uid = +process.getuid() + if (process.getgid) effectiveOwner.gid = +process.getgid() + + if (effectiveOwner.uid === 0) { + if (process.env.SUDO_UID) effectiveOwner.uid = +process.env.SUDO_UID + if (process.env.SUDO_GID) effectiveOwner.gid = +process.env.SUDO_GID + } + } + + return effectiveOwner +} + +function makeDirectory (path, cb) { + cb = inflight('makeDirectory:' + path, cb) + if (!cb) { + return log.verbose('makeDirectory', path, 'creation already in flight; waiting') + } else { + log.verbose('makeDirectory', path, 'creation not in flight; initializing') + } + + var owner = calculateOwner() + + if (!process.getuid) { + return mkdirp(path, function (er) { + log.verbose('makeCacheDir', 'UID & GID are irrelevant on', process.platform) + + stats[path] = owner + return cb(er, stats[path]) + }) + } + + if (owner.uid !== 0 || !process.env.HOME) { + log.silly( + 'makeDirectory', path, + 'uid:', owner.uid, + 'gid:', owner.gid + ) + stats[path] = owner + mkdirp(path, afterMkdir) + } else { + fs.stat(process.env.HOME, function (er, st) { + if (er) { + log.error('makeDirectory', 'homeless?') + return cb(er) + } + + log.silly( + 'makeDirectory', path, + 'uid:', st.uid, + 'gid:', st.gid + ) + stats[path] = st + mkdirp(path, afterMkdir) + }) + } + + function afterMkdir (er, made) { + if (er || !stats[path] || isNaN(stats[path].uid) || isNaN(stats[path].gid)) { + return cb(er, stats[path]) + } + + if (!made) return cb(er, stats[path]) + + setPermissions(made, stats[path], cb) + } +} + +function setPermissions (path, st, cb) { + chownr(path, st.uid, st.gid, function (er) { + return cb(er, st) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/depr-check.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/depr-check.js new file mode 100644 index 00000000..7a4b54e4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/depr-check.js @@ -0,0 +1,13 @@ +var log = require("npmlog") + +var deprecated = {} + , deprWarned = {} +module.exports = function deprCheck (data) { + if (deprecated[data._id]) data.deprecated = deprecated[data._id] + if (data.deprecated) deprecated[data._id] = data.deprecated + else return + if (!deprWarned[data._id]) { + deprWarned[data._id] = true + log.warn("deprecated", "%s: %s", data._id, data.deprecated) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/error-handler.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/error-handler.js new file mode 100644 index 00000000..a17da36f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/error-handler.js @@ -0,0 +1,414 @@ + +module.exports = errorHandler + +var cbCalled = false + , log = require("npmlog") + , npm = require("../npm.js") + , rm = require("rimraf") + , itWorked = false + , path = require("path") + , wroteLogFile = false + , exitCode = 0 + , rollbacks = npm.rollbacks + , chain = require("slide").chain + , writeStreamAtomic = require("fs-write-stream-atomic") + , nameValidator = require("validate-npm-package-name") + + +process.on("exit", function (code) { + // console.error("exit", code) + if (!npm.config || !npm.config.loaded) return + if (code) itWorked = false + if (itWorked) log.info("ok") + else { + if (!cbCalled) { + log.error("", "cb() never called!") + } + + if (wroteLogFile) { + // just a line break + if (log.levels[log.level] <= log.levels.error) console.error("") + + log.error("", + ["Please include the following file with any support request:" + ," " + path.resolve("npm-debug.log") + ].join("\n")) + wroteLogFile = false + } + if (code) { + log.error("code", code) + } + } + + var doExit = npm.config.get("_exit") + if (doExit) { + // actually exit. + if (exitCode === 0 && !itWorked) { + exitCode = 1 + } + if (exitCode !== 0) process.exit(exitCode) + } else { + itWorked = false // ready for next exit + } +}) + +function exit (code, noLog) { + exitCode = exitCode || process.exitCode || code + + var doExit = npm.config ? npm.config.get("_exit") : true + log.verbose("exit", [code, doExit]) + if (log.level === "silent") noLog = true + + if (rollbacks.length) { + chain(rollbacks.map(function (f) { + return function (cb) { + npm.commands.unbuild([f], true, cb) + } + }), function (er) { + if (er) { + log.error("error rolling back", er) + if (!code) errorHandler(er) + else if (noLog) rm("npm-debug.log", reallyExit.bind(null, er)) + else writeLogFile(reallyExit.bind(this, er)) + } else { + if (!noLog && code) writeLogFile(reallyExit) + else rm("npm-debug.log", reallyExit) + } + }) + rollbacks.length = 0 + } + else if (code && !noLog) writeLogFile(reallyExit) + else rm("npm-debug.log", reallyExit) + + function reallyExit (er) { + if (er && !code) code = typeof er.errno === "number" ? er.errno : 1 + + // truncate once it's been written. + log.record.length = 0 + + itWorked = !code + + // just emit a fake exit event. + // if we're really exiting, then let it exit on its own, so that + // in-process stuff can finish or clean up first. + if (!doExit) process.emit("exit", code) + npm.spinner.stop() + } +} + + +function errorHandler (er) { + // console.error("errorHandler", er) + if (!npm.config || !npm.config.loaded) { + // logging won't work unless we pretend that it's ready + er = er || new Error("Exit prior to config file resolving.") + console.error(er.stack || er.message) + } + + if (cbCalled) { + er = er || new Error("Callback called more than once.") + } + + cbCalled = true + if (!er) return exit(0) + if (typeof er === "string") { + log.error("", er) + return exit(1, true) + } else if (!(er instanceof Error)) { + log.error("weird error", er) + return exit(1, true) + } + + var m = er.code || er.message.match(/^(?:Error: )?(E[A-Z]+)/) + if (m && !er.code) er.code = m + + ; [ "type" + , "fstream_path" + , "fstream_unc_path" + , "fstream_type" + , "fstream_class" + , "fstream_finish_call" + , "fstream_linkpath" + , "stack" + , "fstream_stack" + , "statusCode" + , "pkgid" + ].forEach(function (k) { + var v = er[k] + if (!v) return + if (k === "fstream_stack") v = v.join("\n") + log.verbose(k, v) + }) + + log.verbose("cwd", process.cwd()) + + var os = require("os") + // log.error("System", os.type() + " " + os.release()) + // log.error("command", process.argv.map(JSON.stringify).join(" ")) + // log.error("node -v", process.version) + // log.error("npm -v", npm.version) + log.error("", os.type() + " " + os.release()) + log.error("argv", process.argv.map(JSON.stringify).join(" ")) + log.error("node", process.version) + log.error("npm ", "v" + npm.version) + + ; [ "file" + , "path" + , "code" + , "errno" + , "syscall" + ].forEach(function (k) { + var v = er[k] + if (v) log.error(k, v) + }) + + // just a line break + if (log.levels[log.level] <= log.levels.error) console.error("") + + switch (er.code) { + case "ECONNREFUSED": + log.error("", er) + log.error("", ["\nIf you are behind a proxy, please make sure that the" + ,"'proxy' config is set properly. See: 'npm help config'" + ].join("\n")) + break + + case "EACCES": + case "EPERM": + log.error("", er) + log.error("", ["\nPlease try running this command again as root/Administrator." + ].join("\n")) + break + + case "ELIFECYCLE": + log.error("", er.message) + log.error("", ["","Failed at the "+er.pkgid+" "+er.stage+" script '"+er.script+"'." + ,"This is most likely a problem with the "+er.pkgname+" package," + ,"not with npm itself." + ,"Tell the author that this fails on your system:" + ," "+er.script + ,'You can get information on how to open an issue for this project with:' + ,' npm bugs ' + er.pkgname + ,'Or if that isn\'t available, you can get their info via:', + ,' npm owner ls ' + er.pkgname + ,"There is likely additional logging output above." + ].join("\n")) + break + + case "ENOGIT": + log.error("", er.message) + log.error("", ["","Failed using git." + ,"This is most likely not a problem with npm itself." + ,"Please check if you have git installed and in your PATH." + ].join("\n")) + break + + case "EJSONPARSE": + log.error("", er.message) + log.error("", "File: "+er.file) + log.error("", ["Failed to parse package.json data." + ,"package.json must be actual JSON, not just JavaScript." + ,"","This is not a bug in npm." + ,"Tell the package author to fix their package.json file." + ].join("\n"), "JSON.parse") + break + + // TODO(isaacs) + // Add a special case here for E401 and E403 explaining auth issues? + + case "E404": + var msg = [er.message] + if (er.pkgid && er.pkgid !== "-") { + msg.push("", "'" + er.pkgid + "' is not in the npm registry.") + + var valResult = nameValidator(er.pkgid) + + if (valResult.validForNewPackages) { + msg.push("You should bug the author to publish it (or use the name yourself!)") + } else { + msg.push("Your package name is not valid, because", "") + + var errorsArray = (valResult.errors || []).concat(valResult.warnings || []) + errorsArray.forEach(function(item, idx) { + msg.push(" " + (idx + 1) + ". " + item) + }) + } + + if (er.parent) { + msg.push("It was specified as a dependency of '"+er.parent+"'") + } + msg.push("\nNote that you can also install from a" + ,"tarball, folder, http url, or git url.") + } + // There's no need to have 404 in the message as well. + msg[0] = msg[0].replace(/^404\s+/, "") + log.error("404", msg.join("\n")) + break + + case "EPUBLISHCONFLICT": + log.error("publish fail", ["Cannot publish over existing version." + ,"Update the 'version' field in package.json and try again." + ,"" + ,"To automatically increment version numbers, see:" + ," npm help version" + ].join("\n")) + break + + case "EISGIT": + log.error("git", [er.message + ," "+er.path + ,"Refusing to remove it. Update manually," + ,"or move it out of the way first." + ].join("\n")) + break + + case "ECYCLE": + log.error("cycle", [er.message + ,"While installing: "+er.pkgid + ,"Found a pathological dependency case that npm cannot solve." + ,"Please report this to the package author." + ].join("\n")) + break + + case "EBADPLATFORM": + log.error("notsup", [er.message + ,"Not compatible with your operating system or architecture: "+er.pkgid + ,"Valid OS: "+er.os.join(",") + ,"Valid Arch: "+er.cpu.join(",") + ,"Actual OS: "+process.platform + ,"Actual Arch: "+process.arch + ].join("\n")) + break + + case "EEXIST": + log.error([er.message + ,"File exists: "+er.path + ,"Move it away, and try again."].join("\n")) + break + + case "ENEEDAUTH": + log.error("need auth", [er.message + ,"You need to authorize this machine using `npm adduser`" + ].join("\n")) + break + + case "EPEERINVALID": + var peerErrors = Object.keys(er.peersDepending).map(function (peer) { + return "Peer " + peer + " wants " + er.packageName + "@" + + er.peersDepending[peer] + }) + log.error("peerinvalid", [er.message].concat(peerErrors).join("\n")) + break + + case "ECONNRESET": + case "ENOTFOUND": + case "ETIMEDOUT": + case "EAI_FAIL": + log.error("network", [er.message + ,"This is most likely not a problem with npm itself" + ,"and is related to network connectivity." + ,"In most cases you are behind a proxy or have bad network settings." + ,"\nIf you are behind a proxy, please make sure that the" + ,"'proxy' config is set properly. See: 'npm help config'" + ].join("\n")) + break + + case "ENOPACKAGEJSON": + log.error("package.json", [er.message + ,"This is most likely not a problem with npm itself." + ,"npm can't find a package.json file in your current directory." + ].join("\n")) + break + + case "ETARGET": + var msg = [er.message + ,"This is most likely not a problem with npm itself." + ,"In most cases you or one of your dependencies are requesting" + ,"a package version that doesn't exist." + ] + if (er.parent) { + msg.push("\nIt was specified as a dependency of '"+er.parent+"'\n") + } + log.error("notarget", msg.join("\n")) + break + + case "ENOTSUP": + if (er.required) { + log.error("notsup", [er.message + ,"Not compatible with your version of node/npm: "+er.pkgid + ,"Required: "+JSON.stringify(er.required) + ,"Actual: " + +JSON.stringify({npm:npm.version + ,node:npm.config.get("node-version")}) + ].join("\n")) + break + } // else passthrough + + case "ENOSPC": + log.error("nospc", [er.message + ,"This is most likely not a problem with npm itself" + ,"and is related to insufficient space on your system." + ].join("\n")) + break + + case "EROFS": + log.error("rofs", [er.message + ,"This is most likely not a problem with npm itself" + ,"and is related to the file system being read-only." + ,"\nOften virtualized file systems, or other file systems" + ,"that don't support symlinks, give this error." + ].join("\n")) + break + + case "ENOENT": + log.error("enoent", [er.message + ,"This is most likely not a problem with npm itself" + ,"and is related to npm not being able to find a file." + ,er.file?"\nCheck if the file '"+er.file+"' is present.":"" + ].join("\n")) + break + + case "EISDIR": + log.error("eisdir", [er.message + ,"This is most likely not a problem with npm itself" + ,"and is related to npm not being able to find a package.json in" + ,"a package you are trying to install." + ].join("\n")) + break + + default: + log.error("", er.message || er) + log.error("", ["", "If you need help, you may report this error at:" + ," " + ].join("\n")) + break + } + + exit(typeof er.errno === "number" ? er.errno : 1) +} + +var writingLogFile = false +function writeLogFile (cb) { + if (writingLogFile) return cb() + writingLogFile = true + wroteLogFile = true + + var fstr = writeStreamAtomic("npm-debug.log") + , os = require("os") + , out = "" + + log.record.forEach(function (m) { + var pref = [m.id, m.level] + if (m.prefix) pref.push(m.prefix) + pref = pref.join(" ") + + m.message.trim().split(/\r?\n/).map(function (line) { + return (pref + " " + line).trim() + }).forEach(function (line) { + out += line + os.EOL + }) + }) + + fstr.end(out) + fstr.on("close", cb) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/gently-rm.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/gently-rm.js new file mode 100644 index 00000000..8e7d39b4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/gently-rm.js @@ -0,0 +1,197 @@ +// only remove the thing if it's a symlink into a specific folder. +// This is a very common use-case of npm's, but not so common elsewhere. + +module.exports = gentlyRm + +var npm = require('../npm.js') +var log = require('npmlog') +var resolve = require('path').resolve +var dirname = require('path').dirname +var lstat = require('graceful-fs').lstat +var readlink = require('graceful-fs').readlink +var isInside = require('path-is-inside') +var vacuum = require('fs-vacuum') +var some = require('async-some') +var asyncMap = require('slide').asyncMap +var normalize = require('path').normalize + +function gentlyRm (target, gently, base, cb) { + if (!cb) { + cb = base + base = undefined + } + + if (!cb) { + cb = gently + gently = false + } + + log.silly( + 'gentlyRm', + target, + 'is being', gently ? 'gently removed' : 'purged', + base ? 'from base ' + base : '' + ) + + // never rm the root, prefix, or bin dirs + // + // globals included because of `npm link` -- as far as the package requesting + // the link is concerned, the linked package is always installed globally + var prefixes = [ + npm.prefix, + npm.globalPrefix, + npm.dir, + npm.root, + npm.globalDir, + npm.bin, + npm.globalBin + ] + + var resolved = normalize(resolve(npm.prefix, target)) + if (prefixes.indexOf(resolved) !== -1) { + log.verbose('gentlyRm', resolved, "is part of npm and can't be removed") + return cb(new Error('May not delete: ' + resolved)) + } + + var options = { log: log.silly.bind(log, 'vacuum-fs') } + if (npm.config.get('force') || !gently) options.purge = true + if (base) options.base = normalize(resolve(npm.prefix, base)) + + if (!gently) { + log.verbose('gentlyRm', "don't care about contents; nuking", resolved) + return vacuum(resolved, options, cb) + } + + var parent = options.base = normalize(base ? resolve(npm.prefix, base) : npm.prefix) + + // is the parent directory managed by npm? + log.silly('gentlyRm', 'verifying', parent, 'is an npm working directory') + some(prefixes, isManaged(parent), function (er, matched) { + if (er) return cb(er) + + if (!matched) { + log.error('gentlyRm', 'containing path', parent, "isn't under npm's control") + return clobberFail(resolved, parent, cb) + } + log.silly('gentlyRm', 'containing path', parent, "is under npm's control, in", matched) + + // is the target directly contained within the (now known to be + // managed) parent? + if (isInside(resolved, parent)) { + log.silly('gentlyRm', 'deletion target', resolved, 'is under', parent) + log.verbose('gentlyRm', 'vacuuming from', resolved, 'up to', parent) + return vacuum(resolved, options, cb) + } + log.silly('gentlyRm', resolved, 'is not under', parent) + + // the target isn't directly within the parent, but is it itself managed? + log.silly('gentlyRm', 'verifying', resolved, 'is an npm working directory') + some(prefixes, isManaged(resolved), function (er, matched) { + if (er) return cb(er) + + if (matched) { + log.silly('gentlyRm', resolved, "is under npm's control, in", matched) + options.base = matched + log.verbose('gentlyRm', 'removing', resolved, 'with base', options.base) + return vacuum(resolved, options, cb) + } + log.verbose('gentlyRm', resolved, "is not under npm's control") + + // the target isn't managed directly, but maybe it's a link... + log.silly('gentlyRm', 'checking to see if', resolved, 'is a link') + lstat(resolved, function (er, stat) { + if (er) { + // race conditions are common when unbuilding + if (er.code === 'ENOENT') return cb(null) + return cb(er) + } + + if (!stat.isSymbolicLink()) { + log.error('gentlyRm', resolved, 'is outside', parent, 'and not a link') + return clobberFail(resolved, parent, cb) + } + + // ...and maybe the link source, when read... + log.silly('gentlyRm', resolved, 'is a link') + readlink(resolved, function (er, link) { + if (er) { + // race conditions are common when unbuilding + if (er.code === 'ENOENT') return cb(null) + return cb(er) + } + + // ...is inside the managed parent + var source = resolve(dirname(resolved), link) + if (isInside(source, parent)) { + log.silly('gentlyRm', source, 'symlink target', resolved, 'is inside', parent) + log.verbose('gentlyRm', 'vacuuming', resolved) + return vacuum(resolved, options, cb) + } + + log.error('gentlyRm', source, 'symlink target', resolved, 'is not controlled by npm', parent) + return clobberFail(target, parent, cb) + }) + }) + }) + }) +} + +var resolvedPaths = {} +function isManaged (target) { + return function predicate (path, cb) { + if (!path) { + log.verbose('isManaged', 'no path passed for target', target) + return cb(null, false) + } + + asyncMap([path, target], resolveSymlink, function (er, results) { + if (er) { + if (er.code === 'ENOENT') return cb(null, false) + + return cb(er) + } + + var path = results[0] + var target = results[1] + var inside = isInside(target, path) + if (!inside) log.silly('isManaged', target, 'is not inside', path) + + return cb(null, inside && path) + }) + } + + function resolveSymlink (toResolve, cb) { + var resolved = resolve(npm.prefix, toResolve) + + // if the path has already been memoized, return immediately + var cached = resolvedPaths[resolved] + if (cached) return cb(null, cached) + + // otherwise, check the path + lstat(resolved, function (er, stat) { + if (er) return cb(er) + + // if it's not a link, cache & return the path itself + if (!stat.isSymbolicLink()) { + resolvedPaths[resolved] = resolved + return cb(null, resolved) + } + + // otherwise, cache & return the link's source + readlink(resolved, function (er, source) { + if (er) return cb(er) + + resolved = resolve(resolved, source) + resolvedPaths[resolved] = resolved + cb(null, resolved) + }) + }) + } +} + +function clobberFail (target, root, cb) { + var er = new Error('Refusing to delete: ' + target + ' not in ' + root) + er.code = 'EEXIST' + er.path = target + return cb(er) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/get-publish-config.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/get-publish-config.js new file mode 100644 index 00000000..12ca00e2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/get-publish-config.js @@ -0,0 +1,25 @@ +var Conf = require('../config/core.js').Conf +var CachingRegClient = require('../cache/caching-client.js') +var log = require('npmlog') + +module.exports = getPublishConfig + +function getPublishConfig (publishConfig, defaultConfig, defaultClient) { + var config = defaultConfig + var client = defaultClient + log.verbose('getPublishConfig', publishConfig) + if (publishConfig) { + config = new Conf(defaultConfig) + config.save = defaultConfig.save.bind(defaultConfig) + + // don't modify the actual publishConfig object, in case we have + // to set a login token or some other data. + config.unshift(Object.keys(publishConfig).reduce(function (s, k) { + s[k] = publishConfig[k] + return s + }, {})) + client = new CachingRegClient(config) + } + + return { config: config, client: client } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/git.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/git.js new file mode 100644 index 00000000..24a2612a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/git.js @@ -0,0 +1,51 @@ + +// handle some git configuration for windows + +exports.spawn = spawnGit +exports.chainableExec = chainableExec +exports.whichAndExec = whichAndExec + +var exec = require("child_process").execFile + , spawn = require("./spawn") + , npm = require("../npm.js") + , which = require("which") + , git = npm.config.get("git") + , assert = require("assert") + , log = require("npmlog") + +function prefixGitArgs () { + return process.platform === "win32" ? ["-c", "core.longpaths=true"] : [] +} + +function execGit (args, options, cb) { + log.info('git', args) + var fullArgs = prefixGitArgs().concat(args || []) + return exec(git, fullArgs, options, cb) +} + +function spawnGit (args, options) { + log.info("git", args) + return spawn(git, prefixGitArgs().concat(args || []), options) +} + +function chainableExec () { + var args = Array.prototype.slice.call(arguments) + return [execGit].concat(args) +} + +function whichGit (cb) { + return which(git, cb) +} + +function whichAndExec (args, options, cb) { + assert.equal(typeof cb, "function", "no callback provided") + // check for git + whichGit(function (err) { + if (err) { + err.code = "ENOGIT" + return cb(err) + } + + execGit(args, options, cb) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/lifecycle.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/lifecycle.js new file mode 100644 index 00000000..b2585317 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/lifecycle.js @@ -0,0 +1,369 @@ +exports = module.exports = lifecycle +exports.cmd = cmd +exports.makeEnv = makeEnv + +var log = require("npmlog") +var spawn = require("./spawn") +var npm = require("../npm.js") +var path = require("path") +var fs = require("graceful-fs") +var chain = require("slide").chain +var Stream = require("stream").Stream +var PATH = "PATH" +var uidNumber = require("uid-number") +var umask = require("./umask") + +// windows calls it's path "Path" usually, but this is not guaranteed. +if (process.platform === "win32") { + PATH = "Path" + Object.keys(process.env).forEach(function (e) { + if (e.match(/^PATH$/i)) { + PATH = e + } + }) +} + +function lifecycle (pkg, stage, wd, unsafe, failOk, cb) { + if (typeof cb !== "function") cb = failOk, failOk = false + if (typeof cb !== "function") cb = unsafe, unsafe = false + if (typeof cb !== "function") cb = wd, wd = null + + while (pkg && pkg._data) pkg = pkg._data + if (!pkg) return cb(new Error("Invalid package data")) + + log.info(stage, pkg._id) + if (!pkg.scripts || npm.config.get('ignore-scripts')) pkg.scripts = {} + + validWd(wd || path.resolve(npm.dir, pkg.name), function (er, wd) { + if (er) return cb(er) + + unsafe = unsafe || npm.config.get("unsafe-perm") + + if ((wd.indexOf(npm.dir) !== 0 || + wd.indexOf(pkg.name) !== wd.length - pkg.name.length) && + !unsafe && pkg.scripts[stage]) { + log.warn( "cannot run in wd", "%s %s (wd=%s)" + , pkg._id, pkg.scripts[stage], wd) + return cb() + } + + // set the env variables, then run scripts as a child process. + var env = makeEnv(pkg) + env.npm_lifecycle_event = stage + env.npm_node_execpath = env.NODE = env.NODE || process.execPath + env.npm_execpath = require.main.filename + + // "nobody" typically doesn't have permission to write to /tmp + // even if it's never used, sh freaks out. + if (!npm.config.get("unsafe-perm")) env.TMPDIR = wd + + lifecycle_(pkg, stage, wd, env, unsafe, failOk, cb) + }) +} + +function checkForLink (pkg, cb) { + var f = path.join(npm.dir, pkg.name) + fs.lstat(f, function (er, s) { + cb(null, !(er || !s.isSymbolicLink())) + }) +} + +function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) { + var pathArr = [] + , p = wd.split("node_modules") + , acc = path.resolve(p.shift()) + + p.forEach(function (pp) { + pathArr.unshift(path.join(acc, "node_modules", ".bin")) + acc = path.join(acc, "node_modules", pp) + }) + pathArr.unshift(path.join(acc, "node_modules", ".bin")) + + // we also unshift the bundled node-gyp-bin folder so that + // the bundled one will be used for installing things. + pathArr.unshift(path.join(__dirname, "..", "..", "bin", "node-gyp-bin")) + + // prefer current node interpreter in child scripts + pathArr.push(path.dirname(process.execPath)) + + if (env[PATH]) pathArr.push(env[PATH]) + env[PATH] = pathArr.join(process.platform === "win32" ? ";" : ":") + + var packageLifecycle = pkg.scripts && pkg.scripts.hasOwnProperty(stage) + + if (packageLifecycle) { + // define this here so it's available to all scripts. + env.npm_lifecycle_script = pkg.scripts[stage] + } + + function done (er) { + if (er) { + if (npm.config.get("force")) { + log.info("forced, continuing", er) + er = null + } else if (failOk) { + log.warn("continuing anyway", er.message) + er = null + } + } + cb(er) + } + + chain + ( [ packageLifecycle && [runPackageLifecycle, pkg, env, wd, unsafe] + , [runHookLifecycle, pkg, env, wd, unsafe] ] + , done ) +} + +function validWd (d, cb) { + fs.stat(d, function (er, st) { + if (er || !st.isDirectory()) { + var p = path.dirname(d) + if (p === d) { + return cb(new Error("Could not find suitable wd")) + } + return validWd(p, cb) + } + return cb(null, d) + }) +} + +function runPackageLifecycle (pkg, env, wd, unsafe, cb) { + // run package lifecycle scripts in the package root, or the nearest parent. + var stage = env.npm_lifecycle_event + , cmd = env.npm_lifecycle_script + + var note = "\n> " + pkg._id + " " + stage + " " + wd + + "\n> " + cmd + "\n" + runCmd(note, cmd, pkg, env, stage, wd, unsafe, cb) +} + + +var running = false +var queue = [] +function dequeue() { + running = false + if (queue.length) { + var r = queue.shift() + runCmd.apply(null, r) + } +} + +function runCmd (note, cmd, pkg, env, stage, wd, unsafe, cb) { + if (running) { + queue.push([note, cmd, pkg, env, stage, wd, unsafe, cb]) + return + } + + running = true + log.pause() + var user = unsafe ? null : npm.config.get("user") + , group = unsafe ? null : npm.config.get("group") + + if (log.level !== 'silent') { + if (npm.spinner.int) { + npm.config.get("logstream").write("\r \r") + } + console.log(note) + } + log.verbose("unsafe-perm in lifecycle", unsafe) + + if (process.platform === "win32") { + unsafe = true + } + + if (unsafe) { + runCmd_(cmd, pkg, env, wd, stage, unsafe, 0, 0, cb) + } else { + uidNumber(user, group, function (er, uid, gid) { + runCmd_(cmd, pkg, env, wd, stage, unsafe, uid, gid, cb) + }) + } +} + +function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { + + function cb (er) { + cb_.apply(null, arguments) + log.resume() + process.nextTick(dequeue) + } + + var conf = { cwd: wd + , env: env + , stdio: [ 0, 1, 2 ] + } + + if (!unsafe) { + conf.uid = uid ^ 0 + conf.gid = gid ^ 0 + } + + var sh = 'sh' + var shFlag = '-c' + + if (process.platform === 'win32') { + sh = process.env.comspec || 'cmd' + shFlag = '/d /s /c' + conf.windowsVerbatimArguments = true + } + + var proc = spawn(sh, [shFlag, cmd], conf) + proc.on("error", procError) + proc.on("close", function (code, signal) { + if (signal) { + process.kill(process.pid, signal); + } else if (code) { + var er = new Error("Exit status " + code) + } + procError(er) + }) + + function procError (er) { + if (er && !npm.ROLLBACK) { + log.info(pkg._id, "Failed to exec "+stage+" script") + er.message = pkg._id + " " + + stage + ": `" + cmd +"`\n" + + er.message + if (er.code !== "EPERM") { + er.code = "ELIFECYCLE" + } + er.pkgid = pkg._id + er.stage = stage + er.script = cmd + er.pkgname = pkg.name + return cb(er) + } else if (er) { + log.error(pkg._id+"."+stage, er) + log.error(pkg._id+"."+stage, "continuing anyway") + return cb() + } + cb(er) + } +} + + +function runHookLifecycle (pkg, env, wd, unsafe, cb) { + // check for a hook script, run if present. + var stage = env.npm_lifecycle_event + , hook = path.join(npm.dir, ".hooks", stage) + , user = unsafe ? null : npm.config.get("user") + , group = unsafe ? null : npm.config.get("group") + , cmd = hook + + fs.stat(hook, function (er) { + if (er) return cb() + var note = "\n> " + pkg._id + " " + stage + " " + wd + + "\n> " + cmd + runCmd(note, hook, pkg, env, stage, wd, unsafe, cb) + }) +} + +function makeEnv (data, prefix, env) { + prefix = prefix || "npm_package_" + if (!env) { + env = {} + for (var i in process.env) if (!i.match(/^npm_/)) { + env[i] = process.env[i] + } + + // npat asks for tap output + if (npm.config.get("npat")) env.TAP = 1 + + // express and others respect the NODE_ENV value. + if (npm.config.get("production")) env.NODE_ENV = "production" + + } else if (!data.hasOwnProperty("_lifecycleEnv")) { + Object.defineProperty(data, "_lifecycleEnv", + { value : env + , enumerable : false + }) + } + + for (var i in data) if (i.charAt(0) !== "_") { + var envKey = (prefix+i).replace(/[^a-zA-Z0-9_]/g, '_') + if (i === "readme") { + continue + } + if (data[i] && typeof(data[i]) === "object") { + try { + // quick and dirty detection for cyclical structures + JSON.stringify(data[i]) + makeEnv(data[i], envKey+"_", env) + } catch (ex) { + // usually these are package objects. + // just get the path and basic details. + var d = data[i] + makeEnv( { name: d.name, version: d.version, path:d.path } + , envKey+"_", env) + } + } else { + env[envKey] = String(data[i]) + env[envKey] = -1 !== env[envKey].indexOf("\n") + ? JSON.stringify(env[envKey]) + : env[envKey] + } + + } + + if (prefix !== "npm_package_") return env + + prefix = "npm_config_" + var pkgConfig = {} + , keys = npm.config.keys + , pkgVerConfig = {} + , namePref = data.name + ":" + , verPref = data.name + "@" + data.version + ":" + + keys.forEach(function (i) { + // in some rare cases (e.g. working with nerf darts), there are segmented + // "private" (underscore-prefixed) config names -- don't export + if (i.charAt(0) === '_' && i.indexOf('_' + namePref) !== 0 || i.match(/:_/)) { + return + } + var value = npm.config.get(i) + if (value instanceof Stream || Array.isArray(value)) return + if (i.match(/umask/)) value = umask.toString(value) + if (!value) value = "" + else if (typeof value === "number") value = "" + value + else if (typeof value !== "string") value = JSON.stringify(value) + + value = -1 !== value.indexOf("\n") + ? JSON.stringify(value) + : value + i = i.replace(/^_+/, "") + if (i.indexOf(namePref) === 0) { + var k = i.substr(namePref.length).replace(/[^a-zA-Z0-9_]/g, "_") + pkgConfig[ k ] = value + } else if (i.indexOf(verPref) === 0) { + var k = i.substr(verPref.length).replace(/[^a-zA-Z0-9_]/g, "_") + pkgVerConfig[ k ] = value + } + var envKey = (prefix+i).replace(/[^a-zA-Z0-9_]/g, "_") + env[envKey] = value + }) + + prefix = "npm_package_config_" + ;[pkgConfig, pkgVerConfig].forEach(function (conf) { + for (var i in conf) { + var envKey = (prefix+i) + env[envKey] = conf[i] + } + }) + + return env +} + +function cmd (stage) { + function CMD (args, cb) { + npm.commands["run-script"]([stage].concat(args), cb) + } + CMD.usage = "npm "+stage+" [-- ]" + var installedShallow = require("./completion/installed-shallow.js") + CMD.completion = function (opts, cb) { + installedShallow(opts, function (d) { + return d.scripts && d.scripts[stage] + }, cb) + } + return CMD +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/link.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/link.js new file mode 100644 index 00000000..fb08f3f9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/link.js @@ -0,0 +1,40 @@ + +module.exports = link +link.ifExists = linkIfExists + +var fs = require("graceful-fs") + , chain = require("slide").chain + , mkdir = require("mkdirp") + , rm = require("./gently-rm.js") + , path = require("path") + , npm = require("../npm.js") + +function linkIfExists (from, to, gently, cb) { + fs.stat(from, function (er) { + if (er) return cb() + link(from, to, gently, cb) + }) +} + +function link (from, to, gently, abs, cb) { + if (typeof cb !== "function") cb = abs, abs = false + if (typeof cb !== "function") cb = gently, gently = null + if (npm.config.get("force")) gently = false + + to = path.resolve(to) + var target = from = path.resolve(from) + if (!abs && process.platform !== "win32") { + // junctions on windows must be absolute + target = path.relative(path.dirname(to), from) + // if there is no folder in common, then it will be much + // longer, and using a relative link is dumb. + if (target.length >= from.length) target = from + } + + chain + ( [ [fs, "stat", from] + , [rm, to, gently] + , [mkdir, path.dirname(to)] + , [fs, "symlink", target, to, "junction"] ] + , cb) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/locker.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/locker.js new file mode 100644 index 00000000..f1c12b87 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/locker.js @@ -0,0 +1,73 @@ +var crypto = require("crypto") +var resolve = require("path").resolve + +var lockfile = require("lockfile") +var log = require("npmlog") +var mkdirp = require("mkdirp") + +var npm = require("../npm.js") +var correctMkdir = require('../utils/correct-mkdir.js') + +var installLocks = {} + +function lockFileName (base, name) { + var c = name.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "") + , p = resolve(base, name) + , h = crypto.createHash("sha1").update(p).digest("hex") + , l = resolve(npm.cache, "_locks") + + return resolve(l, c.substr(0, 24)+"-"+h.substr(0, 16)+".lock") +} + +function lock (base, name, cb) { + var lockDir = resolve(npm.cache, "_locks") + correctMkdir(lockDir, function (er) { + if (er) return cb(er) + + var opts = { stale: npm.config.get("cache-lock-stale") + , retries: npm.config.get("cache-lock-retries") + , wait: npm.config.get("cache-lock-wait") } + var lf = lockFileName(base, name) + lockfile.lock(lf, opts, function (er) { + if (er) log.warn("locking", lf, "failed", er) + + if (!er) { + log.verbose("lock", "using", lf, "for", resolve(base, name)) + installLocks[lf] = true + } + + cb(er) + }) + }) +} + +function unlock (base, name, cb) { + var lf = lockFileName(base, name) + , locked = installLocks[lf] + if (locked === false) { + return process.nextTick(cb) + } + else if (locked === true) { + lockfile.unlock(lf, function (er) { + if (er) { + log.warn("unlocking", lf, "failed", er) + } + else { + installLocks[lf] = false + log.verbose("unlock", "done using", lf, "for", resolve(base, name)) + } + + cb(er) + }) + } + else { + throw new Error( + "Attempt to unlock " + resolve(base, name) + ", which hasn't been locked" + ) + } +} + +module.exports = { + lock : lock, + unlock : unlock +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/map-to-registry.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/map-to-registry.js new file mode 100644 index 00000000..ce4425f8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/map-to-registry.js @@ -0,0 +1,100 @@ +var url = require("url") + +var log = require("npmlog") + , npa = require("npm-package-arg") + +module.exports = mapToRegistry + +function mapToRegistry(name, config, cb) { + log.silly("mapToRegistry", "name", name) + var registry + + // the name itself takes precedence + var data = npa(name) + if (data.scope) { + // the name is definitely scoped, so escape now + name = name.replace("/", "%2f") + + log.silly("mapToRegistry", "scope (from package name)", data.scope) + + registry = config.get(data.scope + ":registry") + if (!registry) { + log.verbose("mapToRegistry", "no registry URL found in name for scope", data.scope) + } + } + + // ...then --scope=@scope or --scope=scope + var scope = config.get("scope") + if (!registry && scope) { + // I'm an enabler, sorry + if (scope.charAt(0) !== "@") scope = "@" + scope + + log.silly("mapToRegistry", "scope (from config)", scope) + + registry = config.get(scope + ":registry") + if (!registry) { + log.verbose("mapToRegistry", "no registry URL found in config for scope", scope) + } + } + + // ...and finally use the default registry + if (!registry) { + log.silly("mapToRegistry", "using default registry") + registry = config.get("registry") + } + + log.silly("mapToRegistry", "registry", registry) + + var auth = config.getCredentialsByURI(registry) + + // normalize registry URL so resolution doesn't drop a piece of registry URL + var normalized = registry.slice(-1) !== '/' ? registry + '/' : registry + var uri + log.silly('mapToRegistry', 'data', data) + if (data.type === 'remote') { + uri = data.spec + } else { + uri = url.resolve(normalized, name) + } + + log.silly('mapToRegistry', 'uri', uri) + + cb(null, uri, scopeAuth(uri, registry, auth), normalized) +} + +function scopeAuth (uri, registry, auth) { + var cleaned = { + scope: auth.scope, + email: auth.email, + alwaysAuth: auth.alwaysAuth, + token: undefined, + username: undefined, + password: undefined, + auth: undefined + } + + var requestHost + var registryHost + + if (auth.token || auth.auth || (auth.username && auth.password)) { + requestHost = url.parse(uri).hostname + registryHost = url.parse(registry).hostname + + if (requestHost === registryHost) { + cleaned.token = auth.token + cleaned.auth = auth.auth + cleaned.username = auth.username + cleaned.password = auth.password + } else if (auth.alwaysAuth) { + log.verbose('scopeAuth', 'alwaysAuth set for', registry) + cleaned.token = auth.token + cleaned.auth = auth.auth + cleaned.username = auth.username + cleaned.password = auth.password + } else { + log.silly('scopeAuth', uri, "doesn't share host with registry", registry) + } + } + + return cleaned +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/read-local-package.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/read-local-package.js new file mode 100644 index 00000000..d78951dd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/read-local-package.js @@ -0,0 +1,12 @@ +exports = module.exports = readLocalPkg + +var npm = require("../npm.js") + , readJson = require("read-package-json") + +function readLocalPkg (cb) { + if (npm.config.get("global")) return cb() + var path = require("path") + readJson(path.resolve(npm.prefix, "package.json"), function (er, d) { + return cb(er, d && d.name) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/spawn.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/spawn.js new file mode 100644 index 00000000..ec27e416 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/spawn.js @@ -0,0 +1,34 @@ +module.exports = spawn + +var _spawn = require("child_process").spawn +var EventEmitter = require("events").EventEmitter + +function spawn (cmd, args, options) { + var raw = _spawn(cmd, args, options) + var cooked = new EventEmitter() + + raw.on("error", function (er) { + er.file = cmd + cooked.emit("error", er) + }).on("close", function (code, signal) { + // Create ENOENT error because Node.js v0.8 will not emit + // an `error` event if the command could not be found. + if (code === 127) { + var er = new Error('spawn ENOENT') + er.code = 'ENOENT' + er.errno = 'ENOENT' + er.syscall = 'spawn' + er.file = cmd + cooked.emit('error', er) + } else { + cooked.emit("close", code, signal) + } + }) + + cooked.stdin = raw.stdin + cooked.stdout = raw.stdout + cooked.stderr = raw.stderr + cooked.kill = function (sig) { return raw.kill(sig) } + + return cooked +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/tar.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/tar.js new file mode 100644 index 00000000..3bfeb44d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/tar.js @@ -0,0 +1,291 @@ +// commands for packing and unpacking tarballs +// this file is used by lib/cache.js + +var npm = require("../npm.js") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , writeStreamAtomic = require("fs-write-stream-atomic") + , path = require("path") + , log = require("npmlog") + , uidNumber = require("uid-number") + , rm = require("./gently-rm.js") + , readJson = require("read-package-json") + , myUid = process.getuid && process.getuid() + , myGid = process.getgid && process.getgid() + , tar = require("tar") + , zlib = require("zlib") + , fstream = require("fstream") + , Packer = require("fstream-npm") + , lifecycle = require("./lifecycle.js") + +if (process.env.SUDO_UID && myUid === 0) { + if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID + if (!isNaN(process.env.SUDO_GID)) myGid = +process.env.SUDO_GID +} + +exports.pack = pack +exports.unpack = unpack + +function pack (tarball, folder, pkg, dfc, cb) { + log.verbose("tar pack", [tarball, folder]) + if (typeof cb !== "function") cb = dfc, dfc = false + + log.verbose("tarball", tarball) + log.verbose("folder", folder) + + if (dfc) { + // do fancy crap + return lifecycle(pkg, "prepublish", folder, function (er) { + if (er) return cb(er) + pack_(tarball, folder, pkg, cb) + }) + } else { + pack_(tarball, folder, pkg, cb) + } +} + +function pack_ (tarball, folder, pkg, cb) { + new Packer({ path: folder, type: "Directory", isDirectory: true }) + .on("error", function (er) { + if (er) log.error("tar pack", "Error reading " + folder) + return cb(er) + }) + + // By default, npm includes some proprietary attributes in the + // package tarball. This is sane, and allowed by the spec. + // However, npm *itself* excludes these from its own package, + // so that it can be more easily bootstrapped using old and + // non-compliant tar implementations. + .pipe(tar.Pack({ noProprietary: !npm.config.get("proprietary-attribs") })) + .on("error", function (er) { + if (er) log.error("tar.pack", "tar creation error", tarball) + cb(er) + }) + .pipe(zlib.Gzip()) + .on("error", function (er) { + if (er) log.error("tar.pack", "gzip error "+tarball) + cb(er) + }) + .pipe(writeStreamAtomic(tarball)) + .on("error", function (er) { + if (er) log.error("tar.pack", "Could not write "+tarball) + cb(er) + }) + .on("close", cb) +} + + +function unpack (tarball, unpackTarget, dMode, fMode, uid, gid, cb) { + log.verbose("tar", "unpack", tarball) + log.verbose("tar", "unpacking to", unpackTarget) + if (typeof cb !== "function") cb = gid, gid = null + if (typeof cb !== "function") cb = uid, uid = null + if (typeof cb !== "function") cb = fMode, fMode = npm.modes.file + if (typeof cb !== "function") cb = dMode, dMode = npm.modes.exec + + uidNumber(uid, gid, function (er, uid, gid) { + if (er) return cb(er) + unpack_(tarball, unpackTarget, dMode, fMode, uid, gid, cb) + }) +} + +function unpack_ ( tarball, unpackTarget, dMode, fMode, uid, gid, cb ) { + rm(unpackTarget, function (er) { + if (er) return cb(er) + // gzip {tarball} --decompress --stdout \ + // | tar -mvxpf - --strip-components=1 -C {unpackTarget} + gunzTarPerm( tarball, unpackTarget + , dMode, fMode + , uid, gid + , function (er, folder) { + if (er) return cb(er) + readJson(path.resolve(folder, "package.json"), cb) + }) + }) +} + + +function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) { + if (!dMode) dMode = npm.modes.exec + if (!fMode) fMode = npm.modes.file + log.silly("gunzTarPerm", "modes", [dMode.toString(8), fMode.toString(8)]) + + var cbCalled = false + function cb (er) { + if (cbCalled) return + cbCalled = true + cb_(er, target) + } + + var fst = fs.createReadStream(tarball) + + fst.on("open", function (fd) { + fs.fstat(fd, function (er, st) { + if (er) return fst.emit("error", er) + if (st.size === 0) { + er = new Error("0-byte tarball\n" + + "Please run `npm cache clean`") + fst.emit("error", er) + } + }) + }) + + // figure out who we're supposed to be, if we're not pretending + // to be a specific user. + if (npm.config.get("unsafe-perm") && process.platform !== "win32") { + uid = myUid + gid = myGid + } + + function extractEntry (entry) { + log.silly("gunzTarPerm", "extractEntry", entry.path) + // never create things that are user-unreadable, + // or dirs that are user-un-listable. Only leads to headaches. + var originalMode = entry.mode = entry.mode || entry.props.mode + entry.mode = entry.mode | (entry.type === "Directory" ? dMode : fMode) + entry.mode = entry.mode & (~npm.modes.umask) + entry.props.mode = entry.mode + if (originalMode !== entry.mode) { + log.silly( "gunzTarPerm", "modified mode" + , [entry.path, originalMode, entry.mode]) + } + + // if there's a specific owner uid/gid that we want, then set that + if (process.platform !== "win32" && + typeof uid === "number" && + typeof gid === "number") { + entry.props.uid = entry.uid = uid + entry.props.gid = entry.gid = gid + } + } + + var extractOpts = { type: "Directory", path: target, strip: 1 } + + if (process.platform !== "win32" && + typeof uid === "number" && + typeof gid === "number") { + extractOpts.uid = uid + extractOpts.gid = gid + } + + var sawIgnores = {} + extractOpts.filter = function () { + // symbolic links are not allowed in packages. + if (this.type.match(/^.*Link$/)) { + log.warn( "excluding symbolic link" + , this.path.substr(target.length + 1) + + " -> " + this.linkpath ) + return false + } + + // Note: This mirrors logic in the fs read operations that are + // employed during tarball creation, in the fstream-npm module. + // It is duplicated here to handle tarballs that are created + // using other means, such as system tar or git archive. + if (this.type === "File") { + var base = path.basename(this.path) + if (base === ".npmignore") { + sawIgnores[ this.path ] = true + } else if (base === ".gitignore") { + var npmignore = this.path.replace(/\.gitignore$/, ".npmignore") + if (sawIgnores[npmignore]) { + // Skip this one, already seen. + return false + } else { + // Rename, may be clobbered later. + this.path = npmignore + this._path = npmignore + } + } + } + + return true + } + + + fst + .on("error", function (er) { + if (er) log.error("tar.unpack", "error reading "+tarball) + cb(er) + }) + .on("data", function OD (c) { + // detect what it is. + // Then, depending on that, we'll figure out whether it's + // a single-file module, gzipped tarball, or naked tarball. + // gzipped files all start with 1f8b08 + if (c[0] === 0x1F && + c[1] === 0x8B && + c[2] === 0x08) { + fst + .pipe(zlib.Unzip()) + .on("error", function (er) { + if (er) log.error("tar.unpack", "unzip error "+tarball) + cb(er) + }) + .pipe(tar.Extract(extractOpts)) + .on("entry", extractEntry) + .on("error", function (er) { + if (er) log.error("tar.unpack", "untar error "+tarball) + cb(er) + }) + .on("close", cb) + } else if (hasTarHeader(c)) { + // naked tar + fst + .pipe(tar.Extract(extractOpts)) + .on("entry", extractEntry) + .on("error", function (er) { + if (er) log.error("tar.unpack", "untar error "+tarball) + cb(er) + }) + .on("close", cb) + } else { + // naked js file + var jsOpts = { path: path.resolve(target, "index.js") } + + if (process.platform !== "win32" && + typeof uid === "number" && + typeof gid === "number") { + jsOpts.uid = uid + jsOpts.gid = gid + } + + fst + .pipe(fstream.Writer(jsOpts)) + .on("error", function (er) { + if (er) log.error("tar.unpack", "copy error "+tarball) + cb(er) + }) + .on("close", function () { + var j = path.resolve(target, "package.json") + readJson(j, function (er, d) { + if (er) { + log.error("not a package", tarball) + return cb(er) + } + writeFileAtomic(j, JSON.stringify(d) + "\n", cb) + }) + }) + } + + // now un-hook, and re-emit the chunk + fst.removeListener("data", OD) + fst.emit("data", c) + }) +} + +function hasTarHeader (c) { + return c[257] === 0x75 && // tar archives have 7573746172 at position + c[258] === 0x73 && // 257 and 003030 or 202000 at position 262 + c[259] === 0x74 && + c[260] === 0x61 && + c[261] === 0x72 && + + ((c[262] === 0x00 && + c[263] === 0x30 && + c[264] === 0x30) || + + (c[262] === 0x20 && + c[263] === 0x20 && + c[264] === 0x00)) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/umask.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/umask.js new file mode 100644 index 00000000..60748be1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/umask.js @@ -0,0 +1,17 @@ +var umask = require("umask") +var npmlog = require("npmlog") +var _fromString = umask.fromString + +module.exports = umask + +// fromString with logging callback +umask.fromString = function (val) { + _fromString(val, function (err, result) { + if (err) { + npmlog.warn("invalid umask", err.message) + } + val = result + }) + + return val +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/utils/warn-deprecated.js b/bin/nodejs0.10.47/node_modules/npm/lib/utils/warn-deprecated.js new file mode 100644 index 00000000..a751f007 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/utils/warn-deprecated.js @@ -0,0 +1,24 @@ +module.exports = warnDeprecated + +var log = require("npmlog") + +var deprecations = {} + +function warnDeprecated (type) { + return function warn (messages, instance) { + if (!instance) { + if (!deprecations[type]) { + deprecations[type] = {} + messages.forEach(function (m) { log.warn(type, m) }) + } + } + else { + if (!deprecations[type]) deprecations[type] = {} + + if (!deprecations[type][instance]) { + deprecations[type][instance] = true + messages.forEach(function (m) { log.warn(type, m) }) + } + } + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/version.js b/bin/nodejs0.10.47/node_modules/npm/lib/version.js new file mode 100644 index 00000000..2e4628f7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/version.js @@ -0,0 +1,209 @@ +// npm version + +module.exports = version + +var semver = require('semver') +var path = require('path') +var fs = require('graceful-fs') +var writeFileAtomic = require('write-file-atomic') +var chain = require('slide').chain +var log = require('npmlog') +var npm = require('./npm.js') +var git = require('./utils/git.js') +var assert = require('assert') +var lifecycle = require('./utils/lifecycle.js') + +version.usage = 'npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease]' + + '\n(run in package dir)\n' + + "'npm -v' or 'npm --version' to print npm version " + + '(' + npm.version + ')\n' + + "'npm view version' to view a package's " + + 'published version\n' + + "'npm ls' to inspect current package/dependency versions" + +function version (args, silent, cb_) { + if (typeof cb_ !== 'function') { + cb_ = silent + silent = false + } + if (args.length > 1) return cb_(version.usage) + + var packagePath = path.join(npm.localPrefix, 'package.json') + fs.readFile(packagePath, function (er, data) { + if (data) data = data.toString() + try { + data = JSON.parse(data) + } catch (e) { + er = e + data = null + } + + if (!args.length) return dump(data, cb_) + + if (er) { + log.error('version', 'No valid package.json found') + return cb_(er) + } + + var newVersion = semver.valid(args[0]) + if (!newVersion) newVersion = semver.inc(data.version, args[0]) + if (!newVersion) return cb_(version.usage) + if (data.version === newVersion) return cb_(new Error('Version not changed')) + data.version = newVersion + var lifecycleData = Object.create(data) + lifecycleData._id = data.name + '@' + newVersion + var localData = {} + + var where = npm.prefix + chain([ + [checkGit, localData], + [lifecycle, lifecycleData, 'preversion', where], + [updatePackage, newVersion, silent], + [lifecycle, lifecycleData, 'version', where], + [commit, localData, newVersion], + [lifecycle, lifecycleData, 'postversion', where] ], + cb_) + }) +} + +function readPackage (cb) { + var packagePath = path.join(npm.localPrefix, 'package.json') + fs.readFile(packagePath, function (er, data) { + if (er) return cb(new Error(er)) + if (data) data = data.toString() + try { + data = JSON.parse(data) + } catch (e) { + er = e + data = null + } + cb(er, data) + }) +} + +function updatePackage (newVersion, silent, cb_) { + function cb (er) { + if (!er && !silent) console.log('v' + newVersion) + cb_(er) + } + + readPackage(function (er, data) { + if (er) return cb(new Error(er)) + data.version = newVersion + write(data, 'package.json', cb) + }) +} + +function commit (localData, newVersion, cb) { + updateShrinkwrap(newVersion, function (er, hasShrinkwrap) { + if (er || !localData.hasGit) return cb(er) + _commit(newVersion, hasShrinkwrap, cb) + }) +} + +function updateShrinkwrap (newVersion, cb) { + fs.readFile(path.join(npm.localPrefix, 'npm-shrinkwrap.json'), function (er, data) { + if (er && er.code === 'ENOENT') return cb(null, false) + + try { + data = data.toString() + data = JSON.parse(data) + } catch (er) { + log.error('version', 'Bad npm-shrinkwrap.json data') + return cb(er) + } + + data.version = newVersion + write(data, 'npm-shrinkwrap.json', function (er) { + if (er) { + log.error('version', 'Bad npm-shrinkwrap.json data') + return cb(er) + } + cb(null, true) + }) + }) +} + +function dump (data, cb) { + var v = {} + + if (data && data.name && data.version) v[data.name] = data.version + v.npm = npm.version + Object.keys(process.versions).sort().forEach(function (k) { + v[k] = process.versions[k] + }) + + if (npm.config.get('json')) v = JSON.stringify(v, null, 2) + + console.log(v) + cb() +} + +function checkGit (localData, cb) { + fs.stat(path.join(npm.localPrefix, '.git'), function (er, s) { + var doGit = !er && npm.config.get('git-tag-version') + if (!doGit) { + if (er) log.verbose('version', 'error checking for .git', er) + log.verbose('version', 'not tagging in git') + return cb(null, false) + } + + // check for git + git.whichAndExec( + [ 'status', '--porcelain' ], + { env: process.env }, + function (er, stdout) { + if (er && er.code === 'ENOGIT') { + log.warn( + 'version', + 'This is a Git checkout, but the git command was not found.', + 'npm could not create a Git tag for this release!' + ) + return cb(null, false) + } + + var lines = stdout.trim().split('\n').filter(function (line) { + return line.trim() && !line.match(/^\?\? /) + }).map(function (line) { + return line.trim() + }) + if (lines.length && !npm.config.get('force')) { + return cb(new Error( + 'Git working directory not clean.\n' + lines.join('\n') + )) + } + localData.hasGit = true + cb(null, true) + } + ) + }) +} + +function _commit (version, hasShrinkwrap, cb) { + var packagePath = path.join(npm.localPrefix, 'package.json') + var options = { env: process.env } + var message = npm.config.get('message').replace(/%s/g, version) + var sign = npm.config.get('sign-git-tag') + var flag = sign ? '-sm' : '-am' + chain( + [ + git.chainableExec([ 'add', packagePath ], options), + hasShrinkwrap && git.chainableExec([ 'add', 'npm-shrinkwrap.json' ], options), + git.chainableExec([ 'commit', '-m', message ], options), + git.chainableExec([ 'tag', npm.config.get('tag-version-prefix') + version, flag, message ], options) + ], + cb + ) +} + +function write (data, file, cb) { + assert(data && typeof data === 'object', 'must pass data to version write') + assert(typeof file === 'string', 'must pass filename to write to version write') + + log.verbose('version.write', 'data', data, 'to', file) + writeFileAtomic( + path.join(npm.localPrefix, file), + new Buffer(JSON.stringify(data, null, 2) + '\n'), + cb + ) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/view.js b/bin/nodejs0.10.47/node_modules/npm/lib/view.js new file mode 100644 index 00000000..d9e5f9ae --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/view.js @@ -0,0 +1,302 @@ +// npm view [pkg [pkg ...]] + +module.exports = view +view.usage = "npm view pkg[@version] [[.subfield]...]" + +var npm = require("./npm.js") + , readJson = require("read-package-json") + , log = require("npmlog") + , util = require("util") + , semver = require("semver") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , path = require("path") + +view.completion = function (opts, cb) { + if (opts.conf.argv.remain.length <= 2) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + return cb() + } + // have the package, get the fields. + var tag = npm.config.get("tag") + mapToRegistry(opts.conf.argv.remain[2], npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, d) { + if (er) return cb(er) + var dv = d.versions[d["dist-tags"][tag]] + , fields = [] + d.versions = Object.keys(d.versions).sort(semver.compareLoose) + fields = getFields(d).concat(getFields(dv)) + cb(null, fields) + }) + }) + + function getFields (d, f, pref) { + f = f || [] + if (!d) return f + pref = pref || [] + Object.keys(d).forEach(function (k) { + if (k.charAt(0) === "_" || k.indexOf(".") !== -1) return + var p = pref.concat(k).join(".") + f.push(p) + if (Array.isArray(d[k])) { + d[k].forEach(function (val, i) { + var pi = p + "[" + i + "]" + if (val && typeof val === "object") getFields(val, f, [p]) + else f.push(pi) + }) + return + } + if (typeof d[k] === "object") getFields(d[k], f, [p]) + }) + return f + } +} + +function view (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + if (!args.length) args = ["."] + + var pkg = args.shift() + , nv = npa(pkg) + , name = nv.name + , local = (name === "." || !name) + + if (npm.config.get("global") && local) { + return cb(new Error("Cannot use view command in global mode.")) + } + + if (local) { + var dir = npm.prefix + readJson(path.resolve(dir, "package.json"), function (er, d) { + d = d || {} + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (!d.name) return cb(new Error("Invalid package.json")) + + var p = d.name + nv = npa(p) + if (pkg && ~pkg.indexOf("@")) { + nv.rawSpec = pkg.split("@")[pkg.indexOf("@")] + } + + fetchAndRead(nv, args, silent, cb) + }) + } else { + fetchAndRead(nv, args, silent, cb) + } +} + +function fetchAndRead (nv, args, silent, cb) { + // get the data about this package + var name = nv.name + , version = nv.rawSpec || npm.config.get("tag") + + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, data) { + if (er) return cb(er) + if (data["dist-tags"] && data["dist-tags"].hasOwnProperty(version)) { + version = data["dist-tags"][version] + } + + if (data.time && data.time.unpublished) { + var u = data.time.unpublished + er = new Error("Unpublished by " + u.name + " on " + u.time) + er.statusCode = 404 + er.code = "E404" + er.pkgid = data._id + return cb(er, data) + } + + + var results = [] + , error = null + , versions = data.versions || {} + data.versions = Object.keys(versions).sort(semver.compareLoose) + if (!args.length) args = [""] + + // remove readme unless we asked for it + if (-1 === args.indexOf("readme")) { + delete data.readme + } + + Object.keys(versions).forEach(function (v) { + if (semver.satisfies(v, version, true)) args.forEach(function (args) { + // remove readme unless we asked for it + if (-1 === args.indexOf("readme")) { + delete versions[v].readme + } + results.push(showFields(data, versions[v], args)) + }) + }) + results = results.reduce(reducer, {}) + var retval = results + + if (args.length === 1 && args[0] === "") { + retval = cleanBlanks(retval) + log.silly("cleanup", retval) + } + + if (error || silent) cb(error, retval) + else printData(results, data._id, cb.bind(null, error, retval)) + }) + }) +} + +function cleanBlanks (obj) { + var clean = {} + Object.keys(obj).forEach(function (version) { + clean[version] = obj[version][""] + }) + return clean +} + +function reducer (l, r) { + if (r) Object.keys(r).forEach(function (v) { + l[v] = l[v] || {} + Object.keys(r[v]).forEach(function (t) { + l[v][t] = r[v][t] + }) + }) + return l +} + +// return whatever was printed +function showFields (data, version, fields) { + var o = {} + ;[data, version].forEach(function (s) { + Object.keys(s).forEach(function (k) { + o[k] = s[k] + }) + }) + return search(o, fields.split("."), version.version, fields) +} + +function search (data, fields, version, title) { + var field + , tail = fields + while (!field && fields.length) field = tail.shift() + fields = [field].concat(tail) + var o + if (!field && !tail.length) { + o = {} + o[version] = {} + o[version][title] = data + return o + } + var index = field.match(/(.+)\[([^\]]+)\]$/) + if (index) { + field = index[1] + index = index[2] + if (data.field && data.field.hasOwnProperty(index)) { + return search(data[field][index], tail, version, title) + } else { + field = field + "[" + index + "]" + } + } + if (Array.isArray(data)) { + if (data.length === 1) { + return search(data[0], fields, version, title) + } + var results = [] + data.forEach(function (data, i) { + var tl = title.length + , newt = title.substr(0, tl-(fields.join(".").length) - 1) + + "["+i+"]" + [""].concat(fields).join(".") + results.push(search(data, fields.slice(), version, newt)) + }) + results = results.reduce(reducer, {}) + return results + } + if (!data.hasOwnProperty(field)) return undefined + data = data[field] + if (tail.length) { + if (typeof data === "object") { + // there are more fields to deal with. + return search(data, tail, version, title) + } else { + return new Error("Not an object: "+data) + } + } + o = {} + o[version] = {} + o[version][title] = data + return o +} + +function printData (data, name, cb) { + var versions = Object.keys(data) + , msg = "" + , includeVersions = versions.length > 1 + , includeFields + + versions.forEach(function (v) { + var fields = Object.keys(data[v]) + includeFields = includeFields || (fields.length > 1) + fields.forEach(function (f) { + var d = cleanup(data[v][f]) + if (includeVersions || includeFields || typeof d !== "string") { + d = cleanup(data[v][f]) + d = npm.config.get("json") + ? JSON.stringify(d, null, 2) + : util.inspect(d, false, 5, npm.color) + } else if (typeof d === "string" && npm.config.get("json")) { + d = JSON.stringify(d) + } + if (f && includeFields) f += " = " + if (d.indexOf("\n") !== -1) d = " \n" + d + msg += (includeVersions ? name + "@" + v + " " : "") + + (includeFields ? f : "") + d + "\n" + }) + }) + + // preserve output symmetry by adding a whitespace-only line at the end if + // there's one at the beginning + if (/^\s*\n/.test(msg)) msg += "\n" + + // print directly to stdout to not unnecessarily add blank lines + process.stdout.write(msg) + + cb(null, data) +} +function cleanup (data) { + if (Array.isArray(data)) { + if (data.length === 1) { + data = data[0] + } else { + return data.map(cleanup) + } + } + if (!data || typeof data !== "object") return data + + if (typeof data.versions === "object" + && data.versions + && !Array.isArray(data.versions)) { + data.versions = Object.keys(data.versions || {}) + } + + var keys = Object.keys(data) + keys.forEach(function (d) { + if (d.charAt(0) === "_") delete data[d] + else if (typeof data[d] === "object") data[d] = cleanup(data[d]) + }) + keys = Object.keys(data) + if (keys.length <= 3 + && data.name + && (keys.length === 1 + || keys.length === 3 && data.email && data.url + || keys.length === 2 && (data.email || data.url))) { + data = unparsePerson(data) + } + return data +} +function unparsePerson (d) { + if (typeof d === "string") return d + return d.name + + (d.email ? " <"+d.email+">" : "") + + (d.url ? " ("+d.url+")" : "") +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/visnup.js b/bin/nodejs0.10.47/node_modules/npm/lib/visnup.js new file mode 100644 index 00000000..fff87bda --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/visnup.js @@ -0,0 +1,42 @@ +module.exports = visnup +var npm = require("./npm.js") + +var handsomeFace = [ + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 237, 236, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 235, 236, 235, 233, 237, 235, 233, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 235, 233, 232, 235, 235, 234, 233, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 237, 235, 232, 232, 234, 233, 233, 232, 232, 233, 232, 232, 235, 232, 233, 234, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 232, 232, 232, 239, 238, 235, 233, 232, 232, 232, 232, 232, 232, 232, 233, 235, 232, 233, 233, 232, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 234, 234, 232, 233, 234, 233, 234, 235, 233, 235, 60, 238, 238, 234, 234, 233, 234, 233, 238, 251, 246, 233, 233, 232, 0, 0, 0, 0, 0, 0] + ,[0, 0, 233, 233, 233, 232, 232, 239, 249, 251, 252, 231, 231, 188, 250, 254, 59, 60, 255, 231, 231, 231, 252, 235, 239, 235, 232, 233, 0, 0, 0, 0, 0, 0] + ,[0, 0, 232, 233, 232, 232, 232, 248, 231, 231, 231, 231, 231, 231, 231, 254, 238, 254, 231, 231, 231, 231, 231, 252, 233, 235, 237, 233, 234, 0, 0, 0, 0, 0] + ,[0, 0, 233, 232, 232, 232, 248, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 251, 233, 233, 233, 236, 233, 0, 0, 0, 0] + ,[232, 233, 233, 232, 232, 246, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 249, 233, 234, 234, 0, 0, 0, 0] + ,[232, 232, 232, 232, 233, 249, 231, 255, 255, 255, 255, 254, 109, 60, 239, 237, 238, 237, 235, 235, 235, 235, 236, 235, 235, 235, 234, 232, 232, 232, 232, 232, 233, 0] + ,[0, 232, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, 235, 236, 238, 238, 235, 188, 254, 254, 145, 236, 252, 254, 254, 254, 254, 249, 236, 235, 232, 232, 233, 0] + ,[0, 0, 233, 237, 249, 239, 233, 252, 231, 231, 231, 231, 231, 231, 254, 235, 235, 254, 231, 231, 251, 235, 237, 231, 231, 231, 231, 7, 237, 235, 232, 233, 233, 0] + ,[0, 0, 0, 0, 233, 248, 239, 233, 231, 231, 231, 231, 254, 233, 233, 235, 254, 255, 231, 254, 237, 236, 254, 239, 235, 235, 233, 233, 232, 232, 233, 232, 0, 0] + ,[0, 0, 0, 232, 233, 246, 255, 255, 236, 236, 236, 236, 236, 255, 231, 231, 231, 231, 231, 231, 252, 234, 248, 231, 231, 231, 231, 248, 232, 232, 232, 0, 0, 0] + ,[0, 0, 0, 0, 235, 237, 7, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 255, 238, 235, 7, 231, 231, 231, 246, 232, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 235, 103, 188, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 252, 232, 238, 231, 231, 255, 244, 232, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 235, 236, 103, 146, 253, 255, 231, 231, 231, 231, 231, 253, 251, 250, 250, 250, 246, 232, 235, 152, 255, 146, 66, 233, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 233, 103, 146, 146, 146, 146, 254, 231, 231, 231, 109, 103, 146, 255, 188, 239, 240, 103, 255, 253, 103, 238, 234, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 232, 235, 109, 146, 146, 146, 146, 146, 252, 152, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 103, 235, 233, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 235, 235, 103, 146, 146, 146, 146, 146, 146, 188, 188, 188, 188, 188, 188, 152, 146, 146, 146, 66, 235, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 233, 235, 66, 146, 146, 146, 146, 152, 255, 146, 240, 239, 241, 109, 146, 146, 146, 103, 233, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 237, 109, 146, 146, 146, 146, 146, 254, 231, 231, 188, 146, 146, 146, 103, 233, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 237, 60, 103, 146, 146, 146, 146, 146, 103, 66, 60, 235, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 233, 233, 236, 235, 237, 235, 237, 237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] + + +function visnup (args, cb) { + handsomeFace.forEach(function (line) { + console.log(line.map(function (ch) { + return "\033[" + (ch ? "48;5;" + ch : ch) + "m" + }).join(' ')) + }) + + var c = args.shift() + if (c) npm.commands[c](args, cb) + else cb() +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/whoami.js b/bin/nodejs0.10.47/node_modules/npm/lib/whoami.js new file mode 100644 index 00000000..84d7dc56 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/whoami.js @@ -0,0 +1,47 @@ +var npm = require("./npm.js") + +module.exports = whoami + +whoami.usage = "npm whoami\n(just prints username according to given registry)" + +function whoami (args, silent, cb) { + // FIXME: need tighter checking on this, but is a breaking change + if (typeof cb !== "function") { + cb = silent + silent = false + } + + var registry = npm.config.get("registry") + if (!registry) return cb(new Error("no default registry set")) + + var auth = npm.config.getCredentialsByURI(registry) + if (auth) { + if (auth.username) { + if (!silent) console.log(auth.username) + return process.nextTick(cb.bind(this, null, auth.username)) + } + else if (auth.token) { + return npm.registry.whoami(registry, { auth : auth }, function (er, username) { + if (er) return cb(er) + if (!username) { + var needNewSession = new Error( + "Your auth token is no longer valid. Please log in again." + ) + needNewSession.code = 'ENEEDAUTH' + return cb(needNewSession) + } + + if (!silent) console.log(username) + cb(null, username) + }) + } + } + + // At this point, if they have a credentials object, it doesn't have a token + // or auth in it. Probably just the default registry. + var needAuth = new Error( + "this command requires you to be logged in." + ) + needAuth.code = 'ENEEDAUTH' + process.nextTick(cb.bind(this, needAuth)) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/lib/xmas.js b/bin/nodejs0.10.47/node_modules/npm/lib/xmas.js new file mode 100644 index 00000000..cb914d00 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/lib/xmas.js @@ -0,0 +1,55 @@ +// happy xmas +var log = require("npmlog") + +module.exports = function (args, cb) { +var s = process.platform === "win32" ? " *" : " \u2605" + , f = "\uFF0F" + , b = "\uFF3C" + , x = process.platform === "win32" ? " " : "" + , o = [ "\u0069" , "\u0020", "\u0020", "\u0020", "\u0020", "\u0020" + , "\u0020", "\u0020", "\u0020", "\u0020", "\u0020", "\u0020" + , "\u0020", "\u2E1B","\u2042","\u2E2E","&","@","\uFF61" ] + , oc = [21,33,34,35,36,37] + , l = "\u005e" + +function w (s) { process.stderr.write(s) } + +w("\n") +;(function T (H) { + for (var i = 0; i < H; i ++) w(" ") + w(x+"\033[33m"+s+"\n") + var M = H * 2 - 1 + for (var L = 1; L <= H; L ++) { + var O = L * 2 - 2 + var S = (M - O) / 2 + for (i = 0; i < S; i ++) w(" ") + w(x+"\033[32m"+f) + for (i = 0; i < O; i ++) w( + "\033["+oc[Math.floor(Math.random()*oc.length)]+"m"+ + o[Math.floor(Math.random() * o.length)] + ) + w(x+"\033[32m"+b+"\n") + } + w(" ") + for (i = 1; i < H; i ++) w("\033[32m"+l) + w("| "+x+" |") + for (i = 1; i < H; i ++) w("\033[32m"+l) + if (H > 10) { + w("\n ") + for (i = 1; i < H; i ++) w(" ") + w("| "+x+" |") + for (i = 1; i < H; i ++) w(" ") + } +})(20) +w("\n\n") +log.heading = '' +log.addLevel('npm', 100000, log.headingStyle) +log.npm("loves you", "Happy Xmas, Noders!") +cb() +} +var dg=false +Object.defineProperty(module.exports, "usage", {get:function () { + if (dg) module.exports([], function () {}) + dg = true + return " " +}}) diff --git a/bin/nodejs0.10.47/node_modules/npm/make.bat b/bin/nodejs0.10.47/node_modules/npm/make.bat new file mode 100644 index 00000000..e4e15e72 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/make.bat @@ -0,0 +1,3 @@ +:: The tests run "make doc" in the prepublish script, +:: so this file gives windows something that'll exit +:: successfully, without having to install make. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-README.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-README.1 new file mode 100644 index 00000000..b5519dc0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-README.1 @@ -0,0 +1,181 @@ +.TH "NPM" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm\fR \- a JavaScript package manager +.P +Build Status \fIhttps://img\.shields\.io/travis/npm/npm/master\.svg\fR \fIhttps://travis\-ci\.org/npm/npm\fR +.SH SYNOPSIS +.P +This is just enough info to get you up and running\. +.P +Much more info available via \fBnpm help\fP once it's installed\. +.SH IMPORTANT +.P +\fBYou need node v0\.8 or higher to run this program\.\fR +.P +To install an old \fBand unsupported\fR version of npm that works on node 0\.3 +and prior, clone the git repo and dig through the old tags and branches\. +.P +\fBnpm is configured to use npm, Inc\.'s public package registry at +https://registry\.npmjs\.org by default\.\fR +.P +You can configure npm to use any compatible registry you +like, and even run your own registry\. Check out the doc on +registries \fIhttps://docs\.npmjs\.com/misc/registry\fR\|\. +.P +Use of someone else's registry may be governed by terms of use\. The +terms of use for the default public registry are available at +https://www\.npmjs\.com\|\. +.SH Super Easy Install +.P +npm is bundled with node \fIhttp://nodejs\.org/download/\fR\|\. +.SS Windows Computers +.P +Get the MSI \fIhttp://nodejs\.org/download/\fR\|\. npm is in it\. +.SS Apple Macintosh Computers +.P +Get the pkg \fIhttp://nodejs\.org/download/\fR\|\. npm is in it\. +.SS Other Sorts of Unices +.P +Run \fBmake install\fP\|\. npm will be installed with node\. +.P +If you want a more fancy pants install (a different version, customized +paths, etc\.) then read on\. +.SH Fancy Install (Unix) +.P +There's a pretty robust install script at +https://www\.npmjs\.com/install\.sh\|\. You can download that and run it\. +.P +Here's an example using curl: +.P +.RS 2 +.nf +curl \-L https://www\.npmjs\.com/install\.sh | sh +.fi +.RE +.SS Slightly Fancier +.P +You can set any npm configuration params with that script: +.P +.RS 2 +.nf +npm_config_prefix=/some/path sh install\.sh +.fi +.RE +.P +Or, you can run it in uber\-debuggery mode: +.P +.RS 2 +.nf +npm_debug=1 sh install\.sh +.fi +.RE +.SS Even Fancier +.P +Get the code with git\. Use \fBmake\fP to build the docs and do other stuff\. +If you plan on hacking on npm, \fBmake link\fP is your friend\. +.P +If you've got the npm source code, you can also semi\-permanently set +arbitrary config keys using the \fB\|\./configure \-\-key=val \.\.\.\fP, and then +run npm commands by doing \fBnode cli\.js \fP\|\. (This is helpful +for testing, or running stuff without actually installing npm itself\.) +.SH Windows Install or Upgrade +.P +You can download a zip file from https://github\.com/npm/npm/releases, and +unpack it in the \fBnode_modules\\npm\\\fP folder inside node's installation folder\. +.P +To upgrade to npm 2, follow the Windows upgrade instructions in +the npm Troubleshooting Guide: +.P +https://github\.com/npm/npm/wiki/Troubleshooting#upgrading\-on\-windows +.P +If that's not fancy enough for you, then you can fetch the code with +git, and mess with it directly\. +.SH Installing on Cygwin +.P +No\. +.SH Uninstalling +.P +So sad to see you go\. +.P +.RS 2 +.nf +sudo npm uninstall npm \-g +.fi +.RE +.P +Or, if that fails, +.P +.RS 2 +.nf +sudo make uninstall +.fi +.RE +.SH More Severe Uninstalling +.P +Usually, the above instructions are sufficient\. That will remove +npm, but leave behind anything you've installed\. +.P +If you would like to remove all the packages that you have installed, +then you can use the \fBnpm ls\fP command to find them, and then \fBnpm rm\fP to +remove them\. +.P +To remove cruft left behind by npm 0\.x, you can use the included +\fBclean\-old\.sh\fP script file\. You can run it conveniently like this: +.P +.RS 2 +.nf +npm explore npm \-g \-\- sh scripts/clean\-old\.sh +.fi +.RE +.P +npm uses two configuration files, one for per\-user configs, and another +for global (every\-user) configs\. You can view them by doing: +.P +.RS 2 +.nf +npm config get userconfig # defaults to ~/\.npmrc +npm config get globalconfig # defaults to /usr/local/etc/npmrc +.fi +.RE +.P +Uninstalling npm does not remove configuration files by default\. You +must remove them yourself manually if you want them gone\. Note that +this means that future npm installs will not remember the settings that +you have chosen\. +.SH More Docs +.P +Check out the docs \fIhttps://docs\.npmjs\.com/\fR, +especially the faq \fIhttps://docs\.npmjs\.com/misc/faq\fR\|\. +.P +You can use the \fBnpm help\fP command to read any of them\. +.P +If you're a developer, and you want to use npm to publish your program, +you should read this \fIhttps://docs\.npmjs\.com/misc/developers\fR +.SH BUGS +.P +When you find issues, please report them: +.RS 0 +.IP \(bu 2 +web: +https://github\.com/npm/npm/issues + +.RE +.P +Be sure to include \fIall\fR of the output from the npm command that didn't work +as expected\. The \fBnpm\-debug\.log\fP file is also helpful to provide\. +.P +You can also look for isaacs in #node\.js on irc://irc\.freenode\.net\. He +will no doubt tell you to put the output in a gist or email\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help npm +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help help +.IP \(bu 2 +npm help 7 index + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-access.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-access.1 new file mode 100644 index 00000000..5c438f16 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-access.1 @@ -0,0 +1,88 @@ +.TH "NPM\-ACCESS" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-access\fR \- Set access level on published packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm access public [] +npm access restricted [] + +npm access grant [] +npm access revoke [] + +npm access ls\-packages [||] +npm access ls\-collaborators [ []] +npm access edit [] +.fi +.RE +.SH DESCRIPTION +.P +Used to set access controls on private packages\. +.P +For all of the subcommands, \fBnpm access\fP will perform actions on the packages +in the current working directory if no package name is passed to the +subcommand\. +.RS 0 +.IP \(bu 2 +public / restricted: +Set a package to be either publicly accessible or restricted\. +.IP \(bu 2 +grant / revoke: +Add or remove the ability of users and teams to have read\-only or read\-write +access to a package\. +.IP \(bu 2 +ls\-packages: +Show all of the packages a user or a team is able to access, along with the +access level, except for read\-only public packages (it won't print the whole +registry listing) +.IP \(bu 2 +ls\-collaborators: +Show all of the access privileges for a package\. Will only show permissions +for packages to which you have at least read access\. If \fB\fP is passed in, +the list is filtered only to teams \fIthat\fR user happens to belong to\. +.IP \(bu 2 +edit: +Set the access privileges for a package at once using \fB$EDITOR\fP\|\. + +.RE +.SH DETAILS +.P +\fBnpm access\fP always operates directly on the current registry, configurable +from the command line using \fB\-\-registry=\fP\|\. +.P +Unscoped packages are \fIalways public\fR\|\. +.P +Scoped packages \fIdefault to restricted\fR, but you can either publish them as +public using \fBnpm publish \-\-access=public\fP, or set their access as public using +\fBnpm access public\fP after the initial publish\. +.P +You must have privileges to set the access of a package: +.RS 0 +.IP \(bu 2 +You are an owner of an unscoped or scoped package\. +.IP \(bu 2 +You are a member of the team that owns a scope\. +.IP \(bu 2 +You have been given read\-write privileges for a package, either as a member +of a team or directly as an owner\. + +.RE +.P +If your account is not paid, then attempts to publish scoped packages will fail +with an HTTP 402 status code (logically enough), unless you use +\fB\-\-access=public\fP\|\. +.P +Management of teams and team memberships is done with the \fBnpm team\fP command\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help team +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 7 registry + +.RE diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-adduser.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-adduser.1 new file mode 100644 index 00000000..61a1afdb --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-adduser.1 @@ -0,0 +1,90 @@ +.TH "NPM\-ADDUSER" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-adduser\fR \- Add a registry user account +.SH SYNOPSIS +.P +.RS 2 +.nf +npm adduser [\-\-registry=url] [\-\-scope=@orgname] [\-\-always\-auth] + +aliases: login, add\-user +.fi +.RE +.SH DESCRIPTION +.P +Create or verify a user named \fB\fP in the specified registry, and +save the credentials to the \fB\|\.npmrc\fP file\. If no registry is specified, +the default registry will be used (see npm help 7 \fBnpm\-config\fP)\. +.P +The username, password, and email are read in from prompts\. +.P +To reset your password, go to https://www\.npmjs\.com/forgot +.P +To change your email address, go to https://www\.npmjs\.com/email\-edit +.P +You may use this command multiple times with the same user account to +authorize on a new machine\. When authenticating on a new machine, +the username, password and email address must all match with +your existing record\. +.P +\fBnpm login\fP is an alias to \fBadduser\fP and behaves exactly the same way\. +.SH CONFIGURATION +.SS registry +.P +Default: https://registry\.npmjs\.org/ +.P +The base URL of the npm package registry\. If \fBscope\fP is also specified, +this registry will only be used for packages with that scope\. See npm help 7 \fBnpm\-scope\fP\|\. +.SS scope +.P +Default: none +.P +If specified, the user and login credentials given will be associated +with the specified scope\. See npm help 7 \fBnpm\-scope\fP\|\. You can use both at the same time, +e\.g\. +.P +.RS 2 +.nf +npm adduser \-\-registry=http://myregistry\.example\.com \-\-scope=@myco +.fi +.RE +.P +This will set a registry for the given scope and login or create a user for +that registry at the same time\. +.SS always\-auth +.P +Default: false +.P +If specified, save configuration indicating that all requests to the given +registry should include authorization information\. Useful for private +registries\. Can be used with \fB\-\-registry\fP and / or \fB\-\-scope\fP, e\.g\. +.P +.RS 2 +.nf +npm adduser \-\-registry=http://private\-registry\.example\.com \-\-always\-auth +.fi +.RE +.P +This will ensure that all requests to that registry (including for tarballs) +include an authorization header\. This setting may be necessary for use with +private registries where metadata and package tarballs are stored on hosts with +different hostnames\. See \fBalways\-auth\fP in npm help 7 \fBnpm\-config\fP for more details on +always\-auth\. Registry\-specific configuration of \fBalways\-auth\fP takes precedence +over any global configuration\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help owner +.IP \(bu 2 +npm help whoami + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-bin.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-bin.1 new file mode 100644 index 00000000..9489f6b5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-bin.1 @@ -0,0 +1,30 @@ +.TH "NPM\-BIN" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-bin\fR \- Display npm bin folder +.SH SYNOPSIS +.P +.RS 2 +.nf +npm bin +.fi +.RE +.SH DESCRIPTION +.P +Print the folder where npm will install executables\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help prefix +.IP \(bu 2 +npm help root +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-bugs.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-bugs.1 new file mode 100644 index 00000000..219b4228 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-bugs.1 @@ -0,0 +1,61 @@ +.TH "NPM\-BUGS" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe +.SH SYNOPSIS +.P +.RS 2 +.nf +npm bugs +npm bugs (with no args in a package dir) + +aliases: issues +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +bug tracker URL, and then tries to open it using the \fB\-\-browser\fP +config param\. If no package name is provided, it will search for +a \fBpackage\.json\fP in the current folder and use the \fBname\fP property\. +.SH CONFIGURATION +.SS browser +.RS 0 +.IP \(bu 2 +Default: OS X: \fB"open"\fP, Windows: \fB"start"\fP, Others: \fB"xdg\-open"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The browser that is called by the \fBnpm bugs\fP command to open websites\. +.SS registry +.RS 0 +.IP \(bu 2 +Default: https://registry\.npmjs\.org/ +.IP \(bu 2 +Type: url + +.RE +.P +The base URL of the npm package registry\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help docs +.IP \(bu 2 +npm help view +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 5 package\.json + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-build.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-build.1 new file mode 100644 index 00000000..d2cdccc2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-build.1 @@ -0,0 +1,41 @@ +.TH "NPM\-BUILD" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-build\fR \- Build a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm build +.fi +.RE +.RS 0 +.IP \(bu 2 +\fB\fP: +A folder containing a \fBpackage\.json\fP file in its root\. + +.RE +.SH DESCRIPTION +.P +This is the plumbing command called by \fBnpm link\fP and \fBnpm install\fP\|\. +.P +It should generally be called during installation, but if you need to run it +directly, run: +.P +.RS 2 +.nf +npm run\-script build +.fi +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help link +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help 5 package\.json + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-bundle.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-bundle.1 new file mode 100644 index 00000000..e2de651c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-bundle.1 @@ -0,0 +1,17 @@ +.TH "NPM\-BUNDLE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-bundle\fR \- REMOVED +.SH DESCRIPTION +.P +The \fBnpm bundle\fP command has been removed in 1\.0, for the simple reason +that it is no longer necessary, as the default behavior is now to +install packages into the local space\. +.P +Just use \fBnpm install\fP now to do what \fBnpm bundle\fP used to do\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-cache.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-cache.1 new file mode 100644 index 00000000..0bb06ee7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-cache.1 @@ -0,0 +1,86 @@ +.TH "NPM\-CACHE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-cache\fR \- Manipulates packages cache +.SH SYNOPSIS +.P +.RS 2 +.nf +npm cache add +npm cache add +npm cache add +npm cache add @ + +npm cache ls [] + +npm cache clean [] +.fi +.RE +.SH DESCRIPTION +.P +Used to add, list, or clear the npm cache folder\. +.RS 0 +.IP \(bu 2 +add: +Add the specified package to the local cache\. This command is primarily +intended to be used internally by npm, but it can provide a way to +add data to the local installation cache explicitly\. +.IP \(bu 2 +ls: +Show the data in the cache\. Argument is a path to show in the cache +folder\. Works a bit like the \fBfind\fP program, but limited by the +\fBdepth\fP config\. +.IP \(bu 2 +clean: +Delete data out of the cache folder\. If an argument is provided, then +it specifies a subpath to delete\. If no argument is provided, then +the entire cache is cleared\. + +.RE +.SH DETAILS +.P +npm stores cache data in the directory specified in \fBnpm config get cache\fP\|\. +For each package that is added to the cache, three pieces of information are +stored in \fB{cache}/{name}/{version}\fP: +.RS 0 +.IP \(bu 2 +\|\.\.\./package/package\.json: +The package\.json file, as npm sees it\. +.IP \(bu 2 +\|\.\.\./package\.tgz: +The tarball for that version\. + +.RE +.P +Additionally, whenever a registry request is made, a \fB\|\.cache\.json\fP file +is placed at the corresponding URI, to store the ETag and the requested +data\. This is stored in \fB{cache}/{hostname}/{path}/\.cache\.json\fP\|\. +.P +Commands that make non\-essential registry requests (such as \fBsearch\fP and +\fBview\fP, or the completion scripts) generally specify a minimum timeout\. +If the \fB\|\.cache\.json\fP file is younger than the specified timeout, then +they do not make an HTTP request to the registry\. +.SH CONFIGURATION +.SS cache +.P +Default: \fB~/\.npm\fP on Posix, or \fB%AppData%/npm\-cache\fP on Windows\. +.P +The root cache folder\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help pack + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-completion.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-completion.1 new file mode 100644 index 00000000..514a4785 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-completion.1 @@ -0,0 +1,37 @@ +.TH "NPM\-COMPLETION" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-completion\fR \- Tab Completion for npm +.SH SYNOPSIS +.P +.RS 2 +.nf +\|\. <(npm completion) +.fi +.RE +.SH DESCRIPTION +.P +Enables tab\-completion in all npm commands\. +.P +The synopsis above +loads the completions into your current shell\. Adding it to +your ~/\.bashrc or ~/\.zshrc will make the completions available +everywhere\. +.P +You may of course also pipe the output of npm completion to a file +such as \fB/usr/local/etc/bash_completion\.d/npm\fP if you have a system +that will read that file for you\. +.P +When \fBCOMP_CWORD\fP, \fBCOMP_LINE\fP, and \fBCOMP_POINT\fP are defined in the +environment, \fBnpm completion\fP acts in "plumbing mode", and outputs +completions based on the arguments\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 developers +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help npm + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-config.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-config.1 new file mode 100644 index 00000000..7605c453 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-config.1 @@ -0,0 +1,97 @@ +.TH "NPM\-CONFIG" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-config\fR \- Manage the npm configuration files +.SH SYNOPSIS +.P +.RS 2 +.nf +npm config set [\-\-global] +npm config get +npm config delete +npm config list +npm config edit +npm c [set|get|delete|list] +npm get +npm set [\-\-global] + +aliases: c +.fi +.RE +.SH DESCRIPTION +.P +npm gets its config settings from the command line, environment +variables, \fBnpmrc\fP files, and in some cases, the \fBpackage\.json\fP file\. +.P +See npm help 5 npmrc for more information about the npmrc files\. +.P +See npm help 7 \fBnpm\-config\fP for a more thorough discussion of the mechanisms +involved\. +.P +The \fBnpm config\fP command can be used to update and edit the contents +of the user and global npmrc files\. +.SH Sub\-commands +.P +Config supports the following sub\-commands: +.SS set +.P +.RS 2 +.nf +npm config set key value +.fi +.RE +.P +Sets the config key to the value\. +.P +If value is omitted, then it sets it to "true"\. +.SS get +.P +.RS 2 +.nf +npm config get key +.fi +.RE +.P +Echo the config value to stdout\. +.SS list +.P +.RS 2 +.nf +npm config list +.fi +.RE +.P +Show all the config settings\. +.SS delete +.P +.RS 2 +.nf +npm config delete key +.fi +.RE +.P +Deletes the key from all configuration files\. +.SS edit +.P +.RS 2 +.nf +npm config edit +.fi +.RE +.P +Opens the config file in an editor\. Use the \fB\-\-global\fP flag to edit the +global config\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help npm + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-dedupe.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-dedupe.1 new file mode 100644 index 00000000..0458853a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-dedupe.1 @@ -0,0 +1,76 @@ +.TH "NPM\-DEDUPE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-dedupe\fR \- Reduce duplication +.SH SYNOPSIS +.P +.RS 2 +.nf +npm dedupe [package names\.\.\.] +npm ddp [package names\.\.\.] + +aliases: find\-dupes, ddp +.fi +.RE +.SH DESCRIPTION +.P +Searches the local package tree and attempts to simplify the overall +structure by moving dependencies further up the tree, where they can +be more effectively shared by multiple dependent packages\. +.P +For example, consider this dependency graph: +.P +.RS 2 +.nf +a ++\-\- b <\-\- depends on c@1\.0\.x +| `\-\- c@1\.0\.3 +`\-\- d <\-\- depends on c@~1\.0\.9 + `\-\- c@1\.0\.10 +.fi +.RE +.P +In this case, npm help \fBnpm\-dedupe\fP will transform the tree to: +.P +.RS 2 +.nf +a ++\-\- b ++\-\- d +`\-\- c@1\.0\.10 +.fi +.RE +.P +Because of the hierarchical nature of node's module lookup, b and d +will both get their dependency met by the single c package at the root +level of the tree\. +.P +If a suitable version exists at the target location in the tree +already, then it will be left untouched, but the other duplicates will +be deleted\. +.P +If no suitable version can be found, then a warning is printed, and +nothing is done\. +.P +If any arguments are supplied, then they are filters, and only the +named packages will be touched\. +.P +Note that this operation transforms the dependency tree, and may +result in packages getting updated versions, perhaps from the npm +registry\. +.P +This feature is experimental, and may change in future versions\. +.P +The \fB\-\-tag\fP argument will apply to all of the affected dependencies\. If a +tag with the given name exists, the tagged version is preferred over newer +versions\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help ls +.IP \(bu 2 +npm help update +.IP \(bu 2 +npm help install + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-deprecate.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-deprecate.1 new file mode 100644 index 00000000..2d80be00 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-deprecate.1 @@ -0,0 +1,37 @@ +.TH "NPM\-DEPRECATE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-deprecate\fR \- Deprecate a version of a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm deprecate [@] +.fi +.RE +.SH DESCRIPTION +.P +This command will update the npm registry entry for a package, providing +a deprecation warning to all who attempt to install it\. +.P +It works on version ranges as well as specific versions, so you can do +something like this: +.P +.RS 2 +.nf +npm deprecate my\-thing@"< 0\.2\.3" "critical bug fixed in v0\.2\.3" +.fi +.RE +.P +Note that you must be the package owner to deprecate something\. See the +\fBowner\fP and \fBadduser\fP help topics\. +.P +To un\-deprecate a package, specify an empty string (\fB""\fP) for the \fBmessage\fP argument\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 registry + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-dist-tag.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-dist-tag.1 new file mode 100644 index 00000000..65871068 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-dist-tag.1 @@ -0,0 +1,108 @@ +.TH "NPM\-DIST\-TAG" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-dist-tag\fR \- Modify package distribution tags +.SH SYNOPSIS +.P +.RS 2 +.nf +npm dist\-tag add @ [] +npm dist\-tag rm +npm dist\-tag ls [] + +aliases: dist\-tags +.fi +.RE +.SH DESCRIPTION +.P +Add, remove, and enumerate distribution tags on a package: +.RS 0 +.IP \(bu 2 +add: +Tags the specified version of the package with the specified tag, or the +\fB\-\-tag\fP config if not specified\. +.IP \(bu 2 +rm: +Clear a tag that is no longer in use from the package\. +.IP \(bu 2 +ls: +Show all of the dist\-tags for a package, defaulting to the package in +the current prefix\. + +.RE +.P +A tag can be used when installing packages as a reference to a version instead +of using a specific version number: +.P +.RS 2 +.nf +npm install @ +.fi +.RE +.P +When installing dependencies, a preferred tagged version may be specified: +.P +.RS 2 +.nf +npm install \-\-tag +.fi +.RE +.P +This also applies to \fBnpm dedupe\fP\|\. +.P +Publishing a package sets the \fBlatest\fP tag to the published version unless the +\fB\-\-tag\fP option is used\. For example, \fBnpm publish \-\-tag=beta\fP\|\. +.P +By default, \fBnpm install \fP (without any \fB@\fP or \fB@\fP +specifier) installs the \fBlatest\fP tag\. +.SH PURPOSE +.P +Tags can be used to provide an alias instead of version numbers\. +.P +For example, a project might choose to have multiple streams of development +and use a different tag for each stream, +e\.g\., \fBstable\fP, \fBbeta\fP, \fBdev\fP, \fBcanary\fP\|\. +.P +By default, the \fBlatest\fP tag is used by npm to identify the current version of +a package, and \fBnpm install \fP (without any \fB@\fP or \fB@\fP +specifier) installs the \fBlatest\fP tag\. Typically, projects only use the \fBlatest\fP +tag for stable release versions, and use other tags for unstable versions such +as prereleases\. +.P +The \fBnext\fP tag is used by some projects to identify the upcoming version\. +.P +By default, other than \fBlatest\fP, no tag has any special significance to npm +itself\. +.SH CAVEATS +.P +This command used to be known as \fBnpm tag\fP, which only created new tags, and so +had a different syntax\. +.P +Tags must share a namespace with version numbers, because they are specified in +the same slot: \fBnpm install @\fP vs \fBnpm install @\fP\|\. +.P +Tags that can be interpreted as valid semver ranges will be rejected\. For +example, \fBv1\.4\fP cannot be used as a tag, because it is interpreted by semver as +\fB>=1\.4\.0 <1\.5\.0\fP\|\. See https://github\.com/npm/npm/issues/6082\|\. +.P +The simplest way to avoid semver problems with tags is to use tags that do not +begin with a number or the letter \fBv\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help tag +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help dedupe +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-docs.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-docs.1 new file mode 100644 index 00000000..d1b5f118 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-docs.1 @@ -0,0 +1,60 @@ +.TH "NPM\-DOCS" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-docs\fR \- Docs for a package in a web browser maybe +.SH SYNOPSIS +.P +.RS 2 +.nf +npm docs [ [ \.\.\.]] +npm docs (with no args in a package dir) +npm home [ [ \.\.\.]] +npm home (with no args in a package dir) +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +documentation URL, and then tries to open it using the \fB\-\-browser\fP +config param\. You can pass multiple package names at once\. If no +package name is provided, it will search for a \fBpackage\.json\fP in +the current folder and use the \fBname\fP property\. +.SH CONFIGURATION +.SS browser +.RS 0 +.IP \(bu 2 +Default: OS X: \fB"open"\fP, Windows: \fB"start"\fP, Others: \fB"xdg\-open"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The browser that is called by the \fBnpm docs\fP command to open websites\. +.SS registry +.RS 0 +.IP \(bu 2 +Default: https://registry\.npmjs\.org/ +.IP \(bu 2 +Type: url + +.RE +.P +The base URL of the npm package registry\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help view +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 5 package\.json + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-edit.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-edit.1 new file mode 100644 index 00000000..fcf2f3aa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-edit.1 @@ -0,0 +1,50 @@ +.TH "NPM\-EDIT" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-edit\fR \- Edit an installed package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm edit [@] +.fi +.RE +.SH DESCRIPTION +.P +Opens the package folder in the default editor (or whatever you've +configured as the npm \fBeditor\fP config \-\- see npm help 7 \fBnpm\-config\fP\|\.) +.P +After it has been edited, the package is rebuilt so as to pick up any +changes in compiled packages\. +.P +For instance, you can do \fBnpm install connect\fP to install connect +into your package, and then \fBnpm edit connect\fP to make a few +changes to your locally installed copy\. +.SH CONFIGURATION +.SS editor +.RS 0 +.IP \(bu 2 +Default: \fBEDITOR\fP environment variable if set, or \fB"vi"\fP on Posix, +or \fB"notepad"\fP on Windows\. +.IP \(bu 2 +Type: path + +.RE +.P +The command to run for \fBnpm edit\fP or \fBnpm config edit\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help explore +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-explore.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-explore.1 new file mode 100644 index 00000000..10de60d0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-explore.1 @@ -0,0 +1,55 @@ +.TH "NPM\-EXPLORE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-explore\fR \- Browse an installed package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm explore [ \-\- ] +.fi +.RE +.SH DESCRIPTION +.P +Spawn a subshell in the directory of the installed package specified\. +.P +If a command is specified, then it is run in the subshell, which then +immediately terminates\. +.P +This is particularly handy in the case of git submodules in the +\fBnode_modules\fP folder: +.P +.RS 2 +.nf +npm explore some\-dependency \-\- git pull origin master +.fi +.RE +.P +Note that the package is \fInot\fR automatically rebuilt afterwards, so be +sure to use \fBnpm rebuild \fP if you make any changes\. +.SH CONFIGURATION +.SS shell +.RS 0 +.IP \(bu 2 +Default: SHELL environment variable, or "bash" on Posix, or "cmd" on +Windows +.IP \(bu 2 +Type: path + +.RE +.P +The shell to run for the \fBnpm explore\fP command\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help edit +.IP \(bu 2 +npm help rebuild +.IP \(bu 2 +npm help build +.IP \(bu 2 +npm help install + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-help-search.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-help-search.1 new file mode 100644 index 00000000..cbda29e8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-help-search.1 @@ -0,0 +1,45 @@ +.TH "NPM\-HELP\-SEARCH" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-help-search\fR \- Search npm help documentation +.SH SYNOPSIS +.P +.RS 2 +.nf +npm help\-search some search terms +.fi +.RE +.SH DESCRIPTION +.P +This command will search the npm markdown documentation files for the +terms provided, and then list the results, sorted by relevance\. +.P +If only one result is found, then it will show that help topic\. +.P +If the argument to \fBnpm help\fP is not a known help topic, then it will +call \fBhelp\-search\fP\|\. It is rarely if ever necessary to call this +command directly\. +.SH CONFIGURATION +.SS long +.RS 0 +.IP \(bu 2 +Type: Boolean +.IP \(bu 2 +Default: false + +.RE +.P +If true, the "long" flag will cause help\-search to output context around +where the terms were found in the documentation\. +.P +If false, then help\-search will just list out the help topics found\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help npm +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help help + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-help.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-help.1 new file mode 100644 index 00000000..56b5e906 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-help.1 @@ -0,0 +1,57 @@ +.TH "NPM\-HELP" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-help\fR \- Get help on npm +.SH SYNOPSIS +.P +.RS 2 +.nf +npm help +npm help some search terms +.fi +.RE +.SH DESCRIPTION +.P +If supplied a topic, then show the appropriate documentation page\. +.P +If the topic does not exist, or if multiple terms are provided, then run +the \fBhelp\-search\fP command to find a match\. Note that, if \fBhelp\-search\fP +finds a single subject, then it will run \fBhelp\fP on that topic, so unique +matches are equivalent to specifying a topic name\. +.SH CONFIGURATION +.SS viewer +.RS 0 +.IP \(bu 2 +Default: "man" on Posix, "browser" on Windows +.IP \(bu 2 +Type: path + +.RE +.P +The program to use to view help content\. +.P +Set to \fB"browser"\fP to view html help content in the default web browser\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help npm +.IP \(bu 2 +README +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help help\-search +.IP \(bu 2 +npm help 7 index + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-init.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-init.1 new file mode 100644 index 00000000..a4643cce --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-init.1 @@ -0,0 +1,49 @@ +.TH "NPM\-INIT" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-init\fR \- Interactively create a package\.json file +.SH SYNOPSIS +.P +.RS 2 +.nf +npm init [\-f|\-\-force|\-y|\-\-yes] +.fi +.RE +.SH DESCRIPTION +.P +This will ask you a bunch of questions, and then write a package\.json for you\. +.P +It attempts to make reasonable guesses about what you want things to be set to, +and then writes a package\.json file with the options you've selected\. +.P +If you already have a package\.json file, it'll read that first, and default to +the options in there\. +.P +It is strictly additive, so it does not delete options from your package\.json +without a really good reason to do so\. +.P +If you invoke it with \fB\-f\fP, \fB\-\-force\fP, \fB\-y\fP, or \fB\-\-yes\fP, it will use only +defaults and not prompt you for any options\. +.SH CONFIGURATION +.SS scope +.RS 0 +.IP \(bu 2 +Default: none +.IP \(bu 2 +Type: String + +.RE +.P +The scope under which the new module should be created\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +https://github\.com/isaacs/init\-package\-json +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help version +.IP \(bu 2 +npm help 7 scope + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-install.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-install.1 new file mode 100644 index 00000000..371ed989 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-install.1 @@ -0,0 +1,413 @@ +.TH "NPM\-INSTALL" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-install\fR \- Install a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm install (with no args in a package dir) +npm install +npm install +npm install +npm install [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional] [\-\-save\-exact] [\-\-save\-bundle] +npm install [@/]@ +npm install [@/]@ +npm install [@/]@ +npm i (with any of the previous argument usage) +.fi +.RE +.SH DESCRIPTION +.P +This command installs a package, and any packages that it depends on\. If the +package has a shrinkwrap file, the installation of dependencies will be driven +by that\. See npm help shrinkwrap\. +.P +A \fBpackage\fP is: +.RS 0 +.IP \(bu 2 +a) a folder containing a program described by a npm help 5 \fBpackage\.json\fP file +.IP \(bu 2 +b) a gzipped tarball containing (a) +.IP \(bu 2 +c) a url that resolves to (b) +.IP \(bu 2 +d) a \fB@\fP that is published on the registry (see npm help 7 \fBnpm\-registry\fP) with (c) +.IP \(bu 2 +e) a \fB@\fP (see npm help \fBnpm\-dist\-tag\fP) that points to (d) +.IP \(bu 2 +f) a \fB\fP that has a "latest" tag satisfying (e) +.IP \(bu 2 +g) a \fB\fP that resolves to (b) + +.RE +.P +Even if you never publish your package, you can still get a lot of +benefits of using npm if you just want to write a node program (a), and +perhaps if you also want to be able to easily install it elsewhere +after packing it up into a tarball (b)\. +.RS 0 +.IP \(bu 2 +\fBnpm install\fP (in package directory, no arguments): + Install the dependencies in the local node_modules folder\. + In global mode (ie, with \fB\-g\fP or \fB\-\-global\fP appended to the command), + it installs the current package context (ie, the current working + directory) as a global package\. + By default, \fBnpm install\fP will install all modules listed as dependencies + in npm help 5 \fBpackage\.json\fP\|\. + With the \fB\-\-production\fP flag (or when the \fBNODE_ENV\fP environment variable + is set to \fBproduction\fP), npm will not install modules listed in + \fBdevDependencies\fP\|\. +.IP \(bu 2 +\fBnpm install \fP: + Install a package that is sitting in a folder on the filesystem\. +.IP \(bu 2 +\fBnpm install \fP: + Install a package that is sitting on the filesystem\. Note: if you just want + to link a dev directory into your npm root, you can do this more easily by + using \fBnpm link\fP\|\. + Example: +.P +.RS 2 +.nf + npm install \./package\.tgz +.fi +.RE +.IP \(bu 2 +\fBnpm install \fP: + Fetch the tarball url, and then install it\. In order to distinguish between + this and other options, the argument must start with "http://" or "https://" + Example: +.P +.RS 2 +.nf + npm install https://github\.com/indexzero/forever/tarball/v0\.5\.6 +.fi +.RE +.IP \(bu 2 +\fBnpm install [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional]\fP: + Do a \fB@\fP install, where \fB\fP is the "tag" config\. (See + npm help 7 \fBnpm\-config\fP\|\. The config's default value is \fBlatest\fP\|\.) + In most cases, this will install the latest version + of the module published on npm\. + Example: +.P +.RS 2 +.nf + npm install sax +.fi +.RE + \fBnpm install\fP takes 3 exclusive, optional flags which save or update + the package version in your main package\.json: +.RS 0 +.IP \(bu 2 +\fB\-\-save\fP: Package will appear in your \fBdependencies\fP\|\. +.IP \(bu 2 +\fB\-\-save\-dev\fP: Package will appear in your \fBdevDependencies\fP\|\. +.IP \(bu 2 +\fB\-\-save\-optional\fP: Package will appear in your \fBoptionalDependencies\fP\|\. +When using any of the above options to save dependencies to your +package\.json, there are two additional, optional flags: +.IP \(bu 2 +\fB\-\-save\-exact\fP: Saved dependencies will be configured with an +exact version rather than using npm's default semver range +operator\. +.IP \(bu 2 +\fB\-B, \-\-save\-bundle\fP: Saved dependencies will also be added to your \fBbundleDependencies\fP list\. +Note: if you do not include the @\-symbol on your scope name, npm will +interpret this as a GitHub repository instead, see below\. Scopes names +must also be followed by a slash\. +Examples: +.P +.RS 2 +.nf +npm install sax \-\-save +npm install githubname/reponame +npm install @myorg/privatepackage +npm install node\-tap \-\-save\-dev +npm install dtrace\-provider \-\-save\-optional +npm install readable\-stream \-\-save \-\-save\-exact +npm install ansi\-regex \-\-save \-\-save\-bundle +.fi +.RE + +.RE + +.RE +.P +.RS 2 +.nf +**Note**: If there is a file or folder named `` in the current +working directory, then it will try to install that, and only try to +fetch the package by name if it is not valid\. +.fi +.RE +.RS 0 +.IP \(bu 2 +\fBnpm install [@/]@\fP: + Install the version of the package that is referenced by the specified tag\. + If the tag does not exist in the registry data for that package, then this + will fail\. + Example: +.P +.RS 2 +.nf + npm install sax@latest + npm install @myorg/mypackage@latest +.fi +.RE +.IP \(bu 2 +\fBnpm install [@/]@\fP: + Install the specified version of the package\. This will fail if the + version has not been published to the registry\. + Example: +.P +.RS 2 +.nf + npm install sax@0\.1\.1 + npm install @myorg/privatepackage@1\.5\.0 +.fi +.RE +.IP \(bu 2 +\fBnpm install [@/]@\fP: + Install a version of the package matching the specified version range\. This + will follow the same rules for resolving dependencies described in npm help 5 \fBpackage\.json\fP\|\. + Note that most version ranges must be put in quotes so that your shell will + treat it as a single argument\. + Example: +.P +.RS 2 +.nf + npm install sax@">=0\.1\.0 <0\.2\.0" + npm install @myorg/privatepackage@">=0\.1\.0 <0\.2\.0" +.fi +.RE +.IP \(bu 2 +\fBnpm install \fP: + Install a package by cloning a git remote url\. The format of the git + url is: +.P +.RS 2 +.nf + ://[[:]@][:][:/][#] +.fi +.RE + \fB\fP is one of \fBgit\fP, \fBgit+ssh\fP, \fBgit+http\fP, or + \fBgit+https\fP\|\. If no \fB\fP is specified, then \fBmaster\fP is + used\. + The following git environment variables are recognized by npm and will be added + to the environment when running git: +.RS 0 +.IP \(bu 2 +\fBGIT_ASKPASS\fP +.IP \(bu 2 +\fBGIT_PROXY_COMMAND\fP +.IP \(bu 2 +\fBGIT_SSH\fP +.IP \(bu 2 +\fBGIT_SSH_COMMAND\fP +.IP \(bu 2 +\fBGIT_SSL_CAINFO\fP +.IP \(bu 2 +\fBGIT_SSL_NO_VERIFY\fP +See the git man page for details\. +Examples: +.P +.RS 2 +.nf +npm install git+ssh://git@github\.com:npm/npm\.git#v1\.0\.27 +npm install git+https://isaacs@github\.com/npm/npm\.git +npm install git://github\.com/npm/npm\.git#v1\.0\.27 +GIT_SSH_COMMAND='ssh \-i ~/\.ssh/custom_ident' npm install git+ssh://git@github\.com:npm/npm\.git +.fi +.RE + +.RE +.IP \(bu 2 +\fBnpm install /[#]\fP: +.IP \(bu 2 +\fBnpm install github:/[#]\fP: + Install the package at \fBhttps://github\.com/githubname/githubrepo\fP by + attempting to clone it using \fBgit\fP\|\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fP will be used\. + Examples: +.P +.RS 2 +.nf + npm install mygithubuser/myproject + npm install github:mygithubuser/myproject +.fi +.RE +.IP \(bu 2 +\fBnpm install gist:[/][#]\fP: + Install the package at \fBhttps://gist\.github\.com/gistID\fP by attempting to + clone it using \fBgit\fP\|\. The GitHub username associated with the gist is + optional and will not be saved in \fBpackage\.json\fP if \fB\-\-save\fP is used\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fP will be used\. + Example: +.P +.RS 2 +.nf + npm install gist:101a11beef +.fi +.RE +.IP \(bu 2 +\fBnpm install bitbucket:/[#]\fP: + Install the package at \fBhttps://bitbucket\.org/bitbucketname/bitbucketrepo\fP + by attempting to clone it using \fBgit\fP\|\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fP will be used\. + Example: +.P +.RS 2 +.nf + npm install bitbucket:mybitbucketuser/myproject +.fi +.RE +.IP \(bu 2 +\fBnpm install gitlab:/[#]\fP: + Install the package at \fBhttps://gitlab\.com/gitlabname/gitlabrepo\fP + by attempting to clone it using \fBgit\fP\|\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fP will be used\. + Example: +.P +.RS 2 +.nf + npm install gitlab:mygitlabuser/myproject +.fi +.RE + +.RE +.P +You may combine multiple arguments, and even multiple types of arguments\. +For example: +.P +.RS 2 +.nf +npm install sax@">=0\.1\.0 <0\.2\.0" bench supervisor +.fi +.RE +.P +The \fB\-\-tag\fP argument will apply to all of the specified install targets\. If a +tag with the given name exists, the tagged version is preferred over newer +versions\. +.P +The \fB\-\-force\fP argument will force npm to fetch remote resources even if a +local copy exists on disk\. +.P +.RS 2 +.nf +npm install sax \-\-force +.fi +.RE +.P +The \fB\-\-global\fP argument will cause npm to install the package globally +rather than locally\. See npm help 5 \fBnpm\-folders\fP\|\. +.P +The \fB\-\-link\fP argument will cause npm to link global installs into the +local space in some cases\. +.P +The \fB\-\-no\-bin\-links\fP argument will prevent npm from creating symlinks for +any binaries the package might contain\. +.P +The \fB\-\-no\-optional\fP argument will prevent optional dependencies from +being installed\. +.P +The \fB\-\-no\-shrinkwrap\fP argument, which will ignore an available +shrinkwrap file and use the package\.json instead\. +.P +The \fB\-\-nodedir=/path/to/node/source\fP argument will allow npm to find the +node source code so that npm can compile native modules\. +.P +See npm help 7 \fBnpm\-config\fP\|\. Many of the configuration params have some +effect on installation, since that's most of what npm does\. +.SH ALGORITHM +.P +To install a package, npm uses the following algorithm: +.P +.RS 2 +.nf +install(where, what, family, ancestors) +fetch what, unpack to /node_modules/ +for each dep in what\.dependencies + resolve dep to precise version +for each dep@version in what\.dependencies + not in /node_modules//node_modules/* + and not in + add precise version deps to + install(/node_modules/, dep, family) +.fi +.RE +.P +For this \fBpackage{dep}\fP structure: \fBA{B,C}, B{C}, C{D}\fP, +this algorithm produces: +.P +.RS 2 +.nf +A ++\-\- B +`\-\- C + `\-\- D +.fi +.RE +.P +That is, the dependency from B to C is satisfied by the fact that A +already caused C to be installed at a higher level\. +.P +See npm help 5 folders for a more detailed description of the specific +folder structures that npm creates\. +.SS Limitations of npm's Install Algorithm +.P +There are some very rare and pathological edge\-cases where a cycle can +cause npm to try to install a never\-ending tree of packages\. Here is +the simplest case: +.P +.RS 2 +.nf +A \-> B \-> A' \-> B' \-> A \-> B \-> A' \-> B' \-> A \-> \.\.\. +.fi +.RE +.P +where \fBA\fP is some version of a package, and \fBA'\fP is a different version +of the same package\. Because \fBB\fP depends on a different version of \fBA\fP +than the one that is already in the tree, it must install a separate +copy\. The same is true of \fBA'\fP, which must install \fBB'\fP\|\. Because \fBB'\fP +depends on the original version of \fBA\fP, which has been overridden, the +cycle falls into infinite regress\. +.P +To avoid this situation, npm flat\-out refuses to install any +\fBname@version\fP that is already present anywhere in the tree of package +folder ancestors\. A more correct, but more complex, solution would be +to symlink the existing version into the new location\. If this ever +affects a real use\-case, it will be investigated\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help update +.IP \(bu 2 +npm help link +.IP \(bu 2 +npm help rebuild +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help build +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help tag +.IP \(bu 2 +npm help uninstall +.IP \(bu 2 +npm help shrinkwrap +.IP \(bu 2 +npm help 5 package\.json + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-link.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-link.1 new file mode 100644 index 00000000..a70d07cc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-link.1 @@ -0,0 +1,102 @@ +.TH "NPM\-LINK" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-link\fR \- Symlink a package folder +.SH SYNOPSIS +.P +.RS 2 +.nf +npm link (in package folder) +npm link [@/] +npm ln (with any of the previous argument usage) +.fi +.RE +.SH DESCRIPTION +.P +Package linking is a two\-step process\. +.P +First, \fBnpm link\fP in a package folder will create a symlink in the global folder +\fB{prefix}/lib/node_modules/\fP that links to the package where the \fBnpm +link\fP command was executed\. (see npm help 7 \fBnpm\-config\fP for the value of \fBprefix\fP)\. +.P +Next, in some other location, \fBnpm link package\-name\fP will create a +symbolic link from globally\-installed \fBpackage\-name\fP to \fBnode_modules/\fP +of the current folder\. +.P +Note that \fBpackage\-name\fP is taken from \fBpackage\.json\fP, +not from directory name\. +.P +The package name can be optionally prefixed with a scope\. See npm help 7 \fBnpm\-scope\fP\|\. +The scope must be preceded by an @\-symbol and followed by a slash\. +.P +When creating tarballs for \fBnpm publish\fP, the linked packages are +"snapshotted" to their current state by resolving the symbolic links\. +.P +This is handy for installing your own stuff, so that you can work on it and +test it iteratively without having to continually rebuild\. +.P +For example: +.P +.RS 2 +.nf +cd ~/projects/node\-redis # go into the package directory +npm link # creates global link +cd ~/projects/node\-bloggy # go into some other package directory\. +npm link redis # link\-install the package +.fi +.RE +.P +Now, any changes to ~/projects/node\-redis will be reflected in +~/projects/node\-bloggy/node_modules/node\-redis/\. Note that the link should +be to the package name, not the directory name for that package\. +.P +You may also shortcut the two steps in one\. For example, to do the +above use\-case in a shorter way: +.P +.RS 2 +.nf +cd ~/projects/node\-bloggy # go into the dir of your main project +npm link \.\./node\-redis # link the dir of your dependency +.fi +.RE +.P +The second line is the equivalent of doing: +.P +.RS 2 +.nf +(cd \.\./node\-redis; npm link) +npm link node\-redis +.fi +.RE +.P +That is, it first creates a global link, and then links the global +installation target into your project's \fBnode_modules\fP folder\. +.P +If your linked package is scoped (see npm help 7 \fBnpm\-scope\fP) your link command must +include that scope, e\.g\. +.P +.RS 2 +.nf +npm link @myorg/privatepackage +.fi +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 developers +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-logout.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-logout.1 new file mode 100644 index 00000000..d30ba122 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-logout.1 @@ -0,0 +1,56 @@ +.TH "NPM\-LOGOUT" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-logout\fR \- Log out of the registry +.SH SYNOPSIS +.P +.RS 2 +.nf +npm logout [\-\-registry=url] [\-\-scope=@orgname] +.fi +.RE +.SH DESCRIPTION +.P +When logged into a registry that supports token\-based authentication, tell the +server to end this token's session\. This will invalidate the token everywhere +you're using it, not just for the current environment\. +.P +When logged into a legacy registry that uses username and password authentication, this will +clear the credentials in your user configuration\. In this case, it will \fIonly\fR affect +the current environment\. +.P +If \fB\-\-scope\fP is provided, this will find the credentials for the registry +connected to that scope, if set\. +.SH CONFIGURATION +.SS registry +.P +Default: https://registry\.npmjs\.org/ +.P +The base URL of the npm package registry\. If \fBscope\fP is also specified, +it takes precedence\. +.SS scope +.P +Default: none +.P +If specified, you will be logged out of the specified scope\. See npm help 7 \fBnpm\-scope\fP\|\. +.P +.RS 2 +.nf +npm logout \-\-scope=@myco +.fi +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help whoami + +.RE diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-ls.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-ls.1 new file mode 100644 index 00000000..70d1bb48 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-ls.1 @@ -0,0 +1,131 @@ +.TH "NPM\-LS" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-ls\fR \- List installed packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm list [[@/] \.\.\.] +npm ls [[@/] \.\.\.] +npm la [[@/] \.\.\.] +npm ll [[@/] \.\.\.] +.fi +.RE +.SH DESCRIPTION +.P +This command will print to stdout all the versions of packages that are +installed, as well as their dependencies, in a tree\-structure\. +.P +Positional arguments are \fBname@version\-range\fP identifiers, which will +limit the results to only the paths to the packages named\. Note that +nested packages will \fIalso\fR show the paths to the specified packages\. +For example, running \fBnpm ls promzard\fP in npm's source tree will show: +.P +.RS 2 +.nf +npm@2.15.1 /path/to/npm +└─┬ init\-package\-json@0\.0\.4 + └── promzard@0\.1\.5 +.fi +.RE +.P +It will print out extraneous, missing, and invalid packages\. +.P +If a project specifies git urls for dependencies these are shown +in parentheses after the name@version to make it easier for users to +recognize potential forks of a project\. +.P +When run as \fBll\fP or \fBla\fP, it shows extended information by default\. +.SH CONFIGURATION +.SS json +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show information in JSON format\. +.SS long +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show extended information\. +.SS parseable +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show parseable output instead of tree view\. +.SS global +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +List packages in the global install prefix instead of in the current +project\. +.SS depth +.RS 0 +.IP \(bu 2 +Type: Int + +.RE +.P +Max display depth of the dependency tree\. +.SS prod / production +.RS 0 +.IP \(bu 2 +Type: Boolean +.IP \(bu 2 +Default: false + +.RE +.P +Display only the dependency tree for packages in \fBdependencies\fP\|\. +.SS dev +.RS 0 +.IP \(bu 2 +Type: Boolean +.IP \(bu 2 +Default: false + +.RE +.P +Display only the dependency tree for packages in \fBdevDependencies\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help link +.IP \(bu 2 +npm help prune +.IP \(bu 2 +npm help outdated +.IP \(bu 2 +npm help update + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-outdated.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-outdated.1 new file mode 100644 index 00000000..2788606a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-outdated.1 @@ -0,0 +1,151 @@ +.TH "NPM\-OUTDATED" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-outdated\fR \- Check for outdated packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm outdated [ [ \.\.\.]] +.fi +.RE +.SH DESCRIPTION +.P +This command will check the registry to see if any (or, specific) installed +packages are currently outdated\. +.P +In the output: +.RS 0 +.IP \(bu 2 +\fBwanted\fP is the maximum version of the package that satisfies the semver +range specified in \fBpackage\.json\fP\|\. If there's no available semver range (i\.e\. +you're running \fBnpm outdated \-\-global\fP, or the package isn't included in +\fBpackage\.json\fP), then \fBwanted\fP shows the currently\-installed version\. +.IP \(bu 2 +\fBlatest\fP is the version of the package tagged as latest in the registry\. +Running \fBnpm publish\fP with no special configuration will publish the package +with a dist\-tag of \fBlatest\fP\|\. This may or may not be the maximum version of +the package, or the most\-recently published version of the package, depending +on how the package's developer manages the latest npm help dist\-tag\. +.IP \(bu 2 +\fBlocation\fP is where in the dependency tree the package is located\. Note that +\fBnpm outdated\fP defaults to a depth of 0, so unless you override that, you'll +always be seeing only top\-level dependencies that are outdated\. +.IP \(bu 2 +\fBpackage type\fP (when using \fB\-\-long\fP / \fB\-l\fP) tells you whether this package is +a \fBdependency\fP or a \fBdevDependency\fP\|\. Packages not included in \fBpackage\.json\fP +are always marked \fBdependencies\fP\|\. + +.RE +.SS An example +.P +.RS 2 +.nf +$ npm outdated +Package Current Wanted Latest Location +glob 5\.0\.15 5\.0\.15 6\.0\.1 test\-outdated\-output +nothingness 0\.0\.3 git git test\-outdated\-output +npm 3\.5\.1 3\.5\.2 3\.5\.1 test\-outdated\-output +local\-dev 0\.0\.3 linked linked test\-outdated\-output +once 1\.3\.2 1\.3\.3 1\.3\.3 test\-outdated\-output +.fi +.RE +.P +With these \fBdependencies\fP: +.P +.RS 2 +.nf +{ + "glob": "^5\.0\.15", + "nothingness": "github:othiym23/nothingness#master", + "npm": "^3\.5\.1", + "once": "^1\.3\.1" +} +.fi +.RE +.P +A few things to note: +.RS 0 +.IP \(bu 2 +\fBglob\fP requires \fB^5\fP, which prevents npm from installing \fBglob@6\fP, which is +outside the semver range\. +.IP \(bu 2 +Git dependencies will always be reinstalled, because of how they're specified\. +The installed committish might satisfy the dependency specifier (if it's +something immutable, like a commit SHA), or it might not, so \fBnpm outdated\fP and +\fBnpm update\fP have to fetch Git repos to check\. This is why currently doing a +reinstall of a Git dependency always forces a new clone and install\. +.IP \(bu 2 +\fBnpm@3\.5\.2\fP is marked as "wanted", but "latest" is \fBnpm@3\.5\.1\fP because npm +uses dist\-tags to manage its \fBlatest\fP and \fBnext\fP release channels\. \fBnpm update\fP +will install the \fInewest\fR version, but \fBnpm install npm\fP (with no semver range) +will install whatever's tagged as \fBlatest\fP\|\. +.IP \(bu 2 +\fBonce\fP is just plain out of date\. Reinstalling \fBnode_modules\fP from scratch or +running \fBnpm update\fP will bring it up to spec\. + +.RE +.SH CONFIGURATION +.SS json +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show information in JSON format\. +.SS long +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show extended information\. +.SS parseable +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show parseable output instead of tree view\. +.SS global +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Check packages in the global install prefix instead of in the current +project\. +.SS depth +.RS 0 +.IP \(bu 2 +Default: 0 +.IP \(bu 2 +Type: Int + +.RE +.P +Max depth for checking dependency tree\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help update +.IP \(bu 2 +npm help dist\-tag +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help 5 folders + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-owner.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-owner.1 new file mode 100644 index 00000000..0d5c9e39 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-owner.1 @@ -0,0 +1,49 @@ +.TH "NPM\-OWNER" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-owner\fR \- Manage package owners +.SH SYNOPSIS +.P +.RS 2 +.nf +npm owner ls +npm owner add +npm owner rm + +aliases: author +.fi +.RE +.SH DESCRIPTION +.P +Manage ownership of published packages\. +.RS 0 +.IP \(bu 2 +ls: +List all the users who have access to modify a package and push new versions\. +Handy when you need to know who to bug for help\. +.IP \(bu 2 +add: +Add a new user as a maintainer of a package\. This user is enabled to modify +metadata, publish new versions, and add other owners\. +.IP \(bu 2 +rm: +Remove a user from the package owner list\. This immediately revokes their +privileges\. + +.RE +.P +Note that there is only one level of access\. Either you can modify a package, +or you can't\. Future versions may contain more fine\-grained access levels, but +that is not implemented at this time\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm help 7 disputes + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-pack.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-pack.1 new file mode 100644 index 00000000..39ef99b5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-pack.1 @@ -0,0 +1,37 @@ +.TH "NPM\-PACK" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-pack\fR \- Create a tarball from a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm pack [ [ \.\.\.]] +.fi +.RE +.SH DESCRIPTION +.P +For anything that's installable (that is, a package folder, tarball, +tarball url, name@tag, name@version, or name), this command will fetch +it to the cache, and then copy the tarball to the current working +directory as \fB\-\.tgz\fP, and then write the filenames out to +stdout\. +.P +If the same package is specified multiple times, then the file will be +overwritten the second time\. +.P +If no arguments are supplied, then npm packs the current package folder\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help cache +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-ping.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-ping.1 new file mode 100644 index 00000000..e0900ffe --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-ping.1 @@ -0,0 +1,23 @@ +.TH "NPM\-PING" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-ping\fR \- Ping npm registry +.SH SYNOPSIS +.P +.RS 2 +.nf +npm ping [\-\-registry ] +.fi +.RE +.SH DESCRIPTION +.P +Ping the configured or given npm registry and verify authentication\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-prefix.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-prefix.1 new file mode 100644 index 00000000..2a2e4549 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-prefix.1 @@ -0,0 +1,34 @@ +.TH "NPM\-PREFIX" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-prefix\fR \- Display prefix +.SH SYNOPSIS +.P +.RS 2 +.nf +npm prefix [\-g] +.fi +.RE +.SH DESCRIPTION +.P +Print the local prefix to standard out\. This is the closest parent directory +to contain a package\.json file unless \fB\-g\fP is also specified\. +.P +If \fB\-g\fP is specified, this will be the value of the global prefix\. See +npm help 7 \fBnpm\-config\fP for more detail\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help root +.IP \(bu 2 +npm help bin +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-prune.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-prune.1 new file mode 100644 index 00000000..b41a0c42 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-prune.1 @@ -0,0 +1,35 @@ +.TH "NPM\-PRUNE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-prune\fR \- Remove extraneous packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm prune [ [ [ [\-\-tag ] [\-\-access ] +npm publish [\-\-tag ] [\-\-access ] +.fi +.RE +.SH DESCRIPTION +.P +Publishes a package to the registry so that it can be installed by name\. All +files in the package directory are included if no local \fB\|\.gitignore\fP or +\fB\|\.npmignore\fP file is present\. See npm help 7 \fBnpm\-developers\fP for full details on +what's included in the published package, as well as details on how the package +is built\. +.P +By default npm will publish to the public registry\. This can be overridden by +specifying a different default registry or using a npm help 7 \fBnpm\-scope\fP in the name +(see npm help 5 \fBpackage\.json\fP)\. +.RS 0 +.IP \(bu 2 +\fB\fP: +A folder containing a package\.json file +.IP \(bu 2 +\fB\fP: +A url or file path to a gzipped tar archive containing a single folder +with a package\.json file inside\. +.IP \(bu 2 +\fB[\-\-tag ]\fP +Registers the published package with the given tag, such that \fBnpm install +@\fP will install this version\. By default, \fBnpm publish\fP updates +and \fBnpm install\fP installs the \fBlatest\fP tag\. See npm help \fBnpm\-dist\-tag\fP for +details about tags\. +.IP \(bu 2 +\fB[\-\-access ]\fP +Tells the registry whether this package should be published as public or +restricted\. Only applies to scoped packages, which default to \fBrestricted\fP\|\. +If you don't have a paid account, you must publish with \fB\-\-access public\fP +to publish scoped packages\. + +.RE +.P +Fails if the package name and version combination already exists in +the specified registry\. +.P +Once a package is published with a given name and version, that +specific name and version combination can never be used again, even if +it is removed with npm help unpublish\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help 7 scope +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm help owner +.IP \(bu 2 +npm help deprecate +.IP \(bu 2 +npm help tag + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-rebuild.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-rebuild.1 new file mode 100644 index 00000000..5a5879ae --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-rebuild.1 @@ -0,0 +1,31 @@ +.TH "NPM\-REBUILD" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-rebuild\fR \- Rebuild a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm rebuild [ [ \.\.\.]] +npm rb [ [ \.\.\.]] +.fi +.RE +.RS 0 +.IP \(bu 2 +\fB\fP: +The package to rebuild + +.RE +.SH DESCRIPTION +.P +This command runs the \fBnpm build\fP command on the matched folders\. This is useful +when you install a new version of node, and must recompile all your C++ addons with +the new binary\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help build +.IP \(bu 2 +npm help install + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-repo.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-repo.1 new file mode 100644 index 00000000..93270713 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-repo.1 @@ -0,0 +1,37 @@ +.TH "NPM\-REPO" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-repo\fR \- Open package repository page in the browser +.SH SYNOPSIS +.P +.RS 2 +.nf +npm repo +npm repo (with no args in a package dir) +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +repository URL, and then tries to open it using the \fB\-\-browser\fP +config param\. If no package name is provided, it will search for +a \fBpackage\.json\fP in the current folder and use the \fBname\fP property\. +.SH CONFIGURATION +.SS browser +.RS 0 +.IP \(bu 2 +Default: OS X: \fB"open"\fP, Windows: \fB"start"\fP, Others: \fB"xdg\-open"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The browser that is called by the \fBnpm repo\fP command to open websites\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help docs +.IP \(bu 2 +npm help config + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-restart.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-restart.1 new file mode 100644 index 00000000..0ed41739 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-restart.1 @@ -0,0 +1,61 @@ +.TH "NPM\-RESTART" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-restart\fR \- Restart a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm restart [\-\- ] +.fi +.RE +.SH DESCRIPTION +.P +This restarts a package\. +.P +This runs a package's "stop", "restart", and "start" scripts, and associated +pre\- and post\- scripts, in the order given below: +.RS 0 +.IP 1. 3 +prerestart +.IP 2. 3 +prestop +.IP 3. 3 +stop +.IP 4. 3 +poststop +.IP 5. 3 +restart +.IP 6. 3 +prestart +.IP 7. 3 +start +.IP 8. 3 +poststart +.IP 9. 3 +postrestart + +.RE +.SH NOTE +.P +Note that the "restart" script is run \fBin addition to\fR the "stop" +and "start" scripts, not instead of them\. +.P +This is the behavior as of \fBnpm\fP major version 2\. A change in this +behavior will be accompanied by an increase in major version number +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help test +.IP \(bu 2 +npm help start +.IP \(bu 2 +npm help stop +.IP \(bu 2 +npm apihelp restart + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-rm.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-rm.1 new file mode 100644 index 00000000..1908b71d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-rm.1 @@ -0,0 +1,34 @@ +.TH "NPM\-RM" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-rm\fR \- Remove a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm rm +npm r +npm uninstall +npm un +.fi +.RE +.SH DESCRIPTION +.P +This uninstalls a package, completely removing everything npm installed +on its behalf\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help prune +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-root.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-root.1 new file mode 100644 index 00000000..d4fd4b1f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-root.1 @@ -0,0 +1,30 @@ +.TH "NPM\-ROOT" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-root\fR \- Display npm root +.SH SYNOPSIS +.P +.RS 2 +.nf +npm root +.fi +.RE +.SH DESCRIPTION +.P +Print the effective \fBnode_modules\fP folder to standard out\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help prefix +.IP \(bu 2 +npm help bin +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-run-script.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-run-script.1 new file mode 100644 index 00000000..66689fdf --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-run-script.1 @@ -0,0 +1,66 @@ +.TH "NPM\-RUN\-SCRIPT" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-run-script\fR \- Run arbitrary package scripts +.SH SYNOPSIS +.P +.RS 2 +.nf +npm run\-script [command] [\-\- ] +npm run [command] [\-\- ] +.fi +.RE +.SH DESCRIPTION +.P +This runs an arbitrary command from a package's \fB"scripts"\fP object\. If no +\fB"command"\fP is provided, it will list the available scripts\. \fBrun[\-script]\fP is +used by the test, start, restart, and stop commands, but can be called +directly, as well\. When the scripts in the package are printed out, they're +separated into lifecycle (test, start, restart) and directly\-run scripts\. +.P +As of \fBnpm@2\.0\.0\fP \fIhttp://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can +use custom arguments when executing scripts\. The special option \fB\-\-\fP is used by +getopt \fIhttp://goo\.gl/KxMmtG\fR to delimit the end of the options\. npm will pass +all the arguments after the \fB\-\-\fP directly to your script: +.P +.RS 2 +.nf +npm run test \-\- \-\-grep="pattern" +.fi +.RE +.P +The arguments will only be passed to the script specified after \fBnpm run\fP +and not to any pre or post script\. +.P +The \fBenv\fP script is a special built\-in command that can be used to list +environment variables that will be available to the script at runtime\. If an +"env" command is defined in your package it will take precedence over the +built\-in\. +.P +In addition to the shell's pre\-existing \fBPATH\fP, \fBnpm run\fP adds +\fBnode_modules/\.bin\fP to the \fBPATH\fP provided to scripts\. Any binaries provided by +locally\-installed dependencies can be used without the \fBnode_modules/\.bin\fP +prefix\. For example, if there is a \fBdevDependency\fP on \fBtap\fP in your package, +you should write: +.P +.RS 2 +.nf +"scripts": {"test": "tap test/\\*\.js"} +.fi +.RE +.P +instead of \fB"scripts": {"test": "node_modules/\.bin/tap test/\\*\.js"}\fP to run your tests\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help test +.IP \(bu 2 +npm help start +.IP \(bu 2 +npm help restart +.IP \(bu 2 +npm help stop + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-search.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-search.1 new file mode 100644 index 00000000..af719099 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-search.1 @@ -0,0 +1,60 @@ +.TH "NPM\-SEARCH" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-search\fR \- Search for packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm search [\-l|\-\-long] [search terms \.\.\.] + +aliases: s, se, find +.fi +.RE +.SH DESCRIPTION +.P +Search the registry for packages matching the search terms\. +.P +If a term starts with \fB/\fP, then it's interpreted as a regular expression\. +A trailing \fB/\fP will be ignored in this case\. (Note that many regular +expression characters must be escaped or quoted in most shells\.) +.SH CONFIGURATION +.SS long +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Display full package descriptions and other long text across multiple +lines\. When disabled (default) search results are truncated to fit +neatly on a single line\. Modules with extremely long names will +fall on multiple lines\. +.SS registry +.RS 0 +.IP \(bu 2 +Default: https://registry\.npmjs\.org/ +.IP \(bu 2 +Type : url + +.RE +.P +Search the specified registry for modules\. If you have configured npm to point to a different default registry, +such as your internal private module repository, \fBnpm search\fP will default to that registry when searching\. +Pass a different registry url such as the default above in order to override this setting\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help view + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-shrinkwrap.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-shrinkwrap.1 new file mode 100644 index 00000000..6d24291b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-shrinkwrap.1 @@ -0,0 +1,222 @@ +.TH "NPM\-SHRINKWRAP" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-shrinkwrap\fR \- Lock down dependency versions +.SH SYNOPSIS +.P +.RS 2 +.nf +npm shrinkwrap +.fi +.RE +.SH DESCRIPTION +.P +This command locks down the versions of a package's dependencies so +that you can control exactly which versions of each dependency will be +used when your package is installed\. The \fBpackage\.json\fP file is still +required if you want to use \fBnpm install\fP\|\. +.P +By default, \fBnpm install\fP recursively installs the target's +dependencies (as specified in \fBpackage\.json\fP), choosing the latest +available version that satisfies the dependency's semver pattern\. In +some situations, particularly when shipping software where each change +is tightly managed, it's desirable to fully specify each version of +each dependency recursively so that subsequent builds and deploys do +not inadvertently pick up newer versions of a dependency that satisfy +the semver pattern\. Specifying specific semver patterns in each +dependency's \fBpackage\.json\fP would facilitate this, but that's not always +possible or desirable, as when another author owns the npm package\. +It's also possible to check dependencies directly into source control, +but that may be undesirable for other reasons\. +.P +As an example, consider package A: +.P +.RS 2 +.nf +{ + "name": "A", + "version": "0\.1\.0", + "dependencies": { + "B": "<0\.1\.0" + } +} +.fi +.RE +.P +package B: +.P +.RS 2 +.nf +{ + "name": "B", + "version": "0\.0\.1", + "dependencies": { + "C": "<0\.1\.0" + } +} +.fi +.RE +.P +and package C: +.P +.RS 2 +.nf +{ + "name": "C", + "version": "0\.0\.1" +} +.fi +.RE +.P +If these are the only versions of A, B, and C available in the +registry, then a normal \fBnpm install A\fP will install: +.P +.RS 2 +.nf +A@0\.1\.0 +`\-\- B@0\.0\.1 + `\-\- C@0\.0\.1 +.fi +.RE +.P +However, if B@0\.0\.2 is published, then a fresh \fBnpm install A\fP will +install: +.P +.RS 2 +.nf +A@0\.1\.0 +`\-\- B@0\.0\.2 + `\-\- C@0\.0\.1 +.fi +.RE +.P +assuming the new version did not modify B's dependencies\. Of course, +the new version of B could include a new version of C and any number +of new dependencies\. If such changes are undesirable, the author of A +could specify a dependency on B@0\.0\.1\. However, if A's author and B's +author are not the same person, there's no way for A's author to say +that he or she does not want to pull in newly published versions of C +when B hasn't changed at all\. +.P +In this case, A's author can run +.P +.RS 2 +.nf +npm shrinkwrap +.fi +.RE +.P +This generates \fBnpm\-shrinkwrap\.json\fP, which will look something like this: +.P +.RS 2 +.nf +{ + "name": "A", + "version": "0\.1\.0", + "dependencies": { + "B": { + "version": "0\.0\.1", + "from": "B@^0\.0\.1", + "resolved": "https://registry\.npmjs\.org/B/\-/B\-0\.0\.1\.tgz", + "dependencies": { + "C": { + "version": "0\.0\.1", + "from": "org/C#v0\.0\.1", + "resolved": "git://github\.com/org/C\.git#5c380ae319fc4efe9e7f2d9c78b0faa588fd99b4" + } + } + } + } +} +.fi +.RE +.P +The shrinkwrap command has locked down the dependencies based on +what's currently installed in node_modules\. When \fBnpm install\fP +installs a package with an \fBnpm\-shrinkwrap\.json\fP in the package +root, the shrinkwrap file (rather than \fBpackage\.json\fP files) completely +drives the installation of that package and all of its dependencies +(recursively)\. So now the author publishes A@0\.1\.0, and subsequent +installs of this package will use B@0\.0\.1 and C@0\.0\.1, regardless the +dependencies and versions listed in A's, B's, and C's \fBpackage\.json\fP +files\. +.SS Using shrinkwrapped packages +.P +Using a shrinkwrapped package is no different than using any other +package: you can \fBnpm install\fP it by hand, or add a dependency to your +\fBpackage\.json\fP file and \fBnpm install\fP it\. +.SS Building shrinkwrapped packages +.P +To shrinkwrap an existing package: +.RS 0 +.IP 1. 3 +Run \fBnpm install\fP in the package root to install the current +versions of all dependencies\. +.IP 2. 3 +Validate that the package works as expected with these versions\. +.IP 3. 3 +Run \fBnpm shrinkwrap\fP, add \fBnpm\-shrinkwrap\.json\fP to git, and publish +your package\. + +.RE +.P +To add or update a dependency in a shrinkwrapped package: +.RS 0 +.IP 1. 3 +Run \fBnpm install\fP in the package root to install the current +versions of all dependencies\. +.IP 2. 3 +Add or update dependencies\. \fBnpm install\fP each new or updated +package individually and then update \fBpackage\.json\fP\|\. Note that they +must be explicitly named in order to be installed: running \fBnpm +install\fP with no arguments will merely reproduce the existing +shrinkwrap\. +.IP 3. 3 +Validate that the package works as expected with the new +dependencies\. +.IP 4. 3 +Run \fBnpm shrinkwrap\fP, commit the new \fBnpm\-shrinkwrap\.json\fP, and +publish your package\. + +.RE +.P +You can use npm help outdated to view dependencies with newer versions +available\. +.SS Other Notes +.P +A shrinkwrap file must be consistent with the package's \fBpackage\.json\fP +file\. \fBnpm shrinkwrap\fP will fail if required dependencies are not +already installed, since that would result in a shrinkwrap that +wouldn't actually work\. Similarly, the command will fail if there are +extraneous packages (not referenced by \fBpackage\.json\fP), since that would +indicate that \fBpackage\.json\fP is not correct\. +.P +Since \fBnpm shrinkwrap\fP is intended to lock down your dependencies for +production use, \fBdevDependencies\fP will not be included unless you +explicitly set the \fB\-\-dev\fP flag when you run \fBnpm shrinkwrap\fP\|\. If +installed \fBdevDependencies\fP are excluded, then npm will print a +warning\. If you want them to be installed with your module by +default, please consider adding them to \fBdependencies\fP instead\. +.P +If shrinkwrapped package A depends on shrinkwrapped package B, B's +shrinkwrap will not be used as part of the installation of A\. However, +because A's shrinkwrap is constructed from a valid installation of B +and recursively specifies all dependencies, the contents of B's +shrinkwrap will implicitly be included in A's shrinkwrap\. +.SS Caveats +.P +If you wish to lock down the specific bytes included in a package, for +example to have 100% confidence in being able to reproduce a +deployment or build, then you ought to check your dependencies into +source control, or pursue some other mechanism that can verify +contents rather than versions\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help ls + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-star.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-star.1 new file mode 100644 index 00000000..40237244 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-star.1 @@ -0,0 +1,30 @@ +.TH "NPM\-STAR" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-star\fR \- Mark your favorite packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm star [, \.\.\.] +npm unstar [, \.\.\.] +.fi +.RE +.SH DESCRIPTION +.P +"Starring" a package means that you have some interest in it\. It's +a vaguely positive way to show that you care\. +.P +"Unstarring" is the same thing, but in reverse\. +.P +It's a boolean thing\. Starring repeatedly has no additional effect\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help view +.IP \(bu 2 +npm help whoami +.IP \(bu 2 +npm help adduser + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-stars.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-stars.1 new file mode 100644 index 00000000..4827167e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-stars.1 @@ -0,0 +1,31 @@ +.TH "NPM\-STARS" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-stars\fR \- View packages marked as favorites +.SH SYNOPSIS +.P +.RS 2 +.nf +npm stars +npm stars [username] +.fi +.RE +.SH DESCRIPTION +.P +If you have starred a lot of neat things and want to find them again +quickly this command lets you do just that\. +.P +You may also want to see your friend's favorite packages, in this case +you will most certainly enjoy this command\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help star +.IP \(bu 2 +npm help view +.IP \(bu 2 +npm help whoami +.IP \(bu 2 +npm help adduser + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-start.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-start.1 new file mode 100644 index 00000000..71ea7699 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-start.1 @@ -0,0 +1,34 @@ +.TH "NPM\-START" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-start\fR \- Start a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm start [\-\- ] +.fi +.RE +.SH DESCRIPTION +.P +This runs an arbitrary command specified in the package's \fB"start"\fP property of +its \fB"scripts"\fP object\. If no \fB"start"\fP property is specified on the +\fB"scripts"\fP object, it will run \fBnode server\.js\fP\|\. +.P +As of \fBnpm@2\.0\.0\fP \fIhttp://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can +use custom arguments when executing scripts\. Refer to npm help run\-script for +more details\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help test +.IP \(bu 2 +npm help restart +.IP \(bu 2 +npm help stop + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-stop.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-stop.1 new file mode 100644 index 00000000..5b48d6bb --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-stop.1 @@ -0,0 +1,28 @@ +.TH "NPM\-STOP" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-stop\fR \- Stop a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm stop [\-\- ] +.fi +.RE +.SH DESCRIPTION +.P +This runs a package's "stop" script, if one was provided\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help test +.IP \(bu 2 +npm help start +.IP \(bu 2 +npm help restart + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-tag.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-tag.1 new file mode 100644 index 00000000..ec791e63 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-tag.1 @@ -0,0 +1,79 @@ +.TH "NPM\-TAG" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-tag\fR \- Tag a published version +.SH SYNOPSIS +.P +.RS 2 +.nf +npm tag @ [] +.fi +.RE +.SH DESCRIPTION +.P +THIS COMMAND IS DEPRECATED\. See npm help dist\-tag for details\. +.P +Tags the specified version of the package with the specified tag, or the +\fB\-\-tag\fP config if not specified\. +.P +A tag can be used when installing packages as a reference to a version instead +of using a specific version number: +.P +.RS 2 +.nf +npm install @ +.fi +.RE +.P +When installing dependencies, a preferred tagged version may be specified: +.P +.RS 2 +.nf +npm install \-\-tag +.fi +.RE +.P +This also applies to \fBnpm dedupe\fP\|\. +.P +Publishing a package always sets the "latest" tag to the published version\. +.SH PURPOSE +.P +Tags can be used to provide an alias instead of version numbers\. For +example, \fBnpm\fP currently uses the tag "next" to identify the upcoming +version, and the tag "latest" to identify the current version\. +.P +A project might choose to have multiple streams of development, e\.g\., +"stable", "canary"\. +.SH CAVEATS +.P +Tags must share a namespace with version numbers, because they are +specified in the same slot: \fBnpm install @\fP vs \fBnpm +install @\fP\|\. +.P +Tags that can be interpreted as valid semver ranges will be +rejected\. For example, \fBv1\.4\fP cannot be used as a tag, because it is +interpreted by semver as \fB>=1\.4\.0 <1\.5\.0\fP\|\. See +https://github\.com/npm/npm/issues/6082\|\. +.P +The simplest way to avoid semver problems with tags is to use tags +that do not begin with a number or the letter \fBv\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help dedupe +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm apihelp tag +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-team.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-team.1 new file mode 100644 index 00000000..5dd69613 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-team.1 @@ -0,0 +1,63 @@ +.TH "NPM\-TEAM" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-team\fR \- Manage organization teams and team memberships +.SH SYNOPSIS +.P +.RS 2 +.nf +npm team create +npm team destroy + +npm team add +npm team rm + +npm team ls | + +npm team edit +.fi +.RE +.SH DESCRIPTION +.P +Used to manage teams in organizations, and change team memberships\. Does not +handle permissions for packages\. +.P +Teams must always be fully qualified with the organization/scope they belond to +when operating on them, separated by a colon (\fB:\fP)\. That is, if you have a +\fBdevelopers\fP team on a \fBfoo\fP organization, you must always refer to that team as +\fBfoo:developers\fP in these commands\. +.RS 0 +.IP \(bu 2 +create / destroy: +Create a new team, or destroy an existing one\. +.IP \(bu 2 +add / rm: +Add a user to an existing team, or remove a user from a team they belong to\. +.IP \(bu 2 +ls: +If performed on an organization name, will return a list of existing teams +under that organization\. If performed on a team, it will instead return a list +of all users belonging to that particular team\. + +.RE +.SH DETAILS +.P +\fBnpm team\fP always operates directly on the current registry, configurable from +the command line using \fB\-\-registry=\fP\|\. +.P +In order to create teams and manage team membership, you must be a \fIteam admin\fR +under the given organization\. Listing teams and team memberships may be done by +any member of the organizations\. +.P +Organization creation and management of team admins and \fIorganization\fR members +is done through the website, not the npm CLI\. +.P +To use teams to manage permissions on packages belonging to your organization, +use the \fBnpm access\fP command to grant or revoke the appropriate permissions\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help access +.IP \(bu 2 +npm help 7 registr + +.RE diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-test.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-test.1 new file mode 100644 index 00000000..d416df70 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-test.1 @@ -0,0 +1,33 @@ +.TH "NPM\-TEST" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-test\fR \- Test a package +.SH SYNOPSIS +.P +.RS 2 +.nf + npm test [\-\- ] + + aliases: t, tst +.fi +.RE +.SH DESCRIPTION +.P +This runs a package's "test" script, if one was provided\. +.P +To run tests as a condition of installation, set the \fBnpat\fP config to +true\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help start +.IP \(bu 2 +npm help restart +.IP \(bu 2 +npm help stop + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-uninstall.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-uninstall.1 new file mode 100644 index 00000000..e0aede82 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-uninstall.1 @@ -0,0 +1,68 @@ +.TH "NPM\-UNINSTALL" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-uninstall\fR \- Remove a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm uninstall [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional] +npm rm (with any of the previous argument usage) +.fi +.RE +.SH DESCRIPTION +.P +This uninstalls a package, completely removing everything npm installed +on its behalf\. +.P +Example: +.P +.RS 2 +.nf +npm uninstall sax +.fi +.RE +.P +In global mode (ie, with \fB\-g\fP or \fB\-\-global\fP appended to the command), +it uninstalls the current package context as a global package\. +.P +\fBnpm uninstall\fP takes 3 exclusive, optional flags which save or update +the package version in your main package\.json: +.RS 0 +.IP \(bu 2 +\fB\-\-save\fP: Package will be removed from your \fBdependencies\fP\|\. +.IP \(bu 2 +\fB\-\-save\-dev\fP: Package will be removed from your \fBdevDependencies\fP\|\. +.IP \(bu 2 +\fB\-\-save\-optional\fP: Package will be removed from your \fBoptionalDependencies\fP\|\. + +.RE +.P +Scope is optional and follows the usual rules for npm help 7 \fBnpm\-scope\fP\|\. +.P +Examples: +.P +.RS 2 +.nf +npm uninstall sax \-\-save +npm uninstall @myorg/privatepackage \-\-save +npm uninstall node\-tap \-\-save\-dev +npm uninstall dtrace\-provider \-\-save\-optional +.fi +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help prune +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-unpublish.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-unpublish.1 new file mode 100644 index 00000000..4d98fd9e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-unpublish.1 @@ -0,0 +1,47 @@ +.TH "NPM\-UNPUBLISH" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-unpublish\fR \- Remove a package from the registry +.SH SYNOPSIS +.P +.RS 2 +.nf +npm unpublish [@/][@] +.fi +.RE +.SH WARNING +.P +\fBIt is generally considered bad behavior to remove versions of a library +that others are depending on!\fR +.P +Consider using the \fBdeprecate\fP command +instead, if your intent is to encourage users to upgrade\. +.P +There is plenty of room on the registry\. +.SH DESCRIPTION +.P +This removes a package version from the registry, deleting its +entry and removing the tarball\. +.P +If no version is specified, or if all versions are removed then +the root package entry is removed from the registry entirely\. +.P +Even if a package version is unpublished, that specific name and +version combination can never be reused\. In order to publish the +package again, a new version number must be used\. +.P +The scope is optional and follows the usual rules for npm help 7 \fBnpm\-scope\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help deprecate +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm help owner + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-update.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-update.1 new file mode 100644 index 00000000..18216e1d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-update.1 @@ -0,0 +1,166 @@ +.TH "NPM\-UPDATE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-update\fR \- Update a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm update [\-g] [ [ \.\.\.]] + +aliases: up, upgrade +.fi +.RE +.SH DESCRIPTION +.P +This command will update all the packages listed to the latest version +(specified by the \fBtag\fP config), respecting semver\. +.P +It will also install missing packages\. As with all commands that install +packages, the \fB\-\-dev\fP flag will cause \fBdevDependencies\fP to be processed +as well\. +.P +If the \fB\-g\fP flag is specified, this command will update globally installed +packages\. +.P +If no package name is specified, all packages in the specified location (global +or local) will be updated\. +.P +As of \fBnpm@2\.6\.1\fP, the \fBnpm update\fP will only inspect top\-level packages\. +Prior versions of \fBnpm\fP would also recursively inspect all dependencies\. +To get the old behavior, use \fBnpm \-\-depth 9999 update\fP\|\. +.SH EXAMPLES +.P +IMPORTANT VERSION NOTE: these examples assume \fBnpm@2\.6\.1\fP or later\. For +older versions of \fBnpm\fP, you must specify \fB\-\-depth 0\fP to get the behavior +described below\. +.P +For the examples below, assume that the current package is \fBapp\fP and it depends +on dependencies, \fBdep1\fP (\fBdep2\fP, \.\. etc\.)\. The published versions of \fBdep1\fP are: +.P +.RS 2 +.nf +{ + "dist\-tags": { "latest": "1\.2\.2" }, + "versions": [ + "1\.2\.2", + "1\.2\.1", + "1\.2\.0", + "1\.1\.2", + "1\.1\.1", + "1\.0\.0", + "0\.4\.1", + "0\.4\.0", + "0\.2\.0" + ] +} +.fi +.RE +.SS Caret Dependencies +.P +If \fBapp\fP\|'s \fBpackage\.json\fP contains: +.P +.RS 2 +.nf +"dependencies": { + "dep1": "^1\.1\.1" +} +.fi +.RE +.P +Then \fBnpm update\fP will install \fBdep1@1\.2\.2\fP, because \fB1\.2\.2\fP is \fBlatest\fP and +\fB1\.2\.2\fP satisfies \fB^1\.1\.1\fP\|\. +.SS Tilde Dependencies +.P +However, if \fBapp\fP\|'s \fBpackage\.json\fP contains: +.P +.RS 2 +.nf +"dependencies": { + "dep1": "~1\.1\.1" +} +.fi +.RE +.P +In this case, running \fBnpm update\fP will install \fBdep1@1\.1\.2\fP\|\. Even though the \fBlatest\fP +tag points to \fB1\.2\.2\fP, this version does not satisfy \fB~1\.1\.1\fP, which is equivalent +to \fB>=1\.1\.1 <1\.2\.0\fP\|\. So the highest\-sorting version that satisfies \fB~1\.1\.1\fP is used, +which is \fB1\.1\.2\fP\|\. +.SS Caret Dependencies below 1\.0\.0 +.P +Suppose \fBapp\fP has a caret dependency on a version below \fB1\.0\.0\fP, for example: +.P +.RS 2 +.nf +"dependencies": { + "dep1": "^0\.2\.0" +} +.fi +.RE +.P +\fBnpm update\fP will install \fBdep1@0\.2\.0\fP, because there are no other +versions which satisfy \fB^0\.2\.0\fP\|\. +.P +If the dependence were on \fB^0\.4\.0\fP: +.P +.RS 2 +.nf +"dependencies": { + "dep1": "^0\.4\.0" +} +.fi +.RE +.P +Then \fBnpm update\fP will install \fBdep1@0\.4\.1\fP, because that is the highest\-sorting +version that satisfies \fB^0\.4\.0\fP (\fB>= 0\.4\.0 <0\.5\.0\fP) +.SS Recording Updates with \fB\-\-save\fP +.P +When you want to update a package and save the new version as +the minimum required dependency in \fBpackage\.json\fP, you can use +\fBnpm update \-\-save\fP\|\. For example if \fBpackage\.json\fP contains +.P +.RS 2 +.nf +"dependencies": { + "dep1": "^1\.1\.1" +} +.fi +.RE +.P +Then \fBnpm update \-\-save\fP will install \fBdep1@1\.2\.2\fP (i\.e\., \fBlatest\fP), +and \fBpackage\.json\fP will be modified: +.P +.RS 2 +.nf +"dependencies": { + "dep1": "^1\.2\.2" +} +.fi +.RE +.P +Note that \fBnpm\fP will only write an updated version to \fBpackage\.json\fP +if it installs a new package\. +.SS Updating Globally\-Installed Packages +.P +\fBnpm update \-g\fP will apply the \fBupdate\fP action to each globally installed +package that is \fBoutdated\fP \-\- that is, has a version that is different from +\fBlatest\fP\|\. +.P +NOTE: If a package has been upgraded to a version newer than \fBlatest\fP, it will +be \fIdowngraded\fR\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help outdated +.IP \(bu 2 +npm help shrinkwrap +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help ls + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-version.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-version.1 new file mode 100644 index 00000000..a3b52954 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-version.1 @@ -0,0 +1,124 @@ +.TH "NPM\-VERSION" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-version\fR \- Bump a package version +.SH SYNOPSIS +.P +.RS 2 +.nf +npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease] +.fi +.RE +.SH DESCRIPTION +.P +Run this in a package directory to bump the version and write the new +data back to \fBpackage\.json\fP and, if present, \fBnpm\-shrinkwrap\.json\fP\|\. +.P +The \fBnewversion\fP argument should be a valid semver string, \fIor\fR a +valid second argument to semver\.inc (one of \fBpatch\fP, \fBminor\fP, \fBmajor\fP, +\fBprepatch\fP, \fBpreminor\fP, \fBpremajor\fP, \fBprerelease\fP)\. In the second case, +the existing version will be incremented by 1 in the specified field\. +.P +If run in a git repo, it will also create a version commit and tag\. +This behavior is controlled by \fBgit\-tag\-version\fP (see below), and can +be disabled on the command line by running \fBnpm \-\-no\-git\-tag\-version version\fP\|\. +It will fail if the working directory is not clean, unless the \fB\-\-force\fP +flag is set\. +.P +If supplied with \fB\-\-message\fP (shorthand: \fB\-m\fP) config option, npm will +use it as a commit message when creating a version commit\. If the +\fBmessage\fP config contains \fB%s\fP then that will be replaced with the +resulting version number\. For example: +.P +.RS 2 +.nf +npm version patch \-m "Upgrade to %s for reasons" +.fi +.RE +.P +If the \fBsign\-git\-tag\fP config is set, then the tag will be signed using +the \fB\-s\fP flag to git\. Note that you must have a default GPG key set up +in your git config for this to work properly\. For example: +.P +.RS 2 +.nf +$ npm config set sign\-git\-tag true +$ npm version patch + +You need a passphrase to unlock the secret key for +user: "isaacs (http://blog\.izs\.me/) " +2048\-bit RSA key, ID 6C481CF6, created 2010\-08\-31 + +Enter passphrase: +.fi +.RE +.P +If \fBpreversion\fP, \fBversion\fP, or \fBpostversion\fP are in the \fBscripts\fP property of +the package\.json, they will be executed as part of running \fBnpm version\fP\|\. +.P +The exact order of execution is as follows: +.RS 0 +.IP 1. 3 +Check to make sure the git working directory is clean before we get started\. +Your scripts may add files to the commit in future steps\. +This step is skipped if the \fB\-\-force\fP flag is set\. +.IP 2. 3 +Run the \fBpreversion\fP script\. These scripts have access to the old \fBversion\fP in package\.json\. +A typical use would be running your full test suite before deploying\. +Any files you want added to the commit should be explicitly added using \fBgit add\fP\|\. +.IP 3. 3 +Bump \fBversion\fP in \fBpackage\.json\fP as requested (\fBpatch\fP, \fBminor\fP, \fBmajor\fP, etc)\. +.IP 4. 3 +Run the \fBversion\fP script\. These scripts have access to the new \fBversion\fP in package\.json +(so they can incorporate it into file headers in generated files for example)\. +Again, scripts should explicitly add generated files to the commit using \fBgit add\fP\|\. +.IP 5. 3 +Commit and tag\. +.IP 6. 3 +Run the \fBpostversion\fP script\. Use it to clean up the file system or automatically push +the commit and/or tag\. + +.RE +.P +Take the following example: +.P +.RS 2 +.nf +"scripts": { + "preversion": "npm test", + "version": "npm run build && git add \-A dist", + "postversion": "git push && git push \-\-tags && rm \-rf build/temp" +} +.fi +.RE +.P +This runs all your tests, and proceeds only if they pass\. Then runs your \fBbuild\fP script, and +adds everything in the \fBdist\fP directory to the commit\. After the commit, it pushes the new commit +and tag up to the server, and deletes the \fBbuild/temp\fP directory\. +.SH CONFIGURATION +.SS git\-tag\-version +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Commit and tag the version change\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help init +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help 7 semver +.IP \(bu 2 +npm help 7 config + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-view.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-view.1 new file mode 100644 index 00000000..a6d572f2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-view.1 @@ -0,0 +1,145 @@ +.TH "NPM\-VIEW" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-view\fR \- View registry info +.SH SYNOPSIS +.P +.RS 2 +.nf +npm view [@/][@] [[\.]\.\.\.] +npm v [@/][@] [[\.]\.\.\.] +.fi +.RE +.SH DESCRIPTION +.P +This command shows data about a package and prints it to the stream +referenced by the \fBoutfd\fP config, which defaults to stdout\. +.P +To show the package registry entry for the \fBconnect\fP package, you can do +this: +.P +.RS 2 +.nf +npm view connect +.fi +.RE +.P +The default version is "latest" if unspecified\. +.P +Field names can be specified after the package descriptor\. +For example, to show the dependencies of the \fBronn\fP package at version +0\.3\.5, you could do the following: +.P +.RS 2 +.nf +npm view ronn@0\.3\.5 dependencies +.fi +.RE +.P +You can view child fields by separating them with a period\. +To view the git repository URL for the latest version of npm, you could +do this: +.P +.RS 2 +.nf +npm view npm repository\.url +.fi +.RE +.P +This makes it easy to view information about a dependency with a bit of +shell scripting\. For example, to view all the data about the version of +opts that ronn depends on, you can do this: +.P +.RS 2 +.nf +npm view opts@$(npm view ronn dependencies\.opts) +.fi +.RE +.P +For fields that are arrays, requesting a non\-numeric field will return +all of the values from the objects in the list\. For example, to get all +the contributor names for the "express" project, you can do this: +.P +.RS 2 +.nf +npm view express contributors\.email +.fi +.RE +.P +You may also use numeric indices in square braces to specifically select +an item in an array field\. To just get the email address of the first +contributor in the list, you can do this: +.P +.RS 2 +.nf +npm view express contributors[0]\.email +.fi +.RE +.P +Multiple fields may be specified, and will be printed one after another\. +For exampls, to get all the contributor names and email addresses, you +can do this: +.P +.RS 2 +.nf +npm view express contributors\.name contributors\.email +.fi +.RE +.P +"Person" fields are shown as a string if they would be shown as an +object\. So, for example, this will show the list of npm contributors in +the shortened string format\. (See npm help 5 \fBpackage\.json\fP for more on this\.) +.P +.RS 2 +.nf +npm view npm contributors +.fi +.RE +.P +If a version range is provided, then data will be printed for every +matching version of the package\. This will show which version of jsdom +was required by each matching version of yui3: +.P +.RS 2 +.nf +npm view yui3@'>0\.5\.4' dependencies\.jsdom +.fi +.RE +.P +To show the \fBconnect\fP package version history, you can do +this: +.P +.RS 2 +.nf +npm view connect versions +.fi +.RE +.SH OUTPUT +.P +If only a single string field for a single version is output, then it +will not be colorized or quoted, so as to enable piping the output to +another command\. If the field is an object, it will be output as a JavaScript object literal\. +.P +If the \-\-json flag is given, the outputted fields will be JSON\. +.P +If the version range matches multiple versions, than each printed value +will be prefixed with the version it applies to\. +.P +If multiple fields are requested, than each of them are prefixed with +the field name\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help search +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help docs + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-whoami.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-whoami.1 new file mode 100644 index 00000000..fe74cc57 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm-whoami.1 @@ -0,0 +1,26 @@ +.TH "NPM\-WHOAMI" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-whoami\fR \- Display npm username +.SH SYNOPSIS +.P +.RS 2 +.nf +npm whoami +.fi +.RE +.SH DESCRIPTION +.P +Print the \fBusername\fP config to standard output\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help adduser + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man1/npm.1 b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm.1 new file mode 100644 index 00000000..5811b129 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man1/npm.1 @@ -0,0 +1,209 @@ +.TH "NPM" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm\fR \- javascript package manager +.SH SYNOPSIS +.P +.RS 2 +.nf +npm [args] +.fi +.RE +.SH VERSION +.P +2.15.1 +.SH DESCRIPTION +.P +npm is the package manager for the Node JavaScript platform\. It puts +modules in place so that node can find them, and manages dependency +conflicts intelligently\. +.P +It is extremely configurable to support a wide variety of use cases\. +Most commonly, it is used to publish, discover, install, and develop node +programs\. +.P +Run \fBnpm help\fP to get a list of available commands\. +.SH INTRODUCTION +.P +You probably got npm because you want to install stuff\. +.P +Use \fBnpm install blerg\fP to install the latest version of "blerg"\. Check out +npm help \fBnpm\-install\fP for more info\. It can do a lot of stuff\. +.P +Use the \fBnpm search\fP command to show everything that's available\. +Use \fBnpm ls\fP to show everything you've installed\. +.SH DEPENDENCIES +.P +If a package references to another package with a git URL, npm depends +on a preinstalled git\. +.P +If one of the packages npm tries to install is a native node module and +requires compiling of C++ Code, npm will use +node\-gyp \fIhttps://github\.com/TooTallNate/node\-gyp\fR for that task\. +For a Unix system, node\-gyp \fIhttps://github\.com/TooTallNate/node\-gyp\fR +needs Python, make and a buildchain like GCC\. On Windows, +Python and Microsoft Visual Studio C++ is needed\. Python 3 is +not supported by node\-gyp \fIhttps://github\.com/TooTallNate/node\-gyp\fR\|\. +For more information visit +the node\-gyp repository \fIhttps://github\.com/TooTallNate/node\-gyp\fR and +the node\-gyp Wiki \fIhttps://github\.com/TooTallNate/node\-gyp/wiki\fR\|\. +.SH DIRECTORIES +.P +See npm help 5 \fBnpm\-folders\fP to learn about where npm puts stuff\. +.P +In particular, npm has two modes of operation: +.RS 0 +.IP \(bu 2 +global mode: +.br +npm installs packages into the install prefix at +\fBprefix/lib/node_modules\fP and bins are installed in \fBprefix/bin\fP\|\. +.IP \(bu 2 +local mode: +.br +npm installs packages into the current project directory, which +defaults to the current working directory\. Packages are installed to +\fB\|\./node_modules\fP, and bins are installed to \fB\|\./node_modules/\.bin\fP\|\. + +.RE +.P +Local mode is the default\. Use \fB\-\-global\fP or \fB\-g\fP on any command to +operate in global mode instead\. +.SH DEVELOPER USAGE +.P +If you're using npm to develop and publish your code, check out the +following help topics: +.RS 0 +.IP \(bu 2 +json: +Make a package\.json file\. See npm help 5 \fBpackage\.json\fP\|\. +.IP \(bu 2 +link: +For linking your current working code into Node's path, so that you +don't have to reinstall every time you make a change\. Use +\fBnpm link\fP to do this\. +.IP \(bu 2 +install: +It's a good idea to install things if you don't need the symbolic link\. +Especially, installing other peoples code from the registry is done via +\fBnpm install\fP +.IP \(bu 2 +adduser: +Create an account or log in\. Credentials are stored in the +user config file\. +.IP \(bu 2 +publish: +Use the \fBnpm publish\fP command to upload your code to the registry\. + +.RE +.SH CONFIGURATION +.P +npm is extremely configurable\. It reads its configuration options from +5 places\. +.RS 0 +.IP \(bu 2 +Command line switches: +.br +Set a config with \fB\-\-key val\fP\|\. All keys take a value, even if they +are booleans (the config parser doesn't know what the options are at +the time of parsing\.) If no value is provided, then the option is set +to boolean \fBtrue\fP\|\. +.IP \(bu 2 +Environment Variables: +.br +Set any config by prefixing the name in an environment variable with +\fBnpm_config_\fP\|\. For example, \fBexport npm_config_key=val\fP\|\. +.IP \(bu 2 +User Configs: +.br +The file at $HOME/\.npmrc is an ini\-formatted list of configs\. If +present, it is parsed\. If the \fBuserconfig\fP option is set in the cli +or env, then that will be used instead\. +.IP \(bu 2 +Global Configs: +.br +The file found at \.\./etc/npmrc (from the node executable, by default +this resolves to /usr/local/etc/npmrc) will be parsed if it is found\. +If the \fBglobalconfig\fP option is set in the cli, env, or user config, +then that file is parsed instead\. +.IP \(bu 2 +Defaults: +.br +npm's default configuration options are defined in +lib/utils/config\-defs\.js\. These must not be changed\. + +.RE +.P +See npm help 7 \fBnpm\-config\fP for much much more information\. +.SH CONTRIBUTIONS +.P +Patches welcome! +.RS 0 +.IP \(bu 2 +code: +Read through npm help 7 \fBnpm\-coding\-style\fP if you plan to submit code\. +You don't have to agree with it, but you do have to follow it\. +.IP \(bu 2 +docs: +If you find an error in the documentation, edit the appropriate markdown +file in the "doc" folder\. (Don't worry about generating the man page\.) + +.RE +.P +Contributors are listed in npm's \fBpackage\.json\fP file\. You can view them +easily by doing \fBnpm view npm contributors\fP\|\. +.P +If you would like to contribute, but don't know what to work on, read +the contributing guidelines and check the issues list\. +.RS 0 +.IP \(bu 2 +https://github\.com/npm/npm/wiki/Contributing\-Guidelines +.IP \(bu 2 +https://github\.com/npm/npm/issues + +.RE +.SH BUGS +.P +When you find issues, please report them: +.RS 0 +.IP \(bu 2 +web: +https://github\.com/npm/npm/issues + +.RE +.P +Be sure to include \fIall\fR of the output from the npm command that didn't work +as expected\. The \fBnpm\-debug\.log\fP file is also helpful to provide\. +.P +You can also look for isaacs in #node\.js on irc://irc\.freenode\.net\. He +will no doubt tell you to put the output in a gist or email\. +.SH AUTHOR +.P +Isaac Z\. Schlueter \fIhttp://blog\.izs\.me/\fR :: +isaacs \fIhttps://github\.com/isaacs/\fR :: +@izs \fIhttp://twitter\.com/izs\fR :: +i@izs\.me +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help help +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +README +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 index +.IP \(bu 2 +npm apihelp npm + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-bin.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-bin.3 new file mode 100644 index 00000000..c277cfeb --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-bin.3 @@ -0,0 +1,16 @@ +.TH "NPM\-BIN" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-bin\fR \- Display npm bin folder +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.bin(args, cb) +.fi +.RE +.SH DESCRIPTION +.P +Print the folder where npm will install executables\. +.P +This function should not be used programmatically\. Instead, just refer +to the \fBnpm\.bin\fP property\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-bugs.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-bugs.3 new file mode 100644 index 00000000..5c1602c1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-bugs.3 @@ -0,0 +1,22 @@ +.TH "NPM\-BUGS" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.bugs(package, callback) +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +bug tracker URL, and then tries to open it using the \fB\-\-browser\fP +config param\. +.P +Like other commands, the first parameter is an array\. This command only +uses the first element, which is expected to be a package name with an +optional version number\. +.P +This command will launch a browser, so this command may not be the most +friendly for programmatic use\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-cache.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-cache.3 new file mode 100644 index 00000000..09e78d5d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-cache.3 @@ -0,0 +1,33 @@ +.TH "NPM\-CACHE" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-cache\fR \- manage the npm cache programmatically +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.cache([args], callback) + +// helpers +npm\.commands\.cache\.clean([args], callback) +npm\.commands\.cache\.add([args], callback) +npm\.commands\.cache\.read(name, version, forceBypass, callback) +.fi +.RE +.SH DESCRIPTION +.P +This acts much the same ways as the npm help cache command line +functionality\. +.P +The callback is called with the package\.json data of the thing that is +eventually added to or read from the cache\. +.P +The top level \fBnpm\.commands\.cache(\.\.\.)\fP functionality is a public +interface, and like all commands on the \fBnpm\.commands\fP object, it will +match the command line behavior exactly\. +.P +However, the cache folder structure and the cache helper functions are +considered \fBinternal\fR API surface, and as such, may change in future +releases of npm, potentially without warning or significant version +incrementation\. +.P +Use at your own risk\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-commands.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-commands.3 new file mode 100644 index 00000000..b7dbdcd8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-commands.3 @@ -0,0 +1,28 @@ +.TH "NPM\-COMMANDS" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-commands\fR \- npm commands +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands[](args, callback) +.fi +.RE +.SH DESCRIPTION +.P +npm comes with a full set of commands, and each of the commands takes a +similar set of arguments\. +.P +In general, all commands on the command object take an \fBarray\fR of positional +argument \fBstrings\fR\|\. The last argument to any function is a callback\. Some +commands are special and take other optional arguments\. +.P +All commands have their own man page\. See \fBman npm\-\fP for command\-line +usage, or \fBman 3 npm\-\fP for programmatic usage\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 index + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-config.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-config.3 new file mode 100644 index 00000000..9530d161 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-config.3 @@ -0,0 +1,49 @@ +.TH "NPM\-CONFIG" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-config\fR \- Manage the npm configuration files +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.config(args, callback) +var val = npm\.config\.get(key) +npm\.config\.set(key, val) +.fi +.RE +.SH DESCRIPTION +.P +This function acts much the same way as the command\-line version\. The first +element in the array tells config what to do\. Possible values are: +.RS 0 +.IP \(bu 2 +\fBset\fP + Sets a config parameter\. The second element in \fBargs\fP is interpreted as the + key, and the third element is interpreted as the value\. +.IP \(bu 2 +\fBget\fP + Gets the value of a config parameter\. The second element in \fBargs\fP is the + key to get the value of\. +.IP \(bu 2 +\fBdelete\fP (\fBrm\fP or \fBdel\fP) + Deletes a parameter from the config\. The second element in \fBargs\fP is the + key to delete\. +.IP \(bu 2 +\fBlist\fP (\fBls\fP) + Show all configs that aren't secret\. No parameters necessary\. +.IP \(bu 2 +\fBedit\fP: + Opens the config file in the default editor\. This command isn't very useful + programmatically, but it is made available\. + +.RE +.P +To programmatically access npm configuration settings, or set them for +the duration of a program, use the \fBnpm\.config\.set\fP and \fBnpm\.config\.get\fP +functions instead\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm apihelp npm + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-deprecate.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-deprecate.3 new file mode 100644 index 00000000..77bff55d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-deprecate.3 @@ -0,0 +1,43 @@ +.TH "NPM\-DEPRECATE" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-deprecate\fR \- Deprecate a version of a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.deprecate(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +This command will update the npm registry entry for a package, providing +a deprecation warning to all who attempt to install it\. +.P +The 'args' parameter must have exactly two elements: +.RS 0 +.IP \(bu 2 +\fBpackage[@version]\fP + The \fBversion\fP portion is optional, and may be either a range, or a + specific version, or a tag\. +.IP \(bu 2 +\fBmessage\fP + The warning message that will be printed whenever a user attempts to + install the package\. + +.RE +.P +Note that you must be the package owner to deprecate something\. See the +\fBowner\fP and \fBadduser\fP help topics\. +.P +To un\-deprecate a package, specify an empty string (\fB""\fP) for the \fBmessage\fP argument\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm apihelp publish +.IP \(bu 2 +npm apihelp unpublish +.IP \(bu 2 +npm help 7 registry + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-docs.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-docs.3 new file mode 100644 index 00000000..904f4930 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-docs.3 @@ -0,0 +1,22 @@ +.TH "NPM\-DOCS" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-docs\fR \- Docs for a package in a web browser maybe +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.docs(package, callback) +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +documentation URL, and then tries to open it using the \fB\-\-browser\fP +config param\. +.P +Like other commands, the first parameter is an array\. This command only +uses the first element, which is expected to be a package name with an +optional version number\. +.P +This command will launch a browser, so this command may not be the most +friendly for programmatic use\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-edit.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-edit.3 new file mode 100644 index 00000000..171393c7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-edit.3 @@ -0,0 +1,27 @@ +.TH "NPM\-EDIT" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-edit\fR \- Edit an installed package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.edit(package, callback) +.fi +.RE +.SH DESCRIPTION +.P +Opens the package folder in the default editor (or whatever you've +configured as the npm \fBeditor\fP config \-\- see \fBnpm help config\fP\|\.) +.P +After it has been edited, the package is rebuilt so as to pick up any +changes in compiled packages\. +.P +For instance, you can do \fBnpm install connect\fP to install connect +into your package, and then \fBnpm\.commands\.edit(["connect"], callback)\fP +to make a few changes to your locally installed copy\. +.P +The first parameter is a string array with a single element, the package +to open\. The package can optionally have a version number attached\. +.P +Since this command opens an editor in a new process, be careful about where +and how this is used\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-explore.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-explore.3 new file mode 100644 index 00000000..1de119fd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-explore.3 @@ -0,0 +1,21 @@ +.TH "NPM\-EXPLORE" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-explore\fR \- Browse an installed package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.explore(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +Spawn a subshell in the directory of the installed package specified\. +.P +If a command is specified, then it is run in the subshell, which then +immediately terminates\. +.P +Note that the package is \fInot\fR automatically rebuilt afterwards, so be +sure to use \fBnpm rebuild \fP if you make any changes\. +.P +The first element in the 'args' parameter must be a package name\. After that is the optional command, which can be any number of strings\. All of the strings will be combined into one, space\-delimited command\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-help-search.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-help-search.3 new file mode 100644 index 00000000..b81438bc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-help-search.3 @@ -0,0 +1,40 @@ +.TH "NPM\-HELP\-SEARCH" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-help-search\fR \- Search the help pages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.helpSearch(args, [silent,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command is rarely useful, but it exists in the rare case that it is\. +.P +This command takes an array of search terms and returns the help pages that +match in order of best match\. +.P +If there is only one match, then npm displays that help section\. If there +are multiple results, the results are printed to the screen formatted and the +array of results is returned\. Each result is an object with these properties: +.RS 0 +.IP \(bu 2 +hits: +A map of args to number of hits on that arg\. For example, {"npm": 3} +.IP \(bu 2 +found: +Total number of unique args that matched\. +.IP \(bu 2 +totalHits: +Total number of hits\. +.IP \(bu 2 +lines: +An array of all matching lines (and some adjacent lines)\. +.IP \(bu 2 +file: +Name of the file that matched + +.RE +.P +The silent parameter is not necessary not used, but it may in the future\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-init.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-init.3 new file mode 100644 index 00000000..c1ab7313 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-init.3 @@ -0,0 +1,31 @@ +.TH "NPM" "" "March 2016" "" "" +.SH "NAME" +\fBnpm\fR +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.init(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +This will ask you a bunch of questions, and then write a package\.json for you\. +.P +It attempts to make reasonable guesses about what you want things to be set to, +and then writes a package\.json file with the options you've selected\. +.P +If you already have a package\.json file, it'll read that first, and default to +the options in there\. +.P +It is strictly additive, so it does not delete options from your package\.json +without a really good reason to do so\. +.P +Since this function expects to be run on the command\-line, it doesn't work very +well as a programmatically\. The best option is to roll your own, and since +JavaScript makes it stupid simple to output formatted JSON, that is the +preferred method\. If you're sure you want to handle command\-line prompting, +then go ahead and use this programmatically\. +.SH SEE ALSO +.P +npm help 5 package\.json diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-install.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-install.3 new file mode 100644 index 00000000..fb582b6a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-install.3 @@ -0,0 +1,22 @@ +.TH "NPM\-INSTALL" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-install\fR \- install a package programmatically +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.install([where,] packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This acts much the same ways as installing on the command\-line\. +.P +The 'where' parameter is optional and only used internally, and it specifies +where the packages should be installed to\. +.P +The 'packages' parameter is an array of strings\. Each element in the array is +the name of a package to be installed\. +.P +Finally, 'callback' is a function that will be called when all packages have been +installed or when an error has been encountered\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-link.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-link.3 new file mode 100644 index 00000000..d4a252ec --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-link.3 @@ -0,0 +1,40 @@ +.TH "NPM\-LINK" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-link\fR \- Symlink a package folder +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.link(callback) +npm\.commands\.link(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +Package linking is a two\-step process\. +.P +Without parameters, link will create a globally\-installed +symbolic link from \fBprefix/package\-name\fP to the current folder\. +.P +With a parameters, link will create a symlink from the local \fBnode_modules\fP +folder to the global symlink\. +.P +When creating tarballs for \fBnpm publish\fP, the linked packages are +"snapshotted" to their current state by resolving the symbolic links\. +.P +This is +handy for installing your own stuff, so that you can work on it and test it +iteratively without having to continually rebuild\. +.P +For example: +.P +.RS 2 +.nf +npm\.commands\.link(cb) # creates global link from the cwd + # (say redis package) +npm\.commands\.link('redis', cb) # link\-install the package +.fi +.RE +.P +Now, any changes to the redis package will be reflected in +the package in the current working directory diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-load.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-load.3 new file mode 100644 index 00000000..b37ec1dd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-load.3 @@ -0,0 +1,33 @@ +.TH "NPM\-LOAD" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-load\fR \- Load config settings +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.load(conf, cb) +.fi +.RE +.SH DESCRIPTION +.P +npm\.load() must be called before any other function call\. Both parameters are +optional, but the second is recommended\. +.P +The first parameter is an object containing command\-line config params, and the +second parameter is a callback that will be called when npm is loaded and ready +to serve\. +.P +The first parameter should follow a similar structure as the package\.json +config object\. +.P +For example, to emulate the \-\-dev flag, pass an object that looks like this: +.P +.RS 2 +.nf +{ + "dev": true +} +.fi +.RE +.P +For a list of all the available command\-line configs, see \fBnpm help config\fP diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-ls.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-ls.3 new file mode 100644 index 00000000..ec56591f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-ls.3 @@ -0,0 +1,67 @@ +.TH "NPM\-LS" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-ls\fR \- List installed packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.ls(args, [silent,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command will print to stdout all the versions of packages that are +installed, as well as their dependencies, in a tree\-structure\. It will also +return that data using the callback\. +.P +This command does not take any arguments, but args must be defined\. +Beyond that, if any arguments are passed in, npm will politely warn that it +does not take positional arguments, though you may set config flags +like with any other command, such as \fBglobal\fP to list global packages\. +.P +It will print out extraneous, missing, and invalid packages\. +.P +If the silent parameter is set to true, nothing will be output to the screen, +but the data will still be returned\. +.P +Callback is provided an error if one occurred, the full data about which +packages are installed and which dependencies they will receive, and a +"lite" data object which just shows which versions are installed where\. +Note that the full data object is a circular structure, so care must be +taken if it is serialized to JSON\. +.SH CONFIGURATION +.SS long +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show extended information\. +.SS parseable +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show parseable output instead of tree view\. +.SS global +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +List packages in the global install prefix instead of in the current +project\. +.P +Note, if parseable is set or long isn't set, then duplicates will be trimmed\. +This means that if a submodule has the same dependency as a parent module, then the +dependency will only be output once\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-outdated.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-outdated.3 new file mode 100644 index 00000000..0eef44e7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-outdated.3 @@ -0,0 +1,16 @@ +.TH "NPM\-OUTDATED" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-outdated\fR \- Check for outdated packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.outdated([packages,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command will check the registry to see if the specified packages are +currently outdated\. +.P +If the 'packages' parameter is left out, npm will check all packages\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-owner.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-owner.3 new file mode 100644 index 00000000..f7663384 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-owner.3 @@ -0,0 +1,43 @@ +.TH "NPM\-OWNER" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-owner\fR \- Manage package owners +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.owner(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +The first element of the 'args' parameter defines what to do, and the subsequent +elements depend on the action\. Possible values for the action are (order of +parameters are given in parenthesis): +.RS 0 +.IP \(bu 2 +ls (package): +List all the users who have access to modify a package and push new versions\. +Handy when you need to know who to bug for help\. +.IP \(bu 2 +add (user, package): +Add a new user as a maintainer of a package\. This user is enabled to modify +metadata, publish new versions, and add other owners\. +.IP \(bu 2 +rm (user, package): +Remove a user from the package owner list\. This immediately revokes their +privileges\. + +.RE +.P +Note that there is only one level of access\. Either you can modify a package, +or you can't\. Future versions may contain more fine\-grained access levels, but +that is not implemented at this time\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm apihelp publish +.IP \(bu 2 +npm help 7 registry + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-pack.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-pack.3 new file mode 100644 index 00000000..03d44a26 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-pack.3 @@ -0,0 +1,22 @@ +.TH "NPM\-PACK" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-pack\fR \- Create a tarball from a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.pack([packages,] callback) +.fi +.RE +.SH DESCRIPTION +.P +For anything that's installable (that is, a package folder, tarball, +tarball url, name@tag, name@version, or name), this command will fetch +it to the cache, and then copy the tarball to the current working +directory as \fB\-\.tgz\fP, and then write the filenames out to +stdout\. +.P +If the same package is specified multiple times, then the file will be +overwritten the second time\. +.P +If no arguments are supplied, then npm packs the current package folder\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-ping.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-ping.3 new file mode 100644 index 00000000..30702e24 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-ping.3 @@ -0,0 +1,17 @@ +.TH "NPM\-PING" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-ping\fR \- Ping npm registry +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.registry\.ping(registry, options, function (er, pong)) +.fi +.RE +.SH DESCRIPTION +.P +Attempts to connect to the given registry, returning a \fBpong\fP +object with various metadata if it succeeds\. +.P +This function is primarily useful for debugging connection issues +to npm registries\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-prefix.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-prefix.3 new file mode 100644 index 00000000..e9e48dd0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-prefix.3 @@ -0,0 +1,18 @@ +.TH "NPM\-PREFIX" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-prefix\fR \- Display prefix +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.prefix(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +Print the prefix to standard out\. +.P +\|'args' is never used and callback is never called with data\. +\|'args' must be present or things will break\. +.P +This function is not useful programmatically diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-prune.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-prune.3 new file mode 100644 index 00000000..51f4b4d2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-prune.3 @@ -0,0 +1,20 @@ +.TH "NPM\-PRUNE" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-prune\fR \- Remove extraneous packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.prune([packages,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command removes "extraneous" packages\. +.P +The first parameter is optional, and it specifies packages to be removed\. +.P +No packages are specified, then all packages will be checked\. +.P +Extraneous packages are packages that are not listed on the parent +package's dependencies list\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-publish.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-publish.3 new file mode 100644 index 00000000..58829570 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-publish.3 @@ -0,0 +1,41 @@ +.TH "NPM\-PUBLISH" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-publish\fR \- Publish a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.publish([packages,] callback) +.fi +.RE +.SH DESCRIPTION +.P +Publishes a package to the registry so that it can be installed by name\. +Possible values in the 'packages' array are: +.RS 0 +.IP \(bu 2 +\fB\fP: +A folder containing a package\.json file +.IP \(bu 2 +\fB\fP: +A url or file path to a gzipped tar archive containing a single folder +with a package\.json file inside\. + +.RE +.P +If the package array is empty, npm will try to publish something in the +current working directory\. +.P +This command could fails if one of the packages specified already exists in +the registry\. Overwrites when the "force" environment variable is set\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm apihelp owner + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-rebuild.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-rebuild.3 new file mode 100644 index 00000000..8cf62dc5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-rebuild.3 @@ -0,0 +1,18 @@ +.TH "NPM\-REBUILD" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-rebuild\fR \- Rebuild a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.rebuild([packages,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command runs the \fBnpm build\fP command on each of the matched packages\. This is useful +when you install a new version of node, and must recompile all your C++ addons with +the new binary\. If no 'packages' parameter is specify, every package will be rebuilt\. +.SH CONFIGURATION +.P +See \fBnpm help build\fP diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-repo.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-repo.3 new file mode 100644 index 00000000..2044aa56 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-repo.3 @@ -0,0 +1,22 @@ +.TH "NPM\-REPO" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-repo\fR \- Open package repository page in the browser +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.repo(package, callback) +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +repository URL, and then tries to open it using the \fB\-\-browser\fP +config param\. +.P +Like other commands, the first parameter is an array\. This command only +uses the first element, which is expected to be a package name with an +optional version number\. +.P +This command will launch a browser, so this command may not be the most +friendly for programmatic use\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-restart.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-restart.3 new file mode 100644 index 00000000..a81e93bf --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-restart.3 @@ -0,0 +1,58 @@ +.TH "NPM\-RESTART" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-restart\fR \- Restart a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.restart(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This restarts a package (or multiple packages)\. +.P +This runs a package's "stop", "restart", and "start" scripts, and associated +pre\- and post\- scripts, in the order given below: +.RS 0 +.IP 1. 3 +prerestart +.IP 2. 3 +prestop +.IP 3. 3 +stop +.IP 4. 3 +poststop +.IP 5. 3 +restart +.IP 6. 3 +prestart +.IP 7. 3 +start +.IP 8. 3 +poststart +.IP 9. 3 +postrestart + +.RE +.P +If no version is specified, then it restarts the "active" version\. +.P +npm can restart multiple packages\. Just specify multiple packages in +the \fBpackages\fP parameter\. +.SH NOTE +.P +Note that the "restart" script is run \fBin addition to\fR the "stop" +and "start" scripts, not instead of them\. +.P +This is the behavior as of \fBnpm\fP major version 2\. A change in this +behavior will be accompanied by an increase in major version number +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm apihelp start +.IP \(bu 2 +npm apihelp stop + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-root.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-root.3 new file mode 100644 index 00000000..2f552504 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-root.3 @@ -0,0 +1,18 @@ +.TH "NPM\-ROOT" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-root\fR \- Display npm root +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.root(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +Print the effective \fBnode_modules\fP folder to standard out\. +.P +\|'args' is never used and callback is never called with data\. +\|'args' must be present or things will break\. +.P +This function is not useful programmatically\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-run-script.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-run-script.3 new file mode 100644 index 00000000..54becc99 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-run-script.3 @@ -0,0 +1,37 @@ +.TH "NPM\-RUN\-SCRIPT" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-run-script\fR \- Run arbitrary package scripts +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.run\-script(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +This runs an arbitrary command from a package's "scripts" object\. +.P +It is used by the test, start, restart, and stop commands, but can be +called directly, as well\. +.P +The 'args' parameter is an array of strings\. Behavior depends on the number +of elements\. If there is only one element, npm assumes that the element +represents a command to be run on the local repository\. If there is more than +one element, then the first is assumed to be the package and the second is +assumed to be the command to run\. All other elements are ignored\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm apihelp test +.IP \(bu 2 +npm apihelp start +.IP \(bu 2 +npm apihelp restart +.IP \(bu 2 +npm apihelp stop + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-search.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-search.3 new file mode 100644 index 00000000..1b760378 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-search.3 @@ -0,0 +1,51 @@ +.TH "NPM\-SEARCH" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-search\fR \- Search for packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.search(searchTerms, [silent,] [staleness,] callback) +.fi +.RE +.SH DESCRIPTION +.P +Search the registry for packages matching the search terms\. The available parameters are: +.RS 0 +.IP \(bu 2 +searchTerms: +Array of search terms\. These terms are case\-insensitive\. +.IP \(bu 2 +silent: +If true, npm will not log anything to the console\. +.IP \(bu 2 +staleness: +This is the threshold for stale packages\. "Fresh" packages are not refreshed +from the registry\. This value is measured in seconds\. +.IP \(bu 2 +callback: +Returns an object where each key is the name of a package, and the value +is information about that package along with a 'words' property, which is +a space\-delimited string of all of the interesting words in that package\. +The only properties included are those that are searched, which generally include: +.RS 0 +.IP \(bu 2 +name +.IP \(bu 2 +description +.IP \(bu 2 +maintainers +.IP \(bu 2 +url +.IP \(bu 2 +keywords + +.RE + +.RE +.P +A search on the registry excludes any result that does not match all of the +search terms\. It also removes any items from the results that contain an +excluded term (the "searchexclude" config)\. The search is case insensitive +and doesn't try to read your mind (it doesn't do any verb tense matching or the +like)\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-shrinkwrap.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-shrinkwrap.3 new file mode 100644 index 00000000..7deb9c20 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-shrinkwrap.3 @@ -0,0 +1,23 @@ +.TH "NPM\-SHRINKWRAP" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-shrinkwrap\fR \- programmatically generate package shrinkwrap file +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.shrinkwrap(args, [silent,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This acts much the same ways as shrinkwrapping on the command\-line\. +.P +This command does not take any arguments, but 'args' must be defined\. +Beyond that, if any arguments are passed in, npm will politely warn that it +does not take positional arguments\. +.P +If the 'silent' parameter is set to true, nothing will be output to the screen, +but the shrinkwrap file will still be written\. +.P +Finally, 'callback' is a function that will be called when the shrinkwrap has +been saved\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-start.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-start.3 new file mode 100644 index 00000000..d0476c61 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-start.3 @@ -0,0 +1,16 @@ +.TH "NPM\-START" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-start\fR \- Start a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.start(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This runs a package's "start" script, if one was provided\. +.P +npm can start multiple packages\. Just specify multiple packages in the +\fBpackages\fP parameter\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-stop.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-stop.3 new file mode 100644 index 00000000..e21d4648 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-stop.3 @@ -0,0 +1,16 @@ +.TH "NPM\-STOP" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-stop\fR \- Stop a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.stop(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This runs a package's "stop" script, if one was provided\. +.P +npm can run stop on multiple packages\. Just specify multiple packages +in the \fBpackages\fP parameter\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-tag.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-tag.3 new file mode 100644 index 00000000..f2a7a2ad --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-tag.3 @@ -0,0 +1,26 @@ +.TH "NPM\-TAG" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-tag\fR \- Tag a published version +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.tag(package@version, tag, callback) +.fi +.RE +.SH DESCRIPTION +.P +Tags the specified version of the package with the specified tag, or the +\fB\-\-tag\fP config if not specified\. +.P +The 'package@version' is an array of strings, but only the first two elements are +currently used\. +.P +The first element must be in the form package@version, where package +is the package name and version is the version number (much like installing a +specific version)\. +.P +The second element is the name of the tag to tag this version with\. If this +parameter is missing or falsey (empty), the default from the config will be +used\. For more information about how to set this config, check +\fBman 3 npm\-config\fP for programmatic usage or \fBman npm\-config\fP for cli usage\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-test.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-test.3 new file mode 100644 index 00000000..3c1c08c3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-test.3 @@ -0,0 +1,19 @@ +.TH "NPM\-TEST" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-test\fR \- Test a package +.SH SYNOPSIS +.P +.RS 2 +.nf + npm\.commands\.test(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This runs a package's "test" script, if one was provided\. +.P +To run tests as a condition of installation, set the \fBnpat\fP config to +true\. +.P +npm can run tests on multiple packages\. Just specify multiple packages +in the \fBpackages\fP parameter\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-uninstall.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-uninstall.3 new file mode 100644 index 00000000..faaab43b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-uninstall.3 @@ -0,0 +1,19 @@ +.TH "NPM\-UNINSTALL" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-uninstall\fR \- uninstall a package programmatically +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.uninstall(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This acts much the same ways as uninstalling on the command\-line\. +.P +The 'packages' parameter is an array of strings\. Each element in the array is +the name of a package to be uninstalled\. +.P +Finally, 'callback' is a function that will be called when all packages have been +uninstalled or when an error has been encountered\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-unpublish.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-unpublish.3 new file mode 100644 index 00000000..be9b76eb --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-unpublish.3 @@ -0,0 +1,23 @@ +.TH "NPM\-UNPUBLISH" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-unpublish\fR \- Remove a package from the registry +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.unpublish(package, callback) +.fi +.RE +.SH DESCRIPTION +.P +This removes a package version from the registry, deleting its +entry and removing the tarball\. +.P +The package parameter must be defined\. +.P +Only the first element in the package parameter is used\. If there is no first +element, then npm assumes that the package at the current working directory +is what is meant\. +.P +If no version is specified, or if all versions are removed then +the root package entry is removed from the registry entirely\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-update.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-update.3 new file mode 100644 index 00000000..e5c82236 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-update.3 @@ -0,0 +1,25 @@ +.TH "NPM\-UPDATE" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-update\fR \- Update a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.update(packages, callback) +.fi +.RE +.TH "DESCRIPTION" "" "March 2016" "" "" +.SH "NAME" +\fBDESCRIPTION\fR +.P +Updates a package, upgrading it to the latest version\. It also installs any +missing packages\. +.P +The \fBpackages\fP argument is an array of packages to update\. The \fBcallback\fP +parameter will be called when done or when an error occurs\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help update + +.RE diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-version.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-version.3 new file mode 100644 index 00000000..38fbc73f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-version.3 @@ -0,0 +1,21 @@ +.TH "NPM\-VERSION" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-version\fR \- Bump a package version +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.version(newversion, callback) +.fi +.RE +.SH DESCRIPTION +.P +Run this in a package directory to bump the version and write the new +data back to the package\.json file\. +.P +If run in a git repo, it will also create a version commit and tag, and +fail if the repo is not clean\. +.P +Like all other commands, this function takes a string array as its first +parameter\. The difference, however, is this function will fail if it does +not have exactly one element\. The only element should be a version number\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-view.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-view.3 new file mode 100644 index 00000000..fff737d7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-view.3 @@ -0,0 +1,130 @@ +.TH "NPM\-VIEW" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-view\fR \- View registry info +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.view(args, [silent,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command shows data about a package and prints it to the stream +referenced by the \fBoutfd\fP config, which defaults to stdout\. +.P +The "args" parameter is an ordered list that closely resembles the command\-line +usage\. The elements should be ordered such that the first element is +the package and version (package@version)\. The version is optional\. After that, +the rest of the parameters are fields with optional subfields ("field\.subfield") +which can be used to get only the information desired from the registry\. +.P +The callback will be passed all of the data returned by the query\. +.P +For example, to get the package registry entry for the \fBconnect\fP package, +you can do this: +.P +.RS 2 +.nf +npm\.commands\.view(["connect"], callback) +.fi +.RE +.P +If no version is specified, "latest" is assumed\. +.P +Field names can be specified after the package descriptor\. +For example, to show the dependencies of the \fBronn\fP package at version +0\.3\.5, you could do the following: +.P +.RS 2 +.nf +npm\.commands\.view(["ronn@0\.3\.5", "dependencies"], callback) +.fi +.RE +.P +You can view child field by separating them with a period\. +To view the git repository URL for the latest version of npm, you could +do this: +.P +.RS 2 +.nf +npm\.commands\.view(["npm", "repository\.url"], callback) +.fi +.RE +.P +For fields that are arrays, requesting a non\-numeric field will return +all of the values from the objects in the list\. For example, to get all +the contributor names for the "express" project, you can do this: +.P +.RS 2 +.nf +npm\.commands\.view(["express", "contributors\.email"], callback) +.fi +.RE +.P +You may also use numeric indices in square braces to specifically select +an item in an array field\. To just get the email address of the first +contributor in the list, you can do this: +.P +.RS 2 +.nf +npm\.commands\.view(["express", "contributors[0]\.email"], callback) +.fi +.RE +.P +Multiple fields may be specified, and will be printed one after another\. +For exampls, to get all the contributor names and email addresses, you +can do this: +.P +.RS 2 +.nf +npm\.commands\.view(["express", "contributors\.name", "contributors\.email"], callback) +.fi +.RE +.P +"Person" fields are shown as a string if they would be shown as an +object\. So, for example, this will show the list of npm contributors in +the shortened string format\. (See \fBnpm help json\fP for more on this\.) +.P +.RS 2 +.nf +npm\.commands\.view(["npm", "contributors"], callback) +.fi +.RE +.P +If a version range is provided, then data will be printed for every +matching version of the package\. This will show which version of jsdom +was required by each matching version of yui3: +.P +.RS 2 +.nf +npm\.commands\.view(["yui3@>0\.5\.4", "dependencies\.jsdom"], callback) +.fi +.RE +.SH OUTPUT +.P +If only a single string field for a single version is output, then it +will not be colorized or quoted, so as to enable piping the output to +another command\. +.P +If the version range matches multiple versions, than each printed value +will be prefixed with the version it applies to\. +.P +If multiple fields are requested, than each of them are prefixed with +the field name\. +.P +Console output can be disabled by setting the 'silent' parameter to true\. +.SH RETURN VALUE +.P +The data returned will be an object in this formation: +.P +.RS 2 +.nf +{ : + { : + , \.\.\. } +, \.\.\. } +.fi +.RE +.P +corresponding to the list of fields selected\. diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-whoami.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-whoami.3 new file mode 100644 index 00000000..da265caa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm-whoami.3 @@ -0,0 +1,18 @@ +.TH "NPM\-WHOAMI" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-whoami\fR \- Display npm username +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.whoami(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +Print the \fBusername\fP config to standard output\. +.P +\|'args' is never used and callback is never called with data\. +\|'args' must be present or things will break\. +.P +This function is not useful programmatically diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man3/npm.3 b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm.3 new file mode 100644 index 00000000..5750bf10 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man3/npm.3 @@ -0,0 +1,124 @@ +.TH "NPM" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm\fR \- javascript package manager +.SH SYNOPSIS +.P +.RS 2 +.nf +var npm = require("npm") +npm\.load([configObject, ]function (er, npm) { + // use the npm object, now that it's loaded\. + + npm\.config\.set(key, val) + val = npm\.config\.get(key) + + console\.log("prefix = %s", npm\.prefix) + + npm\.commands\.install(["package"], cb) +}) +.fi +.RE +.SH VERSION +.P +2.15.1 +.SH DESCRIPTION +.P +This is the API documentation for npm\. +To find documentation of the command line +client, see npm help \fBnpm\fP\|\. +.P +Prior to using npm's commands, \fBnpm\.load()\fP must be called\. If you provide +\fBconfigObject\fP as an object map of top\-level configs, they override the values +stored in the various config locations\. In the npm command line client, this +set of configs is parsed from the command line options\. Additional +configuration params are loaded from two configuration files\. See +npm help \fBnpm\-config\fP, npm help 7 \fBnpm\-config\fP, and npm help 5 \fBnpmrc\fP for more information\. +.P +After that, each of the functions are accessible in the +commands object: \fBnpm\.commands\.\fP\|\. See npm help 7 \fBnpm\-index\fP for a list of +all possible commands\. +.P +All commands on the command object take an \fBarray\fR of positional argument +\fBstrings\fR\|\. The last argument to any function is a callback\. Some +commands take other optional arguments\. +.P +Configs cannot currently be set on a per function basis, as each call to +npm\.config\.set will change the value for \fIall\fR npm commands in that process\. +.P +To find API documentation for a specific command, run the \fBnpm apihelp\fP +command\. +.SH METHODS AND PROPERTIES +.RS 0 +.IP \(bu 2 +\fBnpm\.load(configs, cb)\fP + Load the configuration params, and call the \fBcb\fP function once the + globalconfig and userconfig files have been loaded as well, or on + nextTick if they've already been loaded\. +.IP \(bu 2 +\fBnpm\.config\fP + An object for accessing npm configuration parameters\. +.RS 0 +.IP \(bu 2 +\fBnpm\.config\.get(key)\fP +.IP \(bu 2 +\fBnpm\.config\.set(key, val)\fP +.IP \(bu 2 +\fBnpm\.config\.del(key)\fP + +.RE +.IP \(bu 2 +\fBnpm\.dir\fP or \fBnpm\.root\fP + The \fBnode_modules\fP directory where npm will operate\. +.IP \(bu 2 +\fBnpm\.prefix\fP + The prefix where npm is operating\. (Most often the current working + directory\.) +.IP \(bu 2 +\fBnpm\.cache\fP + The place where npm keeps JSON and tarballs it fetches from the + registry (or uploads to the registry)\. +.IP \(bu 2 +\fBnpm\.tmp\fP + npm's temporary working directory\. +.IP \(bu 2 +\fBnpm\.deref\fP + Get the "real" name for a command that has either an alias or + abbreviation\. + +.RE +.SH MAGIC +.P +For each of the methods in the \fBnpm\.commands\fP object, a method is added to the +npm object, which takes a set of positional string arguments rather than an +array and a callback\. +.P +If the last argument is a callback, then it will use the supplied +callback\. However, if no callback is provided, then it will print out +the error or results\. +.P +For example, this would work in a node repl: +.P +.RS 2 +.nf +> npm = require("npm") +> npm\.load() // wait a sec\.\.\. +> npm\.install("dnode", "express") +.fi +.RE +.P +Note that that \fIwon't\fR work in a node program, since the \fBinstall\fP +method will get called before the configuration load is completed\. +.SH ABBREVS +.P +In order to support \fBnpm ins foo\fP instead of \fBnpm install foo\fP, the +\fBnpm\.commands\fP object has a set of abbreviations as well as the full +method names\. Use the \fBnpm\.deref\fP method to find the real name\. +.P +For example: +.P +.RS 2 +.nf +var cmd = npm\.deref("unp") // cmd === "unpublish" +.fi +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man5/npm-folders.5 b/bin/nodejs0.10.47/node_modules/npm/man/man5/npm-folders.5 new file mode 100644 index 00000000..46f902a5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man5/npm-folders.5 @@ -0,0 +1,229 @@ +.TH "NPM\-FOLDERS" "5" "March 2016" "" "" +.SH "NAME" +\fBnpm-folders\fR \- Folder Structures Used by npm +.SH DESCRIPTION +.P +npm puts various things on your computer\. That's its job\. +.P +This document will tell you what it puts where\. +.SS tl;dr +.RS 0 +.IP \(bu 2 +Local install (default): puts stuff in \fB\|\./node_modules\fP of the current +package root\. +.IP \(bu 2 +Global install (with \fB\-g\fP): puts stuff in /usr/local or wherever node +is installed\. +.IP \(bu 2 +Install it \fBlocally\fR if you're going to \fBrequire()\fP it\. +.IP \(bu 2 +Install it \fBglobally\fR if you're going to run it on the command line\. +.IP \(bu 2 +If you need both, then install it in both places, or use \fBnpm link\fP\|\. + +.RE +.SS prefix Configuration +.P +The \fBprefix\fP config defaults to the location where node is installed\. +On most systems, this is \fB/usr/local\fP\|\. On windows, this is the exact +location of the node\.exe binary\. On Unix systems, it's one level up, +since node is typically installed at \fB{prefix}/bin/node\fP rather than +\fB{prefix}/node\.exe\fP\|\. +.P +When the \fBglobal\fP flag is set, npm installs things into this prefix\. +When it is not set, it uses the root of the current package, or the +current working directory if not in a package already\. +.SS Node Modules +.P +Packages are dropped into the \fBnode_modules\fP folder under the \fBprefix\fP\|\. +When installing locally, this means that you can +\fBrequire("packagename")\fP to load its main module, or +\fBrequire("packagename/lib/path/to/sub/module")\fP to load other modules\. +.P +Global installs on Unix systems go to \fB{prefix}/lib/node_modules\fP\|\. +Global installs on Windows go to \fB{prefix}/node_modules\fP (that is, no +\fBlib\fP folder\.) +.P +Scoped packages are installed the same way, except they are grouped together +in a sub\-folder of the relevant \fBnode_modules\fP folder with the name of that +scope prefix by the @ symbol, e\.g\. \fBnpm install @myorg/package\fP would place +the package in \fB{prefix}/node_modules/@myorg/package\fP\|\. See npm help 7 \fBscope\fP for +more details\. +.P +If you wish to \fBrequire()\fP a package, then install it locally\. +.SS Executables +.P +When in global mode, executables are linked into \fB{prefix}/bin\fP on Unix, +or directly into \fB{prefix}\fP on Windows\. +.P +When in local mode, executables are linked into +\fB\|\./node_modules/\.bin\fP so that they can be made available to scripts run +through npm\. (For example, so that a test runner will be in the path +when you run \fBnpm test\fP\|\.) +.SS Man Pages +.P +When in global mode, man pages are linked into \fB{prefix}/share/man\fP\|\. +.P +When in local mode, man pages are not installed\. +.P +Man pages are not installed on Windows systems\. +.SS Cache +.P +See npm help \fBnpm\-cache\fP\|\. Cache files are stored in \fB~/\.npm\fP on Posix, or +\fB~/npm\-cache\fP on Windows\. +.P +This is controlled by the \fBcache\fP configuration param\. +.SS Temp Files +.P +Temporary files are stored by default in the folder specified by the +\fBtmp\fP config, which defaults to the TMPDIR, TMP, or TEMP environment +variables, or \fB/tmp\fP on Unix and \fBc:\\windows\\temp\fP on Windows\. +.P +Temp files are given a unique folder under this root for each run of the +program, and are deleted upon successful exit\. +.SH More Information +.P +When installing locally, npm first tries to find an appropriate +\fBprefix\fP folder\. This is so that \fBnpm install foo@1\.2\.3\fP will install +to the sensible root of your package, even if you happen to have \fBcd\fPed +into some other folder\. +.P +Starting at the $PWD, npm will walk up the folder tree checking for a +folder that contains either a \fBpackage\.json\fP file, or a \fBnode_modules\fP +folder\. If such a thing is found, then that is treated as the effective +"current directory" for the purpose of running npm commands\. (This +behavior is inspired by and similar to git's \.git\-folder seeking +logic when running git commands in a working dir\.) +.P +If no package root is found, then the current folder is used\. +.P +When you run \fBnpm install foo@1\.2\.3\fP, then the package is loaded into +the cache, and then unpacked into \fB\|\./node_modules/foo\fP\|\. Then, any of +foo's dependencies are similarly unpacked into +\fB\|\./node_modules/foo/node_modules/\.\.\.\fP\|\. +.P +Any bin files are symlinked to \fB\|\./node_modules/\.bin/\fP, so that they may +be found by npm scripts when necessary\. +.SS Global Installation +.P +If the \fBglobal\fP configuration is set to true, then npm will +install packages "globally"\. +.P +For global installation, packages are installed roughly the same way, +but using the folders described above\. +.SS Cycles, Conflicts, and Folder Parsimony +.P +Cycles are handled using the property of node's module system that it +walks up the directories looking for \fBnode_modules\fP folders\. So, at every +stage, if a package is already installed in an ancestor \fBnode_modules\fP +folder, then it is not installed at the current location\. +.P +Consider the case above, where \fBfoo \-> bar \-> baz\fP\|\. Imagine if, in +addition to that, baz depended on bar, so you'd have: +\fBfoo \-> bar \-> baz \-> bar \-> baz \.\.\.\fP\|\. However, since the folder +structure is: \fBfoo/node_modules/bar/node_modules/baz\fP, there's no need to +put another copy of bar into \fB\|\.\.\./baz/node_modules\fP, since when it calls +require("bar"), it will get the copy that is installed in +\fBfoo/node_modules/bar\fP\|\. +.P +This shortcut is only used if the exact same +version would be installed in multiple nested \fBnode_modules\fP folders\. It +is still possible to have \fBa/node_modules/b/node_modules/a\fP if the two +"a" packages are different versions\. However, without repeating the +exact same package multiple times, an infinite regress will always be +prevented\. +.P +Another optimization can be made by installing dependencies at the +highest level possible, below the localized "target" folder\. +.SS Example +.P +Consider this dependency graph: +.P +.RS 2 +.nf +foo ++\-\- blerg@1\.2\.5 ++\-\- bar@1\.2\.3 +| +\-\- blerg@1\.x (latest=1\.3\.7) +| +\-\- baz@2\.x +| | `\-\- quux@3\.x +| | `\-\- bar@1\.2\.3 (cycle) +| `\-\- asdf@* +`\-\- baz@1\.2\.3 + `\-\- quux@3\.x + `\-\- bar +.fi +.RE +.P +In this case, we might expect a folder structure like this: +.P +.RS 2 +.nf +foo ++\-\- node_modules + +\-\- blerg (1\.2\.5) <\-\-\-[A] + +\-\- bar (1\.2\.3) <\-\-\-[B] + | `\-\- node_modules + | +\-\- baz (2\.0\.2) <\-\-\-[C] + | | `\-\- node_modules + | | `\-\- quux (3\.2\.0) + | `\-\- asdf (2\.3\.4) + `\-\- baz (1\.2\.3) <\-\-\-[D] + `\-\- node_modules + `\-\- quux (3\.2\.0) <\-\-\-[E] +.fi +.RE +.P +Since foo depends directly on \fBbar@1\.2\.3\fP and \fBbaz@1\.2\.3\fP, those are +installed in foo's \fBnode_modules\fP folder\. +.P +Even though the latest copy of blerg is 1\.3\.7, foo has a specific +dependency on version 1\.2\.5\. So, that gets installed at [A]\. Since the +parent installation of blerg satisfies bar's dependency on \fBblerg@1\.x\fP, +it does not install another copy under [B]\. +.P +Bar [B] also has dependencies on baz and asdf, so those are installed in +bar's \fBnode_modules\fP folder\. Because it depends on \fBbaz@2\.x\fP, it cannot +re\-use the \fBbaz@1\.2\.3\fP installed in the parent \fBnode_modules\fP folder [D], +and must install its own copy [C]\. +.P +Underneath bar, the \fBbaz \-> quux \-> bar\fP dependency creates a cycle\. +However, because bar is already in quux's ancestry [B], it does not +unpack another copy of bar into that folder\. +.P +Underneath \fBfoo \-> baz\fP [D], quux's [E] folder tree is empty, because its +dependency on bar is satisfied by the parent folder copy installed at [B]\. +.P +For a graphical breakdown of what is installed where, use \fBnpm ls\fP\|\. +.SS Publishing +.P +Upon publishing, npm will look in the \fBnode_modules\fP folder\. If any of +the items there are not in the \fBbundledDependencies\fP array, then they will +not be included in the package tarball\. +.P +This allows a package maintainer to install all of their dependencies +(and dev dependencies) locally, but only re\-publish those items that +cannot be found elsewhere\. See npm help 5 \fBpackage\.json\fP for more information\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help pack +.IP \(bu 2 +npm help cache +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help publish + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man5/npm-global.5 b/bin/nodejs0.10.47/node_modules/npm/man/man5/npm-global.5 new file mode 100644 index 00000000..46f902a5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man5/npm-global.5 @@ -0,0 +1,229 @@ +.TH "NPM\-FOLDERS" "5" "March 2016" "" "" +.SH "NAME" +\fBnpm-folders\fR \- Folder Structures Used by npm +.SH DESCRIPTION +.P +npm puts various things on your computer\. That's its job\. +.P +This document will tell you what it puts where\. +.SS tl;dr +.RS 0 +.IP \(bu 2 +Local install (default): puts stuff in \fB\|\./node_modules\fP of the current +package root\. +.IP \(bu 2 +Global install (with \fB\-g\fP): puts stuff in /usr/local or wherever node +is installed\. +.IP \(bu 2 +Install it \fBlocally\fR if you're going to \fBrequire()\fP it\. +.IP \(bu 2 +Install it \fBglobally\fR if you're going to run it on the command line\. +.IP \(bu 2 +If you need both, then install it in both places, or use \fBnpm link\fP\|\. + +.RE +.SS prefix Configuration +.P +The \fBprefix\fP config defaults to the location where node is installed\. +On most systems, this is \fB/usr/local\fP\|\. On windows, this is the exact +location of the node\.exe binary\. On Unix systems, it's one level up, +since node is typically installed at \fB{prefix}/bin/node\fP rather than +\fB{prefix}/node\.exe\fP\|\. +.P +When the \fBglobal\fP flag is set, npm installs things into this prefix\. +When it is not set, it uses the root of the current package, or the +current working directory if not in a package already\. +.SS Node Modules +.P +Packages are dropped into the \fBnode_modules\fP folder under the \fBprefix\fP\|\. +When installing locally, this means that you can +\fBrequire("packagename")\fP to load its main module, or +\fBrequire("packagename/lib/path/to/sub/module")\fP to load other modules\. +.P +Global installs on Unix systems go to \fB{prefix}/lib/node_modules\fP\|\. +Global installs on Windows go to \fB{prefix}/node_modules\fP (that is, no +\fBlib\fP folder\.) +.P +Scoped packages are installed the same way, except they are grouped together +in a sub\-folder of the relevant \fBnode_modules\fP folder with the name of that +scope prefix by the @ symbol, e\.g\. \fBnpm install @myorg/package\fP would place +the package in \fB{prefix}/node_modules/@myorg/package\fP\|\. See npm help 7 \fBscope\fP for +more details\. +.P +If you wish to \fBrequire()\fP a package, then install it locally\. +.SS Executables +.P +When in global mode, executables are linked into \fB{prefix}/bin\fP on Unix, +or directly into \fB{prefix}\fP on Windows\. +.P +When in local mode, executables are linked into +\fB\|\./node_modules/\.bin\fP so that they can be made available to scripts run +through npm\. (For example, so that a test runner will be in the path +when you run \fBnpm test\fP\|\.) +.SS Man Pages +.P +When in global mode, man pages are linked into \fB{prefix}/share/man\fP\|\. +.P +When in local mode, man pages are not installed\. +.P +Man pages are not installed on Windows systems\. +.SS Cache +.P +See npm help \fBnpm\-cache\fP\|\. Cache files are stored in \fB~/\.npm\fP on Posix, or +\fB~/npm\-cache\fP on Windows\. +.P +This is controlled by the \fBcache\fP configuration param\. +.SS Temp Files +.P +Temporary files are stored by default in the folder specified by the +\fBtmp\fP config, which defaults to the TMPDIR, TMP, or TEMP environment +variables, or \fB/tmp\fP on Unix and \fBc:\\windows\\temp\fP on Windows\. +.P +Temp files are given a unique folder under this root for each run of the +program, and are deleted upon successful exit\. +.SH More Information +.P +When installing locally, npm first tries to find an appropriate +\fBprefix\fP folder\. This is so that \fBnpm install foo@1\.2\.3\fP will install +to the sensible root of your package, even if you happen to have \fBcd\fPed +into some other folder\. +.P +Starting at the $PWD, npm will walk up the folder tree checking for a +folder that contains either a \fBpackage\.json\fP file, or a \fBnode_modules\fP +folder\. If such a thing is found, then that is treated as the effective +"current directory" for the purpose of running npm commands\. (This +behavior is inspired by and similar to git's \.git\-folder seeking +logic when running git commands in a working dir\.) +.P +If no package root is found, then the current folder is used\. +.P +When you run \fBnpm install foo@1\.2\.3\fP, then the package is loaded into +the cache, and then unpacked into \fB\|\./node_modules/foo\fP\|\. Then, any of +foo's dependencies are similarly unpacked into +\fB\|\./node_modules/foo/node_modules/\.\.\.\fP\|\. +.P +Any bin files are symlinked to \fB\|\./node_modules/\.bin/\fP, so that they may +be found by npm scripts when necessary\. +.SS Global Installation +.P +If the \fBglobal\fP configuration is set to true, then npm will +install packages "globally"\. +.P +For global installation, packages are installed roughly the same way, +but using the folders described above\. +.SS Cycles, Conflicts, and Folder Parsimony +.P +Cycles are handled using the property of node's module system that it +walks up the directories looking for \fBnode_modules\fP folders\. So, at every +stage, if a package is already installed in an ancestor \fBnode_modules\fP +folder, then it is not installed at the current location\. +.P +Consider the case above, where \fBfoo \-> bar \-> baz\fP\|\. Imagine if, in +addition to that, baz depended on bar, so you'd have: +\fBfoo \-> bar \-> baz \-> bar \-> baz \.\.\.\fP\|\. However, since the folder +structure is: \fBfoo/node_modules/bar/node_modules/baz\fP, there's no need to +put another copy of bar into \fB\|\.\.\./baz/node_modules\fP, since when it calls +require("bar"), it will get the copy that is installed in +\fBfoo/node_modules/bar\fP\|\. +.P +This shortcut is only used if the exact same +version would be installed in multiple nested \fBnode_modules\fP folders\. It +is still possible to have \fBa/node_modules/b/node_modules/a\fP if the two +"a" packages are different versions\. However, without repeating the +exact same package multiple times, an infinite regress will always be +prevented\. +.P +Another optimization can be made by installing dependencies at the +highest level possible, below the localized "target" folder\. +.SS Example +.P +Consider this dependency graph: +.P +.RS 2 +.nf +foo ++\-\- blerg@1\.2\.5 ++\-\- bar@1\.2\.3 +| +\-\- blerg@1\.x (latest=1\.3\.7) +| +\-\- baz@2\.x +| | `\-\- quux@3\.x +| | `\-\- bar@1\.2\.3 (cycle) +| `\-\- asdf@* +`\-\- baz@1\.2\.3 + `\-\- quux@3\.x + `\-\- bar +.fi +.RE +.P +In this case, we might expect a folder structure like this: +.P +.RS 2 +.nf +foo ++\-\- node_modules + +\-\- blerg (1\.2\.5) <\-\-\-[A] + +\-\- bar (1\.2\.3) <\-\-\-[B] + | `\-\- node_modules + | +\-\- baz (2\.0\.2) <\-\-\-[C] + | | `\-\- node_modules + | | `\-\- quux (3\.2\.0) + | `\-\- asdf (2\.3\.4) + `\-\- baz (1\.2\.3) <\-\-\-[D] + `\-\- node_modules + `\-\- quux (3\.2\.0) <\-\-\-[E] +.fi +.RE +.P +Since foo depends directly on \fBbar@1\.2\.3\fP and \fBbaz@1\.2\.3\fP, those are +installed in foo's \fBnode_modules\fP folder\. +.P +Even though the latest copy of blerg is 1\.3\.7, foo has a specific +dependency on version 1\.2\.5\. So, that gets installed at [A]\. Since the +parent installation of blerg satisfies bar's dependency on \fBblerg@1\.x\fP, +it does not install another copy under [B]\. +.P +Bar [B] also has dependencies on baz and asdf, so those are installed in +bar's \fBnode_modules\fP folder\. Because it depends on \fBbaz@2\.x\fP, it cannot +re\-use the \fBbaz@1\.2\.3\fP installed in the parent \fBnode_modules\fP folder [D], +and must install its own copy [C]\. +.P +Underneath bar, the \fBbaz \-> quux \-> bar\fP dependency creates a cycle\. +However, because bar is already in quux's ancestry [B], it does not +unpack another copy of bar into that folder\. +.P +Underneath \fBfoo \-> baz\fP [D], quux's [E] folder tree is empty, because its +dependency on bar is satisfied by the parent folder copy installed at [B]\. +.P +For a graphical breakdown of what is installed where, use \fBnpm ls\fP\|\. +.SS Publishing +.P +Upon publishing, npm will look in the \fBnode_modules\fP folder\. If any of +the items there are not in the \fBbundledDependencies\fP array, then they will +not be included in the package tarball\. +.P +This allows a package maintainer to install all of their dependencies +(and dev dependencies) locally, but only re\-publish those items that +cannot be found elsewhere\. See npm help 5 \fBpackage\.json\fP for more information\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help pack +.IP \(bu 2 +npm help cache +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help publish + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man5/npm-json.5 b/bin/nodejs0.10.47/node_modules/npm/man/man5/npm-json.5 new file mode 100644 index 00000000..4395b83a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man5/npm-json.5 @@ -0,0 +1,917 @@ +.TH "PACKAGE\.JSON" "5" "March 2016" "" "" +.SH "NAME" +\fBpackage.json\fR \- Specifics of npm's package\.json handling +.SH DESCRIPTION +.P +This document is all you need to know about what's required in your package\.json +file\. It must be actual JSON, not just a JavaScript object literal\. +.P +A lot of the behavior described in this document is affected by the config +settings described in npm help 7 \fBnpm\-config\fP\|\. +.SH name +.P +The \fImost\fR important things in your package\.json are the name and version fields\. +Those are actually required, and your package won't install without +them\. The name and version together form an identifier that is assumed +to be completely unique\. Changes to the package should come along with +changes to the version\. +.P +The name is what your thing is called\. +.P +Some rules: +.RS 0 +.IP \(bu 2 +The name must be less than or equal to 214 characters\. This includes the scope for +scoped packages\. +.IP \(bu 2 +The name can't start with a dot or an underscore\. +.IP \(bu 2 +New packages must not have uppercase letters in the name\. +.IP \(bu 2 +The name ends up being part of a URL, an argument on the command line, and a +folder name\. Therefore, the name can't contain any non\-URL\-safe characters\. + +.RE +.P +Some tips: +.RS 0 +.IP \(bu 2 +Don't use the same name as a core Node module\. +.IP \(bu 2 +Don't put "js" or "node" in the name\. It's assumed that it's js, since you're +writing a package\.json file, and you can specify the engine using the "engines" +field\. (See below\.) +.IP \(bu 2 +The name will probably be passed as an argument to require(), so it should +be something short, but also reasonably descriptive\. +.IP \(bu 2 +You may want to check the npm registry to see if there's something by that name +already, before you get too attached to it\. https://www\.npmjs\.com/ + +.RE +.P +A name can be optionally prefixed by a scope, e\.g\. \fB@myorg/mypackage\fP\|\. See +npm help 7 \fBnpm\-scope\fP for more detail\. +.SH version +.P +The \fImost\fR important things in your package\.json are the name and version fields\. +Those are actually required, and your package won't install without +them\. The name and version together form an identifier that is assumed +to be completely unique\. Changes to the package should come along with +changes to the version\. +.P +Version must be parseable by +node\-semver \fIhttps://github\.com/isaacs/node\-semver\fR, which is bundled +with npm as a dependency\. (\fBnpm install semver\fP to use it yourself\.) +.P +More on version numbers and ranges at npm help 7 semver\. +.SH description +.P +Put a description in it\. It's a string\. This helps people discover your +package, as it's listed in \fBnpm search\fP\|\. +.SH keywords +.P +Put keywords in it\. It's an array of strings\. This helps people +discover your package as it's listed in \fBnpm search\fP\|\. +.SH homepage +.P +The url to the project homepage\. +.P +\fBNOTE\fR: This is \fInot\fR the same as "url"\. If you put a "url" field, +then the registry will think it's a redirection to your package that has +been published somewhere else, and spit at you\. +.P +Literally\. Spit\. I'm so not kidding\. +.SH bugs +.P +The url to your project's issue tracker and / or the email address to which +issues should be reported\. These are helpful for people who encounter issues +with your package\. +.P +It should look like this: +.P +.RS 2 +.nf +{ "url" : "https://github\.com/owner/project/issues" +, "email" : "project@hostname\.com" +} +.fi +.RE +.P +You can specify either one or both values\. If you want to provide only a url, +you can specify the value for "bugs" as a simple string instead of an object\. +.P +If a url is provided, it will be used by the \fBnpm bugs\fP command\. +.SH license +.P +You should specify a license for your package so that people know how they are +permitted to use it, and any restrictions you're placing on it\. +.P +If you're using a common license such as BSD\-2\-Clause or MIT, add a +current SPDX license identifier for the license you're using, like this: +.P +.RS 2 +.nf +{ "license" : "BSD\-3\-Clause" } +.fi +.RE +.P +You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\fR\|\. +Ideally you should pick one that is +OSI \fIhttps://opensource\.org/licenses/alphabetical\fR approved\. +.P +If your package is licensed under multiple common licenses, use an SPDX license +expression syntax version 2\.0 string \fIhttps://npmjs\.com/package/spdx\fR, like this: +.P +.RS 2 +.nf +{ "license" : "(ISC OR GPL\-3\.0)" } +.fi +.RE +.P +If you are using a license that hasn't been assigned an SPDX identifier, or if +you are using a custom license, use a string value like this one: +.P +.RS 2 +.nf +{ "license" : "SEE LICENSE IN " } +.fi +.RE +.P +Then include a file named \fB\fP at the top level of the package\. +.P +Some old packages used license objects or a "licenses" property containing an +array of license objects: +.P +.RS 2 +.nf +// Not valid metadata +{ "license" : + { "type" : "ISC" + , "url" : "http://opensource\.org/licenses/ISC" + } +} + +// Not valid metadata +{ "licenses" : + [ + { "type": "MIT" + , "url": "http://www\.opensource\.org/licenses/mit\-license\.php" + } + , { "type": "Apache\-2\.0" + , "url": "http://opensource\.org/licenses/apache2\.0\.php" + } + ] +} +.fi +.RE +.P +Those styles are now deprecated\. Instead, use SPDX expressions, like this: +.P +.RS 2 +.nf +{ "license": "ISC" } + +{ "license": "(MIT OR Apache\-2\.0)" } +.fi +.RE +.P +Finally, if you do not wish to grant others the right to use a private or +unpublished package under any terms: +.P +.RS 2 +.nf +{ "license": "UNLICENSED"} +.fi +.RE +.P +Consider also setting \fB"private": true\fP to prevent accidental publication\. +.SH people fields: author, contributors +.P +The "author" is one person\. "contributors" is an array of people\. A "person" +is an object with a "name" field and optionally "url" and "email", like this: +.P +.RS 2 +.nf +{ "name" : "Barney Rubble" +, "email" : "b@rubble\.com" +, "url" : "http://barnyrubble\.tumblr\.com/" +} +.fi +.RE +.P +Or you can shorten that all into a single string, and npm will parse it for you: +.P +.RS 2 +.nf +"Barney Rubble (http://barnyrubble\.tumblr\.com/)" +.fi +.RE +.P +Both email and url are optional either way\. +.P +npm also sets a top\-level "maintainers" field with your npm user info\. +.SH files +.P +The "files" field is an array of files to include in your project\. If +you name a folder in the array, then it will also include the files +inside that folder\. (Unless they would be ignored by another rule\.) +.P +You can also provide a "\.npmignore" file in the root of your package or +in subdirectories, which will keep files from being included, even +if they would be picked up by the files array\. The \fB\|\.npmignore\fP file +works just like a \fB\|\.gitignore\fP\|\. +.P +Certain files are always included, regardless of settings: +.RS 0 +.IP \(bu 2 +\fBpackage\.json\fP +.IP \(bu 2 +\fBREADME\fP +.IP \(bu 2 +\fBCHANGES\fP / \fBCHANGELOG\fP / \fBHISTORY\fP (any casing and file extension) +.IP \(bu 2 +\fBLICENSE\fP / \fBLICENCE\fP +.IP \(bu 2 +The file in the "main" field + +.RE +.P +Conversely, some files are always ignored: +.RS 0 +.IP \(bu 2 +\fB\|\.git\fP +.IP \(bu 2 +\fBCVS\fP +.IP \(bu 2 +\fB\|\.svn\fP +.IP \(bu 2 +\fB\|\.hg\fP +.IP \(bu 2 +\fB\|\.lock\-wscript\fP +.IP \(bu 2 +\fB\|\.wafpickle\-N\fP +.IP \(bu 2 +\fB\|\.*\.swp\fP +.IP \(bu 2 +\fB\|\.DS_Store\fP +.IP \(bu 2 +\fB\|\._*\fP +.IP \(bu 2 +\fBnpm\-debug\.log\fP +.IP \(bu 2 +\fB\|\.npmrc\fP + +.RE +.SH main +.P +The main field is a module ID that is the primary entry point to your program\. +That is, if your package is named \fBfoo\fP, and a user installs it, and then does +\fBrequire("foo")\fP, then your main module's exports object will be returned\. +.P +This should be a module ID relative to the root of your package folder\. +.P +For most modules, it makes the most sense to have a main script and often not +much else\. +.SH bin +.P +A lot of packages have one or more executable files that they'd like to +install into the PATH\. npm makes this pretty easy (in fact, it uses this +feature to install the "npm" executable\.) +.P +To use this, supply a \fBbin\fP field in your package\.json which is a map of +command name to local file name\. On install, npm will symlink that file into +\fBprefix/bin\fP for global installs, or \fB\|\./node_modules/\.bin/\fP for local +installs\. +.P +For example, myapp could have this: +.P +.RS 2 +.nf +{ "bin" : { "myapp" : "\./cli\.js" } } +.fi +.RE +.P +So, when you install myapp, it'll create a symlink from the \fBcli\.js\fP script to +\fB/usr/local/bin/myapp\fP\|\. +.P +If you have a single executable, and its name should be the name +of the package, then you can just supply it as a string\. For example: +.P +.RS 2 +.nf +{ "name": "my\-program" +, "version": "1\.2\.5" +, "bin": "\./path/to/program" } +.fi +.RE +.P +would be the same as this: +.P +.RS 2 +.nf +{ "name": "my\-program" +, "version": "1\.2\.5" +, "bin" : { "my\-program" : "\./path/to/program" } } +.fi +.RE +.SH man +.P +Specify either a single file or an array of filenames to put in place for the +\fBman\fP program to find\. +.P +If only a single file is provided, then it's installed such that it is the +result from \fBman \fP, regardless of its actual filename\. For example: +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : "\./man/doc\.1" +} +.fi +.RE +.P +would link the \fB\|\./man/doc\.1\fP file in such that it is the target for \fBman foo\fP +.P +If the filename doesn't start with the package name, then it's prefixed\. +So, this: +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : [ "\./man/foo\.1", "\./man/bar\.1" ] +} +.fi +.RE +.P +will create files to do \fBman foo\fP and \fBman foo\-bar\fP\|\. +.P +Man files must end with a number, and optionally a \fB\|\.gz\fP suffix if they are +compressed\. The number dictates which man section the file is installed into\. +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : [ "\./man/foo\.1", "\./man/foo\.2" ] +} +.fi +.RE +.P +will create entries for \fBman foo\fP and \fBman 2 foo\fP +.SH directories +.P +The CommonJS Packages \fIhttp://wiki\.commonjs\.org/wiki/Packages/1\.0\fR spec details a +few ways that you can indicate the structure of your package using a \fBdirectories\fP +object\. If you look at npm's package\.json \fIhttps://registry\.npmjs\.org/npm/latest\fR, +you'll see that it has directories for doc, lib, and man\. +.P +In the future, this information may be used in other creative ways\. +.SS directories\.lib +.P +Tell people where the bulk of your library is\. Nothing special is done +with the lib folder in any way, but it's useful meta info\. +.SS directories\.bin +.P +If you specify a \fBbin\fP directory in \fBdirectories\.bin\fP, all the files in +that folder will be added\. +.P +Because of the way the \fBbin\fP directive works, specifying both a +\fBbin\fP path and setting \fBdirectories\.bin\fP is an error\. If you want to +specify individual files, use \fBbin\fP, and for all the files in an +existing \fBbin\fP directory, use \fBdirectories\.bin\fP\|\. +.SS directories\.man +.P +A folder that is full of man pages\. Sugar to generate a "man" array by +walking the folder\. +.SS directories\.doc +.P +Put markdown files in here\. Eventually, these will be displayed nicely, +maybe, someday\. +.SS directories\.example +.P +Put example scripts in here\. Someday, it might be exposed in some clever way\. +.SS directories\.test +.P +Put your tests in here\. It is currently not exposed, but it might be in the +future\. +.SH repository +.P +Specify the place where your code lives\. This is helpful for people who +want to contribute\. If the git repo is on GitHub, then the \fBnpm docs\fP +command will be able to find you\. +.P +Do it like this: +.P +.RS 2 +.nf +"repository" : + { "type" : "git" + , "url" : "https://github\.com/npm/npm\.git" + } + +"repository" : + { "type" : "svn" + , "url" : "https://v8\.googlecode\.com/svn/trunk/" + } +.fi +.RE +.P +The URL should be a publicly available (perhaps read\-only) url that can be handed +directly to a VCS program without any modification\. It should not be a url to an +html project page that you put in your browser\. It's for computers\. +.P +For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same +shortcut syntax you use for \fBnpm install\fP: +.P +.RS 2 +.nf +"repository": "npm/npm" + +"repository": "gist:11081aaa281" + +"repository": "bitbucket:example/repo" + +"repository": "gitlab:another/repo" +.fi +.RE +.SH scripts +.P +The "scripts" property is a dictionary containing script commands that are run +at various times in the lifecycle of your package\. The key is the lifecycle +event, and the value is the command to run at that point\. +.P +See npm help 7 \fBnpm\-scripts\fP to find out more about writing package scripts\. +.SH config +.P +A "config" object can be used to set configuration parameters used in package +scripts that persist across upgrades\. For instance, if a package had the +following: +.P +.RS 2 +.nf +{ "name" : "foo" +, "config" : { "port" : "8080" } } +.fi +.RE +.P +and then had a "start" command that then referenced the +\fBnpm_package_config_port\fP environment variable, then the user could +override that by doing \fBnpm config set foo:port 8001\fP\|\. +.P +See npm help 7 \fBnpm\-config\fP and npm help 7 \fBnpm\-scripts\fP for more on package +configs\. +.SH dependencies +.P +Dependencies are specified in a simple object that maps a package name to a +version range\. The version range is a string which has one or more +space\-separated descriptors\. Dependencies can also be identified with a +tarball or git URL\. +.P +\fBPlease do not put test harnesses or transpilers in your +\fBdependencies\fP object\.\fR See \fBdevDependencies\fP, below\. +.P +See npm help 7 semver for more details about specifying version ranges\. +.RS 0 +.IP \(bu 2 +\fBversion\fP Must match \fBversion\fP exactly +.IP \(bu 2 +\fB>version\fP Must be greater than \fBversion\fP +.IP \(bu 2 +\fB>=version\fP etc +.IP \(bu 2 +\fB=version1 <=version2\fP\|\. +.IP \(bu 2 +\fBrange1 || range2\fP Passes if either range1 or range2 are satisfied\. +.IP \(bu 2 +\fBgit\.\.\.\fP See 'Git URLs as Dependencies' below +.IP \(bu 2 +\fBuser/repo\fP See 'GitHub URLs' below +.IP \(bu 2 +\fBtag\fP A specific version tagged and published as \fBtag\fP See npm help \fBnpm\-tag\fP +.IP \(bu 2 +\fBpath/path/path\fP See Local Paths \fI#local\-paths\fR below + +.RE +.P +For example, these are all valid: +.P +.RS 2 +.nf +{ "dependencies" : + { "foo" : "1\.0\.0 \- 2\.9999\.9999" + , "bar" : ">=1\.0\.2 <2\.1\.2" + , "baz" : ">1\.0\.2 <=2\.3\.4" + , "boo" : "2\.0\.1" + , "qux" : "<1\.0\.0 || >=2\.3\.1 <2\.4\.5 || >=2\.5\.2 <3\.0\.0" + , "asd" : "http://asdf\.com/asdf\.tar\.gz" + , "til" : "~1\.2" + , "elf" : "~1\.2\.3" + , "two" : "2\.x" + , "thr" : "3\.3\.x" + , "lat" : "latest" + , "dyl" : "file:\.\./dyl" + } +} +.fi +.RE +.SS URLs as Dependencies +.P +You may specify a tarball URL in place of a version range\. +.P +This tarball will be downloaded and installed locally to your package at +install time\. +.SS Git URLs as Dependencies +.P +Git urls can be of the form: +.P +.RS 2 +.nf +git://github\.com/user/project\.git#commit\-ish +git+ssh://user@hostname:project\.git#commit\-ish +git+ssh://user@hostname/project\.git#commit\-ish +git+http://user@hostname/project/blah\.git#commit\-ish +git+https://user@hostname/project/blah\.git#commit\-ish +.fi +.RE +.P +The \fBcommit\-ish\fP can be any tag, sha, or branch which can be supplied as +an argument to \fBgit checkout\fP\|\. The default is \fBmaster\fP\|\. +.SH GitHub URLs +.P +As of version 1\.1\.65, you can refer to GitHub urls as just "foo": +"user/foo\-project"\. Just as with git URLs, a \fBcommit\-ish\fP suffix can be +included\. For example: +.P +.RS 2 +.nf +{ + "name": "foo", + "version": "0\.0\.0", + "dependencies": { + "express": "visionmedia/express", + "mocha": "visionmedia/mocha#4727d357ea" + } +} +.fi +.RE +.SH Local Paths +.P +As of version 2\.0\.0 you can provide a path to a local directory that contains a +package\. Local paths can be saved using \fBnpm install \-\-save\fP, using any of +these forms: +.P +.RS 2 +.nf +\|\.\./foo/bar +~/foo/bar +\|\./foo/bar +/foo/bar +.fi +.RE +.P +in which case they will be normalized to a relative path and added to your +\fBpackage\.json\fP\|\. For example: +.P +.RS 2 +.nf +{ + "name": "baz", + "dependencies": { + "bar": "file:\.\./foo/bar" + } +} +.fi +.RE +.P +This feature is helpful for local offline development and creating +tests that require npm installing where you don't want to hit an +external server, but should not be used when publishing packages +to the public registry\. +.SH devDependencies +.P +If someone is planning on downloading and using your module in their +program, then they probably don't want or need to download and build +the external test or documentation framework that you use\. +.P +In this case, it's best to map these additional items in a \fBdevDependencies\fP +object\. +.P +These things will be installed when doing \fBnpm link\fP or \fBnpm install\fP +from the root of a package, and can be managed like any other npm +configuration param\. See npm help 7 \fBnpm\-config\fP for more on the topic\. +.P +For build steps that are not platform\-specific, such as compiling +CoffeeScript or other languages to JavaScript, use the \fBprepublish\fP +script to do this, and make the required package a devDependency\. +.P +For example: +.P +.RS 2 +.nf +{ "name": "ethopia\-waza", + "description": "a delightfully fruity coffee varietal", + "version": "1\.2\.3", + "devDependencies": { + "coffee\-script": "~1\.6\.3" + }, + "scripts": { + "prepublish": "coffee \-o lib/ \-c src/waza\.coffee" + }, + "main": "lib/waza\.js" +} +.fi +.RE +.P +The \fBprepublish\fP script will be run before publishing, so that users +can consume the functionality without requiring them to compile it +themselves\. In dev mode (ie, locally running \fBnpm install\fP), it'll +run this script as well, so that you can test it easily\. +.SH peerDependencies +.P +In some cases, you want to express the compatibility of your package with a +host tool or library, while not necessarily doing a \fBrequire\fP of this host\. +This is usually referred to as a \fIplugin\fR\|\. Notably, your module may be exposing +a specific interface, expected and specified by the host documentation\. +.P +For example: +.P +.RS 2 +.nf +{ + "name": "tea\-latte", + "version": "1\.3\.5", + "peerDependencies": { + "tea": "2\.x" + } +} +.fi +.RE +.P +This ensures your package \fBtea\-latte\fP can be installed \fIalong\fR with the second +major version of the host package \fBtea\fP only\. \fBnpm install tea\-latte\fP could +possibly yield the following dependency graph: +.P +.RS 2 +.nf +├── tea\-latte@1\.3\.5 +└── tea@2\.2\.0 +.fi +.RE +.P +\fBNOTE: npm versions 1 and 2 will automatically install \fBpeerDependencies\fP if +they are not explicitly depended upon higher in the dependency tree\. In the +next major version of npm (npm@3), this will no longer be the case\. You will +receive a warning that the peerDependency is not installed instead\.\fR The +behavior in npms 1 & 2 was frequently confusing and could easily put you into +dependency hell, a situation that npm is designed to avoid as much as possible\. +.P +Trying to install another plugin with a conflicting requirement will cause an +error\. For this reason, make sure your plugin requirement is as broad as +possible, and not to lock it down to specific patch versions\. +.P +Assuming the host complies with semver \fIhttp://semver\.org/\fR, only changes in +the host package's major version will break your plugin\. Thus, if you've worked +with every 1\.x version of the host package, use \fB"^1\.0"\fP or \fB"1\.x"\fP to express +this\. If you depend on features introduced in 1\.5\.2, use \fB">= 1\.5\.2 < 2"\fP\|\. +.SH bundledDependencies +.P +This defines an array of package names that will be bundled when publishing the package\. +.P +In cases where you need to preserve npm packages locally or have them available through a single file download, you can bundle the packages in a tarball file by specifying the package names in the \fBbundledDependencies\fP array and executing \fBnpm pack\fP\|\. +.P +For example: +If we define a package\.json like this: +.P +.RS 2 +.nf +{ + "name": "awesome\-web\-framework", + "version": "1\.0\.0", + "bundledDependencies": [ + 'renderized', 'super\-streams' + ] +} +.fi +.RE +.P +we can obtain \fBawesome\-web\-framework\-1\.0\.0\.tgz\fP file by running \fBnpm pack\fP\|\. This file contains the dependencies \fBrenderized\fP and \fBsuper\-streams\fP which can be installed in a new project by executing \fBnpm install awesome\-web\-framework\-1\.0\.0\.tgz\fP\|\. +.P +If this is spelled \fB"bundleDependencies"\fP, then that is also honored\. +.SH optionalDependencies +.P +If a dependency can be used, but you would like npm to proceed if it cannot be +found or fails to install, then you may put it in the \fBoptionalDependencies\fP +object\. This is a map of package name to version or url, just like the +\fBdependencies\fP object\. The difference is that build failures do not cause +installation to fail\. +.P +It is still your program's responsibility to handle the lack of the +dependency\. For example, something like this: +.P +.RS 2 +.nf +try { + var foo = require('foo') + var fooVersion = require('foo/package\.json')\.version +} catch (er) { + foo = null +} +if ( notGoodFooVersion(fooVersion) ) { + foo = null +} + +// \.\. then later in your program \.\. + +if (foo) { + foo\.doFooThings() +} +.fi +.RE +.P +Entries in \fBoptionalDependencies\fP will override entries of the same name in +\fBdependencies\fP, so it's usually best to only put in one place\. +.SH engines +.P +You can specify the version of node that your stuff works on: +.P +.RS 2 +.nf +{ "engines" : { "node" : ">=0\.10\.3 <0\.12" } } +.fi +.RE +.P +And, like with dependencies, if you don't specify the version (or if you +specify "*" as the version), then any version of node will do\. +.P +If you specify an "engines" field, then npm will require that "node" be +somewhere on that list\. If "engines" is omitted, then npm will just assume +that it works on node\. +.P +You can also use the "engines" field to specify which versions of npm +are capable of properly installing your program\. For example: +.P +.RS 2 +.nf +{ "engines" : { "npm" : "~1\.0\.20" } } +.fi +.RE +.P +Note that, unless the user has set the \fBengine\-strict\fP config flag, this +field is advisory only\. +.SH engineStrict +.P +\fBNOTE: This feature is deprecated and will be removed in npm 3\.0\.0\.\fR +.P +If you are sure that your module will \fIdefinitely not\fR run properly on +versions of Node/npm other than those specified in the \fBengines\fP object, +then you can set \fB"engineStrict": true\fP in your package\.json file\. +This will override the user's \fBengine\-strict\fP config setting\. +.P +Please do not do this unless you are really very very sure\. If your +engines object is something overly restrictive, you can quite easily and +inadvertently lock yourself into obscurity and prevent your users from +updating to new versions of Node\. Consider this choice carefully\. +.SH os +.P +You can specify which operating systems your +module will run on: +.P +.RS 2 +.nf +"os" : [ "darwin", "linux" ] +.fi +.RE +.P +You can also blacklist instead of whitelist operating systems, +just prepend the blacklisted os with a '!': +.P +.RS 2 +.nf +"os" : [ "!win32" ] +.fi +.RE +.P +The host operating system is determined by \fBprocess\.platform\fP +.P +It is allowed to both blacklist, and whitelist, although there isn't any +good reason to do this\. +.SH cpu +.P +If your code only runs on certain cpu architectures, +you can specify which ones\. +.P +.RS 2 +.nf +"cpu" : [ "x64", "ia32" ] +.fi +.RE +.P +Like the \fBos\fP option, you can also blacklist architectures: +.P +.RS 2 +.nf +"cpu" : [ "!arm", "!mips" ] +.fi +.RE +.P +The host architecture is determined by \fBprocess\.arch\fP +.SH preferGlobal +.P +If your package is primarily a command\-line application that should be +installed globally, then set this value to \fBtrue\fP to provide a warning +if it is installed locally\. +.P +It doesn't actually prevent users from installing it locally, but it +does help prevent some confusion if it doesn't work as expected\. +.SH private +.P +If you set \fB"private": true\fP in your package\.json, then npm will refuse +to publish it\. +.P +This is a way to prevent accidental publication of private repositories\. If +you would like to ensure that a given package is only ever published to a +specific registry (for example, an internal registry), then use the +\fBpublishConfig\fP dictionary described below to override the \fBregistry\fP config +param at publish\-time\. +.SH publishConfig +.P +This is a set of config values that will be used at publish\-time\. It's +especially handy if you want to set the tag, registry or access, so that +you can ensure that a given package is not tagged with "latest", published +to the global public registry or that a scoped module is private by default\. +.P +Any config values can be overridden, but of course only "tag", "registry" and +"access" probably matter for the purposes of publishing\. +.P +See npm help 7 \fBnpm\-config\fP to see the list of config options that can be +overridden\. +.SH DEFAULT VALUES +.P +npm will default some values based on package contents\. +.RS 0 +.IP \(bu 2 +\fB"scripts": {"start": "node server\.js"}\fP +If there is a \fBserver\.js\fP file in the root of your package, then npm +will default the \fBstart\fP command to \fBnode server\.js\fP\|\. +.IP \(bu 2 +\fB"scripts":{"preinstall": "node\-gyp rebuild"}\fP +If there is a \fBbinding\.gyp\fP file in the root of your package, npm will +default the \fBpreinstall\fP command to compile using node\-gyp\. +.IP \(bu 2 +\fB"contributors": [\.\.\.]\fP +If there is an \fBAUTHORS\fP file in the root of your package, npm will +treat each line as a \fBName (url)\fP format, where email and url +are optional\. Lines which start with a \fB#\fP or are blank, will be +ignored\. + +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 semver +.IP \(bu 2 +npm help init +.IP \(bu 2 +npm help version +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help help +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help uninstall + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man5/npmrc.5 b/bin/nodejs0.10.47/node_modules/npm/man/man5/npmrc.5 new file mode 100644 index 00000000..e405d516 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man5/npmrc.5 @@ -0,0 +1,101 @@ +.TH "NPMRC" "5" "March 2016" "" "" +.SH "NAME" +\fBnpmrc\fR \- The npm config files +.SH DESCRIPTION +.P +npm gets its config settings from the command line, environment +variables, and \fBnpmrc\fP files\. +.P +The \fBnpm config\fP command can be used to update and edit the contents +of the user and global npmrc files\. +.P +For a list of available configuration options, see npm help 7 config\. +.SH FILES +.P +The four relevant files are: +.RS 0 +.IP \(bu 2 +per\-project config file (/path/to/my/project/\.npmrc) +.IP \(bu 2 +per\-user config file (~/\.npmrc) +.IP \(bu 2 +global config file ($PREFIX/etc/npmrc) +.IP \(bu 2 +npm builtin config file (/path/to/npm/npmrc) + +.RE +.P +All npm config files are an ini\-formatted list of \fBkey = value\fP +parameters\. Environment variables can be replaced using +\fB${VARIABLE_NAME}\fP\|\. For example: +.P +.RS 2 +.nf +prefix = ${HOME}/\.npm\-packages +.fi +.RE +.P +Each of these files is loaded, and config options are resolved in +priority order\. For example, a setting in the userconfig file would +override the setting in the globalconfig file\. +.P +Array values are specified by adding "[]" after the key name\. For +example: +.P +.RS 2 +.nf +key[] = "first value" +key[] = "second value" +.fi +.RE +.P +\fBNOTE:\fR Because local (per\-project or per\-user) \fB\|\.npmrc\fP files can contain +sensitive credentials, they must be readable and writable \fIonly\fR by your user +account (i\.e\. must have a mode of \fB0600\fP), otherwise they \fIwill be ignored by +npm!\fR +.SS Per\-project config file +.P +When working locally in a project, a \fB\|\.npmrc\fP file in the root of the +project (ie, a sibling of \fBnode_modules\fP and \fBpackage\.json\fP) will set +config values specific to this project\. +.P +Note that this only applies to the root of the project that you're +running npm in\. It has no effect when your module is published\. For +example, you can't publish a module that forces itself to install +globally, or in a different location\. +.P +Additionally, this file is not read in global mode, such as when running +\fBnpm install \-g\fP\|\. +.SS Per\-user config file +.P +\fB$HOME/\.npmrc\fP (or the \fBuserconfig\fP param, if set in the environment +or on the command line) +.SS Global config file +.P +\fB$PREFIX/etc/npmrc\fP (or the \fBglobalconfig\fP param, if set above): +This file is an ini\-file formatted list of \fBkey = value\fP parameters\. +Environment variables can be replaced as above\. +.SS Built\-in config file +.P +\fBpath/to/npm/itself/npmrc\fP +.P +This is an unchangeable "builtin" configuration file that npm keeps +consistent across updates\. Set fields in here using the \fB\|\./configure\fP +script that comes with npm\. This is primarily for distribution +maintainers to override default configs in a standard and consistent +manner\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help npm + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man5/package.json.5 b/bin/nodejs0.10.47/node_modules/npm/man/man5/package.json.5 new file mode 100644 index 00000000..4395b83a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man5/package.json.5 @@ -0,0 +1,917 @@ +.TH "PACKAGE\.JSON" "5" "March 2016" "" "" +.SH "NAME" +\fBpackage.json\fR \- Specifics of npm's package\.json handling +.SH DESCRIPTION +.P +This document is all you need to know about what's required in your package\.json +file\. It must be actual JSON, not just a JavaScript object literal\. +.P +A lot of the behavior described in this document is affected by the config +settings described in npm help 7 \fBnpm\-config\fP\|\. +.SH name +.P +The \fImost\fR important things in your package\.json are the name and version fields\. +Those are actually required, and your package won't install without +them\. The name and version together form an identifier that is assumed +to be completely unique\. Changes to the package should come along with +changes to the version\. +.P +The name is what your thing is called\. +.P +Some rules: +.RS 0 +.IP \(bu 2 +The name must be less than or equal to 214 characters\. This includes the scope for +scoped packages\. +.IP \(bu 2 +The name can't start with a dot or an underscore\. +.IP \(bu 2 +New packages must not have uppercase letters in the name\. +.IP \(bu 2 +The name ends up being part of a URL, an argument on the command line, and a +folder name\. Therefore, the name can't contain any non\-URL\-safe characters\. + +.RE +.P +Some tips: +.RS 0 +.IP \(bu 2 +Don't use the same name as a core Node module\. +.IP \(bu 2 +Don't put "js" or "node" in the name\. It's assumed that it's js, since you're +writing a package\.json file, and you can specify the engine using the "engines" +field\. (See below\.) +.IP \(bu 2 +The name will probably be passed as an argument to require(), so it should +be something short, but also reasonably descriptive\. +.IP \(bu 2 +You may want to check the npm registry to see if there's something by that name +already, before you get too attached to it\. https://www\.npmjs\.com/ + +.RE +.P +A name can be optionally prefixed by a scope, e\.g\. \fB@myorg/mypackage\fP\|\. See +npm help 7 \fBnpm\-scope\fP for more detail\. +.SH version +.P +The \fImost\fR important things in your package\.json are the name and version fields\. +Those are actually required, and your package won't install without +them\. The name and version together form an identifier that is assumed +to be completely unique\. Changes to the package should come along with +changes to the version\. +.P +Version must be parseable by +node\-semver \fIhttps://github\.com/isaacs/node\-semver\fR, which is bundled +with npm as a dependency\. (\fBnpm install semver\fP to use it yourself\.) +.P +More on version numbers and ranges at npm help 7 semver\. +.SH description +.P +Put a description in it\. It's a string\. This helps people discover your +package, as it's listed in \fBnpm search\fP\|\. +.SH keywords +.P +Put keywords in it\. It's an array of strings\. This helps people +discover your package as it's listed in \fBnpm search\fP\|\. +.SH homepage +.P +The url to the project homepage\. +.P +\fBNOTE\fR: This is \fInot\fR the same as "url"\. If you put a "url" field, +then the registry will think it's a redirection to your package that has +been published somewhere else, and spit at you\. +.P +Literally\. Spit\. I'm so not kidding\. +.SH bugs +.P +The url to your project's issue tracker and / or the email address to which +issues should be reported\. These are helpful for people who encounter issues +with your package\. +.P +It should look like this: +.P +.RS 2 +.nf +{ "url" : "https://github\.com/owner/project/issues" +, "email" : "project@hostname\.com" +} +.fi +.RE +.P +You can specify either one or both values\. If you want to provide only a url, +you can specify the value for "bugs" as a simple string instead of an object\. +.P +If a url is provided, it will be used by the \fBnpm bugs\fP command\. +.SH license +.P +You should specify a license for your package so that people know how they are +permitted to use it, and any restrictions you're placing on it\. +.P +If you're using a common license such as BSD\-2\-Clause or MIT, add a +current SPDX license identifier for the license you're using, like this: +.P +.RS 2 +.nf +{ "license" : "BSD\-3\-Clause" } +.fi +.RE +.P +You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\fR\|\. +Ideally you should pick one that is +OSI \fIhttps://opensource\.org/licenses/alphabetical\fR approved\. +.P +If your package is licensed under multiple common licenses, use an SPDX license +expression syntax version 2\.0 string \fIhttps://npmjs\.com/package/spdx\fR, like this: +.P +.RS 2 +.nf +{ "license" : "(ISC OR GPL\-3\.0)" } +.fi +.RE +.P +If you are using a license that hasn't been assigned an SPDX identifier, or if +you are using a custom license, use a string value like this one: +.P +.RS 2 +.nf +{ "license" : "SEE LICENSE IN " } +.fi +.RE +.P +Then include a file named \fB\fP at the top level of the package\. +.P +Some old packages used license objects or a "licenses" property containing an +array of license objects: +.P +.RS 2 +.nf +// Not valid metadata +{ "license" : + { "type" : "ISC" + , "url" : "http://opensource\.org/licenses/ISC" + } +} + +// Not valid metadata +{ "licenses" : + [ + { "type": "MIT" + , "url": "http://www\.opensource\.org/licenses/mit\-license\.php" + } + , { "type": "Apache\-2\.0" + , "url": "http://opensource\.org/licenses/apache2\.0\.php" + } + ] +} +.fi +.RE +.P +Those styles are now deprecated\. Instead, use SPDX expressions, like this: +.P +.RS 2 +.nf +{ "license": "ISC" } + +{ "license": "(MIT OR Apache\-2\.0)" } +.fi +.RE +.P +Finally, if you do not wish to grant others the right to use a private or +unpublished package under any terms: +.P +.RS 2 +.nf +{ "license": "UNLICENSED"} +.fi +.RE +.P +Consider also setting \fB"private": true\fP to prevent accidental publication\. +.SH people fields: author, contributors +.P +The "author" is one person\. "contributors" is an array of people\. A "person" +is an object with a "name" field and optionally "url" and "email", like this: +.P +.RS 2 +.nf +{ "name" : "Barney Rubble" +, "email" : "b@rubble\.com" +, "url" : "http://barnyrubble\.tumblr\.com/" +} +.fi +.RE +.P +Or you can shorten that all into a single string, and npm will parse it for you: +.P +.RS 2 +.nf +"Barney Rubble (http://barnyrubble\.tumblr\.com/)" +.fi +.RE +.P +Both email and url are optional either way\. +.P +npm also sets a top\-level "maintainers" field with your npm user info\. +.SH files +.P +The "files" field is an array of files to include in your project\. If +you name a folder in the array, then it will also include the files +inside that folder\. (Unless they would be ignored by another rule\.) +.P +You can also provide a "\.npmignore" file in the root of your package or +in subdirectories, which will keep files from being included, even +if they would be picked up by the files array\. The \fB\|\.npmignore\fP file +works just like a \fB\|\.gitignore\fP\|\. +.P +Certain files are always included, regardless of settings: +.RS 0 +.IP \(bu 2 +\fBpackage\.json\fP +.IP \(bu 2 +\fBREADME\fP +.IP \(bu 2 +\fBCHANGES\fP / \fBCHANGELOG\fP / \fBHISTORY\fP (any casing and file extension) +.IP \(bu 2 +\fBLICENSE\fP / \fBLICENCE\fP +.IP \(bu 2 +The file in the "main" field + +.RE +.P +Conversely, some files are always ignored: +.RS 0 +.IP \(bu 2 +\fB\|\.git\fP +.IP \(bu 2 +\fBCVS\fP +.IP \(bu 2 +\fB\|\.svn\fP +.IP \(bu 2 +\fB\|\.hg\fP +.IP \(bu 2 +\fB\|\.lock\-wscript\fP +.IP \(bu 2 +\fB\|\.wafpickle\-N\fP +.IP \(bu 2 +\fB\|\.*\.swp\fP +.IP \(bu 2 +\fB\|\.DS_Store\fP +.IP \(bu 2 +\fB\|\._*\fP +.IP \(bu 2 +\fBnpm\-debug\.log\fP +.IP \(bu 2 +\fB\|\.npmrc\fP + +.RE +.SH main +.P +The main field is a module ID that is the primary entry point to your program\. +That is, if your package is named \fBfoo\fP, and a user installs it, and then does +\fBrequire("foo")\fP, then your main module's exports object will be returned\. +.P +This should be a module ID relative to the root of your package folder\. +.P +For most modules, it makes the most sense to have a main script and often not +much else\. +.SH bin +.P +A lot of packages have one or more executable files that they'd like to +install into the PATH\. npm makes this pretty easy (in fact, it uses this +feature to install the "npm" executable\.) +.P +To use this, supply a \fBbin\fP field in your package\.json which is a map of +command name to local file name\. On install, npm will symlink that file into +\fBprefix/bin\fP for global installs, or \fB\|\./node_modules/\.bin/\fP for local +installs\. +.P +For example, myapp could have this: +.P +.RS 2 +.nf +{ "bin" : { "myapp" : "\./cli\.js" } } +.fi +.RE +.P +So, when you install myapp, it'll create a symlink from the \fBcli\.js\fP script to +\fB/usr/local/bin/myapp\fP\|\. +.P +If you have a single executable, and its name should be the name +of the package, then you can just supply it as a string\. For example: +.P +.RS 2 +.nf +{ "name": "my\-program" +, "version": "1\.2\.5" +, "bin": "\./path/to/program" } +.fi +.RE +.P +would be the same as this: +.P +.RS 2 +.nf +{ "name": "my\-program" +, "version": "1\.2\.5" +, "bin" : { "my\-program" : "\./path/to/program" } } +.fi +.RE +.SH man +.P +Specify either a single file or an array of filenames to put in place for the +\fBman\fP program to find\. +.P +If only a single file is provided, then it's installed such that it is the +result from \fBman \fP, regardless of its actual filename\. For example: +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : "\./man/doc\.1" +} +.fi +.RE +.P +would link the \fB\|\./man/doc\.1\fP file in such that it is the target for \fBman foo\fP +.P +If the filename doesn't start with the package name, then it's prefixed\. +So, this: +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : [ "\./man/foo\.1", "\./man/bar\.1" ] +} +.fi +.RE +.P +will create files to do \fBman foo\fP and \fBman foo\-bar\fP\|\. +.P +Man files must end with a number, and optionally a \fB\|\.gz\fP suffix if they are +compressed\. The number dictates which man section the file is installed into\. +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : [ "\./man/foo\.1", "\./man/foo\.2" ] +} +.fi +.RE +.P +will create entries for \fBman foo\fP and \fBman 2 foo\fP +.SH directories +.P +The CommonJS Packages \fIhttp://wiki\.commonjs\.org/wiki/Packages/1\.0\fR spec details a +few ways that you can indicate the structure of your package using a \fBdirectories\fP +object\. If you look at npm's package\.json \fIhttps://registry\.npmjs\.org/npm/latest\fR, +you'll see that it has directories for doc, lib, and man\. +.P +In the future, this information may be used in other creative ways\. +.SS directories\.lib +.P +Tell people where the bulk of your library is\. Nothing special is done +with the lib folder in any way, but it's useful meta info\. +.SS directories\.bin +.P +If you specify a \fBbin\fP directory in \fBdirectories\.bin\fP, all the files in +that folder will be added\. +.P +Because of the way the \fBbin\fP directive works, specifying both a +\fBbin\fP path and setting \fBdirectories\.bin\fP is an error\. If you want to +specify individual files, use \fBbin\fP, and for all the files in an +existing \fBbin\fP directory, use \fBdirectories\.bin\fP\|\. +.SS directories\.man +.P +A folder that is full of man pages\. Sugar to generate a "man" array by +walking the folder\. +.SS directories\.doc +.P +Put markdown files in here\. Eventually, these will be displayed nicely, +maybe, someday\. +.SS directories\.example +.P +Put example scripts in here\. Someday, it might be exposed in some clever way\. +.SS directories\.test +.P +Put your tests in here\. It is currently not exposed, but it might be in the +future\. +.SH repository +.P +Specify the place where your code lives\. This is helpful for people who +want to contribute\. If the git repo is on GitHub, then the \fBnpm docs\fP +command will be able to find you\. +.P +Do it like this: +.P +.RS 2 +.nf +"repository" : + { "type" : "git" + , "url" : "https://github\.com/npm/npm\.git" + } + +"repository" : + { "type" : "svn" + , "url" : "https://v8\.googlecode\.com/svn/trunk/" + } +.fi +.RE +.P +The URL should be a publicly available (perhaps read\-only) url that can be handed +directly to a VCS program without any modification\. It should not be a url to an +html project page that you put in your browser\. It's for computers\. +.P +For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same +shortcut syntax you use for \fBnpm install\fP: +.P +.RS 2 +.nf +"repository": "npm/npm" + +"repository": "gist:11081aaa281" + +"repository": "bitbucket:example/repo" + +"repository": "gitlab:another/repo" +.fi +.RE +.SH scripts +.P +The "scripts" property is a dictionary containing script commands that are run +at various times in the lifecycle of your package\. The key is the lifecycle +event, and the value is the command to run at that point\. +.P +See npm help 7 \fBnpm\-scripts\fP to find out more about writing package scripts\. +.SH config +.P +A "config" object can be used to set configuration parameters used in package +scripts that persist across upgrades\. For instance, if a package had the +following: +.P +.RS 2 +.nf +{ "name" : "foo" +, "config" : { "port" : "8080" } } +.fi +.RE +.P +and then had a "start" command that then referenced the +\fBnpm_package_config_port\fP environment variable, then the user could +override that by doing \fBnpm config set foo:port 8001\fP\|\. +.P +See npm help 7 \fBnpm\-config\fP and npm help 7 \fBnpm\-scripts\fP for more on package +configs\. +.SH dependencies +.P +Dependencies are specified in a simple object that maps a package name to a +version range\. The version range is a string which has one or more +space\-separated descriptors\. Dependencies can also be identified with a +tarball or git URL\. +.P +\fBPlease do not put test harnesses or transpilers in your +\fBdependencies\fP object\.\fR See \fBdevDependencies\fP, below\. +.P +See npm help 7 semver for more details about specifying version ranges\. +.RS 0 +.IP \(bu 2 +\fBversion\fP Must match \fBversion\fP exactly +.IP \(bu 2 +\fB>version\fP Must be greater than \fBversion\fP +.IP \(bu 2 +\fB>=version\fP etc +.IP \(bu 2 +\fB=version1 <=version2\fP\|\. +.IP \(bu 2 +\fBrange1 || range2\fP Passes if either range1 or range2 are satisfied\. +.IP \(bu 2 +\fBgit\.\.\.\fP See 'Git URLs as Dependencies' below +.IP \(bu 2 +\fBuser/repo\fP See 'GitHub URLs' below +.IP \(bu 2 +\fBtag\fP A specific version tagged and published as \fBtag\fP See npm help \fBnpm\-tag\fP +.IP \(bu 2 +\fBpath/path/path\fP See Local Paths \fI#local\-paths\fR below + +.RE +.P +For example, these are all valid: +.P +.RS 2 +.nf +{ "dependencies" : + { "foo" : "1\.0\.0 \- 2\.9999\.9999" + , "bar" : ">=1\.0\.2 <2\.1\.2" + , "baz" : ">1\.0\.2 <=2\.3\.4" + , "boo" : "2\.0\.1" + , "qux" : "<1\.0\.0 || >=2\.3\.1 <2\.4\.5 || >=2\.5\.2 <3\.0\.0" + , "asd" : "http://asdf\.com/asdf\.tar\.gz" + , "til" : "~1\.2" + , "elf" : "~1\.2\.3" + , "two" : "2\.x" + , "thr" : "3\.3\.x" + , "lat" : "latest" + , "dyl" : "file:\.\./dyl" + } +} +.fi +.RE +.SS URLs as Dependencies +.P +You may specify a tarball URL in place of a version range\. +.P +This tarball will be downloaded and installed locally to your package at +install time\. +.SS Git URLs as Dependencies +.P +Git urls can be of the form: +.P +.RS 2 +.nf +git://github\.com/user/project\.git#commit\-ish +git+ssh://user@hostname:project\.git#commit\-ish +git+ssh://user@hostname/project\.git#commit\-ish +git+http://user@hostname/project/blah\.git#commit\-ish +git+https://user@hostname/project/blah\.git#commit\-ish +.fi +.RE +.P +The \fBcommit\-ish\fP can be any tag, sha, or branch which can be supplied as +an argument to \fBgit checkout\fP\|\. The default is \fBmaster\fP\|\. +.SH GitHub URLs +.P +As of version 1\.1\.65, you can refer to GitHub urls as just "foo": +"user/foo\-project"\. Just as with git URLs, a \fBcommit\-ish\fP suffix can be +included\. For example: +.P +.RS 2 +.nf +{ + "name": "foo", + "version": "0\.0\.0", + "dependencies": { + "express": "visionmedia/express", + "mocha": "visionmedia/mocha#4727d357ea" + } +} +.fi +.RE +.SH Local Paths +.P +As of version 2\.0\.0 you can provide a path to a local directory that contains a +package\. Local paths can be saved using \fBnpm install \-\-save\fP, using any of +these forms: +.P +.RS 2 +.nf +\|\.\./foo/bar +~/foo/bar +\|\./foo/bar +/foo/bar +.fi +.RE +.P +in which case they will be normalized to a relative path and added to your +\fBpackage\.json\fP\|\. For example: +.P +.RS 2 +.nf +{ + "name": "baz", + "dependencies": { + "bar": "file:\.\./foo/bar" + } +} +.fi +.RE +.P +This feature is helpful for local offline development and creating +tests that require npm installing where you don't want to hit an +external server, but should not be used when publishing packages +to the public registry\. +.SH devDependencies +.P +If someone is planning on downloading and using your module in their +program, then they probably don't want or need to download and build +the external test or documentation framework that you use\. +.P +In this case, it's best to map these additional items in a \fBdevDependencies\fP +object\. +.P +These things will be installed when doing \fBnpm link\fP or \fBnpm install\fP +from the root of a package, and can be managed like any other npm +configuration param\. See npm help 7 \fBnpm\-config\fP for more on the topic\. +.P +For build steps that are not platform\-specific, such as compiling +CoffeeScript or other languages to JavaScript, use the \fBprepublish\fP +script to do this, and make the required package a devDependency\. +.P +For example: +.P +.RS 2 +.nf +{ "name": "ethopia\-waza", + "description": "a delightfully fruity coffee varietal", + "version": "1\.2\.3", + "devDependencies": { + "coffee\-script": "~1\.6\.3" + }, + "scripts": { + "prepublish": "coffee \-o lib/ \-c src/waza\.coffee" + }, + "main": "lib/waza\.js" +} +.fi +.RE +.P +The \fBprepublish\fP script will be run before publishing, so that users +can consume the functionality without requiring them to compile it +themselves\. In dev mode (ie, locally running \fBnpm install\fP), it'll +run this script as well, so that you can test it easily\. +.SH peerDependencies +.P +In some cases, you want to express the compatibility of your package with a +host tool or library, while not necessarily doing a \fBrequire\fP of this host\. +This is usually referred to as a \fIplugin\fR\|\. Notably, your module may be exposing +a specific interface, expected and specified by the host documentation\. +.P +For example: +.P +.RS 2 +.nf +{ + "name": "tea\-latte", + "version": "1\.3\.5", + "peerDependencies": { + "tea": "2\.x" + } +} +.fi +.RE +.P +This ensures your package \fBtea\-latte\fP can be installed \fIalong\fR with the second +major version of the host package \fBtea\fP only\. \fBnpm install tea\-latte\fP could +possibly yield the following dependency graph: +.P +.RS 2 +.nf +├── tea\-latte@1\.3\.5 +└── tea@2\.2\.0 +.fi +.RE +.P +\fBNOTE: npm versions 1 and 2 will automatically install \fBpeerDependencies\fP if +they are not explicitly depended upon higher in the dependency tree\. In the +next major version of npm (npm@3), this will no longer be the case\. You will +receive a warning that the peerDependency is not installed instead\.\fR The +behavior in npms 1 & 2 was frequently confusing and could easily put you into +dependency hell, a situation that npm is designed to avoid as much as possible\. +.P +Trying to install another plugin with a conflicting requirement will cause an +error\. For this reason, make sure your plugin requirement is as broad as +possible, and not to lock it down to specific patch versions\. +.P +Assuming the host complies with semver \fIhttp://semver\.org/\fR, only changes in +the host package's major version will break your plugin\. Thus, if you've worked +with every 1\.x version of the host package, use \fB"^1\.0"\fP or \fB"1\.x"\fP to express +this\. If you depend on features introduced in 1\.5\.2, use \fB">= 1\.5\.2 < 2"\fP\|\. +.SH bundledDependencies +.P +This defines an array of package names that will be bundled when publishing the package\. +.P +In cases where you need to preserve npm packages locally or have them available through a single file download, you can bundle the packages in a tarball file by specifying the package names in the \fBbundledDependencies\fP array and executing \fBnpm pack\fP\|\. +.P +For example: +If we define a package\.json like this: +.P +.RS 2 +.nf +{ + "name": "awesome\-web\-framework", + "version": "1\.0\.0", + "bundledDependencies": [ + 'renderized', 'super\-streams' + ] +} +.fi +.RE +.P +we can obtain \fBawesome\-web\-framework\-1\.0\.0\.tgz\fP file by running \fBnpm pack\fP\|\. This file contains the dependencies \fBrenderized\fP and \fBsuper\-streams\fP which can be installed in a new project by executing \fBnpm install awesome\-web\-framework\-1\.0\.0\.tgz\fP\|\. +.P +If this is spelled \fB"bundleDependencies"\fP, then that is also honored\. +.SH optionalDependencies +.P +If a dependency can be used, but you would like npm to proceed if it cannot be +found or fails to install, then you may put it in the \fBoptionalDependencies\fP +object\. This is a map of package name to version or url, just like the +\fBdependencies\fP object\. The difference is that build failures do not cause +installation to fail\. +.P +It is still your program's responsibility to handle the lack of the +dependency\. For example, something like this: +.P +.RS 2 +.nf +try { + var foo = require('foo') + var fooVersion = require('foo/package\.json')\.version +} catch (er) { + foo = null +} +if ( notGoodFooVersion(fooVersion) ) { + foo = null +} + +// \.\. then later in your program \.\. + +if (foo) { + foo\.doFooThings() +} +.fi +.RE +.P +Entries in \fBoptionalDependencies\fP will override entries of the same name in +\fBdependencies\fP, so it's usually best to only put in one place\. +.SH engines +.P +You can specify the version of node that your stuff works on: +.P +.RS 2 +.nf +{ "engines" : { "node" : ">=0\.10\.3 <0\.12" } } +.fi +.RE +.P +And, like with dependencies, if you don't specify the version (or if you +specify "*" as the version), then any version of node will do\. +.P +If you specify an "engines" field, then npm will require that "node" be +somewhere on that list\. If "engines" is omitted, then npm will just assume +that it works on node\. +.P +You can also use the "engines" field to specify which versions of npm +are capable of properly installing your program\. For example: +.P +.RS 2 +.nf +{ "engines" : { "npm" : "~1\.0\.20" } } +.fi +.RE +.P +Note that, unless the user has set the \fBengine\-strict\fP config flag, this +field is advisory only\. +.SH engineStrict +.P +\fBNOTE: This feature is deprecated and will be removed in npm 3\.0\.0\.\fR +.P +If you are sure that your module will \fIdefinitely not\fR run properly on +versions of Node/npm other than those specified in the \fBengines\fP object, +then you can set \fB"engineStrict": true\fP in your package\.json file\. +This will override the user's \fBengine\-strict\fP config setting\. +.P +Please do not do this unless you are really very very sure\. If your +engines object is something overly restrictive, you can quite easily and +inadvertently lock yourself into obscurity and prevent your users from +updating to new versions of Node\. Consider this choice carefully\. +.SH os +.P +You can specify which operating systems your +module will run on: +.P +.RS 2 +.nf +"os" : [ "darwin", "linux" ] +.fi +.RE +.P +You can also blacklist instead of whitelist operating systems, +just prepend the blacklisted os with a '!': +.P +.RS 2 +.nf +"os" : [ "!win32" ] +.fi +.RE +.P +The host operating system is determined by \fBprocess\.platform\fP +.P +It is allowed to both blacklist, and whitelist, although there isn't any +good reason to do this\. +.SH cpu +.P +If your code only runs on certain cpu architectures, +you can specify which ones\. +.P +.RS 2 +.nf +"cpu" : [ "x64", "ia32" ] +.fi +.RE +.P +Like the \fBos\fP option, you can also blacklist architectures: +.P +.RS 2 +.nf +"cpu" : [ "!arm", "!mips" ] +.fi +.RE +.P +The host architecture is determined by \fBprocess\.arch\fP +.SH preferGlobal +.P +If your package is primarily a command\-line application that should be +installed globally, then set this value to \fBtrue\fP to provide a warning +if it is installed locally\. +.P +It doesn't actually prevent users from installing it locally, but it +does help prevent some confusion if it doesn't work as expected\. +.SH private +.P +If you set \fB"private": true\fP in your package\.json, then npm will refuse +to publish it\. +.P +This is a way to prevent accidental publication of private repositories\. If +you would like to ensure that a given package is only ever published to a +specific registry (for example, an internal registry), then use the +\fBpublishConfig\fP dictionary described below to override the \fBregistry\fP config +param at publish\-time\. +.SH publishConfig +.P +This is a set of config values that will be used at publish\-time\. It's +especially handy if you want to set the tag, registry or access, so that +you can ensure that a given package is not tagged with "latest", published +to the global public registry or that a scoped module is private by default\. +.P +Any config values can be overridden, but of course only "tag", "registry" and +"access" probably matter for the purposes of publishing\. +.P +See npm help 7 \fBnpm\-config\fP to see the list of config options that can be +overridden\. +.SH DEFAULT VALUES +.P +npm will default some values based on package contents\. +.RS 0 +.IP \(bu 2 +\fB"scripts": {"start": "node server\.js"}\fP +If there is a \fBserver\.js\fP file in the root of your package, then npm +will default the \fBstart\fP command to \fBnode server\.js\fP\|\. +.IP \(bu 2 +\fB"scripts":{"preinstall": "node\-gyp rebuild"}\fP +If there is a \fBbinding\.gyp\fP file in the root of your package, npm will +default the \fBpreinstall\fP command to compile using node\-gyp\. +.IP \(bu 2 +\fB"contributors": [\.\.\.]\fP +If there is an \fBAUTHORS\fP file in the root of your package, npm will +treat each line as a \fBName (url)\fP format, where email and url +are optional\. Lines which start with a \fB#\fP or are blank, will be +ignored\. + +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 semver +.IP \(bu 2 +npm help init +.IP \(bu 2 +npm help version +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help help +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help uninstall + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-coding-style.7 b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-coding-style.7 new file mode 100644 index 00000000..0380eced --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-coding-style.7 @@ -0,0 +1,204 @@ +.TH "NPM\-CODING\-STYLE" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-coding-style\fR \- npm's "funny" coding style +.SH DESCRIPTION +.P +npm's coding style is a bit unconventional\. It is not different for +difference's sake, but rather a carefully crafted style that is +designed to reduce visual clutter and make bugs more apparent\. +.P +If you want to contribute to npm (which is very encouraged), you should +make your code conform to npm's style\. +.P +Note: this concerns npm's code not the specific packages that you can download from the npm registry\. +.SH Line Length +.P +Keep lines shorter than 80 characters\. It's better for lines to be +too short than to be too long\. Break up long lists, objects, and other +statements onto multiple lines\. +.SH Indentation +.P +Two\-spaces\. Tabs are better, but they look like hell in web browsers +(and on GitHub), and node uses 2 spaces, so that's that\. +.P +Configure your editor appropriately\. +.SH Curly braces +.P +Curly braces belong on the same line as the thing that necessitates them\. +.P +Bad: +.P +.RS 2 +.nf +function () +{ +.fi +.RE +.P +Good: +.P +.RS 2 +.nf +function () { +.fi +.RE +.P +If a block needs to wrap to the next line, use a curly brace\. Don't +use it if it doesn't\. +.P +Bad: +.P +.RS 2 +.nf +if (foo) { bar() } +while (foo) + bar() +.fi +.RE +.P +Good: +.P +.RS 2 +.nf +if (foo) bar() +while (foo) { + bar() +} +.fi +.RE +.SH Semicolons +.P +Don't use them except in four situations: +.RS 0 +.IP \(bu 2 +\fBfor (;;)\fP loops\. They're actually required\. +.IP \(bu 2 +null loops like: \fBwhile (something) ;\fP (But you'd better have a good +reason for doing that\.) +.IP \(bu 2 +\fBcase "foo": doSomething(); break\fP +.IP \(bu 2 +In front of a leading \fB(\fP or \fB[\fP at the start of the line\. +This prevents the expression from being interpreted +as a function call or property access, respectively\. + +.RE +.P +Some examples of good semicolon usage: +.P +.RS 2 +.nf +;(x || y)\.doSomething() +;[a, b, c]\.forEach(doSomething) +for (var i = 0; i < 10; i ++) { + switch (state) { + case "begin": start(); continue + case "end": finish(); break + default: throw new Error("unknown state") + } + end() +} +.fi +.RE +.P +Note that starting lines with \fB\-\fP and \fB+\fP also should be prefixed +with a semicolon, but this is much less common\. +.SH Comma First +.P +If there is a list of things separated by commas, and it wraps +across multiple lines, put the comma at the start of the next +line, directly below the token that starts the list\. Put the +final token in the list on a line by itself\. For example: +.P +.RS 2 +.nf +var magicWords = [ "abracadabra" + , "gesundheit" + , "ventrilo" + ] + , spells = { "fireball" : function () { setOnFire() } + , "water" : function () { putOut() } + } + , a = 1 + , b = "abc" + , etc + , somethingElse +.fi +.RE +.SH Whitespace +.P +Put a single space in front of ( for anything other than a function call\. +Also use a single space wherever it makes things more readable\. +.P +Don't leave trailing whitespace at the end of lines\. Don't indent empty +lines\. Don't use more spaces than are helpful\. +.SH Functions +.P +Use named functions\. They make stack traces a lot easier to read\. +.SH Callbacks, Sync/async Style +.P +Use the asynchronous/non\-blocking versions of things as much as possible\. +It might make more sense for npm to use the synchronous fs APIs, but this +way, the fs and http and child process stuff all uses the same callback\-passing +methodology\. +.P +The callback should always be the last argument in the list\. Its first +argument is the Error or null\. +.P +Be very careful never to ever ever throw anything\. It's worse than useless\. +Just send the error message back as the first argument to the callback\. +.SH Errors +.P +Always create a new Error object with your message\. Don't just return a +string message to the callback\. Stack traces are handy\. +.SH Logging +.P +Logging is done using the npmlog \fIhttps://github\.com/npm/npmlog\fR +utility\. +.P +Please clean up logs when they are no longer helpful\. In particular, +logging the same object over and over again is not helpful\. Logs should +report what's happening so that it's easier to track down where a fault +occurs\. +.P +Use appropriate log levels\. See npm help 7 \fBnpm\-config\fP and search for +"loglevel"\. +.SH Case, naming, etc\. +.P +Use \fBlowerCamelCase\fP for multiword identifiers when they refer to objects, +functions, methods, properties, or anything not specified in this section\. +.P +Use \fBUpperCamelCase\fP for class names (things that you'd pass to "new")\. +.P +Use \fBall\-lower\-hyphen\-css\-case\fP for multiword filenames and config keys\. +.P +Use named functions\. They make stack traces easier to follow\. +.P +Use \fBCAPS_SNAKE_CASE\fP for constants, things that should never change +and are rarely used\. +.P +Use a single uppercase letter for function names where the function +would normally be anonymous, but needs to call itself recursively\. It +makes it clear that it's a "throwaway" function\. +.SH null, undefined, false, 0 +.P +Boolean variables and functions should always be either \fBtrue\fP or +\fBfalse\fP\|\. Don't set it to 0 unless it's supposed to be a number\. +.P +When something is intentionally missing or removed, set it to \fBnull\fP\|\. +.P +Don't set things to \fBundefined\fP\|\. Reserve that value to mean "not yet +set to anything\." +.P +Boolean objects are verboten\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 developers +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help npm + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-config.7 b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-config.7 new file mode 100644 index 00000000..2c5ea3be --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-config.7 @@ -0,0 +1,1272 @@ +.TH "NPM\-CONFIG" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-config\fR \- More than you probably want to know about npm configuration +.SH DESCRIPTION +.P +npm gets its configuration values from the following sources, sorted by priority: +.SS Command Line Flags +.P +Putting \fB\-\-foo bar\fP on the command line sets the \fBfoo\fP configuration +parameter to \fB"bar"\fP\|\. A \fB\-\-\fP argument tells the cli parser to stop +reading flags\. A \fB\-\-flag\fP parameter that is at the \fIend\fR of the +command will be given the value of \fBtrue\fP\|\. +.SS Environment Variables +.P +Any environment variables that start with \fBnpm_config_\fP will be +interpreted as a configuration parameter\. For example, putting +\fBnpm_config_foo=bar\fP in your environment will set the \fBfoo\fP +configuration parameter to \fBbar\fP\|\. Any environment configurations that +are not given a value will be given the value of \fBtrue\fP\|\. Config +values are case\-insensitive, so \fBNPM_CONFIG_FOO=bar\fP will work the +same\. +.SS npmrc Files +.P +The four relevant files are: +.RS 0 +.IP \(bu 2 +per\-project config file (/path/to/my/project/\.npmrc) +.IP \(bu 2 +per\-user config file (~/\.npmrc) +.IP \(bu 2 +global config file ($PREFIX/npmrc) +.IP \(bu 2 +npm builtin config file (/path/to/npm/npmrc) + +.RE +.P +See npm help 5 npmrc for more details\. +.SS Default Configs +.P +A set of configuration parameters that are internal to npm, and are +defaults if nothing else is specified\. +.SH Shorthands and Other CLI Niceties +.P +The following shorthands are parsed on the command\-line: +.RS 0 +.IP \(bu 2 +\fB\-v\fP: \fB\-\-version\fP +.IP \(bu 2 +\fB\-h\fP, \fB\-?\fP, \fB\-\-help\fP, \fB\-H\fP: \fB\-\-usage\fP +.IP \(bu 2 +\fB\-s\fP, \fB\-\-silent\fP: \fB\-\-loglevel silent\fP +.IP \(bu 2 +\fB\-q\fP, \fB\-\-quiet\fP: \fB\-\-loglevel warn\fP +.IP \(bu 2 +\fB\-d\fP: \fB\-\-loglevel info\fP +.IP \(bu 2 +\fB\-dd\fP, \fB\-\-verbose\fP: \fB\-\-loglevel verbose\fP +.IP \(bu 2 +\fB\-ddd\fP: \fB\-\-loglevel silly\fP +.IP \(bu 2 +\fB\-g\fP: \fB\-\-global\fP +.IP \(bu 2 +\fB\-C\fP: \fB\-\-prefix\fP +.IP \(bu 2 +\fB\-l\fP: \fB\-\-long\fP +.IP \(bu 2 +\fB\-m\fP: \fB\-\-message\fP +.IP \(bu 2 +\fB\-p\fP, \fB\-\-porcelain\fP: \fB\-\-parseable\fP +.IP \(bu 2 +\fB\-reg\fP: \fB\-\-registry\fP +.IP \(bu 2 +\fB\-f\fP: \fB\-\-force\fP +.IP \(bu 2 +\fB\-desc\fP: \fB\-\-description\fP +.IP \(bu 2 +\fB\-S\fP: \fB\-\-save\fP +.IP \(bu 2 +\fB\-D\fP: \fB\-\-save\-dev\fP +.IP \(bu 2 +\fB\-O\fP: \fB\-\-save\-optional\fP +.IP \(bu 2 +\fB\-B\fP: \fB\-\-save\-bundle\fP +.IP \(bu 2 +\fB\-E\fP: \fB\-\-save\-exact\fP +.IP \(bu 2 +\fB\-y\fP: \fB\-\-yes\fP +.IP \(bu 2 +\fB\-n\fP: \fB\-\-yes false\fP +.IP \(bu 2 +\fBll\fP and \fBla\fP commands: \fBls \-\-long\fP + +.RE +.P +If the specified configuration param resolves unambiguously to a known +configuration parameter, then it is expanded to that configuration +parameter\. For example: +.P +.RS 2 +.nf +npm ls \-\-par +# same as: +npm ls \-\-parseable +.fi +.RE +.P +If multiple single\-character shorthands are strung together, and the +resulting combination is unambiguously not some other configuration +param, then it is expanded to its various component pieces\. For +example: +.P +.RS 2 +.nf +npm ls \-gpld +# same as: +npm ls \-\-global \-\-parseable \-\-long \-\-loglevel info +.fi +.RE +.SH Per\-Package Config Settings +.P +When running scripts (see npm help 7 \fBnpm\-scripts\fP) the package\.json "config" +keys are overwritten in the environment if there is a config param of +\fB[@]:\fP\|\. For example, if the package\.json has +this: +.P +.RS 2 +.nf +{ "name" : "foo" +, "config" : { "port" : "8080" } +, "scripts" : { "start" : "node server\.js" } } +.fi +.RE +.P +and the server\.js is this: +.P +.RS 2 +.nf +http\.createServer(\.\.\.)\.listen(process\.env\.npm_package_config_port) +.fi +.RE +.P +then the user could change the behavior by doing: +.P +.RS 2 +.nf +npm config set foo:port 80 +.fi +.RE +.P +See npm help 5 package\.json for more information\. +.SH Config Settings +.SS access +.RS 0 +.IP \(bu 2 +Default: \fBrestricted\fP +.IP \(bu 2 +Type: Access + +.RE +.P +When publishing scoped packages, the access level defaults to \fBrestricted\fP\|\. If +you want your scoped package to be publicly viewable (and installable) set +\fB\-\-access=public\fP\|\. The only valid values for \fBaccess\fP are \fBpublic\fP and +\fBrestricted\fP\|\. Unscoped packages \fIalways\fR have an access level of \fBpublic\fP\|\. +.SS always\-auth +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Force npm to always require authentication when accessing the registry, +even for \fBGET\fP requests\. +.SS bin\-links +.RS 0 +.IP \(bu 2 +Default: \fBtrue\fP +.IP \(bu 2 +Type: Boolean + +.RE +.P +Tells npm to create symlinks (or \fB\|\.cmd\fP shims on Windows) for package +executables\. +.P +Set to false to have it not do this\. This can be used to work around +the fact that some file systems don't support symlinks, even on +ostensibly Unix systems\. +.SS browser +.RS 0 +.IP \(bu 2 +Default: OS X: \fB"open"\fP, Windows: \fB"start"\fP, Others: \fB"xdg\-open"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The browser that is called by the \fBnpm docs\fP command to open websites\. +.SS ca +.RS 0 +.IP \(bu 2 +Default: The npm CA certificate +.IP \(bu 2 +Type: String, Array or null + +.RE +.P +The Certificate Authority signing certificate that is trusted for SSL +connections to the registry\. Values should be in PEM format with newlines +replaced by the string "\\n"\. For example: +.P +.RS 2 +.nf +ca="\-\-\-\-\-BEGIN CERTIFICATE\-\-\-\-\-\\nXXXX\\nXXXX\\n\-\-\-\-\-END CERTIFICATE\-\-\-\-\-" +.fi +.RE +.P +Set to \fBnull\fP to only allow "known" registrars, or to a specific CA cert +to trust only that specific signing authority\. +.P +Multiple CAs can be trusted by specifying an array of certificates: +.P +.RS 2 +.nf +ca[]="\.\.\." +ca[]="\.\.\." +.fi +.RE +.P +See also the \fBstrict\-ssl\fP config\. +.SS cafile +.RS 0 +.IP \(bu 2 +Default: \fBnull\fP +.IP \(bu 2 +Type: path + +.RE +.P +A path to a file containing one or multiple Certificate Authority signing +certificates\. Similar to the \fBca\fP setting, but allows for multiple CA's, as +well as for the CA information to be stored in a file on disk\. +.SS cache +.RS 0 +.IP \(bu 2 +Default: Windows: \fB%AppData%\\npm\-cache\fP, Posix: \fB~/\.npm\fP +.IP \(bu 2 +Type: path + +.RE +.P +The location of npm's cache directory\. See npm help \fBnpm\-cache\fP +.SS cache\-lock\-stale +.RS 0 +.IP \(bu 2 +Default: 60000 (1 minute) +.IP \(bu 2 +Type: Number + +.RE +.P +The number of ms before cache folder lockfiles are considered stale\. +.SS cache\-lock\-retries +.RS 0 +.IP \(bu 2 +Default: 10 +.IP \(bu 2 +Type: Number + +.RE +.P +Number of times to retry to acquire a lock on cache folder lockfiles\. +.SS cache\-lock\-wait +.RS 0 +.IP \(bu 2 +Default: 10000 (10 seconds) +.IP \(bu 2 +Type: Number + +.RE +.P +Number of ms to wait for cache lock files to expire\. +.SS cache\-max +.RS 0 +.IP \(bu 2 +Default: Infinity +.IP \(bu 2 +Type: Number + +.RE +.P +The maximum time (in seconds) to keep items in the registry cache before +re\-checking against the registry\. +.P +Note that no purging is done unless the \fBnpm cache clean\fP command is +explicitly used, and that only GET requests use the cache\. +.SS cache\-min +.RS 0 +.IP \(bu 2 +Default: 10 +.IP \(bu 2 +Type: Number + +.RE +.P +The minimum time (in seconds) to keep items in the registry cache before +re\-checking against the registry\. +.P +Note that no purging is done unless the \fBnpm cache clean\fP command is +explicitly used, and that only GET requests use the cache\. +.SS cert +.RS 0 +.IP \(bu 2 +Default: \fBnull\fP +.IP \(bu 2 +Type: String + +.RE +.P +A client certificate to pass when accessing the registry\. +.SS color +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean or \fB"always"\fP + +.RE +.P +If false, never shows colors\. If \fB"always"\fP then always shows colors\. +If true, then only prints color codes for tty file descriptors\. +.SS depth +.RS 0 +.IP \(bu 2 +Default: Infinity +.IP \(bu 2 +Type: Number + +.RE +.P +The depth to go when recursing directories for \fBnpm ls\fP, +\fBnpm cache ls\fP, and \fBnpm outdated\fP\|\. +.P +For \fBnpm outdated\fP, a setting of \fBInfinity\fP will be treated as \fB0\fP +since that gives more useful information\. To show the outdated status +of all packages and dependents, use a large integer value, +e\.g\., \fBnpm outdated \-\-depth 9999\fP +.SS description +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show the description in \fBnpm search\fP +.SS dev +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Install \fBdev\-dependencies\fP along with packages\. +.P +Note that \fBdev\-dependencies\fP are also installed if the \fBnpat\fP flag is +set\. +.SS editor +.RS 0 +.IP \(bu 2 +Default: \fBEDITOR\fP environment variable if set, or \fB"vi"\fP on Posix, +or \fB"notepad"\fP on Windows\. +.IP \(bu 2 +Type: path + +.RE +.P +The command to run for \fBnpm edit\fP or \fBnpm config edit\fP\|\. +.SS engine\-strict +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If set to true, then npm will stubbornly refuse to install (or even +consider installing) any package that claims to not be compatible with +the current Node\.js version\. +.SS force +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Makes various commands more forceful\. +.RS 0 +.IP \(bu 2 +lifecycle script failure does not block progress\. +.IP \(bu 2 +publishing clobbers previously published versions\. +.IP \(bu 2 +skips cache when requesting from the registry\. +.IP \(bu 2 +prevents checks against clobbering non\-npm files\. + +.RE +.SS fetch\-retries +.RS 0 +.IP \(bu 2 +Default: 2 +.IP \(bu 2 +Type: Number + +.RE +.P +The "retries" config for the \fBretry\fP module to use when fetching +packages from the registry\. +.SS fetch\-retry\-factor +.RS 0 +.IP \(bu 2 +Default: 10 +.IP \(bu 2 +Type: Number + +.RE +.P +The "factor" config for the \fBretry\fP module to use when fetching +packages\. +.SS fetch\-retry\-mintimeout +.RS 0 +.IP \(bu 2 +Default: 10000 (10 seconds) +.IP \(bu 2 +Type: Number + +.RE +.P +The "minTimeout" config for the \fBretry\fP module to use when fetching +packages\. +.SS fetch\-retry\-maxtimeout +.RS 0 +.IP \(bu 2 +Default: 60000 (1 minute) +.IP \(bu 2 +Type: Number + +.RE +.P +The "maxTimeout" config for the \fBretry\fP module to use when fetching +packages\. +.SS git +.RS 0 +.IP \(bu 2 +Default: \fB"git"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The command to use for git commands\. If git is installed on the +computer, but is not in the \fBPATH\fP, then set this to the full path to +the git binary\. +.SS git\-tag\-version +.RS 0 +.IP \(bu 2 +Default: \fBtrue\fP +.IP \(bu 2 +Type: Boolean + +.RE +.P +Tag the commit when using the \fBnpm version\fP command\. +.SS global +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Operates in "global" mode, so that packages are installed into the +\fBprefix\fP folder instead of the current working directory\. See +npm help 5 \fBnpm\-folders\fP for more on the differences in behavior\. +.RS 0 +.IP \(bu 2 +packages are installed into the \fB{prefix}/lib/node_modules\fP folder, instead of the +current working directory\. +.IP \(bu 2 +bin files are linked to \fB{prefix}/bin\fP +.IP \(bu 2 +man pages are linked to \fB{prefix}/share/man\fP + +.RE +.SS globalconfig +.RS 0 +.IP \(bu 2 +Default: {prefix}/etc/npmrc +.IP \(bu 2 +Type: path + +.RE +.P +The config file to read for global config options\. +.SS group +.RS 0 +.IP \(bu 2 +Default: GID of the current process +.IP \(bu 2 +Type: String or Number + +.RE +.P +The group to use when running package scripts in global mode as the root +user\. +.SS heading +.RS 0 +.IP \(bu 2 +Default: \fB"npm"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The string that starts all the debugging log output\. +.SS https\-proxy +.RS 0 +.IP \(bu 2 +Default: null +.IP \(bu 2 +Type: url + +.RE +.P +A proxy to use for outgoing https requests\. If the \fBHTTPS_PROXY\fP or +\fBhttps_proxy\fP or \fBHTTP_PROXY\fP or \fBhttp_proxy\fP environment variables are set, +proxy settings will be honored by the underlying \fBrequest\fP library\. +.SS if\-present +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If true, npm will not exit with an error code when \fBrun\-script\fP is invoked for +a script that isn't defined in the \fBscripts\fP section of \fBpackage\.json\fP\|\. This +option can be used when it's desirable to optionally run a script when it's +present and fail if the script fails\. This is useful, for example, when running +scripts that may only apply for some builds in an otherwise generic CI setup\. +.SS ignore\-scripts +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If true, npm does not run scripts specified in package\.json files\. +.SS init\-module +.RS 0 +.IP \(bu 2 +Default: ~/\.npm\-init\.js +.IP \(bu 2 +Type: path + +.RE +.P +A module that will be loaded by the \fBnpm init\fP command\. See the +documentation for the +init\-package\-json \fIhttps://github\.com/isaacs/init\-package\-json\fR module +for more information, or npm help init\. +.SS init\-author\-name +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +The value \fBnpm init\fP should use by default for the package author's name\. +.SS init\-author\-email +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +The value \fBnpm init\fP should use by default for the package author's email\. +.SS init\-author\-url +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +The value \fBnpm init\fP should use by default for the package author's homepage\. +.SS init\-license +.RS 0 +.IP \(bu 2 +Default: "ISC" +.IP \(bu 2 +Type: String + +.RE +.P +The value \fBnpm init\fP should use by default for the package license\. +.SS init\-version +.RS 0 +.IP \(bu 2 +Default: "1\.0\.0" +.IP \(bu 2 +Type: semver + +.RE +.P +The value that \fBnpm init\fP should use by default for the package +version number, if not already set in package\.json\. +.SS json +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Whether or not to output JSON data, rather than the normal output\. +.P +This feature is currently experimental, and the output data structures +for many commands is either not implemented in JSON yet, or subject to +change\. Only the output from \fBnpm ls \-\-json\fP is currently valid\. +.SS key +.RS 0 +.IP \(bu 2 +Default: \fBnull\fP +.IP \(bu 2 +Type: String + +.RE +.P +A client key to pass when accessing the registry\. +.SS link +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If true, then local installs will link if there is a suitable globally +installed package\. +.P +Note that this means that local installs can cause things to be +installed into the global space at the same time\. The link is only done +if one of the two conditions are met: +.RS 0 +.IP \(bu 2 +The package is not already installed globally, or +.IP \(bu 2 +the globally installed version is identical to the version that is +being installed locally\. + +.RE +.SS local\-address +.RS 0 +.IP \(bu 2 +Default: undefined +.IP \(bu 2 +Type: IP Address + +.RE +.P +The IP address of the local interface to use when making connections +to the npm registry\. Must be IPv4 in versions of Node prior to 0\.12\. +.SS loglevel +.RS 0 +.IP \(bu 2 +Default: "warn" +.IP \(bu 2 +Type: String +.IP \(bu 2 +Values: "silent", "error", "warn", "http", "info", "verbose", "silly" + +.RE +.P +What level of logs to report\. On failure, \fIall\fR logs are written to +\fBnpm\-debug\.log\fP in the current working directory\. +.P +Any logs of a higher level than the setting are shown\. +The default is "warn", which shows warn and error output\. +.SS logstream +.RS 0 +.IP \(bu 2 +Default: process\.stderr +.IP \(bu 2 +Type: Stream + +.RE +.P +This is the stream that is passed to the +npmlog \fIhttps://github\.com/npm/npmlog\fR module at run time\. +.P +It cannot be set from the command line, but if you are using npm +programmatically, you may wish to send logs to somewhere other than +stderr\. +.P +If the \fBcolor\fP config is set to true, then this stream will receive +colored output if it is a TTY\. +.SS long +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show extended information in \fBnpm ls\fP and \fBnpm search\fP\|\. +.SS maxsockets +.RS 0 +.IP \(bu 2 +Default: 50 +.IP \(bu 2 +Type: Number + +.RE +.P +The maximum number of connections to use per origin (protocol/host/port +combination)\. Passed to the \fBhttp\fP \fBAgent\fP used to make the request\. +.SS message +.RS 0 +.IP \(bu 2 +Default: "%s" +.IP \(bu 2 +Type: String + +.RE +.P +Commit message which is used by \fBnpm version\fP when creating version commit\. +.P +Any "%s" in the message will be replaced with the version number\. +.SS node\-version +.RS 0 +.IP \(bu 2 +Default: process\.version +.IP \(bu 2 +Type: semver or false + +.RE +.P +The node version to use when checking a package's \fBengines\fP map\. +.SS npat +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Run tests on installation\. +.SS onload\-script +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: path + +.RE +.P +A node module to \fBrequire()\fP when npm loads\. Useful for programmatic +usage\. +.SS optional +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Attempt to install packages in the \fBoptionalDependencies\fP object\. Note +that if these packages fail to install, the overall installation +process is not aborted\. +.SS parseable +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Output parseable results from commands that write to +standard output\. +.SS prefix +.RS 0 +.IP \(bu 2 +Default: see npm help 5 folders +.IP \(bu 2 +Type: path + +.RE +.P +The location to install global items\. If set on the command line, then +it forces non\-global commands to run in the specified folder\. +.SS production +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Set to true to run in "production" mode\. +.RS 0 +.IP 1. 3 +devDependencies are not installed at the topmost level when running +local \fBnpm install\fP without any arguments\. +.IP 2. 3 +Set the NODE_ENV="production" for lifecycle scripts\. + +.RE +.SS proprietary\-attribs +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Whether or not to include proprietary extended attributes in the +tarballs created by npm\. +.P +Unless you are expecting to unpack package tarballs with something other +than npm \-\- particularly a very outdated tar implementation \-\- leave +this as true\. +.SS proxy +.RS 0 +.IP \(bu 2 +Default: null +.IP \(bu 2 +Type: url + +.RE +.P +A proxy to use for outgoing http requests\. If the \fBHTTP_PROXY\fP or +\fBhttp_proxy\fP environment variables are set, proxy settings will be +honored by the underlying \fBrequest\fP library\. +.SS rebuild\-bundle +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Rebuild bundled dependencies after installation\. +.SS registry +.RS 0 +.IP \(bu 2 +Default: https://registry\.npmjs\.org/ +.IP \(bu 2 +Type: url + +.RE +.P +The base URL of the npm package registry\. +.SS rollback +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Remove failed installs\. +.SS save +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Save installed packages to a package\.json file as dependencies\. +.P +When used with the \fBnpm rm\fP command, it removes it from the \fBdependencies\fP +object\. +.P +Only works if there is already a package\.json file present\. +.SS save\-bundle +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If a package would be saved at install time by the use of \fB\-\-save\fP, +\fB\-\-save\-dev\fP, or \fB\-\-save\-optional\fP, then also put it in the +\fBbundleDependencies\fP list\. +.P +When used with the \fBnpm rm\fP command, it removes it from the +bundledDependencies list\. +.SS save\-dev +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Save installed packages to a package\.json file as \fBdevDependencies\fP\|\. +.P +When used with the \fBnpm rm\fP command, it removes it from the +\fBdevDependencies\fP object\. +.P +Only works if there is already a package\.json file present\. +.SS save\-exact +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Dependencies saved to package\.json using \fB\-\-save\fP, \fB\-\-save\-dev\fP or +\fB\-\-save\-optional\fP will be configured with an exact version rather than +using npm's default semver range operator\. +.SS save\-optional +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Save installed packages to a package\.json file as +optionalDependencies\. +.P +When used with the \fBnpm rm\fP command, it removes it from the +\fBdevDependencies\fP object\. +.P +Only works if there is already a package\.json file present\. +.SS save\-prefix +.RS 0 +.IP \(bu 2 +Default: '^' +.IP \(bu 2 +Type: String + +.RE +.P +Configure how versions of packages installed to a package\.json file via +\fB\-\-save\fP or \fB\-\-save\-dev\fP get prefixed\. +.P +For example if a package has version \fB1\.2\.3\fP, by default its version is +set to \fB^1\.2\.3\fP which allows minor upgrades for that package, but after +\fBnpm config set save\-prefix='~'\fP it would be set to \fB~1\.2\.3\fP which only allows +patch upgrades\. +.SS scope +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +Associate an operation with a scope for a scoped registry\. Useful when logging +in to a private registry for the first time: +\fBnpm login \-\-scope=@organization \-\-registry=registry\.organization\.com\fP, which +will cause \fB@organization\fP to be mapped to the registry for future installation +of packages specified according to the pattern \fB@organization/package\fP\|\. +.SS searchopts +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +Space\-separated options that are always passed to search\. +.SS searchexclude +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +Space\-separated options that limit the results from search\. +.SS searchsort +.RS 0 +.IP \(bu 2 +Default: "name" +.IP \(bu 2 +Type: String +.IP \(bu 2 +Values: "name", "\-name", "date", "\-date", "description", +"\-description", "keywords", "\-keywords" + +.RE +.P +Indication of which field to sort search results by\. Prefix with a \fB\-\fP +character to indicate reverse sort\. +.SS shell +.RS 0 +.IP \(bu 2 +Default: SHELL environment variable, or "bash" on Posix, or "cmd" on +Windows +.IP \(bu 2 +Type: path + +.RE +.P +The shell to run for the \fBnpm explore\fP command\. +.SS shrinkwrap +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +If set to false, then ignore \fBnpm\-shrinkwrap\.json\fP files when +installing\. +.SS sign\-git\-tag +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If set to true, then the \fBnpm version\fP command will tag the version +using \fB\-s\fP to add a signature\. +.P +Note that git requires you to have set up GPG keys in your git configs +for this to work properly\. +.SS spin +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean or \fB"always"\fP + +.RE +.P +When set to \fBtrue\fP, npm will display an ascii spinner while it is doing +things, if \fBprocess\.stderr\fP is a TTY\. +.P +Set to \fBfalse\fP to suppress the spinner, or set to \fBalways\fP to output +the spinner even for non\-TTY outputs\. +.SS strict\-ssl +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Whether or not to do SSL key validation when making requests to the +registry via https\. +.P +See also the \fBca\fP config\. +.SS tag +.RS 0 +.IP \(bu 2 +Default: latest +.IP \(bu 2 +Type: String + +.RE +.P +If you ask npm to install a package and don't tell it a specific version, then +it will install the specified tag\. +.P +Also the tag that is added to the package@version specified by the \fBnpm +tag\fP command, if no explicit tag is given\. +.SS tag\-version\-prefix +.RS 0 +.IP \(bu 2 +Default: \fB"v"\fP +.IP \(bu 2 +Type: String + +.RE +.P +If set, alters the prefix used when tagging a new version when performing a +version increment using \fBnpm\-version\fP\|\. To remove the prefix altogether, set it +to the empty string: \fB""\fP\|\. +.P +Because other tools may rely on the convention that npm version tags look like +\fBv1\.0\.0\fP, \fIonly use this property if it is absolutely necessary\fR\|\. In +particular, use care when overriding this setting for public packages\. +.SS tmp +.RS 0 +.IP \(bu 2 +Default: TMPDIR environment variable, or "/tmp" +.IP \(bu 2 +Type: path + +.RE +.P +Where to store temporary files and folders\. All temp files are deleted +on success, but left behind on failure for forensic purposes\. +.SS unicode +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +When set to true, npm uses unicode characters in the tree output\. When +false, it uses ascii characters to draw trees\. +.SS unsafe\-perm +.RS 0 +.IP \(bu 2 +Default: false if running as root, true otherwise +.IP \(bu 2 +Type: Boolean + +.RE +.P +Set to true to suppress the UID/GID switching when running package +scripts\. If set explicitly to false, then installing as a non\-root user +will fail\. +.SS usage +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Set to show short usage output (like the \-H output) +instead of complete help when doing npm help \fBnpm\-help\fP\|\. +.SS user +.RS 0 +.IP \(bu 2 +Default: "nobody" +.IP \(bu 2 +Type: String or Number + +.RE +.P +The UID to set to when running package scripts as root\. +.SS userconfig +.RS 0 +.IP \(bu 2 +Default: ~/\.npmrc +.IP \(bu 2 +Type: path + +.RE +.P +The location of user\-level configuration settings\. +.SS umask +.RS 0 +.IP \(bu 2 +Default: 022 +.IP \(bu 2 +Type: Octal numeric string in range 0000\.\.0777 (0\.\.511) + +.RE +.P +The "umask" value to use when setting the file creation mode on files +and folders\. +.P +Folders and executables are given a mode which is \fB0777\fP masked against +this value\. Other files are given a mode which is \fB0666\fP masked against +this value\. Thus, the defaults are \fB0755\fP and \fB0644\fP respectively\. +.SS user\-agent +.RS 0 +.IP \(bu 2 +Default: node/{process\.version} {process\.platform} {process\.arch} +.IP \(bu 2 +Type: String + +.RE +.P +Sets a User\-Agent to the request header +.SS version +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: boolean + +.RE +.P +If true, output the npm version and exit successfully\. +.P +Only relevant when specified explicitly on the command line\. +.SS versions +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: boolean + +.RE +.P +If true, output the npm version as well as node's \fBprocess\.versions\fP map, and +exit successfully\. +.P +Only relevant when specified explicitly on the command line\. +.SS viewer +.RS 0 +.IP \(bu 2 +Default: "man" on Posix, "browser" on Windows +.IP \(bu 2 +Type: path + +.RE +.P +The program to use to view help content\. +.P +Set to \fB"browser"\fP to view html help content in the default web browser\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help npm + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-developers.7 b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-developers.7 new file mode 100644 index 00000000..43739437 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-developers.7 @@ -0,0 +1,282 @@ +.TH "NPM\-DEVELOPERS" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-developers\fR \- Developer Guide +.SH DESCRIPTION +.P +So, you've decided to use npm to develop (and maybe publish/deploy) +your project\. +.P +Fantastic! +.P +There are a few things that you need to do above the simple steps +that your users will do to install your program\. +.SH About These Documents +.P +These are man pages\. If you install npm, you should be able to +then do \fBman npm\-thing\fP to get the documentation on a particular +topic, or \fBnpm help thing\fP to see the same information\. +.SH What is a \fBpackage\fP +.P +A package is: +.RS 0 +.IP \(bu 2 +a) a folder containing a program described by a package\.json file +.IP \(bu 2 +b) a gzipped tarball containing (a) +.IP \(bu 2 +c) a url that resolves to (b) +.IP \(bu 2 +d) a \fB@\fP that is published on the registry with (c) +.IP \(bu 2 +e) a \fB@\fP that points to (d) +.IP \(bu 2 +f) a \fB\fP that has a "latest" tag satisfying (e) +.IP \(bu 2 +g) a \fBgit\fP url that, when cloned, results in (a)\. + +.RE +.P +Even if you never publish your package, you can still get a lot of +benefits of using npm if you just want to write a node program (a), and +perhaps if you also want to be able to easily install it elsewhere +after packing it up into a tarball (b)\. +.P +Git urls can be of the form: +.P +.RS 2 +.nf +git://github\.com/user/project\.git#commit\-ish +git+ssh://user@hostname:project\.git#commit\-ish +git+http://user@hostname/project/blah\.git#commit\-ish +git+https://user@hostname/project/blah\.git#commit\-ish +.fi +.RE +.P +The \fBcommit\-ish\fP can be any tag, sha, or branch which can be supplied as +an argument to \fBgit checkout\fP\|\. The default is \fBmaster\fP\|\. +.SH The package\.json File +.P +You need to have a \fBpackage\.json\fP file in the root of your project to do +much of anything with npm\. That is basically the whole interface\. +.P +See npm help 5 \fBpackage\.json\fP for details about what goes in that file\. At the very +least, you need: +.RS 0 +.IP \(bu 2 +name: +This should be a string that identifies your project\. Please do not +use the name to specify that it runs on node, or is in JavaScript\. +You can use the "engines" field to explicitly state the versions of +node (or whatever else) that your program requires, and it's pretty +well assumed that it's javascript\. +It does not necessarily need to match your github repository name\. +So, \fBnode\-foo\fP and \fBbar\-js\fP are bad names\. \fBfoo\fP or \fBbar\fP are better\. +.IP \(bu 2 +version: +A semver\-compatible version\. +.IP \(bu 2 +engines: +Specify the versions of node (or whatever else) that your program +runs on\. The node API changes a lot, and there may be bugs or new +functionality that you depend on\. Be explicit\. +.IP \(bu 2 +author: +Take some credit\. +.IP \(bu 2 +scripts: +If you have a special compilation or installation script, then you +should put it in the \fBscripts\fP object\. You should definitely have at +least a basic smoke\-test command as the "scripts\.test" field\. +See npm help 7 scripts\. +.IP \(bu 2 +main: +If you have a single module that serves as the entry point to your +program (like what the "foo" package gives you at require("foo")), +then you need to specify that in the "main" field\. +.IP \(bu 2 +directories: +This is an object mapping names to folders\. The best ones to include are +"lib" and "doc", but if you use "man" to specify a folder full of man pages, +they'll get installed just like these ones\. + +.RE +.P +You can use \fBnpm init\fP in the root of your package in order to get you +started with a pretty basic package\.json file\. See npm help \fBnpm\-init\fP for +more info\. +.SH Keeping files \fIout\fR of your package +.P +Use a \fB\|\.npmignore\fP file to keep stuff out of your package\. If there's +no \fB\|\.npmignore\fP file, but there \fIis\fR a \fB\|\.gitignore\fP file, then npm will +ignore the stuff matched by the \fB\|\.gitignore\fP file\. If you \fIwant\fR to +include something that is excluded by your \fB\|\.gitignore\fP file, you can +create an empty \fB\|\.npmignore\fP file to override it\. Like \fBgit\fP, \fBnpm\fP looks +for \fB\|\.npmignore\fP and \fB\|\.gitignore\fP files in all subdirectories of your +package, not only the root directory\. +.P +\fB\|\.npmignore\fP files follow the same pattern rules \fIhttps://git\-scm\.com/book/en/v2/Git\-Basics\-Recording\-Changes\-to\-the\-Repository#Ignoring\-Files\fR +as \fB\|\.gitignore\fP files: +.RS 0 +.IP \(bu 2 +Blank lines or lines starting with \fB#\fP are ignored\. +.IP \(bu 2 +Standard glob patterns work\. +.IP \(bu 2 +You can end patterns with a forward slash \fB/\fP to specify a directory\. +.IP \(bu 2 +You can negate a pattern by starting it with an exclamation point \fB!\fP\|\. + +.RE +.P +By default, the following paths and files are ignored, so there's no +need to add them to \fB\|\.npmignore\fP explicitly: +.RS 0 +.IP \(bu 2 +\fB\|\.*\.swp\fP +.IP \(bu 2 +\fB\|\._*\fP +.IP \(bu 2 +\fB\|\.DS_Store\fP +.IP \(bu 2 +\fB\|\.git\fP +.IP \(bu 2 +\fB\|\.hg\fP +.IP \(bu 2 +\fB\|\.npmrc\fP +.IP \(bu 2 +\fB\|\.lock\-wscript\fP +.IP \(bu 2 +\fB\|\.svn\fP +.IP \(bu 2 +\fB\|\.wafpickle\-*\fP +.IP \(bu 2 +\fBconfig\.gypi\fP +.IP \(bu 2 +\fBCVS\fP +.IP \(bu 2 +\fBnpm\-debug\.log\fP + +.RE +.P +Additionally, everything in \fBnode_modules\fP is ignored, except for +bundled dependencies\. npm automatically handles this for you, so don't +bother adding \fBnode_modules\fP to \fB\|\.npmignore\fP\|\. +.P +The following paths and files are never ignored, so adding them to +\fB\|\.npmignore\fP is pointless: +.RS 0 +.IP \(bu 2 +\fBpackage\.json\fP +.IP \(bu 2 +\fBREADME\fP (and its variants) +.IP \(bu 2 +\fBCHANGELOG\fP (and its variants) +.IP \(bu 2 +\fBLICENSE\fP / \fBLICENCE\fP + +.RE +.SH Link Packages +.P +\fBnpm link\fP is designed to install a development package and see the +changes in real time without having to keep re\-installing it\. (You do +need to either re\-link or \fBnpm rebuild \-g\fP to update compiled packages, +of course\.) +.P +More info at npm help \fBnpm\-link\fP\|\. +.SH Before Publishing: Make Sure Your Package Installs and Works +.P +\fBThis is important\.\fR +.P +If you can not install it locally, you'll have +problems trying to publish it\. Or, worse yet, you'll be able to +publish it, but you'll be publishing a broken or pointless package\. +So don't do that\. +.P +In the root of your package, do this: +.P +.RS 2 +.nf +npm install \. \-g +.fi +.RE +.P +That'll show you that it's working\. If you'd rather just create a symlink +package that points to your working directory, then do this: +.P +.RS 2 +.nf +npm link +.fi +.RE +.P +Use \fBnpm ls \-g\fP to see if it's there\. +.P +To test a local install, go into some other folder, and then do: +.P +.RS 2 +.nf +cd \.\./some\-other\-folder +npm install \.\./my\-package +.fi +.RE +.P +to install it locally into the node_modules folder in that other place\. +.P +Then go into the node\-repl, and try using require("my\-thing") to +bring in your module's main module\. +.SH Create a User Account +.P +Create a user with the adduser command\. It works like this: +.P +.RS 2 +.nf +npm adduser +.fi +.RE +.P +and then follow the prompts\. +.P +This is documented better in npm help adduser\. +.SH Publish your package +.P +This part's easy\. In the root of your folder, do this: +.P +.RS 2 +.nf +npm publish +.fi +.RE +.P +You can give publish a url to a tarball, or a filename of a tarball, +or a path to a folder\. +.P +Note that pretty much \fBeverything in that folder will be exposed\fR +by default\. So, if you have secret stuff in there, use a +\fB\|\.npmignore\fP file to list out the globs to ignore, or publish +from a fresh checkout\. +.SH Brag about it +.P +Send emails, write blogs, blab in IRC\. +.P +Tell the world how easy it is to install your program! +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help npm +.IP \(bu 2 +npm help init +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm help 7 registry + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-disputes.7 b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-disputes.7 new file mode 100644 index 00000000..52dfcda4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-disputes.7 @@ -0,0 +1,124 @@ +.TH "NPM\-DISPUTES" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-disputes\fR \- Handling Module Name Disputes +.SH SYNOPSIS +.RS 0 +.IP 1. 3 +Get the author email with \fBnpm owner ls \fP +.IP 2. 3 +Email the author, CC support@npmjs\.com +.IP 3. 3 +After a few weeks, if there's no resolution, we'll sort it out\. + +.RE +.P +Don't squat on package names\. Publish code or move out of the way\. +.SH DESCRIPTION +.P +There sometimes arise cases where a user publishes a module, and then +later, some other user wants to use that name\. Here are some common +ways that happens (each of these is based on actual events\.) +.RS 0 +.IP 1. 3 +Joe writes a JavaScript module \fBfoo\fP, which is not node\-specific\. +Joe doesn't use node at all\. Bob wants to use \fBfoo\fP in node, so he +wraps it in an npm module\. Some time later, Joe starts using node, +and wants to take over management of his program\. +.IP 2. 3 +Bob writes an npm module \fBfoo\fP, and publishes it\. Perhaps much +later, Joe finds a bug in \fBfoo\fP, and fixes it\. He sends a pull +request to Bob, but Bob doesn't have the time to deal with it, +because he has a new job and a new baby and is focused on his new +erlang project, and kind of not involved with node any more\. Joe +would like to publish a new \fBfoo\fP, but can't, because the name is +taken\. +.IP 3. 3 +Bob writes a 10\-line flow\-control library, and calls it \fBfoo\fP, and +publishes it to the npm registry\. Being a simple little thing, it +never really has to be updated\. Joe works for Foo Inc, the makers +of the critically acclaimed and widely\-marketed \fBfoo\fP JavaScript +toolkit framework\. They publish it to npm as \fBfoojs\fP, but people are +routinely confused when \fBnpm install foo\fP is some different thing\. +.IP 4. 3 +Bob writes a parser for the widely\-known \fBfoo\fP file format, because +he needs it for work\. Then, he gets a new job, and never updates the +prototype\. Later on, Joe writes a much more complete \fBfoo\fP parser, +but can't publish, because Bob's \fBfoo\fP is in the way\. + +.RE +.P +The validity of Joe's claim in each situation can be debated\. However, +Joe's appropriate course of action in each case is the same\. +.RS 0 +.IP 1. 3 +\fBnpm owner ls foo\fP\|\. This will tell Joe the email address of the +owner (Bob)\. +.IP 2. 3 +Joe emails Bob, explaining the situation \fBas respectfully as +possible\fR, and what he would like to do with the module name\. He +adds the npm support staff support@npmjs\.com to the CC list of +the email\. Mention in the email that Bob can run \fBnpm owner add +joe foo\fP to add Joe as an owner of the \fBfoo\fP package\. +.IP 3. 3 +After a reasonable amount of time, if Bob has not responded, or if +Bob and Joe can't come to any sort of resolution, email support +support@npmjs\.com and we'll sort it out\. ("Reasonable" is +usually at least 4 weeks, but extra time is allowed around common +holidays\.) + +.RE +.SH REASONING +.P +In almost every case so far, the parties involved have been able to reach +an amicable resolution without any major intervention\. Most people +really do want to be reasonable, and are probably not even aware that +they're in your way\. +.P +Module ecosystems are most vibrant and powerful when they are as +self\-directed as possible\. If an admin one day deletes something you +had worked on, then that is going to make most people quite upset, +regardless of the justification\. When humans solve their problems by +talking to other humans with respect, everyone has the chance to end up +feeling good about the interaction\. +.SH EXCEPTIONS +.P +Some things are not allowed, and will be removed without discussion if +they are brought to the attention of the npm registry admins, including +but not limited to: +.RS 0 +.IP 1. 3 +Malware (that is, a package designed to exploit or harm the machine on +which it is installed)\. +.IP 2. 3 +Violations of copyright or licenses (for example, cloning an +MIT\-licensed program, and then removing or changing the copyright and +license statement)\. +.IP 3. 3 +Illegal content\. +.IP 4. 3 +"Squatting" on a package name that you \fIplan\fR to use, but aren't +actually using\. Sorry, I don't care how great the name is, or how +perfect a fit it is for the thing that someday might happen\. If +someone wants to use it today, and you're just taking up space with +an empty tarball, you're going to be evicted\. +.IP 5. 3 +Putting empty packages in the registry\. Packages must have SOME +functionality\. It can be silly, but it can't be \fInothing\fR\|\. (See +also: squatting\.) +.IP 6. 3 +Doing weird things with the registry, like using it as your own +personal application database or otherwise putting non\-packagey +things into it\. + +.RE +.P +If you see bad behavior like this, please report it right away\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help owner + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-index.7 b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-index.7 new file mode 100644 index 00000000..72b052eb --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-index.7 @@ -0,0 +1,333 @@ +.TH "NPM\-INDEX" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-index\fR \- Index of all npm documentation +.SS npm help README +.P +a JavaScript package manager +.SH Command Line Documentation +.P +Using npm on the command line +.SS npm help npm +.P +javascript package manager +.SS npm help access +.P +Set access level on published packages +.SS npm help adduser +.P +Add a registry user account +.SS npm help bin +.P +Display npm bin folder +.SS npm help bugs +.P +Bugs for a package in a web browser maybe +.SS npm help build +.P +Build a package +.SS npm help bundle +.P +REMOVED +.SS npm help cache +.P +Manipulates packages cache +.SS npm help completion +.P +Tab Completion for npm +.SS npm help config +.P +Manage the npm configuration files +.SS npm help dedupe +.P +Reduce duplication +.SS npm help deprecate +.P +Deprecate a version of a package +.SS npm help dist\-tag +.P +Modify package distribution tags +.SS npm help docs +.P +Docs for a package in a web browser maybe +.SS npm help edit +.P +Edit an installed package +.SS npm help explore +.P +Browse an installed package +.SS npm help help\-search +.P +Search npm help documentation +.SS npm help help +.P +Get help on npm +.SS npm help init +.P +Interactively create a package\.json file +.SS npm help install +.P +Install a package +.SS npm help link +.P +Symlink a package folder +.SS npm help logout +.P +Log out of the registry +.SS npm help ls +.P +List installed packages +.SS npm help outdated +.P +Check for outdated packages +.SS npm help owner +.P +Manage package owners +.SS npm help pack +.P +Create a tarball from a package +.SS npm help ping +.P +Ping npm registry +.SS npm help prefix +.P +Display prefix +.SS npm help prune +.P +Remove extraneous packages +.SS npm help publish +.P +Publish a package +.SS npm help rebuild +.P +Rebuild a package +.SS npm help repo +.P +Open package repository page in the browser +.SS npm help restart +.P +Restart a package +.SS npm help rm +.P +Remove a package +.SS npm help root +.P +Display npm root +.SS npm help run\-script +.P +Run arbitrary package scripts +.SS npm help search +.P +Search for packages +.SS npm help shrinkwrap +.P +Lock down dependency versions +.SS npm help star +.P +Mark your favorite packages +.SS npm help stars +.P +View packages marked as favorites +.SS npm help start +.P +Start a package +.SS npm help stop +.P +Stop a package +.SS npm help tag +.P +Tag a published version +.SS npm help team +.P +Manage organization teams and team memberships +.SS npm help test +.P +Test a package +.SS npm help uninstall +.P +Remove a package +.SS npm help unpublish +.P +Remove a package from the registry +.SS npm help update +.P +Update a package +.SS npm help version +.P +Bump a package version +.SS npm help view +.P +View registry info +.SS npm help whoami +.P +Display npm username +.SH API Documentation +.P +Using npm in your Node programs +.SS npm apihelp npm +.P +javascript package manager +.SS npm apihelp bin +.P +Display npm bin folder +.SS npm apihelp bugs +.P +Bugs for a package in a web browser maybe +.SS npm apihelp cache +.P +manage the npm cache programmatically +.SS npm apihelp commands +.P +npm commands +.SS npm apihelp config +.P +Manage the npm configuration files +.SS npm apihelp deprecate +.P +Deprecate a version of a package +.SS npm apihelp docs +.P +Docs for a package in a web browser maybe +.SS npm apihelp edit +.P +Edit an installed package +.SS npm apihelp explore +.P +Browse an installed package +.SS npm apihelp help\-search +.P +Search the help pages +.SS npm apihelp init +.P +Interactively create a package\.json file +.SS npm apihelp install +.P +install a package programmatically +.SS npm apihelp link +.P +Symlink a package folder +.SS npm apihelp load +.P +Load config settings +.SS npm apihelp ls +.P +List installed packages +.SS npm apihelp outdated +.P +Check for outdated packages +.SS npm apihelp owner +.P +Manage package owners +.SS npm apihelp pack +.P +Create a tarball from a package +.SS npm apihelp ping +.P +Ping npm registry +.SS npm apihelp prefix +.P +Display prefix +.SS npm apihelp prune +.P +Remove extraneous packages +.SS npm apihelp publish +.P +Publish a package +.SS npm apihelp rebuild +.P +Rebuild a package +.SS npm apihelp repo +.P +Open package repository page in the browser +.SS npm apihelp restart +.P +Restart a package +.SS npm apihelp root +.P +Display npm root +.SS npm apihelp run\-script +.P +Run arbitrary package scripts +.SS npm apihelp search +.P +Search for packages +.SS npm apihelp shrinkwrap +.P +programmatically generate package shrinkwrap file +.SS npm apihelp start +.P +Start a package +.SS npm apihelp stop +.P +Stop a package +.SS npm apihelp tag +.P +Tag a published version +.SS npm apihelp test +.P +Test a package +.SS npm apihelp uninstall +.P +uninstall a package programmatically +.SS npm apihelp unpublish +.P +Remove a package from the registry +.SS npm apihelp update +.P +Update a package +.SS npm apihelp version +.P +Bump a package version +.SS npm apihelp view +.P +View registry info +.SS npm apihelp whoami +.P +Display npm username +.SH Files +.P +File system structures npm uses +.SS npm help 5 folders +.P +Folder Structures Used by npm +.SS npm help 5 npmrc +.P +The npm config files +.SS npm help 5 package\.json +.P +Specifics of npm's package\.json handling +.SH Misc +.P +Various other bits and bobs +.SS npm help 7 coding\-style +.P +npm's "funny" coding style +.SS npm help 7 config +.P +More than you probably want to know about npm configuration +.SS npm help 7 developers +.P +Developer Guide +.SS npm help 7 disputes +.P +Handling Module Name Disputes +.SS npm help 7 index +.P +Index of all npm documentation +.SS npm help 7 orgs +.P +Working with Teams & Orgs +.SS npm help 7 registry +.P +The JavaScript Package Registry +.SS npm help 7 scope +.P +Scoped packages +.SS npm help 7 scripts +.P +How npm handles the "scripts" field +.SS npm help 7 removing\-npm +.P +Cleaning the Slate +.SS npm help 7 semver +.P +The semantic versioner for npm diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-orgs.7 b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-orgs.7 new file mode 100644 index 00000000..cfecdf24 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-orgs.7 @@ -0,0 +1,146 @@ +.TH "NPM\-ORGS" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-orgs\fR \- Working with Teams & Orgs +.SH DESCRIPTION +.P +There are three levels of org users: +.RS 0 +.IP 1. 3 +Super admin, controls billing & adding people to the org\. +.IP 2. 3 +Team admin, manages team membership & package access\. +.IP 3. 3 +Developer, works on packages they are given access to\. + +.RE +.P +The super admin is the only person who can add users to the org because it impacts the monthly bill\. The super admin will use the website to manage membership\. Every org has a \fBdevelopers\fP team that all users are automatically added to\. +.P +The team admin is the person who manages team creation, team membership, and package access for teams\. The team admin grants package access to teams, not individuals\. +.P +The developer will be able to access packages based on the teams they are on\. Access is either read\-write or read\-only\. +.P +There are two main commands: +.RS 0 +.IP 1. 3 +\fBnpm team\fP see npm help access for more details +.IP 2. 3 +\fBnpm access\fP see npm help team for more details + +.RE +.SH Team Admins create teams +.RS 0 +.IP \(bu 2 +Check who you’ve added to your org: + +.RE +.P +.RS 2 +.nf +npm team ls :developers +.fi +.RE +.RS 0 +.IP \(bu 2 +Each org is automatically given a \fBdevelopers\fP team, so you can see the whole list of team members in your org\. This team automatically gets read\-write access to all packages, but you can change that with the \fBaccess\fP command\. +.IP \(bu 2 +Create a new team: + +.RE +.P +.RS 2 +.nf +npm team create +.fi +.RE +.RS 0 +.IP \(bu 2 +Add members to that team: + +.RE +.P +.RS 2 +.nf +npm team add +.fi +.RE +.SH Publish a package and adjust package access +.RS 0 +.IP \(bu 2 +In package directory, run + +.RE +.P +.RS 2 +.nf +npm init \-\-scope= +.fi +.RE +.P +to scope it for your org & publish as usual +.RS 0 +.IP \(bu 2 +Grant access: + +.RE +.P +.RS 2 +.nf +npm access grant [] +.fi +.RE +.RS 0 +.IP \(bu 2 +Revoke access: + +.RE +.P +.RS 2 +.nf +npm access revoke [] +.fi +.RE +.SH Monitor your package access +.RS 0 +.IP \(bu 2 +See what org packages a team member can access: + +.RE +.P +.RS 2 +.nf +npm access ls\-packages +.fi +.RE +.RS 0 +.IP \(bu 2 +See packages available to a specific team: + +.RE +.P +.RS 2 +.nf +npm access ls\-packages +.fi +.RE +.RS 0 +.IP \(bu 2 +Check which teams are collaborating on a package: + +.RE +.P +.RS 2 +.nf +npm access ls\-collaborators +.fi +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help team +.IP \(bu 2 +npm help access +.IP \(bu 2 +npm help 7 scope + +.RE diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-registry.7 b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-registry.7 new file mode 100644 index 00000000..cf38557d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-registry.7 @@ -0,0 +1,71 @@ +.TH "NPM\-REGISTRY" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-registry\fR \- The JavaScript Package Registry +.SH DESCRIPTION +.P +To resolve packages by name and version, npm talks to a registry website +that implements the CommonJS Package Registry specification for reading +package info\. +.P +Additionally, npm's package registry implementation supports several +write APIs as well, to allow for publishing packages and managing user +account information\. +.P +The official public npm registry is at https://registry\.npmjs\.org/\|\. It +is powered by a CouchDB database, of which there is a public mirror at +https://skimdb\.npmjs\.com/registry\|\. The code for the couchapp is +available at https://github\.com/npm/npm\-registry\-couchapp\|\. +.P +The registry URL used is determined by the scope of the package (see +npm help 7 \fBnpm\-scope\fP)\. If no scope is specified, the default registry is used, which is +supplied by the \fBregistry\fP config parameter\. See npm help \fBnpm\-config\fP, +npm help 5 \fBnpmrc\fP, and npm help 7 \fBnpm\-config\fP for more on managing npm's configuration\. +.SH Can I run my own private registry? +.P +Yes! +.P +The easiest way is to replicate the couch database, and use the same (or +similar) design doc to implement the APIs\. +.P +If you set up continuous replication from the official CouchDB, and then +set your internal CouchDB as the registry config, then you'll be able +to read any published packages, in addition to your private ones, and by +default will only publish internally\. +.P +If you then want to publish a package for the whole world to see, you can +simply override the \fB\-\-registry\fP option for that \fBpublish\fP command\. +.SH I don't want my package published in the official registry\. It's private\. +.P +Set \fB"private": true\fP in your package\.json to prevent it from being +published at all, or +\fB"publishConfig":{"registry":"http://my\-internal\-registry\.local"}\fP +to force it to be published only to your internal registry\. +.P +See npm help 5 \fBpackage\.json\fP for more info on what goes in the package\.json file\. +.SH Will you replicate from my registry into the public one? +.P +No\. If you want things to be public, then publish them into the public +registry using npm\. What little security there is would be for nought +otherwise\. +.SH Do I have to use couchdb to build a registry that npm can talk to? +.P +No, but it's way easier\. Basically, yes, you do, or you have to +effectively implement the entire CouchDB API anyway\. +.SH Is there a website or something to see package docs and such? +.P +Yes, head over to https://npmjs\.com/ +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 developers +.IP \(bu 2 +npm help 7 disputes + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-scope.7 b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-scope.7 new file mode 100644 index 00000000..06d46c6c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-scope.7 @@ -0,0 +1,127 @@ +.TH "NPM\-SCOPE" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-scope\fR \- Scoped packages +.SH DESCRIPTION +.P +All npm packages have a name\. Some package names also have a scope\. A scope +follows the usual rules for package names (url\-safe characters, no leading dots +or underscores)\. When used in package names, preceded by an @\-symbol and +followed by a slash, e\.g\. +.P +.RS 2 +.nf +@somescope/somepackagename +.fi +.RE +.P +Scopes are a way of grouping related packages together, and also affect a few +things about the way npm treats the package\. +.P +Scoped packages are supported by the public npm registry\. The npm +client is backwards\-compatible with un\-scoped registries, so it can be +used to work with scoped and un\-scoped registries at the same time\. +.SH Installing scoped packages +.P +Scoped packages are installed to a sub\-folder of the regular installation +folder, e\.g\. if your other packages are installed in \fBnode_modules/packagename\fP, +scoped modules will be in \fBnode_modules/@myorg/packagename\fP\|\. The scope folder +(\fB@myorg\fP) is simply the name of the scope preceded by an @\-symbol, and can +contain any number of scoped packages\. +.P +A scoped package is installed by referencing it by name, preceded by an +@\-symbol, in \fBnpm install\fP: +.P +.RS 2 +.nf +npm install @myorg/mypackage +.fi +.RE +.P +Or in \fBpackage\.json\fP: +.P +.RS 2 +.nf +"dependencies": { + "@myorg/mypackage": "^1\.3\.0" +} +.fi +.RE +.P +Note that if the @\-symbol is omitted in either case npm will instead attempt to +install from GitHub; see npm help \fBnpm\-install\fP\|\. +.SH Requiring scoped packages +.P +Because scoped packages are installed into a scope folder, you have to +include the name of the scope when requiring them in your code, e\.g\. +.P +.RS 2 +.nf +require('@myorg/mypackage') +.fi +.RE +.P +There is nothing special about the way Node treats scope folders, this is +just specifying to require the module \fBmypackage\fP in the folder called \fB@myorg\fP\|\. +.SH Publishing scoped packages +.P +Scoped packages can be published to any registry that supports them, including +the public npm registry\. +.P +(As of 2015\-04\-19, and with npm 2\.0 or newer, the public npm registry \fBdoes\fR +support scoped packages) +.P +If you wish, you may associate a scope with a registry; see below\. +.SS Publishing public scoped packages to the public npm registry +.P +To publish a public scoped package, you must specify \fB\-\-access public\fP with +the initial publication\. This will publish the package and set access +to \fBpublic\fP as if you had run \fBnpm access public\fP after publishing\. +.SS Publishing private scoped packages to the npm registry +.P +To publish a private scoped package to the npm registry, you must have +an npm Private Modules \fIhttps://www\.npmjs\.com/private\-modules\fR +account\. +.P +You can then publish the module with \fBnpm publish\fP or \fBnpm publish +\-\-access restricted\fP, and it will be present in the npm registry, with +restricted access\. You can then change the access permissions, if +desired, with \fBnpm access\fP or on the npmjs\.com website\. +.SH Associating a scope with a registry +.P +Scopes can be associated with a separate registry\. This allows you to +seamlessly use a mix of packages from the public npm registry and one or more +private registries, such as npm Enterprise\. +.P +You can associate a scope with a registry at login, e\.g\. +.P +.RS 2 +.nf +npm login \-\-registry=http://reg\.example\.com \-\-scope=@myco +.fi +.RE +.P +Scopes have a many\-to\-one relationship with registries: one registry can +host multiple scopes, but a scope only ever points to one registry\. +.P +You can also associate a scope with a registry using \fBnpm config\fP: +.P +.RS 2 +.nf +npm config set @myco:registry http://reg\.example\.com +.fi +.RE +.P +Once a scope is associated with a registry, any \fBnpm install\fP for a package +with that scope will request packages from that registry instead\. Any +\fBnpm publish\fP for a package name that contains the scope will be published to +that registry instead\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help access + +.RE diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-scripts.7 b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-scripts.7 new file mode 100644 index 00000000..9700d594 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man7/npm-scripts.7 @@ -0,0 +1,282 @@ +.TH "NPM\-SCRIPTS" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-scripts\fR \- How npm handles the "scripts" field +.SH DESCRIPTION +.P +npm supports the "scripts" property of the package\.json script, for the +following scripts: +.RS 0 +.IP \(bu 2 +prepublish: +Run BEFORE the package is published\. (Also run on local \fBnpm +install\fP without any arguments\.) +.IP \(bu 2 +publish, postpublish: +Run AFTER the package is published\. +.IP \(bu 2 +preinstall: +Run BEFORE the package is installed +.IP \(bu 2 +install, postinstall: +Run AFTER the package is installed\. +.IP \(bu 2 +preuninstall, uninstall: +Run BEFORE the package is uninstalled\. +.IP \(bu 2 +postuninstall: +Run AFTER the package is uninstalled\. +.IP \(bu 2 +preversion, version: +Run BEFORE bump the package version\. +.IP \(bu 2 +postversion: +Run AFTER bump the package version\. +.IP \(bu 2 +pretest, test, posttest: +Run by the \fBnpm test\fP command\. +.IP \(bu 2 +prestop, stop, poststop: +Run by the \fBnpm stop\fP command\. +.IP \(bu 2 +prestart, start, poststart: +Run by the \fBnpm start\fP command\. +.IP \(bu 2 +prerestart, restart, postrestart: +Run by the \fBnpm restart\fP command\. Note: \fBnpm restart\fP will run the +stop and start scripts if no \fBrestart\fP script is provided\. + +.RE +.P +Additionally, arbitrary scripts can be executed by running \fBnpm +run\-script \fP\|\. \fIPre\fR and \fIpost\fR commands with matching +names will be run for those as well (e\.g\. \fBpremyscript\fP, \fBmyscript\fP, +\fBpostmyscript\fP)\. +.SH COMMON USES +.P +If you need to perform operations on your package before it is used, in a way +that is not dependent on the operating system or architecture of the +target system, use a \fBprepublish\fP script\. This includes +tasks such as: +.RS 0 +.IP \(bu 2 +Compiling CoffeeScript source code into JavaScript\. +.IP \(bu 2 +Creating minified versions of JavaScript source code\. +.IP \(bu 2 +Fetching remote resources that your package will use\. + +.RE +.P +The advantage of doing these things at \fBprepublish\fP time is that they can be done once, in a +single place, thus reducing complexity and variability\. +Additionally, this means that: +.RS 0 +.IP \(bu 2 +You can depend on \fBcoffee\-script\fP as a \fBdevDependency\fP, and thus +your users don't need to have it installed\. +.IP \(bu 2 +You don't need to include minifiers in your package, reducing +the size for your users\. +.IP \(bu 2 +You don't need to rely on your users having \fBcurl\fP or \fBwget\fP or +other system tools on the target machines\. + +.RE +.SH DEFAULT VALUES +.P +npm will default some script values based on package contents\. +.RS 0 +.IP \(bu 2 +\fB"start": "node server\.js"\fP: +If there is a \fBserver\.js\fP file in the root of your package, then npm +will default the \fBstart\fP command to \fBnode server\.js\fP\|\. +.IP \(bu 2 +\fB"install": "node\-gyp rebuild"\fP: +If there is a \fBbindings\.gyp\fP file in the root of your package, npm will +default the \fBinstall\fP command to compile using node\-gyp\. + +.RE +.SH USER +.P +If npm was invoked with root privileges, then it will change the uid +to the user account or uid specified by the \fBuser\fP config, which +defaults to \fBnobody\fP\|\. Set the \fBunsafe\-perm\fP flag to run scripts with +root privileges\. +.SH ENVIRONMENT +.P +Package scripts run in an environment where many pieces of information +are made available regarding the setup of npm and the current state of +the process\. +.SS path +.P +If you depend on modules that define executable scripts, like test +suites, then those executables will be added to the \fBPATH\fP for +executing the scripts\. So, if your package\.json has this: +.P +.RS 2 +.nf +{ "name" : "foo" +, "dependencies" : { "bar" : "0\.1\.x" } +, "scripts": { "start" : "bar \./test" } } +.fi +.RE +.P +then you could run \fBnpm start\fP to execute the \fBbar\fP script, which is +exported into the \fBnode_modules/\.bin\fP directory on \fBnpm install\fP\|\. +.SS package\.json vars +.P +The package\.json fields are tacked onto the \fBnpm_package_\fP prefix\. So, +for instance, if you had \fB{"name":"foo", "version":"1\.2\.5"}\fP in your +package\.json file, then your package scripts would have the +\fBnpm_package_name\fP environment variable set to "foo", and the +\fBnpm_package_version\fP set to "1\.2\.5" +.SS configuration +.P +Configuration parameters are put in the environment with the +\fBnpm_config_\fP prefix\. For instance, you can view the effective \fBroot\fP +config by checking the \fBnpm_config_root\fP environment variable\. +.SS Special: package\.json "config" object +.P +The package\.json "config" keys are overwritten in the environment if +there is a config param of \fB[@]:\fP\|\. For example, +if the package\.json has this: +.P +.RS 2 +.nf +{ "name" : "foo" +, "config" : { "port" : "8080" } +, "scripts" : { "start" : "node server\.js" } } +.fi +.RE +.P +and the server\.js is this: +.P +.RS 2 +.nf +http\.createServer(\.\.\.)\.listen(process\.env\.npm_package_config_port) +.fi +.RE +.P +then the user could change the behavior by doing: +.P +.RS 2 +.nf +npm config set foo:port 80 +.fi +.RE +.SS current lifecycle event +.P +Lastly, the \fBnpm_lifecycle_event\fP environment variable is set to +whichever stage of the cycle is being executed\. So, you could have a +single script used for different parts of the process which switches +based on what's currently happening\. +.P +Objects are flattened following this format, so if you had +\fB{"scripts":{"install":"foo\.js"}}\fP in your package\.json, then you'd +see this in the script: +.P +.RS 2 +.nf +process\.env\.npm_package_scripts_install === "foo\.js" +.fi +.RE +.SH EXAMPLES +.P +For example, if your package\.json contains this: +.P +.RS 2 +.nf +{ "scripts" : + { "install" : "scripts/install\.js" + , "postinstall" : "scripts/install\.js" + , "uninstall" : "scripts/uninstall\.js" + } +} +.fi +.RE +.P +then \fBscripts/install\.js\fP will be called for the install +and post\-install stages of the lifecycle, and \fBscripts/uninstall\.js\fP +will be called when the package is uninstalled\. Since +\fBscripts/install\.js\fP is running for two different phases, it would +be wise in this case to look at the \fBnpm_lifecycle_event\fP environment +variable\. +.P +If you want to run a make command, you can do so\. This works just +fine: +.P +.RS 2 +.nf +{ "scripts" : + { "preinstall" : "\./configure" + , "install" : "make && make install" + , "test" : "make test" + } +} +.fi +.RE +.SH EXITING +.P +Scripts are run by passing the line as a script argument to \fBsh\fP\|\. +.P +If the script exits with a code other than 0, then this will abort the +process\. +.P +Note that these script files don't have to be nodejs or even +javascript programs\. They just have to be some kind of executable +file\. +.SH HOOK SCRIPTS +.P +If you want to run a specific script at a specific lifecycle event for +ALL packages, then you can use a hook script\. +.P +Place an executable file at \fBnode_modules/\.hooks/{eventname}\fP, and +it'll get run for all packages when they are going through that point +in the package lifecycle for any packages installed in that root\. +.P +Hook scripts are run exactly the same way as package\.json scripts\. +That is, they are in a separate child process, with the env described +above\. +.SH BEST PRACTICES +.RS 0 +.IP \(bu 2 +Don't exit with a non\-zero error code unless you \fIreally\fR mean it\. +Except for uninstall scripts, this will cause the npm action to +fail, and potentially be rolled back\. If the failure is minor or +only will prevent some optional features, then it's better to just +print a warning and exit successfully\. +.IP \(bu 2 +Try not to use scripts to do what npm can do for you\. Read through +npm help 5 \fBpackage\.json\fP to see all the things that you can specify and enable +by simply describing your package appropriately\. In general, this +will lead to a more robust and consistent state\. +.IP \(bu 2 +Inspect the env to determine where to put things\. For instance, if +the \fBnpm_config_binroot\fP environment variable is set to \fB/home/user/bin\fP, then +don't try to install executables into \fB/usr/local/bin\fP\|\. The user +probably set it up that way for a reason\. +.IP \(bu 2 +Don't prefix your script commands with "sudo"\. If root permissions +are required for some reason, then it'll fail with that error, and +the user will sudo the npm command in question\. +.IP \(bu 2 +Don't use \fBinstall\fP\|\. Use a \fB\|\.gyp\fP file for compilation, and \fBprepublish\fP +for anything else\. You should almost never have to explicitly set a +preinstall or install script\. If you are doing this, please consider if +there is another option\. The only valid use of \fBinstall\fP or \fBpreinstall\fP +scripts is for compilation which must be done on the target architecture\. + +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help 7 developers +.IP \(bu 2 +npm help install + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man7/removing-npm.7 b/bin/nodejs0.10.47/node_modules/npm/man/man7/removing-npm.7 new file mode 100644 index 00000000..7d74be85 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man7/removing-npm.7 @@ -0,0 +1,78 @@ +.TH "NPM\-REMOVAL" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-removal\fR \- Cleaning the Slate +.SH SYNOPSIS +.P +So sad to see you go\. +.P +.RS 2 +.nf +sudo npm uninstall npm \-g +.fi +.RE +.P +Or, if that fails, get the npm source code, and do: +.P +.RS 2 +.nf +sudo make uninstall +.fi +.RE +.SH More Severe Uninstalling +.P +Usually, the above instructions are sufficient\. That will remove +npm, but leave behind anything you've installed\. +.P +If that doesn't work, or if you require more drastic measures, +continue reading\. +.P +Note that this is only necessary for globally\-installed packages\. Local +installs are completely contained within a project's \fBnode_modules\fP +folder\. Delete that folder, and everything is gone (unless a package's +install script is particularly ill\-behaved)\. +.P +This assumes that you installed node and npm in the default place\. If +you configured node with a different \fB\-\-prefix\fP, or installed npm with a +different prefix setting, then adjust the paths accordingly, replacing +\fB/usr/local\fP with your install prefix\. +.P +To remove everything npm\-related manually: +.P +.RS 2 +.nf +rm \-rf /usr/local/{lib/node{,/\.npm,_modules},bin,share/man}/npm* +.fi +.RE +.P +If you installed things \fIwith\fR npm, then your best bet is to uninstall +them with npm first, and then install them again once you have a +proper install\. This can help find any symlinks that are lying +around: +.P +.RS 2 +.nf +ls \-laF /usr/local/{lib/node{,/\.npm},bin,share/man} | grep npm +.fi +.RE +.P +Prior to version 0\.3, npm used shim files for executables and node +modules\. To track those down, you can do the following: +.P +.RS 2 +.nf +find /usr/local/{lib/node,bin} \-exec grep \-l npm \\{\\} \\; ; +.fi +.RE +.P +(This is also in the README file\.) +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +README +.IP \(bu 2 +npm help uninstall +.IP \(bu 2 +npm help prune + +.RE + diff --git a/bin/nodejs0.10.47/node_modules/npm/man/man7/semver.7 b/bin/nodejs0.10.47/node_modules/npm/man/man7/semver.7 new file mode 100644 index 00000000..90bd5eb7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/man/man7/semver.7 @@ -0,0 +1,413 @@ +.TH "SEMVER" "7" "March 2016" "" "" +.SH "NAME" +\fBsemver\fR \- The semantic versioner for npm +.SH Usage +.P +.RS 2 +.nf +$ npm install semver + +semver\.valid('1\.2\.3') // '1\.2\.3' +semver\.valid('a\.b\.c') // null +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 +.fi +.RE +.P +As a command\-line utility: +.P +.RS 2 +.nf +$ semver \-h + +Usage: semver [ [\.\.\.]] [\-r | \-i | \-\-preid | \-l | \-rv] +Test if version(s) satisfy the supplied range(s), and sort them\. + +Multiple versions or ranges may be supplied, unless increment +option is specified\. In that case, only a single version may +be used, and it is incremented by the specified level + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions\. + +If no versions are valid, or ranges are not satisfied, +then exits failure\. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them\. +.fi +.RE +.SH Versions +.P +A "version" is described by the \fBv2\.0\.0\fP specification found at +http://semver\.org/\|\. +.P +A leading \fB"="\fP or \fB"v"\fP character is stripped off and ignored\. +.SH Ranges +.P +A \fBversion range\fP is a set of \fBcomparators\fP which specify versions +that satisfy the range\. +.P +A \fBcomparator\fP is composed of an \fBoperator\fP and a \fBversion\fP\|\. The set +of primitive \fBoperators\fP is: +.RS 0 +.IP \(bu 2 +\fB<\fP Less than +.IP \(bu 2 +\fB<=\fP Less than or equal to +.IP \(bu 2 +\fB>\fP Greater than +.IP \(bu 2 +\fB>=\fP Greater than or equal to +.IP \(bu 2 +\fB=\fP Equal\. If no operator is specified, then equality is assumed, +so this operator is optional, but MAY be included\. + +.RE +.P +For example, the comparator \fB>=1\.2\.7\fP would match the versions +\fB1\.2\.7\fP, \fB1\.2\.8\fP, \fB2\.5\.3\fP, and \fB1\.3\.9\fP, but not the versions \fB1\.2\.6\fP +or \fB1\.1\.0\fP\|\. +.P +Comparators can be joined by whitespace to form a \fBcomparator set\fP, +which is satisfied by the \fBintersection\fR of all of the comparators +it includes\. +.P +A range is composed of one or more comparator sets, joined by \fB||\fP\|\. A +version matches a range if and only if every comparator in at least +one of the \fB||\fP\-separated comparator sets is satisfied by the version\. +.P +For example, the range \fB>=1\.2\.7 <1\.3\.0\fP would match the versions +\fB1\.2\.7\fP, \fB1\.2\.8\fP, and \fB1\.2\.99\fP, but not the versions \fB1\.2\.6\fP, \fB1\.3\.0\fP, +or \fB1\.1\.0\fP\|\. +.P +The range \fB1\.2\.7 || >=1\.2\.9 <2\.0\.0\fP would match the versions \fB1\.2\.7\fP, +\fB1\.2\.9\fP, and \fB1\.4\.6\fP, but not the versions \fB1\.2\.8\fP or \fB2\.0\.0\fP\|\. +.SS Prerelease Tags +.P +If a version has a prerelease tag (for example, \fB1\.2\.3\-alpha\.3\fP) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same \fB[major, minor, patch]\fP tuple also has a +prerelease tag\. +.P +For example, the range \fB>1\.2\.3\-alpha\.3\fP would be allowed to match the +version \fB1\.2\.3\-alpha\.7\fP, but it would \fInot\fR be satisfied by +\fB3\.4\.5\-alpha\.9\fP, even though \fB3\.4\.5\-alpha\.9\fP is technically "greater +than" \fB1\.2\.3\-alpha\.3\fP according to the SemVer sort rules\. The version +range only accepts prerelease tags on the \fB1\.2\.3\fP version\. The +version \fB3\.4\.5\fP \fIwould\fR satisfy the range, because it does not have a +prerelease flag, and \fB3\.4\.5\fP is greater than \fB1\.2\.3\-alpha\.7\fP\|\. +.P +The purpose for this behavior is twofold\. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption\. +Therefore, by default, they are excluded from range matching +semantics\. +.P +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use \fIthat specific\fR set of +alpha/beta/rc versions\. By including a prerelease tag in the range, +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 \fInext\fR set of prerelease versions\. +.SS Prerelease Identifiers +.P +The method \fB\|\.inc\fP takes an additional \fBidentifier\fP string argument that +will append the value of the string as a prerelease identifier: +.P +.RS 2 +.nf +> semver\.inc('1\.2\.3', 'prerelease', 'beta') +\|'1\.2\.4\-beta\.0' +.fi +.RE +.P +command\-line example: +.P +.RS 2 +.nf +$ semver 1\.2\.3 \-i prerelease \-\-preid beta +1\.2\.4\-beta\.0 +.fi +.RE +.P +Which then can be used to increment further: +.P +.RS 2 +.nf +$ semver 1\.2\.4\-beta\.0 \-i prerelease +1\.2\.4\-beta\.1 +.fi +.RE +.SS Advanced Range Syntax +.P +Advanced range syntax desugars to primitive comparators in +deterministic ways\. +.P +Advanced ranges may be combined in the same way as primitive +comparators using white space or \fB||\fP\|\. +.SS Hyphen Ranges \fBX\.Y\.Z \- A\.B\.C\fP +.P +Specifies an inclusive set\. +.RS 0 +.IP \(bu 2 +\fB1\.2\.3 \- 2\.3\.4\fP := \fB>=1\.2\.3 <=2\.3\.4\fP + +.RE +.P +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes\. +.RS 0 +.IP \(bu 2 +\fB1\.2 \- 2\.3\.4\fP := \fB>=1\.2\.0 <=2\.3\.4\fP + +.RE +.P +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts\. +.RS 0 +.IP \(bu 2 +\fB1\.2\.3 \- 2\.3\fP := \fB>=1\.2\.3 <2\.4\.0\fP +.IP \(bu 2 +\fB1\.2\.3 \- 2\fP := \fB>=1\.2\.3 <3\.0\.0\fP + +.RE +.SS X\-Ranges \fB1\.2\.x\fP \fB1\.X\fP \fB1\.2\.*\fP \fB*\fP +.P +Any of \fBX\fP, \fBx\fP, or \fB*\fP may be used to "stand in" for one of the +numeric values in the \fB[major, minor, patch]\fP tuple\. +.RS 0 +.IP \(bu 2 +\fB*\fP := \fB>=0\.0\.0\fP (Any version satisfies) +.IP \(bu 2 +\fB1\.x\fP := \fB>=1\.0\.0 <2\.0\.0\fP (Matching major version) +.IP \(bu 2 +\fB1\.2\.x\fP := \fB>=1\.2\.0 <1\.3\.0\fP (Matching major and minor versions) + +.RE +.P +A partial version range is treated as an X\-Range, so the special +character is in fact optional\. +.RS 0 +.IP \(bu 2 +\fB""\fP (empty string) := \fB*\fP := \fB>=0\.0\.0\fP +.IP \(bu 2 +\fB1\fP := \fB1\.x\.x\fP := \fB>=1\.0\.0 <2\.0\.0\fP +.IP \(bu 2 +\fB1\.2\fP := \fB1\.2\.x\fP := \fB>=1\.2\.0 <1\.3\.0\fP + +.RE +.SS Tilde Ranges \fB~1\.2\.3\fP \fB~1\.2\fP \fB~1\fP +.P +Allows patch\-level changes if a minor version is specified on the +comparator\. Allows minor\-level changes if not\. +.RS 0 +.IP \(bu 2 +\fB~1\.2\.3\fP := \fB>=1\.2\.3 <1\.(2+1)\.0\fP := \fB>=1\.2\.3 <1\.3\.0\fP +.IP \(bu 2 +\fB~1\.2\fP := \fB>=1\.2\.0 <1\.(2+1)\.0\fP := \fB>=1\.2\.0 <1\.3\.0\fP (Same as \fB1\.2\.x\fP) +.IP \(bu 2 +\fB~1\fP := \fB>=1\.0\.0 <(1+1)\.0\.0\fP := \fB>=1\.0\.0 <2\.0\.0\fP (Same as \fB1\.x\fP) +.IP \(bu 2 +\fB~0\.2\.3\fP := \fB>=0\.2\.3 <0\.(2+1)\.0\fP := \fB>=0\.2\.3 <0\.3\.0\fP +.IP \(bu 2 +\fB~0\.2\fP := \fB>=0\.2\.0 <0\.(2+1)\.0\fP := \fB>=0\.2\.0 <0\.3\.0\fP (Same as \fB0\.2\.x\fP) +.IP \(bu 2 +\fB~0\fP := \fB>=0\.0\.0 <(0+1)\.0\.0\fP := \fB>=0\.0\.0 <1\.0\.0\fP (Same as \fB0\.x\fP) +.IP \(bu 2 +\fB~1\.2\.3\-beta\.2\fP := \fB>=1\.2\.3\-beta\.2 <1\.3\.0\fP Note that prereleases in +the \fB1\.2\.3\fP version will be allowed, if they are greater than or +equal to \fBbeta\.2\fP\|\. So, \fB1\.2\.3\-beta\.4\fP would be allowed, but +\fB1\.2\.4\-beta\.2\fP would not, because it is a prerelease of a +different \fB[major, minor, patch]\fP tuple\. + +.RE +.SS Caret Ranges \fB^1\.2\.3\fP \fB^0\.2\.5\fP \fB^0\.0\.4\fP +.P +Allows changes that do not modify the left\-most non\-zero digit in the +\fB[major, minor, patch]\fP tuple\. In other words, this allows patch and +minor updates for versions \fB1\.0\.0\fP and above, patch updates for +versions \fB0\.X >=0\.1\.0\fP, and \fIno\fR updates for versions \fB0\.0\.X\fP\|\. +.P +Many authors treat a \fB0\.x\fP version as if the \fBx\fP were the major +"breaking\-change" indicator\. +.P +Caret ranges are ideal when an author may make breaking changes +between \fB0\.2\.4\fP and \fB0\.3\.0\fP releases, which is a common practice\. +However, it presumes that there will \fInot\fR be breaking changes between +\fB0\.2\.4\fP and \fB0\.2\.5\fP\|\. It allows for changes that are presumed to be +additive (but non\-breaking), according to commonly observed practices\. +.RS 0 +.IP \(bu 2 +\fB^1\.2\.3\fP := \fB>=1\.2\.3 <2\.0\.0\fP +.IP \(bu 2 +\fB^0\.2\.3\fP := \fB>=0\.2\.3 <0\.3\.0\fP +.IP \(bu 2 +\fB^0\.0\.3\fP := \fB>=0\.0\.3 <0\.0\.4\fP +.IP \(bu 2 +\fB^1\.2\.3\-beta\.2\fP := \fB>=1\.2\.3\-beta\.2 <2\.0\.0\fP Note that prereleases in +the \fB1\.2\.3\fP version will be allowed, if they are greater than or +equal to \fBbeta\.2\fP\|\. So, \fB1\.2\.3\-beta\.4\fP would be allowed, but +\fB1\.2\.4\-beta\.2\fP would not, because it is a prerelease of a +different \fB[major, minor, patch]\fP tuple\. +.IP \(bu 2 +\fB^0\.0\.3\-beta\fP := \fB>=0\.0\.3\-beta <0\.0\.4\fP Note that prereleases in the +\fB0\.0\.3\fP version \fIonly\fR will be allowed, if they are greater than or +equal to \fBbeta\fP\|\. So, \fB0\.0\.3\-pr\.2\fP would be allowed\. + +.RE +.P +When parsing caret ranges, a missing \fBpatch\fP value desugars to the +number \fB0\fP, but will allow flexibility within that value, even if the +major and minor versions are both \fB0\fP\|\. +.RS 0 +.IP \(bu 2 +\fB^1\.2\.x\fP := \fB>=1\.2\.0 <2\.0\.0\fP +.IP \(bu 2 +\fB^0\.0\.x\fP := \fB>=0\.0\.0 <0\.1\.0\fP +.IP \(bu 2 +\fB^0\.0\fP := \fB>=0\.0\.0 <0\.1\.0\fP + +.RE +.P +A missing \fBminor\fP and \fBpatch\fP values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero\. +.RS 0 +.IP \(bu 2 +\fB^1\.x\fP := \fB>=1\.0\.0 <2\.0\.0\fP +.IP \(bu 2 +\fB^0\.x\fP := \fB>=0\.0\.0 <1\.0\.0\fP + +.RE +.SS Range Grammar +.P +Putting all this together, here is a Backus\-Naur grammar for ranges, +for the benefit of parser authors: +.P +.RS 2 +.nf +range\-set ::= range ( logical\-or range ) * +logical\-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' \- ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '\.' xr ( '\.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'\-'9']['0'\-'9']+ +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '\-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '\.' part ) * +part ::= nr | [\-0\-9A\-Za\-z]+ +.fi +.RE +.SH Functions +.P +All methods and classes take a final \fBloose\fP boolean argument that, if +true, will be more forgiving about not\-quite\-valid semver strings\. +The resulting output will always be 100% strict, of course\. +.P +Strict\-mode Comparators and Ranges will be strict about the SemVer +strings that they parse\. +.RS 0 +.IP \(bu 2 +\fBvalid(v)\fP: Return the parsed version, or null if it's not valid\. +.IP \(bu 2 +\fBinc(v, release)\fP: Return the version incremented by the release +type (\fBmajor\fP, \fBpremajor\fP, \fBminor\fP, \fBpreminor\fP, \fBpatch\fP, +\fBprepatch\fP, or \fBprerelease\fP), or null if it's not valid +.RS 0 +.IP \(bu 2 +\fBpremajor\fP in one call will bump the version up to the next major +version and down to a prerelease of that major version\. +\fBpreminor\fP, and \fBprepatch\fP work the same way\. +.IP \(bu 2 +If called from a non\-prerelease version, the \fBprerelease\fP will work the +same as \fBprepatch\fP\|\. It increments the patch version, then makes a +prerelease\. If the input version is already a prerelease it simply +increments it\. + +.RE +.IP \(bu 2 +\fBmajor(v)\fP: Return the major version number\. +.IP \(bu 2 +\fBminor(v)\fP: Return the minor version number\. +.IP \(bu 2 +\fBpatch(v)\fP: Return the patch version number\. + +.RE +.SS Comparison +.RS 0 +.IP \(bu 2 +\fBgt(v1, v2)\fP: \fBv1 > v2\fP +.IP \(bu 2 +\fBgte(v1, v2)\fP: \fBv1 >= v2\fP +.IP \(bu 2 +\fBlt(v1, v2)\fP: \fBv1 < v2\fP +.IP \(bu 2 +\fBlte(v1, v2)\fP: \fBv1 <= v2\fP +.IP \(bu 2 +\fBeq(v1, v2)\fP: \fBv1 == v2\fP This is true if they're logically equivalent, +even if they're not the exact same string\. You already know how to +compare strings\. +.IP \(bu 2 +\fBneq(v1, v2)\fP: \fBv1 != v2\fP The opposite of \fBeq\fP\|\. +.IP \(bu 2 +\fBcmp(v1, comparator, v2)\fP: Pass in a comparison string, and it'll call +the corresponding function above\. \fB"==="\fP and \fB"!=="\fP do simple +string comparison, but are included for completeness\. Throws if an +invalid comparison string is provided\. +.IP \(bu 2 +\fBcompare(v1, v2)\fP: Return \fB0\fP if \fBv1 == v2\fP, or \fB1\fP if \fBv1\fP is greater, or \fB\-1\fP if +\fBv2\fP is greater\. Sorts in ascending order if passed to \fBArray\.sort()\fP\|\. +.IP \(bu 2 +\fBrcompare(v1, v2)\fP: The reverse of compare\. Sorts an array of versions +in descending order when passed to \fBArray\.sort()\fP\|\. +.IP \(bu 2 +\fBdiff(v1, v2)\fP: Returns difference between two versions by the release type +(\fBmajor\fP, \fBpremajor\fP, \fBminor\fP, \fBpreminor\fP, \fBpatch\fP, \fBprepatch\fP, or \fBprerelease\fP), +or null if the versions are the same\. + +.RE +.SS Ranges +.RS 0 +.IP \(bu 2 +\fBvalidRange(range)\fP: Return the valid range or null if it's not valid +.IP \(bu 2 +\fBsatisfies(version, range)\fP: Return true if the version satisfies the +range\. +.IP \(bu 2 +\fBmaxSatisfying(versions, range)\fP: Return the highest version in the list +that satisfies the range, or \fBnull\fP if none of them do\. +.IP \(bu 2 +\fBgtr(version, range)\fP: Return \fBtrue\fP if version is greater than all the +versions possible in the range\. +.IP \(bu 2 +\fBltr(version, range)\fP: Return \fBtrue\fP if version is less than all the +versions possible in the range\. +.IP \(bu 2 +\fBoutside(version, range, hilo)\fP: Return true if the version is outside +the bounds of the range in either the high or low direction\. The +\fBhilo\fP argument must be either the string \fB\|'>'\fP or \fB\|'<'\fP\|\. (This is +the function called by \fBgtr\fP and \fBltr\fP\|\.) + +.RE +.P +Note that, since ranges may be non\-contiguous, a version might not be +greater than a range, less than a range, \fIor\fR satisfy a range! For +example, the range \fB1\.2 <1\.2\.9 || >2\.0\.0\fP would have a hole from \fB1\.2\.9\fP +until \fB2\.0\.0\fP, so the version \fB1\.2\.10\fP would not be greater than the +range (because \fB2\.0\.1\fP satisfies, which is higher), nor less than the +range (since \fB1\.2\.8\fP satisfies, which is lower), and it also does not +satisfy the range\. +.P +If you want to know if a version satisfies or does not satisfy a +range, use the \fBsatisfies(version, range)\fP function\. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/.npmignore new file mode 100644 index 00000000..056d8e62 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/.npmignore @@ -0,0 +1,4 @@ +.nyc_output +nyc_output +node_modules +coverage diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/.travis.yml new file mode 100644 index 00000000..379f2614 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - '0.10' + - '0.12' + - 'iojs' diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/CONTRIBUTING.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/CONTRIBUTING.md new file mode 100644 index 00000000..a8d1a3d1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/CONTRIBUTING.md @@ -0,0 +1,3 @@ + To get started, sign the + Contributor License Agreement. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/README.md new file mode 100644 index 00000000..7dbb6485 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/README.md @@ -0,0 +1,23 @@ +# abbrev-js + +Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). + +Usage: + + var abbrev = require("abbrev"); + abbrev("foo", "fool", "folding", "flop"); + + // returns: + { fl: 'flop' + , flo: 'flop' + , flop: 'flop' + , fol: 'folding' + , fold: 'folding' + , foldi: 'folding' + , foldin: 'folding' + , folding: 'folding' + , foo: 'foo' + , fool: 'fool' + } + +This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/abbrev.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/abbrev.js new file mode 100644 index 00000000..e64fe7dc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/abbrev.js @@ -0,0 +1,62 @@ + +module.exports = exports = abbrev.abbrev = abbrev + +abbrev.monkeyPatch = monkeyPatch + +function monkeyPatch () { + Object.defineProperty(Array.prototype, 'abbrev', { + value: function () { return abbrev(this) }, + enumerable: false, configurable: true, writable: true + }) + + Object.defineProperty(Object.prototype, 'abbrev', { + value: function () { return abbrev(Object.keys(this)) }, + enumerable: false, configurable: true, writable: true + }) +} + +function abbrev (list) { + if (arguments.length !== 1 || !Array.isArray(list)) { + list = Array.prototype.slice.call(arguments, 0) + } + for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { + args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) + } + + // sort them lexicographically, so that they're next to their nearest kin + args = args.sort(lexSort) + + // walk through each, seeing how much it has in common with the next and previous + var abbrevs = {} + , prev = "" + for (var i = 0, l = args.length ; i < l ; i ++) { + var current = args[i] + , next = args[i + 1] || "" + , nextMatches = true + , prevMatches = true + if (current === next) continue + for (var j = 0, cl = current.length ; j < cl ; j ++) { + var curChar = current.charAt(j) + nextMatches = nextMatches && curChar === next.charAt(j) + prevMatches = prevMatches && curChar === prev.charAt(j) + if (!nextMatches && !prevMatches) { + j ++ + break + } + } + prev = current + if (j === cl) { + abbrevs[current] = current + continue + } + for (var a = current.substr(0, j) ; j <= cl ; j ++) { + abbrevs[a] = current + a += current.charAt(j) + } + } + return abbrevs +} + +function lexSort (a, b) { + return a === b ? 0 : a > b ? 1 : -1 +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/package.json new file mode 100644 index 00000000..e51879a3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/package.json @@ -0,0 +1,47 @@ +{ + "name": "abbrev", + "version": "1.0.7", + "description": "Like ruby's abbrev module, but in js", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "main": "abbrev.js", + "scripts": { + "test": "tap test.js --cov" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" + }, + "license": "ISC", + "devDependencies": { + "tap": "^1.2.0" + }, + "gitHead": "821d09ce7da33627f91bbd8ed631497ed6f760c2", + "bugs": { + "url": "https://github.com/isaacs/abbrev-js/issues" + }, + "homepage": "https://github.com/isaacs/abbrev-js#readme", + "_id": "abbrev@1.0.7", + "_shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843", + "_from": "abbrev@>=1.0.7 <1.1.0", + "_npmVersion": "2.10.1", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843", + "tarball": "http://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/test.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/test.js new file mode 100644 index 00000000..f667df7a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/abbrev/test.js @@ -0,0 +1,47 @@ +var abbrev = require('./abbrev.js') +var assert = require("assert") +var util = require("util") + +console.log("TAP version 13") +var count = 0 + +function test (list, expect) { + count++ + var actual = abbrev(list) + assert.deepEqual(actual, expect, + "abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+ + "actual: "+util.inspect(actual)) + actual = abbrev.apply(exports, list) + assert.deepEqual(abbrev.apply(exports, list), expect, + "abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+ + "actual: "+util.inspect(actual)) + console.log('ok - ' + list.join(' ')) +} + +test([ "ruby", "ruby", "rules", "rules", "rules" ], +{ rub: 'ruby' +, ruby: 'ruby' +, rul: 'rules' +, rule: 'rules' +, rules: 'rules' +}) +test(["fool", "foom", "pool", "pope"], +{ fool: 'fool' +, foom: 'foom' +, poo: 'pool' +, pool: 'pool' +, pop: 'pope' +, pope: 'pope' +}) +test(["a", "ab", "abc", "abcd", "abcde", "acde"], +{ a: 'a' +, ab: 'ab' +, abc: 'abc' +, abcd: 'abcd' +, abcde: 'abcde' +, ac: 'acde' +, acd: 'acde' +, acde: 'acde' +}) + +console.log("1..%d", count) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/index.js new file mode 100644 index 00000000..cf8f4d44 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; +}; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/license b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/license new file mode 100644 index 00000000..d70e4cd6 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/package.json new file mode 100644 index 00000000..f652d1f7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/package.json @@ -0,0 +1,86 @@ +{ + "name": "ansi-regex", + "version": "2.0.0", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/ansi-regex.git" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha test/test.js", + "view-supported": "node test/viewCodes.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "mocha": "*" + }, + "gitHead": "57c3f2941a73079fa8b081e02a522e3d29913e2f", + "bugs": { + "url": "https://github.com/sindresorhus/ansi-regex/issues" + }, + "homepage": "https://github.com/sindresorhus/ansi-regex", + "_id": "ansi-regex@2.0.0", + "_shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107", + "_from": "ansi-regex@2.0.0", + "_npmVersion": "2.11.2", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "dist": { + "shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107", + "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/readme.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/readme.md new file mode 100644 index 00000000..2184036f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi-regex/readme.md @@ -0,0 +1,31 @@ +# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +var ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/.jshintrc b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/.jshintrc new file mode 100644 index 00000000..6d7a1282 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/.jshintrc @@ -0,0 +1,4 @@ +{ + "laxcomma": true, + "asi": true +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/.npmignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/History.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/History.md new file mode 100644 index 00000000..dbb509ba --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/History.md @@ -0,0 +1,23 @@ + +0.3.1 / 2016-01-14 +================== + + * add MIT LICENSE file (#23, @kasicka) + * preserve chaining after redundant style-method calls (#19, @drewblaisdell) + * package: add "license" field (#16, @BenjaminTsai) + +0.3.0 / 2014-05-09 +================== + + * package: remove "test" script and "devDependencies" + * package: remove "engines" section + * pacakge: remove "bin" section + * package: beautify + * examples: remove `starwars` example (#15) + * Documented goto, horizontalAbsolute, and eraseLine methods in README.md (#12, @Jammerwoch) + * add `.jshintrc` file + +< 0.3.0 +======= + + * Prehistoric diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/LICENSE new file mode 100644 index 00000000..142bd098 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/README.md new file mode 100644 index 00000000..bf2a1cb6 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/README.md @@ -0,0 +1,98 @@ +ansi.js +========= +### Advanced ANSI formatting tool for Node.js + +`ansi.js` is a module for Node.js that provides an easy-to-use API for +writing ANSI escape codes to `Stream` instances. ANSI escape codes are used to do +fancy things in a terminal window, like render text in colors, delete characters, +lines, the entire window, or hide and show the cursor, and lots more! + +#### Features: + + * 256 color support for the terminal! + * Make a beep sound from your terminal! + * Works with *any* writable `Stream` instance. + * Allows you to move the cursor anywhere on the terminal window. + * Allows you to delete existing contents from the terminal window. + * Allows you to hide and show the cursor. + * Converts CSS color codes and RGB values into ANSI escape codes. + * Low-level; you are in control of when escape codes are used, it's not abstracted. + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install ansi +``` + + +Example +------- + +``` js +var ansi = require('ansi') + , cursor = ansi(process.stdout) + +// You can chain your calls forever: +cursor + .red() // Set font color to red + .bg.grey() // Set background color to grey + .write('Hello World!') // Write 'Hello World!' to stdout + .bg.reset() // Reset the bgcolor before writing the trailing \n, + // to avoid Terminal glitches + .write('\n') // And a final \n to wrap things up + +// Rendering modes are persistent: +cursor.hex('#660000').bold().underline() + +// You can use the regular logging functions, text will be green: +console.log('This is blood red, bold text') + +// To reset just the foreground color: +cursor.fg.reset() + +console.log('This will still be bold') + +// to go to a location (x,y) on the console +// note: 1-indexed, not 0-indexed: +cursor.goto(10, 5).write('Five down, ten over') + +// to clear the current line: +cursor.horizontalAbsolute(0).eraseLine().write('Starting again') + +// to go to a different column on the current line: +cursor.horizontalAbsolute(5).write('column five') + +// Clean up after yourself! +cursor.reset() +``` + + +License +------- + +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/package.json new file mode 100644 index 00000000..2c7858b6 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansi/package.json @@ -0,0 +1,58 @@ +{ + "name": "ansi", + "description": "Advanced ANSI formatting tool for Node.js", + "license": "MIT", + "keywords": [ + "ansi", + "formatting", + "cursor", + "color", + "terminal", + "rgb", + "256", + "stream" + ], + "version": "0.3.1", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://tootallnate.net" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/ansi.js.git" + }, + "main": "./lib/ansi.js", + "gitHead": "4d0d4af94e0bdaa648bd7262acd3bde4b98d5246", + "bugs": { + "url": "https://github.com/TooTallNate/ansi.js/issues" + }, + "homepage": "https://github.com/TooTallNate/ansi.js#readme", + "_id": "ansi@0.3.1", + "scripts": {}, + "_shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21", + "_from": "ansi@latest", + "_npmVersion": "3.3.12", + "_nodeVersion": "5.3.0", + "_npmUser": { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + "maintainers": [ + { + "name": "TooTallNate", + "email": "nathan@tootallnate.net" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "dist": { + "shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21", + "tarball": "http://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/LICENSE new file mode 100644 index 00000000..aa9368a7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/README.md new file mode 100644 index 00000000..10a7f9c3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/README.md @@ -0,0 +1,62 @@ +# ansicolors [![build status](https://secure.travis-ci.org/thlorenz/ansicolors.png)](http://next.travis-ci.org/thlorenz/ansicolors) + +Functions that surround a string with ansicolor codes so it prints in color. + +In case you need styles, like `bold`, have a look at [ansistyles](https://github.com/thlorenz/ansistyles). + +## Installation + + npm install ansicolors + +## Usage + +```js +var colors = require('ansicolors'); + +// foreground colors +var redHerring = colors.red('herring'); +var blueMoon = colors.blue('moon'); +var brighBlueMoon = colors.brightBlue('moon'); + +console.log(redHerring); // this will print 'herring' in red +console.log(blueMoon); // this 'moon' in blue +console.log(brightBlueMoon); // I think you got the idea + +// background colors +console.log(colors.bgYellow('printed on yellow background')); +console.log(colors.bgBrightBlue('printed on bright blue background')); + +// mixing background and foreground colors +// below two lines have same result (order in which bg and fg are combined doesn't matter) +console.log(colors.bgYellow(colors.blue('printed on yellow background in blue'))); +console.log(colors.blue(colors.bgYellow('printed on yellow background in blue'))); +``` + +## Advanced API + +**ansicolors** allows you to access opening and closing escape sequences separately. + +```js +var colors = require('ansicolors'); + +function inspect(obj, depth) { + return require('util').inspect(obj, false, depth || 5, true); +} + +console.log('open blue', inspect(colors.open.blue)); +console.log('close bgBlack', inspect(colors.close.bgBlack)); + +// => open blue '\u001b[34m' +// close bgBlack '\u001b[49m' +``` + +## Tests + +Look at the [tests](https://github.com/thlorenz/ansicolors/blob/master/test/ansicolors.js) to see more examples and/or run them via: + + npm explore ansicolors && npm test + +## Alternatives + +**ansicolors** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, +I'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js). diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/ansicolors.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/ansicolors.js new file mode 100644 index 00000000..995645f9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/ansicolors.js @@ -0,0 +1,65 @@ +// ColorCodes explained: http://www.termsys.demon.co.uk/vtansi.htm +'use strict'; + +var colorNums = { + white : 37 + , black : 30 + , blue : 34 + , cyan : 36 + , green : 32 + , magenta : 35 + , red : 31 + , yellow : 33 + , brightBlack : 90 + , brightRed : 91 + , brightGreen : 92 + , brightYellow : 93 + , brightBlue : 94 + , brightMagenta : 95 + , brightCyan : 96 + , brightWhite : 97 + } + , backgroundColorNums = { + bgBlack : 40 + , bgRed : 41 + , bgGreen : 42 + , bgYellow : 43 + , bgBlue : 44 + , bgMagenta : 45 + , bgCyan : 46 + , bgWhite : 47 + , bgBrightBlack : 100 + , bgBrightRed : 101 + , bgBrightGreen : 102 + , bgBrightYellow : 103 + , bgBrightBlue : 104 + , bgBrightMagenta : 105 + , bgBrightCyan : 106 + , bgBrightWhite : 107 + } + , open = {} + , close = {} + , colors = {} + ; + +Object.keys(colorNums).forEach(function (k) { + var o = open[k] = '\u001b[' + colorNums[k] + 'm'; + var c = close[k] = '\u001b[39m'; + + colors[k] = function (s) { + return o + s + c; + }; +}); + +Object.keys(backgroundColorNums).forEach(function (k) { + var o = open[k] = '\u001b[' + backgroundColorNums[k] + 'm'; + var c = close[k] = '\u001b[49m'; + + colors[k] = function (s) { + return o + s + c; + }; +}); + +module.exports = colors; +colors.open = open; +colors.close = close; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/package.json new file mode 100644 index 00000000..3955b17d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansicolors/package.json @@ -0,0 +1,34 @@ +{ + "name": "ansicolors", + "version": "0.3.2", + "description": "Functions that surround a string with ansicolor codes so it prints in color.", + "main": "ansicolors.js", + "scripts": { + "test": "node test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/ansicolors.git" + }, + "keywords": [ + "ansi", + "colors", + "highlight", + "string" + ], + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "thlorenz.com" + }, + "license": "MIT", + "readmeFilename": "README.md", + "gitHead": "858847ca28e8b360d9b70eee0592700fa2ab087d", + "readme": "# ansicolors [![build status](https://secure.travis-ci.org/thlorenz/ansicolors.png)](http://next.travis-ci.org/thlorenz/ansicolors)\n\nFunctions that surround a string with ansicolor codes so it prints in color.\n\nIn case you need styles, like `bold`, have a look at [ansistyles](https://github.com/thlorenz/ansistyles).\n\n## Installation\n\n npm install ansicolors\n\n## Usage\n\n```js\nvar colors = require('ansicolors');\n\n// foreground colors\nvar redHerring = colors.red('herring');\nvar blueMoon = colors.blue('moon');\nvar brighBlueMoon = colors.brightBlue('moon');\n\nconsole.log(redHerring); // this will print 'herring' in red\nconsole.log(blueMoon); // this 'moon' in blue\nconsole.log(brightBlueMoon); // I think you got the idea\n\n// background colors\nconsole.log(colors.bgYellow('printed on yellow background'));\nconsole.log(colors.bgBrightBlue('printed on bright blue background'));\n\n// mixing background and foreground colors\n// below two lines have same result (order in which bg and fg are combined doesn't matter)\nconsole.log(colors.bgYellow(colors.blue('printed on yellow background in blue')));\nconsole.log(colors.blue(colors.bgYellow('printed on yellow background in blue')));\n```\n\n## Advanced API\n\n**ansicolors** allows you to access opening and closing escape sequences separately.\n\n```js\nvar colors = require('ansicolors');\n\nfunction inspect(obj, depth) {\n return require('util').inspect(obj, false, depth || 5, true);\n}\n\nconsole.log('open blue', inspect(colors.open.blue));\nconsole.log('close bgBlack', inspect(colors.close.bgBlack));\n\n// => open blue '\\u001b[34m'\n// close bgBlack '\\u001b[49m'\n```\n\n## Tests\n\nLook at the [tests](https://github.com/thlorenz/ansicolors/blob/master/test/ansicolors.js) to see more examples and/or run them via: \n\n npm explore ansicolors && npm test\n\n## Alternatives\n\n**ansicolors** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, \nI'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js).\n", + "bugs": { + "url": "https://github.com/thlorenz/ansicolors/issues" + }, + "homepage": "https://github.com/thlorenz/ansicolors", + "_id": "ansicolors@0.3.2", + "_from": "ansicolors@latest" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/LICENSE new file mode 100644 index 00000000..aa9368a7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/README.md new file mode 100644 index 00000000..bf35d178 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/README.md @@ -0,0 +1,71 @@ +# ansistyles [![build status](https://secure.travis-ci.org/thlorenz/ansistyles.png)](http://next.travis-ci.org/thlorenz/ansistyles) + +Functions that surround a string with ansistyle codes so it prints in style. + +In case you need colors, like `red`, have a look at [ansicolors](https://github.com/thlorenz/ansicolors). + +## Installation + + npm install ansistyles + +## Usage + +```js +var styles = require('ansistyles'); + +console.log(styles.bright('hello world')); // prints hello world in 'bright' white +console.log(styles.underline('hello world')); // prints hello world underlined +console.log(styles.inverse('hello world')); // prints hello world black on white +``` + +## Combining with ansicolors + +Get the ansicolors module: + + npm install ansicolors + +```js +var styles = require('ansistyles') + , colors = require('ansicolors'); + + console.log( + // prints hello world underlined in blue on a green background + colors.bgGreen(colors.blue(styles.underline('hello world'))) + ); +``` + +## Tests + +Look at the [tests](https://github.com/thlorenz/ansistyles/blob/master/test/ansistyles.js) to see more examples and/or run them via: + + npm explore ansistyles && npm test + +## More Styles + +As you can see from [here](https://github.com/thlorenz/ansistyles/blob/master/ansistyles.js#L4-L15), more styles are available, +but didn't have any effect on the terminals that I tested on Mac Lion and Ubuntu Linux. + +I included them for completeness, but didn't show them in the examples because they seem to have no effect. + +### reset + +A style reset function is also included, please note however that this is not nestable. + +Therefore the below only underlines `hell` only, but not `world`. + +```js +console.log(styles.underline('hell' + styles.reset('o') + ' world')); +``` + +It is essentially the same as: + +```js +console.log(styles.underline('hell') + styles.reset('') + 'o world'); +``` + + + +## Alternatives + +**ansistyles** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, +I'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js). diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/ansistyles.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/ansistyles.js new file mode 100644 index 00000000..607332ec --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/ansistyles.js @@ -0,0 +1,38 @@ +'use strict'; + +/* + * Info: http://www.termsys.demon.co.uk/vtansi.htm#colors + * Following caveats + * bright - brightens the color (bold-blue is same as brigthtBlue) + * dim - nothing on Mac or Linux + * italic - nothing on Mac or Linux + * underline - underlines string + * blink - nothing on Mac or linux + * inverse - background becomes foreground and vice versa + * + * In summary, the only styles that work are: + * - bright, underline and inverse + * - the others are only included for completeness + */ + +var styleNums = { + reset : [0, 22] + , bright : [1, 22] + , dim : [2, 22] + , italic : [3, 23] + , underline : [4, 24] + , blink : [5, 25] + , inverse : [7, 27] + } + , styles = {} + ; + +Object.keys(styleNums).forEach(function (k) { + styles[k] = function (s) { + var open = styleNums[k][0] + , close = styleNums[k][1]; + return '\u001b[' + open + 'm' + s + '\u001b[' + close + 'm'; + }; +}); + +module.exports = styles; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/package.json new file mode 100644 index 00000000..dd02ef7f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ansistyles/package.json @@ -0,0 +1,38 @@ +{ + "name": "ansistyles", + "version": "0.1.3", + "description": "Functions that surround a string with ansistyle codes so it prints in style.", + "main": "ansistyles.js", + "scripts": { + "test": "node test/ansistyles.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/ansistyles.git" + }, + "keywords": [ + "ansi", + "style", + "terminal", + "console" + ], + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "thlorenz.com" + }, + "license": "MIT", + "readmeFilename": "README.md", + "gitHead": "27bf1bc65231bcc7fd109bf13b13601b51f8cd04", + "readme": "# ansistyles [![build status](https://secure.travis-ci.org/thlorenz/ansistyles.png)](http://next.travis-ci.org/thlorenz/ansistyles)\n\nFunctions that surround a string with ansistyle codes so it prints in style.\n\nIn case you need colors, like `red`, have a look at [ansicolors](https://github.com/thlorenz/ansicolors).\n\n## Installation\n\n npm install ansistyles\n\n## Usage\n\n```js\nvar styles = require('ansistyles');\n\nconsole.log(styles.bright('hello world')); // prints hello world in 'bright' white\nconsole.log(styles.underline('hello world')); // prints hello world underlined\nconsole.log(styles.inverse('hello world')); // prints hello world black on white\n```\n\n## Combining with ansicolors\n\nGet the ansicolors module:\n\n npm install ansicolors\n\n```js\nvar styles = require('ansistyles')\n , colors = require('ansicolors');\n\n console.log(\n // prints hello world underlined in blue on a green background\n colors.bgGreen(colors.blue(styles.underline('hello world'))) \n );\n```\n\n## Tests\n\nLook at the [tests](https://github.com/thlorenz/ansistyles/blob/master/test/ansistyles.js) to see more examples and/or run them via: \n\n npm explore ansistyles && npm test\n\n## More Styles\n\nAs you can see from [here](https://github.com/thlorenz/ansistyles/blob/master/ansistyles.js#L4-L15), more styles are available,\nbut didn't have any effect on the terminals that I tested on Mac Lion and Ubuntu Linux.\n\nI included them for completeness, but didn't show them in the examples because they seem to have no effect.\n\n### reset\n\nA style reset function is also included, please note however that this is not nestable.\n\nTherefore the below only underlines `hell` only, but not `world`.\n\n```js\nconsole.log(styles.underline('hell' + styles.reset('o') + ' world'));\n```\n\nIt is essentially the same as:\n\n```js\nconsole.log(styles.underline('hell') + styles.reset('') + 'o world');\n```\n\n\n\n## Alternatives\n\n**ansistyles** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, \nI'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js).\n", + "bugs": { + "url": "https://github.com/thlorenz/ansistyles/issues" + }, + "homepage": "https://github.com/thlorenz/ansistyles", + "_id": "ansistyles@0.1.3", + "dist": { + "shasum": "b14f315fe763a2b3a88df9d3261a517e666c4615" + }, + "_from": "ansistyles@0.1.3", + "_resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/LICENSE new file mode 100644 index 00000000..c477f448 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/README.markdown b/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/README.markdown new file mode 100644 index 00000000..3b996b91 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/README.markdown @@ -0,0 +1,88 @@ +# archy + +Render nested hierarchies `npm ls` style with unicode pipes. + +[![browser support](http://ci.testling.com/substack/node-archy.png)](http://ci.testling.com/substack/node-archy) + +[![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy) + +# example + +``` js +var archy = require('archy'); +var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party\ntime!' + ] + } + ] +}); +console.log(s); +``` + +output + +``` +beep +├── ity +└─┬ boop + ├─┬ o_O + │ ├─┬ oh + │ │ ├── hello + │ │ └── puny + │ └── human + └── party + time! +``` + +# methods + +var archy = require('archy') + +## archy(obj, prefix='', opts={}) + +Return a string representation of `obj` with unicode pipe characters like how +`npm ls` looks. + +`obj` should be a tree of nested objects with `'label'` and `'nodes'` fields. +`'label'` is a string of text to display at a node level and `'nodes'` is an +array of the descendents of the current node. + +If a node is a string, that string will be used as the `'label'` and an empty +array of `'nodes'` will be used. + +`prefix` gets prepended to all the lines and is used by the algorithm to +recursively update. + +If `'label'` has newlines they will be indented at the present indentation level +with the current prefix. + +To disable unicode results in favor of all-ansi output set `opts.unicode` to +`false`. + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install archy +``` + +# license + +MIT diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/index.js new file mode 100644 index 00000000..039db0c5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/index.js @@ -0,0 +1,35 @@ +module.exports = function archy (obj, prefix, opts) { + if (prefix === undefined) prefix = ''; + if (!opts) opts = {}; + var chr = function (s) { + var chars = { + '│' : '|', + '└' : '`', + '├' : '+', + '─' : '-', + '┬' : '-' + }; + return opts.unicode === false ? chars[s] : s; + }; + + if (typeof obj === 'string') obj = { label : obj }; + + var nodes = obj.nodes || []; + var lines = (obj.label || '').split('\n'); + var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' '; + + return prefix + + lines.join(splitter) + '\n' + + nodes.map(function (node, ix) { + var last = ix === nodes.length - 1; + var more = node.nodes && node.nodes.length; + var prefix_ = prefix + (last ? ' ' : chr('│')) + ' '; + + return prefix + + (last ? chr('└') : chr('├')) + chr('─') + + (more ? chr('┬') : chr('─')) + ' ' + + archy(node, prefix_, opts).slice(prefix.length + 2) + ; + }).join('') + ; +}; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/package.json new file mode 100644 index 00000000..5c4f000c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/archy/package.json @@ -0,0 +1,79 @@ +{ + "name": "archy", + "version": "1.0.0", + "description": "render nested hierarchies `npm ls` style with unicode pipes", + "main": "index.js", + "devDependencies": { + "tap": "~0.3.3", + "tape": "~0.1.1" + }, + "scripts": { + "test": "tap test" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "iexplore": [ + "6.0", + "7.0", + "8.0", + "9.0" + ], + "chrome": [ + "20.0" + ], + "firefox": [ + "10.0", + "15.0" + ], + "safari": [ + "5.1" + ], + "opera": [ + "12.0" + ] + } + }, + "repository": { + "type": "git", + "url": "http://github.com/substack/node-archy.git" + }, + "keywords": [ + "hierarchy", + "npm ls", + "unicode", + "pretty", + "print" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "gitHead": "30223c16191e877bf027b15b12daf077b9b55b84", + "bugs": { + "url": "https://github.com/substack/node-archy/issues" + }, + "homepage": "https://github.com/substack/node-archy", + "_id": "archy@1.0.0", + "_shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40", + "_from": "archy@>=1.0.0 <2.0.0", + "_npmVersion": "1.4.25", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "dist": { + "shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40", + "tarball": "http://registry.npmjs.org/archy/-/archy-1.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/.eslintrc b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/.eslintrc new file mode 100644 index 00000000..8afd0e88 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/.eslintrc @@ -0,0 +1,18 @@ +{ + "env" : { + "node" : true + }, + "rules" : { + "curly" : 0, + "no-lonely-if" : 1, + "no-mixed-requires" : 0, + "no-underscore-dangle" : 0, + "no-unused-vars" : [2, {"vars" : "all", "args" : "after-used"}], + "no-use-before-define" : [2, "nofunc"], + "quotes" : [1, "double", "avoid-escape"], + "semi" : [2, "never"], + "space-after-keywords" : 1, + "space-infix-ops" : 0, + "strict" : 0 + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/.npmignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/LICENSE new file mode 100644 index 00000000..efd5764b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2014-2015, Forrest L Norvell + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/README.md new file mode 100644 index 00000000..d43ba973 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/README.md @@ -0,0 +1,62 @@ +# some + +Short-circuited async Array.prototype.some implementation. + +Serially evaluates a list of values from a JS array or arraylike +against an asynchronous predicate, terminating on the first truthy +value. If the predicate encounters an error, pass it to the completion +callback. Otherwise, pass the truthy value passed by the predicate, or +`false` if no truthy value was passed. + +Is +[Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)-proof, +browser-safe, and pretty efficient. + +## Usage + +```javascript +var some = require("async-some"); +var resolve = require("path").resolve; +var stat = require("fs").stat; +var readFileSync = require("fs").readFileSync; + +some(["apple", "seaweed", "ham", "quince"], porkDetector, function (error, match) { + if (error) return console.error(error); + + if (match) return console.dir(JSON.parse(readFileSync(match))); + + console.error("time to buy more Sporkle™!"); +}); + +var PREFIX = resolve(__dirname, "../pork_store"); +function porkDetector(value, cb) { + var path = resolve(PREFIX, value + ".json"); + stat(path, function (er, stat) { + if (er) { + if (er.code === "ENOENT") return cb(null, false); + + return cb(er); + } + + cb(er, path); + }); +} +``` + +### some(list, test, callback) + +* `list` {Object} An arraylike (either an Array or the arguments arraylike) to + be checked. +* `test` {Function} The predicate against which the elements of `list` will be + tested. Takes two parameters: + * `element` {any} The element of the list to be tested. + * `callback` {Function} The continuation to be called once the test is + complete. Takes (again) two values: + * `error` {Error} Any errors that the predicate encountered. + * `value` {any} A truthy value. A non-falsy result terminates checking the + entire list. +* `callback` {Function} The callback to invoke when either a value has been + found or the entire input list has been processed with no result. Is invoked + with the traditional two parameters: + * `error` {Error} Errors that were encountered during the evaluation of some(). + * `match` {any} Value successfully matched by `test`, if any. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/package.json new file mode 100644 index 00000000..621a235e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/package.json @@ -0,0 +1,41 @@ +{ + "name": "async-some", + "version": "1.0.2", + "description": "short-circuited, asynchronous version of Array.protototype.some", + "main": "some.js", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/othiym23/async-some.git" + }, + "keywords": [ + "async", + "some", + "array", + "collections", + "fp" + ], + "author": { + "name": "Forrest L Norvell", + "email": "ogd@aoaioxxysz.net" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/othiym23/async-some/issues" + }, + "homepage": "https://github.com/othiym23/async-some", + "dependencies": { + "dezalgo": "^1.0.2" + }, + "devDependencies": { + "tap": "^1.1.0" + }, + "readme": "# some\n\nShort-circuited async Array.prototype.some implementation.\n\nSerially evaluates a list of values from a JS array or arraylike\nagainst an asynchronous predicate, terminating on the first truthy\nvalue. If the predicate encounters an error, pass it to the completion\ncallback. Otherwise, pass the truthy value passed by the predicate, or\n`false` if no truthy value was passed.\n\nIs\n[Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)-proof,\nbrowser-safe, and pretty efficient.\n\n## Usage\n\n```javascript\nvar some = require(\"async-some\");\nvar resolve = require(\"path\").resolve;\nvar stat = require(\"fs\").stat;\nvar readFileSync = require(\"fs\").readFileSync;\n\nsome([\"apple\", \"seaweed\", \"ham\", \"quince\"], porkDetector, function (error, match) {\n if (error) return console.error(error);\n\n if (match) return console.dir(JSON.parse(readFileSync(match)));\n\n console.error(\"time to buy more Sporkle™!\");\n});\n\nvar PREFIX = resolve(__dirname, \"../pork_store\");\nfunction porkDetector(value, cb) {\n var path = resolve(PREFIX, value + \".json\");\n stat(path, function (er, stat) {\n if (er) {\n if (er.code === \"ENOENT\") return cb(null, false);\n\n return cb(er);\n }\n\n cb(er, path);\n });\n}\n```\n\n### some(list, test, callback)\n\n* `list` {Object} An arraylike (either an Array or the arguments arraylike) to\n be checked.\n* `test` {Function} The predicate against which the elements of `list` will be\n tested. Takes two parameters:\n * `element` {any} The element of the list to be tested.\n * `callback` {Function} The continuation to be called once the test is\n complete. Takes (again) two values:\n * `error` {Error} Any errors that the predicate encountered.\n * `value` {any} A truthy value. A non-falsy result terminates checking the\n entire list.\n* `callback` {Function} The callback to invoke when either a value has been\n found or the entire input list has been processed with no result. Is invoked\n with the traditional two parameters:\n * `error` {Error} Errors that were encountered during the evaluation of some().\n * `match` {any} Value successfully matched by `test`, if any.\n", + "readmeFilename": "README.md", + "gitHead": "3a5086ad54739c48b2bbf073f23bcc95658199e3", + "_id": "async-some@1.0.2", + "_shasum": "4d8a81620d5958791b5b98f802d3207776e95509", + "_from": "async-some@>=1.0.2 <1.1.0" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/some.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/some.js new file mode 100644 index 00000000..d3a699d4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/async-some/some.js @@ -0,0 +1,47 @@ +var assert = require("assert") +var dezalgoify = require("dezalgo") + +module.exports = some + +/** + * short-circuited async Array.prototype.some implementation + * + * Serially evaluates a list of values from a JS array or arraylike + * against an asynchronous predicate, terminating on the first truthy + * value. If the predicate encounters an error, pass it to the completion + * callback. Otherwise, pass the truthy value passed by the predicate, or + * `false` if no truthy value was passed. + */ +function some (list, test, cb) { + assert("length" in list, "array must be arraylike") + assert.equal(typeof test, "function", "predicate must be callable") + assert.equal(typeof cb, "function", "callback must be callable") + + var array = slice(list) + , index = 0 + , length = array.length + , hecomes = dezalgoify(cb) + + map() + + function map () { + if (index >= length) return hecomes(null, false) + + test(array[index], reduce) + } + + function reduce (er, result) { + if (er) return hecomes(er, false) + if (result) return hecomes(null, result) + + index++ + map() + } +} + +// Array.prototype.slice on arguments arraylike is expensive +function slice(args) { + var l = args.length, a = [], i + for (i = 0; i < l; i++) a[i] = args[i] + return a +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/LICENCE b/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/LICENCE new file mode 100644 index 00000000..9f884d52 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/LICENCE @@ -0,0 +1,25 @@ +Copyright (c) Isaac Z. Schlueter +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/README.md new file mode 100644 index 00000000..8745e888 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/README.md @@ -0,0 +1,14 @@ +# block-stream + +A stream of blocks. + +Write data into it, and it'll output data in buffer blocks the size you +specify, padding with zeroes if necessary. + +```javascript +var block = new BlockStream(512) +fs.createReadStream("some-file").pipe(block) +block.pipe(fs.createWriteStream("block-file")) +``` + +When `.end()` or `.flush()` is called, it'll pad the block with zeroes. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/block-stream.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/block-stream.js new file mode 100644 index 00000000..3336bd2a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/block-stream.js @@ -0,0 +1,209 @@ +// write data to it, and it'll emit data in 512 byte blocks. +// if you .end() or .flush(), it'll emit whatever it's got, +// padded with nulls to 512 bytes. + +module.exports = BlockStream + +var Stream = require("stream").Stream + , inherits = require("inherits") + , assert = require("assert").ok + , debug = process.env.DEBUG ? console.error : function () {} + +function BlockStream (size, opt) { + this.writable = this.readable = true + this._opt = opt || {} + this._chunkSize = size || 512 + this._offset = 0 + this._buffer = [] + this._bufferLength = 0 + if (this._opt.nopad) this._zeroes = false + else { + this._zeroes = new Buffer(this._chunkSize) + for (var i = 0; i < this._chunkSize; i ++) { + this._zeroes[i] = 0 + } + } +} + +inherits(BlockStream, Stream) + +BlockStream.prototype.write = function (c) { + // debug(" BS write", c) + if (this._ended) throw new Error("BlockStream: write after end") + if (c && !Buffer.isBuffer(c)) c = new Buffer(c + "") + if (c.length) { + this._buffer.push(c) + this._bufferLength += c.length + } + // debug("pushed onto buffer", this._bufferLength) + if (this._bufferLength >= this._chunkSize) { + if (this._paused) { + // debug(" BS paused, return false, need drain") + this._needDrain = true + return false + } + this._emitChunk() + } + return true +} + +BlockStream.prototype.pause = function () { + // debug(" BS pausing") + this._paused = true +} + +BlockStream.prototype.resume = function () { + // debug(" BS resume") + this._paused = false + return this._emitChunk() +} + +BlockStream.prototype.end = function (chunk) { + // debug("end", chunk) + if (typeof chunk === "function") cb = chunk, chunk = null + if (chunk) this.write(chunk) + this._ended = true + this.flush() +} + +BlockStream.prototype.flush = function () { + this._emitChunk(true) +} + +BlockStream.prototype._emitChunk = function (flush) { + // debug("emitChunk flush=%j emitting=%j paused=%j", flush, this._emitting, this._paused) + + // emit a chunk + if (flush && this._zeroes) { + // debug(" BS push zeroes", this._bufferLength) + // push a chunk of zeroes + var padBytes = (this._bufferLength % this._chunkSize) + if (padBytes !== 0) padBytes = this._chunkSize - padBytes + if (padBytes > 0) { + // debug("padBytes", padBytes, this._zeroes.slice(0, padBytes)) + this._buffer.push(this._zeroes.slice(0, padBytes)) + this._bufferLength += padBytes + // debug(this._buffer[this._buffer.length - 1].length, this._bufferLength) + } + } + + if (this._emitting || this._paused) return + this._emitting = true + + // debug(" BS entering loops") + var bufferIndex = 0 + while (this._bufferLength >= this._chunkSize && + (flush || !this._paused)) { + // debug(" BS data emission loop", this._bufferLength) + + var out + , outOffset = 0 + , outHas = this._chunkSize + + while (outHas > 0 && (flush || !this._paused) ) { + // debug(" BS data inner emit loop", this._bufferLength) + var cur = this._buffer[bufferIndex] + , curHas = cur.length - this._offset + // debug("cur=", cur) + // debug("curHas=%j", curHas) + // If it's not big enough to fill the whole thing, then we'll need + // to copy multiple buffers into one. However, if it is big enough, + // then just slice out the part we want, to save unnecessary copying. + // Also, need to copy if we've already done some copying, since buffers + // can't be joined like cons strings. + if (out || curHas < outHas) { + out = out || new Buffer(this._chunkSize) + cur.copy(out, outOffset, + this._offset, this._offset + Math.min(curHas, outHas)) + } else if (cur.length === outHas && this._offset === 0) { + // shortcut -- cur is exactly long enough, and no offset. + out = cur + } else { + // slice out the piece of cur that we need. + out = cur.slice(this._offset, this._offset + outHas) + } + + if (curHas > outHas) { + // means that the current buffer couldn't be completely output + // update this._offset to reflect how much WAS written + this._offset += outHas + outHas = 0 + } else { + // output the entire current chunk. + // toss it away + outHas -= curHas + outOffset += curHas + bufferIndex ++ + this._offset = 0 + } + } + + this._bufferLength -= this._chunkSize + assert(out.length === this._chunkSize) + // debug("emitting data", out) + // debug(" BS emitting, paused=%j", this._paused, this._bufferLength) + this.emit("data", out) + out = null + } + // debug(" BS out of loops", this._bufferLength) + + // whatever is left, it's not enough to fill up a block, or we're paused + this._buffer = this._buffer.slice(bufferIndex) + if (this._paused) { + // debug(" BS paused, leaving", this._bufferLength) + this._needsDrain = true + this._emitting = false + return + } + + // if flushing, and not using null-padding, then need to emit the last + // chunk(s) sitting in the queue. We know that it's not enough to + // fill up a whole block, because otherwise it would have been emitted + // above, but there may be some offset. + var l = this._buffer.length + if (flush && !this._zeroes && l) { + if (l === 1) { + if (this._offset) { + this.emit("data", this._buffer[0].slice(this._offset)) + } else { + this.emit("data", this._buffer[0]) + } + } else { + var outHas = this._bufferLength + , out = new Buffer(outHas) + , outOffset = 0 + for (var i = 0; i < l; i ++) { + var cur = this._buffer[i] + , curHas = cur.length - this._offset + cur.copy(out, outOffset, this._offset) + this._offset = 0 + outOffset += curHas + this._bufferLength -= curHas + } + this.emit("data", out) + } + // truncate + this._buffer.length = 0 + this._bufferLength = 0 + this._offset = 0 + } + + // now either drained or ended + // debug("either draining, or ended", this._bufferLength, this._ended) + // means that we've flushed out all that we can so far. + if (this._needDrain) { + // debug("emitting drain", this._bufferLength) + this._needDrain = false + this.emit("drain") + } + + if ((this._bufferLength === 0) && this._ended && !this._endEmitted) { + // debug("emitting end", this._bufferLength) + this._endEmitted = true + this.emit("end") + } + + this._emitting = false + + // debug(" BS no longer emitting", flush, this._paused, this._emitting, this._bufferLength, this._chunkSize) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/package.json new file mode 100644 index 00000000..ea6ee6aa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/block-stream/package.json @@ -0,0 +1,54 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "block-stream", + "description": "a stream of blocks", + "version": "0.0.8", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/block-stream.git" + }, + "engines": { + "node": "0.4 || >=0.5.8" + }, + "main": "block-stream.js", + "dependencies": { + "inherits": "~2.0.0" + }, + "devDependencies": { + "tap": "0.x" + }, + "scripts": { + "test": "tap test/" + }, + "license": "ISC", + "gitHead": "b35520314f4763af0788d65a846bb43d9c0a8f02", + "bugs": { + "url": "https://github.com/isaacs/block-stream/issues" + }, + "homepage": "https://github.com/isaacs/block-stream#readme", + "_id": "block-stream@0.0.8", + "_shasum": "0688f46da2bbf9cff0c4f68225a0cb95cbe8a46b", + "_from": "block-stream@0.0.8", + "_npmVersion": "2.10.0", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "0688f46da2bbf9cff0c4f68225a0cb95cbe8a46b", + "tarball": "http://registry.npmjs.org/block-stream/-/block-stream-0.0.8.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.8.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/LICENSE new file mode 100644 index 00000000..235bdd54 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/README.md new file mode 100644 index 00000000..7f5248f5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/README.md @@ -0,0 +1,31 @@ +# char-spinner + +Put a little spinner on process.stderr, as unobtrusively as possible. + +## USAGE + +```javascript +var spinner = require("char-spinner") + +// All options are optional +// even the options argument itself is optional +spinner(options) +``` + +## OPTIONS + +Usually the defaults are what you want. Mostly they're just +configurable for testing purposes. + +* `stream` Output stream. Default=`process.stderr` +* `tty` Only show spinner if output stream has a truish `.isTTY`. Default=`true` +* `string` String of chars to spin. Default=`'/-\\|'` +* `interval` Number of ms between frames, bigger = slower. Default=`50` +* `cleanup` Print `'\r \r'` to stream on process exit. Default=`true` +* `unref` Unreference the spinner interval so that the process can + exit normally. Default=`true` +* `delay` Number of frames to "skip over" before printing the spinner. + Useful if you want to avoid showing the spinner for very fast + actions. Default=`2` + +Returns the generated interval, if one was created. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/package.json new file mode 100644 index 00000000..81e62ccf --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/package.json @@ -0,0 +1,54 @@ +{ + "name": "char-spinner", + "version": "1.0.1", + "description": "Put a little spinner on process.stderr, as unobtrusively as possible.", + "main": "spin.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^0.4.10" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/char-spinner" + }, + "keywords": [ + "char", + "spinner" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/isaacs/char-spinner/issues" + }, + "homepage": "https://github.com/isaacs/char-spinner", + "gitHead": "091b2ff5960aa083f68a5619fa93999d072aa152", + "_id": "char-spinner@1.0.1", + "_shasum": "e6ea67bd247e107112983b7ab0479ed362800081", + "_from": "char-spinner@latest", + "_npmVersion": "1.4.13", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "e6ea67bd247e107112983b7ab0479ed362800081", + "tarball": "http://registry.npmjs.org/char-spinner/-/char-spinner-1.0.1.tgz" + }, + "_resolved": "https://registry.npmjs.org/char-spinner/-/char-spinner-1.0.1.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/spin.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/spin.js new file mode 100644 index 00000000..f12a4c0b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/char-spinner/spin.js @@ -0,0 +1,51 @@ +module.exports = spinner + +function spinner(opt) { + opt = opt || {} + var str = opt.stream || process.stderr + var tty = typeof opt.tty === 'boolean' ? opt.tty : true + var string = opt.string || '/-\\|' + var ms = typeof opt.interval === 'number' ? opt.interval : 50 + if (ms < 0) ms = 0 + if (tty && !str.isTTY) return false + var CR = str.isTTY ? '\u001b[0G' : '\u000d'; + var CLEAR = str.isTTY ? '\u001b[2K' : '\u000d \u000d'; + + var s = 0 + var sprite = string.split('') + var wrote = false + + var delay = typeof opt.delay === 'number' ? opt.delay : 2 + + var interval = setInterval(function() { + if (--delay >= 0) return + s = ++s % sprite.length + var c = sprite[s] + str.write(c + CR) + wrote = true + }, ms) + + var unref = typeof opt.unref === 'boolean' ? opt.unref : true + if (unref && typeof interval.unref === 'function') { + interval.unref() + } + + var cleanup = typeof opt.cleanup === 'boolean' ? opt.cleanup : true + if (cleanup) { + process.on('exit', function() { + if (wrote) { + str.write(CLEAR); + } + }) + } + + module.exports.clear = function () { + str.write(CLEAR); + }; + + return interval +} + +module.exports.clear = function () {}; + + diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/README.md new file mode 100644 index 00000000..5c0b421a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/README.md @@ -0,0 +1,3 @@ +Like `chmod -R`. + +Takes the same arguments as `fs.chmod()` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/chmodr.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/chmodr.js new file mode 100644 index 00000000..9ecfe28f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/chmodr.js @@ -0,0 +1,76 @@ +module.exports = chmodr +chmodr.sync = chmodrSync + +var fs = require("fs") +var path = require("path") + +function chmodr (p, mode, cb) { + fs.lstat(p, function (er, stats) { + if (er) + return cb(er) + if (stats.isSymbolicLink()) + return cb() + if (stats.isDirectory()) + return chmodrDir(p, mode, cb) + return fs.chmod(p, mode, cb) + }) +} + +function chmodrDir (p, mode, cb) { + fs.readdir(p, function (er, children) { + if (er) + return cb(er) + + if (!children.length) + return fs.chmod(p, dirMode(mode), cb) + + var len = children.length + var errState = null + children.forEach(function (child) { + chmodr(path.resolve(p, child), mode, then) + }) + + // return first error, but not until all are finished, + // so we don't keep performing FS operations after the cb + function then (er) { + len = len - 1 + if (er && !errState) + errState = er + if (len === 0) { + if (errState) + return cb(errState) + else + return fs.chmod(p, dirMode(mode), cb) + } + } + }) +} + +function chmodrSync (p, mode) { + var stats = fs.lstatSync(p) + if (stats.isSymbolicLink()) + return + if (stats.isDirectory()) + return chmodrDirSync(p, mode) + else + return fs.chmodSync(p, mode) +} + +function chmodrDirSync (p, mode) { + fs.readdirSync(p).forEach(function (child) { + chmodrSync(path.resolve(p, child), mode) + }) + return fs.chmodSync(p, dirMode(mode)) +} + +// If a party has r, add x +// so that dirs are listable +function dirMode(mode) { + if (mode & 0400) + mode |= 0100 + if (mode & 040) + mode |= 010 + if (mode & 04) + mode |= 01 + return mode +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/package.json new file mode 100644 index 00000000..25c8d7e5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/chmodr/package.json @@ -0,0 +1,53 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "chmodr", + "description": "like `chmod -R`", + "version": "1.0.2", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/chmodr.git" + }, + "main": "chmodr.js", + "devDependencies": { + "mkdirp": "0.3", + "rimraf": "", + "tap": "^1.3.2" + }, + "scripts": { + "test": "tap test/*.js" + }, + "license": "ISC", + "files": [ + "chmodr.js" + ], + "gitHead": "1eeeb38b3a4899714e11840fe28ea7fd93865f01", + "bugs": { + "url": "https://github.com/isaacs/chmodr/issues" + }, + "homepage": "https://github.com/isaacs/chmodr#readme", + "_id": "chmodr@1.0.2", + "_shasum": "04662b932d0f02ec66deaa2b0ea42811968e3eb9", + "_from": "chmodr@>=1.0.2 <1.1.0", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "04662b932d0f02ec66deaa2b0ea42811968e3eb9", + "tarball": "http://registry.npmjs.org/chmodr/-/chmodr-1.0.2.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/chmodr/-/chmodr-1.0.2.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/README.md new file mode 100644 index 00000000..a24ba7a9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/README.md @@ -0,0 +1,3 @@ +Like `chown -R`. + +Takes the same arguments as `fs.chown()` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/chownr.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/chownr.js new file mode 100644 index 00000000..880f821d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/chownr.js @@ -0,0 +1,52 @@ +module.exports = chownr +chownr.sync = chownrSync + +var fs = require("fs") +, path = require("path") + +function chownr (p, uid, gid, cb) { + fs.readdir(p, function (er, children) { + // any error other than ENOTDIR means it's not readable, or + // doesn't exist. give up. + if (er && er.code !== "ENOTDIR") return cb(er) + if (er || !children.length) return fs.chown(p, uid, gid, cb) + + var len = children.length + , errState = null + children.forEach(function (child) { + var pathChild = path.resolve(p, child); + fs.lstat(pathChild, function(er, stats) { + if (er) + return cb(er) + if (!stats.isSymbolicLink()) + chownr(pathChild, uid, gid, then) + else + then() + }) + }) + function then (er) { + if (errState) return + if (er) return cb(errState = er) + if (-- len === 0) return fs.chown(p, uid, gid, cb) + } + }) +} + +function chownrSync (p, uid, gid) { + var children + try { + children = fs.readdirSync(p) + } catch (er) { + if (er && er.code === "ENOTDIR") return fs.chownSync(p, uid, gid) + throw er + } + if (!children.length) return fs.chownSync(p, uid, gid) + + children.forEach(function (child) { + var pathChild = path.resolve(p, child) + var stats = fs.lstatSync(pathChild) + if (!stats.isSymbolicLink()) + chownrSync(pathChild, uid, gid) + }) + return fs.chownSync(p, uid, gid) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/package.json new file mode 100644 index 00000000..df3c96ec --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/chownr/package.json @@ -0,0 +1,54 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "chownr", + "description": "like `chown -R`", + "version": "1.0.1", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/chownr.git" + }, + "main": "chownr.js", + "files": [ + "chownr.js" + ], + "devDependencies": { + "mkdirp": "0.3", + "rimraf": "", + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "license": "ISC", + "gitHead": "c6c43844e80d7c7045e737a72b9fbb1ba0579a26", + "bugs": { + "url": "https://github.com/isaacs/chownr/issues" + }, + "homepage": "https://github.com/isaacs/chownr#readme", + "_id": "chownr@1.0.1", + "_shasum": "e2a75042a9551908bebd25b8523d5f9769d79181", + "_from": "chownr@1.0.1", + "_npmVersion": "3.2.2", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "e2a75042a9551908bebd25b8523d5f9769d79181", + "tarball": "http://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/.npmignore new file mode 100644 index 00000000..69f75d26 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/.npmignore @@ -0,0 +1,16 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log + +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/.travis.yml new file mode 100644 index 00000000..97e45158 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.10" + - "0.8" \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/LICENSE new file mode 100644 index 00000000..6e93978e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/README.md new file mode 100644 index 00000000..536bd49d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/README.md @@ -0,0 +1,44 @@ +# cmd-shim + +The cmd-shim used in npm to create executable scripts on Windows, +since symlinks are not suitable for this purpose there. + +On Unix systems, you should use a symbolic link instead. + +[![Build Status](https://img.shields.io/travis/ForbesLindesay/cmd-shim/master.svg)](https://travis-ci.org/ForbesLindesay/cmd-shim) +[![Dependency Status](https://img.shields.io/david/ForbesLindesay/cmd-shim.svg)](https://david-dm.org/ForbesLindesay/cmd-shim) +[![NPM version](https://img.shields.io/npm/v/cmd-shim.svg)](https://www.npmjs.com/package/cmd-shim) + +## Installation + +``` +npm install cmd-shim +``` + +## API + +### cmdShim(from, to, cb) + +Create a cmd shim at `to` for the command line program at `from`. +e.g. + +```javascript +var cmdShim = require('cmd-shim'); +cmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) { + if (err) throw err; +}); +``` + +### cmdShim.ifExists(from, to, cb) + +The same as above, but will just continue if the file does not exist. +Source: + +```javascript +function cmdShimIfExists (from, to, cb) { + fs.stat(from, function (er) { + if (er) return cb() + cmdShim(from, to, cb) + }) +} +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/index.js new file mode 100644 index 00000000..353df162 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/index.js @@ -0,0 +1,180 @@ +// On windows, create a .cmd file. +// Read the #! in the file to see what it uses. The vast majority +// of the time, this will be either: +// "#!/usr/bin/env " +// or: +// "#! " +// +// Write a binroot/pkg.bin + ".cmd" file that has this line in it: +// @ %~dp0 %* + +module.exports = cmdShim +cmdShim.ifExists = cmdShimIfExists + +var fs = require("graceful-fs") + +var mkdir = require("mkdirp") + , path = require("path") + , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/ + +function cmdShimIfExists (from, to, cb) { + fs.stat(from, function (er) { + if (er) return cb() + cmdShim(from, to, cb) + }) +} + +// Try to unlink, but ignore errors. +// Any problems will surface later. +function rm (path, cb) { + fs.unlink(path, function(er) { + cb() + }) +} + +function cmdShim (from, to, cb) { + fs.stat(from, function (er, stat) { + if (er) + return cb(er) + + cmdShim_(from, to, cb) + }) +} + +function cmdShim_ (from, to, cb) { + var then = times(2, next, cb) + rm(to, then) + rm(to + ".cmd", then) + + function next(er) { + writeShim(from, to, cb) + } +} + +function writeShim (from, to, cb) { + // make a cmd file and a sh script + // First, check if the bin is a #! of some sort. + // If not, then assume it's something that'll be compiled, or some other + // sort of script, and just call it directly. + mkdir(path.dirname(to), function (er) { + if (er) + return cb(er) + fs.readFile(from, "utf8", function (er, data) { + if (er) return writeShim_(from, to, null, null, cb) + var firstLine = data.trim().split(/\r*\n/)[0] + , shebang = firstLine.match(shebangExpr) + if (!shebang) return writeShim_(from, to, null, null, cb) + var prog = shebang[1] + , args = shebang[2] || "" + return writeShim_(from, to, prog, args, cb) + }) + }) +} + +function writeShim_ (from, to, prog, args, cb) { + var shTarget = path.relative(path.dirname(to), from) + , target = shTarget.split("/").join("\\") + , longProg + , shProg = prog && prog.split("\\").join("/") + , shLongProg + shTarget = shTarget.split("\\").join("/") + args = args || "" + if (!prog) { + prog = "\"%~dp0\\" + target + "\"" + shProg = "\"$basedir/" + shTarget + "\"" + args = "" + target = "" + shTarget = "" + } else { + longProg = "\"%~dp0\\" + prog + ".exe\"" + shLongProg = "\"$basedir/" + prog + "\"" + target = "\"%~dp0\\" + target + "\"" + shTarget = "\"$basedir/" + shTarget + "\"" + } + + // @IF EXIST "%~dp0\node.exe" ( + // "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* + // ) ELSE ( + // SETLOCAL + // SET PATHEXT=%PATHEXT:;.JS;=;% + // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* + // ) + var cmd + if (longProg) { + cmd = "@IF EXIST " + longProg + " (\r\n" + + " " + longProg + " " + args + " " + target + " %*\r\n" + + ") ELSE (\r\n" + + " @SETLOCAL\r\n" + + " @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n" + + " " + prog + " " + args + " " + target + " %*\r\n" + + ")" + } else { + cmd = "@" + prog + " " + args + " " + target + " %*\r\n" + } + + // #!/bin/sh + // basedir=`dirname "$0"` + // + // case `uname` in + // *CYGWIN*) basedir=`cygpath -w "$basedir"`;; + // esac + // + // if [ -x "$basedir/node.exe" ]; then + // "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@" + // ret=$? + // else + // node "$basedir/node_modules/npm/bin/npm-cli.js" "$@" + // ret=$? + // fi + // exit $ret + + var sh = "#!/bin/sh\n" + + if (shLongProg) { + sh = sh + + "basedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")\n" + + "\n" + + "case `uname` in\n" + + " *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\n" + + "esac\n" + + "\n" + + sh = sh + + "if [ -x "+shLongProg+" ]; then\n" + + " " + shLongProg + " " + args + " " + shTarget + " \"$@\"\n" + + " ret=$?\n" + + "else \n" + + " " + shProg + " " + args + " " + shTarget + " \"$@\"\n" + + " ret=$?\n" + + "fi\n" + + "exit $ret\n" + } else { + sh = shProg + " " + args + " " + shTarget + " \"$@\"\n" + + "exit $?\n" + } + + var then = times(2, next, cb) + fs.writeFile(to + ".cmd", cmd, "utf8", then) + fs.writeFile(to, sh, "utf8", then) + function next () { + chmodShim(to, cb) + } +} + +function chmodShim (to, cb) { + var then = times(2, cb, cb) + fs.chmod(to, 0755, then) + fs.chmod(to + ".cmd", 0755, then) +} + +function times(n, ok, cb) { + var errState = null + return function(er) { + if (!errState) { + if (er) + cb(errState = er) + else if (--n === 0) + ok() + } + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/package.json new file mode 100644 index 00000000..9707abc3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/cmd-shim/package.json @@ -0,0 +1,52 @@ +{ + "name": "cmd-shim", + "version": "2.0.2", + "description": "Used in npm for command line application support", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ForbesLindesay/cmd-shim.git" + }, + "license": "BSD-2-Clause", + "dependencies": { + "graceful-fs": "^4.1.2", + "mkdirp": "~0.5.0" + }, + "devDependencies": { + "tap": "~0.4.11", + "rimraf": "~2.2.8" + }, + "gitHead": "8492e2a92b5062bb02a9eec509e57eea94b110a7", + "bugs": { + "url": "https://github.com/ForbesLindesay/cmd-shim/issues" + }, + "homepage": "https://github.com/ForbesLindesay/cmd-shim", + "_id": "cmd-shim@2.0.2", + "_shasum": "6fcbda99483a8fd15d7d30a196ca69d688a2efdb", + "_from": "cmd-shim@2.0.2", + "_npmVersion": "2.7.1", + "_nodeVersion": "1.6.2", + "_npmUser": { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + "dist": { + "shasum": "6fcbda99483a8fd15d7d30a196ca69d688a2efdb", + "tarball": "http://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz" + }, + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + } + ], + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/cmd-shim-2.0.2.tgz_1455116566936_0.7582207734230906" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/LICENSE new file mode 100644 index 00000000..b763f620 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Tim Oxley + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/Makefile b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/Makefile new file mode 100644 index 00000000..d3c7d425 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/Makefile @@ -0,0 +1,9 @@ + +all: columnify.js + +prepublish: all + +columnify.js: index.js package.json + babel index.js > columnify.js + +.PHONY: all prepublish diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/Readme.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/Readme.md new file mode 100644 index 00000000..25f68c78 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/Readme.md @@ -0,0 +1,470 @@ +# columnify + +[![NPM](https://nodei.co/npm/columnify.png?downloads=true&downloadRank=true&stars=true&chrome)](https://nodei.co/npm-dl/columnify/) +[![NPM](https://nodei.co/npm-dl/columnify.png?months=3&height=3&chrome)](https://nodei.co/npm/columnify/) + +[![Build Status](https://img.shields.io/travis/timoxley/columnify.svg?style=flat)](https://travis-ci.org/timoxley/columnify) +[![NPM Version](https://img.shields.io/npm/v/columnify.svg?style=flat)](https://npmjs.org/package/columnify) +[![License](http://img.shields.io/npm/l/columnify.svg?style=flat)](LICENSE) +[![Dependency Status](https://david-dm.org/timoxley/columnify.svg)](https://david-dm.org/timoxley/columnify) +[![devDependency Status](https://david-dm.org/timoxley/columnify/dev-status.svg)](https://david-dm.org/timoxley/columnify#info=devDependencies) + +Create text-based columns suitable for console output from objects or +arrays of objects. + +Columns are automatically resized to fit the content of the largest +cell. Each cell will be padded with spaces to fill the available space +and ensure column contents are left-aligned. + +Designed to [handle sensible wrapping in npm search results](https://github.com/isaacs/npm/pull/2328). + +`npm search` before & after integrating columnify: + +![npm-tidy-search](https://f.cloud.github.com/assets/43438/1848959/ae02ad04-76a1-11e3-8255-4781debffc26.gif) + +## Installation & Update + +``` +$ npm install --save columnify@latest +``` + +## Usage + +```javascript +var columnify = require('columnify') +var columns = columnify(data, options) +console.log(columns) +``` + +## Examples + +### Columnify Objects + +Objects are converted to a list of key/value pairs: + +```javascript +var data = { + "commander@0.6.1": 1, + "minimatch@0.2.14": 3, + "mkdirp@0.3.5": 2, + "sigmund@1.0.0": 3 +} + +console.log(columnify(data)) +``` +#### Output: +``` +KEY VALUE +commander@0.6.1 1 +minimatch@0.2.14 3 +mkdirp@0.3.5 2 +sigmund@1.0.0 3 +``` + +### Custom Column Names + +```javascript +var data = { + "commander@0.6.1": 1, + "minimatch@0.2.14": 3, + "mkdirp@0.3.5": 2, + "sigmund@1.0.0": 3 +} + +console.log(columnify(data, {columns: ['MODULE', 'COUNT']})) +``` +#### Output: +``` +MODULE COUNT +commander@0.6.1 1 +minimatch@0.2.14 3 +mkdirp@0.3.5 2 +sigmund@1.0.0 3 +``` + +### Columnify Arrays of Objects + +Column headings are extracted from the keys in supplied objects. + +```javascript +var columnify = require('columnify') + +var columns = columnify([{ + name: 'mod1', + version: '0.0.1' +}, { + name: 'module2', + version: '0.2.0' +}]) + +console.log(columns) +``` +#### Output: +``` +NAME VERSION +mod1 0.0.1 +module2 0.2.0 +``` + +### Filtering & Ordering Columns + +By default, all properties are converted into columns, whether or not +they exist on every object or not. + +To explicitly specify which columns to include, and in which order, +supply a "columns" or "include" array ("include" is just an alias). + +```javascript +var data = [{ + name: 'module1', + description: 'some description', + version: '0.0.1', +}, { + name: 'module2', + description: 'another description', + version: '0.2.0', +}] + +var columns = columnify(data, { + columns: ['name', 'version'] +}) + +console.log(columns) +``` + +#### Output: +``` +NAME VERSION +module1 0.0.1 +module2 0.2.0 +``` + +## Global and Per Column Options +You can set a number of options at a global level (ie. for all columns) or on a per column basis. + +Set options on a per column basis by using the `config` option to specify individual columns: + +```javascript +var columns = columnify(data, { + optionName: optionValue, + config: { + columnName: {optionName: optionValue}, + columnName: {optionName: optionValue}, + } +}) +``` + +### Maximum and Minimum Column Widths +As with all options, you can define the `maxWidth` and `minWidth` globally, or for specified columns. By default, wrapping will happen at word boundaries. Empty cells or those which do not fill the `minWidth` will be padded with spaces. + +```javascript +var columns = columnify([{ + name: 'mod1', + description: 'some description which happens to be far larger than the max', + version: '0.0.1', +}, { + name: 'module-two', + description: 'another description larger than the max', + version: '0.2.0', +}], { + minWidth: 20, + config: { + description: {maxWidth: 30} + } +}) + +console.log(columns) +``` + +#### Output: +``` +NAME DESCRIPTION VERSION +mod1 some description which happens 0.0.1 + to be far larger than the max +module-two another description larger 0.2.0 + than the max +``` + +#### Maximum Line Width + +You can set a hard maximum line width using the `maxLineWidth` option. +Beyond this value data is unceremoniously truncated with no truncation +marker. + +This can either be a number or 'auto' to set the value to the width of +stdout. + +Setting this value to 'auto' prevent TTY-imposed line-wrapping when +lines exceed the screen width. + +#### Truncating Column Cells Instead of Wrapping + +You can disable wrapping and instead truncate content at the maximum +column width by using the `truncate` option. Truncation respects word boundaries. A truncation marker, `…`, will appear next to the last word in any truncated line. + +```javascript +var columns = columnify(data, { + truncate: true, + config: { + description: { + maxWidth: 20 + } + } +}) + +console.log(columns) +``` +#### Output: +``` +NAME DESCRIPTION VERSION +mod1 some description… 0.0.1 +module-two another description… 0.2.0 +``` + + +### Align Right/Center +You can set the alignment of the column data by using the `align` option. + +```js +var data = { + "mocha@1.18.2": 1, + "commander@2.0.0": 1, + "debug@0.8.1": 1 +} + +columnify(data, {config: {value: {align: 'right'}}}) +``` + +#### Output: +``` +KEY VALUE +mocha@1.18.2 1 +commander@2.0.0 1 +debug@0.8.1 1 +``` + +`align: 'center'` works in a similar way. + + +### Padding Character + +Set a character to fill whitespace within columns with the `paddingChr` option. + +```js +var data = { + "shortKey": "veryVeryVeryVeryVeryLongVal", + "veryVeryVeryVeryVeryLongKey": "shortVal" +} + +columnify(data, { paddingChr: '.'}) +``` + +#### Output: +``` +KEY........................ VALUE...................... +shortKey................... veryVeryVeryVeryVeryLongVal +veryVeryVeryVeryVeryLongKey shortVal................... +``` + +### Preserve Existing Newlines + +By default, `columnify` sanitises text by replacing any occurance of 1 or more whitespace characters with a single space. + +`columnify` can be configured to respect existing new line characters using the `preserveNewLines` option. Note this will still collapse all other whitespace. + +```javascript +var data = [{ + name: "glob@3.2.9", + paths: [ + "node_modules/tap/node_modules/glob", + "node_modules/tape/node_modules/glob" + ].join('\n') +}, { + name: "nopt@2.2.1", + paths: [ + "node_modules/tap/node_modules/nopt" + ] +}, { + name: "runforcover@0.0.2", + paths: "node_modules/tap/node_modules/runforcover" +}] + +console.log(columnify(data, {preserveNewLines: true})) +``` +#### Output: +``` +NAME PATHS +glob@3.2.9 node_modules/tap/node_modules/glob + node_modules/tape/node_modules/glob +nopt@2.2.1 node_modules/tap/node_modules/nopt +runforcover@0.0.2 node_modules/tap/node_modules/runforcover +``` + +Compare this with output without `preserveNewLines`: + +```javascript +console.log(columnify(data, {preserveNewLines: false})) +// or just +console.log(columnify(data)) +``` + +``` +NAME PATHS +glob@3.2.9 node_modules/tap/node_modules/glob node_modules/tape/node_modules/glob +nopt@2.2.1 node_modules/tap/node_modules/nopt +runforcover@0.0.2 node_modules/tap/node_modules/runforcover +``` + +### Custom Truncation Marker + +You can change the truncation marker to something other than the default +`…` by using the `truncateMarker` option. + +```javascript +var columns = columnify(data, { + truncate: true, + truncateMarker: '>', + widths: { + description: { + maxWidth: 20 + } + } +}) + +console.log(columns) +``` +#### Output: +``` +NAME DESCRIPTION VERSION +mod1 some description> 0.0.1 +module-two another description> 0.2.0 +``` + +### Custom Column Splitter + +If your columns need some bling, you can split columns with custom +characters by using the `columnSplitter` option. + +```javascript +var columns = columnify(data, { + columnSplitter: ' | ' +}) + +console.log(columns) +``` +#### Output: +``` +NAME | DESCRIPTION | VERSION +mod1 | some description which happens to be far larger than the max | 0.0.1 +module-two | another description larger than the max | 0.2.0 +``` + +### Control Header Display + +Control whether column headers are displayed by using the `showHeaders` option. + +```javascript +var columns = columnify(data, { + showHeaders: false +}) +``` + +This also works well for hiding a single column header, like an `id` column: +```javascript +var columns = columnify(data, { + config: { + id: { showHeaders: false } + } +}) +``` + +### Transforming Column Data and Headers +If you need to modify the presentation of column content or heading content there are two useful options for doing that: `dataTransform` and `headerTransform`. Both of these take a function and need to return a valid string. + +```javascript +var columns = columnify([{ + name: 'mod1', + description: 'SOME DESCRIPTION TEXT.' +}, { + name: 'module-two', + description: 'SOME SLIGHTLY LONGER DESCRIPTION TEXT.' +}], { + dataTransform: function(data) { + return data.toLowerCase() + }, + config: { + name: { + headingTransform: function(heading) { + heading = "module " + heading + return "*" + heading.toUpperCase() + "*" + } + } + } +}) +``` +#### Output: +``` +*MODULE NAME* DESCRIPTION +mod1 some description text. +module-two some slightly longer description text. +``` + + +## Multibyte Character Support + +`columnify` uses [mycoboco/wcwidth.js](https://github.com/mycoboco/wcwidth.js) to calculate length of multibyte characters: + +```javascript +var data = [{ + name: 'module-one', + description: 'some description', + version: '0.0.1', +}, { + name: '这是一个很长的名字的模块', + description: '这真的是一个描述的内容这个描述很长', + version: "0.3.3" +}] + +console.log(columnify(data)) +``` + +#### Without multibyte handling: + +i.e. before columnify added this feature + +``` +NAME DESCRIPTION VERSION +module-one some description 0.0.1 +这是一个很长的名字的模块 这真的是一个描述的内容这个描述很长 0.3.3 +``` + +#### With multibyte handling: + +``` +NAME DESCRIPTION VERSION +module-one some description 0.0.1 +这是一个很长的名字的模块 这真的是一个描述的内容这个描述很长 0.3.3 +``` + +## Contributions + +``` + project : columnify + repo age : 1 year, 2 months + active : 32 days + commits : 120 + files : 54 + authors : + 90 Tim Oxley 75.0% + 8 Tim 6.7% + 7 Arjun Mehta 5.8% + 6 Dany 5.0% + 5 Wei Gao 4.2% + 2 Dany Shaanan 1.7% + 1 Seth Miller 0.8% + 1 Isaac Z. Schlueter 0.8% +``` + +## License + +MIT diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/columnify.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/columnify.js new file mode 100644 index 00000000..fc7b7724 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/columnify.js @@ -0,0 +1,307 @@ +"use strict"; + +var wcwidth = require('./width'); + +var _require = require('./utils'); + +var padRight = _require.padRight; +var padCenter = _require.padCenter; +var padLeft = _require.padLeft; +var splitIntoLines = _require.splitIntoLines; +var splitLongWords = _require.splitLongWords; +var truncateString = _require.truncateString; + +var DEFAULT_HEADING_TRANSFORM = function DEFAULT_HEADING_TRANSFORM(key) { + return key.toUpperCase(); +}; + +var DEFAULT_DATA_TRANSFORM = function DEFAULT_DATA_TRANSFORM(cell, column, index) { + return cell; +}; + +var DEFAULTS = Object.freeze({ + maxWidth: Infinity, + minWidth: 0, + columnSplitter: ' ', + truncate: false, + truncateMarker: '…', + preserveNewLines: false, + paddingChr: ' ', + showHeaders: true, + headingTransform: DEFAULT_HEADING_TRANSFORM, + dataTransform: DEFAULT_DATA_TRANSFORM +}); + +module.exports = function (items) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var columnConfigs = options.config || {}; + delete options.config; // remove config so doesn't appear on every column. + + var maxLineWidth = options.maxLineWidth || Infinity; + if (maxLineWidth === 'auto') maxLineWidth = process.stdout.columns || Infinity; + delete options.maxLineWidth; // this is a line control option, don't pass it to column + + // Option defaults inheritance: + // options.config[columnName] => options => DEFAULTS + options = mixin({}, DEFAULTS, options); + + options.config = options.config || Object.create(null); + + options.spacing = options.spacing || '\n'; // probably useless + options.preserveNewLines = !!options.preserveNewLines; + options.showHeaders = !!options.showHeaders; + options.columns = options.columns || options.include; // alias include/columns, prefer columns if supplied + var columnNames = options.columns || []; // optional user-supplied columns to include + + items = toArray(items, columnNames); + + // if not suppled column names, automatically determine columns from data keys + if (!columnNames.length) { + items.forEach(function (item) { + for (var columnName in item) { + if (columnNames.indexOf(columnName) === -1) columnNames.push(columnName); + } + }); + } + + // initialize column defaults (each column inherits from options.config) + var columns = columnNames.reduce(function (columns, columnName) { + var column = Object.create(options); + columns[columnName] = mixin(column, columnConfigs[columnName]); + return columns; + }, Object.create(null)); + + // sanitize column settings + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + column.name = columnName; + column.maxWidth = Math.ceil(column.maxWidth); + column.minWidth = Math.ceil(column.minWidth); + column.truncate = !!column.truncate; + column.align = column.align || 'left'; + }); + + // sanitize data + items = items.map(function (item) { + var result = Object.create(null); + columnNames.forEach(function (columnName) { + // null/undefined -> '' + result[columnName] = item[columnName] != null ? item[columnName] : ''; + // toString everything + result[columnName] = '' + result[columnName]; + if (columns[columnName].preserveNewLines) { + // merge non-newline whitespace chars + result[columnName] = result[columnName].replace(/[^\S\n]/gmi, ' '); + } else { + // merge all whitespace chars + result[columnName] = result[columnName].replace(/\s/gmi, ' '); + } + }); + return result; + }); + + // transform data cells + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + items = items.map(function (item, index) { + var col = Object.create(column); + item[columnName] = column.dataTransform(item[columnName], col, index); + + var changedKeys = Object.keys(col); + // disable default heading transform if we wrote to column.name + if (changedKeys.indexOf('name') !== -1) { + if (column.headingTransform !== DEFAULT_HEADING_TRANSFORM) return; + column.headingTransform = function (heading) { + return heading; + }; + } + changedKeys.forEach(function (key) { + return column[key] = col[key]; + }); + return item; + }); + }); + + // add headers + var headers = {}; + if (options.showHeaders) { + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + + if (!column.showHeaders) { + headers[columnName] = ''; + return; + } + + headers[columnName] = column.headingTransform(column.name); + }); + items.unshift(headers); + } + // get actual max-width between min & max + // based on length of data in columns + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + column.width = items.map(function (item) { + return item[columnName]; + }).reduce(function (min, cur) { + // if already at maxWidth don't bother testing + if (min >= column.maxWidth) return min; + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))); + }, 0); + }); + + // split long words so they can break onto multiple lines + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + items = items.map(function (item) { + item[columnName] = splitLongWords(item[columnName], column.width, column.truncateMarker); + return item; + }); + }); + + // wrap long lines. each item is now an array of lines. + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + items = items.map(function (item, index) { + var cell = item[columnName]; + item[columnName] = splitIntoLines(cell, column.width); + + // if truncating required, only include first line + add truncation char + if (column.truncate && item[columnName].length > 1) { + item[columnName] = splitIntoLines(cell, column.width - wcwidth(column.truncateMarker)); + var firstLine = item[columnName][0]; + if (!endsWith(firstLine, column.truncateMarker)) item[columnName][0] += column.truncateMarker; + item[columnName] = item[columnName].slice(0, 1); + } + return item; + }); + }); + + // recalculate column widths from truncated output/lines + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + column.width = items.map(function (item) { + return item[columnName].reduce(function (min, cur) { + if (min >= column.maxWidth) return min; + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))); + }, 0); + }).reduce(function (min, cur) { + if (min >= column.maxWidth) return min; + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, cur))); + }, 0); + }); + + var rows = createRows(items, columns, columnNames, options.paddingChr); // merge lines into rows + // conceive output + return rows.reduce(function (output, row) { + return output.concat(row.reduce(function (rowOut, line) { + return rowOut.concat(line.join(options.columnSplitter)); + }, [])); + }, []).map(function (line) { + return truncateString(line, maxLineWidth); + }).join(options.spacing); +}; + +/** + * Convert wrapped lines into rows with padded values. + * + * @param Array items data to process + * @param Array columns column width settings for wrapping + * @param Array columnNames column ordering + * @return Array items wrapped in arrays, corresponding to lines + */ + +function createRows(items, columns, columnNames, paddingChr) { + return items.map(function (item) { + var row = []; + var numLines = 0; + columnNames.forEach(function (columnName) { + numLines = Math.max(numLines, item[columnName].length); + }); + // combine matching lines of each rows + + var _loop = function _loop(i) { + row[i] = row[i] || []; + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + var val = item[columnName][i] || ''; // || '' ensures empty columns get padded + if (column.align === 'right') row[i].push(padLeft(val, column.width, paddingChr));else if (column.align === 'center' || column.align === 'centre') row[i].push(padCenter(val, column.width, paddingChr));else row[i].push(padRight(val, column.width, paddingChr)); + }); + }; + + for (var i = 0; i < numLines; i++) { + _loop(i); + } + return row; + }); +} + +/** + * Object.assign + * + * @return Object Object with properties mixed in. + */ + +function mixin() { + var _Object; + + if (Object.assign) return (_Object = Object).assign.apply(_Object, arguments); + return ObjectAssign.apply(undefined, arguments); +} + +function ObjectAssign(target, firstSource) { + "use strict"; + + if (target === undefined || target === null) throw new TypeError("Cannot convert first argument to object"); + + var to = Object(target); + + var hasPendingException = false; + var pendingException; + + for (var i = 1; i < arguments.length; i++) { + var nextSource = arguments[i]; + if (nextSource === undefined || nextSource === null) continue; + + var keysArray = Object.keys(Object(nextSource)); + for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { + var nextKey = keysArray[nextIndex]; + try { + var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) to[nextKey] = nextSource[nextKey]; + } catch (e) { + if (!hasPendingException) { + hasPendingException = true; + pendingException = e; + } + } + } + + if (hasPendingException) throw pendingException; + } + return to; +} + +/** + * Adapted from String.prototype.endsWith polyfill. + */ + +function endsWith(target, searchString, position) { + position = position || target.length; + position = position - searchString.length; + var lastIndex = target.lastIndexOf(searchString); + return lastIndex !== -1 && lastIndex === position; +} + +function toArray(items, columnNames) { + if (Array.isArray(items)) return items; + var rows = []; + for (var key in items) { + var item = {}; + item[columnNames[0] || 'key'] = key; + item[columnNames[1] || 'value'] = items[key]; + rows.push(item); + } + return rows; +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/index.js new file mode 100644 index 00000000..61927e04 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/index.js @@ -0,0 +1,297 @@ +"use strict" + +const wcwidth = require('./width') +const { + padRight, + padCenter, + padLeft, + splitIntoLines, + splitLongWords, + truncateString +} = require('./utils') + +const DEFAULT_HEADING_TRANSFORM = key => key.toUpperCase() + +const DEFAULT_DATA_TRANSFORM = (cell, column, index) => cell + +const DEFAULTS = Object.freeze({ + maxWidth: Infinity, + minWidth: 0, + columnSplitter: ' ', + truncate: false, + truncateMarker: '…', + preserveNewLines: false, + paddingChr: ' ', + showHeaders: true, + headingTransform: DEFAULT_HEADING_TRANSFORM, + dataTransform: DEFAULT_DATA_TRANSFORM +}) + +module.exports = function(items, options = {}) { + + let columnConfigs = options.config || {} + delete options.config // remove config so doesn't appear on every column. + + let maxLineWidth = options.maxLineWidth || Infinity + if (maxLineWidth === 'auto') maxLineWidth = process.stdout.columns || Infinity + delete options.maxLineWidth // this is a line control option, don't pass it to column + + // Option defaults inheritance: + // options.config[columnName] => options => DEFAULTS + options = mixin({}, DEFAULTS, options) + + options.config = options.config || Object.create(null) + + options.spacing = options.spacing || '\n' // probably useless + options.preserveNewLines = !!options.preserveNewLines + options.showHeaders = !!options.showHeaders; + options.columns = options.columns || options.include // alias include/columns, prefer columns if supplied + let columnNames = options.columns || [] // optional user-supplied columns to include + + items = toArray(items, columnNames) + + // if not suppled column names, automatically determine columns from data keys + if (!columnNames.length) { + items.forEach(function(item) { + for (let columnName in item) { + if (columnNames.indexOf(columnName) === -1) columnNames.push(columnName) + } + }) + } + + // initialize column defaults (each column inherits from options.config) + let columns = columnNames.reduce((columns, columnName) => { + let column = Object.create(options) + columns[columnName] = mixin(column, columnConfigs[columnName]) + return columns + }, Object.create(null)) + + // sanitize column settings + columnNames.forEach(columnName => { + let column = columns[columnName] + column.name = columnName + column.maxWidth = Math.ceil(column.maxWidth) + column.minWidth = Math.ceil(column.minWidth) + column.truncate = !!column.truncate + column.align = column.align || 'left' + }) + + // sanitize data + items = items.map(item => { + let result = Object.create(null) + columnNames.forEach(columnName => { + // null/undefined -> '' + result[columnName] = item[columnName] != null ? item[columnName] : '' + // toString everything + result[columnName] = '' + result[columnName] + if (columns[columnName].preserveNewLines) { + // merge non-newline whitespace chars + result[columnName] = result[columnName].replace(/[^\S\n]/gmi, ' ') + } else { + // merge all whitespace chars + result[columnName] = result[columnName].replace(/\s/gmi, ' ') + } + }) + return result + }) + + // transform data cells + columnNames.forEach(columnName => { + let column = columns[columnName] + items = items.map((item, index) => { + let col = Object.create(column) + item[columnName] = column.dataTransform(item[columnName], col, index) + + let changedKeys = Object.keys(col) + // disable default heading transform if we wrote to column.name + if (changedKeys.indexOf('name') !== -1) { + if (column.headingTransform !== DEFAULT_HEADING_TRANSFORM) return + column.headingTransform = heading => heading + } + changedKeys.forEach(key => column[key] = col[key]) + return item + }) + }) + + // add headers + let headers = {} + if(options.showHeaders) { + columnNames.forEach(columnName => { + let column = columns[columnName] + + if(!column.showHeaders){ + headers[columnName] = ''; + return; + } + + headers[columnName] = column.headingTransform(column.name) + }) + items.unshift(headers) + } + // get actual max-width between min & max + // based on length of data in columns + columnNames.forEach(columnName => { + let column = columns[columnName] + column.width = items + .map(item => item[columnName]) + .reduce((min, cur) => { + // if already at maxWidth don't bother testing + if (min >= column.maxWidth) return min + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))) + }, 0) + }) + + // split long words so they can break onto multiple lines + columnNames.forEach(columnName => { + let column = columns[columnName] + items = items.map(item => { + item[columnName] = splitLongWords(item[columnName], column.width, column.truncateMarker) + return item + }) + }) + + // wrap long lines. each item is now an array of lines. + columnNames.forEach(columnName => { + let column = columns[columnName] + items = items.map((item, index) => { + let cell = item[columnName] + item[columnName] = splitIntoLines(cell, column.width) + + // if truncating required, only include first line + add truncation char + if (column.truncate && item[columnName].length > 1) { + item[columnName] = splitIntoLines(cell, column.width - wcwidth(column.truncateMarker)) + let firstLine = item[columnName][0] + if (!endsWith(firstLine, column.truncateMarker)) item[columnName][0] += column.truncateMarker + item[columnName] = item[columnName].slice(0, 1) + } + return item + }) + }) + + // recalculate column widths from truncated output/lines + columnNames.forEach(columnName => { + let column = columns[columnName] + column.width = items.map(item => { + return item[columnName].reduce((min, cur) => { + if (min >= column.maxWidth) return min + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))) + }, 0) + }).reduce((min, cur) => { + if (min >= column.maxWidth) return min + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, cur))) + }, 0) + }) + + + let rows = createRows(items, columns, columnNames, options.paddingChr) // merge lines into rows + // conceive output + return rows.reduce((output, row) => { + return output.concat(row.reduce((rowOut, line) => { + return rowOut.concat(line.join(options.columnSplitter)) + }, [])) + }, []) + .map(line => truncateString(line, maxLineWidth)) + .join(options.spacing) +} + +/** + * Convert wrapped lines into rows with padded values. + * + * @param Array items data to process + * @param Array columns column width settings for wrapping + * @param Array columnNames column ordering + * @return Array items wrapped in arrays, corresponding to lines + */ + +function createRows(items, columns, columnNames, paddingChr) { + return items.map(item => { + let row = [] + let numLines = 0 + columnNames.forEach(columnName => { + numLines = Math.max(numLines, item[columnName].length) + }) + // combine matching lines of each rows + for (let i = 0; i < numLines; i++) { + row[i] = row[i] || [] + columnNames.forEach(columnName => { + let column = columns[columnName] + let val = item[columnName][i] || '' // || '' ensures empty columns get padded + if (column.align === 'right') row[i].push(padLeft(val, column.width, paddingChr)) + else if (column.align === 'center' || column.align === 'centre') row[i].push(padCenter(val, column.width, paddingChr)) + else row[i].push(padRight(val, column.width, paddingChr)) + }) + } + return row + }) +} + +/** + * Object.assign + * + * @return Object Object with properties mixed in. + */ + +function mixin(...args) { + if (Object.assign) return Object.assign(...args) + return ObjectAssign(...args) +} + +function ObjectAssign(target, firstSource) { + "use strict"; + if (target === undefined || target === null) + throw new TypeError("Cannot convert first argument to object"); + + var to = Object(target); + + var hasPendingException = false; + var pendingException; + + for (var i = 1; i < arguments.length; i++) { + var nextSource = arguments[i]; + if (nextSource === undefined || nextSource === null) + continue; + + var keysArray = Object.keys(Object(nextSource)); + for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { + var nextKey = keysArray[nextIndex]; + try { + var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) + to[nextKey] = nextSource[nextKey]; + } catch (e) { + if (!hasPendingException) { + hasPendingException = true; + pendingException = e; + } + } + } + + if (hasPendingException) + throw pendingException; + } + return to; +} + +/** + * Adapted from String.prototype.endsWith polyfill. + */ + +function endsWith(target, searchString, position) { + position = position || target.length; + position = position - searchString.length; + let lastIndex = target.lastIndexOf(searchString); + return lastIndex !== -1 && lastIndex === position; +} + + +function toArray(items, columnNames) { + if (Array.isArray(items)) return items + let rows = [] + for (let key in items) { + let item = {} + item[columnNames[0] || 'key'] = key + item[columnNames[1] || 'value'] = items[key] + rows.push(item) + } + return rows +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/package.json new file mode 100644 index 00000000..9fbbd039 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/package.json @@ -0,0 +1,74 @@ +{ + "name": "columnify", + "version": "1.5.4", + "description": "Render data in text columns. Supports in-column text-wrap.", + "main": "columnify.js", + "scripts": { + "pretest": "npm prune", + "test": "make prepublish && tape test/*.js | tap-spec", + "bench": "npm test && node bench", + "prepublish": "make prepublish" + }, + "babel": { + "presets": [ + "es2015" + ] + }, + "author": { + "name": "Tim Oxley" + }, + "license": "MIT", + "devDependencies": { + "babel": "^6.3.26", + "babel-cli": "^6.3.17", + "babel-preset-es2015": "^6.3.13", + "chalk": "^1.1.1", + "tap-spec": "^4.1.1", + "tape": "^4.4.0" + }, + "repository": { + "type": "git", + "url": "git://github.com/timoxley/columnify.git" + }, + "keywords": [ + "column", + "text", + "ansi", + "console", + "terminal", + "wrap", + "table" + ], + "bugs": { + "url": "https://github.com/timoxley/columnify/issues" + }, + "homepage": "https://github.com/timoxley/columnify", + "dependencies": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + }, + "directories": { + "test": "test" + }, + "gitHead": "b5373b3d6344bf59e1ab63c912c188c34bce5889", + "_id": "columnify@1.5.4", + "_shasum": "4737ddf1c7b69a8a7c340570782e947eec8e78bb", + "_from": "columnify@latest", + "_npmVersion": "2.14.7", + "_nodeVersion": "4.2.3", + "_npmUser": { + "name": "timoxley", + "email": "secoif@gmail.com" + }, + "maintainers": [ + { + "name": "timoxley", + "email": "secoif@gmail.com" + } + ], + "dist": { + "shasum": "4737ddf1c7b69a8a7c340570782e947eec8e78bb", + "tarball": "http://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz" + }, + "_resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/utils.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/utils.js new file mode 100644 index 00000000..22a1aaeb --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/utils.js @@ -0,0 +1,193 @@ +"use strict" + +var wcwidth = require('./width') + +/** + * repeat string `str` up to total length of `len` + * + * @param String str string to repeat + * @param Number len total length of output string + */ + +function repeatString(str, len) { + return Array.apply(null, {length: len + 1}).join(str).slice(0, len) +} + +/** + * Pad `str` up to total length `max` with `chr`. + * If `str` is longer than `max`, padRight will return `str` unaltered. + * + * @param String str string to pad + * @param Number max total length of output string + * @param String chr optional. Character to pad with. default: ' ' + * @return String padded str + */ + +function padRight(str, max, chr) { + str = str != null ? str : '' + str = String(str) + var length = max - wcwidth(str) + if (length <= 0) return str + return str + repeatString(chr || ' ', length) +} + +/** + * Pad `str` up to total length `max` with `chr`. + * If `str` is longer than `max`, padCenter will return `str` unaltered. + * + * @param String str string to pad + * @param Number max total length of output string + * @param String chr optional. Character to pad with. default: ' ' + * @return String padded str + */ + +function padCenter(str, max, chr) { + str = str != null ? str : '' + str = String(str) + var length = max - wcwidth(str) + if (length <= 0) return str + var lengthLeft = Math.floor(length/2) + var lengthRight = length - lengthLeft + return repeatString(chr || ' ', lengthLeft) + str + repeatString(chr || ' ', lengthRight) +} + +/** + * Pad `str` up to total length `max` with `chr`, on the left. + * If `str` is longer than `max`, padRight will return `str` unaltered. + * + * @param String str string to pad + * @param Number max total length of output string + * @param String chr optional. Character to pad with. default: ' ' + * @return String padded str + */ + +function padLeft(str, max, chr) { + str = str != null ? str : '' + str = String(str) + var length = max - wcwidth(str) + if (length <= 0) return str + return repeatString(chr || ' ', length) + str +} + +/** + * Split a String `str` into lines of maxiumum length `max`. + * Splits on word boundaries. Preserves existing new lines. + * + * @param String str string to split + * @param Number max length of each line + * @return Array Array containing lines. + */ + +function splitIntoLines(str, max) { + function _splitIntoLines(str, max) { + return str.trim().split(' ').reduce(function(lines, word) { + var line = lines[lines.length - 1] + if (line && wcwidth(line.join(' ')) + wcwidth(word) < max) { + lines[lines.length - 1].push(word) // add to line + } + else lines.push([word]) // new line + return lines + }, []).map(function(l) { + return l.join(' ') + }) + } + return str.split('\n').map(function(str) { + return _splitIntoLines(str, max) + }).reduce(function(lines, line) { + return lines.concat(line) + }, []) +} + +/** + * Add spaces and `truncationChar` between words of + * `str` which are longer than `max`. + * + * @param String str string to split + * @param Number max length of each line + * @param Number truncationChar character to append to split words + * @return String + */ + +function splitLongWords(str, max, truncationChar) { + str = str.trim() + var result = [] + var words = str.split(' ') + var remainder = '' + + var truncationWidth = wcwidth(truncationChar) + + while (remainder || words.length) { + if (remainder) { + var word = remainder + remainder = '' + } else { + var word = words.shift() + } + + if (wcwidth(word) > max) { + // slice is based on length no wcwidth + var i = 0 + var wwidth = 0 + var limit = max - truncationWidth + while (i < word.length) { + var w = wcwidth(word.charAt(i)) + if (w + wwidth > limit) { + break + } + wwidth += w + ++i + } + + remainder = word.slice(i) // get remainder + // save remainder for next loop + + word = word.slice(0, i) // grab truncated word + word += truncationChar // add trailing … or whatever + } + result.push(word) + } + + return result.join(' ') +} + + +/** + * Truncate `str` into total width `max` + * If `str` is shorter than `max`, will return `str` unaltered. + * + * @param String str string to truncated + * @param Number max total wcwidth of output string + * @return String truncated str + */ + +function truncateString(str, max) { + + str = str != null ? str : '' + str = String(str) + + if(max == Infinity) return str + + var i = 0 + var wwidth = 0 + while (i < str.length) { + var w = wcwidth(str.charAt(i)) + if(w + wwidth > max) + break + wwidth += w + ++i + } + return str.slice(0, i) +} + + + +/** + * Exports + */ + +module.exports.padRight = padRight +module.exports.padCenter = padCenter +module.exports.padLeft = padLeft +module.exports.splitIntoLines = splitIntoLines +module.exports.splitLongWords = splitLongWords +module.exports.truncateString = truncateString diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/width.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/width.js new file mode 100644 index 00000000..bc061d03 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/columnify/width.js @@ -0,0 +1,6 @@ +var stripAnsi = require('strip-ansi') +var wcwidth = require('wcwidth') + +module.exports = function(str) { + return wcwidth(stripAnsi(str)) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/.npmignore new file mode 100644 index 00000000..19edf194 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/LICENCE b/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/LICENCE new file mode 100644 index 00000000..8cff3cf9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/index.js new file mode 100644 index 00000000..588ee646 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/index.js @@ -0,0 +1,282 @@ +var ProtoList = require('proto-list') + , path = require('path') + , fs = require('fs') + , ini = require('ini') + , EE = require('events').EventEmitter + , url = require('url') + , http = require('http') + +var exports = module.exports = function () { + var args = [].slice.call(arguments) + , conf = new ConfigChain() + + while(args.length) { + var a = args.shift() + if(a) conf.push + ( 'string' === typeof a + ? json(a) + : a ) + } + + return conf +} + +//recursively find a file... + +var find = exports.find = function () { + var rel = path.join.apply(null, [].slice.call(arguments)) + + function find(start, rel) { + var file = path.join(start, rel) + try { + fs.statSync(file) + return file + } catch (err) { + if(path.dirname(start) !== start) // root + return find(path.dirname(start), rel) + } + } + return find(__dirname, rel) +} + +var parse = exports.parse = function (content, file, type) { + content = '' + content + // if we don't know what it is, try json and fall back to ini + // if we know what it is, then it must be that. + if (!type) { + try { return JSON.parse(content) } + catch (er) { return ini.parse(content) } + } else if (type === 'json') { + if (this.emit) { + try { return JSON.parse(content) } + catch (er) { this.emit('error', er) } + } else { + return JSON.parse(content) + } + } else { + return ini.parse(content) + } +} + +var json = exports.json = function () { + var args = [].slice.call(arguments).filter(function (arg) { return arg != null }) + var file = path.join.apply(null, args) + var content + try { + content = fs.readFileSync(file,'utf-8') + } catch (err) { + return + } + return parse(content, file, 'json') +} + +var env = exports.env = function (prefix, env) { + env = env || process.env + var obj = {} + var l = prefix.length + for(var k in env) { + if(k.indexOf(prefix) === 0) + obj[k.substring(l)] = env[k] + } + + return obj +} + +exports.ConfigChain = ConfigChain +function ConfigChain () { + EE.apply(this) + ProtoList.apply(this, arguments) + this._awaiting = 0 + this._saving = 0 + this.sources = {} +} + +// multi-inheritance-ish +var extras = { + constructor: { value: ConfigChain } +} +Object.keys(EE.prototype).forEach(function (k) { + extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k) +}) +ConfigChain.prototype = Object.create(ProtoList.prototype, extras) + +ConfigChain.prototype.del = function (key, where) { + // if not specified where, then delete from the whole chain, scorched + // earth style + if (where) { + var target = this.sources[where] + target = target && target.data + if (!target) { + return this.emit('error', new Error('not found '+where)) + } + delete target[key] + } else { + for (var i = 0, l = this.list.length; i < l; i ++) { + delete this.list[i][key] + } + } + return this +} + +ConfigChain.prototype.set = function (key, value, where) { + var target + + if (where) { + target = this.sources[where] + target = target && target.data + if (!target) { + return this.emit('error', new Error('not found '+where)) + } + } else { + target = this.list[0] + if (!target) { + return this.emit('error', new Error('cannot set, no confs!')) + } + } + target[key] = value + return this +} + +ConfigChain.prototype.get = function (key, where) { + if (where) { + where = this.sources[where] + if (where) where = where.data + if (where && Object.hasOwnProperty.call(where, key)) return where[key] + return undefined + } + return this.list[0][key] +} + +ConfigChain.prototype.save = function (where, type, cb) { + if (typeof type === 'function') cb = type, type = null + var target = this.sources[where] + if (!target || !(target.path || target.source) || !target.data) { + // TODO: maybe save() to a url target could be a PUT or something? + // would be easy to swap out with a reddis type thing, too + return this.emit('error', new Error('bad save target: '+where)) + } + + if (target.source) { + var pref = target.prefix || '' + Object.keys(target.data).forEach(function (k) { + target.source[pref + k] = target.data[k] + }) + return this + } + + var type = type || target.type + var data = target.data + if (target.type === 'json') { + data = JSON.stringify(data) + } else { + data = ini.stringify(data) + } + + this._saving ++ + fs.writeFile(target.path, data, 'utf8', function (er) { + this._saving -- + if (er) { + if (cb) return cb(er) + else return this.emit('error', er) + } + if (this._saving === 0) { + if (cb) cb() + this.emit('save') + } + }.bind(this)) + return this +} + +ConfigChain.prototype.addFile = function (file, type, name) { + name = name || file + var marker = {__source__:name} + this.sources[name] = { path: file, type: type } + this.push(marker) + this._await() + fs.readFile(file, 'utf8', function (er, data) { + if (er) this.emit('error', er) + this.addString(data, file, type, marker) + }.bind(this)) + return this +} + +ConfigChain.prototype.addEnv = function (prefix, env, name) { + name = name || 'env' + var data = exports.env(prefix, env) + this.sources[name] = { data: data, source: env, prefix: prefix } + return this.add(data, name) +} + +ConfigChain.prototype.addUrl = function (req, type, name) { + this._await() + var href = url.format(req) + name = name || href + var marker = {__source__:name} + this.sources[name] = { href: href, type: type } + this.push(marker) + http.request(req, function (res) { + var c = [] + var ct = res.headers['content-type'] + if (!type) { + type = ct.indexOf('json') !== -1 ? 'json' + : ct.indexOf('ini') !== -1 ? 'ini' + : href.match(/\.json$/) ? 'json' + : href.match(/\.ini$/) ? 'ini' + : null + marker.type = type + } + + res.on('data', c.push.bind(c)) + .on('end', function () { + this.addString(Buffer.concat(c), href, type, marker) + }.bind(this)) + .on('error', this.emit.bind(this, 'error')) + + }.bind(this)) + .on('error', this.emit.bind(this, 'error')) + .end() + + return this +} + +ConfigChain.prototype.addString = function (data, file, type, marker) { + data = this.parse(data, file, type) + this.add(data, marker) + return this +} + +ConfigChain.prototype.add = function (data, marker) { + if (marker && typeof marker === 'object') { + var i = this.list.indexOf(marker) + if (i === -1) { + return this.emit('error', new Error('bad marker')) + } + this.splice(i, 1, data) + marker = marker.__source__ + this.sources[marker] = this.sources[marker] || {} + this.sources[marker].data = data + // we were waiting for this. maybe emit 'load' + this._resolve() + } else { + if (typeof marker === 'string') { + this.sources[marker] = this.sources[marker] || {} + this.sources[marker].data = data + } + // trigger the load event if nothing was already going to do so. + this._await() + this.push(data) + process.nextTick(this._resolve.bind(this)) + } + return this +} + +ConfigChain.prototype.parse = exports.parse + +ConfigChain.prototype._await = function () { + this._awaiting++ +} + +ConfigChain.prototype._resolve = function () { + this._awaiting-- + if (this._awaiting === 0) this.emit('load', this) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/package.json new file mode 100644 index 00000000..854b983d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/package.json @@ -0,0 +1,61 @@ +{ + "name": "config-chain", + "version": "1.1.10", + "licenses": [ + { + "type": "MIT", + "url": "https://raw.githubusercontent.com/dominictarr/config-chain/master/LICENCE" + } + ], + "description": "HANDLE CONFIGURATION ONCE AND FOR ALL", + "homepage": "http://github.com/dominictarr/config-chain", + "repository": { + "type": "git", + "url": "git+https://github.com/dominictarr/config-chain.git" + }, + "dependencies": { + "proto-list": "~1.2.1", + "ini": "^1.3.4" + }, + "devDependencies": { + "tap": "0.3.0" + }, + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://dominictarr.com" + }, + "scripts": { + "test": "tap test/" + }, + "gitHead": "0b6db3e14b9cdbe31460292bc4caf3983f977816", + "bugs": { + "url": "https://github.com/dominictarr/config-chain/issues" + }, + "_id": "config-chain@1.1.10", + "_shasum": "7fc383de0fcc84d711cb465bd176579cad612346", + "_from": "config-chain@latest", + "_npmVersion": "3.3.12", + "_nodeVersion": "5.3.0", + "_npmUser": { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + }, + "dist": { + "shasum": "7fc383de0fcc84d711cb465bd176579cad612346", + "tarball": "http://registry.npmjs.org/config-chain/-/config-chain-1.1.10.tgz" + }, + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + }, + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.10.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/readme.markdown b/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/readme.markdown new file mode 100644 index 00000000..f6775f32 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/config-chain/readme.markdown @@ -0,0 +1,228 @@ +#config-chain + +USE THIS MODULE TO LOAD ALL YOUR CONFIGURATIONS + +``` js + + //npm install config-chain + + var cc = require('config-chain') + , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS. + , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS. + + // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN + // EARLIER ITEMS OVERIDE LATER ITEMS + // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST! + + //strings are interpereted as filenames. + //will be loaded synchronously + + var conf = + cc( + //OVERRIDE SETTINGS WITH COMMAND LINE OPTS + opts, + + //ENV VARS IF PREFIXED WITH 'myApp_' + + cc.env('myApp_'), //myApp_foo = 'like this' + + //FILE NAMED BY ENV + path.join(__dirname, 'config.' + env + '.json'), + + //IF `env` is PRODUCTION + env === 'prod' + ? path.join(__dirname, 'special.json') //load a special file + : null //NULL IS IGNORED! + + //SUBDIR FOR ENV CONFIG + path.join(__dirname, 'config', env, 'config.json'), + + //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE + cc.find('config.json'), + + //PUT DEFAULTS LAST + { + host: 'localhost' + port: 8000 + }) + + var host = conf.get('host') + + // or + + var host = conf.store.host + +``` + +FINALLY, EASY FLEXIBLE CONFIGURATIONS! + +##see also: [proto-list](https://github.com/isaacs/proto-list/) + +WHATS THAT YOU SAY? + +YOU WANT A "CLASS" SO THAT YOU CAN DO CRAYCRAY JQUERY CRAPS? + +EXTEND WITH YOUR OWN FUNCTIONALTY!? + +## CONFIGCHAIN LIVES TO SERVE ONLY YOU! + +```javascript +var cc = require('config-chain') + +// all the stuff you did before +var config = cc({ + some: 'object' + }, + cc.find('config.json'), + cc.env('myApp_') + ) + // CONFIGS AS A SERVICE, aka "CaaS", aka EVERY DEVOPS DREAM OMG! + .addUrl('http://configurator:1234/my-configs') + // ASYNC FTW! + .addFile('/path/to/file.json') + + // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT + // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST + // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE + .add({ another: 'object' }) + + // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!! + .on('error', function (er) { + // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW + // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\ + throw er + }) + + // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!! + .on('load', function (config) { + console.awesome('HOLY SHIT!') + }) +``` + +# BORING API DOCS + +## cc(...args) + +MAKE A CHAIN AND ADD ALL THE ARGS. + +If the arg is a STRING, then it shall be a JSON FILENAME. + +SYNC I/O! + +RETURN THE CHAIN! + +## cc.json(...args) + +Join the args INTO A JSON FILENAME! + +SYNC I/O! + +## cc.find(relativePath) + +SEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES. + +RETURN THE FOUND PATH! + +SYNC I/O! + +## cc.parse(content, file, type) + +Parse the content string, and guess the type from either the +specified type or the filename. + +RETURN THE RESULTING OBJECT! + +NO I/O! + +## cc.env(prefix, env=process.env) + +Get all the keys on the provided env object (or process.env) which are +prefixed by the specified prefix, and put the values on a new object. + +RETURN THE RESULTING OBJECT! + +NO I/O! + +## cc.ConfigChain() + +The ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING! + +One of these is returned by the main exported function, as well. + +It inherits (prototypically) from +[ProtoList](https://github.com/isaacs/proto-list/), and also inherits +(parasitically) from +[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter) + +It has all the methods from both, and except where noted, they are +unchanged. + +### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain. + +## chain.sources + +A list of all the places where it got stuff. The keys are the names +passed to addFile or addUrl etc, and the value is an object with some +info about the data source. + +## chain.addFile(filename, type, [name=filename]) + +Filename is the name of the file. Name is an arbitrary string to be +used later if you desire. Type is either 'ini' or 'json', and will +try to guess intelligently if omitted. + +Loaded files can be saved later. + +## chain.addUrl(url, type, [name=url]) + +Same as the filename thing, but with a url. + +Can't be saved later. + +## chain.addEnv(prefix, env, [name='env']) + +Add all the keys from the env object that start with the prefix. + +## chain.addString(data, file, type, [name]) + +Parse the string and add it to the set. (Mainly used internally.) + +## chain.add(object, [name]) + +Add the object to the set. + +## chain.root {Object} + +The root from which all the other config objects in the set descend +prototypically. + +Put your defaults here. + +## chain.set(key, value, name) + +Set the key to the value on the named config object. If name is +unset, then set it on the first config object in the set. (That is, +the one with the highest priority, which was added first.) + +## chain.get(key, [name]) + +Get the key from the named config object explicitly, or from the +resolved configs if not specified. + +## chain.save(name, type) + +Write the named config object back to its origin. + +Currently only supported for env and file config types. + +For files, encode the data according to the type. + +## chain.on('save', function () {}) + +When one or more files are saved, emits `save` event when they're all +saved. + +## chain.on('load', function (chain) {}) + +When the config chain has loaded all the specified files and urls and +such, the 'load' event fires. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/.travis.yml new file mode 100644 index 00000000..e742b52c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +before_script: npm install -g npm@latest +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/README.md new file mode 100644 index 00000000..fbe614f0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/README.md @@ -0,0 +1,29 @@ +# dezalgo + +Contain async insanity so that the dark pony lord doesn't eat souls + +See [this blog +post](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony). + +## USAGE + +Pass a callback to `dezalgo` and it will ensure that it is *always* +called in a future tick, and never in this tick. + +```javascript +var dz = require('dezalgo') + +var cache = {} +function maybeSync(arg, cb) { + cb = dz(cb) + + // this will actually defer to nextTick + if (cache[arg]) cb(null, cache[arg]) + + fs.readFile(arg, function (er, data) { + // since this is *already* defered, it will call immediately + if (er) cb(er) + cb(null, cache[arg] = data) + }) +} +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/dezalgo.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/dezalgo.js new file mode 100644 index 00000000..3d3b39c8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/dezalgo.js @@ -0,0 +1,22 @@ +var wrappy = require('wrappy') +module.exports = wrappy(dezalgo) + +var asap = require('asap') + +function dezalgo (cb) { + var sync = true + asap(function () { + sync = false + }) + + return function zalgoSafe() { + var args = arguments + var me = this + if (sync) + asap(function() { + cb.apply(me, args) + }) + else + cb.apply(me, args) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/package.json new file mode 100644 index 00000000..8997465c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/dezalgo/package.json @@ -0,0 +1,52 @@ +{ + "name": "dezalgo", + "version": "1.0.3", + "description": "Contain async insanity so that the dark pony lord doesn't eat souls", + "main": "dezalgo.js", + "directories": { + "test": "test" + }, + "dependencies": { + "asap": "^2.0.0", + "wrappy": "1" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/dezalgo.git" + }, + "keywords": [ + "async", + "zalgo", + "the dark pony", + "he comes", + "asynchrony of all holy and good", + "T̯̪ͅo̯͖̹ ̻̮̖̲͢i̥̖n̢͈͇̝͍v͏͉ok̭̬̝ͅe̞͍̩̫͍̩͝ ̩̮̖̟͇͉́t͔͔͎̗h͏̗̟e̘͉̰̦̠̞͓ ͕h͉̟͎̪̠̱͠ḭ̮̩v̺͉͇̩e̵͖-̺̪m͍i̜n̪̲̲̲̮d̷ ̢r̠̼̯̹̦̦͘ͅe͓̳͓̙p̺̗̫͙͘ͅr͔̰͜e̴͓̞s͉̩̩͟ͅe͏̣n͚͇̗̭̺͍tì͙̣n͏̖̥̗͎̰̪g̞͓̭̱̯̫̕ ̣̱͜ͅc̦̰̰̠̮͎͙̀hao̺̜̻͍͙ͅs͉͓̘.͎̼̺̼͕̹͘", + "̠̞̱̰I͖͇̝̻n̦̰͍̰̟v̤̺̫̳̭̼̗͘ò̹̟̩̩͚k̢̥̠͍͉̦̬i̖͓͔̮̱̻͘n̶̳͙̫͎g̖̯̣̲̪͉ ̞͎̗͕͚ͅt̲͕̘̺̯̗̦h̘̦̲̜̻e̳͎͉̬͙ ̴̞̪̲̥f̜̯͓͓̭̭͢e̱̘͔̮e̜̤l̺̱͖̯͓͙͈͢i̵̦̬͉͔̫͚͕n͉g̨͖̙̙̹̹̟̤ ͉̪o̞̠͍̪̰͙ͅf̬̲̺ ͔͕̲͕͕̲̕c̙͉h̝͔̩̙̕ͅa̲͖̻̗̹o̥̼̫s̝̖̜̝͚̫̟.̺͚ ̸̱̲W̶̥̣͖̦i͏̤̬̱̳̣ͅt͉h̗̪̪ ̷̱͚̹̪ǫ͕̗̣̳̦͎u̼̦͔̥̮̕ţ͖͎̻͔͉ ̴͎̩òr̹̰̖͉͈͝d̷̲̦̖͓e̲͓̠r", + "̧͚̜͓̰̭̭Ṯ̫̹̜̮̟̮͝h͚̘̩̘̖̰́e ̥̘͓͉͔͙̼N̟̜̣̘͔̪e̞̞̤͢z̰̖̘͇p̠͟e̺̱̣͍͙̝ṛ̘̬͔̙͇̠d͝ḭ̯̱̥̗̩a̛ͅn͏̦ ̷̥hi̥v̖̳̹͉̮̱͝e̹̪̘̖̰̟-̴͙͓͚̜̻mi̗̺̻͙̺ͅn̪̯͈d ͏̘͓̫̳ͅơ̹͔̳̖̣͓f͈̹̘ ͕ͅc̗̤̠̜̮̥̥h̡͍̩̭̫͚̱a̤͉̤͔͜os͕̤̼͍̲̀ͅ.̡̱ ̦Za̯̱̗̭͍̣͚l̗͉̰̤g͏̣̭̬̗̲͖ͅo̶̭̩̳̟͈.̪̦̰̳", + "H̴̱̦̗̬̣͓̺e̮ ͉̠̰̞͎̖͟ẁh̛̺̯ͅo̖̫͡ ̢Ẁa̡̗i̸t͖̣͉̀ş͔̯̩ ̤̦̮͇̞̦̲B͎̭͇̦̼e̢hin͏͙̟̪d̴̰͓̻̣̮͕ͅ T͖̮̕h͖e̘̺̰̙͘ ̥Ẁ̦͔̻͚a̞͖̪͉l̪̠̻̰̣̠l̲͎͞", + "Z̘͍̼͎̣͔͝Ą̲̜̱̱̹̤͇L̶̝̰̭͔G͍̖͍O̫͜ͅ!̼̤ͅ", + "H̝̪̜͓̀̌̂̒E̢̙̠̣ ̴̳͇̥̟̠͍̐C̹̓̑̐̆͝Ó̶̭͓̚M̬̼Ĕ̖̤͔͔̟̹̽̿̊ͥ̍ͫS̻̰̦̻̖̘̱̒ͪ͌̅͟" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/dezalgo/issues" + }, + "homepage": "https://github.com/npm/dezalgo", + "readme": "# dezalgo\n\nContain async insanity so that the dark pony lord doesn't eat souls\n\nSee [this blog\npost](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony).\n\n## USAGE\n\nPass a callback to `dezalgo` and it will ensure that it is *always*\ncalled in a future tick, and never in this tick.\n\n```javascript\nvar dz = require('dezalgo')\n\nvar cache = {}\nfunction maybeSync(arg, cb) {\n cb = dz(cb)\n\n // this will actually defer to nextTick\n if (cache[arg]) cb(null, cache[arg])\n\n fs.readFile(arg, function (er, data) {\n // since this is *already* defered, it will call immediately\n if (er) cb(er)\n cb(null, cache[arg] = data)\n })\n}\n```\n", + "readmeFilename": "README.md", + "gitHead": "d4d3f3f6f47b1a326194d5281349c83dde258458", + "_id": "dezalgo@1.0.3", + "_shasum": "7f742de066fc748bc8db820569dddce49bf0d456", + "_from": "dezalgo@>=1.0.3 <1.1.0" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/LICENSE new file mode 100644 index 00000000..833ab5d3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/LICENSE @@ -0,0 +1,21 @@ +Copyright 2013 James Halliday (mail@substack.net) + +This project is free software released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/README.markdown b/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/README.markdown new file mode 100644 index 00000000..27b860d1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/README.markdown @@ -0,0 +1,54 @@ +editor +====== + +Launch $EDITOR in your program. + +example +======= + +``` js +var editor = require('editor'); +editor('beep.json', function (code, sig) { + console.log('finished editing with code ' + code); +}); +``` + +*** + +``` +$ node edit.js +``` + +![editor](http://substack.net/images/screenshots/editor.png) + +``` +finished editing with code 0 +``` + +methods +======= + +``` js +var editor = require('editor') +``` + +editor(file, opts={}, cb) +------------------------- + +Launch the `$EDITOR` (or `opts.editor`) for `file`. + +When the editor exits, `cb(code, sig)` fires. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install editor +``` + +license +======= + +MIT diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/index.js new file mode 100644 index 00000000..ba1a42b9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/index.js @@ -0,0 +1,20 @@ +var spawn = require('child_process').spawn; + +module.exports = function (file, opts, cb) { + if (typeof opts === 'function') { + cb = opts; + opts = {}; + } + if (!opts) opts = {}; + + var ed = /^win/.test(process.platform) ? 'notepad' : 'vim'; + var editor = opts.editor || process.env.VISUAL || process.env.EDITOR || ed; + var args = editor.split(/\s+/); + var bin = args.shift(); + + var ps = spawn(bin, args.concat([ file ]), { stdio: 'inherit' }); + + ps.on('exit', function (code, sig) { + if (typeof cb === 'function') cb(code, sig) + }); +}; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/package.json new file mode 100644 index 00000000..a11d2277 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/editor/package.json @@ -0,0 +1,60 @@ +{ + "name": "editor", + "version": "1.0.0", + "description": "launch $EDITOR in your program", + "main": "index.js", + "directories": { + "example": "example", + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "~0.4.4" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/node-editor.git" + }, + "homepage": "https://github.com/substack/node-editor", + "keywords": [ + "text", + "edit", + "shell" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "engine": { + "node": ">=0.6" + }, + "gitHead": "15200af2c417c65a4df153f39f32143dcd476375", + "bugs": { + "url": "https://github.com/substack/node-editor/issues" + }, + "_id": "editor@1.0.0", + "_shasum": "60c7f87bd62bcc6a894fa8ccd6afb7823a24f742", + "_from": "editor@>=1.0.0 <1.1.0", + "_npmVersion": "2.7.5", + "_nodeVersion": "1.6.3", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "60c7f87bd62bcc6a894fa8ccd6afb7823a24f742", + "tarball": "http://registry.npmjs.org/editor/-/editor-1.0.0.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "_resolved": "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/.eslintrc b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/.eslintrc new file mode 100644 index 00000000..8afd0e88 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/.eslintrc @@ -0,0 +1,18 @@ +{ + "env" : { + "node" : true + }, + "rules" : { + "curly" : 0, + "no-lonely-if" : 1, + "no-mixed-requires" : 0, + "no-underscore-dangle" : 0, + "no-unused-vars" : [2, {"vars" : "all", "args" : "after-used"}], + "no-use-before-define" : [2, "nofunc"], + "quotes" : [1, "double", "avoid-escape"], + "semi" : [2, "never"], + "space-after-keywords" : 1, + "space-infix-ops" : 0, + "strict" : 0 + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/.npmignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/LICENSE new file mode 100644 index 00000000..2be9c78b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Forrest L Norvell + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/README.md new file mode 100644 index 00000000..87ce0cae --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/README.md @@ -0,0 +1,33 @@ +# fs-vacuum + +Remove the empty branches of a directory tree, optionally up to (but not +including) a specified base directory. Optionally nukes the leaf directory. + +## Usage + +```javascript +var logger = require("npmlog"); +var vacuum = require("fs-vacuum"); + +var options = { + base : "/path/to/my/tree/root", + purge : true, + log : logger.silly.bind(logger, "myCleanup") +}; + +/* Assuming there are no other files or directories in "out", "to", or "my", + * the final path will just be "/path/to/my/tree/root". + */ +vacuum("/path/to/my/tree/root/out/to/my/files", function (error) { + if (error) console.error("Unable to cleanly vacuum:", error.message); +}); +``` +# vacuum(directory, options, callback) + +* `directory` {String} Leaf node to remove. **Must be a directory, symlink, or file.** +* `options` {Object} + * `base` {String} No directories at or above this level of the filesystem will be removed. + * `purge` {Boolean} If set, nuke the whole leaf directory, including its contents. + * `log` {Function} A logging function that takes `npmlog`-compatible argument lists. +* `callback` {Function} Function to call once vacuuming is complete. + * `error` {Error} What went wrong along the way, if anything. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/package.json new file mode 100644 index 00000000..97813203 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/package.json @@ -0,0 +1,43 @@ +{ + "name": "fs-vacuum", + "version": "1.2.7", + "description": "recursively remove empty directories -- to a point", + "main": "vacuum.js", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fs-vacuum.git" + }, + "keywords": [ + "rm", + "rimraf", + "clean" + ], + "author": { + "name": "Forrest L Norvell", + "email": "ogd@aoaioxxysz.net" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/fs-vacuum/issues" + }, + "homepage": "https://github.com/npm/fs-vacuum", + "devDependencies": { + "mkdirp": "^0.5.0", + "tap": "^0.4.11", + "tmp": "0.0.24" + }, + "dependencies": { + "graceful-fs": "^4.1.2", + "path-is-inside": "^1.0.1", + "rimraf": "^2.2.8" + }, + "readme": "# fs-vacuum\n\nRemove the empty branches of a directory tree, optionally up to (but not\nincluding) a specified base directory. Optionally nukes the leaf directory.\n\n## Usage\n\n```javascript\nvar logger = require(\"npmlog\");\nvar vacuum = require(\"fs-vacuum\");\n\nvar options = {\n base : \"/path/to/my/tree/root\",\n purge : true,\n log : logger.silly.bind(logger, \"myCleanup\")\n};\n\n/* Assuming there are no other files or directories in \"out\", \"to\", or \"my\",\n * the final path will just be \"/path/to/my/tree/root\".\n */\nvacuum(\"/path/to/my/tree/root/out/to/my/files\", function (error) {\n if (error) console.error(\"Unable to cleanly vacuum:\", error.message);\n});\n```\n# vacuum(directory, options, callback)\n\n* `directory` {String} Leaf node to remove. **Must be a directory, symlink, or file.**\n* `options` {Object}\n * `base` {String} No directories at or above this level of the filesystem will be removed.\n * `purge` {Boolean} If set, nuke the whole leaf directory, including its contents.\n * `log` {Function} A logging function that takes `npmlog`-compatible argument lists.\n* `callback` {Function} Function to call once vacuuming is complete.\n * `error` {Error} What went wrong along the way, if anything.\n", + "readmeFilename": "README.md", + "gitHead": "498a44d987ee11bc355fe1ec479d55a689fc37ef", + "_id": "fs-vacuum@1.2.7", + "_shasum": "75e501f9d2889ba2fe9fe12f936ba5dad50ca35a", + "_from": "fs-vacuum@1.2.7" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/vacuum.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/vacuum.js new file mode 100644 index 00000000..4b867f67 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-vacuum/vacuum.js @@ -0,0 +1,114 @@ +var assert = require("assert") +var dirname = require("path").dirname +var resolve = require("path").resolve +var isInside = require("path-is-inside") + +var rimraf = require("rimraf") +var lstat = require("graceful-fs").lstat +var readdir = require("graceful-fs").readdir +var rmdir = require("graceful-fs").rmdir +var unlink = require("graceful-fs").unlink + +module.exports = vacuum + +function vacuum(leaf, options, cb) { + assert(typeof leaf === "string", "must pass in path to remove") + assert(typeof cb === "function", "must pass in callback") + + if (!options) options = {} + assert(typeof options === "object", "options must be an object") + + var log = options.log ? options.log : function () {} + + leaf = leaf && resolve(leaf) + var base = options.base && resolve(options.base) + if (base && !isInside(leaf, base)) { + return cb(new Error(leaf + " is not a child of " + base)) + } + + lstat(leaf, function (error, stat) { + if (error) { + if (error.code === "ENOENT") return cb(null) + + log(error.stack) + return cb(error) + } + + if (!(stat && (stat.isDirectory() || stat.isSymbolicLink() || stat.isFile()))) { + log(leaf, "is not a directory, file, or link") + return cb(new Error(leaf + " is not a directory, file, or link")) + } + + if (options.purge) { + log("purging", leaf) + rimraf(leaf, function (error) { + if (error) return cb(error) + + next(dirname(leaf)) + }) + } + else if (!stat.isDirectory()) { + log("removing", leaf) + unlink(leaf, function (error) { + if (error) return cb(error) + + next(dirname(leaf)) + }) + } + else { + next(leaf) + } + }) + + function next(branch) { + branch = branch && resolve(branch) + // either we've reached the base or we've reached the root + if ((base && branch === base) || branch === dirname(branch)) { + log("finished vacuuming up to", branch) + return cb(null) + } + + readdir(branch, function (error, files) { + if (error) { + if (error.code === "ENOENT") return cb(null) + + log("unable to check directory", branch, "due to", error.message) + return cb(error) + } + + if (files.length > 0) { + log("quitting because other entries in", branch) + return cb(null) + } + + log("removing", branch) + lstat(branch, function (error, stat) { + if (error) { + if (error.code === "ENOENT") return cb(null) + + log("unable to lstat", branch, "due to", error.message) + return cb(error) + } + + var remove = stat.isDirectory() ? rmdir : unlink + remove(branch, function (error) { + if (error) { + if (error.code === "ENOENT") { + log("quitting because lost the race to remove", branch) + return cb(null) + } + if (error.code === "ENOTEMPTY") { + log("quitting because new (racy) entries in", branch) + return cb(null) + } + + log("unable to remove", branch, "due to", error.message) + return cb(error) + } + + next(dirname(branch)) + }) + }) + }) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/.npmignore new file mode 100644 index 00000000..373acdfc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +coverage/ +.nyc_output/ diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/.travis.yml new file mode 100644 index 00000000..34ca82b0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +sudo: false +before_install: + - "npm -g install npm" +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" + - "4" + - "5" diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/README.md new file mode 100644 index 00000000..403e9743 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/README.md @@ -0,0 +1,34 @@ +# fs-write-stream-atomic + +Like `fs.createWriteStream(...)`, but atomic. + +Writes to a tmp file and does an atomic `fs.rename` to move it into +place when it's done. + +First rule of debugging: **It's always a race condition.** + +## USAGE + +```javascript +var fsWriteStreamAtomic = require('fs-write-stream-atomic') +// options are optional. +var write = fsWriteStreamAtomic('output.txt', options) +var read = fs.createReadStream('input.txt') +read.pipe(write) + +// When the write stream emits a 'finish' or 'close' event, +// you can be sure that it is moved into place, and contains +// all the bytes that were written to it, even if something else +// was writing to `output.txt` at the same time. +``` + +### `fsWriteStreamAtomic(filename, [options])` + +* `filename` {String} The file we want to write to +* `options` {Object} + * `chown` {Object} User and group to set ownership after write + * `uid` {Number} + * `gid` {Number} + * `encoding` {String} default = 'utf8' + * `mode` {Number} default = `0666` + * `flags` {String} default = `'w'` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/index.js new file mode 100644 index 00000000..f7f3c1e2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/index.js @@ -0,0 +1,124 @@ +var fs = require('graceful-fs') +var Writable = require('readable-stream').Writable +var util = require('util') +var MurmurHash3 = require('imurmurhash') +var iferr = require('iferr') + +function murmurhex () { + var hash = MurmurHash3('') + for (var ii = 0; ii < arguments.length; ++ii) { + hash.hash(hash + arguments[ii]) + } + return hash.result() +} + +var invocations = 0 +function getTmpname (filename) { + return filename + '.' + murmurhex(__filename, process.pid, ++invocations) +} + +var setImmediate = global.setImmediate || setTimeout + +module.exports = WriteStreamAtomic + +// Requirements: +// 1. Write everything written to the stream to a temp file. +// 2. If there are no errors: +// a. moves the temp file into its final destination +// b. emits `finish` & `closed` ONLY after the file is +// fully flushed and renamed. +// 3. If there's an error, removes the temp file. + +util.inherits(WriteStreamAtomic, Writable) +function WriteStreamAtomic (path, options) { + if (!(this instanceof WriteStreamAtomic)) { + return new WriteStreamAtomic(path, options) + } + Writable.call(this, options) + + this.__atomicTarget = path + this.__atomicTmp = getTmpname(path) + + this.__atomicChown = options && options.chown + + this.__atomicClosed = false + + this.__atomicStream = fs.WriteStream(this.__atomicTmp, options) + + this.__atomicStream.once('open', handleOpen(this)) + this.__atomicStream.once('close', handleClose(this)) + this.__atomicStream.once('error', handleError(this)) +} + +// We have to suppress default finish emitting, because ordinarily it +// would happen as soon as `end` is called on us and all of the +// data has been written to our target stream. So we suppress +// finish from being emitted here, and only emit it after our +// target stream is closed and we've moved everything around. +WriteStreamAtomic.prototype.emit = function (event) { + if (event === 'finish') return this.__atomicStream.end() + return Writable.prototype.emit.apply(this, arguments) +} + +WriteStreamAtomic.prototype._write = function (buffer, encoding, cb) { + var flushed = this.__atomicStream.write(buffer, encoding) + if (flushed) return cb() + this.__atomicStream.once('drain', cb) +} + +function handleOpen (writeStream) { + return function (fd) { + writeStream.emit('open', fd) + } +} + +function handleClose (writeStream) { + return function () { + if (writeStream.__atomicClosed) return + writeStream.__atomicClosed = true + if (writeStream.__atomicChown) { + var uid = writeStream.__atomicChown.uid + var gid = writeStream.__atomicChown.gid + return fs.chown(writeStream.__atomicTmp, uid, gid, iferr(cleanup, moveIntoPlace)) + } else { + moveIntoPlace() + } + } + function cleanup (err) { + fs.unlink(writeStream.__atomicTmp, function () { + writeStream.emit('error', err) + writeStream.emit('close') + }) + } + function moveIntoPlace () { + fs.rename(writeStream.__atomicTmp, writeStream.__atomicTarget, iferr(cleanup, end)) + } + function end () { + // We have to use our parent class directly because we suppress `finish` + // events fired via our own emit method. + Writable.prototype.emit.call(writeStream, 'finish') + + // Delay the close to provide the same temporal separation a physical + // file operation would have– that is, the close event is emitted only + // after the async close operation completes. + setImmediate(function () { + writeStream.emit('close') + }) + } +} + +function handleError (writeStream) { + return function (er) { + cleanupSync() + writeStream.emit('error', er) + writeStream.__atomicClosed = true + writeStream.emit('close') + } + function cleanupSync () { + try { + fs.unlinkSync(writeStream.__atomicTmp) + } finally { + return + } + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/package.json new file mode 100644 index 00000000..c4f8b324 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fs-write-stream-atomic/package.json @@ -0,0 +1,70 @@ +{ + "name": "fs-write-stream-atomic", + "version": "1.0.8", + "description": "Like `fs.createWriteStream(...)`, but atomic.", + "main": "index.js", + "directories": { + "test": "test" + }, + "dependencies": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + }, + "devDependencies": { + "rimraf": "^2.4.4", + "standard": "^5.4.1", + "tap": "^2.3.1" + }, + "scripts": { + "test": "standard && tap --coverage test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fs-write-stream-atomic.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/fs-write-stream-atomic/issues" + }, + "homepage": "https://github.com/npm/fs-write-stream-atomic", + "gitHead": "b55824ee4de7f1ca23784929d68b1b8f5edbf4a4", + "_id": "fs-write-stream-atomic@1.0.8", + "_shasum": "e49aaddf288f87d46ff9e882f216a13abc40778b", + "_from": "fs-write-stream-atomic@>=1.0.5 <1.1.0", + "_npmVersion": "3.5.2", + "_nodeVersion": "4.2.2", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "e49aaddf288f87d46ff9e882f216a13abc40778b", + "tarball": "http://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.8.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "_resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.8.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/.npmignore new file mode 100644 index 00000000..f2b2c4d9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/.npmignore @@ -0,0 +1,3 @@ +# ignore the output junk from the example scripts +example/output +node_modules/ diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/.travis.yml new file mode 100644 index 00000000..1b8f396c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/.travis.yml @@ -0,0 +1,15 @@ +language: node_js +sudo: false +node_js: + - "5" + - "4" + - iojs + - "0.12" + - "0.10" + - "0.8" +before_install: + - "npm config set spin false" + - "npm install -g npm" +script: "npm test" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/README.md new file mode 100644 index 00000000..5366a3a7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/README.md @@ -0,0 +1,18 @@ +# fstream-npm + +This is an fstream DirReader class that will read a directory and filter +things according to the semantics of what goes in an npm package. + +For example: + +```javascript +// This will print out all the files that would be included +// by 'npm publish' or 'npm install' of this directory. + +var FN = require("fstream-npm") +FN({ path: "./" }) + .on("child", function (e) { + console.error(e.path.substr(e.root.path.length + 1)) + }) +``` + diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/fstream-npm.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/fstream-npm.js new file mode 100644 index 00000000..0078a843 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/fstream-npm.js @@ -0,0 +1,343 @@ +var Ignore = require('fstream-ignore') +var inherits = require('inherits') +var path = require('path') +var fs = require('fs') + +module.exports = Packer + +inherits(Packer, Ignore) + +function Packer (props) { + if (!(this instanceof Packer)) { + return new Packer(props) + } + + if (typeof props === 'string') { + props = { path: props } + } + + props.ignoreFiles = props.ignoreFiles || [ '.npmignore', + '.gitignore', + 'package.json' ] + + Ignore.call(this, props) + + this.bundled = props.bundled + this.bundleLinks = props.bundleLinks + this.package = props.package + + // only do the magic bundling stuff for the node_modules folder that + // lives right next to a package.json file. + this.bundleMagic = this.parent && + this.parent.packageRoot && + this.basename === 'node_modules' + + // in a node_modules folder, resolve symbolic links to + // bundled dependencies when creating the package. + props.follow = this.follow = this.bundleMagic + // console.error("follow?", this.path, props.follow) + + if (this === this.root || + this.parent && + this.parent.bundleMagic && + this.basename.charAt(0) !== '.') { + this.readBundledLinks() + } + + this.on('entryStat', function (entry, props) { + // files should *always* get into tarballs + // in a user-writable state, even if they're + // being installed from some wackey vm-mounted + // read-only filesystem. + entry.mode = props.mode = props.mode | parseInt('0200', 8) + }) +} + +Packer.prototype.readBundledLinks = function () { + if (this._paused) { + this.once('resume', this.addIgnoreFiles) + return + } + + this.pause() + fs.readdir(this.path + '/node_modules', function (er, list) { + // no harm if there's no bundle + var l = list && list.length + if (er || l === 0) return this.resume() + + var errState = null + var then = function then (er) { + if (errState) return + if (er) { + errState = er + return this.resume() + } + if (--l === 0) return this.resume() + }.bind(this) + + list.forEach(function (pkg) { + if (pkg.charAt(0) === '.') return then() + var pd = this.path + '/node_modules/' + pkg + fs.realpath(pd, function (er, rp) { + if (er) return then() + this.bundleLinks = this.bundleLinks || {} + this.bundleLinks[pkg] = rp + then() + }.bind(this)) + }, this) + }.bind(this)) +} + +Packer.prototype.applyIgnores = function (entry, partial, entryObj) { + if (!entryObj || entryObj.type !== 'Directory') { + // package.json files can never be ignored. + if (entry === 'package.json') return true + + // readme files should never be ignored. + if (entry.match(/^readme(\.[^\.]*)$/i)) return true + + // license files should never be ignored. + if (entry.match(/^(license|licence)(\.[^\.]*)?$/i)) return true + + // changelogs should never be ignored. + if (entry.match(/^(changes|changelog|history)(\.[^\.]*)?$/i)) return true + } + + // special rules. see below. + if (entry === 'node_modules' && this.packageRoot) return true + + // package.json main file should never be ignored. + var mainFile = this.package && this.package.main + if (mainFile && path.resolve(this.path, entry) === path.resolve(this.path, mainFile)) return true + + // some files are *never* allowed under any circumstances + // (VCS folders, native build cruft, npm cruft, regular cruft) + if (entry === '.git' || + entry === 'CVS' || + entry === '.svn' || + entry === '.hg' || + entry === '.lock-wscript' || + entry.match(/^\.wafpickle-[0-9]+$/) || + (this.parent && this.parent.packageRoot && this.basename === 'build' && + entry === 'config.gypi') || + entry === 'npm-debug.log' || + entry === '.npmrc' || + entry.match(/^\..*\.swp$/) || + entry === '.DS_Store' || + entry.match(/^\._/) + ) { + return false + } + + // in a node_modules folder, we only include bundled dependencies + // also, prevent packages in node_modules from being affected + // by rules set in the containing package, so that + // bundles don't get busted. + // Also, once in a bundle, everything is installed as-is + // To prevent infinite cycles in the case of cyclic deps that are + // linked with npm link, even in a bundle, deps are only bundled + // if they're not already present at a higher level. + if (this.bundleMagic) { + // bubbling up. stop here and allow anything the bundled pkg allows + if (entry.indexOf('/') !== -1) return true + + // never include the .bin. It's typically full of platform-specific + // stuff like symlinks and .cmd files anyway. + if (entry === '.bin') return false + + // the package root. + var p = this.parent + // the package before this one. + var pp = p && p.parent + + // if this entry has already been bundled, and is a symlink, + // and it is the *same* symlink as this one, then exclude it. + if (pp && pp.bundleLinks && this.bundleLinks && + pp.bundleLinks[entry] && + pp.bundleLinks[entry] === this.bundleLinks[entry]) { + return false + } + + // since it's *not* a symbolic link, if we're *already* in a bundle, + // then we should include everything. + if (pp && pp.package && pp.basename === 'node_modules') { + return true + } + + // only include it at this point if it's a bundleDependency + var bd = this.package && this.package.bundleDependencies + + if (bd && !Array.isArray(bd)) { + throw new Error(this.package.name + '\'s `bundledDependencies` should ' + + 'be an array') + } + + var shouldBundle = bd && bd.indexOf(entry) !== -1 + // if we're not going to bundle it, then it doesn't count as a bundleLink + // if (this.bundleLinks && !shouldBundle) delete this.bundleLinks[entry] + return shouldBundle + } + // if (this.bundled) return true + + return Ignore.prototype.applyIgnores.call(this, entry, partial, entryObj) +} + +Packer.prototype.addIgnoreFiles = function () { + var entries = this.entries + // if there's a .npmignore, then we do *not* want to + // read the .gitignore. + if (entries.indexOf('.npmignore') !== -1) { + var i = entries.indexOf('.gitignore') + if (i !== -1) { + entries.splice(i, 1) + } + } + + this.entries = entries + + Ignore.prototype.addIgnoreFiles.call(this) +} + +Packer.prototype.readRules = function (buf, e) { + if (e !== 'package.json') { + return Ignore.prototype.readRules.call(this, buf, e) + } + + buf = buf.toString().trim() + + if (buf.length === 0) return [] + + try { + var p = this.package = JSON.parse(buf) + } catch (er) { + // just pretend it's a normal old file, not magic at all. + return [] + } + + if (this === this.root) { + this.bundleLinks = this.bundleLinks || {} + this.bundleLinks[p.name] = this._path + } + + this.packageRoot = true + this.emit('package', p) + + // make bundle deps predictable + if (p.bundledDependencies && !p.bundleDependencies) { + p.bundleDependencies = p.bundledDependencies + delete p.bundledDependencies + } + + if (!p.files || !Array.isArray(p.files)) return [] + + // ignore everything except what's in the files array. + return ['*'].concat(p.files.map(function (f) { + return '!' + f + })).concat(p.files.map(function (f) { + return '!' + f.replace(/\/+$/, '') + '/**' + })) +} + +Packer.prototype.getChildProps = function (stat) { + var props = Ignore.prototype.getChildProps.call(this, stat) + + props.package = this.package + + props.bundled = this.bundled && this.bundled.slice(0) + props.bundleLinks = this.bundleLinks && + Object.create(this.bundleLinks) + + // Directories have to be read as Packers + // otherwise fstream.Reader will create a DirReader instead. + if (stat.isDirectory()) { + props.type = this.constructor + } + + // only follow symbolic links directly in the node_modules folder. + props.follow = false + return props +} + +var order = [ + 'package.json', + '.npmignore', + '.gitignore', + /^README(\.md)?$/, + 'LICENCE', + 'LICENSE', + /\.js$/ +] + +Packer.prototype.sort = function (a, b) { + for (var i = 0, l = order.length; i < l; i++) { + var o = order[i] + if (typeof o === 'string') { + if (a === o) return -1 + if (b === o) return 1 + } else { + if (a.match(o)) return -1 + if (b.match(o)) return 1 + } + } + + // deps go in the back + if (a === 'node_modules') return 1 + if (b === 'node_modules') return -1 + + return Ignore.prototype.sort.call(this, a, b) +} + +Packer.prototype.emitEntry = function (entry) { + if (this._paused) { + this.once('resume', this.emitEntry.bind(this, entry)) + return + } + + // if there is a .gitignore, then we're going to + // rename it to .npmignore in the output. + if (entry.basename === '.gitignore') { + entry.basename = '.npmignore' + entry.path = path.resolve(entry.dirname, entry.basename) + } + + // all *.gyp files are renamed to binding.gyp for node-gyp + // but only when they are in the same folder as a package.json file. + if (entry.basename.match(/\.gyp$/) && + this.entries.indexOf('package.json') !== -1) { + entry.basename = 'binding.gyp' + entry.path = path.resolve(entry.dirname, entry.basename) + } + + // skip over symbolic links + if (entry.type === 'SymbolicLink') { + entry.abort() + return + } + + if (entry.type !== 'Directory') { + // make it so that the folder in the tarball is named "package" + var h = path.dirname((entry.root || entry).path) + var t = entry.path.substr(h.length + 1).replace(/^[^\/\\]+/, 'package') + var p = h + '/' + t + + entry.path = p + entry.dirname = path.dirname(p) + return Ignore.prototype.emitEntry.call(this, entry) + } + + // we don't want empty directories to show up in package + // tarballs. + // don't emit entry events for dirs, but still walk through + // and read them. This means that we need to proxy up their + // entry events so that those entries won't be missed, since + // .pipe() doesn't do anythign special with "child" events, on + // with "entry" events. + var me = this + entry.on('entry', function (e) { + if (e.parent === entry) { + e.parent = me + me.emit('entry', e) + } + }) + entry.on('package', this.emit.bind(this, 'package')) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/package.json new file mode 100644 index 00000000..e268209a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream-npm/package.json @@ -0,0 +1,40 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "fstream-npm", + "description": "fstream class for creating npm packages", + "version": "1.0.7", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fstream-npm.git" + }, + "scripts": { + "test": "standard && tap test/*.js" + }, + "main": "./fstream-npm.js", + "dependencies": { + "fstream-ignore": "^1.0.0", + "inherits": "2" + }, + "devDependencies": { + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.1", + "rimraf": "^2.4.2", + "standard": "^4.3.1", + "tap": "^1.3.2" + }, + "license": "ISC", + "readme": "# fstream-npm\n\nThis is an fstream DirReader class that will read a directory and filter\nthings according to the semantics of what goes in an npm package.\n\nFor example:\n\n```javascript\n// This will print out all the files that would be included\n// by 'npm publish' or 'npm install' of this directory.\n\nvar FN = require(\"fstream-npm\")\nFN({ path: \"./\" })\n .on(\"child\", function (e) {\n console.error(e.path.substr(e.root.path.length + 1))\n })\n```\n\n", + "readmeFilename": "README.md", + "gitHead": "d57b6b24f91156067f73417dd8785c6312bfc75f", + "bugs": { + "url": "https://github.com/npm/fstream-npm/issues" + }, + "homepage": "https://github.com/npm/fstream-npm#readme", + "_id": "fstream-npm@1.0.7", + "_shasum": "7ed0d1ac13d7686dd9e1bf6ceb8be273bf6d2f86", + "_from": "fstream-npm@>=1.0.7 <1.1.0" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/.npmignore new file mode 100644 index 00000000..4be12143 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/.npmignore @@ -0,0 +1,5 @@ +.*.swp +node_modules/ +examples/deep-copy/ +examples/path/ +examples/filter-copy/ diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/.travis.yml new file mode 100644 index 00000000..b5d9b146 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +node_js: + - iojs + - 0.12 + - 0.10 + - 0.8 +before_install: + - "npm config set spin false" + - "npm install -g npm/npm" diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/README.md new file mode 100644 index 00000000..043fa430 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/README.md @@ -0,0 +1,76 @@ +Like FS streams, but with stat on them, and supporting directories and +symbolic links, as well as normal files. Also, you can use this to set +the stats on a file, even if you don't change its contents, or to create +a symlink, etc. + +So, for example, you can "write" a directory, and it'll call `mkdir`. You +can specify a uid and gid, and it'll call `chown`. You can specify a +`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink +and provide a `linkpath` and it'll call `symlink`. + +Note that it won't automatically resolve symbolic links. So, if you +call `fstream.Reader('/some/symlink')` then you'll get an object +that stats and then ends immediately (since it has no data). To follow +symbolic links, do this: `fstream.Reader({path:'/some/symlink', follow: +true })`. + +There are various checks to make sure that the bytes emitted are the +same as the intended size, if the size is set. + +## Examples + +```javascript +fstream + .Writer({ path: "path/to/file" + , mode: 0755 + , size: 6 + }) + .write("hello\n") + .end() +``` + +This will create the directories if they're missing, and then write +`hello\n` into the file, chmod it to 0755, and assert that 6 bytes have +been written when it's done. + +```javascript +fstream + .Writer({ path: "path/to/file" + , mode: 0755 + , size: 6 + , flags: "a" + }) + .write("hello\n") + .end() +``` + +You can pass flags in, if you want to append to a file. + +```javascript +fstream + .Writer({ path: "path/to/symlink" + , linkpath: "./file" + , SymbolicLink: true + , mode: "0755" // octal strings supported + }) + .end() +``` + +If isSymbolicLink is a function, it'll be called, and if it returns +true, then it'll treat it as a symlink. If it's not a function, then +any truish value will make a symlink, or you can set `type: +'SymbolicLink'`, which does the same thing. + +Note that the linkpath is relative to the symbolic link location, not +the parent dir or cwd. + +```javascript +fstream + .Reader("path/to/dir") + .pipe(fstream.Writer("path/to/other/dir")) +``` + +This will do like `cp -Rp path/to/dir path/to/other/dir`. If the other +dir exists and isn't a directory, then it'll emit an error. It'll also +set the uid, gid, mode, etc. to be identical. In this way, it's more +like `rsync -a` than simply a copy. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/fstream.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/fstream.js new file mode 100644 index 00000000..474ea2fc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/fstream.js @@ -0,0 +1,35 @@ +exports.Abstract = require('./lib/abstract.js') +exports.Reader = require('./lib/reader.js') +exports.Writer = require('./lib/writer.js') + +exports.File = { + Reader: require('./lib/file-reader.js'), + Writer: require('./lib/file-writer.js') +} + +exports.Dir = { + Reader: require('./lib/dir-reader.js'), + Writer: require('./lib/dir-writer.js') +} + +exports.Link = { + Reader: require('./lib/link-reader.js'), + Writer: require('./lib/link-writer.js') +} + +exports.Proxy = { + Reader: require('./lib/proxy-reader.js'), + Writer: require('./lib/proxy-writer.js') +} + +exports.Reader.Dir = exports.DirReader = exports.Dir.Reader +exports.Reader.File = exports.FileReader = exports.File.Reader +exports.Reader.Link = exports.LinkReader = exports.Link.Reader +exports.Reader.Proxy = exports.ProxyReader = exports.Proxy.Reader + +exports.Writer.Dir = exports.DirWriter = exports.Dir.Writer +exports.Writer.File = exports.FileWriter = exports.File.Writer +exports.Writer.Link = exports.LinkWriter = exports.Link.Writer +exports.Writer.Proxy = exports.ProxyWriter = exports.Proxy.Writer + +exports.collect = require('./lib/collect.js') diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/package.json new file mode 100644 index 00000000..878d2c1d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/fstream/package.json @@ -0,0 +1,42 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "fstream", + "description": "Advanced file system stream things", + "version": "1.0.8", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/fstream.git" + }, + "main": "fstream.js", + "engines": { + "node": ">=0.6" + }, + "dependencies": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + }, + "devDependencies": { + "standard": "^4.0.0", + "tap": "^1.2.0" + }, + "scripts": { + "test": "standard && tap examples/*.js" + }, + "license": "ISC", + "readme": "Like FS streams, but with stat on them, and supporting directories and\nsymbolic links, as well as normal files. Also, you can use this to set\nthe stats on a file, even if you don't change its contents, or to create\na symlink, etc.\n\nSo, for example, you can \"write\" a directory, and it'll call `mkdir`. You\ncan specify a uid and gid, and it'll call `chown`. You can specify a\n`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink\nand provide a `linkpath` and it'll call `symlink`.\n\nNote that it won't automatically resolve symbolic links. So, if you\ncall `fstream.Reader('/some/symlink')` then you'll get an object\nthat stats and then ends immediately (since it has no data). To follow\nsymbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:\ntrue })`.\n\nThere are various checks to make sure that the bytes emitted are the\nsame as the intended size, if the size is set.\n\n## Examples\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n })\n .write(\"hello\\n\")\n .end()\n```\n\nThis will create the directories if they're missing, and then write\n`hello\\n` into the file, chmod it to 0755, and assert that 6 bytes have\nbeen written when it's done.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n , flags: \"a\"\n })\n .write(\"hello\\n\")\n .end()\n```\n\nYou can pass flags in, if you want to append to a file.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/symlink\"\n , linkpath: \"./file\"\n , SymbolicLink: true\n , mode: \"0755\" // octal strings supported\n })\n .end()\n```\n\nIf isSymbolicLink is a function, it'll be called, and if it returns\ntrue, then it'll treat it as a symlink. If it's not a function, then\nany truish value will make a symlink, or you can set `type:\n'SymbolicLink'`, which does the same thing.\n\nNote that the linkpath is relative to the symbolic link location, not\nthe parent dir or cwd.\n\n```javascript\nfstream\n .Reader(\"path/to/dir\")\n .pipe(fstream.Writer(\"path/to/other/dir\"))\n```\n\nThis will do like `cp -Rp path/to/dir path/to/other/dir`. If the other\ndir exists and isn't a directory, then it'll emit an error. It'll also\nset the uid, gid, mode, etc. to be identical. In this way, it's more\nlike `rsync -a` than simply a copy.\n", + "readmeFilename": "README.md", + "gitHead": "d9f81146c50e687f1df04c1a0e7e4c173eb3dae2", + "bugs": { + "url": "https://github.com/isaacs/fstream/issues" + }, + "homepage": "https://github.com/isaacs/fstream#readme", + "_id": "fstream@1.0.8", + "_shasum": "7e8d7a73abb3647ef36e4b8a15ca801dba03d038", + "_from": "fstream@1.0.8" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/.npmignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/LICENSE new file mode 100644 index 00000000..e873a70b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2013 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/Makefile b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/Makefile new file mode 100644 index 00000000..72c8338c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/Makefile @@ -0,0 +1,5 @@ + +test: + @./node_modules/.bin/mocha test.js --reporter spec --require should + +.PHONY: test diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/Readme.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/Readme.md new file mode 100644 index 00000000..2f869cf3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/Readme.md @@ -0,0 +1,92 @@ + +# github-url-from-git + +```js +describe('parse(url)', function(){ + it('should support git://*', function(){ + var url = 'git://github.com/jamesor/mongoose-versioner'; + parse(url).should.equal('https://github.com/jamesor/mongoose-versioner'); + }) + + it('should support git://*.git', function(){ + var url = 'git://github.com/treygriffith/cellar.git'; + parse(url).should.equal('https://github.com/treygriffith/cellar'); + }) + + it('should support https://*', function(){ + var url = 'https://github.com/Empeeric/i18n-node'; + parse(url).should.equal('https://github.com/Empeeric/i18n-node'); + }) + + it('should support https://*.git', function(){ + var url = 'https://jpillora@github.com/banchee/tranquil.git'; + parse(url).should.equal('https://github.com/banchee/tranquil'); + }) + + it('should return undefined on failure', function(){ + var url = 'git://github.com/justgord/.git'; + assert(null == parse(url)); + }) + + it('should parse git@github.com:bcoe/thumbd.git', function() { + var url = 'git@github.com:bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git@github.com:bcoe/thumbd.git#2.7.0', function() { + var url = 'git@github.com:bcoe/thumbd.git#2.7.0'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git+https://github.com/bcoe/thumbd.git', function() { + var url = 'git+https://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git+ssh://github.com/bcoe/thumbd.git', function() { + var url = 'git+ssh://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function() { + var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git'; + parse(url).should.eql('https://github.com/EastCloud/node-websockets'); + }) + + // gist urls. + + it('should parse git@gist urls', function() { + var url = 'git@gist.github.com:3135914.git'; + parse(url).should.equal('https://gist.github.com/3135914') + }) + + it('should parse https://gist urls', function() { + var url = 'https://gist.github.com/3135914.git'; + parse(url).should.equal('https://gist.github.com/3135914') + }) + + // Handle arbitrary GitHub Enterprise domains. + + it('should parse parse extra GHE urls provided', function() { + var url = 'git://github.example.com/treygriffith/cellar.git'; + parse( + url, {extraBaseUrls: ['github.example.com']} + ).should.equal('https://github.example.com/treygriffith/cellar'); + }); + + it('should parse GHE urls with multiple subdomains', function() { + var url = 'git://github.internal.example.com/treygriffith/cellar.git'; + parse( + url, {extraBaseUrls: ['github.internal.example.com']} + ).should.equal('https://github.internal.example.com/treygriffith/cellar'); + }); +}) + +describe('re', function() { + it('should expose GitHub url parsing regex', function() { + parse.re.source.should.equal( + /^(?:https?:\/\/|git:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source + ) + }); +}) +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/index.js new file mode 100644 index 00000000..d4d37a0d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/index.js @@ -0,0 +1,32 @@ +// convert git:// form url to github URL, e.g., +// git://github.com/bcoe/foo.git +// https://github.com/bcoe/foo. +function githubUrlFromGit(url, opts){ + try { + var m = re(opts).exec(url.replace(/\.git(#.*)?$/, '')); + var host = m[1]; + var path = m[2]; + return 'https://' + host + '/' + path; + } catch (err) { + // ignore + } +}; + +// generate the git:// parsing regex +// with options, e.g., the ability +// to specify multiple GHE domains. +function re(opts) { + opts = opts || {}; + // whitelist of URLs that should be treated as GitHub repos. + var baseUrls = ['gist.github.com', 'github.com'].concat(opts.extraBaseUrls || []); + // build regex from whitelist. + return new RegExp( + /^(?:https?:\/\/|git:\/\/|git\+ssh:\/\/|git\+https:\/\/)?(?:[^@]+@)?/.source + + '(' + baseUrls.join('|') + ')' + + /[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source + ); +} + +githubUrlFromGit.re = re(); + +module.exports = githubUrlFromGit; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/package.json new file mode 100644 index 00000000..bb4f999f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/package.json @@ -0,0 +1,57 @@ +{ + "name": "github-url-from-git", + "version": "1.4.0", + "description": "Parse a github git url and return the github repo url", + "main": "index.js", + "scripts": { + "test": "mocha test.js --reporter spec --require should" + }, + "repository": { + "type": "git", + "url": "https://github.com/visionmedia/node-github-url-from-git.git" + }, + "keywords": [ + "github", + "git", + "url", + "parser" + ], + "author": { + "name": "TJ Holowaychuk" + }, + "license": "MIT", + "devDependencies": { + "better-assert": "~1.0.0", + "mocha": "~1.9.0", + "should": "~1.2.2" + }, + "gitHead": "154df00b0b590c29be5d2a5822e7b2e160b75345", + "bugs": { + "url": "https://github.com/visionmedia/node-github-url-from-git/issues" + }, + "homepage": "https://github.com/visionmedia/node-github-url-from-git", + "_id": "github-url-from-git@1.4.0", + "_shasum": "285e6b520819001bde128674704379e4ff03e0de", + "_from": "github-url-from-git@>=1.4.0-0 <2.0.0-0", + "_npmVersion": "2.0.0-alpha.7", + "_npmUser": { + "name": "bcoe", + "email": "bencoe@gmail.com" + }, + "maintainers": [ + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + }, + { + "name": "bcoe", + "email": "bencoe@gmail.com" + } + ], + "dist": { + "shasum": "285e6b520819001bde128674704379e4ff03e0de", + "tarball": "http://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.4.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.4.0.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/test.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/test.js new file mode 100644 index 00000000..d1ca9c63 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-git/test.js @@ -0,0 +1,90 @@ +var parse = require('./'); +var assert = require('better-assert'); + +describe('parse(url)', function(){ + it('should support git://*', function(){ + var url = 'git://github.com/jamesor/mongoose-versioner'; + parse(url).should.equal('https://github.com/jamesor/mongoose-versioner'); + }) + + it('should support git://*.git', function(){ + var url = 'git://github.com/treygriffith/cellar.git'; + parse(url).should.equal('https://github.com/treygriffith/cellar'); + }) + + it('should support https://*', function(){ + var url = 'https://github.com/Empeeric/i18n-node'; + parse(url).should.equal('https://github.com/Empeeric/i18n-node'); + }) + + it('should support https://*.git', function(){ + var url = 'https://jpillora@github.com/banchee/tranquil.git'; + parse(url).should.equal('https://github.com/banchee/tranquil'); + }) + + it('should return undefined on failure', function(){ + var url = 'git://github.com/justgord/.git'; + assert(null == parse(url)); + }) + + it('should parse git@github.com:bcoe/thumbd.git', function() { + var url = 'git@github.com:bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git@github.com:bcoe/thumbd.git#2.7.0', function() { + var url = 'git@github.com:bcoe/thumbd.git#2.7.0'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git+https://github.com/bcoe/thumbd.git', function() { + var url = 'git+https://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git+ssh://github.com/bcoe/thumbd.git', function() { + var url = 'git+ssh://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function() { + var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git'; + parse(url).should.eql('https://github.com/EastCloud/node-websockets'); + }) + + // gist urls. + + it('should parse git@gist urls', function() { + var url = 'git@gist.github.com:3135914.git'; + parse(url).should.equal('https://gist.github.com/3135914') + }) + + it('should parse https://gist urls', function() { + var url = 'https://gist.github.com/3135914.git'; + parse(url).should.equal('https://gist.github.com/3135914') + }) + + // Handle arbitrary GitHub Enterprise domains. + + it('should parse parse extra GHE urls provided', function() { + var url = 'git://github.example.com/treygriffith/cellar.git'; + parse( + url, {extraBaseUrls: ['github.example.com']} + ).should.equal('https://github.example.com/treygriffith/cellar'); + }); + + it('should parse GHE urls with multiple subdomains', function() { + var url = 'git://github.internal.example.com/treygriffith/cellar.git'; + parse( + url, {extraBaseUrls: ['github.internal.example.com']} + ).should.equal('https://github.internal.example.com/treygriffith/cellar'); + }); +}) + +describe('re', function() { + it('should expose GitHub url parsing regex', function() { + parse.re.source.should.equal( + /^(?:https?:\/\/|git:\/\/|git\+ssh:\/\/|git\+https:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source + ) + }); +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/.npmignore new file mode 100644 index 00000000..849e0ca4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/.travis.yml new file mode 100644 index 00000000..1d8a1a65 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/LICENSE new file mode 100644 index 00000000..02155da2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Robert Kowalski ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/README.md new file mode 100644 index 00000000..7b6d1e48 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/README.md @@ -0,0 +1,21 @@ +[![Build Status](https://travis-ci.org/robertkowalski/github-url-from-username-repo.png?branch=master)](https://travis-ci.org/robertkowalski/github-url-from-username-repo) +[![Dependency Status](https://gemnasium.com/robertkowalski/github-url-from-username-repo.png)](https://gemnasium.com/robertkowalski/github-url-from-username-repo) + + +# github-url-from-username-repo + +## API + +### getUrl(url, [forBrowser]) + +Get's the url normalized for npm. +If `forBrowser` is true, return a GitHub url that is usable in a webbrowser. + +## Usage + +```javascript + +var getUrl = require("github-url-from-username-repo") +getUrl("visionmedia/express") // https://github.com/visionmedia/express + +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/index.js new file mode 100644 index 00000000..bfd48557 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/index.js @@ -0,0 +1,21 @@ +module.exports = getUrl + +function getUrl (r, forBrowser) { + if (!r) return null + // Regex taken from https://github.com/npm/npm-package-arg/commit/01dce583c64afae07b66a2a8a6033aeba871c3cd + // Note: This does not fully test the git ref format. + // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html + // + // The only way to do this properly would be to shell out to + // git-check-ref-format, and as this is a fast sync function, + // we don't want to do that. Just let git fail if it turns + // out that the commit-ish is invalid. + // GH usernames cannot start with . or - + if (/^[^@%\/\s\.-][^:@%\/\s]*\/[^@\s\/%]+(?:#.*)?$/.test(r)) { + if (forBrowser) + r = r.replace("#", "/tree/") + return "https://github.com/" + r + } + + return null +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/package.json new file mode 100644 index 00000000..dedb1fd8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/github-url-from-username-repo/package.json @@ -0,0 +1,36 @@ +{ + "name": "github-url-from-username-repo", + "version": "1.0.2", + "description": "Create urls from username/repo", + "main": "index.js", + "scripts": { + "test": "mocha -R spec" + }, + "devDependencies": { + "mocha": "~1.13.0" + }, + "repository": { + "type": "git", + "url": "git@github.com:robertkowalski/github-url-from-username-repo.git" + }, + "author": { + "name": "Robert Kowalski", + "email": "rok@kowalski.gd" + }, + "license": "BSD-2-Clause", + "bugs": { + "url": "https://github.com/robertkowalski/github-url-from-username-repo/issues" + }, + "keywords": [ + "git", + "github", + "repo" + ], + "readme": "[![Build Status](https://travis-ci.org/robertkowalski/github-url-from-username-repo.png?branch=master)](https://travis-ci.org/robertkowalski/github-url-from-username-repo)\n[![Dependency Status](https://gemnasium.com/robertkowalski/github-url-from-username-repo.png)](https://gemnasium.com/robertkowalski/github-url-from-username-repo)\n\n\n# github-url-from-username-repo\n\n## API\n\n### getUrl(url, [forBrowser])\n\nGet's the url normalized for npm.\nIf `forBrowser` is true, return a GitHub url that is usable in a webbrowser.\n\n## Usage\n\n```javascript\n\nvar getUrl = require(\"github-url-from-username-repo\")\ngetUrl(\"visionmedia/express\") // https://github.com/visionmedia/express\n\n```\n", + "readmeFilename": "README.md", + "gitHead": "d404a13f7f04edaed0e2f068a43b81230b8c7aee", + "homepage": "https://github.com/robertkowalski/github-url-from-username-repo", + "_id": "github-url-from-username-repo@1.0.2", + "_shasum": "7dd79330d2abe69c10c2cef79714c97215791dfa", + "_from": "github-url-from-username-repo@>=1.0.2-0 <2.0.0-0" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/README.md new file mode 100644 index 00000000..912bab50 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/README.md @@ -0,0 +1,365 @@ +# Glob + +Match files using the patterns the shell uses, like stars and stuff. + +[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) + +This is a glob implementation in JavaScript. It uses the `minimatch` +library to do its matching. + +![](oh-my-glob.gif) + +## Usage + +Install with npm + +``` +npm i glob +``` + +```javascript +var glob = require("glob") + +// options is optional +glob("**/*.js", options, function (er, files) { + // files is an array of filenames. + // If the `nonull` option is set, and nothing + // was found, then files is ["**/*.js"] + // er is an error object or null. +}) +``` + +## Glob Primer + +"Globs" are the patterns you type when you do stuff like `ls *.js` on +the command line, or put `build/*` in a `.gitignore` file. + +Before parsing the path part patterns, braced sections are expanded +into a set. Braced sections start with `{` and end with `}`, with any +number of comma-delimited sections within. Braced sections may contain +slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. + +The following characters have special magic meaning when used in a +path portion: + +* `*` Matches 0 or more characters in a single path portion +* `?` Matches 1 character +* `[...]` Matches a range of characters, similar to a RegExp range. + If the first character of the range is `!` or `^` then it matches + any character not in the range. +* `!(pattern|pattern|pattern)` Matches anything that does not match + any of the patterns provided. +* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the + patterns provided. +* `+(pattern|pattern|pattern)` Matches one or more occurrences of the + patterns provided. +* `*(a|b|c)` Matches zero or more occurrences of the patterns provided +* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns + provided +* `**` If a "globstar" is alone in a path portion, then it matches + zero or more directories and subdirectories searching for matches. + It does not crawl symlinked directories. + +### Dots + +If a file or directory path portion has a `.` as the first character, +then it will not match any glob pattern unless that pattern's +corresponding path part also has a `.` as its first character. + +For example, the pattern `a/.*/c` would match the file at `a/.b/c`. +However the pattern `a/*/c` would not, because `*` does not start with +a dot character. + +You can make glob treat dots as normal characters by setting +`dot:true` in the options. + +### Basename Matching + +If you set `matchBase:true` in the options, and the pattern has no +slashes in it, then it will seek for any file anywhere in the tree +with a matching basename. For example, `*.js` would match +`test/simple/basic.js`. + +### Empty Sets + +If no matching files are found, then an empty array is returned. This +differs from the shell, where the pattern itself is returned. For +example: + + $ echo a*s*d*f + a*s*d*f + +To get the bash-style behavior, set the `nonull:true` in the options. + +### See Also: + +* `man sh` +* `man bash` (Search for "Pattern Matching") +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## glob.hasMagic(pattern, [options]) + +Returns `true` if there are any special characters in the pattern, and +`false` otherwise. + +Note that the options affect the results. If `noext:true` is set in +the options object, then `+(a|b)` will not be considered a magic +pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` +then that is considered magical, unless `nobrace:true` is set in the +options. + +## glob(pattern, [options], cb) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* `cb` `{Function}` + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Perform an asynchronous glob search. + +## glob.sync(pattern, [options]) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* return: `{Array}` filenames found matching the pattern + +Perform a synchronous glob search. + +## Class: glob.Glob + +Create a Glob object by instantiating the `glob.Glob` class. + +```javascript +var Glob = require("glob").Glob +var mg = new Glob(pattern, options, cb) +``` + +It's an EventEmitter, and starts walking the filesystem to find matches +immediately. + +### new glob.Glob(pattern, [options], [cb]) + +* `pattern` `{String}` pattern to search for +* `options` `{Object}` +* `cb` `{Function}` Called when an error occurs, or matches are found + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Note that if the `sync` flag is set in the options, then matches will +be immediately available on the `g.found` member. + +### Properties + +* `minimatch` The minimatch object that the glob uses. +* `options` The options object passed in. +* `aborted` Boolean which is set to true when calling `abort()`. There + is no way at this time to continue a glob search after aborting, but + you can re-use the statCache to avoid having to duplicate syscalls. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `'FILE'` - Path exists, and is not a directory + * `'DIR'` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` +* `statCache` Cache of `fs.stat` results, to prevent statting the same + path multiple times. +* `symlinks` A record of which paths are symbolic links, which is + relevant in resolving `**` patterns. +* `realpathCache` An optional object which is passed to `fs.realpath` + to minimize unnecessary syscalls. It is stored on the instantiated + Glob object, and may be re-used. + +### Events + +* `end` When the matching is finished, this is emitted with all the + matches found. If the `nonull` option is set, and no match was found, + then the `matches` list contains the original pattern. The matches + are sorted, unless the `nosort` flag is set. +* `match` Every time a match is found, this is emitted with the specific + thing that matched. It is not deduplicated or resolved to a realpath. +* `error` Emitted when an unexpected error is encountered, or whenever + any fs error occurs if `options.strict` is set. +* `abort` When `abort()` is called, this event is raised. + +### Methods + +* `pause` Temporarily stop the search +* `resume` Resume the search +* `abort` Stop the search forever + +### Options + +All the options that can be passed to Minimatch can also be passed to +Glob to change pattern matching behavior. Also, some have been added, +or have glob-specific ramifications. + +All options are false by default, unless otherwise noted. + +All options are added to the Glob object, as well. + +If you are running many `glob` operations, you can pass a Glob object +as the `options` argument to a subsequent operation to shortcut some +`stat` and `readdir` calls. At the very least, you may pass in shared +`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that +parallel glob operations will be sped up by sharing information about +the filesystem. + +* `cwd` The current working directory in which to search. Defaults + to `process.cwd()`. +* `root` The place where patterns starting with `/` will be mounted + onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix + systems, and `C:\` or some such on Windows.) +* `dot` Include `.dot` files in normal matches and `globstar` matches. + Note that an explicit dot in a portion of the pattern will always + match dot files. +* `nomount` By default, a pattern starting with a forward-slash will be + "mounted" onto the root setting, so that a valid filesystem path is + returned. Set this flag to disable that behavior. +* `mark` Add a `/` character to directory matches. Note that this + requires additional stat calls. +* `nosort` Don't sort the results. +* `stat` Set to true to stat *all* results. This reduces performance + somewhat, and is completely unnecessary, unless `readdir` is presumed + to be an untrustworthy indicator of file existence. +* `silent` When an unusual error is encountered when attempting to + read a directory, a warning will be printed to stderr. Set the + `silent` option to true to suppress these warnings. +* `strict` When an unusual error is encountered when attempting to + read a directory, the process will just continue on in search of + other matches. Set the `strict` option to raise an error in these + cases. +* `cache` See `cache` property above. Pass in a previously generated + cache object to save some fs calls. +* `statCache` A cache of results of filesystem information, to prevent + unnecessary stat calls. While it should not normally be necessary + to set this, you may pass the statCache from one glob() call to the + options object of another, if you know that the filesystem will not + change between calls. (See "Race Conditions" below.) +* `symlinks` A cache of known symbolic links. You may pass in a + previously generated `symlinks` object to save `lstat` calls when + resolving `**` matches. +* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. +* `nounique` In some cases, brace-expanded patterns can result in the + same file showing up multiple times in the result set. By default, + this implementation prevents duplicates in the result set. Set this + flag to disable that behavior. +* `nonull` Set to never return an empty set, instead returning a set + containing the pattern itself. This is the default in glob(3). +* `debug` Set to enable debug logging in minimatch and glob. +* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. +* `noglobstar` Do not match `**` against multiple filenames. (Ie, + treat it as a normal `*` instead.) +* `noext` Do not match `+(a|b)` "extglob" patterns. +* `nocase` Perform a case-insensitive match. Note: on + case-insensitive filesystems, non-magic patterns will match by + default, since `stat` and `readdir` will not raise errors. +* `matchBase` Perform a basename-only match if the pattern does not + contain any slash characters. That is, `*.js` would be treated as + equivalent to `**/*.js`, matching all js files in all directories. +* `nodir` Do not match directories, only files. (Note: to match + *only* directories, simply put a `/` at the end of the pattern.) +* `ignore` Add a pattern or an array of glob patterns to exclude matches. + Note: `ignore` patterns are *always* in `dot:true` mode, regardless + of any other settings. +* `follow` Follow symlinked directories when expanding `**` patterns. + Note that this can result in a lot of duplicate references in the + presence of cyclic links. +* `realpath` Set to true to call `fs.realpath` on all of the results. + In the case of a symlink that cannot be resolved, the full absolute + path to the matched entry is returned (though it will usually be a + broken symlink) + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between node-glob and other +implementations, and are intentional. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.3, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +Note that symlinked directories are not crawled as part of a `**`, +though their contents may match against subsequent portions of the +pattern. This prevents infinite loops and duplicates and the like. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then glob returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +### Comments and Negation + +Previously, this module let you mark a pattern as a "comment" if it +started with a `#` character, or a "negated" pattern if it started +with a `!` character. + +These options were deprecated in version 5, and removed in version 6. + +To specify things that should not match, use the `ignore` option. + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes will always +be interpreted as escape characters, not path separators. + +Results from absolute patterns such as `/foo/*` are mounted onto the +root setting using `path.join`. On windows, this will by default result +in `/foo/*` matching `C:\foo\bar.txt`. + +## Race Conditions + +Glob searching, by its very nature, is susceptible to race conditions, +since it relies on directory walking and such. + +As a result, it is possible that a file that exists when glob looks for +it may have been deleted or modified by the time it returns the result. + +As part of its internal implementation, this program caches all stat +and readdir calls that it makes, in order to cut down on system +overhead. However, this also makes it even more susceptible to races, +especially if the cache or statCache objects are reused between glob +calls. + +Users are thus advised not to use a glob result as a guarantee of +filesystem state in the face of rapid changes. For the vast majority +of operations, this is never a problem. + +## Contributing + +Any change to behavior (including bugfixes) must come with a test. + +Patches that fail tests or reduce performance will be rejected. + +``` +# to run tests +npm test + +# to re-generate test fixtures +npm run test-regen + +# to benchmark against bash/zsh +npm run bench + +# to profile javascript +npm run prof +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/changelog.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/changelog.md new file mode 100644 index 00000000..0ad557d9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/changelog.md @@ -0,0 +1,67 @@ +## 7.0 + +- Raise error if `options.cwd` is specified, and not a directory + +## 6.0 + +- Remove comment and negation pattern support +- Ignore patterns are always in `dot:true` mode + +## 5.0 + +- Deprecate comment and negation patterns +- Fix regression in `mark` and `nodir` options from making all cache + keys absolute path. +- Abort if `fs.readdir` returns an error that's unexpected +- Don't emit `match` events for ignored items +- Treat ENOTSUP like ENOTDIR in readdir + +## 4.5 + +- Add `options.follow` to always follow directory symlinks in globstar +- Add `options.realpath` to call `fs.realpath` on all results +- Always cache based on absolute path + +## 4.4 + +- Add `options.ignore` +- Fix handling of broken symlinks + +## 4.3 + +- Bump minimatch to 2.x +- Pass all tests on Windows + +## 4.2 + +- Add `glob.hasMagic` function +- Add `options.nodir` flag + +## 4.1 + +- Refactor sync and async implementations for performance +- Throw if callback provided to sync glob function +- Treat symbolic links in globstar results the same as Bash 4.3 + +## 4.0 + +- Use `^` for dependency versions (bumped major because this breaks + older npm versions) +- Ensure callbacks are only ever called once +- switch to ISC license + +## 3.x + +- Rewrite in JavaScript +- Add support for setting root, cwd, and windows support +- Cache many fs calls +- Add globstar support +- emit match events + +## 2.x + +- Use `glob.h` and `fnmatch.h` from NetBSD + +## 1.x + +- `glob.h` static binding. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/common.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/common.js new file mode 100644 index 00000000..913d1303 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/common.js @@ -0,0 +1,235 @@ +exports.alphasort = alphasort +exports.alphasorti = alphasorti +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var path = require("path") +var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") +var Minimatch = minimatch.Minimatch + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = path.resolve(options.cwd) + self.changedCwd = self.cwd !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + self.cwdAbs = makeAbs(self, self.cwd) + self.nomount = !!options.nomount + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !(/\/$/.test(e)) + var c = self.cache[e] || self.cache[makeAbs(self, e)] + if (notDir && c) + notDir = c !== 'DIR' && !Array.isArray(c) + return notDir + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + + if (process.platform === 'win32') + abs = abs.replace(/\\/g, '/') + + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/glob.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/glob.js new file mode 100644 index 00000000..c1d72320 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/glob.js @@ -0,0 +1,782 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var globSync = require('./sync.js') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = require('inflight') +var util = require('util') +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = require('once') + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +function extend (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add) + var i = keys.length + while (i--) { + origin[keys[i]] = add[keys[i]] + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + var n = this.minimatch.set.length + this._processing = 0 + this.matches = new Array(n) + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + var sync = true + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + sync = false + + function done () { + --self._processing + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish() + }) + } else { + self._finish() + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + fs.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (this.matches[index][e]) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = this._makeAbs(e) + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + if (this.mark) + e = this._mark(e) + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er) + return cb() + + var isSym = lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + this.emit('error', error) + this.abort() + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && !stat.isDirectory()) + return cb(null, false, stat) + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return cb() + + return cb(null, c, stat) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/package.json new file mode 100644 index 00000000..1374fd02 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/package.json @@ -0,0 +1,76 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "glob", + "description": "a little globber", + "version": "7.0.3", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "main": "glob.js", + "files": [ + "glob.js", + "sync.js", + "common.js" + ], + "engines": { + "node": "*" + }, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "devDependencies": { + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^5.7.0", + "tick": "0.0.6" + }, + "scripts": { + "prepublish": "npm run benchclean", + "profclean": "rm -f v8.log profile.txt", + "test": "tap test/*.js --cov", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", + "bench": "bash benchmark.sh", + "prof": "bash prof.sh && cat profile.txt", + "benchclean": "node benchclean.js" + }, + "license": "ISC", + "gitHead": "2fc2278ab857c7df117213a2fb431de090be6353", + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" + }, + "homepage": "https://github.com/isaacs/node-glob#readme", + "_id": "glob@7.0.3", + "_shasum": "0aa235931a4a96ac13d60ffac2fb877bd6ed4f58", + "_from": "glob@7.0.3", + "_npmVersion": "3.7.3", + "_nodeVersion": "5.6.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "0aa235931a4a96ac13d60ffac2fb877bd6ed4f58", + "tarball": "http://registry.npmjs.org/glob/-/glob-7.0.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/glob-7.0.3.tgz_1457166529288_0.7840580905321985" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.3.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/sync.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/sync.js new file mode 100644 index 00000000..7f951892 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/glob/sync.js @@ -0,0 +1,467 @@ +module.exports = globSync +globSync.GlobSync = GlobSync + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = fs.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this.matches[index][e] = true + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + var abs = this._makeAbs(e) + if (this.mark) + e = this._mark(e) + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[this._makeAbs(e)] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + // lstat failed, doesn't exist + return null + } + + var isSym = lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + throw error + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this.matches[index][prefix] = true +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + return false + } + + if (lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/LICENSE new file mode 100644 index 00000000..4801e373 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/README.md new file mode 100644 index 00000000..8c0ffe4a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/README.md @@ -0,0 +1,53 @@ +# graceful-fs + +graceful-fs functions as a drop-in replacement for the fs module, +making various improvements. + +The improvements are meant to normalize behavior across different +platforms and environments, and to make filesystem access more +resilient to errors. + +## Improvements over [fs module](http://api.nodejs.org/fs.html) + +graceful-fs: + +* Queues up `open` and `readdir` calls, and retries them once + something closes if there is an EMFILE error from too many file + descriptors. +* fixes `lchmod` for Node versions prior to 0.6.2. +* implements `fs.lutimes` if possible. Otherwise it becomes a noop. +* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or + `lchown` if the user isn't root. +* makes `lchmod` and `lchown` become noops, if not available. +* retries reading a file if `read` results in EAGAIN error. + +On Windows, it retries renaming a file for up to one second if `EACCESS` +or `EPERM` error occurs, likely because antivirus software has locked +the directory. + +## USAGE + +```javascript +// use just like fs +var fs = require('graceful-fs') + +// now go and do stuff with it... +fs.readFileSync('some-file-or-whatever') +``` + +## Global Patching + +If you want to patch the global fs module (or any other fs-like +module) you can do this: + +```javascript +// Make sure to read the caveat below. +var realFs = require('fs') +var gracefulFs = require('graceful-fs') +gracefulFs.gracefulify(realFs) +``` + +This should only ever be done at the top-level application layer, in +order to delay on EMFILE errors from any fs-using dependencies. You +should **not** do this in a library, because it can cause unexpected +delays in other parts of the program. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/fs.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/fs.js new file mode 100644 index 00000000..ce2c61a8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/fs.js @@ -0,0 +1,21 @@ +'use strict' + +var fs = require('fs') + +module.exports = clone(fs) + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: obj.__proto__ } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/graceful-fs.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/graceful-fs.js new file mode 100644 index 00000000..70d35b97 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/graceful-fs.js @@ -0,0 +1,253 @@ +var fs = require('fs') +var polyfills = require('./polyfills.js') +var legacy = require('./legacy-streams.js') +var queue = [] + +var util = require('util') + +function noop () {} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(queue) + require('assert').equal(queue.length, 0) + }) +} + +module.exports = patch(require('./fs.js')) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { + module.exports = patch(fs) +} + +// Always patch fs.close/closeSync, because we want to +// retry() whenever a close happens *anywhere* in the program. +// This is essential when multiple graceful-fs instances are +// in play at the same time. +module.exports.close = +fs.close = (function (fs$close) { return function (fd, cb) { + return fs$close.call(fs, fd, function (err) { + if (!err) + retry() + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) +}})(fs.close) + +module.exports.closeSync = +fs.closeSync = (function (fs$closeSync) { return function (fd) { + // Note that graceful-fs also retries when fs.closeSync() fails. + // Looks like a bug to me, although it's probably a harmless one. + var rval = fs$closeSync.apply(fs, arguments) + retry() + return rval +}})(fs.closeSync) + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + fs.FileReadStream = ReadStream; // Legacy name. + fs.FileWriteStream = WriteStream; // Legacy name. + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + function readdir (path, cb) { + return go$readdir(path, cb) + + function go$readdir () { + return fs$readdir(path, function (err, files) { + if (files && files.sort) + files.sort(); // Backwards compatibility with graceful-fs. + + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [path, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + + var fs$WriteStream = fs.WriteStream + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + + fs.ReadStream = ReadStream + fs.WriteStream = WriteStream + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + queue.push(elem) +} + +function retry () { + var elem = queue.shift() + if (elem) { + debug('RETRY', elem[0].name, elem[1]) + elem[0].apply(null, elem[1]) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/legacy-streams.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/legacy-streams.js new file mode 100644 index 00000000..891ad852 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/legacy-streams.js @@ -0,0 +1,118 @@ +var Stream = require('stream').Stream + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/package.json new file mode 100644 index 00000000..0e8b17db --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/package.json @@ -0,0 +1,76 @@ +{ + "name": "graceful-fs", + "description": "A drop-in replacement for fs, making various improvements.", + "version": "4.1.3", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/node-graceful-fs.git" + }, + "main": "graceful-fs.js", + "engines": { + "node": ">=0.4.0" + }, + "directories": { + "test": "test" + }, + "scripts": { + "test": "node test.js | tap -" + }, + "keywords": [ + "fs", + "module", + "reading", + "retry", + "retries", + "queue", + "error", + "errors", + "handling", + "EMFILE", + "EAGAIN", + "EINVAL", + "EPERM", + "EACCESS" + ], + "license": "ISC", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^5.4.2" + }, + "files": [ + "fs.js", + "graceful-fs.js", + "legacy-streams.js", + "polyfills.js" + ], + "gitHead": "694c56f3aed4aee62d6df169be123d3984f61b85", + "bugs": { + "url": "https://github.com/isaacs/node-graceful-fs/issues" + }, + "homepage": "https://github.com/isaacs/node-graceful-fs#readme", + "_id": "graceful-fs@4.1.3", + "_shasum": "92033ce11113c41e2628d61fdfa40bc10dc0155c", + "_from": "graceful-fs@latest", + "_npmVersion": "3.7.0", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "92033ce11113c41e2628d61fdfa40bc10dc0155c", + "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/graceful-fs-4.1.3.tgz_1454449326495_0.943017533281818" + }, + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.3.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/polyfills.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/polyfills.js new file mode 100644 index 00000000..1422604a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/graceful-fs/polyfills.js @@ -0,0 +1,252 @@ +var fs = require('./fs.js') +var constants = require('constants') + +var origCwd = process.cwd +var cwd = null +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} + +var chdir = process.chdir +process.chdir = function(d) { + cwd = null + chdir.call(process, d) +} + +module.exports = patch + +function patch (fs) { + // (re-)implement some things that are known busted or missing. + + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } + + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) + } + + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. + + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) + + fs.chmod = chownFix(fs.chmod) + fs.fchmod = chownFix(fs.fchmod) + fs.lchmod = chownFix(fs.lchmod) + + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) + + fs.chmodSync = chownFix(fs.chmodSync) + fs.fchmodSync = chownFix(fs.fchmodSync) + fs.lchmodSync = chownFix(fs.lchmodSync) + + // if lchmod/lchown do not exist, then make them no-ops + if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + process.nextTick(cb) + } + fs.lchownSync = function () {} + } + + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 1 second. + if (process.platform === "win32") { + fs.rename = (function (fs$rename) { return function (from, to, cb) { + var start = Date.now() + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 1000) { + return fs$rename(from, to, CB) + } + if (cb) cb(er) + }) + }})(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = (function (fs$read) { return function (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + }})(fs.read) + + fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) +} + +function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + callback = callback || noop + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } +} + +function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + cb = cb || noop + if (er) return cb(er) + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + return cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + + } else { + fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } + fs.lutimesSync = function () {} + } +} + +function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er, res) { + if (chownErOk(er)) er = null + cb(er, res) + }) + } +} + +function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } +} + +// ENOSYS means that the fs doesn't support the op. Just ignore +// that, because it doesn't matter. +// +// if there's no getuid, or if getuid() is something other +// than 0, and the error is EINVAL or EPERM, then just ignore +// it. +// +// This specific case is a silent failure in cp, install, tar, +// and most other unix tools that manage permissions. +// +// When running as root, or if other types of errors are +// encountered, then it's strict. +function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/.npmignore new file mode 100644 index 00000000..0672b812 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/.npmignore @@ -0,0 +1,3 @@ +*~ +.# +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/.travis.yml new file mode 100644 index 00000000..9b328c26 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.11" + - "0.10" +script: "npm test" diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/LICENSE new file mode 100644 index 00000000..8ed0832d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/README.md new file mode 100644 index 00000000..717a2566 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/README.md @@ -0,0 +1,98 @@ +# hosted-git-info + +This will let you identify and transform various git hosts URLs between +protocols. It also can tell you what the URL is for the raw path for +particular file for direct access without git. + +## Usage + +```javascript +var hostedGitInfo = require("hosted-git-info") +var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git") +/* info looks like: +{ + type: "github", + domain: "github.com", + user: "npm", + project: "hosted-git-info" +} +*/ +``` + +If the URL can't be matched with a git host, `null` will be returned. We +can match git, ssh and https urls. Additionally, we can match ssh connect +strings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg, +`github:npm/hosted-git-info`). Github specifically, is detected in the case +of a third, unprefixed, form: `npm/hosted-git-info`. + +If it does match, the returned object has properties of: + +* info.type -- The short name of the service +* info.domain -- The domain for git protocol use +* info.user -- The name of the user/org on the git host +* info.project -- The name of the project on the git host + +And methods of: + +* info.file(path) + +Given the path of a file relative to the repository, returns a URL for +directly fetching it from the githost. If no committish was set then +`master` will be used as the default. + +For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")` +would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json` + +* info.shortcut() + +eg, `github:npm/hosted-git-info` + +* info.browse() + +eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0` + +* info.bugs() + +eg, `https://github.com/npm/hosted-git-info/issues` + +* info.docs() + +eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme` + +* info.https() + +eg, `git+https://github.com/npm/hosted-git-info.git` + +* info.sshurl() + +eg, `git+ssh://git@github.com/npm/hosted-git-info.git` + +* info.ssh() + +eg, `git@github.com:npm/hosted-git-info.git` + +* info.path() + +eg, `npm/hosted-git-info` + +* info.getDefaultRepresentation() + +Returns the default output type. The default output type is based on the +string you passed in to be parsed + +* info.toString() + +Uses the getDefaultRepresentation to call one of the other methods to get a URL for +this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give +you a normalized version of the URL that still uses the same protocol. + +Shortcuts will still be returned as shortcuts, but the special case github +form of `org/project` will be normalized to `github:org/project`. + +SSH connect strings will be normalized into `git+ssh` URLs. + + +## Supported hosts + +Currently this supports Github, Bitbucket and Gitlab. Pull requests for +additional hosts welcome. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/git-host-info.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/git-host-info.js new file mode 100644 index 00000000..db82c20d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/git-host-info.js @@ -0,0 +1,64 @@ +'use strict' + +var gitHosts = module.exports = { + github: { + // First two are insecure and generally shouldn't be used any more, but + // they are still supported. + 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'github.com', + 'treepath': 'tree', + 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}' + }, + bitbucket: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'bitbucket.org', + 'treepath': 'src' + }, + gitlab: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gitlab.com', + 'treepath': 'tree', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#README', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues' + }, + gist: { + 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gist.github.com', + 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]+)(?:[.]git)?$/, + 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', + 'bugstemplate': 'https://{domain}/{project}', + 'gittemplate': 'git://{domain}/{project}.git{#committish}', + 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{project}{/committish}', + 'docstemplate': 'https://{domain}/{project}{/committish}', + 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', + 'shortcuttemplate': '{type}:{project}{#committish}', + 'pathtemplate': '{project}{#committish}' + } +} + +var gitHostDefaults = { + 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', + 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', + 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', + 'shortcuttemplate': '{type}:{user}/{project}{#committish}', + 'pathtemplate': '{user}/{project}{#committish}', + 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git)?$/ +} + +Object.keys(gitHosts).forEach(function (name) { + Object.keys(gitHostDefaults).forEach(function (key) { + if (gitHosts[name][key]) return + gitHosts[name][key] = gitHostDefaults[key] + }) + gitHosts[name].protocols_re = RegExp('^(' + + gitHosts[name].protocols.map(function (protocol) { + return protocol.replace(/([\\+*{}()\[\]$^|])/g, '\\$1') + }).join('|') + '):$') +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/git-host.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/git-host.js new file mode 100644 index 00000000..ca060336 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/git-host.js @@ -0,0 +1,96 @@ +'use strict' +var gitHosts = require('./git-host-info.js') + +var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation) { + var gitHostInfo = this + gitHostInfo.type = type + Object.keys(gitHosts[type]).forEach(function (key) { + gitHostInfo[key] = gitHosts[type][key] + }) + gitHostInfo.user = user + gitHostInfo.auth = auth + gitHostInfo.project = project + gitHostInfo.committish = committish + gitHostInfo.default = defaultRepresentation +} +GitHost.prototype = {} + +GitHost.prototype.hash = function () { + return this.committish ? '#' + this.committish : '' +} + +GitHost.prototype._fill = function (template, vars) { + if (!template) return + if (!vars) vars = {} + var self = this + Object.keys(this).forEach(function (key) { + if (self[key] != null && vars[key] == null) vars[key] = self[key] + }) + var rawAuth = vars.auth + var rawComittish = vars.committish + Object.keys(vars).forEach(function (key) { + vars[key] = encodeURIComponent(vars[key]) + }) + vars['auth@'] = rawAuth ? rawAuth + '@' : '' + vars['#committish'] = rawComittish ? '#' + rawComittish : '' + vars['/tree/committish'] = vars.committish + ? '/' + vars.treepath + '/' + vars.committish + : '' + vars['/committish'] = vars.committish ? '/' + vars.committish : '' + vars.committish = vars.committish || 'master' + var res = template + Object.keys(vars).forEach(function (key) { + res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]) + }) + return res +} + +GitHost.prototype.ssh = function () { + return this._fill(this.sshtemplate) +} + +GitHost.prototype.sshurl = function () { + return this._fill(this.sshurltemplate) +} + +GitHost.prototype.browse = function () { + return this._fill(this.browsetemplate) +} + +GitHost.prototype.docs = function () { + return this._fill(this.docstemplate) +} + +GitHost.prototype.bugs = function () { + return this._fill(this.bugstemplate) +} + +GitHost.prototype.https = function () { + return this._fill(this.httpstemplate) +} + +GitHost.prototype.git = function () { + return this._fill(this.gittemplate) +} + +GitHost.prototype.shortcut = function () { + return this._fill(this.shortcuttemplate) +} + +GitHost.prototype.path = function () { + return this._fill(this.pathtemplate) +} + +GitHost.prototype.file = function (P) { + return this._fill(this.filetemplate, { + path: P.replace(/^[/]+/g, '') + }) +} + +GitHost.prototype.getDefaultRepresentation = function () { + return this.default +} + +GitHost.prototype.toString = function () { + return (this[this.default] || this.sshurl).call(this) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/index.js new file mode 100644 index 00000000..4cbbc6f5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/index.js @@ -0,0 +1,103 @@ +'use strict' +var url = require('url') +var gitHosts = require('./git-host-info.js') +var GitHost = module.exports = require('./git-host.js') + +var protocolToRepresentationMap = { + 'git+ssh': 'sshurl', + 'git+https': 'https', + 'ssh': 'sshurl', + 'git': 'git' +} + +function protocolToRepresentation (protocol) { + if (protocol.substr(-1) === ':') protocol = protocol.slice(0, -1) + return protocolToRepresentationMap[protocol] || protocol +} + +var authProtocols = { + 'git:': true, + 'https:': true, + 'git+https:': true, + 'http:': true, + 'git+http:': true +} + +module.exports.fromUrl = function (giturl) { + if (giturl == null || giturl === '') return + var url = fixupUnqualifiedGist( + isGitHubShorthand(giturl) ? 'github:' + giturl : giturl + ) + var parsed = parseGitUrl(url) + var matches = Object.keys(gitHosts).map(function (gitHostName) { + var gitHostInfo = gitHosts[gitHostName] + var auth = null + if (parsed.auth && authProtocols[parsed.protocol]) { + auth = decodeURIComponent(parsed.auth) + } + var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null + var user = null + var project = null + var defaultRepresentation = null + if (parsed.protocol === gitHostName + ':') { + user = decodeURIComponent(parsed.host) + project = parsed.path && decodeURIComponent(parsed.path.replace(/^[/](.*?)(?:[.]git)?$/, '$1')) + defaultRepresentation = 'shortcut' + } else { + if (parsed.host !== gitHostInfo.domain) return + if (!gitHostInfo.protocols_re.test(parsed.protocol)) return + var pathmatch = gitHostInfo.pathmatch + var matched = parsed.path.match(pathmatch) + if (!matched) return + if (matched[1] != null) user = decodeURIComponent(matched[1]) + if (matched[2] != null) project = decodeURIComponent(matched[2]) + defaultRepresentation = protocolToRepresentation(parsed.protocol) + } + return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation) + }).filter(function (gitHostInfo) { return gitHostInfo }) + if (matches.length !== 1) return + return matches[0] +} + +function isGitHubShorthand (arg) { + // Note: This does not fully test the git ref format. + // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html + // + // The only way to do this properly would be to shell out to + // git-check-ref-format, and as this is a fast sync function, + // we don't want to do that. Just let git fail if it turns + // out that the commit-ish is invalid. + // GH usernames cannot start with . or - + return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg) +} + +function fixupUnqualifiedGist (giturl) { + // necessary for round-tripping gists + var parsed = url.parse(giturl) + if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) { + return parsed.protocol + '/' + parsed.host + } else { + return giturl + } +} + +function parseGitUrl (giturl) { + if (typeof giturl !== 'string') giturl = '' + giturl + var matched = giturl.match(/^([^@]+)@([^:]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) + if (!matched) return url.parse(giturl) + return { + protocol: 'git+ssh:', + slashes: true, + auth: matched[1], + host: matched[2], + port: null, + hostname: matched[2], + hash: matched[4], + search: null, + query: null, + pathname: '/' + matched[3], + path: '/' + matched[3], + href: 'git+ssh://' + matched[1] + '@' + matched[2] + + '/' + matched[3] + (matched[4] || '') + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/package.json new file mode 100644 index 00000000..40133a3f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/hosted-git-info/package.json @@ -0,0 +1,59 @@ +{ + "name": "hosted-git-info", + "version": "2.1.4", + "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", + "main": "index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/hosted-git-info.git" + }, + "keywords": [ + "git", + "github", + "bitbucket", + "gitlab" + ], + "author": { + "name": "Rebecca Turner", + "email": "me@re-becca.org", + "url": "http://re-becca.org" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/hosted-git-info/issues" + }, + "homepage": "https://github.com/npm/hosted-git-info", + "scripts": { + "test": "standard && tap test/*.js" + }, + "devDependencies": { + "standard": "^3.3.2", + "tap": "^0.4.13" + }, + "gitHead": "9e1a36df8eb050a663713c79e56d89dadba2bd8d", + "_id": "hosted-git-info@2.1.4", + "_shasum": "d9e953b26988be88096c46e926494d9604c300f8", + "_from": "hosted-git-info@>=2.1.2 <2.2.0", + "_npmVersion": "2.10.1", + "_nodeVersion": "2.0.2", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "dist": { + "shasum": "d9e953b26988be88096c46e926494d9604c300f8", + "tarball": "http://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.4.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.4.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/README.md new file mode 100644 index 00000000..fb08ec95 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/README.md @@ -0,0 +1,122 @@ +iMurmurHash.js +============== + +An incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js). + +This version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing. + +Installation +------------ + +To use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site. + +```html + + +``` + +--- + +To use iMurmurHash in Node.js, install the module using NPM: + +```bash +npm install imurmurhash +``` + +Then simply include it in your scripts: + +```javascript +MurmurHash3 = require('imurmurhash'); +``` + +Quick Example +------------- + +```javascript +// Create the initial hash +var hashState = MurmurHash3('string'); + +// Incrementally add text +hashState.hash('more strings'); +hashState.hash('even more strings'); + +// All calls can be chained if desired +hashState.hash('and').hash('some').hash('more'); + +// Get a result +hashState.result(); +// returns 0xe4ccfe6b +``` + +Functions +--------- + +### MurmurHash3 ([string], [seed]) +Get a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example: + +```javascript +// Use the cached object, calling the function again will return the same +// object (but reset, so the current state would be lost) +hashState = MurmurHash3(); +... + +// Create a new object that can be safely used however you wish. Calling the +// function again will simply return a new state object, and no state loss +// will occur, at the cost of creating more objects. +hashState = new MurmurHash3(); +``` + +Both methods can be mixed however you like if you have different use cases. + +--- + +### MurmurHash3.prototype.hash (string) +Incrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained. + +--- + +### MurmurHash3.prototype.result () +Get the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`. + +```javascript +// Do the whole string at once +MurmurHash3('this is a test string').result(); +// 0x70529328 + +// Do part of the string, get a result, then the other part +var m = MurmurHash3('this is a'); +m.result(); +// 0xbfc4f834 +m.hash(' test string').result(); +// 0x70529328 (same as above) +``` + +--- + +### MurmurHash3.prototype.reset ([seed]) +Reset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained. + +--- + +License (MIT) +------------- +Copyright (c) 2013 Gary Court, Jens Taylor + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/imurmurhash.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/imurmurhash.js new file mode 100644 index 00000000..8ad7dbda --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/imurmurhash.js @@ -0,0 +1,138 @@ +/** + * @preserve + * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) + * + * @author Jens Taylor + * @see http://github.com/homebrewing/brauhaus-diff + * @author Gary Court + * @see http://github.com/garycourt/murmurhash-js + * @author Austin Appleby + * @see http://sites.google.com/site/murmurhash/ + */ +(function(){ + var cache; + + // Call this function without `new` to use the cached object (good for + // single-threaded environments), or with `new` to create a new object. + // + // @param {string} key A UTF-16 or ASCII string + // @param {number} seed An optional positive integer + // @return {object} A MurmurHash3 object for incremental hashing + function MurmurHash3(key, seed) { + var m = this instanceof MurmurHash3 ? this : cache; + m.reset(seed) + if (typeof key === 'string' && key.length > 0) { + m.hash(key); + } + + if (m !== this) { + return m; + } + }; + + // Incrementally add a string to this hash + // + // @param {string} key A UTF-16 or ASCII string + // @return {object} this + MurmurHash3.prototype.hash = function(key) { + var h1, k1, i, top, len; + + len = key.length; + this.len += len; + + k1 = this.k1; + i = 0; + switch (this.rem) { + case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0; + case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0; + case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0; + case 3: + k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0; + k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0; + } + + this.rem = (len + this.rem) & 3; // & 3 is same as % 4 + len -= this.rem; + if (len > 0) { + h1 = this.h1; + while (1) { + k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; + k1 = (k1 << 15) | (k1 >>> 17); + k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; + + h1 ^= k1; + h1 = (h1 << 13) | (h1 >>> 19); + h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff; + + if (i >= len) { + break; + } + + k1 = ((key.charCodeAt(i++) & 0xffff)) ^ + ((key.charCodeAt(i++) & 0xffff) << 8) ^ + ((key.charCodeAt(i++) & 0xffff) << 16); + top = key.charCodeAt(i++); + k1 ^= ((top & 0xff) << 24) ^ + ((top & 0xff00) >> 8); + } + + k1 = 0; + switch (this.rem) { + case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16; + case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8; + case 1: k1 ^= (key.charCodeAt(i) & 0xffff); + } + + this.h1 = h1; + } + + this.k1 = k1; + return this; + }; + + // Get the result of this hash + // + // @return {number} The 32-bit hash + MurmurHash3.prototype.result = function() { + var k1, h1; + + k1 = this.k1; + h1 = this.h1; + + if (k1 > 0) { + k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; + k1 = (k1 << 15) | (k1 >>> 17); + k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; + h1 ^= k1; + } + + h1 ^= this.len; + + h1 ^= h1 >>> 16; + h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff; + h1 ^= h1 >>> 13; + h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff; + h1 ^= h1 >>> 16; + + return h1 >>> 0; + }; + + // Reset the hash object for reuse + // + // @param {number} seed An optional positive integer + MurmurHash3.prototype.reset = function(seed) { + this.h1 = typeof seed === 'number' ? seed : 0; + this.rem = this.k1 = this.len = 0; + return this; + }; + + // A cached object to use. This can be safely used if you're in a single- + // threaded environment, otherwise you need to create new hashes to use. + cache = new MurmurHash3(); + + if (typeof(module) != 'undefined') { + module.exports = MurmurHash3; + } else { + this.MurmurHash3 = MurmurHash3; + } +}()); diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/imurmurhash.min.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/imurmurhash.min.js new file mode 100644 index 00000000..7dcd3d98 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/imurmurhash.min.js @@ -0,0 +1,12 @@ +/** + * @preserve + * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) + * + * @author Jens Taylor + * @see http://github.com/homebrewing/brauhaus-diff + * @author Gary Court + * @see http://github.com/garycourt/murmurhash-js + * @author Austin Appleby + * @see http://sites.google.com/site/murmurhash/ + */ +!function(){function t(h,r){var s=this instanceof t?this:e;return s.reset(r),"string"==typeof h&&h.length>0&&s.hash(h),s!==this?s:void 0}var e;t.prototype.hash=function(t){var e,h,r,s,i;switch(i=t.length,this.len+=i,h=this.k1,r=0,this.rem){case 0:h^=i>r?65535&t.charCodeAt(r++):0;case 1:h^=i>r?(65535&t.charCodeAt(r++))<<8:0;case 2:h^=i>r?(65535&t.charCodeAt(r++))<<16:0;case 3:h^=i>r?(255&t.charCodeAt(r))<<24:0,h^=i>r?(65280&t.charCodeAt(r++))>>8:0}if(this.rem=3&i+this.rem,i-=this.rem,i>0){for(e=this.h1;;){if(h=4294967295&11601*h+3432906752*(65535&h),h=h<<15|h>>>17,h=4294967295&13715*h+461832192*(65535&h),e^=h,e=e<<13|e>>>19,e=4294967295&5*e+3864292196,r>=i)break;h=65535&t.charCodeAt(r++)^(65535&t.charCodeAt(r++))<<8^(65535&t.charCodeAt(r++))<<16,s=t.charCodeAt(r++),h^=(255&s)<<24^(65280&s)>>8}switch(h=0,this.rem){case 3:h^=(65535&t.charCodeAt(r+2))<<16;case 2:h^=(65535&t.charCodeAt(r+1))<<8;case 1:h^=65535&t.charCodeAt(r)}this.h1=e}return this.k1=h,this},t.prototype.result=function(){var t,e;return t=this.k1,e=this.h1,t>0&&(t=4294967295&11601*t+3432906752*(65535&t),t=t<<15|t>>>17,t=4294967295&13715*t+461832192*(65535&t),e^=t),e^=this.len,e^=e>>>16,e=4294967295&51819*e+2246770688*(65535&e),e^=e>>>13,e=4294967295&44597*e+3266445312*(65535&e),e^=e>>>16,e>>>0},t.prototype.reset=function(t){return this.h1="number"==typeof t?t:0,this.rem=this.k1=this.len=0,this},e=new t,"undefined"!=typeof module?module.exports=t:this.MurmurHash3=t}(); \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/package.json new file mode 100644 index 00000000..5735f16a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/imurmurhash/package.json @@ -0,0 +1,60 @@ +{ + "name": "imurmurhash", + "version": "0.1.4", + "description": "An incremental implementation of MurmurHash3", + "homepage": "https://github.com/jensyt/imurmurhash-js", + "main": "imurmurhash.js", + "files": [ + "imurmurhash.js", + "imurmurhash.min.js", + "package.json", + "README.md" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/jensyt/imurmurhash-js.git" + }, + "bugs": { + "url": "https://github.com/jensyt/imurmurhash-js/issues" + }, + "keywords": [ + "murmur", + "murmurhash", + "murmurhash3", + "hash", + "incremental" + ], + "author": { + "name": "Jens Taylor", + "email": "jensyt@gmail.com", + "url": "https://github.com/homebrewing" + }, + "license": "MIT", + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.8.19" + }, + "readme": "iMurmurHash.js\n==============\n\nAn incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js).\n\nThis version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing.\n\nInstallation\n------------\n\nTo use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site.\n\n```html\n\n\n```\n\n---\n\nTo use iMurmurHash in Node.js, install the module using NPM:\n\n```bash\nnpm install imurmurhash\n```\n\nThen simply include it in your scripts:\n\n```javascript\nMurmurHash3 = require('imurmurhash');\n```\n\nQuick Example\n-------------\n\n```javascript\n// Create the initial hash\nvar hashState = MurmurHash3('string');\n\n// Incrementally add text\nhashState.hash('more strings');\nhashState.hash('even more strings');\n\n// All calls can be chained if desired\nhashState.hash('and').hash('some').hash('more');\n\n// Get a result\nhashState.result();\n// returns 0xe4ccfe6b\n```\n\nFunctions\n---------\n\n### MurmurHash3 ([string], [seed])\nGet a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example:\n\n```javascript\n// Use the cached object, calling the function again will return the same\n// object (but reset, so the current state would be lost)\nhashState = MurmurHash3();\n...\n\n// Create a new object that can be safely used however you wish. Calling the\n// function again will simply return a new state object, and no state loss\n// will occur, at the cost of creating more objects.\nhashState = new MurmurHash3();\n```\n\nBoth methods can be mixed however you like if you have different use cases.\n\n---\n\n### MurmurHash3.prototype.hash (string)\nIncrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained.\n\n---\n\n### MurmurHash3.prototype.result ()\nGet the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`.\n\n```javascript\n// Do the whole string at once\nMurmurHash3('this is a test string').result();\n// 0x70529328\n\n// Do part of the string, get a result, then the other part\nvar m = MurmurHash3('this is a');\nm.result();\n// 0xbfc4f834\nm.hash(' test string').result();\n// 0x70529328 (same as above)\n```\n\n---\n\n### MurmurHash3.prototype.reset ([seed])\nReset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained.\n\n---\n\nLicense (MIT)\n-------------\nCopyright (c) 2013 Gary Court, Jens Taylor\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "README.md", + "_id": "imurmurhash@0.1.4", + "dist": { + "shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea", + "tarball": "http://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + }, + "_from": "imurmurhash@0.1.4", + "_npmVersion": "1.3.2", + "_npmUser": { + "name": "jensyt", + "email": "jensyt@gmail.com" + }, + "maintainers": [ + { + "name": "jensyt", + "email": "jensyt@gmail.com" + } + ], + "directories": {}, + "_shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea", + "_resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/LICENSE new file mode 100644 index 00000000..235bdd54 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/README.md new file mode 100644 index 00000000..9360515a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/README.md @@ -0,0 +1,37 @@ +# inflight + +Add callbacks to requests in flight to avoid async duplication + +## USAGE + +```javascript +var inflight = require('inflight') + +// some request that does some stuff +function req(key, callback) { + // key is any random string. like a url or filename or whatever. + // + // will return either a falsey value, indicating that the + // request for this key is already in flight, or a new callback + // which when called will call all callbacks passed to inflightk + // with the same key + callback = inflight(key, callback) + + // If we got a falsey value back, then there's already a req going + if (!callback) return + + // this is where you'd fetch the url or whatever + // callback is also once()-ified, so it can safely be assigned + // to multiple events etc. First call wins. + setTimeout(function() { + callback(null, key) + }, 100) +} + +// only assigns a single setTimeout +// when it dings, all cbs get called +req('foo', cb1) +req('foo', cb2) +req('foo', cb3) +req('foo', cb4) +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/inflight.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/inflight.js new file mode 100644 index 00000000..5227a49d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/inflight.js @@ -0,0 +1,44 @@ +var wrappy = require('wrappy') +var reqs = Object.create(null) +var once = require('once') + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/package.json new file mode 100644 index 00000000..debdf5bf --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/package.json @@ -0,0 +1,36 @@ +{ + "name": "inflight", + "version": "1.0.4", + "description": "Add callbacks to requests in flight to avoid async duplication", + "main": "inflight.js", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + }, + "devDependencies": { + "tap": "^0.4.10" + }, + "scripts": { + "test": "tap test.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inflight" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "readme": "# inflight\n\nAdd callbacks to requests in flight to avoid async duplication\n\n## USAGE\n\n```javascript\nvar inflight = require('inflight')\n\n// some request that does some stuff\nfunction req(key, callback) {\n // key is any random string. like a url or filename or whatever.\n //\n // will return either a falsey value, indicating that the\n // request for this key is already in flight, or a new callback\n // which when called will call all callbacks passed to inflightk\n // with the same key\n callback = inflight(key, callback)\n\n // If we got a falsey value back, then there's already a req going\n if (!callback) return\n\n // this is where you'd fetch the url or whatever\n // callback is also once()-ified, so it can safely be assigned\n // to multiple events etc. First call wins.\n setTimeout(function() {\n callback(null, key)\n }, 100)\n}\n\n// only assigns a single setTimeout\n// when it dings, all cbs get called\nreq('foo', cb1)\nreq('foo', cb2)\nreq('foo', cb3)\nreq('foo', cb4)\n```\n", + "readmeFilename": "README.md", + "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", + "_id": "inflight@1.0.4", + "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "_from": "inflight@>=1.0.4 <1.1.0" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/test.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/test.js new file mode 100644 index 00000000..ac141409 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/inflight/test.js @@ -0,0 +1,97 @@ +var test = require('tap').test +var inf = require('./inflight.js') + + +function req (key, cb) { + cb = inf(key, cb) + if (cb) setTimeout(function () { + cb(key) + cb(key) + }) + return cb +} + +test('basic', function (t) { + var calleda = false + var a = req('key', function (k) { + t.notOk(calleda) + calleda = true + t.equal(k, 'key') + if (calledb) t.end() + }) + t.ok(a, 'first returned cb function') + + var calledb = false + var b = req('key', function (k) { + t.notOk(calledb) + calledb = true + t.equal(k, 'key') + if (calleda) t.end() + }) + + t.notOk(b, 'second should get falsey inflight response') +}) + +test('timing', function (t) { + var expect = [ + 'method one', + 'start one', + 'end one', + 'two', + 'tick', + 'three' + ] + var i = 0 + + function log (m) { + t.equal(m, expect[i], m + ' === ' + expect[i]) + ++i + if (i === expect.length) + t.end() + } + + function method (name, cb) { + log('method ' + name) + process.nextTick(cb) + } + + var one = inf('foo', function () { + log('start one') + var three = inf('foo', function () { + log('three') + }) + if (three) method('three', three) + log('end one') + }) + + method('one', one) + + var two = inf('foo', function () { + log('two') + }) + if (two) method('one', two) + + process.nextTick(log.bind(null, 'tick')) +}) + +test('parameters', function (t) { + t.plan(8) + + var a = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.ok(a, 'first returned cb function') + + var b = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.notOk(b, 'second should get falsey inflight response') + + setTimeout(function () { + a(1, 2, 3) + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/LICENSE new file mode 100644 index 00000000..1d68a100 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/README.md new file mode 100644 index 00000000..b41e30c2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/inherits.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/inherits.js new file mode 100644 index 00000000..1b61effa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/inherits.js @@ -0,0 +1 @@ +module.exports = require('util').inherits diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/inherits_browser.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/inherits_browser.js new file mode 100644 index 00000000..1464d7f3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/inherits_browser.js @@ -0,0 +1,23 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/package.json new file mode 100644 index 00000000..00ce0d78 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/package.json @@ -0,0 +1,51 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.1", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits" + }, + "license": "ISC", + "scripts": { + "test": "node test" + }, + "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "_id": "inherits@2.0.1", + "dist": { + "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "_from": "inherits@latest", + "_npmVersion": "1.3.8", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "homepage": "https://github.com/isaacs/inherits" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/test.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/test.js new file mode 100644 index 00000000..347dd1f2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/inherits/test.js @@ -0,0 +1,25 @@ +var inherits = require('./inherits.js') +var assert = require('assert') + +function test(c) { + assert(c.constructor === Child) + assert(c.constructor.super_ === Parent) + assert(Object.getPrototypeOf(c) === Child.prototype) + assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) + assert(c instanceof Child) + assert(c instanceof Parent) +} + +function Child() { + Parent.call(this) + test(this) +} + +function Parent() {} + +inherits(Child, Parent) + +var c = new Child +test(c) + +console.log('ok') diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/README.md new file mode 100644 index 00000000..dc6ff3c6 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/README.md @@ -0,0 +1,102 @@ +An ini format parser and serializer for node. + +Sections are treated as nested objects. Items before the first +heading are saved on the object directly. + +## Usage + +Consider an ini-file `config.ini` that looks like this: + + ; this comment is being ignored + scope = global + + [database] + user = dbuser + password = dbpassword + database = use_this_database + + [paths.default] + datadir = /var/lib/data + array[] = first value + array[] = second value + array[] = third value + +You can read, manipulate and write the ini-file like so: + + var fs = require('fs') + , ini = require('ini') + + var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8')) + + config.scope = 'local' + config.database.database = 'use_another_database' + config.paths.default.tmpdir = '/tmp' + delete config.paths.default.datadir + config.paths.default.array.push('fourth value') + + fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' })) + +This will result in a file called `config_modified.ini` being written +to the filesystem with the following content: + + [section] + scope=local + [section.database] + user=dbuser + password=dbpassword + database=use_another_database + [section.paths.default] + tmpdir=/tmp + array[]=first value + array[]=second value + array[]=third value + array[]=fourth value + + +## API + +### decode(inistring) + +Decode the ini-style formatted `inistring` into a nested object. + +### parse(inistring) + +Alias for `decode(inistring)` + +### encode(object, [options]) + +Encode the object `object` into an ini-style formatted string. If the +optional parameter `section` is given, then all top-level properties +of the object are put into this section and the `section`-string is +prepended to all sub-sections, see the usage example above. + +The `options` object may contain the following: + +* `section` A string which will be the first `section` in the encoded + ini data. Defaults to none. +* `whitespace` Boolean to specify whether to put whitespace around the + `=` character. By default, whitespace is omitted, to be friendly to + some persnickety old parsers that don't tolerate it well. But some + find that it's more human-readable and pretty with the whitespace. + +For backwards compatibility reasons, if a `string` options is passed +in, then it is assumed to be the `section` value. + +### stringify(object, [options]) + +Alias for `encode(object, [options])` + +### safe(val) + +Escapes the string `val` such that it is safe to be used as a key or +value in an ini-file. Basically escapes quotes. For example + + ini.safe('"unsafe string"') + +would result in + + "\"unsafe string\"" + +### unsafe(val) + +Unescapes the string `val` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/ini.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/ini.js new file mode 100644 index 00000000..b7e39ed8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/ini.js @@ -0,0 +1,190 @@ + +exports.parse = exports.decode = decode +exports.stringify = exports.encode = encode + +exports.safe = safe +exports.unsafe = unsafe + +var eol = process.platform === "win32" ? "\r\n" : "\n" + +function encode (obj, opt) { + var children = [] + , out = "" + + if (typeof opt === "string") { + opt = { + section: opt, + whitespace: false + } + } else { + opt = opt || {} + opt.whitespace = opt.whitespace === true + } + + var separator = opt.whitespace ? " = " : "=" + + Object.keys(obj).forEach(function (k, _, __) { + var val = obj[k] + if (val && Array.isArray(val)) { + val.forEach(function(item) { + out += safe(k + "[]") + separator + safe(item) + "\n" + }) + } + else if (val && typeof val === "object") { + children.push(k) + } else { + out += safe(k) + separator + safe(val) + eol + } + }) + + if (opt.section && out.length) { + out = "[" + safe(opt.section) + "]" + eol + out + } + + children.forEach(function (k, _, __) { + var nk = dotSplit(k).join('\\.') + var section = (opt.section ? opt.section + "." : "") + nk + var child = encode(obj[k], { + section: section, + whitespace: opt.whitespace + }) + if (out.length && child.length) { + out += eol + } + out += child + }) + + return out +} + +function dotSplit (str) { + return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') + .replace(/\\\./g, '\u0001') + .split(/\./).map(function (part) { + return part.replace(/\1/g, '\\.') + .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001') + }) +} + +function decode (str) { + var out = {} + , p = out + , section = null + , state = "START" + // section |key = value + , re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i + , lines = str.split(/[\r\n]+/g) + , section = null + + lines.forEach(function (line, _, __) { + if (!line || line.match(/^\s*[;#]/)) return + var match = line.match(re) + if (!match) return + if (match[1] !== undefined) { + section = unsafe(match[1]) + p = out[section] = out[section] || {} + return + } + var key = unsafe(match[2]) + , value = match[3] ? unsafe((match[4] || "")) : true + switch (value) { + case 'true': + case 'false': + case 'null': value = JSON.parse(value) + } + + // Convert keys with '[]' suffix to an array + if (key.length > 2 && key.slice(-2) === "[]") { + key = key.substring(0, key.length - 2) + if (!p[key]) { + p[key] = [] + } + else if (!Array.isArray(p[key])) { + p[key] = [p[key]] + } + } + + // safeguard against resetting a previously defined + // array by accidentally forgetting the brackets + if (Array.isArray(p[key])) { + p[key].push(value) + } + else { + p[key] = value + } + }) + + // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} + // use a filter to return the keys that have to be deleted. + Object.keys(out).filter(function (k, _, __) { + if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k])) return false + // see if the parent section is also an object. + // if so, add it to that, and mark this one for deletion + var parts = dotSplit(k) + , p = out + , l = parts.pop() + , nl = l.replace(/\\\./g, '.') + parts.forEach(function (part, _, __) { + if (!p[part] || typeof p[part] !== "object") p[part] = {} + p = p[part] + }) + if (p === out && nl === l) return false + p[nl] = out[k] + return true + }).forEach(function (del, _, __) { + delete out[del] + }) + + return out +} + +function isQuoted (val) { + return (val.charAt(0) === "\"" && val.slice(-1) === "\"") + || (val.charAt(0) === "'" && val.slice(-1) === "'") +} + +function safe (val) { + return ( typeof val !== "string" + || val.match(/[=\r\n]/) + || val.match(/^\[/) + || (val.length > 1 + && isQuoted(val)) + || val !== val.trim() ) + ? JSON.stringify(val) + : val.replace(/;/g, '\\;').replace(/#/g, "\\#") +} + +function unsafe (val, doUnesc) { + val = (val || "").trim() + if (isQuoted(val)) { + // remove the single quotes before calling JSON.parse + if (val.charAt(0) === "'") { + val = val.substr(1, val.length - 2); + } + try { val = JSON.parse(val) } catch (_) {} + } else { + // walk the val to find the first not-escaped ; character + var esc = false + var unesc = ""; + for (var i = 0, l = val.length; i < l; i++) { + var c = val.charAt(i) + if (esc) { + if ("\\;#".indexOf(c) !== -1) + unesc += c + else + unesc += "\\" + c + esc = false + } else if (";#".indexOf(c) !== -1) { + break + } else if (c === "\\") { + esc = true + } else { + unesc += c + } + } + if (esc) + unesc += "\\" + return unesc + } + return val +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/package.json new file mode 100644 index 00000000..be190386 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/ini/package.json @@ -0,0 +1,56 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "ini", + "description": "An ini encoder/decoder for node", + "version": "1.3.4", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/ini.git" + }, + "main": "ini.js", + "scripts": { + "test": "tap test/*.js" + }, + "engines": { + "node": "*" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^1.2.0" + }, + "license": "ISC", + "files": [ + "ini.js" + ], + "gitHead": "4a3001abc4c608e51add9f1d2b2cadf02b8e6dea", + "bugs": { + "url": "https://github.com/isaacs/ini/issues" + }, + "homepage": "https://github.com/isaacs/ini#readme", + "_id": "ini@1.3.4", + "_shasum": "0537cb79daf59b59a1a517dff706c86ec039162e", + "_from": "ini@latest", + "_npmVersion": "2.10.1", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "0537cb79daf59b59a1a517dff706c86ec039162e", + "tarball": "http://registry.npmjs.org/ini/-/ini-1.3.4.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/.npmignore new file mode 100644 index 00000000..edb88f44 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +.eslintrc diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/.travis.yml new file mode 100644 index 00000000..379f2614 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - '0.10' + - '0.12' + - 'iojs' diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/LICENSE new file mode 100644 index 00000000..235bdd54 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/README.md new file mode 100644 index 00000000..529a0d83 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/README.md @@ -0,0 +1,45 @@ +# init-package-json + +A node module to get your node module started. + +[![Build Status](https://secure.travis-ci.org/npm/init-package-json.svg)](http://travis-ci.org/npm/init-package-json) + +## Usage + +```javascript +var init = require('init-package-json') +var path = require('path') + +// a path to a promzard module. In the event that this file is +// not found, one will be provided for you. +var initFile = path.resolve(process.env.HOME, '.npm-init') + +// the dir where we're doin stuff. +var dir = process.cwd() + +// extra stuff that gets put into the PromZard module's context. +// In npm, this is the resolved config object. Exposed as 'config' +// Optional. +var configData = { some: 'extra stuff' } + +// Any existing stuff from the package.json file is also exposed in the +// PromZard module as the `package` object. There will also be free +// vars for: +// * `filename` path to the package.json file +// * `basename` the tip of the package dir +// * `dirname` the parent of the package dir + +init(dir, initFile, configData, function (er, data) { + // the data's already been written to {dir}/package.json + // now you can do stuff with it +}) +``` + +Or from the command line: + +``` +$ npm-init +``` + +See [PromZard](https://github.com/npm/promzard) for details about +what can go in the config file. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/default-input.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/default-input.js new file mode 100644 index 00000000..e61838c8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/default-input.js @@ -0,0 +1,238 @@ +var fs = require('fs') +var glob = require('glob') +var path = require('path') +var validateLicense = require('validate-npm-package-license') +var validateName = require('validate-npm-package-name') +var npa = require('npm-package-arg') +var semver = require('semver') + +// more popular packages should go here, maybe? +function isTestPkg (p) { + return !!p.match(/^(expresso|mocha|tap|coffee-script|coco|streamline)$/) +} + +function niceName (n) { + return n.replace(/^node-|[.-]js$/g, '').toLowerCase() +} + +function readDeps (test) { return function (cb) { + fs.readdir('node_modules', function (er, dir) { + if (er) return cb() + var deps = {} + var n = dir.length + if (n === 0) return cb(null, deps) + dir.forEach(function (d) { + if (d.match(/^\./)) return next() + if (test !== isTestPkg(d)) + return next() + + var dp = path.join(dirname, 'node_modules', d, 'package.json') + fs.readFile(dp, 'utf8', function (er, p) { + if (er) return next() + try { p = JSON.parse(p) } + catch (e) { return next() } + if (!p.version) return next() + if (p._requiredBy) { + if (!p._requiredBy.some(function (req) { return req === '#USER' })) return next() + } + deps[d] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version + return next() + }) + }) + function next () { + if (--n === 0) return cb(null, deps) + } + }) +}} + +var name = package.name || basename +var spec = npa(name) +var scope = config.get('scope') +if (scope) { + if (scope.charAt(0) !== '@') scope = '@' + scope + if (spec.scope) { + name = scope + '/' + spec.name.split('/')[1] + } else { + name = scope + '/' + name + } +} +exports.name = yes ? name : prompt('name', name, function (data) { + var its = validateName(data) + if (its.validForNewPackages) return data + var errors = (its.errors || []).concat(its.warnings || []) + var er = new Error('Sorry, ' + errors.join(' and ') + '.') + er.notValid = true + return er +}) + +var version = package.version || + config.get('init.version') || + config.get('init-version') || + '1.0.0' +exports.version = yes ? + version : + prompt('version', version, function (version) { + if (semver.valid(version)) return version + var er = new Error('Invalid version: "' + version + '"') + er.notValid = true + return er + }) + +if (!package.description) { + exports.description = yes ? '' : prompt('description') +} + +if (!package.main) { + exports.main = function (cb) { + fs.readdir(dirname, function (er, f) { + if (er) f = [] + + f = f.filter(function (f) { + return f.match(/\.js$/) + }) + + if (f.indexOf('index.js') !== -1) + f = 'index.js' + else if (f.indexOf('main.js') !== -1) + f = 'main.js' + else if (f.indexOf(basename + '.js') !== -1) + f = basename + '.js' + else + f = f[0] + + var index = f || 'index.js' + return cb(null, yes ? index : prompt('entry point', index)) + }) + } +} + +if (!package.bin) { + exports.bin = function (cb) { + fs.readdir(path.resolve(dirname, 'bin'), function (er, d) { + // no bins + if (er) return cb() + // just take the first js file we find there, or nada + return cb(null, d.filter(function (f) { + return f.match(/\.js$/) + })[0]) + }) + } +} + +exports.directories = function (cb) { + fs.readdir(dirname, function (er, dirs) { + if (er) return cb(er) + var res = {} + dirs.forEach(function (d) { + switch (d) { + case 'example': case 'examples': return res.example = d + case 'test': case 'tests': return res.test = d + case 'doc': case 'docs': return res.doc = d + case 'man': return res.man = d + } + }) + if (Object.keys(res).length === 0) res = undefined + return cb(null, res) + }) +} + +if (!package.dependencies) { + exports.dependencies = readDeps(false) +} + +if (!package.devDependencies) { + exports.devDependencies = readDeps(true) +} + +// MUST have a test script! +var s = package.scripts || {} +var notest = 'echo "Error: no test specified" && exit 1' +if (!package.scripts) { + exports.scripts = function (cb) { + fs.readdir(path.join(dirname, 'node_modules'), function (er, d) { + setupScripts(d || [], cb) + }) + } +} +function setupScripts (d, cb) { + // check to see what framework is in use, if any + function tx (test) { + return test || notest + } + if (!s.test || s.test === notest) { + var commands = { + 'tap':'tap test/*.js' + , 'expresso':'expresso test' + , 'mocha':'mocha' + } + var command + Object.keys(commands).forEach(function (k) { + if (d.indexOf(k) !== -1) command = commands[k] + }) + var ps = 'test command' + if (yes) { + s.test = command || notest + } else { + s.test = command ? prompt(ps, command, tx) : prompt(ps, tx) + } + } + return cb(null, s) +} + +if (!package.repository) { + exports.repository = function (cb) { + fs.readFile('.git/config', 'utf8', function (er, gconf) { + if (er || !gconf) { + return cb(null, yes ? '' : prompt('git repository')) + } + gconf = gconf.split(/\r?\n/) + var i = gconf.indexOf('[remote "origin"]') + if (i !== -1) { + var u = gconf[i + 1] + if (!u.match(/^\s*url =/)) u = gconf[i + 2] + if (!u.match(/^\s*url =/)) u = null + else u = u.replace(/^\s*url = /, '') + } + if (u && u.match(/^git@github.com:/)) + u = u.replace(/^git@github.com:/, 'https://github.com/') + + return cb(null, yes ? u : prompt('git repository', u)) + }) + } +} + +if (!package.keywords) { + exports.keywords = yes ? '' : prompt('keywords', function (s) { + if (!s) return undefined + if (Array.isArray(s)) s = s.join(' ') + if (typeof s !== 'string') return s + return s.split(/[\s,]+/) + }) +} + +if (!package.author) { + exports.author = config.get('init.author.name') || + config.get('init-author-name') + ? { + "name" : config.get('init.author.name') || + config.get('init-author-name'), + "email" : config.get('init.author.email') || + config.get('init-author-email'), + "url" : config.get('init.author.url') || + config.get('init-author-url') + } + : yes ? '' : prompt('author') +} + +var license = package.license || + config.get('init.license') || + config.get('init-license') || + 'ISC' +exports.license = yes ? license : prompt('license', license, function (data) { + var its = validateLicense(data) + if (its.validForNewPackages) return data + var errors = (its.errors || []).concat(its.warnings || []) + var er = new Error('Sorry, ' + errors.join(' and ') + '.') + er.notValid = true + return er +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/init-package-json.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/init-package-json.js new file mode 100644 index 00000000..37e07446 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/init-package-json.js @@ -0,0 +1,151 @@ + +module.exports = init +module.exports.yes = yes + +var PZ = require('promzard').PromZard +var path = require('path') +var def = require.resolve('./default-input.js') + +var fs = require('fs') +var semver = require('semver') +var read = require('read') + +// to validate the data object at the end as a worthwhile package +// and assign default values for things. +// readJson.extras(file, data, cb) +var readJson = require('read-package-json') + +function yes (conf) { + return !!( + conf.get('yes') || conf.get('y') || + conf.get('force') || conf.get('f') + ) +} + +function init (dir, input, config, cb) { + if (typeof config === 'function') + cb = config, config = {} + + // accept either a plain-jane object, or a config object + // with a "get" method. + if (typeof config.get !== 'function') { + var data = config + config = { + get: function (k) { + return data[k] + }, + toJSON: function () { + return data + } + } + } + + var package = path.resolve(dir, 'package.json') + input = path.resolve(input) + var pkg + var ctx = { yes: yes(config) } + + var es = readJson.extraSet + readJson.extraSet = es.filter(function (fn) { + return fn.name !== 'authors' && fn.name !== 'mans' + }) + readJson(package, function (er, d) { + readJson.extraSet = es + + if (er) pkg = {} + else pkg = d + + ctx.filename = package + ctx.dirname = path.dirname(package) + ctx.basename = path.basename(ctx.dirname) + if (!pkg.version || !semver.valid(pkg.version)) + delete pkg.version + + ctx.package = pkg + ctx.config = config || {} + + // make sure that the input is valid. + // if not, use the default + var pz = new PZ(input, ctx) + pz.backupFile = def + pz.on('error', cb) + pz.on('data', function (data) { + Object.keys(data).forEach(function (k) { + if (data[k] !== undefined && data[k] !== null) pkg[k] = data[k] + }) + + // only do a few of these. + // no need for mans or contributors if they're in the files + var es = readJson.extraSet + readJson.extraSet = es.filter(function (fn) { + return fn.name !== 'authors' && fn.name !== 'mans' + }) + readJson.extras(package, pkg, function (er, pkg) { + readJson.extraSet = es + if (er) return cb(er, pkg) + pkg = unParsePeople(pkg) + // no need for the readme now. + delete pkg.readme + delete pkg.readmeFilename + + // really don't want to have this lying around in the file + delete pkg._id + + // ditto + delete pkg.gitHead + + // if the repo is empty, remove it. + if (!pkg.repository) + delete pkg.repository + + // readJson filters out empty descriptions, but init-package-json + // traditionally leaves them alone + if (!pkg.description) + pkg.description = data.description + + var d = JSON.stringify(pkg, null, 2) + '\n' + function write (yes) { + fs.writeFile(package, d, 'utf8', function (er) { + if (!er && yes && !config.get('silent')) { + console.log('Wrote to %s:\n\n%s\n', package, d) + } + return cb(er, pkg) + }) + } + if (ctx.yes) { + return write(true) + } + console.log('About to write to %s:\n\n%s\n', package, d) + read({prompt:'Is this ok? ', default: 'yes'}, function (er, ok) { + if (!ok || ok.toLowerCase().charAt(0) !== 'y') { + console.log('Aborted.') + } else { + return write() + } + }) + }) + }) + }) + +} + +// turn the objects into somewhat more humane strings. +function unParsePeople (data) { + if (data.author) data.author = unParsePerson(data.author) + ;["maintainers", "contributors"].forEach(function (set) { + if (!Array.isArray(data[set])) return; + data[set] = data[set].map(unParsePerson) + }) + return data +} + +function unParsePerson (person) { + if (typeof person === "string") return person + var name = person.name || "" + var u = person.url || person.web + var url = u ? (" ("+u+")") : "" + var e = person.email || person.mail + var email = e ? (" <"+e+">") : "" + return name+email+url +} + diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/package.json new file mode 100644 index 00000000..00a40c18 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/init-package-json/package.json @@ -0,0 +1,82 @@ +{ + "name": "init-package-json", + "version": "1.9.3", + "main": "init-package-json.js", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/init-package-json.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "description": "A node module to get your node module started", + "dependencies": { + "glob": "^6.0.0", + "npm-package-arg": "^4.0.0", + "promzard": "^0.3.0", + "read": "~1.0.1", + "read-package-json": "1 || 2", + "semver": "2.x || 3.x || 4 || 5", + "validate-npm-package-license": "^3.0.1", + "validate-npm-package-name": "^2.0.1" + }, + "devDependencies": { + "npm": "^2", + "rimraf": "^2.1.4", + "tap": "^1.2.0" + }, + "keywords": [ + "init", + "package.json", + "package", + "helper", + "wizard", + "wizerd", + "prompt", + "start" + ], + "gitHead": "12eb24ff2f75f84a4a27436bc6f6cb765cbd9ee2", + "bugs": { + "url": "https://github.com/npm/init-package-json/issues" + }, + "homepage": "https://github.com/npm/init-package-json#readme", + "_id": "init-package-json@1.9.3", + "_shasum": "ca2ff94709b6d9aaad66533c11a0aff645f15c7d", + "_from": "init-package-json@1.9.3", + "_npmVersion": "3.5.4", + "_nodeVersion": "4.2.2", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "ca2ff94709b6d9aaad66533c11a0aff645f15c7d", + "tarball": "http://registry.npmjs.org/init-package-json/-/init-package-json-1.9.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.9.3.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/README.md new file mode 100644 index 00000000..41625a32 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/README.md @@ -0,0 +1,86 @@ +# lockfile + +A very polite lock file utility, which endeavors to not litter, and to +wait patiently for others. + +## Usage + +```javascript +var lockFile = require('lockfile') + +// opts is optional, and defaults to {} +lockFile.lock('some-file.lock', opts, function (er) { + // if the er happens, then it failed to acquire a lock. + // if there was not an error, then the file was created, + // and won't be deleted until we unlock it. + + // do my stuff, free of interruptions + // then, some time later, do: + lockFile.unlock('some-file.lock', function (er) { + // er means that an error happened, and is probably bad. + }) +}) +``` + +## Methods + +Sync methods return the value/throw the error, others don't. Standard +node fs stuff. + +All known locks are removed when the process exits. Of course, it's +possible for certain types of failures to cause this to fail, but a best +effort is made to not be a litterbug. + +### lockFile.lock(path, [opts], cb) + +Acquire a file lock on the specified path + +### lockFile.lockSync(path, [opts]) + +Acquire a file lock on the specified path + +### lockFile.unlock(path, cb) + +Close and unlink the lockfile. + +### lockFile.unlockSync(path) + +Close and unlink the lockfile. + +### lockFile.check(path, [opts], cb) + +Check if the lockfile is locked and not stale. + +Callback is called with `cb(error, isLocked)`. + +### lockFile.checkSync(path, [opts]) + +Check if the lockfile is locked and not stale. + +Returns boolean. + +## Options + +### opts.wait + +A number of milliseconds to wait for locks to expire before giving up. +Only used by lockFile.lock. Poll for `opts.wait` ms. If the lock is +not cleared by the time the wait expires, then it returns with the +original error. + +### opts.pollPeriod + +When using `opts.wait`, this is the period in ms in which it polls to +check if the lock has expired. Defaults to `100`. + +### opts.stale + +A number of milliseconds before locks are considered to have expired. + +### opts.retries + +Used by lock and lockSync. Retry `n` number of times before giving up. + +### opts.retryWait + +Used by lock. Wait `n` milliseconds before retrying. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/lockfile.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/lockfile.js new file mode 100644 index 00000000..3736a36e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/lockfile.js @@ -0,0 +1,311 @@ +var fs = require('fs') + +var wx = 'wx' +if (process.version.match(/^v0\.[0-6]/)) { + var c = require('constants') + wx = c.O_TRUNC | c.O_CREAT | c.O_WRONLY | c.O_EXCL +} + +var os = require('os') +exports.filetime = 'ctime' +if (os.platform() == "win32") { + exports.filetime = 'mtime' +} + +var debug +var util = require('util') +if (util.debuglog) + debug = util.debuglog('LOCKFILE') +else if (/\blockfile\b/i.test(process.env.NODE_DEBUG)) + debug = function() { + var msg = util.format.apply(util, arguments) + console.error('LOCKFILE %d %s', process.pid, msg) + } +else + debug = function() {} + +var locks = {} + +function hasOwnProperty (obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop) +} + +process.on('exit', function () { + debug('exit listener') + // cleanup + Object.keys(locks).forEach(exports.unlockSync) +}) + +// XXX https://github.com/joyent/node/issues/3555 +// Remove when node 0.8 is deprecated. +if (/^v0\.[0-8]\./.test(process.version)) { + debug('uncaughtException, version = %s', process.version) + process.on('uncaughtException', function H (er) { + debug('uncaughtException') + var l = process.listeners('uncaughtException').filter(function (h) { + return h !== H + }) + if (!l.length) { + // cleanup + try { Object.keys(locks).forEach(exports.unlockSync) } catch (e) {} + process.removeListener('uncaughtException', H) + throw er + } + }) +} + +exports.unlock = function (path, cb) { + debug('unlock', path) + // best-effort. unlocking an already-unlocked lock is a noop + delete locks[path] + fs.unlink(path, function (unlinkEr) { cb() }) +} + +exports.unlockSync = function (path) { + debug('unlockSync', path) + // best-effort. unlocking an already-unlocked lock is a noop + try { fs.unlinkSync(path) } catch (er) {} + delete locks[path] +} + + +// if the file can be opened in readonly mode, then it's there. +// if the error is something other than ENOENT, then it's not. +exports.check = function (path, opts, cb) { + if (typeof opts === 'function') cb = opts, opts = {} + debug('check', path, opts) + fs.open(path, 'r', function (er, fd) { + if (er) { + if (er.code !== 'ENOENT') return cb(er) + return cb(null, false) + } + + if (!opts.stale) { + return fs.close(fd, function (er) { + return cb(er, true) + }) + } + + fs.fstat(fd, function (er, st) { + if (er) return fs.close(fd, function (er2) { + return cb(er) + }) + + fs.close(fd, function (er) { + var age = Date.now() - st[exports.filetime].getTime() + return cb(er, age <= opts.stale) + }) + }) + }) +} + +exports.checkSync = function (path, opts) { + opts = opts || {} + debug('checkSync', path, opts) + if (opts.wait) { + throw new Error('opts.wait not supported sync for obvious reasons') + } + + try { + var fd = fs.openSync(path, 'r') + } catch (er) { + if (er.code !== 'ENOENT') throw er + return false + } + + if (!opts.stale) { + try { fs.closeSync(fd) } catch (er) {} + return true + } + + // file exists. however, might be stale + if (opts.stale) { + try { + var st = fs.fstatSync(fd) + } finally { + fs.closeSync(fd) + } + var age = Date.now() - st[exports.filetime].getTime() + return (age <= opts.stale) + } +} + + + +var req = 1 +exports.lock = function (path, opts, cb) { + if (typeof opts === 'function') cb = opts, opts = {} + opts.req = opts.req || req++ + debug('lock', path, opts) + opts.start = opts.start || Date.now() + + if (typeof opts.retries === 'number' && opts.retries > 0) { + debug('has retries', opts.retries) + var retries = opts.retries + opts.retries = 0 + cb = (function (orig) { return function cb (er, fd) { + debug('retry-mutated callback') + retries -= 1 + if (!er || retries < 0) return orig(er, fd) + + debug('lock retry', path, opts) + + if (opts.retryWait) setTimeout(retry, opts.retryWait) + else retry() + + function retry () { + opts.start = Date.now() + debug('retrying', opts.start) + exports.lock(path, opts, cb) + } + }})(cb) + } + + // try to engage the lock. + // if this succeeds, then we're in business. + fs.open(path, wx, function (er, fd) { + if (!er) { + debug('locked', path, fd) + locks[path] = fd + return fs.close(fd, function () { + return cb() + }) + } + + // something other than "currently locked" + // maybe eperm or something. + if (er.code !== 'EEXIST') return cb(er) + + // someone's got this one. see if it's valid. + if (!opts.stale) return notStale(er, path, opts, cb) + + return maybeStale(er, path, opts, false, cb) + }) +} + + +// Staleness checking algorithm +// 1. acquire $lock, fail +// 2. stat $lock, find that it is stale +// 3. acquire $lock.STALE +// 4. stat $lock, assert that it is still stale +// 5. unlink $lock +// 6. link $lock.STALE $lock +// 7. unlink $lock.STALE +// On any failure, clean up whatever we've done, and raise the error. +function maybeStale (originalEr, path, opts, hasStaleLock, cb) { + fs.stat(path, function (statEr, st) { + if (statEr) { + if (statEr.code === 'ENOENT') { + // expired already! + opts.stale = false + debug('lock stale enoent retry', path, opts) + exports.lock(path, opts, cb) + return + } + return cb(statEr) + } + + var age = Date.now() - st[exports.filetime].getTime() + if (age <= opts.stale) return notStale(originalEr, path, opts, cb) + + debug('lock stale', path, opts) + if (hasStaleLock) { + exports.unlock(path, function (er) { + if (er) return cb(er) + debug('lock stale retry', path, opts) + fs.link(path + '.STALE', path, function (er) { + fs.unlink(path + '.STALE', function () { + // best effort. if the unlink fails, oh well. + cb(er) + }) + }) + }) + } else { + debug('acquire .STALE file lock', opts) + exports.lock(path + '.STALE', opts, function (er) { + if (er) return cb(er) + maybeStale(originalEr, path, opts, true, cb) + }) + } + }) +} + +function notStale (er, path, opts, cb) { + debug('notStale', path, opts) + + // if we can't wait, then just call it a failure + if (typeof opts.wait !== 'number' || opts.wait <= 0) + return cb(er) + + // poll for some ms for the lock to clear + var now = Date.now() + var start = opts.start || now + var end = start + opts.wait + + if (end <= now) + return cb(er) + + debug('now=%d, wait until %d (delta=%d)', start, end, end-start) + var wait = Math.min(end - start, opts.pollPeriod || 100) + var timer = setTimeout(poll, wait) + + function poll () { + debug('notStale, polling', path, opts) + exports.lock(path, opts, cb) + } +} + +exports.lockSync = function (path, opts) { + opts = opts || {} + opts.req = opts.req || req++ + debug('lockSync', path, opts) + if (opts.wait || opts.retryWait) { + throw new Error('opts.wait not supported sync for obvious reasons') + } + + try { + var fd = fs.openSync(path, wx) + locks[path] = fd + try { fs.closeSync(fd) } catch (er) {} + debug('locked sync!', path, fd) + return + } catch (er) { + if (er.code !== 'EEXIST') return retryThrow(path, opts, er) + + if (opts.stale) { + var st = fs.statSync(path) + var ct = st[exports.filetime].getTime() + if (!(ct % 1000) && (opts.stale % 1000)) { + // probably don't have subsecond resolution. + // round up the staleness indicator. + // Yes, this will be wrong 1/1000 times on platforms + // with subsecond stat precision, but that's acceptable + // in exchange for not mistakenly removing locks on + // most other systems. + opts.stale = 1000 * Math.ceil(opts.stale / 1000) + } + var age = Date.now() - ct + if (age > opts.stale) { + debug('lockSync stale', path, opts, age) + exports.unlockSync(path) + return exports.lockSync(path, opts) + } + } + + // failed to lock! + debug('failed to lock', path, opts, er) + return retryThrow(path, opts, er) + } +} + +function retryThrow (path, opts, er) { + if (typeof opts.retries === 'number' && opts.retries > 0) { + var newRT = opts.retries - 1 + debug('retryThrow', path, opts, newRT) + opts.retries = newRT + return exports.lockSync(path, opts) + } + throw er +} + diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/package.json new file mode 100644 index 00000000..112d5ae1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/lockfile/package.json @@ -0,0 +1,63 @@ +{ + "name": "lockfile", + "version": "1.0.1", + "main": "lockfile.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "~0.2.5", + "touch": "0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/lockfile.git" + }, + "keywords": [ + "lockfile", + "lock", + "file", + "fs", + "O_EXCL" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "description": "A very polite lock file utility, which endeavors to not litter, and to wait patiently for others.", + "gitHead": "9d338ed8e3e3a166955d051f6b5fb6bb1e563ca8", + "bugs": { + "url": "https://github.com/isaacs/lockfile/issues" + }, + "homepage": "https://github.com/isaacs/lockfile#readme", + "_id": "lockfile@1.0.1", + "_shasum": "9d353ecfe3f54d150bb57f89d51746935a39c4f5", + "_from": "lockfile@>=1.0.0 <1.1.0", + "_npmVersion": "2.10.0", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "9d353ecfe3f54d150bb57f89d51746935a39c4f5", + "tarball": "http://registry.npmjs.org/lockfile/-/lockfile-1.0.1.tgz" + }, + "maintainers": [ + { + "name": "trevorburnham", + "email": "trevorburnham@gmail.com" + }, + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.1.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/.npmignore new file mode 100644 index 00000000..4dcec4c8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/.npmignore @@ -0,0 +1 @@ +/node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/.travis.yml new file mode 100644 index 00000000..e321cb14 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/CONTRIBUTORS b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/CONTRIBUTORS new file mode 100644 index 00000000..1f0a13e8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/CONTRIBUTORS @@ -0,0 +1,14 @@ +# Authors, sorted by whether or not they are me +Isaac Z. Schlueter +Brian Cottingham +Carlos Brito Lage +Jesse Dailey +Kevin O'Hara +Marco Rogers +Mark Cavage +Marko Mikulicic +Nathan Rajlich +Satheesh Natesan +Trent Mick +ashleybrener +n4kz diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/README.md new file mode 100644 index 00000000..af4b9c83 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/README.md @@ -0,0 +1,132 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n, key) { return n * 2 + key.length } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +// non-string keys ARE fully supported +var someObject = {} +cache.set(someObject, 'a value') +cache.set('[object Object]', 'a different value') +assert.equal(cache.get(someObject), 'a value') + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n, key){return n.length}`. The default is + `function(){return 1}`, which is fine if you want to store `max` + like-sized things. They item is passed as the first argument, and + the key is passed as the second argumnet. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `max` is optional and overrides the + cache `max` option if provided. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `rforEach(function(value,key,cache), [thisp])` + + The same as `cache.forEach(...)` but items are iterated over in + reverse order. (ie, less recently used items are iterated over + first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length()` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/package.json new file mode 100644 index 00000000..44c233be --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/lru-cache/package.json @@ -0,0 +1,40 @@ +{ + "name": "lru-cache", + "description": "A cache object that deletes the least-recently-used items.", + "version": "3.2.0", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "keywords": [ + "mru", + "lru", + "cache" + ], + "scripts": { + "test": "tap test --gc" + }, + "main": "lib/lru-cache.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-lru-cache.git" + }, + "devDependencies": { + "tap": "^1.2.0", + "weak": "" + }, + "license": "ISC", + "dependencies": { + "pseudomap": "^1.0.1" + }, + "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n, key) { return n * 2 + key.length }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\n// non-string keys ARE fully supported\nvar someObject = {}\ncache.set(someObject, 'a value')\ncache.set('[object Object]', 'a different value')\nassert.equal(cache.get(someObject), 'a value')\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n, key){return n.length}`. The default is\n `function(){return 1}`, which is fine if you want to store `max`\n like-sized things. They item is passed as the first argument, and\n the key is passed as the second argumnet.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value, maxAge)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think. `max` is optional and overrides the\n cache `max` option if provided.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `rforEach(function(value,key,cache), [thisp])`\n\n The same as `cache.forEach(...)` but items are iterated over in\n reverse order. (ie, less recently used items are iterated over\n first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n\n* `length()`\n\n Return total length of objects in cache taking into account\n `length` options function.\n\n* `itemCount`\n\n Return total quantity of objects currently in cache. Note, that\n `stale` (see options) items are returned as part of this item\n count.\n\n* `dump()`\n\n Return an array of the cache entries ready for serialization and usage\n with 'destinationCache.load(arr)`.\n\n* `load(cacheEntriesArray)`\n\n Loads another cache entries array, obtained with `sourceCache.dump()`,\n into the cache. The destination cache is reset before loading new entries\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/node-lru-cache/issues" + }, + "homepage": "https://github.com/isaacs/node-lru-cache#readme", + "_id": "lru-cache@3.2.0", + "_shasum": "71789b3b7f5399bec8565dda38aa30d2a097efee", + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz", + "_from": "lru-cache@>=3.2.0 <3.3.0" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/README.md new file mode 100644 index 00000000..bcb8acfc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/README.md @@ -0,0 +1,216 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instanting the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +## Functions + +The top-level exported function has a `cache` property, which is an LRU +cache set to store 100 items. So, calling these methods repeatedly +with the same pattern and options will use the same Minimatch object, +saving the cost of parsing it multiple times. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/minimatch.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/minimatch.js new file mode 100644 index 00000000..008ceba9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/minimatch.js @@ -0,0 +1,912 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new Error('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + plType = stateChar + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + re += ')' + var pl = patternListStack.pop() + plType = pl.type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case '!': + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length + break + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway + } + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + var regExp = new RegExp('^' + re + '$', flags) + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/package.json new file mode 100644 index 00000000..5f019888 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/minimatch/package.json @@ -0,0 +1,60 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "3.0.0", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "posttest": "standard minimatch.js test/*.js", + "test": "tap test/*.js" + }, + "engines": { + "node": "*" + }, + "dependencies": { + "brace-expansion": "^1.0.0" + }, + "devDependencies": { + "standard": "^3.7.2", + "tap": "^1.2.0" + }, + "license": "ISC", + "files": [ + "minimatch.js" + ], + "gitHead": "270dbea567f0af6918cb18103e98c612aa717a20", + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "homepage": "https://github.com/isaacs/minimatch#readme", + "_id": "minimatch@3.0.0", + "_shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", + "_from": "minimatch@>=3.0.0 <3.1.0", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/.travis.yml new file mode 100644 index 00000000..0ae8cb68 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/LICENSE new file mode 100644 index 00000000..dfef9f00 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/LICENSE @@ -0,0 +1,21 @@ +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/README.markdown b/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/README.markdown new file mode 100644 index 00000000..041a85b1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/README.markdown @@ -0,0 +1,100 @@ +# mkdirp + +Like `mkdir -p`, but in node.js! + +[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) + +# example + +## pow.js + +```js +var mkdirp = require('mkdirp'); + +mkdirp('/tmp/foo/bar/baz', function (err) { + if (err) console.error(err) + else console.log('pow!') +}); +``` + +Output + +``` +pow! +``` + +And now /tmp/foo/bar/baz exists, huzzah! + +# methods + +```js +var mkdirp = require('mkdirp'); +``` + +## mkdirp(dir, opts, cb) + +Create a new directory and any necessary subdirectories at `dir` with octal +permission string `opts.mode`. If `opts` is a non-object, it will be treated as +the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +`cb(err, made)` fires with the error or the first directory `made` +that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and +`opts.fs.stat(path, cb)`. + +## mkdirp.sync(dir, opts) + +Synchronously create a new directory and any necessary subdirectories at `dir` +with octal permission string `opts.mode`. If `opts` is a non-object, it will be +treated as the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +Returns the first directory that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and +`opts.fs.statSync(path)`. + +# usage + +This package also ships with a `mkdirp` command. + +``` +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + +``` + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install mkdirp +``` + +to get the library, or + +``` +npm install -g mkdirp +``` + +to get the command. + +# license + +MIT diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/index.js new file mode 100644 index 00000000..47d20a6c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/index.js @@ -0,0 +1,98 @@ +var path = require('path'); +var fs = require('fs'); +var _0777 = parseInt('0777', 8); + +module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; + +function mkdirP (p, opts, f, made) { + if (typeof opts === 'function') { + f = opts; + opts = {}; + } + else if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + var cb = f || function () {}; + p = path.resolve(p); + + xfs.mkdir(p, mode, function (er) { + if (!er) { + made = made || p; + return cb(null, made); + } + switch (er.code) { + case 'ENOENT': + mkdirP(path.dirname(p), opts, function (er, made) { + if (er) cb(er, made); + else mkdirP(p, opts, cb, made); + }); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + xfs.stat(p, function (er2, stat) { + // if the stat fails, then that's super weird. + // let the original error be the failure reason. + if (er2 || !stat.isDirectory()) cb(er, made) + else cb(null, made); + }); + break; + } + }); +} + +mkdirP.sync = function sync (p, opts, made) { + if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + p = path.resolve(p); + + try { + xfs.mkdirSync(p, mode); + made = made || p; + } + catch (err0) { + switch (err0.code) { + case 'ENOENT' : + made = sync(path.dirname(p), opts, made); + sync(p, opts, made); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + var stat; + try { + stat = xfs.statSync(p); + } + catch (err1) { + throw err0; + } + if (!stat.isDirectory()) throw err0; + break; + } + } + + return made; +}; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/package.json new file mode 100644 index 00000000..a0e69375 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/mkdirp/package.json @@ -0,0 +1,59 @@ +{ + "name": "mkdirp", + "description": "Recursively mkdir, like `mkdir -p`", + "version": "0.5.1", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "main": "index.js", + "keywords": [ + "mkdir", + "directory" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/substack/node-mkdirp.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "minimist": "0.0.8" + }, + "devDependencies": { + "tap": "1", + "mock-fs": "2 >=2.7.0" + }, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "license": "MIT", + "gitHead": "d4eff0f06093aed4f387e88e9fc301cb76beedc7", + "bugs": { + "url": "https://github.com/substack/node-mkdirp/issues" + }, + "homepage": "https://github.com/substack/node-mkdirp#readme", + "_id": "mkdirp@0.5.1", + "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "_from": "mkdirp@>=0.5.1 <0.6.0", + "_npmVersion": "2.9.0", + "_nodeVersion": "2.0.0", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/.jshintrc b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/.jshintrc new file mode 100644 index 00000000..3d352421 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/.jshintrc @@ -0,0 +1,7 @@ +{ + "asi": true, + "laxcomma": true, + "es5": true, + "node": true, + "strict": false +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/.npmignore new file mode 100644 index 00000000..5d1a0757 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/.npmignore @@ -0,0 +1,3 @@ +gyp/test +node_modules +test/.node-gyp diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/0001-gyp-always-install-into-PRODUCT_DIR.patch b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/0001-gyp-always-install-into-PRODUCT_DIR.patch new file mode 100644 index 00000000..0174a694 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/0001-gyp-always-install-into-PRODUCT_DIR.patch @@ -0,0 +1,34 @@ +From 9b5e8dc426ada891d67d27b09acc73122ab46849 Mon Sep 17 00:00:00 2001 +From: Nathan Rajlich +Date: Wed, 14 Nov 2012 16:48:52 -0800 +Subject: [PATCH 1/3] gyp: always install into $PRODUCT_DIR + +--- + gyp/pylib/gyp/generator/make.py | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/gyp/pylib/gyp/generator/make.py b/gyp/pylib/gyp/generator/make.py +index b88a433..9b3e4e3 100644 +--- a/gyp/pylib/gyp/generator/make.py ++++ b/gyp/pylib/gyp/generator/make.py +@@ -1888,11 +1888,13 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD + """Returns the location of the final output for an installable target.""" + # Xcode puts shared_library results into PRODUCT_DIR, and some gyp files + # rely on this. Emulate this behavior for mac. +- if (self.type == 'shared_library' and +- (self.flavor != 'mac' or self.toolset != 'target')): +- # Install all shared libs into a common directory (per toolset) for +- # convenient access with LD_LIBRARY_PATH. +- return '$(builddir)/lib.%s/%s' % (self.toolset, self.alias) ++ ++ # XXX(TooTallNate): disabling this code since we don't want this behavior... ++ #if (self.type == 'shared_library' and ++ # (self.flavor != 'mac' or self.toolset != 'target')): ++ # # Install all shared libs into a common directory (per toolset) for ++ # # convenient access with LD_LIBRARY_PATH. ++ # return '$(builddir)/lib.%s/%s' % (self.toolset, self.alias) + return '$(builddir)/' + self.alias + + +-- +2.3.2 (Apple Git-55) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/0002-gyp-apply-https-codereview.chromium.org-11361103.patch b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/0002-gyp-apply-https-codereview.chromium.org-11361103.patch new file mode 100644 index 00000000..88185b17 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/0002-gyp-apply-https-codereview.chromium.org-11361103.patch @@ -0,0 +1,35 @@ +From 511840e82116662aa825088fb8a52a9f799f7767 Mon Sep 17 00:00:00 2001 +From: Nathan Rajlich +Date: Wed, 14 Nov 2012 16:54:04 -0800 +Subject: [PATCH 2/3] gyp: apply https://codereview.chromium.org/11361103/ + +--- + gyp/pylib/gyp/generator/msvs.py | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/gyp/pylib/gyp/generator/msvs.py b/gyp/pylib/gyp/generator/msvs.py +index d8e0872..c59aea1 100644 +--- a/gyp/pylib/gyp/generator/msvs.py ++++ b/gyp/pylib/gyp/generator/msvs.py +@@ -2720,6 +2720,9 @@ def _GetMSBuildAttributes(spec, config, build_file): + product_name = spec.get('product_name', '$(ProjectName)') + target_name = prefix + product_name + msbuild_attributes['TargetName'] = target_name ++ if 'TargetExt' not in msbuild_attributes and 'product_extension' in spec: ++ ext = spec.get('product_extension') ++ msbuild_attributes['TargetExt'] = '.' + ext + + if spec.get('msvs_external_builder'): + external_out_dir = spec.get('msvs_external_builder_out_dir', '.') +@@ -2773,6 +2776,9 @@ def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file): + attributes['OutputDirectory']) + _AddConditionalProperty(properties, condition, 'TargetName', + attributes['TargetName']) ++ if 'TargetExt' in attributes: ++ _AddConditionalProperty(properties, condition, 'TargetExt', ++ attributes['TargetExt']) + + if attributes.get('TargetPath'): + _AddConditionalProperty(properties, condition, 'TargetPath', +-- +2.3.2 (Apple Git-55) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/0003-gyp-don-t-use-links-at-all-just-copy-the-files-inste.patch b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/0003-gyp-don-t-use-links-at-all-just-copy-the-files-inste.patch new file mode 100644 index 00000000..9389fa06 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/0003-gyp-don-t-use-links-at-all-just-copy-the-files-inste.patch @@ -0,0 +1,38 @@ +From 0cd9f08a6d4f4be6643001b6c3b5ad40e094bdcc Mon Sep 17 00:00:00 2001 +From: Nathan Zadoks +Date: Tue, 2 Jul 2013 11:07:16 -0700 +Subject: [PATCH 3/3] gyp: don't use links at all, just copy the files instead + +--- + gyp/pylib/gyp/generator/make.py | 2 +- + gyp/pylib/gyp/generator/ninja.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gyp/pylib/gyp/generator/make.py b/gyp/pylib/gyp/generator/make.py +index 9b3e4e3..b3f8a2b 100644 +--- a/gyp/pylib/gyp/generator/make.py ++++ b/gyp/pylib/gyp/generator/make.py +@@ -372,7 +372,7 @@ cmd_touch = touch $@ + + quiet_cmd_copy = COPY $@ + # send stderr to /dev/null to ignore messages when linking directories. +-cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@") ++cmd_copy = rm -rf "$@" && cp -af "$<" "$@" + + %(link_commands)s + """ +diff --git a/gyp/pylib/gyp/generator/ninja.py b/gyp/pylib/gyp/generator/ninja.py +index 7461814..c2951a4 100644 +--- a/gyp/pylib/gyp/generator/ninja.py ++++ b/gyp/pylib/gyp/generator/ninja.py +@@ -2020,7 +2020,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, + master_ninja.rule( + 'copy', + description='COPY $in $out', +- command='ln -f $in $out 2>/dev/null || (rm -rf $out && cp -af $in $out)') ++ command='rm -rf $out && cp -af $in $out') + master_ninja.newline() + + all_targets = set() +-- +2.3.2 (Apple Git-55) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/CHANGELOG.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/CHANGELOG.md new file mode 100644 index 00000000..d85f16cc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/CHANGELOG.md @@ -0,0 +1,57 @@ +v3.3.0 2016-02-16 + +* [[`818d854a4d`](https://github.com/nodejs/node-gyp/commit/818d854a4d)] - Introduce NODEJS_ORG_MIRROR and IOJS_ORG_MIRROR (Rod Vagg) [#878](https://github.com/nodejs/node-gyp/pull/878) +* [[`d1e4cc4b62`](https://github.com/nodejs/node-gyp/commit/d1e4cc4b62)] - **(SEMVER-MINOR)** Download headers tarball for ~0.12.10 || ~0.10.42 (Rod Vagg) [#877](https://github.com/nodejs/node-gyp/pull/877) +* [[`6e28ad1bea`](https://github.com/nodejs/node-gyp/commit/6e28ad1bea)] - Allow for npmlog@2.x (Rebecca Turner) [#861](https://github.com/nodejs/node-gyp/pull/861) +* [[`07371e5812`](https://github.com/nodejs/node-gyp/commit/07371e5812)] - Use -fPIC for NetBSD. (Marcin Cieślak) [#856](https://github.com/nodejs/node-gyp/pull/856) +* [[`8c4b0ffa50`](https://github.com/nodejs/node-gyp/commit/8c4b0ffa50)] - **(SEMVER-MINOR)** Add --cafile command line option. (Ben Noordhuis) [#837](https://github.com/nodejs/node-gyp/pull/837) +* [[`b3ad43498e`](https://github.com/nodejs/node-gyp/commit/b3ad43498e)] - **(SEMVER-MINOR)** Make download() function testable. (Ben Noordhuis) [#837](https://github.com/nodejs/node-gyp/pull/837) + +v3.2.1 2015-12-03 + +* [[`ab89b477c4`](https://github.com/nodejs/node-gyp/commit/ab89b477c4)] - Upgrade gyp to b3cef02. (Ben Noordhuis) [#831](https://github.com/nodejs/node-gyp/pull/831) +* [[`90078ecb17`](https://github.com/nodejs/node-gyp/commit/90078ecb17)] - Define WIN32_LEAN_AND_MEAN conditionally. (Ben Noordhuis) [#824](https://github.com/nodejs/node-gyp/pull/824) + +v3.2.0 2015-11-25 + +* [[`268f1ca4c7`](https://github.com/nodejs/node-gyp/commit/268f1ca4c7)] - Use result of `which` when searching for python. (Refael Ackermann) [#668](https://github.com/nodejs/node-gyp/pull/668) +* [[`817ed9bd78`](https://github.com/nodejs/node-gyp/commit/817ed9bd78)] - Add test for python executable search logic. (Ben Noordhuis) [#756](https://github.com/nodejs/node-gyp/pull/756) +* [[`0e2dfda1f3`](https://github.com/nodejs/node-gyp/commit/0e2dfda1f3)] - Fix test/test-options when run through `npm test`. (Ben Noordhuis) [#755](https://github.com/nodejs/node-gyp/pull/755) +* [[`9bfa0876b4`](https://github.com/nodejs/node-gyp/commit/9bfa0876b4)] - Add support for AIX (Michael Dawson) [#753](https://github.com/nodejs/node-gyp/pull/753) +* [[`a8d441a0a2`](https://github.com/nodejs/node-gyp/commit/a8d441a0a2)] - Update README for Windows 10 support. (Jason Williams) [#766](https://github.com/nodejs/node-gyp/pull/766) +* [[`d1d6015276`](https://github.com/nodejs/node-gyp/commit/d1d6015276)] - Update broken links and switch to HTTPS. (andrew morton) + +v3.1.0 2015-11-14 + +* [[`9049241f91`](https://github.com/nodejs/node-gyp/commit/9049241f91)] - **gyp**: don't use links at all, just copy the files instead (Nathan Zadoks) +* [[`8ef90348d1`](https://github.com/nodejs/node-gyp/commit/8ef90348d1)] - **gyp**: apply https://codereview.chromium.org/11361103/ (Nathan Rajlich) +* [[`a2ed0df84e`](https://github.com/nodejs/node-gyp/commit/a2ed0df84e)] - **gyp**: always install into $PRODUCT_DIR (Nathan Rajlich) +* [[`cc8b2fa83e`](https://github.com/nodejs/node-gyp/commit/cc8b2fa83e)] - Update gyp to b3cef02. (Imran Iqbal) [#781](https://github.com/nodejs/node-gyp/pull/781) +* [[`f5d86eb84e`](https://github.com/nodejs/node-gyp/commit/f5d86eb84e)] - Update to tar@2.0.0. (Edgar Muentes) [#797](https://github.com/nodejs/node-gyp/pull/797) +* [[`2ac7de02c4`](https://github.com/nodejs/node-gyp/commit/2ac7de02c4)] - Fix infinite loop with zero-length options. (Ben Noordhuis) [#745](https://github.com/nodejs/node-gyp/pull/745) +* [[`101bed639b`](https://github.com/nodejs/node-gyp/commit/101bed639b)] - This platform value came from debian package, and now the value (Jérémy Lal) [#738](https://github.com/nodejs/node-gyp/pull/738) + +v3.0.3 2015-09-14 + +* [[`ad827cda30`](https://github.com/nodejs/node-gyp/commit/ad827cda30)] - tarballUrl global and && when checking for iojs (Lars-Magnus Skog) [#729](https://github.com/nodejs/node-gyp/pull/729) + +v3.0.2 2015-09-12 + +* [[`6e8c3bf3c6`](https://github.com/nodejs/node-gyp/commit/6e8c3bf3c6)] - add back support for passing additional cmdline args (Rod Vagg) [#723](https://github.com/nodejs/node-gyp/pull/723) +* [[`ff82f2f3b9`](https://github.com/nodejs/node-gyp/commit/ff82f2f3b9)] - fixed broken link in docs to Visual Studio 2013 download (simon-p-r) [#722](https://github.com/nodejs/node-gyp/pull/722) + +v3.0.1 2015-09-08 + +* [[`846337e36b`](https://github.com/nodejs/node-gyp/commit/846337e36b)] - normalise versions for target == this comparison (Rod Vagg) [#716](https://github.com/nodejs/node-gyp/pull/716) + +v3.0.0 2015-09-08 + +* [[`9720d0373c`](https://github.com/nodejs/node-gyp/commit/9720d0373c)] - remove node_modules from tree (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) +* [[`6dcf220db7`](https://github.com/nodejs/node-gyp/commit/6dcf220db7)] - test version major directly, don't use semver.satisfies() (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) +* [[`938dd18d1c`](https://github.com/nodejs/node-gyp/commit/938dd18d1c)] - refactor for clarity, fix dist-url, add env var dist-url functionality (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) +* [[`9e9df66a06`](https://github.com/nodejs/node-gyp/commit/9e9df66a06)] - use process.release, make aware of io.js & node v4 differences (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) +* [[`1ea7ed01f4`](https://github.com/nodejs/node-gyp/commit/1ea7ed01f4)] - **deps**: update graceful-fs dependency to the latest (Sakthipriyan Vairamani) [#714](https://github.com/nodejs/node-gyp/pull/714) +* [[`0fbc387b35`](https://github.com/nodejs/node-gyp/commit/0fbc387b35)] - Update repository URLs. (Ben Noordhuis) [#715](https://github.com/nodejs/node-gyp/pull/715) +* [[`bbedb8868b`](https://github.com/nodejs/node-gyp/commit/bbedb8868b)] - **(SEMVER-MAJOR)** **win**: enable delay-load hook by default (Jeremiah Senkpiel) [#708](https://github.com/nodejs/node-gyp/pull/708) +* [[`85ed107565`](https://github.com/nodejs/node-gyp/commit/85ed107565)] - Merge pull request #664 from othiym23/othiym23/allow-semver-5 (Nathan Rajlich) +* [[`0c720d234c`](https://github.com/nodejs/node-gyp/commit/0c720d234c)] - allow semver@5 (Forrest L Norvell) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/History.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/History.md new file mode 100644 index 00000000..359bbad6 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/History.md @@ -0,0 +1,41 @@ + +2.0.2 / 2015-07-14 +================== + + * Use HTTPS for dist url (#656, @SonicHedgehog) + * Merge pull request #648 from nevosegal/master + * Merge pull request #650 from magic890/patch-1 + * Updated Installation section on README + * Updated link to gyp user documentation + * Fix download error message spelling (#643, @tomxtobin) + * Merge pull request #637 from lygstate/master + * Set NODE_GYP_DIR for addon.gypi to setting absolute path for + src/win_delay_load_hook.c, and fixes of the long relative path issue on Win32. + Fixes #636 (#637, @lygstate). + +2.0.1 / 2015-05-28 +================== + + * configure: try/catch the semver range.test() call + * README: update for visual studio 2013 (#510, @samccone) + +2.0.0 / 2015-05-24 +================== + + * configure: check for python2 executable by default, fallback to python + * configure: don't clobber existing $PYTHONPATH + * configure: use "path-array" for PYTHONPATH + * gyp: fix for non-acsii userprofile name on Windows + * gyp: always install into $PRODUCT_DIR + * gyp: apply https://codereview.chromium.org/11361103/ + * gyp: don't use links at all, just copy the files instead + * gyp: update gyp to e1c8fcf7 + * Updated README.md with updated Windows build info + * Show URL when a download fails + * package: add a "license" field + * move HMODULE m declaration to top + * Only add "-undefined dynamic_lookup" to loadable_module targets + * win: optionally allow node.exe/iojs.exe to be renamed + * Avoid downloading shasums if using tarPath + * Add target name preprocessor define: `NODE_GYP_MODULE_NAME` + * Show better error message in case of bad network settings diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/LICENSE new file mode 100644 index 00000000..142bd098 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/README.md new file mode 100644 index 00000000..1671dd19 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/README.md @@ -0,0 +1,199 @@ +node-gyp +========= +### Node.js native addon build tool + +`node-gyp` is a cross-platform command-line tool written in Node.js for compiling +native addon modules for Node.js. It bundles the [gyp](https://code.google.com/p/gyp/) +project used by the Chromium team and takes away the pain of dealing with the +various differences in build platforms. It is the replacement to the `node-waf` +program which is removed for node `v0.8`. If you have a native addon for node that +still has a `wscript` file, then you should definitely add a `binding.gyp` file +to support the latest versions of node. + +Multiple target versions of node are supported (i.e. `0.8`, `0.9`, `0.10`, ..., `1.0`, +etc.), regardless of what version of node is actually installed on your system +(`node-gyp` downloads the necessary development files for the target version). + +#### Features: + + * Easy to use, consistent interface + * Same commands to build your module on every platform + * Supports multiple target versions of Node + + +Installation +------------ + +You can install with `npm`: + +``` bash +$ npm install -g node-gyp +``` + +You will also need to install: + + * On Unix: + * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) + * `make` + * A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org) + * On Mac OS X: + * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) (already installed on Mac OS X) + * [Xcode](https://developer.apple.com/xcode/download/) + * You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Downloads` + * This step will install `gcc` and the related toolchain containing `make` + * On Windows: + * Python ([`v2.7.10`][python-v2.7.10] recommended, `v3.x.x` is __*not*__ supported) + * Make sure that you have a PYTHON environment variable, and it is set to drive:\path\to\python.exe not to a folder + * Windows XP/Vista/7: + * Microsoft Visual Studio C++ 2013 ([Express][msvc2013] version works well) + * If the install fails, try uninstalling any C++ 2010 x64&x86 Redistributable that you have installed first + * If you get errors that the 64-bit compilers are not installed you may also need the [compiler update for the Windows SDK 7.1] + * Windows 7/8: + * Microsoft Visual Studio C++ 2013 for Windows Desktop ([Express][msvc2013] version works well) + * Windows 10: + * Install the latest version of npm (3.3.6 at the time of writing) + * Install Python 2.7 from https://www.python.org/download/releases/2.7/ and make sure its on the System Path + * Install Visual Studio Community 2015 Edition. (Custom Install, Select Visual C++ during the installation) + * Set the environment variable GYP_MSVS_VERSION=2015 + * Run the command prompt as Administrator + * $ npm install (--msvs_version=2015) <-- Shouldn't be needed if you have set GYP_MSVS_VERSION env + * If the above steps have not worked or you are unsure please visit http://www.serverpals.com/blog/building-using-node-gyp-with-visual-studio-express-2015-on-windows-10-pro-x64 for a full walkthrough + * All Windows Versions + * For 64-bit builds of node and native modules you will _**also**_ need the [Windows 7 64-bit SDK][win7sdk] + * You may need to run one of the following commands if your build complains about WindowsSDKDir not being set, and you are sure you have already installed the SDK: + +``` +call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x86 +call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x64 +``` + +If you have multiple Python versions installed, you can identify which Python +version `node-gyp` uses by setting the '--python' variable: + +``` bash +$ node-gyp --python /path/to/python2.7 +``` + +If `node-gyp` is called by way of `npm` *and* you have multiple versions of +Python installed, then you can set `npm`'s 'python' config key to the appropriate +value: + +``` bash +$ npm config set python /path/to/executable/python2.7 +``` + +Note that OS X is just a flavour of Unix and so needs `python`, `make`, and C/C++. +An easy way to obtain these is to install XCode from Apple, +and then use it to install the command line tools (under Preferences -> Downloads). + +How to Use +---------- + +To compile your native addon, first go to its root directory: + +``` bash +$ cd my_node_addon +``` + +The next step is to generate the appropriate project build files for the current +platform. Use `configure` for that: + +``` bash +$ node-gyp configure +``` + +__Note__: The `configure` step looks for the `binding.gyp` file in the current +directory to process. See below for instructions on creating the `binding.gyp` file. + +Now you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file +(on Windows) in the `build/` directory. Next invoke the `build` command: + +``` bash +$ node-gyp build +``` + +Now you have your compiled `.node` bindings file! The compiled bindings end up +in `build/Debug/` or `build/Release/`, depending on the build mode. At this point +you can require the `.node` file with Node and run your tests! + +__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or +`-d`) switch when running either the `configure`, `build` or `rebuild` command. + + +The "binding.gyp" file +---------------------- + +Previously when node had `node-waf` you had to write a `wscript` file. The +replacement for that is the `binding.gyp` file, which describes the configuration +to build your module in a JSON-like format. This file gets placed in the root of +your package, alongside the `package.json` file. + +A barebones `gyp` file appropriate for building a node addon looks like: + +``` python +{ + "targets": [ + { + "target_name": "binding", + "sources": [ "src/binding.cc" ] + } + ] +} +``` + +Some additional resources for addons and writing `gyp` files: + + * ["Going Native" a nodeschool.io tutorial](http://nodeschool.io/#goingnative) + * ["Hello World" node addon example](https://github.com/nodejs/node/tree/master/test/addons/hello-world) + * [gyp user documentation](https://gyp.gsrc.io/docs/UserDocumentation.md) + * [gyp input format reference](https://gyp.gsrc.io/docs/InputFormatReference.md) + * [*"binding.gyp" files out in the wild* wiki page](https://github.com/nodejs/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild) + + +Commands +-------- + +`node-gyp` responds to the following commands: + +| **Command** | **Description** +|:--------------|:--------------------------------------------------------------- +| `build` | Invokes `make`/`msbuild.exe` and builds the native addon +| `clean` | Removes the `build` directory if it exists +| `configure` | Generates project build files for the current platform +| `rebuild` | Runs `clean`, `configure` and `build` all in a row +| `install` | Installs node development header files for the given version +| `list` | Lists the currently installed node development file versions +| `remove` | Removes the node development header files for the given version + + +License +------- + +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +[python-v2.7.10]: https://www.python.org/downloads/release/python-2710/ +[msvc2013]: https://www.microsoft.com/en-gb/download/details.aspx?id=44914 +[win7sdk]: https://www.microsoft.com/en-us/download/details.aspx?id=8279 +[compiler update for the Windows SDK 7.1]: https://www.microsoft.com/en-us/download/details.aspx?id=4422 diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/addon.gypi b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/addon.gypi new file mode 100644 index 00000000..88eea1bd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/addon.gypi @@ -0,0 +1,108 @@ +{ + 'target_defaults': { + 'type': 'loadable_module', + 'win_delay_load_hook': 'true', + 'product_prefix': '', + + 'include_dirs': [ + '<(node_root_dir)/include/node', + '<(node_root_dir)/src', + '<(node_root_dir)/deps/uv/include', + '<(node_root_dir)/deps/v8/include' + ], + 'defines': [ + 'NODE_GYP_MODULE_NAME=>(_target_name)' + ], + + 'target_conditions': [ + ['_type=="loadable_module"', { + 'product_extension': 'node', + 'defines': [ + 'BUILDING_NODE_EXTENSION' + ], + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-undefined dynamic_lookup' + ], + }, + }], + + ['_type=="static_library"', { + # set to `1` to *disable* the -T thin archive 'ld' flag. + # older linkers don't support this flag. + 'standalone_static_library': '<(standalone_static_library)' + }], + + ['_win_delay_load_hook=="true"', { + # If the addon specifies `'win_delay_load_hook': 'true'` in its + # binding.gyp, link a delay-load hook into the DLL. This hook ensures + # that the addon will work regardless of whether the node/iojs binary + # is named node.exe, iojs.exe, or something else. + 'conditions': [ + [ 'OS=="win"', { + 'sources': [ + '<(node_gyp_dir)/src/win_delay_load_hook.c', + ], + 'msvs_settings': { + 'VCLinkerTool': { + 'DelayLoadDLLs': [ 'iojs.exe', 'node.exe' ], + # Don't print a linker warning when no imports from either .exe + # are used. + 'AdditionalOptions': [ '/ignore:4199' ], + }, + }, + }], + ], + }], + ], + + 'conditions': [ + [ 'OS=="mac"', { + 'defines': [ + '_DARWIN_USE_64_BIT_INODE=1' + ], + 'xcode_settings': { + 'DYLIB_INSTALL_NAME_BASE': '@rpath' + }, + }], + [ 'OS=="aix"', { + 'ldflags': [ + '-Wl,-bimport:<(node_exp_file)' + ], + }], + [ 'OS=="win"', { + 'libraries': [ + '-lkernel32.lib', + '-luser32.lib', + '-lgdi32.lib', + '-lwinspool.lib', + '-lcomdlg32.lib', + '-ladvapi32.lib', + '-lshell32.lib', + '-lole32.lib', + '-loleaut32.lib', + '-luuid.lib', + '-lodbc32.lib', + '-lDelayImp.lib', + '-l"<(node_root_dir)/$(ConfigurationName)/<(node_lib_file)"' + ], + 'msvs_disabled_warnings': [ + # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent' + # needs to have dll-interface to be used by + # clients of class 'node::ObjectWrap' + 4251 + ], + }, { + # OS!="win" + 'defines': [ + '_LARGEFILE_SOURCE', + '_FILE_OFFSET_BITS=64' + ], + }], + [ 'OS in "freebsd openbsd netbsd solaris" or \ + (OS=="linux" and target_arch!="ia32")', { + 'cflags': [ '-fPIC' ], + }] + ] + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/package.json new file mode 100644 index 00000000..01d51544 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/node-gyp/package.json @@ -0,0 +1,105 @@ +{ + "name": "node-gyp", + "description": "Node.js native addon build tool", + "license": "MIT", + "keywords": [ + "native", + "addon", + "module", + "c", + "c++", + "bindings", + "gyp" + ], + "version": "3.3.1", + "installVersion": 9, + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://tootallnate.net" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/node-gyp.git" + }, + "preferGlobal": true, + "bin": { + "node-gyp": "./bin/node-gyp.js" + }, + "main": "./lib/node-gyp.js", + "dependencies": { + "fstream": "^1.0.0", + "glob": "3 || 4", + "graceful-fs": "^4.1.2", + "minimatch": "1", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2", + "osenv": "0", + "path-array": "^1.0.0", + "request": "2", + "rimraf": "2", + "semver": "2.x || 3.x || 4 || 5", + "tar": "^2.0.0", + "which": "1" + }, + "engines": { + "node": ">= 0.8.0" + }, + "devDependencies": { + "tape": "~4.2.0" + }, + "scripts": { + "test": "tape test/test-*" + }, + "gitHead": "1dcf356ca7b658789447108b29a985c00ffcf0f5", + "bugs": { + "url": "https://github.com/nodejs/node-gyp/issues" + }, + "homepage": "https://github.com/nodejs/node-gyp#readme", + "_id": "node-gyp@3.3.1", + "_shasum": "80f7b6d7c2f9c0495ba42c518a670c99bdf6e4a0", + "_from": "node-gyp@3.3.1", + "_npmVersion": "3.3.12", + "_nodeVersion": "6.0.0-pre", + "_npmUser": { + "name": "bnoordhuis", + "email": "info@bnoordhuis.nl" + }, + "maintainers": [ + { + "name": "TooTallNate", + "email": "nathan@tootallnate.net" + }, + { + "name": "bnoordhuis", + "email": "info@bnoordhuis.nl" + }, + { + "name": "fishrock123", + "email": "fishrock123@rocketmail.com" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "dist": { + "shasum": "80f7b6d7c2f9c0495ba42c518a670c99bdf6e4a0", + "tarball": "http://registry.npmjs.org/node-gyp/-/node-gyp-3.3.1.tgz" + }, + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/node-gyp-3.3.1.tgz_1457115144174_0.4018901875242591" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.3.1.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/.npmignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/.travis.yml new file mode 100644 index 00000000..8c98c38b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/README.md new file mode 100644 index 00000000..eaeec040 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/README.md @@ -0,0 +1,211 @@ +If you want to write an option parser, and have it be good, there are +two ways to do it. The Right Way, and the Wrong Way. + +The Wrong Way is to sit down and write an option parser. We've all done +that. + +The Right Way is to write some complex configurable program with so many +options that you hit the limit of your frustration just trying to +manage them all, and defer it with duct-tape solutions until you see +exactly to the core of the problem, and finally snap and write an +awesome option parser. + +If you want to write an option parser, don't write an option parser. +Write a package manager, or a source control system, or a service +restarter, or an operating system. You probably won't end up with a +good one of those, but if you don't give up, and you are relentless and +diligent enough in your procrastination, you may just end up with a very +nice option parser. + +## USAGE + + // my-program.js + var nopt = require("nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + , "many1" : [String, Array] + , "many2" : [path] + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag"] + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + console.log(parsed) + +This would give you support for any of the following: + +```bash +$ node my-program.js --foo "blerp" --no-flag +{ "foo" : "blerp", "flag" : false } + +$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag +{ bar: 7, foo: "Mr. Hand", flag: true } + +$ node my-program.js --foo "blerp" -f -----p +{ foo: "blerp", flag: true, pick: true } + +$ node my-program.js -fp --foofoo +{ foo: "Mr. Foo", flag: true, pick: true } + +$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. +{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } + +$ node my-program.js --blatzk -fp # unknown opts are ok. +{ blatzk: true, flag: true, pick: true } + +$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value +{ blatzk: 1000, flag: true, pick: true } + +$ node my-program.js --no-blatzk -fp # unless they start with "no-" +{ blatzk: false, flag: true, pick: true } + +$ node my-program.js --baz b/a/z # known paths are resolved. +{ baz: "/Users/isaacs/b/a/z" } + +# if Array is one of the types, then it can take many +# values, and will always be an array. The other types provided +# specify what types are allowed in the list. + +$ node my-program.js --many1 5 --many1 null --many1 foo +{ many1: ["5", "null", "foo"] } + +$ node my-program.js --many2 foo --many2 bar +{ many2: ["/path/to/foo", "path/to/bar"] } +``` + +Read the tests at the bottom of `lib/nopt.js` for more examples of +what this puppy can do. + +## Types + +The following types are supported, and defined on `nopt.typeDefs` + +* String: A normal string. No parsing is done. +* path: A file system path. Gets resolved against cwd if not absolute. +* url: A url. If it doesn't parse, it isn't accepted. +* Number: Must be numeric. +* Date: Must parse as a date. If it does, and `Date` is one of the options, + then it will return a Date object, not a string. +* Boolean: Must be either `true` or `false`. If an option is a boolean, + then it does not need a value, and its presence will imply `true` as + the value. To negate boolean flags, do `--no-whatever` or `--whatever + false` +* NaN: Means that the option is strictly not allowed. Any value will + fail. +* Stream: An object matching the "Stream" class in node. Valuable + for use when validating programmatically. (npm uses this to let you + supply any WriteStream on the `outfd` and `logfd` config options.) +* Array: If `Array` is specified as one of the types, then the value + will be parsed as a list of options. This means that multiple values + can be specified, and that the value will always be an array. + +If a type is an array of values not on this list, then those are +considered valid values. For instance, in the example above, the +`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, +and any other value will be rejected. + +When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be +interpreted as their JavaScript equivalents. + +You can also mix types and values, or multiple types, in a list. For +instance `{ blah: [Number, null] }` would allow a value to be set to +either a Number or null. When types are ordered, this implies a +preference, and the first type that can be used to properly interpret +the value will be used. + +To define a new type, add it to `nopt.typeDefs`. Each item in that +hash is an object with a `type` member and a `validate` method. The +`type` member is an object that matches what goes in the type list. The +`validate` method is a function that gets called with `validate(data, +key, val)`. Validate methods should assign `data[key]` to the valid +value of `val` if it can be handled properly, or return boolean +`false` if it cannot. + +You can also call `nopt.clean(data, types, typeDefs)` to clean up a +config object and remove its invalid properties. + +## Error Handling + +By default, nopt outputs a warning to standard error when invalid values for +known options are found. You can change this behavior by assigning a method +to `nopt.invalidHandler`. This method will be called with +the offending `nopt.invalidHandler(key, val, types)`. + +If no `nopt.invalidHandler` is assigned, then it will console.error +its whining. If it is assigned to boolean `false` then the warning is +suppressed. + +## Abbreviations + +Yes, they are supported. If you define options like this: + +```javascript +{ "foolhardyelephants" : Boolean +, "pileofmonkeys" : Boolean } +``` + +Then this will work: + +```bash +node program.js --foolhar --pil +node program.js --no-f --pileofmon +# etc. +``` + +## Shorthands + +Shorthands are a hash of shorter option names to a snippet of args that +they expand to. + +If multiple one-character shorthands are all combined, and the +combination does not unambiguously match any other option or shorthand, +then they will be broken up into their constituent parts. For example: + +```json +{ "s" : ["--loglevel", "silent"] +, "g" : "--global" +, "f" : "--force" +, "p" : "--parseable" +, "l" : "--long" +} +``` + +```bash +npm ls -sgflp +# just like doing this: +npm ls --loglevel silent --global --force --long --parseable +``` + +## The Rest of the args + +The config object returned by nopt is given a special member called +`argv`, which is an object with the following fields: + +* `remain`: The remaining args after all the parsing has occurred. +* `original`: The args as they originally appeared. +* `cooked`: The args after flags and shorthands are expanded. + +## Slicing + +Node programs are called with more or less the exact argv as it appears +in C land, after the v8 and node-specific options have been plucked off. +As such, `argv[0]` is always `node` and `argv[1]` is always the +JavaScript program being run. + +That's usually not very useful to you. So they're sliced off by +default. If you want them, then you can pass in `0` as the last +argument, or any other number that you'd like to slice off the start of +the list. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/package.json new file mode 100644 index 00000000..845fc6c8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/nopt/package.json @@ -0,0 +1,38 @@ +{ + "name": "nopt", + "version": "3.0.6", + "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "main": "lib/nopt.js", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/nopt.git" + }, + "bin": { + "nopt": "./bin/nopt.js" + }, + "license": "ISC", + "dependencies": { + "abbrev": "1" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "readme": "If you want to write an option parser, and have it be good, there are\ntwo ways to do it. The Right Way, and the Wrong Way.\n\nThe Wrong Way is to sit down and write an option parser. We've all done\nthat.\n\nThe Right Way is to write some complex configurable program with so many\noptions that you hit the limit of your frustration just trying to\nmanage them all, and defer it with duct-tape solutions until you see\nexactly to the core of the problem, and finally snap and write an\nawesome option parser.\n\nIf you want to write an option parser, don't write an option parser.\nWrite a package manager, or a source control system, or a service\nrestarter, or an operating system. You probably won't end up with a\ngood one of those, but if you don't give up, and you are relentless and\ndiligent enough in your procrastination, you may just end up with a very\nnice option parser.\n\n## USAGE\n\n // my-program.js\n var nopt = require(\"nopt\")\n , Stream = require(\"stream\").Stream\n , path = require(\"path\")\n , knownOpts = { \"foo\" : [String, null]\n , \"bar\" : [Stream, Number]\n , \"baz\" : path\n , \"bloo\" : [ \"big\", \"medium\", \"small\" ]\n , \"flag\" : Boolean\n , \"pick\" : Boolean\n , \"many1\" : [String, Array]\n , \"many2\" : [path]\n }\n , shortHands = { \"foofoo\" : [\"--foo\", \"Mr. Foo\"]\n , \"b7\" : [\"--bar\", \"7\"]\n , \"m\" : [\"--bloo\", \"medium\"]\n , \"p\" : [\"--pick\"]\n , \"f\" : [\"--flag\"]\n }\n // everything is optional.\n // knownOpts and shorthands default to {}\n // arg list defaults to process.argv\n // slice defaults to 2\n , parsed = nopt(knownOpts, shortHands, process.argv, 2)\n console.log(parsed)\n\nThis would give you support for any of the following:\n\n```bash\n$ node my-program.js --foo \"blerp\" --no-flag\n{ \"foo\" : \"blerp\", \"flag\" : false }\n\n$ node my-program.js ---bar 7 --foo \"Mr. Hand\" --flag\n{ bar: 7, foo: \"Mr. Hand\", flag: true }\n\n$ node my-program.js --foo \"blerp\" -f -----p\n{ foo: \"blerp\", flag: true, pick: true }\n\n$ node my-program.js -fp --foofoo\n{ foo: \"Mr. Foo\", flag: true, pick: true }\n\n$ node my-program.js --foofoo -- -fp # -- stops the flag parsing.\n{ foo: \"Mr. Foo\", argv: { remain: [\"-fp\"] } }\n\n$ node my-program.js --blatzk -fp # unknown opts are ok.\n{ blatzk: true, flag: true, pick: true }\n\n$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value\n{ blatzk: 1000, flag: true, pick: true }\n\n$ node my-program.js --no-blatzk -fp # unless they start with \"no-\"\n{ blatzk: false, flag: true, pick: true }\n\n$ node my-program.js --baz b/a/z # known paths are resolved.\n{ baz: \"/Users/isaacs/b/a/z\" }\n\n# if Array is one of the types, then it can take many\n# values, and will always be an array. The other types provided\n# specify what types are allowed in the list.\n\n$ node my-program.js --many1 5 --many1 null --many1 foo\n{ many1: [\"5\", \"null\", \"foo\"] }\n\n$ node my-program.js --many2 foo --many2 bar\n{ many2: [\"/path/to/foo\", \"path/to/bar\"] }\n```\n\nRead the tests at the bottom of `lib/nopt.js` for more examples of\nwhat this puppy can do.\n\n## Types\n\nThe following types are supported, and defined on `nopt.typeDefs`\n\n* String: A normal string. No parsing is done.\n* path: A file system path. Gets resolved against cwd if not absolute.\n* url: A url. If it doesn't parse, it isn't accepted.\n* Number: Must be numeric.\n* Date: Must parse as a date. If it does, and `Date` is one of the options,\n then it will return a Date object, not a string.\n* Boolean: Must be either `true` or `false`. If an option is a boolean,\n then it does not need a value, and its presence will imply `true` as\n the value. To negate boolean flags, do `--no-whatever` or `--whatever\n false`\n* NaN: Means that the option is strictly not allowed. Any value will\n fail.\n* Stream: An object matching the \"Stream\" class in node. Valuable\n for use when validating programmatically. (npm uses this to let you\n supply any WriteStream on the `outfd` and `logfd` config options.)\n* Array: If `Array` is specified as one of the types, then the value\n will be parsed as a list of options. This means that multiple values\n can be specified, and that the value will always be an array.\n\nIf a type is an array of values not on this list, then those are\nconsidered valid values. For instance, in the example above, the\n`--bloo` option can only be one of `\"big\"`, `\"medium\"`, or `\"small\"`,\nand any other value will be rejected.\n\nWhen parsing unknown fields, `\"true\"`, `\"false\"`, and `\"null\"` will be\ninterpreted as their JavaScript equivalents.\n\nYou can also mix types and values, or multiple types, in a list. For\ninstance `{ blah: [Number, null] }` would allow a value to be set to\neither a Number or null. When types are ordered, this implies a\npreference, and the first type that can be used to properly interpret\nthe value will be used.\n\nTo define a new type, add it to `nopt.typeDefs`. Each item in that\nhash is an object with a `type` member and a `validate` method. The\n`type` member is an object that matches what goes in the type list. The\n`validate` method is a function that gets called with `validate(data,\nkey, val)`. Validate methods should assign `data[key]` to the valid\nvalue of `val` if it can be handled properly, or return boolean\n`false` if it cannot.\n\nYou can also call `nopt.clean(data, types, typeDefs)` to clean up a\nconfig object and remove its invalid properties.\n\n## Error Handling\n\nBy default, nopt outputs a warning to standard error when invalid values for\nknown options are found. You can change this behavior by assigning a method\nto `nopt.invalidHandler`. This method will be called with\nthe offending `nopt.invalidHandler(key, val, types)`.\n\nIf no `nopt.invalidHandler` is assigned, then it will console.error\nits whining. If it is assigned to boolean `false` then the warning is\nsuppressed.\n\n## Abbreviations\n\nYes, they are supported. If you define options like this:\n\n```javascript\n{ \"foolhardyelephants\" : Boolean\n, \"pileofmonkeys\" : Boolean }\n```\n\nThen this will work:\n\n```bash\nnode program.js --foolhar --pil\nnode program.js --no-f --pileofmon\n# etc.\n```\n\n## Shorthands\n\nShorthands are a hash of shorter option names to a snippet of args that\nthey expand to.\n\nIf multiple one-character shorthands are all combined, and the\ncombination does not unambiguously match any other option or shorthand,\nthen they will be broken up into their constituent parts. For example:\n\n```json\n{ \"s\" : [\"--loglevel\", \"silent\"]\n, \"g\" : \"--global\"\n, \"f\" : \"--force\"\n, \"p\" : \"--parseable\"\n, \"l\" : \"--long\"\n}\n```\n\n```bash\nnpm ls -sgflp\n# just like doing this:\nnpm ls --loglevel silent --global --force --long --parseable\n```\n\n## The Rest of the args\n\nThe config object returned by nopt is given a special member called\n`argv`, which is an object with the following fields:\n\n* `remain`: The remaining args after all the parsing has occurred.\n* `original`: The args as they originally appeared.\n* `cooked`: The args after flags and shorthands are expanded.\n\n## Slicing\n\nNode programs are called with more or less the exact argv as it appears\nin C land, after the v8 and node-specific options have been plucked off.\nAs such, `argv[0]` is always `node` and `argv[1]` is always the\nJavaScript program being run.\n\nThat's usually not very useful to you. So they're sliced off by\ndefault. If you want them, then you can pass in `0` as the last\nargument, or any other number that you'd like to slice off the start of\nthe list.\n", + "readmeFilename": "README.md", + "gitHead": "10a750c9bb99c1950160353459e733ac2aa18cb6", + "bugs": { + "url": "https://github.com/npm/nopt/issues" + }, + "homepage": "https://github.com/npm/nopt#readme", + "_id": "nopt@3.0.6", + "_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", + "_from": "nopt@>=3.0.6 <3.1.0" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/.npmignore new file mode 100644 index 00000000..bca51b35 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/CHANGELOG.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/CHANGELOG.md new file mode 100644 index 00000000..f9ce58dd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/CHANGELOG.md @@ -0,0 +1,5 @@ +### 1.0.0 (2014-12-25): + +* [`8b3d874`](https://github.com/npm/normalize-git-url/commit/8b3d874afd14f4cdde65d418e0a35a615c746bba) + Initial version, with simple tests. + ([@othiym23](https://github.com/othiym23)) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/LICENSE new file mode 100644 index 00000000..efd5764b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2014-2015, Forrest L Norvell + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/README.md new file mode 100644 index 00000000..0c4fe3e9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/README.md @@ -0,0 +1,40 @@ +# normalize-git-url + +You have a bunch of Git URLs. You want to convert them to a canonical +representation, probably for use inside npm so that it doesn't end up creating +a bunch of superfluous cached origins. You use this package. + +## Usage + +```javascript +var ngu = require('normalize-git-url'); +var normalized = ngu("git+ssh://git@github.com:organization/repo.git#hashbrowns") +// get back: +// { +// url : "ssh://git@github.com/organization/repo.git", +// branch : "hashbrowns" // did u know hashbrowns are delicious? +// } +``` + +## API + +There's just the one function, and all it takes is a single parameter, a non-normalized Git URL. + +### normalizeGitUrl(url) + +* `url` {String} The Git URL (very loosely speaking) to be normalized. + +Returns an object with the following format: + +* `url` {String} The normalized URL. +* `branch` {String} The treeish to be checked out once the repo at `url` is + cloned. It doesn't have to be a branch, but it's a lot easier to intuit what + the output is for with that name. + +## Limitations + +Right now this doesn't try to special-case GitHub too much -- it doesn't ensure +that `.git` is added to the end of URLs, it doesn't prefer `https:` over +`http:` or `ssh:`, it doesn't deal with redirects, and it doesn't try to +resolve symbolic names to treeish hashcodes. For now, it just tries to account +for minor differences in representation. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/normalize-git-url.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/normalize-git-url.js new file mode 100644 index 00000000..57bac857 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/normalize-git-url.js @@ -0,0 +1,38 @@ +var url = require('url') + +module.exports = function normalize (u) { + var parsed = url.parse(u) + // If parsing actually alters the URL, it is almost certainly an + // scp-style URL, or an invalid one. + var altered = u !== url.format(parsed) + + // git is so tricky! + // if the path is like ssh://foo:22/some/path then it works, but + // it needs the ssh:// + // If the path is like ssh://foo:some/path then it works, but + // only if you remove the ssh:// + if (parsed.protocol) { + parsed.protocol = parsed.protocol.replace(/^git\+/, '') + } + + // figure out what we should check out. + var checkout = parsed.hash && parsed.hash.substr(1) || 'master' + parsed.hash = '' + + var returnedUrl + if (altered) { + if (u.match(/^git\+https?/) && parsed.pathname.match(/\/?:[^0-9]/)) { + returnedUrl = u.replace(/^git\+(.*:[^:]+):(.*)/, '$1/$2') + } else { + returnedUrl = u.replace(/^(?:git\+)?ssh:\/\//, '') + } + returnedUrl = returnedUrl.replace(/#[^#]*$/, '') + } else { + returnedUrl = url.format(parsed) + } + + return { + url: returnedUrl, + branch: checkout + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/package.json new file mode 100644 index 00000000..372e891f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-git-url/package.json @@ -0,0 +1,42 @@ +{ + "name": "normalize-git-url", + "version": "3.0.1", + "description": "Normalizes Git URLs. For npm, but you can use it too.", + "main": "normalize-git-url.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^1.1.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/normalize-git-url.git" + }, + "keywords": [ + "git", + "github", + "url", + "normalize", + "npm" + ], + "author": { + "name": "Forrest L Norvell", + "email": "ogd@aoaioxxysz.net" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/normalize-git-url/issues" + }, + "homepage": "https://github.com/npm/normalize-git-url", + "readme": "# normalize-git-url\n\nYou have a bunch of Git URLs. You want to convert them to a canonical\nrepresentation, probably for use inside npm so that it doesn't end up creating\na bunch of superfluous cached origins. You use this package.\n\n## Usage\n\n```javascript\nvar ngu = require('normalize-git-url');\nvar normalized = ngu(\"git+ssh://git@github.com:organization/repo.git#hashbrowns\")\n// get back:\n// {\n// url : \"ssh://git@github.com/organization/repo.git\",\n// branch : \"hashbrowns\" // did u know hashbrowns are delicious?\n// }\n```\n\n## API\n\nThere's just the one function, and all it takes is a single parameter, a non-normalized Git URL.\n\n### normalizeGitUrl(url)\n\n* `url` {String} The Git URL (very loosely speaking) to be normalized.\n\nReturns an object with the following format:\n\n* `url` {String} The normalized URL.\n* `branch` {String} The treeish to be checked out once the repo at `url` is\n cloned. It doesn't have to be a branch, but it's a lot easier to intuit what\n the output is for with that name.\n\n## Limitations\n\nRight now this doesn't try to special-case GitHub too much -- it doesn't ensure\nthat `.git` is added to the end of URLs, it doesn't prefer `https:` over\n`http:` or `ssh:`, it doesn't deal with redirects, and it doesn't try to\nresolve symbolic names to treeish hashcodes. For now, it just tries to account\nfor minor differences in representation.\n", + "readmeFilename": "README.md", + "gitHead": "8393cd4345e404eb6ad2ff6853dcc8287807ca22", + "_id": "normalize-git-url@3.0.1", + "_shasum": "d40d419d05a15870271e50534dbb7b8ccd9b0a5c", + "_from": "normalize-git-url@latest" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/.npmignore new file mode 100644 index 00000000..096746c1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/.npmignore @@ -0,0 +1 @@ +/node_modules/ \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/.travis.yml new file mode 100644 index 00000000..e02e6b49 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/AUTHORS b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/AUTHORS new file mode 100644 index 00000000..a15de60e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/AUTHORS @@ -0,0 +1,4 @@ +# Names sorted by how much code was originally theirs. +Isaac Z. Schlueter +Meryn Stol +Robert Kowalski \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/LICENSE new file mode 100644 index 00000000..5139d20a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/LICENSE @@ -0,0 +1,30 @@ +This package contains code originally written by Isaac Z. Schlueter. +Used with permission. + +Copyright (c) Meryn Stol ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/README.md new file mode 100644 index 00000000..c52ba681 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/README.md @@ -0,0 +1,107 @@ +# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data) + +normalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry. + +normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools. + +## Installation + +``` +npm install normalize-package-data +``` + +## Usage + +Basic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`. + +```javascript +normalizeData = require('normalize-package-data') +packageData = fs.readFileSync("package.json") +normalizeData(packageData) +// packageData is now normalized +``` + +#### Strict mode + +You may activate strict validation by passing true as the second argument. + +```javascript +normalizeData = require('normalize-package-data') +packageData = fs.readFileSync("package.json") +warnFn = function(msg) { console.error(msg) } +normalizeData(packageData, true) +// packageData is now normalized +``` + +If strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace. + +#### Warnings + +Optionally, you may pass a "warning" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data. + +```javascript +normalizeData = require('normalize-package-data') +packageData = fs.readFileSync("package.json") +warnFn = function(msg) { console.error(msg) } +normalizeData(packageData, warnFn) +// packageData is now normalized. Any number of warnings may have been logged. +``` + +You may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third. + +When `private` field is set to `true`, warnings will be suppressed. + +### Potential exceptions + +If the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback. + +## What normalization (currently) entails + +* The value of `name` field gets trimmed (unless in strict mode). +* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver). +* If `name` and/or `version` fields are missing, they are set to empty strings. +* If `files` field is not an array, it will be removed. +* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value. +* If `man` field is a string, it will become an array with the original string as its sole member. +* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\s+`. +* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties. +* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`. +* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs. +* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched. +* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved. +* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL. +* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`. +* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`. +* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git+https://github.com/[owner-name]/[repo-name].git +* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value. +* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. +* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed. +* If `homepage` field is not a string, it will be removed. +* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`. +* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/ . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. + +### Rules for name field + +If `name` field is given, the value of the name field must be a string. The string may not: + +* start with a period. +* contain the following characters: `/@\s+%` +* contain and characters that would need to be encoded for use in urls. +* resemble the word `node_modules` or `favicon.ico` (case doesn't matter). + +### Rules for version field + +If `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver). + +### Rules for license field + +The `license` field should be a valid *SPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/packages/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license). + +## Credits + +This package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson. + +## License + +normalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). +Copyright (c) 2013 Meryn Stol diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/package.json new file mode 100644 index 00000000..02f01987 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/normalize-package-data/package.json @@ -0,0 +1,86 @@ +{ + "name": "normalize-package-data", + "version": "2.3.5", + "author": { + "name": "Meryn Stol", + "email": "merynstol@gmail.com" + }, + "description": "Normalizes data that can be found in package.json files.", + "license": "BSD-2-Clause", + "repository": { + "type": "git", + "url": "git://github.com/npm/normalize-package-data.git" + }, + "main": "lib/normalize.js", + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "devDependencies": { + "async": "^1.5.0", + "tap": "^2.2.0", + "underscore": "^1.8.3" + }, + "contributors": [ + { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + { + "name": "Meryn Stol", + "email": "merynstol@gmail.com" + }, + { + "name": "Robert Kowalski", + "email": "rok@kowalski.gd" + } + ], + "gitHead": "3dc7756af20b3b1b24c6d75302448ca3659e0a65", + "bugs": { + "url": "https://github.com/npm/normalize-package-data/issues" + }, + "homepage": "https://github.com/npm/normalize-package-data#readme", + "_id": "normalize-package-data@2.3.5", + "_shasum": "8d924f142960e1777e7ffe170543631cc7cb02df", + "_from": "normalize-package-data@>=2.3.5 <2.4.0", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "8d924f142960e1777e7ffe170543631cc7cb02df", + "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "meryn", + "email": "merynstol@gmail.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/LICENSE new file mode 100644 index 00000000..215e9f0d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) npm, Inc. and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/README.md new file mode 100644 index 00000000..9956e80c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/README.md @@ -0,0 +1,21 @@ +# npm-cache-filename + +Given a cache folder and url, return the appropriate cache folder. + +## USAGE + +```javascript +var cf = require('npm-cache-filename'); +console.log(cf('/tmp/cache', 'https://registry.npmjs.org:1234/foo/bar')); +// outputs: /tmp/cache/registry.npmjs.org_1234/foo/bar +``` + +As a bonus, you can also bind it to a specific root path: + +```javascript +var cf = require('npm-cache-filename'); +var getFile = cf('/tmp/cache'); + +console.log(getFile('https://registry.npmjs.org:1234/foo/bar')); +// outputs: /tmp/cache/registry.npmjs.org_1234/foo/bar +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/index.js new file mode 100644 index 00000000..6c2aa0cf --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/index.js @@ -0,0 +1,24 @@ +var url = require('url');; +var path = require('path');; + +module.exports = cf;; + +function cf(root, u) { + if (!u) + return cf.bind(null, root);; + + u = url.parse(u);; + var h = u.host.replace(/:/g, '_');; + // Strip off any /-rev/... or ?rev=... bits + var revre = /(\?rev=|\?.*?&rev=|\/-rev\/).*$/;; + var parts = u.path.replace(revre, '').split('/').slice(1);; + // Make sure different git references get different folders + if (u.hash && u.hash.length > 1) { + parts.push(u.hash.slice(1));; + };; + var p = [root, h].concat(parts.map(function(part) { + return encodeURIComponent(part).replace(/%/g, '_');; + }));; + + return path.join.apply(path, p);; +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/package.json new file mode 100644 index 00000000..220c88f5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/package.json @@ -0,0 +1,57 @@ +{ + "name": "npm-cache-filename", + "version": "1.0.2", + "description": "Given a cache folder and url, return the appropriate cache folder.", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/npm/npm-cache-filename.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/npm-cache-filename/issues" + }, + "homepage": "https://github.com/npm/npm-cache-filename", + "gitHead": "b7eef12919fdf544a3b83bba73093f7268c40c1e", + "_id": "npm-cache-filename@1.0.2", + "_shasum": "ded306c5b0bfc870a9e9faf823bc5f283e05ae11", + "_from": "npm-cache-filename@1.0.2", + "_npmVersion": "2.12.1", + "_nodeVersion": "2.2.2", + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" + }, + "dist": { + "shasum": "ded306c5b0bfc870a9e9faf823bc5f283e05ae11", + "tarball": "http://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "kat", + "email": "kat@lua.cz" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/test.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/test.js new file mode 100644 index 00000000..61f7dd1a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-cache-filename/test.js @@ -0,0 +1,23 @@ +var test = require('tap').test;; +test('it does the thing it says it does', function(t) { + var cf = require('./');; + + t.equal(cf('/tmp/cache', 'https://foo:134/xyz?adf=foo:bar/baz'), + '/tmp/cache/foo_134/xyz_3Fadf_3Dfoo_3Abar/baz');; + + var getFile = cf('/tmp/cache');; + t.equal(getFile('https://foo:134/xyz?adf=foo:bar/baz'), + '/tmp/cache/foo_134/xyz_3Fadf_3Dfoo_3Abar/baz');; + + t.equal(cf("/tmp", "https://foo:134/xyz/-rev/baz"), + '/tmp/foo_134/xyz') + t.equal(cf("/tmp", "https://foo:134/xyz/?rev=baz"), + '/tmp/foo_134/xyz') + t.equal(cf("/tmp", "https://foo:134/xyz/?foo&rev=baz"), + '/tmp/foo_134/xyz') + t.equal(cf("/tmp", "https://foo:134/xyz-rev/baz"), + '/tmp/foo_134/xyz-rev/baz') + t.equal(cf("/tmp", "git://foo:134/xyz-rev/baz.git#master"), + '/tmp/foo_134/xyz-rev/baz.git/master') + t.end(); +});; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/LICENSE new file mode 100644 index 00000000..9f403583 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Robert Kowalski and Isaac Z. Schlueter ("Authors") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/README.md new file mode 100644 index 00000000..3005e725 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/README.md @@ -0,0 +1,25 @@ +# npm-install-checks + +A package that contains checks that npm runs during the installation. + +## API + +### .checkEngine(target, npmVer, nodeVer, force, strict, cb) +Check if node/npm version is supported by the package. + +Error type: `ENOTSUP` + +### .checkPlatform(target, force, cb) +Check if OS/Arch is supported by the package. + +Error type: `EBADPLATFORM` + +### .checkCycle(target, ancestors, cb) +Check for cyclic dependencies. + +Error type: `ECYCLE` + +### .checkGit(folder, cb) +Check if a folder is a .git folder. + +Error type: `EISGIT` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/index.js new file mode 100644 index 00000000..4ca75454 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/index.js @@ -0,0 +1,146 @@ +var fs = require("fs") +var path = require("path") +var log = require("npmlog") +var semver = require("semver") + +exports.checkEngine = checkEngine +function checkEngine (target, npmVer, nodeVer, force, strict, cb) { + var nodev = force ? null : nodeVer + , strict = strict || target.engineStrict + , eng = target.engines + if (!eng) return cb() + if (nodev && eng.node && !semver.satisfies(nodev, eng.node) + || eng.npm && !semver.satisfies(npmVer, eng.npm)) { + + if (strict) { + var er = new Error("Unsupported") + er.code = "ENOTSUP" + er.required = eng + er.pkgid = target._id + return cb(er) + } else { + log.warn( "engine", "%s: wanted: %j (current: %j)" + , target._id, eng, {node: nodev, npm: npmVer} ) + } + } + return cb() +} + +exports.checkPlatform = checkPlatform +function checkPlatform (target, force, cb) { + var platform = process.platform + , arch = process.arch + , osOk = true + , cpuOk = true + + if (force) { + return cb() + } + + if (target.os) { + osOk = checkList(platform, target.os) + } + if (target.cpu) { + cpuOk = checkList(arch, target.cpu) + } + if (!osOk || !cpuOk) { + var er = new Error("Unsupported") + er.code = "EBADPLATFORM" + er.os = target.os || ['any'] + er.cpu = target.cpu || ['any'] + er.pkgid = target._id + return cb(er) + } + return cb() +} + +function checkList (value, list) { + var tmp + , match = false + , blc = 0 + if (typeof list === "string") { + list = [list] + } + if (list.length === 1 && list[0] === "any") { + return true + } + for (var i = 0; i < list.length; ++i) { + tmp = list[i] + if (tmp[0] === '!') { + tmp = tmp.slice(1) + if (tmp === value) { + return false + } + ++blc + } else { + match = match || tmp === value + } + } + return match || blc === list.length +} + +exports.checkCycle = checkCycle +function checkCycle (target, ancestors, cb) { + // there are some very rare and pathological edge-cases where + // a cycle can cause npm to try to install a never-ending tree + // of stuff. + // Simplest: + // + // A -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ... + // + // Solution: Simply flat-out refuse to install any name@version + // that is already in the prototype tree of the ancestors object. + // A more correct, but more complex, solution would be to symlink + // the deeper thing into the new location. + // Will do that if anyone whines about this irl. + // + // Note: `npm install foo` inside of the `foo` package will abort + // earlier if `--force` is not set. However, if it IS set, then + // we need to still fail here, but just skip the first level. Of + // course, it'll still fail eventually if it's a true cycle, and + // leave things in an undefined state, but that's what is to be + // expected when `--force` is used. That is why getPrototypeOf + // is used *twice* here: to skip the first level of repetition. + + var p = Object.getPrototypeOf(Object.getPrototypeOf(ancestors)) + , name = target.name + , version = target.version + while (p && p !== Object.prototype && p[name] !== version) { + p = Object.getPrototypeOf(p) + } + if (p[name] !== version) return cb() + + var er = new Error("Unresolvable cycle detected") + var tree = [target._id, JSON.parse(JSON.stringify(ancestors))] + , t = Object.getPrototypeOf(ancestors) + while (t && t !== Object.prototype) { + if (t === p) t.THIS_IS_P = true + tree.push(JSON.parse(JSON.stringify(t))) + t = Object.getPrototypeOf(t) + } + log.verbose("unresolvable dependency tree", tree) + er.pkgid = target._id + er.code = "ECYCLE" + return cb(er) +} + +exports.checkGit = checkGit +function checkGit (folder, cb) { + // if it's a git repo then don't touch it! + fs.lstat(folder, function (er, s) { + if (er || !s.isDirectory()) return cb() + else checkGit_(folder, cb) + }) +} + +function checkGit_ (folder, cb) { + fs.stat(path.resolve(folder, ".git"), function (er, s) { + if (!er && s.isDirectory()) { + var e = new Error("Appears to be a git repo or submodule.") + e.path = folder + e.code = "EISGIT" + return cb(e) + } + cb() + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/package.json new file mode 100644 index 00000000..2874bbb4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-install-checks/package.json @@ -0,0 +1,77 @@ +{ + "name": "npm-install-checks", + "version": "1.0.7", + "description": "checks that npm runs during the installation of a module", + "main": "index.js", + "dependencies": { + "npmlog": "0.1 || 1 || 2", + "semver": "^2.3.0 || 3.x || 4 || 5" + }, + "devDependencies": { + "mkdirp": "~0.3.5", + "rimraf": "~2.2.5", + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/npm/npm-install-checks.git" + }, + "homepage": "https://github.com/npm/npm-install-checks", + "keywords": [ + "npm,", + "install" + ], + "author": { + "name": "Robert Kowalski", + "email": "rok@kowalski.gd" + }, + "license": "BSD-2-Clause", + "bugs": { + "url": "https://github.com/npm/npm-install-checks/issues" + }, + "gitHead": "4882a47d954ceeec567db87219bbc31f64af191e", + "_id": "npm-install-checks@1.0.7", + "_shasum": "6d91aeda0ac96801f1ed7aadee116a6c0a086a57", + "_from": "npm-install-checks@1.0.7", + "_npmVersion": "2.14.19", + "_nodeVersion": "4.2.4", + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" + }, + "dist": { + "shasum": "6d91aeda0ac96801f1ed7aadee116a6c0a086a57", + "tarball": "http://registry.npmjs.org/npm-install-checks/-/npm-install-checks-1.0.7.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "robertkowalski", + "email": "rok@kowalski.gd" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/npm-install-checks-1.0.7.tgz_1455329001145_0.8577833492308855" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-1.0.7.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/LICENSE new file mode 100644 index 00000000..235bdd54 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/README.md new file mode 100644 index 00000000..de2bf55c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/README.md @@ -0,0 +1,105 @@ +# npm-package-arg + +Parse package name and specifier passed to commands like `npm install` or +`npm cache add`. This just parses the text given-- it's worth noting that +`npm` has further logic it applies by looking at your disk to figure out +what ambiguous specifiers are. If you want that logic, please see +[realize-package-specifier]. + +[realize-package-specifier]: https://www.npmjs.org/package/realize-package-specifier + +Arguments look like: `foo@1.2`, `@bar/foo@1.2`, `foo@user/foo`, `http://x.com/foo.tgz`, +`git+https://github.com/user/foo`, `bitbucket:user/foo`, `foo.tar.gz` or `bar` + +## EXAMPLES + +```javascript +var assert = require("assert") +var npa = require("npm-package-arg") + +// Pass in the descriptor, and it'll return an object +var parsed = npa("@bar/foo@1.2") + +// Returns an object like: +{ + raw: '@bar/foo@1.2', // what was passed in + name: "@bar/foo", // the name of the package + scope: "@bar", // the private scope of the package, or null + type: "range", // the type of specifier this is + spec: ">=1.2.0 <1.3.0" // the expanded specifier + rawSpec: "1.2" // the specifier as passed in + } + +// Parsing urls pointing at hosted git services produces a variation: +var parsed = npa("git+https://github.com/user/foo") + +// Returns an object like: +{ + raw: 'git+https://github.com/user/foo', + scope: null, + name: null, + rawSpec: 'git+https://github.com/user/foo', + spec: 'user/foo', + type: 'hosted', + hosted: { + type: 'github', + ssh: 'git@github.com:user/foo.git', + sshurl: 'git+ssh://git@github.com/user/foo.git', + https: 'https://github.com/user/foo.git', + directUrl: 'https://raw.githubusercontent.com/user/foo/master/package.json' + } +} + +// Completely unreasonable invalid garbage throws an error +// Make sure you wrap this in a try/catch if you have not +// already sanitized the inputs! +assert.throws(function() { + npa("this is not \0 a valid package name or url") +}) +``` + +## USING + +`var npa = require('npm-package-arg')` + +* var result = npa(*arg*) + +Parses *arg* and returns a result object detailing what *arg* is. + +*arg* -- a package descriptor, like: `foo@1.2`, or `foo@user/foo`, or +`http://x.com/foo.tgz`, or `git+https://github.com/user/foo` + +## RESULT OBJECT + +The objects that are returned by npm-package-arg contain the following +keys: + +* `name` - If known, the `name` field expected in the resulting pkg. +* `type` - One of the following strings: + * `git` - A git repo + * `hosted` - A hosted project, from github, bitbucket or gitlab. Originally + either a full url pointing at one of these services or a shorthand like + `user/project` or `github:user/project` for github or `bitbucket:user/project` + for bitbucket. + * `tag` - A tagged version, like `"foo@latest"` + * `version` - A specific version number, like `"foo@1.2.3"` + * `range` - A version range, like `"foo@2.x"` + * `local` - A local file or folder path + * `remote` - An http url (presumably to a tgz) +* `spec` - The "thing". URL, the range, git repo, etc. +* `hosted` - If type=hosted this will be an object with the following keys: + * `type` - github, bitbucket or gitlab + * `ssh` - The ssh path for this git repo + * `sshUrl` - The ssh URL for this git repo + * `httpsUrl` - The HTTPS URL for this git repo + * `directUrl` - The URL for the package.json in this git repo +* `raw` - The original un-modified string that was provided. +* `rawSpec` - The part after the `name@...`, as it was originally + provided. +* `scope` - If a name is something like `@org/module` then the `scope` + field will be set to `org`. If it doesn't have a scoped name, then + scope is `null`. + +If you only include a name and no specifier part, eg, `foo` or `foo@` then +a default of `latest` will be used (as of 4.1.0). This is contrast with +previous behavior where `*` was used. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/npa.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/npa.js new file mode 100644 index 00000000..11a49b59 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/npa.js @@ -0,0 +1,184 @@ +var url = require("url") +var assert = require("assert") +var util = require("util") +var semver = require("semver") +var path = require("path") +var HostedGit = require("hosted-git-info") + +module.exports = npa + +var isWindows = process.platform === "win32" || global.FAKE_WINDOWS +var slashRe = isWindows ? /\\|[/]/ : /[/]/ + +var parseName = /^(?:@([^/]+?)[/])?([^/]+?)$/ +var nameAt = /^(@([^/]+?)[/])?([^/]+?)@/ +var debug = util.debuglog ? util.debuglog("npa") + : /\bnpa\b/i.test(process.env.NODE_DEBUG || "") + ? function () { + console.error("NPA: " + util.format.apply(util, arguments).split("\n").join("\nNPA: ")) + } : function () {} + +function validName (name) { + if (!name) { + debug("not a name %j", name) + return false + } + var n = name.trim() + if (!n || n.charAt(0) === "." + || !n.match(/^[a-zA-Z0-9]/) + || n.match(/[/()&?#|<>@:%\s\\*'"!~`]/) + || n.toLowerCase() === "node_modules" + || n !== encodeURIComponent(n) + || n.toLowerCase() === "favicon.ico") { + debug("not a valid name %j", name) + return false + } + return n +} + +function npa (arg) { + assert.equal(typeof arg, "string") + arg = arg.trim() + + var res = new Result + res.raw = arg + res.scope = null + + // See if it's something like foo@... + var nameparse = arg.match(nameAt) + debug("nameparse", nameparse) + if (nameparse && validName(nameparse[3]) && + (!nameparse[2] || validName(nameparse[2]))) { + res.name = (nameparse[1] || "") + nameparse[3] + if (nameparse[2]) + res.scope = "@" + nameparse[2] + arg = arg.substr(nameparse[0].length) + } else { + res.name = null + } + + res.rawSpec = arg + res.spec = arg + + var urlparse = url.parse(arg) + debug("urlparse", urlparse) + + // windows paths look like urls + // don't be fooled! + if (isWindows && urlparse && urlparse.protocol && + urlparse.protocol.match(/^[a-zA-Z]:$/)) { + debug("windows url-ish local path", urlparse) + urlparse = {} + } + + if (urlparse.protocol || HostedGit.fromUrl(arg)) { + return parseUrl(res, arg, urlparse) + } + + // at this point, it's not a url, and not hosted + // If it's a valid name, and doesn't already have a name, then assume + // $name@"" range + // + // if it's got / chars in it, then assume that it's local. + + if (res.name) { + if (arg == '') arg = 'latest' + var version = semver.valid(arg, true) + var range = semver.validRange(arg, true) + // foo@... + if (version) { + res.spec = version + res.type = "version" + } else if (range) { + res.spec = range + res.type = "range" + } else if (slashRe.test(arg)) { + parseLocal(res, arg) + } else { + res.type = "tag" + res.spec = arg + } + } else { + var p = arg.match(parseName) + if (p && validName(p[2]) && + (!p[1] || validName(p[1]))) { + res.type = "tag" + res.spec = "latest" + res.rawSpec = "" + res.name = arg + if (p[1]) + res.scope = "@" + p[1] + } else { + parseLocal(res, arg) + } + } + + return res +} + +function parseLocal (res, arg) { + // turns out nearly every character is allowed in fs paths + if (/\0/.test(arg)) { + throw new Error("Invalid Path: " + JSON.stringify(arg)) + } + res.type = "local" + res.spec = path.resolve(arg) +} + +function parseUrl (res, arg, urlparse) { + var gitHost = HostedGit.fromUrl(arg) + if (gitHost) { + res.type = "hosted" + res.spec = gitHost.toString(), + res.hosted = { + type: gitHost.type, + ssh: gitHost.ssh(), + sshUrl: gitHost.sshurl(), + httpsUrl: gitHost.https(), + gitUrl: gitHost.git(), + shortcut: gitHost.shortcut(), + directUrl: gitHost.file("package.json") + } + return res + } + // check the protocol, and then see if it's git or not + switch (urlparse.protocol) { + case "git:": + case "git+http:": + case "git+https:": + case "git+rsync:": + case "git+ftp:": + case "git+ssh:": + case "git+file:": + res.type = "git" + res.spec = arg.replace(/^git[+]/, "") + break + + case "http:": + case "https:": + res.type = "remote" + res.spec = arg + break + + case "file:": + res.type = "local" + res.spec = urlparse.pathname + break + + default: + throw new Error("Unsupported URL Type: " + arg) + break + } + + return res +} + + +function Result () { + if (!(this instanceof Result)) return new Result +} +Result.prototype.name = null +Result.prototype.type = null +Result.prototype.spec = null +Result.prototype.raw = null +Result.prototype.hosted = null diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/package.json new file mode 100644 index 00000000..d7927862 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-package-arg/package.json @@ -0,0 +1,62 @@ +{ + "name": "npm-package-arg", + "version": "4.1.0", + "description": "Parse the things that can be arguments to `npm install`", + "main": "npa.js", + "directories": { + "test": "test" + }, + "dependencies": { + "hosted-git-info": "^2.1.4", + "semver": "4 || 5" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/npm-package-arg.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/npm-package-arg/issues" + }, + "homepage": "https://github.com/npm/npm-package-arg", + "gitHead": "383b4783a076b825815be51eb1ab2e4bb8a1e1fc", + "_id": "npm-package-arg@4.1.0", + "_shasum": "2e015f8ac00737cb97f997c9cbf059f42a74527d", + "_from": "npm-package-arg@>=4.1.0 <4.2.0", + "_npmVersion": "3.4.0", + "_nodeVersion": "4.2.1", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "2e015f8ac00737cb97f997c9cbf059f42a74527d", + "tarball": "http://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.1.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.1.0.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/.npmignore new file mode 100644 index 00000000..6b0dc89c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/.npmignore @@ -0,0 +1,5 @@ +test/fixtures/cache +node_modules +npm-debug.log +.eslintrc +.jshintrc diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/.travis.yml new file mode 100644 index 00000000..bcaaa277 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +node_js: + - "0.12" + - "0.10" + - "0.8" + - iojs +script: "npm test" +sudo: false +before_install: + - "npm install -g npm@latest" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/README.md new file mode 100644 index 00000000..0bebe4bd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/README.md @@ -0,0 +1,318 @@ +# npm-registry-client + +The code that npm uses to talk to the registry. + +It handles all the caching and HTTP calls. + +## Usage + +```javascript +var RegClient = require('npm-registry-client') +var client = new RegClient(config) +var uri = "https://registry.npmjs.org/npm" +var params = {timeout: 1000} + +client.get(uri, params, function (error, data, raw, res) { + // error is an error if there was a problem. + // data is the parsed data object + // raw is the json string + // res is the response from couch +}) +``` + +# Registry URLs + +The registry calls take either a full URL pointing to a resource in the +registry, or a base URL for the registry as a whole (including the registry +path – but be sure to terminate the path with `/`). `http` and `https` URLs are +the only ones supported. + +## Using the client + +Every call to the client follows the same pattern: + +* `uri` {String} The *fully-qualified* URI of the registry API method being + invoked. +* `params` {Object} Per-request parameters. +* `callback` {Function} Callback to be invoked when the call is complete. + +### Credentials + +Many requests to the registry can by authenticated, and require credentials +for authorization. These credentials always look the same: + +* `username` {String} +* `password` {String} +* `email` {String} +* `alwaysAuth` {Boolean} Whether calls to the target registry are always + authed. + +**or** + +* `token` {String} +* `alwaysAuth` {Boolean} Whether calls to the target registry are always + authed. + +## API + +### client.access(uri, params, cb) + +* `uri` {String} Registry URL for the package's access API endpoint. + Looks like `/-/package//access`. +* `params` {Object} Object containing per-request properties. + * `access` {String} New access level for the package. Can be either + `public` or `restricted`. Registry will raise an error if trying + to change the access level of an unscoped package. + * `auth` {Credentials} + +Set the access level for scoped packages. For now, there are only two +access levels: "public" and "restricted". + +### client.adduser(uri, params, cb) + +* `uri` {String} Base registry URL. +* `params` {Object} Object containing per-request properties. + * `auth` {Credentials} +* `cb` {Function} + * `error` {Error | null} + * `data` {Object} the parsed data object + * `raw` {String} the json + * `res` {Response Object} response from couch + +Add a user account to the registry, or verify the credentials. + +### client.deprecate(uri, params, cb) + +* `uri` {String} Full registry URI for the deprecated package. +* `params` {Object} Object containing per-request properties. + * `version` {String} Semver version range. + * `message` {String} The message to use as a deprecation warning. + * `auth` {Credentials} +* `cb` {Function} + +Deprecate a version of a package in the registry. + +### client.distTags.fetch(uri, params, cb) + +* `uri` {String} Base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `package` {String} Name of the package. + * `auth` {Credentials} +* `cb` {Function} + +Fetch all of the `dist-tags` for the named package. + +### client.distTags.add(uri, params, cb) + +* `uri` {String} Base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `package` {String} Name of the package. + * `distTag` {String} Name of the new `dist-tag`. + * `version` {String} Exact version to be mapped to the `dist-tag`. + * `auth` {Credentials} +* `cb` {Function} + +Add (or replace) a single dist-tag onto the named package. + +### client.distTags.set(uri, params, cb) + +* `uri` {String} Base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `package` {String} Name of the package. + * `distTags` {Object} Object containing a map from tag names to package + versions. + * `auth` {Credentials} +* `cb` {Function} + +Set all of the `dist-tags` for the named package at once, creating any +`dist-tags` that do not already exit. Any `dist-tags` not included in the +`distTags` map will be removed. + +### client.distTags.update(uri, params, cb) + +* `uri` {String} Base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `package` {String} Name of the package. + * `distTags` {Object} Object containing a map from tag names to package + versions. + * `auth` {Credentials} +* `cb` {Function} + +Update the values of multiple `dist-tags`, creating any `dist-tags` that do +not already exist. Any pre-existing `dist-tags` not included in the `distTags` +map will be left alone. + +### client.distTags.rm(uri, params, cb) + +* `uri` {String} Base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `package` {String} Name of the package. + * `distTag` {String} Name of the new `dist-tag`. + * `auth` {Credentials} +* `cb` {Function} + +Remove a single `dist-tag` from the named package. + +### client.get(uri, params, cb) + +* `uri` {String} The complete registry URI to fetch +* `params` {Object} Object containing per-request properties. + * `timeout` {Number} Duration before the request times out. Optional + (default: never). + * `follow` {Boolean} Follow 302/301 responses. Optional (default: true). + * `staleOk` {Boolean} If there's cached data available, then return that to + the callback quickly, and update the cache the background. Optional + (default: false). + * `auth` {Credentials} Optional. +* `cb` {Function} + +Fetches data from the registry via a GET request, saving it in the cache folder +with the ETag or the "Last Modified" timestamp. + +### client.publish(uri, params, cb) + +* `uri` {String} The registry URI for the package to publish. +* `params` {Object} Object containing per-request properties. + * `metadata` {Object} Package metadata. + * `access` {String} Access for the package. Can be `public` or `restricted` (no default). + * `body` {Stream} Stream of the package body / tarball. + * `auth` {Credentials} +* `cb` {Function} + +Publish a package to the registry. + +Note that this does not create the tarball from a folder. + +### client.star(uri, params, cb) + +* `uri` {String} The complete registry URI for the package to star. +* `params` {Object} Object containing per-request properties. + * `starred` {Boolean} True to star the package, false to unstar it. Optional + (default: false). + * `auth` {Credentials} +* `cb` {Function} + +Star or unstar a package. + +Note that the user does not have to be the package owner to star or unstar a +package, though other writes do require that the user be the package owner. + +### client.stars(uri, params, cb) + +* `uri` {String} The base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `username` {String} Name of user to fetch starred packages for. Optional + (default: user in `auth`). + * `auth` {Credentials} Optional (required if `username` is omitted). +* `cb` {Function} + +View your own or another user's starred packages. + +### client.tag(uri, params, cb) + +* `uri` {String} The complete registry URI to tag +* `params` {Object} Object containing per-request properties. + * `version` {String} Version to tag. + * `tag` {String} Tag name to apply. + * `auth` {Credentials} +* `cb` {Function} + +Mark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the +specified version. + +### client.unpublish(uri, params, cb) + +* `uri` {String} The complete registry URI of the package to unpublish. +* `params` {Object} Object containing per-request properties. + * `version` {String} version to unpublish. Optional – omit to unpublish all + versions. + * `auth` {Credentials} +* `cb` {Function} + +Remove a version of a package (or all versions) from the registry. When the +last version us unpublished, the entire document is removed from the database. + +### client.whoami(uri, params, cb) + +* `uri` {String} The base registry for the URI. +* `params` {Object} Object containing per-request properties. + * `auth` {Credentials} +* `cb` {Function} + +Simple call to see who the registry thinks you are. Especially useful with +token-based auth. + + +## PLUMBING + +The below are primarily intended for use by the rest of the API, or by the npm +caching logic directly. + +### client.request(uri, params, cb) + +* `uri` {String} URI pointing to the resource to request. +* `params` {Object} Object containing per-request properties. + * `method` {String} HTTP method. Optional (default: "GET"). + * `body` {Stream | Buffer | String | Object} The request body. Objects + that are not Buffers or Streams are encoded as JSON. Optional – body + only used for write operations. + * `etag` {String} The cached ETag. Optional. + * `lastModified` {String} The cached Last-Modified timestamp. Optional. + * `follow` {Boolean} Follow 302/301 responses. Optional (default: true). + * `auth` {Credentials} Optional. +* `cb` {Function} + * `error` {Error | null} + * `data` {Object} the parsed data object + * `raw` {String} the json + * `res` {Response Object} response from couch + +Make a generic request to the registry. All the other methods are wrappers +around `client.request`. + +### client.fetch(uri, params, cb) + +* `uri` {String} The complete registry URI to upload to +* `params` {Object} Object containing per-request properties. + * `headers` {Stream} HTTP headers to be included with the request. Optional. + * `auth` {Credentials} Optional. +* `cb` {Function} + +Fetch a package from a URL, with auth set appropriately if included. Used to +cache remote tarballs as well as request package tarballs from the registry. + +# Configuration + +The client uses its own configuration, which is just passed in as a simple +nested object. The following are the supported values (with their defaults, if +any): + +* `proxy.http` {URL} The URL to proxy HTTP requests through. +* `proxy.https` {URL} The URL to proxy HTTPS requests through. Defaults to be + the same as `proxy.http` if unset. +* `proxy.localAddress` {IP} The local address to use on multi-homed systems. +* `ssl.ca` {String} Certificate signing authority certificates to trust. +* `ssl.certificate` {String} Client certificate (PEM encoded). Enable access + to servers that require client certificates. +* `ssl.key` {String} Private key (PEM encoded) for client certificate. +* `ssl.strict` {Boolean} Whether or not to be strict with SSL certificates. + Default = `true` +* `retry.count` {Number} Number of times to retry on GET failures. Default = 2. +* `retry.factor` {Number} `factor` setting for `node-retry`. Default = 10. +* `retry.minTimeout` {Number} `minTimeout` setting for `node-retry`. + Default = 10000 (10 seconds) +* `retry.maxTimeout` {Number} `maxTimeout` setting for `node-retry`. + Default = 60000 (60 seconds) +* `userAgent` {String} User agent header to send. Default = + `"node/{process.version}"` +* `log` {Object} The logger to use. Defaults to `require("npmlog")` if + that works, otherwise logs are disabled. +* `defaultTag` {String} The default tag to use when publishing new packages. + Default = `"latest"` +* `couchToken` {Object} A token for use with + [couch-login](https://npmjs.org/package/couch-login). +* `sessionToken` {String} A random identifier for this set of client requests. + Default = 8 random hexadecimal bytes. +* `maxSockets` {Number} The maximum number of connections that will be open per + origin (unique combination of protocol:host:port). Passed to the + [httpAgent](https://nodejs.org/api/http.html#http_agent_maxsockets). + Default = 50 diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/index.js new file mode 100644 index 00000000..199c0766 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/index.js @@ -0,0 +1,79 @@ +// utilities for working with the js-registry site. + +module.exports = RegClient + +var join = require('path').join +var fs = require('graceful-fs') + +var npmlog +try { + npmlog = require('npmlog') +} catch (er) { + npmlog = { + error: noop, + warn: noop, + info: noop, + verbose: noop, + silly: noop, + http: noop, + pause: noop, + resume: noop + } +} + +function noop () {} + +function RegClient (config) { + this.config = Object.create(config || {}) + + this.config.proxy = this.config.proxy || {} + if (!this.config.proxy.https && this.config.proxy.http) { + this.config.proxy.https = this.config.proxy.http + } + + this.config.ssl = this.config.ssl || {} + if (this.config.ssl.strict === undefined) this.config.ssl.strict = true + + this.config.retry = this.config.retry || {} + if (typeof this.config.retry.retries !== 'number') this.config.retry.retries = 2 + if (typeof this.config.retry.factor !== 'number') this.config.retry.factor = 10 + if (typeof this.config.retry.minTimeout !== 'number') this.config.retry.minTimeout = 10000 + if (typeof this.config.retry.maxTimeout !== 'number') this.config.retry.maxTimeout = 60000 + if (typeof this.config.maxSockets !== 'number') this.config.maxSockets = 50 + + this.config.userAgent = this.config.userAgent || 'node/' + process.version + this.config.defaultTag = this.config.defaultTag || 'latest' + + this.log = this.config.log || npmlog + delete this.config.log + + var client = this + fs.readdirSync(join(__dirname, 'lib')).forEach(function (f) { + var entry = join(__dirname, 'lib', f) + + // lib/group-name/operation.js -> client.groupName.operation + var stat = fs.statSync(entry) + if (stat.isDirectory()) { + var groupName = f.replace(/-([a-z])/, dashToCamel) + fs.readdirSync(entry).forEach(function (f) { + if (!f.match(/\.js$/)) return + + if (!client[groupName]) { + // keep client.groupName.operation from stomping client.operation + client[groupName] = Object.create(client) + } + var name = f.replace(/\.js$/, '').replace(/-([a-z])/, dashToCamel) + client[groupName][name] = require(join(entry, f)) + }) + return + } + + if (!f.match(/\.js$/)) return + var name = f.replace(/\.js$/, '').replace(/-([a-z])/, dashToCamel) + client[name] = require(entry) + }) +} + +function dashToCamel (_, l) { + return l.toUpperCase() +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/package.json new file mode 100644 index 00000000..b4fbdffb --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-registry-client/package.json @@ -0,0 +1,85 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "npm-registry-client", + "description": "Client for the npm registry", + "version": "7.1.0", + "repository": { + "url": "git+https://github.com/npm/npm-registry-client.git" + }, + "main": "index.js", + "scripts": { + "test": "standard && tap test/*.js" + }, + "dependencies": { + "chownr": "^1.0.1", + "concat-stream": "^1.4.6", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "normalize-package-data": "~1.0.1 || ^2.0.0", + "npm-package-arg": "^3.0.0 || ^4.0.0", + "once": "^1.3.0", + "request": "^2.47.0", + "retry": "^0.8.0", + "rimraf": "2", + "semver": "2 >=2.2.1 || 3.x || 4 || 5", + "slide": "^1.1.3", + "npmlog": "~2.0.0" + }, + "devDependencies": { + "negotiator": "^0.4.9", + "nock": "^0.56.0", + "readable-stream": "^2.0.2", + "standard": "^4.0.0", + "tap": "^1.2.0" + }, + "optionalDependencies": { + "npmlog": "~2.0.0" + }, + "license": "ISC", + "gitHead": "d077cb652152a8c265369d9d169cba8a52239fb4", + "bugs": { + "url": "https://github.com/npm/npm-registry-client/issues" + }, + "homepage": "https://github.com/npm/npm-registry-client#readme", + "_id": "npm-registry-client@7.1.0", + "_shasum": "e3be14ab279fe5123e15ab5c8a650445415664a5", + "_from": "npm-registry-client@7.1.0", + "_npmVersion": "3.7.5", + "_nodeVersion": "5.4.0", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "e3be14ab279fe5123e15ab5c8a650445415664a5", + "tarball": "http://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "_npmOperationalInternal": { + "host": "packages-5-east.internal.npmjs.com", + "tmp": "tmp/npm-registry-client-7.1.0.tgz_1456435497334_0.35472381697036326" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.0.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/.npmignore new file mode 100644 index 00000000..849e0ca4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/.travis.yml new file mode 100644 index 00000000..1d8a1a65 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/LICENSE new file mode 100644 index 00000000..a8b7a939 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Robert Kowalski +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/README.md new file mode 100644 index 00000000..e0a22c6a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/README.md @@ -0,0 +1,6 @@ +[![Build Status](https://travis-ci.org/npm/npm-user-validate.png?branch=master)](https://travis-ci.org/npm/npm-user-validate) +[![devDependency Status](https://david-dm.org/npm/npm-user-validate/dev-status.png)](https://david-dm.org/npm/npm-user-validate#info=devDependencies) + +# npm-user-validate + +Validation for the npm client and npm-www (and probably other npm projects) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/npm-user-validate.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/npm-user-validate.js new file mode 100644 index 00000000..51eaa6fa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/npm-user-validate.js @@ -0,0 +1,43 @@ +exports.email = email +exports.pw = pw +exports.username = username + +var requirements = exports.requirements = { + username: { + lowerCase: 'Username must be lowercase', + urlSafe: 'Username may not contain non-url-safe chars', + dot: 'Username may not start with "."' + }, + password: {}, + email: { + valid: 'Email must be an email address' + } +}; + +function username (un) { + if (un !== un.toLowerCase()) { + return new Error(requirements.username.lowerCase) + } + + if (un !== encodeURIComponent(un)) { + return new Error(requirements.username.urlSafe) + } + + if (un.charAt(0) === '.') { + return new Error(requirements.username.dot) + } + + return null +} + +function email (em) { + if (!em.match(/^.+@.+\..+$/)) { + return new Error(requirements.email.valid) + } + + return null +} + +function pw (pw) { + return null +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/package.json new file mode 100644 index 00000000..7a33cc2e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npm-user-validate/package.json @@ -0,0 +1,56 @@ +{ + "name": "npm-user-validate", + "version": "0.1.2", + "description": "User validations for npm", + "main": "npm-user-validate.js", + "devDependencies": { + "tap": "0.4.3" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/npm/npm-user-validate.git" + }, + "keywords": [ + "npm", + "validation", + "registry" + ], + "author": { + "name": "Robert Kowalski", + "email": "rok@kowalski.gd" + }, + "license": "BSD-2-Clause", + "gitHead": "e5b280babff5b73fe74b496461bcf424a51881e1", + "bugs": { + "url": "https://github.com/npm/npm-user-validate/issues" + }, + "homepage": "https://github.com/npm/npm-user-validate#readme", + "_id": "npm-user-validate@0.1.2", + "_shasum": "d585da0b47c9f41a9e6ca684b6fd84ba41ebe87d", + "_from": "npm-user-validate@>=0.1.1 <0.2.0", + "_npmVersion": "2.10.0", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "d585da0b47c9f41a9e6ca684b6fd84ba41ebe87d", + "tarball": "http://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.2.tgz" + }, + "maintainers": [ + { + "name": "robertkowalski", + "email": "rok@kowalski.gd" + }, + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.2.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/.travis.yml new file mode 100644 index 00000000..826f576f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/.travis.yml @@ -0,0 +1,14 @@ +language: node_js +sudo: false +node_js: + - "5" + - "4" + - iojs + - "0.12" + - "0.10" + - "0.8" +before_install: + - "npm install -g npm" +script: "npm test" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/README.md new file mode 100644 index 00000000..34dae50f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/README.md @@ -0,0 +1,195 @@ +# npmlog + +The logger util that npm uses. + +This logger is very basic. It does the logging for npm. It supports +custom levels and colored output. + +By default, logs are written to stderr. If you want to send log messages +to outputs other than streams, then you can change the `log.stream` +member, or you can just listen to the events that it emits, and do +whatever you want with them. + +# Basic Usage + +``` +var log = require('npmlog') + +// additional stuff ---------------------------+ +// message ----------+ | +// prefix ----+ | | +// level -+ | | | +// v v v v + log.info('fyi', 'I have a kitty cat: %j', myKittyCat) +``` + +## log.level + +* {String} + +The level to display logs at. Any logs at or above this level will be +displayed. The special level `silent` will prevent anything from being +displayed ever. + +## log.record + +* {Array} + +An array of all the log messages that have been entered. + +## log.maxRecordSize + +* {Number} + +The maximum number of records to keep. If log.record gets bigger than +10% over this value, then it is sliced down to 90% of this value. + +The reason for the 10% window is so that it doesn't have to resize a +large array on every log entry. + +## log.prefixStyle + +* {Object} + +A style object that specifies how prefixes are styled. (See below) + +## log.headingStyle + +* {Object} + +A style object that specifies how the heading is styled. (See below) + +## log.heading + +* {String} Default: "" + +If set, a heading that is printed at the start of every line. + +## log.stream + +* {Stream} Default: `process.stderr` + +The stream where output is written. + +## log.enableColor() + +Force colors to be used on all messages, regardless of the output +stream. + +## log.disableColor() + +Disable colors on all messages. + +## log.enableProgress() + +Enable the display of log activity spinner and progress bar + +## log.disableProgress() + +Disable the display of a progress bar + +## log.enableUnicode() + +Force the unicode theme to be used for the progress bar. + +## log.disableUnicode() + +Disable the use of unicode in the progress bar. + +## log.setGaugeTemplate(template) + +Overrides the default gauge template. + +## log.pause() + +Stop emitting messages to the stream, but do not drop them. + +## log.resume() + +Emit all buffered messages that were written while paused. + +## log.log(level, prefix, message, ...) + +* `level` {String} The level to emit the message at +* `prefix` {String} A string prefix. Set to "" to skip. +* `message...` Arguments to `util.format` + +Emit a log message at the specified level. + +## log\[level](prefix, message, ...) + +For example, + +* log.silly(prefix, message, ...) +* log.verbose(prefix, message, ...) +* log.info(prefix, message, ...) +* log.http(prefix, message, ...) +* log.warn(prefix, message, ...) +* log.error(prefix, message, ...) + +Like `log.log(level, prefix, message, ...)`. In this way, each level is +given a shorthand, so you can do `log.info(prefix, message)`. + +## log.addLevel(level, n, style, disp) + +* `level` {String} Level indicator +* `n` {Number} The numeric level +* `style` {Object} Object with fg, bg, inverse, etc. +* `disp` {String} Optional replacement for `level` in the output. + +Sets up a new level with a shorthand function and so forth. + +Note that if the number is `Infinity`, then setting the level to that +will cause all log messages to be suppressed. If the number is +`-Infinity`, then the only way to show it is to enable all log messages. + +## log.newItem(name, todo, weight) + +* `name` {String} Optional; progress item name. +* `todo` {Number} Optional; total amount of work to be done. Default 0. +* `weight` {Number} Optional; the weight of this item relative to others. Default 1. + +This adds a new `are-we-there-yet` item tracker to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `Tracker` object. + +## log.newStream(name, todo, weight) + +This adds a new `are-we-there-yet` stream tracker to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `TrackerStream` object. + +## log.newGroup(name, weight) + +This adds a new `are-we-there-yet` tracker group to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `TrackerGroup` object. + +# Events + +Events are all emitted with the message object. + +* `log` Emitted for all messages +* `log.` Emitted for all messages with the `` level. +* `` Messages with prefixes also emit their prefix as an event. + +# Style Objects + +Style objects can have the following fields: + +* `fg` {String} Color for the foreground text +* `bg` {String} Color for the background +* `bold`, `inverse`, `underline` {Boolean} Set the associated property +* `bell` {Boolean} Make a noise (This is pretty annoying, probably.) + +# Message Objects + +Every log event is emitted with a message object, and the `log.record` +list contains all of them that have been created. They have the +following fields: + +* `id` {Number} +* `level` {String} +* `prefix` {String} +* `message` {String} Result of `util.format()` +* `messageRaw` {Array} Arguments to `util.format()` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/example.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/example.js new file mode 100644 index 00000000..5e89f53c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/example.js @@ -0,0 +1,39 @@ +var log = require('./log.js') + +log.heading = 'npm' + +console.error('log.level=silly') +log.level = 'silly' +log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) +log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) +log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) +log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) +log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) +log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) +log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) + +console.error('log.level=silent') +log.level = 'silent' +log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) +log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) +log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) +log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) +log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) +log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) +log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) + +console.error('log.level=info') +log.level = 'info' +log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) +log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) +log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) +log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) +log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) +log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) +log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) +log.error('404', 'This is a longer\n'+ + 'message, with some details\n'+ + 'and maybe a stack.\n'+ + new Error('a 404 error').stack) +log.addLevel('noise', 10000, {beep: true}) +log.noise(false, 'LOUD NOISES') diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/log.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/log.js new file mode 100644 index 00000000..6745238c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/log.js @@ -0,0 +1,250 @@ +'use strict' +var Progress = require('are-we-there-yet') +var Gauge = require('gauge') +var EE = require('events').EventEmitter +var log = exports = module.exports = new EE +var util = require('util') + +var ansi = require('ansi') +log.cursor = ansi(process.stderr) +log.stream = process.stderr + +// by default, let ansi decide based on tty-ness. +var colorEnabled = undefined +log.enableColor = function () { + colorEnabled = true + this.cursor.enabled = true +} +log.disableColor = function () { + colorEnabled = false + this.cursor.enabled = false +} + +// default level +log.level = 'info' + +log.gauge = new Gauge(log.cursor) +log.tracker = new Progress.TrackerGroup() + +// no progress bars unless asked +log.progressEnabled = false + +var gaugeTheme = undefined + +log.enableUnicode = function () { + gaugeTheme = Gauge.unicode + log.gauge.setTheme(gaugeTheme) +} + +log.disableUnicode = function () { + gaugeTheme = Gauge.ascii + log.gauge.setTheme(gaugeTheme) +} + +var gaugeTemplate = undefined +log.setGaugeTemplate = function (template) { + gaugeTemplate = template + log.gauge.setTemplate(gaugeTemplate) +} + +log.enableProgress = function () { + if (this.progressEnabled) return + this.progressEnabled = true + if (this._pause) return + this.tracker.on('change', this.showProgress) + this.gauge.enable() + this.showProgress() +} + +log.disableProgress = function () { + if (!this.progressEnabled) return + this.clearProgress() + this.progressEnabled = false + this.tracker.removeListener('change', this.showProgress) + this.gauge.disable() +} + +var trackerConstructors = ['newGroup', 'newItem', 'newStream'] + +var mixinLog = function (tracker) { + // mixin the public methods from log into the tracker + // (except: conflicts and one's we handle specially) + Object.keys(log).forEach(function (P) { + if (P[0] === '_') return + if (trackerConstructors.filter(function (C) { return C === P }).length) return + if (tracker[P]) return + if (typeof log[P] !== 'function') return + var func = log[P] + tracker[P] = function () { + return func.apply(log, arguments) + } + }) + // if the new tracker is a group, make sure any subtrackers get + // mixed in too + if (tracker instanceof Progress.TrackerGroup) { + trackerConstructors.forEach(function (C) { + var func = tracker[C] + tracker[C] = function () { return mixinLog(func.apply(tracker, arguments)) } + }) + } + return tracker +} + +// Add tracker constructors to the top level log object +trackerConstructors.forEach(function (C) { + log[C] = function () { return mixinLog(this.tracker[C].apply(this.tracker, arguments)) } +}) + +log.clearProgress = function () { + if (!this.progressEnabled) return + this.gauge.hide() +} + +log.showProgress = function (name) { + if (!this.progressEnabled) return + this.gauge.show(name, this.tracker.completed()) +}.bind(log) // bind for use in tracker's on-change listener + +// temporarily stop emitting, but don't drop +log.pause = function () { + this._paused = true +} + +log.resume = function () { + if (!this._paused) return + this._paused = false + + var b = this._buffer + this._buffer = [] + b.forEach(function (m) { + this.emitLog(m) + }, this) + if (this.progressEnabled) this.enableProgress() +} + +log._buffer = [] + +var id = 0 +log.record = [] +log.maxRecordSize = 10000 +log.log = function (lvl, prefix, message) { + var l = this.levels[lvl] + if (l === undefined) { + return this.emit('error', new Error(util.format( + 'Undefined log level: %j', lvl))) + } + + var a = new Array(arguments.length - 2) + var stack = null + for (var i = 2; i < arguments.length; i ++) { + var arg = a[i-2] = arguments[i] + + // resolve stack traces to a plain string. + if (typeof arg === 'object' && arg && + (arg instanceof Error) && arg.stack) { + arg.stack = stack = arg.stack + '' + } + } + if (stack) a.unshift(stack + '\n') + message = util.format.apply(util, a) + + var m = { id: id++, + level: lvl, + prefix: String(prefix || ''), + message: message, + messageRaw: a } + + this.emit('log', m) + this.emit('log.' + lvl, m) + if (m.prefix) this.emit(m.prefix, m) + + this.record.push(m) + var mrs = this.maxRecordSize + var n = this.record.length - mrs + if (n > mrs / 10) { + var newSize = Math.floor(mrs * 0.9) + this.record = this.record.slice(-1 * newSize) + } + + this.emitLog(m) +}.bind(log) + +log.emitLog = function (m) { + if (this._paused) { + this._buffer.push(m) + return + } + if (this.progressEnabled) this.gauge.pulse(m.prefix) + var l = this.levels[m.level] + if (l === undefined) return + if (l < this.levels[this.level]) return + if (l > 0 && !isFinite(l)) return + + var style = log.style[m.level] + var disp = log.disp[m.level] || m.level + this.clearProgress() + m.message.split(/\r?\n/).forEach(function (line) { + if (this.heading) { + this.write(this.heading, this.headingStyle) + this.write(' ') + } + this.write(disp, log.style[m.level]) + var p = m.prefix || '' + if (p) this.write(' ') + this.write(p, this.prefixStyle) + this.write(' ' + line + '\n') + }, this) + this.showProgress() +} + +log.write = function (msg, style) { + if (!this.cursor) return + if (this.stream !== this.cursor.stream) { + this.cursor = ansi(this.stream, { enabled: colorEnabled }) + var options = {} + if (gaugeTheme != null) options.theme = gaugeTheme + if (gaugeTemplate != null) options.template = gaugeTemplate + this.gauge = new Gauge(options, this.cursor) + } + + style = style || {} + if (style.fg) this.cursor.fg[style.fg]() + if (style.bg) this.cursor.bg[style.bg]() + if (style.bold) this.cursor.bold() + if (style.underline) this.cursor.underline() + if (style.inverse) this.cursor.inverse() + if (style.beep) this.cursor.beep() + this.cursor.write(msg).reset() +} + +log.addLevel = function (lvl, n, style, disp) { + if (!disp) disp = lvl + this.levels[lvl] = n + this.style[lvl] = style + if (!this[lvl]) this[lvl] = function () { + var a = new Array(arguments.length + 1) + a[0] = lvl + for (var i = 0; i < arguments.length; i ++) { + a[i + 1] = arguments[i] + } + return this.log.apply(this, a) + }.bind(this) + this.disp[lvl] = disp +} + +log.prefixStyle = { fg: 'magenta' } +log.headingStyle = { fg: 'white', bg: 'black' } + +log.style = {} +log.levels = {} +log.disp = {} +log.addLevel('silly', -Infinity, { inverse: true }, 'sill') +log.addLevel('verbose', 1000, { fg: 'blue', bg: 'black' }, 'verb') +log.addLevel('info', 2000, { fg: 'green' }) +log.addLevel('http', 3000, { fg: 'green', bg: 'black' }) +log.addLevel('warn', 4000, { fg: 'black', bg: 'yellow' }, 'WARN') +log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!') +log.addLevel('silent', Infinity) + +// allow 'error' prefix +log.on('error', function(){}) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/package.json new file mode 100644 index 00000000..464fe178 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/npmlog/package.json @@ -0,0 +1,61 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "npmlog", + "description": "logger for npm", + "version": "2.0.2", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/npmlog.git" + }, + "main": "log.js", + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "ansi": "~0.3.1", + "are-we-there-yet": "~1.0.6", + "gauge": "~1.2.5" + }, + "devDependencies": { + "tap": "~5.1.2" + }, + "license": "ISC", + "gitHead": "79dc582bf1ce4d2010454d89738a0a4dbd113be9", + "bugs": { + "url": "https://github.com/npm/npmlog/issues" + }, + "homepage": "https://github.com/npm/npmlog#readme", + "_id": "npmlog@2.0.2", + "_shasum": "d0470238b9697b7c3c4d16bdea65a00b12a464ab", + "_from": "npmlog@2.0.2", + "_npmVersion": "3.6.0", + "_nodeVersion": "5.4.0", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "d0470238b9697b7c3c4d16bdea65a00b12a464ab", + "tarball": "http://registry.npmjs.org/npmlog/-/npmlog-2.0.2.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.2.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/once/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/once/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/once/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/once/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/once/README.md new file mode 100644 index 00000000..e1cfd25c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/once/README.md @@ -0,0 +1,51 @@ +# once + +Only call a function once. + +## usage + +```javascript +var once = require('once') + +function load (file, cb) { + cb = once(cb) + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Or add to the Function.prototype in a responsible way: + +```javascript +// only has to be done once +require('once').proto() + +function load (file, cb) { + cb = cb.once() + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Ironically, the prototype feature makes this module twice as +complicated as necessary. + +To check whether you function has been called, use `fn.called`. Once the +function is called for the first time the return value of the original +function is saved in `fn.value` and subsequent calls will continue to +return this value. + +```javascript +var once = require('once') + +function load (cb) { + cb = once(cb) + var stream = createStream() + stream.once('data', cb) + stream.once('end', function () { + if (!cb.called) cb(new Error('not found')) + }) +} +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/once/once.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/once/once.js new file mode 100644 index 00000000..ab3ca888 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/once/once.js @@ -0,0 +1,21 @@ +var wrappy = require('wrappy') +module.exports = wrappy(once) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/once/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/once/package.json new file mode 100644 index 00000000..0f941917 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/once/package.json @@ -0,0 +1,47 @@ +{ + "name": "once", + "version": "1.3.3", + "description": "Run a function exactly one time", + "main": "once.js", + "directories": { + "test": "test" + }, + "dependencies": { + "wrappy": "1" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "files": [ + "once.js" + ], + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once.git" + }, + "keywords": [ + "once", + "function", + "one", + "single" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/once/issues" + }, + "homepage": "https://github.com/isaacs/once#readme", + "_id": "once@1.3.3", + "_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", + "_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "_from": "once@>=1.3.3 <1.4.0" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/LICENSE.txt b/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/LICENSE.txt new file mode 100644 index 00000000..3b43e3d9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright © 2012–2015 Domenic Denicola + +This work is free. You can redistribute it and/or modify it under the +terms of the Do What The Fuck You Want To Public License, Version 2, +as published by Sam Hocevar. See below for more details. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/README.md new file mode 100644 index 00000000..ef0d98d7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/README.md @@ -0,0 +1,57 @@ +# It Opens Stuff + +That is, in your desktop environment. This will make *actual windows pop up*, with stuff in them: + +```bash +npm install opener -g + +opener http://google.com +opener ./my-file.txt +opener firefox +opener npm run lint +``` + +Also if you want to use it programmatically you can do that too: + +```js +var opener = require("opener"); + +opener("http://google.com"); +opener("./my-file.txt"); +opener("firefox"); +opener("npm run lint"); +``` + +Plus, it returns the child process created, so you can do things like let your script exit while the window stays open: + +```js +var editor = opener("documentation.odt"); +editor.unref(); +// These other unrefs may be necessary if your OS's opener process +// exits before the process it started is complete. +editor.stdin.unref(); +editor.stdout.unref(); +editor.stderr.unref(); +``` + + +## Use It for Good + +Like opening the user's browser with a test harness in your package's test script: + +```json +{ + "scripts": { + "test": "opener ./test/runner.html" + }, + "devDependencies": { + "opener": "*" + } +} +``` + +## Why + +Because Windows has `start`, Macs have `open`, and *nix has `xdg-open`. At least +[according to some guy on StackOverflow](http://stackoverflow.com/q/1480971/3191). And I like things that work on all +three. Like Node.js. And Opener. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/opener.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/opener.js new file mode 100644 index 00000000..60c8810f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/opener.js @@ -0,0 +1,60 @@ +#!/usr/bin/env node + +"use strict"; + +var childProcess = require("child_process"); + +function opener(args, options, callback) { + // http://stackoverflow.com/q/1480971/3191, but see below for Windows. + var command = process.platform === "win32" ? "cmd" : + process.platform === "darwin" ? "open" : + "xdg-open"; + + if (typeof args === "string") { + args = [args]; + } + + if (typeof options === "function") { + callback = options; + options = {}; + } + + if (options && typeof options === "object" && options.command) { + if (process.platform === "win32") { + // *always* use cmd on windows + args = [options.command].concat(args); + } else { + command = options.command; + } + } + + if (process.platform === "win32") { + // On Windows, we really want to use the "start" command. But, the rules regarding arguments with spaces, and + // escaping them with quotes, can get really arcane. So the easiest way to deal with this is to pass off the + // responsibility to "cmd /c", which has that logic built in. + // + // Furthermore, if "cmd /c" double-quoted the first parameter, then "start" will interpret it as a window title, + // so we need to add a dummy empty-string window title: http://stackoverflow.com/a/154090/3191 + // + // Additionally, on Windows ampersand needs to be escaped when passed to "start" + args = args.map(function(value) { + return value.replace(/&/g, '^&'); + }); + args = ["/c", "start", '""'].concat(args); + } + + return childProcess.execFile(command, args, options, callback); +} + +// Export `opener` for programmatic access. +// You might use this to e.g. open a website: `opener("http://google.com")` +module.exports = opener; + +// If we're being called from the command line, just execute, using the command-line arguments. +if (require.main && require.main.id === module.id) { + opener(process.argv.slice(2), function (error) { + if (error) { + throw error; + } + }); +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/package.json new file mode 100644 index 00000000..09966ab2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/opener/package.json @@ -0,0 +1,54 @@ +{ + "name": "opener", + "description": "Opens stuff, like webpages and files and executables, cross-platform", + "version": "1.4.1", + "author": { + "name": "Domenic Denicola", + "email": "d@domenic.me", + "url": "https://domenic.me/" + }, + "license": "WTFPL", + "repository": { + "type": "git", + "url": "https://github.com/domenic/opener" + }, + "main": "opener.js", + "bin": { + "opener": "opener.js" + }, + "files": [ + "opener.js" + ], + "scripts": { + "lint": "jshint opener.js" + }, + "devDependencies": { + "jshint": "^2.6.3" + }, + "gitHead": "d0ee95b19951703462fa593baa16e81fdff7827c", + "bugs": { + "url": "https://github.com/domenic/opener/issues" + }, + "homepage": "https://github.com/domenic/opener", + "_id": "opener@1.4.1", + "_shasum": "897590acd1aed3311b703b58bccb4d43f56f2895", + "_from": "opener@>=1.4.1 <1.5.0", + "_npmVersion": "2.7.0", + "_nodeVersion": "1.5.1", + "_npmUser": { + "name": "domenic", + "email": "d@domenic.me" + }, + "maintainers": [ + { + "name": "domenic", + "email": "domenic@domenicdenicola.com" + } + ], + "dist": { + "shasum": "897590acd1aed3311b703b58bccb4d43f56f2895", + "tarball": "http://registry.npmjs.org/opener/-/opener-1.4.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/opener/-/opener-1.4.1.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/.npmignore new file mode 100644 index 00000000..0b406a61 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/.travis.yml new file mode 100644 index 00000000..8c98c38b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/README.md new file mode 100644 index 00000000..be632e95 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/README.md @@ -0,0 +1,63 @@ +# osenv + +Look up environment settings specific to different operating systems. + +## Usage + +```javascript +var osenv = require('osenv') +var path = osenv.path() +var user = osenv.user() +// etc. + +// Some things are not reliably in the env, and have a fallback command: +var h = osenv.hostname(function (er, hostname) { + h = hostname +}) +// This will still cause it to be memoized, so calling osenv.hostname() +// is now an immediate operation. + +// You can always send a cb, which will get called in the nextTick +// if it's been memoized, or wait for the fallback data if it wasn't +// found in the environment. +osenv.hostname(function (er, hostname) { + if (er) console.error('error looking up hostname') + else console.log('this machine calls itself %s', hostname) +}) +``` + +## osenv.hostname() + +The machine name. Calls `hostname` if not found. + +## osenv.user() + +The currently logged-in user. Calls `whoami` if not found. + +## osenv.prompt() + +Either PS1 on unix, or PROMPT on Windows. + +## osenv.tmpdir() + +The place where temporary files should be created. + +## osenv.home() + +No place like it. + +## osenv.path() + +An array of the places that the operating system will search for +executables. + +## osenv.editor() + +Return the executable name of the editor program. This uses the EDITOR +and VISUAL environment variables, and falls back to `vi` on Unix, or +`notepad.exe` on Windows. + +## osenv.shell() + +The SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash' +or 'cmd'. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/osenv.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/osenv.js new file mode 100644 index 00000000..cfdb8290 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/osenv.js @@ -0,0 +1,72 @@ +var isWindows = process.platform === 'win32' +var path = require('path') +var exec = require('child_process').exec +var osTmpdir = require('os-tmpdir') +var osHomedir = require('os-homedir') + +// looking up envs is a bit costly. +// Also, sometimes we want to have a fallback +// Pass in a callback to wait for the fallback on failures +// After the first lookup, always returns the same thing. +function memo (key, lookup, fallback) { + var fell = false + var falling = false + exports[key] = function (cb) { + var val = lookup() + if (!val && !fell && !falling && fallback) { + fell = true + falling = true + exec(fallback, function (er, output, stderr) { + falling = false + if (er) return // oh well, we tried + val = output.trim() + }) + } + exports[key] = function (cb) { + if (cb) process.nextTick(cb.bind(null, null, val)) + return val + } + if (cb && !falling) process.nextTick(cb.bind(null, null, val)) + return val + } +} + +memo('user', function () { + return ( isWindows + ? process.env.USERDOMAIN + '\\' + process.env.USERNAME + : process.env.USER + ) +}, 'whoami') + +memo('prompt', function () { + return isWindows ? process.env.PROMPT : process.env.PS1 +}) + +memo('hostname', function () { + return isWindows ? process.env.COMPUTERNAME : process.env.HOSTNAME +}, 'hostname') + +memo('tmpdir', function () { + return osTmpdir() +}) + +memo('home', function () { + return osHomedir() +}) + +memo('path', function () { + return (process.env.PATH || + process.env.Path || + process.env.path).split(isWindows ? ';' : ':') +}) + +memo('editor', function () { + return process.env.EDITOR || + process.env.VISUAL || + (isWindows ? 'notepad.exe' : 'vi') +}) + +memo('shell', function () { + return isWindows ? process.env.ComSpec || 'cmd' + : process.env.SHELL || 'bash' +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/package.json new file mode 100644 index 00000000..d9e62c76 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/package.json @@ -0,0 +1,75 @@ +{ + "name": "osenv", + "version": "0.1.3", + "main": "osenv.js", + "directories": { + "test": "test" + }, + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/osenv.git" + }, + "keywords": [ + "environment", + "variable", + "home", + "tmpdir", + "path", + "prompt", + "ps1" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "description": "Look up environment settings specific to different operating systems", + "gitHead": "f746b3405d8f9e28054d11b97e1436f6a15016c4", + "bugs": { + "url": "https://github.com/npm/osenv/issues" + }, + "homepage": "https://github.com/npm/osenv#readme", + "_id": "osenv@0.1.3", + "_shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217", + "_from": "osenv@0.1.3", + "_npmVersion": "3.0.0", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217", + "tarball": "http://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "robertkowalski", + "email": "rok@kowalski.gd" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/x.tap b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/x.tap new file mode 100644 index 00000000..9e0ff41b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/osenv/x.tap @@ -0,0 +1,39 @@ +TAP version 13 + # Subtest: test/unix.js + TAP version 13 + # Subtest: basic unix sanity test + ok 1 - should be equal + ok 2 - should be equal + ok 3 - should be equal + ok 4 - should be equivalent + ok 5 - should be equal + ok 6 - should be equal + ok 7 - should be equal + ok 8 - should be equal + ok 9 - should be equal + ok 10 - should be equal + ok 11 - should be equal + ok 12 - should be equal + ok 13 - should be equal + ok 14 - should be equal + 1..14 + ok 1 - basic unix sanity test # time=10.712ms + + 1..1 + # time=18.422ms +ok 1 - test/unix.js # time=169.827ms + + # Subtest: test/windows.js + TAP version 13 + 1..0 # Skip windows tests, this is not windows + +ok 2 - test/windows.js # SKIP Skip windows tests, this is not windows + + # Subtest: test/nada.js + TAP version 13 + 1..0 + +ok 2 - test/nada.js + +1..3 +# time=274.247ms diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/path-is-inside/LICENSE.txt b/bin/nodejs0.10.47/node_modules/npm/node_modules/path-is-inside/LICENSE.txt new file mode 100644 index 00000000..7276fc4f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/path-is-inside/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright © 2013–2014 Domenic Denicola + +This work is free. You can redistribute it and/or modify it under the +terms of the Do What The Fuck You Want To Public License, Version 2, +as published by Sam Hocevar. See below for more details. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/path-is-inside/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/path-is-inside/README.md new file mode 100644 index 00000000..2a195330 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/path-is-inside/README.md @@ -0,0 +1,35 @@ +# Is This Path Inside This Other Path? + +It turns out this question isn't trivial to answer using Node's built-in path APIs. A naive `indexOf`-based solution will fail sometimes on Windows, which is case-insensitive (see e.g. [isaacs/npm#4214][]). You might then think to be clever with `path.resolve`, but you have to be careful to account for situations whether the paths have different drive letters, or else you'll cause bugs like [isaacs/npm#4313][]. And let's not even get started on trailing slashes. + +The **path-is-inside** package will give you a robust, cross-platform way of detecting whether a given path is inside another path. + +## Usage + +Pretty simple. First the path being tested; then the potential parent. Like so: + +```js +var pathIsInside = require("path-is-inside"); + +pathIsInside("/x/y/z", "/x/y") // true +pathIsInside("/x/y", "/x/y/z") // false +``` + +## OS-Specific Behavior + +Like Node's built-in path module, path-is-inside treats all file paths on Windows as case-insensitive, whereas it treats all file paths on *-nix operating systems as case-sensitive. Keep this in mind especially when working on a Mac, where, despite Node's defaults, the OS usually treats paths case-insensitively. + +In practice, this means: + +```js +// On Windows + +pathIsInside("C:\\X\\Y\\Z", "C:\\x\\y") // true + +// On *-nix, including Mac OS X + +pathIsInside("/X/Y/Z", "/x/y") // false +``` + +[isaacs/npm#4214]: https://github.com/isaacs/npm/pull/4214 +[isaacs/npm#4313]: https://github.com/isaacs/npm/issues/4313 diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/path-is-inside/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/path-is-inside/package.json new file mode 100644 index 00000000..6a7116de --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/path-is-inside/package.json @@ -0,0 +1,43 @@ +{ + "name": "path-is-inside", + "description": "Tests whether one path is inside another path", + "keywords": [ + "path", + "directory", + "folder", + "inside", + "relative" + ], + "version": "1.0.1", + "author": { + "name": "Domenic Denicola", + "email": "domenic@domenicdenicola.com", + "url": "http://domenic.me" + }, + "license": "WTFPL", + "repository": { + "type": "git", + "url": "git://github.com/domenic/path-is-inside.git" + }, + "bugs": { + "url": "http://github.com/domenic/path-is-inside/issues" + }, + "main": "lib/path-is-inside.js", + "scripts": { + "test": "mocha", + "lint": "jshint lib" + }, + "devDependencies": { + "jshint": "~2.3.0", + "mocha": "~1.15.1" + }, + "readme": "# Is This Path Inside This Other Path?\n\nIt turns out this question isn't trivial to answer using Node's built-in path APIs. A naive `indexOf`-based solution will fail sometimes on Windows, which is case-insensitive (see e.g. [isaacs/npm#4214][]). You might then think to be clever with `path.resolve`, but you have to be careful to account for situations whether the paths have different drive letters, or else you'll cause bugs like [isaacs/npm#4313][]. And let's not even get started on trailing slashes.\n\nThe **path-is-inside** package will give you a robust, cross-platform way of detecting whether a given path is inside another path.\n\n## Usage\n\nPretty simple. First the path being tested; then the potential parent. Like so:\n\n```js\nvar pathIsInside = require(\"path-is-inside\");\n\npathIsInside(\"/x/y/z\", \"/x/y\") // true\npathIsInside(\"/x/y\", \"/x/y/z\") // false\n```\n\n## OS-Specific Behavior\n\nLike Node's built-in path module, path-is-inside treats all file paths on Windows as case-insensitive, whereas it treats all file paths on *-nix operating systems as case-sensitive. Keep this in mind especially when working on a Mac, where, despite Node's defaults, the OS usually treats paths case-insensitively.\n\nIn practice, this means:\n\n```js\n// On Windows\n\npathIsInside(\"C:\\\\X\\\\Y\\\\Z\", \"C:\\\\x\\\\y\") // true\n\n// On *-nix, including Mac OS X\n\npathIsInside(\"/X/Y/Z\", \"/x/y\") // false\n```\n\n[isaacs/npm#4214]: https://github.com/isaacs/npm/pull/4214\n[isaacs/npm#4313]: https://github.com/isaacs/npm/issues/4313\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/domenic/path-is-inside", + "_id": "path-is-inside@1.0.1", + "dist": { + "shasum": "c5e6c4764c4cd41f2ac839c53be5621d085726b3" + }, + "_from": "path-is-inside@1.0.1", + "_resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/.npmignore new file mode 100644 index 00000000..0b406a61 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/.travis.yml new file mode 100644 index 00000000..a7cefba0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +before_install: + - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28' + - npm install -g npm@latest +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/LICENSE new file mode 100644 index 00000000..1d68a100 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/README.md new file mode 100644 index 00000000..ded3901c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/README.md @@ -0,0 +1,27 @@ +# read-installed + +Read all the installed packages in a folder, and return a tree +structure with all the data. + +npm uses this. + +## 2.0.0 + +Breaking changes in `2.0.0`: + +The second argument is now an `Object` that contains the following keys: + + * `depth` optional, defaults to Infinity + * `log` optional log Function + * `dev` optional, default false, set to true to include devDependencies + +## Usage + +```javascript +var readInstalled = require("read-installed") +// optional options +var options = { dev: false, log: fn, depth: 2 } +readInstalled(folder, options, function (er, data) { + ... +}) +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/package.json new file mode 100644 index 00000000..95f627b9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/package.json @@ -0,0 +1,46 @@ +{ + "name": "read-installed", + "description": "Read all the installed packages in a folder, and return a tree structure with all the data.", + "version": "4.0.3", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/read-installed.git" + }, + "main": "read-installed.js", + "scripts": { + "test": "tap ./test/*.js" + }, + "dependencies": { + "debuglog": "^1.0.1", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1", + "graceful-fs": "^4.1.2" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.2" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^1.2.0" + }, + "readme": "# read-installed\n\nRead all the installed packages in a folder, and return a tree\nstructure with all the data.\n\nnpm uses this.\n\n## 2.0.0\n\nBreaking changes in `2.0.0`:\n\nThe second argument is now an `Object` that contains the following keys:\n\n * `depth` optional, defaults to Infinity\n * `log` optional log Function\n * `dev` optional, default false, set to true to include devDependencies\n\n## Usage\n\n```javascript\nvar readInstalled = require(\"read-installed\")\n// optional options\nvar options = { dev: false, log: fn, depth: 2 }\nreadInstalled(folder, options, function (er, data) {\n ...\n})\n```\n", + "readmeFilename": "README.md", + "gitHead": "da02df6acdb5f5ee31d8c637ef31fb50efb455c1", + "bugs": { + "url": "https://github.com/isaacs/read-installed/issues" + }, + "homepage": "https://github.com/isaacs/read-installed#readme", + "_id": "read-installed@4.0.3", + "_shasum": "ff9b8b67f187d1e4c29b9feb31f6b223acd19067", + "_from": "read-installed@4.0.3" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/read-installed.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/read-installed.js new file mode 100644 index 00000000..274902ac --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-installed/read-installed.js @@ -0,0 +1,407 @@ + +// Walk through the file-system "database" of installed +// packages, and create a data object related to the +// installed versions of each package. + +/* +This will traverse through all node_modules folders, +resolving the dependencies object to the object corresponding to +the package that meets that dep, or just the version/range if +unmet. + +Assuming that you had this folder structure: + +/path/to ++-- package.json { name = "root" } +`-- node_modules + +-- foo {bar, baz, asdf} + | +-- node_modules + | +-- bar { baz } + | `-- baz + `-- asdf + +where "foo" depends on bar, baz, and asdf, bar depends on baz, +and bar and baz are bundled with foo, whereas "asdf" is at +the higher level (sibling to foo), you'd get this object structure: + +{ +, path: "/path/to" +, parent: null +, dependencies: + { foo : + { version: "1.2.3" + , path: "/path/to/node_modules/foo" + , parent: + , dependencies: + { bar: + { parent: + , path: "/path/to/node_modules/foo/node_modules/bar" + , version: "2.3.4" + , dependencies: { baz: } + } + , baz: { ... } + , asdf: + } + } + , asdf: { ... } + } +} + +Unmet deps are left as strings. +Extraneous deps are marked with extraneous:true +deps that don't meet a requirement are marked with invalid:true +deps that don't meet a peer requirement are marked with peerInvalid:true + +to READ(packagefolder, parentobj, name, reqver) +obj = read package.json +installed = ./node_modules/* +if parentobj is null, and no package.json + obj = {dependencies:{:ANY}} +deps = Object.keys(obj.dependencies) +obj.path = packagefolder +obj.parent = parentobj +if name, && obj.name !== name, obj.invalid = true +if reqver, && obj.version !satisfies reqver, obj.invalid = true +if !reqver && parentobj, obj.extraneous = true +for each folder in installed + obj.dependencies[folder] = READ(packagefolder+node_modules+folder, + obj, folder, obj.dependencies[folder]) +# walk tree to find unmet deps +for each dep in obj.dependencies not in installed + r = obj.parent + while r + if r.dependencies[dep] + if r.dependencies[dep].verion !satisfies obj.dependencies[dep] + WARN + r.dependencies[dep].invalid = true + obj.dependencies[dep] = r.dependencies[dep] + r = null + else r = r.parent +return obj + + +TODO: +1. Find unmet deps in parent directories, searching as node does up +as far as the left-most node_modules folder. +2. Ignore anything in node_modules that isn't a package folder. + +*/ + +try { + var fs = require("graceful-fs") +} catch (er) { + var fs = require("fs") +} + +var path = require("path") +var asyncMap = require("slide").asyncMap +var semver = require("semver") +var readJson = require("read-package-json") +var url = require("url") +var util = require("util") +var extend = require("util-extend") + +var debug = require("debuglog")("read-installed") + +var readdir = require("readdir-scoped-modules") + +// Sentinel catch-all version constraint used when a dependency is not +// listed in the package.json file. +var ANY = {} + +module.exports = readInstalled + +function readInstalled (folder, opts, cb) { + if (typeof opts === 'function') { + cb = opts + opts = {} + } else { + opts = extend({}, opts) + } + + if (typeof opts.depth !== 'number') + opts.depth = Infinity + + opts.depth = Math.max(0, opts.depth) + + if (typeof opts.log !== 'function') + opts.log = function () {} + + opts.dev = !!opts.dev + opts.realpathSeen = {} + opts.findUnmetSeen = [] + + + readInstalled_(folder, null, null, null, 0, opts, function (er, obj) { + if (er) return cb(er) + // now obj has all the installed things, where they're installed + // figure out the inheritance links, now that the object is built. + resolveInheritance(obj, opts) + obj.root = true + unmarkExtraneous(obj, opts) + cb(null, obj) + }) +} + +function readInstalled_ (folder, parent, name, reqver, depth, opts, cb) { + var installed + , obj + , real + , link + , realpathSeen = opts.realpathSeen + + readdir(path.resolve(folder, "node_modules"), function (er, i) { + // error indicates that nothing is installed here + if (er) i = [] + installed = i.filter(function (f) { return f.charAt(0) !== "." }) + next() + }) + + readJson(path.resolve(folder, "package.json"), function (er, data) { + obj = copy(data) + + if (!parent) { + obj = obj || true + er = null + } + return next(er) + }) + + fs.lstat(folder, function (er, st) { + if (er) { + if (!parent) real = true + return next(er) + } + fs.realpath(folder, function (er, rp) { + debug("realpath(%j) = %j", folder, rp) + real = rp + if (st.isSymbolicLink()) link = rp + next(er) + }) + }) + + var errState = null + , called = false + function next (er) { + if (errState) return + if (er) { + errState = er + return cb(null, []) + } + debug('next', installed, obj && typeof obj, name, real) + if (!installed || !obj || !real || called) return + called = true + if (realpathSeen[real]) return cb(null, realpathSeen[real]) + if (obj === true) { + obj = {dependencies:{}, path:folder} + installed.forEach(function (i) { obj.dependencies[i] = ANY }) + } + if (name && obj.name !== name) obj.invalid = true + obj.realName = name || obj.name + obj.dependencies = obj.dependencies || {} + + // At this point, figure out what dependencies we NEED to get met + obj._dependencies = copy(obj.dependencies) + + if (reqver === ANY) { + // We were unable to determine the required version of this + // dependency from the package.json file, but we now know its actual + // version, so treat that version as the required version to avoid + // marking the dependency as invalid below. See #40. + reqver = obj.version; + } + + // "foo":"http://blah" and "foo":"latest" are always presumed valid + if (reqver + && semver.validRange(reqver, true) + && !semver.satisfies(obj.version, reqver, true)) { + obj.invalid = true + } + + // Mark as extraneous at this point. + // This will be un-marked in unmarkExtraneous, where we mark as + // not-extraneous everything that is required in some way from + // the root object. + obj.extraneous = true + + obj.path = obj.path || folder + obj.realPath = real + obj.link = link + if (parent && !obj.link) obj.parent = parent + realpathSeen[real] = obj + obj.depth = depth + //if (depth >= opts.depth) return cb(null, obj) + asyncMap(installed, function (pkg, cb) { + var rv = obj.dependencies[pkg] + if (!rv && obj.devDependencies && opts.dev) + rv = obj.devDependencies[pkg] + + if (depth > opts.depth) { + obj.dependencies = {} + return cb(null, obj) + } + + readInstalled_( path.resolve(folder, "node_modules/"+pkg) + , obj, pkg, obj.dependencies[pkg], depth + 1, opts + , cb ) + + }, function (er, installedData) { + if (er) return cb(er) + installedData.forEach(function (dep) { + obj.dependencies[dep.realName] = dep + }) + + // any strings here are unmet things. however, if it's + // optional, then that's fine, so just delete it. + if (obj.optionalDependencies) { + Object.keys(obj.optionalDependencies).forEach(function (dep) { + if (typeof obj.dependencies[dep] === "string") { + delete obj.dependencies[dep] + } + }) + } + return cb(null, obj) + }) + } +} + +// starting from a root object, call findUnmet on each layer of children +var riSeen = [] +function resolveInheritance (obj, opts) { + if (typeof obj !== "object") return + if (riSeen.indexOf(obj) !== -1) return + riSeen.push(obj) + if (typeof obj.dependencies !== "object") { + obj.dependencies = {} + } + Object.keys(obj.dependencies).forEach(function (dep) { + findUnmet(obj.dependencies[dep], opts) + }) + Object.keys(obj.dependencies).forEach(function (dep) { + if (typeof obj.dependencies[dep] === "object") { + resolveInheritance(obj.dependencies[dep], opts) + } else { + debug("unmet dep! %s %s@%s", obj.name, dep, obj.dependencies[dep]) + } + }) + findUnmet(obj, opts) +} + +// find unmet deps by walking up the tree object. +// No I/O +function findUnmet (obj, opts) { + var findUnmetSeen = opts.findUnmetSeen + if (findUnmetSeen.indexOf(obj) !== -1) return + findUnmetSeen.push(obj) + debug("find unmet parent=%s obj=", obj.parent && obj.parent.name, obj.name || obj) + var deps = obj.dependencies = obj.dependencies || {} + + debug(deps) + Object.keys(deps) + .filter(function (d) { return typeof deps[d] === "string" }) + .forEach(function (d) { + var found = findDep(obj, d) + debug("finding dep %j", d, found && found.name || found) + // "foo":"http://blah" and "foo":"latest" are always presumed valid + if (typeof deps[d] === "string" && + semver.validRange(deps[d], true) && + found && + !semver.satisfies(found.version, deps[d], true)) { + // the bad thing will happen + opts.log( "unmet dependency" + , obj.path + " requires "+d+"@'"+deps[d] + + "' but will load\n" + + found.path+",\nwhich is version "+found.version ) + found.invalid = true + } + if (found) { + deps[d] = found + } + }) + + var peerDeps = obj.peerDependencies = obj.peerDependencies || {} + Object.keys(peerDeps).forEach(function (d) { + var dependency + + if (!obj.parent) { + dependency = obj.dependencies[d] + + // read it as a missing dep + if (!dependency) { + obj.dependencies[d] = peerDeps[d] + } + } else { + var r = obj.parent + while (r && !dependency) { + dependency = r.dependencies && r.dependencies[d] + r = r.link ? null : r.parent + } + } + + if (!dependency) { + // mark as a missing dep! + obj.dependencies[d] = peerDeps[d] + } else if (!semver.satisfies(dependency.version, peerDeps[d], true)) { + dependency.peerInvalid = true + } + }) + + return obj +} + +function unmarkExtraneous (obj, opts) { + // Mark all non-required deps as extraneous. + // start from the root object and mark as non-extraneous all modules + // that haven't been previously flagged as extraneous then propagate + // to all their dependencies + + obj.extraneous = false + + var deps = obj._dependencies || [] + if (opts.dev && obj.devDependencies && (obj.root || obj.link)) { + Object.keys(obj.devDependencies).forEach(function (k) { + deps[k] = obj.devDependencies[k] + }) + } + + if (obj.peerDependencies) { + Object.keys(obj.peerDependencies).forEach(function (k) { + deps[k] = obj.peerDependencies[k] + }) + } + + debug("not extraneous", obj._id, deps) + Object.keys(deps).forEach(function (d) { + var dep = findDep(obj, d) + if (dep && dep.extraneous) { + unmarkExtraneous(dep, opts) + } + }) +} + +// Find the one that will actually be loaded by require() +// so we can make sure it's valid etc. +function findDep (obj, d) { + var r = obj + , found = null + while (r && !found) { + // if r is a valid choice, then use that. + // kinda weird if a pkg depends on itself, but after the first + // iteration of this loop, it indicates a dep cycle. + if (typeof r.dependencies[d] === "object") { + found = r.dependencies[d] + } + if (!found && r.realName === d) found = r + r = r.link ? null : r.parent + } + return found +} + +function copy (obj) { + if (!obj || typeof obj !== 'object') return obj + if (Array.isArray(obj)) return obj.map(copy) + + var o = {} + for (var i in obj) o[i] = copy(obj[i]) + return o +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/.npmignore new file mode 100644 index 00000000..0b406a61 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/.travis.yml new file mode 100644 index 00000000..de37a431 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +sudo: false +before_install: + - npm install -g npm@latest diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/LICENSE new file mode 100644 index 00000000..521946af --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/README.md new file mode 100644 index 00000000..5eb8002e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/README.md @@ -0,0 +1,157 @@ +# read-package-json + +This is the thing that npm uses to read package.json files. It +validates some stuff, and loads some default things. + +It keeps a cache of the files you've read, so that you don't end +up reading the same package.json file multiple times. + +Note that if you just want to see what's literally in the package.json +file, you can usually do `var data = require('some-module/package.json')`. + +This module is basically only needed by npm, but it's handy to see what +npm will see when it looks at your package. + +## Usage + +```javascript +var readJson = require('read-package-json') + +// readJson(filename, [logFunction=noop], [strict=false], cb) +readJson('/path/to/package.json', console.error, false, function (er, data) { + if (er) { + console.error("There was an error reading the file") + return + } + + console.error('the package data is', data) +}); +``` + +## readJson(file, [logFn = noop], [strict = false], cb) + +* `file` {String} The path to the package.json file +* `logFn` {Function} Function to handle logging. Defaults to a noop. +* `strict` {Boolean} True to enforce SemVer 2.0 version strings, and + other strict requirements. +* `cb` {Function} Gets called with `(er, data)`, as is The Node Way. + +Reads the JSON file and does the things. + +## `package.json` Fields + +See `man 5 package.json` or `npm help json`. + +## readJson.log + +By default this is a reference to the `npmlog` module. But if that +module can't be found, then it'll be set to just a dummy thing that does +nothing. + +Replace with your own `{log,warn,error}` object for fun loggy time. + +## readJson.extras(file, data, cb) + +Run all the extra stuff relative to the file, with the parsed data. + +Modifies the data as it does stuff. Calls the cb when it's done. + +## readJson.extraSet = [fn, fn, ...] + +Array of functions that are called by `extras`. Each one receives the +arguments `fn(file, data, cb)` and is expected to call `cb(er, data)` +when done or when an error occurs. + +Order is indeterminate, so each function should be completely +independent. + +Mix and match! + +## readJson.cache + +The `lru-cache` object that readJson uses to not read the same file over +and over again. See +[lru-cache](https://github.com/isaacs/node-lru-cache) for details. + +## Other Relevant Files Besides `package.json` + +Some other files have an effect on the resulting data object, in the +following ways: + +### `README?(.*)` + +If there is a `README` or `README.*` file present, then npm will attach +a `readme` field to the data with the contents of this file. + +Owing to the fact that roughly 100% of existing node modules have +Markdown README files, it will generally be assumed to be Markdown, +regardless of the extension. Please plan accordingly. + +### `server.js` + +If there is a `server.js` file, and there is not already a +`scripts.start` field, then `scripts.start` will be set to `node +server.js`. + +### `AUTHORS` + +If there is not already a `contributors` field, then the `contributors` +field will be set to the contents of the `AUTHORS` file, split by lines, +and parsed. + +### `bindings.gyp` + +If a bindings.gyp file exists, and there is not already a +`scripts.install` field, then the `scripts.install` field will be set to +`node-gyp rebuild`. + +### `index.js` + +If the json file does not exist, but there is a `index.js` file +present instead, and that file has a package comment, then it will try +to parse the package comment, and use that as the data instead. + +A package comment looks like this: + +```javascript +/**package + * { "name": "my-bare-module" + * , "version": "1.2.3" + * , "description": "etc...." } + **/ + +// or... + +/**package +{ "name": "my-bare-module" +, "version": "1.2.3" +, "description": "etc...." } +**/ +``` + +The important thing is that it starts with `/**package`, and ends with +`**/`. If the package.json file exists, then the index.js is not +parsed. + +### `{directories.man}/*.[0-9]` + +If there is not already a `man` field defined as an array of files or a +single file, and +there is a `directories.man` field defined, then that directory will +be searched for manpages. + +Any valid manpages found in that directory will be assigned to the `man` +array, and installed in the appropriate man directory at package install +time, when installed globally on a Unix system. + +### `{directories.bin}/*` + +If there is not already a `bin` field defined as a string filename or a +hash of ` : ` pairs, then the `directories.bin` +directory will be searched and all the files within it will be linked as +executables at install time. + +When installing locally, npm links bins into `node_modules/.bin`, which +is in the `PATH` environ when npm runs scripts. When +installing globally, they are linked into `{prefix}/bin`, which is +presumably in the `PATH` environment variable. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/package.json new file mode 100644 index 00000000..5cb3e287 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/package.json @@ -0,0 +1,70 @@ +{ + "name": "read-package-json", + "version": "2.0.3", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "description": "The thing npm uses to read package.json files with semantics and defaults and validation", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/read-package-json.git" + }, + "main": "read-json.js", + "scripts": { + "test": "standard && tap test/*.js" + }, + "dependencies": { + "glob": "^6.0.0", + "json-parse-helpfulerror": "^1.0.2", + "normalize-package-data": "^2.0.0", + "graceful-fs": "^4.1.2" + }, + "devDependencies": { + "standard": "^5.3.1", + "tap": "^1.2.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.2" + }, + "license": "ISC", + "gitHead": "336a212716bb830781d7e71580adaeda377b69d9", + "bugs": { + "url": "https://github.com/npm/read-package-json/issues" + }, + "homepage": "https://github.com/npm/read-package-json#readme", + "_id": "read-package-json@2.0.3", + "_shasum": "f8cec1627053b54f384b353224545e607554c5d2", + "_from": "read-package-json@2.0.3", + "_npmVersion": "3.5.4", + "_nodeVersion": "4.2.2", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "f8cec1627053b54f384b353224545e607554c5d2", + "tarball": "http://registry.npmjs.org/read-package-json/-/read-package-json-2.0.3.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.3.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/read-json.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/read-json.js new file mode 100644 index 00000000..c6d68909 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/read-json.js @@ -0,0 +1,383 @@ +var fs +try { + fs = require('graceful-fs') +} catch (er) { + fs = require('fs') +} + +var path = require('path') + +var glob = require('glob') +var normalizeData = require('normalize-package-data') +var safeJSON = require('json-parse-helpfulerror') + +module.exports = readJson + +// put more stuff on here to customize. +readJson.extraSet = [ + gypfile, + serverjs, + scriptpath, + authors, + readme, + mans, + bins, + githead +] + +var typoWarned = {} + +function readJson (file, log_, strict_, cb_) { + var log, strict, cb + for (var i = 1; i < arguments.length - 1; i++) { + if (typeof arguments[i] === 'boolean') { + strict = arguments[i] + } else if (typeof arguments[i] === 'function') { + log = arguments[i] + } + } + + if (!log) log = function () {} + cb = arguments[ arguments.length - 1 ] + + readJson_(file, log, strict, cb) +} + +function readJson_ (file, log, strict, cb) { + fs.readFile(file, 'utf8', function (er, d) { + parseJson(file, er, d, log, strict, cb) + }) +} + +function stripBOM (content) { + // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + // because the buffer-to-string conversion in `fs.readFileSync()` + // translates it to FEFF, the UTF-16 BOM. + if (content.charCodeAt(0) === 0xFEFF) content = content.slice(1) + return content +} + +function parseJson (file, er, d, log, strict, cb) { + if (er && er.code === 'ENOENT') return indexjs(file, er, log, strict, cb) + if (er) return cb(er) + + try { + d = safeJSON.parse(stripBOM(d)) + } catch (er) { + d = parseIndex(d) + if (!d) return cb(parseError(er, file)) + } + + extras(file, d, log, strict, cb) +} + +function indexjs (file, er, log, strict, cb) { + if (path.basename(file) === 'index.js') return cb(er) + + var index = path.resolve(path.dirname(file), 'index.js') + fs.readFile(index, 'utf8', function (er2, d) { + if (er2) return cb(er) + + d = parseIndex(d) + if (!d) return cb(er) + + extras(file, d, log, strict, cb) + }) +} + +readJson.extras = extras +function extras (file, data, log_, strict_, cb_) { + var log, strict, cb + for (var i = 2; i < arguments.length - 1; i++) { + if (typeof arguments[i] === 'boolean') { + strict = arguments[i] + } else if (typeof arguments[i] === 'function') { + log = arguments[i] + } + } + + if (!log) log = function () {} + cb = arguments[i] + + var set = readJson.extraSet + var n = set.length + var errState = null + set.forEach(function (fn) { + fn(file, data, then) + }) + + function then (er) { + if (errState) return + if (er) return cb(errState = er) + if (--n > 0) return + final(file, data, log, strict, cb) + } +} + +function scriptpath (file, data, cb) { + if (!data.scripts) return cb(null, data) + var k = Object.keys(data.scripts) + k.forEach(scriptpath_, data.scripts) + cb(null, data) +} + +function scriptpath_ (key) { + var s = this[key] + // This is never allowed, and only causes problems + if (typeof s !== 'string') return delete this[key] + + var spre = /^(\.[\/\\])?node_modules[\/\\].bin[\\\/]/ + if (s.match(spre)) { + this[key] = this[key].replace(spre, '') + } +} + +function gypfile (file, data, cb) { + var dir = path.dirname(file) + var s = data.scripts || {} + if (s.install || s.preinstall) return cb(null, data) + + glob('*.gyp', { cwd: dir }, function (er, files) { + if (er) return cb(er) + gypfile_(file, data, files, cb) + }) +} + +function gypfile_ (file, data, files, cb) { + if (!files.length) return cb(null, data) + var s = data.scripts || {} + s.install = 'node-gyp rebuild' + data.scripts = s + data.gypfile = true + return cb(null, data) +} + +function serverjs (file, data, cb) { + var dir = path.dirname(file) + var s = data.scripts || {} + if (s.start) return cb(null, data) + glob('server.js', { cwd: dir }, function (er, files) { + if (er) return cb(er) + serverjs_(file, data, files, cb) + }) +} + +function serverjs_ (file, data, files, cb) { + if (!files.length) return cb(null, data) + var s = data.scripts || {} + s.start = 'node server.js' + data.scripts = s + return cb(null, data) +} + +function authors (file, data, cb) { + if (data.contributors) return cb(null, data) + var af = path.resolve(path.dirname(file), 'AUTHORS') + fs.readFile(af, 'utf8', function (er, ad) { + // ignore error. just checking it. + if (er) return cb(null, data) + authors_(file, data, ad, cb) + }) +} + +function authors_ (file, data, ad, cb) { + ad = ad.split(/\r?\n/g).map(function (line) { + return line.replace(/^\s*#.*$/, '').trim() + }).filter(function (line) { + return line + }) + data.contributors = ad + return cb(null, data) +} + +function readme (file, data, cb) { + if (data.readme) return cb(null, data) + var dir = path.dirname(file) + var globOpts = { cwd: dir, nocase: true, mark: true } + glob('{README,README.*}', globOpts, function (er, files) { + if (er) return cb(er) + // don't accept directories. + files = files.filter(function (file) { + return !file.match(/\/$/) + }) + if (!files.length) return cb() + var fn = preferMarkdownReadme(files) + var rm = path.resolve(dir, fn) + readme_(file, data, rm, cb) + }) +} + +function preferMarkdownReadme (files) { + var fallback = 0 + var re = /\.m?a?r?k?d?o?w?n?$/i + for (var i = 0; i < files.length; i++) { + if (files[i].match(re)) { + return files[i] + } else if (files[i].match(/README$/)) { + fallback = i + } + } + // prefer README.md, followed by README; otherwise, return + // the first filename (which could be README) + return files[fallback] +} + +function readme_ (file, data, rm, cb) { + var rmfn = path.basename(rm) + fs.readFile(rm, 'utf8', function (er, rm) { + // maybe not readable, or something. + if (er) return cb() + data.readme = rm + data.readmeFilename = rmfn + return cb(er, data) + }) +} + +function mans (file, data, cb) { + var m = data.directories && data.directories.man + if (data.man || !m) return cb(null, data) + m = path.resolve(path.dirname(file), m) + glob('**/*.[0-9]', { cwd: m }, function (er, mans) { + if (er) return cb(er) + mans_(file, data, mans, cb) + }) +} + +function mans_ (file, data, mans, cb) { + var m = data.directories && data.directories.man + data.man = mans.map(function (mf) { + return path.resolve(path.dirname(file), m, mf) + }) + return cb(null, data) +} + +function bins (file, data, cb) { + if (Array.isArray(data.bin)) return bins_(file, data, data.bin, cb) + + var m = data.directories && data.directories.bin + if (data.bin || !m) return cb(null, data) + + m = path.resolve(path.dirname(file), m) + glob('**', { cwd: m }, function (er, bins) { + if (er) return cb(er) + bins_(file, data, bins, cb) + }) +} + +function bins_ (file, data, bins, cb) { + var m = data.directories && data.directories.bin || '.' + data.bin = bins.reduce(function (acc, mf) { + if (mf && mf.charAt(0) !== '.') { + var f = path.basename(mf) + acc[f] = path.join(m, mf) + } + return acc + }, {}) + return cb(null, data) +} + +function githead (file, data, cb) { + if (data.gitHead) return cb(null, data) + var dir = path.dirname(file) + var head = path.resolve(dir, '.git/HEAD') + fs.readFile(head, 'utf8', function (er, head) { + if (er) return cb(null, data) + githead_(file, data, dir, head, cb) + }) +} + +function githead_ (file, data, dir, head, cb) { + if (!head.match(/^ref: /)) { + data.gitHead = head.trim() + return cb(null, data) + } + var headFile = head.replace(/^ref: /, '').trim() + headFile = path.resolve(dir, '.git', headFile) + fs.readFile(headFile, 'utf8', function (er, head) { + if (er || !head) return cb(null, data) + head = head.replace(/^ref: /, '').trim() + data.gitHead = head + return cb(null, data) + }) +} + +/** + * Warn if the bin references don't point to anything. This might be better in + * normalize-package-data if it had access to the file path. + */ +function checkBinReferences_ (file, data, warn, cb) { + if (!(data.bin instanceof Object)) return cb() + + var keys = Object.keys(data.bin) + var keysLeft = keys.length + if (!keysLeft) return cb() + + function handleExists (relName, result) { + keysLeft-- + if (!result) warn('No bin file found at ' + relName) + if (!keysLeft) cb() + } + + keys.forEach(function (key) { + var dirName = path.dirname(file) + var relName = data.bin[key] + var binPath = path.resolve(dirName, relName) + fs.exists(binPath, handleExists.bind(null, relName)) + }) +} + +function final (file, data, log, strict, cb) { + var pId = makePackageId(data) + + function warn (msg) { + if (typoWarned[pId]) return + if (log) log('package.json', pId, msg) + } + + try { + normalizeData(data, warn, strict) + } catch (error) { + return cb(error) + } + + checkBinReferences_(file, data, warn, function () { + typoWarned[pId] = true + cb(null, data) + }) +} + +function makePackageId (data) { + var name = cleanString(data.name) + var ver = cleanString(data.version) + return name + '@' + ver +} + +function cleanString (str) { + return (!str || typeof (str) !== 'string') ? '' : str.trim() +} + +// /**package { "name": "foo", "version": "1.2.3", ... } **/ +function parseIndex (data) { + data = data.split(/^\/\*\*package(?:\s|$)/m) + + if (data.length < 2) return null + data = data[1] + data = data.split(/\*\*\/$/m) + + if (data.length < 2) return null + data = data[0] + data = data.replace(/^\s*\*/mg, '') + + try { + return safeJSON.parse(data) + } catch (er) { + return null + } +} + +function parseError (ex, file) { + var e = new Error('Failed to parse json\n' + ex.message) + e.code = 'EJSONPARSE' + e.file = file + return e +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/zunda b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/zunda new file mode 100644 index 00000000..8a804944 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read-package-json/zunda @@ -0,0 +1 @@ +{"_id":"zunda","_rev":"2-d344ae8ca038029c6651c8fd579d3b39","name":"zunda","description":"Zunda for Node.js","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"zunda","version":"0.0.1","author":{"name":"inken"},"description":"Zunda for Node.js","main":"zunda.js","dependencies":{"execsync":"*"},"repository":{"type":"git","url":"https://github.com/inkenkun/node-zunda.git"},"keywords":["zunda"],"homepage":"http://x1.inkenkun.com/","license":"MIT","bugs":{"url":"https://github.com/inkenkun/node-zunda/issues"},"_id":"zunda@0.0.1","dist":{"shasum":"c54fe03aa53efbcf52fcd5c7da4180d3f37871c9","tarball":"http://registry.npmjs.org/zunda/-/zunda-0.0.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"inken","email":"inkenkun@gmail.com"},"maintainers":[{"name":"inken","email":"inkenkun@gmail.com"}],"directories":{}}},"readme":"# ZundaJS\r\n\r\nZundaの結果をパースする Node.js 用モジュールです。\r\n\r\n## Installation\r\n\r\n``` shell\r\n$ npm install zunda\r\n```\r\n\r\n\r\n## Usage\r\n\r\n### Asynchronous\r\n\r\n```javascript\r\n\tvar Zunda = new require('zunda')\r\n\t , zunda = new Zunda()\r\n\t;\r\n\tzunda.parse('次郎は大阪に行ったが、太郎は東京には行かず地元に残ろうとした', function(err, result) {\r\n\t\tif (err) throw err;\r\n\t\tconsole.log(result);\r\n\t});\r\n```\r\n\r\n### Synchronous\r\n\r\n```javascript\r\n\tvar Zunda = new require('zunda')\r\n\t , zunda = new Zunda()\r\n\t;\r\n\tvar result = zunda.parseSync('次郎は大阪に行ったが、太郎は東京には行かず地元に残ろうとした');\r\n\tconsole.log(result);\r\n```\r\n\r\n## Result\r\n\r\n\r\n\t [ \r\n\t { event: [ '#EVENT0', '4', 'wr:筆者', '非未来', '0', '叙述', '成立', '0', '0' ],\r\n words: '次郎は大阪に行ったが、',\r\n \t wakachi: '次郎 は 大阪 に 行っ た が 、' },\r\n { event: [ '#EVENT1', '13', 'wr:筆者', '未来', '0', '叙述', '不成立', '0', '0' ],\r\n words: '太郎は東京には行かず',\r\n wakachi: '太郎 は 東京 に は 行か ず' },\r\n { event: [ '#EVENT2', '17', 'wr:筆者', '未来', '0', '意志', '高確率', 'ポジティブ', '0' ],\r\n words: '地元に残ろうとした',\r\n wakachi: '地元 に 残ろ う と し た' },\r\n { event: [ '#EVENT3', '20', 'wr:筆者', '非未来', '0', '叙述', '成立', '0', '0' ],\r\n words: '残ろうとした',\r\n wakachi: '残ろ う と し た' } \r\n ]\r\n\r\n\r\n\r\n## Reference\r\n\r\nhicomiさんの mecab-async https://www.npmjs.org/package/mecab-async を参考にさせていただきました。\r\nzunda https://code.google.com/p/zunda/\r\n","maintainers":[{"name":"inken","email":"inkenkun@gmail.com"}],"time":{"modified":"2014-06-23T01:53:45.429Z","created":"2014-06-23T01:53:45.429Z","0.0.1":"2014-06-23T01:53:45.429Z"},"homepage":"http://x1.inkenkun.com/","keywords":["zunda"],"repository":{"type":"git","url":"https://github.com/inkenkun/node-zunda.git"},"author":{"name":"inken"},"bugs":{"url":"https://github.com/inkenkun/node-zunda/issues"},"license":"MIT","readmeFilename":"README.md","_attachments":{}} \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/read/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/read/README.md new file mode 100644 index 00000000..5e074f55 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read/README.md @@ -0,0 +1,53 @@ +## read + +For reading user input from stdin. + +Similar to the `readline` builtin's `question()` method, but with a +few more features. + +## USAGE + +```javascript +var read = require("read") +read(options, callback) +``` + +The callback gets called with either the user input, or the default +specified, or an error, as `callback(error, result, isDefault)` +node style. + +## OPTIONS + +Every option is optional. + +* `prompt` What to write to stdout before reading input. +* `silent` Don't echo the output as the user types it. +* `replace` Replace silenced characters with the supplied character value. +* `timeout` Number of ms to wait for user input before giving up. +* `default` The default value if the user enters nothing. +* `edit` Allow the user to edit the default value. +* `terminal` Treat the output as a TTY, whether it is or not. +* `input` Readable stream to get input data from. (default `process.stdin`) +* `output` Writeable stream to write prompts to. (default: `process.stdout`) + +If silent is true, and the input is a TTY, then read will set raw +mode, and read character by character. + +## COMPATIBILITY + +This module works sort of with node 0.6. It does not work with node +versions less than 0.6. It is best on node 0.8. + +On node version 0.6, it will remove all listeners on the input +stream's `data` and `keypress` events, because the readline module did +not fully clean up after itself in that version of node, and did not +make it possible to clean up after it in a way that has no potential +for side effects. + +Additionally, some of the readline options (like `terminal`) will not +function in versions of node before 0.8, because they were not +implemented in the builtin readline module. + +## CONTRIBUTING + +Patches welcome. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/read/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/read/package.json new file mode 100644 index 00000000..23846d26 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/read/package.json @@ -0,0 +1,57 @@ +{ + "name": "read", + "version": "1.0.7", + "main": "lib/read.js", + "dependencies": { + "mute-stream": "~0.0.4" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "engines": { + "node": ">=0.8" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "description": "read(1) for node programs", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/read.git" + }, + "license": "ISC", + "scripts": { + "test": "tap test/*.js" + }, + "files": [ + "lib/read.js" + ], + "gitHead": "b14516b9236c40140fd0666567f5d0c588a09a62", + "bugs": { + "url": "https://github.com/isaacs/read/issues" + }, + "homepage": "https://github.com/isaacs/read#readme", + "_id": "read@1.0.7", + "_shasum": "b3da19bd052431a97671d44a42634adf710b40c4", + "_from": "read@1.0.7", + "_npmVersion": "3.2.2", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "b3da19bd052431a97671d44a42634adf710b40c4", + "tarball": "http://registry.npmjs.org/read/-/read-1.0.7.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/.npmignore new file mode 100644 index 00000000..5f30966c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/.npmignore @@ -0,0 +1,5 @@ +build/ +test/ +examples/ +fs.js +zlib.js \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/LICENSE new file mode 100644 index 00000000..a7e984dc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/LICENSE @@ -0,0 +1,18 @@ +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/README.md new file mode 100644 index 00000000..6c0e1409 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/README.md @@ -0,0 +1,14 @@ +# readable-stream + +***Node-core streams for userland*** + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/) + +This package is a mirror of the Streams2 and Streams3 implementations in Node-core. + +If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. + +**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. + +**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/duplex.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/duplex.js new file mode 100644 index 00000000..78339d8d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_duplex.js") diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/float.patch b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/float.patch new file mode 100644 index 00000000..a1d38a25 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/float.patch @@ -0,0 +1,922 @@ +diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js +index c5a741c..a2e0d8e 100644 +--- a/lib/_stream_duplex.js ++++ b/lib/_stream_duplex.js +@@ -26,8 +26,8 @@ + + module.exports = Duplex; + var util = require('util'); +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('./_stream_readable'); ++var Writable = require('./_stream_writable'); + + util.inherits(Duplex, Readable); + +diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js +index a5e9864..330c247 100644 +--- a/lib/_stream_passthrough.js ++++ b/lib/_stream_passthrough.js +@@ -25,7 +25,7 @@ + + module.exports = PassThrough; + +-var Transform = require('_stream_transform'); ++var Transform = require('./_stream_transform'); + var util = require('util'); + util.inherits(PassThrough, Transform); + +diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js +index 0c3fe3e..90a8298 100644 +--- a/lib/_stream_readable.js ++++ b/lib/_stream_readable.js +@@ -23,10 +23,34 @@ module.exports = Readable; + Readable.ReadableState = ReadableState; + + var EE = require('events').EventEmitter; ++if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { ++ return emitter.listeners(type).length; ++}; ++ ++if (!global.setImmediate) global.setImmediate = function setImmediate(fn) { ++ return setTimeout(fn, 0); ++}; ++if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) { ++ return clearTimeout(i); ++}; ++ + var Stream = require('stream'); + var util = require('util'); ++if (!util.isUndefined) { ++ var utilIs = require('core-util-is'); ++ for (var f in utilIs) { ++ util[f] = utilIs[f]; ++ } ++} + var StringDecoder; +-var debug = util.debuglog('stream'); ++var debug; ++if (util.debuglog) ++ debug = util.debuglog('stream'); ++else try { ++ debug = require('debuglog')('stream'); ++} catch (er) { ++ debug = function() {}; ++} + + util.inherits(Readable, Stream); + +@@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) { + + + function onEofChunk(stream, state) { +- if (state.decoder && !state.ended) { ++ if (state.decoder && !state.ended && state.decoder.end) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); +diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js +index b1f9fcc..b0caf57 100644 +--- a/lib/_stream_transform.js ++++ b/lib/_stream_transform.js +@@ -64,8 +64,14 @@ + + module.exports = Transform; + +-var Duplex = require('_stream_duplex'); ++var Duplex = require('./_stream_duplex'); + var util = require('util'); ++if (!util.isUndefined) { ++ var utilIs = require('core-util-is'); ++ for (var f in utilIs) { ++ util[f] = utilIs[f]; ++ } ++} + util.inherits(Transform, Duplex); + + +diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js +index ba2e920..f49288b 100644 +--- a/lib/_stream_writable.js ++++ b/lib/_stream_writable.js +@@ -27,6 +27,12 @@ module.exports = Writable; + Writable.WritableState = WritableState; + + var util = require('util'); ++if (!util.isUndefined) { ++ var utilIs = require('core-util-is'); ++ for (var f in utilIs) { ++ util[f] = utilIs[f]; ++ } ++} + var Stream = require('stream'); + + util.inherits(Writable, Stream); +@@ -119,7 +125,7 @@ function WritableState(options, stream) { + function Writable(options) { + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. +- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) ++ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) + return new Writable(options); + + this._writableState = new WritableState(options, this); +diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js +index e3787e4..8cd2127 100644 +--- a/test/simple/test-stream-big-push.js ++++ b/test/simple/test-stream-big-push.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + var str = 'asdfasdfasdfasdfasdf'; + + var r = new stream.Readable({ +diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js +index bb73777..d40efc7 100644 +--- a/test/simple/test-stream-end-paused.js ++++ b/test/simple/test-stream-end-paused.js +@@ -25,7 +25,7 @@ var gotEnd = false; + + // Make sure we don't miss the end event for paused 0-length streams + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var stream = new Readable(); + var calledRead = false; + stream._read = function() { +diff --git a/test/simple/test-stream-pipe-after-end.js b/test/simple/test-stream-pipe-after-end.js +index b46ee90..0be8366 100644 +--- a/test/simple/test-stream-pipe-after-end.js ++++ b/test/simple/test-stream-pipe-after-end.js +@@ -22,8 +22,8 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('../../lib/_stream_readable'); ++var Writable = require('../../lib/_stream_writable'); + var util = require('util'); + + util.inherits(TestReadable, Readable); +diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js +deleted file mode 100644 +index f689358..0000000 +--- a/test/simple/test-stream-pipe-cleanup.js ++++ /dev/null +@@ -1,122 +0,0 @@ +-// Copyright Joyent, Inc. and other Node contributors. +-// +-// Permission is hereby granted, free of charge, to any person obtaining a +-// copy of this software and associated documentation files (the +-// "Software"), to deal in the Software without restriction, including +-// without limitation the rights to use, copy, modify, merge, publish, +-// distribute, sublicense, and/or sell copies of the Software, and to permit +-// persons to whom the Software is furnished to do so, subject to the +-// following conditions: +-// +-// The above copyright notice and this permission notice shall be included +-// in all copies or substantial portions of the Software. +-// +-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +-// USE OR OTHER DEALINGS IN THE SOFTWARE. +- +-// This test asserts that Stream.prototype.pipe does not leave listeners +-// hanging on the source or dest. +- +-var common = require('../common'); +-var stream = require('stream'); +-var assert = require('assert'); +-var util = require('util'); +- +-function Writable() { +- this.writable = true; +- this.endCalls = 0; +- stream.Stream.call(this); +-} +-util.inherits(Writable, stream.Stream); +-Writable.prototype.end = function() { +- this.endCalls++; +-}; +- +-Writable.prototype.destroy = function() { +- this.endCalls++; +-}; +- +-function Readable() { +- this.readable = true; +- stream.Stream.call(this); +-} +-util.inherits(Readable, stream.Stream); +- +-function Duplex() { +- this.readable = true; +- Writable.call(this); +-} +-util.inherits(Duplex, Writable); +- +-var i = 0; +-var limit = 100; +- +-var w = new Writable(); +- +-var r; +- +-for (i = 0; i < limit; i++) { +- r = new Readable(); +- r.pipe(w); +- r.emit('end'); +-} +-assert.equal(0, r.listeners('end').length); +-assert.equal(limit, w.endCalls); +- +-w.endCalls = 0; +- +-for (i = 0; i < limit; i++) { +- r = new Readable(); +- r.pipe(w); +- r.emit('close'); +-} +-assert.equal(0, r.listeners('close').length); +-assert.equal(limit, w.endCalls); +- +-w.endCalls = 0; +- +-r = new Readable(); +- +-for (i = 0; i < limit; i++) { +- w = new Writable(); +- r.pipe(w); +- w.emit('close'); +-} +-assert.equal(0, w.listeners('close').length); +- +-r = new Readable(); +-w = new Writable(); +-var d = new Duplex(); +-r.pipe(d); // pipeline A +-d.pipe(w); // pipeline B +-assert.equal(r.listeners('end').length, 2); // A.onend, A.cleanup +-assert.equal(r.listeners('close').length, 2); // A.onclose, A.cleanup +-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup +-assert.equal(d.listeners('close').length, 3); // A.cleanup, B.onclose, B.cleanup +-assert.equal(w.listeners('end').length, 0); +-assert.equal(w.listeners('close').length, 1); // B.cleanup +- +-r.emit('end'); +-assert.equal(d.endCalls, 1); +-assert.equal(w.endCalls, 0); +-assert.equal(r.listeners('end').length, 0); +-assert.equal(r.listeners('close').length, 0); +-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup +-assert.equal(d.listeners('close').length, 2); // B.onclose, B.cleanup +-assert.equal(w.listeners('end').length, 0); +-assert.equal(w.listeners('close').length, 1); // B.cleanup +- +-d.emit('end'); +-assert.equal(d.endCalls, 1); +-assert.equal(w.endCalls, 1); +-assert.equal(r.listeners('end').length, 0); +-assert.equal(r.listeners('close').length, 0); +-assert.equal(d.listeners('end').length, 0); +-assert.equal(d.listeners('close').length, 0); +-assert.equal(w.listeners('end').length, 0); +-assert.equal(w.listeners('close').length, 0); +diff --git a/test/simple/test-stream-pipe-error-handling.js b/test/simple/test-stream-pipe-error-handling.js +index c5d724b..c7d6b7d 100644 +--- a/test/simple/test-stream-pipe-error-handling.js ++++ b/test/simple/test-stream-pipe-error-handling.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var Stream = require('stream').Stream; ++var Stream = require('../../').Stream; + + (function testErrorListenerCatches() { + var source = new Stream(); +diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js +index cb9d5fe..56f8d61 100644 +--- a/test/simple/test-stream-pipe-event.js ++++ b/test/simple/test-stream-pipe-event.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common'); +-var stream = require('stream'); ++var stream = require('../../'); + var assert = require('assert'); + var util = require('util'); + +diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js +index f2e6ec2..a5c9bf9 100644 +--- a/test/simple/test-stream-push-order.js ++++ b/test/simple/test-stream-push-order.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var assert = require('assert'); + + var s = new Readable({ +diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js +index 06f43dc..1701a9a 100644 +--- a/test/simple/test-stream-push-strings.js ++++ b/test/simple/test-stream-push-strings.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var util = require('util'); + + util.inherits(MyStream, Readable); +diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js +index ba6a577..a8e6f7b 100644 +--- a/test/simple/test-stream-readable-event.js ++++ b/test/simple/test-stream-readable-event.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + (function first() { + // First test, not reading when the readable is added. +diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js +index 2891ad6..11689ba 100644 +--- a/test/simple/test-stream-readable-flow-recursion.js ++++ b/test/simple/test-stream-readable-flow-recursion.js +@@ -27,7 +27,7 @@ var assert = require('assert'); + // more data continuously, but without triggering a nextTick + // warning or RangeError. + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + // throw an error if we trigger a nextTick warning. + process.throwDeprecation = true; +diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js +index 0c96476..7827538 100644 +--- a/test/simple/test-stream-unshift-empty-chunk.js ++++ b/test/simple/test-stream-unshift-empty-chunk.js +@@ -24,7 +24,7 @@ var assert = require('assert'); + + // This test verifies that stream.unshift(Buffer(0)) or + // stream.unshift('') does not set state.reading=false. +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + var r = new Readable(); + var nChunks = 10; +diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js +index 83fd9fa..17c18aa 100644 +--- a/test/simple/test-stream-unshift-read-race.js ++++ b/test/simple/test-stream-unshift-read-race.js +@@ -29,7 +29,7 @@ var assert = require('assert'); + // 3. push() after the EOF signaling null is an error. + // 4. _read() is not called after pushing the EOF null chunk. + +-var stream = require('stream'); ++var stream = require('../../'); + var hwm = 10; + var r = stream.Readable({ highWaterMark: hwm }); + var chunks = 10; +@@ -51,7 +51,14 @@ r._read = function(n) { + + function push(fast) { + assert(!pushedNull, 'push() after null push'); +- var c = pos >= data.length ? null : data.slice(pos, pos + n); ++ var c; ++ if (pos >= data.length) ++ c = null; ++ else { ++ if (n + pos > data.length) ++ n = data.length - pos; ++ c = data.slice(pos, pos + n); ++ } + pushedNull = c === null; + if (fast) { + pos += n; +diff --git a/test/simple/test-stream-writev.js b/test/simple/test-stream-writev.js +index 5b49e6e..b5321f3 100644 +--- a/test/simple/test-stream-writev.js ++++ b/test/simple/test-stream-writev.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var stream = require('stream'); ++var stream = require('../../'); + + var queue = []; + for (var decode = 0; decode < 2; decode++) { +diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js +index 3814bf0..248c1be 100644 +--- a/test/simple/test-stream2-basic.js ++++ b/test/simple/test-stream2-basic.js +@@ -21,7 +21,7 @@ + + + var common = require('../common.js'); +-var R = require('_stream_readable'); ++var R = require('../../lib/_stream_readable'); + var assert = require('assert'); + + var util = require('util'); +diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js +index 6cdd4e9..f0fa84b 100644 +--- a/test/simple/test-stream2-compatibility.js ++++ b/test/simple/test-stream2-compatibility.js +@@ -21,7 +21,7 @@ + + + var common = require('../common.js'); +-var R = require('_stream_readable'); ++var R = require('../../lib/_stream_readable'); + var assert = require('assert'); + + var util = require('util'); +diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js +index 39b274f..006a19b 100644 +--- a/test/simple/test-stream2-finish-pipe.js ++++ b/test/simple/test-stream2-finish-pipe.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var stream = require('stream'); ++var stream = require('../../'); + var Buffer = require('buffer').Buffer; + + var r = new stream.Readable(); +diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js +deleted file mode 100644 +index e162406..0000000 +--- a/test/simple/test-stream2-fs.js ++++ /dev/null +@@ -1,72 +0,0 @@ +-// Copyright Joyent, Inc. and other Node contributors. +-// +-// Permission is hereby granted, free of charge, to any person obtaining a +-// copy of this software and associated documentation files (the +-// "Software"), to deal in the Software without restriction, including +-// without limitation the rights to use, copy, modify, merge, publish, +-// distribute, sublicense, and/or sell copies of the Software, and to permit +-// persons to whom the Software is furnished to do so, subject to the +-// following conditions: +-// +-// The above copyright notice and this permission notice shall be included +-// in all copies or substantial portions of the Software. +-// +-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +-// USE OR OTHER DEALINGS IN THE SOFTWARE. +- +- +-var common = require('../common.js'); +-var R = require('_stream_readable'); +-var assert = require('assert'); +- +-var fs = require('fs'); +-var FSReadable = fs.ReadStream; +- +-var path = require('path'); +-var file = path.resolve(common.fixturesDir, 'x1024.txt'); +- +-var size = fs.statSync(file).size; +- +-var expectLengths = [1024]; +- +-var util = require('util'); +-var Stream = require('stream'); +- +-util.inherits(TestWriter, Stream); +- +-function TestWriter() { +- Stream.apply(this); +- this.buffer = []; +- this.length = 0; +-} +- +-TestWriter.prototype.write = function(c) { +- this.buffer.push(c.toString()); +- this.length += c.length; +- return true; +-}; +- +-TestWriter.prototype.end = function(c) { +- if (c) this.buffer.push(c.toString()); +- this.emit('results', this.buffer); +-} +- +-var r = new FSReadable(file); +-var w = new TestWriter(); +- +-w.on('results', function(res) { +- console.error(res, w.length); +- assert.equal(w.length, size); +- var l = 0; +- assert.deepEqual(res.map(function (c) { +- return c.length; +- }), expectLengths); +- console.log('ok'); +-}); +- +-r.pipe(w); +diff --git a/test/simple/test-stream2-httpclient-response-end.js b/test/simple/test-stream2-httpclient-response-end.js +deleted file mode 100644 +index 15cffc2..0000000 +--- a/test/simple/test-stream2-httpclient-response-end.js ++++ /dev/null +@@ -1,52 +0,0 @@ +-// Copyright Joyent, Inc. and other Node contributors. +-// +-// Permission is hereby granted, free of charge, to any person obtaining a +-// copy of this software and associated documentation files (the +-// "Software"), to deal in the Software without restriction, including +-// without limitation the rights to use, copy, modify, merge, publish, +-// distribute, sublicense, and/or sell copies of the Software, and to permit +-// persons to whom the Software is furnished to do so, subject to the +-// following conditions: +-// +-// The above copyright notice and this permission notice shall be included +-// in all copies or substantial portions of the Software. +-// +-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +-// USE OR OTHER DEALINGS IN THE SOFTWARE. +- +-var common = require('../common.js'); +-var assert = require('assert'); +-var http = require('http'); +-var msg = 'Hello'; +-var readable_event = false; +-var end_event = false; +-var server = http.createServer(function(req, res) { +- res.writeHead(200, {'Content-Type': 'text/plain'}); +- res.end(msg); +-}).listen(common.PORT, function() { +- http.get({port: common.PORT}, function(res) { +- var data = ''; +- res.on('readable', function() { +- console.log('readable event'); +- readable_event = true; +- data += res.read(); +- }); +- res.on('end', function() { +- console.log('end event'); +- end_event = true; +- assert.strictEqual(msg, data); +- server.close(); +- }); +- }); +-}); +- +-process.on('exit', function() { +- assert(readable_event); +- assert(end_event); +-}); +- +diff --git a/test/simple/test-stream2-large-read-stall.js b/test/simple/test-stream2-large-read-stall.js +index 2fbfbca..667985b 100644 +--- a/test/simple/test-stream2-large-read-stall.js ++++ b/test/simple/test-stream2-large-read-stall.js +@@ -30,7 +30,7 @@ var PUSHSIZE = 20; + var PUSHCOUNT = 1000; + var HWM = 50; + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var r = new Readable({ + highWaterMark: HWM + }); +@@ -39,23 +39,23 @@ var rs = r._readableState; + r._read = push; + + r.on('readable', function() { +- console.error('>> readable'); ++ //console.error('>> readable'); + do { +- console.error(' > read(%d)', READSIZE); ++ //console.error(' > read(%d)', READSIZE); + var ret = r.read(READSIZE); +- console.error(' < %j (%d remain)', ret && ret.length, rs.length); ++ //console.error(' < %j (%d remain)', ret && ret.length, rs.length); + } while (ret && ret.length === READSIZE); + +- console.error('<< after read()', +- ret && ret.length, +- rs.needReadable, +- rs.length); ++ //console.error('<< after read()', ++ // ret && ret.length, ++ // rs.needReadable, ++ // rs.length); + }); + + var endEmitted = false; + r.on('end', function() { + endEmitted = true; +- console.error('end'); ++ //console.error('end'); + }); + + var pushes = 0; +@@ -64,11 +64,11 @@ function push() { + return; + + if (pushes++ === PUSHCOUNT) { +- console.error(' push(EOF)'); ++ //console.error(' push(EOF)'); + return r.push(null); + } + +- console.error(' push #%d', pushes); ++ //console.error(' push #%d', pushes); + if (r.push(new Buffer(PUSHSIZE))) + setTimeout(push); + } +diff --git a/test/simple/test-stream2-objects.js b/test/simple/test-stream2-objects.js +index 3e6931d..ff47d89 100644 +--- a/test/simple/test-stream2-objects.js ++++ b/test/simple/test-stream2-objects.js +@@ -21,8 +21,8 @@ + + + var common = require('../common.js'); +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('../../lib/_stream_readable'); ++var Writable = require('../../lib/_stream_writable'); + var assert = require('assert'); + + // tiny node-tap lookalike. +diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js +index cf7531c..e3f3e4e 100644 +--- a/test/simple/test-stream2-pipe-error-handling.js ++++ b/test/simple/test-stream2-pipe-error-handling.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + + (function testErrorListenerCatches() { + var count = 1000; +diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js +index 5e8e3cb..53b2616 100755 +--- a/test/simple/test-stream2-pipe-error-once-listener.js ++++ b/test/simple/test-stream2-pipe-error-once-listener.js +@@ -24,7 +24,7 @@ var common = require('../common.js'); + var assert = require('assert'); + + var util = require('util'); +-var stream = require('stream'); ++var stream = require('../../'); + + + var Read = function() { +diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js +index b63edc3..eb2b0e9 100644 +--- a/test/simple/test-stream2-push.js ++++ b/test/simple/test-stream2-push.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var stream = require('stream'); ++var stream = require('../../'); + var Readable = stream.Readable; + var Writable = stream.Writable; + var assert = require('assert'); +diff --git a/test/simple/test-stream2-read-sync-stack.js b/test/simple/test-stream2-read-sync-stack.js +index e8a7305..9740a47 100644 +--- a/test/simple/test-stream2-read-sync-stack.js ++++ b/test/simple/test-stream2-read-sync-stack.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var r = new Readable(); + var N = 256 * 1024; + +diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js +index cd30178..4b1659d 100644 +--- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js ++++ b/test/simple/test-stream2-readable-empty-buffer-no-eof.js +@@ -22,10 +22,9 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + test1(); +-test2(); + + function test1() { + var r = new Readable(); +@@ -88,31 +87,3 @@ function test1() { + console.log('ok'); + }); + } +- +-function test2() { +- var r = new Readable({ encoding: 'base64' }); +- var reads = 5; +- r._read = function(n) { +- if (!reads--) +- return r.push(null); // EOF +- else +- return r.push(new Buffer('x')); +- }; +- +- var results = []; +- function flow() { +- var chunk; +- while (null !== (chunk = r.read())) +- results.push(chunk + ''); +- } +- r.on('readable', flow); +- r.on('end', function() { +- results.push('EOF'); +- }); +- flow(); +- +- process.on('exit', function() { +- assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]); +- console.log('ok'); +- }); +-} +diff --git a/test/simple/test-stream2-readable-from-list.js b/test/simple/test-stream2-readable-from-list.js +index 7c96ffe..04a96f5 100644 +--- a/test/simple/test-stream2-readable-from-list.js ++++ b/test/simple/test-stream2-readable-from-list.js +@@ -21,7 +21,7 @@ + + var assert = require('assert'); + var common = require('../common.js'); +-var fromList = require('_stream_readable')._fromList; ++var fromList = require('../../lib/_stream_readable')._fromList; + + // tiny node-tap lookalike. + var tests = []; +diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js +index 675da8e..51fd3d5 100644 +--- a/test/simple/test-stream2-readable-legacy-drain.js ++++ b/test/simple/test-stream2-readable-legacy-drain.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Stream = require('stream'); ++var Stream = require('../../'); + var Readable = Stream.Readable; + + var r = new Readable(); +diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js +index 7314ae7..c971898 100644 +--- a/test/simple/test-stream2-readable-non-empty-end.js ++++ b/test/simple/test-stream2-readable-non-empty-end.js +@@ -21,7 +21,7 @@ + + var assert = require('assert'); + var common = require('../common.js'); +-var Readable = require('_stream_readable'); ++var Readable = require('../../lib/_stream_readable'); + + var len = 0; + var chunks = new Array(10); +diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js +index 2e5cf25..fd8a3dc 100644 +--- a/test/simple/test-stream2-readable-wrap-empty.js ++++ b/test/simple/test-stream2-readable-wrap-empty.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('_stream_readable'); ++var Readable = require('../../lib/_stream_readable'); + var EE = require('events').EventEmitter; + + var oldStream = new EE(); +diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js +index 90eea01..6b177f7 100644 +--- a/test/simple/test-stream2-readable-wrap.js ++++ b/test/simple/test-stream2-readable-wrap.js +@@ -22,8 +22,8 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('../../lib/_stream_readable'); ++var Writable = require('../../lib/_stream_writable'); + var EE = require('events').EventEmitter; + + var testRuns = 0, completedRuns = 0; +diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js +index 5d2c32a..685531b 100644 +--- a/test/simple/test-stream2-set-encoding.js ++++ b/test/simple/test-stream2-set-encoding.js +@@ -22,7 +22,7 @@ + + var common = require('../common.js'); + var assert = require('assert'); +-var R = require('_stream_readable'); ++var R = require('../../lib/_stream_readable'); + var util = require('util'); + + // tiny node-tap lookalike. +diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js +index 9c9ddd8..a0cacc6 100644 +--- a/test/simple/test-stream2-transform.js ++++ b/test/simple/test-stream2-transform.js +@@ -21,8 +21,8 @@ + + var assert = require('assert'); + var common = require('../common.js'); +-var PassThrough = require('_stream_passthrough'); +-var Transform = require('_stream_transform'); ++var PassThrough = require('../../').PassThrough; ++var Transform = require('../../').Transform; + + // tiny node-tap lookalike. + var tests = []; +diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js +index d66dc3c..365b327 100644 +--- a/test/simple/test-stream2-unpipe-drain.js ++++ b/test/simple/test-stream2-unpipe-drain.js +@@ -22,7 +22,7 @@ + + var common = require('../common.js'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + var crypto = require('crypto'); + + var util = require('util'); +diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js +index 99f8746..17c92ae 100644 +--- a/test/simple/test-stream2-unpipe-leak.js ++++ b/test/simple/test-stream2-unpipe-leak.js +@@ -22,7 +22,7 @@ + + var common = require('../common.js'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + + var chunk = new Buffer('hallo'); + +diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js +index 704100c..209c3a6 100644 +--- a/test/simple/test-stream2-writable.js ++++ b/test/simple/test-stream2-writable.js +@@ -20,8 +20,8 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var W = require('_stream_writable'); +-var D = require('_stream_duplex'); ++var W = require('../../').Writable; ++var D = require('../../').Duplex; + var assert = require('assert'); + + var util = require('util'); +diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js +index b91bde3..2f72c15 100644 +--- a/test/simple/test-stream3-pause-then-read.js ++++ b/test/simple/test-stream3-pause-then-read.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var stream = require('stream'); ++var stream = require('../../'); + var Readable = stream.Readable; + var Writable = stream.Writable; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/package.json new file mode 100644 index 00000000..0d81002e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/package.json @@ -0,0 +1,70 @@ +{ + "name": "readable-stream", + "version": "1.1.13", + "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", + "main": "readable.js", + "dependencies": { + "core-util-is": "~1.0.0", + "isarray": "0.0.1", + "string_decoder": "~0.10.x", + "inherits": "~2.0.1" + }, + "devDependencies": { + "tap": "~0.2.6" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/readable-stream.git" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "browser": { + "util": false + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "MIT", + "gitHead": "3b672fd7ae92acf5b4ffdbabf74b372a0a56b051", + "bugs": { + "url": "https://github.com/isaacs/readable-stream/issues" + }, + "homepage": "https://github.com/isaacs/readable-stream", + "_id": "readable-stream@1.1.13", + "_shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "_from": "readable-stream@>=1.1.13 <1.2.0", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "f6eef764f514c89e2b9e23146a75ba106756d23e", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/passthrough.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/passthrough.js new file mode 100644 index 00000000..0f928c2c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_passthrough.js") diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/readable.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/readable.js new file mode 100644 index 00000000..c6840862 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/readable.js @@ -0,0 +1,7 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = require('stream'); +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/transform.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/transform.js new file mode 100644 index 00000000..5fe351a4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_transform.js") diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/writable.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/writable.js new file mode 100644 index 00000000..88e12270 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/readable-stream/writable.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_writable.js") diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/.npmignore new file mode 100644 index 00000000..92abb211 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/.npmignore @@ -0,0 +1,3 @@ +*~ +.#* +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/LICENSE new file mode 100644 index 00000000..8ed0832d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/README.md new file mode 100644 index 00000000..f35b8c51 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/README.md @@ -0,0 +1,68 @@ +realize-package-specifier +------------------------- + +Parse a package specifier, peeking at the disk to differentiate between +local tarballs, directories and named modules. This implements the logic +used by `npm install` and `npm cache` to determine where to get packages +from. + +```javascript +var realizePackageSpecifier = require("realize-package-specifier") +realizePackageSpecifier("foo.tar.gz", ".", function (err, package) { + … +}) +``` + +## Using + +* realizePackageSpecifier(*spec*, [*where*,] *callback*) + +Parses *spec* using `npm-package-arg` and then uses stat to check to see if +it refers to a local tarball or package directory. Stats are done relative +to *where*. If it does then the local module is loaded. If it doesn't then +target is left as a remote package specifier. Package directories are +recognized by the presence of a package.json in them. + +*spec* -- a package specifier, like: `foo@1.2`, or `foo@user/foo`, or +`http://x.com/foo.tgz`, or `git+https://github.com/user/foo` + +*where* (optional, default: .) -- The directory in which we should look for +local tarballs or package directories. + +*callback* function(*err*, *result*) -- Called once we've determined what +kind of specifier this is. The *result* object will be very like the one +returned by `npm-package-arg` except with three differences: 1) There's a +new type of `directory`. 2) The `local` type only refers to tarballs. 2) +For all `local` and `directory` type results spec will contain the full path of +the local package. + +## Result Object + +The full definition of the result object is: + +* `name` - If known, the `name` field expected in the resulting pkg. +* `type` - One of the following strings: + * `git` - A git repo + * `hosted` - A hosted project, from github, bitbucket or gitlab. Originally + either a full url pointing at one of these services or a shorthand like + `user/project` or `github:user/project` for github or `bitbucket:user/project` + for bitbucket. + * `tag` - A tagged version, like `"foo@latest"` + * `version` - A specific version number, like `"foo@1.2.3"` + * `range` - A version range, like `"foo@2.x"` + * `local` - A local file path + * `directory` - A local package directory + * `remote` - An http url (presumably to a tgz) +* `spec` - The "thing". URL, the range, git repo, etc. +* `hosted` - If type=hosted this will be an object with the following keys: + * `type` - github, bitbucket or gitlab + * `ssh` - The ssh path for this git repo + * `sshurl` - The ssh URL for this git repo + * `https` - The HTTPS URL for this git repo + * `directUrl` - The URL for the package.json in this git repo +* `raw` - The original un-modified string that was provided. +* `rawSpec` - The part after the `name@...`, as it was originally + provided. +* `scope` - If a name is something like `@org/module` then the `scope` + field will be set to `org`. If it doesn't have a scoped name, then + scope is `null`. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/index.js new file mode 100644 index 00000000..d09d3f31 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/index.js @@ -0,0 +1,39 @@ +"use strict" +var fs = require("fs") +var path = require("path") +var dz = require("dezalgo") +var npa = require("npm-package-arg") + +module.exports = function (spec, where, cb) { + if (where instanceof Function) { cb = where; where = null } + if (where == null) where = "." + cb = dz(cb) + try { + var dep = npa(spec) + } + catch (e) { + return cb(e) + } + if ((dep.type == "range" || dep.type == "version") && dep.name != dep.raw) return cb(null, dep) + var specpath = dep.type == "local" + ? path.resolve(where, dep.spec) + : path.resolve(dep.rawSpec? dep.rawSpec: dep.name) + fs.stat(specpath, function (er, s) { + if (er) return finalize() + if (!s.isDirectory()) return finalize("local") + fs.stat(path.join(specpath, "package.json"), function (er) { + finalize(er ? null : "directory") + }) + }) + function finalize(type) { + if (type != null && type != dep.type) { + dep.type = type + if (! dep.rawSpec) { + dep.rawSpec = dep.name + dep.name = null + } + } + if (dep.type == "local" || dep.type == "directory") dep.spec = specpath + cb(null, dep) + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/package.json new file mode 100644 index 00000000..6a5fb71f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/realize-package-specifier/package.json @@ -0,0 +1,57 @@ +{ + "name": "realize-package-specifier", + "version": "3.0.1", + "description": "Like npm-package-arg, but more so, producing full file paths and differentiating local tar and directory sources.", + "main": "index.js", + "scripts": { + "test": "tap test/*.js" + }, + "license": "ISC", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/realize-package-specifier.git" + }, + "author": { + "name": "Rebecca Turner", + "email": "me@re-becca.org", + "url": "http://re-becca.org" + }, + "homepage": "https://github.com/npm/realize-package-specifier", + "dependencies": { + "dezalgo": "^1.0.1", + "npm-package-arg": "^4.0.0" + }, + "devDependencies": { + "require-inject": "^1.1.0", + "tap": "^0.4.12" + }, + "gitHead": "4f50130fa6b5e80954a90ea12bab382f53d890b1", + "bugs": { + "url": "https://github.com/npm/realize-package-specifier/issues" + }, + "_id": "realize-package-specifier@3.0.1", + "_shasum": "fde32e926448e38f99334d95b7b08d51e3a98d9f", + "_from": "realize-package-specifier@>=3.0.0 <3.1.0", + "_npmVersion": "2.10.1", + "_nodeVersion": "2.0.2", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "dist": { + "shasum": "fde32e926448e38f99334d95b7b08d51e3a98d9f", + "tarball": "http://registry.npmjs.org/realize-package-specifier/-/realize-package-specifier-3.0.1.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/realize-package-specifier/-/realize-package-specifier-3.0.1.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/request/.eslintrc b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/.eslintrc new file mode 100644 index 00000000..93ff98ea --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/.eslintrc @@ -0,0 +1,45 @@ +{ + "env": { + "node": true + }, + "rules": { + // 2-space indentation + "indent": [2, 2, {"SwitchCase": 1}], + // Disallow semi-colons, unless needed to disambiguate statement + "semi": [2, "never"], + // Require strings to use single quotes + "quotes": [2, "single"], + // Require curly braces for all control statements + "curly": 2, + // Disallow using variables and functions before they've been defined + "no-use-before-define": 2, + // Allow any case for variable naming + "camelcase": 0, + // Disallow unused variables, except as function arguments + "no-unused-vars": [2, {"args":"none"}], + // Allow leading underscores for method names + // REASON: we use underscores to denote private methods + "no-underscore-dangle": 0, + // Allow multi spaces around operators since they are + // used for alignment. This is not consistent in the + // code. + "no-multi-spaces": 0, + // Style rule is: most objects use { beforeColon: false, afterColon: true }, unless aligning which uses: + // + // { + // beforeColon : true, + // afterColon : true + // } + // + // eslint can't handle this, so the check is disabled. + "key-spacing": 0, + // Allow shadowing vars in outer scope (needs discussion) + "no-shadow": 0, + // Use if () { } + // ^ space + "space-after-keywords": [2, "always"], + // Use if () { } + // ^ space + "space-before-blocks": [2, "always"] + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/request/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/.npmignore new file mode 100644 index 00000000..042b5206 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/.npmignore @@ -0,0 +1,6 @@ +coverage +tests +node_modules +examples +release.sh +disabled.appveyor.yml diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/request/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/.travis.yml new file mode 100644 index 00000000..81faaffd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/.travis.yml @@ -0,0 +1,15 @@ +language: node_js +node_js: + - node + - io.js + - 0.12 + - 0.10 +sudo: false + +after_script: "npm run test-cov && cat ./coverage/lcov.info | codecov && cat ./coverage/lcov.info | coveralls" + +webhooks: + urls: https://webhooks.gitter.im/e/237280ed4796c19cc626 + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: false # default: false diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/request/CHANGELOG.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/CHANGELOG.md new file mode 100644 index 00000000..86386a9a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/CHANGELOG.md @@ -0,0 +1,593 @@ +## Change Log + +### v2.68.0 (2016/01/27) +- [#2036](https://github.com/request/request/pull/2036) Add AWS Signature Version 4 (@simov, @mirkods) +- [#2022](https://github.com/request/request/pull/2022) Convert numeric multipart bodies to string (@simov, @feross) +- [#2024](https://github.com/request/request/pull/2024) Update har-validator dependency for nsp advisory #76 (@TylerDixon) +- [#2016](https://github.com/request/request/pull/2016) Update qs to version 6.0.2 🚀 (@greenkeeperio-bot) +- [#2007](https://github.com/request/request/pull/2007) Use the `extend` module instead of util._extend (@simov) +- [#2003](https://github.com/request/request/pull/2003) Update browserify to version 13.0.0 🚀 (@greenkeeperio-bot) +- [#1989](https://github.com/request/request/pull/1989) Update buffer-equal to version 1.0.0 🚀 (@greenkeeperio-bot) +- [#1956](https://github.com/request/request/pull/1956) Check form-data content-length value before setting up the header (@jongyoonlee) +- [#1958](https://github.com/request/request/pull/1958) Use IncomingMessage.destroy method (@simov) +- [#1952](https://github.com/request/request/pull/1952) Adds example for Tor proxy (@prometheansacrifice) +- [#1943](https://github.com/request/request/pull/1943) Update eslint to version 1.10.3 🚀 (@simov, @greenkeeperio-bot) +- [#1924](https://github.com/request/request/pull/1924) Update eslint to version 1.10.1 🚀 (@greenkeeperio-bot) +- [#1915](https://github.com/request/request/pull/1915) Remove content-length and transfer-encoding headers from defaultProxyHeaderWhiteList (@yaxia) + +### v2.67.0 (2015/11/19) +- [#1913](https://github.com/request/request/pull/1913) Update http-signature to version 1.1.0 🚀 (@greenkeeperio-bot) + +### v2.66.0 (2015/11/18) +- [#1906](https://github.com/request/request/pull/1906) Update README URLs based on HTTP redirects (@ReadmeCritic) +- [#1905](https://github.com/request/request/pull/1905) Convert typed arrays into regular buffers (@simov) +- [#1902](https://github.com/request/request/pull/1902) node-uuid@1.4.7 breaks build 🚨 (@greenkeeperio-bot) +- [#1894](https://github.com/request/request/pull/1894) Fix tunneling after redirection from https (Original: #1881) (@simov, @falms) +- [#1893](https://github.com/request/request/pull/1893) Update eslint to version 1.9.0 🚀 (@greenkeeperio-bot) +- [#1852](https://github.com/request/request/pull/1852) Update eslint to version 1.7.3 🚀 (@simov, @greenkeeperio-bot, @paulomcnally, @michelsalib, @arbaaz, @vladimirich, @LoicMahieu, @JoshWillik, @jzaefferer, @ryanwholey, @djchie, @thisconnect, @mgenereu, @acroca, @Sebmaster, @Bloutiouf) +- [#1876](https://github.com/request/request/pull/1876) Implement loose matching for har mime types (@simov) +- [#1875](https://github.com/request/request/pull/1875) Update bluebird to version 3.0.2 🚀 (@simov, @greenkeeperio-bot) +- [#1871](https://github.com/request/request/pull/1871) Update browserify to version 12.0.1 🚀 (@greenkeeperio-bot) +- [#1866](https://github.com/request/request/pull/1866) Add missing quotes on x-token property in README (@miguelmota) +- [#1874](https://github.com/request/request/pull/1874) Fix typo in README.md (@gswalden) +- [#1860](https://github.com/request/request/pull/1860) Improve referer header tests and docs (@simov) +- [#1861](https://github.com/request/request/pull/1861) Remove redundant call to Stream constructor (@watson) +- [#1857](https://github.com/request/request/pull/1857) Fix Referer header to point to the original host name (@simov) +- [#1850](https://github.com/request/request/pull/1850) Update karma-coverage to version 0.5.3 🚀 (@greenkeeperio-bot) +- [#1847](https://github.com/request/request/pull/1847) Use node's latest version when building (@simov) +- [#1836](https://github.com/request/request/pull/1836) Tunnel: fix wrong property name (@Bloutiouf) +- [#1820](https://github.com/request/request/pull/1820) Set href as request.js uses it (@mgenereu) +- [#1840](https://github.com/request/request/pull/1840) Update http-signature to version 1.0.2 🚀 (@greenkeeperio-bot) +- [#1845](https://github.com/request/request/pull/1845) Update istanbul to version 0.4.0 🚀 (@greenkeeperio-bot) + +### v2.65.0 (2015/10/11) +- [#1833](https://github.com/request/request/pull/1833) Update aws-sign2 to version 0.6.0 🚀 (@greenkeeperio-bot) +- [#1811](https://github.com/request/request/pull/1811) Enable loose cookie parsing in tough-cookie (@Sebmaster) +- [#1830](https://github.com/request/request/pull/1830) Bring back tilde ranges for all dependencies (@simov) +- [#1821](https://github.com/request/request/pull/1821) Implement support for RFC 2617 MD5-sess algorithm. (@BigDSK) +- [#1828](https://github.com/request/request/pull/1828) Updated qs dependency to 5.2.0 (@acroca) +- [#1818](https://github.com/request/request/pull/1818) Extract `readResponseBody` method out of `onRequestResponse` (@pvoisin) +- [#1819](https://github.com/request/request/pull/1819) Run stringify once (@mgenereu) +- [#1814](https://github.com/request/request/pull/1814) Updated har-validator to version 2.0.2 (@greenkeeperio-bot) +- [#1807](https://github.com/request/request/pull/1807) Updated tough-cookie to version 2.1.0 (@greenkeeperio-bot) +- [#1800](https://github.com/request/request/pull/1800) Add caret ranges for devDependencies, except eslint (@simov) +- [#1799](https://github.com/request/request/pull/1799) Updated karma-browserify to version 4.4.0 (@greenkeeperio-bot) +- [#1797](https://github.com/request/request/pull/1797) Updated tape to version 4.2.0 (@greenkeeperio-bot) +- [#1788](https://github.com/request/request/pull/1788) Pinned all dependencies (@greenkeeperio-bot) + +### v2.64.0 (2015/09/25) +- [#1787](https://github.com/request/request/pull/1787) npm ignore examples, release.sh and disabled.appveyor.yml (@thisconnect) +- [#1775](https://github.com/request/request/pull/1775) Fix typo in README.md (@djchie) +- [#1776](https://github.com/request/request/pull/1776) Changed word 'conjuction' to read 'conjunction' in README.md (@ryanwholey) +- [#1785](https://github.com/request/request/pull/1785) Revert: Set default application/json content-type when using json option #1772 (@simov) + +### v2.63.0 (2015/09/21) +- [#1772](https://github.com/request/request/pull/1772) Set default application/json content-type when using json option (@jzaefferer) + +### v2.62.0 (2015/09/15) +- [#1768](https://github.com/request/request/pull/1768) Add node 4.0 to the list of build targets (@simov) +- [#1767](https://github.com/request/request/pull/1767) Query strings now cooperate with unix sockets (@JoshWillik) +- [#1750](https://github.com/request/request/pull/1750) Revert doc about installation of tough-cookie added in #884 (@LoicMahieu) +- [#1746](https://github.com/request/request/pull/1746) Missed comma in Readme (@vladimirich) +- [#1743](https://github.com/request/request/pull/1743) Fix options not being initialized in defaults method (@simov) + +### v2.61.0 (2015/08/19) +- [#1721](https://github.com/request/request/pull/1721) Minor fix in README.md (@arbaaz) +- [#1733](https://github.com/request/request/pull/1733) Avoid useless Buffer transformation (@michelsalib) +- [#1726](https://github.com/request/request/pull/1726) Update README.md (@paulomcnally) +- [#1715](https://github.com/request/request/pull/1715) Fix forever option in node > 0.10 #1709 (@calibr) +- [#1716](https://github.com/request/request/pull/1716) Do not create Buffer from Object in setContentLength(iojs v3.0 issue) (@calibr) +- [#1711](https://github.com/request/request/pull/1711) Add ability to detect connect timeouts (@kevinburke) +- [#1712](https://github.com/request/request/pull/1712) Set certificate expiration to August 2, 2018 (@kevinburke) +- [#1700](https://github.com/request/request/pull/1700) debug() when JSON.parse() on a response body fails (@phillipj) + +### v2.60.0 (2015/07/21) +- [#1687](https://github.com/request/request/pull/1687) Fix caseless bug - content-type not being set for multipart/form-data (@simov, @garymathews) + +### v2.59.0 (2015/07/20) +- [#1671](https://github.com/request/request/pull/1671) Add tests and docs for using the agent, agentClass, agentOptions and forever options. Forever option defaults to using http(s).Agent in node 0.12+ (@simov) +- [#1679](https://github.com/request/request/pull/1679) Fix - do not remove OAuth param when using OAuth realm (@simov, @jhalickman) +- [#1668](https://github.com/request/request/pull/1668) updated dependencies (@deamme) +- [#1656](https://github.com/request/request/pull/1656) Fix form method (@simov) +- [#1651](https://github.com/request/request/pull/1651) Preserve HEAD method when using followAllRedirects (@simov) +- [#1652](https://github.com/request/request/pull/1652) Update `encoding` option documentation in README.md (@daniel347x) +- [#1650](https://github.com/request/request/pull/1650) Allow content-type overriding when using the `form` option (@simov) +- [#1646](https://github.com/request/request/pull/1646) Clarify the nature of setting `ca` in `agentOptions` (@jeffcharles) + +### v2.58.0 (2015/06/16) +- [#1638](https://github.com/request/request/pull/1638) Use the `extend` module to deep extend in the defaults method (@simov) +- [#1631](https://github.com/request/request/pull/1631) Move tunnel logic into separate module (@simov) +- [#1634](https://github.com/request/request/pull/1634) Fix OAuth query transport_method (@simov) +- [#1603](https://github.com/request/request/pull/1603) Add codecov (@simov) + +### v2.57.0 (2015/05/31) +- [#1615](https://github.com/request/request/pull/1615) Replace '.client' with '.socket' as the former was deprecated in 2.2.0. (@ChALkeR) + +### v2.56.0 (2015/05/28) +- [#1610](https://github.com/request/request/pull/1610) Bump module dependencies (@simov) +- [#1600](https://github.com/request/request/pull/1600) Extract the querystring logic into separate module (@simov) +- [#1607](https://github.com/request/request/pull/1607) Re-generate certificates (@simov) +- [#1599](https://github.com/request/request/pull/1599) Move getProxyFromURI logic below the check for Invaild URI (#1595) (@simov) +- [#1598](https://github.com/request/request/pull/1598) Fix the way http verbs are defined in order to please intellisense IDEs (@simov, @flannelJesus) +- [#1591](https://github.com/request/request/pull/1591) A few minor fixes: (@simov) +- [#1584](https://github.com/request/request/pull/1584) Refactor test-default tests (according to comments in #1430) (@simov) +- [#1585](https://github.com/request/request/pull/1585) Fixing documentation regarding TLS options (#1583) (@mainakae) +- [#1574](https://github.com/request/request/pull/1574) Refresh the oauth_nonce on redirect (#1573) (@simov) +- [#1570](https://github.com/request/request/pull/1570) Discovered tests that weren't properly running (@seanstrom) +- [#1569](https://github.com/request/request/pull/1569) Fix pause before response arrives (@kevinoid) +- [#1558](https://github.com/request/request/pull/1558) Emit error instead of throw (@simov) +- [#1568](https://github.com/request/request/pull/1568) Fix stall when piping gzipped response (@kevinoid) +- [#1560](https://github.com/request/request/pull/1560) Update combined-stream (@apechimp) +- [#1543](https://github.com/request/request/pull/1543) Initial support for oauth_body_hash on json payloads (@simov, @aesopwolf) +- [#1541](https://github.com/request/request/pull/1541) Fix coveralls (@simov) +- [#1540](https://github.com/request/request/pull/1540) Fix recursive defaults for convenience methods (@simov) +- [#1536](https://github.com/request/request/pull/1536) More eslint style rules (@froatsnook) +- [#1533](https://github.com/request/request/pull/1533) Adding dependency status bar to README.md (@YasharF) +- [#1539](https://github.com/request/request/pull/1539) ensure the latest version of har-validator is included (@ahmadnassri) +- [#1516](https://github.com/request/request/pull/1516) forever+pool test (@devTristan) + +### v2.55.0 (2015/04/05) +- [#1520](https://github.com/request/request/pull/1520) Refactor defaults (@simov) +- [#1525](https://github.com/request/request/pull/1525) Delete request headers with undefined value. (@froatsnook) +- [#1521](https://github.com/request/request/pull/1521) Add promise tests (@simov) +- [#1518](https://github.com/request/request/pull/1518) Fix defaults (@simov) +- [#1515](https://github.com/request/request/pull/1515) Allow static invoking of convenience methods (@simov) +- [#1505](https://github.com/request/request/pull/1505) Fix multipart boundary extraction regexp (@simov) +- [#1510](https://github.com/request/request/pull/1510) Fix basic auth form data (@simov) + +### v2.54.0 (2015/03/24) +- [#1501](https://github.com/request/request/pull/1501) HTTP Archive 1.2 support (@ahmadnassri) +- [#1486](https://github.com/request/request/pull/1486) Add a test for the forever agent (@akshayp) +- [#1500](https://github.com/request/request/pull/1500) Adding handling for no auth method and null bearer (@philberg) +- [#1498](https://github.com/request/request/pull/1498) Add table of contents in readme (@simov) +- [#1477](https://github.com/request/request/pull/1477) Add support for qs options via qsOptions key (@simov) +- [#1496](https://github.com/request/request/pull/1496) Parameters encoded to base 64 should be decoded as UTF-8, not ASCII. (@albanm) +- [#1494](https://github.com/request/request/pull/1494) Update eslint (@froatsnook) +- [#1474](https://github.com/request/request/pull/1474) Require Colon in Basic Auth (@erykwalder) +- [#1481](https://github.com/request/request/pull/1481) Fix baseUrl and redirections. (@burningtree) +- [#1469](https://github.com/request/request/pull/1469) Feature/base url (@froatsnook) +- [#1459](https://github.com/request/request/pull/1459) Add option to time request/response cycle (including rollup of redirects) (@aaron-em) +- [#1468](https://github.com/request/request/pull/1468) Re-enable io.js/node 0.12 build (@simov, @mikeal, @BBB) +- [#1442](https://github.com/request/request/pull/1442) Fixed the issue with strictSSL tests on 0.12 & io.js by explicitly setting a cipher that matches the cert. (@BBB, @nicolasmccurdy, @demohi, @simov, @0x4139) +- [#1460](https://github.com/request/request/pull/1460) localAddress or proxy config is lost when redirecting (@simov, @0x4139) +- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nicolasmccurdy, @demohi) +- [#1426](https://github.com/request/request/pull/1426) Fixing tests to pass on io.js and node 0.12 (only test-https.js stiff failing) (@mikeal) +- [#1446](https://github.com/request/request/pull/1446) Missing HTTP referer header with redirects Fixes #1038 (@simov, @guimonz) +- [#1428](https://github.com/request/request/pull/1428) Deprecate Node v0.8.x (@nylen) +- [#1436](https://github.com/request/request/pull/1436) Add ability to set a requester without setting default options (@tikotzky) +- [#1435](https://github.com/request/request/pull/1435) dry up verb methods (@sethpollack) +- [#1423](https://github.com/request/request/pull/1423) Allow fully qualified multipart content-type header (@simov) +- [#1430](https://github.com/request/request/pull/1430) Fix recursive requester (@tikotzky) +- [#1429](https://github.com/request/request/pull/1429) Throw error when making HEAD request with a body (@tikotzky) +- [#1419](https://github.com/request/request/pull/1419) Add note that the project is broken in 0.12.x (@nylen) +- [#1413](https://github.com/request/request/pull/1413) Fix basic auth (@simov) +- [#1397](https://github.com/request/request/pull/1397) Improve pipe-from-file tests (@nylen) + +### v2.53.0 (2015/02/02) +- [#1396](https://github.com/request/request/pull/1396) Do not rfc3986 escape JSON bodies (@nylen, @simov) +- [#1392](https://github.com/request/request/pull/1392) Improve `timeout` option description (@watson) + +### v2.52.0 (2015/02/02) +- [#1383](https://github.com/request/request/pull/1383) Add missing HTTPS options that were not being passed to tunnel (@brichard19) (@nylen) +- [#1388](https://github.com/request/request/pull/1388) Upgrade mime-types package version (@roderickhsiao) +- [#1389](https://github.com/request/request/pull/1389) Revise Setup Tunnel Function (@seanstrom) +- [#1374](https://github.com/request/request/pull/1374) Allow explicitly disabling tunneling for proxied https destinations (@nylen) +- [#1376](https://github.com/request/request/pull/1376) Use karma-browserify for tests. Add browser test coverage reporter. (@eiriksm) +- [#1366](https://github.com/request/request/pull/1366) Refactor OAuth into separate module (@simov) +- [#1373](https://github.com/request/request/pull/1373) Rewrite tunnel test to be pure Node.js (@nylen) +- [#1371](https://github.com/request/request/pull/1371) Upgrade test reporter (@nylen) +- [#1360](https://github.com/request/request/pull/1360) Refactor basic, bearer, digest auth logic into separate class (@simov) +- [#1354](https://github.com/request/request/pull/1354) Remove circular dependency from debugging code (@nylen) +- [#1351](https://github.com/request/request/pull/1351) Move digest auth into private prototype method (@simov) +- [#1352](https://github.com/request/request/pull/1352) Update hawk dependency to ~2.3.0 (@mridgway) +- [#1353](https://github.com/request/request/pull/1353) Correct travis-ci badge (@dogancelik) +- [#1349](https://github.com/request/request/pull/1349) Make sure we return on errored browser requests. (@eiriksm) +- [#1346](https://github.com/request/request/pull/1346) getProxyFromURI Extraction Refactor (@seanstrom) +- [#1337](https://github.com/request/request/pull/1337) Standardize test ports on 6767 (@nylen) +- [#1341](https://github.com/request/request/pull/1341) Emit FormData error events as Request error events (@nylen, @rwky) +- [#1343](https://github.com/request/request/pull/1343) Clean up readme badges, and add Travis and Coveralls badges (@nylen) +- [#1345](https://github.com/request/request/pull/1345) Update README.md (@Aaron-Hartwig) +- [#1338](https://github.com/request/request/pull/1338) Always wait for server.close() callback in tests (@nylen) +- [#1342](https://github.com/request/request/pull/1342) Add mock https server and redo start of browser tests for this purpose. (@eiriksm) +- [#1339](https://github.com/request/request/pull/1339) Improve auth docs (@nylen) +- [#1335](https://github.com/request/request/pull/1335) Add support for OAuth plaintext signature method (@simov) +- [#1332](https://github.com/request/request/pull/1332) Add clean script to remove test-browser.js after the tests run (@seanstrom) +- [#1327](https://github.com/request/request/pull/1327) Fix errors generating coverage reports. (@nylen) +- [#1330](https://github.com/request/request/pull/1330) Return empty buffer upon empty response body and encoding is set to null (@seanstrom) +- [#1326](https://github.com/request/request/pull/1326) Use faster container-based infrastructure on Travis (@nylen) +- [#1315](https://github.com/request/request/pull/1315) Implement rfc3986 option (@simov, @nylen, @apoco, @DullReferenceException, @mmalecki, @oliamb, @cliffcrosland, @LewisJEllis, @eiriksm, @poislagarde) +- [#1314](https://github.com/request/request/pull/1314) Detect urlencoded form data header via regex (@simov) +- [#1317](https://github.com/request/request/pull/1317) Improve OAuth1.0 server side flow example (@simov) + +### v2.51.0 (2014/12/10) +- [#1310](https://github.com/request/request/pull/1310) Revert changes introduced in https://github.com/request/request/pull/1282 (@simov) + +### v2.50.0 (2014/12/09) +- [#1308](https://github.com/request/request/pull/1308) Add browser test to keep track of browserify compability. (@eiriksm) +- [#1299](https://github.com/request/request/pull/1299) Add optional support for jsonReviver (@poislagarde) +- [#1277](https://github.com/request/request/pull/1277) Add Coveralls configuration (@simov) +- [#1307](https://github.com/request/request/pull/1307) Upgrade form-data, add back browserify compability. Fixes #455. (@eiriksm) +- [#1305](https://github.com/request/request/pull/1305) Fix typo in README.md (@LewisJEllis) +- [#1288](https://github.com/request/request/pull/1288) Update README.md to explain custom file use case (@cliffcrosland) + +### v2.49.0 (2014/11/28) +- [#1295](https://github.com/request/request/pull/1295) fix(proxy): no-proxy false positive (@oliamb) +- [#1292](https://github.com/request/request/pull/1292) Upgrade `caseless` to 0.8.1 (@mmalecki) +- [#1276](https://github.com/request/request/pull/1276) Set transfer encoding for multipart/related to chunked by default (@simov) +- [#1275](https://github.com/request/request/pull/1275) Fix multipart content-type headers detection (@simov) +- [#1269](https://github.com/request/request/pull/1269) adds streams example for review (@tbuchok) +- [#1238](https://github.com/request/request/pull/1238) Add examples README.md (@simov) + +### v2.48.0 (2014/11/12) +- [#1263](https://github.com/request/request/pull/1263) Fixed a syntax error / typo in README.md (@xna2) +- [#1253](https://github.com/request/request/pull/1253) Add multipart chunked flag (@simov, @nylen) +- [#1251](https://github.com/request/request/pull/1251) Clarify that defaults() does not modify global defaults (@nylen) +- [#1250](https://github.com/request/request/pull/1250) Improve documentation for pool and maxSockets options (@nylen) +- [#1237](https://github.com/request/request/pull/1237) Documenting error handling when using streams (@vmattos) +- [#1244](https://github.com/request/request/pull/1244) Finalize changelog command (@nylen) +- [#1241](https://github.com/request/request/pull/1241) Fix typo (@alexanderGugel) +- [#1223](https://github.com/request/request/pull/1223) Show latest version number instead of "upcoming" in changelog (@nylen) +- [#1236](https://github.com/request/request/pull/1236) Document how to use custom CA in README (#1229) (@hypesystem) +- [#1228](https://github.com/request/request/pull/1228) Support for oauth with RSA-SHA1 signing (@nylen) +- [#1216](https://github.com/request/request/pull/1216) Made json and multipart options coexist (@nylen, @simov) +- [#1225](https://github.com/request/request/pull/1225) Allow header white/exclusive lists in any case. (@RReverser) + +### v2.47.0 (2014/10/26) +- [#1222](https://github.com/request/request/pull/1222) Move from mikeal/request to request/request (@nylen) +- [#1220](https://github.com/request/request/pull/1220) update qs dependency to 2.3.1 (@FredKSchott) +- [#1212](https://github.com/request/request/pull/1212) Improve tests/test-timeout.js (@nylen) +- [#1219](https://github.com/request/request/pull/1219) remove old globalAgent workaround for node 0.4 (@request) +- [#1214](https://github.com/request/request/pull/1214) Remove cruft left over from optional dependencies (@nylen) +- [#1215](https://github.com/request/request/pull/1215) Add proxyHeaderExclusiveList option for proxy-only headers. (@RReverser) +- [#1211](https://github.com/request/request/pull/1211) Allow 'Host' header instead of 'host' and remember case across redirects (@nylen) +- [#1208](https://github.com/request/request/pull/1208) Improve release script (@nylen) +- [#1213](https://github.com/request/request/pull/1213) Support for custom cookie store (@nylen, @mitsuru) +- [#1197](https://github.com/request/request/pull/1197) Clean up some code around setting the agent (@FredKSchott) +- [#1209](https://github.com/request/request/pull/1209) Improve multipart form append test (@simov) +- [#1207](https://github.com/request/request/pull/1207) Update changelog (@nylen) +- [#1185](https://github.com/request/request/pull/1185) Stream multipart/related bodies (@simov) + +### v2.46.0 (2014/10/23) +- [#1198](https://github.com/request/request/pull/1198) doc for TLS/SSL protocol options (@shawnzhu) +- [#1200](https://github.com/request/request/pull/1200) Add a Gitter chat badge to README.md (@gitter-badger) +- [#1196](https://github.com/request/request/pull/1196) Upgrade taper test reporter to v0.3.0 (@nylen) +- [#1199](https://github.com/request/request/pull/1199) Fix lint error: undeclared var i (@nylen) +- [#1191](https://github.com/request/request/pull/1191) Move self.proxy decision logic out of init and into a helper (@FredKSchott) +- [#1190](https://github.com/request/request/pull/1190) Move _buildRequest() logic back into init (@FredKSchott) +- [#1186](https://github.com/request/request/pull/1186) Support Smarter Unix URL Scheme (@FredKSchott) +- [#1178](https://github.com/request/request/pull/1178) update form documentation for new usage (@FredKSchott) +- [#1180](https://github.com/request/request/pull/1180) Enable no-mixed-requires linting rule (@nylen) +- [#1184](https://github.com/request/request/pull/1184) Don't forward authorization header across redirects to different hosts (@nylen) +- [#1183](https://github.com/request/request/pull/1183) Correct README about pre and postamble CRLF using multipart and not mult... (@netpoetica) +- [#1179](https://github.com/request/request/pull/1179) Lint tests directory (@nylen) +- [#1169](https://github.com/request/request/pull/1169) add metadata for form-data file field (@dotcypress) +- [#1173](https://github.com/request/request/pull/1173) remove optional dependencies (@seanstrom) +- [#1165](https://github.com/request/request/pull/1165) Cleanup event listeners and remove function creation from init (@FredKSchott) +- [#1174](https://github.com/request/request/pull/1174) update the request.cookie docs to have a valid cookie example (@seanstrom) +- [#1168](https://github.com/request/request/pull/1168) create a detach helper and use detach helper in replace of nextTick (@seanstrom) +- [#1171](https://github.com/request/request/pull/1171) in post can send form data and use callback (@MiroRadenovic) +- [#1159](https://github.com/request/request/pull/1159) accept charset for x-www-form-urlencoded content-type (@seanstrom) +- [#1157](https://github.com/request/request/pull/1157) Update README.md: body with json=true (@Rob--W) +- [#1164](https://github.com/request/request/pull/1164) Disable tests/test-timeout.js on Travis (@nylen) +- [#1153](https://github.com/request/request/pull/1153) Document how to run a single test (@nylen) +- [#1144](https://github.com/request/request/pull/1144) adds documentation for the "response" event within the streaming section (@tbuchok) +- [#1162](https://github.com/request/request/pull/1162) Update eslintrc file to no longer allow past errors (@FredKSchott) +- [#1155](https://github.com/request/request/pull/1155) Support/use self everywhere (@seanstrom) +- [#1161](https://github.com/request/request/pull/1161) fix no-use-before-define lint warnings (@emkay) +- [#1156](https://github.com/request/request/pull/1156) adding curly brackets to get rid of lint errors (@emkay) +- [#1151](https://github.com/request/request/pull/1151) Fix localAddress test on OS X (@nylen) +- [#1145](https://github.com/request/request/pull/1145) documentation: fix outdated reference to setCookieSync old name in README (@FredKSchott) +- [#1131](https://github.com/request/request/pull/1131) Update pool documentation (@FredKSchott) +- [#1143](https://github.com/request/request/pull/1143) Rewrite all tests to use tape (@nylen) +- [#1137](https://github.com/request/request/pull/1137) Add ability to specifiy querystring lib in options. (@jgrund) +- [#1138](https://github.com/request/request/pull/1138) allow hostname and port in place of host on uri (@cappslock) +- [#1134](https://github.com/request/request/pull/1134) Fix multiple redirects and `self.followRedirect` (@blakeembrey) +- [#1130](https://github.com/request/request/pull/1130) documentation fix: add note about npm test for contributing (@FredKSchott) +- [#1120](https://github.com/request/request/pull/1120) Support/refactor request setup tunnel (@seanstrom) +- [#1129](https://github.com/request/request/pull/1129) linting fix: convert double quote strings to use single quotes (@FredKSchott) +- [#1124](https://github.com/request/request/pull/1124) linting fix: remove unneccesary semi-colons (@FredKSchott) + +### v2.45.0 (2014/10/06) +- [#1128](https://github.com/request/request/pull/1128) Add test for setCookie regression (@nylen) +- [#1127](https://github.com/request/request/pull/1127) added tests around using objects as values in a query string (@bcoe) +- [#1103](https://github.com/request/request/pull/1103) Support/refactor request constructor (@nylen, @seanstrom) +- [#1119](https://github.com/request/request/pull/1119) add basic linting to request library (@FredKSchott) +- [#1121](https://github.com/request/request/pull/1121) Revert "Explicitly use sync versions of cookie functions" (@nylen) +- [#1118](https://github.com/request/request/pull/1118) linting fix: Restructure bad empty if statement (@FredKSchott) +- [#1117](https://github.com/request/request/pull/1117) Fix a bad check for valid URIs (@FredKSchott) +- [#1113](https://github.com/request/request/pull/1113) linting fix: space out operators (@FredKSchott) +- [#1116](https://github.com/request/request/pull/1116) Fix typo in `noProxyHost` definition (@FredKSchott) +- [#1114](https://github.com/request/request/pull/1114) linting fix: Added a `new` operator that was missing when creating and throwing a new error (@FredKSchott) +- [#1096](https://github.com/request/request/pull/1096) No_proxy support (@samcday) +- [#1107](https://github.com/request/request/pull/1107) linting-fix: remove unused variables (@FredKSchott) +- [#1112](https://github.com/request/request/pull/1112) linting fix: Make return values consistent and more straitforward (@FredKSchott) +- [#1111](https://github.com/request/request/pull/1111) linting fix: authPieces was getting redeclared (@FredKSchott) +- [#1105](https://github.com/request/request/pull/1105) Use strict mode in request (@FredKSchott) +- [#1110](https://github.com/request/request/pull/1110) linting fix: replace lazy '==' with more strict '===' (@FredKSchott) +- [#1109](https://github.com/request/request/pull/1109) linting fix: remove function call from if-else conditional statement (@FredKSchott) +- [#1102](https://github.com/request/request/pull/1102) Fix to allow setting a `requester` on recursive calls to `request.defaults` (@tikotzky) +- [#1095](https://github.com/request/request/pull/1095) Tweaking engines in package.json (@pdehaan) +- [#1082](https://github.com/request/request/pull/1082) Forward the socket event from the httpModule request (@seanstrom) +- [#972](https://github.com/request/request/pull/972) Clarify gzip handling in the README (@kevinoid) +- [#1089](https://github.com/request/request/pull/1089) Mention that encoding defaults to utf8, not Buffer (@stuartpb) +- [#1088](https://github.com/request/request/pull/1088) Fix cookie example in README.md and make it more clear (@pipi32167) +- [#1027](https://github.com/request/request/pull/1027) Add support for multipart form data in request options. (@crocket) +- [#1076](https://github.com/request/request/pull/1076) use Request.abort() to abort the request when the request has timed-out (@seanstrom) +- [#1068](https://github.com/request/request/pull/1068) add optional postamble required by .NET multipart requests (@netpoetica) + +### v2.43.0 (2014/09/18) +- [#1057](https://github.com/request/request/pull/1057) Defaults should not overwrite defined options (@davidwood) +- [#1046](https://github.com/request/request/pull/1046) Propagate datastream errors, useful in case gzip fails. (@ZJONSSON, @Janpot) +- [#1063](https://github.com/request/request/pull/1063) copy the input headers object #1060 (@finnp) +- [#1031](https://github.com/request/request/pull/1031) Explicitly use sync versions of cookie functions (@ZJONSSON) +- [#1056](https://github.com/request/request/pull/1056) Fix redirects when passing url.parse(x) as URL to convenience method (@nylen) + +### v2.42.0 (2014/09/04) +- [#1053](https://github.com/request/request/pull/1053) Fix #1051 Parse auth properly when using non-tunneling proxy (@isaacs) + +### v2.41.0 (2014/09/04) +- [#1050](https://github.com/request/request/pull/1050) Pass whitelisted headers to tunneling proxy. Organize all tunneling logic. (@isaacs, @Feldhacker) +- [#1035](https://github.com/request/request/pull/1035) souped up nodei.co badge (@rvagg) +- [#1048](https://github.com/request/request/pull/1048) Aws is now possible over a proxy (@steven-aerts) +- [#1039](https://github.com/request/request/pull/1039) extract out helper functions to a helper file (@seanstrom) +- [#1021](https://github.com/request/request/pull/1021) Support/refactor indexjs (@seanstrom) +- [#1033](https://github.com/request/request/pull/1033) Improve and document debug options (@nylen) +- [#1034](https://github.com/request/request/pull/1034) Fix readme headings (@nylen) +- [#1030](https://github.com/request/request/pull/1030) Allow recursive request.defaults (@tikotzky) +- [#1029](https://github.com/request/request/pull/1029) Fix a couple of typos (@nylen) +- [#675](https://github.com/request/request/pull/675) Checking for SSL fault on connection before reading SSL properties (@VRMink) +- [#989](https://github.com/request/request/pull/989) Added allowRedirect function. Should return true if redirect is allowed or false otherwise (@doronin) +- [#1025](https://github.com/request/request/pull/1025) [fixes #1023] Set self._ended to true once response has ended (@mridgway) +- [#1020](https://github.com/request/request/pull/1020) Add back removed debug metadata (@FredKSchott) +- [#1008](https://github.com/request/request/pull/1008) Moving to module instead of cutomer buffer concatenation. (@mikeal) +- [#770](https://github.com/request/request/pull/770) Added dependency badge for README file; (@timgluz, @mafintosh, @lalitkapoor, @stash, @bobyrizov) +- [#1016](https://github.com/request/request/pull/1016) toJSON no longer results in an infinite loop, returns simple objects (@FredKSchott) +- [#1018](https://github.com/request/request/pull/1018) Remove pre-0.4.4 HTTPS fix (@mmalecki) +- [#1006](https://github.com/request/request/pull/1006) Migrate to caseless, fixes #1001 (@mikeal) +- [#995](https://github.com/request/request/pull/995) Fix parsing array of objects (@sjonnet19) +- [#999](https://github.com/request/request/pull/999) Fix fallback for browserify for optional modules. (@eiriksm) +- [#996](https://github.com/request/request/pull/996) Wrong oauth signature when multiple same param keys exist [updated] (@bengl, @hyjin) + +### v2.40.0 (2014/08/06) +- [#992](https://github.com/request/request/pull/992) Fix security vulnerability. Update qs (@poeticninja) +- [#988](https://github.com/request/request/pull/988) “--” -> “—” (@upisfree) +- [#987](https://github.com/request/request/pull/987) Show optional modules as being loaded by the module that reqeusted them (@iarna) + +### v2.39.0 (2014/07/24) +- [#976](https://github.com/request/request/pull/976) Update README.md (@pvoznenko) + +### v2.38.0 (2014/07/22) +- [#952](https://github.com/request/request/pull/952) Adding support to client certificate with proxy use case (@ofirshaked) +- [#884](https://github.com/request/request/pull/884) Documented tough-cookie installation. (@wbyoung) +- [#935](https://github.com/request/request/pull/935) Correct repository url (@fritx) +- [#963](https://github.com/request/request/pull/963) Update changelog (@nylen) +- [#960](https://github.com/request/request/pull/960) Support gzip with encoding on node pre-v0.9.4 (@kevinoid) +- [#953](https://github.com/request/request/pull/953) Add async Content-Length computation when using form-data (@LoicMahieu) +- [#844](https://github.com/request/request/pull/844) Add support for HTTP[S]_PROXY environment variables. Fixes #595. (@jvmccarthy) +- [#946](https://github.com/request/request/pull/946) defaults: merge headers (@aj0strow) + +### v2.37.0 (2014/07/07) +- [#957](https://github.com/request/request/pull/957) Silence EventEmitter memory leak warning #311 (@watson) +- [#955](https://github.com/request/request/pull/955) check for content-length header before setting it in nextTick (@camilleanne) +- [#951](https://github.com/request/request/pull/951) Add support for gzip content decoding (@kevinoid) +- [#949](https://github.com/request/request/pull/949) Manually enter querystring in form option (@charlespwd) +- [#944](https://github.com/request/request/pull/944) Make request work with browserify (@eiriksm) +- [#943](https://github.com/request/request/pull/943) New mime module (@eiriksm) +- [#927](https://github.com/request/request/pull/927) Bump version of hawk dep. (@samccone) +- [#907](https://github.com/request/request/pull/907) append secureOptions to poolKey (@medovob) + +### v2.35.0 (2014/05/17) +- [#901](https://github.com/request/request/pull/901) Fixes #555 (@pigulla) +- [#897](https://github.com/request/request/pull/897) merge with default options (@vohof) +- [#891](https://github.com/request/request/pull/891) fixes 857 - options object is mutated by calling request (@lalitkapoor) +- [#869](https://github.com/request/request/pull/869) Pipefilter test (@tgohn) +- [#866](https://github.com/request/request/pull/866) Fix typo (@dandv) +- [#861](https://github.com/request/request/pull/861) Add support for RFC 6750 Bearer Tokens (@phedny) +- [#809](https://github.com/request/request/pull/809) upgrade tunnel-proxy to 0.4.0 (@ksato9700) +- [#850](https://github.com/request/request/pull/850) Fix word consistency in readme (@0xNobody) +- [#810](https://github.com/request/request/pull/810) add some exposition to mpu example in README.md (@mikermcneil) +- [#840](https://github.com/request/request/pull/840) improve error reporting for invalid protocols (@FND) +- [#821](https://github.com/request/request/pull/821) added secureOptions back (@nw) +- [#815](https://github.com/request/request/pull/815) Create changelog based on pull requests (@lalitkapoor) + +### v2.34.0 (2014/02/18) +- [#516](https://github.com/request/request/pull/516) UNIX Socket URL Support (@lyuzashi) +- [#801](https://github.com/request/request/pull/801) 794 ignore cookie parsing and domain errors (@lalitkapoor) +- [#802](https://github.com/request/request/pull/802) Added the Apache license to the package.json. (@keskival) +- [#793](https://github.com/request/request/pull/793) Adds content-length calculation when submitting forms using form-data li... (@Juul) +- [#785](https://github.com/request/request/pull/785) Provide ability to override content-type when `json` option used (@vvo) +- [#781](https://github.com/request/request/pull/781) simpler isReadStream function (@joaojeronimo) + +### v2.32.0 (2014/01/16) +- [#767](https://github.com/request/request/pull/767) Use tough-cookie CookieJar sync API (@stash) +- [#764](https://github.com/request/request/pull/764) Case-insensitive authentication scheme (@bobyrizov) +- [#763](https://github.com/request/request/pull/763) Upgrade tough-cookie to 0.10.0 (@stash) +- [#744](https://github.com/request/request/pull/744) Use Cookie.parse (@lalitkapoor) +- [#757](https://github.com/request/request/pull/757) require aws-sign2 (@mafintosh) + +### v2.31.0 (2014/01/08) +- [#645](https://github.com/request/request/pull/645) update twitter api url to v1.1 (@mick) +- [#746](https://github.com/request/request/pull/746) README: Markdown code highlight (@weakish) +- [#745](https://github.com/request/request/pull/745) updating setCookie example to make it clear that the callback is required (@emkay) +- [#742](https://github.com/request/request/pull/742) Add note about JSON output body type (@iansltx) +- [#741](https://github.com/request/request/pull/741) README example is using old cookie jar api (@emkay) +- [#736](https://github.com/request/request/pull/736) Fix callback arguments documentation (@mmalecki) + +### v2.30.0 (2013/12/13) +- [#732](https://github.com/request/request/pull/732) JSHINT: Creating global 'for' variable. Should be 'for (var ...'. (@Fritz-Lium) +- [#730](https://github.com/request/request/pull/730) better HTTP DIGEST support (@dai-shi) +- [#728](https://github.com/request/request/pull/728) Fix TypeError when calling request.cookie (@scarletmeow) + +### v2.29.0 (2013/12/06) +- [#727](https://github.com/request/request/pull/727) fix requester bug (@jchris) + +### v2.28.0 (2013/12/04) +- [#724](https://github.com/request/request/pull/724) README.md: add custom HTTP Headers example. (@tcort) +- [#719](https://github.com/request/request/pull/719) Made a comment gender neutral. (@unsetbit) +- [#715](https://github.com/request/request/pull/715) Request.multipart no longer crashes when header 'Content-type' present (@pastaclub) +- [#710](https://github.com/request/request/pull/710) Fixing listing in callback part of docs. (@lukasz-zak) +- [#696](https://github.com/request/request/pull/696) Edited README.md for formatting and clarity of phrasing (@Zearin) +- [#694](https://github.com/request/request/pull/694) Typo in README (@VRMink) +- [#690](https://github.com/request/request/pull/690) Handle blank password in basic auth. (@diversario) +- [#682](https://github.com/request/request/pull/682) Optional dependencies (@Turbo87) +- [#683](https://github.com/request/request/pull/683) Travis CI support (@Turbo87) +- [#674](https://github.com/request/request/pull/674) change cookie module,to tough-cookie.please check it . (@sxyizhiren) +- [#666](https://github.com/request/request/pull/666) make `ciphers` and `secureProtocol` to work in https request (@richarddong) +- [#656](https://github.com/request/request/pull/656) Test case for #304. (@diversario) +- [#662](https://github.com/request/request/pull/662) option.tunnel to explicitly disable tunneling (@seanmonstar) +- [#659](https://github.com/request/request/pull/659) fix failure when running with NODE_DEBUG=request, and a test for that (@jrgm) +- [#630](https://github.com/request/request/pull/630) Send random cnonce for HTTP Digest requests (@wprl) + +### v2.27.0 (2013/08/15) +- [#619](https://github.com/request/request/pull/619) decouple things a bit (@joaojeronimo) + +### v2.26.0 (2013/08/07) +- [#613](https://github.com/request/request/pull/613) Fixes #583, moved initialization of self.uri.pathname (@lexander) +- [#605](https://github.com/request/request/pull/605) Only include ":" + pass in Basic Auth if it's defined (fixes #602) (@bendrucker) + +### v2.24.0 (2013/07/23) +- [#596](https://github.com/request/request/pull/596) Global agent is being used when pool is specified (@Cauldrath) +- [#594](https://github.com/request/request/pull/594) Emit complete event when there is no callback (@RomainLK) +- [#601](https://github.com/request/request/pull/601) Fixed a small typo (@michalstanko) + +### v2.23.0 (2013/07/23) +- [#589](https://github.com/request/request/pull/589) Prevent setting headers after they are sent (@geek) +- [#587](https://github.com/request/request/pull/587) Global cookie jar disabled by default (@threepointone) + +### v2.22.0 (2013/07/05) +- [#544](https://github.com/request/request/pull/544) Update http-signature version. (@davidlehn) +- [#581](https://github.com/request/request/pull/581) Fix spelling of "ignoring." (@bigeasy) +- [#568](https://github.com/request/request/pull/568) use agentOptions to create agent when specified in request (@SamPlacette) +- [#564](https://github.com/request/request/pull/564) Fix redirections (@criloz) +- [#541](https://github.com/request/request/pull/541) The exported request function doesn't have an auth method (@tschaub) +- [#542](https://github.com/request/request/pull/542) Expose Request class (@regality) + +### v2.21.0 (2013/04/30) +- [#536](https://github.com/request/request/pull/536) Allow explicitly empty user field for basic authentication. (@mikeando) +- [#532](https://github.com/request/request/pull/532) fix typo (@fredericosilva) +- [#497](https://github.com/request/request/pull/497) Added redirect event (@Cauldrath) +- [#503](https://github.com/request/request/pull/503) Fix basic auth for passwords that contain colons (@tonistiigi) +- [#521](https://github.com/request/request/pull/521) Improving test-localAddress.js (@noway421) +- [#529](https://github.com/request/request/pull/529) dependencies versions bump (@jodaka) + +### v2.18.0 (2013/04/22) +- [#523](https://github.com/request/request/pull/523) Updating dependencies (@noway421) +- [#520](https://github.com/request/request/pull/520) Fixing test-tunnel.js (@noway421) +- [#519](https://github.com/request/request/pull/519) Update internal path state on post-creation QS changes (@jblebrun) +- [#510](https://github.com/request/request/pull/510) Add HTTP Signature support. (@davidlehn) +- [#502](https://github.com/request/request/pull/502) Fix POST (and probably other) requests that are retried after 401 Unauthorized (@nylen) +- [#508](https://github.com/request/request/pull/508) Honor the .strictSSL option when using proxies (tunnel-agent) (@jhs) +- [#512](https://github.com/request/request/pull/512) Make password optional to support the format: http://username@hostname/ (@pajato1) +- [#513](https://github.com/request/request/pull/513) add 'localAddress' support (@yyfrankyy) +- [#498](https://github.com/request/request/pull/498) Moving response emit above setHeaders on destination streams (@kenperkins) +- [#490](https://github.com/request/request/pull/490) Empty response body (3-rd argument) must be passed to callback as an empty string (@Olegas) +- [#479](https://github.com/request/request/pull/479) Changing so if Accept header is explicitly set, sending json does not ov... (@RoryH) +- [#475](https://github.com/request/request/pull/475) Use `unescape` from `querystring` (@shimaore) +- [#473](https://github.com/request/request/pull/473) V0.10 compat (@isaacs) +- [#471](https://github.com/request/request/pull/471) Using querystring library from visionmedia (@kbackowski) +- [#461](https://github.com/request/request/pull/461) Strip the UTF8 BOM from a UTF encoded response (@kppullin) +- [#460](https://github.com/request/request/pull/460) hawk 0.10.0 (@hueniverse) +- [#462](https://github.com/request/request/pull/462) if query params are empty, then request path shouldn't end with a '?' (merges cleanly now) (@jaipandya) +- [#456](https://github.com/request/request/pull/456) hawk 0.9.0 (@hueniverse) +- [#429](https://github.com/request/request/pull/429) Copy options before adding callback. (@nrn, @nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki) +- [#454](https://github.com/request/request/pull/454) Destroy the response if present when destroying the request (clean merge) (@mafintosh) +- [#310](https://github.com/request/request/pull/310) Twitter Oauth Stuff Out of Date; Now Updated (@joemccann, @isaacs, @mscdex) +- [#413](https://github.com/request/request/pull/413) rename googledoodle.png to .jpg (@nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki) +- [#448](https://github.com/request/request/pull/448) Convenience method for PATCH (@mloar) +- [#444](https://github.com/request/request/pull/444) protect against double callbacks on error path (@spollack) +- [#433](https://github.com/request/request/pull/433) Added support for HTTPS cert & key (@mmalecki) +- [#430](https://github.com/request/request/pull/430) Respect specified {Host,host} headers, not just {host} (@andrewschaaf) +- [#415](https://github.com/request/request/pull/415) Fixed a typo. (@jerem) +- [#338](https://github.com/request/request/pull/338) Add more auth options, including digest support (@nylen) +- [#403](https://github.com/request/request/pull/403) Optimize environment lookup to happen once only (@mmalecki) +- [#398](https://github.com/request/request/pull/398) Add more reporting to tests (@mmalecki) +- [#388](https://github.com/request/request/pull/388) Ensure "safe" toJSON doesn't break EventEmitters (@othiym23) +- [#381](https://github.com/request/request/pull/381) Resolving "Invalid signature. Expected signature base string: " (@landeiro) +- [#380](https://github.com/request/request/pull/380) Fixes missing host header on retried request when using forever agent (@mac-) +- [#376](https://github.com/request/request/pull/376) Headers lost on redirect (@kapetan) +- [#375](https://github.com/request/request/pull/375) Fix for missing oauth_timestamp parameter (@jplock) +- [#374](https://github.com/request/request/pull/374) Correct Host header for proxy tunnel CONNECT (@youurayy) +- [#370](https://github.com/request/request/pull/370) Twitter reverse auth uses x_auth_mode not x_auth_type (@drudge) +- [#369](https://github.com/request/request/pull/369) Don't remove x_auth_mode for Twitter reverse auth (@drudge) +- [#344](https://github.com/request/request/pull/344) Make AWS auth signing find headers correctly (@nlf) +- [#363](https://github.com/request/request/pull/363) rfc3986 on base_uri, now passes tests (@jeffmarshall) +- [#362](https://github.com/request/request/pull/362) Running `rfc3986` on `base_uri` in `oauth.hmacsign` instead of just `encodeURIComponent` (@jeffmarshall) +- [#361](https://github.com/request/request/pull/361) Don't create a Content-Length header if we already have it set (@danjenkins) +- [#360](https://github.com/request/request/pull/360) Delete self._form along with everything else on redirect (@jgautier) +- [#355](https://github.com/request/request/pull/355) stop sending erroneous headers on redirected requests (@azylman) +- [#332](https://github.com/request/request/pull/332) Fix #296 - Only set Content-Type if body exists (@Marsup) +- [#343](https://github.com/request/request/pull/343) Allow AWS to work in more situations, added a note in the README on its usage (@nlf) +- [#320](https://github.com/request/request/pull/320) request.defaults() doesn't need to wrap jar() (@StuartHarris) +- [#322](https://github.com/request/request/pull/322) Fix + test for piped into request bumped into redirect. #321 (@alexindigo) +- [#326](https://github.com/request/request/pull/326) Do not try to remove listener from an undefined connection (@strk) +- [#318](https://github.com/request/request/pull/318) Pass servername to tunneling secure socket creation (@isaacs) +- [#317](https://github.com/request/request/pull/317) Workaround for #313 (@isaacs) +- [#293](https://github.com/request/request/pull/293) Allow parser errors to bubble up to request (@mscdex) +- [#290](https://github.com/request/request/pull/290) A test for #289 (@isaacs) +- [#280](https://github.com/request/request/pull/280) Like in node.js print options if NODE_DEBUG contains the word request (@Filirom1) +- [#207](https://github.com/request/request/pull/207) Fix #206 Change HTTP/HTTPS agent when redirecting between protocols (@isaacs) +- [#214](https://github.com/request/request/pull/214) documenting additional behavior of json option (@jphaas) +- [#272](https://github.com/request/request/pull/272) Boundary begins with CRLF? (@elspoono, @timshadel, @naholyr, @nanodocumet, @TehShrike) +- [#284](https://github.com/request/request/pull/284) Remove stray `console.log()` call in multipart generator. (@bcherry) +- [#241](https://github.com/request/request/pull/241) Composability updates suggested by issue #239 (@polotek) +- [#282](https://github.com/request/request/pull/282) OAuth Authorization header contains non-"oauth_" parameters (@jplock) +- [#279](https://github.com/request/request/pull/279) fix tests with boundary by injecting boundry from header (@benatkin) +- [#273](https://github.com/request/request/pull/273) Pipe back pressure issue (@mafintosh) +- [#268](https://github.com/request/request/pull/268) I'm not OCD seriously (@TehShrike) +- [#263](https://github.com/request/request/pull/263) Bug in OAuth key generation for sha1 (@nanodocumet) +- [#265](https://github.com/request/request/pull/265) uncaughtException when redirected to invalid URI (@naholyr) +- [#262](https://github.com/request/request/pull/262) JSON test should check for equality (@timshadel) +- [#261](https://github.com/request/request/pull/261) Setting 'pool' to 'false' does NOT disable Agent pooling (@timshadel) +- [#249](https://github.com/request/request/pull/249) Fix for the fix of your (closed) issue #89 where self.headers[content-length] is set to 0 for all methods (@sethbridges, @polotek, @zephrax, @jeromegn) +- [#255](https://github.com/request/request/pull/255) multipart allow body === '' ( the empty string ) (@Filirom1) +- [#260](https://github.com/request/request/pull/260) fixed just another leak of 'i' (@sreuter) +- [#246](https://github.com/request/request/pull/246) Fixing the set-cookie header (@jeromegn) +- [#243](https://github.com/request/request/pull/243) Dynamic boundary (@zephrax) +- [#240](https://github.com/request/request/pull/240) don't error when null is passed for options (@polotek) +- [#211](https://github.com/request/request/pull/211) Replace all occurrences of special chars in RFC3986 (@chriso) +- [#224](https://github.com/request/request/pull/224) Multipart content-type change (@janjongboom) +- [#217](https://github.com/request/request/pull/217) need to use Authorization (titlecase) header with Tumblr OAuth (@visnup) +- [#203](https://github.com/request/request/pull/203) Fix cookie and redirect bugs and add auth support for HTTPS tunnel (@milewise) +- [#199](https://github.com/request/request/pull/199) Tunnel (@isaacs) +- [#198](https://github.com/request/request/pull/198) Bugfix on forever usage of util.inherits (@isaacs) +- [#197](https://github.com/request/request/pull/197) Make ForeverAgent work with HTTPS (@isaacs) +- [#193](https://github.com/request/request/pull/193) Fixes GH-119 (@goatslacker) +- [#188](https://github.com/request/request/pull/188) Add abort support to the returned request (@itay) +- [#176](https://github.com/request/request/pull/176) Querystring option (@csainty) +- [#182](https://github.com/request/request/pull/182) Fix request.defaults to support (uri, options, callback) api (@twilson63) +- [#180](https://github.com/request/request/pull/180) Modified the post, put, head and del shortcuts to support uri optional param (@twilson63) +- [#179](https://github.com/request/request/pull/179) fix to add opts in .pipe(stream, opts) (@substack) +- [#177](https://github.com/request/request/pull/177) Issue #173 Support uri as first and optional config as second argument (@twilson63) +- [#170](https://github.com/request/request/pull/170) can't create a cookie in a wrapped request (defaults) (@fabianonunes) +- [#168](https://github.com/request/request/pull/168) Picking off an EasyFix by adding some missing mimetypes. (@serby) +- [#161](https://github.com/request/request/pull/161) Fix cookie jar/headers.cookie collision (#125) (@papandreou) +- [#162](https://github.com/request/request/pull/162) Fix issue #159 (@dpetukhov) +- [#90](https://github.com/request/request/pull/90) add option followAllRedirects to follow post/put redirects (@jroes) +- [#148](https://github.com/request/request/pull/148) Retry Agent (@thejh) +- [#146](https://github.com/request/request/pull/146) Multipart should respect content-type if previously set (@apeace) +- [#144](https://github.com/request/request/pull/144) added "form" option to readme (@petejkim) +- [#133](https://github.com/request/request/pull/133) Fixed cookies parsing (@afanasy) +- [#135](https://github.com/request/request/pull/135) host vs hostname (@iangreenleaf) +- [#132](https://github.com/request/request/pull/132) return the body as a Buffer when encoding is set to null (@jahewson) +- [#112](https://github.com/request/request/pull/112) Support using a custom http-like module (@jhs) +- [#104](https://github.com/request/request/pull/104) Cookie handling contains bugs (@janjongboom) +- [#121](https://github.com/request/request/pull/121) Another patch for cookie handling regression (@jhurliman) +- [#117](https://github.com/request/request/pull/117) Remove the global `i` (@3rd-Eden) +- [#110](https://github.com/request/request/pull/110) Update to Iris Couch URL (@jhs) +- [#86](https://github.com/request/request/pull/86) Can't post binary to multipart requests (@kkaefer) +- [#105](https://github.com/request/request/pull/105) added test for proxy option. (@dominictarr) +- [#102](https://github.com/request/request/pull/102) Implemented cookies - closes issue 82: https://github.com/mikeal/request/issues/82 (@alessioalex) +- [#97](https://github.com/request/request/pull/97) Typo in previous pull causes TypeError in non-0.5.11 versions (@isaacs) +- [#96](https://github.com/request/request/pull/96) Authless parsed url host support (@isaacs) +- [#81](https://github.com/request/request/pull/81) Enhance redirect handling (@danmactough) +- [#78](https://github.com/request/request/pull/78) Don't try to do strictSSL for non-ssl connections (@isaacs) +- [#76](https://github.com/request/request/pull/76) Bug when a request fails and a timeout is set (@Marsup) +- [#70](https://github.com/request/request/pull/70) add test script to package.json (@isaacs, @aheckmann) +- [#73](https://github.com/request/request/pull/73) Fix #71 Respect the strictSSL flag (@isaacs) +- [#69](https://github.com/request/request/pull/69) Flatten chunked requests properly (@isaacs) +- [#67](https://github.com/request/request/pull/67) fixed global variable leaks (@aheckmann) +- [#66](https://github.com/request/request/pull/66) Do not overwrite established content-type headers for read stream deliver (@voodootikigod) +- [#53](https://github.com/request/request/pull/53) Parse json: Issue #51 (@benatkin) +- [#45](https://github.com/request/request/pull/45) Added timeout option (@mbrevoort) +- [#35](https://github.com/request/request/pull/35) The "end" event isn't emitted for some responses (@voxpelli) +- [#31](https://github.com/request/request/pull/31) Error on piping a request to a destination (@tobowers) \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/request/CONTRIBUTING.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/CONTRIBUTING.md new file mode 100644 index 00000000..6fa7afbc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# This is an OPEN Open Source Project + +----------------------------------------- + +## What? + +Individuals making significant and valuable contributions are given +commit-access to the project to contribute as they see fit. This project is +more like an open wiki than a standard guarded open source project. + +## Rules + +There are a few basic ground-rules for contributors: + +1. **No `--force` pushes** or modifying the Git history in any way. +1. **Non-master branches** ought to be used for ongoing work. +1. **External API changes and significant modifications** ought to be subject + to an **internal pull-request** to solicit feedback from other contributors. +1. Internal pull-requests to solicit feedback are *encouraged* for any other + non-trivial contribution but left to the discretion of the contributor. +1. For significant changes wait a full 24 hours before merging so that active + contributors who are distributed throughout the world have a chance to weigh + in. +1. Contributors should attempt to adhere to the prevailing code-style. +1. Run `npm test` locally before submitting your PR, to catch any easy to miss + style & testing issues. To diagnose test failures, there are two ways to + run a single test file: + - `node_modules/.bin/taper tests/test-file.js` - run using the default + [`taper`](https://github.com/nylen/taper) test reporter. + - `node tests/test-file.js` - view the raw + [tap](https://testanything.org/) output. + + +## Releases + +Declaring formal releases remains the prerogative of the project maintainer. + +## Changes to this arrangement + +This is an experiment and feedback is welcome! This document may also be +subject to pull-requests or changes by contributors where you believe you have +something valuable to add or change. + +----------------------------------------- diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/request/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/LICENSE new file mode 100644 index 00000000..100491c5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/request/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/README.md new file mode 100644 index 00000000..06739204 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/README.md @@ -0,0 +1,1094 @@ + +# Request - Simplified HTTP client + +[![npm package](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/) + +[![Build status](https://img.shields.io/travis/request/request.svg?style=flat-square)](https://travis-ci.org/request/request) +[![Coverage](https://img.shields.io/codecov/c/github/request/request.svg?style=flat-square)](https://codecov.io/github/request/request?branch=master) +[![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat-square)](https://coveralls.io/r/request/request) +[![Dependency Status](https://img.shields.io/david/request/request.svg?style=flat-square)](https://david-dm.org/request/request) +[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat-square)](https://gitter.im/request/request?utm_source=badge) + + +## Super simple to use + +Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default. + +```js +var request = require('request'); +request('http://www.google.com', function (error, response, body) { + if (!error && response.statusCode == 200) { + console.log(body) // Show the HTML for the Google homepage. + } +}) +``` + + +## Table of contents + +- [Streaming](#streaming) +- [Forms](#forms) +- [HTTP Authentication](#http-authentication) +- [Custom HTTP Headers](#custom-http-headers) +- [OAuth Signing](#oauth-signing) +- [Proxies](#proxies) +- [Unix Domain Sockets](#unix-domain-sockets) +- [TLS/SSL Protocol](#tlsssl-protocol) +- [Support for HAR 1.2](#support-for-har-12) +- [**All Available Options**](#requestoptions-callback) + +Request also offers [convenience methods](#convenience-methods) like +`request.defaults` and `request.post`, and there are +lots of [usage examples](#examples) and several +[debugging techniques](#debugging). + + +--- + + +## Streaming + +You can stream any response to a file stream. + +```js +request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png')) +``` + +You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one). + +```js +fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json')) +``` + +Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers. + +```js +request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png')) +``` + +Request emits a "response" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](http://nodejs.org/api/http.html#http_http_incomingmessage). + +```js +request + .get('http://google.com/img.png') + .on('response', function(response) { + console.log(response.statusCode) // 200 + console.log(response.headers['content-type']) // 'image/png' + }) + .pipe(request.put('http://mysite.com/img.png')) +``` + +To easily handle errors when streaming requests, listen to the `error` event before piping: + +```js +request + .get('http://mysite.com/doodle.png') + .on('error', function(err) { + console.log(err) + }) + .pipe(fs.createWriteStream('doodle.png')) +``` + +Now let’s get fancy. + +```js +http.createServer(function (req, resp) { + if (req.url === '/doodle.png') { + if (req.method === 'PUT') { + req.pipe(request.put('http://mysite.com/doodle.png')) + } else if (req.method === 'GET' || req.method === 'HEAD') { + request.get('http://mysite.com/doodle.png').pipe(resp) + } + } +}) +``` + +You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do: + +```js +http.createServer(function (req, resp) { + if (req.url === '/doodle.png') { + var x = request('http://mysite.com/doodle.png') + req.pipe(x) + x.pipe(resp) + } +}) +``` + +And since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :) + +```js +req.pipe(request('http://mysite.com/doodle.png')).pipe(resp) +``` + +Also, none of this new functionality conflicts with requests previous features, it just expands them. + +```js +var r = request.defaults({'proxy':'http://localproxy.com'}) + +http.createServer(function (req, resp) { + if (req.url === '/doodle.png') { + r.get('http://google.com/doodle.png').pipe(resp) + } +}) +``` + +You can still use intermediate proxies, the requests will still follow HTTP forwards, etc. + +[back to top](#table-of-contents) + + +--- + + +## Forms + +`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API. + + +#### application/x-www-form-urlencoded (URL-Encoded Forms) + +URL-encoded forms are simple. + +```js +request.post('http://service.com/upload', {form:{key:'value'}}) +// or +request.post('http://service.com/upload').form({key:'value'}) +// or +request.post({url:'http://service.com/upload', form: {key:'value'}}, function(err,httpResponse,body){ /* ... */ }) +``` + + +#### multipart/form-data (Multipart Form Uploads) + +For `multipart/form-data` we use the [form-data](https://github.com/form-data/form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option. + + +```js +var formData = { + // Pass a simple key-value pair + my_field: 'my_value', + // Pass data via Buffers + my_buffer: new Buffer([1, 2, 3]), + // Pass data via Streams + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), + // Pass multiple values /w an Array + attachments: [ + fs.createReadStream(__dirname + '/attachment1.jpg'), + fs.createReadStream(__dirname + '/attachment2.jpg') + ], + // Pass optional meta-data with an 'options' object with style: {value: DATA, options: OPTIONS} + // Use case: for some types of streams, you'll need to provide "file"-related information manually. + // See the `form-data` README for more information about options: https://github.com/form-data/form-data + custom_file: { + value: fs.createReadStream('/dev/urandom'), + options: { + filename: 'topsecret.jpg', + contentType: 'image/jpg' + } + } +}; +request.post({url:'http://service.com/upload', formData: formData}, function optionalCallback(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For advanced cases, you can access the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.) + +```js +// NOTE: Advanced use-case, for normal use see 'formData' usage above +var r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) {...}) +var form = r.form(); +form.append('my_field', 'my_value'); +form.append('my_buffer', new Buffer([1, 2, 3])); +form.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'}); +``` +See the [form-data README](https://github.com/form-data/form-data) for more information & examples. + + +#### multipart/related + +Some variations in different HTTP implementations require a newline/CRLF before, after, or both before and after the boundary of a `multipart/related` request (using the multipart option). This has been observed in the .NET WebAPI version 4.0. You can turn on a boundary preambleCRLF or postamble by passing them as `true` to your request options. + +```js + request({ + method: 'PUT', + preambleCRLF: true, + postambleCRLF: true, + uri: 'http://service.com/upload', + multipart: [ + { + 'content-type': 'application/json', + body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) + }, + { body: 'I am an attachment' }, + { body: fs.createReadStream('image.png') } + ], + // alternatively pass an object containing additional options + multipart: { + chunked: false, + data: [ + { + 'content-type': 'application/json', + body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) + }, + { body: 'I am an attachment' } + ] + } + }, + function (error, response, body) { + if (error) { + return console.error('upload failed:', error); + } + console.log('Upload successful! Server responded with:', body); + }) +``` + +[back to top](#table-of-contents) + + +--- + + +## HTTP Authentication + +```js +request.get('http://some.server.com/').auth('username', 'password', false); +// or +request.get('http://some.server.com/', { + 'auth': { + 'user': 'username', + 'pass': 'password', + 'sendImmediately': false + } +}); +// or +request.get('http://some.server.com/').auth(null, null, true, 'bearerToken'); +// or +request.get('http://some.server.com/', { + 'auth': { + 'bearer': 'bearerToken' + } +}); +``` + +If passed as an option, `auth` should be a hash containing values: + +- `user` || `username` +- `pass` || `password` +- `sendImmediately` (optional) +- `bearer` (optional) + +The method form takes parameters +`auth(username, password, sendImmediately, bearer)`. + +`sendImmediately` defaults to `true`, which causes a basic or bearer +authentication header to be sent. If `sendImmediately` is `false`, then +`request` will retry with a proper authentication header after receiving a +`401` response from the server (which must contain a `WWW-Authenticate` header +indicating the required authentication method). + +Note that you can also specify basic authentication using the URL itself, as +detailed in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt). Simply pass the +`user:password` before the host with an `@` sign: + +```js +var username = 'username', + password = 'password', + url = 'http://' + username + ':' + password + '@some.server.com'; + +request({url: url}, function (error, response, body) { + // Do more stuff with 'body' here +}); +``` + +Digest authentication is supported, but it only works with `sendImmediately` +set to `false`; otherwise `request` will send basic authentication on the +initial request, which will probably cause the request to fail. + +Bearer authentication is supported, and is activated when the `bearer` value is +available. The value may be either a `String` or a `Function` returning a +`String`. Using a function to supply the bearer token is particularly useful if +used in conjunction with `defaults` to allow a single function to supply the +last known token at the time of sending a request, or to compute one on the fly. + +[back to top](#table-of-contents) + + +--- + + +## Custom HTTP Headers + +HTTP Headers, such as `User-Agent`, can be set in the `options` object. +In the example below, we call the github API to find out the number +of stars and forks for the request repository. This requires a +custom `User-Agent` header as well as https. + +```js +var request = require('request'); + +var options = { + url: 'https://api.github.com/repos/request/request', + headers: { + 'User-Agent': 'request' + } +}; + +function callback(error, response, body) { + if (!error && response.statusCode == 200) { + var info = JSON.parse(body); + console.log(info.stargazers_count + " Stars"); + console.log(info.forks_count + " Forks"); + } +} + +request(options, callback); +``` + +[back to top](#table-of-contents) + + +--- + + +## OAuth Signing + +[OAuth version 1.0](https://tools.ietf.org/html/rfc5849) is supported. The +default signing algorithm is +[HMAC-SHA1](https://tools.ietf.org/html/rfc5849#section-3.4.2): + +```js +// OAuth1.0 - 3-legged server side flow (Twitter example) +// step 1 +var qs = require('querystring') + , oauth = + { callback: 'http://mysite.com/callback/' + , consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + } + , url = 'https://api.twitter.com/oauth/request_token' + ; +request.post({url:url, oauth:oauth}, function (e, r, body) { + // Ideally, you would take the body in the response + // and construct a URL that a user clicks on (like a sign in button). + // The verifier is only available in the response after a user has + // verified with twitter that they are authorizing your app. + + // step 2 + var req_data = qs.parse(body) + var uri = 'https://api.twitter.com/oauth/authenticate' + + '?' + qs.stringify({oauth_token: req_data.oauth_token}) + // redirect the user to the authorize uri + + // step 3 + // after the user is redirected back to your server + var auth_data = qs.parse(body) + , oauth = + { consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + , token: auth_data.oauth_token + , token_secret: req_data.oauth_token_secret + , verifier: auth_data.oauth_verifier + } + , url = 'https://api.twitter.com/oauth/access_token' + ; + request.post({url:url, oauth:oauth}, function (e, r, body) { + // ready to make signed requests on behalf of the user + var perm_data = qs.parse(body) + , oauth = + { consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + , token: perm_data.oauth_token + , token_secret: perm_data.oauth_token_secret + } + , url = 'https://api.twitter.com/1.1/users/show.json' + , qs = + { screen_name: perm_data.screen_name + , user_id: perm_data.user_id + } + ; + request.get({url:url, oauth:oauth, qs:qs, json:true}, function (e, r, user) { + console.log(user) + }) + }) +}) +``` + +For [RSA-SHA1 signing](https://tools.ietf.org/html/rfc5849#section-3.4.3), make +the following changes to the OAuth options object: +* Pass `signature_method : 'RSA-SHA1'` +* Instead of `consumer_secret`, specify a `private_key` string in + [PEM format](http://how2ssl.com/articles/working_with_pem_files/) + +For [PLAINTEXT signing](http://oauth.net/core/1.0/#anchor22), make +the following changes to the OAuth options object: +* Pass `signature_method : 'PLAINTEXT'` + +To send OAuth parameters via query params or in a post body as described in The +[Consumer Request Parameters](http://oauth.net/core/1.0/#consumer_req_param) +section of the oauth1 spec: +* Pass `transport_method : 'query'` or `transport_method : 'body'` in the OAuth + options object. +* `transport_method` defaults to `'header'` + +To use [Request Body Hash](https://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html) you can either +* Manually generate the body hash and pass it as a string `body_hash: '...'` +* Automatically generate the body hash by passing `body_hash: true` + +[back to top](#table-of-contents) + + +--- + + +## Proxies + +If you specify a `proxy` option, then the request (and any subsequent +redirects) will be sent via a connection to the proxy server. + +If your endpoint is an `https` url, and you are using a proxy, then +request will send a `CONNECT` request to the proxy server *first*, and +then use the supplied connection to connect to the endpoint. + +That is, first it will make a request like: + +``` +HTTP/1.1 CONNECT endpoint-server.com:80 +Host: proxy-server.com +User-Agent: whatever user agent you specify +``` + +and then the proxy server make a TCP connection to `endpoint-server` +on port `80`, and return a response that looks like: + +``` +HTTP/1.1 200 OK +``` + +At this point, the connection is left open, and the client is +communicating directly with the `endpoint-server.com` machine. + +See [the wikipedia page on HTTP Tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel) +for more information. + +By default, when proxying `http` traffic, request will simply make a +standard proxied `http` request. This is done by making the `url` +section of the initial line of the request a fully qualified url to +the endpoint. + +For example, it will make a single request that looks like: + +``` +HTTP/1.1 GET http://endpoint-server.com/some-url +Host: proxy-server.com +Other-Headers: all go here + +request body or whatever +``` + +Because a pure "http over http" tunnel offers no additional security +or other features, it is generally simpler to go with a +straightforward HTTP proxy in this case. However, if you would like +to force a tunneling proxy, you may set the `tunnel` option to `true`. + +You can also make a standard proxied `http` request by explicitly setting +`tunnel : false`, but **note that this will allow the proxy to see the traffic +to/from the destination server**. + +If you are using a tunneling proxy, you may set the +`proxyHeaderWhiteList` to share certain headers with the proxy. + +You can also set the `proxyHeaderExclusiveList` to share certain +headers only with the proxy and not with destination host. + +By default, this set is: + +``` +accept +accept-charset +accept-encoding +accept-language +accept-ranges +cache-control +content-encoding +content-language +content-length +content-location +content-md5 +content-range +content-type +connection +date +expect +max-forwards +pragma +proxy-authorization +referer +te +transfer-encoding +user-agent +via +``` + +Note that, when using a tunneling proxy, the `proxy-authorization` +header and any headers from custom `proxyHeaderExclusiveList` are +*never* sent to the endpoint server, but only to the proxy server. + + +### Controlling proxy behaviour using environment variables + +The following environment variables are respected by `request`: + + * `HTTP_PROXY` / `http_proxy` + * `HTTPS_PROXY` / `https_proxy` + * `NO_PROXY` / `no_proxy` + +When `HTTP_PROXY` / `http_proxy` are set, they will be used to proxy non-SSL requests that do not have an explicit `proxy` configuration option present. Similarly, `HTTPS_PROXY` / `https_proxy` will be respected for SSL requests that do not have an explicit `proxy` configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the `proxy` configuration option. Furthermore, the `proxy` configuration option can be explicitly set to false / null to opt out of proxying altogether for that request. + +`request` is also aware of the `NO_PROXY`/`no_proxy` environment variables. These variables provide a granular way to opt out of proxying, on a per-host basis. It should contain a comma separated list of hosts to opt out of proxying. It is also possible to opt of proxying when a particular destination port is used. Finally, the variable may be set to `*` to opt out of the implicit proxy configuration of the other environment variables. + +Here's some examples of valid `no_proxy` values: + + * `google.com` - don't proxy HTTP/HTTPS requests to Google. + * `google.com:443` - don't proxy HTTPS requests to Google, but *do* proxy HTTP requests to Google. + * `google.com:443, yahoo.com:80` - don't proxy HTTPS requests to Google, and don't proxy HTTP requests to Yahoo! + * `*` - ignore `https_proxy`/`http_proxy` environment variables altogether. + +[back to top](#table-of-contents) + + +--- + + +## UNIX Domain Sockets + +`request` supports making requests to [UNIX Domain Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme: + +```js +/* Pattern */ 'http://unix:SOCKET:PATH' +/* Example */ request.get('http://unix:/absolute/path/to/unix.socket:/request/path') +``` + +Note: The `SOCKET` path is assumed to be absolute to the root of the host file system. + +[back to top](#table-of-contents) + + +--- + + +## TLS/SSL Protocol + +TLS/SSL Protocol options, such as `cert`, `key` and `passphrase`, can be +set directly in `options` object, in the `agentOptions` property of the `options` object, or even in `https.globalAgent.options`. Keep in mind that, although `agentOptions` allows for a slightly wider range of configurations, the recommended way is via `options` object directly, as using `agentOptions` or `https.globalAgent.options` would not be applied in the same way in proxied environments (as data travels through a TLS connection instead of an http/https agent). + +```js +var fs = require('fs') + , path = require('path') + , certFile = path.resolve(__dirname, 'ssl/client.crt') + , keyFile = path.resolve(__dirname, 'ssl/client.key') + , caFile = path.resolve(__dirname, 'ssl/ca.cert.pem') + , request = require('request'); + +var options = { + url: 'https://api.some-server.com/', + cert: fs.readFileSync(certFile), + key: fs.readFileSync(keyFile), + passphrase: 'password', + ca: fs.readFileSync(caFile) + } +}; + +request.get(options); +``` + +### Using `options.agentOptions` + +In the example below, we call an API requires client side SSL certificate +(in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol: + +```js +var fs = require('fs') + , path = require('path') + , certFile = path.resolve(__dirname, 'ssl/client.crt') + , keyFile = path.resolve(__dirname, 'ssl/client.key') + , request = require('request'); + +var options = { + url: 'https://api.some-server.com/', + agentOptions: { + cert: fs.readFileSync(certFile), + key: fs.readFileSync(keyFile), + // Or use `pfx` property replacing `cert` and `key` when using private key, certificate and CA certs in PFX or PKCS12 format: + // pfx: fs.readFileSync(pfxFilePath), + passphrase: 'password', + securityOptions: 'SSL_OP_NO_SSLv3' + } +}; + +request.get(options); +``` + +It is able to force using SSLv3 only by specifying `secureProtocol`: + +```js +request.get({ + url: 'https://api.some-server.com/', + agentOptions: { + secureProtocol: 'SSLv3_method' + } +}); +``` + +It is possible to accept other certificates than those signed by generally allowed Certificate Authorities (CAs). +This can be useful, for example, when using self-signed certificates. +To require a different root certificate, you can specify the signing CA by adding the contents of the CA's certificate file to the `agentOptions`. +The certificate the domain presents must be signed by the root certificate specified: + +```js +request.get({ + url: 'https://api.some-server.com/', + agentOptions: { + ca: fs.readFileSync('ca.cert.pem') + } +}); +``` + +[back to top](#table-of-contents) + + +--- + +## Support for HAR 1.2 + +The `options.har` property will override the values: `url`, `method`, `qs`, `headers`, `form`, `formData`, `body`, `json`, as well as construct multipart data and read files from disk when `request.postData.params[].fileName` is present without a matching `value`. + +a validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching. + +```js + var request = require('request') + request({ + // will be ignored + method: 'GET', + uri: 'http://www.google.com', + + // HTTP Archive Request Object + har: { + url: 'http://www.mockbin.com/har', + method: 'POST', + headers: [ + { + name: 'content-type', + value: 'application/x-www-form-urlencoded' + } + ], + postData: { + mimeType: 'application/x-www-form-urlencoded', + params: [ + { + name: 'foo', + value: 'bar' + }, + { + name: 'hello', + value: 'world' + } + ] + } + } + }) + + // a POST request will be sent to http://www.mockbin.com + // with body an application/x-www-form-urlencoded body: + // foo=bar&hello=world +``` + +[back to top](#table-of-contents) + + +--- + +## request(options, callback) + +The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional. + +- `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()` +- `baseUrl` - fully qualified uri string used as the base url. Most useful with `request.defaults`, for example when you want to do many requests to the same domain. If `baseUrl` is `https://example.com/api/`, then requesting `/end/point?test=true` will fetch `https://example.com/api/end/point?test=true`. When `baseUrl` is given, `uri` must also be a string. +- `method` - http method (default: `"GET"`) +- `headers` - http headers (default: `{}`) + +--- + +- `qs` - object containing querystring values to be appended to the `uri` +- `qsParseOptions` - object containing options to pass to the [qs.parse](https://github.com/hapijs/qs#parsing-objects) method. Alternatively pass options to the [querystring.parse](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}` +- `qsStringifyOptions` - object containing options to pass to the [qs.stringify](https://github.com/hapijs/qs#stringifying) method. Alternatively pass options to the [querystring.stringify](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`. For example, to change the way arrays are converted to query strings using the `qs` module pass the `arrayFormat` option with one of `indices|brackets|repeat` +- `useQuerystring` - If true, use `querystring` to stringify and parse + querystrings, otherwise use `qs` (default: `false`). Set this option to + `true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the + default `foo[0]=bar&foo[1]=baz`. + +--- + +- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`, unless `json` is `true`. If `json` is `true`, then `body` must be a JSON-serializable object. +- `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above. +- `formData` - Data to pass for a `multipart/form-data` request. See + [Forms](#forms) section above. +- `multipart` - array of objects which contain their own headers and `body` + attributes. Sends a `multipart/related` request. See [Forms](#forms) section + above. + - Alternatively you can pass in an object `{chunked: false, data: []}` where + `chunked` is used to specify whether the request is sent in + [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding) + In non-chunked requests, data items with body streams are not allowed. +- `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request. +- `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request. +- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. +- `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body. + +--- + +- `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above. +- `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above. +- `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). +- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first. +- `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. + +--- + +- `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise. +- `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`) +- `maxRedirects` - the maximum number of redirects to follow (default: `10`) +- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`). **Note:** if true, referer header set in the initial request is preserved during redirect chain. + +--- + +- `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.) +- `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below. +- `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section) + +--- + +- `agent` - `http(s).Agent` instance to use +- `agentClass` - alternatively specify your agent's class name +- `agentOptions` - and pass its options. **Note:** for HTTPS see [tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) and the [documentation above](#using-optionsagentoptions). +- `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Note:** Defaults to `http(s).Agent({keepAlive:true})` in node 0.12+ +- `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified. + - A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`). + - Note that if you are sending multiple requests in a loop and creating + multiple new `pool` objects, `maxSockets` will not work as intended. To + work around this, either use [`request.defaults`](#requestdefaultsoptions) + with your pool options or create the pool object with the `maxSockets` + property outside of the loop. +- `timeout` - Integer containing the number of milliseconds to wait for a +server to send response headers (and start the response body) before aborting +the request. Note that if the underlying TCP connection cannot be established, +the OS-wide TCP connection timeout will overrule the `timeout` option ([the +default in Linux can be anywhere from 20-120 seconds][linux-timeout]). + +[linux-timeout]: http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout + +--- + +- `localAddress` - Local interface to bind for network connections. +- `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`) +- `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option. +- `tunnel` - controls the behavior of + [HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling) + as follows: + - `undefined` (default) - `true` if the destination is `https`, `false` otherwise + - `true` - always tunnel to the destination by making a `CONNECT` request to + the proxy + - `false` - request the destination as a `GET` request. +- `proxyHeaderWhiteList` - A whitelist of headers to send to a + tunneling proxy. +- `proxyHeaderExclusiveList` - A whitelist of headers to send + exclusively to a tunneling proxy and not to destination. + +--- + +- `time` - If `true`, the request-response cycle (including all redirects) is timed at millisecond resolution, and the result provided on the response's `elapsedTime` property. +- `har` - A [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)* + +The callback argument gets 3 arguments: + +1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object) +2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object +3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied) + +[back to top](#table-of-contents) + + +--- + +## Convenience methods + +There are also shorthand methods for different HTTP METHODs and some other conveniences. + + +### request.defaults(options) + +This method **returns a wrapper** around the normal request API that defaults +to whatever options you pass to it. + +**Note:** `request.defaults()` **does not** modify the global request API; +instead, it **returns a wrapper** that has your default settings applied to it. + +**Note:** You can call `.defaults()` on the wrapper that is returned from +`request.defaults` to add/override defaults that were previously defaulted. + +For example: +```js +//requests using baseRequest() will set the 'x-token' header +var baseRequest = request.defaults({ + headers: {'x-token': 'my-token'} +}) + +//requests using specialRequest() will include the 'x-token' header set in +//baseRequest and will also include the 'special' header +var specialRequest = baseRequest.defaults({ + headers: {special: 'special value'} +}) +``` + +### request.put + +Same as `request()`, but defaults to `method: "PUT"`. + +```js +request.put(url) +``` + +### request.patch + +Same as `request()`, but defaults to `method: "PATCH"`. + +```js +request.patch(url) +``` + +### request.post + +Same as `request()`, but defaults to `method: "POST"`. + +```js +request.post(url) +``` + +### request.head + +Same as `request()`, but defaults to `method: "HEAD"`. + +```js +request.head(url) +``` + +### request.del + +Same as `request()`, but defaults to `method: "DELETE"`. + +```js +request.del(url) +``` + +### request.get + +Same as `request()` (for uniformity). + +```js +request.get(url) +``` +### request.cookie + +Function that creates a new cookie. + +```js +request.cookie('key1=value1') +``` +### request.jar() + +Function that creates a new cookie jar. + +```js +request.jar() +``` + +[back to top](#table-of-contents) + + +--- + + +## Debugging + +There are at least three ways to debug the operation of `request`: + +1. Launch the node process like `NODE_DEBUG=request node script.js` + (`lib,request,otherlib` works too). + +2. Set `require('request').debug = true` at any time (this does the same thing + as #1). + +3. Use the [request-debug module](https://github.com/request/request-debug) to + view request and response headers and bodies. + +[back to top](#table-of-contents) + + +--- + +## Timeouts + +Most requests to external servers should have a timeout attached, in case the +server is not responding in a timely manner. Without a timeout, your code may +have a socket open/consume resources for minutes or more. + +There are two main types of timeouts: **connection timeouts** and **read +timeouts**. A connect timeout occurs if the timeout is hit while your client is +attempting to establish a connection to a remote machine (corresponding to the +[connect() call][connect] on the socket). A read timeout occurs any time the +server is too slow to send back a part of the response. + +These two situations have widely different implications for what went wrong +with the request, so it's useful to be able to distinguish them. You can detect +timeout errors by checking `err.code` for an 'ETIMEDOUT' value. Further, you +can detect whether the timeout was a connection timeout by checking if the +`err.connect` property is set to `true`. + +```js +request.get('http://10.255.255.1', {timeout: 1500}, function(err) { + console.log(err.code === 'ETIMEDOUT'); + // Set to `true` if the timeout was a connection timeout, `false` or + // `undefined` otherwise. + console.log(err.connect === true); + process.exit(0); +}); +``` + +[connect]: http://linux.die.net/man/2/connect + +## Examples: + +```js + var request = require('request') + , rand = Math.floor(Math.random()*100000000).toString() + ; + request( + { method: 'PUT' + , uri: 'http://mikeal.iriscouch.com/testjs/' + rand + , multipart: + [ { 'content-type': 'application/json' + , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) + } + , { body: 'I am an attachment' } + ] + } + , function (error, response, body) { + if(response.statusCode == 201){ + console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand) + } else { + console.log('error: '+ response.statusCode) + console.log(body) + } + } + ) +``` + +For backwards-compatibility, response compression is not supported by default. +To accept gzip-compressed responses, set the `gzip` option to `true`. Note +that the body data passed through `request` is automatically decompressed +while the response object is unmodified and will contain compressed data if +the server sent a compressed response. + +```js + var request = require('request') + request( + { method: 'GET' + , uri: 'http://www.google.com' + , gzip: true + } + , function (error, response, body) { + // body is the decompressed response body + console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity')) + console.log('the decoded data is: ' + body) + } + ).on('data', function(data) { + // decompressed data as it is received + console.log('decoded chunk: ' + data) + }) + .on('response', function(response) { + // unmodified http.IncomingMessage object + response.on('data', function(data) { + // compressed data as it is received + console.log('received ' + data.length + ' bytes of compressed data') + }) + }) +``` + +Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`). + +```js +var request = request.defaults({jar: true}) +request('http://www.google.com', function () { + request('http://images.google.com') +}) +``` + +To use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`) + +```js +var j = request.jar() +var request = request.defaults({jar:j}) +request('http://www.google.com', function () { + request('http://images.google.com') +}) +``` + +OR + +```js +var j = request.jar(); +var cookie = request.cookie('key1=value1'); +var url = 'http://www.google.com'; +j.setCookie(cookie, url); +request({url: url, jar: j}, function () { + request('http://images.google.com') +}) +``` + +To use a custom cookie store (such as a +[`FileCookieStore`](https://github.com/mitsuru/tough-cookie-filestore) +which supports saving to and restoring from JSON files), pass it as a parameter +to `request.jar()`: + +```js +var FileCookieStore = require('tough-cookie-filestore'); +// NOTE - currently the 'cookies.json' file must already exist! +var j = request.jar(new FileCookieStore('cookies.json')); +request = request.defaults({ jar : j }) +request('http://www.google.com', function() { + request('http://images.google.com') +}) +``` + +The cookie store must be a +[`tough-cookie`](https://github.com/SalesforceEng/tough-cookie) +store and it must support synchronous operations; see the +[`CookieStore` API docs](https://github.com/SalesforceEng/tough-cookie#cookiestore-api) +for details. + +To inspect your cookie jar after a request: + +```js +var j = request.jar() +request({url: 'http://www.google.com', jar: j}, function () { + var cookie_string = j.getCookieString(url); // "key1=value1; key2=value2; ..." + var cookies = j.getCookies(url); + // [{key: 'key1', value: 'value1', domain: "www.google.com", ...}, ...] +}) +``` + +[back to top](#table-of-contents) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/request/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/index.js new file mode 100644 index 00000000..08cd3413 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/index.js @@ -0,0 +1,156 @@ +// Copyright 2010-2012 Mikeal Rogers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict' + +var extend = require('extend') + , cookies = require('./lib/cookies') + , helpers = require('./lib/helpers') + +var isFunction = helpers.isFunction + , paramsHaveRequestBody = helpers.paramsHaveRequestBody + + +// organize params for patch, post, put, head, del +function initParams(uri, options, callback) { + if (typeof options === 'function') { + callback = options + } + + var params = {} + if (typeof options === 'object') { + extend(params, options, {uri: uri}) + } else if (typeof uri === 'string') { + extend(params, {uri: uri}) + } else { + extend(params, uri) + } + + params.callback = callback + return params +} + +function request (uri, options, callback) { + if (typeof uri === 'undefined') { + throw new Error('undefined is not a valid uri or options object.') + } + + var params = initParams(uri, options, callback) + + if (params.method === 'HEAD' && paramsHaveRequestBody(params)) { + throw new Error('HTTP HEAD requests MUST NOT include a request body.') + } + + return new request.Request(params) +} + +function verbFunc (verb) { + var method = verb === 'del' ? 'DELETE' : verb.toUpperCase() + return function (uri, options, callback) { + var params = initParams(uri, options, callback) + params.method = method + return request(params, params.callback) + } +} + +// define like this to please codeintel/intellisense IDEs +request.get = verbFunc('get') +request.head = verbFunc('head') +request.post = verbFunc('post') +request.put = verbFunc('put') +request.patch = verbFunc('patch') +request.del = verbFunc('del') + +request.jar = function (store) { + return cookies.jar(store) +} + +request.cookie = function (str) { + return cookies.parse(str) +} + +function wrapRequestMethod (method, options, requester, verb) { + + return function (uri, opts, callback) { + var params = initParams(uri, opts, callback) + + var target = {} + extend(true, target, options, params) + + target.pool = params.pool || options.pool + + if (verb) { + target.method = (verb === 'del' ? 'DELETE' : verb.toUpperCase()) + } + + if (isFunction(requester)) { + method = requester + } + + return method(target, target.callback) + } +} + +request.defaults = function (options, requester) { + var self = this + + options = options || {} + + if (typeof options === 'function') { + requester = options + options = {} + } + + var defaults = wrapRequestMethod(self, options, requester) + + var verbs = ['get', 'head', 'post', 'put', 'patch', 'del'] + verbs.forEach(function(verb) { + defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb) + }) + + defaults.cookie = wrapRequestMethod(self.cookie, options, requester) + defaults.jar = self.jar + defaults.defaults = self.defaults + return defaults +} + +request.forever = function (agentOptions, optionsArg) { + var options = {} + if (optionsArg) { + extend(options, optionsArg) + } + if (agentOptions) { + options.agentOptions = agentOptions + } + + options.forever = true + return request.defaults(options) +} + +// Exports + +module.exports = request +request.Request = require('./request') +request.initParams = initParams + +// Backwards compatibility for request.debug +Object.defineProperty(request, 'debug', { + enumerable : true, + get : function() { + return request.Request.debug + }, + set : function(debug) { + request.Request.debug = debug + } +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/request/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/package.json new file mode 100644 index 00000000..f64bbfd6 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/package.json @@ -0,0 +1,113 @@ +{ + "name": "request", + "description": "Simplified HTTP request client.", + "tags": [ + "http", + "simple", + "util", + "utility" + ], + "version": "2.69.0", + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/request/request.git" + }, + "bugs": { + "url": "http://github.com/request/request/issues" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=0.8.0" + }, + "main": "index.js", + "dependencies": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "bl": "~1.0.0", + "caseless": "~0.11.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~1.0.0-rc3", + "har-validator": "~2.0.6", + "hawk": "~3.1.0", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "node-uuid": "~1.4.7", + "oauth-sign": "~0.8.0", + "qs": "~6.0.2", + "stringstream": "~0.0.4", + "tough-cookie": "~2.2.0", + "tunnel-agent": "~0.4.1" + }, + "scripts": { + "test": "npm run lint && npm run test-ci && npm run test-browser", + "test-ci": "taper tests/test-*.js", + "test-cov": "istanbul cover tape tests/test-*.js", + "test-browser": "node tests/browser/start.js", + "lint": "eslint lib/ *.js tests/ && echo Lint passed." + }, + "devDependencies": { + "bluebird": "^3.0.2", + "browserify": "^13.0.0", + "browserify-istanbul": "^0.1.5", + "buffer-equal": "^1.0.0", + "codecov.io": "^0.1.6", + "coveralls": "^2.11.4", + "eslint": "1.10.3", + "function-bind": "^1.0.2", + "istanbul": "^0.4.0", + "karma": "^0.13.10", + "karma-browserify": "^4.4.0", + "karma-cli": "^0.1.1", + "karma-coverage": "^0.5.3", + "karma-phantomjs-launcher": "^0.1.4", + "karma-tap": "^1.0.3", + "rimraf": "^2.2.8", + "server-destroy": "^1.0.1", + "tape": "^4.2.0", + "taper": "^0.4.0" + }, + "gitHead": "1c2fb40c74efb4f706f350a78dbd5e58fe913af3", + "homepage": "https://github.com/request/request#readme", + "_id": "request@2.69.0", + "_shasum": "cf91d2e000752b1217155c005241911991a2346a", + "_from": "request@2.69.0", + "_npmVersion": "2.14.4", + "_nodeVersion": "4.1.2", + "_npmUser": { + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" + }, + "maintainers": [ + { + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" + }, + { + "name": "nylen", + "email": "jnylen@gmail.com" + }, + { + "name": "fredkschott", + "email": "fkschott@gmail.com" + }, + { + "name": "simov", + "email": "simeonvelichkov@gmail.com" + } + ], + "dist": { + "shasum": "cf91d2e000752b1217155c005241911991a2346a", + "tarball": "http://registry.npmjs.org/request/-/request-2.69.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/request/-/request-2.69.0.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/request/request.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/request.js new file mode 100644 index 00000000..73fb6b86 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/request/request.js @@ -0,0 +1,1419 @@ +'use strict' + +var http = require('http') + , https = require('https') + , url = require('url') + , util = require('util') + , stream = require('stream') + , zlib = require('zlib') + , bl = require('bl') + , hawk = require('hawk') + , aws2 = require('aws-sign2') + , httpSignature = require('http-signature') + , mime = require('mime-types') + , stringstream = require('stringstream') + , caseless = require('caseless') + , ForeverAgent = require('forever-agent') + , FormData = require('form-data') + , extend = require('extend') + , isTypedArray = require('is-typedarray').strict + , helpers = require('./lib/helpers') + , cookies = require('./lib/cookies') + , getProxyFromURI = require('./lib/getProxyFromURI') + , Querystring = require('./lib/querystring').Querystring + , Har = require('./lib/har').Har + , Auth = require('./lib/auth').Auth + , OAuth = require('./lib/oauth').OAuth + , Multipart = require('./lib/multipart').Multipart + , Redirect = require('./lib/redirect').Redirect + , Tunnel = require('./lib/tunnel').Tunnel + +var safeStringify = helpers.safeStringify + , isReadStream = helpers.isReadStream + , toBase64 = helpers.toBase64 + , defer = helpers.defer + , copy = helpers.copy + , version = helpers.version + , globalCookieJar = cookies.jar() + + +var globalPool = {} + +function filterForNonReserved(reserved, options) { + // Filter out properties that are not reserved. + // Reserved values are passed in at call site. + + var object = {} + for (var i in options) { + var notReserved = (reserved.indexOf(i) === -1) + if (notReserved) { + object[i] = options[i] + } + } + return object +} + +function filterOutReservedFunctions(reserved, options) { + // Filter out properties that are functions and are reserved. + // Reserved values are passed in at call site. + + var object = {} + for (var i in options) { + var isReserved = !(reserved.indexOf(i) === -1) + var isFunction = (typeof options[i] === 'function') + if (!(isReserved && isFunction)) { + object[i] = options[i] + } + } + return object + +} + +// Function for properly handling a connection error +function connectionErrorHandler(error) { + var socket = this + if (socket.res) { + if (socket.res.request) { + socket.res.request.emit('error', error) + } else { + socket.res.emit('error', error) + } + } else { + socket._httpMessage.emit('error', error) + } +} + +// Return a simpler request object to allow serialization +function requestToJSON() { + var self = this + return { + uri: self.uri, + method: self.method, + headers: self.headers + } +} + +// Return a simpler response object to allow serialization +function responseToJSON() { + var self = this + return { + statusCode: self.statusCode, + body: self.body, + headers: self.headers, + request: requestToJSON.call(self.request) + } +} + +function Request (options) { + // if given the method property in options, set property explicitMethod to true + + // extend the Request instance with any non-reserved properties + // remove any reserved functions from the options object + // set Request instance to be readable and writable + // call init + + var self = this + + // start with HAR, then override with additional options + if (options.har) { + self._har = new Har(self) + options = self._har.options(options) + } + + stream.Stream.call(self) + var reserved = Object.keys(Request.prototype) + var nonReserved = filterForNonReserved(reserved, options) + + extend(self, nonReserved) + options = filterOutReservedFunctions(reserved, options) + + self.readable = true + self.writable = true + if (options.method) { + self.explicitMethod = true + } + self._qs = new Querystring(self) + self._auth = new Auth(self) + self._oauth = new OAuth(self) + self._multipart = new Multipart(self) + self._redirect = new Redirect(self) + self._tunnel = new Tunnel(self) + self.init(options) +} + +util.inherits(Request, stream.Stream) + +// Debugging +Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG) +function debug() { + if (Request.debug) { + console.error('REQUEST %s', util.format.apply(util, arguments)) + } +} +Request.prototype.debug = debug + +Request.prototype.init = function (options) { + // init() contains all the code to setup the request object. + // the actual outgoing request is not started until start() is called + // this function is called from both the constructor and on redirect. + var self = this + if (!options) { + options = {} + } + self.headers = self.headers ? copy(self.headers) : {} + + // Delete headers with value undefined since they break + // ClientRequest.OutgoingMessage.setHeader in node 0.12 + for (var headerName in self.headers) { + if (typeof self.headers[headerName] === 'undefined') { + delete self.headers[headerName] + } + } + + caseless.httpify(self, self.headers) + + if (!self.method) { + self.method = options.method || 'GET' + } + if (!self.localAddress) { + self.localAddress = options.localAddress + } + + self._qs.init(options) + + debug(options) + if (!self.pool && self.pool !== false) { + self.pool = globalPool + } + self.dests = self.dests || [] + self.__isRequestRequest = true + + // Protect against double callback + if (!self._callback && self.callback) { + self._callback = self.callback + self.callback = function () { + if (self._callbackCalled) { + return // Print a warning maybe? + } + self._callbackCalled = true + self._callback.apply(self, arguments) + } + self.on('error', self.callback.bind()) + self.on('complete', self.callback.bind(self, null)) + } + + // People use this property instead all the time, so support it + if (!self.uri && self.url) { + self.uri = self.url + delete self.url + } + + // If there's a baseUrl, then use it as the base URL (i.e. uri must be + // specified as a relative path and is appended to baseUrl). + if (self.baseUrl) { + if (typeof self.baseUrl !== 'string') { + return self.emit('error', new Error('options.baseUrl must be a string')) + } + + if (typeof self.uri !== 'string') { + return self.emit('error', new Error('options.uri must be a string when using options.baseUrl')) + } + + if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) { + return self.emit('error', new Error('options.uri must be a path when using options.baseUrl')) + } + + // Handle all cases to make sure that there's only one slash between + // baseUrl and uri. + var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1 + var uriStartsWithSlash = self.uri.indexOf('/') === 0 + + if (baseUrlEndsWithSlash && uriStartsWithSlash) { + self.uri = self.baseUrl + self.uri.slice(1) + } else if (baseUrlEndsWithSlash || uriStartsWithSlash) { + self.uri = self.baseUrl + self.uri + } else if (self.uri === '') { + self.uri = self.baseUrl + } else { + self.uri = self.baseUrl + '/' + self.uri + } + delete self.baseUrl + } + + // A URI is needed by this point, emit error if we haven't been able to get one + if (!self.uri) { + return self.emit('error', new Error('options.uri is a required argument')) + } + + // If a string URI/URL was given, parse it into a URL object + if (typeof self.uri === 'string') { + self.uri = url.parse(self.uri) + } + + // Some URL objects are not from a URL parsed string and need href added + if (!self.uri.href) { + self.uri.href = url.format(self.uri) + } + + // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme + if (self.uri.protocol === 'unix:') { + return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`')) + } + + // Support Unix Sockets + if (self.uri.host === 'unix') { + self.enableUnixSocket() + } + + if (self.strictSSL === false) { + self.rejectUnauthorized = false + } + + if (!self.uri.pathname) {self.uri.pathname = '/'} + + if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) { + // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar + // Detect and reject it as soon as possible + var faultyUri = url.format(self.uri) + var message = 'Invalid URI "' + faultyUri + '"' + if (Object.keys(options).length === 0) { + // No option ? This can be the sign of a redirect + // As this is a case where the user cannot do anything (they didn't call request directly with this URL) + // they should be warned that it can be caused by a redirection (can save some hair) + message += '. This can be caused by a crappy redirection.' + } + // This error was fatal + self.abort() + return self.emit('error', new Error(message)) + } + + if (!self.hasOwnProperty('proxy')) { + self.proxy = getProxyFromURI(self.uri) + } + + self.tunnel = self._tunnel.isEnabled() + if (self.proxy) { + self._tunnel.setup(options) + } + + self._redirect.onRequest(options) + + self.setHost = false + if (!self.hasHeader('host')) { + var hostHeaderName = self.originalHostHeaderName || 'host' + self.setHeader(hostHeaderName, self.uri.hostname) + if (self.uri.port) { + if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') && + !(self.uri.port === 443 && self.uri.protocol === 'https:') ) { + self.setHeader(hostHeaderName, self.getHeader('host') + (':' + self.uri.port) ) + } + } + self.setHost = true + } + + self.jar(self._jar || options.jar) + + if (!self.uri.port) { + if (self.uri.protocol === 'http:') {self.uri.port = 80} + else if (self.uri.protocol === 'https:') {self.uri.port = 443} + } + + if (self.proxy && !self.tunnel) { + self.port = self.proxy.port + self.host = self.proxy.hostname + } else { + self.port = self.uri.port + self.host = self.uri.hostname + } + + if (options.form) { + self.form(options.form) + } + + if (options.formData) { + var formData = options.formData + var requestForm = self.form() + var appendFormValue = function (key, value) { + if (value.hasOwnProperty('value') && value.hasOwnProperty('options')) { + requestForm.append(key, value.value, value.options) + } else { + requestForm.append(key, value) + } + } + for (var formKey in formData) { + if (formData.hasOwnProperty(formKey)) { + var formValue = formData[formKey] + if (formValue instanceof Array) { + for (var j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]) + } + } else { + appendFormValue(formKey, formValue) + } + } + } + } + + if (options.qs) { + self.qs(options.qs) + } + + if (self.uri.path) { + self.path = self.uri.path + } else { + self.path = self.uri.pathname + (self.uri.search || '') + } + + if (self.path.length === 0) { + self.path = '/' + } + + // Auth must happen last in case signing is dependent on other headers + if (options.aws) { + self.aws(options.aws) + } + + if (options.hawk) { + self.hawk(options.hawk) + } + + if (options.httpSignature) { + self.httpSignature(options.httpSignature) + } + + if (options.auth) { + if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) { + options.auth.user = options.auth.username + } + if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) { + options.auth.pass = options.auth.password + } + + self.auth( + options.auth.user, + options.auth.pass, + options.auth.sendImmediately, + options.auth.bearer + ) + } + + if (self.gzip && !self.hasHeader('accept-encoding')) { + self.setHeader('accept-encoding', 'gzip') + } + + if (self.uri.auth && !self.hasHeader('authorization')) { + var uriAuthPieces = self.uri.auth.split(':').map(function(item) {return self._qs.unescape(item)}) + self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true) + } + + if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) { + var proxyAuthPieces = self.proxy.auth.split(':').map(function(item) {return self._qs.unescape(item)}) + var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':')) + self.setHeader('proxy-authorization', authHeader) + } + + if (self.proxy && !self.tunnel) { + self.path = (self.uri.protocol + '//' + self.uri.host + self.path) + } + + if (options.json) { + self.json(options.json) + } + if (options.multipart) { + self.multipart(options.multipart) + } + + if (options.time) { + self.timing = true + self.elapsedTime = self.elapsedTime || 0 + } + + function setContentLength () { + if (isTypedArray(self.body)) { + self.body = new Buffer(self.body) + } + + if (!self.hasHeader('content-length')) { + var length + if (typeof self.body === 'string') { + length = Buffer.byteLength(self.body) + } + else if (Array.isArray(self.body)) { + length = self.body.reduce(function (a, b) {return a + b.length}, 0) + } + else { + length = self.body.length + } + + if (length) { + self.setHeader('content-length', length) + } else { + self.emit('error', new Error('Argument error, options.body.')) + } + } + } + if (self.body) { + setContentLength() + } + + if (options.oauth) { + self.oauth(options.oauth) + } else if (self._oauth.params && self.hasHeader('authorization')) { + self.oauth(self._oauth.params) + } + + var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol + , defaultModules = {'http:':http, 'https:':https} + , httpModules = self.httpModules || {} + + self.httpModule = httpModules[protocol] || defaultModules[protocol] + + if (!self.httpModule) { + return self.emit('error', new Error('Invalid protocol: ' + protocol)) + } + + if (options.ca) { + self.ca = options.ca + } + + if (!self.agent) { + if (options.agentOptions) { + self.agentOptions = options.agentOptions + } + + if (options.agentClass) { + self.agentClass = options.agentClass + } else if (options.forever) { + var v = version() + // use ForeverAgent in node 0.10- only + if (v.major === 0 && v.minor <= 10) { + self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL + } else { + self.agentClass = self.httpModule.Agent + self.agentOptions = self.agentOptions || {} + self.agentOptions.keepAlive = true + } + } else { + self.agentClass = self.httpModule.Agent + } + } + + if (self.pool === false) { + self.agent = false + } else { + self.agent = self.agent || self.getNewAgent() + } + + self.on('pipe', function (src) { + if (self.ntick && self._started) { + self.emit('error', new Error('You cannot pipe to this stream after the outbound request has started.')) + } + self.src = src + if (isReadStream(src)) { + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', mime.lookup(src.path)) + } + } else { + if (src.headers) { + for (var i in src.headers) { + if (!self.hasHeader(i)) { + self.setHeader(i, src.headers[i]) + } + } + } + if (self._json && !self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + if (src.method && !self.explicitMethod) { + self.method = src.method + } + } + + // self.on('pipe', function () { + // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.') + // }) + }) + + defer(function () { + if (self._aborted) { + return + } + + var end = function () { + if (self._form) { + if (!self._auth.hasAuth) { + self._form.pipe(self) + } + else if (self._auth.hasAuth && self._auth.sentAuth) { + self._form.pipe(self) + } + } + if (self._multipart && self._multipart.chunked) { + self._multipart.body.pipe(self) + } + if (self.body) { + setContentLength() + if (Array.isArray(self.body)) { + self.body.forEach(function (part) { + self.write(part) + }) + } else { + self.write(self.body) + } + self.end() + } else if (self.requestBodyStream) { + console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.') + self.requestBodyStream.pipe(self) + } else if (!self.src) { + if (self._auth.hasAuth && !self._auth.sentAuth) { + self.end() + return + } + if (self.method !== 'GET' && typeof self.method !== 'undefined') { + self.setHeader('content-length', 0) + } + self.end() + } + } + + if (self._form && !self.hasHeader('content-length')) { + // Before ending the request, we had to compute the length of the whole form, asyncly + self.setHeader(self._form.getHeaders(), true) + self._form.getLength(function (err, length) { + if (!err && !isNaN(length)) { + self.setHeader('content-length', length) + } + end() + }) + } else { + end() + } + + self.ntick = true + }) + +} + +Request.prototype.getNewAgent = function () { + var self = this + var Agent = self.agentClass + var options = {} + if (self.agentOptions) { + for (var i in self.agentOptions) { + options[i] = self.agentOptions[i] + } + } + if (self.ca) { + options.ca = self.ca + } + if (self.ciphers) { + options.ciphers = self.ciphers + } + if (self.secureProtocol) { + options.secureProtocol = self.secureProtocol + } + if (self.secureOptions) { + options.secureOptions = self.secureOptions + } + if (typeof self.rejectUnauthorized !== 'undefined') { + options.rejectUnauthorized = self.rejectUnauthorized + } + + if (self.cert && self.key) { + options.key = self.key + options.cert = self.cert + } + + if (self.pfx) { + options.pfx = self.pfx + } + + if (self.passphrase) { + options.passphrase = self.passphrase + } + + var poolKey = '' + + // different types of agents are in different pools + if (Agent !== self.httpModule.Agent) { + poolKey += Agent.name + } + + // ca option is only relevant if proxy or destination are https + var proxy = self.proxy + if (typeof proxy === 'string') { + proxy = url.parse(proxy) + } + var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' + + if (isHttps) { + if (options.ca) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.ca + } + + if (typeof options.rejectUnauthorized !== 'undefined') { + if (poolKey) { + poolKey += ':' + } + poolKey += options.rejectUnauthorized + } + + if (options.cert) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.cert.toString('ascii') + options.key.toString('ascii') + } + + if (options.pfx) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.pfx.toString('ascii') + } + + if (options.ciphers) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.ciphers + } + + if (options.secureProtocol) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.secureProtocol + } + + if (options.secureOptions) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.secureOptions + } + } + + if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) { + // not doing anything special. Use the globalAgent + return self.httpModule.globalAgent + } + + // we're using a stored agent. Make sure it's protocol-specific + poolKey = self.uri.protocol + poolKey + + // generate a new agent for this setting if none yet exists + if (!self.pool[poolKey]) { + self.pool[poolKey] = new Agent(options) + // properly set maxSockets on new agents + if (self.pool.maxSockets) { + self.pool[poolKey].maxSockets = self.pool.maxSockets + } + } + + return self.pool[poolKey] +} + +Request.prototype.start = function () { + // start() is called once we are ready to send the outgoing HTTP request. + // this is usually called on the first write(), end() or on nextTick() + var self = this + + if (self._aborted) { + return + } + + self._started = true + self.method = self.method || 'GET' + self.href = self.uri.href + + if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { + self.setHeader('content-length', self.src.stat.size) + } + if (self._aws) { + self.aws(self._aws, true) + } + + // We have a method named auth, which is completely different from the http.request + // auth option. If we don't remove it, we're gonna have a bad time. + var reqOptions = copy(self) + delete reqOptions.auth + + debug('make request', self.uri.href) + + self.req = self.httpModule.request(reqOptions) + + if (self.timing) { + self.startTime = new Date().getTime() + } + + if (self.timeout && !self.timeoutTimer) { + var timeout = self.timeout < 0 ? 0 : self.timeout + // Set a timeout in memory - this block will throw if the server takes more + // than `timeout` to write the HTTP status and headers (corresponding to + // the on('response') event on the client). NB: this measures wall-clock + // time, not the time between bytes sent by the server. + self.timeoutTimer = setTimeout(function () { + var connectTimeout = self.req.socket && self.req.socket.readable === false + self.abort() + var e = new Error('ETIMEDOUT') + e.code = 'ETIMEDOUT' + e.connect = connectTimeout + self.emit('error', e) + }, timeout) + + if (self.req.setTimeout) { // only works on node 0.6+ + // Set an additional timeout on the socket, via the `setsockopt` syscall. + // This timeout sets the amount of time to wait *between* bytes sent + // from the server, and may or may not correspond to the wall-clock time + // elapsed from the start of the request. + // + // In particular, it's useful for erroring if the server fails to send + // data halfway through streaming a response. + self.req.setTimeout(timeout, function () { + if (self.req) { + self.req.abort() + var e = new Error('ESOCKETTIMEDOUT') + e.code = 'ESOCKETTIMEDOUT' + e.connect = false + self.emit('error', e) + } + }) + } + } + + self.req.on('response', self.onRequestResponse.bind(self)) + self.req.on('error', self.onRequestError.bind(self)) + self.req.on('drain', function() { + self.emit('drain') + }) + self.req.on('socket', function(socket) { + self.emit('socket', socket) + }) + + self.on('end', function() { + if ( self.req.connection ) { + self.req.connection.removeListener('error', connectionErrorHandler) + } + }) + self.emit('request', self.req) +} + +Request.prototype.onRequestError = function (error) { + var self = this + if (self._aborted) { + return + } + if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' + && self.agent.addRequestNoreuse) { + self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } + self.start() + self.req.end() + return + } + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + self.emit('error', error) +} + +Request.prototype.onRequestResponse = function (response) { + var self = this + debug('onRequestResponse', self.uri.href, response.statusCode, response.headers) + response.on('end', function() { + if (self.timing) { + self.elapsedTime += (new Date().getTime() - self.startTime) + debug('elapsed time', self.elapsedTime) + response.elapsedTime = self.elapsedTime + } + debug('response end', self.uri.href, response.statusCode, response.headers) + }) + + // The check on response.connection is a workaround for browserify. + if (response.connection && response.connection.listeners('error').indexOf(connectionErrorHandler) === -1) { + response.connection.setMaxListeners(0) + response.connection.once('error', connectionErrorHandler) + } + if (self._aborted) { + debug('aborted', self.uri.href) + response.resume() + return + } + + self.response = response + response.request = self + response.toJSON = responseToJSON + + // XXX This is different on 0.10, because SSL is strict by default + if (self.httpModule === https && + self.strictSSL && (!response.hasOwnProperty('socket') || + !response.socket.authorized)) { + debug('strict ssl error', self.uri.href) + var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL' + self.emit('error', new Error('SSL Error: ' + sslErr)) + return + } + + // Save the original host before any redirect (if it changes, we need to + // remove any authorization headers). Also remember the case of the header + // name because lots of broken servers expect Host instead of host and we + // want the caller to be able to specify this. + self.originalHost = self.getHeader('host') + if (!self.originalHostHeaderName) { + self.originalHostHeaderName = self.hasHeader('host') + } + if (self.setHost) { + self.removeHeader('host') + } + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + + var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar + var addCookie = function (cookie) { + //set the cookie if it's domain in the href's domain. + try { + targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true}) + } catch (e) { + self.emit('error', e) + } + } + + response.caseless = caseless(response.headers) + + if (response.caseless.has('set-cookie') && (!self._disableCookies)) { + var headerName = response.caseless.has('set-cookie') + if (Array.isArray(response.headers[headerName])) { + response.headers[headerName].forEach(addCookie) + } else { + addCookie(response.headers[headerName]) + } + } + + if (self._redirect.onResponse(response)) { + return // Ignore the rest of the response + } else { + // Be a good stream and emit end when the response is finished. + // Hack to emit end on close because of a core bug that never fires end + response.on('close', function () { + if (!self._ended) { + self.response.emit('end') + } + }) + + response.on('end', function () { + self._ended = true + }) + + var responseContent + if (self.gzip) { + var contentEncoding = response.headers['content-encoding'] || 'identity' + contentEncoding = contentEncoding.trim().toLowerCase() + + if (contentEncoding === 'gzip') { + responseContent = zlib.createGunzip() + response.pipe(responseContent) + } else { + // Since previous versions didn't check for Content-Encoding header, + // ignore any invalid values to preserve backwards-compatibility + if (contentEncoding !== 'identity') { + debug('ignoring unrecognized Content-Encoding ' + contentEncoding) + } + responseContent = response + } + } else { + responseContent = response + } + + if (self.encoding) { + if (self.dests.length !== 0) { + console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.') + } else if (responseContent.setEncoding) { + responseContent.setEncoding(self.encoding) + } else { + // Should only occur on node pre-v0.9.4 (joyent/node@9b5abe5) with + // zlib streams. + // If/When support for 0.9.4 is dropped, this should be unnecessary. + responseContent = responseContent.pipe(stringstream(self.encoding)) + } + } + + if (self._paused) { + responseContent.pause() + } + + self.responseContent = responseContent + + self.emit('response', response) + + self.dests.forEach(function (dest) { + self.pipeDest(dest) + }) + + responseContent.on('data', function (chunk) { + self._destdata = true + self.emit('data', chunk) + }) + responseContent.on('end', function (chunk) { + self.emit('end', chunk) + }) + responseContent.on('error', function (error) { + self.emit('error', error) + }) + responseContent.on('close', function () {self.emit('close')}) + + if (self.callback) { + self.readResponseBody(response) + } + //if no callback + else { + self.on('end', function () { + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + self.emit('complete', response) + }) + } + } + debug('finish init function', self.uri.href) +} + +Request.prototype.readResponseBody = function (response) { + var self = this + debug('reading response\'s body') + var buffer = bl() + , strings = [] + + self.on('data', function (chunk) { + if (Buffer.isBuffer(chunk)) { + buffer.append(chunk) + } else { + strings.push(chunk) + } + }) + self.on('end', function () { + debug('end event', self.uri.href) + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + + if (buffer.length) { + debug('has body', self.uri.href, buffer.length) + if (self.encoding === null) { + // response.body = buffer + // can't move to this until https://github.com/rvagg/bl/issues/13 + response.body = buffer.slice() + } else { + response.body = buffer.toString(self.encoding) + } + } else if (strings.length) { + // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. + // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). + if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') { + strings[0] = strings[0].substring(1) + } + response.body = strings.join('') + } + + if (self._json) { + try { + response.body = JSON.parse(response.body, self._jsonReviver) + } catch (e) { + debug('invalid JSON received', self.uri.href) + } + } + debug('emitting complete', self.uri.href) + if (typeof response.body === 'undefined' && !self._json) { + response.body = self.encoding === null ? new Buffer(0) : '' + } + self.emit('complete', response, response.body) + }) +} + +Request.prototype.abort = function () { + var self = this + self._aborted = true + + if (self.req) { + self.req.abort() + } + else if (self.response) { + self.response.destroy() + } + + self.emit('abort') +} + +Request.prototype.pipeDest = function (dest) { + var self = this + var response = self.response + // Called after the response is received + if (dest.headers && !dest.headersSent) { + if (response.caseless.has('content-type')) { + var ctname = response.caseless.has('content-type') + if (dest.setHeader) { + dest.setHeader(ctname, response.headers[ctname]) + } + else { + dest.headers[ctname] = response.headers[ctname] + } + } + + if (response.caseless.has('content-length')) { + var clname = response.caseless.has('content-length') + if (dest.setHeader) { + dest.setHeader(clname, response.headers[clname]) + } else { + dest.headers[clname] = response.headers[clname] + } + } + } + if (dest.setHeader && !dest.headersSent) { + for (var i in response.headers) { + // If the response content is being decoded, the Content-Encoding header + // of the response doesn't represent the piped content, so don't pass it. + if (!self.gzip || i !== 'content-encoding') { + dest.setHeader(i, response.headers[i]) + } + } + dest.statusCode = response.statusCode + } + if (self.pipefilter) { + self.pipefilter(response, dest) + } +} + +Request.prototype.qs = function (q, clobber) { + var self = this + var base + if (!clobber && self.uri.query) { + base = self._qs.parse(self.uri.query) + } else { + base = {} + } + + for (var i in q) { + base[i] = q[i] + } + + var qs = self._qs.stringify(base) + + if (qs === '') { + return self + } + + self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs) + self.url = self.uri + self.path = self.uri.path + + if (self.uri.host === 'unix') { + self.enableUnixSocket() + } + + return self +} +Request.prototype.form = function (form) { + var self = this + if (form) { + if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { + self.setHeader('content-type', 'application/x-www-form-urlencoded') + } + self.body = (typeof form === 'string') + ? self._qs.rfc3986(form.toString('utf8')) + : self._qs.stringify(form).toString('utf8') + return self + } + // create form-data object + self._form = new FormData() + self._form.on('error', function(err) { + err.message = 'form-data: ' + err.message + self.emit('error', err) + self.abort() + }) + return self._form +} +Request.prototype.multipart = function (multipart) { + var self = this + + self._multipart.onRequest(multipart) + + if (!self._multipart.chunked) { + self.body = self._multipart.body + } + + return self +} +Request.prototype.json = function (val) { + var self = this + + if (!self.hasHeader('accept')) { + self.setHeader('accept', 'application/json') + } + + self._json = true + if (typeof val === 'boolean') { + if (self.body !== undefined) { + if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { + self.body = safeStringify(self.body) + } else { + self.body = self._qs.rfc3986(self.body) + } + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + } + } else { + self.body = safeStringify(val) + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + } + + if (typeof self.jsonReviver === 'function') { + self._jsonReviver = self.jsonReviver + } + + return self +} +Request.prototype.getHeader = function (name, headers) { + var self = this + var result, re, match + if (!headers) { + headers = self.headers + } + Object.keys(headers).forEach(function (key) { + if (key.length !== name.length) { + return + } + re = new RegExp(name, 'i') + match = key.match(re) + if (match) { + result = headers[key] + } + }) + return result +} +Request.prototype.enableUnixSocket = function () { + // Get the socket & request paths from the URL + var unixParts = this.uri.path.split(':') + , host = unixParts[0] + , path = unixParts[1] + // Apply unix properties to request + this.socketPath = host + this.uri.pathname = path + this.uri.path = path + this.uri.host = host + this.uri.hostname = host + this.uri.isUnix = true +} + + +Request.prototype.auth = function (user, pass, sendImmediately, bearer) { + var self = this + + self._auth.onRequest(user, pass, sendImmediately, bearer) + + return self +} +Request.prototype.aws = function (opts, now) { + var self = this + + if (!now) { + self._aws = opts + return self + } + + if (opts.sign_version == 4 || opts.sign_version == '4') { + var aws4 = require('aws4') + // use aws4 + var options = { + host: self.uri.host, + path: self.uri.path, + method: self.method, + headers: { + 'content-type': self.getHeader('content-type') || '' + }, + body: self.body + } + var signRes = aws4.sign(options, { + accessKeyId: opts.key, + secretAccessKey: opts.secret + }) + self.setHeader('authorization', signRes.headers.Authorization) + self.setHeader('x-amz-date', signRes.headers['X-Amz-Date']) + } + else { + // default: use aws-sign2 + var date = new Date() + self.setHeader('date', date.toUTCString()) + var auth = + { key: opts.key + , secret: opts.secret + , verb: self.method.toUpperCase() + , date: date + , contentType: self.getHeader('content-type') || '' + , md5: self.getHeader('content-md5') || '' + , amazonHeaders: aws2.canonicalizeHeaders(self.headers) + } + var path = self.uri.path + if (opts.bucket && path) { + auth.resource = '/' + opts.bucket + path + } else if (opts.bucket && !path) { + auth.resource = '/' + opts.bucket + } else if (!opts.bucket && path) { + auth.resource = path + } else if (!opts.bucket && !path) { + auth.resource = '/' + } + auth.resource = aws2.canonicalizeResource(auth.resource) + self.setHeader('authorization', aws2.authorization(auth)) + } + + return self +} +Request.prototype.httpSignature = function (opts) { + var self = this + httpSignature.signRequest({ + getHeader: function(header) { + return self.getHeader(header, self.headers) + }, + setHeader: function(header, value) { + self.setHeader(header, value) + }, + method: self.method, + path: self.path + }, opts) + debug('httpSignature authorization', self.getHeader('authorization')) + + return self +} +Request.prototype.hawk = function (opts) { + var self = this + self.setHeader('Authorization', hawk.client.header(self.uri, self.method, opts).field) +} +Request.prototype.oauth = function (_oauth) { + var self = this + + self._oauth.onRequest(_oauth) + + return self +} + +Request.prototype.jar = function (jar) { + var self = this + var cookies + + if (self._redirect.redirectsFollowed === 0) { + self.originalCookieHeader = self.getHeader('cookie') + } + + if (!jar) { + // disable cookies + cookies = false + self._disableCookies = true + } else { + var targetCookieJar = (jar && jar.getCookieString) ? jar : globalCookieJar + var urihref = self.uri.href + //fetch cookie in the Specified host + if (targetCookieJar) { + cookies = targetCookieJar.getCookieString(urihref) + } + } + + //if need cookie and cookie is not empty + if (cookies && cookies.length) { + if (self.originalCookieHeader) { + // Don't overwrite existing Cookie header + self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies) + } else { + self.setHeader('cookie', cookies) + } + } + self._jar = jar + return self +} + + +// Stream API +Request.prototype.pipe = function (dest, opts) { + var self = this + + if (self.response) { + if (self._destdata) { + self.emit('error', new Error('You cannot pipe after data has been emitted from the response.')) + } else if (self._ended) { + self.emit('error', new Error('You cannot pipe after the response has been ended.')) + } else { + stream.Stream.prototype.pipe.call(self, dest, opts) + self.pipeDest(dest) + return dest + } + } else { + self.dests.push(dest) + stream.Stream.prototype.pipe.call(self, dest, opts) + return dest + } +} +Request.prototype.write = function () { + var self = this + if (self._aborted) {return} + + if (!self._started) { + self.start() + } + return self.req.write.apply(self.req, arguments) +} +Request.prototype.end = function (chunk) { + var self = this + if (self._aborted) {return} + + if (chunk) { + self.write(chunk) + } + if (!self._started) { + self.start() + } + self.req.end() +} +Request.prototype.pause = function () { + var self = this + if (!self.responseContent) { + self._paused = true + } else { + self.responseContent.pause.apply(self.responseContent, arguments) + } +} +Request.prototype.resume = function () { + var self = this + if (!self.responseContent) { + self._paused = false + } else { + self.responseContent.resume.apply(self.responseContent, arguments) + } +} +Request.prototype.destroy = function () { + var self = this + if (!self._ended) { + self.end() + } else if (self.response) { + self.response.destroy() + } +} + +Request.defaultProxyHeaderWhiteList = + Tunnel.defaultProxyHeaderWhiteList.slice() + +Request.defaultProxyHeaderExclusiveList = + Tunnel.defaultProxyHeaderExclusiveList.slice() + +// Exports + +Request.prototype.toJSON = requestToJSON +module.exports = Request diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/.npmignore new file mode 100644 index 00000000..d7c47e30 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/.npmignore @@ -0,0 +1,2 @@ +/node_modules/* +npm-debug.log diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/License b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/License new file mode 100644 index 00000000..e6c9ce40 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/License @@ -0,0 +1,21 @@ +Copyright (c) 2011: +Tim Koschützki (tim@debuggable.com) +Felix Geisendörfer (felix@debuggable.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/Makefile b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/Makefile new file mode 100644 index 00000000..2de9385a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/Makefile @@ -0,0 +1,22 @@ +SHELL := /bin/bash + +test: + @node test/runner.js + +release-major: test + npm version major -m "Release %s" + git push + npm publish + +release-minor: test + npm version minor -m "Release %s" + git push + npm publish + +release-patch: test + npm version patch -m "Release %s" + git push + npm publish + +.PHONY: test + diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/Readme.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/Readme.md new file mode 100644 index 00000000..054e6e6a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/Readme.md @@ -0,0 +1,207 @@ +# retry + +Abstraction for exponential and custom retry strategies for failed operations. + +## Installation + + npm install retry + +## Current Status + +This module has been tested and is ready to be used. + +## Tutorial + +The example below will retry a potentially failing `dns.resolve` operation +`10` times using an exponential backoff strategy. With the default settings, this +means the last attempt is made after `17 minutes and 3 seconds`. + +``` javascript +var dns = require('dns'); +var retry = require('retry'); + +function faultTolerantResolve(address, cb) { + var operation = retry.operation(); + + operation.attempt(function(currentAttempt) { + dns.resolve(address, function(err, addresses) { + if (operation.retry(err)) { + return; + } + + cb(err ? operation.mainError() : null, addresses); + }); + }); +} + +faultTolerantResolve('nodejs.org', function(err, addresses) { + console.log(err, addresses); +}); +``` + +Of course you can also configure the factors that go into the exponential +backoff. See the API documentation below for all available settings. +currentAttempt is an int representing the number of attempts so far. + +``` javascript +var operation = retry.operation({ + retries: 5, + factor: 3, + minTimeout: 1 * 1000, + maxTimeout: 60 * 1000, + randomize: true, +}); +``` + +## API + +### retry.operation([options]) + +Creates a new `RetryOperation` object. `options` is the same as `retry.timeouts()`'s `options`, with two additions: + +* `forever`: Whether to retry forever, defaults to `false`. +* `unref`: Wether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`. + +### retry.timeouts([options]) + +Returns an array of timeouts. All time `options` and return values are in +milliseconds. If `options` is an array, a copy of that array is returned. + +`options` is a JS object that can contain any of the following keys: + +* `retries`: The maximum amount of times to retry the operation. Default is `10`. +* `factor`: The exponential factor to use. Default is `2`. +* `minTimeout`: The number of milliseconds before starting the first retry. Default is `1000`. +* `maxTimeout`: The maximum number of milliseconds between two retries. Default is `Infinity`. +* `randomize`: Randomizes the timeouts by multiplying with a factor between `1` to `2`. Default is `false`. + +The formula used to calculate the individual timeouts is: + +``` +var Math.min(random * minTimeout * Math.pow(factor, attempt), maxTimeout); +``` + +Have a look at [this article][article] for a better explanation of approach. + +If you want to tune your `factor` / `times` settings to attempt the last retry +after a certain amount of time, you can use wolfram alpha. For example in order +to tune for `10` attempts in `5 minutes`, you can use this equation: + +![screenshot](https://github.com/tim-kos/node-retry/raw/master/equation.gif) + +Explaining the various values from left to right: + +* `k = 0 ... 9`: The `retries` value (10) +* `1000`: The `minTimeout` value in ms (1000) +* `x^k`: No need to change this, `x` will be your resulting factor +* `5 * 60 * 1000`: The desired total amount of time for retrying in ms (5 minutes) + +To make this a little easier for you, use wolfram alpha to do the calculations: + + + +[article]: http://dthain.blogspot.com/2009/02/exponential-backoff-in-distributed.html + +### retry.createTimeout(attempt, opts) + +Returns a new `timeout` (integer in milliseconds) based on the given parameters. + +`attempt` is an integer representing for which retry the timeout should be calculated. If your retry operation was executed 4 times you had one attempt and 3 retries. If you then want to calculate a new timeout, you should set `attempt` to 4 (attempts are zero-indexed). + +`opts` can include `factor`, `minTimeout`, `randomize` (boolean) and `maxTimeout`. They are documented above. + +`retry.createTimeout()` is used internally by `retry.timeouts()` and is public for you to be able to create your own timeouts for reinserting an item, see [issue #13](https://github.com/tim-kos/node-retry/issues/13). + +### retry.wrap(obj, [options], [methodNames]) + +Wrap all functions of the `obj` with retry. Optionally you can pass operation options and +an array of method names which need to be wrapped. + +``` +retry.wrap(obj) + +retry.wrap(obj, ['method1', 'method2']); + +retry.wrap(obj, {retries: 3}); + +retry.wrap(obj, {retries: 3}, ['method1', 'method2']); +``` +The `options` object can take any options that the usual call to `retry.operation` can take. + +### new RetryOperation(timeouts, [options]) + +Creates a new `RetryOperation` where `timeouts` is an array where each value is +a timeout given in milliseconds. + +Available options: +* `forever`: Whether to retry forever, defaults to `false`. +* `unref`: Wether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`. + +If `forever` is true, the following changes happen: +* `RetryOperation.errors()` will only output an array of one item: the last error. +* `RetryOperation` will repeatedly use the last item in the `timeouts` array. + +#### retryOperation.errors() + +Returns an array of all errors that have been passed to +`retryOperation.retry()` so far. + +#### retryOperation.mainError() + +A reference to the error object that occured most frequently. Errors are +compared using the `error.message` property. + +If multiple error messages occured the same amount of time, the last error +object with that message is returned. + +If no errors occured so far, the value is `null`. + +#### retryOperation.attempt(fn, timeoutOps) + +Defines the function `fn` that is to be retried and executes it for the first +time right away. The `fn` function can receive an optional `currentAttempt` callback that represents the number of attempts to execute `fn` so far. + +Optionally defines `timeoutOps` which is an object having a property `timeout` in miliseconds and a property `cb` callback function. +Whenever your retry operation takes longer than `timeout` to execute, the timeout callback function `cb` is called. + + +#### retryOperation.try(fn) + +This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead. + +#### retryOperation.start(fn) + +This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead. + +#### retryOperation.retry(error) + +Returns `false` when no `error` value is given, or the maximum amount of retries +has been reached. + +Otherwise it returns `true`, and retries the operation after the timeout for +the current attempt number. + +#### retryOperation.attempts() + +Returns an int representing the number of attempts it took to call `fn` before it was successful. + +## License + +retry is licensed under the MIT license. + + +# Changelog + +0.8.0 Implementing retry.wrap. + +0.7.0 Some bug fixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13). + +0.6.0 Introduced optional timeOps parameter for the attempt() function which is an object having a property timeout in milliseconds and a property cb callback function. Whenever your retry operation takes longer than timeout to execute, the timeout callback function cb is called. + +0.5.0 Some minor refactoring. + +0.4.0 Changed retryOperation.try() to retryOperation.attempt(). Deprecated the aliases start() and try() for it. + +0.3.0 Added retryOperation.start() which is an alias for retryOperation.try(). + +0.2.0 Added attempts() function and parameter to retryOperation.try() representing the number of attempts it took to call fn(). diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/equation.gif b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/equation.gif new file mode 100644 index 00000000..97107237 Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/equation.gif differ diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/index.js new file mode 100644 index 00000000..ee62f3a1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/retry'); \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/package.json new file mode 100644 index 00000000..5a77c11c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/retry/package.json @@ -0,0 +1,53 @@ +{ + "author": { + "name": "Tim Koschützki", + "email": "tim@debuggable.com", + "url": "http://debuggable.com/" + }, + "name": "retry", + "description": "Abstraction for exponential and custom retry strategies for failed operations.", + "license": "MIT", + "version": "0.9.0", + "homepage": "https://github.com/tim-kos/node-retry", + "repository": { + "type": "git", + "url": "git://github.com/tim-kos/node-retry.git" + }, + "directories": { + "lib": "./lib" + }, + "main": "index", + "engines": { + "node": "*" + }, + "dependencies": {}, + "devDependencies": { + "fake": "0.2.0", + "far": "0.0.1" + }, + "gitHead": "1b621cf499ef7647d005e3650006b93a8dbeb986", + "bugs": { + "url": "https://github.com/tim-kos/node-retry/issues" + }, + "_id": "retry@0.9.0", + "scripts": {}, + "_shasum": "6f697e50a0e4ddc8c8f7fb547a9b60dead43678d", + "_from": "retry@0.9.0", + "_npmVersion": "2.1.7", + "_nodeVersion": "4.2.1", + "_npmUser": { + "name": "tim-kos", + "email": "tim@debuggable.com" + }, + "maintainers": [ + { + "name": "tim-kos", + "email": "tim@debuggable.com" + } + ], + "dist": { + "shasum": "6f697e50a0e4ddc8c8f7fb547a9b60dead43678d", + "tarball": "http://registry.npmjs.org/retry/-/retry-0.9.0.tgz" + }, + "_resolved": "https://registry.npmjs.org/retry/-/retry-0.9.0.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/README.md new file mode 100644 index 00000000..8e3db49c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/README.md @@ -0,0 +1,101 @@ +[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies) + +The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. + +Install with `npm install rimraf`, or just drop rimraf.js somewhere. + +## API + +`rimraf(f, [opts], callback)` + +The first parameter will be interpreted as a globbing pattern for files. If you +want to disable globbing you can do so with `opts.disableGlob` (defaults to +`false`). This might be handy, for instance, if you have filenames that contain +globbing wildcard characters. + +The callback will be called with an error if there is one. Certain +errors are handled for you: + +* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of + `opts.maxBusyTries` times before giving up, adding 100ms of wait + between each attempt. The default `maxBusyTries` is 3. +* `ENOENT` - If the file doesn't exist, rimraf will return + successfully, since your desired outcome is already the case. +* `EMFILE` - Since `readdir` requires opening a file descriptor, it's + possible to hit `EMFILE` if too many file descriptors are in use. + In the sync case, there's nothing to be done for this. But in the + async case, rimraf will gradually back off with timeouts up to + `opts.emfileWait` ms, which defaults to 1000. + +## options + +* unlink, chmod, stat, lstat, rmdir, readdir, + unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync + + In order to use a custom file system library, you can override + specific fs functions on the options object. + + If any of these functions are present on the options object, then + the supplied function will be used instead of the default fs + method. + + Sync methods are only relevant for `rimraf.sync()`, of course. + + For example: + + ```javascript + var myCustomFS = require('some-custom-fs') + + rimraf('some-thing', myCustomFS, callback) + ``` + +* maxBusyTries + + If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered + on Windows systems, then rimraf will retry with a linear backoff + wait of 100ms longer on each try. The default maxBusyTries is 3. + + Only relevant for async usage. + +* emfileWait + + If an `EMFILE` error is encountered, then rimraf will retry + repeatedly with a linear backoff of 1ms longer on each try, until + the timeout counter hits this max. The default limit is 1000. + + If you repeatedly encounter `EMFILE` errors, then consider using + [graceful-fs](http://npm.im/graceful-fs) in your program. + + Only relevant for async usage. + +* glob + + Set to `false` to disable [glob](http://npm.im/glob) pattern + matching. + + Set to an object to pass options to the glob module. The default + glob options are `{ nosort: true, silent: true }`. + + Glob version 6 is used in this module. + + Relevant for both sync and async usage. + +* disableGlob + + Set to any non-falsey value to disable globbing entirely. + (Equivalent to setting `glob: false`.) + +## rimraf.sync + +It can remove stuff synchronously, too. But that's not so good. Use +the async API. It's better. + +## CLI + +If installed with `npm install rimraf -g` it can be used as a global +command `rimraf [ ...]` which is useful for cross platform support. + +## mkdirp + +If you need to create a directory recursively, check out +[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/bin.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/bin.js new file mode 100644 index 00000000..286dedd3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/bin.js @@ -0,0 +1,40 @@ +#!/usr/bin/env node + +var rimraf = require('./') + +var help = false +var dashdash = false +var args = process.argv.slice(2).filter(function(arg) { + if (dashdash) + return !!arg + else if (arg === '--') + dashdash = true + else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) + help = true + else + return !!arg +}); + +if (help || args.length === 0) { + // If they didn't ask for help, then this is not a "success" + var log = help ? console.log : console.error + log('Usage: rimraf [ ...]') + log('') + log(' Deletes all files and folders at "path" recursively.') + log('') + log('Options:') + log('') + log(' -h, --help Display this usage info') + process.exit(help ? 0 : 1) +} else + go(0) + +function go (n) { + if (n >= args.length) + return + rimraf(args[n], function (er) { + if (er) + throw er + go(n+1) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/package.json new file mode 100644 index 00000000..bcef9e1e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/package.json @@ -0,0 +1,65 @@ +{ + "name": "rimraf", + "version": "2.5.2", + "main": "rimraf.js", + "description": "A deep deletion module for node (like `rm -rf`)", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/rimraf.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "bin": { + "rimraf": "./bin.js" + }, + "dependencies": { + "glob": "^7.0.0" + }, + "files": [ + "LICENSE", + "README.md", + "bin.js", + "rimraf.js" + ], + "devDependencies": { + "mkdirp": "^0.5.1", + "tap": "^5.1.1" + }, + "gitHead": "f414f87021f88d004ac487eebc8d07ce6a152721", + "bugs": { + "url": "https://github.com/isaacs/rimraf/issues" + }, + "homepage": "https://github.com/isaacs/rimraf#readme", + "_id": "rimraf@2.5.2", + "_shasum": "62ba947fa4c0b4363839aefecd4f0fbad6059726", + "_from": "rimraf@2.5.2", + "_npmVersion": "3.7.0", + "_nodeVersion": "5.6.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "62ba947fa4c0b4363839aefecd4f0fbad6059726", + "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.5.2.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/rimraf-2.5.2.tgz_1455346499772_0.9326622514054179" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.2.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/rimraf.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/rimraf.js new file mode 100644 index 00000000..67eb8ec8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/rimraf/rimraf.js @@ -0,0 +1,335 @@ +module.exports = rimraf +rimraf.sync = rimrafSync + +var assert = require("assert") +var path = require("path") +var fs = require("fs") +var glob = require("glob") + +var defaultGlobOpts = { + nosort: true, + silent: true +} + +// for EMFILE handling +var timeout = 0 + +var isWindows = (process.platform === "win32") + +function defaults (options) { + var methods = [ + 'unlink', + 'chmod', + 'stat', + 'lstat', + 'rmdir', + 'readdir' + ] + methods.forEach(function(m) { + options[m] = options[m] || fs[m] + m = m + 'Sync' + options[m] = options[m] || fs[m] + }) + + options.maxBusyTries = options.maxBusyTries || 3 + options.emfileWait = options.emfileWait || 1000 + if (options.glob === false) { + options.disableGlob = true + } + options.disableGlob = options.disableGlob || false + options.glob = options.glob || defaultGlobOpts +} + +function rimraf (p, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + assert.equal(typeof cb, 'function', 'rimraf: callback function required') + + defaults(options) + + var busyTries = 0 + var errState = null + var n = 0 + + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]) + + fs.lstat(p, function (er, stat) { + if (!er) + return afterGlob(null, [p]) + + glob(p, options.glob, afterGlob) + }) + + function next (er) { + errState = errState || er + if (--n === 0) + cb(errState) + } + + function afterGlob (er, results) { + if (er) + return cb(er) + + n = results.length + if (n === 0) + return cb() + + results.forEach(function (p) { + rimraf_(p, options, function CB (er) { + if (er) { + if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && + busyTries < options.maxBusyTries) { + busyTries ++ + var time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(function () { + rimraf_(p, options, CB) + }, time) + } + + // this one won't happen if graceful-fs is used. + if (er.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(function () { + rimraf_(p, options, CB) + }, timeout ++) + } + + // already gone + if (er.code === "ENOENT") er = null + } + + timeout = 0 + next(er) + }) + }) + } +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + // sunos lets the root user unlink directories, which is... weird. + // so we have to lstat here and make sure it's not a dir. + options.lstat(p, function (er, st) { + if (er && er.code === "ENOENT") + return cb(null) + + if (st && st.isDirectory()) + return rmdir(p, options, er, cb) + + options.unlink(p, function (er) { + if (er) { + if (er.code === "ENOENT") + return cb(null) + if (er.code === "EPERM") + return (isWindows) + ? fixWinEPERM(p, options, er, cb) + : rmdir(p, options, er, cb) + if (er.code === "EISDIR") + return rmdir(p, options, er, cb) + } + return cb(er) + }) + }) +} + +function fixWinEPERM (p, options, er, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + if (er) + assert(er instanceof Error) + + options.chmod(p, 666, function (er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er) + else + options.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er) + else if (stats.isDirectory()) + rmdir(p, options, er, cb) + else + options.unlink(p, cb) + }) + }) +} + +function fixWinEPERMSync (p, options, er) { + assert(p) + assert(options) + if (er) + assert(er instanceof Error) + + try { + options.chmodSync(p, 666) + } catch (er2) { + if (er2.code === "ENOENT") + return + else + throw er + } + + try { + var stats = options.statSync(p) + } catch (er3) { + if (er3.code === "ENOENT") + return + else + throw er + } + + if (stats.isDirectory()) + rmdirSync(p, options, er) + else + options.unlinkSync(p) +} + +function rmdir (p, options, originalEr, cb) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + assert(typeof cb === 'function') + + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + options.rmdir(p, function (er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb) + else if (er && er.code === "ENOTDIR") + cb(originalEr) + else + cb(er) + }) +} + +function rmkids(p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.readdir(p, function (er, files) { + if (er) + return cb(er) + var n = files.length + if (n === 0) + return options.rmdir(p, cb) + var errState + files.forEach(function (f) { + rimraf(path.join(p, f), options, function (er) { + if (errState) + return + if (er) + return cb(errState = er) + if (--n === 0) + options.rmdir(p, cb) + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p, options) { + options = options || {} + defaults(options) + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + + var results + + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p] + } else { + try { + fs.lstatSync(p) + results = [p] + } catch (er) { + results = glob.sync(p, options.glob) + } + } + + if (!results.length) + return + + for (var i = 0; i < results.length; i++) { + var p = results[i] + + try { + var st = options.lstatSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + } + + try { + // sunos lets the root user unlink directories, which is... weird. + if (st && st.isDirectory()) + rmdirSync(p, options, null) + else + options.unlinkSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) + if (er.code !== "EISDIR") + throw er + rmdirSync(p, options, er) + } + } +} + +function rmdirSync (p, options, originalEr) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + + try { + options.rmdirSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "ENOTDIR") + throw originalEr + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options) + } +} + +function rmkidsSync (p, options) { + assert(p) + assert(options) + options.readdirSync(p).forEach(function (f) { + rimrafSync(path.join(p, f), options) + }) + options.rmdirSync(p, options) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/.npmignore new file mode 100644 index 00000000..7dea0760 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/.npmignore @@ -0,0 +1,4 @@ +node_modules/ +coverage/ +.nyc_output/ +nyc_output/ diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/.travis.yml new file mode 100644 index 00000000..379f2614 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - '0.10' + - '0.12' + - 'iojs' diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/README.md new file mode 100644 index 00000000..6aacb48b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/README.md @@ -0,0 +1,327 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Usage + + $ npm install semver + + semver.valid('1.2.3') // '1.2.3' + semver.valid('a.b.c') // null + 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 + +As a command-line utility: + + $ semver -h + + Usage: semver [ [...]] [-r | -i | --preid | -l | -rv] + Test if version(s) satisfy the supplied range(s), and sort them. + + Multiple versions or ranges may be supplied, unless increment + option is specified. In that case, only a single version may + be used, and it is incremented by the specified level + + Program exits successfully if any valid version satisfies + all supplied ranges, and prints all satisfying versions. + + If no versions are valid, or ranges are not satisfied, + then exits failure. + + Versions are printed in ascending order, so supplying + multiple versions to the utility will just sort them. + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +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. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +> semver.inc('1.2.3', 'prerelease', 'beta') +'1.2.4-beta.0' +``` + +command-line example: + +```shell +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```shell +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9']['0'-'9']+ +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `loose` boolean argument that, if +true, will be more forgiving about not-quite-valid semver strings. +The resulting output will always be 100% strict, of course. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `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 + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/package.json new file mode 100644 index 00000000..9e0add04 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/package.json @@ -0,0 +1,51 @@ +{ + "name": "semver", + "version": "5.1.0", + "description": "The semantic version parser used by npm.", + "main": "semver.js", + "scripts": { + "test": "tap test/*.js" + }, + "devDependencies": { + "tap": "^2.0.0" + }, + "license": "ISC", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "bin": { + "semver": "./bin/semver" + }, + "gitHead": "8e33a30e62e40e4983d1c5f55e794331b861aadc", + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "homepage": "https://github.com/npm/node-semver#readme", + "_id": "semver@5.1.0", + "_shasum": "85f2cf8550465c4df000cf7d86f6b054106ab9e5", + "_from": "semver@>=5.1.0 <5.2.0", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "85f2cf8550465c4df000cf7d86f6b054106ab9e5", + "tarball": "http://registry.npmjs.org/semver/-/semver-5.1.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.1.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/range.bnf b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/range.bnf new file mode 100644 index 00000000..bc8ce41b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9']['0'-'9']+ +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/semver.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/semver.js new file mode 100644 index 00000000..6c3b9048 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/semver/semver.js @@ -0,0 +1,1188 @@ +exports = module.exports = SemVer; + +// The debug function is excluded entirely from the minified version. +/* nomin */ var debug; +/* nomin */ if (typeof process === 'object' && + /* nomin */ process.env && + /* nomin */ process.env.NODE_DEBUG && + /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ debug = function() { + /* nomin */ var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ args.unshift('SEMVER'); + /* nomin */ console.log.apply(console, args); + /* nomin */ }; +/* nomin */ else + /* nomin */ debug = function() {}; + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0'; + +var MAX_LENGTH = 256; +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + +// The actual regexps go on exports.re +var re = exports.re = []; +var src = exports.src = []; +var R = 0; + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++; +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; +var NUMERICIDENTIFIERLOOSE = R++; +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; + + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++; +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; + + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++; +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')'; + +var MAINVERSIONLOOSE = R++; +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++; +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + +var PRERELEASEIDENTIFIERLOOSE = R++; +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++; +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + +var PRERELEASELOOSE = R++; +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++; +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++; +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; + + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++; +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?'; + +src[FULL] = '^' + FULLPLAIN + '$'; + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?'; + +var LOOSE = R++; +src[LOOSE] = '^' + LOOSEPLAIN + '$'; + +var GTLT = R++; +src[GTLT] = '((?:<|>)?=?)'; + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++; +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; +var XRANGEIDENTIFIER = R++; +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + +var XRANGEPLAIN = R++; +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGEPLAINLOOSE = R++; +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGE = R++; +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; +var XRANGELOOSE = R++; +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++; +src[LONETILDE] = '(?:~>?)'; + +var TILDETRIM = R++; +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); +var tildeTrimReplace = '$1~'; + +var TILDE = R++; +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; +var TILDELOOSE = R++; +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++; +src[LONECARET] = '(?:\\^)'; + +var CARETTRIM = R++; +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); +var caretTrimReplace = '$1^'; + +var CARET = R++; +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; +var CARETLOOSE = R++; +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++; +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; +var COMPARATOR = R++; +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; + + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++; +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); +var comparatorTrimReplace = '$1$2$3'; + + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++; +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$'; + +var HYPHENRANGELOOSE = R++; +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$'; + +// Star ranges basically just allow anything at all. +var STAR = R++; +src[STAR] = '(<|>)?=?\\s*\\*'; + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) + re[i] = new RegExp(src[i]); +} + +exports.parse = parse; +function parse(version, loose) { + if (version instanceof SemVer) + return version; + + if (typeof version !== 'string') + return null; + + if (version.length > MAX_LENGTH) + return null; + + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) + return null; + + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } +} + +exports.valid = valid; +function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; +} + + +exports.clean = clean; +function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; +} + +exports.SemVer = SemVer; + +function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) + return version; + else + version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + + if (!(this instanceof SemVer)) + return new SemVer(version, loose); + + debug('SemVer', version, loose); + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + + if (!m) + throw new TypeError('Invalid Version: ' + version); + + this.raw = version; + + // these are actually numbers + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) + throw new TypeError('Invalid major version') + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) + throw new TypeError('Invalid minor version') + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) + throw new TypeError('Invalid patch version') + + // numberify any prerelease numeric ids + if (!m[4]) + this.prerelease = []; + else + this.prerelease = m[4].split('.').map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) + return num + } + return id; + }); + + this.build = m[5] ? m[5].split('.') : []; + this.format(); +} + +SemVer.prototype.format = function() { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) + this.version += '-' + this.prerelease.join('.'); + return this.version; +}; + +SemVer.prototype.toString = function() { + return this.version; +}; + +SemVer.prototype.compare = function(other) { + debug('SemVer.compare', this.version, this.loose, other); + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return this.compareMain(other) || this.comparePre(other); +}; + +SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch); +}; + +SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) + return -1; + else if (!this.prerelease.length && other.prerelease.length) + return 1; + else if (!this.prerelease.length && !other.prerelease.length) + return 0; + + var i = 0; + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) + return 0; + else if (b === undefined) + return 1; + else if (a === undefined) + return -1; + else if (a === b) + continue; + else + return compareIdentifiers(a, b); + } while (++i); +}; + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) + this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) + this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) + this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + var i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) + this.prerelease = [identifier, 0]; + } else + this.prerelease = [identifier, 0]; + } + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + this.format(); + this.raw = this.version; + return this; +}; + +exports.inc = inc; +function inc(version, release, loose, identifier) { + if (typeof(loose) === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } +} + +exports.diff = diff; +function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre'+key; + } + } + } + return 'prerelease'; + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } +} + +exports.compareIdentifiers = compareIdentifiers; + +var numeric = /^[0-9]+$/; +function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return (anum && !bnum) ? -1 : + (bnum && !anum) ? 1 : + a < b ? -1 : + a > b ? 1 : + 0; +} + +exports.rcompareIdentifiers = rcompareIdentifiers; +function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); +} + +exports.major = major; +function major(a, loose) { + return new SemVer(a, loose).major; +} + +exports.minor = minor; +function minor(a, loose) { + return new SemVer(a, loose).minor; +} + +exports.patch = patch; +function patch(a, loose) { + return new SemVer(a, loose).patch; +} + +exports.compare = compare; +function compare(a, b, loose) { + return new SemVer(a, loose).compare(b); +} + +exports.compareLoose = compareLoose; +function compareLoose(a, b) { + return compare(a, b, true); +} + +exports.rcompare = rcompare; +function rcompare(a, b, loose) { + return compare(b, a, loose); +} + +exports.sort = sort; +function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compare(a, b, loose); + }); +} + +exports.rsort = rsort; +function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.rcompare(a, b, loose); + }); +} + +exports.gt = gt; +function gt(a, b, loose) { + return compare(a, b, loose) > 0; +} + +exports.lt = lt; +function lt(a, b, loose) { + return compare(a, b, loose) < 0; +} + +exports.eq = eq; +function eq(a, b, loose) { + return compare(a, b, loose) === 0; +} + +exports.neq = neq; +function neq(a, b, loose) { + return compare(a, b, loose) !== 0; +} + +exports.gte = gte; +function gte(a, b, loose) { + return compare(a, b, loose) >= 0; +} + +exports.lte = lte; +function lte(a, b, loose) { + return compare(a, b, loose) <= 0; +} + +exports.cmp = cmp; +function cmp(a, op, b, loose) { + var ret; + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + case '': case '=': case '==': ret = eq(a, b, loose); break; + case '!=': ret = neq(a, b, loose); break; + case '>': ret = gt(a, b, loose); break; + case '>=': ret = gte(a, b, loose); break; + case '<': ret = lt(a, b, loose); break; + case '<=': ret = lte(a, b, loose); break; + default: throw new TypeError('Invalid operator: ' + op); + } + return ret; +} + +exports.Comparator = Comparator; +function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) + return comp; + else + comp = comp.value; + } + + if (!(this instanceof Comparator)) + return new Comparator(comp, loose); + + debug('comparator', comp, loose); + this.loose = loose; + this.parse(comp); + + if (this.semver === ANY) + this.value = ''; + else + this.value = this.operator + this.semver.version; + + debug('comp', this); +} + +var ANY = {}; +Comparator.prototype.parse = function(comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + + if (!m) + throw new TypeError('Invalid comparator: ' + comp); + + this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) + this.semver = ANY; + else + this.semver = new SemVer(m[2], this.loose); +}; + +Comparator.prototype.toString = function() { + return this.value; +}; + +Comparator.prototype.test = function(version) { + debug('Comparator.test', version, this.loose); + + if (this.semver === ANY) + return true; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + return cmp(version, this.operator, this.semver, this.loose); +}; + + +exports.Range = Range; +function Range(range, loose) { + if ((range instanceof Range) && range.loose === loose) + return range; + + if (!(this instanceof Range)) + return new Range(range, loose); + + this.loose = loose; + + // First, split based on boolean or || + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range) { + return this.parseRange(range.trim()); + }, this).filter(function(c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); +} + +Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; +}; + +Range.prototype.toString = function() { + return this.range; +}; + +Range.prototype.parseRange = function(range) { + var loose = this.loose; + range = range.trim(); + debug('range', range, loose); + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace); + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace); + + // normalize spaces + range = range.split(/\s+/).join(' '); + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function(comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, loose); + }); + + return set; +}; + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators; +function toComparators(range, loose) { + return new Range(range, loose).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(' ').trim().split(' '); + }); +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator(comp, loose) { + debug('comp', comp); + comp = replaceCarets(comp, loose); + debug('caret', comp); + comp = replaceTildes(comp, loose); + debug('tildes', comp); + comp = replaceXRanges(comp, loose); + debug('xrange', comp); + comp = replaceStars(comp, loose); + debug('stars', comp); + return comp; +} + +function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, loose); + }).join(' '); +} + +function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) + // ~1.2 == >=1.2.0- <1.3.0- + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + + debug('tilde return', ret); + return ret; + }); +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, loose); + }).join(' '); +} + +function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) { + if (M === '0') + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0'; + } + + debug('caret return', ret); + return ret; + }); +} + +function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, loose); + }).join(' '); +} + +function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + + if (gtlt === '=' && anyX) + gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) + m = 0; + if (xp) + p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) + M = +M + 1 + else + m = +m + 1 + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + + return ret; + }); +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], ''); +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + + if (isX(fM)) + from = ''; + else if (isX(fm)) + from = '>=' + fM + '.0.0'; + else if (isX(fp)) + from = '>=' + fM + '.' + fm + '.0'; + else + from = '>=' + from; + + if (isX(tM)) + to = ''; + else if (isX(tm)) + to = '<' + (+tM + 1) + '.0.0'; + else if (isX(tp)) + to = '<' + tM + '.' + (+tm + 1) + '.0'; + else if (tpr) + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; + else + to = '<=' + to; + + return (from + ' ' + to).trim(); +} + + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function(version) { + if (!version) + return false; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) + return true; + } + return false; +}; + +function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) + return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) + continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) + return true; + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false; + } + + return true; +} + +exports.satisfies = satisfies; +function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + return range.test(version); +} + +exports.maxSatisfying = maxSatisfying; +function maxSatisfying(versions, range, loose) { + return versions.filter(function(version) { + return satisfies(version, range, loose); + }).sort(function(a, b) { + return rcompare(a, b, loose); + })[0] || null; +} + +exports.validRange = validRange; +function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr; +function ltr(version, range, loose) { + return outside(version, range, '<', loose); +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr; +function gtr(version, range, loose) { + return outside(version, range, '>', loose); +} + +exports.outside = outside; +function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, loose)) { + return false; + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + + var high = null; + var low = null; + + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false; + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/.npmignore new file mode 100644 index 00000000..ac4d7d17 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/.npmignore @@ -0,0 +1,4 @@ +node_modules +test +.gitignore +.travis.yml \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/LICENSE new file mode 100644 index 00000000..3d8f089d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/LICENSE @@ -0,0 +1,46 @@ +Copyright (c) 2013 Forbes Lindesay + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/README.md new file mode 100644 index 00000000..c881194c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/README.md @@ -0,0 +1,49 @@ +# sha + +Check and get file hashes (using any algorithm) + +[![Build Status](https://img.shields.io/travis/ForbesLindesay/sha/master.svg)](https://travis-ci.org/ForbesLindesay/sha) +[![Dependency Status](https://img.shields.io/gemnasium/ForbesLindesay/sha.svg)](https://gemnasium.com/ForbesLindesay/sha) +[![NPM version](https://img.shields.io/npm/v/sha.svg)](http://badge.fury.io/js/sha) + +## Installation + + $ npm install sha + +## API + +### check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options]) + +Asynchronously check that `fileName` has a "hash" of `expected`. The callback will be called with either `null` or an error (indicating that they did not match). + +Options: + +- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash` + +### get(fileName, [options,] cb) / getSync(filename, [options]) + +Asynchronously get the "hash" of `fileName`. The callback will be called with an optional `error` object and the (lower cased) hex digest of the hash. + +Options: + +- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash` + +### stream(expected, [options]) + +Check the hash of a stream without ever buffering it. This is a pass through stream so you can do things like: + +```js +fs.createReadStream('src') + .pipe(sha.stream('expected')) + .pipe(fs.createWriteStream('dest')) +``` + +`dest` will be a complete copy of `src` and an error will be emitted if the hash did not match `'expected'`. + +Options: + +- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash` + +## License + +You may use this software under the BSD or MIT. Take your pick. If you want me to release it under another license, open a pull request. \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/index.js new file mode 100644 index 00000000..19b7fdfa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/index.js @@ -0,0 +1,107 @@ +'use strict' + +var Transform = require('stream').Transform || require('readable-stream').Transform +var crypto = require('crypto') +var fs = require('graceful-fs') + +exports.check = check +exports.checkSync = checkSync +exports.get = get +exports.getSync = getSync +exports.stream = stream + +function check(file, expected, options, cb) { + if (typeof options === 'function') { + cb = options + options = undefined + } + expected = expected.toLowerCase().trim() + get(file, options, function (er, actual) { + if (er) { + if (er.message) er.message += ' while getting shasum for ' + file + return cb(er) + } + if (actual === expected) return cb(null) + cb(new Error( + 'shasum check failed for ' + file + '\n' + + 'Expected: ' + expected + '\n' + + 'Actual: ' + actual)) + }) +} +function checkSync(file, expected, options) { + expected = expected.toLowerCase().trim() + var actual + try { + actual = getSync(file, options) + } catch (er) { + if (er.message) er.message += ' while getting shasum for ' + file + throw er + } + if (actual !== expected) { + var ex = new Error( + 'shasum check failed for ' + file + '\n' + + 'Expected: ' + expected + '\n' + + 'Actual: ' + actual) + throw ex + } +} + + +function get(file, options, cb) { + if (typeof options === 'function') { + cb = options + options = undefined + } + options = options || {} + var algorithm = options.algorithm || 'sha1' + var hash = crypto.createHash(algorithm) + var source = fs.createReadStream(file) + var errState = null + source + .on('error', function (er) { + if (errState) return + return cb(errState = er) + }) + .on('data', function (chunk) { + if (errState) return + hash.update(chunk) + }) + .on('end', function () { + if (errState) return + var actual = hash.digest("hex").toLowerCase().trim() + cb(null, actual) + }) +} + +function getSync(file, options) { + options = options || {} + var algorithm = options.algorithm || 'sha1' + var hash = crypto.createHash(algorithm) + var source = fs.readFileSync(file) + hash.update(source) + return hash.digest("hex").toLowerCase().trim() +} + +function stream(expected, options) { + expected = expected.toLowerCase().trim() + options = options || {} + var algorithm = options.algorithm || 'sha1' + var hash = crypto.createHash(algorithm) + + var stream = new Transform() + stream._transform = function (chunk, encoding, callback) { + hash.update(chunk) + stream.push(chunk) + callback() + } + stream._flush = function (cb) { + var actual = hash.digest("hex").toLowerCase().trim() + if (actual === expected) return cb(null) + cb(new Error( + 'shasum check failed for:\n' + + ' Expected: ' + expected + '\n' + + ' Actual: ' + actual)) + this.push(null) + } + return stream +} \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/package.json new file mode 100644 index 00000000..b91fca76 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/sha/package.json @@ -0,0 +1,54 @@ +{ + "name": "sha", + "version": "2.0.1", + "description": "Check and get file hashes", + "scripts": { + "test": "mocha -R spec" + }, + "repository": { + "type": "git", + "url": "https://github.com/ForbesLindesay/sha.git" + }, + "license": "(BSD-2-Clause OR MIT)", + "dependencies": { + "graceful-fs": "^4.1.2", + "readable-stream": "^2.0.2" + }, + "devDependencies": { + "mocha": "~1.9.0" + }, + "gitHead": "ce7c72ba753d886fb46c396cbadcbfc8eac25b4f", + "bugs": { + "url": "https://github.com/ForbesLindesay/sha/issues" + }, + "homepage": "https://github.com/ForbesLindesay/sha", + "_id": "sha@2.0.1", + "_shasum": "6030822fbd2c9823949f8f72ed6411ee5cf25aae", + "_from": "sha@2.0.1", + "_npmVersion": "2.7.1", + "_nodeVersion": "1.6.2", + "_npmUser": { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + { + "name": "kenan", + "email": "kenan@kenany.me" + }, + { + "name": "thefourtheye", + "email": "thechargingvolcano@gmail.com" + } + ], + "dist": { + "shasum": "6030822fbd2c9823949f8f72ed6411ee5cf25aae", + "tarball": "http://registry.npmjs.org/sha/-/sha-2.0.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/sha/-/sha-2.0.1.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/LICENSE new file mode 100644 index 00000000..235bdd54 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/README.md new file mode 100644 index 00000000..025ea3a3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/README.md @@ -0,0 +1,143 @@ +# Controlling Flow: callbacks are easy + +## What's actually hard? + +- Doing a bunch of things in a specific order. +- Knowing when stuff is done. +- Handling failures. +- Breaking up functionality into parts (avoid nested inline callbacks) + + +## Common Mistakes + +- Abandoning convention and consistency. +- Putting all callbacks inline. +- Using libraries without grokking them. +- Trying to make async code look sync. + +## Define Conventions + +- Two kinds of functions: *actors* take action, *callbacks* get results. +- Essentially the continuation pattern. Resulting code *looks* similar + to fibers, but is *much* simpler to implement. +- Node works this way in the lowlevel APIs already, and it's very flexible. + +## Callbacks + +- Simple responders +- Must always be prepared to handle errors, that's why it's the first argument. +- Often inline anonymous, but not always. +- Can trap and call other callbacks with modified data, or pass errors upwards. + +## Actors + +- Last argument is a callback. +- If any error occurs, and can't be handled, pass it to the callback and return. +- Must not throw. Return value ignored. +- return x ==> return cb(null, x) +- throw er ==> return cb(er) + +```javascript +// return true if a path is either +// a symlink or a directory. +function isLinkOrDir (path, cb) { + fs.lstat(path, function (er, s) { + if (er) return cb(er) + return cb(null, s.isDirectory() || s.isSymbolicLink()) + }) +} +``` + +# asyncMap + +## Usecases + +- I have a list of 10 files, and need to read all of them, and then continue when they're all done. +- I have a dozen URLs, and need to fetch them all, and then continue when they're all done. +- I have 4 connected users, and need to send a message to all of them, and then continue when that's done. +- I have a list of n things, and I need to dosomething with all of them, in parallel, and get the results once they're all complete. + + +## Solution + +```javascript +var asyncMap = require("slide").asyncMap +function writeFiles (files, what, cb) { + asyncMap(files, function (f, cb) { + fs.writeFile(f, what, cb) + }, cb) +} +writeFiles([my, file, list], "foo", cb) +``` + +# chain + +## Usecases + +- I have to do a bunch of things, in order. Get db credentials out of a file, + read the data from the db, write that data to another file. +- If anything fails, do not continue. +- I still have to provide an array of functions, which is a lot of boilerplate, + and a pita if your functions take args like + +```javascript +function (cb) { + blah(a, b, c, cb) +} +``` + +- Results are discarded, which is a bit lame. +- No way to branch. + +## Solution + +- reduces boilerplate by converting an array of [fn, args] to an actor + that takes no arguments (except cb) +- A bit like Function#bind, but tailored for our use-case. +- bindActor(obj, "method", a, b, c) +- bindActor(fn, a, b, c) +- bindActor(obj, fn, a, b, c) +- branching, skipping over falsey arguments + +```javascript +chain([ + doThing && [thing, a, b, c] +, isFoo && [doFoo, "foo"] +, subChain && [chain, [one, two]] +], cb) +``` + +- tracking results: results are stored in an optional array passed as argument, + last result is always in results[results.length - 1]. +- treat chain.first and chain.last as placeholders for the first/last + result up until that point. + + +## Non-trivial example + +- Read number files in a directory +- Add the results together +- Ping a web service with the result +- Write the response to a file +- Delete the number files + +```javascript +var chain = require("slide").chain +function myProgram (cb) { + var res = [], last = chain.last, first = chain.first + chain([ + [fs, "readdir", "the-directory"] + , [readFiles, "the-directory", last] + , [sum, last] + , [ping, "POST", "example.com", 80, "/foo", last] + , [fs, "writeFile", "result.txt", last] + , [rmFiles, "./the-directory", first] + ], res, cb) +} +``` + +# Conclusion: Convention Profits + +- Consistent API from top to bottom. +- Sneak in at any point to inject functionality. Testable, reusable, ... +- When ruby and python users whine, you can smile condescendingly. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/index.js new file mode 100644 index 00000000..124671e0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/index.js @@ -0,0 +1 @@ +module.exports=require("./lib/slide") diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/package.json new file mode 100644 index 00000000..09c991c4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/slide/package.json @@ -0,0 +1,54 @@ +{ + "name": "slide", + "version": "1.1.6", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "contributors": [ + { + "name": "S. Sriram", + "email": "ssriram@gmail.com", + "url": "http://www.565labs.com" + } + ], + "description": "A flow control lib small enough to fit on in a slide presentation. Derived live at Oak.JS", + "main": "./lib/slide.js", + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": "*" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/slide-flow-control.git" + }, + "license": "ISC", + "gitHead": "8345e51ee41e35825abc1a40750ea11462f57028", + "bugs": { + "url": "https://github.com/isaacs/slide-flow-control/issues" + }, + "homepage": "https://github.com/isaacs/slide-flow-control", + "_id": "slide@1.1.6", + "scripts": {}, + "_shasum": "56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707", + "_from": "slide@>=1.1.6 <1.2.0", + "_npmVersion": "2.0.0-beta.3", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707", + "tarball": "http://registry.npmjs.org/slide/-/slide-1.1.6.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/sorted-object/LICENSE.txt b/bin/nodejs0.10.47/node_modules/npm/node_modules/sorted-object/LICENSE.txt new file mode 100644 index 00000000..9b2136d7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/sorted-object/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright © 2014 Domenic Denicola + +This work is free. You can redistribute it and/or modify it under the +terms of the Do What The Fuck You Want To Public License, Version 2, +as published by Sam Hocevar. See below for more details. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/sorted-object/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/sorted-object/README.md new file mode 100644 index 00000000..5d929df5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/sorted-object/README.md @@ -0,0 +1,20 @@ +# Get a Version of an Object with Sorted Keys + +Although objects in JavaScript are theoretically unsorted, in practice most engines use insertion order—at least, ignoring numeric keys. This manifests itself most prominently when dealing with an object's JSON serialization. + +So, for example, you might be trying to serialize some object to a JSON file. But every time you write it, it ends up being output in a different order, depending on how you created it in the first place! This makes for some ugly diffs. + +**sorted-object** gives you the answer. Just use this package to create a version of your object with its keys sorted before serializing, and you'll get a consistent order every time. + +```js +var sortedObject = require("sorted-object"); + +var objectToSerialize = generateStuffNondeterministically(); + +// Before: +fs.writeFileSync("dest.json", JSON.stringify(objectToSerialize)); + +// After: +var sortedVersion = sortedObject(objectToSerialize); +fs.writeFileSync("dest.json", JSON.stringify(sortedVersion)); +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/sorted-object/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/sorted-object/package.json new file mode 100644 index 00000000..03f3a4e5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/sorted-object/package.json @@ -0,0 +1,37 @@ +{ + "name": "sorted-object", + "description": "Returns a copy of an object with its keys sorted", + "keywords": [ + "sort", + "keys", + "object" + ], + "version": "1.0.0", + "author": { + "name": "Domenic Denicola", + "email": "domenic@domenicdenicola.com", + "url": "http://domenic.me/" + }, + "license": "WTFPL", + "repository": { + "type": "git", + "url": "git://github.com/domenic/sorted-object.git" + }, + "bugs": { + "url": "http://github.com/domenic/sorted-object/issues" + }, + "main": "lib/sorted-object.js", + "scripts": { + "test": "tape test/tests.js", + "lint": "jshint lib && jshint test" + }, + "devDependencies": { + "jshint": "~2.4.3", + "tape": "~2.4.2" + }, + "readme": "# Get a Version of an Object with Sorted Keys\n\nAlthough objects in JavaScript are theoretically unsorted, in practice most engines use insertion order—at least, ignoring numeric keys. This manifests itself most prominently when dealing with an object's JSON serialization.\n\nSo, for example, you might be trying to serialize some object to a JSON file. But every time you write it, it ends up being output in a different order, depending on how you created it in the first place! This makes for some ugly diffs.\n\n**sorted-object** gives you the answer. Just use this package to create a version of your object with its keys sorted before serializing, and you'll get a consistent order every time.\n\n```js\nvar sortedObject = require(\"sorted-object\");\n\nvar objectToSerialize = generateStuffNondeterministically();\n\n// Before:\nfs.writeFileSync(\"dest.json\", JSON.stringify(objectToSerialize));\n\n// After:\nvar sortedVersion = sortedObject(objectToSerialize);\nfs.writeFileSync(\"dest.json\", JSON.stringify(sortedVersion));\n```\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/domenic/sorted-object", + "_id": "sorted-object@1.0.0", + "_from": "sorted-object@" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/LICENSE new file mode 100644 index 00000000..edeed790 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/README.md new file mode 100644 index 00000000..6ead0bf1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/README.md @@ -0,0 +1,55 @@ +# spdx-license-ids + +A list of [SPDX license](https://spdx.org/licenses/) identifiers + +[**Download JSON**](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/spdx-license-ids.json) + +## Use as a JavaScript Library + +[![NPM version](https://img.shields.io/npm/v/spdx-license-ids.svg)](https://www.npmjs.org/package/spdx-license-ids) +[![Bower version](https://img.shields.io/bower/v/spdx-license-ids.svg)](https://github.com/shinnn/spdx-license-ids/releases) +[![Build Status](https://travis-ci.org/shinnn/spdx-license-ids.svg?branch=master)](https://travis-ci.org/shinnn/spdx-license-ids) +[![Coverage Status](https://img.shields.io/coveralls/shinnn/spdx-license-ids.svg)](https://coveralls.io/r/shinnn/spdx-license-ids) +[![devDependency Status](https://david-dm.org/shinnn/spdx-license-ids/dev-status.svg)](https://david-dm.org/shinnn/spdx-license-ids#info=devDependencies) + +### Installation + +#### Package managers + +##### [npm](https://www.npmjs.com/) + +```sh +npm install spdx-license-ids +``` + +##### [bower](http://bower.io/) + +```sh +bower install spdx-license-ids +``` + +##### [Duo](http://duojs.org/) + +```javascript +const spdxLicenseIds = require('shinnn/spdx-license-ids'); +``` + +#### Standalone + +[Download the script file directly.](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/spdx-license-ids-browser.js) + +### API + +#### spdxLicenseIds + +Type: `Array` of `String` + +It returns an array of SPDX license identifiers. + +```javascript +const spdxLicenseIds = require('spdx-license-ids'); //=> ['Glide', 'Abstyles', 'AFL-1.1', ... ] +``` + +## License + +[The Unlicense](./LICENSE). diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/package.json new file mode 100644 index 00000000..a58c9786 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/package.json @@ -0,0 +1,77 @@ +{ + "name": "spdx-license-ids", + "version": "1.2.0", + "description": "A list of SPDX license identifiers", + "repository": { + "type": "git", + "url": "git+https://github.com/shinnn/spdx-license-ids.git" + }, + "author": { + "name": "Shinnosuke Watanabe", + "url": "https://github.com/shinnn" + }, + "scripts": { + "build": "node --harmony_arrow_functions build.js", + "lint": "eslint --config node_modules/@shinnn/eslintrc/rc.json --ignore-path .gitignore .", + "pretest": "${npm_package_scripts_build} && ${npm_package_scripts_lint}", + "test": "node --harmony_arrow_functions test.js", + "coverage": "node --harmony_arrow_functions node_modules/.bin/istanbul cover test.js", + "coveralls": "${npm_package_scripts_coverage} && istanbul-coveralls" + }, + "license": "Unlicense", + "main": "spdx-license-ids.json", + "files": [ + "spdx-license-ids.json" + ], + "keywords": [ + "spdx", + "license", + "licenses", + "id", + "identifier", + "identifiers", + "json", + "array", + "oss", + "browser", + "client-side" + ], + "devDependencies": { + "@shinnn/eslintrc": "^1.0.0", + "each-async": "^1.1.1", + "eslint": "^0.24.0", + "got": "^3.3.0", + "istanbul": "^0.3.17", + "require-bower-files": "^2.0.0", + "rimraf": "^2.4.1", + "stringify-object": "^2.2.0", + "tape": "^4.0.0" + }, + "gitHead": "f74a7a16ca05540e0e97f1bbb61da07829b5d9ab", + "bugs": { + "url": "https://github.com/shinnn/spdx-license-ids/issues" + }, + "homepage": "https://github.com/shinnn/spdx-license-ids#readme", + "_id": "spdx-license-ids@1.2.0", + "_shasum": "b549dd0f63dcb745a17e2ea3a07402e0e332d1e2", + "_from": "spdx-license-ids@1.2.0", + "_npmVersion": "3.5.2", + "_nodeVersion": "5.4.0", + "_npmUser": { + "name": "shinnn", + "email": "snnskwtnb@gmail.com" + }, + "dist": { + "shasum": "b549dd0f63dcb745a17e2ea3a07402e0e332d1e2", + "tarball": "http://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.0.tgz" + }, + "maintainers": [ + { + "name": "shinnn", + "email": "snnskwtnb@gmail.com" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/spdx-license-ids.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/spdx-license-ids.json new file mode 100644 index 00000000..4057565b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/spdx-license-ids/spdx-license-ids.json @@ -0,0 +1,321 @@ +[ + "Glide", + "Abstyles", + "AFL-1.1", + "AFL-1.2", + "AFL-2.0", + "AFL-2.1", + "AFL-3.0", + "AMPAS", + "APL-1.0", + "Adobe-Glyph", + "APAFML", + "Adobe-2006", + "AGPL-1.0", + "Afmparse", + "Aladdin", + "ADSL", + "AMDPLPA", + "ANTLR-PD", + "Apache-1.0", + "Apache-1.1", + "Apache-2.0", + "AML", + "APSL-1.0", + "APSL-1.1", + "APSL-1.2", + "APSL-2.0", + "Artistic-1.0", + "Artistic-1.0-Perl", + "Artistic-1.0-cl8", + "Artistic-2.0", + "AAL", + "Bahyph", + "Barr", + "Beerware", + "BitTorrent-1.0", + "BitTorrent-1.1", + "BSL-1.0", + "Borceux", + "BSD-2-Clause", + "BSD-2-Clause-FreeBSD", + "BSD-2-Clause-NetBSD", + "BSD-3-Clause", + "BSD-3-Clause-Clear", + "BSD-4-Clause", + "BSD-Protection", + "BSD-3-Clause-Attribution", + "0BSD", + "BSD-4-Clause-UC", + "bzip2-1.0.5", + "bzip2-1.0.6", + "Caldera", + "CECILL-1.0", + "CECILL-1.1", + "CECILL-2.0", + "CECILL-2.1", + "CECILL-B", + "CECILL-C", + "ClArtistic", + "MIT-CMU", + "CNRI-Jython", + "CNRI-Python", + "CNRI-Python-GPL-Compatible", + "CPOL-1.02", + "CDDL-1.0", + "CDDL-1.1", + "CPAL-1.0", + "CPL-1.0", + "CATOSL-1.1", + "Condor-1.1", + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-3.0", + "CC-BY-4.0", + "CC-BY-ND-1.0", + "CC-BY-ND-2.0", + "CC-BY-ND-2.5", + "CC-BY-ND-3.0", + "CC-BY-ND-4.0", + "CC-BY-NC-1.0", + "CC-BY-NC-2.0", + "CC-BY-NC-2.5", + "CC-BY-NC-3.0", + "CC-BY-NC-4.0", + "CC-BY-NC-ND-1.0", + "CC-BY-NC-ND-2.0", + "CC-BY-NC-ND-2.5", + "CC-BY-NC-ND-3.0", + "CC-BY-NC-ND-4.0", + "CC-BY-NC-SA-1.0", + "CC-BY-NC-SA-2.0", + "CC-BY-NC-SA-2.5", + "CC-BY-NC-SA-3.0", + "CC-BY-NC-SA-4.0", + "CC-BY-SA-1.0", + "CC-BY-SA-2.0", + "CC-BY-SA-2.5", + "CC-BY-SA-3.0", + "CC-BY-SA-4.0", + "CC0-1.0", + "Crossword", + "CrystalStacker", + "CUA-OPL-1.0", + "Cube", + "curl", + "D-FSL-1.0", + "diffmark", + "WTFPL", + "DOC", + "Dotseqn", + "DSDP", + "dvipdfm", + "EPL-1.0", + "ECL-1.0", + "ECL-2.0", + "eGenix", + "EFL-1.0", + "EFL-2.0", + "MIT-advertising", + "MIT-enna", + "Entessa", + "ErlPL-1.1", + "EUDatagrid", + "EUPL-1.0", + "EUPL-1.1", + "Eurosym", + "Fair", + "MIT-feh", + "Frameworx-1.0", + "FreeImage", + "FTL", + "FSFUL", + "FSFULLR", + "Giftware", + "GL2PS", + "Glulxe", + "AGPL-3.0", + "GFDL-1.1", + "GFDL-1.2", + "GFDL-1.3", + "GPL-1.0", + "GPL-2.0", + "GPL-3.0", + "LGPL-2.1", + "LGPL-3.0", + "LGPL-2.0", + "gnuplot", + "gSOAP-1.3b", + "HaskellReport", + "HPND", + "IBM-pibs", + "IPL-1.0", + "ICU", + "ImageMagick", + "iMatix", + "Imlib2", + "IJG", + "Info-ZIP", + "Intel-ACPI", + "Intel", + "Interbase-1.0", + "IPA", + "ISC", + "JasPer-2.0", + "JSON", + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3a", + "LPPL-1.3c", + "Latex2e", + "BSD-3-Clause-LBNL", + "Leptonica", + "LGPLLR", + "Libpng", + "libtiff", + "LPL-1.02", + "LPL-1.0", + "MakeIndex", + "MTLL", + "MS-PL", + "MS-RL", + "MirOS", + "MITNFA", + "MIT", + "Motosoto", + "MPL-1.0", + "MPL-1.1", + "MPL-2.0", + "MPL-2.0-no-copyleft-exception", + "mpich2", + "Multics", + "Mup", + "NASA-1.3", + "Naumen", + "NBPL-1.0", + "NetCDF", + "NGPL", + "NOSL", + "NPL-1.0", + "NPL-1.1", + "Newsletr", + "NLPL", + "Nokia", + "NPOSL-3.0", + "Noweb", + "NRL", + "NTP", + "Nunit", + "OCLC-2.0", + "ODbL-1.0", + "PDDL-1.0", + "OCCT-PL", + "OGTSL", + "OLDAP-2.2.2", + "OLDAP-1.1", + "OLDAP-1.2", + "OLDAP-1.3", + "OLDAP-1.4", + "OLDAP-2.0", + "OLDAP-2.0.1", + "OLDAP-2.1", + "OLDAP-2.2", + "OLDAP-2.2.1", + "OLDAP-2.3", + "OLDAP-2.4", + "OLDAP-2.5", + "OLDAP-2.6", + "OLDAP-2.7", + "OLDAP-2.8", + "OML", + "OPL-1.0", + "OSL-1.0", + "OSL-1.1", + "OSL-2.0", + "OSL-2.1", + "OSL-3.0", + "OpenSSL", + "PHP-3.0", + "PHP-3.01", + "Plexus", + "PostgreSQL", + "psfrag", + "psutils", + "Python-2.0", + "QPL-1.0", + "Qhull", + "Rdisc", + "RPSL-1.0", + "RPL-1.1", + "RPL-1.5", + "RHeCos-1.1", + "RSCPL", + "RSA-MD", + "Ruby", + "SAX-PD", + "Saxpath", + "SCEA", + "SWL", + "Sendmail", + "SGI-B-1.0", + "SGI-B-1.1", + "SGI-B-2.0", + "OFL-1.0", + "OFL-1.1", + "SimPL-2.0", + "Sleepycat", + "SNIA", + "Spencer-86", + "Spencer-94", + "Spencer-99", + "SMLNJ", + "SugarCRM-1.1.3", + "SISSL", + "SISSL-1.2", + "SPL-1.0", + "Watcom-1.0", + "TCL", + "Unlicense", + "TMate", + "TORQUE-1.1", + "TOSL", + "Unicode-TOU", + "UPL-1.0", + "NCSA", + "Vim", + "VOSTROM", + "VSL-1.0", + "W3C-19980720", + "W3C", + "Wsuipa", + "Xnet", + "X11", + "Xerox", + "XFree86-1.1", + "xinetd", + "xpp", + "XSkat", + "YPL-1.0", + "YPL-1.1", + "Zed", + "Zend-2.0", + "Zimbra-1.3", + "Zimbra-1.4", + "Zlib", + "zlib-acknowledgement", + "ZPL-1.1", + "ZPL-2.0", + "ZPL-2.1", + "eCos-2.0", + "GPL-2.0-with-autoconf-exception", + "GPL-2.0-with-bison-exception", + "GPL-2.0-with-classpath-exception", + "GPL-2.0-with-font-exception", + "GPL-2.0-with-GCC-exception", + "GPL-3.0-with-autoconf-exception", + "GPL-3.0-with-GCC-exception", + "StandardML-NJ", + "WXwindows" +] diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/index.js new file mode 100644 index 00000000..8fc4919d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/index.js @@ -0,0 +1,6 @@ +'use strict'; +var ansiRegex = require('ansi-regex')(); + +module.exports = function (str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; +}; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/license b/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/license new file mode 100644 index 00000000..d70e4cd6 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/package.json new file mode 100644 index 00000000..b4554c7b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/package.json @@ -0,0 +1,90 @@ +{ + "name": "strip-ansi", + "version": "3.0.1", + "description": "Strip ANSI escape codes", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/strip-ansi.git" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "gitHead": "8270705c704956da865623e564eba4875c3ea17f", + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "homepage": "https://github.com/chalk/strip-ansi", + "_id": "strip-ansi@3.0.1", + "_shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", + "_from": "strip-ansi@*", + "_npmVersion": "2.11.3", + "_nodeVersion": "0.12.7", + "_npmUser": { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + }, + "dist": { + "shasum": "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", + "tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" + }, + "_npmOperationalInternal": { + "host": "packages-9-west.internal.npmjs.com", + "tmp": "tmp/strip-ansi-3.0.1.tgz_1456057278183_0.28958667791448534" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/readme.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/readme.md new file mode 100644 index 00000000..5d7e99af --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/strip-ansi/readme.md @@ -0,0 +1,33 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save strip-ansi +``` + + +## Usage + +```js +var stripAnsi = require('strip-ansi'); + +stripAnsi('\u001b[4mcake\u001b[0m'); +//=> 'cake' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/.npmignore new file mode 100644 index 00000000..7f00d1a6 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/.npmignore @@ -0,0 +1,5 @@ +.*.swp +node_modules +examples/extract/ +test/tmp/ +test/fixtures/ diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/.travis.yml new file mode 100644 index 00000000..d4debfb1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.10 + - 0.11 diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/LICENSE new file mode 100644 index 00000000..600a5dc9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/LICENSE @@ -0,0 +1,12 @@ +The ISC License +Copyright (c) Isaac Z. Schlueter and Contributors +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/README.md new file mode 100644 index 00000000..ec934e47 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/README.md @@ -0,0 +1,50 @@ +# node-tar + +Tar for Node.js. + +[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/) + +## API + +See `examples/` for usage examples. + +### var tar = require('tar') + +Returns an object with `.Pack`, `.Extract` and `.Parse` methods. + +### tar.Pack([properties]) + +Returns a through stream. Use +[fstream](https://npmjs.org/package/fstream) to write files into the +pack stream and you will receive tar archive data from the pack +stream. + +This only works with directories, it does not work with individual files. + +The optional `properties` object are used to set properties in the tar +'Global Extended Header'. If the `fromBase` property is set to true, +the tar will contain files relative to the path passed, and not with +the path included. + +### tar.Extract([options]) + +Returns a through stream. Write tar data to the stream and the files +in the tarball will be extracted onto the filesystem. + +`options` can be: + +```js +{ + path: '/path/to/extract/tar/into', + strip: 0, // how many path segments to strip from the root when extracting +} +``` + +`options` also get passed to the `fstream.Writer` instance that `tar` +uses internally. + +### tar.Parse() + +Returns a writable stream. Write tar data to it and it will emit +`entry` events for each entry parsed from the tarball. This is used by +`tar.Extract`. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/package.json new file mode 100644 index 00000000..b37b4af0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/package.json @@ -0,0 +1,40 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "tar", + "description": "tar for node", + "version": "2.2.1", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-tar.git" + }, + "main": "tar.js", + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + }, + "devDependencies": { + "graceful-fs": "^4.1.2", + "rimraf": "1.x", + "tap": "0.x", + "mkdirp": "^0.5.0" + }, + "license": "ISC", + "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThis only works with directories, it does not work with individual files.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'. If the `fromBase` property is set to true,\nthe tar will contain files relative to the path passed, and not with\nthe path included.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n", + "readmeFilename": "README.md", + "gitHead": "52237e39d2eb68d22a32d9a98f1d762189fe6a3d", + "bugs": { + "url": "https://github.com/isaacs/node-tar/issues" + }, + "homepage": "https://github.com/isaacs/node-tar#readme", + "_id": "tar@2.2.1", + "_shasum": "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1", + "_from": "tar@2.2.1" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/tar.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/tar.js new file mode 100644 index 00000000..05e0b2ef --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/tar/tar.js @@ -0,0 +1,173 @@ +// field paths that every tar file must have. +// header is padded to 512 bytes. +var f = 0 + , fields = {} + , path = fields.path = f++ + , mode = fields.mode = f++ + , uid = fields.uid = f++ + , gid = fields.gid = f++ + , size = fields.size = f++ + , mtime = fields.mtime = f++ + , cksum = fields.cksum = f++ + , type = fields.type = f++ + , linkpath = fields.linkpath = f++ + , headerSize = 512 + , blockSize = 512 + , fieldSize = [] + +fieldSize[path] = 100 +fieldSize[mode] = 8 +fieldSize[uid] = 8 +fieldSize[gid] = 8 +fieldSize[size] = 12 +fieldSize[mtime] = 12 +fieldSize[cksum] = 8 +fieldSize[type] = 1 +fieldSize[linkpath] = 100 + +// "ustar\0" may introduce another bunch of headers. +// these are optional, and will be nulled out if not present. + +var ustar = fields.ustar = f++ + , ustarver = fields.ustarver = f++ + , uname = fields.uname = f++ + , gname = fields.gname = f++ + , devmaj = fields.devmaj = f++ + , devmin = fields.devmin = f++ + , prefix = fields.prefix = f++ + , fill = fields.fill = f++ + +// terminate fields. +fields[f] = null + +fieldSize[ustar] = 6 +fieldSize[ustarver] = 2 +fieldSize[uname] = 32 +fieldSize[gname] = 32 +fieldSize[devmaj] = 8 +fieldSize[devmin] = 8 +fieldSize[prefix] = 155 +fieldSize[fill] = 12 + +// nb: prefix field may in fact be 130 bytes of prefix, +// a null char, 12 bytes for atime, 12 bytes for ctime. +// +// To recognize this format: +// 1. prefix[130] === ' ' or '\0' +// 2. atime and ctime are octal numeric values +// 3. atime and ctime have ' ' in their last byte + +var fieldEnds = {} + , fieldOffs = {} + , fe = 0 +for (var i = 0; i < f; i ++) { + fieldOffs[i] = fe + fieldEnds[i] = (fe += fieldSize[i]) +} + +// build a translation table of field paths. +Object.keys(fields).forEach(function (f) { + if (fields[f] !== null) fields[fields[f]] = f +}) + +// different values of the 'type' field +// paths match the values of Stats.isX() functions, where appropriate +var types = + { 0: "File" + , "\0": "OldFile" // like 0 + , "": "OldFile" + , 1: "Link" + , 2: "SymbolicLink" + , 3: "CharacterDevice" + , 4: "BlockDevice" + , 5: "Directory" + , 6: "FIFO" + , 7: "ContiguousFile" // like 0 + // posix headers + , g: "GlobalExtendedHeader" // k=v for the rest of the archive + , x: "ExtendedHeader" // k=v for the next file + // vendor-specific stuff + , A: "SolarisACL" // skip + , D: "GNUDumpDir" // like 5, but with data, which should be skipped + , I: "Inode" // metadata only, skip + , K: "NextFileHasLongLinkpath" // data = link path of next file + , L: "NextFileHasLongPath" // data = path of next file + , M: "ContinuationFile" // skip + , N: "OldGnuLongPath" // like L + , S: "SparseFile" // skip + , V: "TapeVolumeHeader" // skip + , X: "OldExtendedHeader" // like x + } + +Object.keys(types).forEach(function (t) { + types[types[t]] = types[types[t]] || t +}) + +// values for the mode field +var modes = + { suid: 04000 // set uid on extraction + , sgid: 02000 // set gid on extraction + , svtx: 01000 // set restricted deletion flag on dirs on extraction + , uread: 0400 + , uwrite: 0200 + , uexec: 0100 + , gread: 040 + , gwrite: 020 + , gexec: 010 + , oread: 4 + , owrite: 2 + , oexec: 1 + , all: 07777 + } + +var numeric = + { mode: true + , uid: true + , gid: true + , size: true + , mtime: true + , devmaj: true + , devmin: true + , cksum: true + , atime: true + , ctime: true + , dev: true + , ino: true + , nlink: true + } + +Object.keys(modes).forEach(function (t) { + modes[modes[t]] = modes[modes[t]] || t +}) + +var knownExtended = + { atime: true + , charset: true + , comment: true + , ctime: true + , gid: true + , gname: true + , linkpath: true + , mtime: true + , path: true + , realtime: true + , security: true + , size: true + , uid: true + , uname: true } + + +exports.fields = fields +exports.fieldSize = fieldSize +exports.fieldOffs = fieldOffs +exports.fieldEnds = fieldEnds +exports.types = types +exports.modes = modes +exports.numeric = numeric +exports.headerSize = headerSize +exports.blockSize = blockSize +exports.knownExtended = knownExtended + +exports.Pack = require("./lib/pack.js") +exports.Parse = require("./lib/parse.js") +exports.Extract = require("./lib/extract.js") diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/.travis.yml new file mode 100644 index 00000000..7f6f5a57 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/LICENSE new file mode 100644 index 00000000..c477f448 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/index.js new file mode 100644 index 00000000..d0f26b56 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/index.js @@ -0,0 +1,86 @@ +module.exports = function (rows_, opts) { + if (!opts) opts = {}; + var hsep = opts.hsep === undefined ? ' ' : opts.hsep; + var align = opts.align || []; + var stringLength = opts.stringLength + || function (s) { return String(s).length; } + ; + + var dotsizes = reduce(rows_, function (acc, row) { + forEach(row, function (c, ix) { + var n = dotindex(c); + if (!acc[ix] || n > acc[ix]) acc[ix] = n; + }); + return acc; + }, []); + + var rows = map(rows_, function (row) { + return map(row, function (c_, ix) { + var c = String(c_); + if (align[ix] === '.') { + var index = dotindex(c); + var size = dotsizes[ix] + (/\./.test(c) ? 1 : 2) + - (stringLength(c) - index) + ; + return c + Array(size).join(' '); + } + else return c; + }); + }); + + var sizes = reduce(rows, function (acc, row) { + forEach(row, function (c, ix) { + var n = stringLength(c); + if (!acc[ix] || n > acc[ix]) acc[ix] = n; + }); + return acc; + }, []); + + return map(rows, function (row) { + return map(row, function (c, ix) { + var n = (sizes[ix] - stringLength(c)) || 0; + var s = Array(Math.max(n + 1, 1)).join(' '); + if (align[ix] === 'r' || align[ix] === '.') { + return s + c; + } + if (align[ix] === 'c') { + return Array(Math.ceil(n / 2 + 1)).join(' ') + + c + Array(Math.floor(n / 2 + 1)).join(' ') + ; + } + + return c + s; + }).join(hsep).replace(/\s+$/, ''); + }).join('\n'); +}; + +function dotindex (c) { + var m = /\.[^.]*$/.exec(c); + return m ? m.index + 1 : c.length; +} + +function reduce (xs, f, init) { + if (xs.reduce) return xs.reduce(f, init); + var i = 0; + var acc = arguments.length >= 3 ? init : xs[i++]; + for (; i < xs.length; i++) { + f(acc, xs[i], i); + } + return acc; +} + +function forEach (xs, f) { + if (xs.forEach) return xs.forEach(f); + for (var i = 0; i < xs.length; i++) { + f.call(xs, xs[i], i); + } +} + +function map (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f.call(xs, xs[i], i)); + } + return res; +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/package.json new file mode 100644 index 00000000..9944fc9b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/package.json @@ -0,0 +1,52 @@ +{ + "name": "text-table", + "version": "0.2.0", + "description": "borderless text tables with alignment", + "main": "index.js", + "devDependencies": { + "tap": "~0.4.0", + "tape": "~1.0.2", + "cli-color": "~0.2.3" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "chrome/20..latest", + "firefox/10..latest", + "safari/latest", + "opera/11.0..latest", + "iphone/6", + "ipad/6" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/text-table.git" + }, + "homepage": "https://github.com/substack/text-table", + "keywords": [ + "text", + "table", + "align", + "ascii", + "rows", + "tabular" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "readme": "# text-table\n\ngenerate borderless text table strings suitable for printing to stdout\n\n[![build status](https://secure.travis-ci.org/substack/text-table.png)](http://travis-ci.org/substack/text-table)\n\n[![browser support](https://ci.testling.com/substack/text-table.png)](http://ci.testling.com/substack/text-table)\n\n# example\n\n## default align\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'master', '0123456789abcdef' ],\n [ 'staging', 'fedcba9876543210' ]\n]);\nconsole.log(t);\n```\n\n```\nmaster 0123456789abcdef\nstaging fedcba9876543210\n```\n\n## left-right align\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'beep', '1024' ],\n [ 'boop', '33450' ],\n [ 'foo', '1006' ],\n [ 'bar', '45' ]\n], { align: [ 'l', 'r' ] });\nconsole.log(t);\n```\n\n```\nbeep 1024\nboop 33450\nfoo 1006\nbar 45\n```\n\n## dotted align\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'beep', '1024' ],\n [ 'boop', '334.212' ],\n [ 'foo', '1006' ],\n [ 'bar', '45.6' ],\n [ 'baz', '123.' ]\n], { align: [ 'l', '.' ] });\nconsole.log(t);\n```\n\n```\nbeep 1024\nboop 334.212\nfoo 1006\nbar 45.6\nbaz 123.\n```\n\n## centered\n\n``` js\nvar table = require('text-table');\nvar t = table([\n [ 'beep', '1024', 'xyz' ],\n [ 'boop', '3388450', 'tuv' ],\n [ 'foo', '10106', 'qrstuv' ],\n [ 'bar', '45', 'lmno' ]\n], { align: [ 'l', 'c', 'l' ] });\nconsole.log(t);\n```\n\n```\nbeep 1024 xyz\nboop 3388450 tuv\nfoo 10106 qrstuv\nbar 45 lmno\n```\n\n# methods\n\n``` js\nvar table = require('text-table')\n```\n\n## var s = table(rows, opts={})\n\nReturn a formatted table string `s` from an array of `rows` and some options\n`opts`.\n\n`rows` should be an array of arrays containing strings, numbers, or other\nprintable values.\n\noptions can be:\n\n* `opts.hsep` - separator to use between columns, default `' '`\n* `opts.align` - array of alignment types for each column, default `['l','l',...]`\n* `opts.stringLength` - callback function to use when calculating the string length\n\nalignment types are:\n\n* `'l'` - left\n* `'r'` - right\n* `'c'` - center\n* `'.'` - decimal\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install text-table\n```\n\n# Use with ANSI-colors\n\nSince the string length of ANSI color schemes does not equal the length\nJavaScript sees internally it is necessary to pass the a custom string length\ncalculator during the main function call.\n\nSee the `test/ansi-colors.js` file for an example.\n\n# license\n\nMIT\n", + "readmeFilename": "readme.markdown", + "bugs": { + "url": "https://github.com/substack/text-table/issues" + }, + "_id": "text-table@0.2.0", + "_from": "text-table@~0.2.0" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/readme.markdown b/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/readme.markdown new file mode 100644 index 00000000..e4bcf60b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/text-table/readme.markdown @@ -0,0 +1,134 @@ +# text-table + +generate borderless text table strings suitable for printing to stdout + +[![build status](https://secure.travis-ci.org/substack/text-table.png)](http://travis-ci.org/substack/text-table) + +[![browser support](https://ci.testling.com/substack/text-table.png)](http://ci.testling.com/substack/text-table) + +# example + +## default align + +``` js +var table = require('text-table'); +var t = table([ + [ 'master', '0123456789abcdef' ], + [ 'staging', 'fedcba9876543210' ] +]); +console.log(t); +``` + +``` +master 0123456789abcdef +staging fedcba9876543210 +``` + +## left-right align + +``` js +var table = require('text-table'); +var t = table([ + [ 'beep', '1024' ], + [ 'boop', '33450' ], + [ 'foo', '1006' ], + [ 'bar', '45' ] +], { align: [ 'l', 'r' ] }); +console.log(t); +``` + +``` +beep 1024 +boop 33450 +foo 1006 +bar 45 +``` + +## dotted align + +``` js +var table = require('text-table'); +var t = table([ + [ 'beep', '1024' ], + [ 'boop', '334.212' ], + [ 'foo', '1006' ], + [ 'bar', '45.6' ], + [ 'baz', '123.' ] +], { align: [ 'l', '.' ] }); +console.log(t); +``` + +``` +beep 1024 +boop 334.212 +foo 1006 +bar 45.6 +baz 123. +``` + +## centered + +``` js +var table = require('text-table'); +var t = table([ + [ 'beep', '1024', 'xyz' ], + [ 'boop', '3388450', 'tuv' ], + [ 'foo', '10106', 'qrstuv' ], + [ 'bar', '45', 'lmno' ] +], { align: [ 'l', 'c', 'l' ] }); +console.log(t); +``` + +``` +beep 1024 xyz +boop 3388450 tuv +foo 10106 qrstuv +bar 45 lmno +``` + +# methods + +``` js +var table = require('text-table') +``` + +## var s = table(rows, opts={}) + +Return a formatted table string `s` from an array of `rows` and some options +`opts`. + +`rows` should be an array of arrays containing strings, numbers, or other +printable values. + +options can be: + +* `opts.hsep` - separator to use between columns, default `' '` +* `opts.align` - array of alignment types for each column, default `['l','l',...]` +* `opts.stringLength` - callback function to use when calculating the string length + +alignment types are: + +* `'l'` - left +* `'r'` - right +* `'c'` - center +* `'.'` - decimal + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install text-table +``` + +# Use with ANSI-colors + +Since the string length of ANSI color schemes does not equal the length +JavaScript sees internally it is necessary to pass the a custom string length +calculator during the main function call. + +See the `test/ansi-colors.js` file for an example. + +# license + +MIT diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/LICENSE new file mode 100644 index 00000000..235bdd54 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/README.md new file mode 100644 index 00000000..9761532d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/README.md @@ -0,0 +1,17 @@ +Use this module to convert a username/groupname to a uid/gid number. + +Usage: + +``` +npm install uid-number +``` + +Then, in your node program: + +```javascript +var uidNumber = require("uid-number") +uidNumber("isaacs", function (er, uid, gid) { + // gid is null because we didn't ask for a group name + // uid === 24561 because that's my number. +}) +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/get-uid-gid.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/get-uid-gid.js new file mode 100644 index 00000000..9f7f8aaf --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/get-uid-gid.js @@ -0,0 +1,24 @@ +if (module !== require.main) { + throw new Error("This file should not be loaded with require()") +} + +if (!process.getuid || !process.getgid) { + throw new Error("this file should not be called without uid/gid support") +} + +var argv = process.argv.slice(2) + , user = argv[0] || process.getuid() + , group = argv[1] || process.getgid() + +if (!isNaN(user)) user = +user +if (!isNaN(group)) group = +group + +console.error([user, group]) + +try { + process.setgid(group) + process.setuid(user) + console.log(JSON.stringify({uid:+process.getuid(), gid:+process.getgid()})) +} catch (ex) { + console.log(JSON.stringify({error:ex.message,errno:ex.errno})) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/package.json new file mode 100644 index 00000000..d1cac81a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/package.json @@ -0,0 +1,49 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "uid-number", + "description": "Convert a username/group name to a uid/gid number", + "version": "0.0.6", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/uid-number.git" + }, + "main": "uid-number.js", + "dependencies": {}, + "devDependencies": {}, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "license": "ISC", + "gitHead": "aab48f5d6bda85794946b26d945d2ee452e0e9ab", + "bugs": { + "url": "https://github.com/isaacs/uid-number/issues" + }, + "homepage": "https://github.com/isaacs/uid-number", + "_id": "uid-number@0.0.6", + "scripts": {}, + "_shasum": "0ea10e8035e8eb5b8e4449f06da1c730663baa81", + "_from": "uid-number@>=0.0.6 <0.1.0", + "_npmVersion": "2.1.3", + "_nodeVersion": "0.10.31", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "0ea10e8035e8eb5b8e4449f06da1c730663baa81", + "tarball": "http://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/uid-number.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/uid-number.js new file mode 100644 index 00000000..4fed6757 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/uid-number/uid-number.js @@ -0,0 +1,59 @@ +module.exports = uidNumber + +// This module calls into get-uid-gid.js, which sets the +// uid and gid to the supplied argument, in order to find out their +// numeric value. This can't be done in the main node process, +// because otherwise node would be running as that user from this +// point on. + +var child_process = require("child_process") + , path = require("path") + , uidSupport = process.getuid && process.setuid + , uidCache = {} + , gidCache = {} + +function uidNumber (uid, gid, cb) { + if (!uidSupport) return cb() + if (typeof cb !== "function") cb = gid, gid = null + if (typeof cb !== "function") cb = uid, uid = null + if (gid == null) gid = process.getgid() + if (uid == null) uid = process.getuid() + if (!isNaN(gid)) gid = gidCache[gid] = +gid + if (!isNaN(uid)) uid = uidCache[uid] = +uid + + if (uidCache.hasOwnProperty(uid)) uid = uidCache[uid] + if (gidCache.hasOwnProperty(gid)) gid = gidCache[gid] + + if (typeof gid === "number" && typeof uid === "number") { + return process.nextTick(cb.bind(null, null, uid, gid)) + } + + var getter = require.resolve("./get-uid-gid.js") + + child_process.execFile( process.execPath + , [getter, uid, gid] + , function (code, out, stderr) { + if (code) { + var er = new Error("could not get uid/gid\n" + stderr) + er.code = code + return cb(er) + } + + try { + out = JSON.parse(out+"") + } catch (ex) { + return cb(ex) + } + + if (out.error) { + var er = new Error(out.error) + er.errno = out.errno + return cb(er) + } + + if (isNaN(out.uid) || isNaN(out.gid)) return cb(new Error( + "Could not get uid/gid: "+JSON.stringify(out))) + + cb(null, uidCache[uid] = +out.uid, gidCache[gid] = +out.gid) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/.npmignore new file mode 100644 index 00000000..2d01862d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/.npmignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Commenting this out is preferred by some people, see +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- +node_modules + +# Users Environment Variables +.lock-wscript diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/ChangeLog b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/ChangeLog new file mode 100644 index 00000000..58c4d7b9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/ChangeLog @@ -0,0 +1,8 @@ +2015-01-15 Sam Mikes + + * index.js: (convert_fromString) accept decimal strings provided they + don't begin with '0' + +2015-01-14 Sam Mikes + + * index.js: initial rev diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/LICENSE new file mode 100644 index 00000000..7e1e3838 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Sam Mikes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/README.md new file mode 100644 index 00000000..358f3705 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/README.md @@ -0,0 +1,78 @@ +# umask + +Convert umask from string <-> number. + +## Installation & Use + +``` +$ npm install -S umask + +var umask = require('umask'); + +console.log(umask.toString(18)); // 0022 + +console.log(umask.fromString('0777')) // 511 +``` + +## API + +### `toString( val )` + +Converts `val` to a 0-padded octal string. `val` is assumed to be a +Number in the correct range (0..511) + +### `fromString( val, [cb] )` + +Converts `val` to a Number that can be used as a umask. `val` can +be of the following forms: + + * String containing octal number (leading 0) + * String containing decimal number + * Number + +In all cases above, the value obtained is then converted to an integer and +checked against the legal `umask` range 0..511 + +`fromString` can be used as a simple converter, with no error feedback, by +omitting the optional callback argument `cb`: + +``` + var mask = umask.fromString(val); + + // mask is now the umask descibed by val or + // the default, 0022 (18 dec) +``` + +The callback arguments are `(err, val)` where `err` is either `null` or an +Error object and `val` is either the converted umask or the default umask, `0022`. + +``` + umask.fromString(val, function (err, val) { + if (err) { + console.error("invalid umask: " + err.message) + } + + /* do something with val */ + }); +``` + +The callback, if provided, is always called **synchronously**. + +### `validate( data, k, val )` + +This is a validation function of the form expected by `nopt`. If +`val` is a valid umask, the function returns true and sets `data[k]`. +If `val` is not a valid umask, the function returns false. + +The `validate` function is stricter than `fromString`: it only accepts +Number or octal String values, and the String value must begin with `0`. +The `validate` function does **not** accept Strings containing decimal +numbers. + +# Maintainer + +Sam Mikes + +# License + +MIT \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/index.js new file mode 100644 index 00000000..eb1d2360 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/index.js @@ -0,0 +1,76 @@ +'use strict'; + +var util = require("util"); + +function toString(val) { + val = val.toString(8); + while (val.length < 4) { + val = "0" + val; + } + return val; +} + +var defaultUmask = 18; // 0022; +var defaultUmaskString = toString(defaultUmask); + +function validate(data, k, val) { + // must be either an integer or an octal string. + if (typeof val === "number" && !isNaN(val)) { + data[k] = val; + return true; + } + + if (typeof val === "string") { + if (val.charAt(0) !== "0") { + return false; + } + data[k] = parseInt(val, 8); + return true; + } + + return false; +} + +function convert_fromString(val, cb) { + if (typeof val === "string") { + // check for octal string first + if (val.charAt(0) === '0' && /^[0-7]+$/.test(val)) { + val = parseInt(val, 8); + } else if (val.charAt(0) !== '0' && /^[0-9]+$/.test(val)) { + // legacy support for decimal strings + val = parseInt(val, 10); + } else { + return cb(new Error(util.format("Expected octal string, got %j, defaulting to %j", + val, defaultUmaskString)), + defaultUmask); + } + } else if (typeof val !== "number") { + return cb(new Error(util.format("Expected number or octal string, got %j, defaulting to %j", + val, defaultUmaskString)), + defaultUmask); + } + + val = Math.floor(val); + + if ((val < 0) || (val > 511)) { + return cb(new Error(util.format("Must be in range 0..511 (0000..0777), got %j", val)), + defaultUmask); + } + + cb(null, val); +} + +function fromString(val, cb) { + + // synchronous callback, no zalgo + convert_fromString(val, cb || function (err, result) { + /*jslint unparam:true*/ + val = result; + }); + + return val; +} + +exports.toString = toString; +exports.fromString = fromString; +exports.validate = validate; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/package.json new file mode 100644 index 00000000..1ac61461 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/umask/package.json @@ -0,0 +1,53 @@ +{ + "name": "umask", + "version": "1.1.0", + "description": "convert umask from string <-> number", + "main": "index.js", + "scripts": { + "test": "lab -ct 100", + "lint": "jslint --terse --latest *.js test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/smikes/umask.git" + }, + "keywords": [ + "umask" + ], + "author": { + "name": "Sam Mikes", + "email": "smikes@cubane.com" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/smikes/umask/issues" + }, + "homepage": "https://github.com/smikes/umask", + "devDependencies": { + "code": "^1.2.1", + "jslint": "^0.7.2", + "lab": "^5.2.0" + }, + "gitHead": "63d821e4d0b06ef9a4b727c5fbe5976e9534d76e", + "_id": "umask@1.1.0", + "_shasum": "f29cebf01df517912bb58ff9c4e50fde8e33320d", + "_from": "umask@>=1.1.0 <1.2.0", + "_npmVersion": "2.2.0", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "smikes", + "email": "smikes@cubane.com" + }, + "maintainers": [ + { + "name": "smikes", + "email": "smikes@cubane.com" + } + ], + "dist": { + "shasum": "f29cebf01df517912bb58ff9c4e50fde8e33320d", + "tarball": "http://registry.npmjs.org/umask/-/umask-1.1.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/LICENSE new file mode 100644 index 00000000..d4bdf36f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/LICENSE @@ -0,0 +1,174 @@ +SPDX:Apache-2.0 + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the +copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control +with that entity. For the purposes of this definition, "control" means +(i) the power, direct or indirect, to cause the direction or management +of such entity, whether by contract or otherwise, or (ii) ownership of +fifty percent (50%) or more of the outstanding shares, or (iii) +beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but not +limited to compiled object code, generated documentation, and +conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object +form, made available under the License, as indicated by a copyright +notice that is included in or attached to the work (an example is +provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object +form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain +separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor +for inclusion in the Work by the copyright owner or by an individual or +Legal Entity authorized to submit on behalf of the copyright owner. For +the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or its +representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue +tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated in +writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on +behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright +license to reproduce, prepare Derivative Works of, publicly display, +publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in +this section) patent license to make, have made, use, offer to sell, +sell, import, and otherwise transfer the Work, where such license +applies only to those patent claims licensable by such Contributor that +are necessarily infringed by their Contribution(s) alone or by +combination of their Contribution(s) with the Work to which such +Contribution(s) was submitted. If You institute patent litigation +against any entity (including a cross-claim or counterclaim in a +lawsuit) alleging that the Work or a Contribution incorporated within +the Work constitutes direct or contributory patent infringement, then +any patent licenses granted to You under this License for that Work +shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work +or Derivative Works thereof in any medium, with or without +modifications, and in Source or Object form, provided that You meet the +following conditions: + +(a) You must give any other recipients of the Work or Derivative Works a +copy of this License; and + +(b) You must cause any modified files to carry prominent notices stating +that You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices +from the Source form of the Work, excluding those notices that do not +pertain to any part of the Derivative Works; and + +(d) If the Work includes a "NOTICE" text file as part of its +distribution, then any Derivative Works that You distribute must include +a readable copy of the attribution notices contained within such NOTICE +file, excluding those notices that do not pertain to any part of the +Derivative Works, in at least one of the following places: within a +NOTICE text file distributed as part of the Derivative Works; within the +Source form or documentation, if provided along with the Derivative +Works; or, within a display generated by the Derivative Works, if and +wherever such third-party notices normally appear. The contents of the +NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative +Works that You distribute, alongside or as an addendum to the NOTICE +text from the Work, provided that such additional attribution notices +cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may +provide additional or different license terms and conditions for use, +reproduction, or distribution of Your modifications, or for any such +Derivative Works as a whole, provided Your use, reproduction, and +distribution of the Work otherwise complies with the conditions stated +in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work by +You to the Licensor shall be under the terms and conditions of this +License, without any additional terms or conditions. Notwithstanding the +above, nothing herein shall supersede or modify the terms of any +separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed +to in writing, Licensor provides the Work (and each Contributor provides +its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS +OF ANY KIND, either express or implied, including, without limitation, +any warranties or conditions of TITLE, NON-INFRINGEMENT, +MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely +responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your +exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, unless +required by applicable law (such as deliberate and grossly negligent +acts) or agreed to in writing, shall any Contributor be liable to You +for damages, including any direct, indirect, special, incidental, or +consequential damages of any character arising as a result of this +License or out of the use or inability to use the Work (including but +not limited to damages for loss of goodwill, work stoppage, computer +failure or malfunction, or any and all other commercial damages or +losses), even if such Contributor has been advised of the possibility of +such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the +Work or Derivative Works thereof, You may choose to offer, and charge a +fee for, acceptance of support, warranty, indemnity, or other liability +obligations and/or rights consistent with this License. However, in +accepting such obligations, You may act only on Your own behalf and on +Your sole responsibility, not on behalf of any other Contributor, and +only if You agree to indemnify, defend, and hold each Contributor +harmless for any liability incurred by, or claims asserted against, such +Contributor by reason of your accepting any such warranty or additional +liability. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/README.md new file mode 100644 index 00000000..f94a7fea --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/README.md @@ -0,0 +1,113 @@ +validate-npm-package-license +============================ + +Give me a string and I'll tell you if it's a valid npm package license string. + +```javascript +var valid = require('validate-npm-package-license'); +``` + +SPDX license identifiers are valid license strings: + +```javascript + +var assert = require('assert'); +var validSPDXExpression = { + validForNewPackages: true, + validForOldPackages: true, + spdx: true +}; + +assert.deepEqual(valid('MIT'), validSPDXExpression); +assert.deepEqual(valid('BSD-2-Clause'), validSPDXExpression); +assert.deepEqual(valid('Apache-2.0'), validSPDXExpression); +assert.deepEqual(valid('ISC'), validSPDXExpression); +``` +The function will return a warning and suggestion for nearly-correct license identifiers: + +```javascript +assert.deepEqual( + valid('Apache 2.0'), + { + validForOldPackages: false, + validForNewPackages: false, + warnings: [ + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "', + 'license is similar to the valid expression "Apache-2.0"' + ] + } +); +``` + +SPDX expressions are valid, too ... + +```javascript +// Simple SPDX license expression for dual licensing +assert.deepEqual( + valid('(GPL-3.0 OR BSD-2-Clause)'), + validSPDXExpression +); +``` + +... except if they contain `LicenseRef`: + +```javascript +var warningAboutLicenseRef = { + validForOldPackages: false, + validForNewPackages: false, + spdx: true, + warnings: [ + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "', + ] +}; + +assert.deepEqual( + valid('LicenseRef-Made-Up'), + warningAboutLicenseRef +); + +assert.deepEqual( + valid('(MIT OR LicenseRef-Made-Up)'), + warningAboutLicenseRef +); +``` + +If you can't describe your licensing terms with standardized SPDX identifiers, put the terms in a file in the package and point users there: + +```javascript +assert.deepEqual( + valid('SEE LICENSE IN LICENSE.txt'), + { + validForNewPackages: true, + validForOldPackages: true, + inFile: 'LICENSE.txt' + } +); + +assert.deepEqual( + valid('SEE LICENSE IN license.md'), + { + validForNewPackages: true, + validForOldPackages: true, + inFile: 'license.md' + } +); +``` + +If there aren't any licensing terms, use `UNLICENSED`: + +```javascript +var unlicensed = { + validForNewPackages: true, + validForOldPackages: true, + unlicensed: true +}; +assert.deepEqual(valid('UNLICENSED'), unlicensed); +assert.deepEqual(valid('UNLICENCED'), unlicensed); +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/index.js new file mode 100644 index 00000000..0c824750 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/index.js @@ -0,0 +1,84 @@ +var parse = require('spdx-expression-parse'); +var correct = require('spdx-correct'); + +var genericWarning = ( + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "' +); + +var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; + +function startsWith(prefix, string) { + return string.slice(0, prefix.length) === prefix; +} + +function usesLicenseRef(ast) { + if (ast.hasOwnProperty('license')) { + var license = ast.license; + return ( + startsWith('LicenseRef', license) || + startsWith('DocumentRef', license) + ); + } else { + return ( + usesLicenseRef(ast.left) || + usesLicenseRef(ast.right) + ); + } +} + +module.exports = function(argument) { + var ast; + + try { + ast = parse(argument); + } catch (e) { + var match + if ( + argument === 'UNLICENSED' || + argument === 'UNLICENCED' + ) { + return { + validForOldPackages: true, + validForNewPackages: true, + unlicensed: true + }; + } else if (match = fileReferenceRE.exec(argument)) { + return { + validForOldPackages: true, + validForNewPackages: true, + inFile: match[1] + }; + } else { + var result = { + validForOldPackages: false, + validForNewPackages: false, + warnings: [genericWarning] + }; + var corrected = correct(argument); + if (corrected) { + result.warnings.push( + 'license is similar to the valid expression "' + corrected + '"' + ); + } + return result; + } + } + + if (usesLicenseRef(ast)) { + return { + validForNewPackages: false, + validForOldPackages: false, + spdx: true, + warnings: [genericWarning] + }; + } else { + return { + validForNewPackages: true, + validForOldPackages: true, + spdx: true + }; + } +}; diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/package.json new file mode 100644 index 00000000..94d44be9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-license/package.json @@ -0,0 +1,63 @@ +{ + "name": "validate-npm-package-license", + "description": "Give me a string and I'll tell you if it's a valid npm package license string", + "version": "3.0.1", + "author": { + "name": "Kyle E. Mitchell", + "email": "kyle@kemitchell.com", + "url": "https://kemitchell.com" + }, + "dependencies": { + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" + }, + "devDependencies": { + "defence-cli": "^1.0.1", + "replace-require-self": "^1.0.0" + }, + "keywords": [ + "license", + "npm", + "package", + "validation" + ], + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "git+https://github.com/kemitchell/validate-npm-package-license.js.git" + }, + "scripts": { + "test": "defence README.md | replace-require-self | node" + }, + "gitHead": "00200d28f9960985f221bc1a8a71e4760daf39bf", + "bugs": { + "url": "https://github.com/kemitchell/validate-npm-package-license.js/issues" + }, + "homepage": "https://github.com/kemitchell/validate-npm-package-license.js#readme", + "_id": "validate-npm-package-license@3.0.1", + "_shasum": "2804babe712ad3379459acfbe24746ab2c303fbc", + "_from": "validate-npm-package-license@>=3.0.1 <3.1.0", + "_npmVersion": "2.13.5", + "_nodeVersion": "0.12.7", + "_npmUser": { + "name": "kemitchell", + "email": "kyle@kemitchell.com" + }, + "dist": { + "shasum": "2804babe712ad3379459acfbe24746ab2c303fbc", + "tarball": "http://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz" + }, + "maintainers": [ + { + "name": "kemitchell", + "email": "kyle@kemitchell.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/.npmignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/LICENSE new file mode 100644 index 00000000..f10c0e9d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/LICENSE @@ -0,0 +1,6 @@ +Copyright (c) 2015, npm, Inc + + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/README.md new file mode 100644 index 00000000..c09f907e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/README.md @@ -0,0 +1,119 @@ +# validate-npm-package-name + +Give me a string and I'll tell you if it's a valid `npm` package name. + +This package exports a single synchronous function that takes a `string` as +input and returns an object with two properties: + +- `validForNewPackages` :: `Boolean` +- `validForOldPackages` :: `Boolean` + +## Contents + +- [Naming rules](#naming-rules) +- [Examples](#examples) + + [Valid Names](#valid-names) + + [Invalid Names](#invalid-names) +- [Legacy Names](#legacy-names) +- [Tests](#tests) +- [License](#license) + +## Naming Rules + +Below is a list of rules that valid `npm` package name should conform to. + +- package name length should be greater than zero +- all the characters in the package name must be lowercase i.e., no uppercase or mixed case names are allowed +- package name *can* consist of hyphens +- package name must *not* contain any non-url-safe characters (since name ends up being part of a URL) +- package name should not start with `.` or `_` +- package name should *not* contain any leading or trailing spaces +- package name *cannot* be the same as a node.js/io.js core module nor a reserved/blacklisted name. For example, the following names are invalid: + + http + + stream + + node_modules + + favicon.ico +- package name length cannot exceed 214 + + +## Examples + +### Valid Names + +```js +var validate = require("validate-npm-package-name") + +validate("some-package") +validate("example.com") +validate("under_score") +validate("123numeric") +validate("crazy!") +validate("@npm/thingy") +validate("@jane/foo.js") +``` + +All of the above names are valid, so you'll get this object back: + +```js +{ + validForNewPackages: true, + validForOldPackages: true +} +``` + +### Invalid Names + +```js +validate(" leading-space:and:weirdchars") +``` + +That was never a valid package name, so you get this: + +```js +{ + validForNewPackages: false, + validForOldPackages: false, + errors: [ + 'name cannot contain leading or trailing spaces', + 'name can only contain URL-friendly characters' + ] +} +``` + +## Legacy Names + +In the old days of npm, package names were wild. They could have capital +letters in them. They could be really long. They could be the name of an +existing module in node core. + +If you give this function a package name that **used to be valid**, you'll see +a change in the value of `validForNewPackages` property, and a warnings array +will be present: + +```js +validate("cRaZY-paCkAgE-with-mixed-case-and-more-than-214-characters-----------------------------------------------------------------------------------------------------------------------------------------------------------") +``` + +returns: + +```js +{ + validForNewPackages: false, + validForOldPackages: true, + warnings: [ + "name can no longer contain capital letters", + "name can no longer contain more than 214 characters" + ] +} +``` + +## Tests + +```sh +npm install +npm test +``` + +## License + +ISC diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/index.js new file mode 100644 index 00000000..1751aad5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/index.js @@ -0,0 +1,102 @@ +var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"); +var builtins = require("builtins") +var blacklist = [ + "node_modules", + "favicon.ico" +]; + +var validate = module.exports = function(name) { + + var warnings = [] + var errors = [] + + if (name === null) { + errors.push("name cannot be null") + return done(warnings, errors) + } + + if (name === undefined) { + errors.push("name cannot be undefined") + return done(warnings, errors) + } + + if (typeof name !== "string") { + errors.push("name must be a string") + return done(warnings, errors) + } + + if (!name.length) { + errors.push("name length must be greater than zero") + } + + if (name.match(/^\./)) { + errors.push("name cannot start with a period") + } + + if (name.match(/^_/)) { + errors.push("name cannot start with an underscore") + } + + if (name.trim() !== name) { + errors.push("name cannot contain leading or trailing spaces") + } + + // No funny business + blacklist.forEach(function(blacklistedName){ + if (name.toLowerCase() === blacklistedName) { + errors.push(blacklistedName + " is a blacklisted name") + } + }) + + // Generate warnings for stuff that used to be allowed + + // core module names like http, events, util, etc + builtins.forEach(function(builtin){ + if (name.toLowerCase() === builtin) { + warnings.push(builtin + " is a core module name") + } + }) + + // really-long-package-names-------------------------------such--length-----many---wow + // the thisisareallyreallylongpackagenameitshouldpublishdowenowhavealimittothelengthofpackagenames-poch. + if (name.length > 214) { + warnings.push("name can no longer contain more than 214 characters") + } + + // mIxeD CaSe nAMEs + if (name.toLowerCase() !== name) { + warnings.push("name can no longer contain capital letters") + } + + if (encodeURIComponent(name) !== name) { + + // Maybe it's a scoped package name, like @user/package + var nameMatch = name.match(scopedPackagePattern) + if (nameMatch) { + var user = nameMatch[1] + var pkg = nameMatch[2] + if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) { + return done(warnings, errors) + } + } + + errors.push("name can only contain URL-friendly characters") + } + + return done(warnings, errors) + +} + +validate.scopedPackagePattern = scopedPackagePattern + +var done = function (warnings, errors) { + var result = { + validForNewPackages: errors.length === 0 && warnings.length === 0, + validForOldPackages: errors.length === 0, + warnings: warnings, + errors: errors + } + if (!result.warnings.length) delete result.warnings + if (!result.errors.length) delete result.errors + return result +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/package.json new file mode 100644 index 00000000..6ecd37ff --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/validate-npm-package-name/package.json @@ -0,0 +1,42 @@ +{ + "name": "validate-npm-package-name", + "version": "2.2.2", + "description": "Give me a string and I'll tell you if it's a valid npm package name", + "main": "index.js", + "directories": { + "test": "test" + }, + "dependencies": { + "builtins": "0.0.7" + }, + "devDependencies": { + "tap": "^0.4.13" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/validate-npm-package-name.git" + }, + "keywords": [ + "npm", + "package", + "names", + "validation" + ], + "author": { + "name": "zeke" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/validate-npm-package-name/issues" + }, + "homepage": "https://github.com/npm/validate-npm-package-name", + "readme": "# validate-npm-package-name\n\nGive me a string and I'll tell you if it's a valid `npm` package name.\n\nThis package exports a single synchronous function that takes a `string` as\ninput and returns an object with two properties:\n\n- `validForNewPackages` :: `Boolean`\n- `validForOldPackages` :: `Boolean`\n\n## Contents\n\n- [Naming rules](#naming-rules)\n- [Examples](#examples)\n + [Valid Names](#valid-names)\n + [Invalid Names](#invalid-names)\n- [Legacy Names](#legacy-names)\n- [Tests](#tests)\n- [License](#license)\n\n## Naming Rules\n\nBelow is a list of rules that valid `npm` package name should conform to.\n\n- package name length should be greater than zero\n- all the characters in the package name must be lowercase i.e., no uppercase or mixed case names are allowed\n- package name *can* consist of hyphens\n- package name must *not* contain any non-url-safe characters (since name ends up being part of a URL)\n- package name should not start with `.` or `_`\n- package name should *not* contain any leading or trailing spaces\n- package name *cannot* be the same as a node.js/io.js core module nor a reserved/blacklisted name. For example, the following names are invalid:\n + http\n + stream\n + node_modules\n + favicon.ico\n- package name length cannot exceed 214\n\n\n## Examples\n\n### Valid Names\n\n```js\nvar validate = require(\"validate-npm-package-name\")\n\nvalidate(\"some-package\")\nvalidate(\"example.com\")\nvalidate(\"under_score\")\nvalidate(\"123numeric\")\nvalidate(\"crazy!\")\nvalidate(\"@npm/thingy\")\nvalidate(\"@jane/foo.js\")\n```\n\nAll of the above names are valid, so you'll get this object back:\n\n```js\n{\n validForNewPackages: true,\n validForOldPackages: true\n}\n```\n\n### Invalid Names\n\n```js\nvalidate(\" leading-space:and:weirdchars\")\n```\n\nThat was never a valid package name, so you get this:\n\n```js\n{\n validForNewPackages: false,\n validForOldPackages: false,\n errors: [\n 'name cannot contain leading or trailing spaces',\n 'name can only contain URL-friendly characters'\n ]\n}\n```\n\n## Legacy Names\n\nIn the old days of npm, package names were wild. They could have capital\nletters in them. They could be really long. They could be the name of an\nexisting module in node core.\n\nIf you give this function a package name that **used to be valid**, you'll see\na change in the value of `validForNewPackages` property, and a warnings array\nwill be present:\n\n```js\nvalidate(\"cRaZY-paCkAgE-with-mixed-case-and-more-than-214-characters-----------------------------------------------------------------------------------------------------------------------------------------------------------\")\n```\n\nreturns:\n\n```js\n{\n validForNewPackages: false,\n validForOldPackages: true,\n warnings: [\n \"name can no longer contain capital letters\",\n \"name can no longer contain more than 214 characters\"\n ]\n}\n```\n\n## Tests\n\n```sh\nnpm install\nnpm test\n```\n\n## License\n\nISC\n", + "readmeFilename": "README.md", + "gitHead": "3af92c881549f1b96f05ab6bfb5768bba94ad72d", + "_id": "validate-npm-package-name@2.2.2", + "_shasum": "f65695b22f7324442019a3c7fa39a6e7fd299085", + "_from": "validate-npm-package-name@2.2.2" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/which/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/.npmignore new file mode 100644 index 00000000..a042b402 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/.npmignore @@ -0,0 +1,3 @@ +.nyc_output/ +coverage/ +node_modules/ diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/which/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/.travis.yml new file mode 100644 index 00000000..f350b005 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/.travis.yml @@ -0,0 +1,6 @@ +sudo: false +language: node_js +node_js: + - '0.10' + - '0.12' + - '4' diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/which/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/which/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/README.md new file mode 100644 index 00000000..c2eb490e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/README.md @@ -0,0 +1,48 @@ +# which + +Like the unix `which` utility. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## CLI USAGE + +Same as the BSD `which(1)` binary. + +``` +usage: which [-as] program ... +``` + +## OPTIONS + +You may pass an options object as the second argument. + +- `path`: Use instead of the `PATH` environment variable. +- `pathExt`: Use instead of the `PATHEXT` environment variable. +- `all`: Return all matches, instead of just the first one. Note that + this means the function returns an array of strings instead of a + single string. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/which/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/package.json new file mode 100644 index 00000000..1e409255 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/package.json @@ -0,0 +1,58 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "which", + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "version": "1.2.4", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "main": "which.js", + "bin": { + "which": "./bin/which" + }, + "license": "ISC", + "dependencies": { + "is-absolute": "^0.1.7", + "isexe": "^1.1.1" + }, + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.3.3", + "tap": "^5.1.1" + }, + "scripts": { + "test": "tap test/*.js --cov" + }, + "gitHead": "1375684d40af9de2ecc527d1ab9b87b537d7a1cc", + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" + }, + "homepage": "https://github.com/isaacs/node-which#readme", + "_id": "which@1.2.4", + "_shasum": "1557f96080604e5b11b3599eb9f45b50a9efd722", + "_from": "which@1.2.4", + "_npmVersion": "2.14.15", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "1557f96080604e5b11b3599eb9f45b50a9efd722", + "tarball": "http://registry.npmjs.org/which/-/which-1.2.4.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/which/-/which-1.2.4.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/which/which.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/which.js new file mode 100644 index 00000000..919e6f05 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/which/which.js @@ -0,0 +1,121 @@ +module.exports = which +which.sync = whichSync + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = require('path') +var COLON = isWindows ? ';' : ':' +var isexe = require('isexe') +var fs = require('fs') +var isAbsolute = require('is-absolute') + +function getPathInfo(cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.Path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it's absolute, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (isAbsolute(cmd)) + pathEnv = [''] + + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} + +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + ;(function F (i, l) { + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(new Error('not found: '+cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.resolve(pathPart, cmd) + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + throw new Error('not found: '+cmd) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/README.md new file mode 100644 index 00000000..7051fb38 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/package.json new file mode 100644 index 00000000..60bc7d27 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/package.json @@ -0,0 +1,52 @@ +{ + "name": "wrappy", + "version": "1.0.1", + "description": "Callback wrapping utility", + "main": "wrappy.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^0.4.12" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/wrappy" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "homepage": "https://github.com/npm/wrappy", + "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", + "_id": "wrappy@1.0.1", + "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "_from": "wrappy@1.0.1", + "_npmVersion": "2.0.0", + "_nodeVersion": "0.10.31", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + }, + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/wrappy.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/wrappy.js new file mode 100644 index 00000000..f6e67e1b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/.npmignore b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/.npmignore new file mode 100644 index 00000000..240b8c18 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/.npmignore @@ -0,0 +1,4 @@ +*~ +DEADJOE +.#* +node_modules \ No newline at end of file diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/.travis.yml b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/.travis.yml new file mode 100644 index 00000000..34e35cca --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +sudo: false +before_install: + - "npm -g install npm" +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" + - "4" + - "5" diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/LICENSE b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/LICENSE new file mode 100644 index 00000000..2dcb803e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/LICENSE @@ -0,0 +1,5 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/README.md b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/README.md new file mode 100644 index 00000000..0b29e94b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/README.md @@ -0,0 +1,44 @@ +write-file-atomic +----------------- + +This is an extension for node's `fs.writeFile` that makes its operation +atomic and allows you set ownership (uid/gid of the file). + +### var writeFileAtomic = require('write-file-atomic')
    writeFileAtomic(filename, data, [options], callback) + +* filename **String** +* data **String** | **Buffer** +* options **Object** + * chown **Object** + * uid **Number** + * gid **Number** + * encoding **String** | **Null** default = 'utf8' + * mode **Number** default = 438 (aka 0666 in Octal) +callback **Function** + +Atomically and asynchronously writes data to a file, replacing the file if it already +exists. data can be a string or a buffer. + +The file is initially named `filename + "." + md5hex(__filename, process.pid, ++invocations)`. +If writeFile completes successfully then, if passed the **chown** option it will change +the ownership of the file. Finally it renames the file back to the filename you specified. If +it encounters errors at any of these steps it will attempt to unlink the temporary file and then +pass the error back to the caller. + +If provided, the **chown** option requires both **uid** and **gid** properties or else +you'll get an error. + +The **encoding** option is ignored if **data** is a buffer. It defaults to 'utf8'. + +Example: + +```javascript +writeFileAtomic('message.txt', 'Hello Node', {chown:{uid:100,gid:50}}, function (err) { + if (err) throw err; + console.log('It\'s saved!'); +}); +``` + +### var writeFileAtomicSync = require('write-file-atomic').sync
    writeFileAtomicSync(filename, data, [options]) + +The synchronous version of **writeFileAtomic**. diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/index.js b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/index.js new file mode 100644 index 00000000..80401af7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/index.js @@ -0,0 +1,44 @@ +'use strict' +var fs = require('graceful-fs') +var chain = require('slide').chain +var MurmurHash3 = require('imurmurhash') + +function murmurhex () { + var hash = new MurmurHash3() + for (var ii = 0; ii < arguments.length; ++ii) hash.hash('' + arguments[ii]) + return hash.result() +} +var invocations = 0 +var getTmpname = function (filename) { + return filename + '.' + murmurhex(__filename, process.pid, ++invocations) +} + +module.exports = function writeFile (filename, data, options, callback) { + if (options instanceof Function) { + callback = options + options = null + } + if (!options) options = {} + var tmpfile = getTmpname(filename) + chain([ + [fs, fs.writeFile, tmpfile, data, options], + options.chown && [fs, fs.chown, tmpfile, options.chown.uid, options.chown.gid], + [fs, fs.rename, tmpfile, filename] + ], function (err) { + err ? fs.unlink(tmpfile, function () { callback(err) }) + : callback() + }) +} + +module.exports.sync = function writeFileSync (filename, data, options) { + if (!options) options = {} + var tmpfile = getTmpname(filename) + try { + fs.writeFileSync(tmpfile, data, options) + if (options.chown) fs.chownSync(tmpfile, options.chown.uid, options.chown.gid) + fs.renameSync(tmpfile, filename) + } catch (err) { + try { fs.unlinkSync(tmpfile) } catch (e) {} + throw err + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/package.json b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/package.json new file mode 100644 index 00000000..f999bcac --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/node_modules/write-file-atomic/package.json @@ -0,0 +1,43 @@ +{ + "name": "write-file-atomic", + "version": "1.1.4", + "description": "Write files in an atomic fashion w/configurable ownership", + "main": "index.js", + "scripts": { + "test": "standard && tap --coverage test/*.js" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/iarna/write-file-atomic.git" + }, + "keywords": [ + "writeFile", + "atomic" + ], + "author": { + "name": "Rebecca Turner", + "email": "me@re-becca.org", + "url": "http://re-becca.org" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/iarna/write-file-atomic/issues" + }, + "homepage": "https://github.com/iarna/write-file-atomic", + "dependencies": { + "graceful-fs": "^4.1.2", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + }, + "devDependencies": { + "require-inject": "^1.1.0", + "standard": "^5.4.1", + "tap": "^2.3.1" + }, + "readme": "write-file-atomic\n-----------------\n\nThis is an extension for node's `fs.writeFile` that makes its operation\natomic and allows you set ownership (uid/gid of the file).\n\n### var writeFileAtomic = require('write-file-atomic')
    writeFileAtomic(filename, data, [options], callback)\n\n* filename **String**\n* data **String** | **Buffer**\n* options **Object**\n * chown **Object**\n * uid **Number**\n * gid **Number**\n * encoding **String** | **Null** default = 'utf8'\n * mode **Number** default = 438 (aka 0666 in Octal)\ncallback **Function**\n\nAtomically and asynchronously writes data to a file, replacing the file if it already\nexists. data can be a string or a buffer.\n\nThe file is initially named `filename + \".\" + md5hex(__filename, process.pid, ++invocations)`.\nIf writeFile completes successfully then, if passed the **chown** option it will change\nthe ownership of the file. Finally it renames the file back to the filename you specified. If\nit encounters errors at any of these steps it will attempt to unlink the temporary file and then\npass the error back to the caller.\n\nIf provided, the **chown** option requires both **uid** and **gid** properties or else\nyou'll get an error.\n\nThe **encoding** option is ignored if **data** is a buffer. It defaults to 'utf8'.\n\nExample:\n\n```javascript\nwriteFileAtomic('message.txt', 'Hello Node', {chown:{uid:100,gid:50}}, function (err) {\n if (err) throw err;\n console.log('It\\'s saved!');\n});\n```\n\n### var writeFileAtomicSync = require('write-file-atomic').sync
    writeFileAtomicSync(filename, data, [options])\n\nThe synchronous version of **writeFileAtomic**.\n", + "readmeFilename": "README.md", + "gitHead": "42dc04a17af96ac045f4979c8c951ee5a14a8b8b", + "_id": "write-file-atomic@1.1.4", + "_shasum": "b1f52dc2e8dc0e3cb04d187a25f758a38a90ca3b", + "_from": "write-file-atomic@>=1.1.4 <1.2.0" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/npmrc b/bin/nodejs0.10.47/node_modules/npm/npmrc new file mode 100644 index 00000000..8acdc972 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/npmrc @@ -0,0 +1 @@ +prefix = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.10.47\ diff --git a/bin/nodejs0.10.47/node_modules/npm/npmrc.nrd b/bin/nodejs0.10.47/node_modules/npm/npmrc.nrd new file mode 100644 index 00000000..8acdc972 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/npmrc.nrd @@ -0,0 +1 @@ +prefix = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.10.47\ diff --git a/bin/nodejs0.10.47/node_modules/npm/package.json b/bin/nodejs0.10.47/node_modules/npm/package.json new file mode 100644 index 00000000..9891dc90 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/package.json @@ -0,0 +1,196 @@ +{ + "version": "2.15.1", + "name": "npm", + "description": "a package manager for JavaScript", + "keywords": [ + "package manager", + "modules", + "install", + "package.json" + ], + "preferGlobal": true, + "config": { + "publishtest": false + }, + "homepage": "https://docs.npmjs.com/", + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "repository": { + "type": "git", + "url": "https://github.com/npm/npm" + }, + "bugs": { + "url": "http://github.com/npm/npm/issues" + }, + "directories": { + "doc": "./doc", + "man": "./man", + "lib": "./lib", + "bin": "./bin" + }, + "main": "./lib/npm.js", + "bin": "./bin/npm-cli.js", + "dependencies": { + "abbrev": "~1.0.7", + "ansi": "~0.3.1", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "archy": "~1.0.0", + "async-some": "~1.0.2", + "block-stream": "0.0.8", + "char-spinner": "~1.0.1", + "chmodr": "~1.0.2", + "chownr": "~1.0.1", + "cmd-shim": "~2.0.2", + "columnify": "~1.5.4", + "config-chain": "~1.1.10", + "dezalgo": "~1.0.3", + "editor": "~1.0.0", + "fs-vacuum": "~1.2.7", + "fs-write-stream-atomic": "~1.0.8", + "fstream": "~1.0.8", + "fstream-npm": "~1.0.7", + "github-url-from-git": "~1.4.0", + "github-url-from-username-repo": "~1.0.2", + "glob": "~7.0.3", + "graceful-fs": "~4.1.3", + "hosted-git-info": "~2.1.4", + "inflight": "~1.0.4", + "inherits": "~2.0.1", + "ini": "~1.3.4", + "init-package-json": "~1.9.3", + "lockfile": "~1.0.1", + "lru-cache": "~3.2.0", + "minimatch": "~3.0.0", + "mkdirp": "~0.5.1", + "node-gyp": "~3.3.1", + "nopt": "~3.0.6", + "normalize-git-url": "~3.0.1", + "normalize-package-data": "~2.3.5", + "npm-cache-filename": "~1.0.2", + "npm-install-checks": "~1.0.7", + "npm-package-arg": "~4.1.0", + "npm-registry-client": "~7.1.0", + "npm-user-validate": "~0.1.2", + "npmlog": "~2.0.2", + "once": "~1.3.3", + "opener": "~1.4.1", + "osenv": "~0.1.3", + "path-is-inside": "~1.0.0", + "read": "~1.0.7", + "read-installed": "~4.0.3", + "read-package-json": "~2.0.3", + "readable-stream": "~1.1.13", + "realize-package-specifier": "~3.0.1", + "request": "~2.69.0", + "retry": "~0.9.0", + "rimraf": "~2.5.2", + "semver": "~5.1.0", + "sha": "~2.0.1", + "slide": "~1.1.6", + "sorted-object": "~1.0.0", + "spdx-license-ids": "~1.2.0", + "strip-ansi": "~3.0.1", + "tar": "~2.2.1", + "text-table": "~0.2.0", + "uid-number": "0.0.6", + "umask": "~1.1.0", + "validate-npm-package-license": "~3.0.1", + "validate-npm-package-name": "~2.2.2", + "which": "~1.2.4", + "wrappy": "~1.0.1", + "write-file-atomic": "~1.1.4" + }, + "bundleDependencies": [ + "abbrev", + "ansi", + "ansi-regex", + "ansicolors", + "ansistyles", + "archy", + "async-some", + "block-stream", + "char-spinner", + "chmodr", + "chownr", + "cmd-shim", + "columnify", + "config-chain", + "dezalgo", + "editor", + "fs-vacuum", + "fs-write-stream-atomic", + "fstream", + "fstream-npm", + "github-url-from-git", + "github-url-from-username-repo", + "glob", + "graceful-fs", + "hosted-git-info", + "imurmurhash", + "inflight", + "inherits", + "ini", + "init-package-json", + "lockfile", + "lru-cache", + "minimatch", + "mkdirp", + "node-gyp", + "nopt", + "normalize-git-url", + "normalize-package-data", + "npm-cache-filename", + "npm-install-checks", + "npm-package-arg", + "npm-registry-client", + "npm-user-validate", + "npmlog", + "once", + "opener", + "osenv", + "path-is-inside", + "read", + "read-installed", + "read-package-json", + "readable-stream", + "realize-package-specifier", + "request", + "retry", + "rimraf", + "semver", + "sha", + "slide", + "sorted-object", + "spdx-license-ids", + "strip-ansi", + "tar", + "text-table", + "uid-number", + "umask", + "validate-npm-package-license", + "validate-npm-package-name", + "which", + "wrappy", + "write-file-atomic" + ], + "devDependencies": { + "deep-equal": "~1.0.1", + "marked": "~0.3.5", + "marked-man": "~0.1.5", + "npm-registry-couchapp": "~2.6.12", + "npm-registry-mock": "~1.0.0", + "require-inject": "~1.3.0", + "sprintf-js": "~1.0.2", + "tacks": "~1.0.9", + "tap": "~2.3.1" + }, + "scripts": { + "dumpconf": "env | grep npm | sort | uniq", + "prepublish": "node bin/npm-cli.js prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc", + "preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true", + "tap": "tap --timeout 240", + "test": "npm run test-tap", + "test-tap": "npm run tap -- \"test/tap/*.js\"" + }, + "license": "Artistic-2.0" +} diff --git a/bin/nodejs0.10.47/node_modules/npm/scripts/clean-old.sh b/bin/nodejs0.10.47/node_modules/npm/scripts/clean-old.sh new file mode 100644 index 00000000..6c20d78a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/scripts/clean-old.sh @@ -0,0 +1,165 @@ +#!/bin/bash + +# look for old 0.x cruft, and get rid of it. +# Should already be sitting in the npm folder. + +# This doesn't have to be quite as cross-platform as install.sh. +# There are some bash-isms, because maintaining *two* +# fully-portable posix/bourne sh scripts is too much for +# one project with a sane maintainer. + +# If readlink isn't available, then this is just too tricky. +# However, greadlink is fine, so Solaris can join the party, too. +readlink="readlink" +which $readlink >/dev/null 2>/dev/null +if [ $? -ne 0 ]; then + readlink="greadlink" + which $readlink >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + echo "Can't find the readlink or greadlink command. Aborting." + exit 1 + fi +fi + +if [ "x$npm_config_prefix" != "x" ]; then + PREFIXES=$npm_config_prefix +else + node="$NODE" + if [ "x$node" = "x" ]; then + node=`which node` + fi + if [ "x$node" = "x" ]; then + echo "Can't find node to determine prefix. Aborting." + exit 1 + fi + + + PREFIX=`dirname $node` + PREFIX=`dirname $PREFIX` + echo "cleanup prefix=$PREFIX" + PREFIXES=$PREFIX + + altprefix=`"$node" -e process.installPrefix` + if [ "x$altprefix" != "x" ] && [ "x$altprefix" != "x$PREFIX" ]; then + echo "altprefix=$altprefix" + PREFIXES="$PREFIX $altprefix" + fi +fi + +# now prefix is where npm would be rooted by default +# go hunting. + +packages= +for prefix in $PREFIXES; do + packages="$packages + "`ls "$prefix"/lib/node/.npm 2>/dev/null | grep -v .cache` +done + +packages=`echo $packages` + +filelist=() +fid=0 + +for prefix in $PREFIXES; do + # remove any links into the .npm dir, or links to + # version-named shims/symlinks. + for folder in share/man bin lib/node; do + find $prefix/$folder -type l | while read file; do + target=`$readlink $file | grep '/\.npm/'` + if [ "x$target" != "x" ]; then + # found one! + filelist[$fid]="$file" + let 'fid++' + # also remove any symlinks to this file. + base=`basename "$file"` + base=`echo "$base" | awk -F@ '{print $1}'` + if [ "x$base" != "x" ]; then + find "`dirname $file`" -type l -name "$base"'*' \ + | while read l; do + target=`$readlink "$l" | grep "$base"` + if [ "x$target" != "x" ]; then + filelist[$fid]="$1" + let 'fid++' + fi + done + fi + fi + done + + # Scour for shim files. These are relics of 0.2 npm installs. + # note: grep -r is not portable. + find $prefix/$folder -type f \ + | xargs grep -sl '// generated by npm' \ + | while read file; do + filelist[$fid]="$file" + let 'fid++' + done + done + + # now remove the package modules, and the .npm folder itself. + if [ "x$packages" != "x" ]; then + for pkg in $packages; do + filelist[$fid]="$prefix/lib/node/$pkg" + let 'fid++' + for i in $prefix/lib/node/$pkg\@*; do + filelist[$fid]="$i" + let 'fid++' + done + done + fi + + for folder in lib/node/.npm lib/npm share/npm; do + if [ -d $prefix/$folder ]; then + filelist[$fid]="$prefix/$folder" + let 'fid++' + fi + done +done + +# now actually clean, but only if there's anything TO clean +if [ "${#filelist[@]}" -gt 0 ]; then + echo "" + echo "This script will find and eliminate any shims, symbolic" + echo "links, and other cruft that was installed by npm 0.x." + echo "" + + if [ "x$packages" != "x" ]; then + echo "The following packages appear to have been installed with" + echo "an old version of npm, and will be removed forcibly:" + for pkg in $packages; do + echo " $pkg" + done + echo "Make a note of these. You may want to install them" + echo "with npm 1.0 when this process is completed." + echo "" + fi + + OK= + if [ "x$1" = "x-y" ]; then + OK="yes" + fi + + while [ "$OK" != "y" ] && [ "$OK" != "yes" ] && [ "$OK" != "no" ]; do + echo "Is this OK?" + echo " enter 'yes' or 'no'" + echo " or 'show' to see a list of files " + read OK + if [ "x$OK" = "xshow" ] || [ "x$OK" = "xs" ]; then + for i in "${filelist[@]}"; do + echo "$i" + done + fi + done + if [ "$OK" = "no" ]; then + echo "Aborting" + exit 1 + fi + for i in "${filelist[@]}"; do + rm -rf "$i" + done +fi + +echo "" +echo 'All clean!' + +exit 0 diff --git a/bin/nodejs0.10.47/node_modules/npm/scripts/doc-build.sh b/bin/nodejs0.10.47/node_modules/npm/scripts/doc-build.sh new file mode 100644 index 00000000..d83a7f0e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/scripts/doc-build.sh @@ -0,0 +1,119 @@ +#!/usr/bin/env bash + +if [[ $DEBUG != "" ]]; then + set -x +fi +set -o errexit +set -o pipefail + +if ! [ -x node_modules/.bin/marked-man ]; then + ps=0 + if [ -f .building_marked-man ]; then + pid=$(cat .building_marked-man) + ps=$(ps -p $pid | grep $pid | wc -l) || true + fi + + if [ -f .building_marked-man ] && [ $ps != 0 ]; then + while [ -f .building_marked-man ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install marked-man + echo $$ > .building_marked-man + sleep 1 + if [ $(cat .building_marked-man) == $$ ]; then + make node_modules/.bin/marked-man + rm .building_marked-man + else + while [ -f .building_marked-man ]; do + sleep 1 + done + fi + fi +fi + +if ! [ -x node_modules/.bin/marked ]; then + ps=0 + if [ -f .building_marked ]; then + pid=$(cat .building_marked) + ps=$(ps -p $pid | grep $pid | wc -l) || true + fi + + if [ -f .building_marked ] && [ $ps != 0 ]; then + while [ -f .building_marked ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install marked + echo $$ > .building_marked + sleep 1 + if [ $(cat .building_marked) == $$ ]; then + make node_modules/.bin/marked + rm .building_marked + else + while [ -f .building_marked ]; do + sleep 1 + done + fi + fi +fi + +src=$1 +dest=$2 +name=$(basename ${src%.*}) +date=$(date -u +'%Y-%m-%d %H:%M:%S') +version=$(node cli.js -v) + +mkdir -p $(dirname $dest) + +html_replace_tokens () { + local url=$1 + sed "s|@NAME@|$name|g" \ + | sed "s|@DATE@|$date|g" \ + | sed "s|@URL@|$url|g" \ + | sed "s|@VERSION@|$version|g" \ + | perl -p -e 's/]*)>([^\(]*\([0-9]\)) -- (.*?)<\/h1>/

    \2<\/h1>

    \3<\/p>/g' \ + | perl -p -e 's/npm-npm/npm/g' \ + | perl -p -e 's/([^"-])(npm-)?README(?!\.html)(\(1\))?/\1README<\/a>/g' \ + | perl -p -e 's/<a href="[^"]+README.html">README<\/a><\/title>/<title>README<\/title>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(1\))/\1<a href="..\/cli\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(3\))/\1<a href="..\/api\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(5\))/\1<a href="..\/files\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(7\))/\1<a href="..\/misc\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/\([1357]\)<\/a><\/h1>/<\/a><\/h1>/g' \ + | (if [ $(basename $(dirname $dest)) == "doc" ]; then + perl -p -e 's/ href="\.\.\// href="/g' + else + cat + fi) +} + +man_replace_tokens () { + sed "s|@VERSION@|$version|g" \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(1\)/npm help \2/g' \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(([57])\)/npm help \3 \2/g' \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(3\)/npm apihelp \2/g' \ + | perl -p -e 's/npm\(1\)/npm help npm/g' \ + | perl -p -e 's/npm\(3\)/npm apihelp npm/g' +} + +case $dest in + *.[1357]) + ./node_modules/.bin/marked-man --roff $src \ + | man_replace_tokens > $dest + exit $? + ;; + *.html) + url=${dest/html\//} + (cat html/dochead.html && \ + cat $src | ./node_modules/.bin/marked && + cat html/docfoot.html)\ + | html_replace_tokens $url \ + > $dest + exit $? + ;; + *) + echo "Invalid destination type: $dest" >&2 + exit 1 + ;; +esac diff --git a/bin/nodejs0.10.47/node_modules/npm/scripts/index-build.js b/bin/nodejs0.10.47/node_modules/npm/scripts/index-build.js new file mode 100644 index 00000000..f34ccdc0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/scripts/index-build.js @@ -0,0 +1,63 @@ +#!/usr/bin/env node +var fs = require("fs") + , path = require("path") + , root = path.resolve(__dirname, "..") + , glob = require("glob") + , conversion = { "cli": 1, "api": 3, "files": 5, "misc": 7 } + +glob(root + "/{README.md,doc/*/*.md}", function (er, files) { + if (er) + throw er + output(files.map(function (f) { + var b = path.basename(f) + if (b === "README.md") + return [0, b] + if (b === "index.md") + return null + var s = conversion[path.basename(path.dirname(f))] + return [s, f] + }).filter(function (f) { + return f + }).sort(function (a, b) { + return (a[0] === b[0]) + ? ( path.basename(a[1]) === "npm.md" ? -1 + : path.basename(b[1]) === "npm.md" ? 1 + : a[1] > b[1] ? 1 : -1 ) + : a[0] - b[0] + })) +}) + +return + +function output (files) { + console.log( + "npm-index(7) -- Index of all npm documentation\n" + + "==============================================\n") + + writeLines(files, 0) + writeLines(files, 1, "Command Line Documentation", "Using npm on the command line") + writeLines(files, 3, "API Documentation", "Using npm in your Node programs") + writeLines(files, 5, "Files", "File system structures npm uses") + writeLines(files, 7, "Misc", "Various other bits and bobs") +} + +function writeLines (files, sxn, heading, desc) { + if (heading) { + console.log("## %s\n\n%s\n", heading, desc) + } + files.filter(function (f) { + return f[0] === sxn + }).forEach(writeLine) +} + + +function writeLine (sd) { + var sxn = sd[0] || 1 + , doc = sd[1] + , d = path.basename(doc, ".md") + + var content = fs.readFileSync(doc, "utf8").split("\n")[0].split("-- ")[1] + + console.log("### %s(%d)\n", d, sxn) + console.log(content + "\n") +} diff --git a/bin/nodejs0.10.47/node_modules/npm/scripts/install.sh b/bin/nodejs0.10.47/node_modules/npm/scripts/install.sh new file mode 100644 index 00000000..108e6158 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/scripts/install.sh @@ -0,0 +1,270 @@ +#!/bin/sh + +# A word about this shell script: +# +# It must work everywhere, including on systems that lack +# a /bin/bash, map 'sh' to ksh, ksh97, bash, ash, or zsh, +# and potentially have either a posix shell or bourne +# shell living at /bin/sh. +# +# See this helpful document on writing portable shell scripts: +# http://www.gnu.org/s/hello/manual/autoconf/Portable-Shell.html +# +# The only shell it won't ever work on is cmd.exe. + +if [ "x$0" = "xsh" ]; then + # run as curl | sh + # on some systems, you can just do cat>npm-install.sh + # which is a bit cuter. But on others, &1 is already closed, + # so catting to another script file won't do anything. + # Follow Location: headers, and fail on errors + curl -f -L -s https://www.npmjs.org/install.sh > npm-install-$$.sh + ret=$? + if [ $ret -eq 0 ]; then + (exit 0) + else + rm npm-install-$$.sh + echo "Failed to download script" >&2 + exit $ret + fi + sh npm-install-$$.sh + ret=$? + rm npm-install-$$.sh + exit $ret +fi + +# See what "npm_config_*" things there are in the env, +# and make them permanent. +# If this fails, it's not such a big deal. +configures="`env | grep 'npm_config_' | sed -e 's|^npm_config_||g'`" + +npm_config_loglevel="error" +if [ "x$npm_debug" = "x" ]; then + (exit 0) +else + echo "Running in debug mode." + echo "Note that this requires bash or zsh." + set -o xtrace + set -o pipefail + npm_config_loglevel="verbose" +fi +export npm_config_loglevel + +# make sure that node exists +node=`which node 2>&1` +ret=$? +if [ $ret -eq 0 ] && [ -x "$node" ]; then + (exit 0) +else + echo "npm cannot be installed without node.js." >&2 + echo "Install node first, and then try again." >&2 + echo "" >&2 + echo "Maybe node is installed, but not in the PATH?" >&2 + echo "Note that running as sudo can change envs." >&2 + echo "" + echo "PATH=$PATH" >&2 + exit $ret +fi + +# set the temp dir +TMP="${TMPDIR}" +if [ "x$TMP" = "x" ]; then + TMP="/tmp" +fi +TMP="${TMP}/npm.$$" +rm -rf "$TMP" || true +mkdir "$TMP" +if [ $? -ne 0 ]; then + echo "failed to mkdir $TMP" >&2 + exit 1 +fi + +BACK="$PWD" + +ret=0 +tar="${TAR}" +if [ -z "$tar" ]; then + tar="${npm_config_tar}" +fi +if [ -z "$tar" ]; then + tar=`which tar 2>&1` + ret=$? +fi + +if [ $ret -eq 0 ] && [ -x "$tar" ]; then + echo "tar=$tar" + echo "version:" + $tar --version + ret=$? +fi + +if [ $ret -eq 0 ]; then + (exit 0) +else + echo "No suitable tar program found." + exit 1 +fi + + + +# Try to find a suitable make +# If the MAKE environment var is set, use that. +# otherwise, try to find gmake, and then make. +# If no make is found, then just execute the necessary commands. + +# XXX For some reason, make is building all the docs every time. This +# is an annoying source of bugs. Figure out why this happens. +MAKE=NOMAKE + +if [ "x$MAKE" = "x" ]; then + make=`which gmake 2>&1` + if [ $? -eq 0 ] && [ -x "$make" ]; then + (exit 0) + else + make=`which make 2>&1` + if [ $? -eq 0 ] && [ -x "$make" ]; then + (exit 0) + else + make=NOMAKE + fi + fi +else + make="$MAKE" +fi + +if [ -x "$make" ]; then + (exit 0) +else + # echo "Installing without make. This may fail." >&2 + make=NOMAKE +fi + +# If there's no bash, then don't even try to clean +if [ -x "/bin/bash" ]; then + (exit 0) +else + clean="no" +fi + +node_version=`"$node" --version 2>&1` +ret=$? +if [ $ret -ne 0 ]; then + echo "You need node to run this program." >&2 + echo "node --version reports: $node_version" >&2 + echo "with exit code = $ret" >&2 + echo "Please install node before continuing." >&2 + exit $ret +fi + +t="${npm_install}" +if [ -z "$t" ]; then + # switch based on node version. + # note that we can only use strict sh-compatible patterns here. + case $node_version in + 0.[01234567].* | v0.[01234567].*) + echo "You are using an outdated and unsupported version of" >&2 + echo "node ($node_version). Please update node and try again." >&2 + exit 99 + ;; + *) + echo "install npm@latest" + t="latest" + ;; + esac +fi + +# need to echo "" after, because Posix sed doesn't treat EOF +# as an implied end of line. +url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \ + | sed -e 's/^.*tarball":"//' \ + | sed -e 's/".*$//'` + +ret=$? +if [ "x$url" = "x" ]; then + ret=125 + # try without the -e arg to sed. + url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \ + | sed 's/^.*tarball":"//' \ + | sed 's/".*$//'` + ret=$? + if [ "x$url" = "x" ]; then + ret=125 + fi +fi +if [ $ret -ne 0 ]; then + echo "Failed to get tarball url for npm/$t" >&2 + exit $ret +fi + + +echo "fetching: $url" >&2 + +cd "$TMP" \ + && curl -SsL "$url" \ + | $tar -xzf - \ + && cd "$TMP"/* \ + && (ver=`"$node" bin/read-package-json.js package.json version` + isnpm10=0 + if [ $ret -eq 0 ]; then + if [ -d node_modules ]; then + if "$node" node_modules/semver/bin/semver -v "$ver" -r "1" + then + isnpm10=1 + fi + else + if "$node" bin/semver -v "$ver" -r ">=1.0"; then + isnpm10=1 + fi + fi + fi + + ret=0 + if [ $isnpm10 -eq 1 ] && [ -f "scripts/clean-old.sh" ]; then + if [ "x$skipclean" = "x" ]; then + (exit 0) + else + clean=no + fi + if [ "x$clean" = "xno" ] \ + || [ "x$clean" = "xn" ]; then + echo "Skipping 0.x cruft clean" >&2 + ret=0 + elif [ "x$clean" = "xy" ] || [ "x$clean" = "xyes" ]; then + NODE="$node" /bin/bash "scripts/clean-old.sh" "-y" + ret=$? + else + NODE="$node" /bin/bash "scripts/clean-old.sh" </dev/tty + ret=$? + fi + fi + + if [ $ret -ne 0 ]; then + echo "Aborted 0.x cleanup. Exiting." >&2 + exit $ret + fi) \ + && (if [ "x$configures" = "x" ]; then + (exit 0) + else + echo "./configure $configures" + echo "$configures" > npmrc + fi) \ + && (if [ "$make" = "NOMAKE" ]; then + (exit 0) + elif "$make" uninstall install; then + (exit 0) + else + make="NOMAKE" + fi + if [ "$make" = "NOMAKE" ]; then + "$node" cli.js rm npm -gf + "$node" cli.js install -gf + fi) \ + && cd "$BACK" \ + && rm -rf "$TMP" \ + && echo "It worked" + +ret=$? +if [ $ret -ne 0 ]; then + echo "It failed" >&2 +fi +exit $ret diff --git a/bin/nodejs0.10.47/node_modules/npm/scripts/publish-tag.js b/bin/nodejs0.10.47/node_modules/npm/scripts/publish-tag.js new file mode 100644 index 00000000..22421922 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/scripts/publish-tag.js @@ -0,0 +1,3 @@ +var semver = require("semver") +var version = semver.parse(require("../package.json").version) +console.log('v%s.%s-next', version.major, version.minor) diff --git a/bin/nodejs0.10.47/node_modules/npm/scripts/release.sh b/bin/nodejs0.10.47/node_modules/npm/scripts/release.sh new file mode 100644 index 00000000..60a686fe --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/scripts/release.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# script for creating a zip and tarball for inclusion in node + +unset CDPATH + +set -e + +rm -rf release *.tgz || true +mkdir release +node ./cli.js pack --loglevel error >/dev/null +mv *.tgz release +cd release +tar xzf *.tgz + +mkdir node_modules +mv package node_modules/npm + +# make the zip for windows users +cp node_modules/npm/bin/*.cmd . +zipname=npm-$(node ../cli.js -v).zip +zip -q -9 -r -X "$zipname" *.cmd node_modules + +# make the tar for node's deps +cd node_modules +tarname=npm-$(node ../../cli.js -v).tgz +tar czf "$tarname" npm + +cd .. +mv "node_modules/$tarname" . + +rm -rf *.cmd +rm -rf node_modules + +echo "release/$tarname" +echo "release/$zipname" diff --git a/bin/nodejs0.10.47/node_modules/npm/scripts/relocate.sh b/bin/nodejs0.10.47/node_modules/npm/scripts/relocate.sh new file mode 100644 index 00000000..aa30f3df --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/scripts/relocate.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Change the cli shebang to point at the specified node +# Useful for when the program is moved around after install. +# Also used by the default 'make install' in node to point +# npm at the newly installed node, rather than the first one +# in the PATH, which would be the default otherwise. + +# bash /path/to/npm/scripts/relocate.sh $nodepath +# If $nodepath is blank, then it'll use /usr/bin/env + +dir="$(dirname "$(dirname "$0")")" +cli="$dir"/bin/npm-cli.js +tmp="$cli".tmp + +node="$1" +if [ "x$node" = "x" ]; then + node="/usr/bin/env node" +fi +node="#!$node" + +sed -e 1d "$cli" > "$tmp" +echo "$node" > "$cli" +cat "$tmp" >> "$cli" +rm "$tmp" +chmod ogu+x $cli diff --git a/bin/nodejs0.10.47/node_modules/npm/scripts/update-authors.sh b/bin/nodejs0.10.47/node_modules/npm/scripts/update-authors.sh new file mode 100644 index 00000000..c9b613c7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/scripts/update-authors.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +git log --reverse --format='%aN <%aE>' | perl -wnE ' +BEGIN { + say "# Authors sorted by whether or not they\x27re me"; +} + +print $seen{$_} = $_ unless $seen{$_} +' > AUTHORS diff --git a/bin/nodejs0.10.47/node_modules/npm/test/common-tap.js b/bin/nodejs0.10.47/node_modules/npm/test/common-tap.js new file mode 100644 index 00000000..3e44e3d3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/common-tap.js @@ -0,0 +1,87 @@ +// cheesy hackaround for test deps (read: nock) that rely on setImmediate +if (!global.setImmediate || !require('timers').setImmediate) { + require('timers').setImmediate = global.setImmediate = function () { + var args = [arguments[0], 0].concat([].slice.call(arguments, 1)) + setTimeout.apply(this, args) + } +} + +var spawn = require('child_process').spawn +var path = require('path') + +var port = exports.port = 1337 +exports.registry = 'http://localhost:' + port +process.env.npm_config_loglevel = 'error' + +var npm_config_cache = path.resolve(__dirname, 'npm_cache') +process.env.npm_config_cache = exports.npm_config_cache = npm_config_cache +process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') +process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') +process.env.random_env_var = 'foo' +// suppress warnings about using a prerelease version of node +process.env.npm_config_node_version = process.version.replace(/-.*$/, '') + +var bin = exports.bin = require.resolve('../bin/npm-cli.js') +var chain = require('slide').chain +var once = require('once') + +exports.npm = function (cmd, opts, cb) { + cb = once(cb) + cmd = [bin].concat(cmd) + opts = opts || {} + + opts.env = opts.env || process.env + if (!opts.env.npm_config_cache) { + opts.env.npm_config_cache = npm_config_cache + } + + var stdout = '' + var stderr = '' + var node = process.execPath + var child = spawn(node, cmd, opts) + + if (child.stderr) { + child.stderr.on('data', function (chunk) { + stderr += chunk + }) + } + + if (child.stdout) { + child.stdout.on('data', function (chunk) { + stdout += chunk + }) + } + + child.on('error', cb) + + child.on('close', function (code) { + cb(null, code, stdout, stderr) + }) + return child +} + +exports.makeGitRepo = function (params, cb) { + // git must be called after npm.load because it uses config + var git = require('../lib/utils/git.js') + + var root = params.path || process.cwd() + var user = params.user || 'PhantomFaker' + var email = params.email || 'nope@not.real' + var added = params.added || ['package.json'] + var message = params.message || 'stub repo' + + var opts = { cwd: root, env: { PATH: process.env.PATH }} + var commands = [ + git.chainableExec(['init'], opts), + git.chainableExec(['config', 'user.name', user], opts), + git.chainableExec(['config', 'user.email', email], opts), + git.chainableExec(['add'].concat(added), opts), + git.chainableExec(['commit', '-m', message], opts) + ] + + if (Array.isArray(params.commands)) { + commands = commands.concat(params.commands) + } + + chain(commands, cb) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/common.js b/bin/nodejs0.10.47/node_modules/npm/test/common.js new file mode 100644 index 00000000..4ba53e17 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/common.js @@ -0,0 +1,7 @@ + +// whatever, it's just tests. +;["util","assert"].forEach(function (thing) { + thing = require("thing") + for (var i in thing) global[i] = thing[i] +} + diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/forked-underscore-1.5.1.tgz b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/forked-underscore-1.5.1.tgz new file mode 100644 index 00000000..5aca6247 Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/forked-underscore-1.5.1.tgz differ diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-bar.git.tar.gz b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-bar.git.tar.gz new file mode 100644 index 00000000..fb27e17f Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-bar.git.tar.gz differ diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz new file mode 100644 index 00000000..0ea851fb Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz differ diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-foo.git.tar.gz b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-foo.git.tar.gz new file mode 100644 index 00000000..8e1abc6d Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-dummy-npm-foo.git.tar.gz differ diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-npm-git-test.git.tar.gz b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-npm-git-test.git.tar.gz new file mode 100644 index 00000000..7a4b9e81 Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/github-com-BryanDonovan-npm-git-test.git.tar.gz differ diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore-and-npmignore-2.tar b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore-and-npmignore-2.tar new file mode 100644 index 00000000..289dd568 Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore-and-npmignore-2.tar differ diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore-and-npmignore.tar b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore-and-npmignore.tar new file mode 100644 index 00000000..8b638b11 Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore-and-npmignore.tar differ diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore-and-npmignore.tgz b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore-and-npmignore.tgz new file mode 100644 index 00000000..4be43641 Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore-and-npmignore.tgz differ diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore.tgz b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore.tgz new file mode 100644 index 00000000..7f5f2d71 Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/gitignore.tgz differ diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/npmignore.tgz b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/npmignore.tgz new file mode 100644 index 00000000..765593de Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/npmignore.tgz differ diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/onload.js b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/onload.js new file mode 100644 index 00000000..f726990e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/onload.js @@ -0,0 +1 @@ +console.error('called onload') diff --git a/bin/nodejs0.10.47/node_modules/npm/test/fixtures/scoped-underscore-1.3.1.tgz b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/scoped-underscore-1.3.1.tgz new file mode 100644 index 00000000..d98a3459 Binary files /dev/null and b/bin/nodejs0.10.47/node_modules/npm/test/fixtures/scoped-underscore-1.3.1.tgz differ diff --git a/bin/nodejs0.10.47/node_modules/npm/test/run.js b/bin/nodejs0.10.47/node_modules/npm/test/run.js new file mode 100644 index 00000000..cc51ffc6 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/run.js @@ -0,0 +1,193 @@ +// Everything in this file uses child processes, because we're +// testing a command line utility. + +var chain = require("slide").chain +var child_process = require("child_process") +var path = require("path") + , testdir = __dirname + , fs = require("graceful-fs") + , npmpkg = path.dirname(testdir) + , npmcli = path.resolve(npmpkg, "bin", "npm-cli.js") + +var temp = process.env.TMPDIR + || process.env.TMP + || process.env.TEMP + || ( process.platform === "win32" + ? "c:\\windows\\temp" + : "/tmp" ) + +temp = path.resolve(temp, "npm-test-" + process.pid) + +var root = path.resolve(temp, "root") + , cache = path.resolve(temp, "npm_cache") + +var failures = 0 + , mkdir = require("mkdirp") + , rimraf = require("rimraf") + +var pathEnvSplit = process.platform === "win32" ? ";" : ":" + , pathEnv = process.env.PATH.split(pathEnvSplit) + , npmPath = process.platform === "win32" ? root : path.join(root, "bin") + +pathEnv.unshift(npmPath, path.join(root, "node_modules", ".bin")) + +// lastly, make sure that we get the same node that is being used to do +// run this script. That's very important, especially when running this +// test file from in the node source folder. +pathEnv.unshift(path.dirname(process.execPath)) + +// the env for all the test installs etc. +var env = {} +Object.keys(process.env).forEach(function (i) { + env[i] = process.env[i] +}) +env.npm_config_prefix = root +env.npm_config_color = "always" +env.npm_config_global = "true" +// have to set this to false, or it'll try to test itself forever +env.npm_config_npat = "false" +env.PATH = pathEnv.join(pathEnvSplit) +env.NODE_PATH = path.join(root, "node_modules") +env.npm_config_cache = cache + + + +function cleanup (cb) { + if (failures !== 0) return + rimraf(root, function (er) { + if (er) cb(er) + mkdir(root, 0755, cb) + }) +} + +function prefix (content, pref) { + return pref + (content.trim().split(/\r?\n/).join("\n" + pref)) +} + +var execCount = 0 +function exec (cmd, cwd, shouldFail, cb) { + if (typeof shouldFail === "function") { + cb = shouldFail, shouldFail = false + } + console.error("\n+"+cmd + (shouldFail ? " (expect failure)" : "")) + + // special: replace 'node' with the current execPath, + // and 'npm' with the thing we installed. + var cmdShow = cmd + var npmReplace = path.resolve(npmPath, "npm") + var nodeReplace = process.execPath + if (process.platform === "win32") { + npmReplace = '"' + npmReplace + '"' + nodeReplace = '"' + nodeReplace + '"' + } + cmd = cmd.replace(/^npm /, npmReplace + " ") + cmd = cmd.replace(/^node /, nodeReplace + " ") + + console.error("$$$$$$ cd %s; PATH=%s %s", cwd, env.PATH, cmd) + + child_process.exec(cmd, {cwd: cwd, env: env}, function (er, stdout, stderr) { + console.error("$$$$$$ after command", cmd, cwd) + if (stdout) { + console.error(prefix(stdout, " 1> ")) + } + if (stderr) { + console.error(prefix(stderr, " 2> ")) + } + + execCount ++ + if (!shouldFail && !er || shouldFail && er) { + // stdout = (""+stdout).trim() + console.log("ok " + execCount + " " + cmdShow) + return cb() + } else { + console.log("not ok " + execCount + " " + cmdShow) + cb(new Error("failed "+cmdShow)) + } + }) +} + +function execChain (cmds, cb) { + chain(cmds.map(function (args) { + return [exec].concat(args) + }), cb) +} + +function flatten (arr) { + return arr.reduce(function (l, r) { + return l.concat(r) + }, []) +} + +function setup (cb) { + cleanup(function (er) { + if (er) return cb(er) + exec("node \""+npmcli+"\" install \""+npmpkg+"\"", root, false, cb) + }) +} + +function main (cb) { + console.log("# testing in %s", temp) + console.log("# global prefix = %s", root) + + + + failures = 0 + + process.chdir(testdir) + var base = path.resolve(root, path.join("lib", "node_modules")) + + // get the list of packages + var packages = fs.readdirSync(path.resolve(testdir, "packages")) + packages = packages.filter(function (p) { + return p && !p.match(/^\./) + }) + + installAllThenTestAll() + + function installAllThenTestAll () { + var packagesToRm = packages.slice(0) + if (process.platform !== "win32") { + // Windows can't handle npm rm npm due to file-in-use issues. + packagesToRm.push("npm") + } + + chain( + [ setup + , [ exec, "npm install "+npmpkg, testdir ] + , [ execChain, packages.map(function (p) { + return [ "npm install packages/"+p, testdir ] + }) ] + , [ execChain, packages.map(function (p) { + return [ "npm test -ddd", path.resolve(base, p) ] + }) ] + , [ execChain, packagesToRm.map(function (p) { + return [ "npm rm "+p, root ] + }) ] + , installAndTestEach + ] + , cb + ) + } + + function installAndTestEach (cb) { + var thingsToChain = [ + setup + , [ execChain, flatten(packages.map(function (p) { + return [ [ "npm install packages/"+p, testdir ] + , [ "npm test", path.resolve(base, p) ] + , [ "npm rm "+p, root ] ] + })) ] + ] + if (process.platform !== "win32") { + // Windows can't handle npm rm npm due to file-in-use issues. + thingsToChain.push([exec, "npm rm npm", testdir]) + } + + chain(thingsToChain, cb) + } +} + +main(function (er) { + console.log("1.." + execCount) + if (er) throw er +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/00-check-mock-dep.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/00-check-mock-dep.js new file mode 100644 index 00000000..2ed2c79a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/00-check-mock-dep.js @@ -0,0 +1,17 @@ +console.log("TAP Version 13") + +process.on("uncaughtException", function (er) { + if (er) { throw er } + console.log("not ok - Failed checking mock registry dep. Expect much fail!") + console.log("1..1") + process.exit(1) +}) + +var assert = require("assert") +var semver = require("semver") +var mock = require("npm-registry-mock/package.json").version +var req = require("../../package.json").devDependencies["npm-registry-mock"] + +assert(semver.satisfies(mock, req)) +console.log("ok") +console.log("1..1") diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/00-config-setup.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/00-config-setup.js new file mode 100644 index 00000000..a3ce01e8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/00-config-setup.js @@ -0,0 +1,83 @@ +var fs = require("graceful-fs") +var path = require("path") +var userconfigSrc = path.resolve(__dirname, "..", "fixtures", "config", "userconfig") +exports.userconfig = userconfigSrc + "-with-gc" +exports.globalconfig = path.resolve(__dirname, "..", "fixtures", "config", "globalconfig") +exports.builtin = path.resolve(__dirname, "..", "fixtures", "config", "builtin") +exports.malformed = path.resolve(__dirname, "..", "fixtures", "config", "malformed") +exports.ucData = + { globalconfig: exports.globalconfig, + email: "i@izs.me", + "env-thing": "asdf", + "init.author.name": "Isaac Z. Schlueter", + "init.author.email": "i@izs.me", + "init.author.url": "http://blog.izs.me/", + "init.version": "1.2.3", + "proprietary-attribs": false, + "npm:publishtest": true, + "_npmjs.org:couch": "https://admin:password@localhost:5984/registry", + "npm-www:nocache": "1", + nodedir: "/Users/isaacs/dev/js/node-v0.8", + "sign-git-tag": true, + message: "v%s", + "strict-ssl": false, + "tmp": process.env.HOME + "/.tmp", + _auth: "dXNlcm5hbWU6cGFzc3dvcmQ=", + _token: + { AuthSession: "yabba-dabba-doodle", + version: "1", + expires: "1345001053415", + path: "/", + httponly: true } } + +// set the userconfig in the env +// unset anything else that npm might be trying to foist on us +Object.keys(process.env).forEach(function (k) { + if (k.match(/^npm_config_/i)) { + delete process.env[k] + } +}) +process.env.npm_config_userconfig = exports.userconfig +process.env.npm_config_other_env_thing = 1000 +process.env.random_env_var = "asdf" +process.env.npm_config__underbar_env_thing = "underful" +process.env.NPM_CONFIG_UPPERCASE_ENV_THING = 42 + +exports.envData = { + userconfig: exports.userconfig, + "_underbar-env-thing": "underful", + "uppercase-env-thing": "42", + "other-env-thing": "1000" +} +exports.envDataFix = { + userconfig: exports.userconfig, + "_underbar-env-thing": "underful", + "uppercase-env-thing": 42, + "other-env-thing": 1000 +} + +var projectConf = path.resolve(__dirname, '..', '..', '.npmrc') +try { + fs.statSync(projectConf) +} catch (er) { + // project conf not found, probably working with packed npm + fs.writeFileSync(projectConf, 'save-prefix = ~\nproprietary-attribs = false\n') +} + +var projectRc = path.join(__dirname, '..', 'fixtures', 'config', '.npmrc') +try { + fs.statSync(projectRc) +} catch (er) { + // project conf not found, probably working with packed npm + fs.writeFileSync(projectRc, 'just = testing') +} + +if (module === require.main) { + // set the globalconfig in the userconfig + var uc = fs.readFileSync(userconfigSrc) + var gcini = "globalconfig = " + exports.globalconfig + "\n" + fs.writeFileSync(exports.userconfig, gcini + uc) + + console.log("1..1") + console.log("ok 1 setup done") +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/00-verify-bundle-deps.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/00-verify-bundle-deps.js new file mode 100644 index 00000000..f502c78f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/00-verify-bundle-deps.js @@ -0,0 +1,27 @@ +var fs = require("fs") +var path = require("path") +var test = require("tap").test + +var manifest = require("../../package.json") +var deps = Object.keys(manifest.dependencies) +var dev = Object.keys(manifest.devDependencies) +var bundled = manifest.bundleDependencies + +test("all deps are bundled deps or dev deps", function (t) { + deps.forEach(function (name) { + t.assert( + bundled.indexOf(name) !== -1, + name + " is in bundledDependencies" + ) + }) + + t.same( + fs.readdirSync(path.resolve(__dirname, "../../node_modules")).filter(function (name) { + return (dev.indexOf(name) === -1) && (name !== ".bin") + }).sort(), + bundled.sort(), + "bundleDependencies matches what's in node_modules" + ) + + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/00-verify-ls-ok.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/00-verify-ls-ok.js new file mode 100644 index 00000000..10f53086 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/00-verify-ls-ok.js @@ -0,0 +1,18 @@ +var common = require("../common-tap") +var test = require("tap").test +var path = require("path") +var cwd = path.resolve(__dirname, "..", "..") +var fs = require("fs") + +test("npm ls in npm", function (t) { + t.ok(fs.existsSync(cwd), "ensure that the path we are calling ls within exists") + var files = fs.readdirSync(cwd) + t.notEqual(files.length, 0, "ensure there are files in the directory we are to ls") + + var opt = { cwd: cwd, stdio: [ "ignore", "ignore", 2 ] } + common.npm(["ls"], opt, function (err, code) { + t.ifError(err, "error should not exist") + t.equal(code, 0, "npm ls exited with code") + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/404-parent.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/404-parent.js new file mode 100644 index 00000000..86c25bbc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/404-parent.js @@ -0,0 +1,57 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var npm = require("../../") +var osenv = require("osenv") +var path = require("path") +var fs = require("fs") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var pkg = path.resolve(__dirname, "404-parent") +var mr = require("npm-registry-mock") + +test("404-parent: if parent exists, specify parent in error message", function (t) { + setup() + rimraf.sync(path.resolve(pkg, "node_modules")) + performInstall(function (err) { + t.ok(err instanceof Error, "error was returned") + t.ok(err.parent === "404-parent-test", "error's parent set") + t.end() + }) +}) + +test("cleanup", function (t) { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + t.end() +}) + +function setup() { + mkdirp.sync(pkg) + mkdirp.sync(path.resolve(pkg, "cache")) + fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify({ + author: "Evan Lucas", + name: "404-parent-test", + version: "0.0.0", + description: "Test for 404-parent", + dependencies: { + "test-npm-404-parent-test": "*" + } + }), "utf8") + process.chdir(pkg) +} + +function plugin (server) { + server.get("/test-npm-404-parent-test") + .reply(404, {"error": "version not found"}) +} + +function performInstall (cb) { + mr({port : common.port, plugin : plugin}, function (er, s) { // create mock registry. + npm.load({registry: common.registry}, function () { + npm.commands.install(pkg, [], function (err) { + cb(err) + s.close() // shutdown mock npm server. + }) + }) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/404-private-registry-scoped.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/404-private-registry-scoped.js new file mode 100644 index 00000000..da59a1dc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/404-private-registry-scoped.js @@ -0,0 +1,38 @@ +var test = require('tap').test +var common = require('../common-tap.js') +var mr = require('npm-registry-mock') +var server + +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.end() + }) +}) + +test('scoped package names not mangled on error with non-root registry', function (t) { + common.npm( + [ + 'cache', + 'add', + '@scope/foo@*', + '--force' + ], + {}, + function (er, code, stdout, stderr) { + t.ifError(er, 'correctly handled 404') + t.equal(code, 1, 'exited with error') + t.match(stderr, /404 Not found/, 'should notify the sort of error as a 404') + t.match(stderr, /@scope\/foo/, 'should have package name in error') + t.end() + } + ) +}) + +test('cleanup', function (t) { + t.pass('cleaned up') + server.done() + server.close() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/404-private-registry.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/404-private-registry.js new file mode 100644 index 00000000..399fb9b9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/404-private-registry.js @@ -0,0 +1,39 @@ +var test = require('tap').test +var path = require('path') +var common = require('../common-tap.js') +var mr = require('npm-registry-mock') +var server + +var packageName = path.basename(__filename,'.js') + +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.end() + }) +}) + +test('package names not mangled on error with non-root registry', function (t) { + common.npm( + [ + 'cache', + 'add', + packageName + '@*' + ], + {}, + function (er, code, stdout, stderr) { + t.ifError(er, 'correctly handled 404') + t.equal(code, 1, 'exited with error') + t.match(stderr, packageName, 'should have package name in error') + t.end() + } + ) +}) + +test('cleanup', function (t) { + t.pass('cleaned up') + server.done() + server.close() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/access.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/access.js new file mode 100644 index 00000000..495028bb --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/access.js @@ -0,0 +1,527 @@ +var fs = require('fs') +var path = require('path') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var mr = require('npm-registry-mock') + +var test = require('tap').test +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'access') +var server + +var scoped = { + name: '@scoped/pkg', + version: '1.1.1' +} + +test('setup', function (t) { + mkdirp(pkg, function (er) { + t.ifError(er, pkg + ' made successfully') + + mr({port: common.port}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + + fs.writeFile( + path.join(pkg, 'package.json'), + JSON.stringify(scoped), + function (er) { + t.ifError(er, 'wrote package.json') + t.end() + } + ) + }) + }) +}) + +test('npm access public on current package', function (t) { + server.post('/-/package/%40scoped%2Fpkg/access', JSON.stringify({ + access: 'public' + })).reply(200, { + accessChanged: true + }) + common.npm([ + 'access', + 'public', + '--registry', common.registry, + '--loglevel', 'silent' + ], { + cwd: pkg + }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access') + t.equal(code, 0, 'exited OK') + t.equal(stderr, '', 'no error output') + t.end() + }) +}) + +test('npm access public when no package passed and no package.json', function (t) { + // need to simulate a missing package.json + var missing = path.join(__dirname, 'access-public-missing-guard') + mkdirp.sync(path.join(missing, 'node_modules')) + + common.npm([ + 'access', + 'public', + '--registry', common.registry + ], { + cwd: missing + }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access') + t.match(stderr, /no package name passed to command and no package.json found/) + rimraf.sync(missing) + t.end() + }) +}) + +test('npm access public when no package passed and invalid package.json', function (t) { + // need to simulate a missing package.json + var invalid = path.join(__dirname, 'access-public-invalid-package') + mkdirp.sync(path.join(invalid, 'node_modules')) + // it's hard to force `read-package-json` to break w/o ENOENT, but this will do it + fs.writeFileSync(path.join(invalid, 'package.json'), '{\n') + + common.npm([ + 'access', + 'public', + '--registry', common.registry + ], { + cwd: invalid + }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access') + t.match(stderr, /Failed to parse json/) + rimraf.sync(invalid) + t.end() + }) +}) + +test('npm access restricted on current package', function (t) { + server.post('/-/package/%40scoped%2Fpkg/access', JSON.stringify({ + access: 'restricted' + })).reply(200, { + accessChanged: true + }) + common.npm([ + 'access', + 'restricted', + '--registry', common.registry, + '--loglevel', 'silent' + ], { + cwd: pkg + }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access') + t.equal(code, 0, 'exited OK') + t.equal(stderr, '', 'no error output') + t.end() + }) +}) + +test('npm access on named package', function (t) { + server.post('/-/package/%40scoped%2Fanother/access', { + access: 'public' + }).reply(200, { + accessChaged: true + }) + common.npm( + [ + 'access', + 'public', '@scoped/another', + '--registry', common.registry, + '--loglevel', 'silent' + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access') + t.equal(code, 0, 'exited OK') + t.equal(stderr, '', 'no error output') + + t.end() + } + ) +}) + +test('npm change access on unscoped package', function (t) { + common.npm( + [ + 'access', + 'restricted', 'yargs', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ok(code, 'exited with Error') + t.matches( + stderr, /access commands are only accessible for scoped packages/) + t.end() + } + ) +}) + +test('npm access grant read-only', function (t) { + server.put('/-/team/myorg/myteam/package', { + permissions: 'read-only', + package: '@scoped/another' + }).reply(201, { + accessChaged: true + }) + common.npm( + [ + 'access', + 'grant', 'read-only', + 'myorg:myteam', + '@scoped/another', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access grant') + t.equal(code, 0, 'exited with Error') + t.end() + } + ) +}) + +test('npm access grant read-write', function (t) { + server.put('/-/team/myorg/myteam/package', { + permissions: 'read-write', + package: '@scoped/another' + }).reply(201, { + accessChaged: true + }) + common.npm( + [ + 'access', + 'grant', 'read-write', + 'myorg:myteam', + '@scoped/another', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access grant') + t.equal(code, 0, 'exited with Error') + t.end() + } + ) +}) + +test('npm access grant others', function (t) { + common.npm( + [ + 'access', + 'grant', 'rerere', + 'myorg:myteam', + '@scoped/another', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ok(code, 'exited with Error') + t.matches(stderr, /read-only/) + t.matches(stderr, /read-write/) + t.end() + } + ) +}) + +test('npm access revoke', function (t) { + server.delete('/-/team/myorg/myteam/package', { + package: '@scoped/another' + }).reply(200, { + accessChaged: true + }) + common.npm( + [ + 'access', + 'revoke', + 'myorg:myteam', + '@scoped/another', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access grant') + t.equal(code, 0, 'exited with Error') + t.end() + } + ) +}) + +test('npm access ls-packages with no team', function (t) { + var serverPackages = { + '@foo/bar': 'write', + '@foo/util': 'read' + } + var clientPackages = { + '@foo/bar': 'read-write', + '@foo/util': 'read-only' + } + server.get( + '/-/org/username/package?format=cli' + ).reply(200, serverPackages) + common.npm( + [ + 'access', + 'ls-packages', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access ls-packages') + t.same(JSON.parse(stdout), clientPackages) + t.end() + } + ) +}) + +test('npm access ls-packages on team', function (t) { + var serverPackages = { + '@foo/bar': 'write', + '@foo/util': 'read' + } + var clientPackages = { + '@foo/bar': 'read-write', + '@foo/util': 'read-only' + } + server.get( + '/-/team/myorg/myteam/package?format=cli' + ).reply(200, serverPackages) + common.npm( + [ + 'access', + 'ls-packages', + 'myorg:myteam', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access ls-packages') + t.same(JSON.parse(stdout), clientPackages) + t.end() + } + ) +}) + +test('npm access ls-packages on org', function (t) { + var serverPackages = { + '@foo/bar': 'write', + '@foo/util': 'read' + } + var clientPackages = { + '@foo/bar': 'read-write', + '@foo/util': 'read-only' + } + server.get( + '/-/org/myorg/package?format=cli' + ).reply(200, serverPackages) + common.npm( + [ + 'access', + 'ls-packages', + 'myorg', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access ls-packages') + t.same(JSON.parse(stdout), clientPackages) + t.end() + } + ) +}) + +test('npm access ls-packages on user', function (t) { + var serverPackages = { + '@foo/bar': 'write', + '@foo/util': 'read' + } + var clientPackages = { + '@foo/bar': 'read-write', + '@foo/util': 'read-only' + } + server.get( + '/-/org/myorg/package?format=cli' + ).reply(404, {error: 'nope'}) + server.get( + '/-/user/myorg/package?format=cli' + ).reply(200, serverPackages) + common.npm( + [ + 'access', + 'ls-packages', + 'myorg', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access ls-packages') + t.same(JSON.parse(stdout), clientPackages) + t.end() + } + ) +}) + +test('npm access ls-packages with no package specified or package.json', function (t) { + // need to simulate a missing package.json + var missing = path.join(__dirname, 'access-missing-guard') + mkdirp.sync(path.join(missing, 'node_modules')) + + var serverPackages = { + '@foo/bar': 'write', + '@foo/util': 'read' + } + var clientPackages = { + '@foo/bar': 'read-write', + '@foo/util': 'read-only' + } + server.get( + '/-/org/myorg/package?format=cli' + ).reply(404, {error: 'nope'}) + server.get( + '/-/user/myorg/package?format=cli' + ).reply(200, serverPackages) + common.npm( + [ + 'access', + 'ls-packages', + 'myorg', + '--registry', common.registry + ], + { cwd: missing }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access ls-packages') + t.same(JSON.parse(stdout), clientPackages) + rimraf.sync(missing) + t.end() + } + ) +}) + +test('npm access ls-collaborators on current', function (t) { + var serverCollaborators = { + 'myorg:myteam': 'write', + 'myorg:anotherteam': 'read' + } + var clientCollaborators = { + 'myorg:myteam': 'read-write', + 'myorg:anotherteam': 'read-only' + } + server.get( + '/-/package/%40scoped%2Fpkg/collaborators?format=cli' + ).reply(200, serverCollaborators) + common.npm( + [ + 'access', + 'ls-collaborators', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access ls-collaborators') + t.same(JSON.parse(stdout), clientCollaborators) + t.end() + } + ) +}) + +test('npm access ls-collaborators on package', function (t) { + var serverCollaborators = { + 'myorg:myteam': 'write', + 'myorg:anotherteam': 'read' + } + var clientCollaborators = { + 'myorg:myteam': 'read-write', + 'myorg:anotherteam': 'read-only' + } + server.get( + '/-/package/%40scoped%2Fanother/collaborators?format=cli' + ).reply(200, serverCollaborators) + common.npm( + [ + 'access', + 'ls-collaborators', + '@scoped/another', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access ls-collaborators') + t.same(JSON.parse(stdout), clientCollaborators) + t.end() + } + ) +}) + +test('npm access ls-collaborators on current w/user filter', function (t) { + var serverCollaborators = { + 'myorg:myteam': 'write', + 'myorg:anotherteam': 'read' + } + var clientCollaborators = { + 'myorg:myteam': 'read-write', + 'myorg:anotherteam': 'read-only' + } + server.get( + '/-/package/%40scoped%2Fanother/collaborators?format=cli&user=zkat' + ).reply(200, serverCollaborators) + common.npm( + [ + 'access', + 'ls-collaborators', + '@scoped/another', + 'zkat', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm access ls-collaborators') + t.same(JSON.parse(stdout), clientCollaborators) + t.end() + } + ) +}) + +test('npm access edit', function (t) { + common.npm( + [ + 'access', + 'edit', '@scoped/another', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ok(code, 'exited with Error') + t.match(stderr, /edit subcommand is not implemented yet/) + t.end() + } + ) +}) + +test('npm access blerg', function (t) { + common.npm( + [ + 'access', + 'blerg', '@scoped/another', + '--registry', common.registry + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ok(code, 'exited with Error') + t.matches(stderr, /Usage:/) + t.end() + } + ) +}) + +test('cleanup', function (t) { + t.pass('cleaned up') + rimraf.sync(pkg) + server.done() + server.close() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/add-named-update-protocol-port.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-named-update-protocol-port.js new file mode 100644 index 00000000..3cd3a4be --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-named-update-protocol-port.js @@ -0,0 +1,113 @@ +'use strict' +var path = require('path') +var test = require('tap').test +var common = require('../common-tap') +var mr = require('npm-registry-mock') +var server1 +var server2 + +var packageName = path.basename(__filename, '.js') + +var fooPkg = { + name: packageName, + versions: { + '0.0.0': { + name: packageName, + version: '0.0.0', + dist: { + tarball: 'https://localhost:1338/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz', + shasum: '356a192b7913b04c54574d18c28d46e6395428ab' + } + } + } +} + +var iPackageName = packageName + 'i' +var fooiPkg = { + name: iPackageName, + versions: { + '0.0.0': { + name: iPackageName, + version: '0.0.0', + dist: { + tarball: 'http://127.0.0.1:1338/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz', + shasum: '356a192b7913b04c54574d18c28d46e6395428ab' + } + } + } +} + +test('setup', function (t) { + mr({ + port: 1337, + throwOnUnmatched: true + }, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server1 = s + mr({ + port: 1338, + throwOnUnmatched: true + }, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server2 = s + t.end() + }) + }) + +}) + +test('tarball paths should update port if updating protocol', function (t) { + server1.get('/registry/' + packageName).reply(200, fooPkg) + server1.get( + '/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz' + ).reply(200, '1') + + common.npm( + [ + 'cache', + 'add', + packageName + '@0.0.0', + '--registry', + 'http://localhost:1337/registry' + ], + {}, + function (er, code, stdout, stderr) { + if (er) { throw er } + t.equal(code, 0, 'addNamed worked') + server1.done() + t.end() + } + ) +}) + +test('tarball paths should NOT update if different hostname', function (t) { + server1.get('/registry/' + iPackageName).reply(200, fooiPkg) + server2.get( + '/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz' + ).reply(200, '1') + + common.npm( + [ + 'cache', + 'add', + iPackageName + '@0.0.0', + '--registry', + 'http://localhost:1337/registry' + ], + {}, + function (er, code, stdout, stderr) { + if (er) { throw er } + t.equal(code, 0, 'addNamed worked') + server1.done() + server2.done() + t.end() + } + ) +}) + +test('cleanup', function (t) { + t.pass('cleaned up') + server1.close() + server2.close() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-fake-windows.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-fake-windows.js new file mode 100644 index 00000000..d694d461 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-fake-windows.js @@ -0,0 +1,133 @@ +var fs = require('fs') +var resolve = require('path').resolve + +var osenv = require('osenv') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../lib/npm.js') +var common = require('../common-tap.js') + +var pkg = resolve(__dirname, 'add-remote-git') +var repo = resolve(__dirname, 'add-remote-git-repo') + +var daemon +var daemonPID +var git + +var pjParent = JSON.stringify({ + name: 'parent', + version: '1.2.3', + dependencies: { + child: 'git://localhost:1234/child.git' + } +}, null, 2) + '\n' + +var pjChild = JSON.stringify({ + name: 'child', + version: '1.0.3' +}, null, 2) + '\n' + + +test('setup', function (t) { + bootstrap() + setup(function (er, r) { + if (er) { + throw er + } + + if (!er) { + daemon = r[r.length - 2] + daemonPID = r[r.length - 1] + } + + t.end() + }) +}) + +test('install from repo on \'Windows\'', function (t) { + // before we confuse everything by switching the platform + require('../../lib/install.js') + require('../../lib/unbuild.js') + process.platform = 'win32' + process.chdir(pkg) + npm.commands.install('.', [], function (er) { + t.ifError(er, 'npm installed via git') + + t.end() + }) +}) + +test('clean', function (t) { + daemon.on('close', function () { + cleanup() + t.end() + }) + process.kill(daemonPID) +}) + +function bootstrap () { + rimraf.sync(pkg) + mkdirp.sync(pkg) + fs.writeFileSync(resolve(pkg, 'package.json'), pjParent) +} + +function setup (cb) { + rimraf.sync(repo) + mkdirp.sync(repo) + fs.writeFileSync(resolve(repo, 'package.json'), pjChild) + npm.load({ registry: common.registry, loglevel: 'silent' }, function () { + // some really cheesy monkeypatching + require('module')._cache[require.resolve('which')] = { + exports: function (_, cb) { cb() } + } + git = require('../../lib/utils/git.js') + + function startDaemon (cb) { + // start git server + var d = git.spawn( + [ + 'daemon', + '--verbose', + '--listen=localhost', + '--export-all', + '--base-path=.', + '--reuseaddr', + '--port=1234' + ], + { + cwd: pkg, + env: process.env, + stdio: ['pipe', 'pipe', 'pipe'] + } + ) + d.stderr.on('data', childFinder) + + function childFinder (c) { + var cpid = c.toString().match(/^\[(\d+)\]/) + if (cpid[1]) { + this.removeListener('data', childFinder) + cb(null, [d, cpid[1]]) + } + } + } + + common.makeGitRepo({ + path: repo, + commands: [ + git.chainableExec( + ['clone', '--bare', repo, 'child.git'], + { cwd: pkg, env: process.env } + ), + startDaemon + ] + }, cb) + }) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(repo) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-file.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-file.js new file mode 100644 index 00000000..f83016a8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-file.js @@ -0,0 +1,78 @@ +var fs = require('fs') +var resolve = require('path').resolve +var url = require('url') + +var osenv = require('osenv') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../lib/npm.js') +var common = require('../common-tap.js') + +var pkg = resolve(__dirname, 'add-remote-git-file') +var repo = resolve(__dirname, 'add-remote-git-file-repo') + +var git +var cloneURL = 'git+file://' + resolve(pkg, 'child.git') + +var pjChild = JSON.stringify({ + name: 'child', + version: '1.0.3' +}, null, 2) + '\n' + +test('setup', function (t) { + bootstrap() + setup(function (er, r) { + t.ifError(er, 'git started up successfully') + + t.end() + }) +}) + +test('cache from repo', function (t) { + process.chdir(pkg) + var addRemoteGit = require('../../lib/cache/add-remote-git.js') + addRemoteGit(cloneURL, function (er, data) { + t.ifError(er, 'cached via git') + t.equal( + url.parse(data._resolved).protocol, + 'git+file:', + 'npm didn\'t go crazy adding git+git+git+git' + ) + + t.end() + }) +}) + +test('clean', function (t) { + cleanup() + t.end() +}) + +function bootstrap () { + cleanup() + mkdirp.sync(pkg) +} + +function setup (cb) { + mkdirp.sync(repo) + fs.writeFileSync(resolve(repo, 'package.json'), pjChild) + npm.load({ registry: common.registry, loglevel: 'silent' }, function () { + git = require('../../lib/utils/git.js') + + common.makeGitRepo({ + path: repo, + commands: [git.chainableExec( + ['clone', '--bare', repo, 'child.git'], + { cwd: pkg, env: process.env } + )] + }, cb) + }) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(repo) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-get-resolved.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-get-resolved.js new file mode 100644 index 00000000..2447bbd6 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-get-resolved.js @@ -0,0 +1,130 @@ +'use strict' +var test = require('tap').test + +var npm = require('../../lib/npm.js') +var common = require('../common-tap.js') + +var normalizeGitUrl = require('normalize-git-url') +var getResolved = null + +/** + * Note: This is here because `normalizeGitUrl` is usually called + * before getResolved is, and receives *that* URL. + */ +function tryGetResolved(uri, treeish) { + return getResolved(normalizeGitUrl(uri).url, treeish) +} + +test('setup', function (t) { + var opts = { + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + getResolved = require('../../lib/cache/add-remote-git.js').getResolved + t.end() + }) +}) + +test('add-remote-git#get-resolved git: passthru', function (t) { + verify('git:github.com/foo/repo') + verify('git:github.com/foo/repo.git') + verify('git://github.com/foo/repo#decadacefadabade') + verify('git://github.com/foo/repo.git#decadacefadabade') + + function verify (uri) { + t.equal( + tryGetResolved(uri, 'decadacefadabade'), + 'git://github.com/foo/repo.git#decadacefadabade', + uri + ' normalized to canonical form git://github.com/foo/repo.git#decadacefadabade' + ) + } + t.end() +}) + +test('add-remote-git#get-resolved SSH', function (t) { + t.comment('tests for https://github.com/npm/npm/issues/7961') + verify('git@github.com:foo/repo') + verify('git@github.com:foo/repo#master') + verify('git+ssh://git@github.com/foo/repo#master') + verify('git+ssh://git@github.com/foo/repo#decadacefadabade') + + function verify (uri) { + t.equal( + tryGetResolved(uri, 'decadacefadabade'), + 'git+ssh://git@github.com/foo/repo.git#decadacefadabade', + uri + ' normalized to canonical form git+ssh://git@github.com/foo/repo.git#decadacefadabade' + ) + } + t.end() +}) + +test('add-remote-git#get-resolved HTTPS', function (t) { + verify('https://github.com/foo/repo') + verify('https://github.com/foo/repo#master') + verify('git+https://github.com/foo/repo.git#master') + verify('git+https://github.com/foo/repo#decadacefadabade') + // DEPRECATED + // this is an invalid URL but we normalize it + // anyway. Users shouldn't use this in the future. See note + // below for how this affected non-hosted URLs. + // See https://github.com/npm/npm/issues/8881 + verify('git+https://github.com:foo/repo.git#master') + + function verify (uri) { + t.equal( + tryGetResolved(uri, 'decadacefadabade'), + 'git+https://github.com/foo/repo.git#decadacefadabade', + uri + ' normalized to canonical form git+https://github.com/foo/repo.git#decadacefadabade' + ) + } + t.end() +}) + +test('add-remote-git#get-resolved edge cases', function (t) { + + t.equal( + tryGetResolved('git+ssh://user@bananaboat.com:galbi/blah.git', 'decadacefadabade'), + 'git+ssh://user@bananaboat.com:galbi/blah.git#decadacefadabade', + 'don\'t break non-hosted scp-style locations' + ) + + t.equal( + tryGetResolved('git+ssh://bananaboat:galbi/blah', 'decadacefadabade'), + 'git+ssh://bananaboat:galbi/blah#decadacefadabade', + 'don\'t break non-hosted scp-style locations' + ) + + // DEPRECATED + // When we were normalizing all git URIs, git+https: was being + // automatically converted to ssh:. Some users were relying + // on this funky behavior, so after removing the aggressive + // normalization from non-hosted URIs, we brought this back. + // See https://github.com/npm/npm/issues/8881 + t.equal( + tryGetResolved('git+https://bananaboat:galbi/blah', 'decadacefadabade'), + 'git+https://bananaboat/galbi/blah#decadacefadabade', + 'don\'t break non-hosted scp-style locations' + ) + + t.equal( + tryGetResolved('git+ssh://git.bananaboat.net/foo', 'decadacefadabade'), + 'git+ssh://git.bananaboat.net/foo#decadacefadabade', + 'don\'t break non-hosted SSH URLs' + ) + + t.equal( + tryGetResolved('git+ssh://git.bananaboat.net:/foo', 'decadacefadabade'), + 'git+ssh://git.bananaboat.net:/foo#decadacefadabade', + 'don\'t break non-hosted SSH URLs' + ) + + t.equal( + tryGetResolved('git://gitbub.com/foo/bar.git', 'decadacefadabade'), + 'git://gitbub.com/foo/bar.git#decadacefadabade', + 'don\'t break non-hosted git: URLs' + ) + + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-shrinkwrap.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-shrinkwrap.js new file mode 100644 index 00000000..26638db0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git-shrinkwrap.js @@ -0,0 +1,161 @@ +var fs = require('fs') +var resolve = require('path').resolve + +var osenv = require('osenv') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../lib/npm.js') +var common = require('../common-tap.js') + +var pkg = resolve(__dirname, 'add-remote-git-shrinkwrap') +var repo = resolve(__dirname, 'add-remote-git-shrinkwrap-repo') + +var daemon +var daemonPID +var git + +var pjParent = JSON.stringify({ + name: 'parent', + version: '1.2.3', + dependencies: { + 'child': 'git://localhost:1234/child.git#master' + } +}, null, 2) + '\n' + +var pjChild = JSON.stringify({ + name: 'child', + version: '1.0.3' +}, null, 2) + '\n' + +test('setup', function (t) { + bootstrap() + setup(function (er, r) { + t.ifError(er, 'git started up successfully') + + if (!er) { + daemon = r[r.length - 2] + daemonPID = r[r.length - 1] + } + + t.end() + }) +}) + +test('install from repo', function (t) { + process.chdir(pkg) + npm.commands.install('.', [], function (er) { + t.ifError(er, 'npm installed via git') + + t.end() + }) +}) + +test('shrinkwrap gets correct _from and _resolved (#7121)', function (t) { + common.npm( + [ + 'shrinkwrap', + '--loglevel', 'silent' + ], + { cwd: pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm shrinkwrapped without errors') + t.notOk(code, '`npm shrinkwrap` exited with 0') + t.equal(stdout.trim(), 'wrote npm-shrinkwrap.json') + t.notOk(stderr, 'no error output on successful shrinkwrap') + + var shrinkwrap = require(resolve(pkg, 'npm-shrinkwrap.json')) + t.equal( + shrinkwrap.dependencies.child.from, + 'git://localhost:1234/child.git#master', + 'npm shrinkwrapped from correctly' + ) + + git.whichAndExec( + ['rev-list', '-n1', 'master'], + { cwd: repo, env: process.env }, + function (er, stdout, stderr) { + t.ifErr(er, 'git rev-list ran without error') + t.notOk(stderr, 'no error output') + var treeish = stdout.trim() + + t.equal( + shrinkwrap.dependencies.child.resolved, + 'git://localhost:1234/child.git#' + treeish, + 'npm shrinkwrapped resolved correctly' + ) + + t.end() + } + ) + } + ) +}) + +test('clean', function (t) { + daemon.on('close', function () { + cleanup() + t.end() + }) + process.kill(daemonPID) +}) + +function bootstrap () { + mkdirp.sync(pkg) + fs.writeFileSync(resolve(pkg, 'package.json'), pjParent) +} + +function setup (cb) { + mkdirp.sync(repo) + fs.writeFileSync(resolve(repo, 'package.json'), pjChild) + npm.load({ prefix: pkg, registry: common.registry, loglevel: 'silent' }, function () { + git = require('../../lib/utils/git.js') + + function startDaemon (cb) { + // start git server + var d = git.spawn( + [ + 'daemon', + '--verbose', + '--listen=localhost', + '--export-all', + '--base-path=.', + '--reuseaddr', + '--port=1234' + ], + { + cwd: pkg, + env: process.env, + stdio: ['pipe', 'pipe', 'pipe'] + } + ) + d.stderr.on('data', childFinder) + + function childFinder (c) { + var cpid = c.toString().match(/^\[(\d+)\]/) + if (cpid[1]) { + this.removeListener('data', childFinder) + cb(null, [d, cpid[1]]) + } + } + } + + common.makeGitRepo({ + path: repo, + commands: [ + git.chainableExec( + ['clone', '--bare', repo, 'child.git'], + { cwd: pkg, env: process.env } + ), + startDaemon + ] + }, cb) + }) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(repo) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git.js new file mode 100644 index 00000000..9cff5cea --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/add-remote-git.js @@ -0,0 +1,120 @@ +var fs = require('fs') +var resolve = require('path').resolve + +var osenv = require('osenv') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../lib/npm.js') +var common = require('../common-tap.js') + +var pkg = resolve(__dirname, 'add-remote-git') +var repo = resolve(__dirname, 'add-remote-git-repo') + +var daemon +var daemonPID +var git + +var pjParent = JSON.stringify({ + name: 'parent', + version: '1.2.3', + dependencies: { + child: 'git://localhost:1234/child.git' + } +}, null, 2) + '\n' + +var pjChild = JSON.stringify({ + name: 'child', + version: '1.0.3' +}, null, 2) + '\n' + +test('setup', function (t) { + bootstrap() + setup(function (er, r) { + t.ifError(er, 'git started up successfully') + + if (!er) { + daemon = r[r.length - 2] + daemonPID = r[r.length - 1] + } + + t.end() + }) +}) + +test('install from repo', function (t) { + process.chdir(pkg) + npm.commands.install('.', [], function (er) { + t.ifError(er, 'npm installed via git') + + t.end() + }) +}) + +test('clean', function (t) { + daemon.on('close', function () { + cleanup() + t.end() + }) + process.kill(daemonPID) +}) + +function bootstrap () { + mkdirp.sync(pkg) + fs.writeFileSync(resolve(pkg, 'package.json'), pjParent) +} + +function setup (cb) { + mkdirp.sync(repo) + fs.writeFileSync(resolve(repo, 'package.json'), pjChild) + npm.load({ registry: common.registry, loglevel: 'silent' }, function () { + git = require('../../lib/utils/git.js') + + function startDaemon (cb) { + // start git server + var d = git.spawn( + [ + 'daemon', + '--verbose', + '--listen=localhost', + '--export-all', + '--base-path=.', + '--reuseaddr', + '--port=1234' + ], + { + cwd: pkg, + env: process.env, + stdio: ['pipe', 'pipe', 'pipe'] + } + ) + d.stderr.on('data', childFinder) + + function childFinder (c) { + var cpid = c.toString().match(/^\[(\d+)\]/) + if (cpid[1]) { + this.removeListener('data', childFinder) + cb(null, [d, cpid[1]]) + } + } + } + + common.makeGitRepo({ + path: repo, + commands: [ + git.chainableExec( + ['clone', '--bare', repo, 'child.git'], + { cwd: pkg, env: process.env } + ), + startDaemon + ] + }, cb) + }) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(repo) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/adduser-always-auth.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/adduser-always-auth.js new file mode 100644 index 00000000..a5308d9d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/adduser-always-auth.js @@ -0,0 +1,264 @@ +var fs = require("fs") +var path = require("path") +var rimraf = require("rimraf") +var mr = require("npm-registry-mock") + +var test = require("tap").test +var common = require("../common-tap.js") + +var opts = {cwd : __dirname} +var outfile = path.resolve(__dirname, "_npmrc") +var responses = { + "Username" : "u\n", + "Password" : "p\n", + "Email" : "u@p.me\n" +} + +function verifyStdout (runner, successMessage, t) { + var remaining = Object.keys(responses).length + return function (chunk) { + if (remaining > 0) { + remaining-- + + var label = chunk.toString('utf8').split(':')[0] + runner.stdin.write(responses[label]) + + if (remaining === 0) runner.stdin.end() + } else { + var message = chunk.toString('utf8').trim() + t.equal(message, successMessage) + } + } +} + +function mocks (server) { + server.filteringRequestBody(function (r) { + if (r.match(/\"_id\":\"org\.couchdb\.user:u\"/)) { + return "auth" + } + }) + server.put("/-/user/org.couchdb.user:u", "auth") + .reply(201, {username : "u", password : "p", email : "u@p.me"}) +} + +test("npm login", function (t) { + mr({port : common.port, plugin : mocks}, function (er, s) { + var runner = common.npm( + [ + "login", + "--registry", common.registry, + "--loglevel", "silent", + "--userconfig", outfile + ], + opts, + function (err, code) { + t.notOk(code, "exited OK") + t.notOk(err, "no error output") + var config = fs.readFileSync(outfile, "utf8") + t.like(config, /:always-auth=false/, "always-auth is scoped and false (by default)") + s.close() + rimraf(outfile, function (err) { + t.ifError(err, "removed config file OK") + t.end() + }) + }) + + var message = 'Logged in as u on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) +}) + +test('npm login --scope <scope> uses <scope>:registry as its URI', function (t) { + var port = common.port + 1 + var uri = 'http://localhost:' + port + '/' + var scope = '@myco' + common.npm( + [ + 'config', + '--userconfig', outfile, + 'set', + scope + ':registry', + uri + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + + mr({ port: port, plugin: mocks }, function (er, s) { + var runner = common.npm( + [ + 'login', + '--loglevel', 'silent', + '--userconfig', outfile, + '--scope', scope + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + var config = fs.readFileSync(outfile, 'utf8') + t.like(config, new RegExp(scope + ':registry=' + uri), 'scope:registry is set') + s.close() + rimraf(outfile, function (err) { + t.ifError(err, 'removed config file OK') + t.end() + }) + }) + + var message = 'Logged in as u to scope ' + scope + ' on ' + uri + '.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) + }) +}) + +test('npm login --scope <scope> makes sure <scope> is prefixed by an @', function (t) { + var port = common.port + 1 + var uri = 'http://localhost:' + port + '/' + var scope = 'myco' + var prefixedScope = '@' + scope + common.npm( + [ + '--userconfig', outfile, + 'config', + 'set', + prefixedScope + ':registry', + uri + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + + mr({ port: port, plugin: mocks }, function (er, s) { + var runner = common.npm( + [ + 'login', + '--loglevel', 'silent', + '--userconfig', outfile, + '--scope', scope + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + var config = fs.readFileSync(outfile, 'utf8') + t.like(config, new RegExp(prefixedScope + ':registry=' + uri), 'scope:registry is set') + s.close() + rimraf(outfile, function (err) { + t.ifError(err, 'removed config file OK') + t.end() + }) + }) + + var message = 'Logged in as u to scope ' + prefixedScope + ' on ' + uri + '.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) + }) +}) + +test('npm login --scope <scope> --registry <registry> uses <registry> as its URI', function (t) { + var scope = '@myco' + common.npm( + [ + '--userconfig', outfile, + 'config', + 'set', + scope + ':registry', + 'invalidurl' + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + + mr({ port: common.port, plugin: mocks }, function (er, s) { + var runner = common.npm( + [ + 'login', + '--registry', common.registry, + '--loglevel', 'silent', + '--userconfig', outfile, + '--scope', scope + ], + opts, + function (err, code) { + t.notOk(code, 'exited OK') + t.notOk(err, 'no error output') + var config = fs.readFileSync(outfile, 'utf8') + t.like(config, new RegExp(scope + ':registry=' + common.registry), 'scope:registry is set') + s.close() + rimraf(outfile, function (err) { + t.ifError(err, 'removed config file OK') + t.end() + }) + }) + + var message = 'Logged in as u to scope ' + scope + ' on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) + }) +}) + +test("npm login --always-auth", function (t) { + mr({port : common.port, plugin : mocks}, function (er, s) { + var runner = common.npm( + [ + "login", + "--registry", common.registry, + "--loglevel", "silent", + "--userconfig", outfile, + "--always-auth" + ], + opts, + function (err, code) { + t.notOk(code, "exited OK") + t.notOk(err, "no error output") + var config = fs.readFileSync(outfile, "utf8") + t.like(config, /:always-auth=true/, "always-auth is scoped and true") + s.close() + rimraf(outfile, function (err) { + t.ifError(err, "removed config file OK") + t.end() + }) + }) + + var message = 'Logged in as u on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) +}) + +test("npm login --no-always-auth", function (t) { + mr({port : common.port, plugin : mocks}, function (er, s) { + var runner = common.npm( + [ + "login", + "--registry", common.registry, + "--loglevel", "silent", + "--userconfig", outfile, + "--no-always-auth" + ], + opts, + function (err, code) { + t.notOk(code, "exited OK") + t.notOk(err, "no error output") + var config = fs.readFileSync(outfile, "utf8") + t.like(config, /:always-auth=false/, "always-auth is scoped and false") + s.close() + rimraf(outfile, function (err) { + t.ifError(err, "removed config file OK") + t.end() + }) + }) + + var message = 'Logged in as u on ' + common.registry + '/.' + runner.stdout.on('data', verifyStdout(runner, message, t)) + }) +}) + + +test("cleanup", function (t) { + rimraf.sync(outfile) + t.pass("cleaned up") + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/adduser-legacy-auth.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/adduser-legacy-auth.js new file mode 100644 index 00000000..f19b2656 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/adduser-legacy-auth.js @@ -0,0 +1,97 @@ +var fs = require('fs') +var path = require('path') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var mr = require('npm-registry-mock') + +var test = require('tap').test +var common = require('../common-tap.js') + +var opts = { cwd: __dirname } +var pkg = path.resolve(__dirname, 'adduser-legacy-auth') +var outfile = path.resolve(pkg, '_npmrc') + +var contents = '_auth=' + new Buffer('u:x').toString('base64') + '\n' + + 'registry=https://nonexistent.lvh.me/registry\n' + + 'email=u@p.me\n' + +var responses = { + 'Username': 'u\n', + 'Password': 'p\n', + 'Email': 'u@p.me\n' +} + +function mocks (server) { + server.filteringRequestBody(function (r) { + if (r.match(/"_id":"org\.couchdb\.user:u"/)) { + return 'auth' + } + }) + server.put('/-/user/org.couchdb.user:u', 'auth') + .reply(409, { error: 'user exists' }) + server.get('/-/user/org.couchdb.user:u?write=true') + .reply(200, { _rev: '3-deadcafebabebeef' }) + server.put( + '/-/user/org.couchdb.user:u/-rev/3-deadcafebabebeef', + 'auth', + { authorization: 'Basic dTpw' } + ).reply(201, { username: 'u', password: 'p', email: 'u@p.me' }) +} + +test('setup', function (t) { + mkdirp(pkg, function (er) { + t.ifError(er, pkg + ' made successfully') + + fs.writeFile(outfile, contents, function (er) { + t.ifError(er, 'wrote legacy config') + + t.end() + }) + }) +}) + +test('npm login', function (t) { + mr({ port: common.port, plugin: mocks }, function (er, s) { + var runner = common.npm( + [ + 'login', + '--registry', common.registry, + '--loglevel', 'silent', + '--userconfig', outfile + ], + opts, + function (err, code, stdout, stderr) { + t.ifError(err, 'npm ran without issue') + t.notOk(code, 'exited OK') + t.notOk(stderr, 'no error output') + var config = fs.readFileSync(outfile, 'utf8') + t.like(config, /:always-auth=false/, 'always-auth is scoped and false (by default)') + s.close() + rimraf(outfile, function (err) { + t.ifError(err, 'removed config file OK') + t.end() + }) + }) + + var remaining = Object.keys(responses).length + runner.stdout.on('data', function (chunk) { + if (remaining > 0) { + remaining-- + + var label = chunk.toString('utf8').split(':')[0] + runner.stdin.write(responses[label]) + + if (remaining === 0) runner.stdin.end() + } else { + var message = chunk.toString('utf8').trim() + t.equal(message, 'Logged in as u on ' + common.registry + '/.') + } + }) + }) +}) + +test('cleanup', function (t) { + rimraf.sync(pkg) + t.pass('cleaned up') + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/bearer-token-check.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/bearer-token-check.js new file mode 100644 index 00000000..de3fd2db --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/bearer-token-check.js @@ -0,0 +1,119 @@ +var resolve = require('path').resolve +var writeFileSync = require('graceful-fs').writeFileSync + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var toNerfDart = require('../../lib/config/nerf-dart.js') + +var pkg = resolve(__dirname, 'install-bearer-check') +var outfile = resolve(pkg, '_npmrc') +var modules = resolve(pkg, 'node_modules') +var tarballPath = '/scoped-underscore/-/scoped-underscore-1.3.1.tgz' +// needs to be a different hostname to verify tokens (not) being sent correctly +var tarballURL = 'http://lvh.me:' + common.port + tarballPath +var tarball = resolve(__dirname, '../fixtures/scoped-underscore-1.3.1.tgz') + +var server + +var EXEC_OPTS = { cwd: pkg } + +function mocks (server) { + var auth = 'Bearer 0xabad1dea' + server.get(tarballPath, { authorization: auth }).reply(403, { + error: 'token leakage', + reason: 'This token should not be sent.' + }) + server.get(tarballPath).replyWithFile(200, tarball) +} + +test('setup', function (t) { + mr({ port: common.port, plugin: mocks }, function (er, s) { + server = s + t.ok(s, 'set up mock registry') + setup() + t.end() + }) +}) + +test('authed npm install with tarball not on registry', function (t) { + common.npm( + [ + 'install', + '--loglevel', 'silent', + '--json', + '--fetch-retries', 0, + '--userconfig', outfile + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, 'test runner executed without error') + t.equal(code, 0, 'npm install exited OK') + t.notOk(stderr, 'no output on stderr') + try { + var results = JSON.parse(stdout) + } catch (ex) { + console.error('#', ex) + t.ifError(ex, 'stdout was valid JSON') + } + + if (results) { + var installedversion = { + 'name': '@scoped/underscore', + 'version': '1.3.1', + 'from': 'http://lvh.me:1337/scoped-underscore/-/scoped-underscore-1.3.1.tgz', + 'dependencies': {} + } + t.isDeeply(results[0], installedversion, '@scoped/underscore installed') + } + + t.end() + } + ) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.end() +}) + +var contents = '@scoped:registry=' + common.registry + '\n' + + toNerfDart(common.registry) + ':_authToken=0xabad1dea\n' + +var json = { + name: 'test-package-install', + version: '1.0.0' +} + +var shrinkwrap = { + name: 'test-package-install', + version: '1.0.0', + dependencies: { + '@scoped/underscore': { + resolved: tarballURL, + from: '>=1.3.1 <2', + version: '1.3.1' + } + } +} + +function setup () { + cleanup() + mkdirp.sync(modules) + writeFileSync(resolve(pkg, 'package.json'), JSON.stringify(json, null, 2) + '\n') + writeFileSync(outfile, contents) + writeFileSync( + resolve(pkg, 'npm-shrinkwrap.json'), + JSON.stringify(shrinkwrap, null, 2) + '\n' + ) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/bin.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/bin.js new file mode 100644 index 00000000..d568f67c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/bin.js @@ -0,0 +1,17 @@ +var path = require("path") +var test = require("tap").test +var common = require("../common-tap.js") +var opts = { cwd: __dirname } +var binDir = "../../node_modules/.bin" +var fixture = path.resolve(__dirname, binDir) + +test('npm bin', function (t) { + common.npm(["bin"], opts, function (err, code, stdout, stderr) { + t.ifError(err, "bin ran without issue") + t.notOk(stderr, "should have no stderr") + t.equal(code, 0, "exit ok") + var res = path.resolve(stdout) + t.equal(res, fixture + "\n") + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-https-url-with-creds-package.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-https-url-with-creds-package.js new file mode 100644 index 00000000..372c91aa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-https-url-with-creds-package.js @@ -0,0 +1,83 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds-package') + +var json = { + name: 'bitbucket-https-url-with-creds-package', + version: '0.0.0', + dependencies: { + 'private': 'git+https://user:pass@bitbucket.org/foo/private.git' + } +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('bitbucket-https-url-with-creds-package', function (t) { + var cloneUrls = [ + ['https://user:pass@bitbucket.org/foo/private.git', 'Bitbucket URLs with passwords try only that.'] + ] + + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install([], function (er) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-https-url-with-creds.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-https-url-with-creds.js new file mode 100644 index 00000000..b010d0a1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-https-url-with-creds.js @@ -0,0 +1,80 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds') + +var json = { + name: 'bitbucket-https-url-with-creds', + version: '0.0.0' +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('bitbucket-https-url-with-creds', function (t) { + var cloneUrls = [ + ['https://user:pass@bitbucket.org/foo/private.git', 'Bitbucket URLs with passwords try only that.'] + ] + + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install(['git+https://user:pass@bitbucket.org/foo/private.git'], function (er) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-shortcut-package.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-shortcut-package.js new file mode 100644 index 00000000..d4e0e040 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-shortcut-package.js @@ -0,0 +1,84 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'bitbucket-shortcut-package') + +var json = { + name: 'bitbucket-shortcut-package', + version: '0.0.0', + dependencies: { + 'private': 'bitbucket:foo/private' + } +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('bitbucket-shortcut', function (t) { + var cloneUrls = [ + ['git@bitbucket.org:foo/private.git', 'Bitbucket shortcuts try SSH first'], + ['https://bitbucket.org/foo/private.git', 'Bitbucket shortcuts try HTTPS URLs second'] + ] + + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install([], function (er) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-shortcut.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-shortcut.js new file mode 100644 index 00000000..6f5d4a66 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/bitbucket-shortcut.js @@ -0,0 +1,81 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'bitbucket-shortcut') + +var json = { + name: 'bitbucket-shortcut', + version: '0.0.0' +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('bitbucket-shortcut', function (t) { + var cloneUrls = [ + ['git@bitbucket.org:foo/private.git', 'Bitbucket shortcuts try SSH first'], + ['https://bitbucket.org/foo/private.git', 'Bitbucket shortcuts try HTTPS URLs second'] + ] + + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install(['bitbucket:foo/private'], function (er) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/bugs.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/bugs.js new file mode 100644 index 00000000..d65f6d38 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/bugs.js @@ -0,0 +1,151 @@ +if (process.platform === "win32") { + console.error("skipping test, because windows and shebangs") + return +} + +var common = require("../common-tap.js") +var mr = require("npm-registry-mock") + +var test = require("tap").test +var rimraf = require("rimraf") +var fs = require("fs") +var path = require("path") +var join = path.join +var outFile = path.join(__dirname, "/_output") + +var opts = { cwd: __dirname } + +test("setup", function (t) { + var s = "#!/usr/bin/env bash\n" + + "echo \"$@\" > " + JSON.stringify(__dirname) + "/_output\n" + fs.writeFileSync(join(__dirname, "/_script.sh"), s, "ascii") + fs.chmodSync(join(__dirname, "/_script.sh"), "0755") + t.pass("made script") + t.end() +}) + +test("npm bugs underscore", function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + "bugs", "underscore", + "--registry=" + common.registry, + "--loglevel=silent", + "--browser=" + join(__dirname, "/_script.sh") + ], opts, function (err, code, stdout, stderr) { + t.ifError(err, "bugs ran without issue") + t.notOk(stderr, "should have no stderr") + t.equal(code, 0, "exit ok") + var res = fs.readFileSync(outFile, "ascii") + s.close() + t.equal(res, "https://github.com/jashkenas/underscore/issues\n") + rimraf.sync(outFile) + t.end() + }) + }) +}) + +test("npm bugs optimist - github (https://)", function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + "bugs", "optimist", + "--registry=" + common.registry, + "--loglevel=silent", + "--browser=" + join(__dirname, "/_script.sh") + ], opts, function (err, code, stdout, stderr) { + t.ifError(err, "bugs ran without issue") + t.notOk(stderr, "should have no stderr") + t.equal(code, 0, "exit ok") + var res = fs.readFileSync(outFile, "ascii") + s.close() + t.equal(res, "https://github.com/substack/node-optimist/issues\n") + rimraf.sync(outFile) + t.end() + }) + }) +}) + +test("npm bugs npm-test-peer-deps - no repo", function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + "bugs", "npm-test-peer-deps", + "--registry=" + common.registry, + "--loglevel=silent", + "--browser=" + join(__dirname, "/_script.sh") + ], opts, function (err, code, stdout, stderr) { + t.ifError(err, "bugs ran without issue") + t.notOk(stderr, "should have no stderr") + t.equal(code, 0, "exit ok") + var res = fs.readFileSync(outFile, "ascii") + s.close() + t.equal(res, "https://www.npmjs.org/package/npm-test-peer-deps\n") + rimraf.sync(outFile) + t.end() + }) + }) +}) + +test("npm bugs test-repo-url-http - non-github (http://)", function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + "bugs", "test-repo-url-http", + "--registry=" + common.registry, + "--loglevel=silent", + "--browser=" + join(__dirname, "/_script.sh") + ], opts, function (err, code, stdout, stderr) { + t.ifError(err, "bugs ran without issue") + t.notOk(stderr, "should have no stderr") + t.equal(code, 0, "exit ok") + var res = fs.readFileSync(outFile, "ascii") + s.close() + t.equal(res, "https://www.npmjs.org/package/test-repo-url-http\n") + rimraf.sync(outFile) + t.end() + }) + }) +}) + +test("npm bugs test-repo-url-https - non-github (https://)", function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + "bugs", "test-repo-url-https", + "--registry=" + common.registry, + "--loglevel=silent", + "--browser=" + join(__dirname, "/_script.sh") + ], opts, function (err, code, stdout, stderr) { + t.ifError(err, "bugs ran without issue") + t.notOk(stderr, "should have no stderr") + t.equal(code, 0, "exit ok") + var res = fs.readFileSync(outFile, "ascii") + s.close() + t.equal(res, "https://www.npmjs.org/package/test-repo-url-https\n") + rimraf.sync(outFile) + t.end() + }) + }) +}) + +test("npm bugs test-repo-url-ssh - non-github (ssh://)", function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + "bugs", "test-repo-url-ssh", + "--registry=" + common.registry, + "--loglevel=silent", + "--browser=" + join(__dirname, "/_script.sh") + ], opts, function (err, code, stdout, stderr) { + t.ifError(err, "bugs ran without issue") + t.notOk(stderr, "should have no stderr") + t.equal(code, 0, "exit ok") + var res = fs.readFileSync(outFile, "ascii") + s.close() + t.equal(res, "https://www.npmjs.org/package/test-repo-url-ssh\n") + rimraf.sync(outFile) + t.end() + }) + }) +}) + +test("cleanup", function (t) { + fs.unlinkSync(join(__dirname, "/_script.sh")) + t.pass("cleaned up") + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/build-already-built.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/build-already-built.js new file mode 100644 index 00000000..b9e908be --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/build-already-built.js @@ -0,0 +1,81 @@ +// if "npm rebuild" is run with bundled dependencies, +// message "already built" should not be error +var test = require("tap").test +var path = require("path") +var osenv = require("osenv") +var rimraf = require("rimraf") +var npmlog = require("npmlog") +var mkdirp = require("mkdirp") +var requireInject = require("require-inject") + +var npm = require("../../lib/npm.js") + +var PKG_DIR = path.resolve(__dirname, "build-already-built") +var fakePkg = "foo" + +test("setup", function (t) { + cleanup() + + t.end() +}) + +test("issue #6735 build 'already built' message", function (t) { + npm.load({loglevel : "warn"}, function () { + // capture log messages with level + var log = "" + npmlog.on("log", function (chunk) { + log += chunk.level + " " + chunk.message + "\n" + }) + + mkdirp.sync(fakePkg) + var folder = path.resolve(fakePkg) + + var global = npm.config.get("global") + + var build = requireInject("../../lib/build", { + }) + + t.test("pin previous behavior", function (t) { + + build([fakePkg], global, false, false, function (err) { + t.ok(err, "build failed as expected") + t.similar(err.message, /package.json/, "missing package.json as expected") + t.notSimilar(log, /already built/, "no already built message written") + + t.end() + }) + }) + + t.test("simulate rebuild of bundledDependency", function (t) { + + log = "" + + build._didBuild[folder] = true + + build([fakePkg], global, false, false, function (err) { + t.ok(err, "build failed as expected") + t.similar(err.message, /package.json/, "missing package.json as expected") + + t.similar(log, /already built/, "already built message written") + t.notSimilar(log, /ERR! already built/, "already built message written is not error") + t.similar(log, /info already built/, "already built message written is info") + + t.end() + }) + }) + + t.end() + }) +}) + + +test("cleanup", function (t) { + cleanup() + + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(PKG_DIR) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/builtin-config.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/builtin-config.js new file mode 100644 index 00000000..7ea73fa7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/builtin-config.js @@ -0,0 +1,126 @@ +var fs = require("fs") + +if (process.argv[2] === "write-builtin") { + var pid = process.argv[3] + fs.writeFileSync("npmrc", "foo=bar\npid=" + pid + "\n") + return +} + +var rcdata = "foo=bar\npid=" + process.pid + "\n" +var common = require("../common-tap.js") +var path = require("path") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var folder = path.resolve(__dirname, "builtin-config") +var test = require("tap").test +var npm = path.resolve(__dirname, "../..") +var spawn = require("child_process").spawn +var node = process.execPath + +test("setup", function (t) { + rimraf.sync(folder) + mkdirp.sync(folder + "/first") + mkdirp.sync(folder + "/second") + mkdirp.sync(folder + "/cache") + mkdirp.sync(folder + "/tmp") + + t.pass("finished setup") + t.end() +}) + + +test("install npm into first folder", function (t) { + var args = ["install", npm, "-g", + "--prefix=" + folder + "/first", + "--ignore-scripts", + "--cache=" + folder + "/cache", + "--no-spin", + "--loglevel=silent", + "--tmp=" + folder + "/tmp"] + common.npm(args, {stdio: "inherit"}, function (er, code) { + if (er) throw er + t.equal(code, 0) + t.end() + }) +}) + +test("write npmrc file", function (t) { + common.npm(["explore", "npm", "-g", + "--prefix=" + folder + "/first", + "--cache=" + folder + "/cache", + "--tmp=" + folder + "/tmp", + "--no-spin", + "--", + node, __filename, "write-builtin", process.pid + ], + {"stdio": "inherit"}, + function (er, code) { + if (er) throw er + t.equal(code, 0) + t.end() + }) +}) + +test("use first npm to install second npm", function (t) { + // get the root location + common.npm([ "root", "-g", + "--prefix=" + folder + "/first", + "--cache=" + folder + "/cache", + "--tmp=" + folder + "/tmp", + "--no-spin" + ], {}, function (er, code, so) { + if (er) throw er + t.equal(code, 0) + var root = so.trim() + t.ok(fs.statSync(root).isDirectory()) + + var bin = path.resolve(root, "npm/bin/npm-cli.js") + spawn( node + , [ bin + , "install", npm + , "-g" + , "--prefix=" + folder + "/second" + , "--cache=" + folder + "/cache" + , "--tmp=" + folder + "/tmp" + , "--no-spin" + ]) + .on("error", function (er) { throw er }) + .on("close", function (code) { + t.equal(code, 0, "code is zero") + t.end() + }) + }) +}) + +test("verify that the builtin config matches", function (t) { + common.npm([ "root", "-g", + "--prefix=" + folder + "/first", + "--cache=" + folder + "/cache", + "--tmp=" + folder + "/tmp" + ], {}, function (er, code, so) { + if (er) throw er + t.equal(code, 0) + var firstRoot = so.trim() + common.npm([ "root", "-g", + "--prefix=" + folder + "/second", + "--cache=" + folder + "/cache", + "--tmp=" + folder + "/tmp" + ], {}, function (er, code, so) { + if (er) throw er + t.equal(code, 0) + var secondRoot = so.trim() + var firstRc = path.resolve(firstRoot, "npm", "npmrc") + var secondRc = path.resolve(secondRoot, "npm", "npmrc") + var firstData = fs.readFileSync(firstRc, "utf8") + var secondData = fs.readFileSync(secondRc, "utf8") + t.equal(firstData, secondData) + t.end() + }) + }) +}) + + +test("clean", function (t) { + rimraf.sync(folder) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/bundled-dependencies-nonarray.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/bundled-dependencies-nonarray.js new file mode 100644 index 00000000..254bff24 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/bundled-dependencies-nonarray.js @@ -0,0 +1,77 @@ +var fs = require('graceful-fs') +var path = require('path') + +var osenv = require('osenv') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../lib/npm.js') +var common = require('../common-tap.js') + +var dir = path.resolve(__dirname, 'bundleddependencies') +var pkg = path.resolve(dir, 'pkg-with-bundled') +var dep = path.resolve(dir, 'a-bundled-dep') + +var pj = JSON.stringify({ + name: 'pkg-with-bundled', + version: '1.0.0', + dependencies: { + 'a-bundled-dep': 'file:../a-bundled-dep' + }, + bundledDependencies: { + 'a-bundled-dep': 'file:../a-bundled-dep' + } +}, null, 2) + '\n' + +var pjDep = JSON.stringify({ + name: 'a-bundled-dep', + version: '2.0.0' +}, null, 2) + '\n' + +test('setup', function (t) { + bootstrap() + t.end() +}) + +test('errors on non-array bundleddependencies', function (t) { + t.plan(6) + process.chdir(pkg) + npm.load({}, + function () { + common.npm(['install'], { cwd: pkg }, function (err, code, stdout, stderr) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'exited with a non-error code') + t.notOk(stderr, 'no error output') + + common.npm(['install', './pkg-with-bundled'], { cwd: dir }, + function (err, code, stdout, stderr) { + t.ifError(err, 'npm install ran without issue') + t.ok(code, 'exited with a error code') + t.ok(stderr.indexOf('be an array') > -1, 'nice error output') + } + ) + }) + } + ) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function bootstrap () { + mkdirp.sync(dir) + + mkdirp.sync(pkg) + fs.writeFileSync(path.resolve(pkg, 'package.json'), pj) + + mkdirp.sync(dep) + fs.writeFileSync(path.resolve(dep, 'package.json'), pjDep) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(dir) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-add-localdir-fallback.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-add-localdir-fallback.js new file mode 100644 index 00000000..aca0182c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-add-localdir-fallback.js @@ -0,0 +1,84 @@ +var path = require("path") +var test = require("tap").test +var npm = require("../../lib/npm.js") +var requireInject = require("require-inject") + +var realizePackageSpecifier = requireInject("realize-package-specifier", { + "fs": { + stat: function (file, cb) { + process.nextTick(function () { + switch (file) { + case path.resolve("named"): + cb(new Error("ENOENT")) + break + case path.resolve("file.tgz"): + cb(null, { isDirectory: function () { return false } }) + break + case path.resolve("dir-no-package"): + cb(null, { isDirectory: function () { return true } }) + break + case path.resolve("dir-no-package/package.json"): + cb(new Error("ENOENT")) + break + case path.resolve("dir-with-package"): + cb(null, { isDirectory: function () { return true } }) + break + case path.resolve("dir-with-package/package.json"): + cb(null, {}) + break + case path.resolve(__dirname, "dir-with-package"): + cb(null, { isDirectory: function () { return true } }) + break + case path.join(__dirname, "dir-with-package", "package.json"): + cb(null, {}) + break + case path.resolve(__dirname, "file.tgz"): + cb(null, { isDirectory: function () { return false } }) + break + default: + throw new Error("Unknown test file passed to stat: " + file) + } + }) + } + } +}) + +npm.load({loglevel : "silent"}, function () { + var cache = requireInject("../../lib/cache.js", { + "realize-package-specifier": realizePackageSpecifier, + "../../lib/cache/add-named.js": function addNamed (name, version, data, cb) { + cb(null, "addNamed") + }, + "../../lib/cache/add-local.js": function addLocal (name, data, cb) { + cb(null, "addLocal") + } + }) + + test("npm install localdir fallback", function (t) { + t.plan(12) + cache.add("named", null, null, false, function (er, which) { + t.ifError(er, "named was cached") + t.is(which, "addNamed", "registry package name") + }) + cache.add("file.tgz", null, null, false, function (er, which) { + t.ifError(er, "file.tgz was cached") + t.is(which, "addLocal", "local file") + }) + cache.add("dir-no-package", null, null, false, function (er, which) { + t.ifError(er, "local directory was cached") + t.is(which, "addNamed", "local directory w/o package.json") + }) + cache.add("dir-with-package", null, null, false, function (er, which) { + t.ifError(er, "local directory with package was cached") + t.is(which,"addLocal", "local directory with package.json") + }) + cache.add("file:./dir-with-package", null, __dirname, false, function (er, which) { + t.ifError(er, "local directory (as URI) with package was cached") + t.is(which, "addLocal", "file: URI to local directory with package.json") + }) + cache.add("file:./file.tgz", null, __dirname, false, function (er, which) { + t.ifError(er, "local file (as URI) with package was cached") + t.is(which, "addLocal", "file: URI to local file with package.json") + }) + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-add-unpublished.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-add-unpublished.js new file mode 100644 index 00000000..15b74347 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-add-unpublished.js @@ -0,0 +1,34 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var mr = require("npm-registry-mock") + +test("cache add", function (t) { + setup(function (er, s) { + if (er) { + throw er + } + common.npm([ + "cache", + "add", + "superfoo", + "--registry=http://localhost:1337/" + ], {}, function (er, c, so, se) { + if (er) throw er + t.ok(c, "got non-zero exit code") + t.equal(so, "", "nothing printed to stdout") + t.similar(se, /404 Not Found: superfoo/, "got expected error") + s.close() + t.end() + }) + }) +}) + +function setup (cb) { + var s = require("http").createServer(function (req, res) { + res.statusCode = 404 + res.end("{\"error\":\"not_found\"}\n") + }) + s.listen(1337, function () { + cb(null, s) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-shasum-fork.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-shasum-fork.js new file mode 100644 index 00000000..547e363a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-shasum-fork.js @@ -0,0 +1,101 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +// Install from a tarball that thinks it is underscore@1.5.1 +// (but is actually a fork) +var forkPath = path.resolve( + __dirname, '..', 'fixtures', 'forked-underscore-1.5.1.tgz' +) +var pkg = path.resolve(__dirname, 'cache-shasum-fork') +var cache = path.join(pkg, 'cache') +var server + +test('setup', function (t) { + setup() + t.comment('test for https://github.com/npm/npm/issues/3265') + mr({ port: common.port }, function (er, s) { + server = s + t.end() + }) +}) + +test('npm cache - install from fork', function (t) { + setup() + common.npm( + [ + '--loglevel', 'silent', + '--registry', common.registry, + 'install', forkPath + ], + { + cwd: pkg, + env: { npm_config_cache: cache } + }, + function (err, code, stdout, stderr) { + t.ifErr(err, 'install finished without error') + t.notOk(stderr, 'Should not get data on stderr: ' + stderr) + t.equal(code, 0, 'install finished successfully') + + t.equal(stdout, 'underscore@1.5.1 node_modules/underscore\n') + var index = fs.readFileSync( + path.join(pkg, 'node_modules', 'underscore', 'index.js'), + 'utf8' + ) + t.equal(index, 'console.log("This is the fork");\n\n') + t.end() + } + ) +}) + +// Now install the real 1.5.1. +test('npm cache - install from origin', function (t) { + setup() + common.npm( + [ + '--loglevel', 'silent', + '--registry', common.registry, + 'install', 'underscore' + ], + { + cwd: pkg, + env: { npm_config_cache: cache } + }, + function (err, code, stdout, stderr) { + t.ifErr(err, 'install finished without error') + t.equal(code, 0, 'install finished successfully') + t.notOk(stderr, 'Should not get data on stderr: ' + stderr) + t.equal(stdout, 'underscore@1.5.1 node_modules/underscore\n') + var index = fs.readFileSync( + path.join(pkg, 'node_modules', 'underscore', 'index.js'), + 'utf8' + ) + t.equal(index, 'module.exports = require(\'./underscore\');\n') + t.end() + } + ) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + mkdirp.sync(cache) + mkdirp.sync(path.join(pkg, 'node_modules')) + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-shasum.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-shasum.js new file mode 100644 index 00000000..31295211 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/cache-shasum.js @@ -0,0 +1,59 @@ +var npm = require.resolve("../../") +var test = require("tap").test +var path = require("path") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var mr = require("npm-registry-mock") +var common = require("../common-tap.js") +var cache = path.resolve(__dirname, "cache-shasum") +var spawn = require("child_process").spawn +var sha = require("sha") +var server + +test("mock reg", function (t) { + rimraf.sync(cache) + mkdirp.sync(cache) + mr({port : common.port}, function (er, s) { + server = s + t.pass("ok") + t.end() + }) +}) + +test("npm cache add request", function (t) { + var c = spawn(process.execPath, [ + npm, "cache", "add", "request@2.27.0", + "--cache=" + cache, + "--registry=" + common.registry, + "--loglevel=quiet" + ]) + c.stderr.pipe(process.stderr) + + c.stdout.on("data", function (d) { + t.fail("Should not get data on stdout: " + d) + }) + + c.on("close", function (code) { + t.notOk(code, "exit ok") + t.end() + }) +}) + +test("compare", function (t) { + var d = path.resolve(__dirname, "cache-shasum/request") + var p = path.resolve(d, "2.27.0/package.tgz") + var r = require("./cache-shasum/localhost_1337/request/.cache.json") + var rshasum = r.versions["2.27.0"].dist.shasum + sha.get(p, function (er, pshasum) { + if (er) + throw er + t.equal(pshasum, rshasum) + t.end() + }) +}) + +test("cleanup", function (t) { + server.close() + rimraf.sync(cache) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/circular-dep.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/circular-dep.js new file mode 100644 index 00000000..9a845813 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/circular-dep.js @@ -0,0 +1,99 @@ +var fs = require('graceful-fs') +var path = require('path') +var existsSync = fs.existsSync || path.existsSync + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var server + +var pkg = path.resolve(__dirname, 'circular-dep') +var minimist = path.join(pkg, 'minimist') + +var EXEC_OPTS = { + cwd: path.join(pkg, 'minimist/node_modules'), + npm_config_cache: path.join(pkg, 'cache') +} + +var json = { + name: 'minimist', + version: '0.0.5', + dependencies: { + optimist: '0.6.0' + } +} + +test('setup', function (t) { + t.comment('test for https://github.com/npm/npm/issues/4312') + setup(function () { + t.end() + }) +}) + +test('installing a package that depends on the current package', function (t) { + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + 'install', 'optimist' + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, 'npm ran without issue') + t.notOk(code, 'npm ran without raising an error code') + t.notOk(stderr, 'no error output') + + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + 'dedupe' + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, 'npm ran without issue') + t.notOk(code, 'npm ran without raising an error code') + t.notOk(stderr, 'no error output') + + t.ok(existsSync(path.resolve( + minimist, + 'node_modules', 'optimist', + 'node_modules', 'minimist' + )), 'circular dependency uncircled') + t.end() + } + ) + } + ) +}) + +test('cleanup', function (t) { + cleanup() + server.close() + t.end() +}) + +function setup (cb) { + cleanup() + mkdirp.sync(minimist) + fs.writeFileSync( + path.join(minimist, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(path.resolve(pkg, 'minimist')) + + fs.mkdirSync(path.resolve(pkg, 'minimist/node_modules')) + mr({ port: common.port }, function (er, s) { + server = s + cb() + }) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/config-basic.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-basic.js new file mode 100644 index 00000000..02255f5d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-basic.js @@ -0,0 +1,66 @@ +var test = require("tap").test +var npmconf = require("../../lib/config/core.js") +var common = require("./00-config-setup.js") +var path = require("path") + +var projectData = { + "save-prefix": "~", + "proprietary-attribs": false +} + +var ucData = common.ucData +var envData = common.envData +var envDataFix = common.envDataFix + +var gcData = { "package-config:foo": "boo" } + +var biData = {} + +var cli = { foo: "bar", umask: 022 } + +var expectList = +[ cli, + envDataFix, + projectData, + ucData, + gcData, + biData ] + +var expectSources = { + cli: { data: cli }, + env: { + data: envDataFix, + source: envData, + prefix: "" + }, + project: { + path: path.resolve(__dirname, "..", "..", ".npmrc"), + type: "ini", + data: projectData + }, + user: { + path: common.userconfig, + type: "ini", + data: ucData + }, + global: { + path: common.globalconfig, + type: "ini", + data: gcData + }, + builtin: { data: biData } +} + +test("no builtin", function (t) { + npmconf.load(cli, function (er, conf) { + if (er) throw er + t.same(conf.list, expectList) + t.same(conf.sources, expectSources) + t.same(npmconf.rootConf.list, []) + t.equal(npmconf.rootConf.root, npmconf.defs.defaults) + t.equal(conf.root, npmconf.defs.defaults) + t.equal(conf.get("umask"), 022) + t.equal(conf.get("heading"), "npm") + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/config-builtin.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-builtin.js new file mode 100644 index 00000000..b32ecdc7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-builtin.js @@ -0,0 +1,68 @@ +var test = require("tap").test +var npmconf = require("../../lib/config/core.js") +var common = require("./00-config-setup.js") +var path = require("path") + +var ucData = common.ucData + +var envData = common.envData +var envDataFix = common.envDataFix + +var gcData = { "package-config:foo": "boo" } + +var biData = { "builtin-config": true } + +var cli = { foo: "bar", heading: "foo", "git-tag-version": false } + +var projectData = { + "save-prefix": "~", + "proprietary-attribs": false +} + +var expectList = [ + cli, + envDataFix, + projectData, + ucData, + gcData, + biData +] + +var expectSources = { + cli: { data: cli }, + env: { + data: envDataFix, + source: envData, + prefix: "" + }, + project: { + path: path.resolve(__dirname, "..", "..", ".npmrc"), + type: "ini", + data: projectData + }, + user: { + path: common.userconfig, + type: "ini", + data: ucData + }, + global: { + path: common.globalconfig, + type: "ini", + data: gcData + }, + builtin: { data: biData } +} + +test("with builtin", function (t) { + npmconf.load(cli, common.builtin, function (er, conf) { + if (er) throw er + t.same(conf.list, expectList) + t.same(conf.sources, expectSources) + t.same(npmconf.rootConf.list, []) + t.equal(npmconf.rootConf.root, npmconf.defs.defaults) + t.equal(conf.root, npmconf.defs.defaults) + t.equal(conf.get("heading"), "foo") + t.equal(conf.get("git-tag-version"), false) + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/config-certfile.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-certfile.js new file mode 100644 index 00000000..4986814b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-certfile.js @@ -0,0 +1,18 @@ +require("./00-config-setup.js") + +var path = require("path") +var fs = require("fs") +var test = require("tap").test +var npmconf = require("../../lib/config/core.js") + +test("cafile loads as ca", function (t) { + var cafile = path.join(__dirname, "..", "fixtures", "config", "multi-ca") + + npmconf.load({cafile: cafile}, function (er, conf) { + if (er) throw er + + t.same(conf.get("cafile"), cafile) + t.same(conf.get("ca").join("\n"), fs.readFileSync(cafile, "utf8").trim()) + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/config-credentials.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-credentials.js new file mode 100644 index 00000000..60b4ce79 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-credentials.js @@ -0,0 +1,350 @@ +var test = require("tap").test + +var npmconf = require("../../lib/config/core.js") +var common = require("./00-config-setup.js") + +var URI = "https://registry.lvh.me:8661/" + +test("getting scope with no credentials set", function (t) { + npmconf.load({}, function (er, conf) { + t.ifError(er, "configuration loaded") + + var basic = conf.getCredentialsByURI(URI) + t.equal(basic.scope, "//registry.lvh.me:8661/", "nerfed URL extracted") + + t.end() + }) +}) + +test("trying to set credentials with no URI", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + t.throws(function () { + conf.setCredentialsByURI() + }, "enforced missing URI") + + t.end() + }) +}) + +test("trying to clear credentials with no URI", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + t.throws(function () { + conf.clearCredentialsByURI() + }, "enforced missing URI") + + t.end() + }) +}) + +test("set with missing credentials object", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + t.throws(function () { + conf.setCredentialsByURI(URI) + }, "enforced missing credentials") + + t.end() + }) +}) + +test("set with empty credentials object", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + t.throws(function () { + conf.setCredentialsByURI(URI, {}) + }, "enforced missing credentials") + + t.end() + }) +}) + +test("set with token", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + t.doesNotThrow(function () { + conf.setCredentialsByURI(URI, {token : "simple-token"}) + }, "needs only token") + + var expected = { + scope: '//registry.lvh.me:8661/', + token: 'simple-token', + username: undefined, + password: undefined, + email: undefined, + auth: undefined, + alwaysAuth: false + } + + t.same(conf.getCredentialsByURI(URI), expected, "got bearer token and scope") + + t.end() + }) +}) + +test("clear with token", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + t.doesNotThrow(function () { + conf.setCredentialsByURI(URI, {token : "simple-token"}) + }, "needs only token") + + t.doesNotThrow(function () { + conf.clearCredentialsByURI(URI) + }, "needs only URI") + + t.notOk(conf.getCredentialsByURI(URI).token, "token all gone") + + t.end() + }) +}) + +test("set with missing username", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + var credentials = { + password : "password", + email : "ogd@aoaioxxysz.net" + } + + t.throws(function () { + conf.setCredentialsByURI(URI, credentials) + }, "enforced missing email") + + t.end() + }) +}) + +test("set with missing password", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + var credentials = { + username : "username", + email : "ogd@aoaioxxysz.net" + } + + t.throws(function () { + conf.setCredentialsByURI(URI, credentials) + }, "enforced missing email") + + t.end() + }) +}) + +test("set with missing email", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + var credentials = { + username : "username", + password : "password" + } + + t.throws(function () { + conf.setCredentialsByURI(URI, credentials) + }, "enforced missing email") + + t.end() + }) +}) + +test("set with old-style credentials", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + var credentials = { + username : "username", + password : "password", + email : "ogd@aoaioxxysz.net" + } + + t.doesNotThrow(function () { + conf.setCredentialsByURI(URI, credentials) + }, "requires all of username, password, and email") + + var expected = { + scope : "//registry.lvh.me:8661/", + token : undefined, + username : "username", + password : "password", + email : "ogd@aoaioxxysz.net", + auth : "dXNlcm5hbWU6cGFzc3dvcmQ=", + alwaysAuth : false + } + + t.same(conf.getCredentialsByURI(URI), expected, "got credentials") + + t.end() + }) +}) + +test("clear with old-style credentials", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + var credentials = { + username : "username", + password : "password", + email : "ogd@aoaioxxysz.net" + } + + t.doesNotThrow(function () { + conf.setCredentialsByURI(URI, credentials) + }, "requires all of username, password, and email") + + t.doesNotThrow(function () { + conf.clearCredentialsByURI(URI) + }, "clearing only required URI") + + t.notOk(conf.getCredentialsByURI(URI).username, "username cleared") + t.notOk(conf.getCredentialsByURI(URI).password, "password cleared") + + t.end() + }) +}) + +test("get old-style credentials for default registry", function (t) { + npmconf.load(common.builtin, function (er, conf) { + var actual = conf.getCredentialsByURI(conf.get("registry")) + var expected = { + scope : "//registry.npmjs.org/", + token : undefined, + password : "password", + username : "username", + email : "i@izs.me", + auth : "dXNlcm5hbWU6cGFzc3dvcmQ=", + alwaysAuth : false + } + t.same(actual, expected) + t.end() + }) +}) + +test("set with always-auth enabled", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + var credentials = { + username : "username", + password : "password", + email : "ogd@aoaioxxysz.net", + alwaysAuth : true + } + + conf.setCredentialsByURI(URI, credentials) + + var expected = { + scope : "//registry.lvh.me:8661/", + token : undefined, + username : "username", + password : "password", + email : "ogd@aoaioxxysz.net", + auth : "dXNlcm5hbWU6cGFzc3dvcmQ=", + alwaysAuth : true + } + + t.same(conf.getCredentialsByURI(URI), expected, "got credentials") + + t.end() + }) +}) + +test("set with always-auth disabled", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + + var credentials = { + username : "username", + password : "password", + email : "ogd@aoaioxxysz.net", + alwaysAuth : false + } + + conf.setCredentialsByURI(URI, credentials) + + var expected = { + scope : "//registry.lvh.me:8661/", + token : undefined, + username : "username", + password : "password", + email : "ogd@aoaioxxysz.net", + auth : "dXNlcm5hbWU6cGFzc3dvcmQ=", + alwaysAuth : false + } + + t.same(conf.getCredentialsByURI(URI), expected, "got credentials") + + t.end() + }) +}) + +test("set with global always-auth enabled", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + var original = conf.get("always-auth") + conf.set("always-auth", true) + + var credentials = { + username : "username", + password : "password", + email : "ogd@aoaioxxysz.net" + } + + conf.setCredentialsByURI(URI, credentials) + + var expected = { + scope : "//registry.lvh.me:8661/", + token : undefined, + username : "username", + password : "password", + email : "ogd@aoaioxxysz.net", + auth : "dXNlcm5hbWU6cGFzc3dvcmQ=", + alwaysAuth : true + } + + t.same(conf.getCredentialsByURI(URI), expected, "got credentials") + + conf.set("always-auth", original) + t.end() + }) +}) + +test("set with global always-auth disabled", function (t) { + npmconf.load(common.builtin, function (er, conf) { + t.ifError(er, "configuration loaded") + var original = conf.get("always-auth") + conf.set("always-auth", false) + + var credentials = { + username : "username", + password : "password", + email : "ogd@aoaioxxysz.net" + } + + conf.setCredentialsByURI(URI, credentials) + + var expected = { + scope : "//registry.lvh.me:8661/", + token : undefined, + username : "username", + password : "password", + email : "ogd@aoaioxxysz.net", + auth : "dXNlcm5hbWU6cGFzc3dvcmQ=", + alwaysAuth : false + } + + t.same(conf.getCredentialsByURI(URI), expected, "got credentials") + + conf.set("always-auth", original) + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/config-edit.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-edit.js new file mode 100644 index 00000000..185ea4dd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-edit.js @@ -0,0 +1,72 @@ +var fs = require("fs") +var path = require("path") + +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") +var test = require("tap").test +var common = require("../common-tap.js") + +var pkg = path.resolve(__dirname, "npm-global-edit") + +var editorSrc = function () {/* +#!/usr/bin/env node +var fs = require("fs") +if (fs.existsSync(process.argv[2])) { + console.log("success") +} else { + console.log("error") + process.exit(1) +} +*/}.toString().split("\n").slice(1, -1).join("\n") +var editorPath = path.join(pkg, "editor") + +test("setup", function (t) { + cleanup(function (er) { + t.ifError(er, "old directory removed") + + mkdirp(pkg, "0777", function (er) { + fs.writeFileSync(editorPath, editorSrc) + fs.chmodSync(editorPath, "0777") + t.ifError(er, "created package directory correctly") + t.end() + }) + }) +}) + +test("saving configs", function (t) { + var opts = { + cwd: pkg, + env: { + PATH: process.env.PATH, + EDITOR: editorPath + } + } + common.npm( + [ + "config", + "--prefix", pkg, + "--global", + "edit" + ], + opts, + function (err, code, stdout, stderr) { + t.ifError(err, "command ran without issue") + + t.equal(stderr, "", "got nothing on stderr") + t.equal(code, 0, "exit ok") + t.equal(stdout, "success\n", "got success message") + t.end() + } + ) +}) + +test("cleanup", function (t) { + cleanup(function (er) { + t.ifError(er, "test directory removed OK") + t.end() + }) +}) + +function cleanup (cb) { + rimraf(pkg, cb) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/config-malformed.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-malformed.js new file mode 100644 index 00000000..a435d941 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-malformed.js @@ -0,0 +1,14 @@ +var test = require('tap').test + +var npmconf = require("../../lib/config/core.js") +var common = require("./00-config-setup.js") + +test('with malformed', function (t) { + npmconf.load({}, common.malformed, function (er, conf) { + t.ok(er, 'Expected parse error') + if (!(er && /Failed parsing JSON config key email/.test(er.message))) { + throw er + } + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/config-meta.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-meta.js new file mode 100644 index 00000000..364d3814 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-meta.js @@ -0,0 +1,128 @@ +// this is a weird meta test. It verifies that all the instances of +// `npm.config.get(...)` are: +// a) Simple strings, and not variables +// b) Documented +// c) Defined in the `npmconf` package. + +var test = require("tap").test +var fs = require("fs") +var path = require("path") +var root = path.resolve(__dirname, "..", "..") +var lib = path.resolve(root, "lib") +var nm = path.resolve(root, "node_modules") +var doc = path.resolve(root, "doc/misc/npm-config.md") +var FILES = [] +var CONFS = {} +var DOC = {} + +var exceptions = [ + path.resolve(lib, "adduser.js"), + path.resolve(lib, "config.js"), + path.resolve(lib, "publish.js"), + path.resolve(lib, "utils", "lifecycle.js"), + path.resolve(lib, "utils", "map-to-registry.js"), + path.resolve(nm, "npm-registry-client", "lib", "publish.js"), + path.resolve(nm, "npm-registry-client", "lib", "request.js") +] + +test("get files", function (t) { + walk(nm) + walk(lib) + t.pass("got files") + t.end() + + function walk(lib) { + var files = fs.readdirSync(lib).map(function (f) { + return path.resolve(lib, f) + }) + files.forEach(function (f) { + try { + var s = fs.lstatSync(f) + } catch (er) { + return + } + if (s.isDirectory()) + walk(f) + else if (f.match(/\.js$/)) + FILES.push(f) + }) + } +}) + +test("get lines", function (t) { + FILES.forEach(function (f) { + var lines = fs.readFileSync(f, "utf8").split(/\r|\n/) + lines.forEach(function (l, i) { + var matches = l.split(/conf(?:ig)?\.get\(/g) + matches.shift() + matches.forEach(function (m) { + m = m.split(")").shift() + var literal = m.match(/^['"].+?['"]/) + if (literal) { + m = literal[0].slice(1, -1) + if (!m.match(/^\_/) && m !== "argv") + CONFS[m] = { + file: f, + line: i + } + } else if (exceptions.indexOf(f) === -1) { + t.fail("non-string-literal config used in " + f + ":" + i) + } + }) + }) + }) + t.pass("got lines") + t.end() +}) + +test("get docs", function (t) { + var d = fs.readFileSync(doc, "utf8").split(/\r|\n/) + // walk down until the "## Config Settings" section + for (var i = 0; i < d.length && d[i] !== "## Config Settings"; i++); + i++ + // now gather up all the ^###\s lines until the next ^##\s + for (; i < d.length && !d[i].match(/^## /); i++) { + if (d[i].match(/^### /)) + DOC[ d[i].replace(/^### /, "").trim() ] = true + } + t.pass("read the docs") + t.end() +}) + +test("check configs", function (t) { + var defs = require("../../lib/config/defaults.js") + var types = Object.keys(defs.types) + var defaults = Object.keys(defs.defaults) + for (var c1 in CONFS) { + if (CONFS[c1].file.indexOf(lib) === 0) { + t.ok(DOC[c1], "should be documented " + c1 + " " + + CONFS[c1].file + ":" + CONFS[c1].line) + t.ok(types.indexOf(c1) !== -1, "should be defined in npmconf " + c1) + t.ok(defaults.indexOf(c1) !== -1, "should have default in npmconf " + c1) + } + } + + for (var c2 in DOC) { + if (c2 !== "versions" && c2 !== "version" && c2 !== "init.version") { + t.ok(CONFS[c2], "config in doc should be used somewhere " + c2) + t.ok(types.indexOf(c2) !== -1, "should be defined in npmconf " + c2) + t.ok(defaults.indexOf(c2) !== -1, "should have default in npmconf " + c2) + } + } + + types.forEach(function (c) { + if (!c.match(/^\_/) && c !== "argv" && !c.match(/^versions?$/)) { + t.ok(DOC[c], "defined type should be documented " + c) + t.ok(CONFS[c], "defined type should be used " + c) + } + }) + + defaults.forEach(function (c) { + if (!c.match(/^\_/) && c !== "argv" && !c.match(/^versions?$/)) { + t.ok(DOC[c], "defaulted type should be documented " + c) + t.ok(CONFS[c], "defaulted type should be used " + c) + } + }) + + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/config-new-cafile.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-new-cafile.js new file mode 100644 index 00000000..3b3caa6c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-new-cafile.js @@ -0,0 +1,56 @@ +require('./00-config-setup.js') + +var path = require('path') +var fs = require('graceful-fs') +var test = require('tap').test +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var osenv = require('osenv') +var npmconf = require('../../lib/config/core.js') + +var dir = path.resolve(__dirname, 'config-new-cafile') +var beep = path.resolve(dir, 'beep.pem') + +test('setup', function (t) { + bootstrap() + t.end() +}) + +test('can set new cafile when old is gone', function (t) { + t.plan(5) + npmconf.load(function (error, conf) { + npmconf.loaded = false + t.ifError(error) + conf.set('cafile', beep, 'user') + conf.save('user', function (error) { + t.ifError(error) + t.equal(conf.get('cafile'), beep) + rimraf.sync(beep) + npmconf.load(function (error, conf) { + if (error) { + throw error + } + t.equal(conf.get('cafile'), beep) + conf.del('cafile') + conf.save('user', function (error) { + t.ifError(error) + }) + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function bootstrap () { + mkdirp.sync(dir) + fs.writeFileSync(beep, '') +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(dir) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/config-private.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-private.js new file mode 100644 index 00000000..11b9f1af --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-private.js @@ -0,0 +1,81 @@ +var fs = require("fs") +var path = require("path") +var test = require("tap").test +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var common = require("../common-tap.js") + +var pkg = path.resolve(__dirname, "config-private") +var opts = { cwd: pkg } + +test("setup", function (t) { + rimraf.sync(pkg) + mkdirp.sync(pkg) + t.end() +}) + +test("config get private var (old auth)", function (t) { + common.npm([ + "config", + "get", + "_auth" + ], + opts, + function (err, code, stdout, stderr) { + t.ifError(err) + + t.similar(stderr, /sekretz/, "password blocked on stderr") + t.equal(stdout, "", "no output") + t.end() + } + ) +}) + +test("config get private var (new auth)", function (t) { + common.npm([ + "config", + "get", + "//registry.npmjs.org/:_password" + ], + opts, + function (err, code, stdout, stderr) { + t.ifError(err) + + t.similar(stderr, /sekretz/, "password blocked on stderr") + t.equal(stdout, "", "no output") + t.end() + } + ) +}) + +test("config get public var (new username)", function (t) { + var FIXTURE_PATH = path.resolve(pkg, "fixture_npmrc") + var s = "//registry.lvh.me/:username = wombat\n" + + "//registry.lvh.me/:_password = YmFkIHBhc3N3b3Jk\n" + + "//registry.lvh.me/:email = lindsay@wdu.org.au\n" + fs.writeFileSync(FIXTURE_PATH, s, "ascii") + fs.chmodSync(FIXTURE_PATH, "0444") + + common.npm( + [ + "config", + "get", + "//registry.lvh.me/:username", + "--userconfig=" + FIXTURE_PATH, + "--registry=http://registry.lvh.me/" + ], + opts, + function (err, code, stdout, stderr) { + t.ifError(err) + + t.equal(stderr, "", "stderr is empty") + t.equal(stdout, "wombat\n", "got usename is output") + t.end() + } + ) +}) + +test("clean", function (t) { + rimraf.sync(pkg) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/config-project.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-project.js new file mode 100644 index 00000000..44eb491f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-project.js @@ -0,0 +1,66 @@ +var test = require("tap").test +var path = require("path") +var fix = path.resolve(__dirname, "..", "fixtures", "config") +var projectRc = path.resolve(fix, ".npmrc") +var npmconf = require("../../lib/config/core.js") +var common = require("./00-config-setup.js") + +var projectData = { just: "testing" } + +var ucData = common.ucData +var envData = common.envData +var envDataFix = common.envDataFix + +var gcData = { "package-config:foo": "boo" } + +var biData = {} + +var cli = { foo: "bar", umask: 022, prefix: fix } + +var expectList = [ + cli, + envDataFix, + projectData, + ucData, + gcData, + biData +] + +var expectSources = { + cli: { data: cli }, + env: { + data: envDataFix, + source: envData, + prefix: "" + }, + project: { + path: projectRc, + type: "ini", + data: projectData + }, + user: { + path: common.userconfig, + type: "ini", + data: ucData + }, + global: { + path: common.globalconfig, + type: "ini", + data: gcData + }, + builtin: { data: biData } +} + +test("no builtin", function (t) { + npmconf.load(cli, function (er, conf) { + if (er) throw er + t.same(conf.list, expectList) + t.same(conf.sources, expectSources) + t.same(npmconf.rootConf.list, []) + t.equal(npmconf.rootConf.root, npmconf.defs.defaults) + t.equal(conf.root, npmconf.defs.defaults) + t.equal(conf.get("umask"), 022) + t.equal(conf.get("heading"), "npm") + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/config-save.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-save.js new file mode 100644 index 00000000..8dba300d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/config-save.js @@ -0,0 +1,88 @@ +var fs = require("fs") +var ini = require("ini") +var test = require("tap").test +var npmconf = require("../../lib/config/core.js") +var common = require("./00-config-setup.js") + +var expectConf = [ + "globalconfig = " + common.globalconfig, + "email = i@izs.me", + "env-thing = asdf", + "init.author.name = Isaac Z. Schlueter", + "init.author.email = i@izs.me", + "init.author.url = http://blog.izs.me/", + "init.version = 1.2.3", + "proprietary-attribs = false", + "npm:publishtest = true", + "_npmjs.org:couch = https://admin:password@localhost:5984/registry", + "npm-www:nocache = 1", + "sign-git-tag = false", + "message = v%s", + "strict-ssl = false", + "_auth = dXNlcm5hbWU6cGFzc3dvcmQ=", + "", + "[_token]", + "AuthSession = yabba-dabba-doodle", + "version = 1", + "expires = 1345001053415", + "path = /", + "httponly = true", + "" +].join("\n") + +var expectFile = [ + "globalconfig = " + common.globalconfig, + "email = i@izs.me", + "env-thing = asdf", + "init.author.name = Isaac Z. Schlueter", + "init.author.email = i@izs.me", + "init.author.url = http://blog.izs.me/", + "init.version = 1.2.3", + "proprietary-attribs = false", + "npm:publishtest = true", + "_npmjs.org:couch = https://admin:password@localhost:5984/registry", + "npm-www:nocache = 1", + "sign-git-tag = false", + "message = v%s", + "strict-ssl = false", + "_auth = dXNlcm5hbWU6cGFzc3dvcmQ=", + "", + "[_token]", + "AuthSession = yabba-dabba-doodle", + "version = 1", + "expires = 1345001053415", + "path = /", + "httponly = true", + "" +].join("\n") + +test("saving configs", function (t) { + npmconf.load(function (er, conf) { + if (er) + throw er + conf.set("sign-git-tag", false, "user") + conf.del("nodedir") + conf.del("tmp") + var foundConf = ini.stringify(conf.sources.user.data) + t.same(ini.parse(foundConf), ini.parse(expectConf)) + fs.unlinkSync(common.userconfig) + conf.save("user", function (er) { + if (er) + throw er + var uc = fs.readFileSync(conf.get("userconfig"), "utf8") + t.same(ini.parse(uc), ini.parse(expectFile)) + t.end() + }) + }) +}) + +test("setting prefix", function (t) { + npmconf.load(function (er, conf) { + if (er) + throw er + + conf.prefix = "newvalue" + t.same(conf.prefix, "newvalue") + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/correct-mkdir.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/correct-mkdir.js new file mode 100644 index 00000000..2a714174 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/correct-mkdir.js @@ -0,0 +1,58 @@ +var test = require('tap').test +var assert = require('assert') +var path = require('path') +var requireInject = require('require-inject') +var cache_dir = path.resolve(__dirname, 'correct-mkdir') + +test('correct-mkdir: no race conditions', function (t) { + var mock_fs = {} + var did_hook = false + mock_fs.stat = function (path, cb) { + if (path === cache_dir) { + // Return a non-matching owner + cb(null, { + uid: +process.uid + 1, + isDirectory: function () { + return true + } + }) + if (!did_hook) { + did_hook = true + doHook() + } + } else { + assert.ok(false, 'Unhandled stat path: ' + path) + } + } + var chown_in_progress = 0 + var mock_chownr = function (path, uid, gid, cb) { + ++chown_in_progress + process.nextTick(function () { + --chown_in_progress + cb(null) + }) + } + var mocks = { + 'graceful-fs': mock_fs, + 'chownr': mock_chownr + } + var correctMkdir = requireInject('../../lib/utils/correct-mkdir.js', mocks) + + var calls_in_progress = 3 + function handleCallFinish () { + t.equal(chown_in_progress, 0, 'should not return while chown still in progress') + if (!--calls_in_progress) { + t.end() + } + } + function doHook () { + // This is fired during the first correctMkdir call, after the stat has finished + // but before the chownr has finished + // Buggy old code will fail and return a cached value before initial call is done + correctMkdir(cache_dir, handleCallFinish) + } + // Initial call + correctMkdir(cache_dir, handleCallFinish) + // Immediate call again in case of race condition there + correctMkdir(cache_dir, handleCallFinish) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/dedupe-scoped.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/dedupe-scoped.js new file mode 100644 index 00000000..6fd05f11 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/dedupe-scoped.js @@ -0,0 +1,147 @@ +var fs = require('fs') +var join = require('path').join + +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var pkg = join(__dirname, 'dedupe-scoped') +var modules = join(pkg, 'node_modules') + +var EXEC_OPTS = { cwd: pkg } + +var prolog = 'dedupe@0.0.0 ' + pkg +var body = function () {/* +├─┬ first@1.0.0 +│ └── @scope/shared@2.1.6 +└─┬ second@2.0.0 + └── @scope/shared@2.1.6 +*/}.toString().split('\n').slice(1, -1) + +var deduper = { + 'name': 'dedupe', + 'version': '0.0.0', + 'dependencies': { + 'first': '1.0.0', + 'second': '2.0.0' + } +} + +var first = { + 'name': 'first', + 'version': '1.0.0', + 'dependencies': { + 'firstUnique': '0.6.0', + '@scope/shared': '2.1.6' + } +} + +var second = { + 'name': 'second', + 'version': '2.0.0', + 'dependencies': { + 'secondUnique': '1.2.0', + '@scope/shared': '2.1.6' + } +} + +var shared = { + 'name': '@scope/shared', + 'version': '2.1.6' +} + +var firstUnique = { + 'name': 'firstUnique', + 'version': '0.6.0' +} + +var secondUnique = { + 'name': 'secondUnique', + 'version': '1.2.0' +} + + +test('setup', function (t) { + setup() + t.end() +}) + +// we like the cars +function ltrimm (l) { return l.trim() } + +test('dedupe finds the common scoped modules and moves it up one level', function (t) { + common.npm( + [ + 'find-dupes' // I actually found a use for this command! + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, 'successful dry run against fake install') + t.notOk(code, 'npm ran without issue') + t.notOk(stderr, 'npm printed no errors') + t.same( + stdout.trim().split('\n').map(ltrimm), + [prolog].concat(body).map(ltrimm), + 'got expected output' + ) + + t.end() + } + ) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup (cb) { + cleanup() + + mkdirp.sync(pkg) + fs.writeFileSync( + join(pkg, 'package.json'), + JSON.stringify(deduper, null, 2) + ) + + mkdirp.sync(join(modules, 'first')) + fs.writeFileSync( + join(modules, 'first', 'package.json'), + JSON.stringify(first, null, 2) + ) + + mkdirp.sync(join(modules, 'first', 'node_modules', 'firstUnique')) + fs.writeFileSync( + join(modules, 'first', 'node_modules', 'firstUnique', 'package.json'), + JSON.stringify(firstUnique, null, 2) + ) + + mkdirp.sync(join(modules, 'first', 'node_modules', '@scope', 'shared')) + fs.writeFileSync( + join(modules, 'first', 'node_modules', '@scope', 'shared', 'package.json'), + JSON.stringify(shared, null, 2) + ) + + mkdirp.sync(join(modules, 'second')) + fs.writeFileSync( + join(modules, 'second', 'package.json'), + JSON.stringify(second, null, 2) + ) + + mkdirp.sync(join(modules, 'second', 'node_modules', 'secondUnique')) + fs.writeFileSync( + join(modules, 'second', 'node_modules', 'secondUnique', 'package.json'), + JSON.stringify(secondUnique, null, 2) + ) + + mkdirp.sync(join(modules, 'second', 'node_modules', '@scope', 'shared')) + fs.writeFileSync( + join(modules, 'second', 'node_modules', '@scope', 'shared', 'package.json'), + JSON.stringify(shared, null, 2) + ) +} + +function cleanup () { + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/dedupe.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/dedupe.js new file mode 100644 index 00000000..28364c33 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/dedupe.js @@ -0,0 +1,86 @@ +var fs = require('graceful-fs') +var path = require('path') +var existsSync = fs.existsSync || path.existsSync + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var server + +var pkg = path.join(__dirname, 'dedupe') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + author: 'Dedupe tester', + name: 'dedupe', + version: '0.0.0', + dependencies: { + optimist: '0.6.0', + clean: '2.1.6' + } +} + +test('setup', function (t) { + t.comment('test for https://github.com/npm/npm/issues/4675') + setup(function () { + t.end() + }) +}) + +test('dedupe finds the common module and moves it up one level', function (t) { + common.npm( + [ + '--registry', common.registry, + 'install', '.' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'successfully installed directory') + t.equal(code, 0, 'npm install exited with code') + common.npm( + [ + 'dedupe' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'successfully deduped against previous install') + t.notOk(code, 'npm dedupe exited with code') + + t.ok(existsSync(path.join(pkg, 'node_modules', 'minimist'))) + t.notOk(existsSync(path.join(pkg, 'node_modules', 'checker'))) + + t.end() + } + ) + }) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + + t.end() +}) + +function cleanup () { + rimraf.sync(pkg) +} + +function setup (cb) { + cleanup() + mkdirp.sync(path.join(pkg, 'node_modules')) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) + + mr({ port: common.port }, function (er, s) { + server = s + cb() + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/deprecate.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/deprecate.js new file mode 100644 index 00000000..9dec66f8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/deprecate.js @@ -0,0 +1,139 @@ +var fs = require('fs') +var path = require('path') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var mr = require('npm-registry-mock') +var semver = require('semver') + +var test = require('tap').test +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'deprecate') +var server + +var cache = { + '_id': 'cond', + '_rev': '19-d458a706de1740662cd7728d7d7ddf07', + 'name': 'cond', + 'time': { + 'modified': '2015-02-13T07:33:58.120Z', + 'created': '2014-03-16T20:52:52.236Z', + '0.0.0': '2014-03-16T20:52:52.236Z', + '0.0.1': '2014-03-16T21:12:33.393Z', + '0.0.2': '2014-03-16T21:15:25.430Z' + }, + 'versions': { + '0.0.0': {}, + '0.0.1': {}, + '0.0.2': {} + }, + 'dist-tags': { + 'latest': '0.0.2' + }, + 'description': 'Restartable error handling system', + 'license': 'CC0' +} + +test('setup', function (t) { + mr({port: common.port}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.ok(true) + t.end() + }) +}) + +test('npm deprecate an unscoped package', function (t) { + var deprecated = JSON.parse(JSON.stringify(cache)) + deprecated.versions = { + '0.0.0': {}, + '0.0.1': { deprecated: 'make it dead' }, + '0.0.2': {} + } + server.get('/cond?write=true').reply(200, cache) + server.put('/cond', deprecated).reply(201, { deprecated: true }) + common.npm([ + 'deprecate', + 'cond@0.0.1', + 'make it dead', + '--registry', common.registry, + '--loglevel', 'silent' + ], {}, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm deprecate') + t.equal(stderr, '', 'no error output') + t.equal(code, 0, 'exited OK') + t.end() + }) +}) + +test('npm deprecate a scoped package', function (t) { + var cacheCopy = JSON.parse(JSON.stringify(cache)) + cacheCopy.name = '@scope/cond' + cacheCopy._id = '@scope/cond' + var deprecated = JSON.parse(JSON.stringify(cacheCopy)) + deprecated.versions = { + '0.0.0': {}, + '0.0.1': { deprecated: 'make it dead' }, + '0.0.2': {} + } + server.get('/@scope%2fcond?write=true').reply(200, cacheCopy) + server.put('/@scope%2fcond', deprecated).reply(201, { deprecated: true }) + common.npm([ + 'deprecate', + '@scope/cond@0.0.1', + 'make it dead', + '--registry', common.registry, + '--loglevel', 'silent' + ], {}, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm deprecate') + t.equal(stderr, '', 'no error output') + t.equal(code, 0, 'exited OK') + t.end() + }) +}) + +test('npm deprecate semver range', function (t) { + var deprecated = JSON.parse(JSON.stringify(cache)) + deprecated.versions = { + '0.0.0': { deprecated: 'make it dead' }, + '0.0.1': { deprecated: 'make it dead' }, + '0.0.2': {} + } + server.get('/cond?write=true').reply(200, cache) + server.put('/cond', deprecated).reply(201, { deprecated: true }) + common.npm([ + 'deprecate', + 'cond@<0.0.2', + 'make it dead', + '--registry', common.registry, + '--loglevel', 'silent' + ], {}, + function (er, code, stdout, stderr) { + t.ifError(er, 'npm deprecate') + t.equal(stderr, '', 'no error output') + t.equal(code, 0, 'exited OK') + t.end() + }) +}) + +test('npm deprecate bad semver range', function (t) { + common.npm([ + 'deprecate', + 'cond@-9001', + 'make it dead', + '--registry', common.registry + ], {}, + function (er, code, stdout, stderr) { + t.equal(code, 1, 'errored') + t.match(stderr, /invalid version range/, 'bad semver') + t.end() + }) +}) + +test('cleanup', function (t) { + server.close() + t.ok(true) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/dist-tag.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/dist-tag.js new file mode 100644 index 00000000..ebd5f98f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/dist-tag.js @@ -0,0 +1,195 @@ +var fs = require("fs") +var path = require("path") +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") +var mr = require("npm-registry-mock") + +var test = require("tap").test +var common = require("../common-tap.js") + +var pkg = path.resolve(__dirname, "dist-tag") +var server + +var scoped = { + name : "@scoped/pkg", + version : "1.1.1" +} + +function mocks (server) { + // ls current package + server.get("/-/package/@scoped%2fpkg/dist-tags") + .reply(200, { latest : "1.0.0", a : "0.0.1", b : "0.5.0" }) + + // ls named package + server.get("/-/package/@scoped%2fanother/dist-tags") + .reply(200, { latest : "2.0.0", a : "0.0.2", b : "0.6.0" }) + + // add c + server.get("/-/package/@scoped%2fanother/dist-tags") + .reply(200, { latest : "2.0.0", a : "0.0.2", b : "0.6.0" }) + server.put("/-/package/@scoped%2fanother/dist-tags/c", "\"7.7.7\"") + .reply(200, { latest : "7.7.7", a : "0.0.2", b : "0.6.0", c : "7.7.7" }) + + // set same version + server.get("/-/package/@scoped%2fanother/dist-tags") + .reply(200, { latest : "2.0.0", b : "0.6.0" }) + + // rm + server.get("/-/package/@scoped%2fanother/dist-tags") + .reply(200, { latest : "2.0.0", a : "0.0.2", b : "0.6.0", c : "7.7.7" }) + server.delete("/-/package/@scoped%2fanother/dist-tags/c") + .reply(200, { c : "7.7.7" }) + + // rm + server.get("/-/package/@scoped%2fanother/dist-tags") + .reply(200, { latest : "4.0.0" }) +} + +test("setup", function (t) { + mkdirp(pkg, function (er) { + t.ifError(er, pkg + " made successfully") + + mr({port : common.port, plugin : mocks}, function (er, s) { + server = s + + fs.writeFile( + path.join(pkg, "package.json"), + JSON.stringify(scoped), + function (er) { + t.ifError(er, "wrote package.json") + t.end() + } + ) + }) + }) +}) + +test("npm dist-tags ls in current package", function (t) { + common.npm( + [ + "dist-tags", "ls", + "--registry", common.registry, + "--loglevel", "silent" + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, "npm access") + t.notOk(code, "exited OK") + t.notOk(stderr, "no error output") + t.equal(stdout, "a: 0.0.1\nb: 0.5.0\nlatest: 1.0.0\n") + + t.end() + } + ) +}) + +test("npm dist-tags ls on named package", function (t) { + common.npm( + [ + "dist-tags", + "ls", "@scoped/another", + "--registry", common.registry, + "--loglevel", "silent" + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, "npm access") + t.notOk(code, "exited OK") + t.notOk(stderr, "no error output") + t.equal(stdout, "a: 0.0.2\nb: 0.6.0\nlatest: 2.0.0\n") + + t.end() + } + ) +}) + +test("npm dist-tags add @scoped/another@7.7.7 c", function (t) { + common.npm( + [ + "dist-tags", + "add", "@scoped/another@7.7.7", "c", + "--registry", common.registry, + "--loglevel", "silent" + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, "npm access") + t.notOk(code, "exited OK") + t.notOk(stderr, "no error output") + t.equal(stdout, "+c: @scoped/another@7.7.7\n") + + t.end() + } + ) +}) + +test("npm dist-tags set same version", function (t) { + common.npm( + [ + "dist-tag", + "set", "@scoped/another@0.6.0", "b", + "--registry", common.registry, + "--loglevel", "warn" + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, "npm access") + t.notOk(code, "exited OK") + t.equal( + stderr, + "npm WARN dist-tag add b is already set to version 0.6.0\n", + "warned about setting same version" + ) + t.notOk(stdout, "only expecting warning message") + + t.end() + } + ) +}) + +test("npm dist-tags rm @scoped/another c", function (t) { + common.npm( + [ + "dist-tags", + "rm", "@scoped/another", "c", + "--registry", common.registry, + "--loglevel", "silent" + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, "npm access") + t.notOk(code, "exited OK") + t.notOk(stderr, "no error output") + t.equal(stdout, "-c: @scoped/another@7.7.7\n") + + t.end() + } + ) +}) + +test("npm dist-tags rm @scoped/another nonexistent", function (t) { + common.npm( + [ + "dist-tags", + "rm", "@scoped/another", "nonexistent", + "--registry", common.registry, + "--loglevel", "silent" + ], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, "npm dist-tag") + t.ok(code, "expecting nonzero exit code") + t.notOk(stderr, "no error output") + t.notOk(stdout, "not expecting output") + + t.end() + } + ) +}) + +test("cleanup", function (t) { + t.pass("cleaned up") + rimraf.sync(pkg) + server.close() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/false-name.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/false-name.js new file mode 100644 index 00000000..a7c9d9a4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/false-name.js @@ -0,0 +1,85 @@ +// this is a test for fix #2538 + +// the false_name-test-package has the name property 'test-package' set +// in the package.json and a dependency named 'test-package' is also a +// defined dependency of 'test-package-with-one-dep'. +// +// this leads to a conflict during installation and the fix is covered +// by this test + +var fs = require('graceful-fs') +var path = require('path') +var existsSync = fs.existsSync || path.existsSync + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.join(__dirname, 'false-name') +var cache = path.join(pkg, 'cache') +var server + +var EXEC_OPTS = { cwd: pkg } + +var indexContent = 'module.exports = true\n' +var json = { + name: 'test-package', + version: '0.0.0', + main: 'index.js', + dependencies: { + 'test-package-with-one-dep': '0.0.0' + } +} + +test('setup', function (t) { + t.comment('test for https://github.com/npm/npm/issues/2538') + setup() + mr({ port: common.port }, function (er, s) { + server = s + t.end() + }) +}) + +test('not every pkg.name can be required', function (t) { + common.npm( + [ + 'install', '.', + '--cache', cache, + '--registry', common.registry + ], + EXEC_OPTS, + function (err, code) { + t.ifErr(err, 'install finished without error') + t.equal(code, 0, 'install exited ok') + t.ok(existsSync(path.join( + pkg, + 'node_modules/test-package-with-one-dep', + 'node_modules/test-package' + )), 'package installed OK') + t.end() + } + ) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.end() +}) + +function cleanup () { + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(cache) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + fs.writeFileSync(path.join(pkg, 'index.js'), indexContent) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/files-and-ignores.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/files-and-ignores.js new file mode 100644 index 00000000..73fe73fd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/files-and-ignores.js @@ -0,0 +1,558 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var fs = require('graceful-fs') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-files') +var modulepath = path.resolve(basepath, 'node_modules') +var installedpath = path.resolve(modulepath, 'npm-test-files') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +test('basic file inclusion', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5', + files: [ + 'include', + 'sub/include' + ] + }), + include: File(''), + sub: Dir({ include: File('') }), + notincluded: File('') + }) + ) + withFixture(t, fixture, function (done) { + t.ok(fileExists('include'), 'toplevel file included') + t.ok(fileExists('sub/include'), 'nested file included') + t.notOk(fileExists('notincluded'), 'unspecified file not included') + done() + }) +}) + +test('basic file exclusion', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5' + }), + '.npmignore': File( + 'ignore\n' + + 'sub/ignore\n' + ), + include: File(''), + ignore: File(''), + sub: Dir({ ignore: File('') }) + }) + ) + withFixture(t, fixture, function (done) { + t.notOk(fileExists('ignore'), 'toplevel file excluded') + t.notOk(fileExists('sub/ignore'), 'nested file excluded') + t.ok(fileExists('include'), 'unignored file included') + done() + }) +}) + +test('toplevel-only and blanket ignores', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5' + }), + '.npmignore': File( + './shallow1\n' + + '/shallow2\n' + + '/sub/onelevel\n' + + 'deep\n' + + '' + ), + shallow1: File(''), + shallow2: File(''), + deep: File(''), + sub: Dir({ + shallow1: File(''), + shallow2: File(''), + onelevel: File(''), + deep: File(''), + sub: Dir({ + deep: File(''), + onelevel: File('') + }) + }) + }) + ) + withFixture(t, fixture, function (done) { + t.notOk(fileExists('shallow2'), '/ file excluded') + t.ok(fileExists('sub/shallow1'), 'nested ./ file included') + t.ok(fileExists('sub/shallow2'), 'nested / file included') + t.ok(fileExists('sub/sub/onelevel'), 'double-nested file included') + t.notOk(fileExists('sub/onelevel'), 'nested / file excluded') + t.notOk(fileExists('deep'), 'deep file excluded') + t.notOk(fileExists('sub/deep'), 'nested deep file excluded') + t.notOk(fileExists('sub/sub/deep'), 'double-nested deep file excluded') + t.ok(fileExists('shallow1'), './ file included') + done() + }) +}) + +test('.npmignore works for nested directories recursively', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5' + }), + '.npmignore': File( + '/ignore\n' + + 'deep\n' + ), + include: File(''), + ignore: File(''), + deep: File(''), + sub: Dir({ + ignore: File(''), + include: File(''), + deep: File(''), + sub: Dir({ + '.npmignore': File( + '/ignore\n' + ), + ignore: File(''), + include: File(''), + deep: File('') + }) + }) + }) + ) + withFixture(t, fixture, function (done) { + t.notOk(fileExists('ignore'), 'toplevel file excluded') + t.ok(fileExists('include'), 'unignored file included') + t.ok(fileExists('sub/ignore'), 'same-name file in nested dir included') + t.ok(fileExists('sub/include'), 'unignored nested dir file included') + t.notOk(fileExists('sub/sub/ignore'), 'sub-sub-directory file excluded') + t.ok(fileExists('sub/sub/include'), 'sub-sube-directory file included') + t.notOk(fileExists('deep'), 'deep file excluded') + t.notOk(fileExists('sub/deep'), 'sub-dir deep file excluded') + t.notOk(fileExists('sub/sub/deep'), 'sub-sub-dir deep file excluded') + done() + }) +}) + +test('.gitignore should have identical semantics', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5' + }), + '.gitignore': File( + './shallow1\n' + + '/shallow2\n' + + '/sub/onelevel\n' + + 'deep\n' + + '' + ), + shallow1: File(''), + shallow2: File(''), + deep: File(''), + sub: Dir({ + shallow1: File(''), + shallow2: File(''), + onelevel: File(''), + deep: File(''), + sub: Dir({ + deep: File(''), + onelevel: File('') + }) + }) + }) + ) + withFixture(t, fixture, function (done) { + t.notOk(fileExists('shallow2'), '/ file excluded') + t.ok(fileExists('sub/shallow1'), 'nested ./ file included') + t.ok(fileExists('sub/shallow2'), 'nested / file included') + t.ok(fileExists('sub/sub/onelevel'), 'double-nested file included') + t.notOk(fileExists('sub/onelevel'), 'nested / file excluded') + t.notOk(fileExists('deep'), 'deep file excluded') + t.notOk(fileExists('sub/deep'), 'nested deep file excluded') + t.notOk(fileExists('sub/sub/deep'), 'double-nested deep file excluded') + t.ok(fileExists('shallow1'), './ file included') + done() + }) +}) + +test('.npmignore should always be overridden by files array', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5', + files: [ + 'include', + 'sub' + ] + }), + '.npmignore': File( + 'include\n' + + 'ignore\n' + + 'sub/included\n' + ), + include: File(''), + ignore: File(''), + sub: Dir({ + include: File('') + }) + }) + ) + withFixture(t, fixture, function (done) { + t.notOk(fileExists('ignore'), 'toplevel file excluded') + t.ok(fileExists('include'), 'unignored file included') + t.ok(fileExists('sub/include'), 'nested file included') + done() + }) +}) + +test('.gitignore supported for ignores', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5' + }), + '.gitignore': File( + 'ignore\n' + + 'sub/ignore\n' + ), + include: File(''), + ignore: File(''), + sub: Dir({ ignore: File('') }) + }) + ) + withFixture(t, fixture, function (done) { + t.notOk(fileExists('ignore'), 'toplevel file excluded') + t.notOk(fileExists('sub/ignore'), 'nested file excluded') + t.ok(fileExists('include'), 'unignored file included') + done() + }) +}) + +test('.npmignore completely overrides .gitignore', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5' + }), + '.npmignore': File( + 'ignore\n' + + 'sub/ignore\n' + ), + '.gitignore': File( + 'include\n' + + 'sub/include\n' + + 'extra\n' + ), + include: File(''), + sub: Dir({ include: File('') }), + extra: File('') + }) + ) + withFixture(t, fixture, function (done) { + t.ok(fileExists('include'), 'gitignored toplevel file included') + t.ok(fileExists('extra'), 'gitignored extra toplevel file included') + t.ok(fileExists('sub/include'), 'gitignored nested file included') + t.notOk(fileExists('ignore'), 'toplevel file excluded') + t.notOk(fileExists('sub/ignore'), 'nested file excluded') + done() + }) +}) + +test('files array overrides .npmignore', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5', + files: [ + 'include', + 'sub/include' + ] + }), + '.npmignore': File( + 'include\n' + + 'sub/include\n' + ), + include: File(''), + sub: Dir({ include: File('') }) + }) + ) + withFixture(t, fixture, function (done) { + t.ok(fileExists('include'), 'toplevel file included') + t.ok(fileExists('sub/include'), 'nested file included') + done() + }) +}) + +test('includes files regardless of emptiness', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5', + files: [ + 'full', + 'empty' + ] + }), + full: File('This file has contents~'), + empty: File('') + }) + ) + withFixture(t, fixture, function (done) { + t.ok(fileExists('full'), 'contentful file included') + t.ok(fileExists('empty'), 'empty file included') + done() + }) +}) + +test('.npmignore itself gets included', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5', + files: [ + '.npmignore' + ] + }), + '.npmignore': File('') + }) + ) + withFixture(t, fixture, function (done) { + t.ok(fileExists('.npmignore'), '.npmignore included') + done() + }) +}) + +test('include default files when missing files spec', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5' + }), + 'index.js': File(''), + foo: File(''), + node_modules: Dir({foo: Dir({bar: File('')})}) + }) + ) + withFixture(t, fixture, function (done) { + t.ok(fileExists('index.js'), 'index.js included') + t.ok(fileExists('foo'), 'foo included') + t.notOk(fileExists('node_modules'), 'node_modules not included') + done() + }) +}) + +test('include main file', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5', + main: 'foo.js', + files: [] + }), + 'index.js': File(''), + 'foo.js': File('') + }) + ) + withFixture(t, fixture, function (done) { + t.ok(fileExists('foo.js'), 'foo.js included because of main') + t.notOk(fileExists('index.js'), 'index.js not included') + done() + }) +}) + +test('certain files ignored unconditionally', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5', + files: [ + '.git', + '.svn', + 'CVS', + '.hg', + '.lock-wscript', + '.wafpickle-0', + '.wafpickle-5', + '.wafpickle-50', + 'build/config.gypi', + 'npm-debug.log', + '.npmrc', + '.foo.swp', + '.DS_Store', + '._ohno' + ] + }), + '.git': Dir({foo: File('')}), + '.svn': Dir({foo: File('')}), + 'CVS': Dir({foo: File('')}), + '.hg': Dir({foo: File('')}), + '.lock-wscript': File(''), + '.wafpickle-0': File(''), + '.wafpickle-5': File(''), + '.wafpickle-50': File(''), + 'build': Dir({'config.gypi': File('')}), + 'npm-debug.log': File(''), + '.npmrc': File(''), + '.foo.swp': File(''), + '.DS_Store': Dir({foo: File('')}), + '._ohno': File(''), + '._ohnoes': Dir({noes: File('')}) + }) + ) + withFixture(t, fixture, function (done) { + t.notOk(fileExists('.git'), '.git not included') + t.notOk(fileExists('.svn'), '.svn not included') + t.notOk(fileExists('CVS'), 'CVS not included') + t.notOk(fileExists('.hg'), '.hg not included') + t.notOk(fileExists('.lock-wscript'), '.lock-wscript not included') + t.notOk(fileExists('.wafpickle-0'), '.wafpickle-0 not included') + t.notOk(fileExists('.wafpickle-5'), '.wafpickle-5 not included') + t.notOk(fileExists('.wafpickle-50'), '.wafpickle-50 not included') + t.notOk(fileExists('build/config.gypi'), 'build/config.gypi not included') + t.notOk(fileExists('npm-debug.log'), 'npm-debug.log not included') + t.notOk(fileExists('.npmrc'), '.npmrc not included') + t.notOk(fileExists('.foo.swp'), '.foo.swp not included') + t.notOk(fileExists('.DS_Store'), '.DS_Store not included') + t.notOk(fileExists('._ohno'), '._ohno not included') + t.notOk(fileExists('._ohnoes'), '._ohnoes not included') + done() + }) +}) + +test('certain files included unconditionally', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5' + }), + '.npmignore': File( + 'package.json', + 'README', + 'Readme', + 'readme.md', + 'readme.randomext', + 'changelog', + 'CHAngelog', + 'ChangeLOG.txt', + 'license', + 'licence', + 'LICENSE', + 'LICENCE' + ), + 'README': File(''), + 'Readme': File(''), + 'readme.md': File(''), + 'readme.randomext': File(''), + 'changelog': File(''), + 'CHAngelog': File(''), + 'ChangeLOG.txt': File(''), + 'license': File(''), + 'licence': File(''), + 'LICENSE': File(''), + 'LICENCE': File('') + }) + ) + withFixture(t, fixture, function (done) { + t.ok(fileExists('package.json'), 'package.json included') + t.ok(fileExists('README'), 'README included') + t.ok(fileExists('Readme'), 'Readme included') + t.ok(fileExists('readme.md'), 'readme.md included') + t.ok(fileExists('readme.randomext'), 'readme.randomext included') + t.ok(fileExists('changelog'), 'changelog included') + t.ok(fileExists('CHAngelog'), 'CHAngelog included') + t.ok(fileExists('ChangeLOG.txt'), 'ChangeLOG.txt included') + t.ok(fileExists('license'), 'license included') + t.ok(fileExists('licence'), 'licence included') + t.ok(fileExists('LICENSE'), 'LICENSE included') + t.ok(fileExists('LICENCE'), 'LICENCE included') + done() + }) +}) + +test('folder-based inclusion works', function (t) { + var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'npm-test-files', + version: '1.2.5', + files: [ + 'sub1/sub', + 'sub2' + ] + }), + sub1: Dir({ + sub: Dir({ + include1: File(''), + include2: File('') + }), + ignored: File('') + }), + sub2: Dir({ + include1: File(''), + include2: File(''), + empty: Dir({}) + }) + }) + ) + withFixture(t, fixture, function (done) { + t.ok(fileExists('sub1/sub/include1'), 'nested dir included') + t.ok(fileExists('sub1/sub/include2'), 'nested dir included') + t.notOk(fileExists('sub1/ignored'), 'unspecified file not included') + + t.ok(fileExists('sub2/include1'), 'dir contents included') + t.ok(fileExists('sub2/include2'), 'dir contents included') + t.notOk(fileExists('sub2/empty'), 'empty dir not included') + + done() + }) +}) + +function fileExists (file) { + try { + return !!fs.statSync(path.resolve(installedpath, file)) + } catch (_) { + return false + } +} + +function withFixture (t, fixture, tester) { + fixture.create(fixturepath) + mkdirp.sync(modulepath) + common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest) + function installCheckAndTest (err, code) { + if (err) throw err + t.is(code, 0, 'install went ok') + tester(removeAndDone) + } + function removeAndDone (err) { + if (err) throw err + fixture.remove(fixturepath) + rimraf.sync(basepath) + t.done() + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/gently-rm-overeager.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/gently-rm-overeager.js new file mode 100644 index 00000000..9bf9d1e9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/gently-rm-overeager.js @@ -0,0 +1,62 @@ +var resolve = require("path").resolve +var fs = require("graceful-fs") +var test = require("tap").test +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") + +var common = require("../common-tap.js") + +var pkg = resolve(__dirname, "gently-rm-overeager") +var dep = resolve(__dirname, "test-whoops") + +var EXEC_OPTS = { + cwd : pkg +} + +var fixture = { + name: "@test/whoops", + version: "1.0.0", + scripts: { + postinstall: "echo \"nope\" && exit 1" + } +} + +test("setup", function (t) { + cleanup() + setup() + + t.end() +}) + +test("cache add", function (t) { + common.npm(["install", "../test-whoops"], EXEC_OPTS, function (er, c) { + t.ifError(er, "test-whoops install didn't explode") + t.ok(c, "test-whoops install also failed") + fs.readdir(pkg, function (er, files) { + t.ifError(er, "package directory is still there") + t.deepEqual(files, ["npm-debug.log"], "only debug log remains") + + t.end() + }) + }) +}) + +test("cleanup", function (t) { + cleanup() + + t.end() +}) + + +function cleanup () { + rimraf.sync(pkg) + rimraf.sync(dep) +} + +function setup () { + mkdirp.sync(pkg) + // so it doesn't try to install into npm's own node_modules + mkdirp.sync(resolve(pkg, "node_modules")) + mkdirp.sync(dep) + fs.writeFileSync(resolve(dep, "package.json"), JSON.stringify(fixture)) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/gently-rm-symlink.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/gently-rm-symlink.js new file mode 100644 index 00000000..03b03e95 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/gently-rm-symlink.js @@ -0,0 +1,113 @@ +var resolve = require("path").resolve +var fs = require("graceful-fs") +var test = require("tap").test +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") + +var common = require("../common-tap.js") + +var pkg = resolve(__dirname, "gently-rm-linked") +var dep = resolve(__dirname, "test-linked") +var glb = resolve(__dirname, "test-global") +var lnk = resolve(__dirname, "test-global-link") + +var EXEC_OPTS = { + cwd : pkg +} + + +var index = "module.exports = function () { console.log('whoop whoop') }" + +var fixture = { + name: "@test/linked", + version: "1.0.0", + bin: { + linked: "./index.js" + } +} + +test("setup", function (t) { + cleanup() + setup() + + t.end() +}) + +test("install and link", function (t) { + common.npm( + [ + "--global", + "--prefix", lnk, + "--loglevel", "silent", + "install", "../test-linked" + ], + EXEC_OPTS, + function (er, code, stdout, stderr) { + t.ifError(er, "test-linked install didn't explode") + t.notOk(code, "test-linked install also failed") + t.notOk(stderr, "no log output") + + verify(t, stdout) + + // again, to make sure unlinking works properlyt + common.npm( + [ + "--global", + "--prefix", lnk, + "--loglevel", "silent", + "install", "../test-linked" + ], + EXEC_OPTS, + function (er, code, stdout, stderr) { + t.ifError(er, "test-linked install didn't explode") + t.notOk(code, "test-linked install also failed") + t.notOk(stderr, "no log output") + + verify(t, stdout) + + fs.readdir(pkg, function (er, files) { + t.ifError(er, "package directory is still there") + t.deepEqual(files, ["node_modules"], "only stub modules dir remains") + + t.end() + }) + } + ) + } + ) +}) + +test("cleanup", function (t) { + cleanup() + + t.end() +}) + +function verify (t, stdout) { + var binPath = resolve(lnk, "bin", "linked") + var pkgPath = resolve(lnk, "lib", "node_modules", "@test", "linked") + var trgPath = resolve(pkgPath, "index.js") + t.equal( + stdout, + binPath+" -> "+trgPath+"\n@test/linked@1.0.0 "+pkgPath+"\n", + "got expected install output" + ) +} + +function cleanup () { + rimraf.sync(pkg) + rimraf.sync(dep) + rimraf.sync(lnk) + rimraf.sync(glb) +} + +function setup () { + mkdirp.sync(pkg) + mkdirp.sync(glb) + fs.symlinkSync(glb, lnk) + // so it doesn't try to install into npm's own node_modules + mkdirp.sync(resolve(pkg, "node_modules")) + mkdirp.sync(dep) + fs.writeFileSync(resolve(dep, "package.json"), JSON.stringify(fixture)) + fs.writeFileSync(resolve(dep, "index.js"), index) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/get.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/get.js new file mode 100644 index 00000000..1e598147 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/get.js @@ -0,0 +1,126 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var cacheFile = require("npm-cache-filename") +var npm = require("../../") +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") +var path = require("path") +var mr = require("npm-registry-mock") +var fs = require("graceful-fs") + +function nop () {} + +var URI = "https://npm.registry:8043/rewrite" +var TIMEOUT = 3600 +var FOLLOW = false +var STALE_OK = true +var TOKEN = "lolbutts" +var AUTH = { + token : TOKEN +} +var PARAMS = { + timeout : TIMEOUT, + follow : FOLLOW, + staleOk : STALE_OK, + auth : AUTH +} +var PKG_DIR = path.resolve(__dirname, "get-basic") +var CACHE_DIR = path.resolve(PKG_DIR, "cache") +var BIGCO_SAMPLE = { + name : "@bigco/sample", + version : "1.2.3" +} + +// mock server reference +var server + +var mocks = { + "get": { + "/@bigco%2fsample/1.2.3" : [200, BIGCO_SAMPLE] + } +} + +var mapper = cacheFile(CACHE_DIR) + +function getCachePath (uri) { + return path.join(mapper(uri), ".cache.json") +} + +test("setup", function (t) { + mkdirp.sync(CACHE_DIR) + + mr({port: common.port, mocks: mocks}, function (er, s) { + t.ifError(er) + npm.load({cache: CACHE_DIR, registry: common.registry}, function (er) { + t.ifError(er) + server = s + t.end() + }) + }) +}) + +test("get call contract", function (t) { + t.throws(function () { + npm.registry.get(undefined, PARAMS, nop) + }, "requires a URI") + + t.throws(function () { + npm.registry.get([], PARAMS, nop) + }, "requires URI to be a string") + + t.throws(function () { + npm.registry.get(URI, undefined, nop) + }, "requires params object") + + t.throws(function () { + npm.registry.get(URI, "", nop) + }, "params must be object") + + t.throws(function () { + npm.registry.get(URI, PARAMS, undefined) + }, "requires callback") + + t.throws(function () { + npm.registry.get(URI, PARAMS, "callback") + }, "callback must be function") + + t.end() +}) + +test("basic request", function (t) { + t.plan(9) + + var versioned = common.registry + "/underscore/1.3.3" + npm.registry.get(versioned, PARAMS, function (er, data) { + t.ifError(er, "loaded specified version underscore data") + t.equal(data.version, "1.3.3") + fs.stat(getCachePath(versioned), function (er) { + t.ifError(er, "underscore 1.3.3 cache data written") + }) + }) + + var rollup = common.registry + "/underscore" + npm.registry.get(rollup, PARAMS, function (er, data) { + t.ifError(er, "loaded all metadata") + t.deepEqual(data.name, "underscore") + fs.stat(getCachePath(rollup), function (er) { + t.ifError(er, "underscore rollup cache data written") + }) + }) + + var scoped = common.registry + "/@bigco%2fsample/1.2.3" + npm.registry.get(scoped, PARAMS, function (er, data) { + t.ifError(er, "loaded all metadata") + t.equal(data.name, "@bigco/sample") + fs.stat(getCachePath(scoped), function (er) { + t.ifError(er, "scoped cache data written") + }) + }) +}) + +test("cleanup", function (t) { + server.close() + rimraf.sync(PKG_DIR) + + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-short-shortcut-package.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-short-shortcut-package.js new file mode 100644 index 00000000..77486ac4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-short-shortcut-package.js @@ -0,0 +1,84 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'gist-short-shortcut-package') + +var json = { + name: 'gist-short-shortcut-package', + version: '0.0.0', + dependencies: { + 'private-gist': 'gist:deadbeef' + } +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('gist-short-shortcut-package', function (t) { + var cloneUrls = [ + ['git://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try git URLs first'], + ['https://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try HTTPS URLs second'], + ['git@gist.github.com:/deadbeef.git', 'GitHub gist shortcuts try SSH third'] + ] + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install([], function (er, result) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-short-shortcut.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-short-shortcut.js new file mode 100644 index 00000000..8f68ce39 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-short-shortcut.js @@ -0,0 +1,81 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'gist-short-shortcut') + +var json = { + name: 'gist-short-shortcut', + version: '0.0.0' +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('gist-shortcut', function (t) { + var cloneUrls = [ + ['git://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try git URLs first'], + ['https://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try HTTPS URLs second'], + ['git@gist.github.com:/deadbeef.git', 'GitHub gist shortcuts try SSH third'] + ] + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install(['gist:deadbeef'], function (er, result) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-shortcut-package.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-shortcut-package.js new file mode 100644 index 00000000..1a8115b7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-shortcut-package.js @@ -0,0 +1,84 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'gist-shortcut-package') + +var json = { + name: 'gist-shortcut-package', + version: '0.0.0', + dependencies: { + 'private-gist': 'gist:foo/deadbeef' + } +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('gist-shortcut-package', function (t) { + var cloneUrls = [ + ['git://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try git URLs first'], + ['https://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try HTTPS URLs second'], + ['git@gist.github.com:/deadbeef.git', 'GitHub gist shortcuts try SSH third'] + ] + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install([], function (er, result) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-shortcut.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-shortcut.js new file mode 100644 index 00000000..fce4a5ea --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/gist-shortcut.js @@ -0,0 +1,81 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'gist-shortcut') + +var json = { + name: 'gist-shortcut', + version: '0.0.0' +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('gist-shortcut', function (t) { + var cloneUrls = [ + ['git://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try git URLs first'], + ['https://gist.github.com/deadbeef.git', 'GitHub gist shortcuts try HTTPS URLs second'], + ['git@gist.github.com:/deadbeef.git', 'GitHub gist shortcuts try SSH third'] + ] + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install(['gist:foo/deadbeef'], function (er, result) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/git-cache-locking.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/git-cache-locking.js new file mode 100644 index 00000000..ca3f7acc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/git-cache-locking.js @@ -0,0 +1,46 @@ +var test = require('tap').test +var common = require('../common-tap') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var pkg = path.resolve(__dirname, 'git-cache-locking') +var tmp = path.join(pkg, 'tmp') +var cache = path.join(pkg, 'cache') + +test('setup', function (t) { + rimraf.sync(pkg) + mkdirp.sync(path.resolve(pkg, 'node_modules')) + t.end() +}) + +test('git-cache-locking: install a git dependency', function (t) { + // disable git integration tests on Travis. + if (process.env.TRAVIS) return t.end() + + // package c depends on a.git#master and b.git#master + // package b depends on a.git#master + common.npm([ + 'install', + 'git://github.com/nigelzor/npm-4503-c.git' + ], { + cwd: pkg, + env: { + npm_config_cache: cache, + npm_config_tmp: tmp, + npm_config_prefix: pkg, + npm_config_global: 'false', + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH + } + }, function (err, code, stdout, stderr) { + t.ifErr(err, 'npm install finished without error') + t.equal(0, code, 'npm install should succeed') + t.end() + }) +}) + +test('cleanup', function (t) { + rimraf.sync(pkg) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/git-cache-no-hooks.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/git-cache-no-hooks.js new file mode 100644 index 00000000..09dc7069 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/git-cache-no-hooks.js @@ -0,0 +1,63 @@ +var test = require("tap").test + , fs = require("fs") + , path = require("path") + , rimraf = require("rimraf") + , mkdirp = require("mkdirp") + , spawn = require("child_process").spawn + , npmCli = require.resolve("../../bin/npm-cli.js") + , node = process.execPath + , pkg = path.resolve(__dirname, "git-cache-no-hooks") + , tmp = path.join(pkg, "tmp") + , cache = path.join(pkg, "cache") + + +test("setup", function (t) { + rimraf.sync(pkg) + mkdirp.sync(pkg) + mkdirp.sync(cache) + mkdirp.sync(tmp) + mkdirp.sync(path.resolve(pkg, "node_modules")) + t.end() +}) + +test("git-cache-no-hooks: install a git dependency", function (t) { + + // disable git integration tests on Travis. + if (process.env.TRAVIS) return t.end() + + var command = [ npmCli + , "install" + , "git://github.com/nigelzor/npm-4503-a.git" + ] + var child = spawn(node, command, { + cwd: pkg, + env: { + "npm_config_cache" : cache, + "npm_config_tmp" : tmp, + "npm_config_prefix" : pkg, + "npm_config_global" : "false", + "npm_config_umask" : "00", + HOME : process.env.HOME, + Path : process.env.PATH, + PATH : process.env.PATH + }, + stdio: "inherit" + }) + + child.on("close", function (code) { + t.equal(code, 0, "npm install should succeed") + + // verify permissions on git hooks + var repoDir = "git-github-com-nigelzor-npm-4503-a-git-40c5cb24" + var hooksPath = path.join(cache, "_git-remotes", repoDir, "hooks") + fs.readdir(hooksPath, function (err) { + t.equal(err && err.code, "ENOENT", "hooks are not brought along with repo") + t.end() + }) + }) +}) + +test("cleanup", function (t) { + rimraf.sync(pkg) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/git-dependency-install-link.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/git-dependency-install-link.js new file mode 100644 index 00000000..804db3de --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/git-dependency-install-link.js @@ -0,0 +1,175 @@ +var fs = require('fs') +var resolve = require('path').resolve + +var osenv = require('osenv') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test +var readJson = require('read-package-json') +var mr = require('npm-registry-mock') + +var npm = require('../../lib/npm.js') +var common = require('../common-tap.js') + +var pkg = resolve(__dirname, 'git-dependency-install-link') +var repo = resolve(__dirname, 'git-dependency-install-link-repo') +var cache = resolve(pkg, 'cache') + +var daemon +var daemonPID +var git +var mockRegistry + +var EXEC_OPTS = { + registry: common.registry, + cwd: pkg, + cache: cache +} + +var pjParent = JSON.stringify({ + name: 'parent', + version: '1.2.3', + dependencies: { + 'child': 'git://localhost:1234/child.git' + } +}, null, 2) + '\n' + +var pjChild = JSON.stringify({ + name: 'child', + version: '1.0.3' +}, null, 2) + '\n' + + +test('setup', function (t) { + bootstrap() + setup(function (er, r) { + t.ifError(er, 'git started up successfully') + + if (!er) { + daemon = r[r.length - 2] + daemonPID = r[r.length - 1] + } + + mr({ + port: common.port + }, function (er, server) { + t.ifError(er, 'started mock registry') + mockRegistry = server + + t.end() + }) + }) +}) + +test('install from git repo [no --link]', function (t) { + process.chdir(pkg) + + common.npm(['install', '--loglevel', 'error'], EXEC_OPTS, function (err, code, stdout, stderr) { + t.ifError(err, 'npm install failed') + + t.dissimilar(stderr, /Command failed:/, 'expect git to succeed') + t.dissimilar(stderr, /version not found/, 'should not go to repository') + + readJson(resolve(pkg, 'node_modules', 'child', 'package.json'), function (err, data) { + t.ifError(err, 'error reading child package.json') + + t.equal(data && data.version, '1.0.3') + t.end() + }) + }) +}) + +test('install from git repo [with --link]', function (t) { + process.chdir(pkg) + rimraf.sync(resolve(pkg, 'node_modules')) + + common.npm(['install', '--link', '--loglevel', 'error'], EXEC_OPTS, function (err, code, stdout, stderr) { + t.ifError(err, 'npm install --link failed') + + t.dissimilar(stderr, /Command failed:/, 'expect git to succeed') + t.dissimilar(stderr, /version not found/, 'should not go to repository') + + readJson(resolve(pkg, 'node_modules', 'child', 'package.json'), function (err, data) { + t.ifError(err, 'error reading child package.json') + + t.equal(data && data.version, '1.0.3') + t.end() + }) + }) +}) + +test('clean', function (t) { + mockRegistry.close() + daemon.on('close', function () { + cleanup() + t.end() + }) + process.kill(daemonPID) +}) + +function bootstrap () { + rimraf.sync(repo) + rimraf.sync(pkg) + mkdirp.sync(pkg) + mkdirp.sync(cache) + + fs.writeFileSync(resolve(pkg, 'package.json'), pjParent) +} + +function setup (cb) { + mkdirp.sync(repo) + fs.writeFileSync(resolve(repo, 'package.json'), pjChild) + npm.load({ + link: true, + prefix: pkg, + loglevel: 'silent' + }, function () { + git = require('../../lib/utils/git.js') + + function startDaemon (cb) { + // start git server + var d = git.spawn( + [ + 'daemon', + '--verbose', + '--listen=localhost', + '--export-all', + '--base-path=.', + '--reuseaddr', + '--port=1234' + ], + { + cwd: pkg, + env: process.env, + stdio: ['pipe', 'pipe', 'pipe'] + } + ) + d.stderr.on('data', childFinder) + + function childFinder (c) { + var cpid = c.toString().match(/^\[(\d+)\]/) + if (cpid[1]) { + this.removeListener('data', childFinder) + cb(null, [d, cpid[1]]) + } + } + } + + common.makeGitRepo({ + path: repo, + commands: [ + git.chainableExec( + ['clone', '--bare', repo, 'child.git'], + { cwd: pkg, env: process.env } + ), + startDaemon + ] + }, cb) + }) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(repo) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/git-npmignore.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/git-npmignore.js new file mode 100644 index 00000000..a680a456 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/git-npmignore.js @@ -0,0 +1,173 @@ +var cat = require("graceful-fs").writeFileSync +var exec = require("child_process").exec +var readdir = require("graceful-fs").readdirSync +var resolve = require("path").resolve + +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") +var test = require("tap").test +var tmpdir = require("osenv").tmpdir +var which = require("which") + +var common = require("../common-tap.js") + +var pkg = resolve(__dirname, "git-npmignore") +var dep = resolve(pkg, "deps", "gitch") +var packname = "gitch-1.0.0.tgz" +var packed = resolve(pkg, packname) +var modules = resolve(pkg, "node_modules") +var installed = resolve(modules, "gitch") +var expected = [ + "a.js", + "package.json", + ".npmignore" +].sort() + +var EXEC_OPTS = { + cwd : pkg +} + +var gitignore = "node_modules/\n" +var npmignore = "t.js\n" + +var a = "console.log('hi');" +var t = "require('tap').test(function (t) { t.pass('I am a test!'); t.end(); });" +var fixture = { + "name" : "gitch", + "version" : "1.0.0", + "private" : true, + "main" : "a.js" +} + + +test("setup", function (t) { + setup(function (er) { + t.ifError(er, "setup ran OK") + + t.end() + }) +}) + +test("npm pack directly from directory", function (t) { + packInstallTest(dep, t) +}) + +test("npm pack via git", function (t) { + packInstallTest("git+file://"+dep, t) +}) + +test("cleanup", function (t) { + cleanup() + + t.end() +}) + +function packInstallTest (spec, t) { + common.npm( + [ + "--loglevel", "silent", + "pack", spec + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, "npm pack ran without error") + t.notOk(code, "npm pack exited cleanly") + t.notOk(stderr, "npm pack ran silently") + t.equal(stdout.trim(), packname, "got expected package name") + + common.npm( + [ + "--loglevel", "silent", + "install", packed + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, "npm install ran without error") + t.notOk(code, "npm install exited cleanly") + t.notOk(stderr, "npm install ran silently") + + var actual = readdir(installed).sort() + t.same(actual, expected, "no unexpected files in packed directory") + + rimraf(packed, function () { + t.end() + }) + } + ) + } + ) +} + +function cleanup () { + process.chdir(tmpdir()) + rimraf.sync(pkg) +} + +function setup (cb) { + cleanup() + + mkdirp.sync(modules) + mkdirp.sync(dep) + + process.chdir(dep) + + cat(resolve(dep, ".npmignore"), npmignore) + cat(resolve(dep, ".gitignore"), gitignore) + cat(resolve(dep, "a.js"), a) + cat(resolve(dep, "t.js"), t) + cat(resolve(dep, "package.json"), JSON.stringify(fixture)) + + common.npm( + [ + "--loglevel", "silent", + "cache", "clean" + ], + EXEC_OPTS, + function (er, code, _, stderr) { + if (er) return cb(er) + if (code) return cb(new Error("npm cache nonzero exit: "+code)) + if (stderr) return cb(new Error("npm cache clean error: "+stderr)) + + which("git", function found (er, git) { + if (er) return cb(er) + + exec(git+" init", init) + + function init (er, _, stderr) { + if (er) return cb(er) + if (stderr) return cb(new Error("git init error: "+stderr)) + + exec(git+" config user.name 'Phantom Faker'", user) + } + + function user (er, _, stderr) { + if (er) return cb(er) + if (stderr) return cb(new Error("git config error: "+stderr)) + + exec(git+" config user.email nope@not.real", email) + } + + function email (er, _, stderr) { + if (er) return cb(er) + if (stderr) return cb(new Error("git config error: "+stderr)) + + exec(git+" add .", addAll) + } + + function addAll (er, _, stderr) { + if (er) return cb(er) + if (stderr) return cb(new Error("git add . error: "+stderr)) + + exec(git+" commit -m boot", commit) + } + + function commit (er, _, stderr) { + if (er) return cb(er) + if (stderr) return cb(new Error("git commit error: "+stderr)) + + cb() + } + }) + } + ) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/git-races.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/git-races.js new file mode 100644 index 00000000..3f6ae3ed --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/git-races.js @@ -0,0 +1,212 @@ +var execFile = require('child_process').execFile +var path = require('path') +var zlib = require('zlib') + +var asyncMap = require('slide').asyncMap +var deepEqual = require('deep-equal') +var fs = require('graceful-fs') +var mkdirp = require('mkdirp') +var once = require('once') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var tar = require('tar') +var test = require('tap').test +var tmpdir = require('osenv').tmpdir +var which = require('which') + +var wd = path.resolve(tmpdir(), 'git-races') +var fixtures = path.resolve(__dirname, '../fixtures') +var testcase = 'github-com-BryanDonovan-npm-git-test' +var testcase_git = path.resolve(wd, testcase + '.git') +var testcase_path = path.resolve(wd, testcase) +var testcase_tgz = path.resolve(fixtures, testcase + '.git.tar.gz') + +var testtarballs = [] +var testrepos = {} +var testurls = {} + +/* +This test is specifically for #7202, where the bug was if you tried installing multiple git urls that +pointed at the same repo but had different comittishes, you'd sometimes get the wrong version. +The test cases, provided by @BryanDonovan, have a dependency tree like this: + + top + bar#4.0.0 + buzz#3.0.0 + foo#3.0.0 + buzz#3.0.0 + foo#4.0.0 + buzz#2.0.0 + +But what would happen is that buzz#2.0.0 would end up installed under bar#4.0.0. + +bar#4.0.0 shouldn't have gotten its own copy if buzz, and if it did, it shouldn've been buzz#3.0.0 +*/ + +;['bar', 'foo', 'buzz'].forEach(function (name) { + var mockurl = 'ssh://git@github.com/BryanDonovan/dummy-npm-' + name + '.git' + var realrepo = path.resolve(wd, 'github-com-BryanDonovan-dummy-npm-' + name + '.git') + var tgz = path.resolve(fixtures, 'github-com-BryanDonovan-dummy-npm-' + name + '.git.tar.gz') + + testrepos[mockurl] = realrepo + testtarballs.push(tgz) +}) + +function cleanup () { + process.chdir(tmpdir()) + rimraf.sync(wd) +} + +var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + // If it's a clone we swap any requests for any of the urls we're mocking + // with the path to the bare repo + if (args[0] === 'clone') { + var m2 = args.length - 2 + var m1 = args.length - 1 + if (testrepos[args[m2]]) { + testurls[args[m1]] = args[m2] + args[m2] = testrepos[args[m2]] + } + execFile(cmd, args, options, cb) + // here, we intercept npm validating the remote origin url on one of the + // clones we've done previously and return the original url that was requested + } else if (args[0] === 'config' && args[1] === '--get' && args[2] === 'remote.origin.url') { + process.nextTick(function () { + cb(null, testurls[options.cwd], '') + }) + } else { + execFile(cmd, args, options, cb) + } + } + } +}) + +function extract (tarball, target, cb) { + cb = once(cb) + fs.createReadStream(tarball).on('error', function (er) { cb(er) }) + .pipe(zlib.createGunzip()).on('error', function (er) { cb(er) }) + .pipe(tar.Extract({path: target})).on('error', function (er) { cb(er) }) + .on('end', function () { + cb() + }) +} + +// Copied from lib/utils/git, because we need to use +// it before calling npm.load and lib/utils/git uses npm.js +// which doesn't allow that. =( =( + +function prefixGitArgs () { + return process.platform === 'win32' ? ['-c', 'core.longpaths=true'] : [] +} + +var gitcmd + +function execGit (args, options, cb) { + var fullArgs = prefixGitArgs().concat(args || []) + return execFile(gitcmd, fullArgs, options, cb) +} + +function gitWhichAndExec (args, options, cb) { + if (gitcmd) return execGit(args, options, cb) + + which('git', function (err, pathtogit) { + if (err) { + err.code = 'ENOGIT' + return cb(err) + } + gitcmd = pathtogit + + execGit(args, options, cb) + }) +} + +function andClone (gitdir, repodir, cb) { + return function (er) { + if (er) return cb(er) + gitWhichAndExec(['clone', gitdir, repodir], {}, cb) + } +} + +function setup (cb) { + cleanup() + mkdirp.sync(wd) + + extract(testcase_tgz, wd, andClone(testcase_git, testcase_path, andExtractPackages)) + + function andExtractPackages (er) { + if (er) return cb(er) + asyncMap(testtarballs, function (tgz, done) { + extract(tgz, wd, done) + }, andChdir) + } + function andChdir (er) { + if (er) return cb(er) + process.chdir(testcase_path) + andLoadNpm() + } + function andLoadNpm () { + var opts = { + cache: path.resolve(wd, 'cache') + } + npm.load(opts, cb) + } +} + +// there are two (sic) valid trees that can result we don't care which one we +// get in npm@2 +var oneTree = [ + 'npm-git-test@1.0.0', [ + ['dummy-npm-bar@4.0.0', [ + ['dummy-npm-foo@3.0.0', []] + ]], + ['dummy-npm-buzz@3.0.0', []], + ['dummy-npm-foo@4.0.0', [ + ['dummy-npm-buzz@2.0.0', []] + ]] + ] +] +var otherTree = [ + 'npm-git-test@1.0.0', [ + ['dummy-npm-bar@4.0.0', [ + ['dummy-npm-buzz@3.0.0', []], + ['dummy-npm-foo@3.0.0', []] + ]], + ['dummy-npm-buzz@3.0.0', []], + ['dummy-npm-foo@4.0.0', [ + ['dummy-npm-buzz@2.0.0', []] + ]] + ] +] + +function toSimple (tree) { + var deps = [] + Object.keys(tree.dependencies || {}).forEach(function (dep) { + deps.push(toSimple(tree.dependencies[dep])) + }) + return [ tree['name'] + '@' + tree['version'], deps ] +} + +test('setup', function (t) { + setup(function (er) { + t.ifError(er, 'setup ran OK') + t.end() + }) +}) + +test('correct versions are installed for git dependency', function (t) { + t.plan(3) + t.comment('test for https://github.com/npm/npm/issues/7202') + npm.commands.install([], function (er) { + t.ifError(er, 'installed OK') + npm.commands.ls([], true, function (er, result) { + t.ifError(er, 'ls OK') + var simplified = toSimple(result) + t.ok( + deepEqual(simplified, oneTree) || deepEqual(simplified, otherTree), + 'install tree is correct' + ) + }) + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/github-shortcut-package.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/github-shortcut-package.js new file mode 100644 index 00000000..19e8d36e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/github-shortcut-package.js @@ -0,0 +1,84 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'github-shortcut-package') + +var json = { + name: 'github-shortcut-package', + version: '0.0.0', + dependencies: { + 'private': 'foo/private' + } +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('github-shortcut-package', function (t) { + var cloneUrls = [ + ['git://github.com/foo/private.git', 'GitHub shortcuts try git URLs first'], + ['https://github.com/foo/private.git', 'GitHub shortcuts try HTTPS URLs second'], + ['git@github.com:foo/private.git', 'GitHub shortcuts try SSH third'] + ] + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install([], function (er, result) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/github-shortcut.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/github-shortcut.js new file mode 100644 index 00000000..059dc707 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/github-shortcut.js @@ -0,0 +1,81 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'github-shortcut') + +var json = { + name: 'github-shortcut', + version: '0.0.0' +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('github-shortcut', function (t) { + var cloneUrls = [ + ['git://github.com/foo/private.git', 'GitHub shortcuts try git URLs first'], + ['https://github.com/foo/private.git', 'GitHub shortcuts try HTTPS URLs third'], + ['git@github.com:foo/private.git', 'GitHub shortcuts try SSH second'] + ] + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install(['foo/private'], function (er, result) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/gitlab-shortcut-package.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/gitlab-shortcut-package.js new file mode 100644 index 00000000..918a1bd0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/gitlab-shortcut-package.js @@ -0,0 +1,83 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'gitlab-shortcut-package') + +var json = { + name: 'gitlab-shortcut-package', + version: '0.0.0', + dependencies: { + 'private': 'gitlab:foo/private' + } +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('gitlab-shortcut-package', function (t) { + var cloneUrls = [ + ['git@gitlab.com:foo/private.git', 'GitLab shortcuts try SSH first'], + ['https://gitlab.com/foo/private.git', 'GitLab shortcuts try HTTPS URLs second'] + ] + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install([], function (er, result) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/gitlab-shortcut.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/gitlab-shortcut.js new file mode 100644 index 00000000..caac4816 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/gitlab-shortcut.js @@ -0,0 +1,80 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var requireInject = require('require-inject') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'gitlab-shortcut') + +var json = { + name: 'gitlab-shortcut', + version: '0.0.0' +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('gitlab-shortcut', function (t) { + var cloneUrls = [ + ['git@gitlab.com:foo/private.git', 'GitLab shortcuts try SSH first'], + ['https://gitlab.com/foo/private.git', 'GitLab shortcuts try HTTPS URLs second'] + ] + var npm = requireInject.installGlobally('../../lib/npm.js', { + 'child_process': { + 'execFile': function (cmd, args, options, cb) { + process.nextTick(function () { + if (args[0] !== 'clone') return cb(null, '', '') + var cloneUrl = cloneUrls.shift() + if (cloneUrl) { + t.is(args[3], cloneUrl[0], cloneUrl[1]) + } else { + t.fail('too many attempts to clone') + } + cb(new Error()) + }) + } + } + }) + + var opts = { + cache: path.resolve(pkg, 'cache'), + prefix: pkg, + registry: common.registry, + loglevel: 'silent' + } + npm.load(opts, function (er) { + t.ifError(er, 'npm loaded without error') + npm.commands.install(['gitlab:foo/private'], function (er, result) { + t.ok(er, 'mocked install failed as expected') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/global-prefix-set-in-userconfig.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/global-prefix-set-in-userconfig.js new file mode 100644 index 00000000..1a9cdaf4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/global-prefix-set-in-userconfig.js @@ -0,0 +1,36 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var rimraf = require("rimraf") +var prefix = __filename.replace(/\.js$/, "") +var rcfile = __filename.replace(/\.js$/, ".npmrc") +var fs = require("fs") +var conf = "prefix = " + prefix + "\n" + +test("setup", function (t) { + rimraf.sync(prefix) + fs.writeFileSync(rcfile, conf) + t.pass("ready") + t.end() +}) + +test("run command", function (t) { + var args = ["prefix", "-g", "--userconfig=" + rcfile] + common.npm(args, {env: {}}, function (er, code, so) { + if (er) throw er + t.notOk(code, "npm prefix exited with code 0") + t.equal(so.trim(), prefix) + t.end() + }) +}) + +test("made dir", function (t) { + t.ok(fs.statSync(prefix).isDirectory()) + t.end() +}) + +test("cleanup", function (t) { + rimraf.sync(prefix) + rimraf.sync(rcfile) + t.pass("clean") + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/graceful-restart.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/graceful-restart.js new file mode 100644 index 00000000..db25daa5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/graceful-restart.js @@ -0,0 +1,118 @@ +var fs = require('fs') +var resolve = require('path').resolve + +var osenv = require('osenv') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = resolve(__dirname, 'graceful-restart') + +var outGraceless = [ + 'prerestart', + 'prestop', + 'stop', + 'poststop', + 'prestart', + 'start', + 'poststart', + 'postrestart', + '' +].join('\n') + +var outGraceful = [ + 'prerestart', + 'restart', + 'postrestart', + '' +].join('\n') + +var pjGraceless = JSON.stringify({ + name: 'graceless', + version: '1.2.3', + scripts: { + 'prestop': 'echo prestop', + 'stop': 'echo stop', + 'poststop': 'echo poststop', + 'prerestart': 'echo prerestart', + 'postrestart': 'echo postrestart', + 'prestart': 'echo prestart', + 'start': 'echo start', + 'poststart': 'echo poststart' + } +}, null, 2) + '\n' + +var pjGraceful = JSON.stringify({ + name: 'graceful', + version: '1.2.3', + scripts: { + 'prestop': 'echo prestop', + 'stop': 'echo stop', + 'poststop': 'echo poststop', + 'prerestart': 'echo prerestart', + 'restart': 'echo restart', + 'postrestart': 'echo postrestart', + 'prestart': 'echo prestart', + 'start': 'echo start', + 'poststart': 'echo poststart' + } +}, null, 2) + '\n' + +test('setup', function (t) { + bootstrap() + t.end() +}) + +test('graceless restart', function (t) { + fs.writeFileSync(resolve(pkg, 'package.json'), pjGraceless) + createChild(['run-script', 'restart'], function (err, code, out) { + t.ifError(err, 'restart finished successfully') + t.equal(code, 0, 'npm run-script exited with code') + t.equal(out, outGraceless, 'expected all scripts to run') + t.end() + }) +}) + +test('graceful restart', function (t) { + fs.writeFileSync(resolve(pkg, 'package.json'), pjGraceful) + createChild(['run-script', 'restart'], function (err, code, out) { + t.ifError(err, 'restart finished successfully') + t.equal(code, 0, 'npm run-script exited with code') + t.equal(out, outGraceful, 'expected only *restart scripts to run') + t.end() + }) +}) + +test('clean', function (t) { + cleanup() + t.end() +}) + +function bootstrap () { + mkdirp.sync(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function createChild (args, cb) { + var env = { + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH, + 'npm_config_loglevel': 'silent' + } + + if (process.platform === 'win32') + env.npm_config_cache = '%APPDATA%\\npm-cache' + + return common.npm(args, { + cwd: pkg, + stdio: ['ignore', 'pipe', 'ignore'], + env: env + }, cb) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/ignore-install-link.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/ignore-install-link.js new file mode 100644 index 00000000..50ffb499 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/ignore-install-link.js @@ -0,0 +1,69 @@ +if (process.platform === "win32") { + console.log("ok - symlinks are weird on windows, skip this test") + return +} +var common = require("../common-tap.js") +var test = require("tap").test +var path = require("path") +var fs = require("fs") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") + +var root = path.resolve(__dirname, "ignore-install-link") +var pkg = path.resolve(root, "pkg") +var dep = path.resolve(root, "dep") +var target = path.resolve(pkg, "node_modules", "dep") +var cache = path.resolve(root, "cache") +var globalPath = path.resolve(root, "global") + +var pkgj = { "name":"pkg", "version": "1.2.3" + , "dependencies": { "dep": "1.2.3" } } +var depj = { "name": "dep", "version": "1.2.3" } + +var myreg = require("http").createServer(function (q, s) { + s.statusCode = 403 + s.end(JSON.stringify({"error":"forbidden"}) + "\n") +}).listen(common.port) + +test("setup", function (t) { + rimraf.sync(root) + mkdirp.sync(root) + mkdirp.sync(path.resolve(pkg, "node_modules")) + mkdirp.sync(dep) + mkdirp.sync(cache) + mkdirp.sync(globalPath) + fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify(pkgj)) + fs.writeFileSync(path.resolve(dep, "package.json"), JSON.stringify(depj)) + fs.symlinkSync(dep, target, "dir") + t.end() +}) + +test("ignore install if package is linked", function (t) { + common.npm(["install"], { + cwd: pkg, + env: { + PATH: process.env.PATH || process.env.Path, + HOME: process.env.HOME, + "npm_config_prefix": globalPath, + "npm_config_cache": cache, + "npm_config_registry": common.registry, + "npm_config_loglevel": "silent" + }, + stdio: "inherit" + }, function (er, code) { + if (er) throw er + t.equal(code, 0, "npm install exited with code") + t.end() + }) +}) + +test("still a symlink", function (t) { + t.equal(true, fs.lstatSync(target).isSymbolicLink()) + t.end() +}) + +test("cleanup", function (t) { + rimraf.sync(root) + myreg.close() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/ignore-scripts.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/ignore-scripts.js new file mode 100644 index 00000000..8cede12b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/ignore-scripts.js @@ -0,0 +1,124 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') + +// ignore-scripts/package.json has scripts that always exit with non-zero error +// codes. +var pkg = path.resolve(__dirname, 'ignore-scripts') + +var gypfile = 'bad_binding_file\n' +var json = { + author: 'Milton the Aussie', + name: 'ignore-scripts', + version: '0.0.0', + scripts: { + prepublish: 'exit 123', + publish: 'exit 123', + postpublish: 'exit 123', + preinstall: 'exit 123', + install: 'exit 123', + postinstall: 'exit 123', + preuninstall: 'exit 123', + uninstall: 'exit 123', + postuninstall: 'exit 123', + pretest: 'exit 123', + test: 'exit 123', + posttest: 'exit 123', + prestop: 'exit 123', + stop: 'exit 123', + poststop: 'exit 123', + prestart: 'exit 123', + start: 'exit 123', + poststart: 'exit 123', + prerestart: 'exit 123', + restart: 'exit 123', + postrestart: 'exit 123', + preversion: 'exit 123', + version: 'exit 123', + postversion: 'exit 123' + } +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('ignore-scripts: install using the option', function (t) { + createChild(['install', '--ignore-scripts'], function (err, code) { + t.ifError(err, 'install with scripts ignored finished successfully') + t.equal(code, 0, 'npm install exited with code') + t.end() + }) +}) + +test('ignore-scripts: install NOT using the option', function (t) { + createChild(['install'], function (err, code) { + t.ifError(err, 'install with scripts successful') + t.notEqual(code, 0, 'npm install exited with code') + t.end() + }) +}) + +var scripts = [ + 'prepublish', 'publish', 'postpublish', + 'preinstall', 'install', 'postinstall', + 'preuninstall', 'uninstall', 'postuninstall', + 'pretest', 'test', 'posttest', + 'prestop', 'stop', 'poststop', + 'prestart', 'start', 'poststart', + 'prerestart', 'restart', 'postrestart', + 'preversion', 'version', 'postversion' +] + +scripts.forEach(function (script) { + test('ignore-scripts: run-script ' + script + ' using the option', function (t) { + createChild(['--ignore-scripts', 'run-script', script], function (err, code, stdout, stderr) { + t.ifError(err, 'run-script ' + script + ' with ignore-scripts successful') + t.equal(code, 0, 'npm run-script exited with code') + t.end() + }) + }) +}) + +scripts.forEach(function (script) { + test('ignore-scripts: run-script ' + script + ' NOT using the option', function (t) { + createChild(['run-script', script], function (err, code) { + t.ifError(err, 'run-script ' + script + ' finished successfully') + t.notEqual(code, 0, 'npm run-script exited with code') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync(path.join(pkg, 'binding.gyp'), gypfile) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) +} + +function createChild (args, cb) { + return common.npm( + args.concat(['--loglevel', 'silent']), + { cwd: pkg }, + cb + ) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/ignore-shrinkwrap.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/ignore-shrinkwrap.js new file mode 100644 index 00000000..013faddd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/ignore-shrinkwrap.js @@ -0,0 +1,135 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = require('path').join(__dirname, 'ignore-shrinkwrap') + +var EXEC_OPTS = { cwd: pkg } + +var customMocks = { + 'get': { + '/package.js': [200, { ente: true }], + '/shrinkwrap.js': [200, { ente: true }] + } +} + +var json = { + author: 'Rocko Artischocko', + name: 'ignore-shrinkwrap', + version: '0.0.0', + dependencies: { + 'npm-test-ignore-shrinkwrap-file': 'http://localhost:1337/package.js' + } +} + +var shrinkwrap = { + name: 'ignore-shrinkwrap', + version: '0.0.0', + dependencies: { + 'npm-test-ignore-shrinkwrap-file': { + version: '1.2.3', + from: 'http://localhost:1337/shrinkwrap.js', + resolved: 'http://localhost:1337/shrinkwrap.js', + dependencies: { + opener: { + version: '1.3.0', + from: 'opener@1.3.0' + } + } + } + } +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('npm install --no-shrinkwrap', function (t) { + mr({ port: common.port, mocks: customMocks }, function (err, s) { + t.ifError(err, 'mock registry bootstrapped without issue') + s._server.on('request', function (req) { + switch (req.url) { + case '/shrinkwrap.js': + t.fail('npm-shrinkwrap.json used instead of package.json') + break + case '/package.js': + t.pass('package.json used') + } + }) + + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + 'install', '--no-shrinkwrap' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm ran without issue') + t.ok(code, "install isn't going to succeed") + s.close() + t.end() + } + ) + }) +}) + +test('npm install (with shrinkwrap)', function (t) { + mr({ port: common.port, mocks: customMocks }, function (err, s) { + t.ifError(err, 'mock registry bootstrapped without issue') + s._server.on('request', function (req) { + switch (req.url) { + case '/shrinkwrap.js': + t.pass('shrinkwrap used') + break + case '/package.js': + t.fail('shrinkwrap ignored') + } + }) + + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + 'install' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm ran without issue') + t.ok(code, "install isn't going to succeed") + s.close() + t.end() + } + ) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + fs.writeFileSync( + path.join(pkg, 'npm-shrinkwrap.json'), + JSON.stringify(shrinkwrap, null, 2) + ) + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/init-interrupt.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/init-interrupt.js new file mode 100644 index 00000000..6d311aef --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/init-interrupt.js @@ -0,0 +1,58 @@ +// if "npm init" is interrupted with ^C, don't report +// "init written successfully" +var test = require("tap").test +var path = require("path") +var osenv = require("osenv") +var rimraf = require("rimraf") +var npmlog = require("npmlog") +var requireInject = require("require-inject") + +var npm = require("../../lib/npm.js") + +var PKG_DIR = path.resolve(__dirname, "init-interrupt") + +test("setup", function (t) { + cleanup() + + t.end() +}) + +test("issue #6684 remove confusing message", function (t) { + + var initJsonMock = function (dir, input, config, cb) { + process.nextTick(function () { + cb({message : "canceled"}) + }) + } + initJsonMock.yes = function () { return true } + + npm.load({loglevel : "silent"}, function () { + var log = "" + var init = requireInject("../../lib/init", { + "init-package-json": initJsonMock + }) + + // capture log messages + npmlog.on("log", function (chunk) { log += chunk.message + "\n" } ) + + init([], function (err, code) { + t.ifError(err, "init ran successfully") + t.notOk(code, "exited without issue") + t.notSimilar(log, /written successfully/, "no success message written") + t.similar(log, /canceled/, "alerted that init was canceled") + + t.end() + }) + }) +}) + +test("cleanup", function (t) { + cleanup() + + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(PKG_DIR) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-at-locally.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-at-locally.js new file mode 100644 index 00000000..71498548 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-at-locally.js @@ -0,0 +1,69 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.join(__dirname, 'install-at-locally') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'install-at-locally', + version: '0.0.0' +} + +test('setup', function (t) { + cleanup() + t.end() +}) + +test('\'npm install ./package@1.2.3\' should install local pkg', function (t) { + var target = './package@1.2.3' + setup(target) + common.npm(['install', target], EXEC_OPTS, function (err, code) { + var p = path.resolve(pkg, 'node_modules/install-at-locally/package.json') + t.ifError(err, 'install local package successful') + t.equal(code, 0, 'npm install exited with code') + t.ok(JSON.parse(fs.readFileSync(p, 'utf8'))) + t.end() + }) +}) + +test('\'npm install install/at/locally@./package@1.2.3\' should install local pkg', function (t) { + var target = 'install/at/locally@./package@1.2.3' + setup(target) + common.npm(['install', target], EXEC_OPTS, function (err, code) { + var p = path.resolve(pkg, 'node_modules/install-at-locally/package.json') + t.ifError(err, 'install local package in explicit directory successful') + t.equal(code, 0, 'npm install exited with code') + t.ok(JSON.parse(fs.readFileSync(p, 'utf8'))) + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup (target) { + cleanup() + var root = path.resolve(pkg, target) + mkdirp.sync(root) + fs.writeFileSync( + path.join(root, 'package.json'), + JSON.stringify(json, null, 2) + ) + mkdirp.sync(path.resolve(pkg, 'node_modules')) + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-bad-man.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-bad-man.js new file mode 100644 index 00000000..c5ca2775 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-bad-man.js @@ -0,0 +1,80 @@ +var fs = require("fs") +var resolve = require("path").resolve + +var osenv = require("osenv") +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") +var test = require("tap").test + +var common = require("../common-tap.js") + +var pkg = resolve(__dirname, "install-bad-man") +var target = resolve(__dirname, "install-bad-man-target") + +var EXEC_OPTS = { + cwd: target +} + +var json = { + name : "install-bad-man", + version : "1.2.3", + man : [ "./install-bad-man.1.lol" ] +} + + +test("setup", function (t) { + setup() + t.pass("setup ran") + t.end() +}) + +test("install from repo on 'OS X'", function (t) { + common.npm( + [ + "install", + "--prefix", target, + "--global", + pkg + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, "npm command ran from test") + t.equals(code, 1, "install exited with failure (1)") + t.notOk(stdout, "no output indicating success") + t.notOk( + stderr.match(/Cannot read property '1' of null/), + "no longer has cryptic error output" + ) + t.ok( + stderr.match(/install-bad-man\.1\.lol is not a valid name/), + "got expected error output" + ) + + t.end() + } + ) +}) + +test("clean", function (t) { + cleanup() + t.pass("cleaned up") + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + // make sure it installs locally + mkdirp.sync(resolve(target, "node_modules")) + fs.writeFileSync( + resolve(pkg, "package.json"), + JSON.stringify(json, null, 2)+"\n" + ) + fs.writeFileSync(resolve(pkg, "install-bad-man.1.lol"), "lol\n") +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + rimraf.sync(target) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-cli-production.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-cli-production.js new file mode 100644 index 00000000..a4727f74 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-cli-production.js @@ -0,0 +1,88 @@ +var fs = require('graceful-fs') +var path = require('path') +var existsSync = fs.existsSync || path.existsSync + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.join(__dirname, 'install-cli-production') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'install-cli-production', + description: 'fixture', + version: '0.0.0', + scripts: { + prepublish: 'exit 123' + }, + dependencies: { + dependency: 'file:./dependency' + }, + devDependencies: { + 'dev-dependency': 'file:./dev-dependency' + } +} + +var dependency = { + name: 'dependency', + description: 'fixture', + version: '0.0.0' +} + +var devDependency = { + name: 'dev-dependency', + description: 'fixture', + version: '0.0.0' +} + +test('setup', function (t) { + mkdirp.sync(path.join(pkg, 'dependency')) + fs.writeFileSync( + path.join(pkg, 'dependency', 'package.json'), + JSON.stringify(dependency, null, 2) + ) + + mkdirp.sync(path.join(pkg, 'devDependency')) + fs.writeFileSync( + path.join(pkg, 'devDependency', 'package.json'), + JSON.stringify(devDependency, null, 2) + ) + + mkdirp.sync(path.join(pkg, 'node_modules')) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + process.chdir(pkg) + t.end() +}) + +test('\'npm install --production\' should only install dependencies', function (t) { + common.npm(['install', '--production'], EXEC_OPTS, function (err, code) { + t.ifError(err, 'install production successful') + t.equal(code, 0, 'npm install did not raise error code') + t.ok( + JSON.parse(fs.readFileSync( + path.resolve(pkg, 'node_modules/dependency/package.json'), 'utf8') + ), + 'dependency was installed' + ) + t.notOk( + existsSync(path.resolve(pkg, 'node_modules/dev-dependency/package.json')), + 'devDependency was NOT installed' + ) + t.end() + }) +}) + +test('cleanup', function (t) { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-cli-unicode.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-cli-unicode.js new file mode 100644 index 00000000..f242eb8a --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-cli-unicode.js @@ -0,0 +1,71 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var server + +var pkg = path.resolve(__dirname, 'install-cli-unicode') + +function hasOnlyAscii (s) { + return /^[\000-\177]*$/.test(s) +} + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'install-cli', + description: 'fixture', + version: '0.0.1', + dependencies: { + read: '1.0.5' + } +} + +test('setup', function (t) { + rimraf.sync(pkg) + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + mr({ port: common.port }, function (er, s) { + server = s + t.end() + }) +}) + +test('does not use unicode with --unicode false', function (t) { + common.npm( + [ + '--unicode', 'false', + '--registry', common.registry, + '--loglevel', 'silent', + 'install', 'optimist' + ], + EXEC_OPTS, + function (err, code, stdout) { + t.ifError(err, 'install package read without unicode success') + t.notOk(code, 'npm install exited with code 0') + t.ifError(err, 'npm install ran without issue') + t.ok(stdout, 'got some output') + t.ok(hasOnlyAscii(stdout), 'only ASCII in install output') + + t.end() + } + ) +}) + +test('cleanup', function (t) { + server.close() + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-from-local.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-from-local.js new file mode 100644 index 00000000..7a4c7162 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-from-local.js @@ -0,0 +1,98 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') + +var root = path.join(__dirname, 'install-from-local') +var pkg = path.join(root, 'package-with-local-paths') + +var EXEC_OPTS = { cwd: pkg } + +var localPaths = { + name: 'package-with-local-paths', + version: '0.0.0', + dependencies: { + 'package-local-dependency': 'file:../package-local-dependency' + }, + devDependencies: { + 'package-local-dev-dependency': 'file:../package-local-dev-dependency' + } +} + +var localDependency = { + name: 'package-local-dependency', + version: '0.0.0', + description: 'Test for local installs' +} + +var localDevDependency = { + name: 'package-local-dev-dependency', + version: '0.0.0', + description: 'Test for local installs' +} + +test('setup', function (t) { + rimraf.sync(pkg) + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(localPaths, null, 2) + ) + + mkdirp.sync(path.join(root, 'package-local-dependency')) + fs.writeFileSync( + path.join(root, 'package-local-dependency', 'package.json'), + JSON.stringify(localDependency, null, 2) + ) + + mkdirp.sync(path.join(root, 'package-local-dev-dependency')) + fs.writeFileSync( + path.join(root, 'package-local-dev-dependency', 'package.json'), + JSON.stringify(localDevDependency, null, 2) + ) + + process.chdir(pkg) + t.end() +}) + +test('\'npm install\' should install local packages', function (t) { + common.npm( + [ + 'install', '.' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'error should not exist') + t.notOk(code, 'npm install exited with code 0') + var dependencyPackageJson = path.resolve( + pkg, + 'node_modules/package-local-dependency/package.json' + ) + t.ok( + JSON.parse(fs.readFileSync(dependencyPackageJson, 'utf8')), + 'package with local dependency installed' + ) + + var devDependencyPackageJson = path.resolve( + pkg, 'node_modules/package-local-dev-dependency/package.json' + ) + t.ok( + JSON.parse(fs.readFileSync(devDependencyPackageJson, 'utf8')), + 'package with local dev dependency installed' + ) + + t.end() + } + ) +}) + +test('cleanup', function (t) { + process.chdir(osenv.tmpdir()) + rimraf.sync(root) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-link-scripts.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-link-scripts.js new file mode 100644 index 00000000..0c4810aa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-link-scripts.js @@ -0,0 +1,132 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.join(__dirname, 'install-link-scripts') +var tmp = path.join(pkg, 'tmp') +var dep = path.join(pkg, 'dep') + +var json = { + name: 'install-link-scripts', + version: '1.0.0', + description: 'a test', + repository: 'git://github.com/npm/npm.git', + license: 'ISC' +} + +var dependency = { + name: 'dep', + version: '1.0.0', + scripts: { + install: './bin/foo' + } +} + +var foo = function () {/* +#!/usr/bin/env node + +console.log('hey sup') +*/}.toString().split('\n').slice(1, -1).join('\n') + +process.env.npm_config_prefix = tmp + +test('plain install', function (t) { + setup() + + common.npm( + [ + 'install', dep, + '--tmp', tmp + ], + { cwd: pkg }, + function (err, code, stdout, stderr) { + t.ifErr(err, 'npm install ' + dep + ' finished without error') + t.equal(code, 0, 'exited ok') + t.notOk(stderr, 'no output stderr') + t.match(stdout, /hey sup/, 'postinstall script for dep ran') + t.end() + } + ) +}) + +test('link', function (t) { + setup() + + common.npm( + [ + 'link', + '--tmp', tmp + ], + { cwd: dep }, + function (err, code, stdout, stderr) { + t.ifErr(err, 'npm link finished without error') + t.equal(code, 0, 'exited ok') + t.notOk(stderr, 'no output stderr') + t.match(stdout, /hey sup/, 'script ran') + t.end() + } + ) +}) + +test('install --link', function (t) { + setup() + + common.npm( + [ + 'link', + '--tmp', tmp + ], + { cwd: dep }, + function (err, code, stdout, stderr) { + t.ifErr(err, 'npm link finished without error') + + common.npm( + [ + 'install', '--link', dependency.name, + '--tmp', tmp + ], + { cwd: pkg }, + function (err, code, stdout, stderr) { + t.ifErr(err, 'npm install --link finished without error') + t.equal(code, 0, 'exited ok') + t.notOk(stderr, 'no output stderr') + t.notMatch(stdout, /hey sup/, "script didn't run") + t.end() + } + ) + } + ) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(tmp) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + mkdirp.sync(path.join(dep, 'bin')) + fs.writeFileSync( + path.join(dep, 'package.json'), + JSON.stringify(dependency, null, 2) + ) + fs.writeFileSync(path.join(dep, 'bin', 'foo'), foo) + fs.chmod(path.join(dep, 'bin', 'foo'), '0755') +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-man.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-man.js new file mode 100644 index 00000000..495fc6cb --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-man.js @@ -0,0 +1,75 @@ +var fs = require("fs") +var resolve = require("path").resolve + +var osenv = require("osenv") +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") +var test = require("tap").test + +var common = require("../common-tap.js") + +var pkg = resolve(__dirname, "install-man") +var target = resolve(__dirname, "install-man-target") + +var EXEC_OPTS = { + cwd: target +} + +var json = { + name : "install-man", + version : "1.2.3", + man : [ "./install-man.1" ] +} + +test("setup", function (t) { + setup() + t.pass("setup ran") + t.end() +}) + +test("install man page", function (t) { + common.npm( + [ + "install", + "--prefix", target, + "--global", + pkg + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, "npm command ran from test") + t.equals(code, 0, "install exited with success (0)") + t.ok(stdout, "output indicating success") + t.ok( + fs.existsSync(resolve(target, "share", "man", "man1", "install-man.1")), + "man page link was created" + ) + + t.end() + } + ) +}) + +test("clean", function (t) { + cleanup() + t.pass("cleaned up") + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(pkg) + // make sure it installs locally + mkdirp.sync(resolve(target, "node_modules")) + fs.writeFileSync( + resolve(pkg, "package.json"), + JSON.stringify(json, null, 2)+"\n" + ) + fs.writeFileSync(resolve(pkg, "install-man.1"), "THIS IS A MANPAGE\n") +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + rimraf.sync(target) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-noargs-dev.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-noargs-dev.js new file mode 100644 index 00000000..946ed943 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-noargs-dev.js @@ -0,0 +1,109 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var server + +var pkg = path.join(__dirname, 'install-noargs-dev') + +var EXEC_OPTS = { cwd: pkg } + +var PACKAGE_JSON1 = { + name: 'install-noargs-dev', + version: '0.0.1', + devDependencies: { + 'underscore': '1.3.1' + } +} + +var PACKAGE_JSON2 = { + name: 'install-noargs-dev', + version: '0.0.2', + devDependencies: { + 'underscore': '1.5.1' + } +} + +test('setup', function (t) { + setup() + mr({ port: common.port }, function (er, s) { + t.ifError(er, 'started mock registry') + server = s + t.end() + }) +}) + +test('install noargs installs devDependencies', function (t) { + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + 'install' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install exited with code 0') + + var p = path.join(pkg, 'node_modules', 'underscore', 'package.json') + var pkgJson = JSON.parse(fs.readFileSync(p)) + + t.equal(pkgJson.version, '1.3.1') + t.end() + } + ) +}) + +test('install noargs installs updated devDependencies', function (t) { + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(PACKAGE_JSON2, null, 2) + ) + + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + 'install' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install exited with code 0') + + var p = path.join(pkg, 'node_modules', 'underscore', 'package.json') + var pkgJson = JSON.parse(fs.readFileSync(p)) + + t.equal(pkgJson.version, '1.5.1') + t.end() + } + ) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(path.resolve(pkg, 'node_modules')) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(PACKAGE_JSON1, null, 2) + ) + + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-preferglobal-warnings.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-preferglobal-warnings.js new file mode 100644 index 00000000..74faee02 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-preferglobal-warnings.js @@ -0,0 +1,131 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var preferGlobalJson = { + name: 'npm-test-preferglobal-dep', + version: '0.0.0', + preferGlobal: true +} + +var dependenciesJson = { + name: 'npm-test-preferglobal-dependency-check', + version: '0.0.0', + dependencies: { + 'npm-test-preferglobal-dep': 'file:../' + preferGlobalJson.name + } +} + +var devDependenciesJson = { + name: 'npm-test-preferglobal-devDependency-check', + version: '0.0.0', + devDependencies: { + 'npm-test-preferglobal-dep': 'file:../' + preferGlobalJson.name + } +} + +var emptyPackage = { + name: 'npm-test-preferglobal-empty-package', + version: '0.0.0' +} + +test('install a preferGlobal dependency without warning', function (t) { + setup(dependenciesJson) + common.npm([ + 'install', + '--loglevel=warn' + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'packages were installed') + t.notMatch( + stderr, + /WARN.*prefer global/, + 'install should not warn when dependency is preferGlobal') + t.end() + }) +}) + +test('install a preferGlobal dependency without warning', function (t) { + setup(devDependenciesJson) + common.npm([ + 'install', + '--loglevel=warn' + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'packages were installed') + t.notMatch( + stderr, + /WARN.*prefer global/, + 'install should not warn when devDependency is preferGlobal') + t.end() + }) +}) + +test('warn if a preferGlobal package is being installed direct', function (t) { + setup(emptyPackage) + common.npm([ + 'install', + 'file:../' + preferGlobalJson.name, + '--loglevel=warn' + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'packages were installed') + t.match( + stderr, + /WARN.*prefer global/, + 'install should warn when new package is preferGlobal') + t.end() + }) +}) + +test('warn if a preferGlobal package is being saved', function (t) { + setup(emptyPackage) + common.npm([ + 'install', + 'file:../' + preferGlobalJson.name, + '--save', + '--loglevel=warn' + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'packages were installed') + t.match( + stderr, + /WARN.*prefer global/, + 'install should warn when new package is preferGlobal') + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup (json) { + cleanup() + mkPkg(preferGlobalJson) + process.chdir(mkPkg(json)) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + var pkgs = [preferGlobalJson, + dependenciesJson, + devDependenciesJson, + emptyPackage] + pkgs.forEach(function (json) { + rimraf.sync(path.resolve(__dirname, json.name)) + }) +} + +function mkPkg (json) { + var pkgPath = path.resolve(__dirname, json.name) + mkdirp.sync(pkgPath) + fs.writeFileSync( + path.join(pkgPath, 'package.json'), + JSON.stringify(json, null, 2) + ) + return pkgPath +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-save-exact.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-save-exact.js new file mode 100644 index 00000000..e62506fa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-save-exact.js @@ -0,0 +1,114 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var server + +var pkg = path.join(__dirname, 'install-save-exact') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'install-save-exact', + version: '0.0.1', + description: 'fixture' +} + +test('setup', function (t) { + setup() + mr({ port: common.port }, function (er, s) { + server = s + t.end() + }) +}) + +test('\'npm install --save --save-exact\' should install local pkg', function (t) { + common.npm( + [ + '--loglevel', 'silent', + '--registry', common.registry, + '--save', + '--save-exact', + 'install', 'underscore@1.3.1' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm ran without issue') + t.notOk(code, 'npm install exited without raising an error code') + + var p = path.resolve(pkg, 'node_modules/underscore/package.json') + t.ok(JSON.parse(fs.readFileSync(p))) + + p = path.resolve(pkg, 'package.json') + var pkgJson = JSON.parse(fs.readFileSync(p, 'utf8')) + + t.same( + pkgJson.dependencies, + { 'underscore': '1.3.1' }, + 'underscore dependency should specify exactly 1.3.1' + ) + + t.end() + } + ) +}) + +test('\'npm install --save-dev --save-exact\' should install local pkg', function (t) { + setup() + + common.npm( + [ + '--loglevel', 'silent', + '--registry', common.registry, + '--save-dev', + '--save-exact', + 'install', 'underscore@1.3.1' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm ran without issue') + t.notOk(code, 'npm install exited without raising an error code') + + var p = path.resolve(pkg, 'node_modules/underscore/package.json') + t.ok(JSON.parse(fs.readFileSync(p))) + + p = path.resolve(pkg, 'package.json') + var pkgJson = JSON.parse(fs.readFileSync(p, 'utf8')) + + t.same( + pkgJson.devDependencies, + { 'underscore': '1.3.1' }, + 'underscore dependency should specify exactly 1.3.1' + ) + + t.end() + } + ) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(path.resolve(pkg, 'node_modules')) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-save-local.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-save-local.js new file mode 100644 index 00000000..50481cc7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-save-local.js @@ -0,0 +1,126 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var root = path.join(__dirname, 'install-save-local') +var pkg = path.join(root, 'package') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'install-save-local', + version: '0.0.0' +} + +var localDependency = { + name: 'package-local-dependency', + version: '0.0.0' +} + +var localDevDependency = { + name: 'package-local-dev-dependency', + version: '0.0.0' +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('\'npm install --save ../local/path\' should save to package.json', function (t) { + common.npm( + [ + '--loglevel', 'silent', + '--save', + 'install', '../package-local-dependency' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install exited with code 0') + + var dependencyPackageJson = path.join( + pkg, 'node_modules', 'package-local-dependency', 'package.json' + ) + t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, 'utf8'))) + + var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8')) + t.deepEqual( + pkgJson.dependencies, + { 'package-local-dependency': 'file:../package-local-dependency' }, + 'local package saved correctly' + ) + t.end() + } + ) +}) + +test('\'npm install --save-dev ../local/path\' should save to package.json', function (t) { + setup() + common.npm( + [ + '--loglevel', 'silent', + '--save-dev', + 'install', '../package-local-dev-dependency' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install exited with code 0') + + var dependencyPackageJson = path.resolve( + pkg, 'node_modules', 'package-local-dev-dependency', 'package.json' + ) + t.ok(JSON.parse(fs.readFileSync(dependencyPackageJson, 'utf8'))) + + var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8')) + t.deepEqual( + pkgJson.devDependencies, + { 'package-local-dev-dependency': 'file:../package-local-dev-dependency' }, + 'local package saved correctly' + ) + + t.end() + } + ) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + process.chdir(__dirname) + rimraf.sync(root) +} + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + mkdirp.sync(path.join(root, 'package-local-dependency')) + fs.writeFileSync( + path.join(root, 'package-local-dependency', 'package.json'), + JSON.stringify(localDependency, null, 2) + ) + + mkdirp.sync(path.join(root, 'package-local-dev-dependency')) + fs.writeFileSync( + path.join(root, 'package-local-dev-dependency', 'package.json'), + JSON.stringify(localDevDependency, null, 2) + ) + + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-save-prefix.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-save-prefix.js new file mode 100644 index 00000000..35511b63 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-save-prefix.js @@ -0,0 +1,178 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var server + +var pkg = path.join(__dirname, 'install-save-prefix') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'install-save-prefix', + version: '0.0.1' +} + +test('setup', function (t) { + setup() + mr({ port: common.port }, function (er, s) { + t.ifError(er, 'started mock registry') + server = s + t.end() + }) +}) + +test('install --save with \'^\' save prefix should accept minor updates', function (t) { + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + '--save-prefix', '^', + '--save', + 'install', 'underscore@latest' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install exited with code 0') + + var p = path.join(pkg, 'node_modules', 'underscore', 'package.json') + t.ok(JSON.parse(fs.readFileSync(p))) + + var pkgJson = JSON.parse(fs.readFileSync( + path.join(pkg, 'package.json'), + 'utf8' + )) + t.deepEqual( + pkgJson.dependencies, + { 'underscore': '^1.5.1' }, + 'got expected save prefix and version of 1.5.1' + ) + t.end() + } + ) +}) + +test('install --save-dev with \'^\' save prefix should accept minor dev updates', function (t) { + setup() + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + '--save-prefix', '^', + '--save-dev', + 'install', 'underscore@1.3.1' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install exited with code 0') + + var p = path.join(pkg, 'node_modules', 'underscore', 'package.json') + t.ok(JSON.parse(fs.readFileSync(p))) + + var pkgJson = JSON.parse(fs.readFileSync( + path.join(pkg, 'package.json'), + 'utf8' + )) + t.deepEqual( + pkgJson.devDependencies, + { 'underscore': '^1.3.1' }, + 'got expected save prefix and version of 1.3.1' + ) + t.end() + } + ) +}) + +test('install --save with \'~\' save prefix should accept patch updates', function (t) { + setup() + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + '--save-prefix', '~', + '--save', + 'install', 'underscore@1.3.1' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install exited with code 0') + + var p = path.join(pkg, 'node_modules', 'underscore', 'package.json') + t.ok(JSON.parse(fs.readFileSync(p))) + + var pkgJson = JSON.parse(fs.readFileSync( + path.join(pkg, 'package.json'), + 'utf8' + )) + t.deepEqual( + pkgJson.dependencies, + { 'underscore': '~1.3.1' }, + 'got expected save prefix and version of 1.3.1' + ) + t.end() + } + ) +}) + +test('install --save-dev with \'~\' save prefix should accept patch updates', function (t) { + setup() + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + '--save-prefix', '~', + '--save-dev', + 'install', 'underscore@1.3.1' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install exited with code 0') + + var p = path.join(pkg, 'node_modules', 'underscore', 'package.json') + t.ok(JSON.parse(fs.readFileSync(p))) + + var pkgJson = JSON.parse(fs.readFileSync( + path.join(pkg, 'package.json'), + 'utf8' + )) + t.deepEqual( + pkgJson.devDependencies, + { 'underscore': '~1.3.1' }, + 'got expected save prefix and version of 1.3.1' + ) + t.end() + } + ) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(path.resolve(pkg, 'node_modules')) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-scoped-already-installed.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-scoped-already-installed.js new file mode 100644 index 00000000..e0dd0cce --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-scoped-already-installed.js @@ -0,0 +1,137 @@ +var fs = require('graceful-fs') +var path = require('path') +var existsSync = fs.existsSync || path.existsSync + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') + +var root = path.join(__dirname, 'install-scoped-already-installed') +var pkg = path.join(root, 'package-with-scoped-paths') +var modules = path.join(pkg, 'node_modules') + +var EXEC_OPTS = { cwd: pkg } + +var scopedPaths = { + name: 'package-with-scoped-paths', + version: '0.0.0', + dependencies: { + 'package-local-dependency': 'file:../package-local-dependency', + '@scoped/package-scoped-dependency': 'file:../package-scoped-dependency' + } +} + +var localDependency = { + name: 'package-local-dependency', + version: '0.0.0', + description: 'Test for local installs' +} + +var scopedDependency = { + name: '@scoped/package', + version: '0.0.0', + description: 'Test for local installs' +} + +test('setup', function (t) { + rimraf.sync(root) + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(scopedPaths, null, 2) + ) + + mkdirp.sync(path.join(root, 'package-local-dependency')) + fs.writeFileSync( + path.join(root, 'package-local-dependency', 'package.json'), + JSON.stringify(localDependency, null, 2) + ) + + mkdirp.sync(path.join(root, 'package-scoped-dependency')) + fs.writeFileSync( + path.join(root, 'package-scoped-dependency', 'package.json'), + JSON.stringify(scopedDependency, null, 2) + ) + + process.chdir(pkg) + t.end() +}) + +test('installing already installed local scoped package', function (t) { + common.npm( + [ + '--loglevel', 'silent', + 'install' + ], + EXEC_OPTS, + function (err, code, stdout) { + var installed = parseNpmInstallOutput(stdout) + t.ifError(err, 'install ran to completion without error') + t.notOk(code, 'npm install exited with code 0') + + t.ok( + existsSync(path.join(modules, '@scoped', 'package', 'package.json')), + 'package installed' + ) + t.ok( + contains(installed, 'node_modules/@scoped/package'), + 'installed @scoped/package' + ) + t.ok( + contains(installed, 'node_modules/package-local-dependency'), + 'installed package-local-dependency' + ) + + common.npm( + [ + '--loglevel', 'silent', + 'install' + ], + EXEC_OPTS, + function (err, code, stdout) { + t.ifError(err, 'install ran to completion without error') + t.notOk(code, 'npm install raised no error code') + + installed = parseNpmInstallOutput(stdout) + + t.ok( + existsSync(path.join(modules, '@scoped', 'package', 'package.json')), + 'package installed' + ) + + t.notOk( + contains(installed, 'node_modules/@scoped/package'), + 'did not reinstall @scoped/package' + ) + t.notOk( + contains(installed, 'node_modules/package-local-dependency'), + 'did not reinstall package-local-dependency' + ) + t.end() + } + ) + } + ) +}) + +test('cleanup', function (t) { + process.chdir(osenv.tmpdir()) + rimraf.sync(root) + t.end() +}) + +function contains (list, element) { + for (var i = 0; i < list.length; ++i) { + if (list[i] === element) { + return true + } + } + return false +} + +function parseNpmInstallOutput (stdout) { + return stdout.trim().split(/\n\n|\s+/) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-scoped-link.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-scoped-link.js new file mode 100644 index 00000000..db95121c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-scoped-link.js @@ -0,0 +1,84 @@ +var exec = require('child_process').exec +var fs = require('graceful-fs') +var path = require('path') +var existsSync = fs.existsSync || path.existsSync + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.join(__dirname, 'install-scoped-link') +var work = path.join(__dirname, 'install-scoped-link-TEST') +var modules = path.join(work, 'node_modules') + +var EXEC_OPTS = { cwd: work } + +var world = 'console.log("hello blrbld")\n' + +var json = { + name: '@scoped/package', + version: '0.0.0', + bin: { + hello: './world.js' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + fs.writeFileSync(path.join(pkg, 'world.js'), world) + + mkdirp.sync(modules) + process.chdir(work) + + t.end() +}) + +test('installing package with links', function (t) { + common.npm( + [ + '--loglevel', 'silent', + 'install', pkg + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'install ran to completion without error') + t.notOk(code, 'npm install exited with code 0') + + t.ok( + existsSync(path.join(modules, '@scoped', 'package', 'package.json')), + 'package installed' + ) + t.ok(existsSync(path.join(modules, '.bin')), 'binary link directory exists') + + var hello = path.join(modules, '.bin', 'hello') + t.ok(existsSync(hello), 'binary link exists') + + exec('node ' + hello, function (err, stdout, stderr) { + t.ifError(err, 'command ran fine') + t.notOk(stderr, 'got no error output back') + t.equal(stdout, 'hello blrbld\n', 'output was as expected') + + t.end() + }) + } + ) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(work) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-scoped-with-peer-dependency.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-scoped-with-peer-dependency.js new file mode 100644 index 00000000..a72fbefd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-scoped-with-peer-dependency.js @@ -0,0 +1,60 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var pkg = path.join(__dirname, 'install-scoped-with-peer-dependency') +var local = path.join(pkg, 'package') + +var EXEC_OPTS = { } + +var json = { + name: '@scope/package', + version: '0.0.0', + peerDependencies: { + underscore: '*' + } +} + +test('setup', function (t) { + setup() + + t.end() +}) + +test('it should install peerDependencies in same tree level as the parent package', function (t) { + common.npm(['install', './package'], EXEC_OPTS, function (err, code, stdout, stderr) { + t.ifError(err, 'install local package successful') + t.equal(code, 0, 'npm install exited with code') + t.notOk(stderr, 'npm install exited without any error output') + + var p = path.resolve(pkg, 'node_modules/underscore/package.json') + t.ok(JSON.parse(fs.readFileSync(p, 'utf8'))) + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(local) + mkdirp.sync(path.resolve(pkg, 'node_modules')) + fs.writeFileSync( + path.join(local, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/install-with-dev-dep-duplicate.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-with-dev-dep-duplicate.js new file mode 100644 index 00000000..cb69c7d4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/install-with-dev-dep-duplicate.js @@ -0,0 +1,85 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var npm = npm = require('../../') + +var pkg = path.resolve(__dirname, 'dev-dep-duplicate') + +var json = { + author: 'Anders Janmyr', + name: 'dev-dep-duplicate', + version: '0.0.0', + dependencies: { + underscore: '1.5.1' + }, + devDependencies: { + underscore: '1.3.1' + } +} + +var expected = { + name: 'dev-dep-duplicate', + version: '0.0.0', + dependencies: { + underscore: { + version: '1.5.1', + from: 'underscore@1.5.1', + resolved: common.registry + '/underscore/-/underscore-1.5.1.tgz' + } + } +} + +test('prefers version from dependencies over devDependencies', function (t) { + t.plan(1) + + mr({ port: common.port }, function (er, s) { + setup(function (err) { + if (err) return t.fail(err) + + npm.install('.', function (err) { + if (err) return t.fail(err) + + npm.commands.ls([], true, function (err, _, results) { + if (err) return t.fail(err) + + t.deepEqual(results, expected) + s.close() + t.end() + }) + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup (cb) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) + + var opts = { + cache: path.resolve(pkg, 'cache'), + registry: common.registry + } + npm.load(opts, cb) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/invalid-cmd-exit-code.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/invalid-cmd-exit-code.js new file mode 100644 index 00000000..8bc62ff2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/invalid-cmd-exit-code.js @@ -0,0 +1,28 @@ +var test = require("tap").test +var common = require("../common-tap.js") + +var opts = { cwd: process.cwd() } + +test("npm asdf should return exit code 1", function (t) { + common.npm(["asdf"], opts, function (er, c) { + if (er) throw er + t.ok(c, "exit code should not be zero") + t.end() + }) +}) + +test("npm help should return exit code 0", function (t) { + common.npm(["help"], opts, function (er, c) { + if (er) throw er + t.equal(c, 0, "exit code should be 0") + t.end() + }) +}) + +test("npm help fadf should return exit code 0", function (t) { + common.npm(["help", "fadf"], opts, function (er, c) { + if (er) throw er + t.equal(c, 0, "exit code should be 0") + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-array-bin.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-array-bin.js new file mode 100644 index 00000000..67a3457f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-array-bin.js @@ -0,0 +1,80 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-array-bin') +var modulepath = path.resolve(basepath, 'node_modules') +var installedpath = path.resolve(modulepath, 'npm-test-array-bin') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir +var fixture = new Tacks( + Dir({ + bin: Dir({ + 'array-bin': File( + '#!/usr/bin/env node\n' + + "console.log('test ran ok')\n" + ) + }), + 'package.json': File({ + name: 'npm-test-array-bin', + version: '1.2.5', + bin: [ + 'bin/array-bin' + ], + scripts: { + test: 'node test.js' + } + }), + 'test.js': File( + "require('child_process').exec('array-bin', { env: process.env },\n" + + ' function (err, stdout, stderr) {\n' + + " if (err && err.code) throw new Error('exited badly with code = ' + err.code)\n" + + ' console.log(stdout)\n' + + ' console.error(stderr)\n' + + ' }\n' + + ')\n' + ) + }) +) +test('setup', function (t) { + setup() + t.done() +}) +test('array-bin', function (t) { + common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest) + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'install went ok') + t.equal(stderr, '', 'no error output') + common.npm(['test'], {cwd: installedpath}, testCheckAndRemove) + } + function testCheckAndRemove (err, code, stdout, stderr) { + t.ifError(err, 'npm test on array bin') + t.equal(code, 0, 'exited OK') + t.equal(stderr.trim(), '', 'no error output') + t.match(stdout, /test ran ok/, 'child script ran properly') + common.npm(['rm', fixturepath], {cwd: basepath}, removeCheckAndDone) + } + function removeCheckAndDone (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'remove went ok') + t.done() + } +}) +test('cleanup', function (t) { + cleanup() + t.done() +}) +function setup () { + cleanup() + fixture.create(fixturepath) + mkdirp.sync(modulepath) +} +function cleanup () { + fixture.remove(fixturepath) + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-bundled-git.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-bundled-git.js new file mode 100644 index 00000000..fea6fc9e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-bundled-git.js @@ -0,0 +1,103 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-bundled-git') +var modulepath = path.resolve(basepath, 'node_modules') +var installedpath = path.resolve(modulepath, 'npm-test-bundled-git') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +var minimatchExpected = { + name: 'minimatch', + description: 'a glob matcher in javascript', + version: '0.2.1', + repository: { + type: 'git', + url: 'git://github.com/isaacs/minimatch.git' + }, + main: 'minimatch.js', + scripts: { + test: 'tap test' + }, + engines: { + node: '*' + }, + dependencies: { + 'lru-cache': '~1.0.5' + }, + devDependencies: { + tap: '~0.1.3' + }, + licenses: [ + { + type: 'MIT', + url: 'http://github.com/isaacs/minimatch/raw/master/LICENSE' + } + ] +} + +var fixture = new Tacks( + Dir({ + README: File( + 'just an npm test\n' + ), + 'package.json': File({ + name: 'npm-test-bundled-git', + scripts: { + test: 'node test.js' + }, + version: '1.2.5', + dependencies: { + glob: 'git://github.com/isaacs/node-glob.git#npm-test' + }, + bundledDependencies: [ + 'glob' + ] + }) + }) +) +test('setup', function (t) { + setup() + t.done() +}) +test('bundled-git', function (t) { + common.npm(['install', '--global-style', fixturepath], {cwd: basepath}, installCheckAndTest) + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + console.error(stderr) + console.log(stdout) + t.is(code, 0, 'install went ok') + + var actual = require(path.resolve(installedpath, 'node_modules/glob/node_modules/minimatch/package.json')) + Object.keys(minimatchExpected).forEach(function (key) { + t.isDeeply(actual[key], minimatchExpected[key], key + ' set to the right value') + }) + + common.npm(['rm', fixturepath], {cwd: basepath}, removeCheckAndDone) + } + function removeCheckAndDone (err, code, stdout, stderr) { + if (err) throw err + console.error(stderr) + console.log(stdout) + t.is(code, 0, 'remove went ok') + t.done() + } +}) +test('cleanup', function (t) { + cleanup() + t.done() +}) +function setup () { + cleanup() + fixture.create(fixturepath) + mkdirp.sync(modulepath) +} +function cleanup () { + fixture.remove(fixturepath) + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-dir-bin.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-dir-bin.js new file mode 100644 index 00000000..60385934 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-dir-bin.js @@ -0,0 +1,79 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-dir-bin') +var modulepath = path.resolve(basepath, 'node_modules') +var installedpath = path.resolve(modulepath, 'npm-test-dir-bin') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir +var fixture = new Tacks( + Dir({ + bin: Dir({ + 'dir-bin': File( + '#!/usr/bin/env node\n' + + "console.log('test ran ok')\n" + ) + }), + 'package.json': File({ + name: 'npm-test-dir-bin', + version: '1.2.5', + directories: { + bin: './bin' + }, + scripts: { + test: 'node test.js' + } + }), + 'test.js': File( + "require('child_process').exec('dir-bin', { env: process.env },\n" + + ' function (err, stdout, stderr) {\n' + + " if (err && err.code) throw new Error('exited badly with code = ' + err.code)\n" + + ' console.log(stdout)\n' + + ' console.error(stderr)\n' + + ' }\n' + + ')\n' + ) + }) +) +test('setup', function (t) { + setup() + t.done() +}) +test('dir-bin', function (t) { + common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest) + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'install went ok') + common.npm(['test'], {cwd: installedpath}, testCheckAndRemove) + } + function testCheckAndRemove (err, code, stdout, stderr) { + t.ifError(err, 'npm test on array bin') + t.equal(code, 0, 'exited OK') + t.equal(stderr.trim(), '', 'no error output') + t.match(stdout, /test ran ok/, 'child script ran properly') + common.npm(['rm', fixturepath], {cwd: basepath}, removeCheckAndDone) + } + function removeCheckAndDone (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'remove went ok') + t.done() + } +}) +test('cleanup', function (t) { + cleanup() + t.done() +}) +function setup () { + cleanup() + fixture.create(fixturepath) + mkdirp.sync(modulepath) +} +function cleanup () { + fixture.remove(fixturepath) + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-ignore-nested-nm.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-ignore-nested-nm.js new file mode 100644 index 00000000..694e6851 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-ignore-nested-nm.js @@ -0,0 +1,64 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-ignore-nested-nm') +var modulepath = path.resolve(basepath, 'node_modules') +var installedpath = path.resolve(modulepath, 'npm-test-ignore-nested-nm') +var fs = require('graceful-fs') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +var fileData = 'I WILL NOT BE IGNORED!\n' +var fixture = new Tacks( + Dir({ + lib: Dir({ + node_modules: Dir({ + foo: File(fileData) + }) + }), + 'package.json': File({ + name: 'npm-test-ignore-nested-nm', + version: '1.2.5' + }) + }) +) +test('setup', function (t) { + setup() + t.done() +}) +test('ignore-nested-nm', function (t) { + common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest) + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'install went ok') + var foopath = path.resolve(installedpath, 'lib/node_modules/foo') + fs.readFile(foopath, function (err, data) { + t.ifError(err, 'file read successfully') + t.equal(data.toString(), fileData) + common.npm(['rm', fixturepath], {cwd: basepath}, removeCheckAndDone) + }) + } + function removeCheckAndDone (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'remove went ok') + t.done() + } +}) +test('cleanup', function (t) { + cleanup() + t.done() +}) +function setup () { + cleanup() + fixture.create(fixturepath) + mkdirp.sync(modulepath) +} +function cleanup () { + fixture.remove(fixturepath) + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-missing-bindir.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-missing-bindir.js new file mode 100644 index 00000000..337cd3ca --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-missing-bindir.js @@ -0,0 +1,82 @@ +'use strict' +var path = require('path') +var fs = require('fs') +var test = require('tap').test +var common = require('../common-tap.js') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-missing-bindir') +var modulepath = path.resolve(basepath, 'node_modules') +var installedpath = path.resolve(modulepath, 'npm-test-missing-bindir') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +var fixture = new Tacks( + Dir({ + README: File( + 'just an npm test\n' + ), + 'package.json': File({ + name: 'npm-test-missing-bindir', + version: '0.0.0', + directories: { + bin: './not-found' + } + }) + }) +) + +test('setup', function (t) { + setup() + t.done() +}) + +function installedExists (filename) { + try { + fs.statSync(path.resolve(installedpath, filename)) + return true + } catch (ex) { + console.log(ex) + return false + } +} + +test('missing-bindir', function (t) { + common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest) + + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + if (stderr) console.error(stderr) + console.log(stdout) + t.is(code, 0, 'install went ok') + t.is(installedExists('README'), true, 'README') + t.is(installedExists('package.json'), true, 'package.json') + common.npm(['rm', fixturepath], {cwd: basepath}, removeCheckAndDone) + } + + function removeCheckAndDone (err, code, stdout, stderr) { + if (err) throw err + console.error(stderr) + console.log(stdout) + t.is(code, 0, 'remove went ok') + t.done() + } +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) + +function setup () { + cleanup() + fixture.create(fixturepath) + mkdirp.sync(modulepath) +} + +function cleanup () { + fixture.remove(fixturepath) + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-no-auth-leak.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-no-auth-leak.js new file mode 100644 index 00000000..3042f1b0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-no-auth-leak.js @@ -0,0 +1,75 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +var fixture = new Tacks( + Dir({ + README: File( + 'just an npm test\n' + ), + 'package.json': File({ + name: 'npm-test-no-auth-leak', + version: '0.0.0', + scripts: { + test: 'node test.js' + } + }), + '.npmrc': File( + 'auth=abc', + 'authCrypt=def', + 'password=xyz', + '//registry.npmjs.org/:_authToken=nopenope' + ), + 'test.js': File( + 'var authTokenKeys = Object.keys(process.env)\n' + + ' .filter(function (key) { return /authToken/.test(key) })\n' + + 'console.log(JSON.stringify({\n' + + ' password: process.env.npm_config__password || null,\n' + + ' auth: process.env.npm_config__auth || null,\n' + + ' authCrypt: process.env.npm_config__authCrypt || null ,\n' + + ' authToken: authTokenKeys && process.env[authTokenKeys[0]] || null\n' + + '}))' + ) + }) +) + +test('setup', function (t) { + setup() + t.done() +}) + +test('no-auth-leak', function (t) { + common.npm(['test'], {cwd: basepath}, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'test ran ok') + if (stderr) console.log(stderr) + var matchResult = /^[^{]*(\{(?:.|\n)*\})[^}]*$/ + t.like(stdout, matchResult, 'got results with a JSON chunk in them') + var stripped = stdout.replace(matchResult, '$1') + var result = JSON.parse(stripped) + t.is(result.password, null, 'password') + t.is(result.auth, null, 'auth') + t.is(result.authCrypt, null, 'authCrypt') + t.is(result.authToken, null, 'authToken') + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) + +function setup () { + cleanup() + fixture.create(basepath) +} + +function cleanup () { + fixture.remove(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-npm-self-install.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-npm-self-install.js new file mode 100644 index 00000000..a3cad6cf --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-npm-self-install.js @@ -0,0 +1,107 @@ +'use strict' +var test = require('tap').test +var fs = require('graceful-fs') +var common = require('../common-tap.js') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var npmpath = path.resolve(__dirname, '../..') +var basepath = path.resolve(osenv.tmpdir(), path.basename(__filename, '.js')) +var globalpath = path.resolve(basepath, 'global') +var extend = Object.assign || require('util')._extend +var isWin32 = process.platform === 'win32' + +test('setup', function (t) { + setup() + t.done() +}) + +var tarball + +test('build-tarball', function (t) { + common.npm(['pack'], {cwd: npmpath, stdio: ['ignore', 'pipe', process.stderr]}, function (err, code, stdout) { + if (err) throw err + t.is(code, 0, 'pack went ok') + tarball = path.resolve(npmpath, stdout.trim().replace(/^(?:.|\n)*(?:^|\n)(.*?[.]tgz)$/, '$1')) + t.match(tarball, /[.]tgz$/, 'got a tarball') + t.done() + }) +}) + +function exists () { + try { + fs.statSync(path.resolve.apply(null, arguments)) + return true + } catch (ex) { + return false + } +} + +test('npm-self-install', function (t) { + if (!tarball) return t.done() + + var env = extend({}, process.env) + var pathsep = isWin32 ? ';' : ':' + env.npm_config_prefix = globalpath + env.npm_config_global = 'true' + env.npm_config_npat = 'false' + env.NODE_PATH = null + env.npm_config_user_agent = null + env.npm_config_color = 'always' + env.npm_config_progress = 'always' + var PATH = env.PATH.split(pathsep) + var binpath = isWin32 ? globalpath : path.join(globalpath, 'bin') + var cmdname = isWin32 ? 'npm.cmd' : 'npm' + PATH.unshift(binpath) + env.PATH = PATH.join(pathsep) + + var opts = {cwd: basepath, env: env, stdio: ['ignore', 'ignore', process.stderr]} + + common.npm(['install', '--ignore-scripts', tarball], opts, installCheckAndTest) + function installCheckAndTest (err, code) { + if (err) throw err + t.is(code, 0, 'install went ok') + t.is(exists(binpath, cmdname), true, 'binary was installed') + t.is(exists(globalpath, 'lib', 'node_modules', 'npm'), true, 'module path exists') + common.npm(['ls', '--json', '--depth=0'], {cwd: basepath, env: env}, lsCheckAndRemove) + } + function lsCheckAndRemove (err, code, stdout, stderr) { + t.ifError(err, 'npm test on array bin') + t.equal(code, 0, 'exited OK') + t.equal(stderr.trim(), '', 'no error output') + var installed = JSON.parse(stdout.trim()) + t.is(Object.keys(installed.dependencies).length, 1, 'one thing installed') + t.is(path.resolve(globalpath, installed.dependencies.npm.from), tarball, 'and it was our npm tarball') + common.npm(['rm', 'npm'], {cwd: basepath, env: env, stdio: 'inherit'}, removeCheck) + } + function removeCheck (err, code) { + if (err) throw err + t.is(code, 0, 'remove went ok') + common.npm(['ls', '--json', '--depth=0'], {cwd: basepath, env: env}, andDone) + } + function andDone (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'remove went ok') + t.equal(stderr.trim(), '', 'no error output') + var installed = JSON.parse(stdout.trim()) + t.ok(!installed.dependencies || installed.dependencies.length === 0, 'nothing left') + t.is(exists(binpath, cmdname), false, 'binary was removed') + t.is(exists(globalpath, 'lib', 'node_modules', 'npm'), false, 'module was entirely removed') + t.done() + } +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) + +function setup () { + cleanup() + mkdirp.sync(globalpath) +} + +function cleanup () { + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-optional-deps.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-optional-deps.js new file mode 100644 index 00000000..4f8e74be --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-optional-deps.js @@ -0,0 +1,80 @@ +'use strict' +var path = require('path') +var fs = require('fs') +var test = require('tap').test +var common = require('../common-tap.js') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-optional-deps') +var modulepath = path.resolve(basepath, 'node_modules') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +var fixture = new Tacks( + Dir({ + README: File( + 'just an npm test\n' + ), + 'package.json': File({ + name: 'npm-test-optional-deps', + version: '1.2.5', + optionalDependencies: { + 'npm-test-foobarzaaakakaka': 'http://example.com/', + async: '10.999.14234', + mkdirp: '0.3.5', + optimist: 'some invalid version 99 #! $$ x y z', + 'npm-test-failer': '*' + } + }) + }) +) + +var server + +test('setup', function (t) { + setup() + mr({port: common.port}, function (err, s) { + if (err) throw err + server = s + t.done() + }) +}) + +test('optional-deps', function (t) { + server.get('/npm-test-failer').reply(404, {error: 'nope'}) + + var opts = ['--registry=' + common.registry, '--timeout=100'] + common.npm(opts.concat(['install', fixturepath]), {cwd: basepath}, installCheckAndTest) + + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + if (stderr) console.error(stderr) + server.done() + t.is(code, 0, 'install went ok') + var subpath = modulepath + '/npm-test-optional-deps/node_modules/' + var dir = fs.readdirSync(subpath) + t.isDeeply(dir, ['mkdirp'], 'only one optional dep should be there') + t.is(require(path.resolve(subpath, 'mkdirp', 'package.json')).version, '0.3.5', 'mkdirp version right') + t.done() + } +}) + +test('cleanup', function (t) { + cleanup() + server.close() + t.done() +}) + +function setup () { + cleanup() + fixture.create(fixturepath) + mkdirp.sync(modulepath) +} + +function cleanup () { + fixture.remove(fixturepath) + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-platform-all.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-platform-all.js new file mode 100644 index 00000000..232f2955 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-platform-all.js @@ -0,0 +1,73 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-platform-all') +var modulepath = path.resolve(basepath, 'node_modules') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +var fixture = new Tacks( + Dir({ + README: File( + 'just an npm test\n' + ), + 'package.json': File({ + name: 'npm-test-platform-all', + version: '9.9.9-9', + homepage: 'http://www.zombo.com/', + os: [ + 'darwin', + 'linux', + 'win32', + 'solaris', + 'haiku', + 'sunos', + 'freebsd', + 'openbsd', + 'netbsd' + ], + cpu: [ + 'arm', + 'mips', + 'ia32', + 'x64', + 'sparc' + ] + }) + }) +) + +test('setup', function (t) { + setup() + t.done() +}) + +test('platform-all', function (t) { + common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest) + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + t.is(stderr, '', 'no error messages') + t.is(code, 0, 'install went ok') + t.done() + } +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) + +function setup () { + cleanup() + fixture.create(fixturepath) + mkdirp.sync(modulepath) +} +function cleanup () { + fixture.remove(fixturepath) + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-platform.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-platform.js new file mode 100644 index 00000000..e60db1e8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-platform.js @@ -0,0 +1,64 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-platform') +var modulepath = path.resolve(basepath, 'node_modules') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +var fixture = new Tacks( + Dir({ + README: File( + 'just an npm test\n' + ), + 'package.json': File({ + name: 'npm-test-platform', + version: '9.9.9-9', + homepage: 'http://www.youtube.com/watch?v=dQw4w9WgXcQ', + os: [ + '!this_is_not_a_real_os', + '!neither_is_this' + ], + cpu: [ + '!this_is_not_a_real_cpu', + '!this_isnt_either' + ] + }) + }) +) + +test('setup', function (t) { + setup() + t.done() +}) + +test('platform', function (t) { + common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest) + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + console.error(stderr) + t.is(code, 0, 'install went ok') + t.done() + } +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) + +function setup () { + cleanup() + fixture.create(fixturepath) + mkdirp.sync(modulepath) +} + +function cleanup () { + fixture.remove(fixturepath) + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-private.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-private.js new file mode 100644 index 00000000..7d8751aa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-private.js @@ -0,0 +1,58 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-private') +var modulepath = path.resolve(basepath, 'node_modules') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +var fixture = new Tacks( + Dir({ + README: File( + 'just an npm test\n' + ), + 'package.json': File({ + name: 'npm-test-private', + version: '9.9.9-9', + homepage: 'http://www.youtube.com/watch?v=1MLry6Cn_D4', + private: 'true' + }) + }) +) + +test('setup', function (t) { + setup() + t.done() +}) + +test('private', function (t) { + common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest) + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + console.error(stderr) + console.log(stdout) + t.is(code, 0, 'install went ok') + t.done() + } +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) + +function setup () { + cleanup() + fixture.create(fixturepath) + mkdirp.sync(modulepath) +} + +function cleanup () { + fixture.remove(fixturepath) + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-shrinkwrap.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-shrinkwrap.js new file mode 100644 index 00000000..5c4bf0c7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-shrinkwrap.js @@ -0,0 +1,132 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +var fixture = new Tacks( + Dir({ + README: File( + 'just an npm test\n' + ), + 'npm-shrinkwrap.json': File({ + name: 'npm-test-shrinkwrap', + version: '0.0.0', + dependencies: { + glob: { + version: '3.1.5', + from: 'git://github.com/isaacs/node-glob.git#npm-test', + resolved: 'git://github.com/isaacs/node-glob.git#67bda227fd7a559cca5620307c7d30a6732a792f', + dependencies: { + 'graceful-fs': { + version: '1.1.5', + resolved: 'https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.5.tgz', + dependencies: { + 'fast-list': { + version: '1.0.2', + resolved: 'https://registry.npmjs.org/fast-list/-/fast-list-1.0.2.tgz' + } + } + }, + inherits: { + version: '1.0.0', + resolved: 'https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz' + }, + minimatch: { + version: '0.2.1', + dependencies: { + 'lru-cache': { + version: '1.0.5' + } + } + } + } + }, + minimatch: { + version: '0.1.5', + resolved: 'https://registry.npmjs.org/minimatch/-/minimatch-0.1.5.tgz', + dependencies: { + 'lru-cache': { + version: '1.0.5', + resolved: 'https://registry.npmjs.org/lru-cache/-/lru-cache-1.0.5.tgz' + } + } + }, + 'npm-test-single-file': { + version: '1.2.3', + resolved: 'https://gist.github.com/isaacs/1837112/raw/9ef57a59fc22aeb1d1ca346b68826dcb638b8416/index.js' + } + } + }), + 'package.json': File({ + author: 'Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)', + name: 'npm-test-shrinkwrap', + version: '0.0.0', + dependencies: { + 'npm-test-single-file': 'https://gist.github.com/isaacs/1837112/raw/9ef57a59fc22aeb1d1ca346b68826dcb638b8416/index.js', + glob: 'git://github.com/isaacs/node-glob.git#npm-test', + minimatch: '~0.1.0' + }, + scripts: { + test: 'node test.js' + } + }) + }) +) + +test('setup', function (t) { + setup() + t.done() +}) + +test('shrinkwrap', function (t) { + common.npm(['install'], {cwd: basepath}, installCheckAndTest) + + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + console.error(stderr) + t.is(code, 0, 'install went ok') + + common.npm(['ls', '--json'], {cwd: basepath}, verifyLsMatchesShrinkwrap) + } + + function verifyLsMatchesShrinkwrap (err, code, stdout, stderr) { + if (err) throw err + console.error(stderr) + t.is(code, 0, 'ls went ok') + var actual = JSON.parse(stdout) + var expected = require(path.resolve(basepath, 'npm-shrinkwrap.json')) + // from is expected to vary + t.isDeeply(rmFrom(actual), rmFrom(expected)) + t.done() + } + + function rmFrom (obj) { + for (var i in obj) { + if (i === 'from') { + delete obj[i] + } else if (i === 'dependencies') { + for (var j in obj[i]) { + rmFrom(obj[i][j]) + } + } + } + } +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) + +function setup () { + cleanup() + fixture.create(basepath) +} + +function cleanup () { + fixture.remove(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-test-package.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-test-package.js new file mode 100644 index 00000000..c33fa421 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-test-package.js @@ -0,0 +1,76 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-test-package') +var modulepath = path.resolve(basepath, 'node_modules') +var installedpath = path.resolve(modulepath, 'npm-test-test-package') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +var fixture = new Tacks( + Dir({ + README: File( + 'just an npm test\n' + ), + 'package.json': File({ + name: 'npm-test-test-package', + author: 'Testy McMock', + version: '1.2.3-99-b', + description: "This is a test package used for debugging. It has some random data and that's all." + }) + }) +) + +test('setup', function (t) { + setup() + t.done() +}) + +test('test-package', function (t) { + common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest) + + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + console.error(stderr) + console.log(stdout) + t.is(code, 0, 'install went ok') + common.npm(['test'], {cwd: installedpath}, testCheckAndRemove) + } + + function testCheckAndRemove (err, code, stdout, stderr) { + if (err) throw err + console.error(stderr) + console.log(stdout) + t.is(code, 0, 'npm test w/o test is ok') + common.npm(['rm', fixturepath], {cwd: basepath}, removeCheckAndDone) + } + + function removeCheckAndDone (err, code, stdout, stderr) { + if (err) throw err + console.error(stderr) + console.log(stdout) + t.is(code, 0, 'remove went ok') + t.done() + } +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) + +function setup () { + cleanup() + fixture.create(fixturepath) + mkdirp.sync(modulepath) +} + +function cleanup () { + fixture.remove(fixturepath) + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-url-dep.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-url-dep.js new file mode 100644 index 00000000..cfe77b4c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/legacy-url-dep.js @@ -0,0 +1,61 @@ +'use strict' +var test = require('tap').test +var common = require('../common-tap.js') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var fixturepath = path.resolve(basepath, 'npm-test-url-dep') +var modulepath = path.resolve(basepath, 'node_modules') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir + +var fixture = new Tacks( + Dir({ + README: File( + 'just an npm test\n' + ), + 'package.json': File({ + name: 'npm-test-url-dep', + version: '1.2.3', + dependencies: { + jsonify: 'https://github.com/substack/jsonify/tarball/master', + sax: 'isaacs/sax-js', + 'canonical-host': 'git://github.com/isaacs/canonical-host' + } + }) + }) +) + +test('setup', function (t) { + setup() + t.done() +}) + +test('url-dep', function (t) { + common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest) + function installCheckAndTest (err, code, stdout, stderr) { + if (err) throw err + console.error(stderr) + console.log(stdout) + t.is(code, 0, 'install went ok') + t.done() + } +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) + +function setup () { + cleanup() + fixture.create(fixturepath) + mkdirp.sync(modulepath) +} + +function cleanup () { + fixture.remove(fixturepath) + rimraf.sync(basepath) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/lifecycle-path.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/lifecycle-path.js new file mode 100644 index 00000000..eaab06ad --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/lifecycle-path.js @@ -0,0 +1,88 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'lifecycle-path') +var link = path.resolve(pkg, 'node-bin') + +var PATH +if (process.platform === 'win32') { + // On Windows the 'comspec' environment variable is used, + // so cmd.exe does not need to be on the path. + PATH = 'C:\\foo\\bar' +} else { + // On non-Windows, without the path to the shell, nothing usually works. + PATH = '/bin:/usr/bin' +} + +var printPath = 'console.log(process.env.PATH)\n' + +var json = { + name: 'glorb', + version: '1.2.3', + scripts: { + path: './node-bin/node print-path.js' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + fs.writeFileSync(path.join(pkg, 'print-path.js'), printPath) + fs.symlinkSync(path.dirname(process.execPath), link, 'dir') + t.end() +}) + +test('make sure the path is correct', function (t) { + common.npm(['run-script', 'path'], { + cwd: pkg, + env: { + PATH: PATH, + stdio: [ 0, 'pipe', 2 ] + } + }, function (er, code, stdout) { + if (er) throw er + t.equal(code, 0, 'exit code') + // remove the banner, we just care about the last line + stdout = stdout.trim().split(/\r|\n/).pop() + var pathSplit = process.platform === 'win32' ? ';' : ':' + var root = path.resolve(__dirname, '../..') + var actual = stdout.split(pathSplit).map(function (p) { + if (p.indexOf(root) === 0) { + p = '{{ROOT}}' + p.substr(root.length) + } + return p.replace(/\\/g, '/') + }) + + // get the ones we tacked on, then the system-specific requirements + var expect = [ + '{{ROOT}}/bin/node-gyp-bin', + '{{ROOT}}/test/tap/lifecycle-path/node_modules/.bin', + path.dirname(process.execPath) + ].concat(PATH.split(pathSplit).map(function (p) { + return p.replace(/\\/g, '/') + })) + t.same(actual, expect) + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/lifecycle-signal.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/lifecycle-signal.js new file mode 100644 index 00000000..83155c98 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/lifecycle-signal.js @@ -0,0 +1,57 @@ +var fs = require('graceful-fs') +var path = require('path') +var spawn = require('child_process').spawn + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var node = process.execPath +var npm = require.resolve('../../bin/npm-cli.js') + +var pkg = path.resolve(__dirname, 'lifecycle-signal') + +var json = { + name: 'lifecycle-signal', + version: '1.2.5', + scripts: { + preinstall: 'node -e "process.kill(process.pid,\'SIGSEGV\')"' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + process.chdir(pkg) + t.end() +}) + +test('lifecycle signal abort', function (t) { + // windows does not use lifecycle signals, abort + if (process.platform === 'win32' || process.env.TRAVIS) return t.end() + + var child = spawn(node, [npm, 'install'], { + cwd: pkg + }) + child.on('close', function (code, signal) { + t.equal(code, null) + t.equal(signal, 'SIGSEGV') + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/lifecycle.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/lifecycle.js new file mode 100644 index 00000000..80cd6aa1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/lifecycle.js @@ -0,0 +1,12 @@ +var test = require("tap").test +var npm = require("../../") +var lifecycle = require("../../lib/utils/lifecycle") + +test("lifecycle: make env correctly", function (t) { + npm.load({enteente: Infinity}, function () { + var env = lifecycle.makeEnv({}, null, process.env) + + t.equal("Infinity", env.npm_config_enteente) + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/link.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/link.js new file mode 100644 index 00000000..67615609 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/link.js @@ -0,0 +1,120 @@ +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var path = require('path') +var rimraf = require('rimraf') +var test = require('tap').test +var writeFileSync = require('fs').writeFileSync + +var common = require('../common-tap.js') + +var link = path.join(__dirname, 'link') +var linkInstall = path.join(__dirname, 'link-install') +var linkRoot = path.join(__dirname, 'link-root') + +var config = 'prefix = ' + linkRoot +var configPath = path.join(link, '_npmrc') + +var OPTS = { + env: { + 'npm_config_userconfig': configPath + } +} + +var readJSON = { + name: 'foo', + version: '1.0.0', + description: '', + main: 'index.js', + scripts: { + test: 'echo \"Error: no test specified\" && exit 1' + }, + author: '', + license: 'ISC' +} + +var installJSON = { + name: 'bar', + version: '1.0.0', + description: '', + main: 'index.js', + scripts: { + test: 'echo \"Error: no test specified\" && exit 1' + }, + author: '', + license: 'ISC' +} + + +test('setup', function (t) { + setup() + common.npm(['ls', '-g', '--depth=0'], OPTS, function (err, c, out) { + t.ifError(err) + t.equal(c, 0, 'set up ok') + t.notOk(out.match(/UNMET DEPENDENCY foo@/), "foo isn't in global") + t.end() + }) +}) + +test('creates global link', function (t) { + process.chdir(link) + common.npm(['link'], OPTS, function (err, c, out) { + t.ifError(err, 'link has no error') + common.npm(['ls', '-g'], OPTS, function (err, c, out, stderr) { + t.ifError(err) + t.equal(c, 0) + t.equal(stderr, '', 'got expected stderr') + t.has(out, /foo@1.0.0/, 'creates global link ok') + t.end() + }) + }) +}) + +test('link-install the package', function (t) { + process.chdir(linkInstall) + common.npm(['link', 'foo'], OPTS, function (err) { + t.ifError(err, 'link-install has no error') + common.npm(['ls'], OPTS, function (err, c, out) { + t.ifError(err) + t.equal(c, 1) + t.has(out, /foo@1.0.0/, 'link-install ok') + t.end() + }) + }) +}) + +test('cleanup', function (t) { + process.chdir(osenv.tmpdir()) + common.npm(['rm', 'foo'], OPTS, function (err, code) { + t.ifError(err, 'npm removed the linked package without error') + t.equal(code, 0, 'cleanup foo in local ok') + common.npm(['rm', '-g', 'foo'], OPTS, function (err, code) { + t.ifError(err, 'npm removed the global package without error') + t.equal(code, 0, 'cleanup foo in global ok') + + cleanup() + t.end() + }) + }) +}) + +function cleanup () { + rimraf.sync(linkRoot) + rimraf.sync(link) + rimraf.sync(linkInstall) +} + +function setup () { + cleanup() + mkdirp.sync(linkRoot) + mkdirp.sync(link) + writeFileSync( + path.join(link, 'package.json'), + JSON.stringify(readJSON, null, 2) + ) + mkdirp.sync(linkInstall) + writeFileSync( + path.join(linkInstall, 'package.json'), + JSON.stringify(installJSON, null, 2) + ) + writeFileSync(configPath, config) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/locker.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/locker.js new file mode 100644 index 00000000..a0f38797 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/locker.js @@ -0,0 +1,89 @@ +var test = require("tap").test + , path = require("path") + , fs = require("graceful-fs") + , crypto = require("crypto") + , rimraf = require("rimraf") + , osenv = require("osenv") + , mkdirp = require("mkdirp") + , npm = require("../../") + , locker = require("../../lib/utils/locker.js") + , lock = locker.lock + , unlock = locker.unlock + +var pkg = path.join(__dirname, "/locker") + , cache = path.join(pkg, "/cache") + , tmp = path.join(pkg, "/tmp") + , nm = path.join(pkg, "/node_modules") + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +test("setup", function (t) { + cleanup() + mkdirp.sync(cache) + mkdirp.sync(tmp) + t.end() +}) + +test("locking file puts lock in correct place", function (t) { + npm.load({cache: cache, tmpdir: tmp}, function (er) { + t.ifError(er, "npm bootstrapped OK") + + var n = "correct" + , c = n.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "") + , p = path.resolve(nm, n) + , h = crypto.createHash("sha1").update(p).digest("hex") + , l = c.substr(0, 24)+"-"+h.substr(0, 16)+".lock" + , v = path.join(cache, "_locks", l) + + lock(nm, n, function (er) { + t.ifError(er, "locked path") + + fs.exists(v, function (found) { + t.ok(found, "lock found OK") + + unlock(nm, n, function (er) { + t.ifError(er, "unlocked path") + + fs.exists(v, function (found) { + t.notOk(found, "lock deleted OK") + t.end() + }) + }) + }) + }) + }) +}) + +test("unlocking out of order errors out", function (t) { + npm.load({cache: cache, tmpdir: tmp}, function (er) { + t.ifError(er, "npm bootstrapped OK") + + var n = "busted" + , c = n.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "") + , p = path.resolve(nm, n) + , h = crypto.createHash("sha1").update(p).digest("hex") + , l = c.substr(0, 24)+"-"+h.substr(0, 16)+".lock" + , v = path.join(cache, "_locks", l) + + fs.exists(v, function (found) { + t.notOk(found, "no lock to unlock") + + t.throws(function () { + unlock(nm, n, function () { + t.fail("shouldn't get here") + t.end() + }) + }, "blew up as expected") + + t.end() + }) + }) +}) + +test("cleanup", function (t) { + cleanup() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/logout.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/logout.js new file mode 100644 index 00000000..1d9144a2 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/logout.js @@ -0,0 +1,67 @@ +var fs = require("fs") +var path = require("path") + +var mkdirp = require("mkdirp") +var mr = require("npm-registry-mock") +var rimraf = require("rimraf") +var test = require("tap").test + +var common = require("../common-tap.js") + +var pkg = path.resolve(__dirname, "logout") +var outfile = path.join(pkg, "_npmrc") +var opts = { cwd: pkg } + +var contents = function () {/* +foo=boo +//localhost:1337/:_authToken=glarb +*/}.toString().split("\n").slice(1, -1).join("\n") + +function mocks (server) { + server.delete("/-/user/token/glarb") + .reply(200, {}) +} + +test("setup", function (t) { + cleanup() + setup() + t.end() +}) + +test("npm logout", function (t) { + mr({ port: common.port, plugin: mocks }, function (err, s) { + if (err) throw err + + common.npm( + [ + "logout", + "--registry", common.registry, + "--loglevel", "silent", + "--userconfig", outfile + ], + opts, + function (err, code) { + t.ifError(err, "no error output") + t.notOk(code, "exited OK") + + var config = fs.readFileSync(outfile, "utf8") + t.equal(config, "foo=boo\n", "creds gone") + s.close() + t.end() + }) + }) +}) + +test("cleanup", function (t) { + cleanup() + t.end() +}) + +function setup () { + mkdirp.sync(pkg) + fs.writeFileSync(outfile, contents) +} + +function cleanup () { + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-depth-cli.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-depth-cli.js new file mode 100644 index 00000000..b42e692c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-depth-cli.js @@ -0,0 +1,170 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') + +var pkg = path.resolve(__dirname, 'ls-depth-cli') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'ls-depth-cli', + version: '0.0.0', + dependencies: { + 'test-package-with-one-dep': '0.0.0' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + mr({ port: common.port }, function (er, s) { + common.npm( + [ + '--registry', common.registry, + 'install' + ], + EXEC_OPTS, + function (er, c) { + t.ifError(er, 'setup installation ran without issue') + t.equal(c, 0) + s.close() + t.end() + } + ) + }) +}) + +test('npm ls --depth=0', function (t) { + common.npm( + ['ls', '--depth=0'], + EXEC_OPTS, + function (er, c, out) { + t.ifError(er, 'npm ls ran without issue') + t.equal(c, 0, 'ls ran without raising error code') + t.has( + out, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.doesNotHave( + out, + /test-package@0\.0\.0/, + 'output not contains test-package@0.0.0' + ) + t.end() + } + ) +}) + +test('npm ls --depth=1', function (t) { + common.npm( + ['ls', '--depth=1'], + EXEC_OPTS, + function (er, c, out) { + t.ifError(er, 'npm ls ran without issue') + t.equal(c, 0, 'ls ran without raising error code') + t.has( + out, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.has( + out, + /test-package@0\.0\.0/, + 'output contains test-package@0.0.0' + ) + t.end() + } + ) +}) + +test('npm ls --depth=Infinity', function (t) { + // travis has a preconfigured depth=0, in general we can not depend + // on the default value in all environments, so explictly set it here + common.npm( + ['ls', '--depth=Infinity'], + EXEC_OPTS, + function (er, c, out) { + t.ifError(er, 'npm ls ran without issue') + t.equal(c, 0, 'ls ran without raising error code') + t.has( + out, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.has( + out, + /test-package@0\.0\.0/, + 'output contains test-package@0.0.0' + ) + t.end() + } + ) +}) + +test('npm ls --depth=0 --json', function (t) { + common.npm( + ['ls', '--depth=0', '--json'], + EXEC_OPTS, + function (er, c, out) { + t.ifError(er, 'npm ls ran without issue') + t.equal(c, 0, 'ls ran without raising error code') + t.has( + out, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.doesNotHave( + out, + /test-package@0\.0\.0/, + 'output not contains test-package@0.0.0' + ) + t.end() + } + ) +}) + +test('npm ls --depth=Infinity --json', function (t) { + // travis has a preconfigured depth=0, in general we can not depend + // on the default value in all environments, so explictly set it here + common.npm( + ['ls', '--depth=Infinity', '--json'], + EXEC_OPTS, + function (er, c, out) { + t.ifError(er, 'npm ls ran without issue') + t.equal(c, 0, 'ls ran without raising error code') + t.has( + out, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.has( + out, + /test-package@0\.0\.0/, + 'output contains test-package@0.0.0' + ) + t.end() + } + ) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-depth-unmet.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-depth-unmet.js new file mode 100644 index 00000000..2a5f09d7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-depth-unmet.js @@ -0,0 +1,172 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') + +var pkg = path.resolve(__dirname, 'ls-depth-unmet') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'ls-depth-umnet', + author: 'Evan You', + version: '0.0.0', + dependencies: { + 'test-package-with-one-dep': '0.0.0', + underscore: '1.5.1', + optimist: '0.6.0' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + mr({ port: common.port }, function (er, s) { + common.npm( + [ + '--registry', common.registry, + 'install', 'underscore@1.3.1', 'mkdirp', 'test-package-with-one-dep' + ], + EXEC_OPTS, + function (er, c) { + t.ifError(er, 'setup installation ran without issue') + t.equal(c, 0) + s.close() + t.end() + } + ) + }) +}) + +test('npm ls --depth=0', function (t) { + common.npm( + ['ls', '--depth=0'], + EXEC_OPTS, + function (er, c, out) { + t.ifError(er, 'setup installation ran without issue') + t.equal(c, 1, 'ls barfed') + t.has( + out, + /UNMET DEPENDENCY optimist@0\.6\.0/, + 'output contains optimist@0.6.0 and labeled as unmet dependency' + ) + t.has( + out, + /mkdirp@0\.3\.5 extraneous/, + 'output contains mkdirp@0.3.5 and labeled as extraneous' + ) + t.has( + out, + /underscore@1\.3\.1 invalid/, + 'output contains underscore@1.3.1 and labeled as invalid' + ) + t.has( + out, + /test-package-with-one-dep@0\.0\.0\n/, + 'output contains test-package-with-one-dep@0.0.0 and has no labels' + ) + t.doesNotHave( + out, + /test-package@0\.0\.0/, + 'output does not contain test-package@0.0.0 which is at depth=1' + ) + t.end() + } + ) +}) + +test('npm ls --depth=1', function (t) { + common.npm( + ['ls', '--depth=1'], + EXEC_OPTS, + function (er, c, out) { + t.ifError(er, 'setup installation ran without issue') + t.equal(c, 1, 'ls barfed') + t.has( + out, + /UNMET DEPENDENCY optimist@0\.6\.0/, + 'output contains optimist@0.6.0 and labeled as unmet dependency' + ) + t.has( + out, + /mkdirp@0\.3\.5 extraneous/, + 'output contains mkdirp@0.3.5 and labeled as extraneous' + ) + t.has( + out, + /underscore@1\.3\.1 invalid/, + 'output contains underscore@1.3.1 and labeled as invalid' + ) + t.has( + out, + /test-package-with-one-dep@0\.0\.0\n/, + 'output contains test-package-with-one-dep@0.0.0 and has no labels' + ) + t.has( + out, + /test-package@0\.0\.0/, + 'output contains test-package@0.0.0 which is at depth=1' + ) + t.end() + } + ) +}) + +test('npm ls --depth=Infinity', function (t) { + // travis has a preconfigured depth=0, in general we can not depend + // on the default value in all environments, so explictly set it here + common.npm( + ['ls', '--depth=Infinity'], + EXEC_OPTS, + function (er, c, out) { + t.ifError(er, 'setup installation ran without issue') + t.equal(c, 1, 'ls barfed') + t.has( + out, + /UNMET DEPENDENCY optimist@0\.6\.0/, + 'output contains optimist@0.6.0 and labeled as unmet dependency' + ) + t.has( + out, + /mkdirp@0\.3\.5 extraneous/, + 'output contains mkdirp@0.3.5 and labeled as extraneous' + ) + t.has( + out, + /underscore@1\.3\.1 invalid/, + 'output contains underscore@1.3.1 and labeled as invalid' + ) + t.has( + out, + /test-package-with-one-dep@0\.0\.0\n/, + 'output contains test-package-with-one-dep@0.0.0 and has no labels' + ) + t.has( + out, + /test-package@0\.0\.0/, + 'output contains test-package@0.0.0 which is at depth=1' + ) + t.end() + } + ) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-env.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-env.js new file mode 100644 index 00000000..bb679024 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-env.js @@ -0,0 +1,91 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') + +var pkg = path.resolve(__dirname, 'ls-depth') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'ls-env', + version: '0.0.0', + dependencies: { + 'test-package-with-one-dep': '0.0.0' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + mr({port: common.port}, function (er, s) { + common.npm( + [ + '--registry', common.registry, + 'install' + ], + EXEC_OPTS, + function (er, c) { + t.ifError(er, 'install ran without issue') + t.equal(c, 0) + s.close() + t.end() + } + ) + }) +}) + +test('npm ls --dev', function (t) { + common.npm(['ls', '--dev'], EXEC_OPTS, function (er, code, stdout) { + t.ifError(er, 'ls --dev ran without issue') + t.equal(code, 0) + t.has(stdout, /(empty)/, 'output contains (empty)') + t.end() + }) +}) + +test('npm ls --production', function (t) { + common.npm(['ls', '--production'], EXEC_OPTS, function (er, code, stdout) { + t.ifError(er, 'ls --production ran without issue') + t.notOk(code, 'npm exited ok') + t.has( + stdout, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.end() + }) +}) + +test('npm ls --prod', function (t) { + common.npm(['ls', '--prod'], EXEC_OPTS, function (er, code, stdout) { + t.ifError(er, 'ls --prod ran without issue') + t.notOk(code, 'npm exited ok') + t.has( + stdout, + /test-package-with-one-dep@0\.0\.0/, + 'output contains test-package-with-one-dep@0.0.0' + ) + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-l-depth-0.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-l-depth-0.js new file mode 100644 index 00000000..01fc616c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-l-depth-0.js @@ -0,0 +1,112 @@ +var cat = require('graceful-fs').writeFileSync +var resolve = require('path').resolve + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test +var tmpdir = require('osenv').tmpdir + +var common = require('../common-tap.js') + +var pkg = resolve(__dirname, 'ls-l-depth-0') +var dep = resolve(pkg, 'deps', 'glock') +var modules = resolve(pkg, 'node_modules') + +var expected = + '\n' + + '│ ' + pkg + '\n' + + '│ \n' + + '└── glock@1.8.7\n' + + ' an inexplicably hostile sample package\n' + + ' git+https://github.com/npm/glo.ck.git\n' + + ' https://glo.ck\n' + + '\n' + +var server + +var EXEC_OPTS = { cwd: pkg } + +var fixture = { + 'name': 'glock', + 'version': '1.8.7', + 'private': true, + 'description': 'an inexplicably hostile sample package', + 'homepage': 'https://glo.ck', + 'repository': 'https://github.com/npm/glo.ck', + 'dependencies': { + 'underscore': '1.5.1' + } +} + +test('setup', function (t) { + setup() + mr({ port: common.port }, function (er, s) { + server = s + + t.end() + }) +}) + +test('#6311: npm ll --depth=0 duplicates listing', function (t) { + common.npm( + [ + '--loglevel', 'silent', + '--registry', common.registry, + 'install', dep + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, 'npm install ran without error') + t.notOk(code, 'npm install exited cleanly') + t.notOk(stderr, 'npm install ran silently') + t.equal( + stdout.trim(), + 'glock@1.8.7 node_modules/glock\n└── underscore@1.5.1', + 'got expected install output' + ) + + common.npm( + [ + '--loglevel', 'silent', + 'ls', '--long', + '--depth', '0' + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, 'npm ll ran without error') + t.notOk(code, 'npm ll exited cleanly') + t.notOk(stderr, 'npm ll ran silently') + t.equal( + stdout, + expected, + 'got expected package name' + ) + + t.end() + } + ) + } + ) +}) + +test('cleanup', function (t) { + cleanup() + server.close() + + t.end() +}) + +function cleanup () { + process.chdir(tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + cleanup() + + mkdirp.sync(modules) + mkdirp.sync(dep) + + cat(resolve(dep, 'package.json'), JSON.stringify(fixture)) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-no-results.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-no-results.js new file mode 100644 index 00000000..f2c49188 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/ls-no-results.js @@ -0,0 +1,12 @@ +var test = require("tap").test +var spawn = require("child_process").spawn +var node = process.execPath +var npm = require.resolve("../../") +var args = [ npm, "ls", "ceci n’est pas une package" ] +test("ls exits non-zero when nothing found", function (t) { + var child = spawn(node, args) + child.on("exit", function (code) { + t.notEqual(code, 0) + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/map-to-registry.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/map-to-registry.js new file mode 100644 index 00000000..c6a0d34f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/map-to-registry.js @@ -0,0 +1,166 @@ +var test = require('tap').test +var npm = require('../../') + +var common = require('../common-tap.js') +var mapRegistry = require('../../lib/utils/map-to-registry.js') + +var creds = { + '//registry.npmjs.org/:username': 'u', + '//registry.npmjs.org/:_password': new Buffer('p').toString('base64'), + '//registry.npmjs.org/:email': 'e', + cache: common.npm_config_cache +} +test('setup', function (t) { + npm.load(creds, function (err) { + t.ifError(err) + t.end() + }) +}) + +test('mapRegistryToURI', function (t) { + t.plan(16) + + mapRegistry('basic', npm.config, function (er, uri, auth, registry) { + t.ifError(er, 'mapRegistryToURI worked') + t.equal(uri, 'https://registry.npmjs.org/basic') + t.deepEqual(auth, { + scope: '//registry.npmjs.org/', + token: undefined, + username: 'u', + password: 'p', + email: 'e', + auth: 'dTpw', + alwaysAuth: false + }) + t.equal(registry, 'https://registry.npmjs.org/') + }) + + npm.config.set('scope', 'test') + npm.config.set('@test:registry', 'http://reg.npm/design/-/rewrite/') + npm.config.set('//reg.npm/design/-/rewrite/:_authToken', 'a-token') + mapRegistry('simple', npm.config, function (er, uri, auth, registry) { + t.ifError(er, 'mapRegistryToURI worked') + t.equal(uri, 'http://reg.npm/design/-/rewrite/simple') + t.deepEqual(auth, { + scope: '//reg.npm/design/-/rewrite/', + token: 'a-token', + username: undefined, + password: undefined, + email: undefined, + auth: undefined, + alwaysAuth: false + }) + t.equal(registry, 'http://reg.npm/design/-/rewrite/') + }) + + npm.config.set('scope', '') + npm.config.set('@test2:registry', 'http://reg.npm/-/rewrite/') + npm.config.set('//reg.npm/-/rewrite/:_authToken', 'b-token') + mapRegistry('@test2/easy', npm.config, function (er, uri, auth, registry) { + t.ifError(er, 'mapRegistryToURI worked') + t.equal(uri, 'http://reg.npm/-/rewrite/@test2%2feasy') + t.deepEqual(auth, { + scope: '//reg.npm/-/rewrite/', + token: 'b-token', + username: undefined, + password: undefined, + email: undefined, + auth: undefined, + alwaysAuth: false + }) + t.equal(registry, 'http://reg.npm/-/rewrite/') + }) + + npm.config.set('scope', 'test') + npm.config.set('@test3:registry', 'http://reg.npm/design/-/rewrite/relative') + npm.config.set('//reg.npm/design/-/rewrite/:_authToken', 'c-token') + mapRegistry('@test3/basic', npm.config, function (er, uri, auth, registry) { + t.ifError(er, 'mapRegistryToURI worked') + t.equal(uri, 'http://reg.npm/design/-/rewrite/relative/@test3%2fbasic') + t.deepEqual(auth, { + scope: '//reg.npm/design/-/rewrite/', + token: 'c-token', + username: undefined, + password: undefined, + email: undefined, + auth: undefined, + alwaysAuth: false + }) + t.equal(registry, 'http://reg.npm/design/-/rewrite/relative/') + }) +}) + +test('mapToRegistry token scoping', function (t) { + npm.config.set('scope', '') + npm.config.set('registry', 'https://reg.npm/') + npm.config.set('//reg.npm/:_authToken', 'r-token') + + t.test('pass token to registry host', function (t) { + mapRegistry( + 'https://reg.npm/packages/e/easy-1.0.0.tgz', + npm.config, + function (er, uri, auth, registry) { + t.ifError(er, 'mapRegistryToURI worked') + t.equal(uri, 'https://reg.npm/packages/e/easy-1.0.0.tgz') + t.deepEqual(auth, { + scope: '//reg.npm/', + token: 'r-token', + username: undefined, + password: undefined, + email: undefined, + auth: undefined, + alwaysAuth: false + }) + t.equal(registry, 'https://reg.npm/') + } + ) + t.end() + }) + + t.test("don't pass token to non-registry host", function (t) { + mapRegistry( + 'https://butts.lol/packages/e/easy-1.0.0.tgz', + npm.config, + function (er, uri, auth, registry) { + t.ifError(er, 'mapRegistryToURI worked') + t.equal(uri, 'https://butts.lol/packages/e/easy-1.0.0.tgz') + t.deepEqual(auth, { + scope: '//reg.npm/', + token: undefined, + username: undefined, + password: undefined, + email: undefined, + auth: undefined, + alwaysAuth: false + }) + t.equal(registry, 'https://reg.npm/') + } + ) + t.end() + }) + + t.test('pass token to non-registry host with always-auth', function (t) { + npm.config.set('always-auth', true) + mapRegistry( + 'https://butts.lol/packages/e/easy-1.0.0.tgz', + npm.config, + function (er, uri, auth, registry) { + t.ifError(er, 'mapRegistryToURI worked') + t.equal(uri, 'https://butts.lol/packages/e/easy-1.0.0.tgz') + t.deepEqual(auth, { + scope: '//reg.npm/', + token: 'r-token', + username: undefined, + password: undefined, + email: undefined, + auth: undefined, + alwaysAuth: true + }) + t.equal(registry, 'https://reg.npm/') + } + ) + t.end() + }) + + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/nerf-dart.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/nerf-dart.js new file mode 100644 index 00000000..524ca939 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/nerf-dart.js @@ -0,0 +1,32 @@ +// taken from https://raw.githubusercontent.com/indexzero/npm/bd3cad01fbd3ab481d2f5da441b9eead16029123/test/tap/config-nerf-dart.js +// originally written by Charlie Robbins, https://github.com/indexzero +var test = require("tap").test +var toNerfDart = require("../../lib/config/nerf-dart.js") + +function validNerfDart (uri, valid) { + if (!valid) valid = "//registry.npmjs.org/" + test(uri, function (t) { + t.equal(toNerfDart(uri), valid) + t.end() + }) +} + +validNerfDart("http://registry.npmjs.org") +validNerfDart("http://registry.npmjs.org/some-package") +validNerfDart("http://registry.npmjs.org/some-package?write=true") +validNerfDart("http://user:pass@registry.npmjs.org/some-package?write=true") +validNerfDart("http://registry.npmjs.org/#random-hash") +validNerfDart("http://registry.npmjs.org/some-package#random-hash") + +validNerfDart( + "http://relative.couchapp.npm/design/-/rewrite/", + "//relative.couchapp.npm/design/-/rewrite/" +) +validNerfDart( + "http://relative.couchapp.npm:8080/design/-/rewrite/", + "//relative.couchapp.npm:8080/design/-/rewrite/" +) +validNerfDart( + "http://relative.couchapp.npm:8080/design/-/rewrite/some-package", + "//relative.couchapp.npm:8080/design/-/rewrite/" +) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/nested-extraneous.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/nested-extraneous.js new file mode 100644 index 00000000..d513d89d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/nested-extraneous.js @@ -0,0 +1,53 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var mkdirp = require("mkdirp") +var fs = require("fs") +var rimraf = require("rimraf") +var path = require("path") + +var pkg = path.resolve(__dirname, "nested-extraneous") +var pj = { + name: "nested-extraneous", + version: "1.2.3" +} + +var dep = path.resolve(pkg, "node_modules", "dep") +var deppj = { + name: "nested-extraneous-dep", + version: "1.2.3", + dependencies: { + "nested-extra-depdep": "*" + } +} + +var depdep = path.resolve(dep, "node_modules", "depdep") +var depdeppj = { + name: "nested-extra-depdep", + version: "1.2.3" +} + +test("setup", function (t) { + rimraf.sync(pkg) + mkdirp.sync(depdep) + fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify(pj)) + fs.writeFileSync(path.resolve(dep, "package.json"), JSON.stringify(deppj)) + fs.writeFileSync(path.resolve(depdep, "package.json"), JSON.stringify(depdeppj)) + t.end() +}) + +test("test", function (t) { + common.npm(["ls"], { + cwd: pkg + }, function (er, code, sto, ste) { + if (er) throw er + t.notEqual(code, 0) + t.notSimilar(ste, /depdep/) + t.notSimilar(sto, /depdep/) + t.end() + }) +}) + +test("clean", function (t) { + rimraf.sync(pkg) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/noargs-install-config-save.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/noargs-install-config-save.js new file mode 100644 index 00000000..26a3ba6c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/noargs-install-config-save.js @@ -0,0 +1,78 @@ +var common = require('../common-tap.js') +var test = require('tap').test +var path = require('path') +var fs = require('fs') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') + +var mr = require("npm-registry-mock") + +var pkg = path.resolve(process.env.npm_config_tmp || '/tmp', + 'noargs-install-config-save') + +function writePackageJson() { + rimraf.sync(pkg) + mkdirp.sync(pkg) + mkdirp.sync(pkg + "/cache") + + fs.writeFileSync(pkg + "/package.json", JSON.stringify({ + "author": "Rocko Artischocko", + "name": "noargs", + "version": "0.0.0", + "devDependencies": { + "underscore": "1.3.1" + } + }), "utf8") +} + +var env = { + 'npm_config_save': true, + 'npm_config_registry': common.registry, + 'npm_config_cache': pkg + '/cache', + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH +} +var OPTS = { + cwd: pkg, + env: env +} + +test("does not update the package.json with empty arguments", function (t) { + writePackageJson() + t.plan(2) + + mr({ port: common.port }, function (er, s) { + common.npm('install', OPTS, function (er, code, stdout, stderr) { + if (er) throw er + t.is(code, 0) + if (code !== 0) { + console.error('#', stdout) + console.error('#', stderr) + } + var text = JSON.stringify(fs.readFileSync(pkg + '/package.json', 'utf8')) + s.close() + t.ok(text.indexOf("\"dependencies") === -1) + }) + }) +}) + +test("updates the package.json (adds dependencies) with an argument", function (t) { + writePackageJson() + t.plan(2) + + mr({ port: common.port }, function (er, s) { + common.npm(['install', 'underscore'], OPTS, function (er, code, stdout, stderr) { + if (er) throw er + t.is(code, 0) + s.close() + var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8")) + t.ok(text.indexOf("\"dependencies") !== -1) + }) + }) +}) + +test("cleanup", function (t) { + rimraf.sync(pkg + "/cache") + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/npm-api-not-loaded-error.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/npm-api-not-loaded-error.js new file mode 100644 index 00000000..d56f56ca --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/npm-api-not-loaded-error.js @@ -0,0 +1,47 @@ +var test = require("tap").test +var npm = require("../..") +var path = require("path") +var rimraf = require("rimraf") +var npmrc = path.join(__dirname, "npmrc") +var fs = require("fs") + +test("setup", function (t) { + fs.writeFileSync(npmrc, "foo = bar\n", "ascii") + t.end() +}) + +test("calling set/get on config pre-load should throw", function (t) { + var threw = true + try { + npm.config.get("foo") + threw = false + } catch (er) { + t.equal(er.message, "npm.load() required") + } finally { + t.ok(threw, "get before load should throw") + } + + threw = true + try { + npm.config.set("foo", "bar") + threw = false + } catch (er) { + t.equal(er.message, "npm.load() required") + } finally { + t.ok(threw, "set before load should throw") + } + + npm.load({ userconfig: npmrc }, function (er) { + if (er) + throw er + t.equal(npm.config.get("foo"), "bar") + npm.config.set("foo", "baz") + t.equal(npm.config.get("foo"), "baz") + t.end() + }) +}) + +test("cleanup", function (t) { + rimraf.sync(npmrc) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/onload.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/onload.js new file mode 100644 index 00000000..706a20d0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/onload.js @@ -0,0 +1,39 @@ +var path = require('path') +var test = require('tap').test +var rimraf = require('rimraf') +var common = require('../common-tap.js') +var opts = { cwd: __dirname } +var binDir = '../../node_modules/.bin' +var fixture = path.resolve(__dirname, binDir) +var onload = path.resolve(__dirname, '../fixtures/onload.js') + +test('setup', function (t) { + rimraf.sync(path.join(__dirname, 'node_modules')) + t.end() +}) + +test('npm bin with valid onload script', function (t) { + var args = ['--onload', onload, 'bin'] + common.npm(args, opts, function (err, code, stdout, stderr) { + t.ifError(err, 'bin ran without issue') + t.equal(stderr.trim(), 'called onload') + t.equal(code, 0, 'exit ok') + t.equal(stdout, fixture + '\n') + t.end() + }) +}) + +test('npm bin with invalid onload script', function (t) { + var onloadScript = onload + 'jsfd' + var args = ['--onload', onloadScript, '--loglevel=warn', 'bin'] + common.npm(args, opts, function (err, code, stdout, stderr) { + t.ifError(err, 'bin ran without issue') + t.match(stderr, /npm WARN onload-script failed to require onload script/) + t.match(stderr, /MODULE_NOT_FOUND/) + t.notEqual(stderr.indexOf(onloadScript), -1) + t.equal(code, 0, 'exit ok') + var res = path.resolve(stdout) + t.equal(res, fixture + '\n') + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/optional-metadep-rollback-collision.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/optional-metadep-rollback-collision.js new file mode 100644 index 00000000..30db19c3 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/optional-metadep-rollback-collision.js @@ -0,0 +1,237 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'optional-metadep-rollback-collision') +var deps = path.resolve(pkg, 'deps') +var nm = path.resolve(pkg, 'node_modules') +var cache = path.resolve(pkg, 'cache') +var pidfile = path.resolve(pkg, 'child.pid') + +var json = { + name: 'optional-metadep-rollback-collision', + version: '1.0.0', + description: 'let\'s just see about that race condition', + optionalDependencies: { + opdep: 'file:./deps/opdep' + } +} + +var d1 = { + name: 'd1', + version: '1.0.0', + description: 'I FAIL CONSTANTLY', + scripts: { + preinstall: 'sleep 1' + }, + dependencies: { + foo: 'http://localhost:8080/' + } +} + +var d2 = { + name: 'd2', + version: '1.0.0', + description: 'how do you *really* know you exist?', + scripts: { + postinstall: 'node blart.js' + }, + dependencies: { + 'graceful-fs': '^3.0.2', + mkdirp: '^0.5.0', + rimraf: '^2.2.8' + } +} + +var opdep = { + name: 'opdep', + version: '1.0.0', + description: 'To explode, of course!', + main: 'index.js', + scripts: { + preinstall: 'node bad-server.js' + }, + dependencies: { + d1: 'file:../d1', + d2: 'file:../d2' + } +} + + +var badServer = function () {/* +var createServer = require('http').createServer +var spawn = require('child_process').spawn +var fs = require('fs') +var path = require('path') +var pidfile = path.resolve(__dirname, '..', '..', 'child.pid') + +if (process.argv[2]) { + console.log('ok') + createServer(function (req, res) { + setTimeout(function () { + res.writeHead(404) + res.end() + }, 1000) + this.close() + }).listen(8080) +} else { + var child = spawn( + process.execPath, + [__filename, 'whatever'], + { + stdio: [0, 1, 2], + detached: true + } + ) + child.unref() + + // kill any prior children, if existing. + try { + var pid = +fs.readFileSync(pidfile) + process.kill(pid, 'SIGKILL') + } catch (er) {} + + fs.writeFileSync(pidfile, child.pid + '\n') +} +*/}.toString().split('\n').slice(1, -1).join('\n') + +var blart = function () {/* +var rando = require('crypto').randomBytes +var resolve = require('path').resolve + +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var writeFile = require('graceful-fs').writeFile + +var BASEDIR = resolve(__dirname, 'arena') + +var keepItGoingLouder = {} +var writers = 0 +var errors = 0 + +function gensym () { return rando(16).toString('hex') } + +function writeAlmostForever (filename) { + if (!keepItGoingLouder[filename]) { + writers-- + if (writers < 1) return done() + } else { + writeFile(filename, keepItGoingLouder[filename], function (err) { + if (err) errors++ + + writeAlmostForever(filename) + }) + } +} + +function done () { + rimraf(BASEDIR, function () { + if (errors > 0) console.log('not ok - %d errors', errors) + else console.log('ok') + }) +} + +mkdirp(BASEDIR, function go () { + for (var i = 0; i < 16; i++) { + var filename = resolve(BASEDIR, gensym() + '.txt') + + keepItGoingLouder[filename] = '' + for (var j = 0; j < 512; j++) keepItGoingLouder[filename] += filename + + writers++ + writeAlmostForever(filename) + } + + setTimeout(function viktor () { + // kill all the writers + keepItGoingLouder = {} + }, 3 * 1000) +}) +*/}.toString().split('\n').slice(1, -1).join('\n') +test('setup', function (t) { + cleanup() + + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + mkdirp.sync(path.join(deps, 'd1')) + fs.writeFileSync( + path.join(deps, 'd1', 'package.json'), + JSON.stringify(d1, null, 2) + ) + + mkdirp.sync(path.join(deps, 'd2')) + fs.writeFileSync( + path.join(deps, 'd2', 'package.json'), + JSON.stringify(d2, null, 2) + ) + fs.writeFileSync(path.join(deps, 'd2', 'blart.js'), blart) + + mkdirp.sync(path.join(deps, 'opdep')) + fs.writeFileSync( + path.join(deps, 'opdep', 'package.json'), + JSON.stringify(opdep, null, 2) + ) + fs.writeFileSync(path.join(deps, 'opdep', 'bad-server.js'), badServer) + + t.end() +}) + +test('go go test racer', function (t) { + common.npm( + [ + '--prefix', pkg, + '--fetch-retries', '0', + '--loglevel', 'silent', + '--cache', cache, + 'install' + ], + { + cwd: pkg, + env: { + PATH: process.env.PATH, + Path: process.env.Path + }, + stdio: [0, 'pipe', 2] + }, + function (er, code, stdout, stderr) { + t.ifError(er, 'install ran to completion without error') + t.notOk(code, 'npm install exited with code 0') + + t.equal(stdout, 'ok\nok\n') + t.notOk(/not ok/.test(stdout), 'should not contain the string \'not ok\'') + t.end() + } + ) +}) + +test('verify results', function (t) { + t.throws(function () { + fs.statSync(nm) + }) + t.end() +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + try { + var pid = +fs.readFileSync(pidfile) + process.kill(pid, 'SIGKILL') + } catch (er) {} + + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-color.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-color.js new file mode 100644 index 00000000..770ff50b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-color.js @@ -0,0 +1,75 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'outdated-color') + +var EXEC_OPTS = { cwd: pkg } + +function hasControlCodes (str) { + return str.length !== ansiTrim(str).length +} + +function ansiTrim (str) { + var r = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' + + '\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g') + return str.replace(r, '') +} + +var json = { + name: 'outdated-color', + description: 'fixture', + version: '0.0.1', + dependencies: { + underscore: '1.3.1' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + process.chdir(pkg) + t.end() +}) + +// note hard to automate tests for color = true +// as npm kills the color config when it detects +// it's not running in a tty +test('does not use ansi styling', function (t) { + t.plan(4) + mr({ port: common.port }, function (er, s) { // create mock registry. + common.npm( + [ + '--registry', common.registry, + 'outdated', 'underscore' + ], + EXEC_OPTS, + function (err, code, stdout) { + t.ifError(err) + t.notOk(code, 'npm outdated exited with code 0') + t.ok(stdout, stdout.length) + t.ok(!hasControlCodes(stdout)) + s.close() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-depth-deep.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-depth-deep.js new file mode 100644 index 00000000..cb097e3f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-depth-deep.js @@ -0,0 +1,78 @@ +var common = require("../common-tap") + , path = require("path") + , test = require("tap").test + , rimraf = require("rimraf") + , npm = require("../../") + , mr = require("npm-registry-mock") + , pkg = path.resolve(__dirname, "outdated-depth-deep") + , cache = path.resolve(pkg, "cache") + +var osenv = require("osenv") +var mkdirp = require("mkdirp") +var fs = require("fs") + +var pj = JSON.stringify({ + "name": "whatever", + "description": "yeah idk", + "version": "1.2.3", + "main": "index.js", + "dependencies": { + "underscore": "1.3.1", + "npm-test-peer-deps": "0.0.0" + }, + "repository": "git://github.com/luk-/whatever" +}, null, 2) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + mkdirp.sync(pkg) + process.chdir(pkg) + fs.writeFileSync(path.resolve(pkg, "package.json"), pj) +} + +test("setup", function (t) { + cleanup() + setup() + t.end() +}) + +test("outdated depth deep (9999)", function (t) { + var underscoreOutdated = ["underscore", "1.3.1", "1.3.1", "1.5.1", "1.3.1"] + var childPkg = path.resolve(pkg, "node_modules", "npm-test-peer-deps") + + var expected = [ [pkg].concat(underscoreOutdated), + [childPkg].concat(underscoreOutdated) ] + + process.chdir(pkg) + + mr({port : common.port}, function (er, s) { + npm.load({ + cache: cache + , loglevel: "silent" + , registry: common.registry + , depth: 9999 + } + , function () { + npm.install(".", function (er) { + if (er) throw new Error(er) + npm.outdated(function (err, d) { + if (err) throw new Error(err) + t.deepEqual(d, expected) + s.close() + t.end() + }) + }) + } + ) + }) +}) + + +test("cleanup", function (t) { + cleanup() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-depth-integer.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-depth-integer.js new file mode 100644 index 00000000..b84aed14 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-depth-integer.js @@ -0,0 +1,77 @@ +var common = require('../common-tap') + , test = require('tap').test + , rimraf = require('rimraf') + , npm = require('../../') + , mr = require('npm-registry-mock') + , pkg = __dirname + '/outdated-depth-integer' + +var osenv = require("osenv") +var mkdirp = require("mkdirp") +var fs = require("fs") + +var pj = JSON.stringify({ + "name": "whatever", + "description": "yeah idk", + "version": "1.2.3", + "main": "index.js", + "dependencies": { + "underscore": "1.3.1" + }, + "repository": "git://github.com/luk-/whatever" +}, null, 2); + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + mkdirp.sync(pkg) + process.chdir(pkg) + fs.writeFileSync("package.json", pj) +} + +test("setup", function (t) { + cleanup() + setup() + t.end() +}) + +test('outdated depth integer', function (t) { + // todo: update with test-package-with-one-dep once the new + // npm-registry-mock is published + var expected = [[ + pkg, + 'underscore', + undefined, // no version installed + '1.3.1', // wanted + '1.5.1', // latest + '1.3.1' + ]] + + mr({port : common.port}, function (er, s) { + npm.load({ + cache: pkg + '/cache' + , loglevel: 'silent' + , registry: common.registry + , depth: 5 + } + , function () { + npm.install('request@0.9.0', function (er) { + if (er) throw new Error(er) + npm.outdated(function (err, d) { + if (err) throw new Error(err) + t.deepEqual(d, expected) + s.close() + t.end() + }) + }) + } + ) + }) +}) + +test("cleanup", function (t) { + cleanup() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-depth.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-depth.js new file mode 100644 index 00000000..309da054 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-depth.js @@ -0,0 +1,75 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../') +var common = require('../common-tap') + +var pkg = path.resolve(__dirname, 'outdated-depth') + +var json = { + name: 'outdated-depth', + version: '1.2.3', + dependencies: { + underscore: '1.3.1', + 'npm-test-peer-deps': '0.0.0' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) + + t.end() +}) + +test('outdated depth zero', function (t) { + var expected = [ + pkg, + 'underscore', + '1.3.1', + '1.3.1', + '1.5.1', + '1.3.1' + ] + + mr({ port: common.port }, function (er, s) { + npm.load( + { + loglevel: 'silent', + registry: common.registry + }, + function () { + npm.install('.', function (er) { + if (er) throw new Error(er) + npm.outdated(function (err, d) { + if (err) throw new Error(err) + t.deepEqual(d[0], expected) + s.close() + t.end() + }) + }) + } + ) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-git.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-git.js new file mode 100644 index 00000000..6af8cfce --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-git.js @@ -0,0 +1,58 @@ +var path = require('path') + +var test = require('tap').test +var mkdirp = require('mkdirp') +var fs = require("graceful-fs") +var rimraf = require('rimraf') + +var common = require('../common-tap.js') +var npm = require('../../') + +// config +var pkg = path.resolve(__dirname, 'outdated-git') +var cache = path.resolve(pkg, 'cache') +var json = { + name: 'outdated-git', + author: 'Rocko Artischocko', + description: 'fixture', + version: '0.0.1', + main: 'index.js', + dependencies: { + 'foo-github': 'robertkowalski/foo', + 'foo-private': 'git://github.com/robertkowalski/foo-private.git', + 'foo-private-credentials': 'git://user:pass@github.com/robertkowalski/foo-private.git' + } +} + +test('setup', function (t) { + setup() + t.end() +}) + +test('discovers new versions in outdated', function (t) { + process.chdir(pkg) + t.plan(5) + npm.load({cache: cache, registry: common.registry, loglevel: 'silent'}, function () { + npm.commands.outdated([], function (er, d) { + t.equal(d[0][3], 'git') + t.equal(d[0][4], 'git') + t.equal(d[0][5], 'github:robertkowalski/foo') + t.equal(d[1][5], 'git://github.com/robertkowalski/foo-private.git') + t.equal(d[2][5], 'git://user:pass@github.com/robertkowalski/foo-private.git') + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + mkdirp.sync(cache) + fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify(json, null, 2), 'utf8') +} + +function cleanup () { + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-include-devdependencies.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-include-devdependencies.js new file mode 100644 index 00000000..5bc86b3f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-include-devdependencies.js @@ -0,0 +1,55 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../') +var common = require('../common-tap.js') + +// config +var pkg = path.resolve(__dirname, 'outdated-include-devdependencies') +var cache = path.resolve(pkg, 'cache') + +var json = { + author: 'Rocko Artischocko', + name: 'ignore-shrinkwrap', + version: '0.0.0', + devDependencies: { + underscore: '>=1.3.1' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(cache) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + t.end() +}) + +test('includes devDependencies in outdated', function (t) { + process.chdir(pkg) + mr({ port: common.port }, function (er, s) { + npm.load({ cache: cache, registry: common.registry }, function () { + npm.outdated(function (er, d) { + t.equal('1.5.1', d[0][3]) + s.close() + t.end() + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-json.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-json.js new file mode 100644 index 00000000..2f557d2d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-json.js @@ -0,0 +1,105 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var server + +var pkg = path.resolve(__dirname, 'outdated-json') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'outdated-json', + author: 'Rockbert', + version: '0.0.0', + dependencies: { + underscore: '~1.3.1' + }, + devDependencies: { + request: '~0.9.0' + } +} + +var expected = { + underscore: { + current: '1.3.3', + wanted: '1.3.3', + latest: '1.5.1', + location: 'node_modules' + path.sep + 'underscore' + }, + request: { + current: '0.9.5', + wanted: '0.9.5', + latest: '2.27.0', + location: 'node_modules' + path.sep + 'request' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) + mr({ port: common.port }, function (er, s) { + t.ifError(er, 'mock registry should never fail to start') + server = s + common.npm( + [ + '--registry', common.registry, + '--silent', + 'install' + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, 'npm install ran without issue') + t.notOk(code, 'npm install ran without raising error code') + + t.end() + } + ) + }) +}) + +test('it should log json data', function (t) { + common.npm( + [ + '--registry', common.registry, + '--silent', + '--json', + 'outdated' + ], + EXEC_OPTS, + function (err, code, stdout) { + t.ifError(err, 'npm outdated ran without issue') + t.notOk(code, 'npm outdated ran without raising error code') + var out + t.doesNotThrow(function () { + out = JSON.parse(stdout) + }, 'output correctly parsed as JSON') + t.deepEqual(out, expected) + + t.end() + } + ) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.end() +}) + +function cleanup () { + // windows fix for locked files + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-local.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-local.js new file mode 100644 index 00000000..c440a5dd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-local.js @@ -0,0 +1,194 @@ +var common = require('../common-tap.js') +var test = require('tap').test +var npm = require('../../') +var rimraf = require('rimraf') +var path = require('path') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var mkdirp = require('mkdirp') +var fs = require('graceful-fs') + +var pkg = path.resolve(__dirname, 'outdated-local') +var pkgLocal = path.resolve(pkg, 'local-module') +var pkgScopedLocal = path.resolve(pkg, 'another-local-module') +var pkgLocalUnderscore = path.resolve(pkg, 'underscore') +var pkgLocalOptimist = path.resolve(pkg, 'optimist') + +var pjParent = JSON.stringify({ + name: 'outdated-local', + version: '1.0.0', + dependencies: { + 'local-module': 'file:local-module', // updated locally, not on repo + '@scoped/another-local-module': 'file:another-local-module', // updated locally, scoped, not on repo + 'underscore': 'file:underscore', // updated locally, updated but lesser version on repo + 'optimist': 'file:optimist' // updated locally, updated and greater version on repo + } +}, null, 2) + '\n' + +var pjLocal = JSON.stringify({ + name: 'local-module', + version: '1.0.0' +}, null, 2) + '\n' + +var pjLocalBumped = JSON.stringify({ + name: 'local-module', + version: '1.1.0' +}, null, 2) + '\n' + +var pjScopedLocal = JSON.stringify({ + name: '@scoped/another-local-module', + version: '1.0.0' +}, null, 2) + '\n' + +var pjScopedLocalBumped = JSON.stringify({ + name: '@scoped/another-local-module', + version: '1.2.0' +}, null, 2) + '\n' + +var pjLocalUnderscore = JSON.stringify({ + name: 'underscore', + version: '1.3.1' +}, null, 2) + '\n' + +var pjLocalUnderscoreBumped = JSON.stringify({ + name: 'underscore', + version: '1.6.1' +}, null, 2) + '\n' + +var pjLocalOptimist = JSON.stringify({ + name: 'optimist', + version: '0.4.0' +}, null, 2) + '\n' + +var pjLocalOptimistBumped = JSON.stringify({ + name: 'optimist', + version: '0.5.0' +}, null, 2) + '\n' + + +function mocks (server) { + server.get('/local-module') + .reply(404) + server.get('/@scoped%2fanother-local-module') + .reply(404) +} + +test('setup', function (t) { + bootstrap() + t.end() +}) + +test('outdated support local modules', function (t) { + t.plan(4) + process.chdir(pkg) + mr({ port: common.port, plugin: mocks }, function (err, s) { + t.ifError(err, 'mock registry started without problems') + + function verify (actual, expected) { + for (var i = 0; i < expected.length; i++) { + var current = expected[i] + + var found = false + for (var j = 0; j < actual.length; j++) { + var target = actual[j] + + var k + for (k = 0; k < current.length; k++) { + if (current[k] !== target[k]) break + } + if (k === current.length) found = true + } + + if (!found) return false + } + + return true + } + + npm.load( + { + loglevel: 'silent', + parseable: true, + registry: common.registry + }, + function () { + npm.install('.', function (err) { + t.ifError(err, 'install success') + bumpLocalModules() + npm.outdated(function (er, d) { + t.ifError(er, 'outdated success') + t.ok(verify(d, [ + [ + path.resolve(__dirname, 'outdated-local'), + 'local-module', + '1.0.0', + '1.1.0', + '1.1.0', + 'file:local-module' + ], + [ + path.resolve(__dirname, 'outdated-local'), + '@scoped/another-local-module', + '1.0.0', + '1.2.0', + '1.2.0', + 'file:another-local-module' + ], + [ + path.resolve(__dirname, 'outdated-local'), + 'underscore', + '1.3.1', + '1.6.1', + '1.5.1', + 'file:underscore' + ], + [ + path.resolve(__dirname, 'outdated-local'), + 'optimist', + '0.4.0', + '0.6.0', + '0.6.0', + 'optimist@0.6.0' + ] + ]), 'got expected outdated output') + s.close() + }) + }) + } + ) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function bootstrap () { + mkdirp.sync(pkg) + fs.writeFileSync(path.resolve(pkg, 'package.json'), pjParent) + + mkdirp.sync(pkgLocal) + fs.writeFileSync(path.resolve(pkgLocal, 'package.json'), pjLocal) + + mkdirp.sync(pkgScopedLocal) + fs.writeFileSync(path.resolve(pkgScopedLocal, 'package.json'), pjScopedLocal) + + mkdirp.sync(pkgLocalUnderscore) + fs.writeFileSync(path.resolve(pkgLocalUnderscore, 'package.json'), pjLocalUnderscore) + + mkdirp.sync(pkgLocalOptimist) + fs.writeFileSync(path.resolve(pkgLocalOptimist, 'package.json'), pjLocalOptimist) +} + +function bumpLocalModules () { + fs.writeFileSync(path.resolve(pkgLocal, 'package.json'), pjLocalBumped) + fs.writeFileSync(path.resolve(pkgScopedLocal, 'package.json'), pjScopedLocalBumped) + fs.writeFileSync(path.resolve(pkgLocalUnderscore, 'package.json'), pjLocalUnderscoreBumped) + fs.writeFileSync(path.resolve(pkgLocalOptimist, 'package.json'), pjLocalOptimistBumped) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-long.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-long.js new file mode 100644 index 00000000..4b0a3265 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-long.js @@ -0,0 +1,101 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var npm = require('../../') + +// config +var pkg = path.resolve(__dirname, 'outdated-long') +var cache = path.resolve(pkg, 'cache') + +var json = { + name: 'outdated-long', + description: 'fixture', + version: '0.0.1', + dependencies: { + underscore: '1.3.1' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(cache) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + process.chdir(pkg) + t.end() +}) + +test('it should not throw', function (t) { + var originalLog = console.log + + var output = [] + var expOut = [ + path.resolve(pkg, 'node_modules', 'underscore'), + path.resolve(pkg, 'node_modules', 'underscore') + + ':underscore@1.3.1' + + ':underscore@1.3.1' + + ':underscore@1.5.1' + + ':dependencies' + ] + + var expData = [ + [ + pkg, + 'underscore', + '1.3.1', + '1.3.1', + '1.5.1', + '1.3.1', + 'dependencies' + ] + ] + + console.log = function () { + output.push.apply(output, arguments) + } + mr({ port: common.port }, function (er, s) { + npm.load( + { + cache: 'cache', + loglevel: 'silent', + parseable: true, + registry: common.registry + }, + function () { + npm.install('.', function (err) { + t.ifError(err, 'install success') + npm.config.set('long', true) + npm.outdated(function (er, d) { + t.ifError(er, 'outdated success') + + console.log = originalLog + + t.same(output, expOut) + t.same(d, expData) + + s.close() + t.end() + }) + }) + } + ) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-new-versions.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-new-versions.js new file mode 100644 index 00000000..c329f623 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-new-versions.js @@ -0,0 +1,62 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var npm = require('../../') + +var pkg = path.resolve(__dirname, 'outdated-new-versions') +var cache = path.resolve(pkg, 'cache') + +var json = { + name: 'new-versions-with-outdated', + author: 'Rockbert', + version: '0.0.0', + dependencies: { + underscore: '~1.3.1' + }, + devDependencies: { + request: '~0.9.0' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(cache) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + t.end() +}) + +test('dicovers new versions in outdated', function (t) { + process.chdir(pkg) + t.plan(2) + + mr({ port: common.port }, function (er, s) { + npm.load({ cache: cache, registry: common.registry }, function () { + npm.outdated(function (er, d) { + for (var i = 0; i < d.length; i++) { + if (d[i][1] === 'underscore') t.equal('1.5.1', d[i][4]) + if (d[i][1] === 'request') t.equal('2.27.0', d[i][4]) + } + s.close() + t.end() + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-notarget.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-notarget.js new file mode 100644 index 00000000..73a3f7d8 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-notarget.js @@ -0,0 +1,47 @@ +// Fixes Issue #1770 +var common = require("../common-tap.js") +var test = require("tap").test +var npm = require("../../") +var osenv = require("osenv") +var path = require("path") +var fs = require("fs") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var pkg = path.resolve(__dirname, "outdated-notarget") +var cache = path.resolve(pkg, "cache") +var mr = require("npm-registry-mock") + +test("outdated-target: if no viable version is found, show error", function (t) { + t.plan(1) + setup() + mr({port : common.port}, function (er, s) { + npm.load({ cache: cache, registry: common.registry}, function () { + npm.commands.update(function (er) { + t.equal(er.code, "ETARGET") + s.close() + t.end() + }) + }) + }) +}) + +test("cleanup", function (t) { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + t.end() +}) + +function setup() { + mkdirp.sync(pkg) + mkdirp.sync(cache) + fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify({ + author: "Evan Lucas", + name: "outdated-notarget", + version: "0.0.0", + description: "Test for outdated-target", + dependencies: { + underscore: "~199.7.1" + } + }), "utf8") + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-private.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-private.js new file mode 100644 index 00000000..f6bb7931 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-private.js @@ -0,0 +1,112 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var npm = require("../../") +var rimraf = require("rimraf") +var path = require("path") +var mr = require("npm-registry-mock") +var osenv = require("osenv") +var mkdirp = require("mkdirp") +var fs = require("graceful-fs") + +var pkg = path.resolve(__dirname, "outdated-private") +var pkgLocalPrivate = path.resolve(pkg, "local-private") +var pkgScopedLocalPrivate = path.resolve(pkg, "another-local-private") +var pkgLocalUnderscore = path.resolve(pkg, "underscore") + +var pjParent = JSON.stringify({ + name : "outdated-private", + version : "1.0.0", + dependencies : { + "local-private" : "file:local-private", + "@scoped/another-local-private" : "file:another-local-private", + "underscore" : "file:underscore" + } +}, null, 2) + "\n" + +var pjLocalPrivate = JSON.stringify({ + name : "local-private", + version : "1.0.0", + private : true +}, null, 2) + "\n" + +var pjLocalPrivateBumped = JSON.stringify({ + name : "local-private", + version : "1.1.0", + private : true +}, null, 2) + "\n" + +var pjScopedLocalPrivate = JSON.stringify({ + name : "@scoped/another-local-private", + version : "1.0.0", + private : true +}, null, 2) + "\n" + +var pjLocalUnderscore = JSON.stringify({ + name : "underscore", + version : "1.3.1" +}, null, 2) + "\n" + +test("setup", function (t) { + bootstrap() + t.end() +}) + +test("outdated ignores private modules", function (t) { + t.plan(3) + process.chdir(pkg) + mr({ port : common.port }, function (err, s) { + npm.load( + { + loglevel : "silent", + parseable : true, + registry : common.registry + }, + function () { + npm.install(".", function (err) { + t.ifError(err, "install success") + bumpLocalPrivate() + npm.outdated(function (er, d) { + t.ifError(er, "outdated success") + t.deepEqual(d, [[ + path.resolve(__dirname, "outdated-private"), + "underscore", + "1.3.1", + "1.5.1", + "1.5.1", + "underscore@1.5.1" + ]]) + s.close() + }) + }) + } + ) + }) +}) + +test("cleanup", function (t) { + cleanup() + t.end() +}) + +function bootstrap () { + mkdirp.sync(pkg) + fs.writeFileSync(path.resolve(pkg, "package.json"), pjParent) + + mkdirp.sync(pkgLocalPrivate) + fs.writeFileSync(path.resolve(pkgLocalPrivate, "package.json"), pjLocalPrivate) + + mkdirp.sync(pkgScopedLocalPrivate) + fs.writeFileSync(path.resolve(pkgScopedLocalPrivate, "package.json"), pjScopedLocalPrivate) + + mkdirp.sync(pkgLocalUnderscore) + fs.writeFileSync(path.resolve(pkgLocalUnderscore, "package.json"), pjLocalUnderscore) +} + +function bumpLocalPrivate () { + fs.writeFileSync(path.resolve(pkgLocalPrivate, "package.json"), pjLocalPrivateBumped) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-symlink.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-symlink.js new file mode 100644 index 00000000..0396d0a7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated-symlink.js @@ -0,0 +1,89 @@ +var fs = require('graceful-fs') +var path = require('path') +var osenv = require('osenv') +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'outdated-symlink') +var cache = path.resolve(pkg, 'cache') +var originalLog + +var fakeRoot = path.join(__dirname, 'fakeRoot') +var OPTS = { + env: { + 'npm_config_prefix': fakeRoot + } +} + +var json = { + name: 'my-local-package', + description: 'fixture', + version: '1.0.0' +} + +test('setup', function (t) { + cleanup() + originalLog = console.log + mkdirp.sync(cache) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) + common.npm(['install', '-g', 'async@0.2.9', 'underscore@1.3.1'], OPTS, function (err, c, out) { + t.ifError(err, 'global install did not error') + common.npm(['link'], OPTS, function (err, c, out) { + t.ifError(err, 'link did not error') + common.npm(['ls', '-g'], OPTS, function (err, c, out, stderr) { + t.ifError(err) + t.equal(c, 0) + t.equal(stderr, '', 'got expected stderr') + t.has(out, /my-local-package@1.0.0/, 'creates global link ok') + t.end() + }) + }) + }) +}) + +test('when outdated is called linked packages should be displayed as such', function (t) { + var regOutLinked = /my-local-package\s*1.0.0\s*linked\s*linked/ + var regOutInstallOne = /async\s*0.2.9\s*1.5.2\s*1.5.2/ + var regOutInstallTwo = /underscore\s*1.3.1\s*1.8.3\s*1.8.3/ + + console.log = function () {} + mr({ port: common.port }, function (er, s) { + common.npm(['outdated', '-g'], OPTS, function (err, c, out, stderr) { + t.ifError(err) + t.ok(out.match(regOutLinked), 'Global Link format as expected') + t.ok(out.match(regOutInstallOne), 'Global Install format as expected') + t.ok(out.match(regOutInstallTwo), 'Global Install format as expected') + s.close() + t.end() + }) + }) +}) + +test('cleanup', function (t) { + process.chdir(osenv.tmpdir()) + common.npm(['rm', 'outdated'], OPTS, function (err, code) { + t.ifError(err, 'npm removed the linked package without error') + t.equal(code, 0, 'cleanup outdated in local ok') + common.npm(['rm', '-g', 'outdated', 'async', 'underscore'], OPTS, function (err, code) { + t.ifError(err, 'npm removed the global package without error') + t.equal(code, 0, 'cleanup outdated in global ok') + + console.log = originalLog + cleanup() + t.end() + }) + }) +}) + +function cleanup () { + rimraf.sync(pkg) + rimraf.sync(fakeRoot) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated.js new file mode 100644 index 00000000..c5b65fb0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/outdated.js @@ -0,0 +1,127 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../') +var common = require('../common-tap.js') + +// config +var pkg = path.resolve(__dirname, 'outdated') +var cache = path.resolve(pkg, 'cache') +var originalLog + +var json = { + name: 'outdated', + description: 'fixture', + version: '0.0.1', + dependencies: { + underscore: '1.3.1', + async: '0.2.9', + checker: '0.5.1' + } +} + +test('setup', function (t) { + cleanup() + originalLog = console.log + mkdirp.sync(cache) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + process.chdir(pkg) + t.end() +}) + +test('it should not throw', function (t) { + var output = [] + var expOut = [ + path.resolve(pkg, 'node_modules', 'async') + + ':async@0.2.9' + + ':async@0.2.9' + + ':async@0.2.10' + + '\n' + + path.resolve(pkg, 'node_modules', 'checker') + + ':checker@0.5.1' + + ':checker@0.5.1' + + ':checker@0.5.2' + + '\n' + + path.resolve(pkg, 'node_modules', 'underscore') + + ':underscore@1.3.1' + + ':underscore@1.3.1' + + ':underscore@1.5.1' + ] + + var expData = [ + [ + pkg, + 'async', + '0.2.9', + '0.2.9', + '0.2.10', + '0.2.9' + ], + [ + pkg, + 'checker', + '0.5.1', + '0.5.1', + '0.5.2', + '0.5.1' + ], + [ + pkg, + 'underscore', + '1.3.1', + '1.3.1', + '1.5.1', + '1.3.1' + ] + ] + + console.log = function () {} + mr({ port: common.port }, function (er, s) { + npm.load( + { + cache: 'cache', + loglevel: 'silent', + parseable: true, + registry: common.registry + }, + function () { + npm.install('.', function (err) { + t.ifError(err, 'install success') + console.log = function () { + output.push.apply(output, arguments) + } + npm.outdated(function (er, d) { + t.ifError(er, 'outdated success') + + console.log = originalLog + + t.same(output, expOut) + t.same(d, expData) + + s.close() + t.end() + }) + }) + } + ) + }) +}) + +test('cleanup', function (t) { + cleanup() + console.log = originalLog + t.end() +}) + +function cleanup () { + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/owner.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/owner.js new file mode 100644 index 00000000..88016283 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/owner.js @@ -0,0 +1,163 @@ +var mr = require("npm-registry-mock") +var test = require("tap").test + +var common = require("../common-tap.js") + +var server + +var EXEC_OPTS = {} + +var jashkenas = { + name : "jashkenas", + email : "jashkenas@gmail.com" +} + +var othiym23 = { + name : "othiym23", + email : "forrest@npmjs.com" +} + +var bcoe = { + name : "bcoe", + email : "ben@npmjs.com" +} + +function shrt (user) { + return user.name+" <"+user.email+">\n" +} + +function mocks (server) { + server.get("/-/user/org.couchdb.user:othiym23") + .many().reply(200, othiym23) + + // test 1 + server.get("/underscore") + .reply(200, {_id:"underscore",_rev:1,maintainers:[jashkenas]}) + server.put( + "/underscore/-rev/1", + {_id:"underscore",_rev:1,maintainers:[jashkenas,othiym23]}, + {} + ).reply(200, {_id:"underscore",_rev:2,maintainers:[jashkenas,othiym23]}) + + // test 2 + server.get("/@xxx%2fscoped") + .reply(200, {_id:"@xxx/scoped",_rev:1,maintainers:[bcoe]}) + server.put( + "/@xxx%2fscoped/-rev/1", + {_id:"@xxx/scoped",_rev:1,maintainers:[bcoe,othiym23]}, + {} + ).reply(200, {_id:"@xxx/scoped",_rev:2,maintainers:[bcoe,othiym23]}) + + // test 3 + server.get("/underscore") + .reply(200, {_id:"underscore",_rev:2,maintainers:[jashkenas,othiym23]}) + + // test 4 + server.get("/underscore") + .reply(200, {_id:"underscore",_rev:2,maintainers:[jashkenas,othiym23]}) + server.put( + "/underscore/-rev/2", + {_id:"underscore",_rev:2,maintainers:[jashkenas]}, + {} + ).reply(200, {_id:"underscore",_rev:3,maintainers:[jashkenas]}) +} + +test("setup", function (t) { + common.npm( + [ + "--loglevel", "silent", + "cache", "clean" + ], + EXEC_OPTS, + function (err, code) { + t.ifError(err, "npm cache clean ran without error") + t.notOk(code, "npm cache clean exited cleanly") + + mr({ port : common.port, plugin : mocks }, function (err, s) { + server = s + t.end() + }) + } + ) +}) + +test("npm owner add", function (t) { + common.npm( + [ + "--loglevel", "silent", + "--registry", common.registry, + "owner", "add", "othiym23", "underscore" + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, "npm owner add ran without error") + t.notOk(code, "npm owner add exited cleanly") + t.notOk(stderr, "npm owner add ran silently") + t.equal(stdout, "+ othiym23 (underscore)\n", "got expected add output") + + t.end() + } + ) +}) + +test("npm owner add (scoped)", function (t) { + common.npm( + [ + "--loglevel", "silent", + "--registry", common.registry, + "owner", "add", "othiym23", "@xxx/scoped" + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, "npm owner add (scoped) ran without error") + t.notOk(code, "npm owner add (scoped) exited cleanly") + t.notOk(stderr, "npm owner add (scoped) ran silently") + t.equal(stdout, "+ othiym23 (@xxx/scoped)\n", "got expected scoped add output") + + t.end() + } + ) +}) + +test("npm owner ls", function (t) { + common.npm( + [ + "--loglevel", "silent", + "--registry", common.registry, + "owner", "ls", "underscore" + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, "npm owner ls ran without error") + t.notOk(code, "npm owner ls exited cleanly") + t.notOk(stderr, "npm owner ls ran silently") + t.equal(stdout, shrt(jashkenas)+shrt(othiym23), "got expected ls output") + + t.end() + } + ) +}) + +test("npm owner rm", function (t) { + common.npm( + [ + "--loglevel", "silent", + "--registry", common.registry, + "owner", "rm", "othiym23", "underscore" + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, "npm owner rm ran without error") + t.notOk(code, "npm owner rm exited cleanly") + t.notOk(stderr, "npm owner rm ran silently") + t.equal(stdout, "- othiym23 (underscore)\n", "got expected rm output") + + t.end() + } + ) +}) + +test("cleanup", function (t) { + server.close() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/pack-scoped.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/pack-scoped.js new file mode 100644 index 00000000..3750abd5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/pack-scoped.js @@ -0,0 +1,81 @@ +// verify that prepublish runs on pack and publish +var test = require("tap").test +var common = require("../common-tap") +var fs = require("graceful-fs") +var join = require("path").join +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") + +var pkg = join(__dirname, "scoped_package") +var manifest = join(pkg, "package.json") +var tmp = join(pkg, "tmp") +var cache = join(pkg, "cache") + +var data = { + name : "@scope/generic-package", + version : "90000.100001.5" +} + +test("setup", function (t) { + var n = 0 + + rimraf.sync(pkg) + + mkdirp(pkg, then()) + mkdirp(cache, then()) + mkdirp(tmp, then()) + + function then () { + n++ + return function (er) { + t.ifError(er) + if (--n === 0) next() + } + } + + function next () { + fs.writeFile(manifest, JSON.stringify(data), "ascii", done) + } + + function done (er) { + t.ifError(er) + + t.pass("setup done") + t.end() + } +}) + +test("test", function (t) { + var env = { + "npm_config_cache" : cache, + "npm_config_tmp" : tmp, + "npm_config_prefix" : pkg, + "npm_config_global" : "false" + } + + for (var i in process.env) { + if (!/^npm_config_/.test(i)) env[i] = process.env[i] + } + + common.npm([ + "pack", + "--loglevel", "warn" + ], { + cwd: pkg, + env: env + }, function(err, code, stdout, stderr) { + t.ifErr(err, "npm pack finished without error") + t.equal(code, 0, "npm pack exited ok") + t.notOk(stderr, "got stderr data: " + JSON.stringify("" + stderr)) + stdout = stdout.trim() + var regex = new RegExp("scope-generic-package-90000.100001.5.tgz", "ig") + t.ok(stdout.match(regex), "found package") + t.end() + }) +}) + +test("cleanup", function (t) { + rimraf.sync(pkg) + t.pass("cleaned up") + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps-invalid.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps-invalid.js new file mode 100644 index 00000000..63e1b957 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps-invalid.js @@ -0,0 +1,94 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test +var Tacks = require('tacks') +var Dir = Tacks.Dir +var File = Tacks.File + +var npm = require('../../') +var common = require('../common-tap') + +var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var cachedir = path.resolve(testdir, 'cache') + +var fixtures = new Tacks(Dir({ + cache: Dir({}), + 'package.json': File({ + author: 'Domenic Denicola <domenic@domenicdenicola.com> (http://domenicdenicola.com/)', + name: 'peer-deps-invalid', + version: '0.0.0', + dependencies: { + 'npm-test-peer-deps-file': 'file-ok/', + 'npm-test-peer-deps-file-invalid': 'file-fail/' + } + }), + 'file-ok': Dir({ + 'package.json': File({ + name: 'npm-test-peer-deps-file', + main: 'index.js', + version: '1.2.3', + description:'This one should conflict with the other one', + peerDependencies: { underscore: '1.3.1' }, + dependencies: { mkdirp: '0.3.5' } + }), + 'index.js': File( + "module.exports = 'I\'m just a lonely index, naked as the day I was born.'" + ), + }), + 'file-fail': Dir({ + 'package.json': File({ + name: 'npm-test-peer-deps-file-invalid', + main: 'index.js', + version: '1.2.3', + description:'This one should conflict with the other one', + peerDependencies: { underscore: '1.3.3' } + }), + 'index.js': File( + "module.exports = 'I\'m just a lonely index, naked as the day I was born.'" + ), + }), +})) + +test('setup', function (t) { + cleanup() + fixtures.create(testdir) + process.chdir(testdir) + t.end() +}) + +test('installing dependencies that have conflicting peerDependencies', function (t) { + mr({port: common.port}, function (err, s) { // create mock registry. + t.ifError(err, 'mock registry started') + npm.load({ + cache: cachedir, + registry: common.registry + }, function () { + npm.commands.install([], function (err) { + if (!err) { + t.fail("No error!") + } else { + t.equal(err.code, "EPEERINVALID") + t.equal(err.packageName, "underscore") + t.match(err.packageVersion, /^1\.3\.[13]$/) + t.match(err.message, /^The package underscore@1\.3\.[13] does not satisfy its siblings' peerDependencies requirements!$/) + } + s.close() // shutdown mock registry. + t.end() + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + fixtures.remove(testdir) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps-toplevel.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps-toplevel.js new file mode 100644 index 00000000..acf437d7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps-toplevel.js @@ -0,0 +1,97 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var npm = npm = require('../../') + +var pkg = path.resolve(__dirname, 'peer-deps-toplevel') + +var expected = { + name: 'npm-test-peer-deps-toplevel', + version: '0.0.0', + dependencies: { + 'npm-test-peer-deps': { + version: '0.0.0', + from: 'npm-test-peer-deps@*', + resolved: common.registry + '/npm-test-peer-deps/-/npm-test-peer-deps-0.0.0.tgz', + dependencies: { + underscore: { + version: '1.3.1', + from: 'underscore@1.3.1', + resolved: common.registry + '/underscore/-/underscore-1.3.1.tgz' + } + } + }, + mkdirp: { + version: '0.3.5', + from: 'mkdirp@*', + resolved: common.registry + '/mkdirp/-/mkdirp-0.3.5.tgz' + }, + request: { + version: '0.9.5', + from: 'request@>=0.9.0 <0.10.0', + resolved: common.registry + '/request/-/request-0.9.5.tgz' + } + } +} + +var json = { + author: 'Domenic Denicola', + name: 'npm-test-peer-deps-toplevel', + version: '0.0.0', + dependencies: { + 'npm-test-peer-deps': '*' + }, + peerDependencies: { + mkdirp: '*' + } +} + +test('installs the peer dependency directory structure', function (t) { + mr({ port: common.port }, function (er, s) { + setup(function (err) { + t.ifError(err, 'setup ran successfully') + + npm.install('.', function (err) { + t.ifError(err, 'packages were installed') + + npm.commands.ls([], true, function (err, _, results) { + t.ifError(err, 'listed tree without problems') + + t.deepEqual(results, expected, 'got expected output from ls') + s.close() + t.end() + }) + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup (cb) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) + + var opts = { cache: path.resolve(pkg, 'cache'), registry: common.registry} + npm.load(opts, cb) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps-without-package-json.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps-without-package-json.js new file mode 100644 index 00000000..faea011d --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps-without-package-json.js @@ -0,0 +1,81 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../') +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'peer-deps-without-package-json') +var cache = path.resolve(pkg, 'cache') +var nodeModules = path.resolve(pkg, 'node_modules') + +var fileJS = function () { +/**package +* { "name": "npm-test-peer-deps-file" +* , "main": "index.js" +* , "version": "1.2.3" +* , "description":"No package.json in sight!" +* , "peerDependencies": { "underscore": "1.3.1" } +* , "dependencies": { "mkdirp": "0.3.5" } +* } +**/ + + module.exports = 'I\'m just a lonely index, naked as the day I was born.' +}.toString().split('\n').slice(1, -1).join('\n') + +test('setup', function (t) { + t.comment('test for https://github.com/npm/npm/issues/3049') + cleanup() + mkdirp.sync(cache) + mkdirp.sync(nodeModules) + fs.writeFileSync(path.join(pkg, 'file-js.js'), fileJS) + process.chdir(pkg) + + t.end() +}) + +test('installing a peerDeps-using package without package.json', function (t) { + var customMocks = { + 'get': { + '/ok.js': [200, path.join(pkg, 'file-js.js')] + } + } + mr({port: common.port, mocks: customMocks}, function (err, s) { + t.ifError(err, 'mock registry booted') + npm.load({ + registry: common.registry, + cache: cache + }, function () { + npm.install(common.registry + '/ok.js', function (err) { + t.ifError(err, 'installed ok.js') + + t.ok( + fs.existsSync(path.join(nodeModules, 'npm-test-peer-deps-file')), + 'passive peer dep installed' + ) + t.ok( + fs.existsSync(path.join(nodeModules, 'underscore')), + 'underscore installed' + ) + + t.end() + s.close() // shutdown mock registry. + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps.js new file mode 100644 index 00000000..7757000e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/peer-deps.js @@ -0,0 +1,89 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var npm = npm = require('../../') + +var pkg = path.resolve(__dirname, 'peer-deps') + +var expected = { + name: 'npm-test-peer-deps-installer', + version: '0.0.0', + dependencies: { + 'npm-test-peer-deps': { + version: '0.0.0', + from: 'npm-test-peer-deps@*', + resolved: common.registry + '/npm-test-peer-deps/-/npm-test-peer-deps-0.0.0.tgz', + dependencies: { + underscore: { + version: '1.3.1', + from: 'underscore@1.3.1', + resolved: common.registry + '/underscore/-/underscore-1.3.1.tgz' + } + } + }, + request: { + version: '0.9.5', + from: 'request@>=0.9.0 <0.10.0', + resolved: common.registry + '/request/-/request-0.9.5.tgz' + } + } +} + +var json = { + author: 'Domenic Denicola', + name: 'npm-test-peer-deps-installer', + version: '0.0.0', + dependencies: { + 'npm-test-peer-deps': '*' + } +} + +test('installs the peer dependency directory structure', function (t) { + mr({ port: common.port }, function (er, s) { + setup(function (err) { + if (err) return t.fail(err) + + npm.install('.', function (err) { + if (err) return t.fail(err) + + npm.commands.ls([], true, function (err, _, results) { + if (err) return t.fail(err) + + t.deepEqual(results, expected) + s.close() + t.end() + }) + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup (cb) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + process.chdir(pkg) + + var opts = { cache: path.resolve(pkg, 'cache'), registry: common.registry} + npm.load(opts, cb) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/ping.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/ping.js new file mode 100644 index 00000000..72dd7e43 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/ping.js @@ -0,0 +1,68 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'ping') +var opts = { cwd: pkg } + +var outfile = path.join(pkg, '_npmrc') + +var contents = function () { +}.toString().split('\n').slice(1, -1).join('\n') + +var pingResponse = { + host: 'registry.npmjs.org', + ok: true, + username: null, + peer: 'example.com' +} + +function mocks (server) { + server.get('/-/ping?write=true').reply(200, JSON.stringify(pingResponse)) +} + +test('setup', function (t) { + cleanup() + setup() + t.end() +}) + +test('npm ping', function (t) { + mr({ port: common.port, plugin: mocks }, function (err, s) { + if (err) throw err + + common.npm([ + 'ping', + '--registry', common.registry, + '--loglevel', 'silent', + '--userconfig', outfile + ], opts, function (err, code, stdout) { + s.close() + t.ifError(err, 'no error output') + t.notOk(code, 'exited OK') + + t.same(JSON.parse(stdout), pingResponse) + t.end() + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + mkdirp.sync(pkg) + fs.writeFileSync(outfile, contents) +} + +function cleanup () { + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/prepublish.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/prepublish.js new file mode 100644 index 00000000..34fc0d01 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/prepublish.js @@ -0,0 +1,82 @@ +// verify that prepublish runs on pack and publish +var common = require("../common-tap") +var test = require("tap").test +var fs = require("graceful-fs") +var join = require("path").join +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") + +var pkg = join(__dirname, "prepublish_package") +var tmp = join(pkg, "tmp") +var cache = join(pkg, "cache") + +test("setup", function (t) { + var n = 0 + cleanup() + mkdirp(pkg, then()) + mkdirp(cache, then()) + mkdirp(tmp, then()) + function then () { + n++ + return function (er) { + if (er) throw er + if (--n === 0) next() + } + } + + function next () { + fs.writeFile(join(pkg, "package.json"), JSON.stringify({ + name: "npm-test-prepublish", + version: "1.2.5", + scripts: { prepublish: "echo ok" } + }), "ascii", function (er) { + if (er) throw er + + t.pass("setup done") + t.end() + }) + } +}) + +test("test", function (t) { + var env = { + "npm_config_cache" : cache, + "npm_config_tmp" : tmp, + "npm_config_prefix" : pkg, + "npm_config_global" : "false" + } + for (var i in process.env) { + if (!/^npm_config_/.test(i)) + env[i] = process.env[i] + } + + common.npm([ + "pack", + "--loglevel", "warn" + ], { cwd: pkg, env: env }, function(err, code, stdout, stderr) { + t.equal(code, 0, "pack finished successfully") + t.ifErr(err, "pack finished successfully") + + t.notOk(stderr, "got stderr data:" + JSON.stringify("" + stderr)) + var c = stdout.trim() + var regex = new RegExp("" + + "> npm-test-prepublish@1.2.5 prepublish [^\\r\\n]+\\r?\\n" + + "> echo ok\\r?\\n" + + "\\r?\\n" + + "ok\\r?\\n" + + "npm-test-prepublish-1.2.5.tgz", "ig") + + t.ok(c.match(regex)) + t.end() + }) +}) + +test("cleanup", function (t) { + cleanup() + t.pass("cleaned up") + t.end() +}) + +function cleanup() { + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/prune.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/prune.js new file mode 100644 index 00000000..df3064dd --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/prune.js @@ -0,0 +1,131 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') +var server + +var pkg = path.resolve(__dirname, 'prune') +var cache = path.resolve(pkg, 'cache') + +var json = { + name: 'prune', + description: 'fixture', + version: '0.0.1', + main: 'index.js', + dependencies: { + underscore: '1.3.1' + }, + devDependencies: { + mkdirp: '*' + } +} + +var EXEC_OPTS = { + cwd: pkg, + npm_config_depth: 'Infinity' +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(cache) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + mr({ port: common.port }, function (er, s) { + server = s + t.end() + }) +}) + +test('npm install', function (t) { + common.npm([ + 'install', + '--cache', cache, + '--registry', common.registry, + '--loglevel', 'silent', + '--production', 'false' + ], EXEC_OPTS, function (err, code, stdout, stderr) { + t.ifErr(err, 'install finished successfully') + t.notOk(code, 'exit ok') + t.notOk(stderr, 'Should not get data on stderr: ' + stderr) + t.end() + }) +}) + +test('npm install test-package', function (t) { + common.npm([ + 'install', 'test-package', + '--cache', cache, + '--registry', common.registry, + '--loglevel', 'silent', + '--production', 'false' + ], EXEC_OPTS, function (err, code, stdout, stderr) { + t.ifErr(err, 'install finished successfully') + t.notOk(code, 'exit ok') + t.notOk(stderr, 'Should not get data on stderr: ' + stderr) + t.end() + }) +}) + +test('verify installs', function (t) { + var dirs = fs.readdirSync(pkg + '/node_modules').sort() + t.same(dirs, [ 'test-package', 'mkdirp', 'underscore' ].sort()) + t.end() +}) + +test('npm prune', function (t) { + common.npm([ + 'prune', + '--loglevel', 'silent', + '--production', 'false' + ], EXEC_OPTS, function (err, code, stdout, stderr) { + t.ifErr(err, 'prune finished successfully') + t.notOk(code, 'exit ok') + t.notOk(stderr, 'Should not get data on stderr: ' + stderr) + t.end() + }) +}) + +test('verify installs', function (t) { + var dirs = fs.readdirSync(pkg + '/node_modules').sort() + t.same(dirs, [ 'mkdirp', 'underscore' ]) + t.end() +}) + +test('npm prune', function (t) { + common.npm([ + 'prune', + '--loglevel', 'silent', + '--production' + ], EXEC_OPTS, function (err, code, stderr) { + t.ifErr(err, 'prune finished successfully') + t.notOk(code, 'exit ok') + t.equal(stderr, 'unbuild mkdirp@0.3.5\n') + t.end() + }) +}) + +test('verify installs', function (t) { + var dirs = fs.readdirSync(pkg + '/node_modules').sort() + t.same(dirs, [ 'underscore' ]) + t.end() +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.pass('cleaned up') + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-access-scoped.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-access-scoped.js new file mode 100644 index 00000000..db10aad7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-access-scoped.js @@ -0,0 +1,73 @@ +var fs = require("fs") +var path = require("path") + +var test = require('tap').test +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var mr = require('npm-registry-mock') +var common = require('../common-tap') +var server + +var pkg = path.join(__dirname, "publish-access") + +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + t.pass('setup done') + server = s + t.end() + }) +}) + +test('scoped packages pass public access if set', function (t) { + server.filteringRequestBody(function (body) { + t.doesNotThrow(function () { + var parsed = JSON.parse(body) + t.equal(parsed.access, 'public', 'access level is correct') + }, 'converted body back into object') + return true + }).put('/@bigco%2fpublish-access', true).reply(201, {ok: true}) + + mkdirp(path.join(pkg, 'cache'), function () { + fs.writeFile( + path.join(pkg, "package.json"), + JSON.stringify({ + name: '@bigco/publish-access', + version: '1.2.5', + public: true + }), + "ascii", + function (er) { + t.ifError(er, 'package file written') + common.npm( + [ + 'publish', + '--access', 'public', + '--cache', path.join(pkg, 'cache'), + '--loglevel', 'silly', + '--registry', common.registry + ], + { + cwd: pkg + }, + function (er) { + t.ifError(er, 'published without error') + + server.done() + t.end() + } + ) + } + ) + }) +}) + +test("cleanup", function (t) { + process.chdir(__dirname) + server.close() + rimraf(pkg, function (er) { + t.ifError(er) + + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-access-unscoped-restricted-fails.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-access-unscoped-restricted-fails.js new file mode 100644 index 00000000..0cf02235 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-access-unscoped-restricted-fails.js @@ -0,0 +1,70 @@ +var fs = require("fs") +var path = require("path") + +var test = require("tap").test +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") + +var npm = require("../../") +var common = require("../common-tap.js") + +var pkg = path.join(__dirname, "publish-access-unscoped") + +// TODO: nock uses setImmediate, breaks 0.8: replace with mockRegistry +if (!global.setImmediate) { + global.setImmediate = function () { + var args = [arguments[0], 0].concat([].slice.call(arguments, 1)) + setTimeout.apply(this, args) + } +} + +test("setup", function (t) { + mkdirp(path.join(pkg, "cache"), function () { + var configuration = { + cache : path.join(pkg, "cache"), + loglevel : "silent", + registry : common.registry + } + + npm.load(configuration, next) + }) + + function next (er) { + t.ifError(er, "npm loaded successfully") + + process.chdir(pkg) + fs.writeFile( + path.join(pkg, "package.json"), + JSON.stringify({ + name: "publish-access", + version: "1.2.5" + }), + "ascii", + function (er) { + t.ifError(er) + + t.pass("setup done") + t.end() + } + ) + } +}) + +test("unscoped packages cannot be restricted", function (t) { + npm.config.set("access", "restricted") + npm.commands.publish([], false, function (er) { + t.ok(er, "got an error back") + t.equal(er.message, "Can't restrict access to unscoped packages.") + + t.end() + }) +}) + +test("cleanup", function (t) { + process.chdir(__dirname) + rimraf(pkg, function (er) { + t.ifError(er) + + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-access-unscoped.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-access-unscoped.js new file mode 100644 index 00000000..27c45bf7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-access-unscoped.js @@ -0,0 +1,73 @@ +var fs = require("fs") +var path = require("path") + +var test = require('tap').test +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var mr = require('npm-registry-mock') +var common = require('../common-tap') +var server + +var pkg = path.join(__dirname, "publish-access-unscoped") + +test('setup', function (t) { + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + t.pass('setup done') + server = s + t.end() + }) +}) + +test('unscoped packages can be explicitly set as public', function (t) { + server.filteringRequestBody(function (body) { + t.doesNotThrow(function () { + var parsed = JSON.parse(body) + t.equal(parsed.access, 'public', 'access level is correct') + }, 'converted body back into object') + return true + }).put('/publish-access', true).reply(201, {ok: true}) + + mkdirp(path.join(pkg, 'cache'), function () { + fs.writeFile( + path.join(pkg, "package.json"), + JSON.stringify({ + name: 'publish-access', + version: '1.2.5', + public: true + }), + "ascii", + function (er) { + t.ifError(er, 'package file written') + common.npm( + [ + 'publish', + '--access', 'public', + '--cache', path.join(pkg, 'cache'), + '--loglevel', 'silly', + '--registry', common.registry + ], + { + cwd: pkg + }, + function (er) { + t.ifError(er, 'published without error') + + server.done() + t.end() + } + ) + } + ) + }) +}) + +test("cleanup", function (t) { + process.chdir(__dirname) + server.close() + rimraf(pkg, function (er) { + t.ifError(er) + + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-config.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-config.js new file mode 100644 index 00000000..20709604 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-config.js @@ -0,0 +1,59 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var fs = require("fs") +var osenv = require("osenv") +var pkg = process.env.npm_config_tmp || "/tmp" +pkg += "/npm-test-publish-config" + +require("mkdirp").sync(pkg) + +fs.writeFileSync(pkg + "/package.json", JSON.stringify({ + name: "npm-test-publish-config", + version: "1.2.3", + publishConfig: { registry: common.registry } +}), "utf8") + +fs.writeFileSync(pkg + "/fixture_npmrc", + "//localhost:1337/:email = fancy@feast.net\n" + + "//localhost:1337/:username = fancy\n" + + "//localhost:1337/:_password = " + new Buffer("feast").toString("base64") + "\n" + + "registry = http://localhost:1337/") + +test(function (t) { + var child + t.plan(4) + require("http").createServer(function (req, res) { + t.pass("got request on the fakey fake registry") + this.close() + res.statusCode = 500 + res.end(JSON.stringify({ + error: "sshhh. naptime nao. \\^O^/ <(YAWWWWN!)" + })) + child.kill('SIGHUP') + }).listen(common.port, function () { + t.pass("server is listening") + + // don't much care about listening to the child's results + // just wanna make sure it hits the server we just set up. + // + // there are plenty of other tests to verify that publish + // itself functions normally. + // + // Make sure that we don't sit around waiting for lock files + child = common.npm(["publish", "--userconfig=" + pkg + "/fixture_npmrc"], { + cwd: pkg, + stdio: "inherit", + env: { + "npm_config_cache_lock_stale": 1000, + "npm_config_cache_lock_wait": 1000, + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH, + USERPROFILE: osenv.home() + } + }, function (err, code) { + t.ifError(err, "publish command finished successfully") + t.notOk(code, "npm install exited with code 0") + }) + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-invalid-semver-tag.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-invalid-semver-tag.js new file mode 100644 index 00000000..6fa7fd4c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-invalid-semver-tag.js @@ -0,0 +1,79 @@ +var common = require('../common-tap.js') +var test = require('tap').test +var npm = require('../../lib/npm.js') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var path = require('path') +var fs = require('fs') +var mr = require('npm-registry-mock') + +var osenv = require('osenv') + +var PKG_DIR = path.resolve(__dirname, 'publish-invalid-semver-tag') +var CACHE_DIR = path.resolve(PKG_DIR, 'cache') + +var DEFAULT_PKG = { + 'name': 'examples', + 'version': '1.2.3' +} + +var mockServer + +function resetPackage (options) { + rimraf.sync(CACHE_DIR) + mkdirp.sync(CACHE_DIR) + + fs.writeFileSync(path.resolve(PKG_DIR, 'package.json'), DEFAULT_PKG) +} + +test('setup', function (t) { + process.chdir(osenv.tmpdir()) + mkdirp.sync(PKG_DIR) + process.chdir(PKG_DIR) + + resetPackage({}) + + mr({ port: common.port }, function (er, server) { + npm.load({ + cache: CACHE_DIR, + registry: common.registry, + cwd: PKG_DIR + }, function (err) { + t.ifError(err, 'started server') + mockServer = server + + t.end() + }) + }) +}) + +test('attempt publish with semver-like version', function (t) { + resetPackage({}) + + npm.config.set('tag', 'v1.x') + npm.commands.publish([], function (err) { + t.notEqual(err, null) + t.same(err.message, 'Tag name must not be a valid SemVer range: v1.x') + t.end() + }) +}) + +test('attempt publish with semver-like version', function (t) { + resetPackage({}) + + npm.config.set('tag', '1.2.3') + npm.commands.publish([], function (err) { + t.notEqual(err, null) + t.same(err.message, 'Tag name must not be a valid SemVer range: 1.2.3') + t.end() + }) +}) + +test('cleanup', function (t) { + mockServer.close() + + process.chdir(osenv.tmpdir()) + rimraf.sync(PKG_DIR) + + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-scoped.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-scoped.js new file mode 100644 index 00000000..533ec288 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/publish-scoped.js @@ -0,0 +1,91 @@ +var fs = require("fs") +var path = require("path") + +var test = require('tap').test +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var common = require('../common-tap') +var mr = require('npm-registry-mock') + +var pkg = path.join(__dirname, "prepublish_package") + +var server + +function setup () { + cleanup() + mkdirp.sync(path.join(pkg, 'cache')) + + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify({ + name: '@bigco/publish-organized', + version: '1.2.5' + }, null, 2), + 'ascii') +} + +test('setup', function (t) { + setup() + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.end() + }) +}) + +test('npm publish should honor scoping', function (t) { + server.filteringRequestBody(verify) + .put('/@bigco%2fpublish-organized', true) + .reply(201, {ok: true}) + + var configuration = [ + 'progress=false', + 'cache=' + path.join(pkg, 'cache'), + 'registry=http://nonexistent.lvh.me', + '//localhost:1337/:username=username', + '//localhost:1337/:_password=' + new Buffer('password').toString('base64'), + '//localhost:1337/:email=' + 'ogd@aoaioxxysz.net', + '@bigco:registry=' + common.registry + ] + var configFile = path.join(pkg, '.npmrc') + + fs.writeFileSync(configFile, configuration.join('\n') + '\n') + + common.npm(['publish'], {'cwd': pkg}, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'published without error') + server.done() + t.end() + }) + + function verify (body) { + t.doesNotThrow(function () { + var parsed = JSON.parse(body) + var current = parsed.versions["1.2.5"] + t.equal( + current._npmVersion, + require(path.resolve(__dirname, "../../package.json")).version, + "npm version is correct" + ) + + t.equal( + current._nodeVersion, + process.versions.node, + "node version is correct" + ) + }, "converted body back into object") + + return true + } +}) + +test('cleanup', function (t) { + server.close() + t.end() + cleanup() +}) + +function cleanup () { + process.chdir(__dirname) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/pwd-prefix.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/pwd-prefix.js new file mode 100644 index 00000000..ec758d0f --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/pwd-prefix.js @@ -0,0 +1,35 @@ +// This test ensures that a few commands do the same +// thing when the cwd is where package.json is, and when +// the package.json is one level up. + +var test = require("tap").test +var common = require("../common-tap.js") +var path = require("path") +var root = path.resolve(__dirname, "../..") +var lib = path.resolve(root, "lib") +var commands = ["run", "version"] + +commands.forEach(function (cmd) { + // Should get the same stdout and stderr each time + var stdout, stderr + + test(cmd + " in root", function (t) { + common.npm([cmd], {cwd: root}, function (er, code, so, se) { + if (er) throw er + t.notOk(code, "npm " + cmd + " exited with code 0") + stdout = so + stderr = se + t.end() + }) + }) + + test(cmd + " in lib", function (t) { + common.npm([cmd], {cwd: lib}, function (er, code, so, se) { + if (er) throw er + t.notOk(code, "npm " + cmd + " exited with code 0") + t.equal(so, stdout) + t.equal(se, stderr) + t.end() + }) + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/referer.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/referer.js new file mode 100644 index 00000000..334530dc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/referer.js @@ -0,0 +1,23 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var http = require("http") + +test("should send referer http header", function (t) { + http.createServer(function (q, s) { + t.equal(q.headers.referer, "install foo") + s.statusCode = 404 + s.end(JSON.stringify({error: "whatever"})) + this.close() + }).listen(common.port, function () { + var reg = "http://localhost:" + common.port + var args = [ "install", "foo", "--registry", reg ] + common.npm(args, {}, function (er, code) { + if (er) { + throw er + } + // should not have ended nicely, since we returned an error + t.ok(code) + t.end() + }) + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/registry.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/registry.js new file mode 100644 index 00000000..6be065c7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/registry.js @@ -0,0 +1,86 @@ +// Run all the tests in the `npm-registry-couchapp` suite +// This verifies that the server-side stuff still works. + +var common = require("../common-tap") +var test = require("tap").test + +var npmExec = require.resolve("../../bin/npm-cli.js") +var path = require("path") +var ca = path.resolve(__dirname, "../../node_modules/npm-registry-couchapp") + +var which = require("which") + +var v = process.versions.node.split(".").map(function (n) { return parseInt(n, 10) }) +if (v[0] === 0 && v[1] < 10) { + console.error( + "WARNING: need a recent Node for npm-registry-couchapp tests to run, have", + process.versions.node + ) +} +else { + which("couchdb", function (er) { + if (er) { + console.error("WARNING: need couch to run test: " + er.message) + } + else { + runTests() + } + }) +} + + +function runTests () { + var env = { TAP: 1 } + for (var i in process.env) env[i] = process.env[i] + env.npm = npmExec + + var opts = { + cwd: ca, + stdio: "inherit" + } + common.npm(["install"], opts, function (err, code, stdout, stderr) { + if (err) { throw err } + if (code) { + return test("need install to work", function (t) { + t.fail( + "install failed with: " + code + + '\nstdout: ' + stdout + + '\nstderr: ' + stderr) + t.end() + }) + + } else { + opts = { + cwd: ca, + env: env, + stdio: "inherit" + } + common.npm( + [ + "test", "--", "-Rtap" + ], + opts, + function (err, code, stdout, stderr) { + if (err) { throw err } + if (code) { + return test("need test to work", function (t) { + t.fail( + "test failed with: " + code + + '\nstdout: ' + stdout + + '\nstderr: ' + stderr) + t.end() + }) + } + opts = { + cwd: ca, + env: env, + stdio: "inherit" + } + common.npm(["prune", "--production"], opts, function (err, code) { + if (err) { throw err } + process.exit(code || 0) + }) + }) + } + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/repo.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/repo.js new file mode 100644 index 00000000..cf7c2a31 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/repo.js @@ -0,0 +1,139 @@ +if (process.platform === "win32") { + console.error("skipping test, because windows and shebangs") + return +} + +var common = require("../common-tap.js") +var mr = require("npm-registry-mock") + +var test = require("tap").test +var npm = require.resolve("../../bin/npm-cli.js") +var node = process.execPath +var rimraf = require("rimraf") +var spawn = require("child_process").spawn +var fs = require("fs") +var path = require('path') +var outFile = path.join(__dirname, '/_output') + +var opts = { cwd: __dirname } + +test("setup", function (t) { + var s = "#!/usr/bin/env bash\n" + + "echo \"$@\" > " + JSON.stringify(__dirname) + "/_output\n" + fs.writeFileSync(__dirname + "/_script.sh", s, "ascii") + fs.chmodSync(__dirname + "/_script.sh", "0755") + t.pass("made script") + t.end() +}) + +test("npm repo underscore", function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + 'repo', 'underscore', + '--registry=' + common.registry, + '--loglevel=silent', + '--browser=' + __dirname + '/_script.sh' + ], opts, function (err, code, stdout, stderr) { + t.equal(code, 0, 'exit ok') + var res = fs.readFileSync(outFile, 'ascii') + s.close() + t.equal(res, "https://github.com/jashkenas/underscore\n") + rimraf.sync(outFile) + t.end() + }) + }) +}) + + +test('npm repo optimist - github (https://)', function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + 'repo', 'optimist', + '--registry=' + common.registry, + '--loglevel=silent', + '--browser=' + __dirname + '/_script.sh' + ], opts, function (err, code, stdout, stderr) { + t.equal(code, 0, 'exit ok') + var res = fs.readFileSync(outFile, 'ascii') + s.close() + t.equal(res, "https://github.com/substack/node-optimist\n") + rimraf.sync(outFile) + t.end() + }) + }) +}) + +test("npm repo npm-test-peer-deps - no repo", function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + 'repo', 'npm-test-peer-deps', + '--registry=' + common.registry, + '--loglevel=silent', + '--browser=' + __dirname + '/_script.sh' + ], opts, function (err, code, stdout, stderr) { + t.equal(code, 1, 'exit not ok') + s.close() + t.end() + }) + }) +}) + +test("npm repo test-repo-url-http - non-github (http://)", function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + 'repo', 'test-repo-url-http', + '--registry=' + common.registry, + '--loglevel=silent', + '--browser=' + __dirname + '/_script.sh' + ], opts, function (err, code, stdout, stderr) { + t.equal(code, 0, 'exit ok') + var res = fs.readFileSync(outFile, 'ascii') + s.close() + t.equal(res, "http://gitlab.com/evanlucas/test-repo-url-http\n") + rimraf.sync(outFile) + t.end() + }) + }) +}) + +test("npm repo test-repo-url-https - non-github (https://)", function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + 'repo', 'test-repo-url-https', + '--registry=' + common.registry, + '--loglevel=silent', + '--browser=' + __dirname + '/_script.sh' + ], opts, function (err, code, stdout, stderr) { + t.equal(code, 0, 'exit ok') + var res = fs.readFileSync(outFile, 'ascii') + s.close() + t.equal(res, "https://gitlab.com/evanlucas/test-repo-url-https\n") + rimraf.sync(outFile) + t.end() + }) + }) +}) + +test("npm repo test-repo-url-ssh - non-github (ssh://)", function (t) { + mr({port : common.port}, function (er, s) { + common.npm([ + 'repo', 'test-repo-url-ssh', + '--registry=' + common.registry, + '--loglevel=silent', + '--browser=' + __dirname + '/_script.sh' + ], opts, function (err, code, stdout, stderr) { + t.equal(code, 0, 'exit ok') + var res = fs.readFileSync(outFile, 'ascii') + s.close() + t.equal(res, "http://gitlab.com/evanlucas/test-repo-url-ssh\n") + rimraf.sync(outFile) + t.end() + }) + }) +}) + +test("cleanup", function (t) { + fs.unlinkSync(__dirname + "/_script.sh") + t.pass("cleaned up") + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/run-script-filter-private.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/run-script-filter-private.js new file mode 100644 index 00000000..33629252 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/run-script-filter-private.js @@ -0,0 +1,52 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') + +var pkg = path.resolve(__dirname, 'run-script-filter-private') + +var opts = { cwd: pkg } + +var json = { + name: 'run-script-filter-private', + version: '1.2.3' +} + +var npmrc = '//blah.com:_harsh=realms\n' + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.resolve(pkg, 'package.json'), + JSON.stringify(json, null, 2) + '\n' + ) + fs.writeFileSync( + path.resolve(pkg, '.npmrc'), + npmrc + ) + t.end() +}) + +test('npm run-script env', function (t) { + common.npm(['run-script', 'env'], opts, function (er, code, stdout, stderr) { + t.ifError(er, 'using default env script') + t.notOk(stderr, 'should not generate errors') + t.ok(stdout.indexOf('npm_config_init_version') > 0, 'expected values in var list') + t.notMatch(stdout, /harsh/, 'unexpected config not there') + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/run-script.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/run-script.js new file mode 100644 index 00000000..a6defd25 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/run-script.js @@ -0,0 +1,330 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var test = require('tap').test +var rimraf = require('rimraf') + +var common = require('../common-tap') + +var pkg = path.resolve(__dirname, 'run-script') +var cache = path.resolve(pkg, 'cache') +var tmp = path.resolve(pkg, 'tmp') + +var opts = { cwd: pkg } + +var fullyPopulated = { + 'name': 'runscript', + 'version': '1.2.3', + 'scripts': { + 'start': 'node -e "console.log(process.argv[1] || \'start\')"', + 'prewith-pre': 'node -e "console.log(process.argv[1] || \'pre\')"', + 'with-pre': 'node -e "console.log(process.argv[1] || \'main\')"', + 'with-post': 'node -e "console.log(process.argv[1] || \'main\')"', + 'postwith-post': 'node -e "console.log(process.argv[1] || \'post\')"', + 'prewith-both': 'node -e "console.log(process.argv[1] || \'pre\')"', + 'with-both': 'node -e "console.log(process.argv[1] || \'main\')"', + 'postwith-both': 'node -e "console.log(process.argv[1] || \'post\')"', + 'stop': 'node -e "console.log(process.argv[1] || \'stop\')"', + 'env-vars': 'node -e "console.log(process.env.run_script_foo_var)"', + 'npm-env-vars': 'node -e "console.log(process.env.npm_run_script_foo_var)"', + 'package-env-vars': 'node -e "console.log(process.env.run_script_foo_var)"', + 'prefixed-package-env-vars': 'node -e "console.log(process.env.npm_package_run_script_foo_var)"' + }, + 'run_script_foo_var': 'run_script_test_foo_val' +} + +var lifecycleOnly = { + name: 'scripted', + version: '1.2.3', + scripts: { + 'prestart': 'echo prestart' + } +} + +var directOnly = { + name: 'scripted', + version: '1.2.3', + scripts: { + 'whoa': 'echo whoa' + } +} + +var both = { + name: 'scripted', + version: '1.2.3', + scripts: { + 'prestart': 'echo prestart', + 'whoa': 'echo whoa' + } +} + +var preversionOnly = { + name: 'scripted', + version: '1.2.3', + scripts: { + 'preversion': 'echo preversion' + } +} + + +function testOutput (t, command, er, code, stdout, stderr) { + var lines + + if (er) + throw er + + if (stderr) + throw new Error('npm ' + command + ' stderr: ' + stderr.toString()) + + lines = stdout.trim().split('\n') + stdout = lines.filter(function (line) { + return line.trim() !== '' && line[0] !== '>' + }).join(';') + + t.equal(stdout, command) + t.end() +} + +function writeMetadata (object) { + fs.writeFileSync( + path.resolve(pkg, 'package.json'), + JSON.stringify(object, null, 2) + '\n' + ) +} + +function cleanup () { + rimraf.sync(pkg) +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(cache) + mkdirp.sync(tmp) + writeMetadata(fullyPopulated) + t.end() +}) + +test('npm run-script start', function (t) { + common.npm(['run-script', 'start'], opts, testOutput.bind(null, t, 'start')) +}) + +test('npm run-script with args', function (t) { + common.npm(['run-script', 'start', '--', 'stop'], opts, testOutput.bind(null, t, 'stop')) +}) + +test('npm run-script with args that contain spaces', function (t) { + common.npm(['run-script', 'start', '--', 'hello world'], opts, testOutput.bind(null, t, 'hello world')) +}) + +test('npm run-script with args that contain single quotes', function (t) { + common.npm(['run-script', 'start', '--', 'they"re awesome'], opts, testOutput.bind(null, t, 'they"re awesome')) +}) + +test('npm run-script with args that contain double quotes', function (t) { + common.npm(['run-script', 'start', '--', 'what"s "up"?'], opts, testOutput.bind(null, t, 'what"s "up"?')) +}) + +test('npm run-script with args that contain ticks', function (t) { + common.npm(['run-script', 'start', '--', 'what\'s \'up\'?'], opts, testOutput.bind(null, t, 'what\'s \'up\'?')) +}) + +test('npm run-script with pre script', function (t) { + common.npm(['run-script', 'with-post'], opts, testOutput.bind(null, t, 'main;post')) +}) + +test('npm run-script with post script', function (t) { + common.npm(['run-script', 'with-pre'], opts, testOutput.bind(null, t, 'pre;main')) +}) + +test('npm run-script with both pre and post script', function (t) { + common.npm(['run-script', 'with-both'], opts, testOutput.bind(null, t, 'pre;main;post')) +}) + +test('npm run-script with both pre and post script and with args', function (t) { + common.npm(['run-script', 'with-both', '--', 'an arg'], opts, testOutput.bind(null, t, 'pre;an arg;post')) +}) + +test('npm run-script explicitly call pre script with arg', function (t) { + common.npm(['run-script', 'prewith-pre', '--', 'an arg'], opts, testOutput.bind(null, t, 'an arg')) +}) + +test('npm run-script test', function (t) { + common.npm(['run-script', 'test'], opts, function (er, code, stdout, stderr) { + t.ifError(er, 'npm run-script test ran without issue') + t.notOk(stderr, 'should not generate errors') + t.end() + }) +}) + +test('npm run-script env', function (t) { + common.npm(['run-script', 'env'], opts, function (er, code, stdout, stderr) { + t.ifError(er, 'using default env script') + t.notOk(stderr, 'should not generate errors') + t.ok(stdout.indexOf('npm_config_init_version') > 0, 'expected values in var list') + t.end() + }) +}) + +test('npm run-script nonexistent-script', function (t) { + common.npm(['run-script', 'nonexistent-script'], opts, function (er, code, stdout, stderr) { + t.ifError(er, 'npm run-script nonexistent-script did not cause npm to explode') + t.ok(stderr, 'should generate errors') + t.end() + }) +}) + +test('npm run-script restart when there isn\'t restart', function (t) { + common.npm(['run-script', 'restart'], opts, testOutput.bind(null, t, 'stop;start')) +}) + +test('npm run-script nonexistent-script with --if-present flag', function (t) { + common.npm(['run-script', '--if-present', 'nonexistent-script'], opts, function (er, code, stdout, stderr) { + t.ifError(er, 'npm run-script --if-present non-existent-script ran without issue') + t.notOk(stderr, 'should not generate errors') + t.end() + }) +}) + +test('npm run-script env vars accessible', function (t) { + process.env.run_script_foo_var = 'run_script_test_foo_val' + common.npm(['run-script', 'env-vars'], { + cwd: pkg + }, function (err, code, stdout, stderr) { + t.ifError(err, 'ran run-script without crashing') + t.equal(code, 0, 'exited normally') + t.equal(stderr, '', 'no error output') + t.match(stdout, + new RegExp(process.env.run_script_foo_var), + 'script had env access') + t.end() + }) +}) + +test('npm run-script package.json vars injected', function (t) { + common.npm(['run-script', 'package-env-vars'], { + cwd: pkg + }, function (err, code, stdout, stderr) { + t.ifError(err, 'ran run-script without crashing') + t.equal(code, 0, 'exited normally') + t.equal(stderr, '', 'no error output') + t.match(stdout, + new RegExp(fullyPopulated.run_script_foo_var), + 'script injected package.json value') + t.end() + }) +}) + +test('npm run-script package.json vars injected with prefix', function (t) { + common.npm(['run-script', 'prefixed-package-env-vars'], { + cwd: pkg + }, function (err, code, stdout, stderr) { + t.ifError(err, 'ran run-script without crashing') + t.equal(code, 0, 'exited normally') + t.equal(stderr, '', 'no error output') + t.match(stdout, + new RegExp(fullyPopulated.run_script_foo_var), + 'script injected npm_package-prefixed package.json value') + t.end() + }) +}) + +test('npm run-script env vars stripped npm-prefixed', function (t) { + process.env.npm_run_script_foo_var = 'run_script_test_foo_val' + common.npm(['run-script', 'npm-env-vars'], { + cwd: pkg + }, function (err, code, stdout, stderr) { + t.ifError(err, 'ran run-script without crashing') + t.equal(code, 0, 'exited normally') + t.equal(stderr, '', 'no error output') + t.notMatch(stdout, + new RegExp(process.env.npm_run_script_foo_var), + 'script stripped npm-prefixed env var') + t.end() + }) +}) + +test('npm run-script no-params (lifecycle only)', function (t) { + var expected = [ + 'Lifecycle scripts included in scripted:', + ' prestart', + ' echo prestart', + '' + ].join('\n') + + writeMetadata(lifecycleOnly) + + common.npm(['run-script'], opts, function (err, code, stdout, stderr) { + t.ifError(err, 'ran run-script without parameters without crashing') + t.notOk(code, 'npm exited without error code') + t.notOk(stderr, 'npm printed nothing to stderr') + t.equal(stdout, expected, 'got expected output') + t.end() + }) +}) + +test('npm run-script no-params (preversion only)', function (t) { + var expected = [ + 'Lifecycle scripts included in scripted:', + ' preversion', + ' echo preversion', + '' + ].join('\n') + + writeMetadata(preversionOnly) + + common.npm(['run-script'], opts, function (err, code, stdout, stderr) { + t.ifError(err, 'ran run-script without parameters without crashing') + t.notOk(code, 'npm exited without error code') + t.notOk(stderr, 'npm printed nothing to stderr') + t.equal(stdout, expected, 'got expected output') + t.end() + }) +}) + +test('npm run-script no-params (direct only)', function (t) { + var expected = [ + 'Scripts available in scripted via `npm run-script`:', + ' whoa', + ' echo whoa', + '' + ].join('\n') + + writeMetadata(directOnly) + + common.npm(['run-script'], opts, function (err, code, stdout, stderr) { + t.ifError(err, 'ran run-script without parameters without crashing') + t.notOk(code, 'npm exited without error code') + t.notOk(stderr, 'npm printed nothing to stderr') + t.equal(stdout, expected, 'got expected output') + t.end() + }) +}) + +test('npm run-script no-params (direct only)', function (t) { + var expected = [ + 'Lifecycle scripts included in scripted:', + ' prestart', + ' echo prestart', + '', + 'available via `npm run-script`:', + ' whoa', + ' echo whoa', + '' + ].join('\n') + + writeMetadata(both) + + common.npm(['run-script'], opts, function (err, code, stdout, stderr) { + t.ifError(err, 'ran run-script without parameters without crashing') + t.notOk(code, 'npm exited without error code') + t.notOk(stderr, 'npm printed nothing to stderr') + t.equal(stdout, expected, 'got expected output') + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/scripts-whitespace-windows.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/scripts-whitespace-windows.js new file mode 100644 index 00000000..86f1c202 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/scripts-whitespace-windows.js @@ -0,0 +1,101 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') + +var pkg = path.resolve(__dirname, 'scripts-whitespace-windows') +var tmp = path.resolve(pkg, 'tmp') +var cache = path.resolve(pkg, 'cache') +var dep = path.resolve(pkg, 'dep') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'scripts-whitespace-windows', + version: '1.0.0', + description: 'a test', + repository: 'git://github.com/robertkowalski/bogus', + scripts: { + foo: 'foo --title \"Analysis of\" --recurse -d report src' + }, + dependencies: { + 'scripts-whitespace-windows-dep': '0.0.1' + }, + license: 'WTFPL' +} + +var dependency = { + name: 'scripts-whitespace-windows-dep', + version: '0.0.1', + bin: [ 'bin/foo' ] +} + +var foo = function () {/* +#!/usr/bin/env node + +if (process.argv.length === 8) + console.log('npm-test-fine') +*/}.toString().split('\n').slice(1, -1).join('\n') + +test('setup', function (t) { + cleanup() + mkdirp.sync(tmp) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + fs.writeFileSync( + path.join(pkg, 'README.md'), + "### THAT'S RIGHT\n" + ) + + mkdirp.sync(path.join(dep, 'bin')) + fs.writeFileSync( + path.join(dep, 'package.json'), + JSON.stringify(dependency, null, 2) + ) + fs.writeFileSync(path.join(dep, 'bin', 'foo'), foo) + + common.npm(['i', dep], { + cwd: pkg, + env: { + npm_config_cache: cache, + npm_config_tmp: tmp, + npm_config_prefix: pkg, + npm_config_global: 'false' + } + }, function (err, code, stdout, stderr) { + t.ifErr(err, 'npm i ' + dep + ' finished without error') + t.equal(code, 0, 'npm i ' + dep + ' exited ok') + t.notOk(stderr, 'no output stderr') + t.end() + }) +}) + +test('test', function (t) { + common.npm(['run', 'foo'], EXEC_OPTS, function (err, code, stdout, stderr) { + stderr = stderr.trim() + if (stderr) console.error(stderr) + t.ifErr(err, 'npm run finished without error') + t.equal(code, 0, 'npm run exited ok') + t.notOk(stderr, 'no output stderr: ' + stderr) + stdout = stdout.trim() + t.ok(/npm-test-fine/.test(stdout)) + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/search.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/search.js new file mode 100644 index 00000000..2fb6a993 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/search.js @@ -0,0 +1,276 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'search') +var cache = path.resolve(pkg, 'cache') +var registryCache = path.resolve(cache, 'localhost_1337', '-', 'all') +var cacheJsonFile = path.resolve(registryCache, '.cache.json') + +var timeMock = { + epoch: 1411727900, + future: 1411727900 + 100, + all: 1411727900 + 25, + since: 0 // filled by since server callback +} + +var EXEC_OPTS = {} + +var mocks = { + /* Since request, always response with an _update time > the time requested */ + sinceFuture: function (server) { + server.filteringPathRegEx(/startkey=[^&]*/g, function (s) { + var _allMock = JSON.parse(JSON.stringify(allMock)) + timeMock.since = _allMock._updated = s.replace('startkey=', '') + server.get('/-/all/since?stale=update_after&' + s) + .reply(200, _allMock) + return s + }) + }, + allFutureUpdatedOnly: function (server) { + server.get('/-/all') + .reply(200, stringifyUpdated(timeMock.future)) + }, + all: function (server) { + server.get('/-/all') + .reply(200, allMock) + } +} + +test('No previous cache, init cache triggered by first search', function (t) { + cleanup() + + mr({ port: common.port, plugin: mocks.allFutureUpdatedOnly }, function (err, s) { + t.ifError(err, 'mock registry started') + common.npm([ + 'search', 'do not do extra search work on my behalf', + '--registry', common.registry, + '--cache', cache, + '--loglevel', 'silent', + '--color', 'always' + ], + EXEC_OPTS, + function (err, code) { + s.close() + t.equal(code, 0, 'search finished successfully') + t.ifErr(err, 'search finished successfully') + + t.ok( + fs.existsSync(cacheJsonFile), + cacheJsonFile + ' expected to have been created' + ) + + var cacheData = JSON.parse(fs.readFileSync(cacheJsonFile, 'utf8')) + t.equal(cacheData._updated, String(timeMock.future)) + t.end() + }) + }) +}) + +test('previous cache, _updated set, should trigger since request', function (t) { + setupCache() + + function m (server) { + [ mocks.all, mocks.sinceFuture ].forEach(function (m) { + m(server) + }) + } + mr({ port: common.port, plugin: m }, function (err, s) { + t.ifError(err, 'mock registry started') + common.npm([ + 'search', 'do not do extra search work on my behalf', + '--registry', common.registry, + '--cache', cache, + '--loglevel', 'silly', + '--color', 'always' + ], + EXEC_OPTS, + function (err, code) { + s.close() + t.equal(code, 0, 'search finished successfully') + t.ifErr(err, 'search finished successfully') + + var cacheData = JSON.parse(fs.readFileSync(cacheJsonFile, 'utf8')) + t.equal( + cacheData._updated, + timeMock.since, + 'cache update time gotten from since response' + ) + t.end() + }) + }) +}) + +var searches = [ + { + term: 'f36b6a6123da50959741e2ce4d634f96ec668c56', + description: 'non-regex', + location: 241 + }, + { + term: '/f36b6a6123da50959741e2ce4d634f96ec668c56/', + description: 'regex', + location: 241 + } +] + +searches.forEach(function (search) { + test(search.description + ' search in color', function (t) { + cleanup() + mr({ port: common.port, plugin: mocks.all }, function (er, s) { + common.npm([ + 'search', search.term, + '--registry', common.registry, + '--cache', cache, + '--loglevel', 'silent', + '--color', 'always' + ], + EXEC_OPTS, + function (err, code, stdout) { + s.close() + t.equal(code, 0, 'search finished successfully') + t.ifErr(err, 'search finished successfully') + // \033 == \u001B + var markStart = '\u001B\\[[0-9][0-9]m' + var markEnd = '\u001B\\[0m' + + var re = new RegExp(markStart + '.*?' + markEnd) + + var cnt = stdout.search(re) + t.equal( + cnt, + search.location, + search.description + ' search for ' + search.term + ) + t.end() + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setupCache () { + cleanup() + mkdirp.sync(cache) + mkdirp.sync(registryCache) + var res = fs.writeFileSync(cacheJsonFile, stringifyUpdated(timeMock.epoch)) + if (res) throw new Error('Creating cache file failed') +} + +function stringifyUpdated (time) { + return JSON.stringify({ _updated: String(time) }) +} + +var allMock = { + '_updated': timeMock.all, + 'generator-frontcow': { + 'name': 'generator-frontcow', + 'description': 'f36b6a6123da50959741e2ce4d634f96ec668c56 This is a fake description to ensure we do not accidentally search the real npm registry or use some kind of cache', + 'dist-tags': { + 'latest': '0.1.19' + }, + 'maintainers': [ + { + 'name': 'bcabanes', + 'email': 'contact@benjamincabanes.com' + } + ], + 'homepage': 'https://github.com/bcabanes/generator-frontcow', + 'keywords': [ + 'sass', + 'frontend', + 'yeoman-generator', + 'atomic', + 'design', + 'sass', + 'foundation', + 'foundation5', + 'atomic design', + 'bourbon', + 'polyfill', + 'font awesome' + ], + 'repository': { + 'type': 'git', + 'url': 'https://github.com/bcabanes/generator-frontcow' + }, + 'author': { + 'name': 'ben', + 'email': 'contact@benjamincabanes.com', + 'url': 'https://github.com/bcabanes' + }, + 'bugs': { + 'url': 'https://github.com/bcabanes/generator-frontcow/issues' + }, + 'license': 'MIT', + 'readmeFilename': 'README.md', + 'time': { + 'modified': '2014-10-03T02:26:18.406Z' + }, + 'versions': { + '0.1.19': 'latest' + } + }, + 'marko': { + 'name': 'marko', + 'description': 'Marko is an extensible, streaming, asynchronous, high performance, HTML-based templating language that can be used in Node.js or in the browser.', + 'dist-tags': { + 'latest': '1.2.16' + }, + 'maintainers': [ + { + 'name': 'pnidem', + 'email': 'pnidem@gmail.com' + }, + { + 'name': 'philidem', + 'email': 'phillip.idem@gmail.com' + } + ], + 'homepage': 'https://github.com/raptorjs/marko', + 'keywords': [ + 'templating', + 'template', + 'async', + 'streaming' + ], + 'repository': { + 'type': 'git', + 'url': 'https://github.com/raptorjs/marko.git' + }, + 'author': { + 'name': 'Patrick Steele-Idem', + 'email': 'pnidem@gmail.com' + }, + 'bugs': { + 'url': 'https://github.com/raptorjs/marko/issues' + }, + 'license': 'Apache License v2.0', + 'readmeFilename': 'README.md', + 'users': { + 'pnidem': true + }, + 'time': { + 'modified': '2014-10-03T02:27:31.775Z' + }, + 'versions': { + '1.2.16': 'latest' + } + } +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/semver-doc.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/semver-doc.js new file mode 100644 index 00000000..3bd9ca90 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/semver-doc.js @@ -0,0 +1,12 @@ +var test = require("tap").test + +test("semver doc is up to date", function (t) { + var path = require("path") + var moddoc = path.join(__dirname, "../../node_modules/semver/README.md") + var mydoc = path.join(__dirname, "../../doc/misc/semver.md") + var fs = require("fs") + var mod = fs.readFileSync(moddoc, "utf8").replace(/semver\(1\)/, "semver(7)") + var my = fs.readFileSync(mydoc, "utf8") + t.equal(my, mod) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/semver-tag.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/semver-tag.js new file mode 100644 index 00000000..3ec60f84 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/semver-tag.js @@ -0,0 +1,15 @@ +// should not allow tagging with a valid semver range +var common = require("../common-tap.js") +var test = require("tap").test + +test("try to tag with semver range as tag name", function (t) { + var cmd = ["tag", "zzzz@1.2.3", "v2.x", "--registry=http://localhost"] + common.npm(cmd, { + stdio: "pipe" + }, function (er, code, so, se) { + if (er) throw er + t.similar(se, /Tag name must not be a valid SemVer range: v2.x\n/) + t.equal(code, 1) + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-dev-dependency.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-dev-dependency.js new file mode 100644 index 00000000..487723c5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-dev-dependency.js @@ -0,0 +1,90 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var npm = npm = require('../../') + +var pkg = path.resolve(__dirname, 'shrinkwrap-dev-dependency') + +test("shrinkwrap doesn't strip out the dependency", function (t) { + t.plan(1) + + mr({port: common.port}, function (er, s) { + setup(function (err) { + if (err) return t.fail(err) + + npm.install('.', function (err) { + if (err) return t.fail(err) + + npm.commands.shrinkwrap([], true, function (err, results) { + if (err) return t.fail(err) + + t.deepEqual(results, desired) + s.close() + t.end() + }) + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +var desired = { + name: 'npm-test-shrinkwrap-dev-dependency', + version: '0.0.0', + dependencies: { + request: { + version: '0.9.0', + from: 'request@0.9.0', + resolved: common.registry + '/request/-/request-0.9.0.tgz' + }, + underscore: { + version: '1.3.1', + from: 'underscore@1.3.1', + resolved: common.registry + '/underscore/-/underscore-1.3.1.tgz' + } + } +} + +var json = { + author: 'Domenic Denicola', + name: 'npm-test-shrinkwrap-dev-dependency', + version: '0.0.0', + dependencies: { + request: '0.9.0', + underscore: '1.3.1' + }, + devDependencies: { + underscore: '1.5.1' + } +} + +function setup (cb) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify(json, null, 2)) + process.chdir(pkg) + + var opts = { + cache: path.resolve(pkg, 'cache'), + registry: common.registry, + // important to make sure devDependencies don't get stripped + dev: true + } + npm.load(opts, cb) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-empty-deps.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-empty-deps.js new file mode 100644 index 00000000..dba6da5e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-empty-deps.js @@ -0,0 +1,78 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'shrinkwrap-empty-deps') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + author: 'Rockbert', + name: 'shrinkwrap-empty-deps', + version: '0.0.0', + dependencies: {}, + devDependencies: {} +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + process.chdir(pkg) + t.end() +}) + +test('returns a list of removed items', function (t) { + mr({ port: common.port }, function (er, s) { + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + 'shrinkwrap' + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, 'shrinkwrap ran without issue') + t.notOk(code, 'shrinkwrap ran without raising error code') + + fs.readFile(path.resolve(pkg, 'npm-shrinkwrap.json'), function (err, desired) { + t.ifError(err, 'read npm-shrinkwrap.json without issue') + t.same( + { + 'name': 'shrinkwrap-empty-deps', + 'version': '0.0.0', + 'dependencies': {} + }, + JSON.parse(desired), + 'shrinkwrap handled empty deps without exploding' + ) + + s.close() + t.end() + }) + } + ) + }) +}) + +test('cleanup', function (t) { + cleanup() + + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-local-dependency.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-local-dependency.js new file mode 100644 index 00000000..5b5e378e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-local-dependency.js @@ -0,0 +1,122 @@ +var test = require("tap").test +var path = require("path") +var fs = require("fs") +var osenv = require("osenv") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var common = require("../common-tap.js") + +var PKG_DIR = path.resolve(__dirname, "shrinkwrap-local-dependency") +var CACHE_DIR = path.resolve(PKG_DIR, "cache") +var DEP_DIR = path.resolve(PKG_DIR, "dep") + +var desired = { + "name": "npm-test-shrinkwrap-local-dependency", + "version": "0.0.0", + "dependencies": { + "npm-test-shrinkwrap-local-dependency-dep": { + "version": "0.0.0", + "from": "dep", + "resolved": "file:dep" + } + } +} + +var root = { + "author": "Thomas Torp", + "name": "npm-test-shrinkwrap-local-dependency", + "version": "0.0.0", + "dependencies": { + "npm-test-shrinkwrap-local-dependency-dep": "file:./dep" + } +} + +var dependency = { + "author": "Thomas Torp", + "name": "npm-test-shrinkwrap-local-dependency-dep", + "version": "0.0.0" +} + + +test("shrinkwrap uses resolved with file: on local deps", function(t) { + setup() + + common.npm( + ["--cache="+CACHE_DIR, "--loglevel=silent", "install", "."], + {}, + function (err, code) { + t.ifError(err, "npm install worked") + t.equal(code, 0, "npm exited normally") + + common.npm( + ["--cache="+CACHE_DIR, "--loglevel=silent", "shrinkwrap"], + {}, + function (err, code) { + t.ifError(err, "npm shrinkwrap worked") + t.equal(code, 0, "npm exited normally") + + fs.readFile("npm-shrinkwrap.json", { encoding : "utf8" }, function (err, data) { + t.ifError(err, "read file correctly") + t.deepEqual(JSON.parse(data), desired, "shrinkwrap looks correct") + + t.end() + }) + } + ) + } + ) +}) + +test('"npm install" should install local packages from shrinkwrap', function (t) { + cleanNodeModules() + + common.npm( + ["--cache="+CACHE_DIR, "--loglevel=silent", "install", "."], + {}, + function (err, code) { + t.ifError(err, "install ran correctly") + t.notOk(code, "npm install exited with code 0") + var dependencyPackageJson = path.resolve( + PKG_DIR, + "node_modules/npm-test-shrinkwrap-local-dependency-dep/package.json" + ) + t.ok( + JSON.parse(fs.readFileSync(dependencyPackageJson, "utf8")), + "package with local dependency installed from shrinkwrap" + ) + + t.end() + } + ) +}) + +test("cleanup", function(t) { + cleanup() + t.end() +}) + +function setup() { + cleanup() + mkdirp.sync(PKG_DIR) + mkdirp.sync(CACHE_DIR) + mkdirp.sync(DEP_DIR) + fs.writeFileSync( + path.resolve(PKG_DIR, "package.json"), + JSON.stringify(root, null, 2) + ) + fs.writeFileSync( + path.resolve(DEP_DIR, "package.json"), + JSON.stringify(dependency, null, 2) + ) + process.chdir(PKG_DIR) +} + +function cleanNodeModules() { + rimraf.sync(path.resolve(PKG_DIR, "node_modules")) +} + +function cleanup() { + process.chdir(osenv.tmpdir()) + cleanNodeModules() + rimraf.sync(PKG_DIR) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-prod-dependency.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-prod-dependency.js new file mode 100644 index 00000000..30b45612 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-prod-dependency.js @@ -0,0 +1,93 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = npm = require('../../') + +var common = require('../common-tap.js') +var pkg = path.resolve(__dirname, 'shrinkwrap-prod-dependency') + +test("shrinkwrap --dev doesn't strip out prod dependencies", function (t) { + t.plan(1) + + mr({port: common.port}, function (er, s) { + setup({}, function (err) { + if (err) return t.fail(err) + + npm.install('.', function (err) { + if (err) return t.fail(err) + + npm.config.set('dev', true) + npm.commands.shrinkwrap([], true, function (err, results) { + if (err) return t.fail(err) + + t.deepEqual(results, desired) + s.close() + t.end() + }) + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +var desired = { + name: 'npm-test-shrinkwrap-prod-dependency', + version: '0.0.0', + dependencies: { + request: { + version: '0.9.0', + from: 'request@0.9.0', + resolved: common.registry + '/request/-/request-0.9.0.tgz' + }, + underscore: { + version: '1.5.1', + from: 'underscore@1.5.1', + resolved: common.registry + '/underscore/-/underscore-1.5.1.tgz' + } + } +} + +var json = { + author: 'Domenic Denicola', + name: 'npm-test-shrinkwrap-prod-dependency', + version: '0.0.0', + dependencies: { + request: '0.9.0' + }, + devDependencies: { + underscore: '1.5.1' + } +} + +function setup (opts, cb) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify(json, null, 2)) + process.chdir(pkg) + + var allOpts = { + cache: path.resolve(pkg, 'cache'), + registry: common.registry + } + + for (var key in opts) { + allOpts[key] = opts[key] + } + + npm.load(allOpts, cb) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-scoped-auth.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-scoped-auth.js new file mode 100644 index 00000000..14536cab --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-scoped-auth.js @@ -0,0 +1,108 @@ +var resolve = require("path").resolve +var writeFileSync = require("graceful-fs").writeFileSync + +var mkdirp = require("mkdirp") +var mr = require("npm-registry-mock") +var osenv = require("osenv") +var rimraf = require("rimraf") +var test = require("tap").test + +var common = require("../common-tap.js") +var toNerfDart = require("../../lib/config/nerf-dart.js") + +var pkg = resolve(__dirname, "shrinkwrap-scoped-auth") +var outfile = resolve(pkg, "_npmrc") +var modules = resolve(pkg, "node_modules") +var tarballPath = "/scoped-underscore/-/scoped-underscore-1.3.1.tgz" +var tarballURL = common.registry + tarballPath +var tarball = resolve(__dirname, "../fixtures/scoped-underscore-1.3.1.tgz") + +var server + +var EXEC_OPTS = { + cwd : pkg +} + +function mocks (server) { + var auth = "Bearer 0xabad1dea" + server.get(tarballPath, { authorization : auth }).replyWithFile(200, tarball) + server.get(tarballPath).reply(401, { + error : "unauthorized", + reason : "You are not authorized to access this db." + }) +} + +test("setup", function (t) { + mr({ port : common.port, plugin : mocks }, function (err, s) { + server = s + t.ok(s, "set up mock registry") + setup() + t.end() + }) +}) + +test("authed npm install with shrinkwrapped scoped package", function (t) { + common.npm( + [ + "install", + "--loglevel", "silent", + "--fetch-retries", 0, + "--userconfig", outfile + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, "test runner executed without error") + t.equal(code, 0, "npm install exited OK") + t.notOk(stderr, "no output on stderr") + t.equal( + stdout, + "@scoped/underscore@1.3.1 node_modules/@scoped/underscore\n", + "module installed where expected" + ) + + t.end() + } + ) +}) + +test("cleanup", function (t) { + server.close() + cleanup() + t.end() +}) + +var contents = "@scoped:registry="+common.registry+"\n" + + toNerfDart(common.registry)+":_authToken=0xabad1dea\n" + +var json = { + name : "test-package-install", + version : "1.0.0" +} + +var shrinkwrap = { + name : "test-package-install", + version : "1.0.0", + dependencies : { + "@scoped/underscore" : { + resolved : tarballURL, + from : ">=1.3.1 <2", + version : "1.3.1" + } + } +} + +function setup () { + cleanup() + mkdirp.sync(modules) + writeFileSync(resolve(pkg, "package.json"), JSON.stringify(json, null, 2)+"\n") + writeFileSync(outfile, contents) + writeFileSync( + resolve(pkg, "npm-shrinkwrap.json"), + JSON.stringify(shrinkwrap, null, 2)+"\n" + ) +} + +function cleanup() { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-shared-dev-dependency.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-shared-dev-dependency.js new file mode 100644 index 00000000..a4b10c01 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/shrinkwrap-shared-dev-dependency.js @@ -0,0 +1,90 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var npm = npm = require('../../') + +var pkg = path.resolve(__dirname, 'shrinkwrap-shared-dev-dependency') + +test("shrinkwrap doesn't strip out the shared dependency", function (t) { + t.plan(1) + + mr({ port: common.port }, function (er, s) { + setup(function (err) { + if (err) return t.fail(err) + + npm.install('.', function (err) { + if (err) return t.fail(err) + + npm.commands.shrinkwrap([], true, function (err, results) { + if (err) return t.fail(err) + + t.deepEqual(results, desired) + s.close() + t.end() + }) + }) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +var desired = { + name: 'npm-test-shrinkwrap-shared-dev-dependency', + version: '0.0.0', + dependencies: { + 'test-package-with-one-dep': { + version: '0.0.0', + from: 'test-package-with-one-dep@0.0.0', + resolved: common.registry + + '/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz' + }, + 'test-package': { + version: '0.0.0', + from: 'test-package@0.0.0', + resolved: common.registry + '/test-package/-/test-package-0.0.0.tgz' + } + } +} + +var json = { + author: 'Domenic Denicola', + name: 'npm-test-shrinkwrap-shared-dev-dependency', + version: '0.0.0', + dependencies: { + 'test-package-with-one-dep': '0.0.0' + }, + devDependencies: { + 'test-package': '0.0.0' + } +} + +function setup (cb) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify(json, null, 2)) + process.chdir(pkg) + + var opts = { + cache: path.resolve(pkg, 'cache'), + registry: common.registry, + // important to make sure devDependencies don't get stripped + dev: true + } + npm.load(opts, cb) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/sorted-package-json.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/sorted-package-json.js new file mode 100644 index 00000000..b5174f8c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/sorted-package-json.js @@ -0,0 +1,95 @@ +var test = require("tap").test + , path = require("path") + , rimraf = require("rimraf") + , mkdirp = require("mkdirp") + , spawn = require("child_process").spawn + , npm = require.resolve("../../bin/npm-cli.js") + , node = process.execPath + , pkg = path.resolve(__dirname, "sorted-package-json") + , tmp = path.join(pkg, "tmp") + , cache = path.join(pkg, "cache") + , fs = require("fs") + , common = require("../common-tap.js") + , mr = require("npm-registry-mock") + , osenv = require("osenv") + + +test("sorting dependencies", function (t) { + var packageJson = path.resolve(pkg, "package.json") + + cleanup() + mkdirp.sync(cache) + mkdirp.sync(tmp) + setup() + + var before = JSON.parse(fs.readFileSync(packageJson).toString()) + + mr({port : common.port}, function (er, s) { + // underscore is already in the package.json, + // but --save will trigger a rewrite with sort + var child = spawn(node, [npm, "install", "--save", "underscore@1.3.3", "--no-progress", "--loglevel=error"], { + cwd: pkg, + env: { + "npm_config_registry": common.registry, + "npm_config_cache": cache, + "npm_config_tmp": tmp, + "npm_config_prefix": pkg, + "npm_config_global": "false", + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH + }, + stdio: ['ignore', 'ignore', process.stderr] + }) + + child.on("close", function (code) { + t.equal(code, 0, "npm install exited with code") + var result = fs.readFileSync(packageJson).toString() + , resultAsJson = JSON.parse(result) + + s.close() + + t.same(Object.keys(resultAsJson.dependencies), + Object.keys(before.dependencies).sort()) + + t.notSame(Object.keys(resultAsJson.dependencies), + Object.keys(before.dependencies)) + + t.ok(resultAsJson.dependencies.underscore) + t.ok(resultAsJson.dependencies.request) + t.end() + }) + }) +}) + +test("cleanup", function (t) { + cleanup() + t.pass("cleaned up") + t.end() +}) + +function setup() { + mkdirp.sync(pkg) + + fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify({ + "name": "sorted-package-json", + "version": "0.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Rocko Artischocko", + "license": "ISC", + "dependencies": { + "underscore": "^1.3.3", + "request": "^0.9.0" + } + }, null, 2), "utf8") +} + +function cleanup() { + process.chdir(osenv.tmpdir()) + rimraf.sync(cache) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/spawn-enoent-help.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/spawn-enoent-help.js new file mode 100644 index 00000000..8b6e6c58 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/spawn-enoent-help.js @@ -0,0 +1,34 @@ +var path = require("path") +var test = require("tap").test +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var common = require("../common-tap.js") + +var pkg = path.resolve(__dirname, "spawn-enoent-help") + +test("setup", function (t) { + rimraf.sync(pkg) + mkdirp.sync(pkg) + t.end() +}) + +test("enoent help", function (t) { + common.npm(["help", "config"], { + cwd: pkg, + env: { + PATH: "", + Path: "", + "npm_config_loglevel": "warn", + "npm_config_viewer": "woman" + } + }, function (er, code, sout, serr) { + t.similar(serr, /Check if the file 'emacsclient' is present./) + t.equal(global.cooked, undefined, "Don't leak into global scope") + t.end() + }) +}) + +test("clean", function (t) { + rimraf.sync(pkg) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/spawn-enoent.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/spawn-enoent.js new file mode 100644 index 00000000..6e501383 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/spawn-enoent.js @@ -0,0 +1,40 @@ +var path = require("path") +var test = require("tap").test +var fs = require("fs") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var common = require("../common-tap.js") + +var pkg = path.resolve(__dirname, "spawn-enoent") +var pj = JSON.stringify({ + name:"x", + version: "1.2.3", + scripts: { start: "wharble-garble-blorst" } +}, null, 2) + "\n" + + +test("setup", function (t) { + rimraf.sync(pkg) + mkdirp.sync(pkg) + fs.writeFileSync(pkg + "/package.json", pj) + t.end() +}) + +test("enoent script", function (t) { + common.npm(["start"], { + cwd: pkg, + env: { + PATH: process.env.PATH, + Path: process.env.Path, + "npm_config_loglevel": "warn" + } + }, function (er, code, sout, serr) { + t.similar(serr, /npm ERR! Failed at the x@1\.2\.3 start script 'wharble-garble-blorst'\./) + t.end() + }) +}) + +test("clean", function (t) { + rimraf.sync(pkg) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/splat-with-only-prerelease-to-latest.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/splat-with-only-prerelease-to-latest.js new file mode 100644 index 00000000..a533ddb4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/splat-with-only-prerelease-to-latest.js @@ -0,0 +1,80 @@ +'use strict' +var test = require('tap').test +var npm = require('../../lib/npm') +var stream = require('readable-stream') + +// set up environment +require('../common-tap.js') + +var moduleName = 'xyzzy-wibble' +var testModule = { + name: moduleName, + 'dist-tags': { + latest: '1.3.0-a' + }, + versions: { + '1.0.0-a': { + name: moduleName, + version: '1.0.0-a', + dist: { + shasum: 'da39a3ee5e6b4b0d3255bfef95601890afd80709', + tarball: 'http://registry.npmjs.org/aproba/-/xyzzy-wibble-1.0.0-a.tgz' + } + }, + '1.1.0-a': { + name: moduleName, + version: '1.1.0-a', + dist: { + shasum: 'da39a3ee5e6b4b0d3255bfef95601890afd80709', + tarball: 'http://registry.npmjs.org/aproba/-/xyzzy-wibble-1.1.0-a.tgz' + } + }, + '1.2.0-a': { + name: moduleName, + version: '1.2.0-a', + dist: { + shasum: 'da39a3ee5e6b4b0d3255bfef95601890afd80709', + tarball: 'http://registry.npmjs.org/aproba/-/xyzzy-wibble-1.2.0-a.tgz' + } + }, + '1.3.0-a': { + name: moduleName, + version: '1.3.0-a', + dist: { + shasum: 'da39a3ee5e6b4b0d3255bfef95601890afd80709', + tarball: 'http://registry.npmjs.org/aproba/-/xyzzy-wibble-1.3.0-a.tgz' + } + } + } +} + +test('setup', function (t) { + npm.load(function () { + npm.config.set('loglevel', 'silly') + npm.registry = { + get: function (uri, opts, cb) { + setImmediate(function () { + cb(null, testModule, null, {statusCode: 200}) + }) + }, + fetch: function (u, opts, cb) { + setImmediate(function () { + var empty = new stream.Readable() + empty.push(null) + cb(null, empty) + }) + } + } + t.end() + }) +}) + +test('splat', function (t) { + t.plan(3) + var addNamed = require('../../lib/cache/add-named.js') + addNamed('xyzzy-wibble', '*', testModule, function (err, pkg) { + t.error(err, 'Succesfully resolved a splat package') + t.is(pkg.name, moduleName) + t.is(pkg.version, testModule['dist-tags'].latest) + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/startstop.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/startstop.js new file mode 100644 index 00000000..ab16823b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/startstop.js @@ -0,0 +1,74 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') + +var pkg = path.resolve(__dirname, 'startstop') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'startstop', + version: '1.2.3', + scripts: { + start: 'node -e \"console.log(\'start\')\"', + stop: 'node -e \"console.log(\'stop\')\"' + } +} + +function testOutput (t, command, er, code, stdout, stderr) { + t.notOk(code, 'npm ' + command + ' exited with code 0') + + if (stderr) throw new Error('npm ' + command + ' stderr: ' + stderr.toString()) + + stdout = stdout.trim().split(/\n|\r/) + stdout = stdout[stdout.length - 1] + t.equal(stdout, command) + t.end() +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + t.end() +}) + +test('npm start', function (t) { + common.npm(['start'], EXEC_OPTS, testOutput.bind(null, t, 'start')) +}) + +test('npm stop', function (t) { + common.npm(['stop'], EXEC_OPTS, testOutput.bind(null, t, 'stop')) +}) + +test('npm restart', function (t) { + common.npm(['restart'], EXEC_OPTS, function (er, c, stdout) { + if (er) throw er + + var output = stdout.split('\n').filter(function (val) { + return val.match(/^s/) + }) + + t.same(output.sort(), ['start', 'stop'].sort()) + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/tag-version-prefix.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/tag-version-prefix.js new file mode 100644 index 00000000..aa6cbc97 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/tag-version-prefix.js @@ -0,0 +1,93 @@ +var common = require('../common-tap.js') +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../lib/npm.js') + +var pkg = path.resolve(__dirname, 'version-message-config') +var cache = path.resolve(pkg, 'cache') +var npmrc = path.resolve(pkg, '.npmrc') +var packagePath = path.resolve(pkg, 'package.json') + +var json = { name: 'blah', version: '0.1.2' } + +var configContents = 'sign-git-tag=false\nmessage=":bookmark: %s"\n' + +test('npm version <semver> with message config', function (t) { + setup() + + npm.load({ prefix: pkg, userconfig: npmrc }, function () { + var git = require('../../lib/utils/git.js') + + common.makeGitRepo({ path: pkg }, function (er) { + t.ifErr(er, 'git bootstrap ran without error') + + common.npm( + [ + '--userconfig', npmrc, + 'config', + 'set', + 'tag-version-prefix', + 'q' + ], + { cwd: pkg, env: { PATH: process.env.PATH } }, + function (err, code, stdout, stderr) { + t.ifError(err, 'npm config ran without issue') + t.notOk(code, 'exited with a non-error code') + t.notOk(stderr, 'no error output') + + common.npm( + [ + 'version', + 'patch', + '--loglevel', 'silent' + // package config is picked up from env + ], + { cwd: pkg, env: { PATH: process.env.PATH } }, + function (err, code, stdout, stderr) { + t.ifError(err, 'npm version ran without issue') + t.notOk(code, 'exited with a non-error code') + t.notOk(stderr, 'no error output') + + git.whichAndExec( + ['tag'], + { cwd: pkg, env: process.env }, + function (er, tags, stderr) { + t.ok(tags.match(/q0\.1\.3/g), 'tag was created by version' + tags) + t.end() + } + ) + } + ) + } + ) + } + ) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + // windows fix for locked files + process.chdir(osenv.tmpdir()) + + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(cache) + process.chdir(pkg) + + fs.writeFileSync(packagePath, JSON.stringify(json), 'utf8') + fs.writeFileSync(npmrc, configContents, 'ascii') +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/team.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/team.js new file mode 100644 index 00000000..1ea53cbc --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/team.js @@ -0,0 +1,136 @@ +var fs = require('fs') +var path = require('path') +var rimraf = require('rimraf') +var mr = require('npm-registry-mock') + +var test = require('tap').test +var common = require('../common-tap.js') + +var server + +test('setup', function (t) { + mr({port: common.port}, function (err, s) { + t.ifError(err, 'registry mocked successfully') + server = s + t.end() + }) +}) + +test('team create basic', function (t) { + var teamData = { + name: 'test', + scope_id: 1234, + created: '2015-07-23T18:07:49.959Z', + updated: '2015-07-23T18:07:49.959Z', + deleted: null + } + server.put('/-/org/myorg/team', JSON.stringify({ + name: teamData.name + })).reply(200, teamData) + common.npm([ + 'team', 'create', 'myorg:' + teamData.name, + '--registry', common.registry, + '--loglevel', 'silent' + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'npm team') + t.equal(code, 0, 'exited OK') + t.equal(stderr, '', 'no error output') + t.same(JSON.parse(stdout), teamData) + t.end() + }) +}) + +test('team destroy', function (t) { + var teamData = { + name: 'myteam', + scope_id: 1234, + created: '2015-07-23T18:07:49.959Z', + updated: '2015-07-23T18:07:49.959Z', + deleted: '2015-07-23T18:27:27.178Z' + } + server.delete('/-/team/myorg/' + teamData.name).reply(200, teamData) + common.npm([ + 'team', 'destroy', 'myorg:' + teamData.name, + '--registry', common.registry, + '--loglevel', 'silent' + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'npm team') + t.equal(code, 0, 'exited OK') + t.equal(stderr, '', 'no error output') + t.same(JSON.parse(stdout), teamData) + t.end() + }) +}) + +test('team add', function (t) { + var user = 'zkat' + server.put('/-/team/myorg/myteam/user', JSON.stringify({ + user: user + })).reply(200) + common.npm([ + 'team', 'add', 'myorg:myteam', user, + '--registry', common.registry, + '--loglevel', 'silent' + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'npm team') + t.equal(code, 0, 'exited OK') + t.equal(stderr, '', 'no error output') + t.end() + }) +}) + +test('team rm', function (t) { + var user = 'zkat' + server.delete('/-/team/myorg/myteam/user', JSON.stringify({ + user: user + })).reply(200) + common.npm([ + 'team', 'rm', 'myorg:myteam', user, + '--registry', common.registry, + '--loglevel', 'silent' + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'npm team') + t.equal(code, 0, 'exited OK') + t.equal(stderr, '', 'no error output') + t.end() + }) +}) + +test('team ls (on org)', function (t) { + var teams = ['myorg:team1', 'myorg:team2', 'myorg:team3'] + server.get('/-/org/myorg/team?format=cli').reply(200, teams) + common.npm([ + 'team', 'ls', 'myorg', + '--registry', common.registry, + '--loglevel', 'silent' + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'npm team') + t.equal(code, 0, 'exited OK') + t.equal(stderr, '', 'no error output') + t.same(JSON.parse(stdout), teams) + t.end() + }) +}) + +test('team ls (on team)', function (t) { + var users = ['zkat', 'bcoe'] + server.get('/-/team/myorg/myteam/user?format=cli').reply(200, users) + common.npm([ + 'team', 'ls', 'myorg:myteam', + '--registry', common.registry, + '--loglevel', 'silent' + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'npm team') + t.equal(code, 0, 'exited OK') + t.equal(stderr, '', 'no error output') + t.same(JSON.parse(stdout), users) + t.end() + }) +}) + +test('cleanup', function (t) { + t.pass('cleaned up') + server.done() + server.close() + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/test-run-ls.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/test-run-ls.js new file mode 100644 index 00000000..991c952e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/test-run-ls.js @@ -0,0 +1,33 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var path = require("path") +var cwd = path.resolve(__dirname, "..", "..") +var testscript = require("../../package.json").scripts.test +var tsregexp = testscript.replace(/([\[\.\*\]])/g, "\\$1") + +test("default", function (t) { + common.npm(["run"], { cwd: cwd }, function (er, code, so) { + if (er) throw er + t.notOk(code) + t.similar(so, new RegExp("\\n test\\n " + tsregexp + "\\n")) + t.end() + }) +}) + +test("parseable", function (t) { + common.npm(["run", "-p"], { cwd: cwd }, function (er, code, so) { + if (er) throw er + t.notOk(code) + t.similar(so, new RegExp("\\ntest:" + tsregexp + "\\n")) + t.end() + }) +}) + +test("parseable", function (t) { + common.npm(["run", "--json"], { cwd: cwd }, function (er, code, so) { + if (er) throw er + t.notOk(code) + t.equal(JSON.parse(so).test, testscript) + t.end() + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/umask-lifecycle.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/umask-lifecycle.js new file mode 100644 index 00000000..36cbaba7 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/umask-lifecycle.js @@ -0,0 +1,55 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var test = require('tap').test +var sprintf = require('sprintf-js').sprintf + +var common = require('../common-tap.js') +var pkg = path.resolve(__dirname, 'umask-lifecycle') + +var pj = JSON.stringify({ + name: 'x', + version: '1.2.3', + scripts: { umask: '$npm_execpath config get umask && echo "$npm_config_umask" && node -pe "process.umask()"' } +}, null, 2) + '\n' + +var umask = process.umask() +var expected = [ + '', + '> x@1.2.3 umask ' + path.join(__dirname, 'umask-lifecycle'), + '> $npm_execpath config get umask && echo "$npm_config_umask" && node -pe "process.umask()"', + '', + sprintf('%04o', umask), + sprintf('%04o', umask), + sprintf('%d', umask), + '' +].join('\n') + +test('setup', function (t) { + rimraf.sync(pkg) + mkdirp.sync(pkg) + fs.writeFileSync(pkg + '/package.json', pj) + t.end() +}) + +test('umask script', function (t) { + common.npm(['run', 'umask'], { + cwd: pkg, + env: { + PATH: process.env.PATH, + Path: process.env.Path, + 'npm_config_loglevel': 'warn' + } + }, function (er, code, sout, serr) { + t.equal(sout, expected) + t.equal(serr, '') + t.end() + }) +}) + +test('clean', function (t) { + rimraf.sync(pkg) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/uninstall-package.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/uninstall-package.js new file mode 100644 index 00000000..0532433c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/uninstall-package.js @@ -0,0 +1,79 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') + +var pkg = path.join(__dirname, 'uninstall-package') + +var EXEC_OPTS = { cwd: pkg } + +var json = { + name: 'uninstall-package', + version: '0.0.0', + dependencies: { + underscore: '~1.3.1', + request: '~0.9.0' + } +} + +test('setup', function (t) { + cleanup() + mkdirp.sync(pkg) + process.chdir(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) + + t.end() +}) + +test('returns a list of removed items', function (t) { + mr({ port: common.port }, function (er, s) { + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + 'install', '.' + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, 'install ran without issue') + t.notOk(code, 'install ran without raising error code') + common.npm( + [ + '--registry', common.registry, + '--loglevel', 'silent', + 'uninstall', 'underscore', 'request', 'lala' + ], + EXEC_OPTS, + function (err, code, stdout, stderr) { + t.ifError(err, 'uninstall ran without issue') + t.notOk(code, 'uninstall ran without raising error code') + t.has(stdout, /unbuild underscore@1.3.3/, 'underscore uninstalled') + t.has(stdout, /unbuild request@0.9.5/, 'request uninstalled') + + s.close() + t.end() + } + ) + } + ) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/unpack-foreign-tarball.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/unpack-foreign-tarball.js new file mode 100644 index 00000000..0da0b7c5 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/unpack-foreign-tarball.js @@ -0,0 +1,88 @@ +var fs = require('graceful-fs') +var path = require('path') + +var test = require('tap').test +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') + +var common = require('../common-tap.js') + +var fixtures = path.resolve(__dirname, '..', 'fixtures') + +var pkg = path.resolve(__dirname, 'unpack-foreign-tarball') +var nm = path.resolve(pkg, 'node_modules') +var target = path.resolve(nm, 'npm-test-gitignore') +var cache = path.resolve(pkg, 'cache') +var tmp = path.resolve(pkg, 'tmp') + +var EXEC_OPTS = { + env: { + 'npm_config_cache': cache, + 'npm_config_tmp': tmp + }, + cwd: pkg, + stdio: [ 'pipe', 'pipe', 2 ] +} + +function verify (t, files, err, code) { + if (code) { + t.fail('exited with failure: ' + code) + return t.end() + } + var actual = fs.readdirSync(target).sort() + var expect = files.concat(['.npmignore', 'package.json']).sort() + t.same(actual, expect) + t.end() +} + +test('setup', function (t) { + setup() + t.comment('test for https://github.com/npm/npm/issues/5658') + t.end() +}) + +test('npmignore only', function (t) { + var file = path.resolve(fixtures, 'npmignore.tgz') + common.npm(['install', file], EXEC_OPTS, verify.bind(null, t, ['foo'])) +}) + +test('gitignore only', function (t) { + setup() + var file = path.resolve(fixtures, 'gitignore.tgz') + common.npm(['install', file], EXEC_OPTS, verify.bind(null, t, ['foo'])) +}) + +test('gitignore and npmignore', function (t) { + setup() + var file = path.resolve(fixtures, 'gitignore-and-npmignore.tgz') + common.npm(['install', file], EXEC_OPTS, verify.bind(null, t, ['foo', 'bar'])) +}) + +test('gitignore and npmignore, not gzipped 1/2', function (t) { + setup() + var file = path.resolve(fixtures, 'gitignore-and-npmignore.tar') + common.npm(['install', file], EXEC_OPTS, verify.bind(null, t, ['foo', 'bar'])) +}) + +test('gitignore and npmignore, not gzipped 2/2', function (t) { + setup() + var file = path.resolve(fixtures, 'gitignore-and-npmignore-2.tar') + common.npm(['install', file], EXEC_OPTS, verify.bind(null, t, ['foo', 'bar'])) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function setup () { + cleanup() + mkdirp.sync(nm) + mkdirp.sync(tmp) +} + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/unpublish-config.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/unpublish-config.js new file mode 100644 index 00000000..522a7de4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/unpublish-config.js @@ -0,0 +1,82 @@ +var fs = require('graceful-fs') +var http = require('http') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var pkg = path.join(__dirname, 'npm-test-unpublish-config') +var fixturePath = path.join(pkg, 'fixture_npmrc') + +var common = require('../common-tap.js') + +var json = { + name: 'npm-test-unpublish-config', + version: '1.2.3', + publishConfig: { registry: common.registry } +} + +test('setup', function (t) { + mkdirp.sync(pkg) + + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json), 'utf8' + ) + fs.writeFileSync( + fixturePath, + '//localhost:1337/:_authToken = beeeeeeeeeeeeef\n' + + 'registry = http://lvh.me:4321/registry/path\n' + ) + + t.end() +}) + +test('cursory test of unpublishing with config', function (t) { + var child + t.plan(4) + http.createServer(function (req, res) { + t.pass('got request on the fakey fake registry') + this.close() + res.statusCode = 500 + res.end(JSON.stringify({ + error: 'shh no tears, only dreams now' + })) + child.kill('SIGHUP') + }).listen(common.port, function () { + t.pass('server is listening') + + child = common.npm( + [ + '--userconfig', fixturePath, + '--loglevel', 'silent', + '--force', + 'unpublish' + ], + { + cwd: pkg, + stdio: 'inherit', + env: { + 'npm_config_cache_lock_stale': 1000, + 'npm_config_cache_lock_wait': 1000, + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH, + USERPROFILE: osenv.home() + } + }, + function (err, code) { + t.ifError(err, 'publish command finished successfully') + t.notOk(code, 'npm install exited with code 0') + } + ) + }) +}) + +test('cleanup', function (t) { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/update-examples.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/update-examples.js new file mode 100644 index 00000000..c44e741e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/update-examples.js @@ -0,0 +1,201 @@ +var common = require('../common-tap.js') +var test = require('tap').test +var npm = require('../../lib/npm.js') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var path = require('path') +var mr = require('npm-registry-mock') + +var osenv = require('osenv') + +var requireInject = require('require-inject') + +var PKG_DIR = path.resolve(__dirname, 'update-examples') +var CACHE_DIR = path.resolve(PKG_DIR, 'cache') + +// ** constant templates for mocks ** +var DEFAULT_PKG = { + 'name': 'update-examples', + 'version': '1.2.3', + 'dependencies': { + 'dep1': '*' + } +} + +var DEP_PKG = { + name: 'dep1', + version: '1.1.1', + _from: '^1.1.1' +} + +var INSTALLED = { + dependencies: { + 'dep1': { + version: '1.1.1', + link: false + } + } +} + +var DEP1_REGISTRY = { name: 'dep1', + 'dist-tags': { latest: '1.2.2' }, + versions: { + '1.2.2': { version: '1.2.2' }, + '1.2.1': { version: '1.2.1' }, + '1.2.0': { version: '1.2.0' }, + '1.1.2': { version: '1.1.2' }, + '1.1.1': { version: '1.1.1' }, + '1.0.0': { version: '1.0.0' }, + '0.4.1': { version: '0.4.1' }, + '0.4.0': { version: '0.4.0' }, + '0.2.0': { version: '0.2.0' } + } +} + +var registryMocks = { + 'get': { + '/dep1': [200, DEP1_REGISTRY] + } +} + +// ** dynamic mocks, cloned from templates and modified ** +var mockServer +var mockDepJson = clone(DEP_PKG) +var mockInstalled = clone(INSTALLED) +var mockParentJson = clone(DEFAULT_PKG) + +// target +var installAskedFor + +function clone (a) { + return extend({}, a) +} + +function extend (a, b) { + for (var key in b) { + a[key] = b[key] + } + return a +} + +function resetPackage (options) { + rimraf.sync(CACHE_DIR) + mkdirp.sync(CACHE_DIR) + + installAskedFor = undefined + + mockParentJson = clone(DEFAULT_PKG) + mockInstalled = clone(INSTALLED) + mockDepJson = clone(DEP_PKG) + + if (options.wanted) { + mockParentJson.dependencies.dep1 = options.wanted + mockDepJson._from = options.wanted + } + + if (options.installed) { + mockInstalled.dependencies.dep1.version = options.installed + mockDepJson.version = options.installed + } +} + +function mockReadInstalled (dir, opts, cb) { + cb(null, mockInstalled) +} + +function mockReadJson (file, cb) { + cb(null, file.match(/dep1/) ? mockDepJson : mockParentJson) +} + +function mockCommand (npm, name, fn) { + delete npm.commands[name] + npm.commands[name] = fn +} + +test('setup', function (t) { + process.chdir(osenv.tmpdir()) + mkdirp.sync(PKG_DIR) + process.chdir(PKG_DIR) + + resetPackage({}) + + mr({ port: common.port, mocks: registryMocks }, function (er, server) { + npm.load({ cache: CACHE_DIR, + registry: common.registry, + cwd: PKG_DIR }, function (err) { + t.ifError(err, 'started server') + mockServer = server + + mockCommand(npm, 'install', function mockInstall (where, what, cb) { + installAskedFor = what + cb(null) + }) + + mockCommand(npm, 'outdated', requireInject('../../lib/outdated', { + 'read-installed': mockReadInstalled, + 'read-package-json': mockReadJson + })) + + t.end() + }) + }) +}) + +test('update caret dependency to latest', function (t) { + resetPackage({ wanted: '^1.1.1' }) + + npm.commands.update([], function (err) { + t.ifError(err) + t.equal('dep1@1.2.2', installAskedFor, 'should want to install dep@1.2.2') + t.end() + }) +}) + +test('update tilde dependency to latest', function (t) { + resetPackage({ wanted: '~1.1.1' }) + + npm.commands.update([], function (err) { + t.ifError(err) + t.equal('dep1@1.1.2', installAskedFor, 'should want to install dep@1.1.2') + t.end() + }) +}) + +test('hold tilde dependency at wanted (#6441)', function (t) { + resetPackage({ wanted: '~1.1.2', installed: '1.1.2' }) + + npm.commands.update([], function (err) { + t.ifError(err) + t.notOk(installAskedFor, 'should not want to install anything') + t.end() + }) +}) + +test('update old caret dependency with no newer', function (t) { + resetPackage({ wanted: '^0.2.0', installed: '^0.2.0' }) + + npm.commands.update([], function (err) { + t.ifError(err) + t.equal('dep1@0.2.0', installAskedFor, 'should want to install dep@0.2.0') + t.end() + }) +}) + +test('update old caret dependency with newer', function (t) { + resetPackage({ wanted: '^0.4.0', installed: '^0.4.0' }) + + npm.commands.update([], function (err) { + t.ifError(err) + t.equal('dep1@0.4.1', installAskedFor, 'should want to install dep@0.4.1') + t.end() + }) +}) + +test('cleanup', function (t) { + mockServer.close() + + process.chdir(osenv.tmpdir()) + rimraf.sync(PKG_DIR) + + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/update-index.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/update-index.js new file mode 100644 index 00000000..47823666 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/update-index.js @@ -0,0 +1,195 @@ +var common = require('../common-tap.js') +var test = require('tap').test +var npm = require('../../') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var path = require('path') +var mr = require('npm-registry-mock') + +var updateIndex = require('../../lib/cache/update-index.js') + +var PKG_DIR = path.resolve(__dirname, 'get-basic') +var CACHE_DIR = path.resolve(PKG_DIR, 'cache') + +var server + +var mocks = { + basic: function (mock) { + mock.get('/-/all').reply(200, allMock) + }, + auth: function (mock) { + var littleBobbyTablesAuth = new Buffer('bobby:tables').toString('base64') + var auth = 'Basic ' + littleBobbyTablesAuth + mock.get('/-/all', { authorization: auth }).reply(200, allMock) + mock.get('/-/all').reply(401, { + error: 'unauthorized', + reason: 'You are not authorized to access this db.' + }) + } +} + +var allMock = { + '_updated': 1411727900 + 25, + 'generator-frontcow': { + 'name': 'generator-frontcow', + 'description': 'f36b6a6123da50959741e2ce4d634f96ec668c56 This is a fake description to ensure we do not accidentally search the real npm registry or use some kind of cache', + 'dist-tags': { + 'latest': '0.1.19' + }, + 'maintainers': [ + { + 'name': 'bcabanes', + 'email': 'contact@benjamincabanes.com' + } + ], + 'homepage': 'https://github.com/bcabanes/generator-frontcow', + 'keywords': [ + 'sass', + 'frontend', + 'yeoman-generator', + 'atomic', + 'design', + 'sass', + 'foundation', + 'foundation5', + 'atomic design', + 'bourbon', + 'polyfill', + 'font awesome' + ], + 'repository': { + 'type': 'git', + 'url': 'https://github.com/bcabanes/generator-frontcow' + }, + 'author': { + 'name': 'ben', + 'email': 'contact@benjamincabanes.com', + 'url': 'https://github.com/bcabanes' + }, + 'bugs': { + 'url': 'https://github.com/bcabanes/generator-frontcow/issues' + }, + 'license': 'MIT', + 'readmeFilename': 'README.md', + 'time': { + 'modified': '2014-10-03T02:26:18.406Z' + }, + 'versions': { + '0.1.19': 'latest' + } + }, + 'marko': { + 'name': 'marko', + 'description': 'Marko is an extensible, streaming, asynchronous, high performance, HTML-based templating language that can be used in Node.js or in the browser.', + 'dist-tags': { + 'latest': '1.2.16' + }, + 'maintainers': [ + { + 'name': 'pnidem', + 'email': 'pnidem@gmail.com' + }, + { + 'name': 'philidem', + 'email': 'phillip.idem@gmail.com' + } + ], + 'homepage': 'https://github.com/raptorjs/marko', + 'keywords': [ + 'templating', + 'template', + 'async', + 'streaming' + ], + 'repository': { + 'type': 'git', + 'url': 'https://github.com/raptorjs/marko.git' + }, + 'author': { + 'name': 'Patrick Steele-Idem', + 'email': 'pnidem@gmail.com' + }, + 'bugs': { + 'url': 'https://github.com/raptorjs/marko/issues' + }, + 'license': 'Apache License v2.0', + 'readmeFilename': 'README.md', + 'users': { + 'pnidem': true + }, + 'time': { + 'modified': '2014-10-03T02:27:31.775Z' + }, + 'versions': { + '1.2.16': 'latest' + } + } +} + +function setup (t, mock, extra) { + mkdirp.sync(CACHE_DIR) + mr({ port: common.port, plugin: mock }, function (er, s) { + npm.load({ cache: CACHE_DIR, registry: common.registry }, function (err) { + if (extra) { + Object.keys(extra).forEach(function (k) { + npm.config.set(k, extra[k], 'user') + }) + } + t.ifError(err, 'no error') + server = s + t.end() + }) + }) +} + +function cleanup (t) { + server.close(function () { + rimraf.sync(PKG_DIR) + + t.end() + }) +} + +test('setup basic', function (t) { + setup(t, mocks.basic) +}) + +test('request basic', function (t) { + updateIndex(0, function (er) { + t.ifError(er, 'no error') + t.end() + }) +}) + +test('cleanup basic', cleanup) + +test('setup auth', function (t) { + setup(t, mocks.auth) +}) + +test('request auth failure', function (t) { + updateIndex(0, function (er) { + t.equals(er.code, 'E401', 'gotta get that auth') + t.ok(/^unauthorized/.test(er.message), 'unauthorized message') + t.end() + }) +}) + +test('cleanup auth failure', cleanup) + +test('setup auth', function (t) { + // mimic as if alwaysAuth had been set + setup(t, mocks.auth, { + _auth: new Buffer('bobby:tables').toString('base64'), + 'always-auth': true + }) +}) + +test('request auth success', function (t) { + updateIndex(0, function (er) { + t.ifError(er, 'no error') + t.end() + }) +}) + +test('cleanup auth', cleanup) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/update-save.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/update-save.js new file mode 100644 index 00000000..38b883d9 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/update-save.js @@ -0,0 +1,219 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var server + +var pkg = path.resolve(__dirname, 'update-save') +var cache = path.resolve(pkg, 'cache') + +var EXEC_OPTS = { + cwd: pkg, + stdio: 'ignore', + env: { + npm_config_registry: common.registry, + npm_config_loglevel: 'verbose', + npm_config_save_prefix: '^' + } +} + +var json = { + name: 'update-save-example', + version: '1.2.3', + dependencies: { + mkdirp: '~0.3.0' + }, + devDependencies: { + underscore: '~1.3.1' + } +} + +function clone (a) { + return extend({}, a) +} + +function extend (a, b) { + for (var key in b) { a[key] = b[key] } + return a +} + +test('setup', function (t) { + setup() + + mr({ port: common.port }, function (er, s) { + t.ifError(er) + server = s + t.end() + }) +}) + +test('update regular dependencies only', function (t) { + setup() + + common.npm(['update', '--save'], EXEC_OPTS, function (err, code) { + t.ifError(err) + t.notOk(code, 'npm update exited with code 0') + + var pkgdata = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json'), 'utf8')) + t.deepEqual( + pkgdata.dependencies, + { mkdirp: '^0.3.5' }, + 'only dependencies updated' + ) + t.deepEqual( + pkgdata.devDependencies, + json.devDependencies, + 'dev dependencies should be untouched' + ) + t.deepEqual( + pkgdata.optionalDependencies, + json.optionalDependencies, + 'optional dependencies should be untouched' + ) + + t.end() + }) +}) + +test('update devDependencies only', function (t) { + setup() + + common.npm(['update', '--save-dev'], EXEC_OPTS, function (err, code) { + t.ifError(err) + t.notOk(code, 'npm update exited with code 0') + + var pkgdata = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json'), 'utf8')) + t.deepEqual( + pkgdata.dependencies, + json.dependencies, + 'dependencies should be untouched' + ) + t.deepEqual( + pkgdata.devDependencies, + { underscore: '^1.3.3' }, + 'dev dependencies should be updated' + ) + t.deepEqual( + pkgdata.optionalDependencies, + json.optionalDependencies, + 'optional dependencies should be untouched' + ) + + t.end() + }) +}) + +test('update optionalDependencies only', function (t) { + setup({ optionalDependencies: { underscore: '~1.3.1' } }) + + common.npm(['update', '--save-optional'], EXEC_OPTS, function (err, code) { + t.ifError(err) + t.notOk(code, 'npm update exited with code 0') + + var pkgdata = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json'), 'utf8')) + t.deepEqual( + pkgdata.dependencies, + json.dependencies, + 'dependencies should be untouched' + ) + t.deepEqual( + pkgdata.devDependencies, + json.devDependencies, + 'dev dependencies should be untouched' + ) + t.deepEqual( + pkgdata.optionalDependencies, + { underscore: '^1.3.3' }, + 'optional dependencies should be updated' + ) + + t.end() + }) +}) + +test('optionalDependencies are merged into dependencies during --save', function (t) { + var cloned = setup({ optionalDependencies: { underscore: '~1.3.1' } }) + + common.npm(['update', '--save'], EXEC_OPTS, function (err, code) { + t.ifError(err) + t.notOk(code, 'npm update exited with code 0') + + var pkgdata = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json'), 'utf8')) + t.deepEqual( + pkgdata.dependencies, + { mkdirp: '^0.3.5' }, + 'dependencies should not include optional dependencies' + ) + t.deepEqual( + pkgdata.devDependencies, + cloned.devDependencies, + 'dev dependencies should be untouched' + ) + t.deepEqual( + pkgdata.optionalDependencies, + cloned.optionalDependencies, + 'optional dependencies should be untouched' + ) + + t.end() + }) +}) + +test('semver prefix is replaced with configured save-prefix', function (t) { + setup() + + common.npm(['update', '--save', '--save-prefix', '~'], EXEC_OPTS, function (err, code) { + t.ifError(err) + t.notOk(code, 'npm update exited with code 0') + + var pkgdata = JSON.parse(fs.readFileSync(path.join(pkg, 'package.json'), 'utf8')) + t.deepEqual( + pkgdata.dependencies, + { mkdirp: '~0.3.5' }, + 'dependencies should be updated' + ) + t.deepEqual( + pkgdata.devDependencies, + json.devDependencies, + 'dev dependencies should be untouched' + ) + t.deepEqual( + pkgdata.optionalDependencies, + json.optionalDependencies, + 'optional dependencies should be updated' + ) + + t.end() + }) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup (extendWith) { + cleanup() + mkdirp.sync(cache) + process.chdir(pkg) + + var template = clone(json) + extend(template, extendWith) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(template, null, 2) + ) + return template +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/url-dependencies.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/url-dependencies.js new file mode 100644 index 00000000..63fe6294 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/url-dependencies.js @@ -0,0 +1,113 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var mr = require('npm-registry-mock') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap') +var server + +var pkg = path.resolve(__dirname, 'url-dependencies') + +var json = { + author: 'Steve Mason', + name: 'url-dependencies', + version: '0.0.0', + dependencies: { + underscore: common.registry + '/underscore/-/underscore-1.3.1.tgz' + } +} + +var mockRoutes = { + 'get': { + '/underscore/-/underscore-1.3.1.tgz': [200] + } +} + +test('setup', function (t) { + mr({ port: common.port, mocks: mockRoutes }, function (er, s) { + server = s + t.end() + }) +}) + +test('url-dependencies: download first time', function (t) { + setup() + + performInstall(t, function (output) { + if (!tarballWasFetched(output)) { + t.fail('Tarball was not fetched') + } else { + t.pass('Tarball was fetched') + } + t.end() + }) +}) + +test('url-dependencies: do not download subsequent times', function (t) { + setup() + + performInstall(t, function () { + performInstall(t, function (output) { + if (tarballWasFetched(output)) { + t.fail('Tarball was fetched second time around') + } else { + t.pass('Tarball was not fetched') + } + t.end() + }) + }) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.end() +}) + +function cleanup () { + // windows fix for locked files + process.chdir(osenv.tmpdir()) + rimraf.sync(path.resolve(pkg)) +} + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(json, null, 2) + ) +} + +function tarballWasFetched (output) { + return output.indexOf( + 'http fetch GET ' + + common.registry + + '/underscore/-/underscore-1.3.1.tgz' + ) > -1 +} + +function performInstall (t, cb) { + var opts = { + cwd: pkg, + env: { + npm_config_registry: common.registry, + npm_config_cache_lock_stale: 1000, + npm_config_cache_lock_wait: 1000, + npm_config_loglevel: 'http', + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH + } + } + common.npm(['install'], opts, function (err, code, stdout, stderr) { + t.ifError(err, 'install success') + t.notOk(code, 'npm install exited with code 0') + + cb(stderr) + }) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/version-git-not-clean.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-git-not-clean.js new file mode 100644 index 00000000..716fb264 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-git-not-clean.js @@ -0,0 +1,96 @@ +var common = require('../common-tap.js') +var test = require('tap').test +var npm = require('../../') +var osenv = require('osenv') +var path = require('path') +var fs = require('fs') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var which = require('which') +var spawn = require('child_process').spawn + +var pkg = path.resolve(__dirname, 'version-git-not-clean') +var cache = path.resolve(pkg, 'cache') + +test('npm version <semver> with working directory not clean', function (t) { + setup() + npm.load({ cache: cache, registry: common.registry, prefix: pkg }, function () { + which('git', function (err, git) { + t.ifError(err, 'git found') + + function addPackageJSON (_cb) { + var data = JSON.stringify({ name: 'blah', version: '0.1.2' }) + fs.writeFile('package.json', data, function () { + var child = spawn(git, ['add', 'package.json']) + child.on('exit', function () { + var child2 = spawn(git, ['commit', 'package.json', '-m', 'init']) + var out = '' + child2.stdout.on('data', function (d) { + out += d.toString() + }) + child2.on('exit', function () { + return _cb(out) + }) + }) + }) + } + + common.makeGitRepo({path: pkg}, function () { + addPackageJSON(function () { + var data = JSON.stringify({ name: 'blah', version: '0.1.3' }) + fs.writeFile('package.json', data, function () { + npm.commands.version(['patch'], function (err) { + if (!err) { + t.fail('should fail on non-clean working directory') + } else { + t.ok(err.message.match(/Git working directory not clean./)) + t.ok(err.message.match(/M package.json/)) + } + t.end() + }) + }) + }) + }) + }) + }) +}) + +test('npm version <semver> --force with working directory not clean', function (t) { + common.npm( + [ + '--force', + '--no-sign-git-tag', + '--registry', common.registry, + '--prefix', pkg, + 'version', + 'patch' + ], + { cwd: pkg, env: {PATH: process.env.PATH} }, + function (err, code, stdout, stderr) { + t.ifError(err, 'npm version ran without issue') + t.notOk(code, 'exited with a non-error code') + var errorLines = stderr.trim().split('\n') + .map(function (line) { + return line.trim() + }) + .filter(function (line) { + return !line.indexOf('using --force') + }) + t.notOk(errorLines.length, 'no error output') + t.end() + }) +}) + +test('cleanup', function (t) { + // windows fix for locked files + process.chdir(osenv.tmpdir()) + + rimraf.sync(pkg) + t.end() +}) + +function setup () { + mkdirp.sync(pkg) + mkdirp.sync(cache) + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/version-lifecycle.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-lifecycle.js new file mode 100644 index 00000000..fdafdc86 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-lifecycle.js @@ -0,0 +1,174 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var npm = require('../../') +var pkg = path.resolve(__dirname, 'version-lifecycle') +var cache = path.resolve(pkg, 'cache') +var npmrc = path.resolve(pkg, './.npmrc') +var configContents = 'sign-git-tag=false\n' + +test('npm version <semver> with failing preversion lifecycle script', function (t) { + setup() + fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ + author: 'Alex Wolfe', + name: 'version-lifecycle', + version: '0.0.0', + description: 'Test for npm version if preversion script fails', + scripts: { + preversion: './fail.sh' + } + }), 'utf8') + fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', 'utf8') + fs.chmodSync(path.resolve(pkg, 'fail.sh'), 448) + npm.load({cache: cache, 'sign-git-tag': false, registry: common.registry}, function () { + var version = require('../../lib/version') + version(['patch'], function (err) { + t.ok(err) + t.ok(err.message.match(/Exit status 50/)) + t.end() + }) + }) +}) + +test('npm version <semver> with failing version lifecycle script', function (t) { + setup() + fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ + author: 'Alex Wolfe', + name: 'version-lifecycle', + version: '0.0.0', + description: 'Test for npm version if postversion script fails', + scripts: { + version: './fail.sh' + } + }), 'utf8') + fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', 'utf8') + fs.chmodSync(path.resolve(pkg, 'fail.sh'), 448) + npm.load({cache: cache, 'sign-git-tag': false, registry: common.registry}, function () { + var version = require('../../lib/version') + version(['patch'], function (err) { + t.ok(err) + t.ok(err.message.match(/Exit status 50/)) + t.end() + }) + }) +}) + +test('npm version <semver> with failing postversion lifecycle script', function (t) { + setup() + fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ + author: 'Alex Wolfe', + name: 'version-lifecycle', + version: '0.0.0', + description: 'Test for npm version if postversion script fails', + scripts: { + postversion: './fail.sh' + } + }), 'utf8') + fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', 'utf8') + fs.chmodSync(path.resolve(pkg, 'fail.sh'), 448) + npm.load({cache: cache, 'sign-git-tag': false, registry: common.registry}, function () { + var version = require('../../lib/version') + version(['patch'], function (err) { + t.ok(err) + t.ok(err.message.match(/Exit status 50/)) + t.end() + }) + }) +}) + +test('npm version <semver> execution order', function (t) { + setup() + fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ + author: 'Alex Wolfe', + name: 'version-lifecycle', + version: '0.0.0', + description: 'Test for npm version if postversion script fails', + scripts: { + preversion: './preversion.sh', + version: './version.sh', + postversion: './postversion.sh' + } + }), 'utf8') + makeScript('preversion') + makeScript('version') + makeScript('postversion') + npm.load({cache: cache, 'sign-git-tag': false, registry: common.registry}, function () { + common.makeGitRepo({path: pkg}, function (err, git) { + t.ifError(err, 'git bootstrap ran without error') + + var version = require('../../lib/version') + version(['patch'], function (err) { + t.ifError(err, 'version command complete') + + t.equal('0.0.0', readPackage('preversion').version, 'preversion') + t.deepEqual(readStatus('preversion', t), { + 'preversion-package.json': 'A' + }) + + t.equal('0.0.1', readPackage('version').version, 'version') + t.deepEqual(readStatus('version', t), { + 'package.json': 'M', + 'preversion-package.json': 'A', + 'version-package.json': 'A' + }) + + t.equal('0.0.1', readPackage('postversion').version, 'postversion') + t.deepEqual(readStatus('postversion', t), { + 'postversion-package.json': 'A' + }) + t.end() + }) + }) + }) +}) + +test('cleanup', function (t) { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + t.end() +}) + +function setup () { + mkdirp.sync(pkg) + mkdirp.sync(path.join(pkg, 'node_modules')) + mkdirp.sync(cache) + fs.writeFileSync(npmrc, configContents, 'ascii') + process.chdir(pkg) +} + +function makeScript (lifecycle) { + var contents = [ + 'cp package.json ' + lifecycle + '-package.json', + 'git add ' + lifecycle + '-package.json', + 'git status --porcelain > ' + lifecycle + '-git.txt' + ].join('\n') + var scriptPath = path.join(pkg, lifecycle + '.sh') + fs.writeFileSync(scriptPath, contents, 'utf-8') + fs.chmodSync(scriptPath, 448) +} + +function readPackage (lifecycle) { + return JSON.parse(fs.readFileSync(path.join(pkg, lifecycle + '-package.json'), 'utf-8')) +} + +function readStatus (lifecycle, t) { + var status = {} + fs.readFileSync(path.join(pkg, lifecycle + '-git.txt'), 'utf-8') + .trim() + .split('\n') + .forEach(function (line) { + line = line.trim() + if (line && !line.match(/^\?\? /)) { + var parts = line.split(/\s+/) + t.equal(parts.length, 2, lifecycle + ' : git status has too many words : ' + line) + status[parts[1].trim()] = parts[0].trim() + } + }) + return status +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/version-message-config.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-message-config.js new file mode 100644 index 00000000..9125774e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-message-config.js @@ -0,0 +1,76 @@ +var common = require('../common-tap.js') +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../lib/npm.js') + +var pkg = path.resolve(__dirname, 'version-message-config') +var cache = path.resolve(pkg, 'cache') +var npmrc = path.resolve(pkg, '.npmrc') +var packagePath = path.resolve(pkg, 'package.json') + +var json = { name: 'blah', version: '0.1.2' } + +var configContents = 'sign-git-tag=false\nmessage=":bookmark: %s"\n' + +test('npm version <semver> with message config', function (t) { + setup() + + npm.load({ prefix: pkg, userconfig: npmrc }, function () { + var git = require('../../lib/utils/git.js') + + common.makeGitRepo({ path: pkg }, function (er) { + t.ifErr(er, 'git bootstrap ran without error') + + common.npm( + [ + 'version', + 'patch', + '--loglevel', 'silent' + // package config is picked up from env + ], + { cwd: pkg, env: { PATH: process.env.PATH } }, + function (err, code, stdout, stderr) { + t.ifError(err, 'npm version ran without issue') + t.notOk(code, 'exited with a non-error code') + t.notOk(stderr, 'no error output') + + git.whichAndExec( + ['log'], + { cwd: pkg, env: process.env }, + function (er, log, stderr) { + t.ok(log.match(/:bookmark: 0\.1\.3/g), 'config was picked up by version') + t.end() + } + ) + } + ) + }) + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + // windows fix for locked files + process.chdir(osenv.tmpdir()) + + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(cache) + process.chdir(pkg) + + fs.writeFileSync(packagePath, JSON.stringify(json), 'utf8') + fs.writeFileSync(npmrc, configContents, 'ascii') +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/version-no-git.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-no-git.js new file mode 100644 index 00000000..f0b6c81e --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-no-git.js @@ -0,0 +1,54 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var npm = require("../../") +var osenv = require("osenv") +var path = require("path") +var fs = require("fs") +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") +var requireInject = require("require-inject") + +var pkg = path.resolve(__dirname, "version-no-git") +var cache = path.resolve(pkg, "cache") +var gitDir = path.resolve(pkg, ".git") + +test("npm version <semver> in a git repo without the git binary", function(t) { + setup() + npm.load({cache: cache, registry: common.registry}, function() { + var version = requireInject("../../lib/version", { + which: function(cmd, cb) { + process.nextTick(function() { + cb(new Error('ENOGIT!')) + }) + } + }) + + version(["patch"], function(err) { + if (! t.error(err)) return t.end() + var p = path.resolve(pkg, "package") + var testPkg = require(p) + t.equal("0.0.1", testPkg.version, "\"" + testPkg.version+"\" === \"0.0.1\"") + t.end() + }) + }) +}) + +test("cleanup", function(t) { + process.chdir(osenv.tmpdir()) + + rimraf.sync(pkg) + t.end() +}) + +function setup() { + mkdirp.sync(pkg) + mkdirp.sync(cache) + mkdirp.sync(gitDir) + fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify({ + author: "Terin Stock", + name: "version-no-git-test", + version: "0.0.0", + description: "Test for npm version if git binary doesn't exist" + }), "utf8") + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/version-no-package.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-no-package.js new file mode 100644 index 00000000..1bf31da0 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-no-package.js @@ -0,0 +1,45 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var osenv = require("osenv") +var path = require("path") +var mkdirp = require("mkdirp") +var rimraf = require("rimraf") + +var pkg = path.resolve(__dirname, "version-no-package") + +test("setup", function (t) { + setup() + t.end() +}) + +test("npm version in a prefix with no package.json", function(t) { + setup() + common.npm( + ["version", "--json", "--prefix", pkg], + { cwd : pkg }, + function (er, code, stdout, stderr) { + t.ifError(er, "npm version doesn't care that there's no package.json") + t.notOk(code, "npm version ran without barfing") + t.ok(stdout, "got version output") + t.notOk(stderr, "no error output") + t.doesNotThrow(function () { + var metadata = JSON.parse(stdout) + t.equal(metadata.node, process.versions.node, "node versions match") + + }, "able to reconstitute version object from stdout") + t.end() + } + ) +}) + +test("cleanup", function(t) { + process.chdir(osenv.tmpdir()) + + rimraf.sync(pkg) + t.end() +}) + +function setup() { + mkdirp.sync(pkg) + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/version-no-tags.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-no-tags.js new file mode 100644 index 00000000..c9fcdb28 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-no-tags.js @@ -0,0 +1,71 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var npm = require("../../") +var osenv = require("osenv") +var path = require("path") +var fs = require("fs") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var which = require("which") +var spawn = require("child_process").spawn + +var pkg = path.resolve(__dirname, "version-no-tags") +var cache = path.resolve(pkg, "cache") + +test("npm version <semver> without git tag", function (t) { + setup() + npm.load({ cache: cache, registry: common.registry}, function () { + which("git", function (err, git) { + t.ifError(err, "git found on system") + function tagExists(tag, _cb) { + var child1 = spawn(git, ["tag", "-l", tag]) + var out = "" + child1.stdout.on("data", function (d) { + out += d.toString() + }) + child1.on("exit", function () { + return _cb(null, Boolean(~out.indexOf(tag))) + }) + } + + var child2 = spawn(git, ["init"]) + child2.stdout.pipe(process.stdout) + child2.on("exit", function () { + npm.config.set("git-tag-version", false) + npm.commands.version(["patch"], function (err) { + if (err) return t.fail("Error perform version patch") + var p = path.resolve(pkg, "package") + var testPkg = require(p) + if (testPkg.version !== "0.0.1") t.fail(testPkg.version+" !== \"0.0.1\"") + t.equal("0.0.1", testPkg.version) + tagExists("v0.0.1", function (err, exists) { + t.ifError(err, "tag found to exist") + t.equal(exists, false, "git tag DOES exist") + t.pass("git tag does not exist") + t.end() + }) + }) + }) + }) + }) +}) + +test("cleanup", function (t) { + // windows fix for locked files + process.chdir(osenv.tmpdir()) + + rimraf.sync(pkg) + t.end() +}) + +function setup() { + mkdirp.sync(pkg) + mkdirp.sync(cache) + fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify({ + author: "Evan Lucas", + name: "version-no-tags-test", + version: "0.0.0", + description: "Test for git-tag-version flag" + }), "utf8") + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/version-sub-directory.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-sub-directory.js new file mode 100644 index 00000000..69959c7c --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-sub-directory.js @@ -0,0 +1,74 @@ +var common = require('../common-tap.js') +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../lib/npm.js') + +var pkg = path.resolve(__dirname, 'version-sub-directory') +var subDirectory = path.resolve(pkg, 'sub-directory') +var packagePath = path.resolve(pkg, 'package.json') +var cache = path.resolve(pkg, 'cache') + +var json = { name: 'cat', version: '0.1.2' } + +test('npm version <semver> from a subdirectory', function (t) { + setup() + npmLoad() + + function npmLoad () { + npm.load({ cache: cache }, function () { + common.makeGitRepo({ + path: pkg, + added: ['package.json'] + }, version) + }) + } + + function version (er, stdout, stderr) { + t.ifError(er, 'git repo initialized without issue') + t.notOk(stderr, 'no error output') + npm.config.set('sign-git-tag', false) + npm.commands.version(['patch'], checkVersion) + } + + function checkVersion (er) { + var git = require('../../lib/utils/git.js') + t.ifError(er, 'version command ran without error') + git.whichAndExec( + ['log'], + { cwd: pkg, env: process.env }, + checkCommit + ) + } + + function checkCommit (er, log, stderr) { + t.ifError(er, 'git log ran without issue') + t.notOk(stderr, 'no error output') + t.ok(log.match(/0\.1\.3/g), 'commited from subdirectory') + t.end() + } +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + // windows fix for locked files + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(cache) + mkdirp.sync(subDirectory) + process.chdir(subDirectory) + fs.writeFileSync(packagePath, JSON.stringify(json), 'utf8') +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/version-update-shrinkwrap.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-update-shrinkwrap.js new file mode 100644 index 00000000..8e3be5aa --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/version-update-shrinkwrap.js @@ -0,0 +1,134 @@ +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../') +var common = require('../common-tap.js') + +var pkg = path.resolve(__dirname, 'version-shrinkwrap') +var cache = path.resolve(pkg, 'cache') + +test('npm version <semver> updates shrinkwrap - no git', function (t) { + setup() + npm.load({ cache: pkg + '/cache', registry: common.registry }, function () { + npm.commands.version(['patch'], function (err) { + if (err) return t.fail('Error perform version patch') + var shrinkwrap = require(path.resolve(pkg, 'npm-shrinkwrap.json')) + t.equal(shrinkwrap.version, '0.0.1', 'got expected version') + t.end() + }) + }) +}) + +test('npm version <semver> updates git works with no shrinkwrap', function (t) { + setup() + rimraf.sync(path.resolve(pkg, 'npm-shrinkwrap.json')) + + npm.config.set('sign-git-tag', false) + + common.makeGitRepo({ + path: pkg, + added: ['package.json'] + }, version) + + function version (er, stdout, stderr) { + t.ifError(er, 'git repo initialized without issue') + t.notOk(stderr, 'no error output') + + npm.commands.version(['patch'], checkCommit) + } + + function checkCommit (er) { + t.ifError(er, 'version command ran without error') + + var shrinkwrap = require(path.resolve(pkg, 'npm-shrinkwrap.json')) + t.equal(shrinkwrap.version, '0.0.1', 'got expected version') + + var opts = { cwd: pkg, env: { PATH: process.env.PATH }} + var git = require('../../lib/utils/git.js') + git.whichAndExec( + ['show', 'HEAD', '--name-only'], + opts, + function (er, stdout, stderr) { + t.ifError(er, 'git show ran without issues') + t.notOk(stderr, 'no error output') + + var lines = stdout.split('\n') + t.notEqual(lines.indexOf('package.json'), -1, 'package.json commited') + t.equal(lines.indexOf('npm-shrinkwrap.json'), -1, 'npm-shrinkwrap.json not present') + + t.end() + } + ) + } +}) + +test('npm version <semver> updates shrinkwrap and updates git', function (t) { + setup() + + npm.config.set('sign-git-tag', false) + + common.makeGitRepo({ + path: pkg, + added: ['package.json', 'npm-shrinkwrap.json'] + }, version) + + function version (er, stdout, stderr) { + t.ifError(er, 'git repo initialized without issue') + t.notOk(stderr, 'no error output') + + npm.commands.version(['patch'], checkCommit) + } + + function checkCommit (er) { + t.ifError(er, 'version command ran without error') + + var shrinkwrap = require(path.resolve(pkg, 'npm-shrinkwrap.json')) + t.equal(shrinkwrap.version, '0.0.1', 'got expected version') + + var git = require('../../lib/utils/git.js') + var opts = { cwd: pkg, env: { PATH: process.env.PATH }} + git.whichAndExec( + ['show', 'HEAD', '--name-only'], + opts, + function (er, stdout, stderr) { + t.ifError(er, 'git show ran without issues') + t.notOk(stderr, 'no error output') + + var lines = stdout.split('\n') + t.notEqual(lines.indexOf('package.json'), -1, 'package.json commited') + t.notEqual(lines.indexOf('npm-shrinkwrap.json'), -1, 'npm-shrinkwrap.json commited') + + t.end() + } + ) + } +}) + +test('cleanup', function (t) { + // windows fix for locked files + process.chdir(osenv.tmpdir()) + + rimraf.sync(pkg) + t.end() +}) + +function setup () { + rimraf.sync(pkg) + mkdirp.sync(pkg) + mkdirp.sync(cache) + var contents = { + author: 'Nathan Bowser && Faiq Raza', + name: 'version-with-shrinkwrap-test', + version: '0.0.0', + description: 'Test for version with shrinkwrap update' + } + + fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify(contents), 'utf8') + fs.writeFileSync(path.resolve(pkg, 'npm-shrinkwrap.json'), JSON.stringify(contents), 'utf8') + process.chdir(pkg) +} diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/view.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/view.js new file mode 100644 index 00000000..067bb875 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/view.js @@ -0,0 +1,317 @@ +var common = require("../common-tap.js") +var test = require("tap").test +var osenv = require("osenv") +var path = require("path") +var fs = require("fs") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var tmp = osenv.tmpdir() +var t1dir = path.resolve(tmp, "view-local-no-pkg") +var t2dir = path.resolve(tmp, "view-local-notmine") +var t3dir = path.resolve(tmp, "view-local-mine") +var mr = require("npm-registry-mock") + +test("setup", function (t) { + mkdirp.sync(t1dir) + mkdirp.sync(t2dir) + mkdirp.sync(t3dir) + + fs.writeFileSync(t2dir + "/package.json", JSON.stringify({ + author: "Evan Lucas" + , name: "test-repo-url-https" + , version: "0.0.1" + }), "utf8") + + fs.writeFileSync(t3dir + "/package.json", JSON.stringify({ + author: "Evan Lucas" + , name: "biscuits" + , version: "0.0.1" + }), "utf8") + + t.pass("created fixtures") + t.end() +}) + +function plugin (server) { + server + .get("/biscuits") + .many() + .reply(404, {"error": "version not found"}) +} + +test("npm view . in global mode", function (t) { + process.chdir(t1dir) + common.npm([ + "view" + , "." + , "--registry=" + common.registry + , "--global" + ], { cwd: t1dir }, function (err, code, stdout, stderr) { + t.ifError(err, "view command finished successfully") + t.equal(code, 1, "exit not ok") + t.similar(stderr, /Cannot use view command in global mode./m) + t.end() + }) +}) + +test("npm view --global", function(t) { + process.chdir(t1dir) + common.npm([ + "view" + , "--registry=" + common.registry + , "--global" + ], { cwd: t1dir }, function(err, code, stdout, stderr) { + t.ifError(err, "view command finished successfully") + t.equal(code, 1, "exit not ok") + t.similar(stderr, /Cannot use view command in global mode./m) + t.end() + }) +}) + +test("npm view . with no package.json", function(t) { + process.chdir(t1dir) + common.npm([ + "view" + , "." + , "--registry=" + common.registry + ], { cwd: t1dir }, function (err, code, stdout, stderr) { + t.ifError(err, "view command finished successfully") + t.equal(code, 1, "exit not ok") + t.similar(stderr, /Invalid package.json/m) + t.end() + }) +}) + +test("npm view . with no published package", function (t) { + process.chdir(t3dir) + mr({port : common.port, plugin : plugin}, function (er, s) { + common.npm([ + "view" + , "." + , "--registry=" + common.registry + ], { cwd: t3dir }, function (err, code, stdout, stderr) { + t.ifError(err, "view command finished successfully") + t.equal(code, 1, "exit not ok") + t.similar(stderr, /version not found/m) + s.close() + t.end() + }) + }) +}) + +test("npm view .", function (t) { + process.chdir(t2dir) + mr({port : common.port, plugin : plugin}, function (er, s) { + common.npm([ + "view" + , "." + , "--registry=" + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, "view command finished successfully") + t.equal(code, 0, "exit ok") + var re = new RegExp("name: 'test-repo-url-https'") + t.similar(stdout, re) + s.close() + t.end() + }) + }) +}) + +test("npm view . select fields", function (t) { + process.chdir(t2dir) + mr({port : common.port, plugin : plugin}, function (er, s) { + common.npm([ + "view" + , "." + , "main" + , "--registry=" + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, "view command finished successfully") + t.equal(code, 0, "exit ok") + t.equal(stdout.trim(), "index.js", "should print `index.js`") + s.close() + t.end() + }) + }) +}) + +test("npm view .@<version>", function (t) { + process.chdir(t2dir) + mr({port : common.port, plugin : plugin}, function (er, s) { + common.npm([ + "view" + , ".@0.0.0" + , "version" + , "--registry=" + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, "view command finished successfully") + t.equal(code, 0, "exit ok") + t.equal(stdout.trim(), "0.0.0", "should print `0.0.0`") + s.close() + t.end() + }) + }) +}) + +test("npm view .@<version> --json", function (t) { + process.chdir(t2dir) + mr({port : common.port, plugin : plugin}, function (er, s) { + common.npm([ + "view" + , ".@0.0.0" + , "version" + , "--json" + , "--registry=" + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, "view command finished successfully") + t.equal(code, 0, "exit ok") + t.equal(stdout.trim(), "\"0.0.0\"", "should print `\"0.0.0\"`") + s.close() + t.end() + }) + }) +}) + +test("npm view <package name>", function (t) { + mr({port : common.port, plugin : plugin}, function (er, s) { + common.npm([ + "view" + , "underscore" + , "--registry=" + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, "view command finished successfully") + t.equal(code, 0, "exit ok") + var re = new RegExp("name: 'underscore'") + t.similar(stdout, re, "should have name `underscore`") + s.close() + t.end() + }) + }) +}) + +test("npm view <package name> --global", function(t) { + mr({port : common.port, plugin : plugin}, function (er, s) { + common.npm([ + "view" + , "underscore" + , "--global" + , "--registry=" + common.registry + ], { cwd: t2dir }, function(err, code, stdout) { + t.ifError(err, "view command finished successfully") + t.equal(code, 0, "exit ok") + var re = new RegExp("name: 'underscore'") + t.similar(stdout, re, "should have name `underscore`") + s.close() + t.end() + }) + }) +}) + +test("npm view <package name> --json", function(t) { + t.plan(3) + mr({port : common.port, plugin : plugin}, function (er, s) { + common.npm([ + "view" + , "underscore" + , "--json" + , "--registry=" + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, "view command finished successfully") + t.equal(code, 0, "exit ok") + s.close() + try { + var out = JSON.parse(stdout.trim()) + t.similar(out, { + maintainers: "jashkenas <jashkenas@gmail.com>" + }, "should have the same maintainer") + } + catch (er) { + t.fail("Unable to parse JSON") + } + }) + }) +}) + +test("npm view <package name> <field>", function (t) { + mr({port : common.port, plugin : plugin}, function (er, s) { + common.npm([ + "view" + , "underscore" + , "homepage" + , "--registry=" + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, "view command finished successfully") + t.equal(code, 0, "exit ok") + t.equal(stdout.trim(), "http://underscorejs.org", + "homepage should equal `http://underscorejs.org`") + s.close() + t.end() + }) + }) +}) + +test("npm view with invalid package name", function (t) { + var invalidName = "InvalidPackage" + obj = {} + obj["/" + invalidName] = [404, {"error": "not found"}] + + mr({port : common.port, mocks: {"get": obj}}, function (er, s) { + common.npm([ + "view" + , invalidName + , "--registry=" + common.registry + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, "view command finished successfully") + t.equal(code, 1, "exit not ok") + + t.similar(stderr, new RegExp("is not in the npm registry"), + "Package should NOT be found") + + t.dissimilar(stderr, new RegExp("use the name yourself!"), + "Suggestion should not be there") + + t.similar(stderr, new RegExp("name can no longer contain capital letters"), + "Suggestion about Capital letter should be there") + + s.close() + t.end() + }) + }) +}) + + +test("npm view with valid but non existent package name", function (t) { + mr({port : common.port, mocks: { + "get": { + "/valid-but-non-existent-package" : [404, {"error": "not found"}] + } + }}, function (er, s) { + common.npm([ + "view" + , "valid-but-non-existent-package" + , "--registry=" + common.registry + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, "view command finished successfully") + t.equal(code, 1, "exit not ok") + + t.similar(stderr, + new RegExp("'valid-but-non-existent-package' is not in the npm registry\."), + "Package should NOT be found") + + t.similar(stderr, new RegExp("use the name yourself!"), + "Suggestion should be there") + + s.close() + t.end() + }) + }) +}) + +test("cleanup", function (t) { + process.chdir(osenv.tmpdir()) + rimraf.sync(t1dir) + rimraf.sync(t2dir) + rimraf.sync(t3dir) + t.pass("cleaned up") + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/whoami.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/whoami.js new file mode 100644 index 00000000..252c5d2b --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/whoami.js @@ -0,0 +1,77 @@ +var common = require("../common-tap.js") + +var fs = require("fs") +var path = require("path") +var createServer = require("http").createServer + +var test = require("tap").test +var rimraf = require("rimraf") + +var opts = { cwd: __dirname } + +var FIXTURE_PATH = path.resolve(__dirname, "fixture_npmrc") + +test("npm whoami with basic auth", function (t) { + var s = "//registry.lvh.me/:username = wombat\n" + + "//registry.lvh.me/:_password = YmFkIHBhc3N3b3Jk\n" + + "//registry.lvh.me/:email = lindsay@wdu.org.au\n" + fs.writeFileSync(FIXTURE_PATH, s, "ascii") + fs.chmodSync(FIXTURE_PATH, "0444") + + common.npm( + [ + "whoami", + "--userconfig=" + FIXTURE_PATH, + "--registry=http://registry.lvh.me/" + ], + opts, + function (err, code, stdout, stderr) { + t.ifError(err) + + t.equal(stderr, "", "got nothing on stderr") + t.equal(code, 0, "exit ok") + t.equal(stdout, "wombat\n", "got username") + rimraf.sync(FIXTURE_PATH) + t.end() + } + ) +}) + +test("npm whoami with bearer auth", {timeout : 2 * 1000}, function (t) { + var s = "//localhost:" + common.port + + "/:_authToken = wombat-developers-union\n" + fs.writeFileSync(FIXTURE_PATH, s, "ascii") + fs.chmodSync(FIXTURE_PATH, "0444") + + function verify(req, res) { + t.equal(req.method, "GET") + t.equal(req.url, "/-/whoami") + + res.setHeader("content-type", "application/json") + res.writeHeader(200) + res.end(JSON.stringify({username : "wombat"}), "utf8") + } + + var server = createServer(verify) + + server.listen(common.port, function () { + common.npm( + [ + "whoami", + "--userconfig=" + FIXTURE_PATH, + "--registry=http://localhost:" + common.port + "/" + ], + opts, + function (err, code, stdout, stderr) { + t.ifError(err) + + t.equal(stderr, "", "got nothing on stderr") + t.equal(code, 0, "exit ok") + t.equal(stdout, "wombat\n", "got username") + rimraf.sync(FIXTURE_PATH) + server.close() + t.end() + } + ) + }) +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/tap/zz-cleanup.js b/bin/nodejs0.10.47/node_modules/npm/test/tap/zz-cleanup.js new file mode 100644 index 00000000..0e18dcdb --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/tap/zz-cleanup.js @@ -0,0 +1,8 @@ +var common = require("../common-tap") +var test = require("tap").test +var rimraf = require("rimraf") + +test("cleanup", function (t) { + rimraf.sync(common.npm_config_cache) + t.end() +}) diff --git a/bin/nodejs0.10.47/node_modules/npm/test/update-test.sh b/bin/nodejs0.10.47/node_modules/npm/test/update-test.sh new file mode 100644 index 00000000..686a26d4 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/test/update-test.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +SELF_PATH="$0" +if [ "${SELF_PATH:0:1}" != "." ] && [ "${SELF_PATH:0:1}" != "/" ]; then + SELF_PATH=./"$SELF_PATH" +fi +SELF_PATH=$( cd -P -- "$(dirname -- "$SELF_PATH")" \ + && pwd -P \ + ) && SELF_PATH=$SELF_PATH/$(basename -- "$0") + +# resolve symlinks +while [ -h "$SELF_PATH" ]; do + DIR=$(dirname -- "$SELF_PATH") + SYM=$(readlink -- "$SELF_PATH") + SELF_PATH=$( cd -- "$DIR" \ + && cd -- $(dirname -- "$SYM") \ + && pwd \ + )/$(basename -- "$SYM") +done +DIR=$( dirname -- "$SELF_PATH" ) + +export npm_config_root=$DIR/root +export npm_config_binroot=$DIR/bin + +rm -rf $DIR/{root,bin} +mkdir -p $DIR/root +mkdir -p $DIR/bin +npm ls installed 2>/dev/null | grep -v npm | awk '{print $1}' | xargs npm rm &>/dev/null +npm install \ + base64@1.0.0 \ + eyes@0.1.1 \ + vows@0.2.5 \ + websocket-server@1.0.5 &>/dev/null +npm install ./test/packages/blerg &>/dev/null +npm install vows@0.3.0 &>/dev/null + +echo "" +echo "##" +echo "## starting update" +echo "##" +echo "" + +npm update + +echo "" +echo "##" +echo "## update done, all should be 'latest'" +echo "##" +echo "" + +list=$( npm ls installed remote 2>/dev/null ) +echo "$list" +notlatest=$( echo "$list" | grep -v latest ) +if [ "$notlatest" != "" ]; then + echo "Failed: not latest" + echo $notlatest +else + echo "ok" +fi diff --git a/bin/nodejs0.10.47/node_modules/npm/wercker.yml b/bin/nodejs0.10.47/node_modules/npm/wercker.yml new file mode 100644 index 00000000..a2938fe1 --- /dev/null +++ b/bin/nodejs0.10.47/node_modules/npm/wercker.yml @@ -0,0 +1,22 @@ +box: wercker/nodejs +# Build definition +build: + # The steps that will be executed on build + steps: + # A step that executes `npm install` command + - npm-install + # A step that executes `npm test` command + - npm-test + + # A custom script step, name value is used in the UI + # and the code value contains the command that get executed + - script: + name: echo nodejs information + code: | + echo "node version $(node -v) running" + echo "npm version $(npm -v) running" + after-steps: + - sherzberg/slack-notify: + subdomain: npm-inc + token: $SLACK_TOKEN + channel: github-commits diff --git a/bin/nodejs0.10.47/node_perfctr_provider.man b/bin/nodejs0.10.47/node_perfctr_provider.man new file mode 100644 index 00000000..2e15dafb --- /dev/null +++ b/bin/nodejs0.10.47/node_perfctr_provider.man @@ -0,0 +1,107 @@ +<instrumentationManifest + xmlns="http://schemas.microsoft.com/win/2004/08/events" + xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <instrumentation> + <counters xmlns="http://schemas.microsoft.com/win/2005/12/counters" + schemaVersion="1.1"> + <provider symbol="NodeCounterProvider" + applicationIdentity="node.exe" + providerType="userMode" + providerGuid="{1E2E15D7-3760-470E-8699-B9DB5248EDD5}"> + <counterSet symbol="NodeCounterSet" + guid="{3A22A8EC-297C-48AC-AB15-33EC93033FD8}" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet" + name="Node.js" + description="Node.js performance counters" + instances="multipleAggregate"> + + <counter id="1" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvreq" + name="HTTP server requests" + description="Number of HTTP server requests" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="2" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvrsp" + name="HTTP server responses" + description="Number of HTTP server responses" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="3" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclireq" + name="HTTP client requests" + description="Number of HTTP client requests" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="4" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclirsp" + name="HTTP client responses" + description="Number of HTTP client responses" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="5" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netsrvconn" + name="Active server connections" + description="Number of server connections" + type="perf_counter_rawcount" + detailLevel="standard" + aggregate="sum" /> + + <counter id="6" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbytesent" + name="Network bytes sent" + description="Number of bytes sent using TCP" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="7" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbyterecv" + name="Network bytes received" + description="Number of bytes received using TCP" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="8" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.gctime" + name="%Time in GC" + description="Percent of time for last GC" + type="perf_counter_rawcount" + detailLevel="standard" + aggregate="avg" /> + + <counter id="9" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebytesent" + name="Pipe bytes sent" + description="Number of bytes sent using pipe" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="10" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebyterecv" + name="Pipe bytes received" + description="Number of bytes received using pipe" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + </counterSet> + </provider> + </counters> + </instrumentation> +</instrumentationManifest> diff --git a/bin/nodejs0.10.47/nodevars.bat b/bin/nodejs0.10.47/nodevars.bat new file mode 100644 index 00000000..6cb8d29c --- /dev/null +++ b/bin/nodejs0.10.47/nodevars.bat @@ -0,0 +1,24 @@ +@echo off + +rem Ensure this Node.js and npm are first in the PATH +set PATH=%APPDATA%\npm;%~dp0;%PATH% + +setlocal enabledelayedexpansion +pushd "%~dp0" + +rem Figure out the node version. +set print_version=.\node.exe -p -e "process.versions.node + ' (' + process.arch + ')'" +for /F "usebackq delims=" %%v in (`%print_version%`) do set version=%%v + +rem Print message. +if exist npm.cmd ( + echo Your environment has been set up for using Node.js !version! and npm. +) else ( + echo Your environment has been set up for using Node.js !version!. +) + +popd +endlocal + +rem If we're in the node.js directory, change to the user's home dir. +if "%CD%\"=="%~dp0" cd /d "%HOMEDRIVE%%HOMEPATH%" diff --git a/bin/nodejs0.10.47/npm b/bin/nodejs0.10.47/npm new file mode 100644 index 00000000..1226afbc --- /dev/null +++ b/bin/nodejs0.10.47/npm @@ -0,0 +1,34 @@ +#!/bin/sh +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node +fi + +NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" + +case `uname` in + *MINGW*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; + *CYGWIN*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; +esac + +"$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/bin/nodejs0.10.47/npm.cmd b/bin/nodejs0.10.47/npm.cmd new file mode 100644 index 00000000..f111c59d --- /dev/null +++ b/bin/nodejs0.10.47/npm.cmd @@ -0,0 +1,19 @@ +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/bin/nodejs0.12.16/etc/.npmignore b/bin/nodejs0.12.16/etc/.npmignore new file mode 100644 index 00000000..d3f5a12f --- /dev/null +++ b/bin/nodejs0.12.16/etc/.npmignore @@ -0,0 +1 @@ + diff --git a/bin/nodejs0.12.16/etc/npmrc b/bin/nodejs0.12.16/etc/npmrc new file mode 100644 index 00000000..e7c7d622 --- /dev/null +++ b/bin/nodejs0.12.16/etc/npmrc @@ -0,0 +1,5 @@ +cache = ~NEARD_WIN_PATH~\tmp\npm-cache +globalconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.12.16\etc\npmrc +globalignorefile = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.12.16\etc\.npmignore +init-module = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.12.16\etc\.npm-init.js +userconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.12.16\etc\npmrc diff --git a/bin/nodejs0.12.16/etc/npmrc.nrd b/bin/nodejs0.12.16/etc/npmrc.nrd new file mode 100644 index 00000000..e7c7d622 --- /dev/null +++ b/bin/nodejs0.12.16/etc/npmrc.nrd @@ -0,0 +1,5 @@ +cache = ~NEARD_WIN_PATH~\tmp\npm-cache +globalconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.12.16\etc\npmrc +globalignorefile = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.12.16\etc\.npmignore +init-module = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.12.16\etc\.npm-init.js +userconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.12.16\etc\npmrc diff --git a/bin/nodejs0.12.16/launch.bat b/bin/nodejs0.12.16/launch.bat new file mode 100644 index 00000000..62238ad6 --- /dev/null +++ b/bin/nodejs0.12.16/launch.bat @@ -0,0 +1,12 @@ +@ECHO OFF +SETLOCAL EnableDelayedExpansion + +SET NEARD_NODEJS_PATH=%~dp0 +SET NEARD_NODEJS_PATH=!NEARD_NODEJS_PATH:~0,-1! +SET NEARD_NODEJS_NPM_PATH=%NEARD_NODEJS_PATH%\node_modules\npm +SET NEARD_NODEJS_CONFIG_PATH=%NEARD_NODEJS_NPM_PATH%\npmrc +ECHO prefix = %NEARD_NODEJS_PATH%>%NEARD_NODEJS_CONFIG_PATH% + +"%NEARD_NODEJS_PATH%\nodevars.bat" & "%NEARD_NODEJS_PATH%\npm" config set globalconfig "%NEARD_NODEJS_CONFIG_PATH%" --global + +ENDLOCAL \ No newline at end of file diff --git a/bin/nodejs0.12.16/neard.conf b/bin/nodejs0.12.16/neard.conf new file mode 100644 index 00000000..d716ae38 --- /dev/null +++ b/bin/nodejs0.12.16/neard.conf @@ -0,0 +1,8 @@ +nodejsVersion = "0.12.16" +nodejsExe = "node.exe" +nodejsVars = "nodevars.bat" +nodejsNpm = "npm.cmd" +nodejsLaunch = "launch.bat" +nodejsConf = "node_modules/npm/npmrc" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/nodejs0.12.16/node.exe b/bin/nodejs0.12.16/node.exe new file mode 100644 index 00000000..4de26112 Binary files /dev/null and b/bin/nodejs0.12.16/node.exe differ diff --git a/bin/nodejs0.12.16/node_etw_provider.man b/bin/nodejs0.12.16/node_etw_provider.man new file mode 100644 index 00000000..8b42f409 --- /dev/null +++ b/bin/nodejs0.12.16/node_etw_provider.man @@ -0,0 +1,153 @@ +<instrumentationManifest + xmlns="http://schemas.microsoft.com/win/2004/08/events" + xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <instrumentation> + <events> + <provider name="NodeJS-ETW-provider" + guid="{77754E9B-264B-4D8D-B981-E4135C1ECB0C}" + symbol="NODE_ETW_PROVIDER" + resourceFileName="node.exe" + messageFileName="node.exe"> + + <tasks> + <task name="MethodRuntime" value="1" + symbol="JSCRIPT_METHOD_RUNTIME_TASK"> + <opcodes> + <opcode name="MethodLoad" value="10" + symbol="JSCRIPT_METHOD_METHODLOAD_OPCODE"/> + </opcodes> + </task> + </tasks> + + <opcodes> + <opcode name="NODE_HTTP_SERVER_REQUEST" value="10"/> + <opcode name="NODE_HTTP_SERVER_RESPONSE" value="11"/> + <opcode name="NODE_HTTP_CLIENT_REQUEST" value="12"/> + <opcode name="NODE_HTTP_CLIENT_RESPONSE" value="13"/> + <opcode name="NODE_NET_SERVER_CONNECTION" value="14"/> + <opcode name="NODE_NET_STREAM_END" value="15"/> + <opcode name="NODE_GC_START" value="16"/> + <opcode name="NODE_GC_DONE" value="17"/> + <opcode name="NODE_V8SYMBOL_REMOVE" value="21"/> + <opcode name="NODE_V8SYMBOL_MOVE" value="22"/> + <opcode name="NODE_V8SYMBOL_RESET" value="23"/> + </opcodes> + + <templates> + <template tid="node_connection"> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_http_client_request"> + <data name="url" inType="win:AnsiString" /> + <data name="method" inType="win:AnsiString" /> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_http_server_request"> + <data name="url" inType="win:AnsiString" /> + <data name="method" inType="win:AnsiString" /> + <data name="forwardedFor" inType="win:AnsiString" /> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_gc"> + <data name="gctype" inType="win:UInt32" /> + <data name="gccallbackflags" inType="win:UInt32" /> + </template> + + <template tid="V8AddressChange"> + <data name="addr1" inType="win:Pointer" outType="win:HexInt64"/> + <data name="addr2" inType="win:Pointer" outType="win:HexInt64"/> + </template> + + <template tid="MethodLoadUnload"> + <data name="ScriptContextID" inType="win:Pointer" outType="win:HexInt64"/> + <data name="MethodStartAddress" inType="win:Pointer" outType="win:HexInt64" /> + <data name="MethodSize" inType="win:UInt64" /> + <data name="MethodID" inType="win:UInt32" /> + <data name="MethodFlags" inType="win:UInt16" /> + <data name="MethodAddressRangeID" inType="win:UInt16" /> + <data name="SourceID" inType="win:UInt64" /> + <data name="Line" inType="win:UInt32" outType="xs:unsignedInt" /> + <data name="Column" inType="win:UInt32" outType="xs:unsignedInt" /> + <data name="MethodName" inType="win:UnicodeString" outType="xs:string" /> + </template> + </templates> + + <events> + <event value="1" + opcode="NODE_HTTP_SERVER_REQUEST" + template="node_http_server_request" + symbol="NODE_HTTP_SERVER_REQUEST_EVENT" + level="win:Informational"/> + <event value="2" + opcode="NODE_HTTP_SERVER_RESPONSE" + template="node_connection" + symbol="NODE_HTTP_SERVER_RESPONSE_EVENT" + level="win:Informational"/> + <event value="3" + opcode="NODE_HTTP_CLIENT_REQUEST" + template="node_http_client_request" + symbol="NODE_HTTP_CLIENT_REQUEST_EVENT" + level="win:Informational"/> + <event value="4" + opcode="NODE_HTTP_CLIENT_RESPONSE" + template="node_connection" + symbol="NODE_HTTP_CLIENT_RESPONSE_EVENT" + level="win:Informational"/> + <event value="5" + opcode="NODE_NET_SERVER_CONNECTION" + template="node_connection" + symbol="NODE_NET_SERVER_CONNECTION_EVENT" + level="win:Informational"/> + <event value="6" + opcode="NODE_NET_STREAM_END" + template="node_connection" + symbol="NODE_NET_STREAM_END_EVENT" + level="win:Informational"/> + <event value="7" + opcode="NODE_GC_START" + template="node_gc" + symbol="NODE_GC_START_EVENT" + level="win:Informational"/> + <event value="8" + opcode="NODE_GC_DONE" + template="node_gc" + symbol="NODE_GC_DONE_EVENT" + level="win:Informational"/> + <event value="9" + level="win:Informational" + opcode="MethodLoad" + symbol="MethodLoad" + task="MethodRuntime" + template="MethodLoadUnload"/> + <event value="21" + opcode="NODE_V8SYMBOL_REMOVE" + template="V8AddressChange" + symbol="NODE_V8SYMBOL_REMOVE_EVENT" + level="win:Informational" /> + <event value="22" + opcode="NODE_V8SYMBOL_MOVE" + template="V8AddressChange" + symbol="NODE_V8SYMBOL_MOVE_EVENT" + level="win:Informational" /> + <event value="23" + opcode="NODE_V8SYMBOL_RESET" + symbol="NODE_V8SYMBOL_RESET_EVENT" + level="win:Informational" /> + </events> + </provider> + </events> + </instrumentation> +</instrumentationManifest> diff --git a/bin/nodejs0.12.16/node_modules/npm/.mailmap b/bin/nodejs0.12.16/node_modules/npm/.mailmap new file mode 100644 index 00000000..ae0b4d28 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/.mailmap @@ -0,0 +1,53 @@ +Alex K. Wolfe <alexkwolfe@gmail.com> +Andrew Bradley <cspotcode@gmail.com> +Andrew Lunny <alunny@gmail.com> +Arlo Breault <arlolra@gmail.com> +Benjamin Coe <bencoe@gmail.com> +Benjamin Coe <bencoe@gmail.com> <ben@npmjs.com> +Brian White <mscdex@mscdex.net> <mscdex@gmail.com> +Cedric Nelson <cedric.nelson@gmail.com> +Charlie Robbins <charlie.robbins@gmail.com> +Dalmais Maxence <root@ip-10-195-202-5.ec2.internal> +Danila Gerasimov <danila.gerasimov@gmail.com> +David Beitey <david@davidjb.com> +Domenic Denicola <domenic@domenicdenicola.com> +Einar Otto Stangvik <einaros@gmail.com> +Erik Wienhold <git@ewie.name> +Evan Lucas <evan@btc.com> <evan.lucas@hattiesburgclinic.com> +Evan Lucas <evan@btc.com> <evanlucas@me.com> +Faiq Raza <faiqrazarizvi@gmail.com> +Forbes Lindesay <forbes@lindesay.co.uk> +Forrest L Norvell <ogd@aoaioxxysz.net> <forrest@npmjs.com> +Gabriel Barros <descartavel1@gmail.com> +Geoff Flarity <geoff.flarity@gmail.com> <gflarity@raptvm-x02.(none)> +Isaac Z. Schlueter <i@izs.me> <i@foohack.com> +Isaac Z. Schlueter <i@izs.me> isaacs <i@izs.me> +Jake Verbaten <raynos2@gmail.com> +James Sanders <jimmyjazz14@gmail.com> +Jason Smith <jhs@iriscouch.com> +Jonas Weber <github@jonasw.de> +Julien Meddah <julien.meddah@deveryware.com> +Kris Windham <kriswindham@gmail.com> +Lin Clark <lin.w.clark@gmail.com> +Luke Arduini <luke.arduini@gmail.com> <luke.arduini@me.com> +Maciej Małecki <me@mmalecki.com> <maciej.malecki@notimplemented.org> +Max Goodman <c@chromakode.com> +Maxim Bogushevich <boga1@mail.ru> +Maximilian Antoni <mail@maxantoni.de> <maximilian.antoni@juliusbaer.com> +Michael Hayes <michael@hayes.io> <mhayes@newrelic.com> +Nicolas Morel <marsup@gmail.com> +Olivier Melcher <olivier.melcher@gmail.com> +Ra'Shaun Stovall <rashaunstovall@gmail.com> +Rebecca Turner <me@re-becca.org> <turner@mikomi.org> +Rebecca Turner <me@re-becca.org> <rebecca@npmjs.com> +Ryan Emery <seebees@gmail.com> +Sam Mikes <smikes@cubane.com> +Takaya Kobayashi <jigsaw@live.jp> +Timo Weiß <timoweiss@Timo-MBP.local> +Tony <zearin@gonk.net> +Trent Mick <trentm@gmail.com> <trent.mick@joyent.com> +Visnu Pitiyanuvath <visnupx@gmail.com> +Will Elwood <w.elwood08@gmail.com> +Wout Mertens <Wout.Mertens@gmail.com> +Yeonghoon Park <sola92@gmail.com> +Zeke Sikelianos <zeke@sikelianos.com> diff --git a/bin/nodejs0.12.16/node_modules/npm/.npmignore b/bin/nodejs0.12.16/node_modules/npm/.npmignore new file mode 100644 index 00000000..4bff9d51 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/.npmignore @@ -0,0 +1,30 @@ +*.swp +.*.swp +npm-debug.log +/test/bin +/test/output.log +/test/packages/*/node_modules +/test/packages/npm-test-depends-on-spark/which-spark.log +/test/packages/test-package/random-data.txt +/test/root +/test/npm_cache +node_modules/marked +node_modules/ronn +node_modules/tap +node_modules/.bin +node_modules/npm-registry-mock +/npmrc +/release/ + +# don't need these in the npm package. +html/*.png + +# don't ignore .npmignore files +# these are used in some tests. +!.npmignore + +/npm-*.tgz + +*.pyc + +/test/tap/builtin-config diff --git a/bin/nodejs0.12.16/node_modules/npm/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/.travis.yml new file mode 100644 index 00000000..16ecb2f3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/.travis.yml @@ -0,0 +1,18 @@ +language: node_js +sudo: false +node_js: + - "5" + - "4" + - iojs + - "0.12" + - "0.10" + - "0.8" +env: + - DEPLOY_VERSION=testing +before_install: + - "npm config set spin false" + - "npm install -g npm/npm#2.x" + - "mkdir -p /var/run/couchdb" +script: "npm test" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/bin/nodejs0.12.16/node_modules/npm/AUTHORS b/bin/nodejs0.12.16/node_modules/npm/AUTHORS new file mode 100644 index 00000000..71e081cc --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/AUTHORS @@ -0,0 +1,357 @@ +# Authors sorted by whether or not they're me +Isaac Z. Schlueter <i@izs.me> +Steve Steiner <ssteinerX@gmail.com> +Mikeal Rogers <mikeal.rogers@gmail.com> +Aaron Blohowiak <aaron.blohowiak@gmail.com> +Martyn Smith <martyn@dollyfish.net.nz> +Charlie Robbins <charlie.robbins@gmail.com> +Francisco Treacy <francisco.treacy@gmail.com> +Cliffano Subagio <cliffano@gmail.com> +Christian Eager <christian.eager@nokia.com> +Dav Glass <davglass@gmail.com> +Alex K. Wolfe <alexkwolfe@gmail.com> +James Sanders <jimmyjazz14@gmail.com> +Reid Burke <me@reidburke.com> +Arlo Breault <arlolra@gmail.com> +Timo Derstappen <teemow@gmail.com> +Bart Teeuwisse <bart.teeuwisse@thecodemill.biz> +Ben Noordhuis <info@bnoordhuis.nl> +Tor Valamo <tor.valamo@gmail.com> +Whyme.Lyu <5longluna@gmail.com> +Olivier Melcher <olivier.melcher@gmail.com> +Tomaž Muraus <kami@k5-storitve.net> +Evan Meagher <evan.meagher@gmail.com> +Orlando Vazquez <ovazquez@gmail.com> +Kai Chen <kaichenxyz@gmail.com> +George Miroshnykov <gmiroshnykov@lohika.com> +Geoff Flarity <geoff.flarity@gmail.com> +Max Goodman <c@chromakode.com> +Pete Kruckenberg <pete@kruckenberg.com> +Laurie Harper <laurie@holoweb.net> +Chris Wong <chris@chriswongstudio.com> +Scott Bronson <brons_github@rinspin.com> +Federico Romero <federomero@gmail.com> +Visnu Pitiyanuvath <visnupx@gmail.com> +Irakli Gozalishvili <rfobic@gmail.com> +Mark Cahill <mark@tiemonster.info> +Tony <zearin@gonk.net> +Iain Sproat <iainsproat@gmail.com> +Trent Mick <trentm@gmail.com> +Felix Geisendörfer <felix@debuggable.com> +Jameson Little <t.jameson.little@gmail.com> +Conny Brunnkvist <conny@fuchsia.se> +Will Elwood <w.elwood08@gmail.com> +Dean Landolt <dean@deanlandolt.com> +Oleg Efimov <efimovov@gmail.com> +Martin Cooper <mfncooper@gmail.com> +Jann Horn <jannhorn@googlemail.com> +Andrew Bradley <cspotcode@gmail.com> +Maciej Małecki <me@mmalecki.com> +Stephen Sugden <glurgle@gmail.com> +Michael Budde <mbudde@gmail.com> +Jason Smith <jhs@iriscouch.com> +Gautham Pai <buzypi@gmail.com> +David Trejo <david.daniel.trejo@gmail.com> +Paul Vorbach <paul@vorb.de> +George Ornbo <george@shapeshed.com> +Tim Oxley <secoif@gmail.com> +Tyler Green <tyler.green2@gmail.com> +Dave Pacheco <dap@joyent.com> +Danila Gerasimov <danila.gerasimov@gmail.com> +Rod Vagg <rod@vagg.org> +Christian Howe <coderarity@gmail.com> +Andrew Lunny <alunny@gmail.com> +Henrik Hodne <dvyjones@binaryhex.com> +Adam Blackburn <regality@gmail.com> +Kris Windham <kriswindham@gmail.com> +Jens Grunert <jens.grunert@gmail.com> +Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl> +Dalmais Maxence <root@ip-10-195-202-5.ec2.internal> +Marcus Ekwall <marcus.ekwall@gmail.com> +Aaron Stacy <aaron.r.stacy@gmail.com> +Phillip Howell <phowell@cothm.org> +Domenic Denicola <domenic@domenicdenicola.com> +James Halliday <mail@substack.net> +Jeremy Cantrell <jmcantrell@gmail.com> +Ribettes <patlogan29@gmail.com> +Don Park <donpark@docuverse.com> +Einar Otto Stangvik <einaros@gmail.com> +Kei Son <heyacct@gmail.com> +Nicolas Morel <marsup@gmail.com> +Mark Dube <markisdee@gmail.com> +Nathan Rajlich <nathan@tootallnate.net> +Maxim Bogushevich <boga1@mail.ru> +Meaglin <Meaglin.wasabi@gmail.com> +Ben Evans <ben@bensbit.co.uk> +Nathan Zadoks <nathan@nathan7.eu> +Brian White <mscdex@mscdex.net> +Jed Schmidt <tr@nslator.jp> +Ian Livingstone <ianl@cs.dal.ca> +Patrick Pfeiffer <patrick@buzzle.at> +Paul Miller <paul@paulmillr.com> +Ryan Emery <seebees@gmail.com> +Carl Lange <carl@flax.ie> +Jan Lehnardt <jan@apache.org> +Stuart P. Bentley <stuart@testtrack4.com> +Johan Sköld <johan@skold.cc> +Stuart Knightley <stuart@stuartk.com> +Niggler <nirk.niggler@gmail.com> +Paolo Fragomeni <paolo@async.ly> +Jaakko Manninen <jaakko@rocketpack.fi> +Luke Arduini <luke.arduini@gmail.com> +Larz Conwell <larz@larz-laptop.(none)> +Marcel Klehr <mklehr@gmx.net> +Robert Kowalski <rok@kowalski.gd> +Forbes Lindesay <forbes@lindesay.co.uk> +Vaz Allen <vaz@tryptid.com> +Jake Verbaten <raynos2@gmail.com> +Schabse Laks <Dev@SLaks.net> +Florian Margaine <florian@margaine.com> +Johan Nordberg <its@johan-nordberg.com> +Ian Babrou <ibobrik@gmail.com> +Di Wu <dwu@palantir.com> +Mathias Bynens <mathias@qiwi.be> +Matt McClure <matt.mcclure@mapmyfitness.com> +Matt Lunn <matt@mattlunn.me.uk> +Alexey Kreschuk <akrsch@gmail.com> +elisee <elisee@sparklin.org> +Robert Gieseke <robert.gieseke@gmail.com> +François Frisch <francoisfrisch@gmail.com> +Trevor Burnham <tburnham@hubspot.com> +Alan Shaw <alan@freestyle-developments.co.uk> +TJ Holowaychuk <tj@vision-media.ca> +Nicholas Kinsey <pyro@feisty.io> +Paulo Cesar <pauloc062@gmail.com> +Elan Shanker <elan.shanker@gmail.com> +Jon Spencer <jon@jonspencer.ca> +Jason Diamond <jason@diamond.name> +Maximilian Antoni <mail@maxantoni.de> +Thom Blake <tblake@brightroll.com> +Jess Martin <jessmartin@gmail.com> +Spain Train <michael.spainhower@opower.com> +Alex Rodionov <p0deje@gmail.com> +Matt Colyer <matt@colyer.name> +Evan You <yyx990803@gmail.com> +bitspill <bitspill+github@bitspill.net> +Gabriel Falkenberg <gabriel.falkenberg@gmail.com> +Alexej Yaroshevich <alex@qfox.ru> +Quim Calpe <quim@kalpe.com> +Steve Mason <stevem@brandwatch.com> +Wil Moore III <wil.moore@wilmoore.com> +Sergey Belov <peimei@ya.ru> +Tom Huang <hzlhu.dargon@gmail.com> +CamilleM <camille.moulin@alterway.fr> +Sébastien Santoro <dereckson@espace-win.org> +Evan Lucas <evan@btc.com> +Quinn Slack <qslack@qslack.com> +Alex Kocharin <alex@kocharin.ru> +Daniel Santiago <daniel.santiago@highlevelwebs.com> +Denis Gladkikh <outcoldman@gmail.com> +Andrew Horton <andrew.j.horton@gmail.com> +Zeke Sikelianos <zeke@sikelianos.com> +Dylan Greene <dylang@gmail.com> +Franck Cuny <franck.cuny@gmail.com> +Yeonghoon Park <sola92@gmail.com> +Rafael de Oleza <rafa@spotify.com> +Mikola Lysenko <mikolalysenko@gmail.com> +Yazhong Liu <yorkiefixer@gmail.com> +Neil Gentleman <ngentleman@gmail.com> +Kris Kowal <kris.kowal@cixar.com> +Alex Gorbatchev <alex.gorbatchev@gmail.com> +Shawn Wildermuth <shawn@wildermuth.com> +Wesley de Souza <wesleywex@gmail.com> +yoyoyogi <yogesh.k@gmail.com> +J. Tangelder <j.tangelder@gmail.com> +Jean Lauliac <jean@lauliac.com> +Andrey Kislyuk <kislyuk@gmail.com> +Thorsten Lorenz <thlorenz@gmx.de> +Julian Gruber <julian@juliangruber.com> +Benjamin Coe <bencoe@gmail.com> +Alex Ford <Alex.Ford@CodeTunnel.com> +Matt Hickford <matt.hickford@gmail.com> +Sean McGivern <sean.mcgivern@rightscale.com> +C J Silverio <ceejceej@gmail.com> +Robin Tweedie <robin@songkick.com> +Miroslav Bajtoš <miroslav@strongloop.com> +David Glasser <glasser@davidglasser.net> +Gianluca Casati <casati_gianluca@yahoo.it> +Forrest L Norvell <ogd@aoaioxxysz.net> +Karsten Tinnefeld <k.tinnefeld@googlemail.com> +Bryan Burgers <bryan@burgers.io> +David Beitey <david@davidjb.com> +Evan You <yyou@google.com> +Zach Pomerantz <zmp@umich.edu> +Chris Williams <cwilliams88@gmail.com> +sudodoki <smd.deluzion@gmail.com> +Mick Thompson <dthompson@gmail.com> +Felix Rabe <felix@rabe.io> +Michael Hayes <michael@hayes.io> +Chris Dickinson <christopher.s.dickinson@gmail.com> +Bradley Meck <bradley.meck@gmail.com> +GeJ <geraud@gcu.info> +Andrew Terris <atterris@gmail.com> +Michael Nisi <michael.nisi@gmail.com> +fengmk2 <fengmk2@gmail.com> +Adam Meadows <adam.meadows@gmail.com> +Chulki Lee <chulki.lee@gmail.com> +不四 <busi.hyy@taobao.com> +dead_horse <dead_horse@qq.com> +Kenan Yildirim <kenan@kenany.me> +Laurie Voss <git@seldo.com> +Rebecca Turner <me@re-becca.org> +Hunter Loftis <hunter@hunterloftis.com> +Peter Richardson <github@zoomy.net> +Jussi Kalliokoski <jussi.kalliokoski@gmail.com> +Filip Weiss <me@fiws.net> +Timo Weiß <timoweiss@Timo-MBP.local> +Christopher Hiller <chiller@badwing.com> +Jérémy Lal <kapouer@melix.org> +Anders Janmyr <anders@janmyr.com> +Chris Meyers <chris.meyers.fsu@gmail.com> +Ludwig Magnusson <ludwig@mediatool.com> +Wout Mertens <Wout.Mertens@gmail.com> +Nick Santos <nick@medium.com> +Terin Stock <terinjokes@gmail.com> +Faiq Raza <faiqrazarizvi@gmail.com> +Thomas Torp <thomas@erupt.no> +Sam Mikes <smikes@cubane.com> +Mat Tyndall <mat.tyndall@gmail.com> +Tauren Mills <tauren@sportzing.com> +Ron Martinez <ramartin.net@gmail.com> +Kazuhito Hokamura <k.hokamura@gmail.com> +Tristan Davies <github@tristan.io> +David Volm <david@volminator.com> +Lin Clark <lin.w.clark@gmail.com> +Ben Page <bpage@dewalch.com> +Jeff Jo <jeffjo@squareup.com> +martinvd <martinvdpub@gmail.com> +Mark J. Titorenko <nospam-github.com@titorenko.net> +Oddur Sigurdsson <oddurs@gmail.com> +Eric Mill <eric@konklone.com> +Gabriel Barros <descartavel1@gmail.com> +KevinSheedy <kevinsheedy@gmail.com> +Aleksey Smolenchuk <aleksey@uber.com> +Ed Morley <emorley@mozilla.com> +Blaine Bublitz <blaine@iceddev.com> +Andrey Fedorov <anfedorov@gmail.com> +Daijiro Wachi <daijiro.wachi@gmail.com> +Luc Thevenard <lucthevenard@gmail.com> +Aria Stewart <aredridel@nbtsc.org> +Charlie Rudolph <charles.w.rudolph@gmail.com> +Vladimir Rutsky <rutsky@users.noreply.github.com> +Isaac Murchie <isaac@saucelabs.com> +Marcin Wosinek <marcin.wosinek@gmail.com> +David Marr <davemarr@gmail.com> +Bryan English <bryan@bryanenglish.com> +Anthony Zotti <amZotti@users.noreply.github.com> +Karl Horky <karl.horky@gmail.com> +Jordan Harband <ljharb@gmail.com> +Guðlaugur Stefán Egilsson <gulli@kolibri.is> +Helge Skogly Holm <helge.holm@gmail.com> +Peter A. Shevtsov <petr.shevtsov@gmail.com> +Alain Kalker <a.c.kalker@gmail.com> +Bryant Williams <b.n.williams@gmail.com> +Jonas Weber <github@jonasw.de> +Tim Whidden <twhid@twhid.com> +Andreas <functino@users.noreply.github.com> +Karolis Narkevicius <karolis.n@gmail.com> +Adrian Lynch <adi_ady_ade@hotmail.com> +Richard Littauer <richard.littauer@gmail.com> +Oli Evans <oli@zilla.org.uk> +Matt Brennan <mattyb1000@gmail.com> +Jeff Barczewski <jeff.barczewski@gmail.com> +Danny Fritz <dannyfritz@gmail.com> +Takaya Kobayashi <jigsaw@live.jp> +Ra'Shaun Stovall <rashaunstovall@gmail.com> +Julien Meddah <julien.meddah@deveryware.com> +Michiel Sikma <michiel@wedemandhtml.com> +Jakob Krigovsky <jakob.krigovsky@gmail.com> +Charmander <~@charmander.me> +Erik Wienhold <git@ewie.name> +James Butler <james.butler@sandfox.co.uk> +Kevin Kragenbrink <kevin@gaikai.com> +Arnaud Rinquin <rinquin.arnaud@gmail.com> +Mike MacCana <mike.maccana@gmail.com> +Antti Mattila <anttti@fastmail.fm> +laiso <laiso@lai.so> +Matt Zorn <zornme@gmail.com> +Kyle Mitchell <kyle@kemitchell.com> +Jeremiah Senkpiel <fishrock123@rocketmail.com> +Michael Klein <mischkl@users.noreply.github.com> +Simen Bekkhus <sbekkhus91@gmail.com> +Victor <victor.shih@gmail.com> +thefourtheye <thechargingvolcano@gmail.com> +Clay Carpenter <claycarpenter@gmail.com> +bangbang93 <bangbang93@163.com> +Nick Malaguti <nmalaguti@palantir.com> +Cedric Nelson <cedric.nelson@gmail.com> +Kat Marchán <kzm@sykosomatic.org> +Andrew <talktome@aboutandrew.co.uk> +Eduardo Pinho <enet4mikeenet@gmail.com> +Rachel Hutchison <rhutchix@intel.com> +Ryan Temple <ryantemple145@gmail.com> +Eugene Sharygin <eush77@gmail.com> +Nick Heiner <nick.heiner@opower.com> +James Talmage <james@talmage.io> +jane arc <jane@uber.com> +Joseph Dykstra <josephdykstra@gmail.com> +Joshua Egan <josh-egan@users.noreply.github.com> +Thomas Cort <thomasc@ssimicro.com> +Thaddee Tyl <thaddee.tyl@gmail.com> +Steve Klabnik <steve@steveklabnik.com> +Andrew Murray <radarhere@gmail.com> +Stephan Bönnemann <stephan@excellenteasy.com> +Kyle M. Tarplee <kyle.tarplee@numerica.us> +Derek Peterson <derekpetey@gmail.com> +Greg Whiteley <greg.whiteley@atomos.com> +murgatroid99 <mlumish@google.com> +Marcin Cieslak <saper@saper.info> +João Reis <reis@janeasystems.com> +Matthew Hasbach <hasbach.git@gmail.com> +Anna Henningsen <sqrt@entless.org> +Jon Hall <jon_hall@outlook.com> +James Hartig <james@levenlabs.com> +snopeks <stephaniesnopek@gmail.com> +Jason Kurian <JaKXz@users.noreply.github.com> +Juan Caicedo <retiredcanadianpoet@gmail.com> +Ashley Williams <ashley@bocoup.com> +Andrew Marcinkevičius <andrew.web@ifdattic.com> +Jorrit Schippers <jorrit@ncode.nl> +Alex Lukin <alex.lukin@softgrad.com> +Aria Stewart <aredridel@dinhe.net> +Tim <tim-github@baverstock.org.uk> +Nick Williams <WickyNilliams@users.noreply.github.com> +Louis Larry <louis.larry@gmail.com> +Jakub Gieryluk <jakub.g.opensource@gmail.com> +Martin von Gagern <Martin.vGagern@gmx.net> +Eymen Gunay <eymen@egunay.com> +ekmartin <mail@ekmartin.com> +Rafał Pocztarski <r.pocztarski@gmail.com> +Ashley Williams <ashley666ashley@gmail.com> +Mark Reeder <mreeder@uber.com> +Tiago Rodrigues <tmcrodrigues@gmail.com> +Chris Rebert <github@chrisrebert.com> +Jeff McMahan <jeffrey.lee.mcmahan@gmail.com> +Scott Addie <tobias.addie@gmail.com> +Julian Simioni <julian@simioni.org> +Jimb Esser <jimb@yahoo-inc.com> +Hal Henke <halhenke@gmail.com> +Alexis Campailla <alexis@janeasystems.com> +Beau Gunderson <beau@beaugunderson.com> +s100 <shughes1@uk.ibm.com> +Jonathan Persson <persson.jonathan@gmail.com> +Vedat Mahir YILMAZ <mahir@vedatmahir.com> +Jan Schär <jscissr@gmail.com> +Xcat Liu <xcatliu@gmail.com> +Neil Kistner <neil.kistner@gmail.com> +Hutson Betts <hbetts@factset.com> +Sergey Simonchik <sergey.simonchik@jetbrains.com> +Lewis Cowper <lewis.cowper@googlemail.com> +Arturo Coronel <aoitsu3@gmail.com> +Scott Plumlee <scott@plumlee.org> +gnerkus <ifeanyioraelosi@gmail.com> +Robert Ludwig <rob.ludwig@rideamigos.com> +Adam Byrne <misterbyrne@gmail.com> +GriffinSchneider <griffinschneider@gmail.com> +doug.wade <doug.wade@redfin.com> +rhgb <kaiserdaemon@gmail.com> diff --git a/bin/nodejs0.12.16/node_modules/npm/CHANGELOG.md b/bin/nodejs0.12.16/node_modules/npm/CHANGELOG.md new file mode 100644 index 00000000..5b5ad75e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/CHANGELOG.md @@ -0,0 +1,5260 @@ +### v2.15.1 (2016-03-17): + +It's another one of those releases again! Docs and tests, it turns out, have a +pretty easy time getting into LTS releases, and boring is exactly how LTS should +be. 💁 + +#### DOCS + +* [`981c89c`](https://github.com/npm/npm/commit/981c89c8e398ca22ab6bf466123b25728ef6f543) + [#11820](https://github.com/npm/npm/pull/11820) + The basic explanation for how `npm link` works was a bit confusing, and + somewhat incorrect. It should be clearer now. + ([@rhgb](https://github.com/rhgb)) +* [`35b2b45`](https://github.com/npm/npm/commit/35b2b45f181dcbfb297f53b577dc1f26efcf3aba) + [#11787](https://github.com/npm/npm/pull/11787) + The `verison` alias for `npm version` no longer shows up in the command list + when you do `npm -h`. + ([@doug-wade](https://github.com/doug-wade)) +* [`1c9d00f`](https://github.com/npm/npm/commit/1c9d00f788298a81a8a7293d7dcf430f01bdd7fd) + [#11786](https://github.com/npm/npm/pull/11786) + Add a comment to the `npm-scope.md` docs about `npm@>=2` being required in + order to use scoped packaged. + ([@doug-wade](https://github.com/doug-wade)) +* [`7d64fb1`](https://github.com/npm/npm/commit/7d64fb1452d360aa736f31c85d6776ce570b2365) + [#11762](https://github.com/npm/npm/pull/11762) + Roll back patch that previously advised people to use `--depth Infinity` + instead of `--depth 9999`. Just keep using `--depth 9999`. + ([@GriffinSchneider](https://github.com/GriffinSchneider)) + +#### TESTS + +* [`98a9ee4`](https://github.com/npm/npm/commit/98a9ee4773f83994b8eb63c0ff75a9283408ba1a) + [#11912](https://github.com/npm/npm/pull/11912) + Did you know npm can install itself? `npm install -g npm` is the way to + upgrade! Turns out that one of the tests that verified this functionality got + rewritten as part of our recent push for better tests, and in the process + omitted a detail about *how* the test ran. We're testing that corner case + again, now, by moving the install folder to `/tmp`, where the original legacy + test ran. + ([@iarna](https://github.com/iarna)) + +### v2.15.0 (2016-03-10): + +#### WHY IS THIS SEMVER-MINOR I THOUGHT THIS WAS LTS + +A brief note about LTS this week! + +npm, as you may know if you're using this `2.x` branch, has an LTS process for +releases. We also try and play nice with [Node.js' own LTS release +process](https://github.com/nodejs/LTS#lts-plan). That means we generally try to +avoid things like minor version bumps on our `2.x` branch (which is also tagged +`lts` in the `dist-tag`s). + +That said, we had a minor-bump update recently for `npm@3.8.0` which added a +`maxsockets` option to allow users to configure the number of concurrent sockets +that npm would keep open at a time -- a setting that has the potential to help a +bunch for people with fussy routers or internet connections that aren't very +happy with Node.js applications' usual concurrency storm. This change was done +to `npm-registry-client`, which we don't have a parallel LTS-tracking branch +for. + +After talking it over, we ended up deciding that this was a reasonable enough +addition to LTS, even though it's *technically* a `semver-minor` bump, taking +into account both its potential for bugfixing (specially on `2.x`!) and the +general hassle it would be to maintain another branch for `npm-registry-client`. + + +* [`6dd61e7`](https://github.com/npm/npm/commit/6dd61e781c145480dc255a3e6a748729868443fd) + Expose `maxsockets` config setting from new `npm-registry-client`. + ([@misterbyrne](https://github.com/misterbyrne)) +* [`8a021c3`](https://github.com/npm/npm/commit/8a021c35184e665bd1f3f70ae2f478af812ab614) + `npm-registry-client@7.1.0`: + Adds support for configuring the max number of concurrent sockets, defaulting + to `50`. + ([@iarna](https://github.com/iarna)) + +#### DOC PATCH IS HERE TOO + +* [`0ae9f74`](https://github.com/npm/npm/commit/0ae9f740001a1bdf5920bc464cf9e284d5d139f0) + [#11748](https://github.com/npm/npm/pull/11748) + Add command aliases as a separate section in documentation for npm + subcommands. + ([@watilde](https://github.com/watilde)) + +#### DEP UPDATES + +* [`bfc3888`](https://github.com/npm/npm/commit/bfc38887f832f701c16b7ee410c4e0220a90399f) + `strip-ansi@3.0.1` + ([@jbnicolai](https://github.com/jbnicolai)) +* [`d5f4d51`](https://github.com/npm/npm/commit/d5f4d51a1b7ea78d7431c7ed4fed30200b2622f8) + `node-gyp@3.3.1`: Fixes Android generator + ([@bnoordhuis](https://github.com/bnoordhuis)) +* [`4119df8`](https://github.com/npm/npm/commit/4119df8aecd2ae57b0492ad8c9a480d900833008) + `glob@7.0.3`: Some path-related fixes for Windows. + ([@isaacs](https://github.com/isaacs)) + +### v2.14.22 (2016-03-03): + +This week is all documentation improvements. In case you hadn't noticed, we +*love* doc patches. We love them so much, we give socks away if you submit +documentation PRs! + +These folks are all getting socks if they ask for them. The socks are +super-sweet. Do you have yours yet? 👣 + +* [`3f3c7d0`](https://github.com/npm/npm/commit/3f3c7d080f052a5db91ff6091f8b1b13f26b53d6) + [#11441](https://github.com/npm/npm/pull/11441) + Add a link to the [Contribution + Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines) to the + main npm docs. + ([@watilde](https://github.com/watilde)) +* [`9f87bb1`](https://github.com/npm/npm/commit/9f87bb1934acb33b678c17b7827165b17c071a82) + [#11441](https://github.com/npm/npm/pull/11441) + Remove Google Group email from npm docs about contributing. + ([@watilde](https://github.com/watilde)) +* [`93eaab3`](https://github.com/npm/npm/commit/93eaab3ee5ad16c7d90d1a4b38a95403fcf3f0f6) + [#11474](https://github.com/npm/npm/pull/11474) + Fix an invalid JSON error overlooked in + [#11196](https://github.com/npm/npm/pull/11196). + ([@robludwig](https://github.com/robludwig)) +* [`a407ca2`](https://github.com/npm/npm/commit/a407ca2bcf6a05117e55cf2ab69376e09094995e) + [#11483](https://github.com/npm/npm/pull/11483) + Add more details and an example to the documentation for bundledDependencies. + ([@gnerkus](https://github.com/gnerkus)) +* [`2c851a2`](https://github.com/npm/npm/commit/2c851a231afd874baa77c42ea5ba539c454ac79c) + [#11490](https://github.com/npm/npm/pull/11490) + Document the `--registry` flag for `npm search`. + ([@plumlee](https://github.com/plumlee)) + +### v2.14.21 (2016-02-25): + +Good news, everyone! There's a new LTS release with a few shinies here and there! + +#### USE THIS ONE INSTEAD + +We had some cases where the versions of npm and node used in some scripting situations were different than the ideal, or what folks actually expected. These should be particularly helpful to our Windows friends! <3 + +* [`02813c5`](https://github.com/npm/npm/commit/02813c55782a9def23f7f1e614edc38c6c88aed3) [#9253](https://github.com/npm/npm/issues/9253) Fix a bug where, when running lifecycle scripts, if the Node.js binary you ran `npm` with wasn't in your `PATH`, `npm` wouldn't use it to run your scripts. ([@segrey](https://github.com/segrey) and [@narqo](https://github.com/narqo)) +* [`a985dd5`](https://github.com/npm/npm/commit/a985dd50e06ee51ba5544577f977c7440c227ba2) [#11526](https://github.com/npm/npm/pull/11526) Prefer locally installed npm in Git Bash -- previous behavior was to use the global one. This was done previously for other shells, but not for Git Bash. ([@destroyerofbuilds](https://github.com/destroyerofbuilds)) + +#### SOCKS FOR THE SOCK GOD + +* [`f961092`](https://github.com/npm/npm/commit/f9610920079d8b88ae464b30007a92c594bd85a8) + [#11636.](https://github.com/npm/npm/issues/11636.) + Document the `--save-bundle` option for `npm install`. + ([@datyayu](https://github.com/datyayu)) +* [`7c908b6`](https://github.com/npm/npm/commit/7c908b618f7123f0a3b860c71eb779e33df35964) + [#11644](https://github.com/npm/npm/pull/11644) + Add documentation for the `test` directory for packages. + ([@lewiscowper](https://github.com/lewiscowper)) + +#### INTERNAL TEST IMPROVEMENTS + +The npm CLI team's time recently has been sunk into npm's many years of tech debt. Specifically, we've been working on improving the test suite. This isn't user visible, but in future should mean a more stable, easier to contribute to npm. Ordinarily we don't report these kinds of changes in the change log, but I thought I might share this week as this chunk is bigger than usual. + +These patches were previously released for `npm@3`, and then ported back to `npm@2` LTS. + +* [`437c537`](https://github.com/npm/npm/commit/437c537e2be5923c6d2c2753154564ba13db8fd9) [#11613](https://github.com/npm/npm/pull/11613) Fix up one of the tests after rebasing the legacy test rewrite to `npm@2`. ([@zkat](https://github.com/zkat)) +* [`55abd0c`](https://github.com/npm/npm/commit/55abd0cc20e87a144d33ce2d459f65e7506da576) [#11613](https://github.com/npm/npm/pull/11613) Test that the `package.json` `files` section and `.npmignore` do what they're supposed to. ([@zkat](https://github.com/zkat)) +* [`a2b99b6`](https://github.com/npm/npm/commit/a2b99b6273ada14b2121ebc0acb7933e630edd9d) [#11613](https://github.com/npm/npm/pull/11613) Test that npm's distribution binary is complete and can be installed and used. ([@iarna](https://github.com/iarna)) +* [`8a8c36c`](https://github.com/npm/npm/commit/8a8c36ce51166006022e5c5d4f8655bbc458d651) [#11613](https://github.com/npm/npm/pull/11613) Test that environment variables are properly passed into scripts. + ([@iarna](https://github.com/zkat)) +* [`a95b550`](https://github.com/npm/npm/commit/a95b5507616bd51e83d7eab5f2337b1aff6480b1) [#11613](https://github.com/npm/npm/pull/11613) Test that we don't leak auth info into the environment. ([@iarna](https://github.com/iarna)) +* [`a1c1c52`](https://github.com/npm/npm/commit/a1c1c52efeab24f6dba154d054f85d9efc833486) [#11613](https://github.com/npm/npm/pull/11613) Remove all the relatively cryptic legacy tests and creates new tap tests that check the same functionality. The *legacy* tests were tests that were originally a shell script that was ported to javascript early in `npm`'s history. ([@iarna](https:\\github.com/iarna) and [@zkat](https://github.com/zkat)) +* [`9d89581`](https://github.com/npm/npm/commit/9d895811d3ee70c2e672f3d8fa06574495b5b488) [#11613](https://github.com/npm/npm/pull/11613) `tacks@1.0.9`: Add a package that provides a tool to generate fixtures from folders and, relatedly, a module that an create and tear down filesystem fixtures easily. ([@iarna](https://github.com/iarna)) + +### v2.14.20 (2016-02-18): + +Hope y'all are having a nice week! As usual, it's a fairly limited release. The +most notable thing is some dependency updates that might help the Node.js CI +setup for Windows run a little better, even if we have some work to do on that +path length things, still. + +#### WHITTLING AWAY AT PATH LENGTHS + +So for all of you who don't know -- Node.js does, in fact, support long Windows +paths. Unfortunately, depending on the tool and the Windows version, a lot of +external tooling does not. This means, for example, that some (all?) versions of +Windows Explorer *can literally never delete npm from their system entirely +because of deeply-nested npm dependencies*. Which is pretty gnarly. + +Incidentally, if you run into that in particularly, you can use +[rimraf](npm.im/rimraf) to remove such files 💁. + +The latest victim of this issue was the Node.js CI setup for testing on Windows, +which uses some tooling or another that croaks on the usual path length limit +for that OS: 255 characters. + +This issue, of course, is largely not a problem as of `npm@3`, with its flat +trees, but it still occasionally and viciously bites LTS. + +We've taken another baby step towards alleviating this in this release by +updating a couple of dependencies that were preventing `npmlog` from deduping, +and then doing a dedupe on that and `gauge`. Hopefully it helps. + +* [`4199551`](https://github.com/npm/npm/commit/41995517e617674710748ab6d262670c96124393) + [#11528](https://github.com/npm/npm/pull/11528) + `npm-install-checks@1.0.7`: Just updates the version of npmlog so we can + dedupe it better. + ([@zkat](https://github.com/zkat)) +* [`14d72c7`](https://github.com/npm/npm/commit/14d72c756b89e2d167eb52c1849263dbddcb9f35) + [#11552](https://github.com/npm/npm/pull/11552) + [#11528](https://github.com/npm/npm/pull/11528) + `node-gyp@3.3.0`: AIX support, new `gyp`, update `npmlog` (for the dedupe), + adds `--cafile` command line option, and allows configuration of Node.js and + io.js mirrors. + ([@rvagg](https://github.com/rvagg)) +* [`0453cb9`](https://github.com/npm/npm/commit/0453cb94b33520eb723b7072cd2654b1d0142533) + [#11528](https://github.com/npm/npm/pull/11528) + Do a `dedupe` on `gauge` to flatten our dependencies a bit more. + ([@zkat](https://github.com/zkat)) + +#### OTHER DEP STUFF + +* [`686c0b3`](https://github.com/npm/npm/commit/686c0b37ec3a7b65f9b3849e1099805e5221c408) + `rimraf@2.5.2`: Just updates to glob@7. + ([@isaacs](https://github.com/isaacs)) + +#### @wyze, DOCUMENTATION HERO OF THE PEOPLE, GETS THEIR OWN HEADER + +* [`7232948`](https://github.com/npm/npm/commit/72329484c775376cb40d5b348f453eaaf2f0b821) + [#11416](https://github.com/npm/npm/pull/11416) + Logout docs were using a section copy-pasted from the adduser docs. + ([@wyze](https://github.com/wyze)) +* [`922b33a`](https://github.com/npm/npm/commit/922b33aba4362e1e90f42e9348f061a1cc73eafb) + [#11414](https://github.com/npm/npm/pull/11414) + Add colon for consistency. + ([@wyze](https://github.com/wyze)) + +### v2.14.19 (2016-02-11): + +Really tiny micro-release this week! The main thing to note is a dependency +update that means we no longer have `graceful-fs@3` in our dependency tree. This +has some implications for being able to run on future Node.js releases, so +better to get this out the door. 😁 + +#### DEPS + +* [`a556e0f`](https://github.com/npm/npm/commit/a556e0f9dcb5d7b44224ba9c16c9d0dc6c8d2532) + `cmd-shim@2.0.2`: Final straggler using `graceful-fs@<4`. + ([@ForbesLindesay](https://github.com/ForbesLindesay)) + +#### DOCS + +* [`69a2d59`](https://github.com/npm/npm/commit/69a2d599bf0cba674ee268483e9bd5c14333b89f) + [#11391](https://github.com/npm/npm/pull/11391) + Fixed versions of `shrinkwrap.json` in examples in documentation for `npm + shrinkwrap`, which did not quite match up. + ([@xcatliu](https://github.com/xcatliu)) + +### v2.14.18 (2016-02-04): + +Clearly our docs are perfect after all those wonderful PRs, 'cause this week's +gonna be all about dependency updates. Note: There is a small security-related +fix included here! + +#### SECURITY-RELATED DEPENDENCY UPDATE + +* [`5c095ef`](https://github.com/npm/npm/commit/5c095eff8dc006980d4d083f2007e4dacff23be3) + [#11341](https://github.com/npm/npm/pull/11341) + `request@2.69.0`: Includes security-related dependency updates involving + `hawk` and `is-my-json-valid` + ([@remy](https://github.com/remy) and [@simov](https://github.com/simov)) + +#### OTHER DEPENDENCY UPDATES + +* [`f9c2668`](https://github.com/npm/npm/commit/f9c2668ca3e6e2602d91250ce61280e5e12d0a00) + `which@1.2.4` + ([@isaacs](https://github.com/isaacs)) +* [`2907c43`](https://github.com/npm/npm/commit/2907c43ad4ef87e5f730c2576f680d6837fcbad0) + `spdx-license-ids@1.2.0` + ([@shinnn](https://github.com/shinnn)) +* [`7734069`](https://github.com/npm/npm/commit/773406960bf7f4a87b2ecb6ebf593c62d0e9f95d) + `rimraf@2.5.1` + ([@isaacs](https://github.com/isaacs)) +* [`f4b39a7`](https://github.com/npm/npm/commit/f4b39a7dd5e1335d92aa22c46d99abb33f271b8b) + `retry@0.9.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`ded1e7a`](https://github.com/npm/npm/commit/ded1e7a1c9c7bec29bb7c30a8f85546670e75b56) + Nest `retry@0.8.0` inside `npm-registry-client` to prevent invalid + dependency issue until the latter gets a dependency update. + ([@zkat](https://github.com/zkat)) +* [`ab9f867`](https://github.com/npm/npm/commit/ab9f8679f9687f91ad03adaab6211a897aeebbae) + `read-package-json@2.0.3` + ([@iarna](https://github.com/iarna)) +* [`b638c41`](https://github.com/npm/npm/commit/b638c41607bb936b9eaaceba2aeeda1d34e3a9b2) + `npmlog@2.0.2` + ([@iarna](https://github.com/iarna)) +* [`49f34af`](https://github.com/npm/npm/commit/49f34af463a674359269025d8438feb6a7c69960) + `init-package-json@1.9.3` + ([@iarna](https://github.com/iarna)) +* [`2305dab`](https://github.com/npm/npm/commit/2305dab4e7bff09bb7686cec653cf1e663dbf15d) + `graceful-fs@4.1.3`: Fixed `.close()` not being patched. + ([@isaacs](https://github.com/isaacs)) +* [`18496d9`](https://github.com/npm/npm/commit/18496d9a0fff94e3652655998e8333056aa52b15) + `fs-write-stream-atomic@1.0.8` + ([@iarna](https://github.com/iarna)) +* [`6637bc7`](https://github.com/npm/npm/commit/6637bc7a0e194d82554cd7c91e1794018fef5943) + `config-chain@1.1.10` + ([@dominictarr](https://github.com/dominictarr)) +* [`4222bad`](https://github.com/npm/npm/commit/4222badffed9e9edacea6a8a96a99a164d376158) + `columnify@1.5.4` + ([@timoxley](https://github.com/timoxley)) +* [`df9016f`](https://github.com/npm/npm/commit/df9016f327a2a9ce492ebc75b882b03069438e13) + `ansi@0.3.1`: Added a license file. + ([@TooTallNate](https://github.com/TooTallNate)) + +### v2.14.17 (2016-01-28): + +Another week, another small LTS release! + +#### BETTER ERROR REPORTING YAY + +So as it turns out, when stuff goes wrong, it's actually nice to give people a +better clue rather than just say "oh well 😏". + +* [`5b8ccb9`](https://github.com/npm/npm/commit/5b8ccb91cf11b4edb463609cd4ed1dee84ed4db0) + [#11289](https://github.com/npm/npm/pull/11289) + 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 previous just + make npm error out– this reduces that to a warning. + ([@evanlucas](https://github.com/evanlucas)) +* [`556e42a`](https://github.com/npm/npm/commit/556e42ac6bab078722ddc1dc6cce4428d001133b) + [#11300](https://github.com/npm/npm/pull/11300) + Report symlinked packages as 'linked' in the output for `npm outdated`. + ([@halhenke](https://github.com/halhenke)) +* [`3842317`](https://github.com/npm/npm/commit/3842317583e0ea2eca78e39aa03f5bc06ba21de7) + [#11290](https://github.com/npm/npm/pull/11290) + Suppress warnings about pre-release node versions. This should get node's CI + passing on non-Windows platforms without needing to modify the node version to + get rid of the pre-release suffix. + ([@iarna](https://github.com/iarna)) + +#### EVERYONE WANTS THOSE NPM SOCKS, GEEZE + +Did you know that you can get npm socks for contributing to our docs? I bet +these people do, and now so do you! + +* [`dcde451`](https://github.com/npm/npm/commit/dcde451cb85a6ca08acc6ef45782c652f1d8fc89) + [#11232](https://github.com/npm/npm/pull/11232) + Update automatically included/excluded packages in `package.json`. + ([@jscissr](https://github.com/jscissr)) +* [`e3f8d5b`](https://github.com/npm/npm/commit/e3f8d5be5ac5ec1d72db42f7abf50cc4a8c5935c) + [#11273](https://github.com/npm/npm/pull/11273) + Add an example for `npm view <pkg> versions`. + ([@vedatmahir](https://github.com/vedatmahir)) +* [`6a06ef2`](https://github.com/npm/npm/commit/6a06ef2252748089f0013de951f2d06160b90306) + [#11272](https://github.com/npm/npm/pull/11272) + Fix a typo in `npm-update.md`. + ([@jonathanp](https://github.com/jonathanp)) +* [`2515ff1`](https://github.com/npm/npm/commit/2515ff1de28f0b261fb25c79a66bd762a65961c4) + [#11215](https://github.com/npm/npm/pull/11215) + Correct small thinko in docs for SPDX expressions. + ([@kemitchell](https://github.com/kemitchell)) +* [`70f897b`](https://github.com/npm/npm/commit/70f897b03da9a5d5d4fd34614e9ee40e6f9e9653) + [#11196](https://github.com/npm/npm/pull/11196) + Make JSON snippets valid JSON in `npm update` docs. + ([@s100](https://github.com/s100)) + +### v2.14.16 (2016-01-21): + +Good to see you all again! It's been a while since we had an LTS release, and +the team continues to work hard to both get the issue tracker under control, and +get our test suite to be awesome and reliable. + +This is also the first LTS release of this year. + +We're gonna have an interesting time -- most of our focus this year will be +around stability and maintainability of the CLI, so you might actually end up +seeing a number of updates even over here, just for the sake of making sure +we're stable, that bugs get fixed, and tests have proper coverage. + +What better way to start this effort, then, than getting Travis tests green, fix +a few things here and there, and tweak a bunch of documentation? 😁 + +#### FIX ALL THE BUGS AND TWEAK ALL THE THINGS + +* [`24b13fb`](https://github.com/npm/npm/commit/24b13fbc57d34db1d5b0a37bcca122c00deba978) + [#11158](https://github.com/npm/npm/pull/11158) + Fix custom node-gyp env var quoting on Windows. + ([@orangemocha](https://github.com/orangemocha)) +* [`e2503f2`](https://github.com/npm/npm/commit/e2503f2be40157b05a9c500ec3b5d16090ffee50) + [#11142](https://github.com/npm/npm/pull/11142) + Fix race condition with `correctMkdir` in the cache directory. + ([@Jimbly](https://github.com/Jimbly)) + +* [`5c0e4c4`](https://github.com/npm/npm/commit/5c0e4c45a29d774ab729e86044377d4e5e424252) + [#10940](https://github.com/npm/npm/pull/10940) + Ignore failures replacing `package.json`. writeFileAtomic is not atomic in + Windows, it fails if the file is being accessed concurrently. + ([@orangemocha](https://github.com/orangemocha)) +* [`2c44d8d`](https://github.com/npm/npm/commit/2c44d8dc8c267d5e054d0175ce2f4750f0986463) + [#10903](https://github.com/npm/npm/pull/10903) + Add tests for `npm adduser --scope`. + ([@ekmartin](https://github.com/ekmartin)) +* [`4cb25d0`](https://github.com/npm/npm/commit/4cb25d0fed5c7792dfd1aec891380ecc1f8a5761) + [#10903](https://github.com/npm/npm/pull/10903) + Add a message informing users when they have been successfully logged in. + ([@ekmartin](https://github.com/ekmartin)) +* [`fe3ec6d`](https://github.com/npm/npm/commit/fe3ec6d6658262054c0c19c55373c21e84ab9f17) + [#10628](https://github.com/npm/npm/pull/10628) + Tell users how to open an issue with a package that has errored. + ([@trodrigues](https://github.com/trodrigues)) + +#### DOCS DOCS DOCS + +We got a TON of lovely documentation patches, too! Thanks all for submitting! + +* [`22482a1`](https://github.com/npm/npm/commit/22482a1f22079d72c3f8ca55c2f0c153bdd024c0) + [#11188](https://github.com/npm/npm/pull/11188) + Briefly explain what's included when you publish. + ([@beaugunderson](https://github.com/beaugunderson)) +* [`fa47724`](https://github.com/npm/npm/commit/fa4772438df0c66a19309dd1c1a3ce43cbee5461) + [#11150](https://github.com/npm/npm/pull/11150) + Advise use of `--depth Infinity` instead of `--depth 9999` in `npm update`. + ([@halhenke](https://github.com/halhenke)) +* [`248ddfe`](https://github.com/npm/npm/commit/248ddfe8f7ddd3318e14bf61de41cab4a638c8a3) + [#11130](https://github.com/npm/npm/pull/11130) + Nuke "using npm programmatically" section from README. The programmatic npm + API is unsupported, and is not guaranteed not to break in non-major versions. + Removing this section so newcomers aren't encouraged to discover or use it. + ([@ljharb](https://github.com/ljharb)) +* [`ae9c452`](https://github.com/npm/npm/commit/ae9c4521222d60ab4a69c19fee5e361c62f41fae) + [#11128](https://github.com/npm/npm/pull/11128) + Add link to local paths section indocs for `package.json`. + ([@orangejulius](https://github.com/orangejulius)) +* [`663a8c6`](https://github.com/npm/npm/commit/663a8c6b4b1647f9b86c15ef32e30023edc8c060) + [#11044](https://github.com/npm/npm/pull/11044) + Update default value documentation for the color option in npm's config. + ([@scottaddie](https://github.com/scottaddie)) +* [`5c1dda0`](https://github.com/npm/npm/commit/5c1dda0d3a18b2954872dba33fbc696ff0700ffe) + [#11037](https://github.com/npm/npm/pull/11037) + Correct the name property max length constraint verbiage. + ([@scottaddie](https://github.com/scottaddie)) +* [`8288365`](https://github.com/npm/npm/commit/8288365d08e97fa3a5b0d31703c015a8be49e07f) + [#10990](https://github.com/npm/npm/pull/10990) + Update folder docs to reflect that process.installPrefix was removed as of + 0.8.x. + ([@jeffmcmahan](https://github.com/jeffmcmahan)) +* [`61d63fa`](https://github.com/npm/npm/commit/61d63fa22c4f09742180c2de460a4ffb6c32738e) + [#10790](https://github.com/npm/npm/pull/10790) + Clarify that `npm install foo` is the same as `npm install foo@latest` now. + ([@cvrebert](https://github.com/cvrebert)) +* [`442c920`](https://github.com/npm/npm/commit/442c9207f375354c91d36df8711ba2d33e1c97f3) + [#10789](https://github.com/npm/npm/pull/10789) + Link over to `npm-dist-tag(1)` in `npm install` docs when they talk about the + `pkg@<tag>` syntax. + ([@cvrebert](https://github.com/cvrebert)) +* [`dca7a5e`](https://github.com/npm/npm/commit/dca7a5e2be3bfa306a870a123707d35c732406c0) + [#10788](https://github.com/npm/npm/pull/10788) + Link to tag docs in docs for `npm publish --tag`. + ([@cvrebert](https://github.com/cvrebert)) +* [`a72904e`](https://github.com/npm/npm/commit/a72904e8d4ab1d43ae8150fbe3f6468b0cbb1efd) + [#10787](https://github.com/npm/npm/pull/10787) + Explain why the `latest` tag matters. + ([@cvrebert](https://github.com/cvrebert)) +* [`9d0697a`](https://github.com/npm/npm/commit/9d0697a534046df7efda32170014041bbc1f4e7d) + [#10785](https://github.com/npm/npm/pull/10785) + Replace some quite marks in `npm dist-tag` docs for the sake of consistency. + ([@cvrebert](https://github.com/cvrebert)) + +#### I REALLY LIKE GREEN. CAN YOU TELL? + +So Travis is all green now on `npm@2`, thanks to the removal of nock and a few +other test suite tweaks. This is a fantastic step towards making sure we can all +have confidence in our test suite! 🎉 + +* [`64995be`](https://github.com/npm/npm/commit/64995be6d874356b15c136f9867302d805dfe1e9) [`75ab216`](https://github.com/npm/npm/commit/75ab2164cf79e28ac7f7ebe714f3c5aee99c6626) [`a9f6fe9`](https://github.com/npm/npm/commit/a9f6fe9dc558f17c4a7b9eb83329ac080f7df4b7) [`649c193`](https://github.com/npm/npm/commit/649c193adadf714c2819837f9372a29d724a5ec0) [`94cb05e`](https://github.com/npm/npm/commit/94cb05eaa9e5ad6675cf15c4ac0a44fbdde05900) [`6541690`](https://github.com/npm/npm/commit/65416907008061ac5a5f66b1630a57776803b526) [`255be6f`](https://github.com/npm/npm/commit/255be6f5bca9e3d216f3a5cbdf6714c6c9fcf132) [`9e84fa4`](https://github.com/npm/npm/commit/9e84fa43c49d04cf86ca1678e2a61412f5559cb9) [`8a587b0`](https://github.com/npm/npm/commit/8a587b0c1696ae7302891fa6355fc3e8670e00d3) [`bf812a5`](https://github.com/npm/npm/commit/bf812a54e497a573493346399798aa0b9373ac24) + [#10903](https://github.com/npm/npm/pull/10903) + Get rid of nock from tests, and get Travis green. + ([@zkat](https://github.com/zkat) and [@iarna](https://github.com/iarna)) +* [`70a5310`](https://github.com/npm/npm/commit/70a5310712c6666e753ca8f3bfff4a780ec6292d) + `npm-registry-couchapp@2.6.12`: + Better 0.8 compatibility, and ability to run in travis docker stuff. This + means the test suite should run a lot faster, too! + ([@iarna](https://github.com/iarna)) +* [`28fae39`](https://github.com/npm/npm/commit/28fae399212eda5554e6c0ffd8c9591144ab7b9d) + Get rid of sudo, for Travis! + ([@zkat](https://github.com/zkat)) + +### v2.14.15 (2015-12-10): + +Did you know that Bob Ross reached the rank of master sergeant in the US Air +Force before becoming perhaps the most soothing painter of all time? + +#### TWO HAPPY LITTLE BUG FIXES + +* [`f482664`](https://github.com/npm/npm/commit/f4826645dc6b5c0f05c5f9187efb28c1a293554f) + [#10505](https://github.com/npm/npm/issues/10505) `npm ls --json --depth=0` + now respects the depth parameter, when it is zero and when it is not zero. + ([@MarkReeder](https://github.com/MarkReeder)) +* [`529fa1f`](https://github.com/npm/npm/commit/529fa1ff2c6432a773af99a1c5209c0865f7a19c) + [#9099](https://github.com/npm/npm/issues/9099) I had always thought you + could run `npm version` from subdirectories in your project, which is great, + because now you can. I guess I was just ahead of my time. + ([@ekmartin](https://github.com/ekmartin)) + +#### NOW PAINT IN SOME NICE DOCS CHANGES + +* [`1fc7f2b`](https://github.com/npm/npm/commit/1fc7f2b523ea760e08adb9b861b28e3ba450e565) + [#10546](https://github.com/npm/npm/issues/10546) Goodbye, FAQ! You were + cheeky and fun until you weren't! Don't worry: npm still loves everyone, + especially you! ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`7fe6950`](https://github.com/npm/npm/commit/7fe6950b44d241bb4d90857a44d89d750af1e2b3) + [#10570](https://github.com/npm/npm/issues/10570) Update documentation URLs + to be HTTPS everywhere sensible. No HTTP shall be spared! + ([@rsp](https://github.com/rsp)) +* [`96ebb90`](https://github.com/npm/npm/commit/96ebb902439e4f6f37f8beffb589769146fecf24) + [#10650](https://github.com/npm/npm/issues/10650) Correctly note that there + are two lifecycle scripts run by an install phase in an example, instead of + three. ([@eymengunay](https://github.com/eymengunay)) +* [`5196893`](https://github.com/npm/npm/commit/5196893a7496f68a514b83641ff6b72f14d664dd) + [#10687](https://github.com/npm/npm/issues/10687) `npm outdated`'s output can + be a little puzzling sometimes. I've attempted to make it clearer, with some + examples, of what's going on with "wanted" and "latest" in more cases. + ([@othiym23](https://github.com/othiym23)) +* [`8e6712d`](https://github.com/npm/npm/commit/8e6712d4ee128858cab36c77723e35bddbb977ba) + [#10700](https://github.com/npm/npm/issues/10700) Hey, do you remember when + `search.npmjs.org` was a thing? I think I do? The last time I used it was in + like 2012, and it's gone now, so remove it from the docs. + ([@gagern](https://github.com/gagern)) +* [`27d2612`](https://github.com/npm/npm/commit/27d2612b3f5aa88b12c943d04e162ce4c3a350ae) + `semver@5.1.0`: Include BNF for SemVer expression grammar (which is also now + included in `npm help semver`). ([@isaacs](https://github.com/isaacs)) + +#### LAND YOUR DEPENDENCY UPGRADES IN PAIRS SO EVERYONE HAS A FRIEND + +* [`fc6c3c5`](https://github.com/npm/npm/commit/fc6c3c53a31e9e11c2616fcd378202e5b80bf286) + `request@2.67.0` ([@simov](https://github.com/simov)) +* [`07013fd`](https://github.com/npm/npm/commit/07013fd0fd55a2eb31fb9334631ee5d0dd5c41bb) + [isaacs/rimraf#89](https://github.com/isaacs/rimraf/pull/89) `rimraf@2.4.4` + ([@zerok](https://github.com/zerok)) +* [`bc149be`](https://github.com/npm/npm/commit/bc149bef871f0f00639509898cece531af3aa8b3) + [isaacs/once#7](https://github.com/isaacs/once/pull/7) `once@1.3.3` + ([@floatdrop](https://github.com/floatdrop)) +* [`ac598d3`](https://github.com/npm/npm/commit/ac598d36e1ad207bc0d8a7eadfd84b26146aec1f) + `lru-cache@3.2.0` ([@isaacs](https://github.com/isaacs)) +* [`1b915ce`](https://github.com/npm/npm/commit/1b915ce1e0787ccb6d8aa235d002d66565f2175d) + `npm-registry-client@7.0.9` ([@othiym23](https://github.com/othiym23)) +* [`df7dd78`](https://github.com/npm/npm/commit/df7dd78b8fe3cc58202996fa6c994fc55419bfa5) + `tap@2.3.1` ([@isaacs](https://github.com/isaacs)) + +### v2.14.14 (2015-12-03): + +#### FIX URL IN LICENSE + +The license incorrectly identified the registry URL as `registry.npmjs.com` and +this has been corrected to `registry.npmjs.org`. + +* [`6051a69`](https://github.com/npm/npm/commit/6051a69b1adc80f5f200077067e831643f655bd4) + [#10685](https://github.com/npm/npm/pull/10685) + Fix npm public registry URL in notices. + ([@kemitchell](https://github.com/kemitchell)) + +#### NO MORE MD5 + +We updated modules that had been using MD5 for non-security purposes. While +this is perfectly safe, if you compile Node in FIPS-compliance mode it will +explode if you try to use MD5. We've replaced MD5 with Murmur, which conveys +our intent better and is faster to boot. + +* [`30b5994`](https://github.com/npm/npm/commit/30b599496a9762482e1cef945a378e3a534fd366) + [#10629](https://github.com/npm/npm/issues/10629) + `write-file-atomic@1.1.4` + ([@othiym23](https://github.com/othiym23)) +* [`68c63ff`](https://github.com/npm/npm/commit/68c63ff1279d3d5ea7b2c970ab5562a8e0536f27) + [#10629](https://github.com/npm/npm/issues/10629) + `fs-write-stream-atomic@1.0.5` + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`e48e5a9`](https://github.com/npm/npm/commit/e48e5a90b4dcf76124b7e9ea3b295c1383e7f0c8) + [nodejs/node-gyp#831](https://github.com/nodejs/node-gyp/pull/831) + `node-gyp@3.2.1`: Improved \*BSD support. + ([@bnoordhuis](https://github.com/bnoordhuis)) + +### v2.14.13 (2015-11-25): + +#### THE npm CLI !== THE npm REGISTRY !== npm, INC. + +npm-the-CLI is licensed under the terms of the [Artistic License +2.0](https://github.com/npm/npm/blob/8d79c1a39dae908f27eaa37ff6b23515d505ef29/LICENSE), +which is a liberal open-source license that allows you to take this code and do +pretty much whatever you like with it (that is, of course, not legal language, +and if you're doing anything with npm that leaves you in doubt about your legal +rights, please seek the review of qualified counsel, which is to say, not +members of the CLI team, none of whom have passed the bar, to my knowledge). At +the same time the primary registry the CLI uses when looking up and downloading +packages is a commercial service run by npm, Inc., and it has its own [Terms of +Use](https://www.npmjs.com/policies/terms). + +Aside from clarifying the terms of use (and trying to make sure they're more +widely known), the only recent changes to npm's licenses have been making the +split between the CLI and registry clearer. You are still free to do whatever +you like with the CLI's source, and you are free to view, download, and publish +packages to and from `registry.npmjs.org`, but now the existing terms under +which you can do so are more clearly documented. Aside from the two commits +below, see also [the release notes for +`npm@2.14.11`](https://github.com/npm/npm/releases/tag/v2.14.11), which is where +the split between the CLI's code and the terms of use for the registry was +first made more clear. + +* [`1f3e936`](https://github.com/npm/npm/commit/1f3e936aab6840667948ef281e0c3621df365131) + [#10532](https://github.com/npm/npm/issues/10532) Clarify that + `registry.npmjs.org` is the default, but that you're free to use the npm CLI + with whatever registry you wish. ([@kemitchell](https://github.com/kemitchell)) +* [`6733539`](https://github.com/npm/npm/commit/6733539eeb9b32a5f2d1a6aa797987e2252fa760) + [#10532](https://github.com/npm/npm/issues/10532) Having semi-duplicate + release information in `README.md` was confusing and potentially inaccurate, + so remove it. ([@kemitchell](https://github.com/kemitchell)) + +#### EASE UP ON WINDOWS BASH USERS + +It turns out that a fair number of us use bash on Windows (through MINGW or +bundled with Git, plz – Cygwin is still a bridge too far, for both npm and +Node.js). [@jakub-g](https://github.com/jakub-g) did us all a favor and relaxed +the check for npm completion to support MINGW bash. Thanks, Jakub! + +* [`460cc09`](https://github.com/npm/npm/commit/460cc0950fd6a005c4e5c4f85af807814209b2bb) + [#10156](https://github.com/npm/npm/issues/10156) completion: enable on + Windows in git bash ([@jakub-g](https://github.com/jakub-g)) + +#### MAKE NODE-GYP A LITTLE BLUER + +* [`333e118`](https://github.com/npm/npm/commit/333e1181082842c21edc62f0ce515928424dff1f) + `node-gyp@3.2.0`: Support AIX, use `which` to find Python, updated to a newer + version of `gyp`, and more! ([@bnoordhuis](https://github.com/bnoordhuis)) + +#### WE LIKE SPDX AND ALL BUT IT'S NOT ACTUALLY A DIRECT DEP, SORRY + +* [`1f4b4bb`](https://github.com/npm/npm/commit/1f4b4bbdf8758281beecb7eaf75d05a6c4a77c15) + Removed `spdx` as a direct npm dependency, since we don't actually need it at + that level, and updated subdeps for `validate-npm-package-license` + ([@othiym23](https://github.com/othiym23)) + +#### A BOUNTEOUS THANKSGIVING CORNUCOPIA OF DOC TWEAKS + +These are great! Keep them coming! Sorry for letting them pile up so deep, +everybody. Also, a belated Thanksgiving to our Canadian friends, and a happy +Thanksgiving to all our friends in the USA. + +* [`6101f44`](https://github.com/npm/npm/commit/6101f44737645d9379c3396fae81bbc4d94e1f7e) + [#10250](https://github.com/npm/npm/issues/10250) Correct order of `org:team` + in `npm team` documentation. ([@louislarry](https://github.com/louislarry)) +* [`e8769f9`](https://github.com/npm/npm/commit/e8769f9807b91582c15ef130733e2e72b6c7bda4) + [#10371](https://github.com/npm/npm/issues/10371) Remove broken / duplicate + link to tag. ([@WickyNilliams](https://github.com/WickyNilliams)) +* [`1ae2dbe`](https://github.com/npm/npm/commit/1ae2dbe759feb80d8634569221ec6ee2c6d1d1ff) + [#10419](https://github.com/npm/npm/issues/10419) Remove references to + nonexistent `npm-rm(1)` documentation. ([@KenanY](https://github.com/KenanY)) +* [`777a271`](https://github.com/npm/npm/commit/777a271830a42d4ee62540a89f764a6e7d62de19) + [#10474](https://github.com/npm/npm/issues/10474) Clarify that install finds + dependencies in `package.json`. ([@sleekweasel](https://github.com/sleekweasel)) +* [`dcf4b5c`](https://github.com/npm/npm/commit/dcf4b5cbece1b0ef55ab7665d9acacc0b6b7cd6e) + [#10497](https://github.com/npm/npm/issues/10497) Clarify what a package is + slightly. ([@aredridel](https://github.com/aredridel)) +* [`447b3d6`](https://github.com/npm/npm/commit/447b3d669b2b6c483b8203754ac0a002c67bf015) + [#10539](https://github.com/npm/npm/issues/10539) Remove an extra, spuriously + capitalized letter. ([@alexlukin-softgrad](https://github.com/alexlukin-softgrad)) + +### v2.14.12 (2015-11-19): + +#### TEEN ORCS AT THE GATES + +This week heralds the general release of the primary npm registry's [new +support for private packages for +organizations](http://blog.npmjs.org/post/133542170540/private-packages-for-organizations). +For many potential users, it's the missing piece needed to make it easy for you +to move your organization's private work onto npm. And now it's here! The +functionality to support it has been in place in the CLI for a while now, +thanks to [@zkat](https://github.com/zkat)'s hard work. + +During our final testing before the release, our ace support team member +[@snopeks](https://github.com/snopeks) noticed that there had been some drift +between the CLI team's implementation and what npm was actually preparing to +ship. In the interests of everyone having a smooth experience with this +_extremely useful_ new feature, we quickly made a few changes to square up the +CLI and the web site experiences. + +* [`0e8b15e`](https://github.com/npm/npm/commit/0e8b15e9fbc89e31bd00e573b648846beddfb835) + [#9327](https://github.com/npm/npm/issues/9327) `npm access` no longer has + problems when run in a directory that doesn't contain a `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`c4e939c`](https://github.com/npm/npm/commit/c4e939c1d493601d25dcb88e6ffcca73076fd3fd) + [npm/npm-registry-client#126](https://github.com/npm/npm-registry-client/issues/126) + `npm-registry-client@7.0.8`: Allow the CLI to grant, revoke, and list + permissions on unscoped (public) packages on the primary registry. + ([@othiym23](https://github.com/othiym23)) + +#### A BRIEF NOTE ON NPM'S BACKWARDS COMPATIBILITY + +We don't often have much to say about the changes we make to our internal +testing and tooling, but I'm going to take this opportunity to reiterate that +npm tries hard to maintain compatibility with a wide variety of Node versions. +As this change shows, we want to ensure that npm works the same across: + +* Node.js 0.8 +* Node.js 0.10 +* Node.js 0.12 +* the latest io.js release +* Node.js 4 LTS +* Node.js 5 + +Contributors who send us pull requests often notice that it's very rare that +our tests pass across all of those versions (ironically, almost entirely due to +the packages we use for testing instead of any issues within npm itself). We're +currently beginning an effort, lasting the rest of 2015, to clean up our test +suite, and not only get it passing on all of the above versions of Node.js, but +working solidly on Windows as well. This is a compounding form of technical +debt that we're finally paying down, and our hope is that cleaning up the tests +will produce a more robust CLI that's a lot easier to write patches for. + +* [`d743620`](https://github.com/npm/npm/commit/d743620a0005213a65d25de771661b4d48a09717) + [#10233](https://github.com/npm/npm/issues/10233) Update Node.js versions + that Travis uses to test npm. ([@iarna](https://github.com/iarna)) + +#### TYPOS IN THE LICENSE, OH MY + +* [`58ac241`](https://github.com/npm/npm/commit/58ac241f556b2c202a8ee33321965e2540361ca7) + [#10478](https://github.com/npm/npm/issues/10478) Correct two typos in npm's + LICENSE. ([@jorrit](https://github.com/jorrit)) + +### v2.14.11 (2015-11-12): + +#### ASK FOR NOTHING, GET LATEST + +When you run `npm install foo`, you probably expect that you'll get the +`latest` version of `foo`, whatever that is. And good news! That's what this +change makes it do. + +We _think_ this is what everyone wants, but if this causes problems for you, we +want to know! If it proves problematic for people we will consider reverting it +(preferrably before this becomes `npm@latest`). + +Previously, when you ran `npm install foo` we would act as if you typed `npm +install foo@*`. Now, like any range-type specifier, in addition to matching the +range, it would also have to be `<=` the value of the `latest` dist-tag. +Further, it would exclude prerelease versions from the list of versions +considered for a match. + +This worked as expected most of the time, unless your `latest` was a prerelease +version, in which case that version wouldn't be used, to everyone's surprise. + +* [`6f0a646`](https://github.com/npm/npm/commit/6f0a646cd865b24fe3ff25365bf5421780e63e01) + [#10189](https://github.com/npm/npm/issues/10189) `npm-package-arg@4.1.0`: + Change the default version from `*` to `latest`. + ([@zkat](https://github.com/zkat)) + +#### LICENSE CLARIFICATION + +* [`54a9046`](https://github.com/npm/npm/commit/54a90461f068ea89baa5d70248cdf1581897936d) + [#10326](https://github.com/npm/npm/issues/10326) Clarify what-all is covered + by npm's license and point to the registry's terms of use. + ([@kemitchell](https://github.com/kemitchell)) + +#### CLOSER TO GREEN TRAVIS + +* [`28efd3d`](https://github.com/npm/npm/commit/28efd3d7dfb2fa3755076ae706ea4d38c6ee6900) + [#10232](https://github.com/npm/npm/issues/10232) `nock@1.9.0`: Downgrade + nock to a version that doesn't depend on streams2 in core so that more of our + tests can pass in 0.8. ([@iarna](https://github.com/iarna)) + +#### A BUG FIX + +* [`eacac8f`](https://github.com/npm/npm/commit/eacac8f05014d15217c3d8264d0b00a72eafe2d2) + [#9965](https://github.com/npm/npm/issues/9965) Fix a corrupt `package.json` + file introduced by a merge conflict in + [`022691a`](https://github.com/npm/npm/commit/022691a). + ([@waynebloss](https://github.com/waynebloss)) + +#### A DEPENDENCY UPGRADE + +* [`ea7d8e0`](https://github.com/npm/npm/commit/ea7d8e00a67a3d5877ed72c9728909c848468a9b) + [npm/nopt#51](https://github.com/npm/nopt/pull/51) `nopt@3.0.6`: Allow + types checked to be validated by passed-in name in addition to the JS name of + the type / class. ([@wbecker](https://github.com/wbecker)) + +### v2.14.10 (2015-11-05): + +There's nothing in here that that isn't in the `npm@3.4.0` release notes, but +all of the commit shasums have been adjusted to be correct. Enjoy! + +#### BUG FIXES VIA DEPENDENCY UPDATES + +* [`204c558`](https://github.com/npm/npm/commit/204c558c06637a753c0b41d0cf19f564a1ac3715) + [#8640](https://github.com/npm/npm/issues/8640) + [npm/normalize-package-data#69](https://github.com/npm/normalize-package-data/pull/69) + `normalize-package-data@2.3.5`: Fix a bug where if you didn't specify the + name of a scoped module's binary, it would install it such that it was + impossible to call it. ([@iarna](https://github.com/iarna)) +* [`bbdf4ee`](https://github.com/npm/npm/commit/bbdf4ee0a3cd12be6a2ace255b67d573a72f1f8f) + [npm/fstream-npm#14](https://github.com/npm/fstream-npm/pull/14) + `fstream-npm@1.0.7`: Only filter `config.gypi` when it's in the build + directory. ([@mscdex](https://github.com/mscdex)) +* [`d82ff81`](https://github.com/npm/npm/commit/d82ff81403e906931fac701775723626dcb443b3) + [npm/fstream-npm#15](https://github.com/npm/fstream-npm/pull/15) + `fstream-npm@1.0.6`: Stop including directories that happened to have names + matching whitelisted npm files in npm module tarballs. The most common cause + was that if you had a README directory then everything in it would be + included if wanted it or not. ([@taion](https://github.com/taion)) + +#### DOCUMENTATION FIXES + +* [`16361d1`](https://github.com/npm/npm/commit/16361d122f2ff6d1a4729c66153b7c24c698fd19) + [#10036](https://github.com/npm/npm/pull/10036) Fix typo / over-abbreviation. + ([@ifdattic](https://github.com/ifdattic)) +* [`d1343dd`](https://github.com/npm/npm/commit/d1343dda42f113dc322f95687f5a8c7d71a97c35) + [#10176](https://github.com/npm/npm/pull/10176) Fix broken link, scopes => + scope. ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`110663d`](https://github.com/npm/npm/commit/110663d000a3908a4853393d9abae481700cf4dc) + [#9460](https://github.com/npm/npm/issue/9460) Specifying the default command + run by "npm start" and the fact that you can pass it arguments. + ([@JuanCaicedo](https://github.com/JuanCaicedo)) + +#### DEPENDENCY UPDATES FOR THEIR OWN SAKE + +* [`7476d2d`](https://github.com/npm/npm/commit/7476d2d31552a41671c425aa7fcc2844e0381008) + [npm/npmlog#19](https://github.com/npm/npmlog/pull/19) + `npmlog@2.0.0`: Make it possible to emit log messages with `error` as the + prefix. + ([@bengl](https://github.com/bengl)) +* [`6ca7888`](https://github.com/npm/npm/commit/6ca7888862cfe8bf802dc7c66632c102acd94cf5) + `read-package-json@2.0.2`: Minor cleanups. + ([@KenanY](https://github.com/KenanY)) + +### v2.14.9 (2015-10-29): + +There's still life in `npm@2`, but for now, enjoy these dependency upgrades! +Also, [@othiym23](https://github.com/othiym23) says hi! _waves_ +[@zkat](https://github.com/zkat) has her hands full, and +[@iarna](https://github.com/iarna)'s handling `npm@3`, so I'm dealing with +`npm@2` and the totally nonexistent weird bridge `npm@1.4` LTS release that may +or may not be happening this week. + +#### CAN'T STOP WON'T STOP UPDATING THOSE DEPENDENCIES + +* [`f52f0cb`](https://github.com/npm/npm/commit/f52f0cb51526314197e9d67619feebbd82a397b7) + [#10150](https://github.com/npm/npm/issues/10150) `chmodr@1.0.2`: Use + `fs.lstat()` to check if an entry is a directory, making `chmodr()` work + properly with NFS mounts on Windows. ([@sheerun](https://github.com/sheerun)) +* [`f7011d7`](https://github.com/npm/npm/commit/f7011d7b3b1d9148a6cd8f7b8359d6fe3269a912) + [#10150](https://github.com/npm/npm/issues/10150) `which@1.2.0`: Additional + command-line parameters, which is nice but not used by npm. + ([@isaacs](https://github.com/isaacs)) +* [`ebcc0d8`](https://github.com/npm/npm/commit/ebcc0d8629388da0b849bbbad590382cd7268f51) + [#10150](https://github.com/npm/npm/issues/10150) `minimatch@3.0.0`: Don't + package browser version. ([@isaacs](https://github.com/isaacs)) +* [`8c98dce`](https://github.com/npm/npm/commit/8c98dce5ffe242bafbe92b849e73e8de1803e256) + [#10150](https://github.com/npm/npm/issues/10150) `fstream-ignore@1.0.3`: + Upgrade to use `minimatch@3` (for deduping purposes). + ([@othiym23](https://github.com/othiym23)) +* [`db9ef33`](https://github.com/npm/npm/commit/db9ef337c253ecf21c921055bf8742e10d1cb3bb) + [#10150](https://github.com/npm/npm/issues/10150) `request@2.65.0`: + Dependency upgrades and a few bug fixes, mostly related to cookie handling. + ([@simov](https://github.com/simov)) + +#### DEVDEPENDENCIES TOO, I GUESS, IT'S COOL + +* [`dfbf621`](https://github.com/npm/npm/commit/dfbf621afa09c46991249b4f9a995d1823ea7ede) + [#10150](https://github.com/npm/npm/issues/10150) `tap@2.2.0`: Better + handling of test order handling (including some test fixes for npm). + ([@isaacs](https://github.com/isaacs)) +* [`cf5ad5a`](https://github.com/npm/npm/commit/cf5ad5a8c88bfd72e30ef8a8d1d3c5508e0b3c23) + [#10150](https://github.com/npm/npm/issues/10150) `nock@2.16.0`: More + expectations, documentation, and bug fixes. + ([@pgte](https://github.com/pgte)) + +### v2.14.8 (2015-10-08): + +#### SLOWLY RECOVERING FROM FEELINGS + +OS&F is definitely my favorite convention I've gone to. Y'all should check it +out next year! Rebecca and Kat are back, although Forrest is out at +[&yet conf](http://andyetconf.com/). + +This week sees another tiny LTS release with non-code-related patches -- just +CI/release things. + +Meanwhile, have you heard? `npm@3` is much faster now! Go upgrade with `npm +install -g npm@latest` and give it a whirl if you haven't already! + +#### IF YOU CHANGE CASING ON A FILE, YOU ARE NOT MY FRIEND + +Seriously. I love me some case-sensitive filesystems, but a lot of us have to +deal with `git` and its funky support for case normalizing systems. Have mercy +and just don't bother if all you're changing is casing, please? Otherwise, I +have to do this little dance to prevent horrible conflicts. + +* [`c3a7b61`](https://github.com/npm/npm/commit/c3a7b619786650a45653c8b55b8741fc7bb5cfda) + [#9804](https://github.com/npm/npm/pulls/9804) Remove the readme file with + weird casing. + ([@zkat](https://github.com/zkat)) +* [`f3f619e`](https://github.com/npm/npm/commit/f3f619e06e4be1378dbf286f897b50e9c69c9557) + [#9804](https://github.com/npm/npm/pulls/9804) Add the readme file back in, + with desired casing. + ([@zkat](https://github.com/zkat)) + +#### IDK. OUR CI DOESN'T EVEN FULLY WORK YET BUT SURE + +Either way, it's nice to make sure we're running stuff on the latest Node. `4.2` +is getting released very soon, though (this week?), and that'll be the first +official LTS release! + +* [`bd0b9ab`](https://github.com/npm/npm/commit/bd0b9ab6e60a31448794bbd88f94672572c3cb55) + [#9827](https://github.com/npm/npm/pulls/9827) Add node `4.0` and `4.1` to + TravisCI + ([@JaKXz](https://github.com/JaKXz)) + +### v2.14.7 (2015-10-01): + +#### MORE RELEASE STAGGERING?! + +Hi all, and greetings from [Open Source & Feelings](http://osfeels.com)! + +So we're switching gears a little with how we handle our weekly releases: from +now on, we're going to stagger release weeks between dependency bumps and +regular patches. So, this week, aside from a doc change, we'll be doing only +version bumps. Expect actual patches next week! + +#### TOTALLY FOLLOWING THE RULES ALREADY + +So I snuck this in, because it's our own [@snopeks](https://github.com/snopeks)' +first contribution to the main `npm` repo. She's been helping with building +support documents for Orgs, and contributed her general intro guide to the new +feature so you can read it with `npm help orgs` right in your terminal! + +* [`8324ea0`](https://github.com/npm/npm/commit/8324ea023ace4e08b6b8959ad199e2457af9f9cf) + [#9761](https://github.com/npm/npm/pull/9761) Added general user guide for + Orgs. + ([@snopeks](https://github.com/snopeks)) + +#### JUST. ONE. MORE. + +* [`9a502ca`](https://github.com/npm/npm/commit/9a502ca96e2d43ec75a8f684c9ca33af7e910f0a) + Use unique package name in tests to work around weird test-state-based + failures. + ([@iarna](https://github.com/iarna)) + +#### OKAY ACTUALLY THE THING I WAS SUPPOSED TO DO + +Anyway -- here's your version bump! :) + +* [`4aeb94c`](https://github.com/npm/npm/commit/4aeb94c9f0df3f41802cf2e0397a998f3b527c25) + `request@2.64.0`: No longer defaulting to `application/json` for `json` + requests. Also some minor doc and packaging patches. + ([@simov](https://github.com/simov)) +* [`a18b213`](https://github.com/npm/npm/commit/a18b213e6945a8f5faf882927829ac95f844e2aa) + `glob@5.0.15`: Upgraded `minimatch` dependency. + ([@isaacs](https://github.com/isaacs)) +* [`9eb64d4`](https://github.com/npm/npm/commit/9eb64e44509519ca9d788502edb2eba4cea5c86b) + `nock@2.13.0` + ([@pgte](https://github.com/pgte)) + +### v2.14.6 (2015-09-24): + +#### `¯\_(ツ)_/¯` + +Since `2.x` is LTS now, you can expect a slowdown in overall release sizes. On +top of that, we had our all-company-npm-internal-conf thing on Monday and +Tuesday so there wasn't really time to do much at all. + +Still, we're bringing you a couple of tiny little changes this week! + +* [`7b7da13`](https://github.com/npm/npm/commit/7b7da13c6cdf5eae53c20d5c69afc4c16e6f715d) + [#9471](https://github.com/npm/npm/pull/9471) When the port for a tarball is + different than the registry it's in, but the hostname is the same, the + protocol is now allowed to change, too. + ([@fastest963](https://github.com/fastest963)) +* [`6643ada`](https://github.com/npm/npm/commit/6643adaf9f37f08893e3ad28b797c55a36b2a152) + `request@2.63.0`: Use `application/json` as the default content type when + making `json` requests. + ([@simov](https://github.com/simov)) + +### v2.14.5 (2015-09-17): + +#### NPM IS DEAD. LONG LIVE NPM + +That's right folks. As of this week, `npm@latest` is `npm@3`! There's some +really great shiny new things over there, and you should really take a look. + +Many kudos to [@iarna](https://github.com/iarna) for her hard work on `npm@3`! + +Don't worry, we'll keep `2.x` around for a while (as LTS), but you won't see +many, if any, new features on this end. From now on, we're going to use +`latest-2` and `next-2` as the dist tags for the `npm@2` branch. + +#### OKAY THAT'S FINE CAN I DEPRECATE THINGS NOW? + +Yes! Specially if you're using scoped packages. Apparently, deprecating them +never worked, but that should be better now. :) + +* [`eca7b24`](https://github.com/npm/npm/commit/eca7b24de9a0090da02a93a69726f5e70ab80543) + [#9558](https://github.com/npm/npm/issues/9558) Add tests for npm deprecate. + ([@zkat](https://github.com/zkat)) +* [`648fe16`](https://github.com/npm/npm/commit/648fe16157ef0db22395ae056d1dd4b4c1605bf4) + [#9558](https://github.com/npm/npm/issues/9558) `npm-registry-client@7.0.7`: + Fixes `npm deprecate` so you can actually deprecate scoped modules now (it + never worked). + ([@zkat](https://github.com/zkat)) + +#### WTF IS `node-waf` + +idk. Some old thing. We don't talk about it anymore. + +* [`cf1b39f`](https://github.com/npm/npm/commit/cf1b39fc95a9ffad7fba4c2fee705c53b19d1d16) + [#9584](https://github.com/npm/npm/issues/9584) Fix ancient references to + `node-waf` in the docs to refer to the `node-gyp` version of things. + ([@KenanY](https://github.com/KenanY)) + +#### THE `graceful-fs` AND `node-gyp` SAGA CONTINUES + +Last week had some sweeping `graceful-fs` upgrades, and this takes care of one +of the stragglers, as well as bumping `node-gyp`. `node@4` users might be +excited about this, or even `node@<4` users who previously had to cherry-pick a +bunch of patches to get the latest npm working. + +* [`e07354f`](https://github.com/npm/npm/commit/e07354f3ff3a6be568fe950f1f825897f72912d8) + `sha@2.0.1`: Upgraded graceful-fs! + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`83cb6ee`](https://github.com/npm/npm/commit/83cb6ee4045b85e565e9678ca1878877e1dc75bd) + `node-gyp@3.0.3` + ([@rvagg](https://github.com/rvagg)) + +#### DEPS! DEPS! MORE DEPS! OK STOP DEPS + +* [`0d60888`](https://github.com/npm/npm/commit/0d608889615a1cb63f5f852337e955053f201aeb) + `normalize-package-data@2.3.4`: Use an external package to check for built-in + node modules. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`79b4dac`](https://github.com/npm/npm/commit/79b4dac11f1c2d8ad5489fc3104734e1c10d4793) + `retry@0.8.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`c164941`](https://github.com/npm/npm/commit/c164941d3c792904d5b126a4fd36eefbe0699f52) + `request@2.62.0`: node 4 added to build targets. Option initialization issues + fixed. + ([@simov](https://github.com/simov)) +* [`0fd878a`](https://github.com/npm/npm/commit/0fd878a44d5ae303325808d1f00df4dce7549d50) + `lru-cache@2.7.0`: Cache serialization support and fixes a cache length bug. + ([@isaacs](https://github.com/isaacs)) +* [`6a7a114`](https://github.com/npm/npm/commit/6a7a114a45b4699995d6e09164fdfd0fa1274591) + `nock@2.12.0` + ([@pgte](https://github.com/pgte)) +* [`6b25e6d`](https://github.com/npm/npm/commit/6b25e6d2235c11f4444104db4545cb42a0267666) + `semver@5.0.3`: Removed uglify-js dead code. + ([@isaacs](https://github.com/isaacs)) + +### v2.14.4 (2015-09-10): + +#### THE GREAT NODEv4 SAGA + +So [Node 4 is out now](https://nodejs.org/en/blog/release/v4.0.0/) and that's +going to involve a number of things over in npm land. Most importantly, it's the +last major release that will include the `2.x` branch of npm. That also means +that `2.x` is going to go into LTS mode in the coming weeks -- once `npm@3` +becomes our official `latest` release. You can most likely expect Node 5 to +include `npm@3` by default, whenever that happens. We'll go into more detail +about LTS at that point, as well, so keep your eyes peeled for announcements! + +#### NODE IS DEAD. LONG LIVE NODE! + +Node 4 being released means that a few things that used to be floating patches +are finally making it right into npm proper. This week, we've got two such +updates, both to dependencies: + +* [`505d9e4`](https://github.com/npm/npm/commit/505d9e40c13b8b0bb3f70ee9886f7b73ba569407) + `node-gyp@3.0.1`: Support for node nightlies and compilation for both node and + io.js without extra patching + ([@rvagg](https://github.com/rvagg)) + +[@thefourtheye](https://github.com/thefourtheye) was kind enough to submit a +*bunch* of PRs to npm's dependencies updating them to `graceful-fs@4.1.2`, which +mainly makes it so we're no longer monkey-patching `fs`. The following are all +updates related to this: + +* [`10cb189`](https://github.com/npm/npm/commit/10cb189c773fef804214018d57509cc7a943184b) + `write-file-atomic@1.1.3` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`edfb80b`](https://github.com/npm/npm/commit/edfb80b39f8cfce9a993f139eb98248001198e09) + `tar@2.2.1` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`aa6e1ee`](https://github.com/npm/npm/commit/aa6e1eede7d71fa69d7256afdfbaa3406bc39a5b) + `read-package-json@2.0.1` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`18971a3`](https://github.com/npm/npm/commit/18971a361635ed3958ecd39b63930ae1e56f8612) + `read-installed@4.0.3` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`a4cba71`](https://github.com/npm/npm/commit/a4cba71bd2532236fda7385bf55e8790cafd4f0a) + `fstream@1.0.8` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`70a38e2`](https://github.com/npm/npm/commit/70a38e29418951ac61ab6cf269d188074fe8ac3a) + `fs-write-stream-atomic@1.0.4` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`9cbd20f`](https://github.com/npm/npm/commit/9cbd20f691e37960e4ba12d401abd1069657cb47) + `fs-vacuum@1.2.7` + ([@thefourtheye](https://github.com/thefourtheye)) + +#### OTHER PATCHES + +* [`c4dd521`](https://github.com/npm/npm/commit/c4dd5213b2f3283ea0392845e5f78cac4573529e) + [#9506](https://github.com/npm/npm/issues/9506) Make `npm link` work on + Windows when using node pre-release/RC releases. + ([@jon-hall](https://github.com/jon-hall)) +* [`b6bc29c`](https://github.com/npm/npm/commit/b6bc29c1401b3d6b570c09cbef1866bdb0436b59) + [#9544](https://github.com/npm/npm/issues/9549) `process.binding` is being + deprecated, so our only direct usage has been removed. + ([@ChALkeR](https://github.com/ChALkeR)) + +#### MORE DEPENDENCIES! + +* [`d940594`](https://github.com/npm/npm/commit/d940594e479a7f012b6dd6952e8ef985ba2a6216) + `tap@1.4.1` + ([@isaacs](https://github.com/isaacs)) +* [`ee38486`](https://github.com/npm/npm/commit/ee3848669331fd98879a3175789d963543f67ce3) + `which@1.1.2`: Added tests for Windows-related dead code that was previously + helping a silent failure happen. Travis stuff, too. + ([@isaacs](https://github.com/isaacs)) + +#### DOC UPDATES + +* [`475daf5`](https://github.com/npm/npm/commit/475daf54ad07777938d1d7ee1a3e576961e84510) + [#9492](https://github.com/npm/npm/issues/9492) Clarify how `.npmignore` and + `.gitignore` are found and used by npm. + ([@addaleax](https://github.com/addaleax)) +* [`b2c391d`](https://github.com/npm/npm/commit/b2c391d7833249626a6d7650363a83bcc778717a) + `nopt@3.0.4`: Minor clarifications to docs about how array and errors work. + ([@zkat](https://github.com/zkat)) + +### v2.14.3 (2015-09-03): + +#### TEAMS AND ORGS STILL BETA. CLI CODE STILL SOLID. + +Our closed beta for Teens and Orcs is happening! The web team is hard at work +making sure everything looks pretty and usable and such. Once we fix things +stemming from that beta, you can expect the feature to be available publicly. +Some time after that, it'll even be available for free for FOSS orgs. It'll Be +Done When It's Done™. + +#### OH GOOD, I CAN ACTUALLY UPSTREAM NOW + +Looks like last week's release foiled our own test suite when trying to upstream +it to Node! Just a friendly reminder that no, `.npmrc` is no longer included +then you pack/release a package! [@othiym23](https://github.com/othiym23) and +[@isaacs](https://github.com/isaacs) managed to suss the really strange test +failures resulting from that, and we've patched it in this release. + +* [`01a3428`](https://github.com/npm/npm/commit/01a3428534b754dca89a56fd1e49f55cb22f6f25) + [#9476](https://github.com/npm/npm/issues/9476) test: Recreate missing + `.npmrc` files when missing so downstream packagers can run tests on packed + npm. + ([@othiym23](https://github.com/othiym23)) + +#### TALKING ABOUT THE CHANGELOG IN THE CHANGELOG IS LIKE, POMO OR SOMETHING + +* [`c1e7a83`](https://github.com/npm/npm/commit/c1e7a83c0ae7aadf01aecc57cf8a0ae2009d4da8) + [#9431](https://github.com/npm/npm/issues/9431) CHANGELOG: clarify + windows-related nature of patch + ([@saper](https://github.com/saper)) + +#### devDependencies UPDATED + +No actual dep updates this week, but we're bumping a couple of devDeps: + +* [`8454835`](https://github.com/npm/npm/commit/84548351bfd63e3e305d195abbcad24c6b7c3e8e) + `tap@1.4.0`: Add `t.contains()` as alias to `t.match()` + ([@isaacs](https://github.com/isaacs)) +* [`13d2216`](https://github.com/npm/npm/commit/13d22161bcdeb6e1ed095d5ba2f77e6abfffa5eb) + `deep-equal@1.0.1`: Make `null == undefined` in non-strict mode + ([@isaacs](https://github.com/isaacs)) + +### v2.14.2 (2015-08-27): + +#### GETTING THAT PESKY `preferGlobal` WARNING RIGHT + +So apparently the `preferGlobal` option hasn't quite been warning correctly for +some time. But now it should be all better! tl;dr: if you try and install a +dependency with `preferGlobal: true`, and it's _not already_ in your +`package.json`, you'll get a warning that the author would really rather you +install it with `--global`. This should prevent Windows PowerShell from thinking +npm has failed just because of a benign warning. + +* [`bbb25f3`](https://github.com/npm/npm/commit/bbb25f30d582f8979168c79233a9f8f840974f90) + [#8841](https://github.com/npm/npm/issues/8841) + [#9409](https://github.com/npm/npm/issues/9409) The `preferGlobal` + warning shouldn't happen if the dependency being installed is listed in + `devDependencies`. ([@saper](https://github.com/saper)) +* [`222fcec`](https://github.com/npm/npm/commit/222fcec85ccd30d35899e5037079fb14625af4e2) + [#9409](https://github.com/npm/npm/issues/9409) `preferGlobal` now prints a + warning when there are no dependencies for the current package. + ([@zkat](https://github.com/zkat)) +* [`5cfed6d`](https://github.com/npm/npm/commit/5cfed6d7a1a5f2731688cfc8293b5e43a6355393) + [#9409](https://github.com/npm/npm/issues/9409) Verify that + `preferGlobal` is warning as expected (when a `preferGlobal` dependency is + installed, but isn't listed in either `dependencies` or `devDependencies`). + ([@zkat](https://github.com/zkat)) + +#### BUMP +1 + +* [`eeafce2`](https://github.com/npm/npm/commit/eeafce2d06883c0f51bf403415b6bc5f2647eba3) + `validate-npm-package-license@3.0.1`: Include additional metadata in parsed license object, + useful for license checkers. ([@kemitchell](https://github.com/kemitchell)) +* [`1502a28`](https://github.com/npm/npm/commit/1502a285f84aa548806b3eafc8889e6288e810f3) + `normalise-package-data@2.3.2`: Updated to use `validate-npm-package-license@3.0.1`. + ([@othiym23](https://github.com/othiym23)) +* [`cbde823`](https://github.com/npm/npm/commit/cbde8233436bf0ea62a4740869b4990322c20659) + `init-package-json@1.9.1`: Add a `silent` option to suppress output on writing the + generated `package.json`. Also, updated to use `validate-npm-package-license@3.0.1`. + ([@zkat](https://github.com/zkat)) +* [`08fda46`](https://github.com/npm/npm/commit/08fda465452b4d77f1ced8050ee3a35a77fc30a5) + `tar@2.2.0`: Minor improvements. ([@othiym23](https://github.com/othiym23)) +* [`dc2f20b`](https://github.com/npm/npm/commit/dc2f20b53fff77203139c863b48da0e959df2ac9) + `rimraf@2.4.3`: `EPERM` now triggers a delay / retry loop (since Windows throws + this when things still hold a handle). ([@isaacs](https://github.com/isaacs)) +* [`e8acb27`](https://github.com/npm/npm/commit/e8acb273aa67ee0394d0431650e1b2a7d09c8554) + `read@1.0.7`: Fix licensing ambiguity. ([@isaacs](https://github.com/isaacs)) + +#### OTHER STUFF THAT'S RELEVANT + +* [`73a1ee0`](https://github.com/npm/npm/commit/73a1ee0be90fa1928521b63f28bef83b8ffab61d) + [#9386](https://github.com/npm/npm/issues/9386) Include additional unignorable files in + documentation. + ([@mjhasbach](https://github.com/mjhasbach)) +* [`0313e40`](https://github.com/npm/npm/commit/0313e40ee0f757fce8861be590ad668c23d7be53) + [#9396](https://github.com/npm/npm/issues/9396) Improve the `EISDIR` error + message returned by npm's error-handling code to give users a better hint of + what's most likely going on. Usually, error reports with this error code are + about people trying to install things without a `package.json`. + ([@KenanY](https://github.com/KenanY)) +* [`2677457`](https://github.com/npm/npm/commit/26774579c739c5951351e58263cf4d6ea3d66ec8) + [#9360](https://github.com/npm/npm/issues/9360) Make it easier to run + only _some_ of npm tests with lifecycle scripts via `npm tap test/tap/testname.js`. + ([@iarna](https://github.com/iarna)) + +### v2.14.1 (2015-08-20): + +#### SECURITY FIX + +There are patches for two information leaks of moderate severity in `npm@2.14.1`: + +1. In some cases, npm was leaking sensitive credential information into the + child environment when running package and lifecycle scripts. This could + lead to packages being published with files (most notably `config.gypi`, a + file created by `node-gyp` that is a cache of environmental information + regenerated on every run) containing the bearer tokens used to authenticate + users to the registry. Users with affected packages have been notified (and + the affected tokens invalidated), and now npm has been modified to not + upload files that could contain this information, as well as scrubbing the + sensitive information out of the environment passed to child scripts. +2. Per-package `.npmrc` files are used by some maintainers as a way to scope + those packages to a specific registry and its credentials. This is a + reasonable use case, but by default `.npmrc` was packed into packages, + leaking those credentials. npm will no longer include `.npmrc` when packing + tarballs. + +If you maintain packages and believe you may be affected by either +of the above scenarios (especially if you've received a security +notification from npm recently), please upgrade to `npm@2.14.1` as +soon as possible. If you believe you may have inadvertently leaked +your credentials, upgrade to `npm@2.14.1` on the affected machine, +and run `npm logout` and then `npm login`. Your access tokens will be +invalidated, which will eliminate any risk posed by tokens inadvertently +included in published packages. We apologize for the inconvenience this +causes, as well as the oversight that led to the existence of this issue +in the first place. + +Huge thanks to [@ChALkeR](https://github.com/ChALkeR) for bringing these +issues to our attention, and for helping us identify affected packages +and maintainers. Thanks also to the Node.js security working group for +their coördination with the team in our response to this issue. We +appreciate everybody's patience and understanding tremendously. + +* [`b9474a8`](https://github.com/npm/npm/commit/b9474a843ca55b7c5fac6da33989e8eb39aff8b1) + `fstream-npm@1.0.5`: Stop publishing build cruft (`config.gypi`) and per-project + `.npmrc` files to keep local configuration out of published packages. + ([@othiym23](https://github.com/othiym23)) +* [`13c286d`](https://github.com/npm/npm/commit/13c286dbdc3fa8fec4cb79fc4d1ee505c8a41b2e) + [#9348](https://github.com/npm/npm/issues/9348) Filter "private" + (underscore-prefixed, even when scoped to a registry) configuration values + out of child environments. ([@othiym23](https://github.com/othiym23)) + +#### BETTER WINDOWS INTEGRATION, ONE STEP AT A TIME + +* [`e40e71f`](https://github.com/npm/npm/commit/e40e71f2f838a8a42392f44e3eeec04e323ab743) + [#6412](https://github.com/npm/npm/issues/6412) Improve the search strategy + used by the npm shims for Windows to prioritize your own local npm installs. + npm has really needed this tweak for a long time, so hammer on it and let us + know if you run into issues, but with luck it will Just Work. + ([@joaocgreis](https://github.com/joaocgreis)) +* [`204ebbb`](https://github.com/npm/npm/commit/204ebbb3e0cab696a429a878ceeb4a7e78ec2b94) + [#8751](https://github.com/npm/npm/issues/8751) + [#7333](https://github.com/npm/npm/issues/7333) Keep [autorun + scripts](https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) from + interfering with npm package and lifecycle script execution on Windows by + adding `/d` and `/s` when invoking `cmd.exe`. + ([@saper](https://github.com/saper)) + +#### IT SEEMED LIKE AN IDEA AT THE TIME + +* [`286f3d9`](https://github.com/npm/npm/commit/286f3d97103812f0fd84b70352addbe899e258f9) + [#9201](https://github.com/npm/npm/pull/9201) For a while npm was building + HTML partials for use on [`docs.npmjs.com`](https://docs.npmjs.com), but we + weren't actually using them. Stop building them, which makes running the full + test suite and installation process around a third faster. + ([@isaacs](https://github.com/isaacs)) + +#### A SINGLE LONELY DEPENDENCY UPGRADE + +* [`b343b95`](https://github.com/npm/npm/commit/b343b956ef777e321e4251ddc96ec6d80827d9e2) + `request@2.61.0`: Bug fixes and keep-alive tweaks. + ([@simov](https://github.com/simov)) + +### v2.14.0 (2015-08-13): + +#### IT'S HERE! KINDA! + +This release adds support for teens and orcs (err, teams and organizations) to +the npm CLI! Note that the web site and registry-side features of this are +still not ready for public consumption. + +A beta should be starting in the next couple of weeks, and the features +themselves will become public once all that's done. Keep an eye out for more +news! + +All of these changes were done under [`#9011`](https://github.com/npm/npm/pull/9011): + +* [`6424170`](https://github.com/npm/npm/commit/6424170fc17c666a6efc090370ec691e0cab1792) + Added new `npm team` command and subcommands. + ([@zkat](https://github.com/zkat)) +* [`52220d1`](https://github.com/npm/npm/commit/52220d146d474ec29b683bd99c06f75cbd46a9f4) + Added documentation for new `npm team` command. + ([@zkat](https://github.com/zkat)) +* [`4e66830`](https://github.com/npm/npm/commit/4e668304850d02df8eb27a779fda76fe5de645e7) + Updated `npm access` to support teams and organizations. + ([@zkat](https://github.com/zkat)) +* [`ea3eb87`](https://github.com/npm/npm/commit/ea3eb8733d9fa09ce34106b1b19fb1a8f95844a5) + Gussied up docs for `npm access` with new commands. + ([@zkat](https://github.com/zkat)) +* [`6e0b431`](https://github.com/npm/npm/commit/6e0b431c1de5e329c86e57d097aa88ebfedea864) + Fix up `npm whoami` to make the underlying API usable elsewhere. + ([@zkat](https://github.com/zkat)) +* [`f29c931`](https://github.com/npm/npm/commit/f29c931012ce5ccd69c29d83548f27e443bf7e62) + `npm-registry-client@7.0.1`: Upgrade `npm-registry-client` API to support + `team` and `access` calls against the registry. + ([@zkat](https://github.com/zkat)) + +#### A FEW EXTRA VERSION BUMPS + +* [`c977e12`](https://github.com/npm/npm/commit/c977e12cbfa50c2f52fc807f5cc19ba1cc1b39bf) + `init-package-json@1.8.0`: Checks for some `npm@3` metadata. + ([@iarna](https://github.com/iarna)) +* [`5c8c9e5`](https://github.com/npm/npm/commit/5c8c9e5ae177ba7d0d298cfa42f3fc7f0271e4ec) + `columnify@1.5.2`: Updated some dependencies. + ([@timoxley](https://github.com/timoxley)) +* [`5d56742`](https://github.com/npm/npm/commit/5d567425768b75aeab402c817a53d8b2bc60d8de) + `chownr@1.0.1`: Tests, docs, and minor style nits. + ([@isaacs](https://github.com/isaacs)) + +#### ALSO A DOC FIX + +* [`846fcc7`](https://github.com/npm/npm/commit/846fcc79b86984b109a97366b0422f995a45f8bf) + [`#9200`](https://github.com/npm/npm/pull/9200) Remove single quotes + around semver range, thus making it valid semver. + ([@KenanY](https://github.com/KenanY)) + +### v2.13.5 (2015-08-07): + +This is another quiet week for the `npm@2` release. +[@zkat](https://github.com/zkat) has been working hard on polishing the CLI +bits of the registry's new feature to support direct management of teams and +organizations, and [@iarna](https://github.com/iarna) continues to work through +the list of issues blocking the general release of `npm@3`, which is looking +more and more solid all the time. + +[@othiym23](https://github.com/othiym23) and [@zkat](https://github.com/zkat) +have also been at this week's Node.js / io.js [collaborator +summit](https://github.com/nodejs/summit/tree/master), both as facilitators and +participants. This is a valuable opportunity to get some face time with other +contributors and to work through a bunch of important discussions, but it does +leave us feeling kind of sleepy. Running meetings is hard! + +What does that leave for this release? A few of the more tricky bug fixes that +have been sitting around for a little while now, and a couple dependency +upgrades. Nothing too fancy, but most of these were contributed by developers +like _you_, which we think is swell. Thanks! + +#### BUG FIXES + +* [`d7271b8`](https://github.com/npm/npm/commit/d7271b8226712479cdd339bf85faf7e394923e0d) + [#4530](https://github.com/npm/npm/issues/4530) The bash completion script + for npm no longer alters global completion behavior around word breaks. + ([@whitty](https://github.com/whitty)) +* [`c9ce294`](https://github.com/npm/npm/commit/c9ce29415a0a8fc610690b6e9d91b64d6e36cfcc) + [#7198](https://github.com/npm/npm/issues/7198) When setting up dependencies + to be shared via `npm link <package>`, only run the lifecycle scripts during + the original link, not when running `npm link <package>` or `npm install + --link` against them. ([@murgatroid99](https://github.com/murgatroid99)) +* [`422da66`](https://github.com/npm/npm/commit/422da664bd3ce71313da447f170507faf5aac46a) + [#9108](https://github.com/npm/npm/issues/9108) Clear up minor confusion + around wording in `bundledDependencies` section of `package.json` docs. + ([@derekpeterson](https://github.com/derekpeterson)) +* [`6b42d99`](https://github.com/npm/npm/commit/6b42d99460885e715772d3487b1c548d2bc8a738) + [#9146](https://github.com/npm/npm/issues/9146) Include scripts that run for + `preversion`, `version`, and `postversion` in the section for lifecycle + scripts rather than the generic `npm run-script` output. + ([@othiym23](https://github.com/othiym23)) + +#### NOPE, NOT DONE WITH DEPENDENCY UPDATES + +* [`91a48bb`](https://github.com/npm/npm/commit/91a48bb5ef5a990781c86f8b69b8a32cf4fac2d9) + `chmodr@1.0.1`: Ignore symbolic links when recursively changing mode, just + like the Unix command. ([@isaacs](https://github.com/isaacs)) +* [`4bbc86e`](https://github.com/npm/npm/commit/4bbc86e3825e2eee9a8758ba26bdea0cb6a2581e) + `nock@2.10.0` ([@pgte](https://github.com/pgte)) + +### v2.13.4 (2015-07-30): + +#### JULY ENDS ON A FAIRLY QUIET NOTE + +Hey everyone! I hope you've had a great week. We're having a fairly small +release this week while we wrap up Teams and Orgs (or, as we've taken to calling +it internally, _Teens and Orcs_). + +In other exciting news, a bunch of us are gonna be at the [Node.js Collaborator +Summit](https://github.com/nodejs/summit/issues/1), and you can also find us at +[wafflejs](https://wafflejs.com/) on Wednesday. Hopefully we'll be seeing some +of you there. :) + +#### THE PATCH!!! + +So here it is. The patch. Hope it helps. (Thanks, +[@ktarplee](https://github.com/ktarplee)!) + +* [`2e58c48`](https://github.com/npm/npm/commit/2e58c4819e3cafe4ae23ab7f4a520fe09258cfd7) + [#9033](https://github.com/npm/npm/pull/9033) `npm version` now works on git + submodules + ([@ktarplee](https://github.com/ktarplee)) + +#### OH AND THERE'S A DEV DEPENDENCIES UPDATE + +Hooray. + +* [`d204683`](https://github.com/npm/npm/commit/d2046839d471322e61e3ceb0f00e78e5c481f967) + nock@2.9.1 + ([@pgte](https://github.com/pgte)) + +### v2.13.3 (2015-07-23): + +#### I'M SAVING THE GOOD JOKES FOR MORE INTERESTING RELEASES + +It's pretty hard to outdo last week's release buuuuut~ I promise I'll have a +treat when we release our shiny new **Teams and Organizations** feature! :D +(Coming Soon™). It'll be a real *gem*. + +That means it's a pretty low-key release this week. We got some nice +documentation tweaks, a few bugfixes, and other such things, though! + +Oh, and a _bunch of version bumps_. Thanks, `semver`! + +#### IT'S THE LITTLE THINGS THAT MATTER + +* [`2fac6ae`](https://github.com/npm/npm/commit/2fac6aeffefba2934c3db395b525d931599c34d8) + [#9012](https://github.com/npm/npm/issues/9012) A convenience for releases -- + using the globally-installed npm before now was causing minor annoyances, so + we just use the exact same npm we're releasing to build the new release. + ([@zkat](https://github.com/zkat)) + +#### WHAT DOES THIS BUTTON DO? + +There's a couple of doc updates! The last one might be interesting. + +* [`4cd3205`](https://github.com/npm/npm/commit/4cd32050c0f89b7f1ae486354fa2c35eea302ba5) + [#9002](https://github.com/npm/npm/issues/9002) Updated docs to list the + various files that npm automatically includes and excludes, regardless of + settings. + ([@SimenB](https://github.com/SimenB)) +* [`cf09e75`](https://github.com/npm/npm/commit/cf09e754931739af32647d667b671e72a4c79081) + [#9022](https://github.com/npm/npm/issues/9022) Document the `"access"` field + in `"publishConfig"`. Did you know you don't need to use `--access=public` + when publishing scoped packages?! Just put it in your `package.json`! + Go refresh yourself on scopes packages by [checking our docs](https://docs.npmjs.com/getting-started/scoped-packages) on them. + ([@boennemann](https://github.com/boennemann)) +* [`bfd73da`](https://github.com/npm/npm/commit/bfd73da33349cc2afb8278953b2ae16ea95023de) + [#9013](https://github.com/npm/npm/issues/9013) fixed typo in changelog + ([@radarhere](https://github.com/radarhere)) + +#### THE SEMVER MAJOR VERSION APOCALYPSE IS UPON US + +Basically, `semver` is up to `@5`, and that meant we needed to go in an update a +bunch of our dependencies manually. `node-gyp` is still pending update, since +it's not ours, though! + +* [`9232e58`](https://github.com/npm/npm/commit/9232e58d54c032c23716ef976023d36a42bfdcc9) + [#8972](https://github.com/npm/npm/issues/8972) `init-package-json@1.7.1` + ([@othiym23](https://github.com/othiym23)) +* [`ba44f6b`](https://github.com/npm/npm/commit/ba44f6b4201a4faee025341b123e372d8f45b6d9) + [#8972](https://github.com/npm/npm/issues/8972) `normalize-package-data@2.3.1` + ([@othiym23](https://github.com/othiym23)) +* [`3901d3c`](https://github.com/npm/npm/commit/3901d3cf191880bb4420b1d6b8aedbcd8fc26cdf) + [#8972](https://github.com/npm/npm/issues/8972) `npm-install-checks@1.0.6` + ([@othiym23](https://github.com/othiym23)) +* [`ffcc7dd`](https://github.com/npm/npm/commit/ffcc7dd12f8bb94ff0f64c465c57e460b3f24a24) + [#8972](https://github.com/npm/npm/issues/8972) `npm-package-arg@4.0.2` + ([@othiym23](https://github.com/othiym23)) +* [`7128f9e`](https://github.com/npm/npm/commit/7128f9ec10c0c8482087511b716dbddb54249626) + [#8972](https://github.com/npm/npm/issues/8972) `npm-registry-client@6.5.1` + ([@othiym23](https://github.com/othiym23)) +* [`af28911`](https://github.com/npm/npm/commit/af28911ecd54a844f848c6ae41887097d6aa2f3b) + [#8972](https://github.com/npm/npm/issues/8972) `read-installed@4.0.2` + ([@othiym23](https://github.com/othiym23)) +* [`3cc817a`](https://github.com/npm/npm/commit/3cc817a0f34f698b580ff6ff02308700efc54f7c) + [#8972](https://github.com/npm/npm/issues/8972) node-gyp needs its own version + of semver + ([@othiym23](https://github.com/othiym23)) +* [`f98eccc`](https://github.com/npm/npm/commit/f98eccc6e3a6699ca0aa9ecbad93a3b995583871) + [#8972](https://github.com/npm/npm/issues/8972) `semver@5.0.1`: Stop including + browser builds. + ([@isaacs](https://github.com/isaacs)) + +#### \*BUMP\* + +And some other version bumps for good measure. + +* [`254ecfb`](https://github.com/npm/npm/commit/254ecfb04f026c2fd16427db01a53600c1892c8b) + [#8990](https://github.com/npm/npm/issues/8990) `marked-man@0.1.5`: Fixes an + issue with documentation rendering where backticks in 2nd-level headers would + break rendering (?!?!) + ([@steveklabnik](https://github.com/steveklabnik)) +* [`79efd79`](https://github.com/npm/npm/commit/79efd79ac216da8cee8636fb2ed926b0196a4eb6) + `minimatch@2.0.10`: A pattern like `'*.!(x).!(y)'` should not match a name + like `'a.xyz.yab'`. + ([@isaacs](https://github.com/isaacs)) +* [`39c7dc9`](https://github.com/npm/npm/commit/39c7dc9a4e17cd35a5ed882ba671821c9a900f9e) + `request@2.60.0`: A few bug fixes and doc updates. + ([@simov](https://github.com/simov)) +* [`72d3c3a`](https://github.com/npm/npm/commit/72d3c3a9e1e461608aa21b14c01a650333330da9) + `rimraf@2.4.2`: Minor doc and dep updates + ([@isaacs](https://github.com/isaacs)) +* [`7513035`](https://github.com/npm/npm/commit/75130356a06f5f4fbec3786aac9f9f0b36dfe010) + `nock@2.9.1` + ([@pgte](https://github.com/pgte)) +* [`3d9aa82`](https://github.com/npm/npm/commit/3d9aa82260f0643a32c13d0c1ed16f644b6fd4ab) + Fixes this thing where Kat decided to save `nock` as a regular dependency ;) + ([@othiym23](https://github.com/othiym23)) + +### v2.13.2 (2015-07-16): + +#### HOLD ON TO YOUR TENTACLES... IT'S NPM RELEASE TIME! + +Kat: Hooray! Full team again, and we've got a pretty small patch release this +week, about everyone's favorite recurring issue: git URLs! + +Rebecca: No Way! Again? + +Kat: The ride never ends! In the meantime, there's some fun, exciting work in +the background to get orgs and teams out the door. Keep an eye out for news. :) + +Rebecca: And make sure to keep an eye out for patches for the super-fresh +`npm@3`! + +#### LET'S GIT INKY + +Rebecca: So what's this about another git URL issue? + +Kat: Welp, I apparently broke backwards-compatibility on what are actually +invalid `git+https` URLs! So I'm making it work, but we're gonna deprecate URLs +that look like `git+https://user@host:path/is/here`. + +Rebecca: What should we use instead?! + +Kat: Just do me a solid and use `git+ssh://user@host:path/here` or +`git+https://user@host/absolute/https/path` instead! + +* [`769f06e`](https://github.com/npm/npm/commit/769f06e5455d7a9fc738379de2e05868df0dab6f) + Updated tests for `getResolved` so the URLs are run through + `normalize-git-url`. + ([@zkat](https://github.com/zkat)) +* [`edbae68`](https://github.com/npm/npm/commit/edbae685bf48971e878ced373d6825fc1891ee47) + [#8881](https://github.com/npm/npm/issues/8881) Added tests to verify that `git+https:` URLs are handled compatibly. + ([@zkat](https://github.com/zkat)) + +#### NEWS FLASH! DOCUMENTATION IMPROVEMENTS! + +* [`bad4e014`](https://github.com/npm/npm/commit/bad4e0143cc95754a682f1da543b2b4e196e924b) + [#8924](https://github.com/npm/npm/pull/8924) Make sure documented default + values in `lib/cache.js` properly correspond to current code. + ([@watilde](https://github.com/watilde)) +* [`e7a11fd`](https://github.com/npm/npm/commit/e7a11fdf70e333cdfe3dac94a1a30907adb76d59) + [#8036](https://github.com/npm/npm/issues/8036) Clarify the documentation for + `.npmrc` to clarify that it's not read at the project level when doing global + installs. + ([@espadrine](https://github.com/espadrine)) + +#### STAY FRESH~ + +Kat: That's it for npm core changes! + +Rebecca: Great! Let's look at the fresh new dependencies, then! + +Kat: See you all next week! + +Both: Stay Freeesh~ + +(some cat form of Forrest can be seen snoring in the corner) + +* [`bfa1f45`](https://github.com/npm/npm/bfa1f45ee760d05039557d2245b7e3df9fda8def) + `normalize-git-url@3.0.1`: Fixes url normalization such that `git+https:` + accepts scp syntax, but get converted into absolute-path `https:` URLs. Also + fixes scp syntax so you can have absolute paths after the `:` + (`git@myhost.org:/some/absolute/place.git`) + ([@zkat](https://github.com/zkat)) +* [`6f757d2`](https://github.com/npm/npm/6f757d22b53f91da0bebec6b5d16c1f4dbe130b4) + `glob@5.0.15`: Better handling of ENOTSUP + ([@isaacs](https://github.com/isaacs)) +* [`0920819`](https://github.com/npm/npm/09208197fb8b0c6d5dbf6bd7f59970cf366de989) + `node-gyp@2.0.2`: Fixes an issue with long paths on Win32 + ([@TooTallNate](https://github.com/TooTallNate)) + +### v2.13.1 (2015-07-09): + +#### KAUAI WAS NICE. I MISS IT. + +But Forrest's still kinda on vacation, and not just mentally, because he's +hanging out with the fine meatbags at CascadiaFest. Enjoy this small bug +release. + +#### MAKE OURSELVES HAPPY + +* [`40981f2`](https://github.com/npm/npm/commit/40981f2e0c9c12bb003ccf188169afd1d201f5af) + [#8862](https://github.com/npm/npm/issues/8862) Make the lifecycle's safety + check work with scoped packages. ([@tcort](https://github.com/tcort)) +* [`5125856`](https://github.com/npm/npm/commit/512585622481dbbda9a0306932468d59efaff658) + [#8855](https://github.com/npm/npm/issues/8855) Make dependency versions of + `"*"` match `"latest"` when all versions are prerelease. + ([@iarna](https://github.com/iarna)) +* [`22fdc1d`](https://github.com/npm/npm/commit/22fdc1d52602ba7098af978c75fca8f7d1060141) + Visually emphasize the correct way to write lifecycle scripts. + ([@josh-egan](https://github.com/josh-egan)) + +#### MAKE TRAVIS HAPPY + +* [`413c3ac`](https://github.com/npm/npm/commit/413c3ac2ab2437f3011c6ca0d1630109ec14e604) + Use npm's `2.x` branch for testing its `2.x` branch. + ([@iarna](https://github.com/iarna)) +* [`7602f64`](https://github.com/npm/npm/commit/7602f64826f7a465d9f3a20bd87a376d992607e6) + Don't prompt for GnuPG passphrase in version lifecycle tests. + ([@othiym23](https://github.com/othiym23)) + +#### MAKE `npm outdated` HAPPY + +* [`d338668`](https://github.com/npm/npm/commit/d338668601d1ebe5247a26237106e80ea8cd7f48) + [#8796](https://github.com/npm/npm/issues/8796) `fstream-npm@1.0.4`: When packing the + package tarball, npm no longer crashes for packages with certain combinations of + `.npmignore` entries, `.gitignore` entries, and lifecycle scripts. + ([@iarna](https://github.com/iarna)) +* [`dbe7c9c`](https://github.com/npm/npm/commit/dbe7c9c74734be870d16dd61b9e7f746123011f6) + `nock@2.7.0`: Add matching based on query strings. + ([@othiym23](https://github.com/othiym23)) + +There are new versions of `strip-ansi` and `ansi-regex`, but npm only uses them +indirectly, so we pushed them down into their dependencies where they can get +updated at their own pace. + +* [`06b6ca5`](https://github.com/npm/npm/commit/06b6ca5b5333025f10c8d901628859bd4678e027) + undeduplicate `ansi-regex` ([@othiym23](https://github.com/othiym23)) +* [`b168e33`](https://github.com/npm/npm/commit/b168e33ad46faf47020a45f72ba8cec8c644bdb9) + undeduplicate `strip-ansi` ([@othiym23](https://github.com/othiym23)) + +### v2.13.0 (2015-07-02): + +#### FORREST IS OUT! LET'S SNEAK IN ALL THE THINGS! + +Well, not _everything_. Just a couple of goodies, like the new `npm ping` +command, and the ability to add files to the commits created by `npm version` +with the new version hooks. There's also a couple of bugfixes in `npm` itself +and some of its dependencies. Here we go! + +#### YES HELLO THIS IS NPM REGISTRY SORRY NO DOG HERE + +Yes, that's right! We now have a dedicated `npm ping` command. It's super simple +and super easy. You ping. We tell you whether you pinged right by saying hello +right back. This should help out folks dealing with things like proxy issues or +other registry-access debugging issues. Give it a shot! + +This addresses [#5750](https://github.com/npm/npm/issues/5750), and will help +with the `npm doctor` stuff described in +[#6756](https://github.com/npm/npm/issues/6756). + +* [`f1f7a85`](https://github.com/npm/npm/commit/f1f7a85) + Add ping command to CLI + ([@michaelnisi](https://github.com/michaelnisi)) +* [`8cec629`](https://github.com/npm/npm/commit/8cec629) + Add ping command to npm-registry-client + ([@michaelnisi](https://github.com/michaelnisi)) +* [`0c0c92d`](https://github.com/npm/npm/0c0c92d) + Fixed ping command issues (added docs, tests, fixed minor bugs, etc) + ([@zkat](https://github.com/zkat)) + +#### I'VE WANTED THIS FOR `version` SINCE LIKE LITERALLY FOREVER AND A DAY + +Seriously! This patch lets you add files to the `version` commit before it's +made, So you can add additional metadata files, more automated changes to +`package.json`, or even generate `CHANGELOG.md` automatically pre-commit if +you're into that sort of thing. I'm so happy this is there I can't even. Do you +have other fun usecases for this? Tell +[npmbot (@npmjs)](http://twitter.com/npmjs) about it! + +* [`582f170`](https://github.com/npm/npm/commit/582f170) + [#8620](https://github.com/npm/npm/issues/8620) version: Allow scripts to add + files to the commit. + ([@jamestalmage](https://github.com/jamestalmage)) + +#### ALL YOUR FILE DESCRIPTORS ARE BELONG TO US + +We've had problems in the past with things like `EMFILE` errors popping up when +trying to install packages with a bunch of dependencies. Isaac patched up +[`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to handle this case +better, so we should be seeing fewer of those. + +* [`022691a`](https://github.com/npm/npm/commit/022691a) + `graceful-fs@4.1.2`: Updated so we can monkey patch globally. + ([@isaacs](https://github.com/isaacs)) +* [`c9fb0fd`](https://github.com/npm/npm/commit/c9fb0fd) + Globally monkey-patch graceful-fs. This should fix some errors when installing + packages with lots of dependencies. + ([@isaacs](https://github.com/isaacs)) + +#### READ THE FINE DOCS. THEY'VE IMPROVED + +* [`5587d0d`](https://github.com/npm/npm/commit/5587d0d) + Nice clarification for `directories.bin` + ([@ujane](https://github.com/ujane)) +* [`20673c7`](https://github.com/npm/npm/commit/20673c7) + Hey, Windows folks! Check out + [`nvm-windows`](https://github.com/coreybutler/nvm-windows) + ([@ArtskydJ](https://github.com/ArtskydJ)) + +#### MORE NUMBERS! MORE VALUE! + +* [`5afa2d5`](https://github.com/npm/npm/commit/5afa2d5) + `validate-npm-package-name@2.2.2`: Documented package name rules in README + ([@zeusdeux](https://github.com/zeusdeux)) +* [`021f4d9`](https://github.com/npm/npm/commit/021f4d9) + `rimraf@2.4.1`: [#74](https://github.com/isaacs/rimraf/issues/74) Use async + function for bin (to better handle Window's `EBUSY`) + ([@isaacs](https://github.com/isaacs)) +* [`5223432`](https://github.com/npm/npm/commit/5223432) + `osenv@0.1.3`: Use `os.homedir()` polyfill for more reliable output. io.js + added the function and the polyfill does a better job than the prior solution. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`8ebbc90`](https://github.com/npm/npm/commit/8ebbc90) + `npm-cache-filename@1.0.2`: Make sure different git references get different + cache folders. This should prevent `foo/bar#v1.0` and `foo/bar#master` from + sharing the same cache folder. + ([@tomekwi](https://github.com/tomekwi)) +* [`367b854`](https://github.com/npm/npm/commit/367b854) + `lru-cache@2.6.5`: Minor test/typo changes + ([@isaacs](https://github.com/isaacs)) +* [`9fcae61`](https://github.com/npm/npm/commit/9fcae61) + `glob@5.0.13`: Tiny doc change + stop firing 'match' events for ignored items. + ([@isaacs](https://github.com/isaacs)) + +#### OH AND ONE MORE THING + +* [`7827249`](https://github.com/npm/npm/commit/7827249) + `PeerDependencies` errors now include the package version. + ([@NickHeiner](https://github.com/NickHeiner)) + +### v2.12.1 (2015-06-25): + +#### HEY WHERE DID EVERYBODY GO + +I keep [hearing some commotion](https://github.com/npm/npm/releases/tag/v3.0.0). +Is there something going on? Like, a party or something? Anyway, here's a small +release with at least two significant bug fixes, at least one of which some of +you have been waiting for for quite a while. + +#### REMEMBER WHEN I SAID "REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS?"? + +`npm@2.12.0` has a change that introduces a fix for a permissions problem +whereby the `_locks` directory in the cache directory can up being owned by +root. The fix in 2.12.0 takes care of that problem, but introduces a new +problem for Windows users where npm tries to call `process.getuid()`, which +doesn't exist on Windows. It was easy enough to fix (but more or less +impossible to test, thanks to all the external dependencies involved with +permissions and platforms and whatnot), but as a result, Windows users might +want to skip `npm@2.12.0` and go straight to `npm@2.12.1`. Sorry about that! + +* [`7e5da23`](https://github.com/npm/npm/commit/7e5da238ee869201fdb9027c27b79b0f76b440a8) + When using the new, "fixed" cache directory creator, be extra-careful to not + call `process.getuid()` on platforms that lack it. + ([@othiym23](https://github.com/othiym23)) + +#### WHEW! ALL DONE FIXING GIT FOREVER! + +New npm CLI team hero [@zkat](https://github.com/zkat) has finally (FINALLY) +fixed the regression somebody (hi!) introduced a couple months ago whereby git +URLs of the format `git+ssh://user@githost.com:org/repo.git` suddenly stopped +working, and also started being saved (and cached) incorrectly. I am 100% sure +there are absolutely no more bugs in the git caching code at all ever. Mm hm. +Yep. Pretty sure. Maybe. Hmm... I hope. + +*Sighs audibly.* + +[Let us know](http://github.com/npm/npm/issues/new) if we broke something else +with this fix. + +* [`94ca4a7`](https://github.com/npm/npm/commit/94ca4a711619ba8e40ce3d20bc42b13cdb7611b7) + [#8031](https://github.com/npm/npm/issues/8031) Even though + `git+ssh://user@githost.com:org/repo.git` isn't a URL, treat it like one for + the purposes of npm. ([@zkat](https://github.com/zkat)) +* [`e7f56e5`](https://github.com/npm/npm/commit/e7f56e5a97fcf1c52d5c5bee71303b0126129815) + [#8031](https://github.com/npm/npm/issues/8031) `normalize-git-url@2.0.0`: + Handle git URLs (and URL-like remote refs) in a manner consistent with npm's + docs. ([@zkat](https://github.com/zkat)) + +#### YEP, THERE ARE STILL DEPENDENCY UPGRADES + +* [`679bf47`](https://github.com/npm/npm/commit/679bf4745ac2cfbb01c9ce273e189807fd04fa33) + [#40](http://github.com/npm/read-installed/issues/40) `read-installed@4.0.1`: + Handle prerelease versions in top-level dependencies not in `package.json` + without marking those packages as invalid. + ([@benjamn](https://github.com/benjamn)) +* [`3a67410`](https://github.com/npm/npm/commit/3a6741068c9119174c920496778aeee870ebdac0) + `tap@1.3.1` ([@isaacs](https://github.com/isaacs)) +* [`151904a`](https://github.com/npm/npm/commit/151904af39dc24567f8c98529a2a64a4dbcc960a) + `nopt@3.0.3` ([@isaacs](https://github.com/isaacs)) + +### v2.12.0 (2015-06-18): + +#### REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS? + +About [a million people](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+EACCES+_locks) +have filed issues related to having a tough time using npm after they've run +npm once or twice with sudo. "Don't worry about it!" I said. "We've fixed all +those permissions problems ages ago! Use this one weird trick and you'll never +have to deal with this again!" + +Well, uh, if you run npm with root the first time you run npm on a machine, it +turns out that the directory npm uses to store lockfiles ends up being owned by +the wrong user (almost always root), and that can, well, it can cause problems +sometimes. By which I mean every time you run npm without being root it'll barf +with `EACCES` errors. Whoops! + +This is an obnoxious regression, and to prevent it from recurring, we've made +it so that the cache, cached git remotes, and the lockfile directories are all +created and maintained using the same utilty module, which not only creates the +relevant paths with the correct permissions, but will fix the permissions on +those directories (if it can) when it notices that they're broken. An `npm +install` run as root ought to be sufficient to fix things up (and if that +doesn't work, first tell us about it, and then run `sudo chown -R $(whoami) +$HOME/.npm`) + +Also, I apologize for inadvertently gaslighting any of you by claiming this bug +wasn't actually a bug. I do think we've got this permanently dealt with now, +but I'll be paying extra-close attention to permissions issues related to the +cache for a while. + +* [`85d1a53`](https://github.com/npm/npm/commit/85d1a53d7b5e0fc04823187e522ae3711ede61fa) + Set permissions on lock directory to the owner of the process. + ([@othiym23](https://github.com/othiym23)) + +#### I WENT TO NODECONF AND ALL I GOT WAS THIS LOUSY SPDX T-SHIRT + +That's not literally true. We spent very little time discussing SPDX, +[@kemitchell](https://github.com/kemitchell) is a champ, and I had a lot of fun +playing drum & bass to a mostly empty Boogie Barn and only ended up with one +moderately severe cold for my pains. Another winner of a NodeConf! (I would +probably wear a SPDX T-shirt if somebody gave me one, though.) + +A bunch of us did have a spirited discussion of the basics of open-source +intellectual property, and the convergence of me, +[@kemitchell](https://github.com/kemitchell), and +[@jandrieu](https://github.com/jandrieu) in one place allowed us to hammmer out +a small but significant issue that had been bedeviling early adopters of the +new SPDX expression syntax in `package.json` license fields: how to deal with +packages that are left without a license on purpose. + +Refer to [the docs](https://github.com/npm/npm/blob/16a3dd545b10f8a2464e2037506ce39124739b41/doc/files/package.json.md#license) +for the specifics, but the short version is that instead of using +`LicenseRef-LICENSE` for proprietary licenses, you can now use either +`UNLICENSED` if you want to make it clear that you don't _want_ your software +to be licensed (and want npm to stop warning you about this), or `SEE LICENSE +IN <filename>` if there's a license with custom text you want to use. At some +point in the near term, we'll be updating npm to verify that the mentioned +file actually exists, but for now you're all on the honor system. + +* [`4827fc7`](https://github.com/npm/npm/commit/4827fc784117c17f35dd9b51b21d1eff6094f661) + [#8557](https://github.com/npm/npm/issues/8557) + `normalize-package-data@2.2.1`: Allow `UNLICENSED` and `SEE LICENSE IN + <filename>` in "license" field of `package.json`. + ([@kemitchell](https://github.com/kemitchell)) +* [`16a3dd5`](https://github.com/npm/npm/commit/16a3dd545b10f8a2464e2037506ce39124739b41) + [#8557](https://github.com/npm/npm/issues/8557) Document the new accepted + values for the "license" field. + ([@kemitchell](https://github.com/kemitchell)) +* [`8155311`](https://github.com/npm/npm/commit/81553119350deaf199e79e38e35b52a5c8ad206c) + [#8557](https://github.com/npm/npm/issues/8557) `init-package-json@1.7.0`: + Support new "license" field values at init time. + ([@kemitchell](https://github.com/kemitchell)) + +#### SMALLISH BUG FIXES + +* [`9d8cac9`](https://github.com/npm/npm/commit/9d8cac94a258db648a2b1069b1c8c6529c79d013) + [#8548](https://github.com/npm/npm/issues/8548) Remove extraneous newline + from `npm view` output, making it easier to use in shell scripts. + ([@eush77](https://github.com/eush77)) +* [`765fd4b`](https://github.com/npm/npm/commit/765fd4bfca8ea3e2a4a399765b17eec40a3d893d) + [#8521](https://github.com/npm/npm/issues/8521) When checking for outdated + packages, or updating packages, raise an error when the registry is + unreachable instead of silently "succeeding". + ([@ryantemple](https://github.com/ryantemple)) + +#### SMALLERISH DOCUMENTATION TWEAKS + +* [`5018335`](https://github.com/npm/npm/commit/5018335ce1754a9f771954ecbc1a93acde9b8c0a) + [#8365](https://github.com/npm/npm/issues/8365) Add details about which git + environment variables are whitelisted by npm. + ([@nmalaguti](https://github.com/nmalaguti)) +* [`bed9edd`](https://github.com/npm/npm/commit/bed9edddfdcc6d22a80feab33b53e4ef9172ec72) + [#8554](https://github.com/npm/npm/issues/8554) Fix typo in version docs. + ([@rainyday](https://github.com/rainyday)) + +#### WELL, I GUESS THERE ARE MORE DEPENDENCY UPGRADES + +* [`7ce2f06`](https://github.com/npm/npm/commit/7ce2f06f6f34d469b1d2e248084d4f3fef10c05e) + `request@2.58.0`: Refactor tunneling logic, and use `extend` instead of + abusing `util._extend`. ([@simov](https://github.com/simov)) +* [`e6c6195`](https://github.com/npm/npm/commit/e6c61954aad42e20eec49745615c7640b2026a6c) + `nock@2.6.0`: Refined interception behavior. + ([@pgte](https://github.com/pgte)) +* [`9583cc3`](https://github.com/npm/npm/commit/9583cc3cb192c2fced006927cfba7cd37b588605) + `fstream-npm@1.0.3`: Ensure that `main` entry in `package.json` is always + included in the bundled package tarball. + ([@coderhaoxin](https://github.com/coderhaoxin)) +* [`df89493`](https://github.com/npm/npm/commit/df894930f2716adac28740b29b2e863170919990) + `fstream@1.0.7` ([@isaacs](https://github.com/isaacs)) +* [`9744049`](https://github.com/npm/npm/commit/974404934758124aa8ae5b54f7d5257c3bd6b588) + `dezalgo@1.0.3`: `dezalgo` should be usable in the browser, and can be now + that `asap` has been upgraded to be browserifiable. + ([@mvayngrib](https://github.com/mvayngrib)) + +### v2.11.3 (2015-06-11): + +This was a very quiet week. This release was done by +[@iarna](https://github.com/iarna), while the rest of the team hangs out at +NodeConf Adventure! + +#### TESTS IN 0.8 FAIL LESS + +* [`5b3b3c2`](https://github.com/npm/npm/commit/5b3b3c2) + [#8491](//github.com/npm/npm/pull/8491) + Updates a test to use only 0.8 compatible features + ([@watilde](https://github.com/watilde)) + +#### THE TREADMILL OF UPDATES NEVER CEASES + +* [`9f439da`](https://github.com/npm/npm/commit/9f439da) + `spdx@0.4.1`: License range updates + ([@kemitchell](https://github.com/kemitchell)) +* [`2dd055b`](https://github.com/npm/npm/commit/2dd055b) + `normalize-package-data@2.2.1`: Fixes a crashing bug when the package.json + `scripts` property is not an object. + ([@iarna](https://github.com/iarna)) +* [`e02e85d`](https://github.com/npm/npm/commit/e02e85d) + `osenv@0.1.2`: Switches to using the `os-tmpdir` module instead of + `os.tmpdir()` for greate consistency in behavior between node versions. + ([@iarna](https://github.com/iarna)) +* [`a6f0265`](https://github.com/npm/npm/commit/a6f0265) + `ini@1.3.4` ([@isaacs](https://github.com/isaacs)) +* [`7395977`](https://github.com/npm/npm/commit/7395977) + `rimraf@2.4.0` ([@isaacs](https://github.com/isaacs)) + +### v2.11.2 (2015-06-04): + +Another small release this week, brought to you by the latest addition to the +CLI team, [@zkat](https://github.com/zkat) (Hi, all!) + +Mostly small documentation tweaks and version updates. Oh! And `npm outdated` +is actually sorted now. Rejoice! + +It's gonna be a while before we get another palindromic version number. Enjoy it +while it lasts. :3 + +#### QUALITY OF LIFE HAS NEVER BEEN BETTER + +* [`31aada4`](https://github.com/npm/npm/commit/31aada4ccc369c0903ff7f233f464955d12c6fe2) + [#8401](https://github.com/npm/npm/issues/8401) `npm outdated` output is just + that much nicer to consume now, due to sorting by name. + ([@watilde](https://github.com/watilde)) +* [`458a919`](https://github.com/npm/npm/commit/458a91925d8b20c5e672ba71a86745aad654abaf) + [#8469](https://github.com/npm/npm/pull/8469) Explicitly set `cwd` for + `preversion`, `version`, and `postversion` scripts. This makes the scripts + findable relative to the root dir. + ([@alexkwolfe](https://github.com/alexkwolfe)) +* [`55d6d71`](https://github.com/npm/npm/commit/55d6d71562e979e745c9db88861cc39f99b9f3ec) + Ensure package name and version are included in display during `npm version` + lifecycle execution. Gets rid of those little `undefined`s in the console. + ([@othiym23](https://github.com/othiym23)) + +#### WORDS HAVE NEVER BEEN QUITE THIS READABLE + +* [`3901e49`](https://github.com/npm/npm/commit/3901e4974c800e7f9fba4a5b2ff88da1126d5ef8) + [#8462](https://github.com/npm/npm/pull/8462) English apparently requires + correspondence between indefinite articles and attached nouns. + ([@Enet4](https://github.com/Enet4)) +* [`5a744e4`](https://github.com/npm/npm/commit/5a744e4b143ef7b2f50c80a1d96fdae4204d452b) + [#8421](https://github.com/npm/npm/pull/8421) The effect of `npm prune`'s + `--production` flag and how to use it have been documented a bit better. + ([@foiseworth](https://github.com/foiseworth)) +* [`eada625`](https://github.com/npm/npm/commit/eada625993485f0a2c5324b06f02bfa0a95ce4bc) + We've updated our `.mailmap` and `AUTHORS` files to make sure credit is given + where credit is due. ([@othiym23](https://github.com/othiym23)) + +#### VERSION NUMBERS HAVE NEVER BEEN BIGGER + +* [`c929fd1`](https://github.com/npm/npm/commit/c929fd1d0604b5878ed05706447e078d3e41f5b3) + `readable-stream@1.1.13`: Manually deduped `v1.1.13` (streams3) to make + deduping more reliable on `npm@<3`. ([@othiym23](https://github.com/othiym23)) +* [`a9b4b78`](https://github.com/npm/npm/commit/a9b4b78dcc85571fd1cdd737903f7f37a5e6a755) + `request@2.57.0`: Replace dependency on IncomingMessage's `.client` with + `.socket` as the former was deprecated in io.js 2.2.0. + ([@othiym23](https://github.com/othiym23)) +* [`4b5e557`](https://github.com/npm/npm/commit/4b5e557a23cdefd521ad154111e3d4dcc81f1cdb) + `abbrev@1.0.7`: Better testing, with coverage. + ([@othiym23](https://github.com/othiym23)) +* [`561affe`](https://github.com/npm/npm/commit/561affee21df9bbea5a47298f2452f533be8f359) + `semver@4.3.6`: .npmignore added for less cruft, and better testing, with coverage. + ([@othiym23](https://github.com/othiym23)) +* [`60aef3c`](https://github.com/npm/npm/commit/60aef3cf5d84d757752db3eb8ede2cb385469e7b) + `graceful-fs@3.0.8`: io.js fixes. + ([@zkat](https://github.com/zkat)) +* [`f8bd453`](https://github.com/npm/npm/commit/f8bd453b1a1c46ba7666cb166595e8a011eae443) + `config-chain@1.1.9`: Added MIT license to package.json + ([@zkat](https://github.com/zkat)) + +### v2.11.1 (2015-05-28): + +This release brought to you from poolside at the Omni Amelia Island Resort and +JSConf 2015, which is why it's so tiny. + +#### CONFERENCE WIFI CAN'T STOP THESE BUG FIXES + +* [`cf109a6`](https://github.com/npm/npm/commit/cf109a682f38a059a994da953d5c1b4aaece5e2f) + [#8381](https://github.com/npm/npm/issues/8381) Documented a subtle gotcha + with `.npmrc`, which is that it needs to have its permissions set such that + only the owner can read or write the file. + ([@colakong](https://github.com/colakong)) +* [`180da67`](https://github.com/npm/npm/commit/180da67c9fa53103d625e2f031626c2453c7ebcd) + [#8365](https://github.com/npm/npm/issues/8365) Git 2.3 adds support for + `GIT_SSH_COMMAND`, which allows you to pass an explicit git command (with, + for example, a specific identity passed in on the command line). + ([@nmalaguti](https://github.com/nmalaguti)) + +#### MY (VIRGIN) PINA COLADA IS GETTING LOW, BETTER UPGRADE THESE DEPENDENCIES + +* [`b72de41`](https://github.com/npm/npm/commit/b72de41c5cc9f0c46d3fa8f062c75bd273641474) + `node-gyp@2.0.0`: Use a newer version of `gyp`, and generally improve support + for Visual Studios and Windows. + ([@TooTallNate](https://github.com/TooTallNate)) +* [`8edbe21`](https://github.com/npm/npm/commit/8edbe210af41e8f248f5bb92c72de92f54fda3b1) + `node-gyp@2.0.1`: Don't crash when Python's version doesn't parse as valid + semver. ([@TooTallNate](https://github.com/TooTallNate)) +* [`ba0e0a8`](https://github.com/npm/npm/commit/ba0e0a845a4f29717aba566b416a27d1a22f5d08) + `glob@5.0.10`: Add coverage to tests. ([@isaacs](https://github.com/isaacs)) +* [`7333701`](https://github.com/npm/npm/commit/7333701b5d4f01673f37d64992c63c4e15864d6d) + `request@2.56.0`: Bug fixes and dependency upgrades. + ([@simov](https://github.com/simov)) + +### v2.11.0 (2015-05-21): + +For the first time in a very long time, we've added new events to the life +cycle used by `npm run-script`. Since running `npm version (major|minor|patch)` +is typically the last thing many developers do before publishing their updated +packages, it makes sense to add life cycle hooks to run tests or otherwise +preflight the package before doing a full publish. Thanks, as always, to the +indefatigable [@watilde](https://github.com/watilde) for yet another great +usability improvement for npm! + +#### FEATURELETS + +* [`b07f7c7`](https://github.com/npm/npm/commit/b07f7c7c1e5021730b3c320f1b3a46e70f8a21ff) + [#7906](https://github.com/npm/npm/issues/7906) + Add new [`scripts`](https://github.com/npm/npm/blob/master/doc/misc/npm-scripts.md) to + allow you to run scripts before and after + the [`npm version`](https://github.com/npm/npm/blob/master/doc/cli/npm-version.md) + command has run. This makes it easy to, for instance, require that your + test suite passes before bumping the version by just adding `"preversion": + "npm test"` to the scripts section of your `package.json`. + ([@watilde](https://github.com/watilde)) +* [`8a46136`](https://github.com/npm/npm/commit/8a46136f42e416cbadb533bcf89d73d681ed421d) + [#8185](https://github.com/npm/npm/issues/8185) + When we get a "not found" error from the registry, we'll now check to see + if the package name you specified is invalid and if so, give you a better + error message. ([@thefourtheye](https://github.com/thefourtheye)) + +#### BUG FIXES + +* [`9bcf573`](https://github.com/npm/npm/commit/9bcf5730bd0316f210dafea898afe9103849cea9) + [#8324](https://github.com/npm/npm/pull/8324) On Windows, when you've configured a + custom `node-gyp`, run it with node itself instead of using the default open action (which + is almost never what you want). ([@bangbang93](https://github.com/bangbang93)) +* [`1da9b04`](https://github.com/npm/npm/commit/1da9b0411d3416c7fca17d08cbbcfca7ae86e92d) + [#7195](https://github.com/npm/npm/issues/7195) + [#7260](https://github.com/npm/npm/issues/7260) `npm-registry-client@6.4.0`: + (Re-)allow publication of existing mixed-case packages (part 1). + ([@smikes](https://github.com/smikes)) +* [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) + [#7195](https://github.com/npm/npm/issues/7195) + [#7260](https://github.com/npm/npm/issues/7260) + `normalize-package-data@2.2.0`: (Re-)allow publication of existing mixed-case + packages (part 2). ([@smikes](https://github.com/smikes)) + +#### DOCUMENTATION IMPROVEMENTS + +* [`f62ee05`](https://github.com/npm/npm/commit/f62ee05333b141539a8e851c620dd2e82ff06860) + [#8314](https://github.com/npm/npm/issues/8314) Update the README to warn + folks away from using the CLI's internal API. For the love of glob, just use a + child process to run the CLI! ([@claycarpenter](https://github.com/claycarpenter)) +* [`1093921`](https://github.com/npm/npm/commit/1093921c04db41ab46db24a170a634a4b2acd8d9) + [#8279](https://github.com/npm/npm/pull/8279) + Update the documentation to note that, yes, you can publish scoped packages to the + public registry now! ([@mantoni](https://github.com/mantoni)) +* [`f87cde5`](https://github.com/npm/npm/commit/f87cde5234a760d3e515ffdaacaed6f5b71dbf44) + [#8292](https://github.com/npm/npm/pull/8292) + Fix typo in an example and grammar in the description in + the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). + ([@vshih](https://github.com/vshih)) +* [`d3526ce`](https://github.com/npm/npm/commit/d3526ceb09a0c29fdb7d4124536ae09057d033e7) + Improve the formatting in + the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). + ([@othiym23](https://github.com/othiym23)) +* [`19fe6d2`](https://github.com/npm/npm/commit/19fe6d20883e28956ff916fe4dae42d73ee6195b) + [#8311](https://github.com/npm/npm/pull/8311) + Update [README.md](https://github.com/npm/npm#readme) to use syntax highlighting in + its code samples and bits of shell scripts. ([@SimenB](https://github.com/SimenB)) + +#### DEPENDENCY UPDATES! ALWAYS AND FOREVER! + +* [`fc52160`](https://github.com/npm/npm/commit/fc52160d0223226fffe4166f42fdfd3b899b3c1e) + [#4700](https://github.com/npm/npm/issues/4700) [#5044](https://github.com/npm/npm/issues/5044) + `init-package-json@1.6.0`: Make entering an invalid version while running `npm init` give + you an immediate error and prompt you to correct it. ([@watilde](https://github.com/watilde)) +* [`738853e`](https://github.com/npm/npm/commit/738853eb1f55636476a2a410c2c04732eec9d51e) + [#7763](https://github.com/npm/npm/issues/7763) `fs-write-stream-atomic@1.0.3`: Fix a bug + where errors would not propagate, making error messages unhelpful. + ([@iarna](https://github.com/iarna)) +* [`6d74a2d`](https://github.com/npm/npm/commit/6d74a2d2ac7f92750cf6a2cfafae1af23b569098) + `npm-package-arg@4.0.1`: Fix tests on windows ([@Bacra](https://github.com)) and with + more recent `hosted-git-info`. ([@iarna](https://github.com/iarna)) +* [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) + `hosted-git-info@2.1.4`: Correct spelling in its documentation. + ([@iarna](https://github.com/iarna)) +* [`d7956ca`](https://github.com/npm/npm/commit/d7956ca17c057d5383ff0d3fc5cf6ac2940b034d) + `glob@5.0.7`: Fix a bug where unusual error conditions could make + further use of the module fail. ([@isaacs](https://github.com/isaacs)) +* [`44f7d74`](https://github.com/npm/npm/commit/44f7d74c5d3181d37da7ea7949c86b344153f8d9) + `tap@1.1.0`: Update to the most recent tap to get a whole host of bug + fixes and integration with [coveralls](https://coveralls.io/). + ([@isaacs](https://github.com/isaacs)) +* [`c21e8a8`](https://github.com/npm/npm/commit/c21e8a8d94bcf0ad79dc583ddc53f8366d4813b3) + `nock@2.2.0` ([@othiym23](https://github.com/othiym23)) + +#### LICENSE FILES FOR THE LICENSE GOD + +* Add missing ISC license file to package ([@kasicka](https://github.com/kasicka)): + * [`aa9908c`](https://github.com/npm/npm/commit/aa9908c20017729673b9d410b77f9a16b7aae8a4) `realize-package-specifier@3.0.1` + * [`23a3b1a`](https://github.com/npm/npm/commit/23a3b1a726b9176c70ce0ccf3cd9d25c54429bdf) `fs-vacuum@1.2.6` + * [`8e04bba`](https://github.com/npm/npm/commit/8e04bba830d4353d84751d21803cd127c96153a7) `dezalgo@1.0.2` + * [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) `hosted-git-info@2.1.4` + * [`6a54917`](https://github.com/npm/npm/commit/6a54917fbd4df995495a95d4b548defd44b77c93) `write-file-atomic@1.1.2` + * [`971f92c`](https://github.com/npm/npm/commit/971f92c4a4e5514217d1e4db45d1ccf71a60ff19) `async-some@1.0.2` + * [`67b50b7`](https://github.com/npm/npm/commit/67b50b7667a42bb3340a660eb2e617e1a554d2d4) `normalize-git-url@1.0.1` + +#### SPDX LICENSE UPDATES + +* Switch license to + [BSD-2-Clause](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) from + plain "BSD" ([@isaacs](https://github.com/isaacs)): + * [`efdb733`](https://github.com/npm/npm/commit/efdb73332eeedcad4c609796929070b62abb37ab) `npm-user-validate@0.1.2` + * [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) `normalize-package-data@2.2.0` +* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from + [BSD](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) + ([@isaacs](https://github.com/isaacs)): + * [`c300956`](https://github.com/npm/npm/commit/c3009565a964f0ead4ac4ab234b1a458e2365f17) `block-stream@0.0.8` + * [`1de1253`](https://github.com/npm/npm/commit/1de125355765fecd31e682ed0ff9d2edbeac0bb0) `lockfile@1.0.1` + * [`0d5698a`](https://github.com/npm/npm/commit/0d5698ab132e376c7aec93ae357c274932116220) `osenv@0.1.1` + * [`2e84921`](https://github.com/npm/npm/commit/2e84921474e1ffb18de9fce4616e73171fa8046d) `abbrev@1.0.6` + * [`872fac9`](https://github.com/npm/npm/commit/872fac9d10c11607e4d0348c08a683b84e64d30b) `chmodr@0.1.1` + * [`01eb7f6`](https://github.com/npm/npm/commit/01eb7f60acba584346ad8aae846657899f3b6887) `chownr@0.0.2` + * [`294336f`](https://github.com/npm/npm/commit/294336f0f31c7b9fe31a50075ed750db6db134d1) `read@1.0.6` + * [`ebdf6a1`](https://github.com/npm/npm/commit/ebdf6a14d17962cdb7128402c53b452f91d44ca7) `graceful-fs@3.0.7` +* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from + [MIT](http://spdx.org/licenses/MIT.html#licenseText) + ([@isaacs](https://github.com/isaacs)): + * [`e5d237f`](https://github.com/npm/npm/commit/e5d237fc0f436dd2a89437ebf8a9632a2e35ccbe) `nopt@3.0.2` + * [`79fef14`](https://github.com/npm/npm/commit/79fef1421b78f044980f0d1bf0e97039b6992710) `rimraf@2.3.4` + * [`22527da`](https://github.com/npm/npm/commit/22527da4816e7c2746cdc0317c5fb4a85152d554) `minimatch@2.0.8` + * [`882ac87`](https://github.com/npm/npm/commit/882ac87a6c4123ca985d7ad4394ea5085e5b0ef5) `lru-cache@2.6.4` + * [`9d9d015`](https://github.com/npm/npm/commit/9d9d015a2e972f68664dda54fbb204db28b21ede) `npmlog@1.2.1` + +### v2.10.1 (2015-05-14): + +#### BUG FIXES & DOCUMENTATION TWEAKS + +* [`dc77520`](https://github.com/npm/npm/commit/dc7752013ffce13a3d3f13e518a0052c22fc1158) + When getting back a 404 from a request to a private registry that uses a + registry path that extends past the root + (`http://registry.enterprise.co/path/to/registry`), display the name of the + nonexistent package, rather than the first element in the registry API path. + Sorry, Artifactory users! ([@hayes](https://github.com/hayes)) +* [`f70dea9`](https://github.com/npm/npm/commit/f70dea9b4766f6eaa55012c3e8087e9cb04fd4ce) + Make clearer that `--registry` can be used on a per-publish basis to push a + package to a non-default registry. ([@mischkl](https://github.com/mischkl)) +* [`a3e26f5`](https://github.com/npm/npm/commit/a3e26f5b4465991a941a325468ab7725670d2a94) + Did you know that GitHub shortcuts can have commit-ishes included + (`org/repo#branch`)? They can! ([@iarna](https://github.com/iarna)) +* [`0e2c091`](https://github.com/npm/npm/commit/0e2c091a539b61fdc60423b6bbaaf30c24e4b1b8) + Some errors from `readPackage` were being swallowed, potentially leading to + invalid package trees on disk. ([@smikes](https://github.com/smikes)) + +#### DEPENDENCY UPDATES! STILL! MORE! AGAIN! + +* [`0b901ad`](https://github.com/npm/npm/commit/0b901ad0811d84dda6ca0755a9adc8d47825edd0) + `lru-cache@2.6.3`: Removed some cruft from the published package. + ([@isaacs](https://github.com/isaacs)) +* [`d713e0b`](https://github.com/npm/npm/commit/d713e0b14930c563e3fdb6ac6323bae2a8924652) + `mkdirp@0.5.1`: Made compliant with `standard`, dropped support for Node 0.6, + added (Travis) support for Node 0.12 and io.js. + ([@isaacs](https://github.com/isaacs)) +* [`a2d6578`](https://github.com/npm/npm/commit/a2d6578b6554c5c9d48fe2006751759f4da57520) + `glob@1.0.3`: Updated to use `tap@1`. ([@isaacs](https://github.com/isaacs)) +* [`64cd1a5`](https://github.com/npm/npm/commit/64cd1a570aaa5f24ccba190948ec9456297c97f5) + `fstream@ 1.0.6`: Made compliant with [`standard`](http://npm.im/standard) + (done by [@othiym23](https://github.com/othiym23), and then debugged and + fixed by [@iarna](https://github.com/iarna)), and license changed to ISC. + ([@othiym23](https://github.com/othiym23) / + [@iarna](https://github.com/iarna)) +* [`b527a7c`](https://github.com/npm/npm/commit/b527a7c2ba3c4002f443dd2c536ff4ff41a38b86) + `which@1.1.1`: Callers can pass in their own `PATH` instead of relying on + `process.env`. ([@isaacs](https://github.com/isaacs)) + +### v2.10.0 (2015-05-8): + +#### THE IMPLICATIONS ARE MORE PROFOUND THAN THEY APPEAR + +If you've done much development in The Enterprise®™, you know that keeping +track of software licenses is far more important than one might expect / hope / +fear. Tracking licenses is a hassle, and while many (if not most) of us have +(reluctantly) gotten around to setting a license to use by default with all our +new projects (even if it's just WTFPL), that's about as far as most of us think +about it. In big enterprise shops, ensuring that projects don't inadvertently +use software with unacceptably encumbered licenses is serious business, and +developers spend a surprising (and appalling) amount of time ensuring that +licensing is covered by writing automated checkers and other license auditing +tools. + +The Linux Foundation has been working on a machine-parseable syntax for license +expressions in the form of [SPDX](https://spdx.org/), an appropriately +enterprisey acronym. IP attorney and JavaScript culture hero [Kyle +Mitchell](http://kemitchell.com/) has put a considerable amount of effort into +bringing SPDX to JavaScript and Node. He's written +[`spdx.js`](https://github.com/kemitchell/spdx.js), a JavaScript SPDX +expression parser, and has integrated it into npm in a few different ways. + +For you as a user of npm, this means: + +* npm now has proper support for dual licensing in `package.json`, due to + SPDX's compound expression syntax. Run `npm help package.json` for details. +* npm will warn you if the `package.json` for your project is either missing a + `"license"` field, or if the value of that field isn't a valid SPDX + expression (pro tip: `"BSD"` becomes `"BSD-2-Clause"` in SPDX (unless you + really want one of its variants); `"MIT"` and `"ISC"` are fine as-is; the + [full list](https://github.com/shinnn/spdx-license-ids/blob/master/spdx-license-ids.json) + is its own package). +* `npm init` now demands that you use a valid SPDX expression when using it + interactively (pro tip: I mostly use `npm init -y`, having previously run + `npm config set init.license=MIT` / `npm config set init.author.email=foo` / + `npm config set init.author.name=me`). +* The documentation for `package.json` has been updated to tell you how to use + the `"license"` field properly with SPDX. + +In general, this shouldn't be a big deal for anybody other than people trying +to run their own automated license validators, but in the long run, if +everybody switches to this format, many people's lives will be made much +simpler. I think this is an important improvement for npm and am very thankful +to Kyle for taking the lead on this. Also, even if you think all of this is +completely stupid, just [choose a license](http://en.wikipedia.org/wiki/License-free_software) +anyway. Future you will thank past you someday, unless you are +[djb](http://cr.yp.to/), in which case you are djb, and more power to you. + +* [`8669f7d`](https://github.com/npm/npm/commit/8669f7d88c472ccdd60e140106ac43cca636a648) + [#8179](https://github.com/npm/npm/issues/8179) Document how to use SPDX in + `license` stanzas in `package.json`, including how to migrate from old busted + license declaration arrays to fancy new compound-license clauses. + ([@kemitchell](https://github.com/kemitchell)) +* [`98ad98c`](https://github.com/npm/npm/commit/98ad98cb11f3d3ba29a488ef1ab050b066d9c7f6) + [#8197](https://github.com/npm/npm/issues/8197) `init-package-json@1.5.0` + Ensure that packages bootstrapped with `npm init` use an SPDX-compliant + license expression. ([@kemitchell](https://github.com/kemitchell)) +* [`2ad3905`](https://github.com/npm/npm/commit/2ad3905e9139b0be2b22accf707b814469de813e) + [#8197](https://github.com/npm/npm/issues/8197) + `normalize-package-data@2.1.0`: Warn when a package is missing a license + declaration, or using a license expression that isn't valid SPDX. + ([@kemitchell](https://github.com/kemitchell)) +* [`127bb73`](https://github.com/npm/npm/commit/127bb73ccccc59a1267851c702d8ebd3f3a97e81) + [#8197](https://github.com/npm/npm/issues/8197) `tar@2.1.1`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`e9a933a`](https://github.com/npm/npm/commit/e9a933a9148180d9d799f99f4154f5110ff2cace) + [#8197](https://github.com/npm/npm/issues/8197) `once@1.3.2`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`412401f`](https://github.com/npm/npm/commit/412401fb6a19b18f3e02d97a24d4dafed650c186) + [#8197](https://github.com/npm/npm/issues/8197) `semver@4.3.4`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) + +As a corollary to the previous changes, I've put some work into making `npm +install` spew out fewer pointless warnings about missing values in transitive +dependencies. From now on, npm will only warn you about missing READMEs, +license fields, and the like for top-level projects (including packages you +directly install into your application, but we may relax that eventually). + +Practically _nobody_ liked having those warnings displayed for child +dependencies, for the simple reason that there was very little that anybody +could _do_ about those warnings, unless they happened to be the maintainers of +those dependencies themselves. Since many, many projects don't have +SPDX-compliant licenses, the number of warnings reached a level where they ran +the risk of turning into a block of visual noise that developers (read: me, and +probably you) would ignore forever. + +So I fixed it. If you still want to see the messages about child dependencies, +they're still there, but have been pushed down a logging level to `info`. You +can display them by running `npm install -d` or `npm install --loglevel=info`. + +* [`eb18245`](https://github.com/npm/npm/commit/eb18245f55fb4cd62a36867744bcd1b7be0a33e2) + Only warn on normalization errors for top-level dependencies. Transitive + dependency validation warnings are logged at `info` level. + ([@othiym23](https://github.com/othiym23)) + +#### BUG FIXES + +* [`e40e809`](https://github.com/npm/npm/commit/e40e8095d2bc9fa4eb8f01aa22067e0068fa8a54) + `tap@1.0.1`: TAP: The Next Generation. Fix up many tests to they work + properly with the new major version of `node-tap`. Look at all the colors! + ([@isaacs](https://github.com/isaacs)) +* [`f9314e9`](https://github.com/npm/npm/commit/f9314e97d26532c0ef2b03e98f3ed300b7cd5026) + `nock@1.9.0`: Minor tweaks and bug fixes. ([@pgte](https://github.com/pgte)) +* [`45c2b1a`](https://github.com/npm/npm/commit/45c2b1aaa051733fa352074994ae6e569fd51e8b) + [#8187](https://github.com/npm/npm/issues/8187) `npm ls` wasn't properly + recognizing dependencies installed from GitHub repositories as git + dependencies, and so wasn't displaying them as such. + ([@zornme](https://github.com/zornme)) +* [`1ab57c3`](https://github.com/npm/npm/commit/1ab57c38116c0403965c92bf60121f0f251433e4) + In some cases, `npm help` was using something that looked like a regular + expression where a glob pattern should be used, and vice versa. + ([@isaacs](https://github.com/isaacs)) + +### v2.9.1 (2015-04-30): + +#### WOW! MORE GIT FIXES! YOU LOVE THOSE! + +The first item below is actually a pretty big deal, as it fixes (with a +one-word change and a much, much longer test case (thanks again, +[@iarna](https://github.com/iarna))) a regression that's been around for months +now. If you're depending on multiple branches of a single git dependency in a +single project, you probably want to check out `npm@2.9.1` and verify that +things (again?) work correctly in your project. + +* [`178a6ad`](https://github.com/npm/npm/commit/178a6ad540215820d16217465a5f220d8c95a313) + [#7202](https://github.com/npm/npm/issues/7202) When caching git + dependencies, do so by the whole URL, including the branch name, so that if a + single application depends on multiple branches from the same repository (in + practice, multiple version tags), every install is of the correct version, + instead of reusing whichever branch the caching process happened to check out + first. ([@iarna](https://github.com/iarna)) +* [`63b79cc`](https://github.com/npm/npm/commit/63b79ccde092a9cb3b1f34abe43e1d2ba69c0dbf) + [#8084](https://github.com/npm/npm/issues/8084) Ensure that Bitbucket, + GitHub, and Gitlab dependencies are installed the same way as non-hosted git + dependencies, fixing `npm install --link`. + ([@laiso](https://github.com/laiso)) + +#### DOCUMENTATION FIXES AND TWEAKS + +These changes may seem simple and small (except Lin's fix to the package name +restrictions, which was more an egregious oversight on our part), but cleaner +documentation makes npm significantly more pleasant to use. I really appreciate +all the typo fixes, clarifications, and formatting tweaks people send us, and +am delighted that we get so many of these pull requests. Thanks, everybody! + +* [`ca478dc`](https://github.com/npm/npm/commit/ca478dcaa29b8f07cd6fe515a3c4518166819291) + [#8137](https://github.com/npm/npm/issues/8137) Somehow, we had failed to + clearly document the full restrictions on package names. + [@linclark](https://github.com/linclark) has now fixed that, although we will + take with us to our graves the reasons why the maximum package name length is 214 + characters (well, OK, it was that that was the longest name in the registry + when we decided to put a cap on the name length). + ([@linclark](https://github.com/linclark)) +* [`b574076`](https://github.com/npm/npm/commit/b5740767c320c1eff3576a8d63952534a0fbb936) + [#8079](https://github.com/npm/npm/issues/8079) Make the `npm shrinkwrap` + documentation use code formatting for examples consistently. It would be + great to do this for more commands HINT HINT. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`1ff636e`](https://github.com/npm/npm/commit/1ff636e2db3852a53e38c866fed7eafdacd307fc) + [#8105](https://github.com/npm/npm/issues/8105) Document that the global + `npmrc` goes in `$PREFIX/etc/npmrc`, instead of `$PREFIX/npmrc`. + ([@anttti](https://github.com/anttti)) +* [`c3f2f7c`](https://github.com/npm/npm/commit/c3f2f7c299342e1c1eccc55a976a63c607f51621) + [#8127](https://github.com/npm/npm/issues/8127) Document how to use `npm run + build` directly (hint: it's different from `npm build`!). + ([@mikemaccana](https://github.com/mikemaccana)) +* [`873e467`](https://github.com/npm/npm/commit/873e46757e1986761b15353f94580a071adcb383) + [#8069](https://github.com/npm/npm/issues/8069) Take the old, dead npm + mailing list address out of `package.json`. It seems that people don't have + much trouble figuring out how to report errors to npm. + ([@robertkowalski](https://github.com/robertkowalski)) + +#### ENROBUSTIFICATIONMENT + +* [`5abfc9c`](https://github.com/npm/npm/commit/5abfc9c9017da714e47a3aece750836b4f9af6a9) + [#7973](https://github.com/npm/npm/issues/7973) `npm run-script` completion + will only suggest run scripts, instead of including dependencies. If for some + reason you still wanted it to suggest dependencies, let us know. + ([@mantoni](https://github.com/mantoni)) +* [`4b564f0`](https://github.com/npm/npm/commit/4b564f0ce979dc74c09604f4d46fd25a2ee63804) + [#8081](https://github.com/npm/npm/issues/8081) Use `osenv` to parse the + environment's `PATH` in a platform-neutral way. + ([@watilde](https://github.com/watilde)) +* [`a4b6238`](https://github.com/npm/npm/commit/a4b62387b41848818973eeed056fd5c6570274f3) + [#8094](https://github.com/npm/npm/issues/8094) When we refactored the + configuration code to split out checking for IPv4 local addresses, we + inadvertently completely broke it by failing to return the values. In + addition, just the call to `os.getInterfaces()` could throw on systems where + querying the network configuration requires elevated privileges (e.g. Amazon + Lambda). Add the return, and trap errors so they don't cause npm to explode. + Thanks to [@mhart](https://github.com/mhart) for bringing this to our + attention! ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES WAIT FOR NO SOPHONT + +* [`000cd8b`](https://github.com/npm/npm/commit/000cd8b52104942ac3404f0ad0651d82f573da37) + `rimraf@2.3.3`: More informative assertions on argument validation failure. + ([@isaacs](https://github.com/isaacs)) +* [`530a2e3`](https://github.com/npm/npm/commit/530a2e369128270f3e098f0e9be061533003b0eb) + `lru-cache@2.6.2`: Revert to old key access-time behavior, as it was correct + all along. ([@isaacs](https://github.com/isaacs)) +* [`d88958c`](https://github.com/npm/npm/commit/d88958ca02ce81b027b9919aec539d0145875a59) + `minimatch@2.0.7`: Feature detection and test improvements. + ([@isaacs](https://github.com/isaacs)) +* [`3fa39e4`](https://github.com/npm/npm/commit/3fa39e4d492609d5d045033896dcd99f7b875329) + `nock@1.7.1` ([@pgte](https://github.com/pgte)) + +### v2.9.0 (2015-04-23): + +This week was kind of a breather to concentrate on fixing up the tests on the +`multi-stage` branch, and not mess with git issues for a little while. +Unfortunately, There are now enough severe git issues that we'll probably have +to spend another couple weeks tackling them. In the meantime, enjoy these two +small features. They're just enough to qualify for a semver-minor bump: + +#### NANOFEATURES + +* [`2799322`](https://github.com/npm/npm/commit/279932298ce5b589c5eea9439ac40b88b99c6a4a) + [#7426](https://github.com/npm/npm/issues/7426) Include local modules in `npm + outdated` and `npm update`. ([@ArnaudRinquin](https://github.com/ArnaudRinquin)) +* [`2114862`](https://github.com/npm/npm/commit/21148620fa03a582f4ec436bb16bd472664f2737) + [#8014](https://github.com/npm/npm/issues/8014) The prefix used before the + version on version tags is now configurable via `tag-version-prefix`. Be + careful with this one and read the docs before using it. + ([@kkragenbrink](https://github.com/kkragenbrink)) + +#### OTHER MINOR TWEAKS + +* [`18ce0ec`](https://github.com/npm/npm/commit/18ce0ecd2d94ad3af01e997f1396515892dd363c) + [#3032](https://github.com/npm/npm/issues/3032) `npm unpublish` will now use + the registry set in `package.json`, just like `npm publish`. This only + applies, for now, when unpublishing the entire package, as unpublishing a + single version requires the name be included on the command line and + therefore doesn't read from `package.json`. ([@watilde](https://github.com/watilde)) +* [`9ad2100`](https://github.com/npm/npm/commit/9ad210042242e51d52b2a8b633d8e59248f5faa4) + [#8008](https://github.com/npm/npm/issues/8008) Once again, when considering + what to install on `npm install`, include `devDependencies`. + ([@smikes](https://github.com/smikes)) +* [`5466260`](https://github.com/npm/npm/commit/546626059909dca1906454e820ca4e315c1795bd) + [#8003](https://github.com/npm/npm/issues/8003) Clarify the documentation + around scopes to make it easier to understand how they support private + packages. ([@smikes](https://github.com/smikes)) + +#### DEPENDENCIES WILL NOT STOP UNTIL YOU ARE VERY SLEEPY + +* [`faf65a7`](https://github.com/npm/npm/commit/faf65a7bbb2fad13216f64ed8f1243bafe743f97) + `init-package-json@1.4.2`: If there are multiple validation errors and + warnings, ensure they all get displayed (includes a rad new way of testing + `init-package-json` contributed by + [@michaelnisi](https://github.com/michaelnisi)). + ([@MisumiRize](https://github.com/MisumiRize)) +* [`7f10f38`](https://github.com/npm/npm/commit/7f10f38d29a8423d7cde8103fa7b64ac728da1e0) + `editor@1.0.0`: `1.0.0` is literally more than `0.1.0` (no change aside from + version number). ([@substack](https://github.com/substack)) +* [`4979af3`](https://github.com/npm/npm/commit/4979af3fcae5a3962383b7fdad3162381e62eefe) + [#6805](https://github.com/npm/npm/issues/6805) `npm-registry-client@6.3.3`: + Decode scoped package names sent by the registry so they look nicer. + ([@mmalecki](https://github.com/mmalecki)) + +### v2.8.4 (2015-04-16): + +This is the fourth release of npm this week, so it's mostly just landing a few +small outstanding PRs on dependencies and some tiny documentation tweaks. +`npm@2.8.3` is where the real action is. + +* [`ee2bd77`](https://github.com/npm/npm/commit/ee2bd77f3c64d38735d1d31028224a5c40422a9b) + [#7983](https://github.com/npm/npm/issues/7983) `tar@2.1.0`: Better error + reporting in corrupted tar files, and add support for the `fromBase` flag + (rescued from the dustbin of history by + [@deanmarano](https://github.com/deanmarano)). + ([@othiym23](https://github.com/othiym23)) +* [`d8eee6c`](https://github.com/npm/npm/commit/d8eee6cf9d2ff7aca68dfaed2de76824a3e0d9af) + `init-package-json@1.4.1`: Add support for a default author, and only add + scope to a package name once. ([@othiym23](https://github.com/othiym23)) +* [`4fc5d98`](https://github.com/npm/npm/commit/4fc5d98b785f601c60d4dc0a2c8674f0cccf6262) + `lru-cache@2.6.1`: Small tweaks to cache value aging and entry counting that + are irrelevant to npm. ([@isaacs](https://github.com/isaacs)) +* [`1fe5840`](https://github.com/npm/npm/commit/1fe584089f5bef133de5518aa26eaf6064be2bf7) + [#7946](https://github.com/npm/npm/issues/7946) Make `npm init` text + friendlier. ([@sandfox](https://github.com/sandfox)) + +### v2.8.3 (2015-04-15): + +#### TWO SMALL GIT TWEAKS + +This is the last of a set of releases intended to ensure npm's git support is +robust enough that we can stop working on it for a while. These fixes are +small, but prevent a common crasher and clear up one of the more confusing +error messages coming out of npm when working with repositories hosted on git. + +* [`387f889`](https://github.com/npm/npm/commit/387f889c0e8fb617d9cc9a42ed0a3ec49424ab5d) + [#7961](https://github.com/npm/npm/issues/7961) Ensure that hosted git SSH + URLs always have a valid protocol when stored in `resolved` fields in + `npm-shrinkwrap.json`. ([@othiym23](https://github.com/othiym23)) +* [`394c2f5`](https://github.com/npm/npm/commit/394c2f5a1227232c0baf42fbba1402aafe0d6ffb) + Switch the order in which hosted Git providers are checked to `git:`, + `git+https:`, then `git+ssh:` (from `git:`, `git+ssh:`, then `git+https:`) in + an effort to go from most to least likely to succeed, to make for less + confusing error message. ([@othiym23](https://github.com/othiym23)) + +### v2.8.2 (2015-04-14): + +#### PEACE IN OUR TIME + +npm has been having an issue with CouchDB's web server since the release +of io.js and Node.js 0.12.0 that has consumed a huge amount of my time +to little visible effect. Sam Mikes picked up the thread from me, and +after a [_lot_ of effort](https://github.com/npm/npm/issues/7699#issuecomment-93091111) +figured out that ultimately there are probably a couple problems with +the new HTTP Agent keep-alive handling in new versions of Node. In +addition, `npm-registry-client` was gratuitously sending a body along +with a GET request which was triggering the bugs. Sam removed about 10 bytes from +one file in `npm-registry-client`, and this problem, which has been bugging us for months, +completely went away. + +In conclusion, Sam Mikes is great, and anybody using a private registry +hosted on CouchDB should thank him for his hard work. Also, thanks to +the community at large for pitching in on this bug, which has been +around for months now. + +* [`431c3bf`](https://github.com/npm/npm/commit/431c3bf6cdec50f9f0c735f478cb2f3f337d3313) + [#7699](https://github.com/npm/npm/issues/7699) `npm-registry-client@6.3.2`: + Don't send body with HTTP GET requests when logging in. + ([@smikes](https://github.com/smikes)) + +### v2.8.1 (2015-04-12): + +#### CORRECTION: NPM'S GIT INTEGRATION IS DOING OKAY + +A [helpful bug report](https://github.com/npm/npm/issues/7872#issuecomment-91809553) +led to another round of changes to +[`hosted-git-info`](https://github.com/npm/hosted-git-info/commit/827163c74531b69985d1ede7abced4861e7b0cd4), +some additional test-writing, and a bunch of hands-on testing against actual +private repositories. While the complexity of npm's git dependency handling is +nearly fractal (because npm is very complex, and git is even more complex), +it's feeling way more solid than it has for a while. We think this is a +substantial improvement over what we had before, so give `npm@2.8.1` a shot if +you have particularly complex git use cases and +[let us know](https://github.com/npm/npm/issues/new) how it goes. + +(NOTE: These changes mostly affect cloning and saving references to packages +hosted in git repositories, and don't address some known issues with things +like lifecycle scripts not being run on npm dependencies. Work continues on +other issues that affect parity between git and npm registry packages.) + +* [`66377c6`](https://github.com/npm/npm/commit/66377c6ece2cf4d53d9a618b7d9824e1452bc293) + [#7872](https://github.com/npm/npm/issues/7872) `hosted-git-info@2.1.2`: Pass + through credentials embedded in SSH and HTTPs git URLs. + ([@othiym23](https://github.com/othiym23)) +* [`15efe12`](https://github.com/npm/npm/commit/15efe124753257728a0ddc64074fa5a4b9c2eb30) + [#7872](https://github.com/npm/npm/issues/7872) Use the new version of + `hosted-git-info` to pass along credentials embedded in git URLs. Test it. + Test it a lot. ([@othiym23](https://github.com/othiym23)) + +#### SCOPED DEPENDENCIES AND PEER DEPENDENCIES: NOT QUITE REESE'S + +Big thanks to [@ewie](https://github.com/ewie) for identifying an issue with +how npm was handling `peerDependencies` that were implicitly installed from the +`package.json` files of scoped dependencies. This +[will be a moot point](https://github.com/npm/npm/issues/6565#issuecomment-74971689) +with the release of `npm@3`, but until then, it's important that +`peerDependency` auto-installation work as expected. + +* [`b027319`](https://github.com/npm/npm/commit/b0273190c71eba14395ddfdd1d9f7ba625297523) + [#7920](https://github.com/npm/npm/issues/7920) Scoped packages with + `peerDependencies` were installing the `peerDependencies` into the wrong + directory. ([@ewie](https://github.com/ewie)) +* [`649e31a`](https://github.com/npm/npm/commit/649e31ae4fd02568bae5dc6b4ea783431ce3d63e) + [#7920](https://github.com/npm/npm/issues/7920) Test `peerDependency` + installs involving scoped packages using `npm-package-arg` instead of simple + path tests, for consistency. ([@othiym23](https://github.com/othiym23)) + +#### MAKING IT EASIER TO WRITE NPM TESTS, VERSION 0.0.1 + +[@iarna](https://github.com/iarna) and I +([@othiym23](https://github.com/othiym23)) have been discussing a +[candidate plan](https://github.com/npm/npm/wiki/rewriting-npm's-tests:-a-plan-maybe) +for improving npm's test suite, with the goal of making it easier for new +contributors to get involved with npm by reducing the learning curve +necessary to be able to write good tests for proposed changes. This is the +first substantial piece of that effort. Here's what the commit message for +[`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) +had to say about this work: + +> It's too difficult for npm contributors to figure out what the conventional +> style is for tests. Part of the problem is that the documentation in +> CONTRIBUTING.md is inadequate, but another important factor is that the tests +> themselves are written in a variety of styles. One of the most notable +> examples of this is the fact that many tests use fixture directories to store +> precooked test scenarios and package.json files. +> +> This had some negative consequences: +> +> * tests weren't idempotent +> * subtle dependencies between tests existed +> * new tests get written in this deprecated style because it's not +> obvious that the style is out of favor +> * it's hard to figure out why a lot of those directories existed, +> because they served a variety of purposes, so it was difficult to +> tell when it was safe to remove them +> +> All in all, the fixture directories were a major source of technical debt, and +> cleaning them up, while time-consuming, makes the whole test suite much more +> approachable, and makes it more likely that new tests written by outside +> contributors will follow a conventional style. To support that, all of the +> tests touched by this changed were cleaned up to pass the `standard` style +> checker. + +And here's a little extra context from a comment I left on [#7929](https://github.com/npm/npm/issues/7929): + +> One of the other things that encouraged me was looking at this +> [presentation on technical debt](http://www.slideshare.net/nnja/pycon-2015-technical-debt-the-monster-in-your-closet) +> from Pycon 2015, especially slide 53, which I interpreted in terms of +> difficulty getting new contributors to submit patches to an OSS project like +> npm. npm has a long ways to go, but I feel good about this change. + +* [`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) + [#7929](https://github.com/npm/npm/issues/7929) Eliminate fixture directories + from `test/tap`, leaving each test self-contained. + ([@othiym23](https://github.com/othiym23)) +* [`4928d30`](https://github.com/npm/npm/commit/4928d30140821c63e03fffed73f8d88ebdc43710) + [#7929](https://github.com/npm/npm/issues/7929) Move fixture files from + `test/tap/*` to `test/fixtures`. ([@othiym23](https://github.com/othiym23)) +* [`e925deb`](https://github.com/npm/npm/commit/e925debca91092a814c1a00933babc3a8cf975be) + [#7929](https://github.com/npm/npm/issues/7929) Tweak the run scripts to stop + slaughtering the CPU on doc rebuild. + ([@othiym23](https://github.com/othiym23)) +* [`65bf7cf`](https://github.com/npm/npm/commit/65bf7cffaf91c426b676c47529eee796f8b8b75c) + [#7923](https://github.com/npm/npm/issues/7923) Use an alias of scripts and + run-scripts in `npm run test-all` ([@watilde](https://github.com/watilde)) +* [`756a3fb`](https://github.com/npm/npm/commit/756a3fbb852a2469afe706635ed88d22c37743e5) + [#7923](https://github.com/npm/npm/issues/7923) Sync timeout time of `npm + run-script test-all` to be the same as `test` and `tap` scripts. + ([@watilde](https://github.com/watilde)) +* [`8299b5f`](https://github.com/npm/npm/commit/8299b5fb6373354a7fbaab6f333863758812ae90) + Set a timeout for tap tests for `npm run-script test-all`. + ([@othiym23](https://github.com/othiym23)) + +#### THE EVER-BEATING DRUM OF DEPENDENCY UPDATES + +* [`d90d0b9`](https://github.com/npm/npm/commit/d90d0b992acbf62fd5d68debf9d1dbd6cfa20804) + [#7924](https://github.com/npm/npm/issues/7924) Remove `child-process-close`, + as it was included for Node 0.6 compatibility, and npm no longer supports + 0.6. ([@robertkowalski](https://github.com/robertkowalski)) +* [`16427c1`](https://github.com/npm/npm/commit/16427c1f3ea3d71ee753c62eb4c2663c7b32b84f) + `lru-cache@2.5.2`: More accurate updating of expiry times when `maxAge` is + set. ([@isaacs](https://github.com/isaacs)) +* [`03cce83`](https://github.com/npm/npm/commit/03cce83b64344a9e0fe036dce214f4d68cfcc9e7) + `nock@1.6.0`: Mocked network error handling. + ([@pgte](https://github.com/pgte)) +* [`f93b1f0`](https://github.com/npm/npm/commit/f93b1f0b7eb5d1b8a7967e837bbd756db1091d00) + `glob@5.0.5`: Use `path-is-absolute` polyfill, allowing newer Node.js and + io.js versions to use `path.isAbsolute()`. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`a70d694`](https://github.com/npm/npm/commit/a70d69495a6e96997e64855d9e749d943ee6d64f) + `request@2.55.0`: Bug fixes and simplification. + ([@simov](https://github.com/simov)) +* [`2aecc6f`](https://github.com/npm/npm/commit/2aecc6f4083526feeb14615b4e5484edc66175b5) + `columnify@1.5.1`: Switch to using babel from 6to5. + ([@timoxley](https://github.com/timoxley)) + +### v2.8.0 (2015-04-09): + +#### WE WILL NEVER BE DONE FIXING NPM'S GIT SUPPORT + +If you look at [the last release's release +notes](https://github.com/npm/npm/blob/master/CHANGELOG.md#git-mean-git-tuff-git-all-the-way-away-from-my-stuff), +you will note that they confidently assert that it's perfectly OK to force all +GitHub URLs through the same `git:` -> `git+ssh:` fallback flow for cloning. It +turns out that many users depend on `git+https:` URLs in their build +environments because they use GitHub auth tokens instead of SSH keys. Also, in +some cases you just want to be able to explicitly say how a given dependency +should be cloned from GitHub. + +Because of the way we resolved the inconsistency in GitHub shorthand handling +[before](https://github.com/npm/npm/blob/master/CHANGELOG.md#bug-fixes-1), this +turned out to be difficult to work around. So instead of hacking around it, we +completely redid how git is handled within npm and its attendant packages. +Again. This time, we changed things so that `normalize-package-data` and +`read-package-json` leave more of the git logic to npm itself, which makes +handling shorthand syntax consistently much easier, and also allows users to +resume using explicit, fully-qualified git URLs without npm messing with them. + +Here's a summary of what's changed: + +* Instead of converting the GitHub shorthand syntax to a `git+ssh:`, `git:`, or + `git+https:` URL and saving that, save the shorthand itself to + `package.json`. +* If presented with shortcuts, try cloning via the git protocol, SSH, and HTTPS + (in that order). +* No longer prompt for credentials -- it didn't work right with the spinner, + and wasn't guaranteed to work anyway. We may experiment with doing this a + better way in the future. Users can override this by setting `GIT_ASKPASS` in + their environment if they want to experiment with interactive cloning, but + should also set `--no-spin` on the npm command line (or run `npm config set + spin=false`). +* **EXPERIMENTAL FEATURE**: Add support for `github:`, `gist:`, `bitbucket:`, + and `gitlab:` shorthand prefixes. GitHub shortcuts will continue to be + normalized to `org/repo` instead of being saved as `github:org/repo`, but + `gitlab:`, `gist:`, and `bitbucket:` prefixes will be used on the command + line and from `package.json`. BE CAREFUL WITH THIS. `package.json` files + published with the new shorthand syntax can _only_ be read by `npm@2.8.0` and + later, and this feature is mostly meant for playing around with it. If you + want to save git dependencies in a form that older versions of npm can read, + use `--save-exact`, which will save the git URL and resolved commit hash of + the head of the branch in a manner similar to the way that `--save-exact` + pins versions for registry dependencies. This is documented (so check `npm + help install` for details), but we're not going to make a lot of noise about + it until it has a chance to bake in a little more. + +It is [@othiym23](https://github.com/othiym23)'s sincere hope that this will +resolve all of the inconsistencies users were seeing with GitHub and git-hosted +packages, but given the level of change here, that may just be a fond wish. +Extra testing of this change is requested. + +* [`6b0f588`](https://github.com/npm/npm/commit/6b0f58877f37df9904490ffbaaad33862bd36dce) + [#7867](https://github.com/npm/npm/issues/7867) Use git shorthand and git + URLs as presented by user. Support new `hosted-git-info` shortcut syntax. + Save shorthand in `package.json`. Try cloning via `git:`, `git+ssh:`, and + `git+https:`, in that order, when supported by the underlying hosting + provider. ([@othiym23](https://github.com/othiym23)) +* [`75d4267`](https://github.com/npm/npm/commit/75d426787869d54ca7400408f562f971b34649ef) + [#7867](https://github.com/npm/npm/issues/7867) Document new GitHub, GitHub + gist, Bitbucket, and GitLab shorthand syntax. + ([@othiym23](https://github.com/othiym23)) +* [`7d92c75`](https://github.com/npm/npm/commit/7d92c7592998d90ec883fa989ca74f04ec1b93de) + [#7867](https://github.com/npm/npm/issues/7867) When `--save-exact` is used + with git shorthand or URLs, save the fully-resolved URL, with branch name + resolved to the exact hash for the commit checked out. + ([@othiym23](https://github.com/othiym23)) +* [`9220e59`](https://github.com/npm/npm/commit/9220e59f8def8c82c6d331a39ba29ad4c44e3a9b) + [#7867](https://github.com/npm/npm/issues/7867) Ensure that non-prefixed and + non-normalized GitHub shortcuts are saved to `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`dd398e9`](https://github.com/npm/npm/commit/dd398e98a8eba27eeba84378200da3d078fdf980) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.1`: + Ensure that `gist:` shorthand survives being round-tripped through + `package.json`. ([@othiym23](https://github.com/othiym23)) +* [`33d1420`](https://github.com/npm/npm/commit/33d1420bf2f629332fceb2ac7e174e63ac48f96a) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.0`: Add + support for auth embedded directly in git URLs. + ([@othiym23](https://github.com/othiym23)) +* [`23a1d5a`](https://github.com/npm/npm/commit/23a1d5a540e8db27f5cd0245de7c3694e2bddad1) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.0.2`: Make + it possible to determine in which form a hosted git URL was passed. + ([@iarna](https://github.com/iarna)) +* [`eaf75ac`](https://github.com/npm/npm/commit/eaf75acb718611ad5cfb360084ec86938d9c66c5) + [#7867](https://github.com/npm/npm/issues/7867) + `normalize-package-data@2.0.0`: Normalize GitHub specifiers so they pass + through shortcut syntax and preserve explicit URLs. + ([@iarna](https://github.com/iarna)) +* [`95e0535`](https://github.com/npm/npm/commit/95e0535e365e0aca49c634dd2061a0369b0475f1) + [#7867](https://github.com/npm/npm/issues/7867) `npm-package-arg@4.0.0`: Add + git URL and shortcut to hosted git spec and use `hosted-git-info@2.0.2`. + ([@iarna](https://github.com/iarna)) +* [`a808926`](https://github.com/npm/npm/commit/a8089268d5f3d57f42dbaba02ff6437da5121191) + [#7867](https://github.com/npm/npm/issues/7867) + `realize-package-specifier@3.0.0`: Use `npm-package-arg@4.0.0` and test + shortcut specifier behavior. ([@iarna](https://github.com/iarna)) +* [`6dd1e03`](https://github.com/npm/npm/commit/6dd1e039bddf8cf5383343f91d84bc5d78acd083) + [#7867](https://github.com/npm/npm/issues/7867) `init-package-json@1.4.0`: + Allow dependency on `read-package-json@2.0.0`. + ([@iarna](https://github.com/iarna)) +* [`63254bb`](https://github.com/npm/npm/commit/63254bb6358f66752aca6aa1a275271b3ae03f7c) + [#7867](https://github.com/npm/npm/issues/7867) `read-installed@4.0.0`: Use + `read-package-json@2.0.0`. ([@iarna](https://github.com/iarna)) +* [`254b887`](https://github.com/npm/npm/commit/254b8871f5a173bb464cc5b0ace460c7878b8097) + [#7867](https://github.com/npm/npm/issues/7867) `read-package-json@2.0.0`: + Use `normalize-package-data@2.0.0`. ([@iarna](https://github.com/iarna)) +* [`0b9f8be`](https://github.com/npm/npm/commit/0b9f8be62fe5252abe54d49e36a696f4816c2eca) + [#7867](https://github.com/npm/npm/issues/7867) `npm-registry-client@6.3.0`: + Mark compatibility with `normalize-package-data@2.0.0` and + `npm-package-arg@4.0.0`. ([@iarna](https://github.com/iarna)) +* [`f40ecaa`](https://github.com/npm/npm/commit/f40ecaad68f77abc50eb6f5b224e31dec3d250fc) + [#7867](https://github.com/npm/npm/issues/7867) Extract a common method to + use when cloning git repos for testing. + ([@othiym23](https://github.com/othiym23)) + +#### TEST FIXES FOR NODE 0.8 + +npm continues to [get closer](https://github.com/npm/npm/issues/7842) to being +completely green on Travis for Node 0.8. + +* [`26d36e9`](https://github.com/npm/npm/commit/26d36e9cf0eca69fe1863d2ea536c28555b9e8de) + [#7842](https://github.com/npm/npm/issues/7842) When spawning child + processes, map exit code 127 to ENOENT so Node 0.8 handles child process + failures the same as later versions. + ([@SonicHedgehog](https://github.com/SonicHedgehog)) +* [`54cd895`](https://github.com/npm/npm/commit/54cd8956ea783f96749e46597d8c2cb9397c5d5f) + [#7842](https://github.com/npm/npm/issues/7842) Node 0.8 requires -e with -p + when evaluating snippets; fix test. + ([@SonicHedgehog](https://github.com/SonicHedgehog)) + +#### SMALL FIX AND DOC TWEAK + +* [`20e9003`](https://github.com/npm/npm/commit/20e90031b847e9f7c7168f3dad8b1e526f9a2586) + `tar@2.0.1`: Fix regression where relative symbolic links within an + extraction root that pointed within an extraction root would get normalized + to absolute symbolic links. ([@isaacs](https://github.com/isaacs)) +* [`2ef8898`](https://github.com/npm/npm/commit/2ef88989c41bee1578570bb2172c90ede129dbd1) + [#7879](https://github.com/npm/npm/issues/7879) Better document that `npm + publish --tag=foo` will not set `latest` to that version. + ([@linclark](https://github.com/linclark)) + +### v2.7.6 (2015-04-02): + +#### GIT MEAN, GIT TUFF, GIT ALL THE WAY AWAY FROM MY STUFF + +Part of the reason that we're reluctant to take patches to how npm deals with +git dependencies is that every time we touch the git support, something breaks. +The last few releases are a case in point. `npm@2.7.4` completely broke +installing private modules from GitHub, and `npm@2.7.5` fixed them at the cost +of logging a misleading error message that caused many people to believe that +their dependencies hadn't been successfully installed when they actually had +been. + +This all started from a desire to ensure that GitHub shortcut syntax is being +handled correctly. The correct behavior is for npm to try to clone all +dependencies on GitHub (whether they're specified with the GitHub +`organization/repository` shortcut syntax or not) via the plain `git:` protocol +first, and to fall back to using `git+ssh:` if `git:` doesn't work. Previously, +sometimes npm would use `git:` and `git+ssh:` in some cases (most notably when +using GitHub shortcut syntax on the command line), and use `git+https:` in +others (when the GitHub shortcut syntax was present in `package.json`). This +led to subtle and hard-to-understand inconsistencies, and we're glad that as of +`npm@2.7.6`, we've finally gotten things to where they were before we started, +only slightly more consistent overall. + +We are now going to go back to our policy of being extremely reluctant to touch +the code that handles Git dependencies. + +* [`b747593`](https://github.com/npm/npm/commit/b7475936f473f029e6a027ba1b16277523747d0b) + [#7630](https://github.com/npm/npm/issues/7630) Don't automatically log all + git failures as errors. `maybeGithub` needs to be able to fail without + logging to support its fallback logic. + ([@othiym23](https://github.com/othiym23)) +* [`cd67a0d`](https://github.com/npm/npm/commit/cd67a0db07891d20871822696c26692c8a84866a) + [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote + URL, handle failures gracefully (without assuming standard output exists). + ([@othiym23](https://github.com/othiym23)) +* [`637c7d1`](https://github.com/npm/npm/commit/637c7d1411fe07f409cf91f2e65fd70685cb253c) + [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote + URL, handle failures gracefully (without assuming standard _error_ exists). + ([@othiym23](https://github.com/othiym23)) + +#### OTHER SIGNIFICANT FIXES + +* [`78005eb`](https://github.com/npm/npm/commit/78005ebb6f4103c20f077669c3929b7ea46a4c0d) + [#7743](https://github.com/npm/npm/issues/7743) Always quote arguments passed + to `npm run-script`. This allows build systems and the like to safely escape + glob patterns passed as arguments to `run-scripts` with `npm run-script + <script> -- <arguments>`. This is a tricky change to test, and may be + reverted or moved to `npm@3` if it turns out it breaks things for users. + ([@mantoni](https://github.com/mantoni)) +* [`da015ee`](https://github.com/npm/npm/commit/da015eee45f6daf384598151d06a9b57ffce136e) + [#7074](https://github.com/npm/npm/issues/7074) `read-package-json@1.3.3`: + `read-package-json` no longer caches `package.json` files, which trades a + very small performance loss for the elimination of a large class of really + annoying race conditions. See [#7074](https://github.com/npm/npm/issues/7074) + for the grisly details. ([@othiym23](https://github.com/othiym23)) +* [`dd20f57`](https://github.com/npm/npm/commit/dd20f5755291b9433f0d298ee0eead22cda6db36) + `init-package-json@1.3.2`: Only add the `@` to scoped package names if it's + not already there when reading from the filesystem + ([@watilde](https://github.com/watilde)), and support inline validation of + package names ([@michaelnisi](https://github.com/michaelnisi)). + +#### SMALL FIXES AND DEPENDENCY UPGRADES + +* [`1f380f6`](https://github.com/npm/npm/commit/1f380f66c1e944b8ffbf096fa94d09e931626e12) + [#7820](https://github.com/npm/npm/issues/7820) `are-we-there-yet@1.0.4`: Use + `readable-stream` instead of built-in `stream` module to better support + Node.js 0.8.x. ([@SonicHedgehog](https://github.com/SonicHedgehog)) +* [`d380188`](https://github.com/npm/npm/commit/d380188e161be31f5a4f53947de6bc28df4732d8) + `semver@4.3.3`: Don't throw on `semver.parse(null)`, and parse numeric + version strings more robustly. ([@isaacs](https://github.com/isaacs)) +* [`01d9964`](https://github.com/npm/npm/commit/01d99649265f921e1c61cf406613e7042bcea008) + `nock@1.4.0`: This change may need to be rolled back, or rolled forward, + because [nock depends on + `setImmediate`](https://github.com/npm/npm/issues/7842), which causes tests + to fail when run with Node.js 0.8. ([@othiym23](https://github.com/othiym23)) +* [`91f5cb1`](https://github.com/npm/npm/commit/91f5cb1fb91520fbe25a4da5b80848ed540b9ad3) + [#7791](https://github.com/npm/npm/issues/7791) Fix brackets in npmconf so + that `loaded` is set correctly. + ([@charmander](https://github.com/charmander)) +* [`1349e27`](https://github.com/npm/npm/commit/1349e27c936a8b0fc9f6440a6d6404ef3b19c587) + [#7818](https://github.com/npm/npm/issues/7818) Update `README.md` to point + out that the install script now lives on https://www.npmjs.com. + ([@weisjohn](https://github.com/weisjohn)) + +### v2.7.5 (2015-03-26): + +#### SECURITY FIXES + +* [`300834e`](https://github.com/npm/npm/commit/300834e91a4e2a95fb7fb59c309e7c3fc91d2312) + `tar@2.0.0`: Normalize symbolic links that point to targets outside the + extraction root. This prevents packages containing symbolic links from + overwriting targets outside the expected paths for a package. Thanks to [Tim + Cuthbertson](http://gfxmonk.net/) and the team at [Lift + Security](https://liftsecurity.io/) for working with the npm team to identify + this issue. ([@othiym23](https://github.com/othiym23)) +* [`0dc6875`](https://github.com/npm/npm/commit/0dc68757cffd5397c280bc71365d106523a5a052) + `semver@4.3.2`: Package versions can be no more than 256 characters long. + This prevents a situation in which parsing the version number can use + exponentially more time and memory to parse, leading to a potential denial of + service. Thanks to Adam Baldwin at Lift Security for bringing this to our + attention. ([@isaacs](https://github.com/isaacs)) + +#### BUG FIXES + +* [`5811468`](https://github.com/npm/npm/commit/5811468e104ccb6b26b8715dff390d68daa10066) + [#7713](https://github.com/npm/npm/issues/7713) Add a test for `npm link` and + `npm link <package>`. ([@watilde](https://github.com/watilde)) +* [`3cf3b0c`](https://github.com/npm/npm/commit/3cf3b0c8fddb6b66f969969feebea85fabd0360b) + [#7713](https://github.com/npm/npm/issues/7713) Only use absolute symbolic + links when `npm link`ing. ([@hokaccha](https://github.com/hokaccha)) +* [`f35aa93`](https://github.com/npm/npm/commit/f35aa933e136228a89e3fcfdebe8c7cc4f1e7c00) + [#7443](https://github.com/npm/npm/issues/7443) Keep relative URLs when + hitting search endpoint. ([@othiym23](https://github.com/othiym23)) +* [`eab6184`](https://github.com/npm/npm/commit/eab618425c51e3aa4416da28dcd8ca4ba63aec41) + [#7766](https://github.com/npm/npm/issues/7766) One last tweak to ensure that + GitHub shortcuts work with private repositories. + ([@iarna](https://github.com/iarna)) +* [`5d7f704`](https://github.com/npm/npm/commit/5d7f704823f5f92ddd7ff3e7dd2b8bcc66c73005) + [#7656](https://github.com/npm/npm/issues/7656) Don't try to load a deleted + CA file, allowing the `cafile` config to be changed. + ([@KenanY](https://github.com/KenanY)) +* [`a840a13`](https://github.com/npm/npm/commit/a840a13bbf0330157536381ea8e58d0bd93b4c05) + [#7746](https://github.com/npm/npm/issues/7746) Only fix up URL paths when + there are paths to fix up. ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`94df809`](https://github.com/npm/npm/commit/94df8095985bf5ba9d8db99dc445d05dac136aaf) + `request@2.54.0`: Fixes for Node.js 0.12 and io.js. + ([@simov](https://github.com/simov)) +* [`98a13ea`](https://github.com/npm/npm/commit/98a13eafdf098b53069ad15297008fcab9c61653) + `opener@1.4.1`: Deal with `start` on Windows more conventionally. + ([@domenic](https://github.com/domenic)) +* [`c2417c7`](https://github.com/npm/npm/commit/c2417c7702459a446f07d43ca3c4e99bde7fe9d6) + `require-inject@1.2.0`: Add installGlobally to bypass cleanups. + ([@iarna](https://github.com/iarna)) + +#### DOCUMENTATION FIXES + +* [`f87c728`](https://github.com/npm/npm/commit/f87c728f8732c9e977c0dc2060c0610649e79155) + [#7696](https://github.com/npm/npm/issues/7696) Months and minutes were + swapped in doc-build.sh ([@MeddahJ](https://github.com/MeddahJ)) +* [`4e216b2`](https://github.com/npm/npm/commit/4e216b29b30463f06afe6e3c645e205da5f50922) + [#7752](https://github.com/npm/npm/issues/7752) Update string examples to be + properly quoted. ([@snuggs](https://github.com/snuggs)) +* [`402f52a`](https://github.com/npm/npm/commit/402f52ab201efa348feb87cad753fc4b91e8a3fb) + [#7635](https://github.com/npm/npm/issues/7635) Clarify Windows installation + instructions. ([@msikma](https://github.com/msikma)) +* [`c910399`](https://github.com/npm/npm/commit/c910399ecfd8db49fe4496dd26887765a8aed20f) + small typo fix to `CHANGELOG.md` ([@e-jigsaw](https://github.com/e-jigsaw)) + +### v2.7.4 (2015-03-20): + +#### BUG FIXES + +* [`fe1bc38`](https://github.com/npm/npm/commit/fe1bc387a14475e373557de669e03d9d006d3173) + [#7672](https://github.com/npm/npm/issues/7672) `npm-registry-client@3.1.2`: + Fix client-side certificate handling by correcting property name. + ([@atamon](https://github.com/atamon)) +* [`3ce3cc2`](https://github.com/npm/npm/commit/3ce3cc242fc345bca6820185a4f5a013c5bc1944) + [#7635](https://github.com/npm/npm/issues/7635) `fstream-npm@1.0.2`: Raise a + more descriptive error when `bundledDependencies` isn't an array. + ([@KenanY](https://github.com/KenanY)) +* [`3a12723`](https://github.com/npm/npm/commit/3a127235076a1f00bc8befba56c024c6d0e7f477) + [#7661](https://github.com/npm/npm/issues/7661) Allow setting `--registry` on + the command line to trump the mapped registry for `--scope`. + ([@othiym23](https://github.com/othiym23)) +* [`89ce829`](https://github.com/npm/npm/commit/89ce829a00b526d0518f5cd855c323bffe182af0) + [#7630](https://github.com/npm/npm/issues/7630) `hosted-git-info@1.5.3`: Part + 3 of ensuring that GitHub shorthand is handled consistently. + ([@othiym23](https://github.com/othiym23)) +* [`63313eb`](https://github.com/npm/npm/commit/63313eb0c37891c355546fd1093010c8a0c3cd81) + [#7630](https://github.com/npm/npm/issues/7630) + `realize-package-specifier@2.2.0`: Part 2 of ensuring that GitHub shorthand + is handled consistently. ([@othiym23](https://github.com/othiym23)) +* [`3ed41bf`](https://github.com/npm/npm/commit/3ed41bf64a1bb752bb3155c74dd6ffbbd28c89c9) + [#7630](https://github.com/npm/npm/issues/7630) `npm-package-arg@3.1.1`: Part + 1 of ensuring that GitHub shorthand is handled consistently. + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`6a498c6`](https://github.com/npm/npm/commit/6a498c6aaa00611a0a1ea405255900c327103f8b) + `npm-registry-couchapp@2.6.7`: Ensure that npm continues to work with new + registry architecture. ([@bcoe](https://github.com/bcoe)) +* [`bd72c47`](https://github.com/npm/npm/commit/bd72c47ce8c58e287d496902c11845c8fea420d6) + `glob@5.0.3`: Updated to latest version. + ([@isaacs](https://github.com/isaacs)) +* [`4bfbaa2`](https://github.com/npm/npm/commit/4bfbaa2d8b9dc7067d999de8f55676db3a4f4196) + `npmlog@1.2.0`: Getting up to date with latest version (but not using any of + the new features). ([@othiym23](https://github.com/othiym23)) + +#### A NEW REGRESSION TEST + +* [`3703b0b`](https://github.com/npm/npm/commit/3703b0b87c127a64649bdbfc3bc697ebccc4aa24) + Add regression test for `npm version` to ensure `message` property in config + continues to be honored. ([@dannyfritz](https://github.com/dannyfritz)) + +### v2.7.3 (2015-03-16): + +#### HAHA WHOOPS LIL SHINKWRAP ISSUE THERE LOL + +* [`1549106`](https://github.com/npm/npm/commit/1549106f518000633915686f5f1ccc6afcf77f8f) + [#7641](https://github.com/npm/npm/issues/7641) Due to 448efd0, running `npm + shrinkwrap --dev` caused production dependencies to no longer be included in + `npm-shrinkwrap.json`. Whoopsie! ([@othiym23](https://github.com/othiym23)) + +### v2.7.2 (2015-03-12): + +#### NPM GASTROENTEROLOGY + +* [`fb0ac26`](https://github.com/npm/npm/commit/fb0ac26eecdd76f6eaa4a96a865b7c6f52ce5aa5) + [#7579](https://github.com/npm/npm/issues/7579) Only block removing files and + links when we're sure npm isn't responsible for them. This change is hard to + summarize, because if things are working correctly you should never see it, + but if you want more context, just [go read the commit + message](https://github.com/npm/npm/commit/fb0ac26eecdd76f6eaa4a96a865b7c6f52ce5aa5), + which lays it all out. ([@othiym23](https://github.com/othiym23)) +* [`051c473`](https://github.com/npm/npm/commit/051c4738486a826300f205b71590781ce7744f01) + [#7552](https://github.com/npm/npm/issues/7552) `bundledDependencies` are now + properly included in the installation context. This is another fantastically + hard-to-summarize bug, and once again, I encourage you to [read the commit + message](https://github.com/npm/npm/commit/051c4738486a826300f205b71590781ce7744f01) + if you're curious about the details. The snappy takeaway is that this + unbreaks many use cases for `ember-cli`. ([@othiym23](https://github.com/othiym23)) + +#### LESS DRAMATIC CHANGES + +* [`fcd9247`](https://github.com/npm/npm/commit/fcd92476f3a9092f6f8c83a19a24fe63b206edcd) + [#7597](https://github.com/npm/npm/issues/7597) Awk varies pretty + dramatically from platform to platform, so use Perl to generate the AUTHORS + list instead. ([@KenanY](https://github.com/KenanY)) +* [`721b17a`](https://github.com/npm/npm/commit/721b17a31690bec074eb8763d823d6de63406005) + [#7598](https://github.com/npm/npm/issues/7598) `npm install --save` really + isn't experimental anymore. ([@RichardLitt](https://github.com/RichardLitt)) + +#### DEPENDENCY REFRESH + +* [`a91f2c7`](https://github.com/npm/npm/commit/a91f2c7c9a5183d9cde7aae040ebd9ccdf104be7) + [#7559](https://github.com/npm/npm/issues/7559) `node-gyp@1.0.3` Switch + `node-gyp` to use `stdio` instead of `customFds` so it stops printing a + deprecation warning every time you build a native dependency. + ([@jeffbski](https://github.com/jeffbski)) +* [`0c85db7`](https://github.com/npm/npm/commit/0c85db7f0dde41762411e40a029153e6a65ef483) + `rimraf@2.3.2`: Globbing now deals with paths containing valid glob + metacharacters better. ([@isaacs](https://github.com/isaacs)) +* [`d14588e`](https://github.com/npm/npm/commit/d14588ed09b032c4c770e34b4c0f2436f5fccf6e) + `minimatch@2.0.4`: Bug fixes. ([@isaacs](https://github.com/isaacs)) +* [`aa9952e`](https://github.com/npm/npm/commit/aa9952e8270a6c1b7f97e579875dd6e3aa22abfd) + `graceful-fs@3.0.6`: Bug fixes. ([@isaacs](https://github.com/isaacs)) + +### v2.7.1 (2015-03-05): + +#### GITSANITY + +* [`6823807`](https://github.com/npm/npm/commit/6823807bba6c00228a724e1205ae90d67df0adad) + [#7121](https://github.com/npm/npm/issues/7121) `npm install --save` for Git + dependencies saves the URL passed in, instead of the temporary directory used + to clone the remote repo. Fixes using Git dependencies when shrinkwrapping. + In the process, rewrote the Git dependency caching code. Again. No more + single-letter variable names, and a much clearer workflow. + ([@othiym23](https://github.com/othiym23)) +* [`c8258f3`](https://github.com/npm/npm/commit/c8258f31365b045e5fcf15b865a363abbc3be616) + [#7486](https://github.com/npm/npm/issues/7486) When installing Git remotes, + the caching code was passing in the function `gitEnv` instead of the results + of invoking it. ([@functino](https://github.com/functino)) +* [`c618eed`](https://github.com/npm/npm/commit/c618eeda3e321fd454d77c476b53a0330f2344cc) + [#2556](https://github.com/npm/npm/issues/2556) Make it possible to install + Git dependencies when using `--link` by not linking just the Git + dependencies. ([@smikes](https://github.com/smikes)) + +#### WHY DID THIS TAKE SO LONG. + +* [`abdd040`](https://github.com/npm/npm/commit/abdd040da90932535472f593d5433a67ee074801) + `read-package-json@1.3.2`: Provide more helpful error messages when JSON + parse errors are encountered by using a more forgiving JSON parser than + JSON.parse. ([@smikes](https://github.com/smikes)) + +#### BUGS & TWEAKS + +* [`c56cfcd`](https://github.com/npm/npm/commit/c56cfcd79cd8ab4ccd06d2c03d7e04030d576683) + [#7525](https://github.com/npm/npm/issues/7525) `npm dedupe` handles scoped + packages. ([@KidkArolis](https://github.com/KidkArolis)) +* [`1b8ba74`](https://github.com/npm/npm/commit/1b8ba7426393cbae2c76ad2c35953782d4401871) + [#7531](https://github.com/npm/npm/issues/7531) `npm stars` and `npm whoami` + will no longer send the registry the error text saying you need to log in as + your username. ([@othiym23](https://github.com/othiym23)) +* [`6de1e91`](https://github.com/npm/npm/commit/6de1e91116a5105dfa75126532b9083d8672e034) + [#6441](https://github.com/npm/npm/issues/6441) Prevent needless reinstalls + by only updating packages when the current version isn't the same as the + version returned as `wanted` by `npm outdated`. + ([@othiym23](https://github.com/othiym23)) +* [`2abc3ee`](https://github.com/npm/npm/commit/2abc3ee08f0cabc4e7bfd7b973c0b59dc44715ff) + Add `npm upgrade` as an alias for `npm update`. + ([@othiym23](https://github.com/othiym23)) +* [`bcd4722`](https://github.com/npm/npm/commit/bcd47224e18884191a5d0057c2b2fff83ac8206e) + [#7508](https://github.com/npm/npm/issues/7508) FreeBSD uses `EAI_FAIL` + instead of `ENOTFOUND`. ([@othiym23](https://github.com/othiym23)) +* [`21c1ac4`](https://github.com/npm/npm/commit/21c1ac41280f0716a208cde14025a2ad5ef61fed) + [#7507](https://github.com/npm/npm/issues/7507) Update support URL in generic + error handler to `https:` from `http:`. + ([@watilde](https://github.com/watilde)) +* [`b6bd99a`](https://github.com/npm/npm/commit/b6bd99a73f575545fbbaef95c12237c47dd32561) + [#7492](https://github.com/npm/npm/issues/7492) On install, the + `package.json` `engineStrict` deprecation only warns for the current package. + ([@othiym23](https://github.com/othiym23)) +* [`4ef1412`](https://github.com/npm/npm/commit/4ef1412d0061239da2b1c4460ed6db37cc9ded27) + [#7075](https://github.com/npm/npm/issues/7075) If you try to tag a release + as a valid semver range, `npm publish` and `npm tag` will error early instead + of proceeding. ([@smikes](https://github.com/smikes)) +* [`ad53d0f`](https://github.com/npm/npm/commit/ad53d0f666125d9f50d661b54901c6e5bab4d603) + Use `rimraf` in npm build script because Windows doesn't know what rm is. + ([@othiym23](https://github.com/othiym23)) +* [`8885c4d`](https://github.com/npm/npm/commit/8885c4dfb618f2838930b5c5149abea300a762d6) + `rimraf@2.3.1`: Better Windows support. + ([@isaacs](https://github.com/isaacs)) +* [`8885c4d`](https://github.com/npm/npm/commit/8885c4dfb618f2838930b5c5149abea300a762d6) + `glob@4.4.2`: Handle bad symlinks properly. + ([@isaacs](https://github.com/isaacs)) + +###E TYPSO & CLARFIICATIONS + +dId yuo know that submiting fxies for doc tpyos is an exclelent way to get +strated contriburting to a new open-saurce porject? + +* [`42c605c`](https://github.com/npm/npm/commit/42c605c7b401f603c32ea70427e1a7666adeafd9) + Fix typo in `CHANGELOG.md` ([@adrianblynch](https://github.com/adrianblynch)) +* [`c9bd58d`](https://github.com/npm/npm/commit/c9bd58dd637b9c41441023584a13e3818d5db336) + Add note about `node_modules/.bin` being added to the path in `npm + run-script`. ([@quarterto](https://github.com/quarterto)) +* [`903bdd1`](https://github.com/npm/npm/commit/903bdd105b205d6e45d3a2ab83eea8e4071e9aeb) + Matt Ranney confused the world when he renamed `node-redis` to `redis`. "The + world" includes npm's documentation. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`dea9bb2`](https://github.com/npm/npm/commit/dea9bb2319183fe54bf4d173d8533d46d2c6611c) + Fix typo in contributor link. ([@watilde](https://github.com/watilde)) +* [`1226ca9`](https://github.com/npm/npm/commit/1226ca98d4d7650cc3ba16bf7ac62e44820f3bfa) + Properly close code block in npm-install.md. + ([@olizilla](https://github.com/olizilla)) + +### v2.7.0 (2015-02-26): + +#### SOMETIMES SEMVER MEANS "SUBJECTIVE-EMPATHETIC VERSIONING" + +For a very long time (maybe forever?), the documentation for `npm run-script` +has said that `npm restart` will only call `npm stop` and `npm start` when +there is no command defined as `npm restart` in `package.json`. The problem +with this documentation is that `npm run-script` was apparently never wired up +to actually work this way. + +Until now. + +If the patch below were landed on its own, free of context, it would be a +breaking change. But, since the "new" behavior is how the documentation claims +this feature has always worked, I'm classifying it as a patch-level bug fix. I +apologize in advance if this breaks anybody's deployment scripts, and if it +turns out to be a significant regression in practice, we can revert this change +and move it to `npm@3`, which is allowed to make breaking changes due to being +a new major version of semver. + +* [`2f6a1df`](https://github.com/npm/npm/commit/2f6a1df3e1e3e0a3bc4abb69e40f59a64204e7aa) + [#1999](https://github.com/npm/npm/issues/1999) Only run `stop` and `start` + scripts (plus their pre- and post- scripts) when there's no `restart` script + defined. This makes it easier to support graceful restarts of services + managed by npm. ([@watilde](https://github.com/watilde) / + [@scien](https://github.com/scien)) + +#### A SMALL FEATURE WITH BIG IMPLICATIONS + +* [`145af65`](https://github.com/npm/npm/commit/145af6587f45de135cc876be2027ed818ed4ca6a) + [#4887](https://github.com/npm/npm/issues/4887) Replace calls to the + `node-gyp` script bundled with npm by passing the + `--node-gyp=/path/to/node-gyp` option to npm. Swap in `pangyp` or a version + of `node-gyp` modified to work better with io.js without having to touch + npm's code! ([@ackalker](https://github.com/ackalker)) + +#### [@WATILDE'S](https://github.com/watilde) NPM USABILITY CORNER + +Following `npm@2.6.1`'s unexpected fix of many of the issues with `npm update +-g` simply by making `--depth=0` the default for `npm outdated`, friend of npm +[@watilde](https://github.com/watilde) has made several modest changes to npm's +behavior that together justify bumping npm's minor version, as well as making +npm significantly more pleasant to use: + +* [`448efd0`](https://github.com/npm/npm/commit/448efd0eaa6f97af0889bf47efc543a1ea2f8d7e) + [#2853](https://github.com/npm/npm/issues/2853) Add support for `--dev` and + `--prod` to `npm ls`, so that you can list only the trees of production or + development dependencies, as desired. + ([@watilde](https://github.com/watilde)) +* [`a0a8777`](https://github.com/npm/npm/commit/a0a87777af8bee180e4e9321699f050c29ed5ac4) + [#7463](https://github.com/npm/npm/issues/7463) Split the list printed by + `npm run-script` into lifecycle scripts and scripts directly invoked via `npm + run-script`. ([@watilde](https://github.com/watilde)) +* [`a5edc17`](https://github.com/npm/npm/commit/a5edc17d5ef1435b468a445156a4a109df80f92b) + [#6749](https://github.com/npm/npm/issues/6749) `init-package-json@1.3.1`: + Support for passing scopes to `npm init` so packages are initialized as part + of that scope / organization / team. ([@watilde](https://github.com/watilde)) + +#### SMALLER FEATURES AND FIXES + +It turns out that quite a few pull requests had piled up on npm's issue +tracker, and they included some nice small features and fixes: + +* [`f33e8b8`](https://github.com/npm/npm/commit/f33e8b8ff2de094071c5976be95e35110cf2ab1a) + [#7354](https://github.com/npm/npm/issues/7354) Add `--if-present` flag to + allow e.g. CI systems to call (semi-) standard build tasks defined in + `package.json`, but don't raise an error if no such script is defined. + ([@jussi-kalliokoski](https://github.com/jussi-kalliokoski)) +* [`7bf85cc`](https://github.com/npm/npm/commit/7bf85cc372ab5698593b01e139c383fa62c92516) + [#4005](https://github.com/npm/npm/issues/4005) + [#6248](https://github.com/npm/npm/issues/6248) Globally unlink a package + when `npm rm` / `npm unlink` is called with no arguments. + ([@isaacs](https://github.com/isaacs)) +* [`a2e04bd`](https://github.com/npm/npm/commit/a2e04bd921feab8f9e40a27e180ca9308eb709d7) + [#7294](https://github.com/npm/npm/issues/7294) Ensure that when depending on + `git+<proto>` URLs, npm doesn't keep tacking additional `git+` prefixes onto + the front. ([@twhid](https://github.com/twhid)) +* [`0f87f5e`](https://github.com/npm/npm/commit/0f87f5ed28960d962f34977953561d22983da4f9) + [#6422](https://github.com/npm/npm/issues/6422) When depending on GitHub + private repositories, make sure we construct the Git URLS correctly. + ([@othiym23](https://github.com/othiym23)) +* [`50f461d`](https://github.com/npm/npm/commit/50f461d248c4d22e881a9535dccc1d57d994dbc7) + [#4595](https://github.com/npm/npm/issues/4595) Support finding compressed + manpages. It's still up to the system to figure out how to display them, + though. ([@pshevtsov](https://github.com/pshevtsov)) +* [`44da664`](https://github.com/npm/npm/commit/44da66456b530c049ff50953f78368460df87461) + [#7465](https://github.com/npm/npm/issues/7465) When calling git, log the + **full** command, with all arguments, on error. + ([@thriqon](https://github.com/thriqon)) +* [`9748d5c`](https://github.com/npm/npm/commit/9748d5cd195d0269b32caf45129a93d29359a796) + Add parent to error on `ETARGET` error. + ([@davglass](https://github.com/davglass)) +* [`37038d7`](https://github.com/npm/npm/commit/37038d7db47a986001f77ac17b3e164000fc8ff3) + [#4663](https://github.com/npm/npm/issues/4663) Remove hackaround for Linux + tests, as it's evidently no longer necessary. + ([@mmalecki](https://github.com/mmalecki)) +* [`d7b7853`](https://github.com/npm/npm/commit/d7b785393dffce93bb70317fbc039a6428ca37c5) + [#2612](https://github.com/npm/npm/issues/2612) Add support for path + completion on `npm install`, which narrows completion to only directories + containing `package.json` files. ([@deestan](https://github.com/deestan)) +* [`628fcdb`](https://github.com/npm/npm/commit/628fcdb0be4e14c0312085a50dc2ae01dc713fa6) + Remove all command completion calls to `-/short`, because it's been removed + from the primary registry for quite some time, and is generally a poor idea + on any registry with more than a few hundred packages. + ([@othiym23](https://github.com/othiym23)) +* [`3f6061d`](https://github.com/npm/npm/commit/3f6061d75650441ee690472d1fa9c8dd7a7b1b28) + [#6659](https://github.com/npm/npm/issues/6659) Instead of removing zsh + completion global, make it a local instead. + ([@othiym23](https://github.com/othiym23)) + +#### DOCUMENTATION TWEAKS + +* [`5bc70e6`](https://github.com/npm/npm/commit/5bc70e6cfb3598da433806c6f447fc94c8e1d35d) + [#7417](https://github.com/npm/npm/issues/7417) Provide concrete examples of + how the new `npm update` defaults work in practice, tied to actual test + cases. Everyone interested in using `npm update -g` now that it's been fixed + should read these documents, as should anyone interested in writing + documentation for npm. ([@smikes](https://github.com/smikes)) +* [`8ac6f21`](https://github.com/npm/npm/commit/8ac6f2123a6af13dc9447fad96ec9cb583c45a71) + [#6543](https://github.com/npm/npm/issues/6543) Clarify `npm-scripts` + warnings to de-emphasize dangers of using `install` scripts. + ([@zeke](https://github.com/zeke)) +* [`ebe3b37`](https://github.com/npm/npm/commit/ebe3b37098efdada41dcc4c52a291e29296ea242) + [#6711](https://github.com/npm/npm/issues/6711) Note that git tagging of + versions can be disabled via `--no-git-tag-verson`. + ([@smikes](https://github.com/smikes)) +* [`2ef5771`](https://github.com/npm/npm/commit/2ef5771632006e6cee8cf17f836c0f98ab494bd1) + [#6711](https://github.com/npm/npm/issues/6711) Document `git-tag-version` + configuration option. ([@KenanY](https://github.com/KenanY)) +* [`95e59b2`](https://github.com/npm/npm/commit/95e59b287c9517780318e145371a859e8ebb2d20) + Document that `NODE_ENV=production` behaves analogously to `--production` on + `npm install`. ([@stefaneg](https://github.com/stefaneg)) +* [`687117a`](https://github.com/npm/npm/commit/687117a5bcd6a838cd1532ea7020ec6fcf0c33c0) + [#7463](https://github.com/npm/npm/issues/7463) Document the new script + grouping behavior in the man page for `npm run-script`. + ([@othiym23](https://github.com/othiym23)) +* [`536b2b6`](https://github.com/npm/npm/commit/536b2b6f55c349247b3e79b5d11b4c033ef5a3df) + Rescue one of the the disabled tests and make it work properly. + ([@smikes](https://github.com/smikes)) + +#### DEPENDENCY UPDATES + +* [`89fc6a4`](https://github.com/npm/npm/commit/89fc6a4e7ff8c524675fcc14493ca0a1e3a76d38) + `which@1.0.9`: Test for being run as root, as well as the current user. + ([@isaacs](https://github.com/isaacs)) +* [`5d0612f`](https://github.com/npm/npm/commit/5d0612f31e226cba32a05351c47b055c0ab6c557) + `glob@4.4.1`: Better error message to explain why calling sync glob with a + callback results in an error. ([@isaacs](https://github.com/isaacs)) +* [`64b07f6`](https://github.com/npm/npm/commit/64b07f6caf6cb07e4102f1e4e5f2ff2b944e452e) + `tap@0.7.1`: More accurate counts of pending & skipped tests. + ([@rmg](https://github.com/rmg)) +* [`8fda451`](https://github.com/npm/npm/commit/8fda45195dae1d6f792be556abe87f7763fab09b) + `semver@4.3.1`: Make official the fact that `node-semver` has moved from + [@isaacs](https://github.com/isaacs)'s organization to + [@npm](https://github.com/npm)'s. ([@isaacs](https://github.com/isaacs)) + +### v2.6.1 (2015-02-19): + +* [`8b98f0e`](https://github.com/npm/npm/commit/8b98f0e709d77a8616c944aebd48ab726f726f76) + [#4471](https://github.com/npm/npm/issues/4471) `npm outdated` (and only `npm + outdated`) now defaults to `--depth=0`. See the [docs for + `--depth`](https://github.com/npm/npm/blob/82f484672adb1a3caf526a8a48832789495bb43d/doc/misc/npm-config.md#depth) + for the mildly confusing details. ([@smikes](https://github.com/smikes)) +* [`aa79194`](https://github.com/npm/npm/commit/aa791942a9f3c8af6a650edec72a675deb7a7c6e) + [#6565](https://github.com/npm/npm/issues/6565) Tweak `peerDependency` + deprecation warning to include which peer dependency on which package is + going to need to change. ([@othiym23](https://github.com/othiym23)) +* [`5fa067f`](https://github.com/npm/npm/commit/5fa067fd47682ac3cdb12a2b009d8ca59b05f992) + [#7171](https://github.com/npm/npm/issues/7171) Tweak `engineStrict` + deprecation warning to include which `package.json` is using it. + ([@othiym23](https://github.com/othiym23)) +* [`0fe0caa`](https://github.com/npm/npm/commit/0fe0caa7eddb7acdacbe5ee81ceabaca27175c78) + `glob@4.4.0`: Glob patterns can now ignore matches. + ([@isaacs](https://github.com/isaacs)) + +### v2.6.0 (2015-02-12): + +#### A LONG-AWAITED GUEST + +* [`38c4825`](https://github.com/npm/npm/commit/38c48254d3d217b4babf5027cb39492be4052fc2) + [#5068](https://github.com/npm/npm/issues/5068) Add new logout command, and + make it do something useful on both bearer-based and basic-based authed + clients. ([@othiym23](https://github.com/othiym23)) +* [`4bf0f5d`](https://github.com/npm/npm/commit/4bf0f5d56c33649124b486e016ba4a620c105c1c) + `npm-registry-client@6.1.1`: Support new `logout` endpoint to invalidate + token for sessions. ([@othiym23](https://github.com/othiym23)) + +#### DEPRECATIONS + +* [`c8e08e6`](https://github.com/npm/npm/commit/c8e08e6d91f4016c80f572aac5a2080df0f78098) + [#6565](https://github.com/npm/npm/issues/6565) Warn that `peerDependency` + behavior is changing and add a note to the docs. + ([@othiym23](https://github.com/othiym23)) +* [`7c81a5f`](https://github.com/npm/npm/commit/7c81a5f5f058941f635a92f22641ea68e79b60db) + [#7171](https://github.com/npm/npm/issues/7171) Warn that `engineStrict` in + `package.json` will be going away in the next major version of npm (coming + soon!) ([@othiym23](https://github.com/othiym23)) + +#### BUG FIXES & TWEAKS + +* [`add5890`](https://github.com/npm/npm/commit/add5890ce447dabf120b907a85f715df1e065f44) + [#4668](https://github.com/npm/npm/issues/4668) `read-package-json@1.3.1`: + Warn when a `bin` symbolic link is a dangling reference. + ([@nicks](https://github.com/nicks)) +* [`4b42071`](https://github.com/npm/npm/commit/4b420714dfb84338d85def78c30bd665e32d72c1) + `semver@4.3.0`: Add functions to extract parts of the version triple, fix a + typo. ([@isaacs](https://github.com/isaacs)) +* [`a9aff38`](https://github.com/npm/npm/commit/a9aff38719918486fc381d67ad3371c475632ff7) + Use full path for man pages as the symbolic link source, instead of just the + file name. ([@bengl](https://github.com/bengl)) +* [`6fd0fbd`](https://github.com/npm/npm/commit/6fd0fbd8a0347fd47cb7ee0064e0902a2f8a087c) + [#7233](https://github.com/npm/npm/issues/7233) Ensure `globalconfig` path + exists before trying to edit it. ([@ljharb](https://github.com/ljharb)) +* [`a0a2620`](https://github.com/npm/npm/commit/a0a262047647d9e2690cebe5a89e6a0dd33202bb) + `ini@1.3.3`: Allow embedded, quoted equals signs in ini field names. + ([@isaacs](https://github.com/isaacs)) + +Also typos and other documentation issues were addressed by +[@rutsky](https://github.com/rutsky), [@imurchie](https://github.com/imurchie), +[@marcin-wosinek](https://github.com/marcin-wosinek), +[@marr](https://github.com/marr), [@amZotti](https://github.com/amZotti), and +[@karlhorky](https://github.com/karlhorky). Thank you, everyone! + +### v2.5.1 (2015-02-06): + +This release doesn't look like much, but considerable effort went into ensuring +that npm's tests will pass on io.js 1.1.0 and Node 0.11.16 / 0.12.0 on both OS +X and Linux. + +**NOTE:** there are no actual changes to npm's code in `npm@2.5.1`. Only test +code (and the upgrade of `request` to the latest version) has changed. + +#### `npm-registry-mock@1.0.0`: + +* [`0e8d473`](https://github.com/npm/npm/commit/0e8d4736a1cbdda41ae8eba8a02c7ff7ce80c2ff) + [#7281](https://github.com/npm/npm/issues/7281) `npm-registry-mock@1.0.0`: + Clean up API, set `connection: close`. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`4707bba`](https://github.com/npm/npm/commit/4707bba7d44dfab85cc45c2ecafa9c1601ba2e9a) + Further update tests to work with `npm-registry-mock@1.0.0`. + ([@othiym23](https://github.com/othiym23)) +* [`41a0f89`](https://github.com/npm/npm/commit/41a0f8959d4e02af9661588afa7d2b4543cc21b6) + Got rid of completely gratuitous global config manipulation in tests. + ([@othiym23](https://github.com/othiym23)) + +#### MINOR DEPENDENCY TWEAK + +* [`a4c7af9`](https://github.com/npm/npm/commit/a4c7af9c692f250c0fd017397ed9514fc263b752) + `request@2.53.0`: Tweaks to tunneling proxy behavior. + ([@nylen](https://github.com/nylen)) + +### v2.5.0 (2015-01-29): + +#### SMALL FEATURE I HAVE ALREADY USED TO MAINTAIN NPM ITSELF + +* [`9d61e96`](https://github.com/npm/npm/commit/9d61e96fb1f48687a85c211e4e0cd44c7f95a38e) + `npm outdated --long` now includes a column showing the type of dependency. + ([@watilde](https://github.com/watilde)) + +#### BUG FIXES & TWEAKS + +* [`fec4c96`](https://github.com/npm/npm/commit/fec4c967ee235030bf31393e8605e9e2811f4a39) + Allow `--no-proxy` to override `HTTP_PROXY` setting in environment. + ([@othiym23](https://github.com/othiym23)) +* [`589acb9`](https://github.com/npm/npm/commit/589acb9714f395c2ad0d98cb0ac4236f1842d2cc) + Only set `access` when publshing when it's explicitly set. + ([@othiym23](https://github.com/othiym23)) +* [`1027087`](https://github.com/npm/npm/commit/102708704c8c4f0ea99775d38f8d1efecf584940) + Add script and `Makefile` stanza to update AUTHORS. + ([@KenanY](https://github.com/KenanY)) +* [`eeff04d`](https://github.com/npm/npm/commit/eeff04da7979a0181becd36b8777d607e7aa1787) + Add `NPMOPTS` to top-level install in `Makefile` to override `userconfig`. + ([@aredridel](https://github.com/aredridel)) +* [`0d17328`](https://github.com/npm/npm/commit/0d173287336650606d4c91818bb7bcfb0c5d57a1) + `fstream@1.0.4`: Run chown only when necessary. + ([@silkentrance](https://github.com/silkentrance)) +* [`9aa4622`](https://github.com/npm/npm/commit/9aa46226ee63b9e183fd49fc72d9bdb0fae9605e) + `columnify@1.4.1`: ES6ified! ([@timoxley](https://github.com/timoxley)) +* [`51b2fd1`](https://github.com/npm/npm/commit/51b2fd1974e38b825ac5ca4a852ab3c4142624cc) + Update default version in `docs/npm-config.md`. + ([@lucthev](https://github.com/lucthev)) + +#### `npm-registry-client@6.0.7`: + +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + [#7226](https://github.com/npm/npm/issues/7226) Ensure that all request + settings are copied onto the agent. + ([@othiym23](https://github.com/othiym23)) +* [`e186f6e`](https://github.com/npm/npm/commit/e186f6e7cfeb4db9c94d7375638f0b2f0d472947) + Only set `access` on publish when it differs from the norm. + ([@othiym23](https://github.com/othiym23)) +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + Allow overriding request's environment-based proxy handling. + ([@othiym23](https://github.com/othiym23)) +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + Properly handle retry failures on fetch. + ([@othiym23](https://github.com/othiym23)) + +### v2.4.1 (2015-01-23): + +![bridge that doesn't meet in the middle](http://www.static-18.themodernnomad.com/wp-content/uploads/2011/08/bridge-fail.jpg) + +Let's accentuate the positive: the `dist-tag` endpoints for `npm dist-tag +{add,rm,ls}` are now live on the public npm registry. + +* [`f70272b`](https://github.com/npm/npm/commit/f70272bed7d77032d1e21553371dd5662fef32f2) + `npm-registry-client@6.0.3`: Properly escape JSON tag version strings and + filter `_etag` from CouchDB docs. ([@othiym23](https://github.com/othiym23)) + +### v2.4.0 (2015-01-22): + +#### REGISTRY 2: ACCESS AND DIST-TAGS + +NOTE: This week's registry-2 commands are leading the implementation on +registry.npmjs.org a little bit, so some of the following may not work for +another week or so. Also note that `npm access` has documentation and +subcommands that are not yet finished, because they depend on incompletely +specified registry API endpoints. Things are coming together very quickly, +though, so expect the missing pieces to be filled in the coming weeks. + +* [`c963eb2`](https://github.com/npm/npm/commit/c963eb295cf766921b1680f4a71fd0ed3e1bcad8) + [#7181](https://github.com/npm/npm/issues/7181) NEW `npm access public` and + `npm access restricted`: Toggle visibility of scoped packages. + ([@othiym23](https://github.com/othiym23)) +* [`dc51810`](https://github.com/npm/npm/commit/dc51810e08c0f104259146c9c035d255de4f7d1d) + [#6243](https://github.com/npm/npm/issues/6243) / + [#6854](https://github.com/npm/npm/issues/6854) NEW `npm dist-tags`: Directly + manage `dist-tags` on packages. Most notably, `dist-tags` can now be deleted. + ([@othiym23](https://github.com/othiym23)) +* [`4c7c132`](https://github.com/npm/npm/commit/4c7c132a6b8305dca2974943226c39c0cdc64ff9) + [#7181](https://github.com/npm/npm/issues/7181) / + [#6854](https://github.com/npm/npm/issues/6854) `npm-registry-client@6.0.1`: + Add new `access` and `dist-tags` endpoints + ([@othiym23](https://github.com/othiym23)) + +#### NOT EXACTLY SELF-DEPRECATING + +* [`10d5c77`](https://github.com/npm/npm/commit/10d5c77653487f15759ac7de262a97e9c655240c) + [#6274](https://github.com/npm/npm/issues/6274) Deprecate `npm tag` in favor + of `npm dist-tag`. ([@othiym23](https://github.com/othiym23)) + +#### BUG FIX AND TINY FEATURE + +* [`29a6ef3`](https://github.com/npm/npm/commit/29a6ef38ef86ac318c5d9ea4bee28ce614672fa6) + [#6850](https://github.com/npm/npm/issues/6850) Be smarter about determining + base of file deletion when unbuilding. ([@phated](https://github.com/phated)) +* [`4ad01ea`](https://github.com/npm/npm/commit/4ad01ea2930a7a1cf88be121cc5ce9eba40c6807) + `init-package-json@1.2.0`: Support `--save-exact` in `npm init`. + ([@gustavnikolaj](https://github.com/gustavnikolaj)) + +### v2.3.0 (2015-01-15): + +#### REGISTRY 2: OH MY STARS! WHO AM I? + +* [`e662a60`](https://github.com/npm/npm/commit/e662a60e2f9a542effd8e72279d4622fe514415e) + The new `whoami` endpoint might not return a value. + ([@othiym23](https://github.com/othiym23)) +* [`c2cccd4`](https://github.com/npm/npm/commit/c2cccd4bbc65885239ed646eb510155f7b8af13d) + `npm-registry-client@5.0.0`: Includes the following fine changes + ([@othiym23](https://github.com/othiym23)): + * [`ba6b73e`](https://github.com/npm/npm-registry-client/commit/ba6b73e351027246c228622014e4441412409bad) + [#92](https://github.com/npm/npm-registry-client/issues/92) BREAKING CHANGE: + Move `/whoami` endpoint out of the package namespace (to `/-/whoami`). + ([@othiym23](https://github.com/othiym23)) + * [`3b174b7`](https://github.com/npm/npm-registry-client/commit/3b174b75c0c9ea77e298e6bb664fb499824ecc7c) + [#93](https://github.com/npm/npm-registry-client/issues/93) Registries based + on token-based auth can now offer starring. + ([@bcoe](https://github.com/bcoe)) + * [`4701a29`](https://github.com/npm/npm-registry-client/commit/4701a29bcda41bc14aa91f361dd0d576e24677d7) + Fix HTTP[S] connection keep-alive on Node 0.11 / io.js 1.0. + ([@fengmk2](https://github.com/fengmk2)) + +#### BETTER REGISTRY METADATA CACHING + +* [`98e1e10`](https://github.com/npm/npm/commit/98e1e1080df1f2cab16ed68035603950ea3d2d48) + [#6791](https://github.com/npm/npm/issues/6791) Add caching based on + Last-Modified / If-Modified-Since headers. Includes this + `npm-registry-client@5.0.0` change ([@lxe](https://github.com/lxe)): + * [`07bc335`](https://github.com/npm/npm-registry-client/commit/07bc33502b93554cd7539bfcce37d6e2d5404cd0) + [#86](https://github.com/npm/npm-registry-client/issues/86) Add Last-Modified + / If-Modified-Since cache header handling. ([@lxe](https://github.com/lxe)) + +#### HOW MUCH IS THAT WINDOWS IN THE DOGGY? + +* [`706d49a`](https://github.com/npm/npm/commit/706d49ab45521360fce1a68779b8de899015d8c2) + [#7107](https://github.com/npm/npm/issues/7107) `getCacheStat` passes a stub + stat on Windows. ([@rmg](https://github.com/rmg)) +* [`5fce278`](https://github.com/npm/npm/commit/5fce278a688a1cb79183e012bde40b089c2e97a4) + [#5267](https://github.com/npm/npm/issues/5267) Use `%COMSPEC%` when set on + Windows. ([@edmorley](https://github.com/edmorley)) +* [`cc2e099`](https://github.com/npm/npm/commit/cc2e09912ce2f91567c485422e4e797c4deb9842) + [#7083](https://github.com/npm/npm/issues/7083) Ensure Git cache prefix + exists before repo clone on Windows. + ([@othiym23](https://github.com/othiym23)) + +#### THRILLING BUG FIXES + +* [`c6fb430`](https://github.com/npm/npm/commit/c6fb430e55672b3caf87d25cbd2aeeebc449e2f2) + [#4197](https://github.com/npm/npm/issues/4197) Report `umask` as a 0-padded + octal literal. ([@smikes](https://github.com/smikes)) +* [`209713e`](https://github.com/npm/npm/commit/209713ebd4b77da11ce27d90c3346f78d760ba52) + [#4197](https://github.com/npm/npm/issues/4197) `umask@1.1.0`: Properly + handle `umask`s (i.e. not decimal numbers). + ([@smikes](https://github.com/smikes)) +* [`9eac0a1`](https://github.com/npm/npm/commit/9eac0a14488c5979ebde4c17881c8cd74f395069) + Make the example for bin links non-destructive. + ([@KevinSheedy](https://github.com/KevinSheedy)) +* [`6338bcf`](https://github.com/npm/npm/commit/6338bcfcd9cd1b0cc48b051dae764dc436ab5332) + `glob@4.3.5`: " -> ', for some reason. ([@isaacs](https://github.com/isaacs)) + +### v2.2.0 (2015-01-08): + +* [`88c531d`](https://github.com/npm/npm/commit/88c531d1c0b3aced8f2a09632db01b5635e7226a) + [#7056](https://github.com/npm/npm/issues/7056) version doesn't need a + package.json. ([@othiym23](https://github.com/othiym23)) +* [`2656c19`](https://github.com/npm/npm/commit/2656c19f6b915c3173acc3b6f184cc321563da5f) + [#7095](https://github.com/npm/npm/issues/7095) Link to npm website instead + of registry. ([@konklone](https://github.com/konklone)) +* [`c76b801`](https://github.com/npm/npm/commit/c76b8013bf1758587565822626171b76cb465c9e) + [#7067](https://github.com/npm/npm/issues/7067) Obfuscate secrets, including + nerfed URLs. ([@smikes](https://github.com/smikes)) +* [`17f66ce`](https://github.com/npm/npm/commit/17f66ceb1bd421084e4ae82a6b66634a6e272929) + [#6849](https://github.com/npm/npm/issues/6849) Explain the tag workflow more + clearly. ([@smikes](https://github.com/smikes)) +* [`e309df6`](https://github.com/npm/npm/commit/e309df642de33d10d6dffadaa8a5d214a924d0dc) + [#7096](https://github.com/npm/npm/issues/7096) Really, `npm update -g` is + almost always a terrible idea. ([@smikes](https://github.com/smikes)) +* [`acf287d`](https://github.com/npm/npm/commit/acf287d2547c8a0a8871652c164019261b666d55) + [#6999](https://github.com/npm/npm/issues/6999) `npm run-script env`: add a + new default script that will print out environment values. + ([@gcb](https://github.com/gcb)) +* [`560c009`](https://github.com/npm/npm/commit/560c00945d4dec926cd29193e336f137c7f3f951) + [#6745](https://github.com/npm/npm/issues/6745) Document `npm update --dev`. + ([@smikes](https://github.com/smikes)) +* [`226a677`](https://github.com/npm/npm/commit/226a6776a1a9e28570485623b8adc2ec4b041335) + [#7046](https://github.com/npm/npm/issues/7046) We have never been the Node + package manager. ([@linclark](https://github.com/linclark)) +* [`38eef22`](https://github.com/npm/npm/commit/38eef2248f03bb8ab04cae1833e2a228fb887f3c) + `npm-install-checks@1.0.5`: Compatibility with npmlog@^1. + ([@iarna](https://github.com/iarna)) + +### v2.1.18 (2015-01-01): + +* [`bf8640b`](https://github.com/npm/npm/commit/bf8640b0395b5dff71260a0cede7efc699a7bcf5) + [#7044](https://github.com/npm/npm/issues/7044) Document `.npmignore` syntax. + ([@zeke](https://github.com/zeke)) + +### v2.1.17 (2014-12-25): + +merry npm xmas + +Working with [@phated](https://github.com/phated), I discovered that npm still +had some lingering race conditions around how it handles Git dependencies. The +following changes were intended to remedy to these issues. Thanks to +[@phated](https://github.com/phated) for all his help getting to the bottom of +these. + +* [`bdf1c84`](https://github.com/npm/npm/commit/bdf1c8483f5c4ad79b712db12d73276e15883923) + [#7006](https://github.com/npm/npm/issues/7006) Only `chown` template and + top-level Git cache directories. ([@othiym23](https://github.com/othiym23)) +* [`581a72d`](https://github.com/npm/npm/commit/581a72da18f35ec87edef6255adf4ef4714a478c) + [#7006](https://github.com/npm/npm/issues/7006) Map Git remote inflighting to + clone paths rather than Git URLs. ([@othiym23](https://github.com/othiym23)) +* [`1c48d08`](https://github.com/npm/npm/commit/1c48d08dea31a11ac11a285cac598a482481cade) + [#7009](https://github.com/npm/npm/issues/7009) `normalize-git-url@1.0.0`: + Normalize Git URLs while caching. ([@othiym23](https://github.com/othiym23)) +* [`5423cf0`](https://github.com/npm/npm/commit/5423cf0be8ff2b76bfff7c8e780e5f261235a86a) + [#7009](https://github.com/npm/npm/issues/7009) Pack tarballs to their final + locations atomically. ([@othiym23](https://github.com/othiym23)) +* [`7f6557f`](https://github.com/npm/npm/commit/7f6557ff317469ee4a87c542ff9a991e74ce9f38) + [#7009](https://github.com/npm/npm/issues/7009) Inflight local directory + packing, just to be safe. ([@othiym23](https://github.com/othiym23)) + +Other changes: + +* [`1c491e6`](https://github.com/npm/npm/commit/1c491e65d70af013e8d5ac008d6d9762d6d91793) + [#6991](https://github.com/npm/npm/issues/6991) `npm version`: fix regression + in dirty-checking behavior ([@rlidwka](https://github.com/rlidwka)) +* [`55ceb2b`](https://github.com/npm/npm/commit/55ceb2b08ff8a0f56b94cc972ca15d7862e8733c) + [#1991](https://github.com/npm/npm/issues/1991) modify docs to reflect actual + `npm restart` behavior ([@smikes](https://github.com/smikes)) +* [`fb8e31b`](https://github.com/npm/npm/commit/fb8e31b95476a50bda35a665a99eec8a5d25a4db) + [#6982](https://github.com/npm/npm/issues/6982) when doing registry + operations, ensure registry URL always ends with `/` + ([@othiym23](https://github.com/othiym23)) +* [`5bcba65`](https://github.com/npm/npm/commit/5bcba65bed2678ffe80fb596f72abe9871d131c8) + pull whitelisted Git environment variables out into a named constant + ([@othiym23](https://github.com/othiym23)) +* [`be04bbd`](https://github.com/npm/npm/commit/be04bbdc52ebfc820cd939df2f7d79fe87067747) + [#7000](https://github.com/npm/npm/issues/7000) No longer install badly-named + manpage files, and log an error when trying to uninstall them. + ([@othiym23](https://github.com/othiym23)) +* [`6b7c5ec`](https://github.com/npm/npm/commit/6b7c5eca6b65e1247d0e51f6400cf2637ac880ce) + [#7011](https://github.com/npm/npm/issues/7011) Send auth for tarball fetches + for packages in `npm-shrinkwrap.json` from private registries. + ([@othiym23](https://github.com/othiym23)) +* [`9b9de06`](https://github.com/npm/npm/commit/9b9de06a99893b40aa23f0335726dec6df7979db) + `glob@4.3.2`: Better handling of trailing slashes. + ([@isaacs](https://github.com/isaacs)) +* [`030f3c7`](https://github.com/npm/npm/commit/030f3c7450b8ce124a19073bfbae0948a0a1a02c) + `semver@4.2.0`: Diffing between version strings. + ([@isaacs](https://github.com/isaacs)) + +### v2.1.16 (2014-12-22): + +* [`a4e4e33`](https://github.com/npm/npm/commit/a4e4e33edb35c68813f04bf42bdf933a6f727bcd) + [#6987](https://github.com/npm/npm/issues/6987) `read-installed@3.1.5`: fixed + a regression where a new / empty package would cause read-installed to throw. + ([@othiym23](https://github.com/othiym23) / + [@pgilad](https://github.com/pgilad)) + +### v2.1.15 (2014-12-18): + +* [`e5a2dee`](https://github.com/npm/npm/commit/e5a2dee47c74f26c56fee5998545b97497e830c8) + [#6951](https://github.com/npm/npm/issues/6951) `fs-vacuum@1.2.5`: Use + `path-is-inside` for better Windows normalization. + ([@othiym23](https://github.com/othiym23)) +* [`ac6167c`](https://github.com/npm/npm/commit/ac6167c2b9432939c57296f7ddd11ad5f8f918b2) + [#6955](https://github.com/npm/npm/issues/6955) Call `path.normalize` in + `lib/utils/gently-rm.js` for better Windows normalization. + ([@ben-page](https://github.com/ben-page)) +* [`c625d71`](https://github.com/npm/npm/commit/c625d714795e3b5badd847945e2401adfad5a196) + [#6964](https://github.com/npm/npm/issues/6964) Clarify CA configuration + docs. ([@jeffjo](https://github.com/jeffjo)) +* [`58b8cb5`](https://github.com/npm/npm/commit/58b8cb5cdf26a854358b7c2ab636572dba9bac16) + [#6950](https://github.com/npm/npm/issues/6950) Fix documentation typos. + ([@martinvd](https://github.com/martinvd)) +* [`7c1299d`](https://github.com/npm/npm/commit/7c1299d00538ea998684a1903a4091eafc63b7f1) + [#6909](https://github.com/npm/npm/issues/6909) Remove confusing mention of + rubygems `~>` semver operator. ([@mjtko](https://github.com/mjtko)) +* [`7dfdcc6`](https://github.com/npm/npm/commit/7dfdcc6debd8ef1fc52a2b508997d15887aad824) + [#6909](https://github.com/npm/npm/issues/6909) `semver@4.1.1`: Synchronize + documentation with PR [#6909](https://github.com/npm/npm/issues/6909) + ([@othiym23](https://github.com/othiym23)) +* [`adfddf3`](https://github.com/npm/npm/commit/adfddf3b682e0ae08e4b59d87c1b380dd651c572) + [#6925](https://github.com/npm/npm/issues/6925) Correct typo in + `doc/api/npm-ls.md` ([@oddurs](https://github.com/oddurs)) +* [`f5c534b`](https://github.com/npm/npm/commit/f5c534b711ab173129baf366c4f08d68f6117333) + [#6920](https://github.com/npm/npm/issues/6920) Remove recommendation to run + as root from `README.md`. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`3ef4459`](https://github.com/npm/npm/commit/3ef445922cd39f25b992d91bd22c4d367882ea22) + [#6920](https://github.com/npm/npm/issues/6920) `npm-@googlegroups.com` has + gone the way of all things. That means it's gone. + ([@robertkowalski](https://github.com/robertkowalski)) + +### v2.1.14 (2014-12-13): + +* [`cf7aeae`](https://github.com/npm/npm/commit/cf7aeae3c3a24e48d3de4006fa082f0c6040922a) + [#6923](https://github.com/npm/npm/issues/6923) Overaggressive link update + for new website broke node-gyp. ([@othiym23](https://github.com/othiym23)) + +### v2.1.13 (2014-12-11): + +* [`cbb890e`](https://github.com/npm/npm/commit/cbb890eeacc0501ba1b8c6955f1c829c8af9f486) + [#6897](https://github.com/npm/npm/issues/6897) npm is a nice package manager + that runs server-side JavaScript. ([@othiym23](https://github.com/othiym23)) +* [`d9043c3`](https://github.com/npm/npm/commit/d9043c3b8d7450c3cb9ca795028c0e1c05377820) + [#6893](https://github.com/npm/npm/issues/6893) Remove erroneous docs about + preupdate / update / postupdate lifecycle scripts, which have never existed. + ([@devTristan](https://github.com/devTristan)) +* [`c5df4d0`](https://github.com/npm/npm/commit/c5df4d0d683cd3506808d1cd1acebff02a8b82db) + [#6884](https://github.com/npm/npm/issues/6884) Update npmjs.org to npmjs.com + in docs. ([@linclark](https://github.com/linclark)) +* [`cb6ff8d`](https://github.com/npm/npm/commit/cb6ff8dace1b439851701d4784d2d719c22ca7a7) + [#6879](https://github.com/npm/npm/issues/6879) npm version: Update + shrinkwrap post-check. ([@othiym23](https://github.com/othiym23)) +* [`2a340bd`](https://github.com/npm/npm/commit/2a340bdd548c6449468281e1444a032812bff677) + [#6868](https://github.com/npm/npm/issues/6868) Use magic numbers instead of + regexps to distinguish tarballs from other things. + ([@daxxog](https://github.com/daxxog)) +* [`f1c8bdb`](https://github.com/npm/npm/commit/f1c8bdb3f6b753d0600597e12346bdc3a34cb9c1) + [#6861](https://github.com/npm/npm/issues/6861) `npm-registry-client@4.0.5`: + Distinguish between error properties that are part of the response and error + strings that should be returned to the user. + ([@disrvptor](https://github.com/disrvptor)) +* [`d3a1b63`](https://github.com/npm/npm/commit/d3a1b6397fddef04b5198ca89d36d720aeb05eb6) + [#6762](https://github.com/npm/npm/issues/6762) Make `npm outdated` ignore + private packages. ([@KenanY](https://github.com/KenanY)) +* [`16d8542`](https://github.com/npm/npm/commit/16d854283ca5bcdb0cb2812fc5745d841652b952) + install.sh: Drop support for node < 0.8, remove engines bits. + ([@isaacs](https://github.com/isaacs)) +* [`b9c6046`](https://github.com/npm/npm/commit/b9c60466d5b713b1dc2947da14a5dfe42352e029) + `init-package-json@1.1.3`: ([@terinstock](https://github.com/terinstock)) + noticed that `init.license` configuration doesn't stick. Make sure that + dashed defaults don't trump dotted parameters. + ([@othiym23](https://github.com/othiym23)) +* [`b6d6acf`](https://github.com/npm/npm/commit/b6d6acfc02c8887f78067931babab8f7c5180fed) + `which@1.0.8`: No longer use graceful-fs for some reason. + ([@isaacs](https://github.com/isaacs)) +* [`d39f673`](https://github.com/npm/npm/commit/d39f673caf08a90fb2bb001d79c98062d2cd05f4) + `request@2.51.0`: Incorporate bug fixes. ([@nylen](https://github.com/nylen)) +* [`c7ad727`](https://github.com/npm/npm/commit/c7ad7279cc879930ec58ccc62fa642e621ecb65c) + `columnify@1.3.2`: Incorporate bug fixes. + ([@timoxley](https://github.com/timoxley)) + +### v2.1.12 (2014-12-04): + +* [`e5b1e44`](https://github.com/npm/npm/commit/e5b1e448bb4a9d6eae4ba0f67b1d3c2cea8ed383) + add alias verison=version ([@isaacs](https://github.com/isaacs)) +* [`5eed7bd`](https://github.com/npm/npm/commit/5eed7bddbd7bb92a44c4193c93e8529500c558e6) + `request@2.49.0` ([@nylen](https://github.com/nylen)) +* [`e72f81d`](https://github.com/npm/npm/commit/e72f81d8412540ae7d1e0edcc37c11bcb8169051) + `glob@4.3.1` / `minimatch@2.0.1` ([@isaacs](https://github.com/isaacs)) +* [`b8dcc36`](https://github.com/npm/npm/commit/b8dcc3637b5b71933b97162b7aff1b1a622c13e2) + `graceful-fs@3.0.5` ([@isaacs](https://github.com/isaacs)) + +### v2.1.11 (2014-11-27): + +* [`4861d28`](https://github.com/npm/npm/commit/4861d28ad0ebd959fe6bc15b9c9a50fcabe57f55) + `which@1.0.7`: License update. ([@isaacs](https://github.com/isaacs)) +* [`30a2ea8`](https://github.com/npm/npm/commit/30a2ea80c891d384b31a1cf28665bba4271915bd) + `ini@1.3.2`: License update. ([@isaacs](https://github.com/isaacs)) +* [`6a4ea05`](https://github.com/npm/npm/commit/6a4ea054f6ddf52fc58842ba2046564b04c5c0e2) + `fstream@1.0.3`: Propagate error events to downstream streams. + ([@gfxmonk](https://github.com/gfxmonk)) +* [`a558695`](https://github.com/npm/npm/commit/a5586954f1c18df7c96137e0a79f41a69e7a884e) + `tar@1.0.3`: Don't extract broken files, propagate `drain` event. + ([@gfxmonk](https://github.com/gfxmonk)) +* [`989624e`](https://github.com/npm/npm/commit/989624e8321f87734c1b1272fc2f646e7af1f81c) + [#6767](https://github.com/npm/npm/issues/6767) Actually pass parameters when + adding git repo to cach under Windows. + ([@othiym23](https://github.com/othiym23)) +* [`657af73`](https://github.com/npm/npm/commit/657af7308f7d6cd2f81389fcf0d762252acaf1ce) + [#6774](https://github.com/npm/npm/issues/6774) When verifying paths on + unbuild, resolve both source and target as symlinks. + ([@hokaccha](https://github.com/hokaccha)) +* [`fd19c40`](https://github.com/npm/npm/commit/fd19c4046414494f9647a6991c00f8406a939929) + [#6713](https://github.com/npm/npm/issues/6713) + `realize-package-specifier@1.3.0`: Make it so that `npm install foo@1` work + when a file named `1` exists. ([@iarna](https://github.com/iarna)) +* [`c8ac37a`](https://github.com/npm/npm/commit/c8ac37a470491b2ed28514536e2e198494638c79) + `npm-registry-client@4.0.4`: Fix regression in failed fetch retries. + ([@othiym23](https://github.com/othiym23)) + +### v2.1.10 (2014-11-20): + +* [`756f3d4`](https://github.com/npm/npm/commit/756f3d40fe18bc02bc93afe17016dfcc266c4b6b) + [#6735](https://github.com/npm/npm/issues/6735) Log "already built" messages + at info, not error. ([@smikes](https://github.com/smikes)) +* [`1b7330d`](https://github.com/npm/npm/commit/1b7330dafba3bbba171f74f1e58b261cb1b9301e) + [#6729](https://github.com/npm/npm/issues/6729) `npm-registry-client@4.0.3`: + GitHub won't redirect you through an HTML page to a compressed tarball if you + don't tell it you accept JSON responses. + ([@KenanY](https://github.com/KenanY)) +* [`d9c7857`](https://github.com/npm/npm/commit/d9c7857be02dacd274e55bf6d430d90d91509d53) + [#6506](https://github.com/npm/npm/issues/6506) + `readdir-scoped-modules@1.0.1`: Use `graceful-fs` so the whole dependency + tree gets read, even in case of `EMFILE`. + ([@sakana](https://github.com/sakana)) +* [`3a085be`](https://github.com/npm/npm/commit/3a085be158ace8f1e4395e69f8c102d3dea00c5f) + Grammar fix in docs. ([@icylace](https://github.com/icylace)) +* [`3f8e2ff`](https://github.com/npm/npm/commit/3f8e2ff8342d327d6f1375437ecf4bd945dc360f) + Did you know that npm has a Code of Conduct? Add a link to it to + CONTRIBUTING.md. ([@isaacs](https://github.com/isaacs)) +* [`319ccf6`](https://github.com/npm/npm/commit/319ccf633289e06e57a80d74c39706899348674c) + `glob@4.2.1`: Performance tuning. ([@isaacs](https://github.com/isaacs)) +* [`835f046`](https://github.com/npm/npm/commit/835f046e7568c33e81a0b48c84cff965024d8b8a) + `readable-stream@1.0.33`: Bug fixes. ([@rvagg](https://github.com/rvagg)) +* [`a34c38d`](https://github.com/npm/npm/commit/a34c38d0732fb246d11f2a776d2ad0d8db654338) + `request@2.48.0`: Bug fixes. ([@nylen](https://github.com/nylen)) + +### v2.1.9 (2014-11-13): + +* [`eed9f61`](https://github.com/npm/npm/commit/eed9f6101963364acffc59d7194fc1655180e80c) + [#6542](https://github.com/npm/npm/issues/6542) `npm owner add / remove` now + works properly with scoped packages + ([@othiym23](https://github.com/othiym23)) +* [`cd25973`](https://github.com/npm/npm/commit/cd25973825aa5315b7ebf26227bd32bd6be5533f) + [#6548](https://github.com/npm/npm/issues/6548) using sudo won't leave the + cache's git directories with bad permissions + ([@othiym23](https://github.com/othiym23)) +* [`56930ab`](https://github.com/npm/npm/commit/56930abcae6a6ea41f1b75e23765c61259cef2dd) + fixed irregular `npm cache ls` output (yes, that's a thing) + ([@othiym23](https://github.com/othiym23)) +* [`740f483`](https://github.com/npm/npm/commit/740f483db6ec872b453065842da080a646c3600a) + legacy tests no longer poison user's own cache + ([@othiym23](https://github.com/othiym23)) +* [`ce37f14`](https://github.com/npm/npm/commit/ce37f142a487023747a9086335618638ebca4372) + [#6169](https://github.com/npm/npm/issues/6169) add terse output similar to + `npm publish / unpublish` for `npm owner add / remove` + ([@KenanY](https://github.com/KenanY)) +* [`bf2b8a6`](https://github.com/npm/npm/commit/bf2b8a66d7188900bf1e957c052b893948b67e0e) + [#6680](https://github.com/npm/npm/issues/6680) pass auth credentials to + registry when downloading search index + ([@terinjokes](https://github.com/terinjokes)) +* [`00ecb61`](https://github.com/npm/npm/commit/00ecb6101422984696929f602e14da186f9f669c) + [#6400](https://github.com/npm/npm/issues/6400) `.npmignore` is respected for + git repos on cache / pack / publish + ([@othiym23](https://github.com/othiym23)) +* [`d1b3a9e`](https://github.com/npm/npm/commit/d1b3a9ec5e2b6d52765ba5da5afb08dba41c49c1) + [#6311](https://github.com/npm/npm/issues/6311) `npm ls -l --depth=0` no + longer prints phantom duplicate children + ([@othiym23](https://github.com/othiym23)) +* [`07c5f34`](https://github.com/npm/npm/commit/07c5f34e45c9b18c348ed53b5763b1c5d4325740) + [#6690](https://github.com/npm/npm/issues/6690) `uid-number@0.0.6`: clarify + confusing names in error-handling code ([@isaacs](https://github.com/isaacs)) +* [`1ac9be9`](https://github.com/npm/npm/commit/1ac9be9f3bab816211d72d13cb05b5587878a586) + [#6684](https://github.com/npm/npm/issues/6684) `npm init`: don't report + write if canceled ([@smikes](https://github.com/smikes)) +* [`7bb207d`](https://github.com/npm/npm/commit/7bb207d1d6592a9cffc986871e4b671575363c2f) + [#5754](https://github.com/npm/npm/issues/5754) never remove app directories + on failed install ([@othiym23](https://github.com/othiym23)) +* [`705ce60`](https://github.com/npm/npm/commit/705ce601e7b9c5428353e02ebb30cb76c1991fdd) + [#5754](https://github.com/npm/npm/issues/5754) `fs-vacuum@1.2.2`: don't + throw when another fs task writes to a directory being vacuumed + ([@othiym23](https://github.com/othiym23)) +* [`1b650f4`](https://github.com/npm/npm/commit/1b650f4f217c413a2ffb96e1701beb5aa67a0de2) + [#6255](https://github.com/npm/npm/issues/6255) ensure that order credentials + are used from `.npmrc` doesn't regress + ([@othiym23](https://github.com/othiym23)) +* [`9bb2c34`](https://github.com/npm/npm/commit/9bb2c3435cedef40b45d3e9bd7a8edfb8cbe7209) + [#6644](https://github.com/npm/npm/issues/6644) `warn` rather than `info` on + fetch failure ([@othiym23](https://github.com/othiym23)) +* [`e34a7b6`](https://github.com/npm/npm/commit/e34a7b6b7371b1893a062f627ae8e168546d7264) + [#6524](https://github.com/npm/npm/issues/6524) `npm-registry-client@4.0.2`: + proxy via `request` more transparently + ([@othiym23](https://github.com/othiym23)) +* [`40afd6a`](https://github.com/npm/npm/commit/40afd6aaf34c11a10e80ec87b115fb2bb907e3bd) + [#6524](https://github.com/npm/npm/issues/6524) push proxy settings into + `request` ([@tauren](https://github.com/tauren)) + +### v2.1.8 (2014-11-06): + +* [`063d843`](https://github.com/npm/npm/commit/063d843965f9f0bfa5732d7c2d6f5aa37a8260a2) + npm version now updates version in npm-shrinkwrap.json + ([@faiq](https://github.com/faiq)) +* [`3f53cd7`](https://github.com/npm/npm/commit/3f53cd795f8a600e904a97f215ba5b5a9989d9dd) + [#6559](https://github.com/npm/npm/issues/6559) save local dependencies in + npm-shrinkwrap.json ([@Torsph](https://github.com/Torsph)) +* [`e249262`](https://github.com/npm/npm/commit/e24926268b2d2220910bc81cce6d3b2e08d94eb1) + npm-faq.md: mention scoped pkgs in namespace Q + ([@smikes](https://github.com/smikes)) +* [`6b06ec4`](https://github.com/npm/npm/commit/6b06ec4ef5da490bdca1512fa7f12490245c192b) + [#6642](https://github.com/npm/npm/issues/6642) `init-package-json@1.1.2`: + Handle both `init-author-name` and `init.author.name`. + ([@othiym23](https://github.com/othiym23)) +* [`9cb334c`](https://github.com/npm/npm/commit/9cb334c8a895a55461aac18791babae779309a0e) + [#6409](https://github.com/npm/npm/issues/6409) document commit-ish with + GitHub URLs ([@smikes](https://github.com/smikes)) +* [`0aefae9`](https://github.com/npm/npm/commit/0aefae9bc2598a4b7a3ee7bb2306b42e3e12bb28) + [#2959](https://github.com/npm/npm/issues/2959) npm run no longer fails + silently ([@flipside](https://github.com/flipside)) +* [`e007a2c`](https://github.com/npm/npm/commit/e007a2c1e4fac1759fa61ac6e78c6b83b2417d11) + [#3908](https://github.com/npm/npm/issues/3908) include command in spawn + errors ([@smikes](https://github.com/smikes)) + +### v2.1.7 (2014-10-30): + +* [`6750b05`](https://github.com/npm/npm/commit/6750b05dcba20d8990a672957ec56c48f97e241a) + [#6398](https://github.com/npm/npm/issues/6398) `npm-registry-client@4.0.0`: + consistent API, handle relative registry paths, use auth more consistently + ([@othiym23](https://github.com/othiym23)) +* [`7719cfd`](https://github.com/npm/npm/commit/7719cfdd8b204dfeccc41289707ea58b4d608905) + [#6560](https://github.com/npm/npm/issues/6560) use new npm-registry-client + API ([@othiym23](https://github.com/othiym23)) +* [`ed61971`](https://github.com/npm/npm/commit/ed619714c93718b6c1922b8c286f4b6cd2b97c80) + move caching of search metadata from `npm-registry-client` to npm itself + ([@othiym23](https://github.com/othiym23)) +* [`3457041`](https://github.com/npm/npm/commit/34570414cd528debeb22943873440594d7f47abf) + handle caching of metadata independently from `npm-registry-client` + ([@othiym23](https://github.com/othiym23)) +* [`20a331c`](https://github.com/npm/npm/commit/20a331ced6a52faac6ec242e3ffdf28bcd447c40) + [#6538](https://github.com/npm/npm/issues/6538) map registry URLs to + credentials more safely ([@indexzero](https://github.com/indexzero)) +* [`4072e97`](https://github.com/npm/npm/commit/4072e97856bf1e7affb38333d080c172767eea27) + [#6589](https://github.com/npm/npm/issues/6589) `npm-registry-client@4.0.1`: + allow publishing of packages with names identical to built-in Node modules + ([@feross](https://github.com/feross)) +* [`254f0e4`](https://github.com/npm/npm/commit/254f0e4adaf2c56e9df25c7343c43b0b0804a3b5) + `tar@1.0.2`: better error-handling ([@runk](https://github.com/runk)) +* [`73ee2aa`](https://github.com/npm/npm/commit/73ee2aa4f1a47e43fe7cf4317a5446875f7521fa) + `request@2.47.0` ([@mikeal](https://github.com/mikeal)) + +### v2.1.6 (2014-10-23): + +* [`681b398`](https://github.com/npm/npm/commit/681b3987a18e7aba0aaf78c91a23c7cc0ab82ce8) + [#6523](https://github.com/npm/npm/issues/6523) fix default `logelevel` doc + ([@KenanY](https://github.com/KenanY)) +* [`80b368f`](https://github.com/npm/npm/commit/80b368ffd786d4d008734b56c4a6fe12d2cb2926) + [#6528](https://github.com/npm/npm/issues/6528) `npm version` should work in + a git directory without git ([@terinjokes](https://github.com/terinjokes)) +* [`5f5f9e4`](https://github.com/npm/npm/commit/5f5f9e4ddf544c2da6adf3f8c885238b0e745076) + [#6483](https://github.com/npm/npm/issues/6483) `init-package-json@1.1.1`: + Properly pick up default values from environment variables. + ([@othiym23](https://github.com/othiym23)) +* [`a114870`](https://github.com/npm/npm/commit/a1148702f53f82d49606b2e4dac7581261fff442) + perl 5.18.x doesn't like -pi without filenames + ([@othiym23](https://github.com/othiym23)) +* [`de5ba00`](https://github.com/npm/npm/commit/de5ba007a48db876eb5bfb6156435f3512d58977) + `request@2.46.0`: Tests and cleanup. + ([@othiym23](https://github.com/othiym23)) +* [`76933f1`](https://github.com/npm/npm/commit/76933f169f17b5273b32e924a7b392d5729931a7) + `fstream-npm@1.0.1`: Always include `LICENSE[.*]`, `LICENCE[.*]`, + `CHANGES[.*]`, `CHANGELOG[.*]`, and `HISTORY[.*]`. + ([@jonathanong](https://github.com/jonathanong)) + +### v2.1.5 (2014-10-16): + +* [`6a14b23`](https://github.com/npm/npm/commit/6a14b232a0e34158bd95bb25c607167be995c204) + [#6397](https://github.com/npm/npm/issues/6397) Defactor npmconf back into + npm. ([@othiym23](https://github.com/othiym23)) +* [`4000e33`](https://github.com/npm/npm/commit/4000e3333a76ca4844681efa8737cfac24b7c2c8) + [#6323](https://github.com/npm/npm/issues/6323) Install `peerDependencies` + from top. ([@othiym23](https://github.com/othiym23)) +* [`5d119ae`](https://github.com/npm/npm/commit/5d119ae246f27353b14ff063559d1ba8c616bb89) + [#6498](https://github.com/npm/npm/issues/6498) Better error messages on + malformed `.npmrc` properties. ([@nicks](https://github.com/nicks)) +* [`ae18efb`](https://github.com/npm/npm/commit/ae18efb65fed427b1ef18e4862885bf60b87b92e) + [#6093](https://github.com/npm/npm/issues/6093) Replace instances of 'hash' + with 'object' in documentation. ([@zeke](https://github.com/zeke)) +* [`53108b2`](https://github.com/npm/npm/commit/53108b276fec5f97a38250933a2768d58b6928da) + [#1558](https://github.com/npm/npm/issues/1558) Clarify how local paths + should be used. ([@KenanY](https://github.com/KenanY)) +* [`344fa1a`](https://github.com/npm/npm/commit/344fa1a219ac8867022df3dc58a47636dde8a242) + [#6488](https://github.com/npm/npm/issues/6488) Work around bug in marked. + ([@othiym23](https://github.com/othiym23)) + +OUTDATED DEPENDENCY CLEANUP JAMBOREE + +* [`60c2942`](https://github.com/npm/npm/commit/60c2942e13655d9ecdf6e0f1f97f10cb71a75255) + `realize-package-specifier@1.2.0`: Handle names and rawSpecs more + consistently. ([@iarna](https://github.com/iarna)) +* [`1b5c95f`](https://github.com/npm/npm/commit/1b5c95fbda77b87342bd48c5ecac5b1fd571ccfe) + `sha@1.3.0`: Change line endings? + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`d7dee3f`](https://github.com/npm/npm/commit/d7dee3f3f7d9e7c2061a4ecb4dd93e3e4bfe4f2e) + `request@2.45.0`: Dependency updates, better proxy support, better compressed + response handling, lots of 'use strict'. + ([@mikeal](https://github.com/mikeal)) +* [`3d75180`](https://github.com/npm/npm/commit/3d75180c2cc79fa3adfa0e4cb783a27192189a65) + `opener@1.4.0`: Added gratuitous return. + ([@Domenic](https://github.com/Domenic)) +* [`8e2703f`](https://github.com/npm/npm/commit/8e2703f78d280d1edeb749e257dda1f288bad6e3) + `retry@0.6.1` / `npm-registry-client@3.2.4`: Change of ownership. + ([@tim-kos](https://github.com/tim-kos)) +* [`c87b00f`](https://github.com/npm/npm/commit/c87b00f82f92434ee77831915012c77a6c244c39) + `once@1.3.1`: Wrap once with wrappy. ([@isaacs](https://github.com/isaacs)) +* [`01ec790`](https://github.com/npm/npm/commit/01ec790fd47def56eda6abb3b8d809093e8f493f) + `npm-user-validate@0.1.1`: Correct repository URL. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`389e52c`](https://github.com/npm/npm/commit/389e52c2d94c818ca8935ccdcf392994fec564a2) + `glob@4.0.6`: Now absolutely requires `graceful-fs`. + ([@isaacs](https://github.com/isaacs)) +* [`e15ab15`](https://github.com/npm/npm/commit/e15ab15a27a8f14cf0d9dc6f11dee452080378a0) + `ini@1.3.0`: Tighten up whitespace handling. + ([@isaacs](https://github.com/isaacs)) +* [`7610f3e`](https://github.com/npm/npm/commit/7610f3e62e699292ece081bfd33084d436e3246d) + `archy@1.0.0` ([@substack](https://github.com/substack)) +* [`9c13149`](https://github.com/npm/npm/commit/9c1314985e513e20ffa3ea0ca333ba2ab78299c9) + `semver@4.1.0`: Add support for prerelease identifiers. + ([@bromanko](https://github.com/bromanko)) +* [`f096c25`](https://github.com/npm/npm/commit/f096c250441b031d758f03afbe8d2321f94c7703) + `graceful-fs@3.0.4`: Add a bunch of additional tests, skip the unfortunate + complications of `graceful-fs@3.0.3`. ([@isaacs](https://github.com/isaacs)) + +### v2.1.4 (2014-10-09): + +* [`3aeb440`](https://github.com/npm/npm/commit/3aeb4401444fad83cc7a8d11bf2507658afa5248) + [#6442](https://github.com/npm/npm/issues/6442) proxying git needs `GIT_SSL_CAINFO` + ([@wmertens](https://github.com/wmertens)) +* [`a8da8d6`](https://github.com/npm/npm/commit/a8da8d6e0cd56d97728c0b76b51604ee06ef6264) + [#6413](https://github.com/npm/npm/issues/6413) write builtin config on any + global npm install ([@isaacs](https://github.com/isaacs)) +* [`9e4d632`](https://github.com/npm/npm/commit/9e4d632c0142ba55df07d624667738b8727336fc) + [#6343](https://github.com/npm/npm/issues/6343) don't pass run arguments to + pre & post scripts ([@TheLudd](https://github.com/TheLudd)) +* [`d831b1f`](https://github.com/npm/npm/commit/d831b1f7ca1a9921ea5b394e39b7130ecbc6d7b4) + [#6399](https://github.com/npm/npm/issues/6399) race condition: inflight + installs, prevent `peerDependency` problems + ([@othiym23](https://github.com/othiym23)) +* [`82b775d`](https://github.com/npm/npm/commit/82b775d6ff34c4beb6c70b2344d491a9f2026577) + [#6384](https://github.com/npm/npm/issues/6384) race condition: inflight + caching by URL rather than semver range + ([@othiym23](https://github.com/othiym23)) +* [`7bee042`](https://github.com/npm/npm/commit/7bee0429066fedcc9e6e962c043eb740b3792809) + `inflight@1.0.4`: callback can take arbitrary number of parameters + ([@othiym23](https://github.com/othiym23)) +* [`3bff494`](https://github.com/npm/npm/commit/3bff494f4abf17d6d7e0e4a3a76cf7421ecec35a) + [#5195](https://github.com/npm/npm/issues/5195) fixed regex color regression + for `npm search` ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`33ba2d5`](https://github.com/npm/npm/commit/33ba2d585160a0a2a322cb76c4cd989acadcc984) + [#6387](https://github.com/npm/npm/issues/6387) allow `npm view global` if + package is specified ([@evanlucas](https://github.com/evanlucas)) +* [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) + [#6388](https://github.com/npm/npm/issues/6388) npm-publish → + npm-developers(7) ([@kennydude](https://github.com/kennydude)) + +TEST CLEANUP EXTRAVAGANZA: + +* [`8d6bfcb`](https://github.com/npm/npm/commit/8d6bfcb88408f5885a2a67409854c43e5c3a23f6) + tap tests run with no system-wide side effects + ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`7a1472f`](https://github.com/npm/npm/commit/7a1472fbdbe99956ad19f629e7eb1cc07ba026ef) + added npm cache cleanup script + ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`0ce6a37`](https://github.com/npm/npm/commit/0ce6a3752fa9119298df15671254db6bc1d8e64c) + stripped out dead test code (othiym23) +* replace spawn with common.npm (@chrismeyersfsu): + * [`0dcd614`](https://github.com/npm/npm/commit/0dcd61446335eaf541bf5f2d5186ec1419f86a42) + test/tap/cache-shasum-fork.js + * [`97f861c`](https://github.com/npm/npm/commit/97f861c967606a7e51e3d5047cf805d9d1adea5a) + test/tap/false_name.js + * [`d01b3de`](https://github.com/npm/npm/commit/d01b3de6ce03f25bbf3db97bfcd3cc85830d6801) + test/tap/git-cache-locking.js + * [`7b63016`](https://github.com/npm/npm/commit/7b63016778124c6728d6bd89a045c841ae3900b6) + test/tap/pack-scoped.js + * [`c877553`](https://github.com/npm/npm/commit/c877553265c39673e03f0a97972f692af81a595d) + test/tap/scripts-whitespace-windows.js + * [`df98525`](https://github.com/npm/npm/commit/df98525331e964131299d457173c697cfb3d95b9) + test/tap/prepublish.js + * [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) + test/tap/prune.js + +### v2.1.3 (2014-10-02): + +BREAKING CHANGE FOR THE SQRT(i) PEOPLE ACTUALLY USING `npm submodule`: + +* [`1e64473`](https://github.com/npm/npm/commit/1e6447360207f45ad6188e5780fdf4517de6e23d) + `rm -rf npm submodule` command, which has been broken since the Carter + Administration ([@isaacs](https://github.com/isaacs)) + +BREAKING CHANGE IF YOU ARE FOR SOME REASON STILL USING NODE 0.6 AND YOU SHOULD +NOT BE DOING THAT CAN YOU NOT: + +* [`3e431f9`](https://github.com/npm/npm/commit/3e431f9d6884acb4cde8bcb8a0b122a76b33ee1d) + [joyent/node#8492](https://github.com/joyent/node/issues/8492) bye bye + customFds, hello stdio ([@othiym23](https://github.com/othiym23)) + +Other changes: + +* [`ea607a8`](https://github.com/npm/npm/commit/ea607a8a20e891ad38eed11b5ce2c3c0a65484b9) + [#6372](https://github.com/npm/npm/issues/6372) noisily error (without + aborting) on multi-{install,build} ([@othiym23](https://github.com/othiym23)) +* [`3ee2799`](https://github.com/npm/npm/commit/3ee2799b629fd079d2db21d7e8f25fa7fa1660d0) + [#6372](https://github.com/npm/npm/issues/6372) only make cache creation + requests in flight ([@othiym23](https://github.com/othiym23)) +* [`1a90ec2`](https://github.com/npm/npm/commit/1a90ec2f2cfbefc8becc6ef0c480e5edacc8a4cb) + [#6372](https://github.com/npm/npm/issues/6372) wait to put Git URLs in + flight until normalized ([@othiym23](https://github.com/othiym23)) +* [`664795b`](https://github.com/npm/npm/commit/664795bb7d8da7142417b3f4ef5986db3a394071) + [#6372](https://github.com/npm/npm/issues/6372) log what is and isn't in + flight ([@othiym23](https://github.com/othiym23)) +* [`00ef580`](https://github.com/npm/npm/commit/00ef58025a1f52dfabf2c4dc3898621d16a6e062) + `inflight@1.0.3`: fix largely theoretical race condition, because we really + really hate race conditions ([@isaacs](https://github.com/isaacs)) +* [`1cde465`](https://github.com/npm/npm/commit/1cde4658d897ae0f93ff1d65b258e1571b391182) + [#6363](https://github.com/npm/npm/issues/6363) + `realize-package-specifier@1.1.0`: handle local dependencies better + ([@iarna](https://github.com/iarna)) +* [`86f084c`](https://github.com/npm/npm/commit/86f084c6c6d7935cd85d72d9d94b8784c914d51e) + `realize-package-specifier@1.0.2`: dependency realization! in its own module! + ([@iarna](https://github.com/iarna)) +* [`553d830`](https://github.com/npm/npm/commit/553d830334552b83606b6bebefd821c9ea71e964) + `npm-package-arg@2.1.3`: simplified semver, better tests + ([@iarna](https://github.com/iarna)) +* [`bec9b61`](https://github.com/npm/npm/commit/bec9b61a316c19f5240657594f0905a92a474352) + `readable-stream@1.0.32`: for some reason + ([@rvagg](https://github.com/rvagg)) +* [`ff08ec5`](https://github.com/npm/npm/commit/ff08ec5f6d717bdbd559de0b2ede769306a9a763) + `dezalgo@1.0.1`: use wrappy for instrumentability + ([@isaacs](https://github.com/isaacs)) + +### v2.1.2 (2014-09-29): + +* [`a1aa20e`](https://github.com/npm/npm/commit/a1aa20e44bb8285c6be1e7fa63b9da920e3a70ed) + [#6282](https://github.com/npm/npm/issues/6282) + `normalize-package-data@1.0.3`: don't prune bundledDependencies + ([@isaacs](https://github.com/isaacs)) +* [`a1f5fe1`](https://github.com/npm/npm/commit/a1f5fe1005043ce20a06e8b17a3e201aa3215357) + move locks back into cache, now path-aware + ([@othiym23](https://github.com/othiym23)) +* [`a432c4b`](https://github.com/npm/npm/commit/a432c4b48c881294d6d79b5f41c2e1c16ad15a8a) + convert lib/utils/tar.js to use atomic streams + ([@othiym23](https://github.com/othiym23)) +* [`b8c3c74`](https://github.com/npm/npm/commit/b8c3c74a3c963564233204161cc263e0912c930b) + `fs-write-stream-atomic@1.0.2`: Now works with streams1 fs.WriteStreams. + ([@isaacs](https://github.com/isaacs)) +* [`c7ab76f`](https://github.com/npm/npm/commit/c7ab76f44cce5f42add5e3ba879bd10e7e00c3e6) + logging cleanup ([@othiym23](https://github.com/othiym23)) +* [`4b2d95d`](https://github.com/npm/npm/commit/4b2d95d0641435b09d047ae5cb2226f292bf38f0) + [#6329](https://github.com/npm/npm/issues/6329) efficiently validate tmp + tarballs safely ([@othiym23](https://github.com/othiym23)) + +### v2.1.1 (2014-09-26): + +* [`563225d`](https://github.com/npm/npm/commit/563225d813ea4c12f46d4f7821ac7f76ba8ee2d6) + [#6318](https://github.com/npm/npm/issues/6318) clean up locking; prefix + lockfile with "." ([@othiym23](https://github.com/othiym23)) +* [`c7f30e4`](https://github.com/npm/npm/commit/c7f30e4550fea882d31fcd4a55b681cd30713c44) + [#6318](https://github.com/npm/npm/issues/6318) remove locking code around + tarball packing and unpacking ([@othiym23](https://github.com/othiym23)) + +### v2.1.0 (2014-09-25): + +NEW FEATURE: + +* [`3635601`](https://github.com/npm/npm/commit/36356011b6f2e6a5a81490e85a0a44eb27199dd7) + [#5520](https://github.com/npm/npm/issues/5520) Add `'npm view .'`. + ([@evanlucas](https://github.com/evanlucas)) + +Other changes: + +* [`f24b552`](https://github.com/npm/npm/commit/f24b552b596d0627549cdd7c2d68fcf9006ea50a) + [#6294](https://github.com/npm/npm/issues/6294) Lock cache → lock cache + target. ([@othiym23](https://github.com/othiym23)) +* [`ad54450`](https://github.com/npm/npm/commit/ad54450104f94c82c501138b4eee488ce3a4555e) + [#6296](https://github.com/npm/npm/issues/6296) Ensure that npm-debug.log + file is created when rollbacks are done. + ([@isaacs](https://github.com/isaacs)) +* [`6810071`](https://github.com/npm/npm/commit/681007155a40ac9d165293bd6ec5d8a1423ccfca) + docs: Default loglevel "http" → "warn". + ([@othiym23](https://github.com/othiym23)) +* [`35ac89a`](https://github.com/npm/npm/commit/35ac89a940f23db875e882ce2888208395130336) + Skip installation of installed scoped packages. + ([@timoxley](https://github.com/timoxley)) +* [`e468527`](https://github.com/npm/npm/commit/e468527256ec599892b9b88d61205e061d1ab735) + Ensure cleanup executes for scripts-whitespace-windows test. + ([@timoxley](https://github.com/timoxley)) +* [`ef9101b`](https://github.com/npm/npm/commit/ef9101b7f346797749415086956a0394528a12c4) + Ensure cleanup executes for packed-scope test. + ([@timoxley](https://github.com/timoxley)) +* [`69b4d18`](https://github.com/npm/npm/commit/69b4d18cdbc2ae04c9afaffbd273b436a394f398) + `fs-write-stream-atomic@1.0.1`: Fix a race condition in our race-condition + fixer. ([@isaacs](https://github.com/isaacs)) +* [`26b17ff`](https://github.com/npm/npm/commit/26b17ff2e3b21ee26c6fdbecc8273520cff45718) + [#6272](https://github.com/npm/npm/issues/6272) `npmconf` decides what the + default prefix is. ([@othiym23](https://github.com/othiym23)) +* [`846faca`](https://github.com/npm/npm/commit/846facacc6427dafcf5756dcd36d9036539938de) + Fix development dependency is preferred over dependency. + ([@andersjanmyr](https://github.com/andersjanmyr)) +* [`9d1a9db`](https://github.com/npm/npm/commit/9d1a9db3af5adc48a7158a5a053eeb89ee41a0e7) + [#3265](https://github.com/npm/npm/issues/3265) Re-apply a71615a. Fixes + [#3265](https://github.com/npm/npm/issues/3265) again, with a test! + ([@glasser](https://github.com/glasser)) +* [`1d41db0`](https://github.com/npm/npm/commit/1d41db0b2744a7bd50971c35cc060ea0600fb4bf) + `marked-man@0.1.4`: Fixes formatting of synopsis blocks in man docs. + ([@kapouer](https://github.com/kapouer)) +* [`a623da0`](https://github.com/npm/npm/commit/a623da01bea1b2d3f3a18b9117cfd2d8e3cbdd77) + [#5867](https://github.com/npm/npm/issues/5867) Specify dummy git template + dir when cloning to prevent copying hooks. + ([@boneskull](https://github.com/boneskull)) + +### v2.0.2 (2014-09-19): + +* [`42c872b`](https://github.com/npm/npm/commit/42c872b32cadc0e555638fc78eab3a38a04401d8) + [#5920](https://github.com/npm/npm/issues/5920) + `fs-write-stream-atomic@1.0.0` ([@isaacs](https://github.com/isaacs)) +* [`6784767`](https://github.com/npm/npm/commit/6784767fe15e28b44c81a1d4bb1738c642a65d78) + [#5920](https://github.com/npm/npm/issues/5920) make all write streams atomic + ([@isaacs](https://github.com/isaacs)) +* [`f6fac00`](https://github.com/npm/npm/commit/f6fac000dd98ebdd5ea1d5921175735d463d328b) + [#5920](https://github.com/npm/npm/issues/5920) barf on 0-length cached + tarballs ([@isaacs](https://github.com/isaacs)) +* [`3b37592`](https://github.com/npm/npm/commit/3b37592a92ea98336505189ae8ca29248b0589f4) + `write-file-atomic@1.1.0`: use graceful-fs + ([@iarna](https://github.com/iarna)) + +### v2.0.1 (2014-09-18): + +* [`74c5ab0`](https://github.com/npm/npm/commit/74c5ab0a676793c6dc19a3fd5fe149f85fecb261) + [#6201](https://github.com/npm/npm/issues/6201) `npmconf@2.1.0`: scope + always-auth to registry URI ([@othiym23](https://github.com/othiym23)) +* [`774b127`](https://github.com/npm/npm/commit/774b127da1dd6fefe2f1299e73505d9146f00294) + [#6201](https://github.com/npm/npm/issues/6201) `npm-registry-client@3.2.2`: + use scoped always-auth settings ([@othiym23](https://github.com/othiym23)) +* [`f2d2190`](https://github.com/npm/npm/commit/f2d2190aa365d22378d03afab0da13f95614a583) + [#6201](https://github.com/npm/npm/issues/6201) support saving + `--always-auth` when logging in ([@othiym23](https://github.com/othiym23)) +* [`17c941a`](https://github.com/npm/npm/commit/17c941a2d583210fe97ed47e2968d94ce9f774ba) + [#6163](https://github.com/npm/npm/issues/6163) use `write-file-atomic` + instead of `fs.writeFile()` ([@fiws](https://github.com/fiws)) +* [`fb5724f`](https://github.com/npm/npm/commit/fb5724fd98e1509c939693568df83d11417ea337) + [#5925](https://github.com/npm/npm/issues/5925) `npm init -f`: allow `npm + init` to run without prompting + ([@michaelnisi](https://github.com/michaelnisi)) +* [`b706d63`](https://github.com/npm/npm/commit/b706d637d5965dbf8f7ce07dc5c4bc80887f30d8) + [#3059](https://github.com/npm/npm/issues/3059) disable prepublish when + running `npm install --production` + ([@jussi-kalliokoski](https://github.com/jussi-kalliokoski)) +* [`119f068`](https://github.com/npm/npm/commit/119f068eae2a36fa8b9c9ca557c70377792243a4) + attach the node version used when publishing a package to its registry + metadata ([@othiym23](https://github.com/othiym23)) +* [`8fe0081`](https://github.com/npm/npm/commit/8fe008181665519c2ac201ee432a3ece9798c31f) + seriously, don't use `npm -g update npm` + ([@thomblake](https://github.com/thomblake)) +* [`ea5b3d4`](https://github.com/npm/npm/commit/ea5b3d446b86dcabb0dbc6dba374d3039342ecb3) + `request@2.44.0` ([@othiym23](https://github.com/othiym23)) + +### v2.0.0 (2014-09-12): + +BREAKING CHANGES: + +* [`4378a17`](https://github.com/npm/npm/commit/4378a17db340404a725ffe2eb75c9936f1612670) + `semver@4.0.0`: prerelease versions no longer show up in ranges; `^0.x.y` + behaves the way it did in `semver@2` rather than `semver@3`; docs have been + reorganized for comprehensibility ([@isaacs](https://github.com/isaacs)) +* [`c6ddb64`](https://github.com/npm/npm/commit/c6ddb6462fe32bf3a27b2c4a62a032a92e982429) + npm now assumes that node is newer than 0.6 + ([@isaacs](https://github.com/isaacs)) + +Other changes: + +* [`ea515c3`](https://github.com/npm/npm/commit/ea515c3b858bf493a7b87fa4cdc2110a0d9cef7f) + [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all + callbacks have finished before proceeding + ([@othiym23](https://github.com/othiym23)) +* [`0b0a59d`](https://github.com/npm/npm/commit/0b0a59d504f20f424294b1590ace73a7464f0378) + [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just + before the CLI exits ([@isaacs](https://github.com/isaacs)) +* [`a11c88b`](https://github.com/npm/npm/commit/a11c88bdb1488b87d8dcac69df9a55a7a91184b6) + [#6175](https://github.com/npm/npm/issues/6175) pack scoped packages + correctly ([@othiym23](https://github.com/othiym23)) +* [`e4e48e0`](https://github.com/npm/npm/commit/e4e48e037d4e95fdb6acec80b04c5c6eaee59970) + [#6121](https://github.com/npm/npm/issues/6121) `read-installed@3.1.2`: don't + mark linked dev dependencies as extraneous + ([@isaacs](https://github.com/isaacs)) +* [`d673e41`](https://github.com/npm/npm/commit/d673e4185d43362c2b2a91acbca8c057e7303c7b) + `cmd-shim@2.0.1`: depend on `graceful-fs` directly + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`9d54d45`](https://github.com/npm/npm/commit/9d54d45e602d595bdab7eae09b9fa1dc46370147) + `npm-registry-couchapp@2.5.3`: make tests more reliable on Travis + ([@iarna](https://github.com/iarna)) +* [`673d738`](https://github.com/npm/npm/commit/673d738c6142c3d043dcee0b7aa02c9831a2e0ca) + ensure permissions are set correctly in cache when running as root + ([@isaacs](https://github.com/isaacs)) +* [`6e6a5fb`](https://github.com/npm/npm/commit/6e6a5fb74af10fd345411df4e121e554e2e3f33e) + prepare for upgrade to `node-semver@4.0.0` + ([@isaacs](https://github.com/isaacs)) +* [`ab8dd87`](https://github.com/npm/npm/commit/ab8dd87b943262f5996744e8d4cc30cc9358b7d7) + swap out `ronn` for `marked-man@0.1.3` ([@isaacs](https://github.com/isaacs)) +* [`803da54`](https://github.com/npm/npm/commit/803da5404d5a0b7c9defa3fe7fa0f2d16a2b19d3) + `npm-registry-client@3.2.0`: prepare for `node-semver@4.0.0` and include more + error information ([@isaacs](https://github.com/isaacs)) +* [`4af0e71`](https://github.com/npm/npm/commit/4af0e7134f5757c3d456d83e8349224a4ba12660) + make default error display less scary ([@isaacs](https://github.com/isaacs)) +* [`4fd9e79`](https://github.com/npm/npm/commit/4fd9e7901a15abff7a3dd478d99ce239b9580bca) + `npm-registry-client@3.2.1`: handle errors returned by the registry much, + much better ([@othiym23](https://github.com/othiym23)) +* [`ca791e2`](https://github.com/npm/npm/commit/ca791e27e97e51c1dd491bff6622ac90b54c3e23) + restore a long (always?) missing pass for deduping + ([@othiym23](https://github.com/othiym23)) +* [`ca0ef0e`](https://github.com/npm/npm/commit/ca0ef0e99bbdeccf28d550d0296baa4cb5e7ece2) + correctly interpret relative paths for local dependencies + ([@othiym23](https://github.com/othiym23)) +* [`5eb8db2`](https://github.com/npm/npm/commit/5eb8db2c370eeb4cd34f6e8dc6a935e4ea325621) + `npm-package-arg@2.1.2`: support git+file:// URLs for local bare repos + ([@othiym23](https://github.com/othiym23)) +* [`860a185`](https://github.com/npm/npm/commit/860a185c43646aca84cb93d1c05e2266045c316b) + tweak docs to no longer advocate checking in `node_modules` + ([@hunterloftis](https://github.com/hunterloftis)) +* [`80e9033`](https://github.com/npm/npm/commit/80e9033c40e373775e35c674faa6c1948661782b) + add links to nodejs.org downloads to docs + ([@meetar](https://github.com/meetar)) + +### v1.4.28 (2014-09-12): + +* [`f4540b6`](https://github.com/npm/npm/commit/f4540b6537a87e653d7495a9ddcf72949fdd4d14) + [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just + before the CLI exits ([@isaacs](https://github.com/isaacs)) +* [`1eabfd5`](https://github.com/npm/npm/commit/1eabfd5c03f33c2bd28823714ff02059eeee3899) + [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all + callbacks have finished before proceeding + ([@othiym23](https://github.com/othiym23)) + +### v2.0.0-beta.3 (2014-09-04): + +* [`fa79413`](https://github.com/npm/npm/commit/fa794138bec8edb7b88639db25ee9c010d2f4c2b) + [#6119](https://github.com/npm/npm/issues/6119) fall back to registry installs + if package.json is missing in a local directory ([@iarna](https://github.com/iarna)) +* [`16073e2`](https://github.com/npm/npm/commit/16073e2d8ae035961c4c189b602d4aacc6d6b387) + `npm-package-arg@2.1.0`: support file URIs as local specs + ([@othiym23](https://github.com/othiym23)) +* [`9164acb`](https://github.com/npm/npm/commit/9164acbdee28956fa816ce5e473c559395ae4ec2) + `github-url-from-username-repo@1.0.2`: don't match strings that are already + URIs ([@othiym23](https://github.com/othiym23)) +* [`4067d6b`](https://github.com/npm/npm/commit/4067d6bf303a69be13f3af4b19cf4fee1b0d3e12) + [#5629](https://github.com/npm/npm/issues/5629) support saving of local packages + in `package.json` ([@dylang](https://github.com/dylang)) +* [`1b2ffdf`](https://github.com/npm/npm/commit/1b2ffdf359a8c897a78f91fc5a5d535c97aaec97) + [#6097](https://github.com/npm/npm/issues/6097) document scoped packages + ([@seldo](https://github.com/seldo)) +* [`0a67d53`](https://github.com/npm/npm/commit/0a67d536067c4808a594d81288d34c0f7e97e105) + [#6007](https://github.com/npm/npm/issues/6007) `request@2.42.0`: properly + set headers on proxy requests ([@isaacs](https://github.com/isaacs)) +* [`9bac6b8`](https://github.com/npm/npm/commit/9bac6b860b674d24251bb7b8ba412fdb26cbc836) + `npmconf@2.0.8`: disallow semver ranges in tag configuration + ([@isaacs](https://github.com/isaacs)) +* [`d2d4d7c`](https://github.com/npm/npm/commit/d2d4d7cd3c32f91a87ffa11fe464d524029011c3) + [#6082](https://github.com/npm/npm/issues/6082) don't allow tagging with a + semver range as the tag name ([@isaacs](https://github.com/isaacs)) + +### v1.4.27 (2014-09-04): + +* [`4cf3c8f`](https://github.com/npm/npm/commit/4cf3c8fd78c9e2693a5f899f50c28f4823c88e2e) + [#6007](https://github.com/npm/npm/issues/6007) request@2.42.0: properly set + headers on proxy requests ([@isaacs](https://github.com/isaacs)) +* [`403cb52`](https://github.com/npm/npm/commit/403cb526be1472bb7545fa8e62d4976382cdbbe5) + [#6055](https://github.com/npm/npm/issues/6055) npmconf@1.1.8: restore + case-insensitivity of environmental config + ([@iarna](https://github.com/iarna)) + +### v2.0.0-beta.2 (2014-08-29): + +SPECIAL LABOR DAY WEEKEND RELEASE PARTY WOOO + +* [`ed207e8`](https://github.com/npm/npm/commit/ed207e88019de3150037048df6267024566e1093) + `npm-registry-client@3.1.7`: Clean up auth logic and improve logging around + auth decisions. Also error on trying to change a user document without + writing to it. ([@othiym23](https://github.com/othiym23)) +* [`66c7423`](https://github.com/npm/npm/commit/66c7423b7fb07a326b83c83727879410d43c439f) + `npmconf@2.0.7`: support -C as an alias for --prefix + ([@isaacs](https://github.com/isaacs)) +* [`0dc6a07`](https://github.com/npm/npm/commit/0dc6a07c778071c94c2251429c7d107e88a45095) + [#6059](https://github.com/npm/npm/issues/6059) run commands in prefix, not + cwd ([@isaacs](https://github.com/isaacs)) +* [`65d2179`](https://github.com/npm/npm/commit/65d2179af96737eb9038eaa24a293a62184aaa13) + `github-url-from-username-repo@1.0.1`: part 3 handle slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`e8d75d0`](https://github.com/npm/npm/commit/e8d75d0d9f148ce2b3e8f7671fa281945bac363d) + [#6057](https://github.com/npm/npm/issues/6057) `read-installed@3.1.1`: + properly handle extraneous dev dependencies of required dependencies + ([@othiym23](https://github.com/othiym23)) +* [`0602f70`](https://github.com/npm/npm/commit/0602f708f070d524ad41573afd4c57171cab21ad) + [#6064](https://github.com/npm/npm/issues/6064) ls: do not show deps of + extraneous deps ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-beta.1 (2014-08-28): + +* [`78a1fc1`](https://github.com/npm/npm/commit/78a1fc12307a0cbdbc944775ed831b876ee65855) + `github-url-from-git@1.4.0`: add support for git+https and git+ssh + ([@stefanbuck](https://github.com/stefanbuck)) +* [`bf247ed`](https://github.com/npm/npm/commit/bf247edf5429c6b3ec4d4cb798fa0eb0a9c19fc1) + `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`4bbe682`](https://github.com/npm/npm/commit/4bbe682a6d4eabcd23f892932308c9f228bf4de3) + `cmd-shim@2.0.0`: upgrade to graceful-fs 3 + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`ae1d590`](https://github.com/npm/npm/commit/ae1d590bdfc2476a4ed446e760fea88686e3ae05) + `npm-package-arg@2.0.4`: accept slashes in branch names + ([@thealphanerd](https://github.com/thealphanerd)) +* [`b2f51ae`](https://github.com/npm/npm/commit/b2f51aecadf585711e145b6516f99e7c05f53614) + `semver@3.0.1`: semver.clean() is cleaner + ([@isaacs](https://github.com/isaacs)) +* [`1d041a8`](https://github.com/npm/npm/commit/1d041a8a5ebd5bf6cecafab2072d4ec07823adab) + `github-url-from-username-repo@1.0.0`: accept slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`02c85d5`](https://github.com/npm/npm/commit/02c85d592c4058e5d9eafb0be36b6743ae631998) + `async-some@1.0.1` ([@othiym23](https://github.com/othiym23)) +* [`5af493e`](https://github.com/npm/npm/commit/5af493efa8a463cd1acc4a9a394699e2c0793b9c) + ensure lifecycle spawn errors caught properly + ([@isaacs](https://github.com/isaacs)) +* [`60fe012`](https://github.com/npm/npm/commit/60fe012fac9570d6c72554cdf34a6fa95bf0f0a6) + `npmconf@2.0.6`: init.version defaults to 1.0.0 + ([@isaacs](https://github.com/isaacs)) +* [`b4c717b`](https://github.com/npm/npm/commit/b4c717bbf58fb6a0d64ad229036c79a184297ee2) + `npm-registry-client@3.1.4`: properly encode % in passwords + ([@isaacs](https://github.com/isaacs)) +* [`7b55f44`](https://github.com/npm/npm/commit/7b55f44420252baeb3f30da437d22956315c31c9) + doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) + +### v1.4.26 (2014-08-28): + +* [`eceea95`](https://github.com/npm/npm/commit/eceea95c804fa15b18e91c52c0beb08d42a3e77d) + `github-url-from-git@1.4.0`: add support for git+https and git+ssh + ([@stefanbuck](https://github.com/stefanbuck)) +* [`e561758`](https://github.com/npm/npm/commit/e5617587e7d7ab686192391ce55357dbc7fed0a3) + `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`0c4fab3`](https://github.com/npm/npm/commit/0c4fab372ee76eab01dda83b6749429a8564902e) + `cmd-shim@2.0.0`: upgrade to graceful-fs 3 + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`2d69e4d`](https://github.com/npm/npm/commit/2d69e4d95777671958b5e08d3b2f5844109d73e4) + `github-url-from-username-repo@1.0.0`: accept slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`81f9b2b`](https://github.com/npm/npm/commit/81f9b2bac9d34c223ea093281ba3c495f23f10d1) + ensure lifecycle spawn errors caught properly + ([@isaacs](https://github.com/isaacs)) +* [`bfaab8c`](https://github.com/npm/npm/commit/bfaab8c6e0942382a96b250634ded22454c36b5a) + `npm-registry-client@2.0.7`: properly encode % in passwords + ([@isaacs](https://github.com/isaacs)) +* [`91cfb58`](https://github.com/npm/npm/commit/91cfb58dda851377ec604782263519f01fd96ad8) + doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-beta.0 (2014-08-21): + +* [`685f8be`](https://github.com/npm/npm/commit/685f8be1f2770cc75fd0e519a8d7aac72735a270) + `npm-registry-client@3.1.3`: Print the notification header returned by the + registry, and make sure status codes are printed without gratuitous quotes + around them. ([@isaacs](https://github.com/isaacs) / + [@othiym23](https://github.com/othiym23)) +* [`a8cb676`](https://github.com/npm/npm/commit/a8cb676aef0561eaf04487d2719672b097392c85) + [#5900](https://github.com/npm/npm/issues/5900) remove `npm` from its own + `engines` field in `package.json`. None of us remember why it was there. + ([@timoxley](https://github.com/timoxley)) +* [`6c47201`](https://github.com/npm/npm/commit/6c47201a7d071e8bf091b36933daf4199cc98e80) + [#5752](https://github.com/npm/npm/issues/5752), + [#6013](https://github.com/npm/npm/issues/6013) save git URLs correctly in + `_resolved` fields ([@isaacs](https://github.com/isaacs)) +* [`e4e1223`](https://github.com/npm/npm/commit/e4e1223a91c37688ba3378e1fc9d5ae045654d00) + [#5936](https://github.com/npm/npm/issues/5936) document the use of tags in + `package.json` ([@KenanY](https://github.com/KenanY)) +* [`c92b8d4`](https://github.com/npm/npm/commit/c92b8d4db7bde2a501da5b7d612684de1d629a42) + [#6004](https://github.com/npm/npm/issues/6004) manually installed scoped + packages are tracked correctly ([@dead](https://github.com/dead)-horse) +* [`21ca0aa`](https://github.com/npm/npm/commit/21ca0aaacbcfe2b89b0a439d914da0cae62de550) + [#5945](https://github.com/npm/npm/issues/5945) link scoped packages + correctly ([@dead](https://github.com/dead)-horse) +* [`16bead7`](https://github.com/npm/npm/commit/16bead7f2c82aec35b83ff0ec04df051ba456764) + [#5958](https://github.com/npm/npm/issues/5958) ensure that file streams work + in all versions of node ([@dead](https://github.com/dead)-horse) +* [`dbf0cab`](https://github.com/npm/npm/commit/dbf0cab29d0db43ac95e4b5a1fbdea1e0af75f10) + you can now pass quoted args to `npm run-script` + ([@bcoe](https://github.com/bcoe)) +* [`0583874`](https://github.com/npm/npm/commit/05838743f01ccb8d2432b3858d66847002fb62df) + `tar@1.0.1`: Add test for removing an extract target immediately after + unpacking. + ([@isaacs](https://github.com/isaacs)) +* [`cdf3b04`](https://github.com/npm/npm/commit/cdf3b0428bc0b0183fb41dcde9e34e8f42c5e3a7) + `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, and + `retries` options. Part 2 of race condition leading to `ENOENT` + ([@isaacs](https://github.com/isaacs)) + errors. +* [`22d72a8`](https://github.com/npm/npm/commit/22d72a87a9e1a9ab56d9585397f63551887d9125) + `fstream@1.0.2`: Fix a double-finish call which can result in excess FS + operations after the `close` event. Part 1 of race condition leading to + `ENOENT` errors. + ([@isaacs](https://github.com/isaacs)) + +### v1.4.25 (2014-08-21): + +* [`64c0ec2`](https://github.com/npm/npm/commit/64c0ec241ef5d83761ca8de54acb3c41b079956e) + `npm-registry-client@2.0.6`: Print the notification header returned by the + registry, and make sure status codes are printed without gratuitous quotes + around them. + ([@othiym23](https://github.com/othiym23)) +* [`a8ed12b`](https://github.com/npm/npm/commit/a8ed12b) `tar@1.0.1`: + Add test for removing an extract target immediately after unpacking. + ([@isaacs](https://github.com/isaacs)) +* [`70fd11d`](https://github.com/npm/npm/commit/70fd11d) + `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, + and `retries` options. Part 2 of race condition leading to `ENOENT` + errors. + ([@isaacs](https://github.com/isaacs)) +* [`0072c4d`](https://github.com/npm/npm/commit/0072c4d) + `fstream@1.0.2`: Fix a double-finish call which can result in excess + FS operations after the `close` event. Part 2 of race condition + leading to `ENOENT` errors. + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha.7 (2014-08-14): + +* [`f23f1d8`](https://github.com/npm/npm/commit/f23f1d8e8f86ec1b7ab8dad68250bccaa67d61b1) + doc: update version doc to include `pre-*` increment args + ([@isaacs](https://github.com/isaacs)) +* [`b6bb746`](https://github.com/npm/npm/commit/b6bb7461824d4dc1c0936f46bd7929b5cd597986) + build: add 'make tag' to tag current release as latest + ([@isaacs](https://github.com/isaacs)) +* [`27c4bb6`](https://github.com/npm/npm/commit/27c4bb606e46e5eaf604b19fe8477bc6567f8b2e) + build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) +* [`cff66c3`](https://github.com/npm/npm/commit/cff66c3bf2850880058ebe2a26655dafd002495e) + build: add script to output `v1.4-next` publish tag + ([@isaacs](https://github.com/isaacs)) +* [`22abec8`](https://github.com/npm/npm/commit/22abec8833474879ac49b9604c103bc845dad779) + build: remove outdated `docpublish` make target + ([@isaacs](https://github.com/isaacs)) +* [`1be4de5`](https://github.com/npm/npm/commit/1be4de51c3976db8564f72b00d50384c921f0917) + build: remove `unpublish` step from `make publish` + ([@isaacs](https://github.com/isaacs)) +* [`e429e20`](https://github.com/npm/npm/commit/e429e2011f4d78e398f2461bca3e5a9a146fbd0c) + doc: add new changelog ([@othiym23](https://github.com/othiym23)) +* [`9243d20`](https://github.com/npm/npm/commit/9243d207896ea307082256604c10817f7c318d68) + lifecycle: test lifecycle path modification + ([@isaacs](https://github.com/isaacs)) +* [`021770b`](https://github.com/npm/npm/commit/021770b9cb07451509f0a44afff6c106311d8cf6) + lifecycle: BREAKING CHANGE do not add the directory containing node executable + ([@chulkilee](https://github.com/chulkilee)) +* [`1d5c41d`](https://github.com/npm/npm/commit/1d5c41dd0d757bce8b87f10c4135f04ece55aeb9) + install: rename .gitignore when unpacking foreign tarballs + ([@isaacs](https://github.com/isaacs)) +* [`9aac267`](https://github.com/npm/npm/commit/9aac2670a73423544d92b27cc301990a16a9563b) + cache: detect non-gzipped tar files more reliably + ([@isaacs](https://github.com/isaacs)) +* [`3f24755`](https://github.com/npm/npm/commit/3f24755c8fce3c7ab11ed1dc632cc40d7ef42f62) + `readdir-scoped-modules@1.0.0` ([@isaacs](https://github.com/isaacs)) +* [`151cd2f`](https://github.com/npm/npm/commit/151cd2ff87b8ac2fc9ea366bc9b7f766dc5b9684) + `read-installed@3.1.0` ([@isaacs](https://github.com/isaacs)) +* [`f5a9434`](https://github.com/npm/npm/commit/f5a94343a8ebe4a8cd987320b55137aef53fb3fd) + test: fix Travis timeouts ([@dylang](https://github.com/dylang)) +* [`126cafc`](https://github.com/npm/npm/commit/126cafcc6706814c88af3042f2ffff408747bff4) + `npm-registry-couchapp@2.5.0` ([@othiym23](https://github.com/othiym23)) + +### v1.4.24 (2014-08-14): + +* [`9344bd9`](https://github.com/npm/npm/commit/9344bd9b2929b5c399a0e0e0b34d45bce7bc24bb) + doc: add new changelog ([@othiym23](https://github.com/othiym23)) +* [`4be76fd`](https://github.com/npm/npm/commit/4be76fd65e895883c337a99f275ccc8c801adda3) + doc: update version doc to include `pre-*` increment args + ([@isaacs](https://github.com/isaacs)) +* [`e4f2620`](https://github.com/npm/npm/commit/e4f262036080a282ad60e236a9aeebd39fde9fe4) + build: add `make tag` to tag current release as `latest` + ([@isaacs](https://github.com/isaacs)) +* [`ec2596a`](https://github.com/npm/npm/commit/ec2596a7cb626772780b25b0a94a7e547a812bd5) + build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) +* [`9ee55f8`](https://github.com/npm/npm/commit/9ee55f892b8b473032a43c59912c5684fd1b39e6) + build: add script to output `v1.4-next` publish tag + ([@isaacs](https://github.com/isaacs)) +* [`aecb56f`](https://github.com/npm/npm/commit/aecb56f95a84687ea46920a0b98aaa587fee1568) + build: remove outdated `docpublish` make target + ([@isaacs](https://github.com/isaacs)) +* [`b57a9b7`](https://github.com/npm/npm/commit/b57a9b7ccd13e6b38831ed63595c8ea5763da247) + build: remove unpublish step from `make publish` + ([@isaacs](https://github.com/isaacs)) +* [`2c6acb9`](https://github.com/npm/npm/commit/2c6acb96c71c16106965d5cd829b67195dd673c7) + install: rename `.gitignore` when unpacking foreign tarballs + ([@isaacs](https://github.com/isaacs)) +* [`22f3681`](https://github.com/npm/npm/commit/22f3681923e993a47fc1769ba735bfa3dd138082) + cache: detect non-gzipped tar files more reliably + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha.6 (2014-08-07): + +BREAKING CHANGE: + +* [`ea547e2`](https://github.com/npm/npm/commit/ea547e2) Bump semver to + version 3: `^0.x.y` is now functionally the same as `=0.x.y`. + ([@isaacs](https://github.com/isaacs)) + +Other changes: + +* [`d987707`](https://github.com/npm/npm/commit/d987707) move fetch into + npm-registry-client ([@othiym23](https://github.com/othiym23)) +* [`9b318e2`](https://github.com/npm/npm/commit/9b318e2) `read-installed@3.0.0` + ([@isaacs](https://github.com/isaacs)) +* [`9d73de7`](https://github.com/npm/npm/commit/9d73de7) remove unnecessary + mkdirps ([@isaacs](https://github.com/isaacs)) +* [`33ccd13`](https://github.com/npm/npm/commit/33ccd13) Don't squash execute + perms in `_git-remotes/` dir ([@adammeadows](https://github.com/adammeadows)) +* [`48fd233`](https://github.com/npm/npm/commit/48fd233) `npm-package-arg@2.0.1` + ([@isaacs](https://github.com/isaacs)) + +### v1.4.23 (2014-07-31): + +* [`8dd11d1`](https://github.com/npm/npm/commit/8dd11d1) update several + dependencies to avoid using `semver`s starting with 0. + +### v1.4.22 (2014-07-31): + +* [`d9a9e84`](https://github.com/npm/npm/commit/d9a9e84) `read-package-json@1.2.4` + ([@isaacs](https://github.com/isaacs)) +* [`86f0340`](https://github.com/npm/npm/commit/86f0340) + `github-url-from-git@1.2.0` ([@isaacs](https://github.com/isaacs)) +* [`a94136a`](https://github.com/npm/npm/commit/a94136a) `fstream@0.1.29` + ([@isaacs](https://github.com/isaacs)) +* [`bb82d18`](https://github.com/npm/npm/commit/bb82d18) `glob@4.0.5` + ([@isaacs](https://github.com/isaacs)) +* [`5b6bcf4`](https://github.com/npm/npm/commit/5b6bcf4) `cmd-shim@1.1.2` + ([@isaacs](https://github.com/isaacs)) +* [`c2aa8b3`](https://github.com/npm/npm/commit/c2aa8b3) license: Cleaned up + legalese with actual lawyer ([@isaacs](https://github.com/isaacs)) +* [`63fe0ee`](https://github.com/npm/npm/commit/63fe0ee) `init-package-json@1.0.0` + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha-5 (2014-07-22): + +This release bumps up to 2.0 because of this breaking change, which could +potentially affect how your package's scripts are run: + +* [`df4b0e7`](https://github.com/npm/npm/commit/df4b0e7fc1abd9a54f98db75ec9e4d03d37d125b) + [#5518](https://github.com/npm/npm/issues/5518) BREAKING CHANGE: support + passing arguments to `run` scripts ([@bcoe](https://github.com/bcoe)) + +Other changes: + +* [`cd422c9`](https://github.com/npm/npm/commit/cd422c9de510766797c65720d70f085000f50543) + [#5748](https://github.com/npm/npm/issues/5748) link binaries for scoped + packages ([@othiym23](https://github.com/othiym23)) +* [`4c3c778`](https://github.com/npm/npm/commit/4c3c77839920e830991e0c229c3c6a855c914d67) + [#5758](https://github.com/npm/npm/issues/5758) `npm link` includes scope + when linking scoped package ([@fengmk2](https://github.com/fengmk2)) +* [`f9f58dd`](https://github.com/npm/npm/commit/f9f58dd0f5b715d4efa6619f13901916d8f99c47) + [#5707](https://github.com/npm/npm/issues/5707) document generic pre- / + post-commands ([@sudodoki](https://github.com/sudodoki)) +* [`ac7a480`](https://github.com/npm/npm/commit/ac7a4801d80361b41dce4a18f22bcdf75e396000) + [#5406](https://github.com/npm/npm/issues/5406) `npm cache` displays usage + when called without arguments + ([@michaelnisi](https://github.com/michaelnisi)) +* [`f4554e9`](https://github.com/npm/npm/commit/f4554e99d34f77a8a02884493748f7d49a9a9d8b) + Test fixes for Windows ([@isaacs](https://github.com/isaacs)) +* update dependencies ([@othiym23](https://github.com/othiym23)) + + +### v1.5.0-alpha-4 (2014-07-18): + +* fall back to `_auth` config as default auth when using default registry + ([@isaacs](https://github.com/isaacs)) +* support for 'init.version' for those who don't want to deal with semver 0.0.x + oddities ([@rvagg](https://github.com/rvagg)) +* [`be06213`](https://github.com/npm/npm/commit/be06213415f2d51a50d2c792b4cd0d3412a9a7b1) + remove residual support for `win` log level + ([@aterris](https://github.com/aterris)) + +### v1.5.0-alpha-3 (2014-07-17): + +* [`a3a85dd`](https://github.com/npm/npm/commit/a3a85dd004c9245a71ad2f0213bd1a9a90d64cd6) + `--save` scoped packages correctly ([@othiym23](https://github.com/othiym23)) +* [`18a3385`](https://github.com/npm/npm/commit/18a3385bcf8bfb8312239216afbffb7eec759150) + `npm-registry-client@3.0.2` ([@othiym23](https://github.com/othiym23)) +* [`375988b`](https://github.com/npm/npm/commit/375988b9bf5aa5170f06a790d624d31b1eb32c6d) + invalid package names are an early error for optional deps + ([@othiym23](https://github.com/othiym23)) +* consistently use `node-package-arg` instead of arbitrary package spec + splitting ([@othiym23](https://github.com/othiym23)) + +### v1.4.21 (2014-07-14): + +* [`88f51aa`](https://github.com/npm/npm/commit/88f51aa27eb9a958d1fa7ec50fee5cfdedd05110) + fix handling for 301s in `npm-registry-client@2.0.3` + ([@Raynos](https://github.com/Raynos)) + +### v1.5.0-alpha-2 (2014-07-01): + +* [`54cf625`](https://github.com/npm/npm/commit/54cf62534e3331e3f454e609e44f0b944e819283) + fix handling for 301s in `npm-registry-client@3.0.1` + ([@Raynos](https://github.com/Raynos)) +* [`e410861`](https://github.com/npm/npm/commit/e410861c69a3799c1874614cb5b87af8124ff98d) + don't crash if no username set on `whoami` + ([@isaacs](https://github.com/isaacs)) +* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) + respect `--json` for output ([@isaacs](https://github.com/isaacs)) +* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) + outdated: Don't show headings if there's nothing to output + ([@isaacs](https://github.com/isaacs)) +* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) + outdated: Default to `latest` rather than `*` for unspecified deps + ([@isaacs](https://github.com/isaacs)) + +### v1.4.20 (2014-07-02): + +* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) + respect `--json` for output ([@isaacs](https://github.com/isaacs)) +* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) + outdated: Don't show headings if there's nothing to output + ([@isaacs](https://github.com/isaacs)) +* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) + outdated: Default to `latest` rather than `*` for unspecified deps + ([@isaacs](https://github.com/isaacs)) + +### v1.5.0-alpha-1 (2014-07-01): + +* [`eef4884`](https://github.com/npm/npm/commit/eef4884d6487ee029813e60a5f9c54e67925d9fa) + use the correct piece of the spec for GitHub shortcuts + ([@othiym23](https://github.com/othiym23)) + +### v1.5.0-alpha-0 (2014-07-01): + +* [`7f55057`](https://github.com/npm/npm/commit/7f55057807cfdd9ceaf6331968e666424f48116c) + install scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) + ([@othiym23](https://github.com/othiym23)) +* [`0df7e16`](https://github.com/npm/npm/commit/0df7e16c0232d8f4d036ebf4ec3563215517caac) + publish scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) + ([@othiym23](https://github.com/othiym23)) +* [`0689ba2`](https://github.com/npm/npm/commit/0689ba249b92b4c6279a26804c96af6f92b3a501) + support (and save) --scope=@s config + ([@othiym23](https://github.com/othiym23)) +* [`f34878f`](https://github.com/npm/npm/commit/f34878fc4cee29901e4daf7bace94be01e25cad7) + scope credentials to registry ([@othiym23](https://github.com/othiym23)) +* [`0ac7ca2`](https://github.com/npm/npm/commit/0ac7ca233f7a69751fe4386af6c4daa3ee9fc0da) + capture and store bearer tokens when sent by registry + ([@othiym23](https://github.com/othiym23)) +* [`63c3277`](https://github.com/npm/npm/commit/63c3277f089b2c4417e922826bdc313ac854cad6) + only delete files that are created by npm + ([@othiym23](https://github.com/othiym23)) +* [`4f54043`](https://github.com/npm/npm/commit/4f540437091d1cbca3915cd20c2da83c2a88bb8e) + `npm-package-arg@2.0.0` ([@othiym23](https://github.com/othiym23)) +* [`9e1460e`](https://github.com/npm/npm/commit/9e1460e6ac9433019758481ec031358f4af4cd44) + `read-package-json@1.2.3` ([@othiym23](https://github.com/othiym23)) +* [`719d8ad`](https://github.com/npm/npm/commit/719d8adb9082401f905ff4207ede494661f8a554) + `fs-vacuum@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`9ef8fe4`](https://github.com/npm/npm/commit/9ef8fe4d6ead3acb3e88c712000e2d3a9480ebec) + `async-some@1.0.0` ([@othiym23](https://github.com/othiym23)) +* [`a964f65`](https://github.com/npm/npm/commit/a964f65ab662107b62a4ca58535ce817e8cca331) + `npmconf@2.0.1` ([@othiym23](https://github.com/othiym23)) +* [`113765b`](https://github.com/npm/npm/commit/113765bfb7d3801917c1d9f124b8b3d942bec89a) + `npm-registry-client@3.0.0` ([@othiym23](https://github.com/othiym23)) + +### v1.4.19 (2014-07-01): + +* [`f687433`](https://github.com/npm/npm/commit/f687433) relative URLS for + working non-root registry URLS ([@othiym23](https://github.com/othiym23)) +* [`bea190c`](https://github.com/npm/npm/commit/bea190c) + [#5591](https://github.com/npm/npm/issues/5591) bump nopt and npmconf + ([@isaacs](https://github.com/isaacs)) + +### v1.4.18 (2014-06-29): + +* Bump glob dependency from 4.0.2 to 4.0.3. It now uses graceful-fs when + available, increasing resilience to [various filesystem + errors](https://github.com/isaacs/node-graceful-fs#improvements-over-fs-module). + ([@isaacs](https://github.com/isaacs)) + +### v1.4.17 (2014-06-27): + +* replace escape codes with ansicolors + ([@othiym23](https://github.com/othiym23)) +* Allow to build all the docs OOTB. ([@GeJ](https://github.com/GeJ)) +* Use core.longpaths on win32 git - fixes + [#5525](https://github.com/npm/npm/issues/5525) ([@bmeck](https://github.com/bmeck)) +* `npmconf@1.1.2` ([@isaacs](https://github.com/isaacs)) +* Consolidate color sniffing in config/log loading process + ([@isaacs](https://github.com/isaacs)) +* add verbose log when project config file is ignored + ([@isaacs](https://github.com/isaacs)) +* npmconf: Float patch to remove 'scope' from config defs + ([@isaacs](https://github.com/isaacs)) +* doc: npm-explore can't handle a version + ([@robertkowalski](https://github.com/robertkowalski)) +* Add user-friendly errors for ENOSPC and EROFS. + ([@voodootikigod](https://github.com/voodootikigod)) +* bump tar and fstream deps ([@isaacs](https://github.com/isaacs)) +* Run the npm-registry-couchapp tests along with npm tests + ([@isaacs](https://github.com/isaacs)) + +### v1.2.8000 (2014-06-17): + +* Same as v1.4.16, but with the spinner disabled, and a version number that + starts with v1.2. + +### v1.4.16 (2014-06-17): + +* `npm-registry-client@2.0.2` ([@isaacs](https://github.com/isaacs)) +* `fstream@0.1.27` ([@isaacs](https://github.com/isaacs)) +* `sha@1.2.4` ([@isaacs](https://github.com/isaacs)) +* `rimraf@2.2.8` ([@isaacs](https://github.com/isaacs)) +* `npmlog@1.0.1` ([@isaacs](https://github.com/isaacs)) +* `npm-registry-client@2.0.1` ([@isaacs](https://github.com/isaacs)) +* removed redundant dependency ([@othiym23](https://github.com/othiym23)) +* `npmconf@1.0.5` ([@isaacs](https://github.com/isaacs)) +* Properly handle errors that can occur in the config-loading process + ([@isaacs](https://github.com/isaacs)) + +### v1.4.15 (2014-06-10): + +* cache: atomic de-race-ified package.json writing + ([@isaacs](https://github.com/isaacs)) +* `fstream@0.1.26` ([@isaacs](https://github.com/isaacs)) +* `graceful-fs@3.0.2` ([@isaacs](https://github.com/isaacs)) +* `osenv@0.1.0` ([@isaacs](https://github.com/isaacs)) +* Only spin the spinner when we're fetching stuff + ([@isaacs](https://github.com/isaacs)) +* Update `osenv@0.1.0` which removes ~/tmp as possible tmp-folder + ([@robertkowalski](https://github.com/robertkowalski)) +* `ini@1.2.1` ([@isaacs](https://github.com/isaacs)) +* `graceful-fs@3` ([@isaacs](https://github.com/isaacs)) +* Update glob and things depending on glob + ([@isaacs](https://github.com/isaacs)) +* github-url-from-username-repo and read-package-json updates + ([@isaacs](https://github.com/isaacs)) +* `editor@0.1.0` ([@isaacs](https://github.com/isaacs)) +* `columnify@1.1.0` ([@isaacs](https://github.com/isaacs)) +* bump ansi and associated deps ([@isaacs](https://github.com/isaacs)) + +### v1.4.14 (2014-06-05): + +* char-spinner: update to not bork windows + ([@isaacs](https://github.com/isaacs)) + +### v1.4.13 (2014-05-23): + +* Fix `npm install` on a tarball. + ([`ed3abf1`](https://github.com/npm/npm/commit/ed3abf1aa10000f0f687330e976d78d1955557f6), + [#5330](https://github.com/npm/npm/issues/5330), + [@othiym23](https://github.com/othiym23)) +* Fix an issue with the spinner on Node 0.8. + ([`9f00306`](https://github.com/npm/npm/commit/9f003067909440390198c0b8f92560d84da37762), + [@isaacs](https://github.com/isaacs)) +* Re-add `npm.commands.cache.clean` and `npm.commands.cache.read` APIs, and + document `npm.commands.cache.*` as npm-cache(3). + ([`e06799e`](https://github.com/npm/npm/commit/e06799e77e60c1fc51869619083a25e074d368b3), + [@isaacs](https://github.com/isaacs)) + +### v1.4.12 (2014-05-23): + +* remove normalize-package-data from top level, de-^-ify inflight dep + ([@isaacs](https://github.com/isaacs)) +* Always sort saved bundleDependencies ([@isaacs](https://github.com/isaacs)) +* add inflight to bundledDependencies + ([@othiym23](https://github.com/othiym23)) + +### v1.4.11 (2014-05-22): + +* fix `npm ls` labeling issue +* `node-gyp@0.13.1` +* default repository to https:// instead of git:// +* addLocalTarball: Remove extraneous unpack + ([@isaacs](https://github.com/isaacs)) +* Massive cache folder refactor ([@othiym23](https://github.com/othiym23) and + [@isaacs](https://github.com/isaacs)) +* Busy Spinner, no http noise ([@isaacs](https://github.com/isaacs)) +* Per-project .npmrc file support ([@isaacs](https://github.com/isaacs)) +* `npmconf@1.0.0`, Refactor config/uid/prefix loading process + ([@isaacs](https://github.com/isaacs)) +* Allow once-disallowed characters in passwords + ([@isaacs](https://github.com/isaacs)) +* Send npm version as 'version' header ([@isaacs](https://github.com/isaacs)) +* fix cygwin encoding issue (Karsten Tinnefeld) +* Allow non-github repositories with `npm repo` + ([@evanlucas](https://github.com/evanlucas)) +* Allow peer deps to be satisfied by grandparent +* Stop optional deps moving into deps on `update --save` + ([@timoxley](https://github.com/timoxley)) +* Ensure only matching deps update with `update --save*` + ([@timoxley](https://github.com/timoxley)) +* Add support for `prerelease`, `preminor`, `prepatch` to `npm version` + +### v1.4.10 (2014-05-05): + +* Don't set referer if already set +* fetch: Send referer and npm-session headers +* `run-script`: Support `--parseable` and `--json` +* list runnable scripts ([@evanlucas](https://github.com/evanlucas)) +* Use marked instead of ronn for html docs + +### v1.4.9 (2014-05-01): + +* Send referer header (with any potentially private stuff redacted) +* Fix critical typo bug in previous npm release + +### v1.4.8 (2014-05-01): + +* Check SHA before using files from cache +* adduser: allow change of the saved password +* Make `npm install` respect `config.unicode` +* Fix lifecycle to pass `Infinity` for config env value +* Don't return 0 exit code on invalid command +* cache: Handle 404s and other HTTP errors as errors +* Resolve ~ in path configs to env.HOME +* Include npm version in default user-agent conf +* npm init: Use ISC as default license, use save-prefix for deps +* Many test and doc fixes + +### v1.4.7 (2014-04-15): + +* Add `--save-prefix` option that can be used to override the default of `^` + when using `npm install --save` and its counterparts. + ([`64eefdf`](https://github.com/npm/npm/commit/64eefdfe26bb27db8dc90e3ab5d27a5ef18a4470), + [@thlorenz](https://github.com/thlorenz)) +* Allow `--silent` to silence the echoing of commands that occurs with `npm + run`. + ([`c95cf08`](https://github.com/npm/npm/commit/c95cf086e5b97dbb48ff95a72517b203a8f29eab), + [@Raynos](https://github.com/Raynos)) +* Some speed improvements to the cache, which should improve install times. + ([`cb94310`](https://github.com/npm/npm/commit/cb94310a6adb18cb7b881eacb8d67171eda8b744), + [`3b0870f`](https://github.com/npm/npm/commit/3b0870fb2f40358b3051abdab6be4319d196b99d), + [`120f5a9`](https://github.com/npm/npm/commit/120f5a93437bbbea9249801574a2f33e44e81c33), + [@isaacs](https://github.com/isaacs)) +* Improve ability to retry registry requests when a subset of the registry + servers are down. + ([`4a5257d`](https://github.com/npm/npm/commit/4a5257de3870ac3dafa39667379f19f6dcd6093e), + https://github.com/npm/npm-registry-client/commit/7686d02cb0b844626d6a401e58c0755ef3bc8432, + [@isaacs](https://github.com/isaacs)) +* Fix marking of peer dependencies as extraneous. + ([`779b164`](https://github.com/npm/npm/commit/779b1649764607b062c031c7e5c972151b4a1754), + https://github.com/npm/read-installed/commit/6680ba6ef235b1ca3273a00b70869798ad662ddc, + [@isaacs](https://github.com/isaacs)) +* Fix npm crashing when doing `npm shrinkwrap` in the presence of a + `package.json` with no dependencies. + ([`a9d9fa5`](https://github.com/npm/npm/commit/a9d9fa5ad3b8c925a589422b7be28d2735f320b0), + [@kislyuk](https://github.com/kislyuk)) +* Fix error when using `npm view` on packages that have no versions or have + been unpublished. + ([`94df2f5`](https://github.com/npm/npm/commit/94df2f56d684b35d1df043660180fc321b743dc8), + [@juliangruber](https://github.com/juliangruber); + [`2241a09`](https://github.com/npm/npm/commit/2241a09c843669c70633c399ce698cec3add40b3), + [@isaacs](https://github.com/isaacs)) + +### v1.4.6 (2014-03-19): + +* Fix extraneous package detection to work in more cases. + ([`f671286`](https://github.com/npm/npm/commit/f671286), npm/read-installed#20, + [@LaurentVB](https://github.com/LaurentVB)) + +### v1.4.5 (2014-03-18): + +* Sort dependencies in `package.json` when doing `npm install --save` and all + its variants. + ([`6fd6ff7`](https://github.com/npm/npm/commit/6fd6ff7e536ea6acd33037b1878d4eca1f931985), + [@domenic](https://github.com/domenic)) +* Add `--save-exact` option, usable alongside `--save` and its variants, which + will write the exact version number into `package.json` instead of the + appropriate semver-compatibility range. + ([`17f07df`](https://github.com/npm/npm/commit/17f07df8ad8e594304c2445bf7489cb53346f2c5), + [@timoxley](https://github.com/timoxley)) +* Accept gzipped content from the registry to speed up downloads and save + bandwidth. + ([`a3762de`](https://github.com/npm/npm/commit/a3762de843b842be8fa0ab57cdcd6b164f145942), + npm/npm-registry-client#40, [@fengmk2](https://github.com/fengmk2)) +* Fix `npm ls`'s `--depth` and `--log` options. + ([`1d29b17`](https://github.com/npm/npm/commit/1d29b17f5193d52a5c4faa412a95313dcf41ed91), + npm/read-installed#13, [@zertosh](https://github.com/zertosh)) +* Fix "Adding a cache directory to the cache will make the world implode" in + certain cases. + ([`9a4b2c4`](https://github.com/npm/npm/commit/9a4b2c4667c2b1e0054e3d5611ab86acb1760834), + domenic/path-is-inside#1, [@pmarques](https://github.com/pmarques)) +* Fix readmes not being uploaded in certain rare cases. + ([`527b72c`](https://github.com/npm/npm/commit/527b72cca6c55762b51e592c48a9f28cc7e2ff8b), + [@isaacs](https://github.com/isaacs)) + +### v1.4.4 (2014-02-20): + +* Add `npm t` as an alias for `npm test` (which is itself an alias for `npm run + test`, or even `npm run-script test`). We like making running your tests + easy. ([`14e650b`](https://github.com/npm/npm/commit/14e650bce0bfebba10094c961ac104a61417a5de), [@isaacs](https://github.com/isaacs)) + +### v1.4.3 (2014-02-16): + +* Add back `npm prune --production`, which was removed in 1.3.24. + ([`acc4d02`](https://github.com/npm/npm/commit/acc4d023c57d07704b20a0955e4bf10ee91bdc83), + [@davglass](https://github.com/davglass)) +* Default `npm install --save` and its counterparts to use the `^` version + specifier, instead of `~`. + ([`0a3151c`](https://github.com/npm/npm/commit/0a3151c9cbeb50c1c65895685c2eabdc7e2608dc), + [@mikolalysenko](https://github.com/mikolalysenko)) +* Make `npm shrinkwrap` output dependencies in a sorted order, so that diffs + between shrinkwrap files should be saner now. + ([`059b2bf`](https://github.com/npm/npm/commit/059b2bfd06ae775205a37257dca80142596a0113), + [@Raynos](https://github.com/Raynos)) +* Fix `npm dedupe` not correctly respecting dependency constraints. + ([`86028e9`](https://github.com/npm/npm/commit/86028e9fd8524d5e520ce01ba2ebab5a030103fc), + [@rafeca](https://github.com/rafeca)) +* Fix `npm ls` giving spurious warnings when you used `"latest"` as a version + specifier. + (https://github.com/npm/read-installed/commit/d2956400e0386931c926e0f30c334840e0938f14, + [@bajtos](https://github.com/bajtos)) +* Fixed a bug where using `npm link` on packages without a `name` value could + cause npm to delete itself. + ([`401a642`](https://github.com/npm/npm/commit/401a64286aa6665a94d1d2f13604f7014c5fce87), + [@isaacs](https://github.com/isaacs)) +* Fixed `npm install ./pkg@1.2.3` to actually install the directory at + `pkg@1.2.3`; before it would try to find version `1.2.3` of the package + `./pkg` in the npm registry. + ([`46d8768`](https://github.com/npm/npm/commit/46d876821d1dd94c050d5ebc86444bed12c56739), + [@rlidwka](https://github.com/rlidwka); see also + [`f851b79`](https://github.com/npm/npm/commit/f851b79a71d9a5f5125aa85877c94faaf91bea5f)) +* Fix `npm outdated` to respect the `color` configuration option. + ([`d4f6f3f`](https://github.com/npm/npm/commit/d4f6f3ff83bd14fb60d3ac6392cb8eb6b1c55ce1), + [@timoxley](https://github.com/timoxley)) +* Fix `npm outdated --parseable`. + ([`9575a23`](https://github.com/npm/npm/commit/9575a23f955ce3e75b509c89504ef0bd707c8cf6), + [@yhpark](https://github.com/yhpark)) +* Fix a lockfile-related errors when using certain Git URLs. + ([`164b97e`](https://github.com/npm/npm/commit/164b97e6089f64e686db7a9a24016f245effc37f), + [@nigelzor](https://github.com/nigelzor)) + +### v1.4.2 (2014-02-13): + +* Fixed an issue related to mid-publish GET requests made against the registry. + (https://github.com/npm/npm-registry-client/commit/acbec48372bc1816c67c9e7cbf814cf50437ff93, + [@isaacs](https://github.com/isaacs)) + +### v1.4.1 (2014-02-13): + +* Fix `npm shrinkwrap` forgetting to shrinkwrap dependencies that were also + development dependencies. + ([`9c575c5`](https://github.com/npm/npm/commit/9c575c56efa9b0c8b0d4a17cb9c1de3833004bcd), + [@diwu1989](https://github.com/diwu1989)) +* Fixed publishing of pre-existing packages with uppercase characters in their + name. + (https://github.com/npm/npm-registry-client/commit/9345d3b6c3d8510dd5c4418f27ee1fce59acebad, + [@isaacs](https://github.com/isaacs)) + +### v1.4.0 (2014-02-12): + +* Remove `npm publish --force`. See + https://github.com/npm/npmjs.org/issues/148. + ([@isaacs](https://github.com/isaacs), + npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) +* Other changes to the registry client related to saved configs and couch + logins. ([@isaacs](https://github.com/isaacs); + npm/npm-registry-client@25e2b019a1588155e5f87d035c27e79963b75951, + npm/npm-registry-client@9e41e9101b68036e0f078398785f618575f3cdde, + npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) +* Show an error to the user when doing `npm update` and the `package.json` + specifies a version that does not exist. + ([@evanlucas](https://github.com/evanlucas), + [`027a33a`](https://github.com/npm/npm/commit/027a33a5c594124cc1d82ddec5aee2c18bc8dc32)) +* Fix some issues with cache ownership in certain installation configurations. + ([@outcoldman](https://github.com/outcoldman), + [`a132690`](https://github.com/npm/npm/commit/a132690a2876cda5dcd1e4ca751f21dfcb11cb9e)) +* Fix issues where GitHub shorthand dependencies `user/repo` were not always + treated the same as full Git URLs. + ([@robertkowalski](https://github.com/robertkowalski), + https://github.com/meryn/normalize-package-data/commit/005d0b637aec1895117fcb4e3b49185eebf9e240) + +### v1.3.26 (2014-02-02): + +* Fixes and updates to publishing code + ([`735427a`](https://github.com/npm/npm/commit/735427a69ba4fe92aafa2d88f202aaa42920a9e2) + and + [`c0ac832`](https://github.com/npm/npm/commit/c0ac83224d49aa62e55577f8f27d53bbfd640dc5), + [@isaacs](https://github.com/isaacs)) +* Fix `npm bugs` with no arguments. + ([`b99d465`](https://github.com/npm/npm/commit/b99d465221ac03bca30976cbf4d62ca80ab34091), + [@Hoops](https://github.com/Hoops)) + +### v1.3.25 (2014-01-25): + +* Remove gubblebum blocky font from documentation headers. + ([`6940c9a`](https://github.com/npm/npm/commit/6940c9a100160056dc6be8f54a7ad7fa8ceda7e2), + [@isaacs](https://github.com/isaacs)) + +### v1.3.24 (2014-01-19): + +* Make the search output prettier, with nice truncated columns, and a `--long` + option to create wrapping columns. + ([`20439b2`](https://github.com/npm/npm/commit/20439b2) and + [`3a6942d`](https://github.com/npm/npm/commit/3a6942d), + [@timoxley](https://github.com/timoxley)) +* Support multiple packagenames in `npm docs`. + ([`823010b`](https://github.com/npm/npm/commit/823010b), + [@timoxley](https://github.com/timoxley)) +* Fix the `npm adduser` bug regarding "Error: default value must be string or + number" again. ([`b9b4248`](https://github.com/npm/npm/commit/b9b4248), + [@isaacs](https://github.com/isaacs)) +* Fix `scripts` entries containing whitespaces on Windows. + ([`80282ed`](https://github.com/npm/npm/commit/80282ed), + [@robertkowalski](https://github.com/robertkowalski)) +* Fix `npm update` for Git URLs that have credentials in them + ([`93fc364`](https://github.com/npm/npm/commit/93fc364), + [@danielsantiago](https://github.com/danielsantiago)) +* Fix `npm install` overwriting `npm link`-ed dependencies when they are tagged + Git dependencies. ([`af9bbd9`](https://github.com/npm/npm/commit/af9bbd9), + [@evanlucas](https://github.com/evanlucas)) +* Remove `npm prune --production` since it buggily removed some dependencies + that were necessary for production; see + [#4509](https://github.com/npm/npm/issues/4509). Hopefully it can make its + triumphant return, one day. + ([`1101b6a`](https://github.com/npm/npm/commit/1101b6a), + [@isaacs](https://github.com/isaacs)) + +Dependency updates: +* [`909cccf`](https://github.com/npm/npm/commit/909cccf) `read-package-json@1.1.6` +* [`a3891b6`](https://github.com/npm/npm/commit/a3891b6) `rimraf@2.2.6` +* [`ac6efbc`](https://github.com/npm/npm/commit/ac6efbc) `sha@1.2.3` +* [`dd30038`](https://github.com/npm/npm/commit/dd30038) `node-gyp@0.12.2` +* [`c8c3ebe`](https://github.com/npm/npm/commit/c8c3ebe) `npm-registry-client@0.3.3` +* [`4315286`](https://github.com/npm/npm/commit/4315286) `npmconf@0.1.12` + +### v1.3.23 (2014-01-03): + +* Properly handle installations that contained a certain class of circular + dependencies. + ([`5dc93e8`](https://github.com/npm/npm/commit/5dc93e8c82604c45b6067b1acf1c768e0bfce754), + [@substack](https://github.com/substack)) + +### v1.3.22 (2013-12-25): + +* Fix a critical bug in `npm adduser` that would manifest in the error message + "Error: default value must be string or number." + ([`fba4bd2`](https://github.com/npm/npm/commit/fba4bd24bc2ab00ccfeda2043aa53af7d75ef7ce), + [@isaacs](https://github.com/isaacs)) +* Allow `npm bugs` in the current directory to open the current package's bugs + URL. + ([`d04cf64`](https://github.com/npm/npm/commit/d04cf6483932c693452f3f778c2fa90f6153a4af), + [@evanlucas](https://github.com/evanlucas)) +* Several fixes to various error messages to include more useful or updated + information. + ([`1e6f2a7`](https://github.com/npm/npm/commit/1e6f2a72ca058335f9f5e7ca22d01e1a8bb0f9f7), + [`ff46366`](https://github.com/npm/npm/commit/ff46366bd40ff0ef33c7bac8400bc912c56201d1), + [`8b4bb48`](https://github.com/npm/npm/commit/8b4bb4815d80a3612186dc5549d698e7b988eb03); + [@rlidwka](https://github.com/rlidwka), + [@evanlucas](https://github.com/evanlucas)) + +### v1.3.21 (2013-12-17): + +* Fix a critical bug that prevented publishing due to incorrect hash + calculation. + ([`4ca4a2c`](https://github.com/npm/npm-registry-client/commit/4ca4a2c6333144299428be6b572e2691aa59852e), + [@dominictarr](https://github.com/dominictarr)) + +### v1.3.20 (2013-12-17): + +* Fixes a critical bug in v1.3.19. Thankfully, due to that bug, no one could + install npm v1.3.19 :) + +### v1.3.19 (2013-12-16): + +* Adds atomic PUTs for publishing packages, which should result in far fewer + requests and less room for replication errors on the server-side. + +### v1.3.18 (2013-12-16): + +* Added an `--ignore-scripts` option, which will prevent `package.json` scripts + from being run. Most notably, this will work on `npm install`, so e.g. `npm + install --ignore-scripts` will not run preinstall and prepublish scripts. + ([`d7e67bf`](https://github.com/npm/npm/commit/d7e67bf0d94b085652ec1c87d595afa6f650a8f6), + [@sqs](https://github.com/sqs)) +* Fixed a bug introduced in 1.3.16 that would manifest with certain cache + configurations, by causing spurious errors saying "Adding a cache directory + to the cache will make the world implode." + ([`966373f`](https://github.com/npm/npm/commit/966373fad8d741637f9744882bde9f6e94000865), + [@domenic](https://github.com/domenic)) +* Re-fixed the multiple download of URL dependencies, whose fix was reverted in + 1.3.17. + ([`a362c3f`](https://github.com/npm/npm/commit/a362c3f1919987419ed8a37c8defa19d2e6697b0), + [@spmason](https://github.com/spmason)) + +### v1.3.17 (2013-12-11): + +* This release reverts + [`644c2ff`](https://github.com/npm/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), + which avoided re-downloading URL and shinkwrap dependencies when doing `npm + install`. You can see the in-depth reasoning in + [`d8c907e`](https://github.com/npm/npm/commit/d8c907edc2019b75cff0f53467e34e0ffd7e5fba); + the problem was, that the patch changed the behavior of `npm install -f` to + reinstall all dependencies. +* A new version of the no-re-downloading fix has been submitted as + [#4303](https://github.com/npm/npm/issues/4303) and will hopefully be + included in the next release. + +### v1.3.16 (2013-12-11): + +* Git URL dependencies are now updated on `npm install`, fixing a two-year old + bug + ([`5829ecf`](https://github.com/npm/npm/commit/5829ecf032b392d2133bd351f53d3c644961396b), + [@robertkowalski](https://github.com/robertkowalski)). Additional progress on + reducing the resulting Git-related I/O is tracked as + [#4191](https://github.com/npm/npm/issues/4191), but for now, this will be a + big improvement. +* Added a `--json` mode to `npm outdated` to give a parseable output. + ([`0b6c9b7`](https://github.com/npm/npm/commit/0b6c9b7c8c5579f4d7d37a0c24d9b7a12ccbe5fe), + [@yyx990803](https://github.com/yyx990803)) +* Made `npm outdated` much prettier and more useful. It now outputs a + color-coded and easy-to-read table. + ([`fd3017f`](https://github.com/npm/npm/commit/fd3017fc3e9d42acf6394a5285122edb4dc16106), + [@quimcalpe](https://github.com/quimcalpe)) +* Added the `--depth` option to `npm outdated`, so that e.g. you can do `npm + outdated --depth=0` to show only top-level outdated dependencies. + ([`1d184ef`](https://github.com/npm/npm/commit/1d184ef3f4b4bc309d38e9128732e3e6fb46d49c), + [@yyx990803](https://github.com/yyx990803)) +* Added a `--no-git-tag-version` option to `npm version`, for doing the usual + job of `npm version` minus the Git tagging. This could be useful if you need + to increase the version in other related files before actually adding the + tag. + ([`59ca984`](https://github.com/npm/npm/commit/59ca9841ba4f4b2f11b8e72533f385c77ae9f8bd), + [@evanlucas](https://github.com/evanlucas)) +* Made `npm repo` and `npm docs` work without any arguments, adding them to the + list of npm commands that work on the package in the current directory when + invoked without arguments. + ([`bf9048e`](https://github.com/npm/npm/commit/bf9048e2fa16d43fbc4b328d162b0a194ca484e8), + [@robertkowalski](https://github.com/robertkowalski); + [`07600d0`](https://github.com/npm/npm/commit/07600d006c652507cb04ac0dae9780e35073dd67), + [@wilmoore](https://github.com/wilmoore)). There are a few other commands we + still want to implement this for; see + [#4204](https://github.com/npm/npm/issues/4204). +* Pass through the `GIT_SSL_NO_VERIFY` environment variable to Git, if it is + set; we currently do this with a few other environment variables, but we + missed that one. + ([`c625de9`](https://github.com/npm/npm/commit/c625de91770df24c189c77d2e4bc821f2265efa8), + [@arikon](https://github.com/arikon)) +* Fixed `npm dedupe` on Windows due to incorrect path separators being used + ([`7677de4`](https://github.com/npm/npm/commit/7677de4583100bc39407093ecc6bc13715bf8161), + [@mcolyer](https://github.com/mcolyer)). +* Fixed the `npm help` command when multiple words were searched for; it + previously gave a `ReferenceError`. + ([`6a28dd1`](https://github.com/npm/npm/commit/6a28dd147c6957a93db12b1081c6e0da44fe5e3c), + [@dereckson](https://github.com/dereckson)) +* Stopped re-downloading URL and shrinkwrap dependencies, as demonstrated in + [#3463](https://github.com/npm/npm/issues/3463) + ([`644c2ff`](https://github.com/isaacs/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), + [@spmason](https://github.com/spmason)). You can use the `--force` option to + force re-download and installation of all dependencies. diff --git a/bin/nodejs0.12.16/node_modules/npm/CONTRIBUTING.md b/bin/nodejs0.12.16/node_modules/npm/CONTRIBUTING.md new file mode 100644 index 00000000..65a91001 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/CONTRIBUTING.md @@ -0,0 +1,12 @@ +## Before you submit a new issue + +* Check if there's a simple solution in the + [Troubleshooting](https://github.com/npm/npm/wiki/Troubleshooting) + wiki. +* [Search for similar + issues](https://github.com/npm/npm/search?q=Similar%20issues&type=Issues). +* Ensure your new issue conforms to the [Contributing + Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines). + +Participation in this open source project is subject to the [npm Code +of Conduct](http://www.npmjs.com/policies/conduct). diff --git a/bin/nodejs0.12.16/node_modules/npm/LICENSE b/bin/nodejs0.12.16/node_modules/npm/LICENSE new file mode 100644 index 00000000..072a301d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/LICENSE @@ -0,0 +1,281 @@ +The npm application +Copyright (c) npm, Inc. and Contributors +Licensed on the terms of The Artistic License 2.0 + +Node package dependencies of the npm application +Copyright (c) their respective copyright owners +Licensed on their respective license terms + +The npm public registry at https://registry.npmjs.org +and the npm website at https://www.npmjs.com +Operated by npm, Inc. +Use governed by terms published on https://www.npmjs.com + +"Node.js" +Trademark Joyent, Inc., https://joyent.com +Neither npm nor npm, Inc. are affiliated with Joyent, Inc. + +The Node.js application +Project of Node Foundation, https://nodejs.org + +The npm Logo +Copyright (c) Mathias Pettersson and Brian Hammond + +"Gubblebum Blocky" typeface +Copyright (c) Tjarda Koster, https://jelloween.deviantart.com +Used with permission + + +-------- + + +The Artistic License 2.0 + +Copyright (c) 2000-2006, The Perl Foundation. + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +This license establishes the terms under which a given free software +Package may be copied, modified, distributed, and/or redistributed. +The intent is that the Copyright Holder maintains some artistic +control over the development of that Package while still keeping the +Package available as open source and free software. + +You are always permitted to make arrangements wholly outside of this +license directly with the Copyright Holder of a given Package. If the +terms of this license do not permit the full use that you propose to +make of the Package, you should contact the Copyright Holder and seek +a different licensing arrangement. + +Definitions + + "Copyright Holder" means the individual(s) or organization(s) + named in the copyright notice for the entire Package. + + "Contributor" means any party that has contributed code or other + material to the Package, in accordance with the Copyright Holder's + procedures. + + "You" and "your" means any person who would like to copy, + distribute, or modify the Package. + + "Package" means the collection of files distributed by the + Copyright Holder, and derivatives of that collection and/or of + those files. A given Package may consist of either the Standard + Version, or a Modified Version. + + "Distribute" means providing a copy of the Package or making it + accessible to anyone else, or in the case of a company or + organization, to others outside of your company or organization. + + "Distributor Fee" means any fee that you charge for Distributing + this Package or providing support for this Package to another + party. It does not mean licensing fees. + + "Standard Version" refers to the Package if it has not been + modified, or has been modified only in ways explicitly requested + by the Copyright Holder. + + "Modified Version" means the Package, if it has been changed, and + such changes were not explicitly requested by the Copyright + Holder. + + "Original License" means this Artistic License as Distributed with + the Standard Version of the Package, in its current version or as + it may be modified by The Perl Foundation in the future. + + "Source" form means the source code, documentation source, and + configuration files for the Package. + + "Compiled" form means the compiled bytecode, object code, binary, + or any other form resulting from mechanical transformation or + translation of the Source form. + + +Permission for Use and Modification Without Distribution + +(1) You are permitted to use the Standard Version and create and use +Modified Versions for any purpose without restriction, provided that +you do not Distribute the Modified Version. + + +Permissions for Redistribution of the Standard Version + +(2) You may Distribute verbatim copies of the Source form of the +Standard Version of this Package in any medium without restriction, +either gratis or for a Distributor Fee, provided that you duplicate +all of the original copyright notices and associated disclaimers. At +your discretion, such verbatim copies may or may not include a +Compiled form of the Package. + +(3) You may apply any bug fixes, portability changes, and other +modifications made available from the Copyright Holder. The resulting +Package will still be considered the Standard Version, and as such +will be subject to the Original License. + + +Distribution of Modified Versions of the Package as Source + +(4) You may Distribute your Modified Version as Source (either gratis +or for a Distributor Fee, and with or without a Compiled form of the +Modified Version) provided that you clearly document how it differs +from the Standard Version, including, but not limited to, documenting +any non-standard features, executables, or modules, and provided that +you do at least ONE of the following: + + (a) make the Modified Version available to the Copyright Holder + of the Standard Version, under the Original License, so that the + Copyright Holder may include your modifications in the Standard + Version. + + (b) ensure that installation of your Modified Version does not + prevent the user installing or running the Standard Version. In + addition, the Modified Version must bear a name that is different + from the name of the Standard Version. + + (c) allow anyone who receives a copy of the Modified Version to + make the Source form of the Modified Version available to others + under + + (i) the Original License or + + (ii) a license that permits the licensee to freely copy, + modify and redistribute the Modified Version using the same + licensing terms that apply to the copy that the licensee + received, and requires that the Source form of the Modified + Version, and of any works derived from it, be made freely + available in that license fees are prohibited but Distributor + Fees are allowed. + + +Distribution of Compiled Forms of the Standard Version +or Modified Versions without the Source + +(5) You may Distribute Compiled forms of the Standard Version without +the Source, provided that you include complete instructions on how to +get the Source of the Standard Version. Such instructions must be +valid at the time of your distribution. If these instructions, at any +time while you are carrying out such distribution, become invalid, you +must provide new instructions on demand or cease further distribution. +If you provide valid instructions or cease distribution within thirty +days after you become aware that the instructions are invalid, then +you do not forfeit any of your rights under this license. + +(6) You may Distribute a Modified Version in Compiled form without +the Source, provided that you comply with Section 4 with respect to +the Source of the Modified Version. + + +Aggregating or Linking the Package + +(7) You may aggregate the Package (either the Standard Version or +Modified Version) with other packages and Distribute the resulting +aggregation provided that you do not charge a licensing fee for the +Package. Distributor Fees are permitted, and licensing fees for other +components in the aggregation are permitted. The terms of this license +apply to the use and Distribution of the Standard or Modified Versions +as included in the aggregation. + +(8) You are permitted to link Modified and Standard Versions with +other works, to embed the Package in a larger work of your own, or to +build stand-alone binary or bytecode versions of applications that +include the Package, and Distribute the result without restriction, +provided the result does not expose a direct interface to the Package. + + +Items That are Not Considered Part of a Modified Version + +(9) Works (including, but not limited to, modules and scripts) that +merely extend or make use of the Package, do not, by themselves, cause +the Package to be a Modified Version. In addition, such works are not +considered parts of the Package itself, and are not subject to the +terms of this license. + + +General Provisions + +(10) Any use, modification, and distribution of the Standard or +Modified Versions is governed by this Artistic License. By using, +modifying or distributing the Package, you accept this license. Do not +use, modify, or distribute the Package, if you do not accept this +license. + +(11) If your Modified Version has been derived from a Modified +Version made by someone other than you, you are nevertheless required +to ensure that your Modified Version complies with the requirements of +this license. + +(12) This license does not grant you the right to use any trademark, +service mark, tradename, or logo of the Copyright Holder. + +(13) This license includes the non-exclusive, worldwide, +free-of-charge patent license to make, have made, use, offer to sell, +sell, import and otherwise transfer the Package with respect to any +patent claims licensable by the Copyright Holder that are necessarily +infringed by the Package. If you institute patent litigation +(including a cross-claim or counterclaim) against any party alleging +that the Package constitutes direct or contributory patent +infringement, then this Artistic License to you shall terminate on the +date that such litigation is filed. + +(14) Disclaimer of Warranty: +THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS +IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL +LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------- + + +The following additional terms shall apply to use of the npm software, the npm +website, the npm repository and any other services or products offered by npm, +Inc.: + +"Node.js" trademark Joyent, Inc. npm is not officially part of the Node.js +project, and is neither owned by nor affiliated with Joyent, Inc. + +"npm" and "The npm Registry" are owned by npm, Inc. All rights reserved. + +Modules published on the npm registry are not officially endorsed by npm, Inc. +or the Node.js project. + +Data published to the npm registry is not part of npm itself, and is the sole +property of the publisher. While every effort is made to ensure accountability, +there is absolutely no guarantee, warrantee, or assertion expressed or implied +as to the quality, fitness for a specific purpose, or lack of malice in any +given npm package. Packages downloaded through the npm registry are +independently licensed and are not covered by this license. + +Additional policies relating to, and restrictions on use of, npm products and +services are available on the npm website. All such policies and restrictions, +as updated from time to time, are hereby incorporated into this license +agreement. By using npm, you acknowledge your agreement to all such policies +and restrictions. + +If you have a complaint about a package in the public npm registry, and cannot +resolve it with the package owner, please email support@npmjs.com and explain +the situation. See the [npm Dispute Resolution +policy](https://github.com/npm/policies/blob/master/disputes.md) for more +details. + +Any data published to The npm Registry (including user account information) may +be removed or modified at the sole discretion of the npm server administrators. + +"npm Logo" contributed by Mathias Pettersson and Brian Hammond, +use is subject to https://www.npmjs.com/policies/trademark + +"Gubblebum Blocky" font +Copyright (c) by Tjarda Koster, https://jelloween.deviantart.com +included for use in the npm website and documentation, +used with permission. + +This program uses several Node modules contained in the node_modules/ +subdirectory, according to the terms of their respective licenses. diff --git a/bin/nodejs0.12.16/node_modules/npm/Makefile b/bin/nodejs0.12.16/node_modules/npm/Makefile new file mode 100644 index 00000000..bd89784c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/Makefile @@ -0,0 +1,192 @@ +# vim: set softtabstop=2 shiftwidth=2: +SHELL = bash + +PUBLISHTAG = $(shell node scripts/publish-tag.js) +BRANCH = $(shell git rev-parse --abbrev-ref HEAD) + +markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md + +html_docdeps = html/dochead.html \ + html/docfoot.html \ + scripts/doc-build.sh \ + package.json + +cli_mandocs = $(shell find doc/cli -name '*.md' \ + |sed 's|.md|.1|g' \ + |sed 's|doc/cli/|man/man1/|g' ) \ + man/man1/npm-README.1 + +api_mandocs = $(shell find doc/api -name '*.md' \ + |sed 's|.md|.3|g' \ + |sed 's|doc/api/|man/man3/|g' ) + +files_mandocs = $(shell find doc/files -name '*.md' \ + |sed 's|.md|.5|g' \ + |sed 's|doc/files/|man/man5/|g' ) \ + man/man5/npm-json.5 \ + man/man5/npm-global.5 + +misc_mandocs = $(shell find doc/misc -name '*.md' \ + |sed 's|.md|.7|g' \ + |sed 's|doc/misc/|man/man7/|g' ) \ + man/man7/npm-index.7 + +cli_htmldocs = $(shell find doc/cli -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/cli/|html/doc/cli/|g' ) \ + html/doc/README.html + +api_htmldocs = $(shell find doc/api -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/api/|html/doc/api/|g' ) + +files_htmldocs = $(shell find doc/files -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/files/|html/doc/files/|g' ) \ + html/doc/files/npm-json.html \ + html/doc/files/npm-global.html + +misc_htmldocs = $(shell find doc/misc -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/misc/|html/doc/misc/|g' ) \ + html/doc/index.html + +mandocs = $(api_mandocs) $(cli_mandocs) $(files_mandocs) $(misc_mandocs) + +htmldocs = $(api_htmldocs) $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs) + +all: doc + +latest: + @echo "Installing latest published npm" + @echo "Use 'make install' or 'make link' to install the code" + @echo "in this folder that you're looking at right now." + node cli.js install -g -f npm ${NPMOPTS} + +install: all + node cli.js install -g -f ${NPMOPTS} + +# backwards compat +dev: install + +link: uninstall + node cli.js link -f + +clean: markedclean marked-manclean doc-clean uninstall + rm -rf npmrc + node cli.js cache clean + +uninstall: + node cli.js rm npm -g -f + +doc: $(mandocs) $(htmldocs) + +markedclean: + rm -rf node_modules/marked node_modules/.bin/marked .building_marked + +marked-manclean: + rm -rf node_modules/marked-man node_modules/.bin/marked-man .building_marked-man + +docclean: doc-clean +doc-clean: + rm -rf \ + .building_marked \ + .building_marked-man \ + html/doc \ + html/api \ + man + +# use `npm install marked-man` for this to work. +man/man1/npm-README.1: README.md scripts/doc-build.sh package.json + @[ -d man/man1 ] || mkdir -p man/man1 + scripts/doc-build.sh $< $@ + +man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json + @[ -d man/man1 ] || mkdir -p man/man1 + scripts/doc-build.sh $< $@ + +man/man3/%.3: doc/api/%.md scripts/doc-build.sh package.json + @[ -d man/man3 ] || mkdir -p man/man3 + scripts/doc-build.sh $< $@ + +man/man5/npm-json.5: man/man5/package.json.5 + cp $< $@ + +man/man5/npm-global.5: man/man5/npm-folders.5 + cp $< $@ + +man/man5/%.5: doc/files/%.md scripts/doc-build.sh package.json + @[ -d man/man5 ] || mkdir -p man/man5 + scripts/doc-build.sh $< $@ + +doc/misc/npm-index.md: scripts/index-build.js package.json + node scripts/index-build.js > $@ + +html/doc/index.html: doc/misc/npm-index.md $(html_docdeps) + @[ -d html/doc ] || mkdir -p html/doc + scripts/doc-build.sh $< $@ + +man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json + @[ -d man/man7 ] || mkdir -p man/man7 + scripts/doc-build.sh $< $@ + +html/doc/README.html: README.md $(html_docdeps) + @[ -d html/doc ] || mkdir -p html/doc + scripts/doc-build.sh $< $@ + +html/doc/cli/%.html: doc/cli/%.md $(html_docdeps) + @[ -d html/doc/cli ] || mkdir -p html/doc/cli + scripts/doc-build.sh $< $@ + +html/doc/api/%.html: doc/api/%.md $(html_docdeps) + @[ -d html/doc/api ] || mkdir -p html/doc/api + scripts/doc-build.sh $< $@ + +html/doc/files/npm-json.html: html/doc/files/package.json.html + cp $< $@ +html/doc/files/npm-global.html: html/doc/files/npm-folders.html + cp $< $@ + +html/doc/files/%.html: doc/files/%.md $(html_docdeps) + @[ -d html/doc/files ] || mkdir -p html/doc/files + scripts/doc-build.sh $< $@ + +html/doc/misc/%.html: doc/misc/%.md $(html_docdeps) + @[ -d html/doc/misc ] || mkdir -p html/doc/misc + scripts/doc-build.sh $< $@ + + +marked: node_modules/.bin/marked + +node_modules/.bin/marked: + node cli.js install marked --no-global + +marked-man: node_modules/.bin/marked-man + +node_modules/.bin/marked-man: + node cli.js install marked-man --no-global + +doc: man + +man: $(cli_docs) $(api_docs) + +test: doc + node cli.js test + +tag: + npm tag npm@$(PUBLISHTAG) latest + +publish: link doc + @git push origin :v$(shell npm -v) 2>&1 || true + git clean -fd &&\ + git push origin $(BRANCH) &&\ + git push origin --tags &&\ + npm publish --tag=$(PUBLISHTAG) + +release: + @bash scripts/release.sh + +sandwich: + @[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || (echo "make it yourself" && exit 13) + +.PHONY: all latest install dev link doc clean uninstall test man doc-clean docclean release diff --git a/bin/nodejs0.12.16/node_modules/npm/README.md b/bin/nodejs0.12.16/node_modules/npm/README.md new file mode 100644 index 00000000..247cefe5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/README.md @@ -0,0 +1,169 @@ +npm(1) -- a JavaScript package manager +============================== +[![Build Status](https://img.shields.io/travis/npm/npm/master.svg)](https://travis-ci.org/npm/npm) +## SYNOPSIS + +This is just enough info to get you up and running. + +Much more info available via `npm help` once it's installed. + +## IMPORTANT + +**You need node v0.8 or higher to run this program.** + +To install an old **and unsupported** version of npm that works on node 0.3 +and prior, clone the git repo and dig through the old tags and branches. + +**npm is configured to use npm, Inc.'s public package registry at +<https://registry.npmjs.org> by default.** + +You can configure npm to use any compatible registry you +like, and even run your own registry. Check out the [doc on +registries](https://docs.npmjs.com/misc/registry). + +Use of someone else's registry may be governed by terms of use. The +terms of use for the default public registry are available at +<https://www.npmjs.com>. + +## Super Easy Install + +npm is bundled with [node](http://nodejs.org/download/). + +### Windows Computers + +[Get the MSI](http://nodejs.org/download/). npm is in it. + +### Apple Macintosh Computers + +[Get the pkg](http://nodejs.org/download/). npm is in it. + +### Other Sorts of Unices + +Run `make install`. npm will be installed with node. + +If you want a more fancy pants install (a different version, customized +paths, etc.) then read on. + +## Fancy Install (Unix) + +There's a pretty robust install script at +<https://www.npmjs.com/install.sh>. You can download that and run it. + +Here's an example using curl: + +```sh +curl -L https://www.npmjs.com/install.sh | sh +``` + +### Slightly Fancier + +You can set any npm configuration params with that script: + +```sh +npm_config_prefix=/some/path sh install.sh +``` + +Or, you can run it in uber-debuggery mode: + +```sh +npm_debug=1 sh install.sh +``` + +### Even Fancier + +Get the code with git. Use `make` to build the docs and do other stuff. +If you plan on hacking on npm, `make link` is your friend. + +If you've got the npm source code, you can also semi-permanently set +arbitrary config keys using the `./configure --key=val ...`, and then +run npm commands by doing `node cli.js <cmd> <args>`. (This is helpful +for testing, or running stuff without actually installing npm itself.) + +## Windows Install or Upgrade + +You can download a zip file from <https://github.com/npm/npm/releases>, and +unpack it in the `node_modules\npm\` folder inside node's installation folder. + +To upgrade to npm 2, follow the Windows upgrade instructions in +the npm Troubleshooting Guide: + +<https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows> + +If that's not fancy enough for you, then you can fetch the code with +git, and mess with it directly. + +## Installing on Cygwin + +No. + +## Uninstalling + +So sad to see you go. + +```sh +sudo npm uninstall npm -g +``` +Or, if that fails, + +```sh +sudo make uninstall +``` + +## More Severe Uninstalling + +Usually, the above instructions are sufficient. That will remove +npm, but leave behind anything you've installed. + +If you would like to remove all the packages that you have installed, +then you can use the `npm ls` command to find them, and then `npm rm` to +remove them. + +To remove cruft left behind by npm 0.x, you can use the included +`clean-old.sh` script file. You can run it conveniently like this: + +```sh +npm explore npm -g -- sh scripts/clean-old.sh +``` + +npm uses two configuration files, one for per-user configs, and another +for global (every-user) configs. You can view them by doing: + +```sh +npm config get userconfig # defaults to ~/.npmrc +npm config get globalconfig # defaults to /usr/local/etc/npmrc +``` + +Uninstalling npm does not remove configuration files by default. You +must remove them yourself manually if you want them gone. Note that +this means that future npm installs will not remember the settings that +you have chosen. + +## More Docs + +Check out the [docs](https://docs.npmjs.com/), +especially the [faq](https://docs.npmjs.com/misc/faq). + +You can use the `npm help` command to read any of them. + +If you're a developer, and you want to use npm to publish your program, +you should [read this](https://docs.npmjs.com/misc/developers) + +## BUGS + +When you find issues, please report them: + +* web: + <https://github.com/npm/npm/issues> + +Be sure to include *all* of the output from the npm command that didn't work +as expected. The `npm-debug.log` file is also helpful to provide. + +You can also look for isaacs in #node.js on irc://irc.freenode.net. He +will no doubt tell you to put the output in a gist or email. + +## SEE ALSO + +* npm(1) +* npm-faq(7) +* npm-help(1) +* npm-index(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/bin/node-gyp-bin/node-gyp b/bin/nodejs0.12.16/node_modules/npm/bin/node-gyp-bin/node-gyp new file mode 100644 index 00000000..640ac1a8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/bin/node-gyp-bin/node-gyp @@ -0,0 +1,6 @@ +#!/usr/bin/env sh +if [ "x$npm_config_node_gyp" = "x" ]; then + node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@" +else + "$npm_config_node_gyp" "$@" +fi diff --git a/bin/nodejs0.12.16/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd b/bin/nodejs0.12.16/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd new file mode 100644 index 00000000..6816e5bf --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd @@ -0,0 +1,5 @@ +if not defined npm_config_node_gyp ( + node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* +) else ( + node "%npm_config_node_gyp%" %* +) diff --git a/bin/nodejs0.12.16/node_modules/npm/bin/npm b/bin/nodejs0.12.16/node_modules/npm/bin/npm new file mode 100644 index 00000000..1226afbc --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/bin/npm @@ -0,0 +1,34 @@ +#!/bin/sh +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node +fi + +NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" + +case `uname` in + *MINGW*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; + *CYGWIN*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; +esac + +"$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/bin/nodejs0.12.16/node_modules/npm/bin/npm-cli.js b/bin/nodejs0.12.16/node_modules/npm/bin/npm-cli.js new file mode 100644 index 00000000..a1fa7f99 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/bin/npm-cli.js @@ -0,0 +1,75 @@ +#!/usr/bin/env node +;(function () { // wrapper in case we're in module_context mode + +// windows: running "npm blah" in this folder will invoke WSH, not node. +if (typeof WScript !== "undefined") { + WScript.echo("npm does not work when run\n" + +"with the Windows Scripting Host\n\n" + +"'cd' to a different directory,\n" + +"or type 'npm.cmd <args>',\n" + +"or type 'node npm <args>'.") + WScript.quit(1) + return +} + + +process.title = "npm" + +var log = require("npmlog") +log.pause() // will be unpaused when config is loaded. +log.info("it worked if it ends with", "ok") + +var path = require("path") + , npm = require("../lib/npm.js") + , npmconf = require("../lib/config/core.js") + , errorHandler = require("../lib/utils/error-handler.js") + + , configDefs = npmconf.defs + , shorthands = configDefs.shorthands + , types = configDefs.types + , nopt = require("nopt") + +// if npm is called as "npmg" or "npm_g", then +// run in global mode. +if (path.basename(process.argv[1]).slice(-1) === "g") { + process.argv.splice(1, 1, "npm", "-g") +} + +log.verbose("cli", process.argv) + +var conf = nopt(types, shorthands) +npm.argv = conf.argv.remain +if (npm.deref(npm.argv[0])) npm.command = npm.argv.shift() +else conf.usage = true + + +if (conf.version) { + console.log(npm.version) + return +} + +if (conf.versions) { + npm.command = "version" + conf.usage = false + npm.argv = [] +} + +log.info("using", "npm@%s", npm.version) +log.info("using", "node@%s", process.version) + +process.on("uncaughtException", errorHandler) + +if (conf.usage && npm.command !== "help") { + npm.argv.unshift(npm.command) + npm.command = "help" +} + +// now actually fire up npm and run the command. +// this is how to use npm programmatically: +conf._exit = true +npm.load(conf, function (er) { + if (er) return errorHandler(er) + npm.commands[npm.command](npm.argv, errorHandler) +}) + +})() diff --git a/bin/nodejs0.12.16/node_modules/npm/bin/npm.cmd b/bin/nodejs0.12.16/node_modules/npm/bin/npm.cmd new file mode 100644 index 00000000..f111c59d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/bin/npm.cmd @@ -0,0 +1,19 @@ +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/bin/nodejs0.12.16/node_modules/npm/bin/read-package-json.js b/bin/nodejs0.12.16/node_modules/npm/bin/read-package-json.js new file mode 100644 index 00000000..ed46e264 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/bin/read-package-json.js @@ -0,0 +1,22 @@ +var argv = process.argv +if (argv.length < 3) { + console.error("Usage: read-package.json <file> [<fields> ...]") + process.exit(1) +} + +var fs = require("fs") + , file = argv[2] + , readJson = require("read-package-json") + +readJson(file, function (er, data) { + if (er) throw er + if (argv.length === 3) console.log(data) + else argv.slice(3).forEach(function (field) { + field = field.split(".") + var val = data + field.forEach(function (f) { + val = val[f] + }) + console.log(val) + }) +}) diff --git a/bin/nodejs0.12.16/node_modules/npm/cli.js b/bin/nodejs0.12.16/node_modules/npm/cli.js new file mode 100644 index 00000000..922bf23a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/cli.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require("./bin/npm-cli.js") diff --git a/bin/nodejs0.12.16/node_modules/npm/configure b/bin/nodejs0.12.16/node_modules/npm/configure new file mode 100644 index 00000000..32b8da57 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/configure @@ -0,0 +1,33 @@ +#!/bin/bash + +# set configurations that will be "sticky" on this system, +# surviving npm self-updates. + +CONFIGS=() +i=0 + +# get the location of this file. +unset CDPATH +CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc + +while [ $# -gt 0 ]; do + conf="$1" + case $conf in + --help) + echo "./configure --param=value ..." + exit 0 + ;; + --*) + CONFIGS[$i]="${conf:2}" + ;; + *) + CONFIGS[$i]="$conf" + ;; + esac + let i++ + shift +done + +for c in "${CONFIGS[@]}"; do + echo "$c" >> "$CONFFILE" +done diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-bin.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-bin.md new file mode 100644 index 00000000..690f2c0c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-bin.md @@ -0,0 +1,13 @@ +npm-bin(3) -- Display npm bin folder +==================================== + +## SYNOPSIS + + npm.commands.bin(args, cb) + +## DESCRIPTION + +Print the folder where npm will install executables. + +This function should not be used programmatically. Instead, just refer +to the `npm.bin` property. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-bugs.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-bugs.md new file mode 100644 index 00000000..f911202c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-bugs.md @@ -0,0 +1,19 @@ +npm-bugs(3) -- Bugs for a package in a web browser maybe +======================================================== + +## SYNOPSIS + + npm.commands.bugs(package, callback) + +## DESCRIPTION + +This command tries to guess at the likely location of a package's +bug tracker URL, and then tries to open it using the `--browser` +config param. + +Like other commands, the first parameter is an array. This command only +uses the first element, which is expected to be a package name with an +optional version number. + +This command will launch a browser, so this command may not be the most +friendly for programmatic use. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-cache.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-cache.md new file mode 100644 index 00000000..027fb4ce --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-cache.md @@ -0,0 +1,30 @@ +npm-cache(3) -- manage the npm cache programmatically +===================================================== + +## SYNOPSIS + + npm.commands.cache([args], callback) + + // helpers + npm.commands.cache.clean([args], callback) + npm.commands.cache.add([args], callback) + npm.commands.cache.read(name, version, forceBypass, callback) + +## DESCRIPTION + +This acts much the same ways as the npm-cache(1) command line +functionality. + +The callback is called with the package.json data of the thing that is +eventually added to or read from the cache. + +The top level `npm.commands.cache(...)` functionality is a public +interface, and like all commands on the `npm.commands` object, it will +match the command line behavior exactly. + +However, the cache folder structure and the cache helper functions are +considered **internal** API surface, and as such, may change in future +releases of npm, potentially without warning or significant version +incrementation. + +Use at your own risk. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-commands.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-commands.md new file mode 100644 index 00000000..42f2d90b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-commands.md @@ -0,0 +1,22 @@ +npm-commands(3) -- npm commands +=============================== + +## SYNOPSIS + + npm.commands[<command>](args, callback) + +## DESCRIPTION + +npm comes with a full set of commands, and each of the commands takes a +similar set of arguments. + +In general, all commands on the command object take an **array** of positional +argument **strings**. The last argument to any function is a callback. Some +commands are special and take other optional arguments. + +All commands have their own man page. See `man npm-<command>` for command-line +usage, or `man 3 npm-<command>` for programmatic usage. + +## SEE ALSO + +* npm-index(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-config.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-config.md new file mode 100644 index 00000000..df4fc4ed --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-config.md @@ -0,0 +1,45 @@ +npm-config(3) -- Manage the npm configuration files +=================================================== + +## SYNOPSIS + + npm.commands.config(args, callback) + var val = npm.config.get(key) + npm.config.set(key, val) + +## DESCRIPTION + +This function acts much the same way as the command-line version. The first +element in the array tells config what to do. Possible values are: + +* `set` + + Sets a config parameter. The second element in `args` is interpreted as the + key, and the third element is interpreted as the value. + +* `get` + + Gets the value of a config parameter. The second element in `args` is the + key to get the value of. + +* `delete` (`rm` or `del`) + + Deletes a parameter from the config. The second element in `args` is the + key to delete. + +* `list` (`ls`) + + Show all configs that aren't secret. No parameters necessary. + +* `edit`: + + Opens the config file in the default editor. This command isn't very useful + programmatically, but it is made available. + +To programmatically access npm configuration settings, or set them for +the duration of a program, use the `npm.config.set` and `npm.config.get` +functions instead. + +## SEE ALSO + +* npm(3) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-deprecate.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-deprecate.md new file mode 100644 index 00000000..61d1abd4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-deprecate.md @@ -0,0 +1,34 @@ +npm-deprecate(3) -- Deprecate a version of a package +==================================================== + +## SYNOPSIS + + npm.commands.deprecate(args, callback) + +## DESCRIPTION + +This command will update the npm registry entry for a package, providing +a deprecation warning to all who attempt to install it. + +The 'args' parameter must have exactly two elements: + +* `package[@version]` + + The `version` portion is optional, and may be either a range, or a + specific version, or a tag. + +* `message` + + The warning message that will be printed whenever a user attempts to + install the package. + +Note that you must be the package owner to deprecate something. See the +`owner` and `adduser` help topics. + +To un-deprecate a package, specify an empty string (`""`) for the `message` argument. + +## SEE ALSO + +* npm-publish(3) +* npm-unpublish(3) +* npm-registry(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-docs.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-docs.md new file mode 100644 index 00000000..4533d459 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-docs.md @@ -0,0 +1,19 @@ +npm-docs(3) -- Docs for a package in a web browser maybe +======================================================== + +## SYNOPSIS + + npm.commands.docs(package, callback) + +## DESCRIPTION + +This command tries to guess at the likely location of a package's +documentation URL, and then tries to open it using the `--browser` +config param. + +Like other commands, the first parameter is an array. This command only +uses the first element, which is expected to be a package name with an +optional version number. + +This command will launch a browser, so this command may not be the most +friendly for programmatic use. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-edit.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-edit.md new file mode 100644 index 00000000..87fb3ded --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-edit.md @@ -0,0 +1,24 @@ +npm-edit(3) -- Edit an installed package +======================================== + +## SYNOPSIS + + npm.commands.edit(package, callback) + +## DESCRIPTION + +Opens the package folder in the default editor (or whatever you've +configured as the npm `editor` config -- see `npm help config`.) + +After it has been edited, the package is rebuilt so as to pick up any +changes in compiled packages. + +For instance, you can do `npm install connect` to install connect +into your package, and then `npm.commands.edit(["connect"], callback)` +to make a few changes to your locally installed copy. + +The first parameter is a string array with a single element, the package +to open. The package can optionally have a version number attached. + +Since this command opens an editor in a new process, be careful about where +and how this is used. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-explore.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-explore.md new file mode 100644 index 00000000..4cc8daff --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-explore.md @@ -0,0 +1,18 @@ +npm-explore(3) -- Browse an installed package +============================================= + +## SYNOPSIS + + npm.commands.explore(args, callback) + +## DESCRIPTION + +Spawn a subshell in the directory of the installed package specified. + +If a command is specified, then it is run in the subshell, which then +immediately terminates. + +Note that the package is *not* automatically rebuilt afterwards, so be +sure to use `npm rebuild <pkg>` if you make any changes. + +The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-help-search.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-help-search.md new file mode 100644 index 00000000..b727745e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-help-search.md @@ -0,0 +1,30 @@ +npm-help-search(3) -- Search the help pages +=========================================== + +## SYNOPSIS + + npm.commands.helpSearch(args, [silent,] callback) + +## DESCRIPTION + +This command is rarely useful, but it exists in the rare case that it is. + +This command takes an array of search terms and returns the help pages that +match in order of best match. + +If there is only one match, then npm displays that help section. If there +are multiple results, the results are printed to the screen formatted and the +array of results is returned. Each result is an object with these properties: + +* hits: + A map of args to number of hits on that arg. For example, {"npm": 3} +* found: + Total number of unique args that matched. +* totalHits: + Total number of hits. +* lines: + An array of all matching lines (and some adjacent lines). +* file: + Name of the file that matched + +The silent parameter is not necessary not used, but it may in the future. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-init.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-init.md new file mode 100644 index 00000000..a656a23b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-init.md @@ -0,0 +1,29 @@ +npm init(3) -- Interactively create a package.json file +======================================================= + +## SYNOPSIS + + npm.commands.init(args, callback) + +## DESCRIPTION + +This will ask you a bunch of questions, and then write a package.json for you. + +It attempts to make reasonable guesses about what you want things to be set to, +and then writes a package.json file with the options you've selected. + +If you already have a package.json file, it'll read that first, and default to +the options in there. + +It is strictly additive, so it does not delete options from your package.json +without a really good reason to do so. + +Since this function expects to be run on the command-line, it doesn't work very +well as a programmatically. The best option is to roll your own, and since +JavaScript makes it stupid simple to output formatted JSON, that is the +preferred method. If you're sure you want to handle command-line prompting, +then go ahead and use this programmatically. + +## SEE ALSO + +package.json(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-install.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-install.md new file mode 100644 index 00000000..f36e1507 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-install.md @@ -0,0 +1,19 @@ +npm-install(3) -- install a package programmatically +==================================================== + +## SYNOPSIS + + npm.commands.install([where,] packages, callback) + +## DESCRIPTION + +This acts much the same ways as installing on the command-line. + +The 'where' parameter is optional and only used internally, and it specifies +where the packages should be installed to. + +The 'packages' parameter is an array of strings. Each element in the array is +the name of a package to be installed. + +Finally, 'callback' is a function that will be called when all packages have been +installed or when an error has been encountered. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-link.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-link.md new file mode 100644 index 00000000..99ebdb5b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-link.md @@ -0,0 +1,33 @@ +npm-link(3) -- Symlink a package folder +======================================= + +## SYNOPSIS + + npm.commands.link(callback) + npm.commands.link(packages, callback) + +## DESCRIPTION + +Package linking is a two-step process. + +Without parameters, link will create a globally-installed +symbolic link from `prefix/package-name` to the current folder. + +With a parameters, link will create a symlink from the local `node_modules` +folder to the global symlink. + +When creating tarballs for `npm publish`, the linked packages are +"snapshotted" to their current state by resolving the symbolic links. + +This is +handy for installing your own stuff, so that you can work on it and test it +iteratively without having to continually rebuild. + +For example: + + npm.commands.link(cb) # creates global link from the cwd + # (say redis package) + npm.commands.link('redis', cb) # link-install the package + +Now, any changes to the redis package will be reflected in +the package in the current working directory diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-load.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-load.md new file mode 100644 index 00000000..31bfef7d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-load.md @@ -0,0 +1,26 @@ +npm-load(3) -- Load config settings +=================================== + +## SYNOPSIS + + npm.load(conf, cb) + +## DESCRIPTION + +npm.load() must be called before any other function call. Both parameters are +optional, but the second is recommended. + +The first parameter is an object containing command-line config params, and the +second parameter is a callback that will be called when npm is loaded and ready +to serve. + +The first parameter should follow a similar structure as the package.json +config object. + +For example, to emulate the --dev flag, pass an object that looks like this: + + { + "dev": true + } + +For a list of all the available command-line configs, see `npm help config` diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-ls.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-ls.md new file mode 100644 index 00000000..ac42fa0f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-ls.md @@ -0,0 +1,56 @@ +npm-ls(3) -- List installed packages +====================================== + +## SYNOPSIS + + npm.commands.ls(args, [silent,] callback) + +## DESCRIPTION + +This command will print to stdout all the versions of packages that are +installed, as well as their dependencies, in a tree-structure. It will also +return that data using the callback. + +This command does not take any arguments, but args must be defined. +Beyond that, if any arguments are passed in, npm will politely warn that it +does not take positional arguments, though you may set config flags +like with any other command, such as `global` to list global packages. + +It will print out extraneous, missing, and invalid packages. + +If the silent parameter is set to true, nothing will be output to the screen, +but the data will still be returned. + +Callback is provided an error if one occurred, the full data about which +packages are installed and which dependencies they will receive, and a +"lite" data object which just shows which versions are installed where. +Note that the full data object is a circular structure, so care must be +taken if it is serialized to JSON. + +## CONFIGURATION + +### long + +* Default: false +* Type: Boolean + +Show extended information. + +### parseable + +* Default: false +* Type: Boolean + +Show parseable output instead of tree view. + +### global + +* Default: false +* Type: Boolean + +List packages in the global install prefix instead of in the current +project. + +Note, if parseable is set or long isn't set, then duplicates will be trimmed. +This means that if a submodule has the same dependency as a parent module, then the +dependency will only be output once. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-outdated.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-outdated.md new file mode 100644 index 00000000..a6c17b97 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-outdated.md @@ -0,0 +1,13 @@ +npm-outdated(3) -- Check for outdated packages +============================================== + +## SYNOPSIS + + npm.commands.outdated([packages,] callback) + +## DESCRIPTION + +This command will check the registry to see if the specified packages are +currently outdated. + +If the 'packages' parameter is left out, npm will check all packages. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-owner.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-owner.md new file mode 100644 index 00000000..a2d22429 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-owner.md @@ -0,0 +1,31 @@ +npm-owner(3) -- Manage package owners +===================================== + +## SYNOPSIS + + npm.commands.owner(args, callback) + +## DESCRIPTION + +The first element of the 'args' parameter defines what to do, and the subsequent +elements depend on the action. Possible values for the action are (order of +parameters are given in parenthesis): + +* ls (package): + List all the users who have access to modify a package and push new versions. + Handy when you need to know who to bug for help. +* add (user, package): + Add a new user as a maintainer of a package. This user is enabled to modify + metadata, publish new versions, and add other owners. +* rm (user, package): + Remove a user from the package owner list. This immediately revokes their + privileges. + +Note that there is only one level of access. Either you can modify a package, +or you can't. Future versions may contain more fine-grained access levels, but +that is not implemented at this time. + +## SEE ALSO + +* npm-publish(3) +* npm-registry(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-pack.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-pack.md new file mode 100644 index 00000000..247beb73 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-pack.md @@ -0,0 +1,19 @@ +npm-pack(3) -- Create a tarball from a package +============================================== + +## SYNOPSIS + + npm.commands.pack([packages,] callback) + +## DESCRIPTION + +For anything that's installable (that is, a package folder, tarball, +tarball url, name@tag, name@version, or name), this command will fetch +it to the cache, and then copy the tarball to the current working +directory as `<name>-<version>.tgz`, and then write the filenames out to +stdout. + +If the same package is specified multiple times, then the file will be +overwritten the second time. + +If no arguments are supplied, then npm packs the current package folder. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-ping.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-ping.md new file mode 100644 index 00000000..6167a1ea --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-ping.md @@ -0,0 +1,14 @@ +npm-ping(3) -- Ping npm registry +================================ + +## SYNOPSIS + + npm.registry.ping(registry, options, function (er, pong)) + +## DESCRIPTION + +Attempts to connect to the given registry, returning a `pong` +object with various metadata if it succeeds. + +This function is primarily useful for debugging connection issues +to npm registries. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-prefix.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-prefix.md new file mode 100644 index 00000000..8453185a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-prefix.md @@ -0,0 +1,15 @@ +npm-prefix(3) -- Display prefix +=============================== + +## SYNOPSIS + + npm.commands.prefix(args, callback) + +## DESCRIPTION + +Print the prefix to standard out. + +'args' is never used and callback is never called with data. +'args' must be present or things will break. + +This function is not useful programmatically diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-prune.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-prune.md new file mode 100644 index 00000000..c824dfa6 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-prune.md @@ -0,0 +1,17 @@ +npm-prune(3) -- Remove extraneous packages +========================================== + +## SYNOPSIS + + npm.commands.prune([packages,] callback) + +## DESCRIPTION + +This command removes "extraneous" packages. + +The first parameter is optional, and it specifies packages to be removed. + +No packages are specified, then all packages will be checked. + +Extraneous packages are packages that are not listed on the parent +package's dependencies list. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-publish.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-publish.md new file mode 100644 index 00000000..6c510786 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-publish.md @@ -0,0 +1,30 @@ +npm-publish(3) -- Publish a package +=================================== + +## SYNOPSIS + + npm.commands.publish([packages,] callback) + +## DESCRIPTION + +Publishes a package to the registry so that it can be installed by name. +Possible values in the 'packages' array are: + +* `<folder>`: + A folder containing a package.json file + +* `<tarball>`: + A url or file path to a gzipped tar archive containing a single folder + with a package.json file inside. + +If the package array is empty, npm will try to publish something in the +current working directory. + +This command could fails if one of the packages specified already exists in +the registry. Overwrites when the "force" environment variable is set. + +## SEE ALSO + +* npm-registry(7) +* npm-adduser(1) +* npm-owner(3) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-rebuild.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-rebuild.md new file mode 100644 index 00000000..fab790dd --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-rebuild.md @@ -0,0 +1,16 @@ +npm-rebuild(3) -- Rebuild a package +=================================== + +## SYNOPSIS + + npm.commands.rebuild([packages,] callback) + +## DESCRIPTION + +This command runs the `npm build` command on each of the matched packages. This is useful +when you install a new version of node, and must recompile all your C++ addons with +the new binary. If no 'packages' parameter is specify, every package will be rebuilt. + +## CONFIGURATION + +See `npm help build` diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-repo.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-repo.md new file mode 100644 index 00000000..5128be62 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-repo.md @@ -0,0 +1,19 @@ +npm-repo(3) -- Open package repository page in the browser +======================================================== + +## SYNOPSIS + + npm.commands.repo(package, callback) + +## DESCRIPTION + +This command tries to guess at the likely location of a package's +repository URL, and then tries to open it using the `--browser` +config param. + +Like other commands, the first parameter is an array. This command only +uses the first element, which is expected to be a package name with an +optional version number. + +This command will launch a browser, so this command may not be the most +friendly for programmatic use. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-restart.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-restart.md new file mode 100644 index 00000000..ebb59c25 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-restart.md @@ -0,0 +1,41 @@ +npm-restart(3) -- Restart a package +=================================== + +## SYNOPSIS + + npm.commands.restart(packages, callback) + +## DESCRIPTION + +This restarts a package (or multiple packages). + +This runs a package's "stop", "restart", and "start" scripts, and associated +pre- and post- scripts, in the order given below: + +1. prerestart +2. prestop +3. stop +4. poststop +5. restart +6. prestart +7. start +8. poststart +9. postrestart + +If no version is specified, then it restarts the "active" version. + +npm can restart multiple packages. Just specify multiple packages in +the `packages` parameter. + +## NOTE + +Note that the "restart" script is run **in addition to** the "stop" +and "start" scripts, not instead of them. + +This is the behavior as of `npm` major version 2. A change in this +behavior will be accompanied by an increase in major version number + +## SEE ALSO + +* npm-start(3) +* npm-stop(3) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-root.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-root.md new file mode 100644 index 00000000..8afb8224 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-root.md @@ -0,0 +1,15 @@ +npm-root(3) -- Display npm root +=============================== + +## SYNOPSIS + + npm.commands.root(args, callback) + +## DESCRIPTION + +Print the effective `node_modules` folder to standard out. + +'args' is never used and callback is never called with data. +'args' must be present or things will break. + +This function is not useful programmatically. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-run-script.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-run-script.md new file mode 100644 index 00000000..c1b2c5a8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-run-script.md @@ -0,0 +1,27 @@ +npm-run-script(3) -- Run arbitrary package scripts +================================================== + +## SYNOPSIS + + npm.commands.run-script(args, callback) + +## DESCRIPTION + +This runs an arbitrary command from a package's "scripts" object. + +It is used by the test, start, restart, and stop commands, but can be +called directly, as well. + +The 'args' parameter is an array of strings. Behavior depends on the number +of elements. If there is only one element, npm assumes that the element +represents a command to be run on the local repository. If there is more than +one element, then the first is assumed to be the package and the second is +assumed to be the command to run. All other elements are ignored. + +## SEE ALSO + +* npm-scripts(7) +* npm-test(3) +* npm-start(3) +* npm-restart(3) +* npm-stop(3) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-search.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-search.md new file mode 100644 index 00000000..ca5a3706 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-search.md @@ -0,0 +1,35 @@ +npm-search(3) -- Search for packages +==================================== + +## SYNOPSIS + + npm.commands.search(searchTerms, [silent,] [staleness,] callback) + +## DESCRIPTION + +Search the registry for packages matching the search terms. The available parameters are: + +* searchTerms: + Array of search terms. These terms are case-insensitive. +* silent: + If true, npm will not log anything to the console. +* staleness: + This is the threshold for stale packages. "Fresh" packages are not refreshed + from the registry. This value is measured in seconds. +* callback: + Returns an object where each key is the name of a package, and the value + is information about that package along with a 'words' property, which is + a space-delimited string of all of the interesting words in that package. + The only properties included are those that are searched, which generally include: + + * name + * description + * maintainers + * url + * keywords + +A search on the registry excludes any result that does not match all of the +search terms. It also removes any items from the results that contain an +excluded term (the "searchexclude" config). The search is case insensitive +and doesn't try to read your mind (it doesn't do any verb tense matching or the +like). diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-shrinkwrap.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-shrinkwrap.md new file mode 100644 index 00000000..26bfeb06 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-shrinkwrap.md @@ -0,0 +1,20 @@ +npm-shrinkwrap(3) -- programmatically generate package shrinkwrap file +==================================================== + +## SYNOPSIS + + npm.commands.shrinkwrap(args, [silent,] callback) + +## DESCRIPTION + +This acts much the same ways as shrinkwrapping on the command-line. + +This command does not take any arguments, but 'args' must be defined. +Beyond that, if any arguments are passed in, npm will politely warn that it +does not take positional arguments. + +If the 'silent' parameter is set to true, nothing will be output to the screen, +but the shrinkwrap file will still be written. + +Finally, 'callback' is a function that will be called when the shrinkwrap has +been saved. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-start.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-start.md new file mode 100644 index 00000000..7df86fd8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-start.md @@ -0,0 +1,13 @@ +npm-start(3) -- Start a package +=============================== + +## SYNOPSIS + + npm.commands.start(packages, callback) + +## DESCRIPTION + +This runs a package's "start" script, if one was provided. + +npm can start multiple packages. Just specify multiple packages in the +`packages` parameter. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-stop.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-stop.md new file mode 100644 index 00000000..3e116ac0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-stop.md @@ -0,0 +1,13 @@ +npm-stop(3) -- Stop a package +============================= + +## SYNOPSIS + + npm.commands.stop(packages, callback) + +## DESCRIPTION + +This runs a package's "stop" script, if one was provided. + +npm can run stop on multiple packages. Just specify multiple packages +in the `packages` parameter. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-tag.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-tag.md new file mode 100644 index 00000000..ee9ec432 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-tag.md @@ -0,0 +1,23 @@ +npm-tag(3) -- Tag a published version +===================================== + +## SYNOPSIS + + npm.commands.tag(package@version, tag, callback) + +## DESCRIPTION + +Tags the specified version of the package with the specified tag, or the +`--tag` config if not specified. + +The 'package@version' is an array of strings, but only the first two elements are +currently used. + +The first element must be in the form package@version, where package +is the package name and version is the version number (much like installing a +specific version). + +The second element is the name of the tag to tag this version with. If this +parameter is missing or falsey (empty), the default from the config will be +used. For more information about how to set this config, check +`man 3 npm-config` for programmatic usage or `man npm-config` for cli usage. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-test.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-test.md new file mode 100644 index 00000000..6e86cd7f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-test.md @@ -0,0 +1,16 @@ +npm-test(3) -- Test a package +============================= + +## SYNOPSIS + + npm.commands.test(packages, callback) + +## DESCRIPTION + +This runs a package's "test" script, if one was provided. + +To run tests as a condition of installation, set the `npat` config to +true. + +npm can run tests on multiple packages. Just specify multiple packages +in the `packages` parameter. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-uninstall.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-uninstall.md new file mode 100644 index 00000000..8b8db7b6 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-uninstall.md @@ -0,0 +1,16 @@ +npm-uninstall(3) -- uninstall a package programmatically +======================================================== + +## SYNOPSIS + + npm.commands.uninstall(packages, callback) + +## DESCRIPTION + +This acts much the same ways as uninstalling on the command-line. + +The 'packages' parameter is an array of strings. Each element in the array is +the name of a package to be uninstalled. + +Finally, 'callback' is a function that will be called when all packages have been +uninstalled or when an error has been encountered. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-unpublish.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-unpublish.md new file mode 100644 index 00000000..d0cf8628 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-unpublish.md @@ -0,0 +1,20 @@ +npm-unpublish(3) -- Remove a package from the registry +====================================================== + +## SYNOPSIS + + npm.commands.unpublish(package, callback) + +## DESCRIPTION + +This removes a package version from the registry, deleting its +entry and removing the tarball. + +The package parameter must be defined. + +Only the first element in the package parameter is used. If there is no first +element, then npm assumes that the package at the current working directory +is what is meant. + +If no version is specified, or if all versions are removed then +the root package entry is removed from the registry entirely. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-update.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-update.md new file mode 100644 index 00000000..f33d55fd --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-update.md @@ -0,0 +1,18 @@ +npm-update(3) -- Update a package +================================= + +## SYNOPSIS + + npm.commands.update(packages, callback) + +# DESCRIPTION + +Updates a package, upgrading it to the latest version. It also installs any +missing packages. + +The `packages` argument is an array of packages to update. The `callback` +parameter will be called when done or when an error occurs. + +## SEE ALSO + +* npm-update(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-version.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-version.md new file mode 100644 index 00000000..e3d4f4ed --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-version.md @@ -0,0 +1,18 @@ +npm-version(3) -- Bump a package version +======================================== + +## SYNOPSIS + + npm.commands.version(newversion, callback) + +## DESCRIPTION + +Run this in a package directory to bump the version and write the new +data back to the package.json file. + +If run in a git repo, it will also create a version commit and tag, and +fail if the repo is not clean. + +Like all other commands, this function takes a string array as its first +parameter. The difference, however, is this function will fail if it does +not have exactly one element. The only element should be a version number. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-view.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-view.md new file mode 100644 index 00000000..e732f614 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-view.md @@ -0,0 +1,93 @@ +npm-view(3) -- View registry info +================================= + +## SYNOPSIS + + npm.commands.view(args, [silent,] callback) + +## DESCRIPTION + +This command shows data about a package and prints it to the stream +referenced by the `outfd` config, which defaults to stdout. + +The "args" parameter is an ordered list that closely resembles the command-line +usage. The elements should be ordered such that the first element is +the package and version (package@version). The version is optional. After that, +the rest of the parameters are fields with optional subfields ("field.subfield") +which can be used to get only the information desired from the registry. + +The callback will be passed all of the data returned by the query. + +For example, to get the package registry entry for the `connect` package, +you can do this: + + npm.commands.view(["connect"], callback) + +If no version is specified, "latest" is assumed. + +Field names can be specified after the package descriptor. +For example, to show the dependencies of the `ronn` package at version +0.3.5, you could do the following: + + npm.commands.view(["ronn@0.3.5", "dependencies"], callback) + +You can view child field by separating them with a period. +To view the git repository URL for the latest version of npm, you could +do this: + + npm.commands.view(["npm", "repository.url"], callback) + +For fields that are arrays, requesting a non-numeric field will return +all of the values from the objects in the list. For example, to get all +the contributor names for the "express" project, you can do this: + + npm.commands.view(["express", "contributors.email"], callback) + +You may also use numeric indices in square braces to specifically select +an item in an array field. To just get the email address of the first +contributor in the list, you can do this: + + npm.commands.view(["express", "contributors[0].email"], callback) + +Multiple fields may be specified, and will be printed one after another. +For exampls, to get all the contributor names and email addresses, you +can do this: + + npm.commands.view(["express", "contributors.name", "contributors.email"], callback) + +"Person" fields are shown as a string if they would be shown as an +object. So, for example, this will show the list of npm contributors in +the shortened string format. (See `npm help json` for more on this.) + + npm.commands.view(["npm", "contributors"], callback) + +If a version range is provided, then data will be printed for every +matching version of the package. This will show which version of jsdom +was required by each matching version of yui3: + + npm.commands.view(["yui3@>0.5.4", "dependencies.jsdom"], callback) + +## OUTPUT + +If only a single string field for a single version is output, then it +will not be colorized or quoted, so as to enable piping the output to +another command. + +If the version range matches multiple versions, than each printed value +will be prefixed with the version it applies to. + +If multiple fields are requested, than each of them are prefixed with +the field name. + +Console output can be disabled by setting the 'silent' parameter to true. + +## RETURN VALUE + +The data returned will be an object in this formation: + + { <version>: + { <field>: <value> + , ... } + , ... } + +corresponding to the list of fields selected. diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-whoami.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-whoami.md new file mode 100644 index 00000000..7fd084b3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm-whoami.md @@ -0,0 +1,15 @@ +npm-whoami(3) -- Display npm username +===================================== + +## SYNOPSIS + + npm.commands.whoami(args, callback) + +## DESCRIPTION + +Print the `username` config to standard output. + +'args' is never used and callback is never called with data. +'args' must be present or things will break. + +This function is not useful programmatically diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/api/npm.md b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm.md new file mode 100644 index 00000000..cabc718b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/api/npm.md @@ -0,0 +1,115 @@ +npm(3) -- javascript package manager +==================================== + +## SYNOPSIS + + var npm = require("npm") + npm.load([configObject, ]function (er, npm) { + // use the npm object, now that it's loaded. + + npm.config.set(key, val) + val = npm.config.get(key) + + console.log("prefix = %s", npm.prefix) + + npm.commands.install(["package"], cb) + }) + +## VERSION + +@VERSION@ + +## DESCRIPTION + +This is the API documentation for npm. +To find documentation of the command line +client, see `npm(1)`. + +Prior to using npm's commands, `npm.load()` must be called. If you provide +`configObject` as an object map of top-level configs, they override the values +stored in the various config locations. In the npm command line client, this +set of configs is parsed from the command line options. Additional +configuration params are loaded from two configuration files. See +`npm-config(1)`, `npm-config(7)`, and `npmrc(5)` for more information. + +After that, each of the functions are accessible in the +commands object: `npm.commands.<cmd>`. See `npm-index(7)` for a list of +all possible commands. + +All commands on the command object take an **array** of positional argument +**strings**. The last argument to any function is a callback. Some +commands take other optional arguments. + +Configs cannot currently be set on a per function basis, as each call to +npm.config.set will change the value for *all* npm commands in that process. + +To find API documentation for a specific command, run the `npm apihelp` +command. + +## METHODS AND PROPERTIES + +* `npm.load(configs, cb)` + + Load the configuration params, and call the `cb` function once the + globalconfig and userconfig files have been loaded as well, or on + nextTick if they've already been loaded. + +* `npm.config` + + An object for accessing npm configuration parameters. + + * `npm.config.get(key)` + * `npm.config.set(key, val)` + * `npm.config.del(key)` + +* `npm.dir` or `npm.root` + + The `node_modules` directory where npm will operate. + +* `npm.prefix` + + The prefix where npm is operating. (Most often the current working + directory.) + +* `npm.cache` + + The place where npm keeps JSON and tarballs it fetches from the + registry (or uploads to the registry). + +* `npm.tmp` + + npm's temporary working directory. + +* `npm.deref` + + Get the "real" name for a command that has either an alias or + abbreviation. + +## MAGIC + +For each of the methods in the `npm.commands` object, a method is added to the +npm object, which takes a set of positional string arguments rather than an +array and a callback. + +If the last argument is a callback, then it will use the supplied +callback. However, if no callback is provided, then it will print out +the error or results. + +For example, this would work in a node repl: + + > npm = require("npm") + > npm.load() // wait a sec... + > npm.install("dnode", "express") + +Note that that *won't* work in a node program, since the `install` +method will get called before the configuration load is completed. + +## ABBREVS + +In order to support `npm ins foo` instead of `npm install foo`, the +`npm.commands` object has a set of abbreviations as well as the full +method names. Use the `npm.deref` method to find the real name. + +For example: + + var cmd = npm.deref("unp") // cmd === "unpublish" diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-access.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-access.md new file mode 100644 index 00000000..62d18338 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-access.md @@ -0,0 +1,74 @@ +npm-access(1) -- Set access level on published packages +======================================================= + +## SYNOPSIS + + npm access public [<package>] + npm access restricted [<package>] + + npm access grant <read-only|read-write> <scope:team> [<package>] + npm access revoke <scope:team> [<package>] + + npm access ls-packages [<user>|<scope>|<scope:team>] + npm access ls-collaborators [<package> [<user>]] + npm access edit [<package>] + +## DESCRIPTION + +Used to set access controls on private packages. + +For all of the subcommands, `npm access` will perform actions on the packages +in the current working directory if no package name is passed to the +subcommand. + +* public / restricted: + Set a package to be either publicly accessible or restricted. + +* grant / revoke: + Add or remove the ability of users and teams to have read-only or read-write + access to a package. + +* ls-packages: + + Show all of the packages a user or a team is able to access, along with the + access level, except for read-only public packages (it won't print the whole + registry listing) + +* ls-collaborators: + Show all of the access privileges for a package. Will only show permissions + for packages to which you have at least read access. If `<user>` is passed in, + the list is filtered only to teams _that_ user happens to belong to. + +* edit: + Set the access privileges for a package at once using `$EDITOR`. + +## DETAILS + +`npm access` always operates directly on the current registry, configurable +from the command line using `--registry=<registry url>`. + +Unscoped packages are *always public*. + +Scoped packages *default to restricted*, but you can either publish them as +public using `npm publish --access=public`, or set their access as public using +`npm access public` after the initial publish. + +You must have privileges to set the access of a package: + +* You are an owner of an unscoped or scoped package. +* You are a member of the team that owns a scope. +* You have been given read-write privileges for a package, either as a member + of a team or directly as an owner. + +If your account is not paid, then attempts to publish scoped packages will fail +with an HTTP 402 status code (logically enough), unless you use +`--access=public`. + +Management of teams and team memberships is done with the `npm team` command. + +## SEE ALSO + +* npm-team(1) +* npm-publish(1) +* npm-config(7) +* npm-registry(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-adduser.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-adduser.md new file mode 100644 index 00000000..9db0cdf0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-adduser.md @@ -0,0 +1,75 @@ +npm-adduser(1) -- Add a registry user account +============================================= + +## SYNOPSIS + + npm adduser [--registry=url] [--scope=@orgname] [--always-auth] + + aliases: login, add-user + +## DESCRIPTION + +Create or verify a user named `<username>` in the specified registry, and +save the credentials to the `.npmrc` file. If no registry is specified, +the default registry will be used (see `npm-config(7)`). + +The username, password, and email are read in from prompts. + +To reset your password, go to <https://www.npmjs.com/forgot> + +To change your email address, go to <https://www.npmjs.com/email-edit> + +You may use this command multiple times with the same user account to +authorize on a new machine. When authenticating on a new machine, +the username, password and email address must all match with +your existing record. + +`npm login` is an alias to `adduser` and behaves exactly the same way. + +## CONFIGURATION + +### registry + +Default: https://registry.npmjs.org/ + +The base URL of the npm package registry. If `scope` is also specified, +this registry will only be used for packages with that scope. See `npm-scope(7)`. + +### scope + +Default: none + +If specified, the user and login credentials given will be associated +with the specified scope. See `npm-scope(7)`. You can use both at the same time, +e.g. + + npm adduser --registry=http://myregistry.example.com --scope=@myco + +This will set a registry for the given scope and login or create a user for +that registry at the same time. + +### always-auth + +Default: false + +If specified, save configuration indicating that all requests to the given +registry should include authorization information. Useful for private +registries. Can be used with `--registry` and / or `--scope`, e.g. + + npm adduser --registry=http://private-registry.example.com --always-auth + +This will ensure that all requests to that registry (including for tarballs) +include an authorization header. This setting may be necessary for use with +private registries where metadata and package tarballs are stored on hosts with +different hostnames. See `always-auth` in `npm-config(7)` for more details on +always-auth. Registry-specific configuration of `always-auth` takes precedence +over any global configuration. + +## SEE ALSO + +* npm-registry(7) +* npm-config(1) +* npm-config(7) +* npmrc(5) +* npm-owner(1) +* npm-whoami(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-bin.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-bin.md new file mode 100644 index 00000000..e582be39 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-bin.md @@ -0,0 +1,19 @@ +npm-bin(1) -- Display npm bin folder +==================================== + +## SYNOPSIS + + npm bin + +## DESCRIPTION + +Print the folder where npm will install executables. + +## SEE ALSO + +* npm-prefix(1) +* npm-root(1) +* npm-folders(5) +* npm-config(1) +* npm-config(7) +* npmrc(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-bugs.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-bugs.md new file mode 100644 index 00000000..d41e36fc --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-bugs.md @@ -0,0 +1,44 @@ +npm-bugs(1) -- Bugs for a package in a web browser maybe +======================================================== + +## SYNOPSIS + + npm bugs <pkgname> + npm bugs (with no args in a package dir) + + aliases: issues + +## DESCRIPTION + +This command tries to guess at the likely location of a package's +bug tracker URL, and then tries to open it using the `--browser` +config param. If no package name is provided, it will search for +a `package.json` in the current folder and use the `name` property. + +## CONFIGURATION + +### browser + +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` +* Type: String + +The browser that is called by the `npm bugs` command to open websites. + +### registry + +* Default: https://registry.npmjs.org/ +* Type: url + +The base URL of the npm package registry. + + +## SEE ALSO + +* npm-docs(1) +* npm-view(1) +* npm-publish(1) +* npm-registry(7) +* npm-config(1) +* npm-config(7) +* npmrc(5) +* package.json(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-build.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-build.md new file mode 100644 index 00000000..6dd6a248 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-build.md @@ -0,0 +1,25 @@ +npm-build(1) -- Build a package +=============================== + +## SYNOPSIS + + npm build <package-folder> + +* `<package-folder>`: + A folder containing a `package.json` file in its root. + +## DESCRIPTION + +This is the plumbing command called by `npm link` and `npm install`. + +It should generally be called during installation, but if you need to run it +directly, run: + + npm run-script build + +## SEE ALSO + +* npm-install(1) +* npm-link(1) +* npm-scripts(7) +* package.json(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-bundle.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-bundle.md new file mode 100644 index 00000000..b65f526f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-bundle.md @@ -0,0 +1,14 @@ +npm-bundle(1) -- REMOVED +======================== + +## DESCRIPTION + +The `npm bundle` command has been removed in 1.0, for the simple reason +that it is no longer necessary, as the default behavior is now to +install packages into the local space. + +Just use `npm install` now to do what `npm bundle` used to do. + +## SEE ALSO + +* npm-install(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-cache.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-cache.md new file mode 100644 index 00000000..13081976 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-cache.md @@ -0,0 +1,70 @@ +npm-cache(1) -- Manipulates packages cache +========================================== + +## SYNOPSIS + + npm cache add <tarball file> + npm cache add <folder> + npm cache add <tarball url> + npm cache add <name>@<version> + + npm cache ls [<path>] + + npm cache clean [<path>] + +## DESCRIPTION + +Used to add, list, or clear the npm cache folder. + +* add: + Add the specified package to the local cache. This command is primarily + intended to be used internally by npm, but it can provide a way to + add data to the local installation cache explicitly. + +* ls: + Show the data in the cache. Argument is a path to show in the cache + folder. Works a bit like the `find` program, but limited by the + `depth` config. + +* clean: + Delete data out of the cache folder. If an argument is provided, then + it specifies a subpath to delete. If no argument is provided, then + the entire cache is cleared. + +## DETAILS + +npm stores cache data in the directory specified in `npm config get cache`. +For each package that is added to the cache, three pieces of information are +stored in `{cache}/{name}/{version}`: + +* .../package/package.json: + The package.json file, as npm sees it. +* .../package.tgz: + The tarball for that version. + +Additionally, whenever a registry request is made, a `.cache.json` file +is placed at the corresponding URI, to store the ETag and the requested +data. This is stored in `{cache}/{hostname}/{path}/.cache.json`. + +Commands that make non-essential registry requests (such as `search` and +`view`, or the completion scripts) generally specify a minimum timeout. +If the `.cache.json` file is younger than the specified timeout, then +they do not make an HTTP request to the registry. + +## CONFIGURATION + +### cache + +Default: `~/.npm` on Posix, or `%AppData%/npm-cache` on Windows. + +The root cache folder. + +## SEE ALSO + +* npm-folders(5) +* npm-config(1) +* npm-config(7) +* npmrc(5) +* npm-install(1) +* npm-publish(1) +* npm-pack(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-completion.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-completion.md new file mode 100644 index 00000000..86de78e2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-completion.md @@ -0,0 +1,29 @@ +npm-completion(1) -- Tab Completion for npm +=========================================== + +## SYNOPSIS + + . <(npm completion) + +## DESCRIPTION + +Enables tab-completion in all npm commands. + +The synopsis above +loads the completions into your current shell. Adding it to +your ~/.bashrc or ~/.zshrc will make the completions available +everywhere. + +You may of course also pipe the output of npm completion to a file +such as `/usr/local/etc/bash_completion.d/npm` if you have a system +that will read that file for you. + +When `COMP_CWORD`, `COMP_LINE`, and `COMP_POINT` are defined in the +environment, `npm completion` acts in "plumbing mode", and outputs +completions based on the arguments. + +## SEE ALSO + +* npm-developers(7) +* npm-faq(7) +* npm(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-config.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-config.md new file mode 100644 index 00000000..07ca09a2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-config.md @@ -0,0 +1,73 @@ +npm-config(1) -- Manage the npm configuration files +=================================================== + +## SYNOPSIS + + npm config set <key> <value> [--global] + npm config get <key> + npm config delete <key> + npm config list + npm config edit + npm c [set|get|delete|list] + npm get <key> + npm set <key> <value> [--global] + + aliases: c + +## DESCRIPTION + +npm gets its config settings from the command line, environment +variables, `npmrc` files, and in some cases, the `package.json` file. + +See npmrc(5) for more information about the npmrc files. + +See `npm-config(7)` for a more thorough discussion of the mechanisms +involved. + +The `npm config` command can be used to update and edit the contents +of the user and global npmrc files. + +## Sub-commands + +Config supports the following sub-commands: + +### set + + npm config set key value + +Sets the config key to the value. + +If value is omitted, then it sets it to "true". + +### get + + npm config get key + +Echo the config value to stdout. + +### list + + npm config list + +Show all the config settings. + +### delete + + npm config delete key + +Deletes the key from all configuration files. + +### edit + + npm config edit + +Opens the config file in an editor. Use the `--global` flag to edit the +global config. + +## SEE ALSO + +* npm-folders(5) +* npm-config(7) +* package.json(5) +* npmrc(5) +* npm(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-dedupe.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-dedupe.md new file mode 100644 index 00000000..f47f4862 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-dedupe.md @@ -0,0 +1,60 @@ +npm-dedupe(1) -- Reduce duplication +=================================== + +## SYNOPSIS + + npm dedupe [package names...] + npm ddp [package names...] + + aliases: find-dupes, ddp + +## DESCRIPTION + +Searches the local package tree and attempts to simplify the overall +structure by moving dependencies further up the tree, where they can +be more effectively shared by multiple dependent packages. + +For example, consider this dependency graph: + + a + +-- b <-- depends on c@1.0.x + | `-- c@1.0.3 + `-- d <-- depends on c@~1.0.9 + `-- c@1.0.10 + +In this case, `npm-dedupe(1)` will transform the tree to: + + a + +-- b + +-- d + `-- c@1.0.10 + +Because of the hierarchical nature of node's module lookup, b and d +will both get their dependency met by the single c package at the root +level of the tree. + +If a suitable version exists at the target location in the tree +already, then it will be left untouched, but the other duplicates will +be deleted. + +If no suitable version can be found, then a warning is printed, and +nothing is done. + +If any arguments are supplied, then they are filters, and only the +named packages will be touched. + +Note that this operation transforms the dependency tree, and may +result in packages getting updated versions, perhaps from the npm +registry. + +This feature is experimental, and may change in future versions. + +The `--tag` argument will apply to all of the affected dependencies. If a +tag with the given name exists, the tagged version is preferred over newer +versions. + +## SEE ALSO + +* npm-ls(1) +* npm-update(1) +* npm-install(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-deprecate.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-deprecate.md new file mode 100644 index 00000000..fc3bbefe --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-deprecate.md @@ -0,0 +1,26 @@ +npm-deprecate(1) -- Deprecate a version of a package +==================================================== + +## SYNOPSIS + + npm deprecate <name>[@<version>] <message> + +## DESCRIPTION + +This command will update the npm registry entry for a package, providing +a deprecation warning to all who attempt to install it. + +It works on version ranges as well as specific versions, so you can do +something like this: + + npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3" + +Note that you must be the package owner to deprecate something. See the +`owner` and `adduser` help topics. + +To un-deprecate a package, specify an empty string (`""`) for the `message` argument. + +## SEE ALSO + +* npm-publish(1) +* npm-registry(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-dist-tag.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-dist-tag.md new file mode 100644 index 00000000..1197f79a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-dist-tag.md @@ -0,0 +1,87 @@ +npm-dist-tag(1) -- Modify package distribution tags +=================================================== + +## SYNOPSIS + + npm dist-tag add <pkg>@<version> [<tag>] + npm dist-tag rm <pkg> <tag> + npm dist-tag ls [<pkg>] + + aliases: dist-tags + +## DESCRIPTION + +Add, remove, and enumerate distribution tags on a package: + +* add: + Tags the specified version of the package with the specified tag, or the + `--tag` config if not specified. + +* rm: + Clear a tag that is no longer in use from the package. + +* ls: + Show all of the dist-tags for a package, defaulting to the package in + the current prefix. + +A tag can be used when installing packages as a reference to a version instead +of using a specific version number: + + npm install <name>@<tag> + +When installing dependencies, a preferred tagged version may be specified: + + npm install --tag <tag> + +This also applies to `npm dedupe`. + +Publishing a package sets the `latest` tag to the published version unless the +`--tag` option is used. For example, `npm publish --tag=beta`. + +By default, `npm install <pkg>` (without any `@<version>` or `@<tag>` +specifier) installs the `latest` tag. + +## PURPOSE + +Tags can be used to provide an alias instead of version numbers. + +For example, a project might choose to have multiple streams of development +and use a different tag for each stream, +e.g., `stable`, `beta`, `dev`, `canary`. + +By default, the `latest` tag is used by npm to identify the current version of +a package, and `npm install <pkg>` (without any `@<version>` or `@<tag>` +specifier) installs the `latest` tag. Typically, projects only use the `latest` +tag for stable release versions, and use other tags for unstable versions such +as prereleases. + +The `next` tag is used by some projects to identify the upcoming version. + +By default, other than `latest`, no tag has any special significance to npm +itself. + +## CAVEATS + +This command used to be known as `npm tag`, which only created new tags, and so +had a different syntax. + +Tags must share a namespace with version numbers, because they are specified in +the same slot: `npm install <pkg>@<version>` vs `npm install <pkg>@<tag>`. + +Tags that can be interpreted as valid semver ranges will be rejected. For +example, `v1.4` cannot be used as a tag, because it is interpreted by semver as +`>=1.4.0 <1.5.0`. See <https://github.com/npm/npm/issues/6082>. + +The simplest way to avoid semver problems with tags is to use tags that do not +begin with a number or the letter `v`. + +## SEE ALSO + +* npm-tag(1) +* npm-publish(1) +* npm-install(1) +* npm-dedupe(1) +* npm-registry(7) +* npm-config(1) +* npm-config(7) +* npmrc(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-docs.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-docs.md new file mode 100644 index 00000000..4b697209 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-docs.md @@ -0,0 +1,44 @@ +npm-docs(1) -- Docs for a package in a web browser maybe +======================================================== + +## SYNOPSIS + + npm docs [<pkgname> [<pkgname> ...]] + npm docs (with no args in a package dir) + npm home [<pkgname> [<pkgname> ...]] + npm home (with no args in a package dir) + +## DESCRIPTION + +This command tries to guess at the likely location of a package's +documentation URL, and then tries to open it using the `--browser` +config param. You can pass multiple package names at once. If no +package name is provided, it will search for a `package.json` in +the current folder and use the `name` property. + +## CONFIGURATION + +### browser + +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` +* Type: String + +The browser that is called by the `npm docs` command to open websites. + +### registry + +* Default: https://registry.npmjs.org/ +* Type: url + +The base URL of the npm package registry. + + +## SEE ALSO + +* npm-view(1) +* npm-publish(1) +* npm-registry(7) +* npm-config(1) +* npm-config(7) +* npmrc(5) +* package.json(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-edit.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-edit.md new file mode 100644 index 00000000..27362743 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-edit.md @@ -0,0 +1,37 @@ +npm-edit(1) -- Edit an installed package +======================================== + +## SYNOPSIS + + npm edit <name>[@<version>] + +## DESCRIPTION + +Opens the package folder in the default editor (or whatever you've +configured as the npm `editor` config -- see `npm-config(7)`.) + +After it has been edited, the package is rebuilt so as to pick up any +changes in compiled packages. + +For instance, you can do `npm install connect` to install connect +into your package, and then `npm edit connect` to make a few +changes to your locally installed copy. + +## CONFIGURATION + +### editor + +* Default: `EDITOR` environment variable if set, or `"vi"` on Posix, + or `"notepad"` on Windows. +* Type: path + +The command to run for `npm edit` or `npm config edit`. + +## SEE ALSO + +* npm-folders(5) +* npm-explore(1) +* npm-install(1) +* npm-config(1) +* npm-config(7) +* npmrc(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-explore.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-explore.md new file mode 100644 index 00000000..66f03784 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-explore.md @@ -0,0 +1,39 @@ +npm-explore(1) -- Browse an installed package +============================================= + +## SYNOPSIS + + npm explore <name> [ -- <cmd>] + +## DESCRIPTION + +Spawn a subshell in the directory of the installed package specified. + +If a command is specified, then it is run in the subshell, which then +immediately terminates. + +This is particularly handy in the case of git submodules in the +`node_modules` folder: + + npm explore some-dependency -- git pull origin master + +Note that the package is *not* automatically rebuilt afterwards, so be +sure to use `npm rebuild <pkg>` if you make any changes. + +## CONFIGURATION + +### shell + +* Default: SHELL environment variable, or "bash" on Posix, or "cmd" on + Windows +* Type: path + +The shell to run for the `npm explore` command. + +## SEE ALSO + +* npm-folders(5) +* npm-edit(1) +* npm-rebuild(1) +* npm-build(1) +* npm-install(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-help-search.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-help-search.md new file mode 100644 index 00000000..aed048be --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-help-search.md @@ -0,0 +1,35 @@ +npm-help-search(1) -- Search npm help documentation +=================================================== + +## SYNOPSIS + + npm help-search some search terms + +## DESCRIPTION + +This command will search the npm markdown documentation files for the +terms provided, and then list the results, sorted by relevance. + +If only one result is found, then it will show that help topic. + +If the argument to `npm help` is not a known help topic, then it will +call `help-search`. It is rarely if ever necessary to call this +command directly. + +## CONFIGURATION + +### long + +* Type: Boolean +* Default: false + +If true, the "long" flag will cause help-search to output context around +where the terms were found in the documentation. + +If false, then help-search will just list out the help topics found. + +## SEE ALSO + +* npm(1) +* npm-faq(7) +* npm-help(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-help.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-help.md new file mode 100644 index 00000000..b5da9452 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-help.md @@ -0,0 +1,40 @@ +npm-help(1) -- Get help on npm +============================== + +## SYNOPSIS + + npm help <topic> + npm help some search terms + +## DESCRIPTION + +If supplied a topic, then show the appropriate documentation page. + +If the topic does not exist, or if multiple terms are provided, then run +the `help-search` command to find a match. Note that, if `help-search` +finds a single subject, then it will run `help` on that topic, so unique +matches are equivalent to specifying a topic name. + +## CONFIGURATION + +### viewer + +* Default: "man" on Posix, "browser" on Windows +* Type: path + +The program to use to view help content. + +Set to `"browser"` to view html help content in the default web browser. + +## SEE ALSO + +* npm(1) +* README +* npm-faq(7) +* npm-folders(5) +* npm-config(1) +* npm-config(7) +* npmrc(5) +* package.json(5) +* npm-help-search(1) +* npm-index(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-init.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-init.md new file mode 100644 index 00000000..f267727a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-init.md @@ -0,0 +1,38 @@ +npm-init(1) -- Interactively create a package.json file +======================================================= + +## SYNOPSIS + + npm init [-f|--force|-y|--yes] + +## DESCRIPTION + +This will ask you a bunch of questions, and then write a package.json for you. + +It attempts to make reasonable guesses about what you want things to be set to, +and then writes a package.json file with the options you've selected. + +If you already have a package.json file, it'll read that first, and default to +the options in there. + +It is strictly additive, so it does not delete options from your package.json +without a really good reason to do so. + +If you invoke it with `-f`, `--force`, `-y`, or `--yes`, it will use only +defaults and not prompt you for any options. + +## CONFIGURATION + +### scope + +* Default: none +* Type: String + +The scope under which the new module should be created. + +## SEE ALSO + +* <https://github.com/isaacs/init-package-json> +* package.json(5) +* npm-version(1) +* npm-scope(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-install.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-install.md new file mode 100644 index 00000000..b362c259 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-install.md @@ -0,0 +1,335 @@ +npm-install(1) -- Install a package +=================================== + +## SYNOPSIS + + npm install (with no args in a package dir) + npm install <tarball file> + npm install <tarball url> + npm install <folder> + npm install [@<scope>/]<name> [--save|--save-dev|--save-optional] [--save-exact] [--save-bundle] + npm install [@<scope>/]<name>@<tag> + npm install [@<scope>/]<name>@<version> + npm install [@<scope>/]<name>@<version range> + npm i (with any of the previous argument usage) + +## DESCRIPTION + +This command installs a package, and any packages that it depends on. If the +package has a shrinkwrap file, the installation of dependencies will be driven +by that. See npm-shrinkwrap(1). + +A `package` is: + +* a) a folder containing a program described by a `package.json(5)` file +* b) a gzipped tarball containing (a) +* c) a url that resolves to (b) +* d) a `<name>@<version>` that is published on the registry (see `npm-registry(7)`) with (c) +* e) a `<name>@<tag>` (see `npm-dist-tag(1)`) that points to (d) +* f) a `<name>` that has a "latest" tag satisfying (e) +* g) a `<git remote url>` that resolves to (b) + +Even if you never publish your package, you can still get a lot of +benefits of using npm if you just want to write a node program (a), and +perhaps if you also want to be able to easily install it elsewhere +after packing it up into a tarball (b). + + +* `npm install` (in package directory, no arguments): + + Install the dependencies in the local node_modules folder. + + In global mode (ie, with `-g` or `--global` appended to the command), + it installs the current package context (ie, the current working + directory) as a global package. + + By default, `npm install` will install all modules listed as dependencies + in `package.json(5)`. + + With the `--production` flag (or when the `NODE_ENV` environment variable + is set to `production`), npm will not install modules listed in + `devDependencies`. + +* `npm install <folder>`: + + Install a package that is sitting in a folder on the filesystem. + +* `npm install <tarball file>`: + + Install a package that is sitting on the filesystem. Note: if you just want + to link a dev directory into your npm root, you can do this more easily by + using `npm link`. + + Example: + + npm install ./package.tgz + +* `npm install <tarball url>`: + + Fetch the tarball url, and then install it. In order to distinguish between + this and other options, the argument must start with "http://" or "https://" + + Example: + + npm install https://github.com/indexzero/forever/tarball/v0.5.6 + +* `npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]`: + + Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See + `npm-config(7)`. The config's default value is `latest`.) + + In most cases, this will install the latest version + of the module published on npm. + + Example: + + npm install sax + + `npm install` takes 3 exclusive, optional flags which save or update + the package version in your main package.json: + + * `--save`: Package will appear in your `dependencies`. + + * `--save-dev`: Package will appear in your `devDependencies`. + + * `--save-optional`: Package will appear in your `optionalDependencies`. + + When using any of the above options to save dependencies to your + package.json, there are two additional, optional flags: + + * `--save-exact`: Saved dependencies will be configured with an + exact version rather than using npm's default semver range + operator. + + * `-B, --save-bundle`: Saved dependencies will also be added to your `bundleDependencies` list. + + Note: if you do not include the @-symbol on your scope name, npm will + interpret this as a GitHub repository instead, see below. Scopes names + must also be followed by a slash. + + Examples: + + npm install sax --save + npm install githubname/reponame + npm install @myorg/privatepackage + npm install node-tap --save-dev + npm install dtrace-provider --save-optional + npm install readable-stream --save --save-exact + npm install ansi-regex --save --save-bundle + + + **Note**: If there is a file or folder named `<name>` in the current + working directory, then it will try to install that, and only try to + fetch the package by name if it is not valid. + +* `npm install [@<scope>/]<name>@<tag>`: + + Install the version of the package that is referenced by the specified tag. + If the tag does not exist in the registry data for that package, then this + will fail. + + Example: + + npm install sax@latest + npm install @myorg/mypackage@latest + +* `npm install [@<scope>/]<name>@<version>`: + + Install the specified version of the package. This will fail if the + version has not been published to the registry. + + Example: + + npm install sax@0.1.1 + npm install @myorg/privatepackage@1.5.0 + +* `npm install [@<scope>/]<name>@<version range>`: + + Install a version of the package matching the specified version range. This + will follow the same rules for resolving dependencies described in `package.json(5)`. + + Note that most version ranges must be put in quotes so that your shell will + treat it as a single argument. + + Example: + + npm install sax@">=0.1.0 <0.2.0" + npm install @myorg/privatepackage@">=0.1.0 <0.2.0" + +* `npm install <git remote url>`: + + Install a package by cloning a git remote url. The format of the git + url is: + + <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:/]<path>[#<commit-ish>] + + `<protocol>` is one of `git`, `git+ssh`, `git+http`, or + `git+https`. If no `<commit-ish>` is specified, then `master` is + used. + + The following git environment variables are recognized by npm and will be added + to the environment when running git: + + * `GIT_ASKPASS` + * `GIT_PROXY_COMMAND` + * `GIT_SSH` + * `GIT_SSH_COMMAND` + * `GIT_SSL_CAINFO` + * `GIT_SSL_NO_VERIFY` + + See the git man page for details. + + Examples: + + npm install git+ssh://git@github.com:npm/npm.git#v1.0.27 + npm install git+https://isaacs@github.com/npm/npm.git + npm install git://github.com/npm/npm.git#v1.0.27 + GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/npm.git + +* `npm install <githubname>/<githubrepo>[#<commit-ish>]`: +* `npm install github:<githubname>/<githubrepo>[#<commit-ish>]`: + + Install the package at `https://github.com/githubname/githubrepo` by + attempting to clone it using `git`. + + If you don't specify a *commit-ish* then `master` will be used. + + Examples: + + npm install mygithubuser/myproject + npm install github:mygithubuser/myproject + +* `npm install gist:[<githubname>/]<gistID>[#<commit-ish>]`: + + Install the package at `https://gist.github.com/gistID` by attempting to + clone it using `git`. The GitHub username associated with the gist is + optional and will not be saved in `package.json` if `--save` is used. + + If you don't specify a *commit-ish* then `master` will be used. + + Example: + + npm install gist:101a11beef + +* `npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]`: + + Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo` + by attempting to clone it using `git`. + + If you don't specify a *commit-ish* then `master` will be used. + + Example: + + npm install bitbucket:mybitbucketuser/myproject + +* `npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]`: + + Install the package at `https://gitlab.com/gitlabname/gitlabrepo` + by attempting to clone it using `git`. + + If you don't specify a *commit-ish* then `master` will be used. + + Example: + + npm install gitlab:mygitlabuser/myproject + +You may combine multiple arguments, and even multiple types of arguments. +For example: + + npm install sax@">=0.1.0 <0.2.0" bench supervisor + +The `--tag` argument will apply to all of the specified install targets. If a +tag with the given name exists, the tagged version is preferred over newer +versions. + +The `--force` argument will force npm to fetch remote resources even if a +local copy exists on disk. + + npm install sax --force + +The `--global` argument will cause npm to install the package globally +rather than locally. See `npm-folders(5)`. + +The `--link` argument will cause npm to link global installs into the +local space in some cases. + +The `--no-bin-links` argument will prevent npm from creating symlinks for +any binaries the package might contain. + +The `--no-optional` argument will prevent optional dependencies from +being installed. + +The `--no-shrinkwrap` argument, which will ignore an available +shrinkwrap file and use the package.json instead. + +The `--nodedir=/path/to/node/source` argument will allow npm to find the +node source code so that npm can compile native modules. + +See `npm-config(7)`. Many of the configuration params have some +effect on installation, since that's most of what npm does. + +## ALGORITHM + +To install a package, npm uses the following algorithm: + + install(where, what, family, ancestors) + fetch what, unpack to <where>/node_modules/<what> + for each dep in what.dependencies + resolve dep to precise version + for each dep@version in what.dependencies + not in <where>/node_modules/<what>/node_modules/* + and not in <family> + add precise version deps to <family> + install(<where>/node_modules/<what>, dep, family) + +For this `package{dep}` structure: `A{B,C}, B{C}, C{D}`, +this algorithm produces: + + A + +-- B + `-- C + `-- D + +That is, the dependency from B to C is satisfied by the fact that A +already caused C to be installed at a higher level. + +See npm-folders(5) for a more detailed description of the specific +folder structures that npm creates. + +### Limitations of npm's Install Algorithm + +There are some very rare and pathological edge-cases where a cycle can +cause npm to try to install a never-ending tree of packages. Here is +the simplest case: + + A -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ... + +where `A` is some version of a package, and `A'` is a different version +of the same package. Because `B` depends on a different version of `A` +than the one that is already in the tree, it must install a separate +copy. The same is true of `A'`, which must install `B'`. Because `B'` +depends on the original version of `A`, which has been overridden, the +cycle falls into infinite regress. + +To avoid this situation, npm flat-out refuses to install any +`name@version` that is already present anywhere in the tree of package +folder ancestors. A more correct, but more complex, solution would be +to symlink the existing version into the new location. If this ever +affects a real use-case, it will be investigated. + +## SEE ALSO + +* npm-folders(5) +* npm-update(1) +* npm-link(1) +* npm-rebuild(1) +* npm-scripts(7) +* npm-build(1) +* npm-config(1) +* npm-config(7) +* npmrc(5) +* npm-registry(7) +* npm-tag(1) +* npm-uninstall(1) +* npm-shrinkwrap(1) +* package.json(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-link.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-link.md new file mode 100644 index 00000000..ea019cd2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-link.md @@ -0,0 +1,73 @@ +npm-link(1) -- Symlink a package folder +======================================= + +## SYNOPSIS + + npm link (in package folder) + npm link [@<scope>/]<pkgname> + npm ln (with any of the previous argument usage) + +## DESCRIPTION + +Package linking is a two-step process. + +First, `npm link` in a package folder will create a symlink in the global folder +`{prefix}/lib/node_modules/<package>` that links to the package where the `npm +link` command was executed. (see `npm-config(7)` for the value of `prefix`). + +Next, in some other location, `npm link package-name` will create a +symbolic link from globally-installed `package-name` to `node_modules/` +of the current folder. + +Note that `package-name` is taken from `package.json`, +not from directory name. + +The package name can be optionally prefixed with a scope. See `npm-scope(7)`. +The scope must be preceded by an @-symbol and followed by a slash. + +When creating tarballs for `npm publish`, the linked packages are +"snapshotted" to their current state by resolving the symbolic links. + +This is handy for installing your own stuff, so that you can work on it and +test it iteratively without having to continually rebuild. + +For example: + + cd ~/projects/node-redis # go into the package directory + npm link # creates global link + cd ~/projects/node-bloggy # go into some other package directory. + npm link redis # link-install the package + +Now, any changes to ~/projects/node-redis will be reflected in +~/projects/node-bloggy/node_modules/node-redis/. Note that the link should +be to the package name, not the directory name for that package. + +You may also shortcut the two steps in one. For example, to do the +above use-case in a shorter way: + + cd ~/projects/node-bloggy # go into the dir of your main project + npm link ../node-redis # link the dir of your dependency + +The second line is the equivalent of doing: + + (cd ../node-redis; npm link) + npm link node-redis + +That is, it first creates a global link, and then links the global +installation target into your project's `node_modules` folder. + +If your linked package is scoped (see `npm-scope(7)`) your link command must +include that scope, e.g. + + npm link @myorg/privatepackage + +## SEE ALSO + +* npm-developers(7) +* npm-faq(7) +* package.json(5) +* npm-install(1) +* npm-folders(5) +* npm-config(1) +* npm-config(7) +* npmrc(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-logout.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-logout.md new file mode 100644 index 00000000..c37508f0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-logout.md @@ -0,0 +1,45 @@ +npm-logout(1) -- Log out of the registry +======================================== + +## SYNOPSIS + + npm logout [--registry=url] [--scope=@orgname] + +## DESCRIPTION + +When logged into a registry that supports token-based authentication, tell the +server to end this token's session. This will invalidate the token everywhere +you're using it, not just for the current environment. + +When logged into a legacy registry that uses username and password authentication, this will +clear the credentials in your user configuration. In this case, it will _only_ affect +the current environment. + +If `--scope` is provided, this will find the credentials for the registry +connected to that scope, if set. + +## CONFIGURATION + +### registry + +Default: https://registry.npmjs.org/ + +The base URL of the npm package registry. If `scope` is also specified, +it takes precedence. + +### scope + +Default: none + +If specified, you will be logged out of the specified scope. See `npm-scope(7)`. + + npm logout --scope=@myco + +## SEE ALSO + +* npm-adduser(1) +* npm-registry(7) +* npm-config(1) +* npm-config(7) +* npmrc(5) +* npm-whoami(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-ls.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-ls.md new file mode 100644 index 00000000..e46bbab3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-ls.md @@ -0,0 +1,94 @@ +npm-ls(1) -- List installed packages +====================================== + +## SYNOPSIS + + npm list [[@<scope>/]<pkg> ...] + npm ls [[@<scope>/]<pkg> ...] + npm la [[@<scope>/]<pkg> ...] + npm ll [[@<scope>/]<pkg> ...] + +## DESCRIPTION + +This command will print to stdout all the versions of packages that are +installed, as well as their dependencies, in a tree-structure. + +Positional arguments are `name@version-range` identifiers, which will +limit the results to only the paths to the packages named. Note that +nested packages will *also* show the paths to the specified packages. +For example, running `npm ls promzard` in npm's source tree will show: + + npm@@VERSION@ /path/to/npm + └─┬ init-package-json@0.0.4 + └── promzard@0.1.5 + +It will print out extraneous, missing, and invalid packages. + +If a project specifies git urls for dependencies these are shown +in parentheses after the name@version to make it easier for users to +recognize potential forks of a project. + +When run as `ll` or `la`, it shows extended information by default. + +## CONFIGURATION + +### json + +* Default: false +* Type: Boolean + +Show information in JSON format. + +### long + +* Default: false +* Type: Boolean + +Show extended information. + +### parseable + +* Default: false +* Type: Boolean + +Show parseable output instead of tree view. + +### global + +* Default: false +* Type: Boolean + +List packages in the global install prefix instead of in the current +project. + +### depth + +* Type: Int + +Max display depth of the dependency tree. + +### prod / production + +* Type: Boolean +* Default: false + +Display only the dependency tree for packages in `dependencies`. + +### dev + +* Type: Boolean +* Default: false + +Display only the dependency tree for packages in `devDependencies`. + +## SEE ALSO + +* npm-config(1) +* npm-config(7) +* npmrc(5) +* npm-folders(5) +* npm-install(1) +* npm-link(1) +* npm-prune(1) +* npm-outdated(1) +* npm-update(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-outdated.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-outdated.md new file mode 100644 index 00000000..c9c4eb99 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-outdated.md @@ -0,0 +1,112 @@ +npm-outdated(1) -- Check for outdated packages +============================================== + +## SYNOPSIS + + npm outdated [<name> [<name> ...]] + +## DESCRIPTION + +This command will check the registry to see if any (or, specific) installed +packages are currently outdated. + +In the output: + +* `wanted` is the maximum version of the package that satisfies the semver + range specified in `package.json`. If there's no available semver range (i.e. + you're running `npm outdated --global`, or the package isn't included in + `package.json`), then `wanted` shows the currently-installed version. +* `latest` is the version of the package tagged as latest in the registry. + Running `npm publish` with no special configuration will publish the package + with a dist-tag of `latest`. This may or may not be the maximum version of + the package, or the most-recently published version of the package, depending + on how the package's developer manages the latest dist-tag(1). +* `location` is where in the dependency tree the package is located. Note that + `npm outdated` defaults to a depth of 0, so unless you override that, you'll + always be seeing only top-level dependencies that are outdated. +* `package type` (when using `--long` / `-l`) tells you whether this package is + a `dependency` or a `devDependency`. Packages not included in `package.json` + are always marked `dependencies`. + +### An example + +``` +$ npm outdated +Package Current Wanted Latest Location +glob 5.0.15 5.0.15 6.0.1 test-outdated-output +nothingness 0.0.3 git git test-outdated-output +npm 3.5.1 3.5.2 3.5.1 test-outdated-output +local-dev 0.0.3 linked linked test-outdated-output +once 1.3.2 1.3.3 1.3.3 test-outdated-output +``` + +With these `dependencies`: +```json +{ + "glob": "^5.0.15", + "nothingness": "github:othiym23/nothingness#master", + "npm": "^3.5.1", + "once": "^1.3.1" +} +``` + +A few things to note: + +* `glob` requires `^5`, which prevents npm from installing `glob@6`, which is + outside the semver range. +* Git dependencies will always be reinstalled, because of how they're specified. + The installed committish might satisfy the dependency specifier (if it's + something immutable, like a commit SHA), or it might not, so `npm outdated` and + `npm update` have to fetch Git repos to check. This is why currently doing a + reinstall of a Git dependency always forces a new clone and install. +* `npm@3.5.2` is marked as "wanted", but "latest" is `npm@3.5.1` because npm + uses dist-tags to manage its `latest` and `next` release channels. `npm update` + will install the _newest_ version, but `npm install npm` (with no semver range) + will install whatever's tagged as `latest`. +* `once` is just plain out of date. Reinstalling `node_modules` from scratch or + running `npm update` will bring it up to spec. + +## CONFIGURATION + +### json + +* Default: false +* Type: Boolean + +Show information in JSON format. + +### long + +* Default: false +* Type: Boolean + +Show extended information. + +### parseable + +* Default: false +* Type: Boolean + +Show parseable output instead of tree view. + +### global + +* Default: false +* Type: Boolean + +Check packages in the global install prefix instead of in the current +project. + +### depth + +* Default: 0 +* Type: Int + +Max depth for checking dependency tree. + +## SEE ALSO + +* npm-update(1) +* npm-dist-tag(1) +* npm-registry(7) +* npm-folders(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-owner.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-owner.md new file mode 100644 index 00000000..c897ea8b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-owner.md @@ -0,0 +1,35 @@ +npm-owner(1) -- Manage package owners +===================================== + +## SYNOPSIS + + npm owner ls <package name> + npm owner add <user> <package name> + npm owner rm <user> <package name> + + aliases: author + +## DESCRIPTION + +Manage ownership of published packages. + +* ls: + List all the users who have access to modify a package and push new versions. + Handy when you need to know who to bug for help. +* add: + Add a new user as a maintainer of a package. This user is enabled to modify + metadata, publish new versions, and add other owners. +* rm: + Remove a user from the package owner list. This immediately revokes their + privileges. + +Note that there is only one level of access. Either you can modify a package, +or you can't. Future versions may contain more fine-grained access levels, but +that is not implemented at this time. + +## SEE ALSO + +* npm-publish(1) +* npm-registry(7) +* npm-adduser(1) +* npm-disputes(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-pack.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-pack.md new file mode 100644 index 00000000..876ae2b3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-pack.md @@ -0,0 +1,27 @@ +npm-pack(1) -- Create a tarball from a package +============================================== + +## SYNOPSIS + + npm pack [<pkg> [<pkg> ...]] + +## DESCRIPTION + +For anything that's installable (that is, a package folder, tarball, +tarball url, name@tag, name@version, or name), this command will fetch +it to the cache, and then copy the tarball to the current working +directory as `<name>-<version>.tgz`, and then write the filenames out to +stdout. + +If the same package is specified multiple times, then the file will be +overwritten the second time. + +If no arguments are supplied, then npm packs the current package folder. + +## SEE ALSO + +* npm-cache(1) +* npm-publish(1) +* npm-config(1) +* npm-config(7) +* npmrc(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-ping.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-ping.md new file mode 100644 index 00000000..49608eef --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-ping.md @@ -0,0 +1,16 @@ +npm-ping(1) -- Ping npm registry +================================ + +## SYNOPSIS + + npm ping [--registry <registry>] + +## DESCRIPTION + +Ping the configured or given npm registry and verify authentication. + +## SEE ALSO + +* npm-config(1) +* npm-config(7) +* npmrc(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-prefix.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-prefix.md new file mode 100644 index 00000000..fedf8e2e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-prefix.md @@ -0,0 +1,23 @@ +npm-prefix(1) -- Display prefix +=============================== + +## SYNOPSIS + + npm prefix [-g] + +## DESCRIPTION + +Print the local prefix to standard out. This is the closest parent directory +to contain a package.json file unless `-g` is also specified. + +If `-g` is specified, this will be the value of the global prefix. See +`npm-config(7)` for more detail. + +## SEE ALSO + +* npm-root(1) +* npm-bin(1) +* npm-folders(5) +* npm-config(1) +* npm-config(7) +* npmrc(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-prune.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-prune.md new file mode 100644 index 00000000..64b71bd5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-prune.md @@ -0,0 +1,27 @@ +npm-prune(1) -- Remove extraneous packages +========================================== + +## SYNOPSIS + + npm prune [<name> [<name ...]] + npm prune [<name> [<name ...]] [--production] + +## DESCRIPTION + +This command removes "extraneous" packages. If a package name is +provided, then only packages matching one of the supplied names are +removed. + +Extraneous packages are packages that are not listed on the parent +package's dependencies list. + +If the `--production` flag is specified or the `NODE_ENV` environment +variable is set to `production`, this command will remove the packages +specified in your `devDependencies`. Setting `--production=false` will +negate `NODE_ENV` being set to `production`. + +## SEE ALSO + +* npm-uninstall(1) +* npm-folders(5) +* npm-ls(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-publish.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-publish.md new file mode 100644 index 00000000..0a29a68e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-publish.md @@ -0,0 +1,55 @@ +npm-publish(1) -- Publish a package +=================================== + + +## SYNOPSIS + + npm publish <tarball> [--tag <tag>] [--access <public|restricted>] + npm publish <folder> [--tag <tag>] [--access <public|restricted>] + +## DESCRIPTION + +Publishes a package to the registry so that it can be installed by name. All +files in the package directory are included if no local `.gitignore` or +`.npmignore` file is present. See `npm-developers(7)` for full details on +what's included in the published package, as well as details on how the package +is built. + +By default npm will publish to the public registry. This can be overridden by +specifying a different default registry or using a `npm-scope(7)` in the name +(see `package.json(5)`). + +* `<folder>`: + A folder containing a package.json file + +* `<tarball>`: + A url or file path to a gzipped tar archive containing a single folder + with a package.json file inside. + +* `[--tag <tag>]` + Registers the published package with the given tag, such that `npm install + <name>@<tag>` will install this version. By default, `npm publish` updates + and `npm install` installs the `latest` tag. See `npm-dist-tag(1)` for + details about tags. + +* `[--access <public|restricted>]` + Tells the registry whether this package should be published as public or + restricted. Only applies to scoped packages, which default to `restricted`. + If you don't have a paid account, you must publish with `--access public` + to publish scoped packages. + +Fails if the package name and version combination already exists in +the specified registry. + +Once a package is published with a given name and version, that +specific name and version combination can never be used again, even if +it is removed with npm-unpublish(1). + +## SEE ALSO + +* npm-registry(7) +* npm-scope(7) +* npm-adduser(1) +* npm-owner(1) +* npm-deprecate(1) +* npm-tag(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-rebuild.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-rebuild.md new file mode 100644 index 00000000..744dcf79 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-rebuild.md @@ -0,0 +1,21 @@ +npm-rebuild(1) -- Rebuild a package +=================================== + +## SYNOPSIS + + npm rebuild [<name> [<name> ...]] + npm rb [<name> [<name> ...]] + +* `<name>`: + The package to rebuild + +## DESCRIPTION + +This command runs the `npm build` command on the matched folders. This is useful +when you install a new version of node, and must recompile all your C++ addons with +the new binary. + +## SEE ALSO + +* npm-build(1) +* npm-install(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-repo.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-repo.md new file mode 100644 index 00000000..d59d9073 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-repo.md @@ -0,0 +1,28 @@ +npm-repo(1) -- Open package repository page in the browser +======================================================== + +## SYNOPSIS + + npm repo <pkgname> + npm repo (with no args in a package dir) + +## DESCRIPTION + +This command tries to guess at the likely location of a package's +repository URL, and then tries to open it using the `--browser` +config param. If no package name is provided, it will search for +a `package.json` in the current folder and use the `name` property. + +## CONFIGURATION + +### browser + +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` +* Type: String + +The browser that is called by the `npm repo` command to open websites. + +## SEE ALSO + +* npm-docs(1) +* npm-config(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-restart.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-restart.md new file mode 100644 index 00000000..6207e605 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-restart.md @@ -0,0 +1,40 @@ +npm-restart(1) -- Restart a package +=================================== + +## SYNOPSIS + + npm restart [-- <args>] + +## DESCRIPTION + +This restarts a package. + +This runs a package's "stop", "restart", and "start" scripts, and associated +pre- and post- scripts, in the order given below: + +1. prerestart +2. prestop +3. stop +4. poststop +5. restart +6. prestart +7. start +8. poststart +9. postrestart + +## NOTE + +Note that the "restart" script is run **in addition to** the "stop" +and "start" scripts, not instead of them. + +This is the behavior as of `npm` major version 2. A change in this +behavior will be accompanied by an increase in major version number + +## SEE ALSO + +* npm-run-script(1) +* npm-scripts(7) +* npm-test(1) +* npm-start(1) +* npm-stop(1) +* npm-restart(3) \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-rm.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-rm.md new file mode 100644 index 00000000..d3cc9bc9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-rm.md @@ -0,0 +1,23 @@ +npm-rm(1) -- Remove a package +============================= + +## SYNOPSIS + + npm rm <name> + npm r <name> + npm uninstall <name> + npm un <name> + +## DESCRIPTION + +This uninstalls a package, completely removing everything npm installed +on its behalf. + +## SEE ALSO + +* npm-prune(1) +* npm-install(1) +* npm-folders(5) +* npm-config(1) +* npm-config(7) +* npmrc(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-root.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-root.md new file mode 100644 index 00000000..72770e0b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-root.md @@ -0,0 +1,19 @@ +npm-root(1) -- Display npm root +=============================== + +## SYNOPSIS + + npm root + +## DESCRIPTION + +Print the effective `node_modules` folder to standard out. + +## SEE ALSO + +* npm-prefix(1) +* npm-bin(1) +* npm-folders(5) +* npm-config(1) +* npm-config(7) +* npmrc(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-run-script.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-run-script.md new file mode 100644 index 00000000..a4a52d44 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-run-script.md @@ -0,0 +1,48 @@ +npm-run-script(1) -- Run arbitrary package scripts +================================================== + +## SYNOPSIS + + npm run-script [command] [-- <args>] + npm run [command] [-- <args>] + +## DESCRIPTION + +This runs an arbitrary command from a package's `"scripts"` object. If no +`"command"` is provided, it will list the available scripts. `run[-script]` is +used by the test, start, restart, and stop commands, but can be called +directly, as well. When the scripts in the package are printed out, they're +separated into lifecycle (test, start, restart) and directly-run scripts. + +As of [`npm@2.0.0`](http://blog.npmjs.org/post/98131109725/npm-2-0-0), you can +use custom arguments when executing scripts. The special option `--` is used by +[getopt](http://goo.gl/KxMmtG) to delimit the end of the options. npm will pass +all the arguments after the `--` directly to your script: + + npm run test -- --grep="pattern" + +The arguments will only be passed to the script specified after ```npm run``` +and not to any pre or post script. + +The `env` script is a special built-in command that can be used to list +environment variables that will be available to the script at runtime. If an +"env" command is defined in your package it will take precedence over the +built-in. + +In addition to the shell's pre-existing `PATH`, `npm run` adds +`node_modules/.bin` to the `PATH` provided to scripts. Any binaries provided by +locally-installed dependencies can be used without the `node_modules/.bin` +prefix. For example, if there is a `devDependency` on `tap` in your package, +you should write: + + "scripts": {"test": "tap test/\*.js"} + +instead of `"scripts": {"test": "node_modules/.bin/tap test/\*.js"}` to run your tests. + +## SEE ALSO + +* npm-scripts(7) +* npm-test(1) +* npm-start(1) +* npm-restart(1) +* npm-stop(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-search.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-search.md new file mode 100644 index 00000000..746c09a1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-search.md @@ -0,0 +1,45 @@ +npm-search(1) -- Search for packages +==================================== + +## SYNOPSIS + + npm search [-l|--long] [search terms ...] + + aliases: s, se, find + +## DESCRIPTION + +Search the registry for packages matching the search terms. + +If a term starts with `/`, then it's interpreted as a regular expression. +A trailing `/` will be ignored in this case. (Note that many regular +expression characters must be escaped or quoted in most shells.) + +## CONFIGURATION + +### long + +* Default: false +* Type: Boolean + +Display full package descriptions and other long text across multiple +lines. When disabled (default) search results are truncated to fit +neatly on a single line. Modules with extremely long names will +fall on multiple lines. + +### registry + + * Default: https://registry.npmjs.org/ + * Type : url + +Search the specified registry for modules. If you have configured npm to point to a different default registry, +such as your internal private module repository, `npm search` will default to that registry when searching. +Pass a different registry url such as the default above in order to override this setting. + +## SEE ALSO + +* npm-registry(7) +* npm-config(1) +* npm-config(7) +* npmrc(5) +* npm-view(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-shrinkwrap.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-shrinkwrap.md new file mode 100644 index 00000000..d8d2b393 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-shrinkwrap.md @@ -0,0 +1,180 @@ +npm-shrinkwrap(1) -- Lock down dependency versions +===================================================== + +## SYNOPSIS + + npm shrinkwrap + +## DESCRIPTION + +This command locks down the versions of a package's dependencies so +that you can control exactly which versions of each dependency will be +used when your package is installed. The `package.json` file is still +required if you want to use `npm install`. + +By default, `npm install` recursively installs the target's +dependencies (as specified in `package.json`), choosing the latest +available version that satisfies the dependency's semver pattern. In +some situations, particularly when shipping software where each change +is tightly managed, it's desirable to fully specify each version of +each dependency recursively so that subsequent builds and deploys do +not inadvertently pick up newer versions of a dependency that satisfy +the semver pattern. Specifying specific semver patterns in each +dependency's `package.json` would facilitate this, but that's not always +possible or desirable, as when another author owns the npm package. +It's also possible to check dependencies directly into source control, +but that may be undesirable for other reasons. + +As an example, consider package A: + + { + "name": "A", + "version": "0.1.0", + "dependencies": { + "B": "<0.1.0" + } + } + +package B: + + { + "name": "B", + "version": "0.0.1", + "dependencies": { + "C": "<0.1.0" + } + } + +and package C: + + { + "name": "C", + "version": "0.0.1" + } + +If these are the only versions of A, B, and C available in the +registry, then a normal `npm install A` will install: + + A@0.1.0 + `-- B@0.0.1 + `-- C@0.0.1 + +However, if B@0.0.2 is published, then a fresh `npm install A` will +install: + + A@0.1.0 + `-- B@0.0.2 + `-- C@0.0.1 + +assuming the new version did not modify B's dependencies. Of course, +the new version of B could include a new version of C and any number +of new dependencies. If such changes are undesirable, the author of A +could specify a dependency on B@0.0.1. However, if A's author and B's +author are not the same person, there's no way for A's author to say +that he or she does not want to pull in newly published versions of C +when B hasn't changed at all. + +In this case, A's author can run + + npm shrinkwrap + +This generates `npm-shrinkwrap.json`, which will look something like this: + + { + "name": "A", + "version": "0.1.0", + "dependencies": { + "B": { + "version": "0.0.1", + "from": "B@^0.0.1", + "resolved": "https://registry.npmjs.org/B/-/B-0.0.1.tgz", + "dependencies": { + "C": { + "version": "0.0.1", + "from": "org/C#v0.0.1", + "resolved": "git://github.com/org/C.git#5c380ae319fc4efe9e7f2d9c78b0faa588fd99b4" + } + } + } + } + } + +The shrinkwrap command has locked down the dependencies based on +what's currently installed in node_modules. When `npm install` +installs a package with an `npm-shrinkwrap.json` in the package +root, the shrinkwrap file (rather than `package.json` files) completely +drives the installation of that package and all of its dependencies +(recursively). So now the author publishes A@0.1.0, and subsequent +installs of this package will use B@0.0.1 and C@0.0.1, regardless the +dependencies and versions listed in A's, B's, and C's `package.json` +files. + + +### Using shrinkwrapped packages + +Using a shrinkwrapped package is no different than using any other +package: you can `npm install` it by hand, or add a dependency to your +`package.json` file and `npm install` it. + +### Building shrinkwrapped packages + +To shrinkwrap an existing package: + +1. Run `npm install` in the package root to install the current + versions of all dependencies. +2. Validate that the package works as expected with these versions. +3. Run `npm shrinkwrap`, add `npm-shrinkwrap.json` to git, and publish + your package. + +To add or update a dependency in a shrinkwrapped package: + +1. Run `npm install` in the package root to install the current + versions of all dependencies. +2. Add or update dependencies. `npm install` each new or updated + package individually and then update `package.json`. Note that they + must be explicitly named in order to be installed: running `npm + install` with no arguments will merely reproduce the existing + shrinkwrap. +3. Validate that the package works as expected with the new + dependencies. +4. Run `npm shrinkwrap`, commit the new `npm-shrinkwrap.json`, and + publish your package. + +You can use npm-outdated(1) to view dependencies with newer versions +available. + +### Other Notes + +A shrinkwrap file must be consistent with the package's `package.json` +file. `npm shrinkwrap` will fail if required dependencies are not +already installed, since that would result in a shrinkwrap that +wouldn't actually work. Similarly, the command will fail if there are +extraneous packages (not referenced by `package.json`), since that would +indicate that `package.json` is not correct. + +Since `npm shrinkwrap` is intended to lock down your dependencies for +production use, `devDependencies` will not be included unless you +explicitly set the `--dev` flag when you run `npm shrinkwrap`. If +installed `devDependencies` are excluded, then npm will print a +warning. If you want them to be installed with your module by +default, please consider adding them to `dependencies` instead. + +If shrinkwrapped package A depends on shrinkwrapped package B, B's +shrinkwrap will not be used as part of the installation of A. However, +because A's shrinkwrap is constructed from a valid installation of B +and recursively specifies all dependencies, the contents of B's +shrinkwrap will implicitly be included in A's shrinkwrap. + +### Caveats + +If you wish to lock down the specific bytes included in a package, for +example to have 100% confidence in being able to reproduce a +deployment or build, then you ought to check your dependencies into +source control, or pursue some other mechanism that can verify +contents rather than versions. + +## SEE ALSO + +* npm-install(1) +* package.json(5) +* npm-ls(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-star.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-star.md new file mode 100644 index 00000000..e384ab2c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-star.md @@ -0,0 +1,22 @@ +npm-star(1) -- Mark your favorite packages +========================================== + +## SYNOPSIS + + npm star <pkgname> [<pkg>, ...] + npm unstar <pkgname> [<pkg>, ...] + +## DESCRIPTION + +"Starring" a package means that you have some interest in it. It's +a vaguely positive way to show that you care. + +"Unstarring" is the same thing, but in reverse. + +It's a boolean thing. Starring repeatedly has no additional effect. + +## SEE ALSO + +* npm-view(1) +* npm-whoami(1) +* npm-adduser(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-stars.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-stars.md new file mode 100644 index 00000000..d1c32ea2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-stars.md @@ -0,0 +1,22 @@ +npm-stars(1) -- View packages marked as favorites +================================================= + +## SYNOPSIS + + npm stars + npm stars [username] + +## DESCRIPTION + +If you have starred a lot of neat things and want to find them again +quickly this command lets you do just that. + +You may also want to see your friend's favorite packages, in this case +you will most certainly enjoy this command. + +## SEE ALSO + +* npm-star(1) +* npm-view(1) +* npm-whoami(1) +* npm-adduser(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-start.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-start.md new file mode 100644 index 00000000..e052e90a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-start.md @@ -0,0 +1,24 @@ +npm-start(1) -- Start a package +=============================== + +## SYNOPSIS + + npm start [-- <args>] + +## DESCRIPTION + +This runs an arbitrary command specified in the package's `"start"` property of +its `"scripts"` object. If no `"start"` property is specified on the +`"scripts"` object, it will run `node server.js`. + +As of [`npm@2.0.0`](http://blog.npmjs.org/post/98131109725/npm-2-0-0), you can +use custom arguments when executing scripts. Refer to npm-run-script(1) for +more details. + +## SEE ALSO + +* npm-run-script(1) +* npm-scripts(7) +* npm-test(1) +* npm-restart(1) +* npm-stop(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-stop.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-stop.md new file mode 100644 index 00000000..2e48e9ce --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-stop.md @@ -0,0 +1,18 @@ +npm-stop(1) -- Stop a package +============================= + +## SYNOPSIS + + npm stop [-- <args>] + +## DESCRIPTION + +This runs a package's "stop" script, if one was provided. + +## SEE ALSO + +* npm-run-script(1) +* npm-scripts(7) +* npm-test(1) +* npm-start(1) +* npm-restart(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-tag.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-tag.md new file mode 100644 index 00000000..562f4a4e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-tag.md @@ -0,0 +1,60 @@ +npm-tag(1) -- Tag a published version +===================================== + +## SYNOPSIS + + npm tag <name>@<version> [<tag>] + +## DESCRIPTION + +THIS COMMAND IS DEPRECATED. See npm-dist-tag(1) for details. + +Tags the specified version of the package with the specified tag, or the +`--tag` config if not specified. + +A tag can be used when installing packages as a reference to a version instead +of using a specific version number: + + npm install <name>@<tag> + +When installing dependencies, a preferred tagged version may be specified: + + npm install --tag <tag> + +This also applies to `npm dedupe`. + +Publishing a package always sets the "latest" tag to the published version. + +## PURPOSE + +Tags can be used to provide an alias instead of version numbers. For +example, `npm` currently uses the tag "next" to identify the upcoming +version, and the tag "latest" to identify the current version. + +A project might choose to have multiple streams of development, e.g., +"stable", "canary". + +## CAVEATS + +Tags must share a namespace with version numbers, because they are +specified in the same slot: `npm install <pkg>@<version>` vs `npm +install <pkg>@<tag>`. + +Tags that can be interpreted as valid semver ranges will be +rejected. For example, `v1.4` cannot be used as a tag, because it is +interpreted by semver as `>=1.4.0 <1.5.0`. See +<https://github.com/npm/npm/issues/6082>. + +The simplest way to avoid semver problems with tags is to use tags +that do not begin with a number or the letter `v`. + +## SEE ALSO + +* npm-publish(1) +* npm-install(1) +* npm-dedupe(1) +* npm-registry(7) +* npm-config(1) +* npm-config(7) +* npm-tag(3) +* npmrc(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-team.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-team.md new file mode 100644 index 00000000..86efd9b9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-team.md @@ -0,0 +1,55 @@ +npm-team(1) -- Manage organization teams and team memberships +============================================================= + +## SYNOPSIS + + npm team create <scope:team> + npm team destroy <scope:team> + + npm team add <scope:team> <user> + npm team rm <scope:team> <user> + + npm team ls <scope>|<scope:team> + + npm team edit <scope:team> + +## DESCRIPTION + +Used to manage teams in organizations, and change team memberships. Does not +handle permissions for packages. + +Teams must always be fully qualified with the organization/scope they belond to +when operating on them, separated by a colon (`:`). That is, if you have a +`developers` team on a `foo` organization, you must always refer to that team as +`foo:developers` in these commands. + +* create / destroy: + Create a new team, or destroy an existing one. + +* add / rm: + Add a user to an existing team, or remove a user from a team they belong to. + +* ls: + If performed on an organization name, will return a list of existing teams + under that organization. If performed on a team, it will instead return a list + of all users belonging to that particular team. + +## DETAILS + +`npm team` always operates directly on the current registry, configurable from +the command line using `--registry=<registry url>`. + +In order to create teams and manage team membership, you must be a *team admin* +under the given organization. Listing teams and team memberships may be done by +any member of the organizations. + +Organization creation and management of team admins and *organization* members +is done through the website, not the npm CLI. + +To use teams to manage permissions on packages belonging to your organization, +use the `npm access` command to grant or revoke the appropriate permissions. + +## SEE ALSO + +* npm-access(1) +* npm-registr(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-test.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-test.md new file mode 100644 index 00000000..7a21fc7b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-test.md @@ -0,0 +1,23 @@ +npm-test(1) -- Test a package +============================= + +## SYNOPSIS + + npm test [-- <args>] + + aliases: t, tst + +## DESCRIPTION + +This runs a package's "test" script, if one was provided. + +To run tests as a condition of installation, set the `npat` config to +true. + +## SEE ALSO + +* npm-run-script(1) +* npm-scripts(7) +* npm-start(1) +* npm-restart(1) +* npm-stop(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-uninstall.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-uninstall.md new file mode 100644 index 00000000..217b2f5a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-uninstall.md @@ -0,0 +1,46 @@ +npm-uninstall(1) -- Remove a package +============================= + +## SYNOPSIS + + npm uninstall [@<scope>/]<package> [--save|--save-dev|--save-optional] + npm rm (with any of the previous argument usage) + +## DESCRIPTION + +This uninstalls a package, completely removing everything npm installed +on its behalf. + +Example: + + npm uninstall sax + +In global mode (ie, with `-g` or `--global` appended to the command), +it uninstalls the current package context as a global package. + +`npm uninstall` takes 3 exclusive, optional flags which save or update +the package version in your main package.json: + +* `--save`: Package will be removed from your `dependencies`. + +* `--save-dev`: Package will be removed from your `devDependencies`. + +* `--save-optional`: Package will be removed from your `optionalDependencies`. + +Scope is optional and follows the usual rules for `npm-scope(7)`. + +Examples: + + npm uninstall sax --save + npm uninstall @myorg/privatepackage --save + npm uninstall node-tap --save-dev + npm uninstall dtrace-provider --save-optional + +## SEE ALSO + +* npm-prune(1) +* npm-install(1) +* npm-folders(5) +* npm-config(1) +* npm-config(7) +* npmrc(5) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-unpublish.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-unpublish.md new file mode 100644 index 00000000..10f0242f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-unpublish.md @@ -0,0 +1,38 @@ +npm-unpublish(1) -- Remove a package from the registry +====================================================== + +## SYNOPSIS + + npm unpublish [@<scope>/]<name>[@<version>] + +## WARNING + +**It is generally considered bad behavior to remove versions of a library +that others are depending on!** + +Consider using the `deprecate` command +instead, if your intent is to encourage users to upgrade. + +There is plenty of room on the registry. + +## DESCRIPTION + +This removes a package version from the registry, deleting its +entry and removing the tarball. + +If no version is specified, or if all versions are removed then +the root package entry is removed from the registry entirely. + +Even if a package version is unpublished, that specific name and +version combination can never be reused. In order to publish the +package again, a new version number must be used. + +The scope is optional and follows the usual rules for `npm-scope(7)`. + +## SEE ALSO + +* npm-deprecate(1) +* npm-publish(1) +* npm-registry(7) +* npm-adduser(1) +* npm-owner(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-update.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-update.md new file mode 100644 index 00000000..2aa9093e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-update.md @@ -0,0 +1,148 @@ +npm-update(1) -- Update a package +================================= + +## SYNOPSIS + + npm update [-g] [<name> [<name> ...]] + + aliases: up, upgrade + +## DESCRIPTION + +This command will update all the packages listed to the latest version +(specified by the `tag` config), respecting semver. + +It will also install missing packages. As with all commands that install +packages, the `--dev` flag will cause `devDependencies` to be processed +as well. + +If the `-g` flag is specified, this command will update globally installed +packages. + +If no package name is specified, all packages in the specified location (global +or local) will be updated. + +As of `npm@2.6.1`, the `npm update` will only inspect top-level packages. +Prior versions of `npm` would also recursively inspect all dependencies. +To get the old behavior, use `npm --depth 9999 update`. + +## EXAMPLES + +IMPORTANT VERSION NOTE: these examples assume `npm@2.6.1` or later. For +older versions of `npm`, you must specify `--depth 0` to get the behavior +described below. + +For the examples below, assume that the current package is `app` and it depends +on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1` are: + +``` +{ + "dist-tags": { "latest": "1.2.2" }, + "versions": [ + "1.2.2", + "1.2.1", + "1.2.0", + "1.1.2", + "1.1.1", + "1.0.0", + "0.4.1", + "0.4.0", + "0.2.0" + ] +} +``` + +### Caret Dependencies + +If `app`'s `package.json` contains: + +``` +"dependencies": { + "dep1": "^1.1.1" +} +``` + +Then `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and +`1.2.2` satisfies `^1.1.1`. + +### Tilde Dependencies + +However, if `app`'s `package.json` contains: + +``` +"dependencies": { + "dep1": "~1.1.1" +} +``` + +In this case, running `npm update` will install `dep1@1.1.2`. Even though the `latest` +tag points to `1.2.2`, this version does not satisfy `~1.1.1`, which is equivalent +to `>=1.1.1 <1.2.0`. So the highest-sorting version that satisfies `~1.1.1` is used, +which is `1.1.2`. + +### Caret Dependencies below 1.0.0 + +Suppose `app` has a caret dependency on a version below `1.0.0`, for example: + +``` +"dependencies": { + "dep1": "^0.2.0" +} +``` + +`npm update` will install `dep1@0.2.0`, because there are no other +versions which satisfy `^0.2.0`. + +If the dependence were on `^0.4.0`: + +``` +"dependencies": { + "dep1": "^0.4.0" +} +``` + +Then `npm update` will install `dep1@0.4.1`, because that is the highest-sorting +version that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`) + +### Recording Updates with `--save` + +When you want to update a package and save the new version as +the minimum required dependency in `package.json`, you can use +`npm update --save`. For example if `package.json` contains + +``` +"dependencies": { + "dep1": "^1.1.1" +} +``` + +Then `npm update --save` will install `dep1@1.2.2` (i.e., `latest`), +and `package.json` will be modified: + +``` +"dependencies": { + "dep1": "^1.2.2" +} +``` + +Note that `npm` will only write an updated version to `package.json` +if it installs a new package. + +### Updating Globally-Installed Packages + +`npm update -g` will apply the `update` action to each globally installed +package that is `outdated` -- that is, has a version that is different from +`latest`. + +NOTE: If a package has been upgraded to a version newer than `latest`, it will +be _downgraded_. + + +## SEE ALSO + +* npm-install(1) +* npm-outdated(1) +* npm-shrinkwrap(1) +* npm-registry(7) +* npm-folders(5) +* npm-ls(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-version.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-version.md new file mode 100644 index 00000000..3988ba5a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-version.md @@ -0,0 +1,90 @@ +npm-version(1) -- Bump a package version +======================================== + +## SYNOPSIS + + npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease] + +## DESCRIPTION + +Run this in a package directory to bump the version and write the new +data back to `package.json` and, if present, `npm-shrinkwrap.json`. + +The `newversion` argument should be a valid semver string, *or* a +valid second argument to semver.inc (one of `patch`, `minor`, `major`, +`prepatch`, `preminor`, `premajor`, `prerelease`). In the second case, +the existing version will be incremented by 1 in the specified field. + +If run in a git repo, it will also create a version commit and tag. +This behavior is controlled by `git-tag-version` (see below), and can +be disabled on the command line by running `npm --no-git-tag-version version`. +It will fail if the working directory is not clean, unless the `--force` +flag is set. + +If supplied with `--message` (shorthand: `-m`) config option, npm will +use it as a commit message when creating a version commit. If the +`message` config contains `%s` then that will be replaced with the +resulting version number. For example: + + npm version patch -m "Upgrade to %s for reasons" + +If the `sign-git-tag` config is set, then the tag will be signed using +the `-s` flag to git. Note that you must have a default GPG key set up +in your git config for this to work properly. For example: + + $ npm config set sign-git-tag true + $ npm version patch + + You need a passphrase to unlock the secret key for + user: "isaacs (http://blog.izs.me/) <i@izs.me>" + 2048-bit RSA key, ID 6C481CF6, created 2010-08-31 + + Enter passphrase: + +If `preversion`, `version`, or `postversion` are in the `scripts` property of +the package.json, they will be executed as part of running `npm version`. + +The exact order of execution is as follows: + 1. Check to make sure the git working directory is clean before we get started. + Your scripts may add files to the commit in future steps. + This step is skipped if the `--force` flag is set. + 2. Run the `preversion` script. These scripts have access to the old `version` in package.json. + A typical use would be running your full test suite before deploying. + Any files you want added to the commit should be explicitly added using `git add`. + 3. Bump `version` in `package.json` as requested (`patch`, `minor`, `major`, etc). + 4. Run the `version` script. These scripts have access to the new `version` in package.json + (so they can incorporate it into file headers in generated files for example). + Again, scripts should explicitly add generated files to the commit using `git add`. + 5. Commit and tag. + 6. Run the `postversion` script. Use it to clean up the file system or automatically push + the commit and/or tag. + +Take the following example: + + "scripts": { + "preversion": "npm test", + "version": "npm run build && git add -A dist", + "postversion": "git push && git push --tags && rm -rf build/temp" + } + +This runs all your tests, and proceeds only if they pass. Then runs your `build` script, and +adds everything in the `dist` directory to the commit. After the commit, it pushes the new commit +and tag up to the server, and deletes the `build/temp` directory. + +## CONFIGURATION + +### git-tag-version + +* Default: true +* Type: Boolean + +Commit and tag the version change. + +## SEE ALSO + +* npm-init(1) +* npm-run-script(1) +* npm-scripts(7) +* package.json(5) +* semver(7) +* config(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-view.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-view.md new file mode 100644 index 00000000..2f3be76d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-view.md @@ -0,0 +1,95 @@ +npm-view(1) -- View registry info +================================= + +## SYNOPSIS + + npm view [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...] + npm v [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...] + +## DESCRIPTION + +This command shows data about a package and prints it to the stream +referenced by the `outfd` config, which defaults to stdout. + +To show the package registry entry for the `connect` package, you can do +this: + + npm view connect + +The default version is "latest" if unspecified. + +Field names can be specified after the package descriptor. +For example, to show the dependencies of the `ronn` package at version +0.3.5, you could do the following: + + npm view ronn@0.3.5 dependencies + +You can view child fields by separating them with a period. +To view the git repository URL for the latest version of npm, you could +do this: + + npm view npm repository.url + +This makes it easy to view information about a dependency with a bit of +shell scripting. For example, to view all the data about the version of +opts that ronn depends on, you can do this: + + npm view opts@$(npm view ronn dependencies.opts) + +For fields that are arrays, requesting a non-numeric field will return +all of the values from the objects in the list. For example, to get all +the contributor names for the "express" project, you can do this: + + npm view express contributors.email + +You may also use numeric indices in square braces to specifically select +an item in an array field. To just get the email address of the first +contributor in the list, you can do this: + + npm view express contributors[0].email + +Multiple fields may be specified, and will be printed one after another. +For exampls, to get all the contributor names and email addresses, you +can do this: + + npm view express contributors.name contributors.email + +"Person" fields are shown as a string if they would be shown as an +object. So, for example, this will show the list of npm contributors in +the shortened string format. (See `package.json(5)` for more on this.) + + npm view npm contributors + +If a version range is provided, then data will be printed for every +matching version of the package. This will show which version of jsdom +was required by each matching version of yui3: + + npm view yui3@'>0.5.4' dependencies.jsdom + +To show the `connect` package version history, you can do +this: + + npm view connect versions + +## OUTPUT + +If only a single string field for a single version is output, then it +will not be colorized or quoted, so as to enable piping the output to +another command. If the field is an object, it will be output as a JavaScript object literal. + +If the --json flag is given, the outputted fields will be JSON. + +If the version range matches multiple versions, than each printed value +will be prefixed with the version it applies to. + +If multiple fields are requested, than each of them are prefixed with +the field name. + +## SEE ALSO + +* npm-search(1) +* npm-registry(7) +* npm-config(1) +* npm-config(7) +* npmrc(5) +* npm-docs(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-whoami.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-whoami.md new file mode 100644 index 00000000..b4aa69da --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm-whoami.md @@ -0,0 +1,17 @@ +npm-whoami(1) -- Display npm username +===================================== + +## SYNOPSIS + + npm whoami + +## DESCRIPTION + +Print the `username` config to standard output. + +## SEE ALSO + +* npm-config(1) +* npm-config(7) +* npmrc(5) +* npm-adduser(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm.md b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm.md new file mode 100644 index 00000000..b5c761d4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/cli/npm.md @@ -0,0 +1,167 @@ +npm(1) -- javascript package manager +==================================== + +## SYNOPSIS + + npm <command> [args] + +## VERSION + +@VERSION@ + +## DESCRIPTION + +npm is the package manager for the Node JavaScript platform. It puts +modules in place so that node can find them, and manages dependency +conflicts intelligently. + +It is extremely configurable to support a wide variety of use cases. +Most commonly, it is used to publish, discover, install, and develop node +programs. + +Run `npm help` to get a list of available commands. + +## INTRODUCTION + +You probably got npm because you want to install stuff. + +Use `npm install blerg` to install the latest version of "blerg". Check out +`npm-install(1)` for more info. It can do a lot of stuff. + +Use the `npm search` command to show everything that's available. +Use `npm ls` to show everything you've installed. + +## DEPENDENCIES + +If a package references to another package with a git URL, npm depends +on a preinstalled git. + +If one of the packages npm tries to install is a native node module and +requires compiling of C++ Code, npm will use +[node-gyp](https://github.com/TooTallNate/node-gyp) for that task. +For a Unix system, [node-gyp](https://github.com/TooTallNate/node-gyp) +needs Python, make and a buildchain like GCC. On Windows, +Python and Microsoft Visual Studio C++ is needed. Python 3 is +not supported by [node-gyp](https://github.com/TooTallNate/node-gyp). +For more information visit +[the node-gyp repository](https://github.com/TooTallNate/node-gyp) and +the [node-gyp Wiki](https://github.com/TooTallNate/node-gyp/wiki). + +## DIRECTORIES + +See `npm-folders(5)` to learn about where npm puts stuff. + +In particular, npm has two modes of operation: + +* global mode: + npm installs packages into the install prefix at + `prefix/lib/node_modules` and bins are installed in `prefix/bin`. +* local mode: + npm installs packages into the current project directory, which + defaults to the current working directory. Packages are installed to + `./node_modules`, and bins are installed to `./node_modules/.bin`. + +Local mode is the default. Use `--global` or `-g` on any command to +operate in global mode instead. + +## DEVELOPER USAGE + +If you're using npm to develop and publish your code, check out the +following help topics: + +* json: + Make a package.json file. See `package.json(5)`. +* link: + For linking your current working code into Node's path, so that you + don't have to reinstall every time you make a change. Use + `npm link` to do this. +* install: + It's a good idea to install things if you don't need the symbolic link. + Especially, installing other peoples code from the registry is done via + `npm install` +* adduser: + Create an account or log in. Credentials are stored in the + user config file. +* publish: + Use the `npm publish` command to upload your code to the registry. + +## CONFIGURATION + +npm is extremely configurable. It reads its configuration options from +5 places. + +* Command line switches: + Set a config with `--key val`. All keys take a value, even if they + are booleans (the config parser doesn't know what the options are at + the time of parsing.) If no value is provided, then the option is set + to boolean `true`. +* Environment Variables: + Set any config by prefixing the name in an environment variable with + `npm_config_`. For example, `export npm_config_key=val`. +* User Configs: + The file at $HOME/.npmrc is an ini-formatted list of configs. If + present, it is parsed. If the `userconfig` option is set in the cli + or env, then that will be used instead. +* Global Configs: + The file found at ../etc/npmrc (from the node executable, by default + this resolves to /usr/local/etc/npmrc) will be parsed if it is found. + If the `globalconfig` option is set in the cli, env, or user config, + then that file is parsed instead. +* Defaults: + npm's default configuration options are defined in + lib/utils/config-defs.js. These must not be changed. + +See `npm-config(7)` for much much more information. + +## CONTRIBUTIONS + +Patches welcome! + +* code: + Read through `npm-coding-style(7)` if you plan to submit code. + You don't have to agree with it, but you do have to follow it. +* docs: + If you find an error in the documentation, edit the appropriate markdown + file in the "doc" folder. (Don't worry about generating the man page.) + +Contributors are listed in npm's `package.json` file. You can view them +easily by doing `npm view npm contributors`. + +If you would like to contribute, but don't know what to work on, read +the contributing guidelines and check the issues list. + +* https://github.com/npm/npm/wiki/Contributing-Guidelines +* <https://github.com/npm/npm/issues> + +## BUGS + +When you find issues, please report them: + +* web: + <https://github.com/npm/npm/issues> + +Be sure to include *all* of the output from the npm command that didn't work +as expected. The `npm-debug.log` file is also helpful to provide. + +You can also look for isaacs in #node.js on irc://irc.freenode.net. He +will no doubt tell you to put the output in a gist or email. + +## AUTHOR + +[Isaac Z. Schlueter](http://blog.izs.me/) :: +[isaacs](https://github.com/isaacs/) :: +[@izs](http://twitter.com/izs) :: +<i@izs.me> + +## SEE ALSO + +* npm-help(1) +* npm-faq(7) +* README +* package.json(5) +* npm-install(1) +* npm-config(1) +* npm-config(7) +* npmrc(5) +* npm-index(7) +* npm(3) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/files/npm-folders.md b/bin/nodejs0.12.16/node_modules/npm/doc/files/npm-folders.md new file mode 100644 index 00000000..1f586970 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/files/npm-folders.md @@ -0,0 +1,215 @@ +npm-folders(5) -- Folder Structures Used by npm +=============================================== + +## DESCRIPTION + +npm puts various things on your computer. That's its job. + +This document will tell you what it puts where. + +### tl;dr + +* Local install (default): puts stuff in `./node_modules` of the current + package root. +* Global install (with `-g`): puts stuff in /usr/local or wherever node + is installed. +* Install it **locally** if you're going to `require()` it. +* Install it **globally** if you're going to run it on the command line. +* If you need both, then install it in both places, or use `npm link`. + +### prefix Configuration + +The `prefix` config defaults to the location where node is installed. +On most systems, this is `/usr/local`. On windows, this is the exact +location of the node.exe binary. On Unix systems, it's one level up, +since node is typically installed at `{prefix}/bin/node` rather than +`{prefix}/node.exe`. + +When the `global` flag is set, npm installs things into this prefix. +When it is not set, it uses the root of the current package, or the +current working directory if not in a package already. + +### Node Modules + +Packages are dropped into the `node_modules` folder under the `prefix`. +When installing locally, this means that you can +`require("packagename")` to load its main module, or +`require("packagename/lib/path/to/sub/module")` to load other modules. + +Global installs on Unix systems go to `{prefix}/lib/node_modules`. +Global installs on Windows go to `{prefix}/node_modules` (that is, no +`lib` folder.) + +Scoped packages are installed the same way, except they are grouped together +in a sub-folder of the relevant `node_modules` folder with the name of that +scope prefix by the @ symbol, e.g. `npm install @myorg/package` would place +the package in `{prefix}/node_modules/@myorg/package`. See `scope(7)` for +more details. + +If you wish to `require()` a package, then install it locally. + +### Executables + +When in global mode, executables are linked into `{prefix}/bin` on Unix, +or directly into `{prefix}` on Windows. + +When in local mode, executables are linked into +`./node_modules/.bin` so that they can be made available to scripts run +through npm. (For example, so that a test runner will be in the path +when you run `npm test`.) + +### Man Pages + +When in global mode, man pages are linked into `{prefix}/share/man`. + +When in local mode, man pages are not installed. + +Man pages are not installed on Windows systems. + +### Cache + +See `npm-cache(1)`. Cache files are stored in `~/.npm` on Posix, or +`~/npm-cache` on Windows. + +This is controlled by the `cache` configuration param. + +### Temp Files + +Temporary files are stored by default in the folder specified by the +`tmp` config, which defaults to the TMPDIR, TMP, or TEMP environment +variables, or `/tmp` on Unix and `c:\windows\temp` on Windows. + +Temp files are given a unique folder under this root for each run of the +program, and are deleted upon successful exit. + +## More Information + +When installing locally, npm first tries to find an appropriate +`prefix` folder. This is so that `npm install foo@1.2.3` will install +to the sensible root of your package, even if you happen to have `cd`ed +into some other folder. + +Starting at the $PWD, npm will walk up the folder tree checking for a +folder that contains either a `package.json` file, or a `node_modules` +folder. If such a thing is found, then that is treated as the effective +"current directory" for the purpose of running npm commands. (This +behavior is inspired by and similar to git's .git-folder seeking +logic when running git commands in a working dir.) + +If no package root is found, then the current folder is used. + +When you run `npm install foo@1.2.3`, then the package is loaded into +the cache, and then unpacked into `./node_modules/foo`. Then, any of +foo's dependencies are similarly unpacked into +`./node_modules/foo/node_modules/...`. + +Any bin files are symlinked to `./node_modules/.bin/`, so that they may +be found by npm scripts when necessary. + +### Global Installation + +If the `global` configuration is set to true, then npm will +install packages "globally". + +For global installation, packages are installed roughly the same way, +but using the folders described above. + +### Cycles, Conflicts, and Folder Parsimony + +Cycles are handled using the property of node's module system that it +walks up the directories looking for `node_modules` folders. So, at every +stage, if a package is already installed in an ancestor `node_modules` +folder, then it is not installed at the current location. + +Consider the case above, where `foo -> bar -> baz`. Imagine if, in +addition to that, baz depended on bar, so you'd have: +`foo -> bar -> baz -> bar -> baz ...`. However, since the folder +structure is: `foo/node_modules/bar/node_modules/baz`, there's no need to +put another copy of bar into `.../baz/node_modules`, since when it calls +require("bar"), it will get the copy that is installed in +`foo/node_modules/bar`. + +This shortcut is only used if the exact same +version would be installed in multiple nested `node_modules` folders. It +is still possible to have `a/node_modules/b/node_modules/a` if the two +"a" packages are different versions. However, without repeating the +exact same package multiple times, an infinite regress will always be +prevented. + +Another optimization can be made by installing dependencies at the +highest level possible, below the localized "target" folder. + +#### Example + +Consider this dependency graph: + + foo + +-- blerg@1.2.5 + +-- bar@1.2.3 + | +-- blerg@1.x (latest=1.3.7) + | +-- baz@2.x + | | `-- quux@3.x + | | `-- bar@1.2.3 (cycle) + | `-- asdf@* + `-- baz@1.2.3 + `-- quux@3.x + `-- bar + +In this case, we might expect a folder structure like this: + + foo + +-- node_modules + +-- blerg (1.2.5) <---[A] + +-- bar (1.2.3) <---[B] + | `-- node_modules + | +-- baz (2.0.2) <---[C] + | | `-- node_modules + | | `-- quux (3.2.0) + | `-- asdf (2.3.4) + `-- baz (1.2.3) <---[D] + `-- node_modules + `-- quux (3.2.0) <---[E] + +Since foo depends directly on `bar@1.2.3` and `baz@1.2.3`, those are +installed in foo's `node_modules` folder. + +Even though the latest copy of blerg is 1.3.7, foo has a specific +dependency on version 1.2.5. So, that gets installed at [A]. Since the +parent installation of blerg satisfies bar's dependency on `blerg@1.x`, +it does not install another copy under [B]. + +Bar [B] also has dependencies on baz and asdf, so those are installed in +bar's `node_modules` folder. Because it depends on `baz@2.x`, it cannot +re-use the `baz@1.2.3` installed in the parent `node_modules` folder [D], +and must install its own copy [C]. + +Underneath bar, the `baz -> quux -> bar` dependency creates a cycle. +However, because bar is already in quux's ancestry [B], it does not +unpack another copy of bar into that folder. + +Underneath `foo -> baz` [D], quux's [E] folder tree is empty, because its +dependency on bar is satisfied by the parent folder copy installed at [B]. + +For a graphical breakdown of what is installed where, use `npm ls`. + +### Publishing + +Upon publishing, npm will look in the `node_modules` folder. If any of +the items there are not in the `bundledDependencies` array, then they will +not be included in the package tarball. + +This allows a package maintainer to install all of their dependencies +(and dev dependencies) locally, but only re-publish those items that +cannot be found elsewhere. See `package.json(5)` for more information. + +## SEE ALSO + +* npm-faq(7) +* package.json(5) +* npm-install(1) +* npm-pack(1) +* npm-cache(1) +* npm-config(1) +* npmrc(5) +* npm-config(7) +* npm-publish(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/files/npmrc.md b/bin/nodejs0.12.16/node_modules/npm/doc/files/npmrc.md new file mode 100644 index 00000000..fa953a8a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/files/npmrc.md @@ -0,0 +1,85 @@ +npmrc(5) -- The npm config files +================================ + +## DESCRIPTION + +npm gets its config settings from the command line, environment +variables, and `npmrc` files. + +The `npm config` command can be used to update and edit the contents +of the user and global npmrc files. + +For a list of available configuration options, see npm-config(7). + +## FILES + +The four relevant files are: + +* per-project config file (/path/to/my/project/.npmrc) +* per-user config file (~/.npmrc) +* global config file ($PREFIX/etc/npmrc) +* npm builtin config file (/path/to/npm/npmrc) + +All npm config files are an ini-formatted list of `key = value` +parameters. Environment variables can be replaced using +`${VARIABLE_NAME}`. For example: + + prefix = ${HOME}/.npm-packages + +Each of these files is loaded, and config options are resolved in +priority order. For example, a setting in the userconfig file would +override the setting in the globalconfig file. + +Array values are specified by adding "[]" after the key name. For +example: + + key[] = "first value" + key[] = "second value" + +**NOTE:** Because local (per-project or per-user) `.npmrc` files can contain +sensitive credentials, they must be readable and writable _only_ by your user +account (i.e. must have a mode of `0600`), otherwise they _will be ignored by +npm!_ + +### Per-project config file + +When working locally in a project, a `.npmrc` file in the root of the +project (ie, a sibling of `node_modules` and `package.json`) will set +config values specific to this project. + +Note that this only applies to the root of the project that you're +running npm in. It has no effect when your module is published. For +example, you can't publish a module that forces itself to install +globally, or in a different location. + +Additionally, this file is not read in global mode, such as when running +`npm install -g`. + +### Per-user config file + +`$HOME/.npmrc` (or the `userconfig` param, if set in the environment +or on the command line) + +### Global config file + +`$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above): +This file is an ini-file formatted list of `key = value` parameters. +Environment variables can be replaced as above. + +### Built-in config file + +`path/to/npm/itself/npmrc` + +This is an unchangeable "builtin" configuration file that npm keeps +consistent across updates. Set fields in here using the `./configure` +script that comes with npm. This is primarily for distribution +maintainers to override default configs in a standard and consistent +manner. + +## SEE ALSO + +* npm-folders(5) +* npm-config(1) +* npm-config(7) +* package.json(5) +* npm(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/files/package.json.md b/bin/nodejs0.12.16/node_modules/npm/doc/files/package.json.md new file mode 100644 index 00000000..eb801616 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/files/package.json.md @@ -0,0 +1,759 @@ +package.json(5) -- Specifics of npm's package.json handling +=========================================================== + +## DESCRIPTION + +This document is all you need to know about what's required in your package.json +file. It must be actual JSON, not just a JavaScript object literal. + +A lot of the behavior described in this document is affected by the config +settings described in `npm-config(7)`. + +## name + +The *most* important things in your package.json are the name and version fields. +Those are actually required, and your package won't install without +them. The name and version together form an identifier that is assumed +to be completely unique. Changes to the package should come along with +changes to the version. + +The name is what your thing is called. + +Some rules: + +* The name must be less than or equal to 214 characters. This includes the scope for + scoped packages. +* The name can't start with a dot or an underscore. +* New packages must not have uppercase letters in the name. +* The name ends up being part of a URL, an argument on the command line, and a + folder name. Therefore, the name can't contain any non-URL-safe characters. + +Some tips: + +* Don't use the same name as a core Node module. +* Don't put "js" or "node" in the name. It's assumed that it's js, since you're + writing a package.json file, and you can specify the engine using the "engines" + field. (See below.) +* The name will probably be passed as an argument to require(), so it should + be something short, but also reasonably descriptive. +* You may want to check the npm registry to see if there's something by that name + already, before you get too attached to it. <https://www.npmjs.com/> + +A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See +`npm-scope(7)` for more detail. + +## version + +The *most* important things in your package.json are the name and version fields. +Those are actually required, and your package won't install without +them. The name and version together form an identifier that is assumed +to be completely unique. Changes to the package should come along with +changes to the version. + +Version must be parseable by +[node-semver](https://github.com/isaacs/node-semver), which is bundled +with npm as a dependency. (`npm install semver` to use it yourself.) + +More on version numbers and ranges at semver(7). + +## description + +Put a description in it. It's a string. This helps people discover your +package, as it's listed in `npm search`. + +## keywords + +Put keywords in it. It's an array of strings. This helps people +discover your package as it's listed in `npm search`. + +## homepage + +The url to the project homepage. + +**NOTE**: This is *not* the same as "url". If you put a "url" field, +then the registry will think it's a redirection to your package that has +been published somewhere else, and spit at you. + +Literally. Spit. I'm so not kidding. + +## bugs + +The url to your project's issue tracker and / or the email address to which +issues should be reported. These are helpful for people who encounter issues +with your package. + +It should look like this: + + { "url" : "https://github.com/owner/project/issues" + , "email" : "project@hostname.com" + } + +You can specify either one or both values. If you want to provide only a url, +you can specify the value for "bugs" as a simple string instead of an object. + +If a url is provided, it will be used by the `npm bugs` command. + +## license + +You should specify a license for your package so that people know how they are +permitted to use it, and any restrictions you're placing on it. + +If you're using a common license such as BSD-2-Clause or MIT, add a +current SPDX license identifier for the license you're using, like this: + + { "license" : "BSD-3-Clause" } + +You can check [the full list of SPDX license IDs](https://spdx.org/licenses/). +Ideally you should pick one that is +[OSI](https://opensource.org/licenses/alphabetical) approved. + +If your package is licensed under multiple common licenses, use an [SPDX license +expression syntax version 2.0 string](https://npmjs.com/package/spdx), like this: + + { "license" : "(ISC OR GPL-3.0)" } + +If you are using a license that hasn't been assigned an SPDX identifier, or if +you are using a custom license, use a string value like this one: + + { "license" : "SEE LICENSE IN <filename>" } + +Then include a file named `<filename>` at the top level of the package. + +Some old packages used license objects or a "licenses" property containing an +array of license objects: + + // Not valid metadata + { "license" : + { "type" : "ISC" + , "url" : "http://opensource.org/licenses/ISC" + } + } + + // Not valid metadata + { "licenses" : + [ + { "type": "MIT" + , "url": "http://www.opensource.org/licenses/mit-license.php" + } + , { "type": "Apache-2.0" + , "url": "http://opensource.org/licenses/apache2.0.php" + } + ] + } + +Those styles are now deprecated. Instead, use SPDX expressions, like this: + + { "license": "ISC" } + + { "license": "(MIT OR Apache-2.0)" } + +Finally, if you do not wish to grant others the right to use a private or +unpublished package under any terms: + + { "license": "UNLICENSED"} + +Consider also setting `"private": true` to prevent accidental publication. + +## people fields: author, contributors + +The "author" is one person. "contributors" is an array of people. A "person" +is an object with a "name" field and optionally "url" and "email", like this: + + { "name" : "Barney Rubble" + , "email" : "b@rubble.com" + , "url" : "http://barnyrubble.tumblr.com/" + } + +Or you can shorten that all into a single string, and npm will parse it for you: + + "Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)" + +Both email and url are optional either way. + +npm also sets a top-level "maintainers" field with your npm user info. + +## files + +The "files" field is an array of files to include in your project. If +you name a folder in the array, then it will also include the files +inside that folder. (Unless they would be ignored by another rule.) + +You can also provide a ".npmignore" file in the root of your package or +in subdirectories, which will keep files from being included, even +if they would be picked up by the files array. The `.npmignore` file +works just like a `.gitignore`. + +Certain files are always included, regardless of settings: + +* `package.json` +* `README` +* `CHANGES` / `CHANGELOG` / `HISTORY` (any casing and file extension) +* `LICENSE` / `LICENCE` +* The file in the "main" field + +Conversely, some files are always ignored: + +* `.git` +* `CVS` +* `.svn` +* `.hg` +* `.lock-wscript` +* `.wafpickle-N` +* `.*.swp` +* `.DS_Store` +* `._*` +* `npm-debug.log` +* `.npmrc` + +## main + +The main field is a module ID that is the primary entry point to your program. +That is, if your package is named `foo`, and a user installs it, and then does +`require("foo")`, then your main module's exports object will be returned. + +This should be a module ID relative to the root of your package folder. + +For most modules, it makes the most sense to have a main script and often not +much else. + +## bin + +A lot of packages have one or more executable files that they'd like to +install into the PATH. npm makes this pretty easy (in fact, it uses this +feature to install the "npm" executable.) + +To use this, supply a `bin` field in your package.json which is a map of +command name to local file name. On install, npm will symlink that file into +`prefix/bin` for global installs, or `./node_modules/.bin/` for local +installs. + + +For example, myapp could have this: + + { "bin" : { "myapp" : "./cli.js" } } + +So, when you install myapp, it'll create a symlink from the `cli.js` script to +`/usr/local/bin/myapp`. + +If you have a single executable, and its name should be the name +of the package, then you can just supply it as a string. For example: + + { "name": "my-program" + , "version": "1.2.5" + , "bin": "./path/to/program" } + +would be the same as this: + + { "name": "my-program" + , "version": "1.2.5" + , "bin" : { "my-program" : "./path/to/program" } } + +## man + +Specify either a single file or an array of filenames to put in place for the +`man` program to find. + +If only a single file is provided, then it's installed such that it is the +result from `man <pkgname>`, regardless of its actual filename. For example: + + { "name" : "foo" + , "version" : "1.2.3" + , "description" : "A packaged foo fooer for fooing foos" + , "main" : "foo.js" + , "man" : "./man/doc.1" + } + +would link the `./man/doc.1` file in such that it is the target for `man foo` + +If the filename doesn't start with the package name, then it's prefixed. +So, this: + + { "name" : "foo" + , "version" : "1.2.3" + , "description" : "A packaged foo fooer for fooing foos" + , "main" : "foo.js" + , "man" : [ "./man/foo.1", "./man/bar.1" ] + } + +will create files to do `man foo` and `man foo-bar`. + +Man files must end with a number, and optionally a `.gz` suffix if they are +compressed. The number dictates which man section the file is installed into. + + { "name" : "foo" + , "version" : "1.2.3" + , "description" : "A packaged foo fooer for fooing foos" + , "main" : "foo.js" + , "man" : [ "./man/foo.1", "./man/foo.2" ] + } + +will create entries for `man foo` and `man 2 foo` + +## directories + +The CommonJS [Packages](http://wiki.commonjs.org/wiki/Packages/1.0) spec details a +few ways that you can indicate the structure of your package using a `directories` +object. If you look at [npm's package.json](https://registry.npmjs.org/npm/latest), +you'll see that it has directories for doc, lib, and man. + +In the future, this information may be used in other creative ways. + +### directories.lib + +Tell people where the bulk of your library is. Nothing special is done +with the lib folder in any way, but it's useful meta info. + +### directories.bin + +If you specify a `bin` directory in `directories.bin`, all the files in +that folder will be added. + +Because of the way the `bin` directive works, specifying both a +`bin` path and setting `directories.bin` is an error. If you want to +specify individual files, use `bin`, and for all the files in an +existing `bin` directory, use `directories.bin`. + +### directories.man + +A folder that is full of man pages. Sugar to generate a "man" array by +walking the folder. + +### directories.doc + +Put markdown files in here. Eventually, these will be displayed nicely, +maybe, someday. + +### directories.example + +Put example scripts in here. Someday, it might be exposed in some clever way. + +### directories.test + +Put your tests in here. It is currently not exposed, but it might be in the +future. + +## repository + +Specify the place where your code lives. This is helpful for people who +want to contribute. If the git repo is on GitHub, then the `npm docs` +command will be able to find you. + +Do it like this: + + "repository" : + { "type" : "git" + , "url" : "https://github.com/npm/npm.git" + } + + "repository" : + { "type" : "svn" + , "url" : "https://v8.googlecode.com/svn/trunk/" + } + +The URL should be a publicly available (perhaps read-only) url that can be handed +directly to a VCS program without any modification. It should not be a url to an +html project page that you put in your browser. It's for computers. + +For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same +shortcut syntax you use for `npm install`: + + "repository": "npm/npm" + + "repository": "gist:11081aaa281" + + "repository": "bitbucket:example/repo" + + "repository": "gitlab:another/repo" + +## scripts + +The "scripts" property is a dictionary containing script commands that are run +at various times in the lifecycle of your package. The key is the lifecycle +event, and the value is the command to run at that point. + +See `npm-scripts(7)` to find out more about writing package scripts. + +## config + +A "config" object can be used to set configuration parameters used in package +scripts that persist across upgrades. For instance, if a package had the +following: + + { "name" : "foo" + , "config" : { "port" : "8080" } } + +and then had a "start" command that then referenced the +`npm_package_config_port` environment variable, then the user could +override that by doing `npm config set foo:port 8001`. + +See `npm-config(7)` and `npm-scripts(7)` for more on package +configs. + +## dependencies + +Dependencies are specified in a simple object that maps a package name to a +version range. The version range is a string which has one or more +space-separated descriptors. Dependencies can also be identified with a +tarball or git URL. + +**Please do not put test harnesses or transpilers in your +`dependencies` object.** See `devDependencies`, below. + +See semver(7) for more details about specifying version ranges. + +* `version` Must match `version` exactly +* `>version` Must be greater than `version` +* `>=version` etc +* `<version` +* `<=version` +* `~version` "Approximately equivalent to version" See semver(7) +* `^version` "Compatible with version" See semver(7) +* `1.2.x` 1.2.0, 1.2.1, etc., but not 1.3.0 +* `http://...` See 'URLs as Dependencies' below +* `*` Matches any version +* `""` (just an empty string) Same as `*` +* `version1 - version2` Same as `>=version1 <=version2`. +* `range1 || range2` Passes if either range1 or range2 are satisfied. +* `git...` See 'Git URLs as Dependencies' below +* `user/repo` See 'GitHub URLs' below +* `tag` A specific version tagged and published as `tag` See `npm-tag(1)` +* `path/path/path` See [Local Paths](#local-paths) below + +For example, these are all valid: + + { "dependencies" : + { "foo" : "1.0.0 - 2.9999.9999" + , "bar" : ">=1.0.2 <2.1.2" + , "baz" : ">1.0.2 <=2.3.4" + , "boo" : "2.0.1" + , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0" + , "asd" : "http://asdf.com/asdf.tar.gz" + , "til" : "~1.2" + , "elf" : "~1.2.3" + , "two" : "2.x" + , "thr" : "3.3.x" + , "lat" : "latest" + , "dyl" : "file:../dyl" + } + } + +### URLs as Dependencies + +You may specify a tarball URL in place of a version range. + +This tarball will be downloaded and installed locally to your package at +install time. + +### Git URLs as Dependencies + +Git urls can be of the form: + + git://github.com/user/project.git#commit-ish + git+ssh://user@hostname:project.git#commit-ish + git+ssh://user@hostname/project.git#commit-ish + git+http://user@hostname/project/blah.git#commit-ish + git+https://user@hostname/project/blah.git#commit-ish + +The `commit-ish` can be any tag, sha, or branch which can be supplied as +an argument to `git checkout`. The default is `master`. + +## GitHub URLs + +As of version 1.1.65, you can refer to GitHub urls as just "foo": +"user/foo-project". Just as with git URLs, a `commit-ish` suffix can be +included. For example: + + { + "name": "foo", + "version": "0.0.0", + "dependencies": { + "express": "visionmedia/express", + "mocha": "visionmedia/mocha#4727d357ea" + } + } + +## Local Paths + +As of version 2.0.0 you can provide a path to a local directory that contains a +package. Local paths can be saved using `npm install --save`, using any of +these forms: + + ../foo/bar + ~/foo/bar + ./foo/bar + /foo/bar + +in which case they will be normalized to a relative path and added to your +`package.json`. For example: + + { + "name": "baz", + "dependencies": { + "bar": "file:../foo/bar" + } + } + +This feature is helpful for local offline development and creating +tests that require npm installing where you don't want to hit an +external server, but should not be used when publishing packages +to the public registry. + +## devDependencies + +If someone is planning on downloading and using your module in their +program, then they probably don't want or need to download and build +the external test or documentation framework that you use. + +In this case, it's best to map these additional items in a `devDependencies` +object. + +These things will be installed when doing `npm link` or `npm install` +from the root of a package, and can be managed like any other npm +configuration param. See `npm-config(7)` for more on the topic. + +For build steps that are not platform-specific, such as compiling +CoffeeScript or other languages to JavaScript, use the `prepublish` +script to do this, and make the required package a devDependency. + +For example: + + { "name": "ethopia-waza", + "description": "a delightfully fruity coffee varietal", + "version": "1.2.3", + "devDependencies": { + "coffee-script": "~1.6.3" + }, + "scripts": { + "prepublish": "coffee -o lib/ -c src/waza.coffee" + }, + "main": "lib/waza.js" + } + +The `prepublish` script will be run before publishing, so that users +can consume the functionality without requiring them to compile it +themselves. In dev mode (ie, locally running `npm install`), it'll +run this script as well, so that you can test it easily. + +## peerDependencies + +In some cases, you want to express the compatibility of your package with a +host tool or library, while not necessarily doing a `require` of this host. +This is usually referred to as a *plugin*. Notably, your module may be exposing +a specific interface, expected and specified by the host documentation. + +For example: + + { + "name": "tea-latte", + "version": "1.3.5", + "peerDependencies": { + "tea": "2.x" + } + } + +This ensures your package `tea-latte` can be installed *along* with the second +major version of the host package `tea` only. `npm install tea-latte` could +possibly yield the following dependency graph: + + ├── tea-latte@1.3.5 + └── tea@2.2.0 + +**NOTE: npm versions 1 and 2 will automatically install `peerDependencies` if +they are not explicitly depended upon higher in the dependency tree. In the +next major version of npm (npm@3), this will no longer be the case. You will +receive a warning that the peerDependency is not installed instead.** The +behavior in npms 1 & 2 was frequently confusing and could easily put you into +dependency hell, a situation that npm is designed to avoid as much as possible. + +Trying to install another plugin with a conflicting requirement will cause an +error. For this reason, make sure your plugin requirement is as broad as +possible, and not to lock it down to specific patch versions. + +Assuming the host complies with [semver](http://semver.org/), only changes in +the host package's major version will break your plugin. Thus, if you've worked +with every 1.x version of the host package, use `"^1.0"` or `"1.x"` to express +this. If you depend on features introduced in 1.5.2, use `">= 1.5.2 < 2"`. + +## bundledDependencies + +This defines an array of package names that will be bundled when publishing the package. + +In cases where you need to preserve npm packages locally or have them available through a single file download, you can bundle the packages in a tarball file by specifying the package names in the `bundledDependencies` array and executing `npm pack`. + +For example: +If we define a package.json like this: + +``` +{ + "name": "awesome-web-framework", + "version": "1.0.0", + "bundledDependencies": [ + 'renderized', 'super-streams' + ] +} +``` +we can obtain `awesome-web-framework-1.0.0.tgz` file by running `npm pack`. This file contains the dependencies `renderized` and `super-streams` which can be installed in a new project by executing `npm install awesome-web-framework-1.0.0.tgz`. + +If this is spelled `"bundleDependencies"`, then that is also honored. + +## optionalDependencies + +If a dependency can be used, but you would like npm to proceed if it cannot be +found or fails to install, then you may put it in the `optionalDependencies` +object. This is a map of package name to version or url, just like the +`dependencies` object. The difference is that build failures do not cause +installation to fail. + +It is still your program's responsibility to handle the lack of the +dependency. For example, something like this: + + try { + var foo = require('foo') + var fooVersion = require('foo/package.json').version + } catch (er) { + foo = null + } + if ( notGoodFooVersion(fooVersion) ) { + foo = null + } + + // .. then later in your program .. + + if (foo) { + foo.doFooThings() + } + +Entries in `optionalDependencies` will override entries of the same name in +`dependencies`, so it's usually best to only put in one place. + +## engines + +You can specify the version of node that your stuff works on: + + { "engines" : { "node" : ">=0.10.3 <0.12" } } + +And, like with dependencies, if you don't specify the version (or if you +specify "\*" as the version), then any version of node will do. + +If you specify an "engines" field, then npm will require that "node" be +somewhere on that list. If "engines" is omitted, then npm will just assume +that it works on node. + +You can also use the "engines" field to specify which versions of npm +are capable of properly installing your program. For example: + + { "engines" : { "npm" : "~1.0.20" } } + +Note that, unless the user has set the `engine-strict` config flag, this +field is advisory only. + +## engineStrict + +**NOTE: This feature is deprecated and will be removed in npm 3.0.0.** + +If you are sure that your module will *definitely not* run properly on +versions of Node/npm other than those specified in the `engines` object, +then you can set `"engineStrict": true` in your package.json file. +This will override the user's `engine-strict` config setting. + +Please do not do this unless you are really very very sure. If your +engines object is something overly restrictive, you can quite easily and +inadvertently lock yourself into obscurity and prevent your users from +updating to new versions of Node. Consider this choice carefully. + +## os + +You can specify which operating systems your +module will run on: + + "os" : [ "darwin", "linux" ] + +You can also blacklist instead of whitelist operating systems, +just prepend the blacklisted os with a '!': + + "os" : [ "!win32" ] + +The host operating system is determined by `process.platform` + +It is allowed to both blacklist, and whitelist, although there isn't any +good reason to do this. + +## cpu + +If your code only runs on certain cpu architectures, +you can specify which ones. + + "cpu" : [ "x64", "ia32" ] + +Like the `os` option, you can also blacklist architectures: + + "cpu" : [ "!arm", "!mips" ] + +The host architecture is determined by `process.arch` + +## preferGlobal + +If your package is primarily a command-line application that should be +installed globally, then set this value to `true` to provide a warning +if it is installed locally. + +It doesn't actually prevent users from installing it locally, but it +does help prevent some confusion if it doesn't work as expected. + +## private + +If you set `"private": true` in your package.json, then npm will refuse +to publish it. + +This is a way to prevent accidental publication of private repositories. If +you would like to ensure that a given package is only ever published to a +specific registry (for example, an internal registry), then use the +`publishConfig` dictionary described below to override the `registry` config +param at publish-time. + +## publishConfig + +This is a set of config values that will be used at publish-time. It's +especially handy if you want to set the tag, registry or access, so that +you can ensure that a given package is not tagged with "latest", published +to the global public registry or that a scoped module is private by default. + +Any config values can be overridden, but of course only "tag", "registry" and +"access" probably matter for the purposes of publishing. + +See `npm-config(7)` to see the list of config options that can be +overridden. + +## DEFAULT VALUES + +npm will default some values based on package contents. + +* `"scripts": {"start": "node server.js"}` + + If there is a `server.js` file in the root of your package, then npm + will default the `start` command to `node server.js`. + +* `"scripts":{"preinstall": "node-gyp rebuild"}` + + If there is a `binding.gyp` file in the root of your package, npm will + default the `preinstall` command to compile using node-gyp. + +* `"contributors": [...]` + + If there is an `AUTHORS` file in the root of your package, npm will + treat each line as a `Name <email> (url)` format, where email and url + are optional. Lines which start with a `#` or are blank, will be + ignored. + +## SEE ALSO + +* semver(7) +* npm-init(1) +* npm-version(1) +* npm-config(1) +* npm-config(7) +* npm-help(1) +* npm-faq(7) +* npm-install(1) +* npm-publish(1) +* npm-uninstall(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-coding-style.md b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-coding-style.md new file mode 100644 index 00000000..4d6ca684 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-coding-style.md @@ -0,0 +1,181 @@ +npm-coding-style(7) -- npm's "funny" coding style +================================================= + +## DESCRIPTION + +npm's coding style is a bit unconventional. It is not different for +difference's sake, but rather a carefully crafted style that is +designed to reduce visual clutter and make bugs more apparent. + +If you want to contribute to npm (which is very encouraged), you should +make your code conform to npm's style. + +Note: this concerns npm's code not the specific packages that you can download from the npm registry. + +## Line Length + +Keep lines shorter than 80 characters. It's better for lines to be +too short than to be too long. Break up long lists, objects, and other +statements onto multiple lines. + +## Indentation + +Two-spaces. Tabs are better, but they look like hell in web browsers +(and on GitHub), and node uses 2 spaces, so that's that. + +Configure your editor appropriately. + +## Curly braces + +Curly braces belong on the same line as the thing that necessitates them. + +Bad: + + function () + { + +Good: + + function () { + +If a block needs to wrap to the next line, use a curly brace. Don't +use it if it doesn't. + +Bad: + + if (foo) { bar() } + while (foo) + bar() + +Good: + + if (foo) bar() + while (foo) { + bar() + } + +## Semicolons + +Don't use them except in four situations: + +* `for (;;)` loops. They're actually required. +* null loops like: `while (something) ;` (But you'd better have a good + reason for doing that.) +* `case "foo": doSomething(); break` +* In front of a leading `(` or `[` at the start of the line. + This prevents the expression from being interpreted + as a function call or property access, respectively. + +Some examples of good semicolon usage: + + ;(x || y).doSomething() + ;[a, b, c].forEach(doSomething) + for (var i = 0; i < 10; i ++) { + switch (state) { + case "begin": start(); continue + case "end": finish(); break + default: throw new Error("unknown state") + } + end() + } + +Note that starting lines with `-` and `+` also should be prefixed +with a semicolon, but this is much less common. + +## Comma First + +If there is a list of things separated by commas, and it wraps +across multiple lines, put the comma at the start of the next +line, directly below the token that starts the list. Put the +final token in the list on a line by itself. For example: + + var magicWords = [ "abracadabra" + , "gesundheit" + , "ventrilo" + ] + , spells = { "fireball" : function () { setOnFire() } + , "water" : function () { putOut() } + } + , a = 1 + , b = "abc" + , etc + , somethingElse + +## Whitespace + +Put a single space in front of ( for anything other than a function call. +Also use a single space wherever it makes things more readable. + +Don't leave trailing whitespace at the end of lines. Don't indent empty +lines. Don't use more spaces than are helpful. + +## Functions + +Use named functions. They make stack traces a lot easier to read. + +## Callbacks, Sync/async Style + +Use the asynchronous/non-blocking versions of things as much as possible. +It might make more sense for npm to use the synchronous fs APIs, but this +way, the fs and http and child process stuff all uses the same callback-passing +methodology. + +The callback should always be the last argument in the list. Its first +argument is the Error or null. + +Be very careful never to ever ever throw anything. It's worse than useless. +Just send the error message back as the first argument to the callback. + +## Errors + +Always create a new Error object with your message. Don't just return a +string message to the callback. Stack traces are handy. + +## Logging + +Logging is done using the [npmlog](https://github.com/npm/npmlog) +utility. + +Please clean up logs when they are no longer helpful. In particular, +logging the same object over and over again is not helpful. Logs should +report what's happening so that it's easier to track down where a fault +occurs. + +Use appropriate log levels. See `npm-config(7)` and search for +"loglevel". + +## Case, naming, etc. + +Use `lowerCamelCase` for multiword identifiers when they refer to objects, +functions, methods, properties, or anything not specified in this section. + +Use `UpperCamelCase` for class names (things that you'd pass to "new"). + +Use `all-lower-hyphen-css-case` for multiword filenames and config keys. + +Use named functions. They make stack traces easier to follow. + +Use `CAPS_SNAKE_CASE` for constants, things that should never change +and are rarely used. + +Use a single uppercase letter for function names where the function +would normally be anonymous, but needs to call itself recursively. It +makes it clear that it's a "throwaway" function. + +## null, undefined, false, 0 + +Boolean variables and functions should always be either `true` or +`false`. Don't set it to 0 unless it's supposed to be a number. + +When something is intentionally missing or removed, set it to `null`. + +Don't set things to `undefined`. Reserve that value to mean "not yet +set to anything." + +Boolean objects are verboten. + +## SEE ALSO + +* npm-developers(7) +* npm-faq(7) +* npm(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-config.md b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-config.md new file mode 100644 index 00000000..d640f73f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-config.md @@ -0,0 +1,928 @@ +npm-config(7) -- More than you probably want to know about npm configuration +============================================================================ + +## DESCRIPTION + +npm gets its configuration values from the following sources, sorted by priority: + +### Command Line Flags + +Putting `--foo bar` on the command line sets the `foo` configuration +parameter to `"bar"`. A `--` argument tells the cli parser to stop +reading flags. A `--flag` parameter that is at the *end* of the +command will be given the value of `true`. + +### Environment Variables + +Any environment variables that start with `npm_config_` will be +interpreted as a configuration parameter. For example, putting +`npm_config_foo=bar` in your environment will set the `foo` +configuration parameter to `bar`. Any environment configurations that +are not given a value will be given the value of `true`. Config +values are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the +same. + +### npmrc Files + +The four relevant files are: + +* per-project config file (/path/to/my/project/.npmrc) +* per-user config file (~/.npmrc) +* global config file ($PREFIX/npmrc) +* npm builtin config file (/path/to/npm/npmrc) + +See npmrc(5) for more details. + +### Default Configs + +A set of configuration parameters that are internal to npm, and are +defaults if nothing else is specified. + +## Shorthands and Other CLI Niceties + +The following shorthands are parsed on the command-line: + +* `-v`: `--version` +* `-h`, `-?`, `--help`, `-H`: `--usage` +* `-s`, `--silent`: `--loglevel silent` +* `-q`, `--quiet`: `--loglevel warn` +* `-d`: `--loglevel info` +* `-dd`, `--verbose`: `--loglevel verbose` +* `-ddd`: `--loglevel silly` +* `-g`: `--global` +* `-C`: `--prefix` +* `-l`: `--long` +* `-m`: `--message` +* `-p`, `--porcelain`: `--parseable` +* `-reg`: `--registry` +* `-f`: `--force` +* `-desc`: `--description` +* `-S`: `--save` +* `-D`: `--save-dev` +* `-O`: `--save-optional` +* `-B`: `--save-bundle` +* `-E`: `--save-exact` +* `-y`: `--yes` +* `-n`: `--yes false` +* `ll` and `la` commands: `ls --long` + +If the specified configuration param resolves unambiguously to a known +configuration parameter, then it is expanded to that configuration +parameter. For example: + + npm ls --par + # same as: + npm ls --parseable + +If multiple single-character shorthands are strung together, and the +resulting combination is unambiguously not some other configuration +param, then it is expanded to its various component pieces. For +example: + + npm ls -gpld + # same as: + npm ls --global --parseable --long --loglevel info + +## Per-Package Config Settings + +When running scripts (see `npm-scripts(7)`) the package.json "config" +keys are overwritten in the environment if there is a config param of +`<name>[@<version>]:<key>`. For example, if the package.json has +this: + + { "name" : "foo" + , "config" : { "port" : "8080" } + , "scripts" : { "start" : "node server.js" } } + +and the server.js is this: + + http.createServer(...).listen(process.env.npm_package_config_port) + +then the user could change the behavior by doing: + + npm config set foo:port 80 + +See package.json(5) for more information. + +## Config Settings + +### access + +* Default: `restricted` +* Type: Access + +When publishing scoped packages, the access level defaults to `restricted`. If +you want your scoped package to be publicly viewable (and installable) set +`--access=public`. The only valid values for `access` are `public` and +`restricted`. Unscoped packages _always_ have an access level of `public`. + +### always-auth + +* Default: false +* Type: Boolean + +Force npm to always require authentication when accessing the registry, +even for `GET` requests. + +### bin-links + +* Default: `true` +* Type: Boolean + +Tells npm to create symlinks (or `.cmd` shims on Windows) for package +executables. + +Set to false to have it not do this. This can be used to work around +the fact that some file systems don't support symlinks, even on +ostensibly Unix systems. + +### browser + +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` +* Type: String + +The browser that is called by the `npm docs` command to open websites. + +### ca + +* Default: The npm CA certificate +* Type: String, Array or null + +The Certificate Authority signing certificate that is trusted for SSL +connections to the registry. Values should be in PEM format with newlines +replaced by the string "\n". For example: + + ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----" + +Set to `null` to only allow "known" registrars, or to a specific CA cert +to trust only that specific signing authority. + +Multiple CAs can be trusted by specifying an array of certificates: + + ca[]="..." + ca[]="..." + +See also the `strict-ssl` config. + +### cafile + +* Default: `null` +* Type: path + +A path to a file containing one or multiple Certificate Authority signing +certificates. Similar to the `ca` setting, but allows for multiple CA's, as +well as for the CA information to be stored in a file on disk. + +### cache + +* Default: Windows: `%AppData%\npm-cache`, Posix: `~/.npm` +* Type: path + +The location of npm's cache directory. See `npm-cache(1)` + +### cache-lock-stale + +* Default: 60000 (1 minute) +* Type: Number + +The number of ms before cache folder lockfiles are considered stale. + +### cache-lock-retries + +* Default: 10 +* Type: Number + +Number of times to retry to acquire a lock on cache folder lockfiles. + +### cache-lock-wait + +* Default: 10000 (10 seconds) +* Type: Number + +Number of ms to wait for cache lock files to expire. + +### cache-max + +* Default: Infinity +* Type: Number + +The maximum time (in seconds) to keep items in the registry cache before +re-checking against the registry. + +Note that no purging is done unless the `npm cache clean` command is +explicitly used, and that only GET requests use the cache. + +### cache-min + +* Default: 10 +* Type: Number + +The minimum time (in seconds) to keep items in the registry cache before +re-checking against the registry. + +Note that no purging is done unless the `npm cache clean` command is +explicitly used, and that only GET requests use the cache. + +### cert + +* Default: `null` +* Type: String + +A client certificate to pass when accessing the registry. + +### color + +* Default: true +* Type: Boolean or `"always"` + +If false, never shows colors. If `"always"` then always shows colors. +If true, then only prints color codes for tty file descriptors. + +### depth + +* Default: Infinity +* Type: Number + +The depth to go when recursing directories for `npm ls`, +`npm cache ls`, and `npm outdated`. + +For `npm outdated`, a setting of `Infinity` will be treated as `0` +since that gives more useful information. To show the outdated status +of all packages and dependents, use a large integer value, +e.g., `npm outdated --depth 9999` + +### description + +* Default: true +* Type: Boolean + +Show the description in `npm search` + +### dev + +* Default: false +* Type: Boolean + +Install `dev-dependencies` along with packages. + +Note that `dev-dependencies` are also installed if the `npat` flag is +set. + +### editor + +* Default: `EDITOR` environment variable if set, or `"vi"` on Posix, + or `"notepad"` on Windows. +* Type: path + +The command to run for `npm edit` or `npm config edit`. + +### engine-strict + +* Default: false +* Type: Boolean + +If set to true, then npm will stubbornly refuse to install (or even +consider installing) any package that claims to not be compatible with +the current Node.js version. + +### force + +* Default: false +* Type: Boolean + +Makes various commands more forceful. + +* lifecycle script failure does not block progress. +* publishing clobbers previously published versions. +* skips cache when requesting from the registry. +* prevents checks against clobbering non-npm files. + +### fetch-retries + +* Default: 2 +* Type: Number + +The "retries" config for the `retry` module to use when fetching +packages from the registry. + +### fetch-retry-factor + +* Default: 10 +* Type: Number + +The "factor" config for the `retry` module to use when fetching +packages. + +### fetch-retry-mintimeout + +* Default: 10000 (10 seconds) +* Type: Number + +The "minTimeout" config for the `retry` module to use when fetching +packages. + +### fetch-retry-maxtimeout + +* Default: 60000 (1 minute) +* Type: Number + +The "maxTimeout" config for the `retry` module to use when fetching +packages. + +### git + +* Default: `"git"` +* Type: String + +The command to use for git commands. If git is installed on the +computer, but is not in the `PATH`, then set this to the full path to +the git binary. + +### git-tag-version + +* Default: `true` +* Type: Boolean + +Tag the commit when using the `npm version` command. + +### global + +* Default: false +* Type: Boolean + +Operates in "global" mode, so that packages are installed into the +`prefix` folder instead of the current working directory. See +`npm-folders(5)` for more on the differences in behavior. + +* packages are installed into the `{prefix}/lib/node_modules` folder, instead of the + current working directory. +* bin files are linked to `{prefix}/bin` +* man pages are linked to `{prefix}/share/man` + +### globalconfig + +* Default: {prefix}/etc/npmrc +* Type: path + +The config file to read for global config options. + +### group + +* Default: GID of the current process +* Type: String or Number + +The group to use when running package scripts in global mode as the root +user. + +### heading + +* Default: `"npm"` +* Type: String + +The string that starts all the debugging log output. + +### https-proxy + +* Default: null +* Type: url + +A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or +`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set, +proxy settings will be honored by the underlying `request` library. + +### if-present + +* Default: false +* Type: Boolean + +If true, npm will not exit with an error code when `run-script` is invoked for +a script that isn't defined in the `scripts` section of `package.json`. This +option can be used when it's desirable to optionally run a script when it's +present and fail if the script fails. This is useful, for example, when running +scripts that may only apply for some builds in an otherwise generic CI setup. + +### ignore-scripts + +* Default: false +* Type: Boolean + +If true, npm does not run scripts specified in package.json files. + +### init-module + +* Default: ~/.npm-init.js +* Type: path + +A module that will be loaded by the `npm init` command. See the +documentation for the +[init-package-json](https://github.com/isaacs/init-package-json) module +for more information, or npm-init(1). + +### init-author-name + +* Default: "" +* Type: String + +The value `npm init` should use by default for the package author's name. + +### init-author-email + +* Default: "" +* Type: String + +The value `npm init` should use by default for the package author's email. + +### init-author-url + +* Default: "" +* Type: String + +The value `npm init` should use by default for the package author's homepage. + +### init-license + +* Default: "ISC" +* Type: String + +The value `npm init` should use by default for the package license. + +### init-version + +* Default: "1.0.0" +* Type: semver + +The value that `npm init` should use by default for the package +version number, if not already set in package.json. + +### json + +* Default: false +* Type: Boolean + +Whether or not to output JSON data, rather than the normal output. + +This feature is currently experimental, and the output data structures +for many commands is either not implemented in JSON yet, or subject to +change. Only the output from `npm ls --json` is currently valid. + +### key + +* Default: `null` +* Type: String + +A client key to pass when accessing the registry. + +### link + +* Default: false +* Type: Boolean + +If true, then local installs will link if there is a suitable globally +installed package. + +Note that this means that local installs can cause things to be +installed into the global space at the same time. The link is only done +if one of the two conditions are met: + +* The package is not already installed globally, or +* the globally installed version is identical to the version that is + being installed locally. + +### local-address + +* Default: undefined +* Type: IP Address + +The IP address of the local interface to use when making connections +to the npm registry. Must be IPv4 in versions of Node prior to 0.12. + +### loglevel + +* Default: "warn" +* Type: String +* Values: "silent", "error", "warn", "http", "info", "verbose", "silly" + +What level of logs to report. On failure, *all* logs are written to +`npm-debug.log` in the current working directory. + +Any logs of a higher level than the setting are shown. +The default is "warn", which shows warn and error output. + +### logstream + +* Default: process.stderr +* Type: Stream + +This is the stream that is passed to the +[npmlog](https://github.com/npm/npmlog) module at run time. + +It cannot be set from the command line, but if you are using npm +programmatically, you may wish to send logs to somewhere other than +stderr. + +If the `color` config is set to true, then this stream will receive +colored output if it is a TTY. + +### long + +* Default: false +* Type: Boolean + +Show extended information in `npm ls` and `npm search`. + +### maxsockets + +* Default: 50 +* Type: Number + +The maximum number of connections to use per origin (protocol/host/port +combination). Passed to the `http` `Agent` used to make the request. + +### message + +* Default: "%s" +* Type: String + +Commit message which is used by `npm version` when creating version commit. + +Any "%s" in the message will be replaced with the version number. + +### node-version + +* Default: process.version +* Type: semver or false + +The node version to use when checking a package's `engines` map. + +### npat + +* Default: false +* Type: Boolean + +Run tests on installation. + +### onload-script + +* Default: false +* Type: path + +A node module to `require()` when npm loads. Useful for programmatic +usage. + +### optional + +* Default: true +* Type: Boolean + +Attempt to install packages in the `optionalDependencies` object. Note +that if these packages fail to install, the overall installation +process is not aborted. + +### parseable + +* Default: false +* Type: Boolean + +Output parseable results from commands that write to +standard output. + +### prefix + +* Default: see npm-folders(5) +* Type: path + +The location to install global items. If set on the command line, then +it forces non-global commands to run in the specified folder. + +### production + +* Default: false +* Type: Boolean + +Set to true to run in "production" mode. + +1. devDependencies are not installed at the topmost level when running + local `npm install` without any arguments. +2. Set the NODE_ENV="production" for lifecycle scripts. + +### proprietary-attribs + +* Default: true +* Type: Boolean + +Whether or not to include proprietary extended attributes in the +tarballs created by npm. + +Unless you are expecting to unpack package tarballs with something other +than npm -- particularly a very outdated tar implementation -- leave +this as true. + +### proxy + +* Default: null +* Type: url + +A proxy to use for outgoing http requests. If the `HTTP_PROXY` or +`http_proxy` environment variables are set, proxy settings will be +honored by the underlying `request` library. + +### rebuild-bundle + +* Default: true +* Type: Boolean + +Rebuild bundled dependencies after installation. + +### registry + +* Default: https://registry.npmjs.org/ +* Type: url + +The base URL of the npm package registry. + +### rollback + +* Default: true +* Type: Boolean + +Remove failed installs. + +### save + +* Default: false +* Type: Boolean + +Save installed packages to a package.json file as dependencies. + +When used with the `npm rm` command, it removes it from the `dependencies` +object. + +Only works if there is already a package.json file present. + +### save-bundle + +* Default: false +* Type: Boolean + +If a package would be saved at install time by the use of `--save`, +`--save-dev`, or `--save-optional`, then also put it in the +`bundleDependencies` list. + +When used with the `npm rm` command, it removes it from the +bundledDependencies list. + +### save-dev + +* Default: false +* Type: Boolean + +Save installed packages to a package.json file as `devDependencies`. + +When used with the `npm rm` command, it removes it from the +`devDependencies` object. + +Only works if there is already a package.json file present. + +### save-exact + +* Default: false +* Type: Boolean + +Dependencies saved to package.json using `--save`, `--save-dev` or +`--save-optional` will be configured with an exact version rather than +using npm's default semver range operator. + +### save-optional + +* Default: false +* Type: Boolean + +Save installed packages to a package.json file as +optionalDependencies. + +When used with the `npm rm` command, it removes it from the +`devDependencies` object. + +Only works if there is already a package.json file present. + +### save-prefix + +* Default: '^' +* Type: String + +Configure how versions of packages installed to a package.json file via +`--save` or `--save-dev` get prefixed. + +For example if a package has version `1.2.3`, by default its version is +set to `^1.2.3` which allows minor upgrades for that package, but after +`npm config set save-prefix='~'` it would be set to `~1.2.3` which only allows +patch upgrades. + +### scope + +* Default: "" +* Type: String + +Associate an operation with a scope for a scoped registry. Useful when logging +in to a private registry for the first time: +`npm login --scope=@organization --registry=registry.organization.com`, which +will cause `@organization` to be mapped to the registry for future installation +of packages specified according to the pattern `@organization/package`. + +### searchopts + +* Default: "" +* Type: String + +Space-separated options that are always passed to search. + +### searchexclude + +* Default: "" +* Type: String + +Space-separated options that limit the results from search. + +### searchsort + +* Default: "name" +* Type: String +* Values: "name", "-name", "date", "-date", "description", + "-description", "keywords", "-keywords" + +Indication of which field to sort search results by. Prefix with a `-` +character to indicate reverse sort. + +### shell + +* Default: SHELL environment variable, or "bash" on Posix, or "cmd" on + Windows +* Type: path + +The shell to run for the `npm explore` command. + +### shrinkwrap + +* Default: true +* Type: Boolean + +If set to false, then ignore `npm-shrinkwrap.json` files when +installing. + +### sign-git-tag + +* Default: false +* Type: Boolean + +If set to true, then the `npm version` command will tag the version +using `-s` to add a signature. + +Note that git requires you to have set up GPG keys in your git configs +for this to work properly. + +### spin + +* Default: true +* Type: Boolean or `"always"` + +When set to `true`, npm will display an ascii spinner while it is doing +things, if `process.stderr` is a TTY. + +Set to `false` to suppress the spinner, or set to `always` to output +the spinner even for non-TTY outputs. + +### strict-ssl + +* Default: true +* Type: Boolean + +Whether or not to do SSL key validation when making requests to the +registry via https. + +See also the `ca` config. + +### tag + +* Default: latest +* Type: String + +If you ask npm to install a package and don't tell it a specific version, then +it will install the specified tag. + +Also the tag that is added to the package@version specified by the `npm +tag` command, if no explicit tag is given. + +### tag-version-prefix + +* Default: `"v"` +* Type: String + +If set, alters the prefix used when tagging a new version when performing a +version increment using `npm-version`. To remove the prefix altogether, set it +to the empty string: `""`. + +Because other tools may rely on the convention that npm version tags look like +`v1.0.0`, _only use this property if it is absolutely necessary_. In +particular, use care when overriding this setting for public packages. + +### tmp + +* Default: TMPDIR environment variable, or "/tmp" +* Type: path + +Where to store temporary files and folders. All temp files are deleted +on success, but left behind on failure for forensic purposes. + +### unicode + +* Default: true +* Type: Boolean + +When set to true, npm uses unicode characters in the tree output. When +false, it uses ascii characters to draw trees. + +### unsafe-perm + +* Default: false if running as root, true otherwise +* Type: Boolean + +Set to true to suppress the UID/GID switching when running package +scripts. If set explicitly to false, then installing as a non-root user +will fail. + +### usage + +* Default: false +* Type: Boolean + +Set to show short usage output (like the -H output) +instead of complete help when doing `npm-help(1)`. + +### user + +* Default: "nobody" +* Type: String or Number + +The UID to set to when running package scripts as root. + +### userconfig + +* Default: ~/.npmrc +* Type: path + +The location of user-level configuration settings. + +### umask + +* Default: 022 +* Type: Octal numeric string in range 0000..0777 (0..511) + +The "umask" value to use when setting the file creation mode on files +and folders. + +Folders and executables are given a mode which is `0777` masked against +this value. Other files are given a mode which is `0666` masked against +this value. Thus, the defaults are `0755` and `0644` respectively. + +### user-agent + +* Default: node/{process.version} {process.platform} {process.arch} +* Type: String + +Sets a User-Agent to the request header + +### version + +* Default: false +* Type: boolean + +If true, output the npm version and exit successfully. + +Only relevant when specified explicitly on the command line. + +### versions + +* Default: false +* Type: boolean + +If true, output the npm version as well as node's `process.versions` map, and +exit successfully. + +Only relevant when specified explicitly on the command line. + +### viewer + +* Default: "man" on Posix, "browser" on Windows +* Type: path + +The program to use to view help content. + +Set to `"browser"` to view html help content in the default web browser. + +## SEE ALSO + +* npm-config(1) +* npmrc(5) +* npm-scripts(7) +* npm-folders(5) +* npm(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-developers.md b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-developers.md new file mode 100644 index 00000000..23fd208a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-developers.md @@ -0,0 +1,221 @@ +npm-developers(7) -- Developer Guide +==================================== + +## DESCRIPTION + +So, you've decided to use npm to develop (and maybe publish/deploy) +your project. + +Fantastic! + +There are a few things that you need to do above the simple steps +that your users will do to install your program. + +## About These Documents + +These are man pages. If you install npm, you should be able to +then do `man npm-thing` to get the documentation on a particular +topic, or `npm help thing` to see the same information. + +## What is a `package` + +A package is: + +* a) a folder containing a program described by a package.json file +* b) a gzipped tarball containing (a) +* c) a url that resolves to (b) +* d) a `<name>@<version>` that is published on the registry with (c) +* e) a `<name>@<tag>` that points to (d) +* f) a `<name>` that has a "latest" tag satisfying (e) +* g) a `git` url that, when cloned, results in (a). + +Even if you never publish your package, you can still get a lot of +benefits of using npm if you just want to write a node program (a), and +perhaps if you also want to be able to easily install it elsewhere +after packing it up into a tarball (b). + +Git urls can be of the form: + + git://github.com/user/project.git#commit-ish + git+ssh://user@hostname:project.git#commit-ish + git+http://user@hostname/project/blah.git#commit-ish + git+https://user@hostname/project/blah.git#commit-ish + +The `commit-ish` can be any tag, sha, or branch which can be supplied as +an argument to `git checkout`. The default is `master`. + +## The package.json File + +You need to have a `package.json` file in the root of your project to do +much of anything with npm. That is basically the whole interface. + +See `package.json(5)` for details about what goes in that file. At the very +least, you need: + +* name: + This should be a string that identifies your project. Please do not + use the name to specify that it runs on node, or is in JavaScript. + You can use the "engines" field to explicitly state the versions of + node (or whatever else) that your program requires, and it's pretty + well assumed that it's javascript. + + It does not necessarily need to match your github repository name. + + So, `node-foo` and `bar-js` are bad names. `foo` or `bar` are better. + +* version: + A semver-compatible version. + +* engines: + Specify the versions of node (or whatever else) that your program + runs on. The node API changes a lot, and there may be bugs or new + functionality that you depend on. Be explicit. + +* author: + Take some credit. + +* scripts: + If you have a special compilation or installation script, then you + should put it in the `scripts` object. You should definitely have at + least a basic smoke-test command as the "scripts.test" field. + See npm-scripts(7). + +* main: + If you have a single module that serves as the entry point to your + program (like what the "foo" package gives you at require("foo")), + then you need to specify that in the "main" field. + +* directories: + This is an object mapping names to folders. The best ones to include are + "lib" and "doc", but if you use "man" to specify a folder full of man pages, + they'll get installed just like these ones. + +You can use `npm init` in the root of your package in order to get you +started with a pretty basic package.json file. See `npm-init(1)` for +more info. + +## Keeping files *out* of your package + +Use a `.npmignore` file to keep stuff out of your package. If there's +no `.npmignore` file, but there *is* a `.gitignore` file, then npm will +ignore the stuff matched by the `.gitignore` file. If you *want* to +include something that is excluded by your `.gitignore` file, you can +create an empty `.npmignore` file to override it. Like `git`, `npm` looks +for `.npmignore` and `.gitignore` files in all subdirectories of your +package, not only the root directory. + +`.npmignore` files follow the [same pattern rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files) +as `.gitignore` files: + +* Blank lines or lines starting with `#` are ignored. +* Standard glob patterns work. +* You can end patterns with a forward slash `/` to specify a directory. +* You can negate a pattern by starting it with an exclamation point `!`. + +By default, the following paths and files are ignored, so there's no +need to add them to `.npmignore` explicitly: + +* `.*.swp` +* `._*` +* `.DS_Store` +* `.git` +* `.hg` +* `.npmrc` +* `.lock-wscript` +* `.svn` +* `.wafpickle-*` +* `config.gypi` +* `CVS` +* `npm-debug.log` + +Additionally, everything in `node_modules` is ignored, except for +bundled dependencies. npm automatically handles this for you, so don't +bother adding `node_modules` to `.npmignore`. + +The following paths and files are never ignored, so adding them to +`.npmignore` is pointless: + +* `package.json` +* `README` (and its variants) +* `CHANGELOG` (and its variants) +* `LICENSE` / `LICENCE` + +## Link Packages + +`npm link` is designed to install a development package and see the +changes in real time without having to keep re-installing it. (You do +need to either re-link or `npm rebuild -g` to update compiled packages, +of course.) + +More info at `npm-link(1)`. + +## Before Publishing: Make Sure Your Package Installs and Works + +**This is important.** + +If you can not install it locally, you'll have +problems trying to publish it. Or, worse yet, you'll be able to +publish it, but you'll be publishing a broken or pointless package. +So don't do that. + +In the root of your package, do this: + + npm install . -g + +That'll show you that it's working. If you'd rather just create a symlink +package that points to your working directory, then do this: + + npm link + +Use `npm ls -g` to see if it's there. + +To test a local install, go into some other folder, and then do: + + cd ../some-other-folder + npm install ../my-package + +to install it locally into the node_modules folder in that other place. + +Then go into the node-repl, and try using require("my-thing") to +bring in your module's main module. + +## Create a User Account + +Create a user with the adduser command. It works like this: + + npm adduser + +and then follow the prompts. + +This is documented better in npm-adduser(1). + +## Publish your package + +This part's easy. In the root of your folder, do this: + + npm publish + +You can give publish a url to a tarball, or a filename of a tarball, +or a path to a folder. + +Note that pretty much **everything in that folder will be exposed** +by default. So, if you have secret stuff in there, use a +`.npmignore` file to list out the globs to ignore, or publish +from a fresh checkout. + +## Brag about it + +Send emails, write blogs, blab in IRC. + +Tell the world how easy it is to install your program! + +## SEE ALSO + +* npm-faq(7) +* npm(1) +* npm-init(1) +* package.json(5) +* npm-scripts(7) +* npm-publish(1) +* npm-adduser(1) +* npm-registry(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-disputes.md b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-disputes.md new file mode 100644 index 00000000..8662fb75 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-disputes.md @@ -0,0 +1,99 @@ +npm-disputes(7) -- Handling Module Name Disputes +================================================ + +## SYNOPSIS + +1. Get the author email with `npm owner ls <pkgname>` +2. Email the author, CC <support@npmjs.com> +3. After a few weeks, if there's no resolution, we'll sort it out. + +Don't squat on package names. Publish code or move out of the way. + +## DESCRIPTION + +There sometimes arise cases where a user publishes a module, and then +later, some other user wants to use that name. Here are some common +ways that happens (each of these is based on actual events.) + +1. Joe writes a JavaScript module `foo`, which is not node-specific. + Joe doesn't use node at all. Bob wants to use `foo` in node, so he + wraps it in an npm module. Some time later, Joe starts using node, + and wants to take over management of his program. +2. Bob writes an npm module `foo`, and publishes it. Perhaps much + later, Joe finds a bug in `foo`, and fixes it. He sends a pull + request to Bob, but Bob doesn't have the time to deal with it, + because he has a new job and a new baby and is focused on his new + erlang project, and kind of not involved with node any more. Joe + would like to publish a new `foo`, but can't, because the name is + taken. +3. Bob writes a 10-line flow-control library, and calls it `foo`, and + publishes it to the npm registry. Being a simple little thing, it + never really has to be updated. Joe works for Foo Inc, the makers + of the critically acclaimed and widely-marketed `foo` JavaScript + toolkit framework. They publish it to npm as `foojs`, but people are + routinely confused when `npm install foo` is some different thing. +4. Bob writes a parser for the widely-known `foo` file format, because + he needs it for work. Then, he gets a new job, and never updates the + prototype. Later on, Joe writes a much more complete `foo` parser, + but can't publish, because Bob's `foo` is in the way. + +The validity of Joe's claim in each situation can be debated. However, +Joe's appropriate course of action in each case is the same. + +1. `npm owner ls foo`. This will tell Joe the email address of the + owner (Bob). +2. Joe emails Bob, explaining the situation **as respectfully as + possible**, and what he would like to do with the module name. He + adds the npm support staff <support@npmjs.com> to the CC list of + the email. Mention in the email that Bob can run `npm owner add + joe foo` to add Joe as an owner of the `foo` package. +3. After a reasonable amount of time, if Bob has not responded, or if + Bob and Joe can't come to any sort of resolution, email support + <support@npmjs.com> and we'll sort it out. ("Reasonable" is + usually at least 4 weeks, but extra time is allowed around common + holidays.) + +## REASONING + +In almost every case so far, the parties involved have been able to reach +an amicable resolution without any major intervention. Most people +really do want to be reasonable, and are probably not even aware that +they're in your way. + +Module ecosystems are most vibrant and powerful when they are as +self-directed as possible. If an admin one day deletes something you +had worked on, then that is going to make most people quite upset, +regardless of the justification. When humans solve their problems by +talking to other humans with respect, everyone has the chance to end up +feeling good about the interaction. + +## EXCEPTIONS + +Some things are not allowed, and will be removed without discussion if +they are brought to the attention of the npm registry admins, including +but not limited to: + +1. Malware (that is, a package designed to exploit or harm the machine on + which it is installed). +2. Violations of copyright or licenses (for example, cloning an + MIT-licensed program, and then removing or changing the copyright and + license statement). +3. Illegal content. +4. "Squatting" on a package name that you *plan* to use, but aren't + actually using. Sorry, I don't care how great the name is, or how + perfect a fit it is for the thing that someday might happen. If + someone wants to use it today, and you're just taking up space with + an empty tarball, you're going to be evicted. +5. Putting empty packages in the registry. Packages must have SOME + functionality. It can be silly, but it can't be *nothing*. (See + also: squatting.) +6. Doing weird things with the registry, like using it as your own + personal application database or otherwise putting non-packagey + things into it. + +If you see bad behavior like this, please report it right away. + +## SEE ALSO + +* npm-registry(7) +* npm-owner(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-index.md b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-index.md new file mode 100644 index 00000000..9bf0a570 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-index.md @@ -0,0 +1,443 @@ +npm-index(7) -- Index of all npm documentation +============================================== + +### README(1) + +a JavaScript package manager + +## Command Line Documentation + +Using npm on the command line + +### npm(1) + +javascript package manager + +### npm-access(1) + +Set access level on published packages + +### npm-adduser(1) + +Add a registry user account + +### npm-bin(1) + +Display npm bin folder + +### npm-bugs(1) + +Bugs for a package in a web browser maybe + +### npm-build(1) + +Build a package + +### npm-bundle(1) + +REMOVED + +### npm-cache(1) + +Manipulates packages cache + +### npm-completion(1) + +Tab Completion for npm + +### npm-config(1) + +Manage the npm configuration files + +### npm-dedupe(1) + +Reduce duplication + +### npm-deprecate(1) + +Deprecate a version of a package + +### npm-dist-tag(1) + +Modify package distribution tags + +### npm-docs(1) + +Docs for a package in a web browser maybe + +### npm-edit(1) + +Edit an installed package + +### npm-explore(1) + +Browse an installed package + +### npm-help-search(1) + +Search npm help documentation + +### npm-help(1) + +Get help on npm + +### npm-init(1) + +Interactively create a package.json file + +### npm-install(1) + +Install a package + +### npm-link(1) + +Symlink a package folder + +### npm-logout(1) + +Log out of the registry + +### npm-ls(1) + +List installed packages + +### npm-outdated(1) + +Check for outdated packages + +### npm-owner(1) + +Manage package owners + +### npm-pack(1) + +Create a tarball from a package + +### npm-ping(1) + +Ping npm registry + +### npm-prefix(1) + +Display prefix + +### npm-prune(1) + +Remove extraneous packages + +### npm-publish(1) + +Publish a package + +### npm-rebuild(1) + +Rebuild a package + +### npm-repo(1) + +Open package repository page in the browser + +### npm-restart(1) + +Restart a package + +### npm-rm(1) + +Remove a package + +### npm-root(1) + +Display npm root + +### npm-run-script(1) + +Run arbitrary package scripts + +### npm-search(1) + +Search for packages + +### npm-shrinkwrap(1) + +Lock down dependency versions + +### npm-star(1) + +Mark your favorite packages + +### npm-stars(1) + +View packages marked as favorites + +### npm-start(1) + +Start a package + +### npm-stop(1) + +Stop a package + +### npm-tag(1) + +Tag a published version + +### npm-team(1) + +Manage organization teams and team memberships + +### npm-test(1) + +Test a package + +### npm-uninstall(1) + +Remove a package + +### npm-unpublish(1) + +Remove a package from the registry + +### npm-update(1) + +Update a package + +### npm-version(1) + +Bump a package version + +### npm-view(1) + +View registry info + +### npm-whoami(1) + +Display npm username + +## API Documentation + +Using npm in your Node programs + +### npm(3) + +javascript package manager + +### npm-bin(3) + +Display npm bin folder + +### npm-bugs(3) + +Bugs for a package in a web browser maybe + +### npm-cache(3) + +manage the npm cache programmatically + +### npm-commands(3) + +npm commands + +### npm-config(3) + +Manage the npm configuration files + +### npm-deprecate(3) + +Deprecate a version of a package + +### npm-docs(3) + +Docs for a package in a web browser maybe + +### npm-edit(3) + +Edit an installed package + +### npm-explore(3) + +Browse an installed package + +### npm-help-search(3) + +Search the help pages + +### npm-init(3) + +Interactively create a package.json file + +### npm-install(3) + +install a package programmatically + +### npm-link(3) + +Symlink a package folder + +### npm-load(3) + +Load config settings + +### npm-ls(3) + +List installed packages + +### npm-outdated(3) + +Check for outdated packages + +### npm-owner(3) + +Manage package owners + +### npm-pack(3) + +Create a tarball from a package + +### npm-ping(3) + +Ping npm registry + +### npm-prefix(3) + +Display prefix + +### npm-prune(3) + +Remove extraneous packages + +### npm-publish(3) + +Publish a package + +### npm-rebuild(3) + +Rebuild a package + +### npm-repo(3) + +Open package repository page in the browser + +### npm-restart(3) + +Restart a package + +### npm-root(3) + +Display npm root + +### npm-run-script(3) + +Run arbitrary package scripts + +### npm-search(3) + +Search for packages + +### npm-shrinkwrap(3) + +programmatically generate package shrinkwrap file + +### npm-start(3) + +Start a package + +### npm-stop(3) + +Stop a package + +### npm-tag(3) + +Tag a published version + +### npm-test(3) + +Test a package + +### npm-uninstall(3) + +uninstall a package programmatically + +### npm-unpublish(3) + +Remove a package from the registry + +### npm-update(3) + +Update a package + +### npm-version(3) + +Bump a package version + +### npm-view(3) + +View registry info + +### npm-whoami(3) + +Display npm username + +## Files + +File system structures npm uses + +### npm-folders(5) + +Folder Structures Used by npm + +### npmrc(5) + +The npm config files + +### package.json(5) + +Specifics of npm's package.json handling + +## Misc + +Various other bits and bobs + +### npm-coding-style(7) + +npm's "funny" coding style + +### npm-config(7) + +More than you probably want to know about npm configuration + +### npm-developers(7) + +Developer Guide + +### npm-disputes(7) + +Handling Module Name Disputes + +### npm-index(7) + +Index of all npm documentation + +### npm-orgs(7) + +Working with Teams & Orgs + +### npm-registry(7) + +The JavaScript Package Registry + +### npm-scope(7) + +Scoped packages + +### npm-scripts(7) + +How npm handles the "scripts" field + +### removing-npm(7) + +Cleaning the Slate + +### semver(7) + +The semantic versioner for npm + diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-orgs.md b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-orgs.md new file mode 100644 index 00000000..89b2e589 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-orgs.md @@ -0,0 +1,90 @@ +npm-orgs(7) -- Working with Teams & Orgs +======================================== + +## DESCRIPTION + +There are three levels of org users: + +1. Super admin, controls billing & adding people to the org. +2. Team admin, manages team membership & package access. +3. Developer, works on packages they are given access to. + +The super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a `developers` team that all users are automatically added to. + +The team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals. + +The developer will be able to access packages based on the teams they are on. Access is either read-write or read-only. + +There are two main commands: + +1. `npm team` see npm-access(1) for more details +2. `npm access` see npm-team(1) for more details + +## Team Admins create teams + +* Check who you’ve added to your org: + +``` +npm team ls <org>:developers +``` + +* Each org is automatically given a `developers` team, so you can see the whole list of team members in your org. This team automatically gets read-write access to all packages, but you can change that with the `access` command. + +* Create a new team: + +``` +npm team create <org:team> +``` + +* Add members to that team: + +``` +npm team add <org:team> <user> +``` + +## Publish a package and adjust package access + +* In package directory, run + +``` +npm init --scope=<org> +``` +to scope it for your org & publish as usual + +* Grant access: + +``` +npm access grant <read-only|read-write> <org:team> [<package>] +``` + +* Revoke access: + +``` +npm access revoke <org:team> [<package>] +``` + +## Monitor your package access + +* See what org packages a team member can access: + +``` +npm access ls-packages <org> <user> +``` + +* See packages available to a specific team: + +``` +npm access ls-packages <org:team> +``` + +* Check which teams are collaborating on a package: + +``` +npm access ls-collaborators <pkg> +``` + +## SEE ALSO + +* npm-team(1) +* npm-access(1) +* npm-scope(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-registry.md b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-registry.md new file mode 100644 index 00000000..6203a4f9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-registry.md @@ -0,0 +1,69 @@ +npm-registry(7) -- The JavaScript Package Registry +================================================== + +## DESCRIPTION + +To resolve packages by name and version, npm talks to a registry website +that implements the CommonJS Package Registry specification for reading +package info. + +Additionally, npm's package registry implementation supports several +write APIs as well, to allow for publishing packages and managing user +account information. + +The official public npm registry is at <https://registry.npmjs.org/>. It +is powered by a CouchDB database, of which there is a public mirror at +<https://skimdb.npmjs.com/registry>. The code for the couchapp is +available at <https://github.com/npm/npm-registry-couchapp>. + +The registry URL used is determined by the scope of the package (see +`npm-scope(7)`). If no scope is specified, the default registry is used, which is +supplied by the `registry` config parameter. See `npm-config(1)`, +`npmrc(5)`, and `npm-config(7)` for more on managing npm's configuration. + +## Can I run my own private registry? + +Yes! + +The easiest way is to replicate the couch database, and use the same (or +similar) design doc to implement the APIs. + +If you set up continuous replication from the official CouchDB, and then +set your internal CouchDB as the registry config, then you'll be able +to read any published packages, in addition to your private ones, and by +default will only publish internally. + +If you then want to publish a package for the whole world to see, you can +simply override the `--registry` option for that `publish` command. + +## I don't want my package published in the official registry. It's private. + +Set `"private": true` in your package.json to prevent it from being +published at all, or +`"publishConfig":{"registry":"http://my-internal-registry.local"}` +to force it to be published only to your internal registry. + +See `package.json(5)` for more info on what goes in the package.json file. + +## Will you replicate from my registry into the public one? + +No. If you want things to be public, then publish them into the public +registry using npm. What little security there is would be for nought +otherwise. + +## Do I have to use couchdb to build a registry that npm can talk to? + +No, but it's way easier. Basically, yes, you do, or you have to +effectively implement the entire CouchDB API anyway. + +## Is there a website or something to see package docs and such? + +Yes, head over to <https://npmjs.com/> + +## SEE ALSO + +* npm-config(1) +* npm-config(7) +* npmrc(5) +* npm-developers(7) +* npm-disputes(7) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-scope.md b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-scope.md new file mode 100644 index 00000000..33686013 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-scope.md @@ -0,0 +1,105 @@ +npm-scope(7) -- Scoped packages +=============================== + +## DESCRIPTION + +All npm packages have a name. Some package names also have a scope. A scope +follows the usual rules for package names (url-safe characters, no leading dots +or underscores). When used in package names, preceded by an @-symbol and +followed by a slash, e.g. + + @somescope/somepackagename + +Scopes are a way of grouping related packages together, and also affect a few +things about the way npm treats the package. + +Scoped packages are supported by the public npm registry. The npm +client is backwards-compatible with un-scoped registries, so it can be +used to work with scoped and un-scoped registries at the same time. + +## Installing scoped packages + +Scoped packages are installed to a sub-folder of the regular installation +folder, e.g. if your other packages are installed in `node_modules/packagename`, +scoped modules will be in `node_modules/@myorg/packagename`. The scope folder +(`@myorg`) is simply the name of the scope preceded by an @-symbol, and can +contain any number of scoped packages. + +A scoped package is installed by referencing it by name, preceded by an +@-symbol, in `npm install`: + + npm install @myorg/mypackage + +Or in `package.json`: + + "dependencies": { + "@myorg/mypackage": "^1.3.0" + } + +Note that if the @-symbol is omitted in either case npm will instead attempt to +install from GitHub; see `npm-install(1)`. + +## Requiring scoped packages + +Because scoped packages are installed into a scope folder, you have to +include the name of the scope when requiring them in your code, e.g. + + require('@myorg/mypackage') + +There is nothing special about the way Node treats scope folders, this is +just specifying to require the module `mypackage` in the folder called `@myorg`. + +## Publishing scoped packages + +Scoped packages can be published to any registry that supports them, including +the public npm registry. + +(As of 2015-04-19, and with npm 2.0 or newer, the public npm registry **does** +support scoped packages) + +If you wish, you may associate a scope with a registry; see below. + +### Publishing public scoped packages to the public npm registry + +To publish a public scoped package, you must specify `--access public` with +the initial publication. This will publish the package and set access +to `public` as if you had run `npm access public` after publishing. + +### Publishing private scoped packages to the npm registry + +To publish a private scoped package to the npm registry, you must have +an [npm Private Modules](https://www.npmjs.com/private-modules) +account. + +You can then publish the module with `npm publish` or `npm publish +--access restricted`, and it will be present in the npm registry, with +restricted access. You can then change the access permissions, if +desired, with `npm access` or on the npmjs.com website. + +## Associating a scope with a registry + +Scopes can be associated with a separate registry. This allows you to +seamlessly use a mix of packages from the public npm registry and one or more +private registries, such as npm Enterprise. + +You can associate a scope with a registry at login, e.g. + + npm login --registry=http://reg.example.com --scope=@myco + +Scopes have a many-to-one relationship with registries: one registry can +host multiple scopes, but a scope only ever points to one registry. + +You can also associate a scope with a registry using `npm config`: + + npm config set @myco:registry http://reg.example.com + +Once a scope is associated with a registry, any `npm install` for a package +with that scope will request packages from that registry instead. Any +`npm publish` for a package name that contains the scope will be published to +that registry instead. + +## SEE ALSO + +* npm-install(1) +* npm-publish(1) +* npm-access(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-scripts.md b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-scripts.md new file mode 100644 index 00000000..82920189 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/misc/npm-scripts.md @@ -0,0 +1,230 @@ +npm-scripts(7) -- How npm handles the "scripts" field +===================================================== + +## DESCRIPTION + +npm supports the "scripts" property of the package.json script, for the +following scripts: + +* prepublish: + Run BEFORE the package is published. (Also run on local `npm + install` without any arguments.) +* publish, postpublish: + Run AFTER the package is published. +* preinstall: + Run BEFORE the package is installed +* install, postinstall: + Run AFTER the package is installed. +* preuninstall, uninstall: + Run BEFORE the package is uninstalled. +* postuninstall: + Run AFTER the package is uninstalled. +* preversion, version: + Run BEFORE bump the package version. +* postversion: + Run AFTER bump the package version. +* pretest, test, posttest: + Run by the `npm test` command. +* prestop, stop, poststop: + Run by the `npm stop` command. +* prestart, start, poststart: + Run by the `npm start` command. +* prerestart, restart, postrestart: + Run by the `npm restart` command. Note: `npm restart` will run the + stop and start scripts if no `restart` script is provided. + +Additionally, arbitrary scripts can be executed by running `npm +run-script <pkg> <stage>`. *Pre* and *post* commands with matching +names will be run for those as well (e.g. `premyscript`, `myscript`, +`postmyscript`). + +## COMMON USES + +If you need to perform operations on your package before it is used, in a way +that is not dependent on the operating system or architecture of the +target system, use a `prepublish` script. This includes +tasks such as: + +* Compiling CoffeeScript source code into JavaScript. +* Creating minified versions of JavaScript source code. +* Fetching remote resources that your package will use. + +The advantage of doing these things at `prepublish` time is that they can be done once, in a +single place, thus reducing complexity and variability. +Additionally, this means that: + +* You can depend on `coffee-script` as a `devDependency`, and thus + your users don't need to have it installed. +* You don't need to include minifiers in your package, reducing + the size for your users. +* You don't need to rely on your users having `curl` or `wget` or + other system tools on the target machines. + +## DEFAULT VALUES + +npm will default some script values based on package contents. + +* `"start": "node server.js"`: + + If there is a `server.js` file in the root of your package, then npm + will default the `start` command to `node server.js`. + +* `"install": "node-gyp rebuild"`: + + If there is a `bindings.gyp` file in the root of your package, npm will + default the `install` command to compile using node-gyp. + +## USER + +If npm was invoked with root privileges, then it will change the uid +to the user account or uid specified by the `user` config, which +defaults to `nobody`. Set the `unsafe-perm` flag to run scripts with +root privileges. + +## ENVIRONMENT + +Package scripts run in an environment where many pieces of information +are made available regarding the setup of npm and the current state of +the process. + + +### path + +If you depend on modules that define executable scripts, like test +suites, then those executables will be added to the `PATH` for +executing the scripts. So, if your package.json has this: + + { "name" : "foo" + , "dependencies" : { "bar" : "0.1.x" } + , "scripts": { "start" : "bar ./test" } } + +then you could run `npm start` to execute the `bar` script, which is +exported into the `node_modules/.bin` directory on `npm install`. + +### package.json vars + +The package.json fields are tacked onto the `npm_package_` prefix. So, +for instance, if you had `{"name":"foo", "version":"1.2.5"}` in your +package.json file, then your package scripts would have the +`npm_package_name` environment variable set to "foo", and the +`npm_package_version` set to "1.2.5" + +### configuration + +Configuration parameters are put in the environment with the +`npm_config_` prefix. For instance, you can view the effective `root` +config by checking the `npm_config_root` environment variable. + +### Special: package.json "config" object + +The package.json "config" keys are overwritten in the environment if +there is a config param of `<name>[@<version>]:<key>`. For example, +if the package.json has this: + + { "name" : "foo" + , "config" : { "port" : "8080" } + , "scripts" : { "start" : "node server.js" } } + +and the server.js is this: + + http.createServer(...).listen(process.env.npm_package_config_port) + +then the user could change the behavior by doing: + + npm config set foo:port 80 + +### current lifecycle event + +Lastly, the `npm_lifecycle_event` environment variable is set to +whichever stage of the cycle is being executed. So, you could have a +single script used for different parts of the process which switches +based on what's currently happening. + +Objects are flattened following this format, so if you had +`{"scripts":{"install":"foo.js"}}` in your package.json, then you'd +see this in the script: + + process.env.npm_package_scripts_install === "foo.js" + +## EXAMPLES + +For example, if your package.json contains this: + + { "scripts" : + { "install" : "scripts/install.js" + , "postinstall" : "scripts/install.js" + , "uninstall" : "scripts/uninstall.js" + } + } + +then `scripts/install.js` will be called for the install +and post-install stages of the lifecycle, and `scripts/uninstall.js` +will be called when the package is uninstalled. Since +`scripts/install.js` is running for two different phases, it would +be wise in this case to look at the `npm_lifecycle_event` environment +variable. + +If you want to run a make command, you can do so. This works just +fine: + + { "scripts" : + { "preinstall" : "./configure" + , "install" : "make && make install" + , "test" : "make test" + } + } + +## EXITING + +Scripts are run by passing the line as a script argument to `sh`. + +If the script exits with a code other than 0, then this will abort the +process. + +Note that these script files don't have to be nodejs or even +javascript programs. They just have to be some kind of executable +file. + +## HOOK SCRIPTS + +If you want to run a specific script at a specific lifecycle event for +ALL packages, then you can use a hook script. + +Place an executable file at `node_modules/.hooks/{eventname}`, and +it'll get run for all packages when they are going through that point +in the package lifecycle for any packages installed in that root. + +Hook scripts are run exactly the same way as package.json scripts. +That is, they are in a separate child process, with the env described +above. + +## BEST PRACTICES + +* Don't exit with a non-zero error code unless you *really* mean it. + Except for uninstall scripts, this will cause the npm action to + fail, and potentially be rolled back. If the failure is minor or + only will prevent some optional features, then it's better to just + print a warning and exit successfully. +* Try not to use scripts to do what npm can do for you. Read through + `package.json(5)` to see all the things that you can specify and enable + by simply describing your package appropriately. In general, this + will lead to a more robust and consistent state. +* Inspect the env to determine where to put things. For instance, if + the `npm_config_binroot` environment variable is set to `/home/user/bin`, then + don't try to install executables into `/usr/local/bin`. The user + probably set it up that way for a reason. +* Don't prefix your script commands with "sudo". If root permissions + are required for some reason, then it'll fail with that error, and + the user will sudo the npm command in question. +* Don't use `install`. Use a `.gyp` file for compilation, and `prepublish` + for anything else. You should almost never have to explicitly set a + preinstall or install script. If you are doing this, please consider if + there is another option. The only valid use of `install` or `preinstall` + scripts is for compilation which must be done on the target architecture. + +## SEE ALSO + +* npm-run-script(1) +* package.json(5) +* npm-developers(7) +* npm-install(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/misc/removing-npm.md b/bin/nodejs0.12.16/node_modules/npm/doc/misc/removing-npm.md new file mode 100644 index 00000000..dde8765a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/misc/removing-npm.md @@ -0,0 +1,54 @@ +npm-removal(1) -- Cleaning the Slate +==================================== + +## SYNOPSIS + +So sad to see you go. + + sudo npm uninstall npm -g + +Or, if that fails, get the npm source code, and do: + + sudo make uninstall + +## More Severe Uninstalling + +Usually, the above instructions are sufficient. That will remove +npm, but leave behind anything you've installed. + +If that doesn't work, or if you require more drastic measures, +continue reading. + +Note that this is only necessary for globally-installed packages. Local +installs are completely contained within a project's `node_modules` +folder. Delete that folder, and everything is gone (unless a package's +install script is particularly ill-behaved). + +This assumes that you installed node and npm in the default place. If +you configured node with a different `--prefix`, or installed npm with a +different prefix setting, then adjust the paths accordingly, replacing +`/usr/local` with your install prefix. + +To remove everything npm-related manually: + + rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm* + +If you installed things *with* npm, then your best bet is to uninstall +them with npm first, and then install them again once you have a +proper install. This can help find any symlinks that are lying +around: + + ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm + +Prior to version 0.3, npm used shim files for executables and node +modules. To track those down, you can do the following: + + find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ; + +(This is also in the README file.) + +## SEE ALSO + +* README +* npm-uninstall(1) +* npm-prune(1) diff --git a/bin/nodejs0.12.16/node_modules/npm/doc/misc/semver.md b/bin/nodejs0.12.16/node_modules/npm/doc/misc/semver.md new file mode 100644 index 00000000..d9314542 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/doc/misc/semver.md @@ -0,0 +1,327 @@ +semver(7) -- The semantic versioner for npm +=========================================== + +## Usage + + $ npm install semver + + semver.valid('1.2.3') // '1.2.3' + semver.valid('a.b.c') // null + 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 + +As a command-line utility: + + $ semver -h + + Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | --preid <identifier> | -l | -rv] + Test if version(s) satisfy the supplied range(s), and sort them. + + Multiple versions or ranges may be supplied, unless increment + option is specified. In that case, only a single version may + be used, and it is incremented by the specified level + + Program exits successfully if any valid version satisfies + all supplied ranges, and prints all satisfying versions. + + If no versions are valid, or ranges are not satisfied, + then exits failure. + + Versions are printed in ascending order, so supplying + 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/>. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +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. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +> semver.inc('1.2.3', 'prerelease', 'beta') +'1.2.4-beta.0' +``` + +command-line example: + +```shell +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```shell +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9']['0'-'9']+ +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `loose` boolean argument that, if +true, will be more forgiving about not-quite-valid semver strings. +The resulting output will always be 100% strict, of course. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `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 + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. diff --git a/bin/nodejs0.12.16/node_modules/npm/html/doc/README.html b/bin/nodejs0.12.16/node_modules/npm/html/doc/README.html new file mode 100644 index 00000000..ac68514b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/html/doc/README.html @@ -0,0 +1,131 @@ +<!doctype html> +<html> + <title>README + + + + + + +

    + +

    npm

    a JavaScript package manager

    +

    Build Status

    +

    SYNOPSIS

    +

    This is just enough info to get you up and running.

    +

    Much more info available via npm help once it's installed.

    +

    IMPORTANT

    +

    You need node v0.8 or higher to run this program.

    +

    To install an old and unsupported version of npm that works on node 0.3 +and prior, clone the git repo and dig through the old tags and branches.

    +

    npm is configured to use npm, Inc.'s public package registry at +https://registry.npmjs.org by default.

    +

    You can configure npm to use any compatible registry you +like, and even run your own registry. Check out the doc on +registries.

    +

    Use of someone else's registry may be governed by terms of use. The +terms of use for the default public registry are available at +https://www.npmjs.com.

    +

    Super Easy Install

    +

    npm is bundled with node.

    +

    Windows Computers

    +

    Get the MSI. npm is in it.

    +

    Apple Macintosh Computers

    +

    Get the pkg. npm is in it.

    +

    Other Sorts of Unices

    +

    Run make install. npm will be installed with node.

    +

    If you want a more fancy pants install (a different version, customized +paths, etc.) then read on.

    +

    Fancy Install (Unix)

    +

    There's a pretty robust install script at +https://www.npmjs.com/install.sh. You can download that and run it.

    +

    Here's an example using curl:

    +
    curl -L https://www.npmjs.com/install.sh | sh
    +
    +

    Slightly Fancier

    +

    You can set any npm configuration params with that script:

    +
    npm_config_prefix=/some/path sh install.sh
    +
    +

    Or, you can run it in uber-debuggery mode:

    +
    npm_debug=1 sh install.sh
    +
    +

    Even Fancier

    +

    Get the code with git. Use make to build the docs and do other stuff. +If you plan on hacking on npm, make link is your friend.

    +

    If you've got the npm source code, you can also semi-permanently set +arbitrary config keys using the ./configure --key=val ..., and then +run npm commands by doing node cli.js <cmd> <args>. (This is helpful +for testing, or running stuff without actually installing npm itself.)

    +

    Windows Install or Upgrade

    +

    You can download a zip file from https://github.com/npm/npm/releases, and +unpack it in the node_modules\npm\ folder inside node's installation folder.

    +

    To upgrade to npm 2, follow the Windows upgrade instructions in +the npm Troubleshooting Guide:

    +

    https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

    +

    If that's not fancy enough for you, then you can fetch the code with +git, and mess with it directly.

    +

    Installing on Cygwin

    +

    No.

    +

    Uninstalling

    +

    So sad to see you go.

    +
    sudo npm uninstall npm -g
    +
    +

    Or, if that fails,

    +
    sudo make uninstall
    +
    +

    More Severe Uninstalling

    +

    Usually, the above instructions are sufficient. That will remove +npm, but leave behind anything you've installed.

    +

    If you would like to remove all the packages that you have installed, +then you can use the npm ls command to find them, and then npm rm to +remove them.

    +

    To remove cruft left behind by npm 0.x, you can use the included +clean-old.sh script file. You can run it conveniently like this:

    +
    npm explore npm -g -- sh scripts/clean-old.sh
    +
    +

    npm uses two configuration files, one for per-user configs, and another +for global (every-user) configs. You can view them by doing:

    +
    npm config get userconfig   # defaults to ~/.npmrc
    +npm config get globalconfig # defaults to /usr/local/etc/npmrc
    +
    +

    Uninstalling npm does not remove configuration files by default. You +must remove them yourself manually if you want them gone. Note that +this means that future npm installs will not remember the settings that +you have chosen.

    +

    More Docs

    +

    Check out the docs, +especially the faq.

    +

    You can use the npm help command to read any of them.

    +

    If you're a developer, and you want to use npm to publish your program, +you should read this

    +

    BUGS

    +

    When you find issues, please report them:

    + +

    Be sure to include all of the output from the npm command that didn't work +as expected. The npm-debug.log file is also helpful to provide.

    +

    You can also look for isaacs in #node.js on irc://irc.freenode.net. He +will no doubt tell you to put the output in a gist or email.

    +

    SEE ALSO

    + + +
    + + + + + + + + + + + + diff --git a/bin/nodejs0.12.16/node_modules/npm/html/doc/index.html b/bin/nodejs0.12.16/node_modules/npm/html/doc/index.html new file mode 100644 index 00000000..c66eaaf2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/html/doc/index.html @@ -0,0 +1,246 @@ + + + npm-index + + + + + + +
    + +

    npm-index

    Index of all npm documentation

    +

    README

    +

    a JavaScript package manager

    +

    Command Line Documentation

    +

    Using npm on the command line

    +

    npm(1)

    +

    javascript package manager

    +

    npm-access(1)

    +

    Set access level on published packages

    +

    npm-adduser(1)

    +

    Add a registry user account

    +

    npm-bin(1)

    +

    Display npm bin folder

    +

    npm-bugs(1)

    +

    Bugs for a package in a web browser maybe

    +

    npm-build(1)

    +

    Build a package

    +

    npm-bundle(1)

    +

    REMOVED

    +

    npm-cache(1)

    +

    Manipulates packages cache

    +

    npm-completion(1)

    +

    Tab Completion for npm

    +

    npm-config(1)

    +

    Manage the npm configuration files

    +

    npm-dedupe(1)

    +

    Reduce duplication

    +

    npm-deprecate(1)

    +

    Deprecate a version of a package

    +

    npm-dist-tag(1)

    +

    Modify package distribution tags

    +

    npm-docs(1)

    +

    Docs for a package in a web browser maybe

    +

    npm-edit(1)

    +

    Edit an installed package

    +

    npm-explore(1)

    +

    Browse an installed package

    +

    npm-help-search(1)

    +

    Search npm help documentation

    +

    npm-help(1)

    +

    Get help on npm

    +

    npm-init(1)

    +

    Interactively create a package.json file

    +

    npm-install(1)

    +

    Install a package

    + +

    Symlink a package folder

    +

    npm-logout(1)

    +

    Log out of the registry

    +

    npm-ls(1)

    +

    List installed packages

    +

    npm-outdated(1)

    +

    Check for outdated packages

    +

    npm-owner(1)

    +

    Manage package owners

    +

    npm-pack(1)

    +

    Create a tarball from a package

    +

    npm-ping(1)

    +

    Ping npm registry

    +

    npm-prefix(1)

    +

    Display prefix

    +

    npm-prune(1)

    +

    Remove extraneous packages

    +

    npm-publish(1)

    +

    Publish a package

    +

    npm-rebuild(1)

    +

    Rebuild a package

    +

    npm-repo(1)

    +

    Open package repository page in the browser

    +

    npm-restart(1)

    +

    Restart a package

    +

    npm-rm(1)

    +

    Remove a package

    +

    npm-root(1)

    +

    Display npm root

    +

    npm-run-script(1)

    +

    Run arbitrary package scripts

    +

    npm-search(1)

    +

    Search for packages

    +

    npm-shrinkwrap(1)

    +

    Lock down dependency versions

    +

    npm-star(1)

    +

    Mark your favorite packages

    +

    npm-stars(1)

    +

    View packages marked as favorites

    +

    npm-start(1)

    +

    Start a package

    +

    npm-stop(1)

    +

    Stop a package

    +

    npm-tag(1)

    +

    Tag a published version

    +

    npm-team(1)

    +

    Manage organization teams and team memberships

    +

    npm-test(1)

    +

    Test a package

    +

    npm-uninstall(1)

    +

    Remove a package

    +

    npm-unpublish(1)

    +

    Remove a package from the registry

    +

    npm-update(1)

    +

    Update a package

    +

    npm-version(1)

    +

    Bump a package version

    +

    npm-view(1)

    +

    View registry info

    +

    npm-whoami(1)

    +

    Display npm username

    +

    API Documentation

    +

    Using npm in your Node programs

    +

    npm(3)

    +

    javascript package manager

    +

    npm-bin(3)

    +

    Display npm bin folder

    +

    npm-bugs(3)

    +

    Bugs for a package in a web browser maybe

    +

    npm-cache(3)

    +

    manage the npm cache programmatically

    +

    npm-commands(3)

    +

    npm commands

    +

    npm-config(3)

    +

    Manage the npm configuration files

    +

    npm-deprecate(3)

    +

    Deprecate a version of a package

    +

    npm-docs(3)

    +

    Docs for a package in a web browser maybe

    +

    npm-edit(3)

    +

    Edit an installed package

    +

    npm-explore(3)

    +

    Browse an installed package

    +

    npm-help-search(3)

    +

    Search the help pages

    +

    npm-init(3)

    +

    Interactively create a package.json file

    +

    npm-install(3)

    +

    install a package programmatically

    + +

    Symlink a package folder

    +

    npm-load(3)

    +

    Load config settings

    +

    npm-ls(3)

    +

    List installed packages

    +

    npm-outdated(3)

    +

    Check for outdated packages

    +

    npm-owner(3)

    +

    Manage package owners

    +

    npm-pack(3)

    +

    Create a tarball from a package

    +

    npm-ping(3)

    +

    Ping npm registry

    +

    npm-prefix(3)

    +

    Display prefix

    +

    npm-prune(3)

    +

    Remove extraneous packages

    +

    npm-publish(3)

    +

    Publish a package

    +

    npm-rebuild(3)

    +

    Rebuild a package

    +

    npm-repo(3)

    +

    Open package repository page in the browser

    +

    npm-restart(3)

    +

    Restart a package

    +

    npm-root(3)

    +

    Display npm root

    +

    npm-run-script(3)

    +

    Run arbitrary package scripts

    +

    npm-search(3)

    +

    Search for packages

    +

    npm-shrinkwrap(3)

    +

    programmatically generate package shrinkwrap file

    +

    npm-start(3)

    +

    Start a package

    +

    npm-stop(3)

    +

    Stop a package

    +

    npm-tag(3)

    +

    Tag a published version

    +

    npm-test(3)

    +

    Test a package

    +

    npm-uninstall(3)

    +

    uninstall a package programmatically

    +

    npm-unpublish(3)

    +

    Remove a package from the registry

    +

    npm-update(3)

    +

    Update a package

    +

    npm-version(3)

    +

    Bump a package version

    +

    npm-view(3)

    +

    View registry info

    +

    npm-whoami(3)

    +

    Display npm username

    +

    Files

    +

    File system structures npm uses

    +

    npm-folders(5)

    +

    Folder Structures Used by npm

    +

    npmrc(5)

    +

    The npm config files

    +

    package.json(5)

    +

    Specifics of npm's package.json handling

    +

    Misc

    +

    Various other bits and bobs

    +

    npm-coding-style(7)

    +

    npm's "funny" coding style

    +

    npm-config(7)

    +

    More than you probably want to know about npm configuration

    +

    npm-developers(7)

    +

    Developer Guide

    +

    npm-disputes(7)

    +

    Handling Module Name Disputes

    +

    npm-index(7)

    +

    Index of all npm documentation

    +

    npm-orgs(7)

    +

    Working with Teams & Orgs

    +

    npm-registry(7)

    +

    The JavaScript Package Registry

    +

    npm-scope(7)

    +

    Scoped packages

    +

    npm-scripts(7)

    +

    How npm handles the "scripts" field

    +

    removing-npm(7)

    +

    Cleaning the Slate

    +

    semver(7)

    +

    The semantic versioner for npm

    + +
    + + + + + + + + + + + + diff --git a/bin/nodejs0.12.16/node_modules/npm/html/docfoot.html b/bin/nodejs0.12.16/node_modules/npm/html/docfoot.html new file mode 100644 index 00000000..0cf4145d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/html/docfoot.html @@ -0,0 +1,13 @@ +

  • + + + + + + + + + + + + diff --git a/bin/nodejs0.12.16/node_modules/npm/html/dochead.html b/bin/nodejs0.12.16/node_modules/npm/html/dochead.html new file mode 100644 index 00000000..4d52bb8d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/html/dochead.html @@ -0,0 +1,11 @@ + + + @NAME@ + + + + + + +
    + diff --git a/bin/nodejs0.12.16/node_modules/npm/html/favicon.ico b/bin/nodejs0.12.16/node_modules/npm/html/favicon.ico new file mode 100644 index 00000000..9e0d4eef Binary files /dev/null and b/bin/nodejs0.12.16/node_modules/npm/html/favicon.ico differ diff --git a/bin/nodejs0.12.16/node_modules/npm/html/index.html b/bin/nodejs0.12.16/node_modules/npm/html/index.html new file mode 100644 index 00000000..4b33c075 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/html/index.html @@ -0,0 +1,95 @@ + + + + + + npm - JavaScript Package Manager + +

    npm

    + +

    npm is a package manager for node. You can use it to install + and publish your node programs. It manages dependencies and does other cool stuff.

    + +

    Easy Zero Line Install

    + +

    Install Node.js
    +(npm comes with it.)

    + +

    Because a one-line install is one too many.

    + +

    Fancy Install

    + +
      +
    1. Get the code. +
    2. Do what the README + says to do. +
    + +

    There's a pretty thorough install script at +https://npmjs.org/install.sh

    + +

    For maximum security, make sure to thorougly inspect every +program that you run on your computer!

    + +

    Other Cool Stuff

    + + + + + diff --git a/bin/nodejs0.12.16/node_modules/npm/html/static/style.css b/bin/nodejs0.12.16/node_modules/npm/html/static/style.css new file mode 100644 index 00000000..fc26fee7 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/html/static/style.css @@ -0,0 +1,336 @@ +/* reset */ +* { + margin:0; + padding:0; + border:none; + font-family:inherit; + font-size:inherit; + font-weight:inherit; +} +:target::before { + content:" >>> "; + position:absolute; + display:block; + opacity:0.5; + color:#f00; + margin:0 0 0 -2em; +} +abbr, acronym { + border-bottom:1px dotted #aaa; +} +kbd, code, pre { + font-family:monospace; + margin:0; + font-size:18px; + line-height:24px; + background:#eee; + outline:1px solid #ccc; +} +kbd code, kbd pre, kbd kbd, +pre code, pre pre, pre kbd, +code code, code pre, code kbd { outline: none } +.dollar::before { + content:"$ "; + display:inline; +} +p, ul, ol, dl, pre { + margin:30px 0; + line-height:30px; +} +hr { + margin:30px auto 29px; + width:66%; + height:1px; + background:#aaa; +} +pre { + display:block; +} +dd :first-child { + margin-top:0; +} + +body { + quotes:"“" "”" "‘" "’"; + width:666px; + margin:30px auto 120px; + font-family:Times New Roman, serif; + font-size:20px; + background:#fff; + line-height:30px; + color:#111; +} + +blockquote { + position:relative; + font-size:16px; + line-height:30px; + font-weight:bold; + width:85%; + margin:0 auto; +} +blockquote::before { + font-size:90px; + display:block; + position:absolute; + top:20px; + right:100%; + content:"“"; + padding-right:10px; + color:#ccc; +} +.source cite::before { + content:"— "; +} +.source { + padding-left:20%; + margin-top:30px; +} +.source cite span { + font-style:normal; +} +blockquote p { + margin-bottom:0; +} +.quote blockquote { + font-weight:normal; +} + +h1, h2, h3, h4, h5, h6, dt, #header { + font-family:serif; + font-size:20px; + font-weight:bold; +} +h2 { + background:#eee; +} +h1, h2 { + line-height:40px; +} + +i, em, cite { + font-style:italic; +} +b, strong { + font-weight:bold; +} +i, em, cite, b, strong, small { + line-height:28px; +} +small, .small, .small *, aside { + font-style:italic; + color:#669; + font-size:18px; +} +small a, .small a { + text-decoration:underline; +} +del { + text-decoration:line-through; +} +ins { + text-decoration:underline; +} +.alignright { display:block; float:right; margin-left:1em; } +.alignleft { display:block; float:left; margin-right:1em; } + +q:before, q q q:before, q q q q q:before, q q q q q q q:before { content:"“"; } +q q:before, q q q q:before, q q q q q q:before, q q q q q q q q:before { content:"‘"; } +q:after, q q q:after, q q q q q:after, q q q q q q q:after { content:"”"; } +q q:after, q q q q:after, q q q q q q:after, q q q q q q q q:after { content:"’"; } + +a { color:#00f; text-decoration:none; } +a:visited { color:#636; } +a:hover, a:active { color:#c00!important; text-decoration:underline; } + +h1 { + font-weight:bold; + background:#fff; +} +h1 a, h1 a:visited { + font-family:monospace; + font-size:60px; + color:#c00; + display:block; +} +h1 a:focus, h1 a:hover, h1 a:active { + color:#f00!important; + text-decoration:none; +} + +.navigation { + display:table; + width:100%; + margin:0 0 30px 0; + position:relative; +} +#nav-above { + margin-bottom:0; +} +.navigation .nav-previous { + display:table-cell; + text-align:left; + width:50%; +} +/* hang the » and « off into the margins */ +.navigation .nav-previous a:before, .navigation .nav-next a:after { + content: "«"; + display:block; + height:30px; + margin-bottom:-30px; + text-decoration:none; + margin-left:-15px; +} +.navigation .nav-next a:after { + content: "»"; + text-align:right; + margin-left:0; + margin-top:-30px; + margin-right:-15px; +} + + +.navigation .nav-next { + display:table-cell; + text-align:right; + width:50%; +} +.navigation a { + display:block; + width:100%; + height:100%; +} + +input, button, textarea { + border:0; + line-height:30px; +} +textarea { + height:300px; +} +input { + height:30px; + line-height:30px; +} +input.submit, input#submit, input.button, button, input[type=submit] { + cursor:hand; cursor:pointer; + outline:1px solid #ccc; +} + +#wrapper { + margin-bottom:90px; + position:relative; + z-index:1; + *zoom:1; + background:#fff; +} +#wrapper:after { + display:block; + content:"."; + visibility:hidden; + width:0; + height:0; + clear:both; +} + +.sidebar .xoxo > li { + float:left; + width:50%; +} +.sidebar li { + list-style:none; +} +.sidebar #elsewhere { + margin-left:-10%; + margin-right:-10%; +} +.sidebar #rss-links, .sidebar #twitter-feeds { + float:right; + clear:right; + width:20%; +} +.sidebar #comment { + clear:both; + float:none; + width:100%; +} +.sidebar #search { + clear:both; + float:none; + width:100%; +} +.sidebar #search h2 { + margin-left:40%; +} +.sidebar #search #s { + width:90%; + float:left; +} +.sidebar #search #searchsubmit { + width:10%; + float:right; +} +.sidebar * { + font-size:15px; + line-height:30px; +} + +#footer, #footer * { + text-align:center; + font-size:16px; + color:#ccc; + font-style:italic; + word-spacing:1em; + margin-top:0; +} + +#toc { + position:absolute; + top:0; + right:0; + padding:40px 0 40px 20px; + margin:0; + width:200px; + opacity:0.2; + z-index:-1; +} +#toc:hover { + opacity:1; + background:#fff; + z-index:999; +} +#toc ul { + padding:0; + margin:0; +} +#toc, #toc li { + list-style-type:none; + font-size:15px; + line-height:15px; +} +#toc li { + padding:0 0 0 10px; +} +#toc li a { + position:relative; + display:block; +} + +table#npmlogo { + line-height:10px; + width:180px; + margin:0 auto; +} + +@media print { + a[href] { + color:inherit; + } + a[href]:after { + white-space:nowrap; + content:" " attr(href); + } + a[href^=\#], .navigation { + display:none; + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/html/static/toc.js b/bin/nodejs0.12.16/node_modules/npm/html/static/toc.js new file mode 100644 index 00000000..87061543 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/html/static/toc.js @@ -0,0 +1,29 @@ +;(function () { +var wrapper = document.getElementById("wrapper") +var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) + .filter(function (el) { + return el.parentNode === wrapper + && el.tagName.match(/H[1-6]/) + && el.id + }) +var l = 2 + , toc = document.createElement("ul") +toc.innerHTML = els.map(function (el) { + var i = el.tagName.charAt(1) + , out = "" + while (i > l) { + out += "
      " + l ++ + } + while (i < l) { + out += "
    " + l -- + } + out += "
  • " + + ( el.innerText || el.text || el.innerHTML) + + "" + return out +}).join("\n") +toc.id = "toc" +document.body.appendChild(toc) +})(); diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/access.js b/bin/nodejs0.12.16/node_modules/npm/lib/access.js new file mode 100644 index 00000000..e6398eb1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/access.js @@ -0,0 +1,127 @@ +'use strict' + +var resolve = require('path').resolve + +var readPackageJson = require('read-package-json') +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm.js') + +var whoami = require('./whoami') + +module.exports = access + +access.usage = + 'npm access public []\n' + + 'npm access restricted []\n' + + 'npm access grant []\n' + + 'npm access revoke []\n' + + 'npm access ls-packages [||]\n' + + 'npm access ls-collaborators [ []]\n' + + 'npm access edit []' + +access.subcommands = ['public', 'restricted', 'grant', 'revoke', + 'ls-packages', 'ls-collaborators', 'edit'] + +access.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, access.subcommands) + } + + switch (argv[2]) { + case 'grant': + if (argv.length === 3) { + return cb(null, ['read-only', 'read-write']) + } else { + return cb(null, []) + } + break + case 'public': + case 'restricted': + case 'ls-packages': + case 'ls-collaborators': + case 'edit': + return cb(null, []) + case 'revoke': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function access (args, cb) { + var cmd = args.shift() + var params + return parseParams(cmd, args, function (err, p) { + if (err) { return cb(err) } + params = p + return mapToRegistry(params.package, npm.config, invokeCmd) + }) + + function invokeCmd (err, uri, auth, base) { + if (err) { return cb(err) } + params.auth = auth + try { + return npm.registry.access(cmd, uri, params, function (err, data) { + !err && data && console.log(JSON.stringify(data, undefined, 2)) + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + access.usage) + } + } +} + +function parseParams (cmd, args, cb) { + // mapToRegistry will complain if package is undefined, + // but it's not needed for ls-packages + var params = { 'package': '' } + if (cmd === 'grant') { + params.permissions = args.shift() + } + if (['grant', 'revoke', 'ls-packages'].indexOf(cmd) !== -1) { + var entity = (args.shift() || '').split(':') + params.scope = entity[0] + params.team = entity[1] + } + + if (cmd === 'ls-packages') { + if (!params.scope) { + whoami([], true, function (err, scope) { + params.scope = scope + cb(err, params) + }) + } else { + cb(null, params) + } + } else { + getPackage(args.shift(), function (err, pkg) { + if (err) return cb(err) + params.package = pkg + + if (cmd === 'ls-collaborators') params.user = args.shift() + cb(null, params) + }) + } +} + +function getPackage (name, cb) { + if (name && name.trim()) { + cb(null, name.trim()) + } else { + readPackageJson( + resolve(npm.prefix, 'package.json'), + function (err, data) { + if (err) { + if (err.code === 'ENOENT') { + cb(new Error('no package name passed to command and no package.json found')) + } else { + cb(err) + } + } else { + cb(null, data.name) + } + } + ) + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/adduser.js b/bin/nodejs0.12.16/node_modules/npm/lib/adduser.js new file mode 100644 index 00000000..0f9386b5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/adduser.js @@ -0,0 +1,177 @@ + +module.exports = adduser + +var log = require("npmlog") + , npm = require("./npm.js") + , read = require("read") + , userValidate = require("npm-user-validate") + , crypto + +try { + crypto = require("crypto") +} catch (ex) {} + +adduser.usage = "npm adduser\nThen enter stuff at the prompts" + +function adduser (args, cb) { + npm.spinner.stop() + if (!crypto) return cb(new Error( + "You must compile node with ssl support to use the adduser feature")) + + var creds = npm.config.getCredentialsByURI(npm.config.get("registry")) + var c = { u : creds.username || "" + , p : creds.password || "" + , e : creds.email || "" + } + , u = {} + , fns = [readUsername, readPassword, readEmail, save] + + loop() + function loop (er) { + if (er) return cb(er) + var fn = fns.shift() + if (fn) return fn(c, u, loop) + cb() + } +} + +function readUsername (c, u, cb) { + var v = userValidate.username + read({prompt: "Username: ", default: c.u || ""}, function (er, un) { + if (er) { + return cb(er.message === "cancelled" ? er.message : er) + } + + // make sure it's valid. we have to do this here, because + // couchdb will only ever say "bad password" with a 401 when + // you try to PUT a _users record that the validate_doc_update + // rejects for *any* reason. + + if (!un) { + return readUsername(c, u, cb) + } + + var error = v(un) + if (error) { + log.warn(error.message) + return readUsername(c, u, cb) + } + + c.changed = c.u !== un + u.u = un + cb(er) + }) +} + +function readPassword (c, u, cb) { + var v = userValidate.pw + + var prompt + if (c.p && !c.changed) { + prompt = "Password: (or leave unchanged) " + } else { + prompt = "Password: " + } + + read({prompt: prompt, silent: true}, function (er, pw) { + if (er) { + return cb(er.message === "cancelled" ? er.message : er) + } + + if (!c.changed && pw === "") { + // when the username was not changed, + // empty response means "use the old value" + pw = c.p + } + + if (!pw) { + return readPassword(c, u, cb) + } + + var error = v(pw) + if (error) { + log.warn(error.message) + return readPassword(c, u, cb) + } + + c.changed = c.changed || c.p !== pw + u.p = pw + cb(er) + }) +} + +function readEmail (c, u, cb) { + var v = userValidate.email + var r = { prompt: "Email: (this IS public) ", default: c.e || "" } + read(r, function (er, em) { + if (er) { + return cb(er.message === "cancelled" ? er.message : er) + } + + if (!em) { + return readEmail(c, u, cb) + } + + var error = v(em) + if (error) { + log.warn(error.message) + return readEmail(c, u, cb) + } + + u.e = em + cb(er) + }) +} + +function save (c, u, cb) { + npm.spinner.start() + + // save existing configs, but yank off for this PUT + var uri = npm.config.get("registry") + var scope = npm.config.get("scope") + + // there may be a saved scope and no --registry (for login) + if (scope) { + if (scope.charAt(0) !== "@") scope = "@" + scope + + var scopedRegistry = npm.config.get(scope + ":registry") + var cliRegistry = npm.config.get("registry", "cli") + if (scopedRegistry && !cliRegistry) uri = scopedRegistry + } + + var params = { + auth : { + username : u.u, + password : u.p, + email : u.e + } + } + npm.registry.adduser(uri, params, function (er, doc) { + npm.spinner.stop() + if (er) return cb(er) + + // don't want this polluting the configuration + npm.config.del("_token", "user") + + if (scope) npm.config.set(scope + ":registry", uri, "user") + + if (doc && doc.token) { + npm.config.setCredentialsByURI(uri, { + token : doc.token + }) + } + else { + npm.config.setCredentialsByURI(uri, { + username : u.u, + password : u.p, + email : u.e, + alwaysAuth : npm.config.get("always-auth") + }) + } + + log.info('adduser', 'Authorized user %s', u.u) + var scopeMessage = scope ? ' to scope ' + scope : '' + console.log('Logged in as %s%s on %s.', u.u, scopeMessage, uri) + npm.config.save('user', cb) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/bin.js b/bin/nodejs0.12.16/node_modules/npm/lib/bin.js new file mode 100644 index 00000000..a019852f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/bin.js @@ -0,0 +1,19 @@ +module.exports = bin + +var npm = require("./npm.js") +var osenv = require("osenv") + +bin.usage = "npm bin\nnpm bin -g\n(just prints the bin folder)" + +function bin (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + var b = npm.bin + , PATH = osenv.path() + + if (!silent) console.log(b) + process.nextTick(cb.bind(this, null, b)) + + if (npm.config.get("global") && PATH.indexOf(b) === -1) { + npm.config.get("logstream").write("(not in PATH env variable)\n") + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/bugs.js b/bin/nodejs0.12.16/node_modules/npm/lib/bugs.js new file mode 100644 index 00000000..aa013a1e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/bugs.js @@ -0,0 +1,69 @@ + +module.exports = bugs + +bugs.usage = "npm bugs " + +var npm = require("./npm.js") + , log = require("npmlog") + , opener = require("opener") + , path = require("path") + , readJson = require("read-package-json") + , npa = require("npm-package-arg") + , fs = require("fs") + , mapToRegistry = require("./utils/map-to-registry.js") + +bugs.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function bugs (args, cb) { + var n = args.length && npa(args[0]).name || "." + fs.stat(n, function (er, s) { + if (er) { + if (er.code === "ENOENT") return callRegistry(n, cb) + return cb(er) + } + if (!s.isDirectory()) return callRegistry(n, cb) + readJson(path.resolve(n, "package.json"), function(er, d) { + if (er) return cb(er) + getUrlAndOpen(d, cb) + }) + }) +} + +function getUrlAndOpen (d, cb) { + var repo = d.repository || d.repositories + , url + if (d.bugs) { + url = (typeof d.bugs === "string") ? d.bugs : d.bugs.url + } + else if (repo) { + if (Array.isArray(repo)) repo = repo.shift() + if (repo.hasOwnProperty("url")) repo = repo.url + log.verbose("bugs", "repository", repo) + if (repo && repo.match(/^(https?:\/\/|git(:\/\/|@))github.com/)) { + url = repo.replace(/^git(@|:\/\/)/, "https://") + .replace(/^https?:\/\/github.com:/, "https://github.com/") + .replace(/\.git$/, "")+"/issues" + } + } + if (!url) { + url = "https://www.npmjs.org/package/" + d.name + } + log.silly("bugs", "url", url) + opener(url, { command: npm.config.get("browser") }, cb) +} + +function callRegistry (name, cb) { + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri + "/latest", { auth : auth }, function (er, d) { + if (er) return cb(er) + + getUrlAndOpen(d, cb) + }) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/build.js b/bin/nodejs0.12.16/node_modules/npm/lib/build.js new file mode 100644 index 00000000..e1e99de2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/build.js @@ -0,0 +1,253 @@ +// npm build command + +// everything about the installation after the creation of +// the .npm/{name}/{version}/package folder. +// linking the modules into the npm.root, +// resolving dependencies, etc. + +// This runs AFTER install or link are completed. + +var npm = require("./npm.js") + , log = require("npmlog") + , chain = require("slide").chain + , fs = require("graceful-fs") + , path = require("path") + , lifecycle = require("./utils/lifecycle.js") + , readJson = require("read-package-json") + , link = require("./utils/link.js") + , linkIfExists = link.ifExists + , cmdShim = require("cmd-shim") + , cmdShimIfExists = cmdShim.ifExists + , asyncMap = require("slide").asyncMap + , ini = require("ini") + , writeFile = require("write-file-atomic") + +module.exports = build +build.usage = "npm build \n(this is plumbing)" + +build._didBuild = {} +build._noLC = {} +function build (args, global, didPre, didRB, cb) { + if (typeof cb !== "function") cb = didRB, didRB = false + if (typeof cb !== "function") cb = didPre, didPre = false + if (typeof cb !== "function") { + cb = global, global = npm.config.get("global") + } + // it'd be nice to asyncMap these, but actually, doing them + // in parallel generally munges up the output from node-waf + var builder = build_(global, didPre, didRB) + chain(args.map(function (arg) { return function (cb) { + builder(arg, cb) + }}), cb) +} + +function build_ (global, didPre, didRB) { return function (folder, cb) { + folder = path.resolve(folder) + if (build._didBuild[folder]) log.info("build", "already built", folder) + build._didBuild[folder] = true + log.info("build", folder) + readJson(path.resolve(folder, "package.json"), function (er, pkg) { + if (er) return cb(er) + chain + ( [ !didPre && [lifecycle, pkg, "preinstall", folder] + , [linkStuff, pkg, folder, global, didRB] + , [writeBuiltinConf, pkg, folder] + , didPre !== build._noLC && [lifecycle, pkg, "install", folder] + , didPre !== build._noLC && [lifecycle, pkg, "postinstall", folder] + , didPre !== build._noLC + && npm.config.get("npat") + && [lifecycle, pkg, "test", folder] ] + , cb ) + }) +}} + +function writeBuiltinConf (pkg, folder, cb) { + // the builtin config is "sticky". Any time npm installs + // itself globally, it puts its builtin config file there + var parent = path.dirname(folder) + var dir = npm.globalDir + + if (pkg.name !== "npm" || + !npm.config.get("global") || + !npm.config.usingBuiltin || + dir !== parent) { + return cb() + } + + var data = ini.stringify(npm.config.sources.builtin.data) + writeFile(path.resolve(folder, "npmrc"), data, cb) +} + +function linkStuff (pkg, folder, global, didRB, cb) { + // allow to opt out of linking binaries. + if (npm.config.get("bin-links") === false) return 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 parent = pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder) + var gnm = global && npm.globalDir + var gtop = parent === gnm + + log.info('linkStuff', pkg._id) + log.silly('linkStuff', pkg._id, 'has', parent, 'as its parent node_modules') + if (global) log.silly('linkStuff', pkg._id, 'is part of a global install') + if (gnm) log.silly('linkStuff', pkg._id, 'is installed into a global node_modules') + if (gtop) log.silly('linkStuff', pkg._id, 'is installed into the top-level global node_modules') + + shouldWarn(pkg, folder, global, function () { + asyncMap( + [linkBins, linkMans, !didRB && rebuildBundles], + function (fn, cb) { + if (!fn) return cb() + log.verbose(fn.name, pkg._id) + fn(pkg, folder, parent, gtop, cb) + }, + cb + ) + }) +} + +function shouldWarn(pkg, folder, global, cb) { + var parent = path.dirname(folder) + , top = parent === npm.dir + , cwd = npm.localPrefix + + readJson(path.resolve(cwd, "package.json"), function(er, topPkg) { + if (er) return cb(er) + + var linkedPkg = path.basename(cwd) + , currentPkg = path.basename(folder) + + // current searched package is the linked package on first call + if (linkedPkg !== currentPkg) { + + // don't generate a warning if it's listed in dependencies + if (Object.keys(topPkg.dependencies || {}) + .concat(Object.keys(topPkg.devDependencies || {})) + .indexOf(currentPkg) === -1) { + + if (top && pkg.preferGlobal && !global) { + log.warn("prefer global", pkg._id + " should be installed with -g") + } + } + } + + cb() + }) +} + +function rebuildBundles (pkg, folder, parent, gtop, cb) { + if (!npm.config.get("rebuild-bundle")) return cb() + + var deps = Object.keys(pkg.dependencies || {}) + .concat(Object.keys(pkg.devDependencies || {})) + , bundles = pkg.bundleDependencies || pkg.bundledDependencies || [] + + fs.readdir(path.resolve(folder, "node_modules"), function (er, files) { + // error means no bundles + if (er) return cb() + + log.verbose("rebuildBundles", files) + // don't asyncMap these, because otherwise build script output + // gets interleaved and is impossible to read + chain(files.filter(function (file) { + // rebuild if: + // not a .folder, like .bin or .hooks + return !file.match(/^[\._-]/) + // not some old 0.x style bundle + && file.indexOf("@") === -1 + // either not a dep, or explicitly bundled + && (deps.indexOf(file) === -1 || bundles.indexOf(file) !== -1) + }).map(function (file) { + file = path.resolve(folder, "node_modules", file) + return function (cb) { + if (build._didBuild[file]) return cb() + log.verbose("rebuild bundle", file) + // if file is not a package dir, then don't do it. + fs.lstat(path.resolve(file, "package.json"), function (er) { + if (er) return cb() + build_(false)(file, cb) + }) + }}), cb) + }) +} + +function linkBins (pkg, folder, parent, gtop, cb) { + if (!pkg.bin || !gtop && path.basename(parent) !== "node_modules") { + return cb() + } + var binRoot = gtop ? npm.globalBin + : path.resolve(parent, ".bin") + log.verbose("link bins", [pkg.bin, binRoot, gtop]) + + asyncMap(Object.keys(pkg.bin), function (b, cb) { + linkBin( path.resolve(folder, pkg.bin[b]) + , path.resolve(binRoot, b) + , gtop && folder + , function (er) { + if (er) return cb(er) + // bins should always be executable. + // XXX skip chmod on windows? + var src = path.resolve(folder, pkg.bin[b]) + fs.chmod(src, npm.modes.exec, function (er) { + if (er && er.code === "ENOENT" && npm.config.get("ignore-scripts")) { + return cb() + } + if (er || !gtop) return cb(er) + var dest = path.resolve(binRoot, b) + , out = npm.config.get("parseable") + ? dest + "::" + src + ":BINFILE" + : dest + " -> " + src + console.log(out) + cb() + }) + }) + }, cb) +} + +function linkBin (from, to, gently, cb) { + if (process.platform !== "win32") { + return linkIfExists(from, to, gently, cb) + } else { + return cmdShimIfExists(from, to, cb) + } +} + +function linkMans (pkg, folder, parent, gtop, cb) { + if (!pkg.man || !gtop || process.platform === "win32") return cb() + + var manRoot = path.resolve(npm.config.get("prefix"), "share", "man") + log.verbose("linkMans", "man files are", pkg.man, "in", manRoot) + + // make sure that the mans are unique. + // otherwise, if there are dupes, it'll fail with EEXIST + var set = pkg.man.reduce(function (acc, man) { + acc[path.basename(man)] = man + return acc + }, {}) + pkg.man = pkg.man.filter(function (man) { + return set[path.basename(man)] === man + }) + + asyncMap(pkg.man, function (man, cb) { + if (typeof man !== "string") return cb() + log.silly("linkMans", "preparing to link", man) + var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) + if (!parseMan) { + return cb(new Error( + man+" is not a valid name for a man file. " + + "Man files must end with a number, " + + "and optionally a .gz suffix if they are compressed." + )) + } + + var stem = parseMan[1] + var sxn = parseMan[2] + var bn = path.basename(stem) + var manSrc = path.resolve(folder, man) + var manDest = path.join(manRoot, "man" + sxn, bn) + + linkIfExists(manSrc, manDest, gtop && folder, cb) + }, cb) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/cache.js b/bin/nodejs0.12.16/node_modules/npm/lib/cache.js new file mode 100644 index 00000000..6dcf2d7e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/cache.js @@ -0,0 +1,354 @@ +// XXX lib/utils/tar.js and this file need to be rewritten. + +// URL-to-cache folder mapping: +// : -> ! +// @ -> _ +// http://registry.npmjs.org/foo/version -> cache/http!/... +// + +/* +fetching a URL: +1. Check for URL in inflight URLs. If present, add cb, and return. +2. Acquire lock at {cache}/{sha(url)}.lock + retries = {cache-lock-retries, def=10} + stale = {cache-lock-stale, def=60000} + wait = {cache-lock-wait, def=10000} +3. if lock can't be acquired, then fail +4. fetch url, clear lock, call cbs + +cache folders: +1. urls: http!/server.com/path/to/thing +2. c:\path\to\thing: file!/c!/path/to/thing +3. /path/to/thing: file!/path/to/thing +4. git@ private: git_github.com!npm/npm +5. git://public: git!/github.com/npm/npm +6. git+blah:// git-blah!/server.com/foo/bar + +adding a folder: +1. tar into tmp/random/package.tgz +2. untar into tmp/random/contents/package, stripping one dir piece +3. tar tmp/random/contents/package to cache/n/v/package.tgz +4. untar cache/n/v/package.tgz into cache/n/v/package +5. rm tmp/random + +Adding a url: +1. fetch to tmp/random/package.tgz +2. goto folder(2) + +adding a name@version: +1. registry.get(name/version) +2. if response isn't 304, add url(dist.tarball) + +adding a name@range: +1. registry.get(name) +2. Find a version that satisfies +3. add name@version + +adding a local tarball: +1. untar to tmp/random/{blah} +2. goto folder(2) + +adding a namespaced package: +1. lookup registry for @namespace +2. namespace_registry.get('name') +3. add url(namespace/latest.tarball) +*/ + +exports = module.exports = cache + +cache.unpack = unpack +cache.clean = clean +cache.read = read + +var npm = require("./npm.js") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , assert = require("assert") + , rm = require("./utils/gently-rm.js") + , readJson = require("read-package-json") + , log = require("npmlog") + , path = require("path") + , asyncMap = require("slide").asyncMap + , tar = require("./utils/tar.js") + , fileCompletion = require("./utils/completion/file-completion.js") + , deprCheck = require("./utils/depr-check.js") + , addNamed = require("./cache/add-named.js") + , addLocal = require("./cache/add-local.js") + , addRemoteTarball = require("./cache/add-remote-tarball.js") + , addRemoteGit = require("./cache/add-remote-git.js") + , inflight = require("inflight") + , realizePackageSpecifier = require("realize-package-specifier") + , npa = require("npm-package-arg") + , getStat = require("./cache/get-stat.js") + , cachedPackageRoot = require("./cache/cached-package-root.js") + , mapToRegistry = require("./utils/map-to-registry.js") + +cache.usage = "npm cache add " + + "\nnpm cache add " + + "\nnpm cache add " + + "\nnpm cache add " + + "\nnpm cache add @" + + "\nnpm cache ls []" + + "\nnpm cache clean [[@]]" + +cache.completion = function (opts, cb) { + + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, ["add", "ls", "clean"]) + } + + switch (argv[2]) { + case "clean": + case "ls": + // cache and ls are easy, because the completion is + // what ls_ returns anyway. + // just get the partial words, minus the last path part + var p = path.dirname(opts.partialWords.slice(3).join("/")) + if (p === ".") p = "" + return ls_(p, 2, cb) + case "add": + // Same semantics as install and publish. + return npm.commands.install.completion(opts, cb) + } +} + +function cache (args, cb) { + var cmd = args.shift() + switch (cmd) { + case "rm": case "clear": case "clean": return clean(args, cb) + case "list": case "sl": case "ls": return ls(args, cb) + case "add": return add(args, npm.prefix, cb) + default: return cb("Usage: "+cache.usage) + } +} + +// if the pkg and ver are in the cache, then +// just do a readJson and return. +// if they're not, then fetch them from the registry. +function read (name, ver, forceBypass, cb) { + assert(typeof name === "string", "must include name of module to install") + assert(typeof cb === "function", "must include callback") + + if (forceBypass === undefined || forceBypass === null) forceBypass = true + + var root = cachedPackageRoot({name : name, version : ver}) + function c (er, data) { + if (er) log.verbose("cache", "addNamed error for", name+"@"+ver, er) + if (data) deprCheck(data) + + return cb(er, data) + } + + if (forceBypass && npm.config.get("force")) { + log.verbose("using force", "skipping cache") + return addNamed(name, ver, null, c) + } + + readJson(path.join(root, "package", "package.json"), function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + + if (data) { + if (!data.name) return cb(new Error("No name provided")) + if (!data.version) return cb(new Error("No version provided")) + } + + if (er) return addNamed(name, ver, null, c) + else c(er, data) + }) +} + +function normalize (args) { + var normalized = "" + if (args.length > 0) { + var a = npa(args[0]) + if (a.name) normalized = a.name + if (a.rawSpec) normalized = [normalized, a.rawSpec].join("/") + if (args.length > 1) normalized = [normalized].concat(args.slice(1)).join("/") + } + + if (normalized.substr(-1) === "/") { + normalized = normalized.substr(0, normalized.length - 1) + } + normalized = path.normalize(normalized) + log.silly("ls", "normalized", normalized) + + return normalized +} + +// npm cache ls [] +function ls (args, cb) { + var prefix = npm.config.get("cache") + if (prefix.indexOf(process.env.HOME) === 0) { + prefix = "~" + prefix.substr(process.env.HOME.length) + } + ls_(normalize(args), npm.config.get("depth"), function (er, files) { + console.log(files.map(function (f) { + return path.join(prefix, f) + }).join("\n").trim()) + cb(er, files) + }) +} + +// Calls cb with list of cached pkgs matching show. +function ls_ (req, depth, cb) { + return fileCompletion(npm.cache, req, depth, cb) +} + +// npm cache clean [] +function clean (args, cb) { + assert(typeof cb === "function", "must include callback") + + if (!args) args = [] + + var f = path.join(npm.cache, normalize(args)) + if (f === npm.cache) { + fs.readdir(npm.cache, function (er, files) { + if (er) return cb() + asyncMap( files.filter(function (f) { + return npm.config.get("force") || f !== "-" + }).map(function (f) { + return path.join(npm.cache, f) + }) + , rm, cb ) + }) + } + else { + rm(f, cb) + } +} + +// npm cache add +// npm cache add +// npm cache add +// npm cache add +cache.add = function (pkg, ver, where, scrub, cb) { + assert(typeof pkg === "string", "must include name of package to install") + assert(typeof cb === "function", "must include callback") + + if (scrub) { + return clean([], function (er) { + if (er) return cb(er) + add([pkg, ver], where, cb) + }) + } + return add([pkg, ver], where, cb) +} + + +var adding = 0 +function add (args, where, cb) { + // this is hot code. almost everything passes through here. + // the args can be any of: + // ["url"] + // ["pkg", "version"] + // ["pkg@version"] + // ["pkg", "url"] + // This is tricky, because urls can contain @ + // Also, in some cases we get [name, null] rather + // that just a single argument. + + var usage = "Usage:\n" + + " npm cache add \n" + + " npm cache add @\n" + + " npm cache add \n" + + " npm cache add \n" + , spec + + log.silly("cache add", "args", args) + + if (args[1] === undefined) args[1] = null + + // at this point the args length must ==2 + if (args[1] !== null) { + spec = args[0]+"@"+args[1] + } else if (args.length === 2) { + spec = args[0] + } + + log.verbose("cache add", "spec", spec) + + if (!spec) return cb(usage) + + if (adding <= 0) { + npm.spinner.start() + } + adding++ + cb = afterAdd(cb) + + realizePackageSpecifier(spec, where, function (err, p) { + if (err) return cb(err) + + log.silly("cache add", "parsed spec", p) + + switch (p.type) { + case "local": + case "directory": + addLocal(p, null, cb) + break + case "remote": + // get auth, if possible + mapToRegistry(p.raw, npm.config, function (err, uri, auth) { + if (err) return cb(err) + + addRemoteTarball(p.spec, {name : p.name}, null, auth, cb) + }) + break + case "git": + case "hosted": + addRemoteGit(p.rawSpec, cb) + break + default: + if (p.name) return addNamed(p.name, p.spec, null, cb) + + cb(new Error("couldn't figure out how to install " + spec)) + } + }) +} + +function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) { + if (typeof cb !== "function") cb = gid, gid = null + if (typeof cb !== "function") cb = uid, uid = null + if (typeof cb !== "function") cb = fMode, fMode = null + if (typeof cb !== "function") cb = dMode, dMode = null + + read(pkg, ver, false, function (er) { + if (er) { + log.error("unpack", "Could not read data for %s", pkg + "@" + ver) + return cb(er) + } + npm.commands.unbuild([unpackTarget], true, function (er) { + if (er) return cb(er) + tar.unpack( path.join(cachedPackageRoot({name : pkg, version : ver}), "package.tgz") + , unpackTarget + , dMode, fMode + , uid, gid + , cb ) + }) + }) +} + +function afterAdd (cb) { return function (er, data) { + adding-- + if (adding <= 0) npm.spinner.stop() + + if (er || !data || !data.name || !data.version) return cb(er, data) + log.silly("cache", "afterAdd", data.name+"@"+data.version) + + // Save the resolved, shasum, etc. into the data so that the next + // time we load from this cached data, we have all the same info. + // Ignore if it fails. + var pj = path.join(cachedPackageRoot(data), "package", "package.json") + + var done = inflight(pj, cb) + if (!done) return log.verbose("afterAdd", pj, "already in flight; not writing") + log.verbose("afterAdd", pj, "not in flight; writing") + + getStat(function (er, cs) { + if (er) return done(er) + writeFileAtomic(pj, JSON.stringify(data), {chown : cs}, function (er) { + if (!er) log.verbose("afterAdd", pj, "written") + return done(null, data) + }) + }) +}} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-local-tarball.js b/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-local-tarball.js new file mode 100644 index 00000000..ddc0278a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-local-tarball.js @@ -0,0 +1,180 @@ +var mkdir = require("mkdirp") + , assert = require("assert") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , path = require("path") + , sha = require("sha") + , npm = require("../npm.js") + , log = require("npmlog") + , tar = require("../utils/tar.js") + , pathIsInside = require("path-is-inside") + , getCacheStat = require("./get-stat.js") + , cachedPackageRoot = require("./cached-package-root.js") + , chownr = require("chownr") + , inflight = require("inflight") + , once = require("once") + , writeStreamAtomic = require("fs-write-stream-atomic") + , randomBytes = require("crypto").pseudoRandomBytes // only need uniqueness + +module.exports = addLocalTarball + +function addLocalTarball (p, pkgData, shasum, cb) { + assert(typeof p === "string", "must have path") + assert(typeof cb === "function", "must have callback") + + if (!pkgData) pkgData = {} + + // If we don't have a shasum yet, compute it. + if (!shasum) { + return sha.get(p, function (er, shasum) { + if (er) return cb(er) + log.silly("addLocalTarball", "shasum (computed)", shasum) + addLocalTarball(p, pkgData, shasum, cb) + }) + } + + if (pathIsInside(p, npm.cache)) { + if (path.basename(p) !== "package.tgz") { + return cb(new Error("Not a valid cache tarball name: "+p)) + } + log.verbose("addLocalTarball", "adding from inside cache", p) + return addPlacedTarball(p, pkgData, shasum, cb) + } + + addTmpTarball(p, pkgData, shasum, function (er, data) { + if (data) { + data._resolved = p + data._shasum = data._shasum || shasum + } + return cb(er, data) + }) +} + +function addPlacedTarball (p, pkgData, shasum, cb) { + assert(pkgData, "should have package data by now") + assert(typeof cb === "function", "cb function required") + + getCacheStat(function (er, cs) { + if (er) return cb(er) + return addPlacedTarball_(p, pkgData, cs.uid, cs.gid, shasum, cb) + }) +} + +function addPlacedTarball_ (p, pkgData, uid, gid, resolvedSum, cb) { + var folder = path.join(cachedPackageRoot(pkgData), "package") + + // First, make sure we have the shasum, if we don't already. + if (!resolvedSum) { + sha.get(p, function (er, shasum) { + if (er) return cb(er) + addPlacedTarball_(p, pkgData, uid, gid, shasum, cb) + }) + return + } + + mkdir(folder, function (er) { + if (er) return cb(er) + var pj = path.join(folder, "package.json") + var json = JSON.stringify(pkgData, null, 2) + writeFileAtomic(pj, json, function (er) { + cb(er, pkgData) + }) + }) +} + +function addTmpTarball (tgz, pkgData, shasum, cb) { + assert(typeof cb === "function", "must have callback function") + assert(shasum, "must have shasum by now") + + cb = inflight("addTmpTarball:" + tgz, cb) + if (!cb) return log.verbose("addTmpTarball", tgz, "already in flight; not adding") + log.verbose("addTmpTarball", tgz, "not in flight; adding") + + // we already have the package info, so just move into place + if (pkgData && pkgData.name && pkgData.version) { + log.verbose( + "addTmpTarball", + "already have metadata; skipping unpack for", + pkgData.name + "@" + pkgData.version + ) + return addTmpTarball_(tgz, pkgData, shasum, cb) + } + + // This is a tarball we probably downloaded from the internet. The shasum's + // already been checked, but we haven't ever had a peek inside, so we unpack + // it here just to make sure it is what it says it is. + // + // NOTE: we might not have any clue what we think it is, for example if the + // user just did `npm install ./foo.tgz` + + // generate a unique filename + randomBytes(6, function (er, random) { + if (er) return cb(er) + + var target = path.join(npm.tmp, "unpack-" + random.toString("hex")) + getCacheStat(function (er, cs) { + if (er) return cb(er) + + log.verbose("addTmpTarball", "validating metadata from", tgz) + tar.unpack(tgz, target, null, null, cs.uid, cs.gid, function (er, data) { + if (er) return cb(er) + + // check that this is what we expected. + if (!data.name) { + return cb(new Error("No name provided")) + } + else if (pkgData.name && data.name !== pkgData.name) { + return cb(new Error("Invalid Package: expected " + pkgData.name + + " but found " + data.name)) + } + + if (!data.version) { + return cb(new Error("No version provided")) + } + else if (pkgData.version && data.version !== pkgData.version) { + return cb(new Error("Invalid Package: expected " + + pkgData.name + "@" + pkgData.version + + " but found " + data.name + "@" + data.version)) + } + + addTmpTarball_(tgz, data, shasum, cb) + }) + }) + }) +} + +function addTmpTarball_ (tgz, data, shasum, cb) { + assert(typeof cb === "function", "must have callback function") + cb = once(cb) + + assert(data.name, "should have package name by now") + assert(data.version, "should have package version by now") + + var root = cachedPackageRoot(data) + var pkg = path.resolve(root, "package") + var target = path.resolve(root, "package.tgz") + getCacheStat(function (er, cs) { + if (er) return cb(er) + mkdir(pkg, function (er, created) { + + // chown starting from the first dir created by mkdirp, + // or the root dir, if none had to be created, so that + // we know that we get all the children. + function chown () { + chownr(created || root, cs.uid, cs.gid, done) + } + + if (er) return cb(er) + var read = fs.createReadStream(tgz) + var write = writeStreamAtomic(target, { mode: npm.modes.file }) + var fin = cs.uid && cs.gid ? chown : done + read.on("error", cb).pipe(write).on("error", cb).on("close", fin) + }) + + }) + + function done() { + data._shasum = data._shasum || shasum + cb(null, data) + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-local.js b/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-local.js new file mode 100644 index 00000000..3e957609 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-local.js @@ -0,0 +1,123 @@ +var assert = require("assert") + , path = require("path") + , mkdir = require("mkdirp") + , chownr = require("chownr") + , pathIsInside = require("path-is-inside") + , readJson = require("read-package-json") + , log = require("npmlog") + , npm = require("../npm.js") + , tar = require("../utils/tar.js") + , deprCheck = require("../utils/depr-check.js") + , getCacheStat = require("./get-stat.js") + , cachedPackageRoot = require("./cached-package-root.js") + , addLocalTarball = require("./add-local-tarball.js") + , sha = require("sha") + , inflight = require("inflight") + +module.exports = addLocal + +function addLocal (p, pkgData, cb_) { + assert(typeof p === "object", "must have spec info") + assert(typeof cb === "function", "must have callback") + + pkgData = pkgData || {} + + function cb (er, data) { + if (er) { + log.error("addLocal", "Could not install %s", p.spec) + return cb_(er) + } + if (data && !data._fromGithub) { + data._from = path.relative(npm.prefix, p.spec) || "." + var resolved = path.relative(npm.prefix, p.spec) + if (resolved) data._resolved = "file:"+resolved + } + return cb_(er, data) + } + + if (p.type === "directory") { + addLocalDirectory(p.spec, pkgData, null, cb) + } + else { + addLocalTarball(p.spec, pkgData, null, cb) + } +} + +// At this point, if shasum is set, it's something that we've already +// read and checked. Just stashing it in the data at this point. +function addLocalDirectory (p, pkgData, shasum, cb) { + assert(pkgData, "must pass package data") + assert(typeof cb === "function", "must have callback") + + // if it's a folder, then read the package.json, + // tar it to the proper place, and add the cache tar + if (pathIsInside(p, npm.cache)) return cb(new Error( + "Adding a cache directory to the cache will make the world implode.")) + + readJson(path.join(p, "package.json"), false, function (er, data) { + if (er) return cb(er) + + if (!data.name) { + return cb(new Error("No name provided in package.json")) + } + else if (pkgData.name && pkgData.name !== data.name) { + return cb(new Error( + "Invalid package: expected " + pkgData.name + " but found " + data.name + )) + } + + if (!data.version) { + return cb(new Error("No version provided in package.json")) + } + else if (pkgData.version && pkgData.version !== data.version) { + return cb(new Error( + "Invalid package: expected " + pkgData.name + "@" + pkgData.version + + " but found " + data.name + "@" + data.version + )) + } + + deprCheck(data) + + // pack to {cache}/name/ver/package.tgz + var root = cachedPackageRoot(data) + var tgz = path.resolve(root, "package.tgz") + var pj = path.resolve(root, "package/package.json") + + var wrapped = inflight(tgz, next) + if (!wrapped) return log.verbose("addLocalDirectory", tgz, "already in flight; waiting") + log.verbose("addLocalDirectory", tgz, "not in flight; packing") + + getCacheStat(function (er, cs) { + mkdir(path.dirname(pj), function (er, made) { + if (er) return cb(er) + var fancy = !pathIsInside(p, npm.tmp) + tar.pack(tgz, p, data, fancy, function (er) { + if (er) { + log.error("addLocalDirectory", "Could not pack", p, "to", tgz) + return cb(er) + } + + if (!cs || isNaN(cs.uid) || isNaN(cs.gid)) wrapped() + + chownr(made || tgz, cs.uid, cs.gid, wrapped) + }) + }) + }) + + function next (er) { + if (er) return cb(er) + // if we have the shasum already, just add it + if (shasum) { + return addLocalTarball(tgz, data, shasum, cb) + } else { + sha.get(tgz, function (er, shasum) { + if (er) { + return cb(er) + } + data._shasum = shasum + return addLocalTarball(tgz, data, shasum, cb) + }) + } + } + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-named.js b/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-named.js new file mode 100644 index 00000000..209a1b1a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-named.js @@ -0,0 +1,299 @@ +var path = require("path") + , assert = require("assert") + , fs = require("graceful-fs") + , http = require("http") + , log = require("npmlog") + , semver = require("semver") + , readJson = require("read-package-json") + , url = require("url") + , npm = require("../npm.js") + , deprCheck = require("../utils/depr-check.js") + , inflight = require("inflight") + , addRemoteTarball = require("./add-remote-tarball.js") + , cachedPackageRoot = require("./cached-package-root.js") + , mapToRegistry = require("../utils/map-to-registry.js") + + +module.exports = addNamed + +function getOnceFromRegistry (name, from, next, done) { + function fixName(err, data, json, resp) { + // this is only necessary until npm/npm-registry-client#80 is fixed + if (err && err.pkgid && err.pkgid !== name) { + err.message = err.message.replace( + new RegExp(': ' + err.pkgid.replace(/(\W)/g, '\\$1') + '$'), + ': ' + name + ) + err.pkgid = name + } + next(err, data, json, resp) + } + + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return done(er) + + var key = "registry:" + uri + next = inflight(key, next) + if (!next) return log.verbose(from, key, "already in flight; waiting") + else log.verbose(from, key, "not in flight; fetching") + + npm.registry.get(uri, { auth : auth }, fixName) + }) +} + +function addNamed (name, version, data, cb_) { + assert(typeof name === "string", "must have module name") + assert(typeof cb_ === "function", "must have callback") + + var key = name + "@" + version + log.silly("addNamed", key) + + function cb (er, data) { + if (data && !data._fromGithub) data._from = key + cb_(er, data) + } + + if (semver.valid(version, true)) { + log.verbose('addNamed', JSON.stringify(version), 'is a plain semver version for', name) + addNameVersion(name, version, data, cb) + } else if (semver.validRange(version, true)) { + log.verbose('addNamed', JSON.stringify(version), 'is a valid semver range for', name) + addNameRange(name, version, data, cb) + } else { + log.verbose('addNamed', JSON.stringify(version), 'is being treated as a dist-tag for', name) + addNameTag(name, version, data, cb) + } +} + +function addNameTag (name, tag, data, cb) { + log.info("addNameTag", [name, tag]) + var explicit = true + if (!tag) { + explicit = false + tag = npm.config.get("tag") + } + + getOnceFromRegistry(name, "addNameTag", next, cb) + + function next (er, data, json, resp) { + if (!er) er = errorResponse(name, resp) + if (er) return cb(er) + + log.silly("addNameTag", "next cb for", name, "with tag", tag) + + engineFilter(data) + if (data["dist-tags"] && data["dist-tags"][tag] + && data.versions[data["dist-tags"][tag]]) { + var ver = data["dist-tags"][tag] + return addNamed(name, ver, data.versions[ver], cb) + } + if (!explicit && Object.keys(data.versions).length) { + return addNamed(name, "*", data, cb) + } + + er = installTargetsError(tag, data) + return cb(er) + } +} + +function engineFilter (data) { + var npmv = npm.version + , nodev = npm.config.get("node-version") + , strict = npm.config.get("engine-strict") + + if (!nodev || npm.config.get("force")) return data + + Object.keys(data.versions || {}).forEach(function (v) { + var eng = data.versions[v].engines + if (!eng) return + if (!strict && !data.versions[v].engineStrict) return + if (eng.node && !semver.satisfies(nodev, eng.node, true) + || eng.npm && !semver.satisfies(npmv, eng.npm, true)) { + delete data.versions[v] + } + }) +} + +function addNameVersion (name, v, data, cb) { + var ver = semver.valid(v, true) + if (!ver) return cb(new Error("Invalid version: "+v)) + + var response + + if (data) { + response = null + return next() + } + + getOnceFromRegistry(name, "addNameVersion", setData, cb) + + function setData (er, d, json, resp) { + if (!er) { + er = errorResponse(name, resp) + } + if (er) return cb(er) + data = d && d.versions[ver] + if (!data) { + er = new Error("version not found: "+name+"@"+ver) + er.package = name + er.statusCode = 404 + return cb(er) + } + response = resp + next() + } + + function next () { + deprCheck(data) + var dist = data.dist + + if (!dist) return cb(new Error("No dist in "+data._id+" package")) + + if (!dist.tarball) return cb(new Error( + "No dist.tarball in " + data._id + " package")) + + if ((response && response.statusCode !== 304) || npm.config.get("force")) { + return fetchit() + } + + // we got cached data, so let's see if we have a tarball. + var pkgroot = cachedPackageRoot({name : name, version : ver}) + var pkgtgz = path.join(pkgroot, "package.tgz") + var pkgjson = path.join(pkgroot, "package", "package.json") + fs.stat(pkgtgz, function (er) { + if (!er) { + readJson(pkgjson, function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + + if (data) { + if (!data.name) return cb(new Error("No name provided")) + if (!data.version) return cb(new Error("No version provided")) + + // check the SHA of the package we have, to ensure it wasn't installed + // from somewhere other than the registry (eg, a fork) + if (data._shasum && dist.shasum && data._shasum !== dist.shasum) { + return fetchit() + } + } + + if (er) return fetchit() + else return cb(null, data) + }) + } else return fetchit() + }) + + function fetchit () { + mapToRegistry(name, npm.config, function (er, _, auth, ruri) { + if (er) return cb(er) + + // Use the same protocol as the registry. https registry --> https + // tarballs, but only if they're the same hostname, or else detached + // tarballs may not work. + var tb = url.parse(dist.tarball) + var rp = url.parse(ruri) + if (tb.hostname === rp.hostname && tb.protocol !== rp.protocol) { + tb.protocol = rp.protocol + // If a different port is associated with the other protocol + // we need to update that as well + if (rp.port !== tb.port) { + tb.port = rp.port + delete tb.host + } + delete tb.href + } + tb = url.format(tb) + + // Only add non-shasum'ed packages if --forced. Only ancient things + // would lack this for good reasons nowadays. + if (!dist.shasum && !npm.config.get("force")) { + return cb(new Error("package lacks shasum: " + data._id)) + } + + addRemoteTarball(tb, data, dist.shasum, auth, cb) + }) + } + } +} + +function addNameRange (name, range, data, cb) { + range = semver.validRange(range, true) + if (range === null) return cb(new Error( + "Invalid version range: " + range + )) + + log.silly("addNameRange", {name:name, range:range, hasData:!!data}) + + if (data) return next() + + getOnceFromRegistry(name, "addNameRange", setData, cb) + + function setData (er, d, json, resp) { + if (!er) { + er = errorResponse(name, resp) + } + if (er) return cb(er) + data = d + next() + } + + function next () { + log.silly( "addNameRange", "number 2" + , {name:name, range:range, hasData:!!data}) + engineFilter(data) + + log.silly("addNameRange", "versions" + , [data.name, Object.keys(data.versions || {})]) + + // if the tagged version satisfies, then use that. + var tagged = data["dist-tags"][npm.config.get("tag")] + if (tagged + && data.versions[tagged] + && semver.satisfies(tagged, range, true)) { + return addNamed(name, tagged, data.versions[tagged], cb) + } + + // find the max satisfying version. + var versions = Object.keys(data.versions || {}) + var ms = semver.maxSatisfying(versions, range, true) + if (!ms) { + if (range === "*" && versions.length) { + return addNameTag(name, "latest", data, cb) + } else { + return cb(installTargetsError(range, data)) + } + } + + // if we don't have a registry connection, try to see if + // there's a cached copy that will be ok. + addNamed(name, ms, data.versions[ms], cb) + } +} + +function installTargetsError (requested, data) { + var targets = Object.keys(data["dist-tags"]).filter(function (f) { + return (data.versions || {}).hasOwnProperty(f) + }).concat(Object.keys(data.versions || {})) + + requested = data.name + (requested ? "@'" + requested + "'" : "") + + targets = targets.length + ? "Valid install targets:\n" + JSON.stringify(targets) + "\n" + : "No valid targets found.\n" + + "Perhaps not compatible with your version of node?" + + var er = new Error( "No compatible version found: " + + requested + "\n" + targets) + er.code = "ETARGET" + return er +} + +function errorResponse (name, response) { + var er + if (response.statusCode >= 400) { + er = new Error(http.STATUS_CODES[response.statusCode]) + er.statusCode = response.statusCode + er.code = "E" + er.statusCode + er.pkgid = name + } + return er +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-remote-git.js b/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-remote-git.js new file mode 100644 index 00000000..b6bec092 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-remote-git.js @@ -0,0 +1,480 @@ +var assert = require('assert') +var crypto = require('crypto') +var fs = require('graceful-fs') +var path = require('path') +var url = require('url') + +var chownr = require('chownr') +var dezalgo = require('dezalgo') +var hostedFromURL = require('hosted-git-info').fromUrl +var inflight = require('inflight') +var log = require('npmlog') +var mkdir = require('mkdirp') +var normalizeGitUrl = require('normalize-git-url') +var npa = require('npm-package-arg') +var realizePackageSpecifier = require('realize-package-specifier') + +var addLocal = require('./add-local.js') +var correctMkdir = require('../utils/correct-mkdir.js') +var git = require('../utils/git.js') +var npm = require('../npm.js') +var rm = require('../utils/gently-rm.js') + +var remotes = path.resolve(npm.config.get('cache'), '_git-remotes') +var templates = path.join(remotes, '_templates') + +var VALID_VARIABLES = [ + 'GIT_ASKPASS', + 'GIT_PROXY_COMMAND', + 'GIT_SSH', + 'GIT_SSH_COMMAND', + 'GIT_SSL_CAINFO', + 'GIT_SSL_NO_VERIFY' +] + +module.exports = addRemoteGit +function addRemoteGit (uri, _cb) { + assert(typeof uri === 'string', 'must have git URL') + assert(typeof _cb === 'function', 'must have callback') + var cb = dezalgo(_cb) + + log.verbose('addRemoteGit', 'caching', uri) + + // the URL comes in exactly as it was passed on the command line, or as + // normalized by normalize-package-data / read-package-json / read-installed, + // so figure out what to do with it using hosted-git-info + var parsed = hostedFromURL(uri) + if (parsed) { + // normalize GitHub syntax to org/repo (for now) + var from + if (parsed.type === 'github' && parsed.default === 'shortcut') { + from = parsed.path() + } else { + from = parsed.toString() + } + + log.verbose('addRemoteGit', from, 'is a repository hosted by', parsed.type) + + // prefer explicit URLs to pushing everything through shortcuts + if (parsed.default !== 'shortcut') { + return tryClone(from, parsed.toString(), false, cb) + } + + // try git:, then git+ssh:, then git+https: before failing + tryGitProto(from, parsed, cb) + } else { + // verify that this is a Git URL before continuing + parsed = npa(uri) + if (parsed.type !== 'git') { + return cb(new Error(uri + 'is not a Git or GitHub URL')) + } + + tryClone(parsed.rawSpec, uri, false, cb) + } +} + +function tryGitProto (from, hostedInfo, cb) { + var gitURL = hostedInfo.git() + if (!gitURL) return trySSH(from, hostedInfo, cb) + + log.silly('tryGitProto', 'attempting to clone', gitURL) + tryClone(from, gitURL, true, function (er) { + if (er) return tryHTTPS(from, hostedInfo, cb) + + cb.apply(this, arguments) + }) +} + +function tryHTTPS (from, hostedInfo, cb) { + var httpsURL = hostedInfo.https() + if (!httpsURL) { + return cb(new Error(from + ' can not be cloned via Git, SSH, or HTTPS')) + } + + log.silly('tryHTTPS', 'attempting to clone', httpsURL) + tryClone(from, httpsURL, true, function (er) { + if (er) return trySSH(from, hostedInfo, cb) + + cb.apply(this, arguments) + }) +} + +function trySSH (from, hostedInfo, cb) { + var sshURL = hostedInfo.ssh() + if (!sshURL) return tryHTTPS(from, hostedInfo, cb) + + log.silly('trySSH', 'attempting to clone', sshURL) + tryClone(from, sshURL, false, cb) +} + +function tryClone (from, combinedURL, silent, cb) { + log.silly('tryClone', 'cloning', from, 'via', combinedURL) + + var normalized = normalizeGitUrl(combinedURL) + var cloneURL = normalized.url + var treeish = normalized.branch + + // ensure that similarly-named remotes don't collide + var repoID = cloneURL.replace(/[^a-zA-Z0-9]+/g, '-') + '-' + + crypto.createHash('sha1').update(combinedURL).digest('hex').slice(0, 8) + var cachedRemote = path.join(remotes, repoID) + + cb = inflight(repoID, cb) + if (!cb) { + return log.verbose('tryClone', repoID, 'already in flight; waiting') + } + log.verbose('tryClone', repoID, 'not in flight; caching') + + // initialize the remotes cache with the correct perms + getGitDir(function (er) { + if (er) return cb(er) + fs.stat(cachedRemote, function (er, s) { + if (er) return mirrorRemote(from, cloneURL, treeish, cachedRemote, silent, finish) + if (!s.isDirectory()) return resetRemote(from, cloneURL, treeish, cachedRemote, finish) + + validateExistingRemote(from, cloneURL, treeish, cachedRemote, finish) + }) + + // always set permissions on the cached remote + function finish (er, data) { + if (er) return cb(er, data) + addModeRecursive(cachedRemote, npm.modes.file, function (er) { + return cb(er, data) + }) + } + }) +} + +// don't try too hard to hold on to a remote +function resetRemote (from, cloneURL, treeish, cachedRemote, cb) { + log.info('resetRemote', 'resetting', cachedRemote, 'for', from) + rm(cachedRemote, function (er) { + if (er) return cb(er) + mirrorRemote(from, cloneURL, treeish, cachedRemote, false, cb) + }) +} + +// reuse a cached remote when possible, but nuke it if it's in an +// inconsistent state +function validateExistingRemote (from, cloneURL, treeish, cachedRemote, cb) { + git.whichAndExec( + ['config', '--get', 'remote.origin.url'], + { cwd: cachedRemote, env: gitEnv() }, + function (er, stdout, stderr) { + var originURL + if (stdout) { + originURL = stdout.trim() + log.silly('validateExistingRemote', from, 'remote.origin.url:', originURL) + } + + if (stderr) stderr = stderr.trim() + if (stderr || er) { + log.warn('addRemoteGit', from, 'resetting remote', cachedRemote, 'because of error:', stderr || er) + return resetRemote(from, cloneURL, treeish, cachedRemote, cb) + } else if (cloneURL !== originURL) { + log.warn( + 'addRemoteGit', + from, + 'pre-existing cached repo', cachedRemote, 'points to', originURL, 'and not', cloneURL + ) + return resetRemote(from, cloneURL, treeish, cachedRemote, cb) + } + + log.verbose('validateExistingRemote', from, 'is updating existing cached remote', cachedRemote) + updateRemote(from, cloneURL, treeish, cachedRemote, cb) + } + ) +} + +// make a complete bare mirror of the remote repo +// NOTE: npm uses a blank template directory to prevent weird inconsistencies +// https://github.com/npm/npm/issues/5867 +function mirrorRemote (from, cloneURL, treeish, cachedRemote, silent, cb) { + mkdir(cachedRemote, function (er) { + if (er) return cb(er) + + var args = [ + 'clone', + '--template=' + templates, + '--mirror', + cloneURL, cachedRemote + ] + git.whichAndExec( + ['clone', '--template=' + templates, '--mirror', cloneURL, cachedRemote], + { cwd: cachedRemote, env: gitEnv() }, + function (er, stdout, stderr) { + if (er) { + var combined = (stdout + '\n' + stderr).trim() + var command = 'git ' + args.join(' ') + ':' + if (silent) { + log.verbose(command, combined) + } else { + log.error(command, combined) + } + return cb(er) + } + log.verbose('mirrorRemote', from, 'git clone ' + cloneURL, stdout.trim()) + setPermissions(from, cloneURL, treeish, cachedRemote, cb) + } + ) + }) +} + +function setPermissions (from, cloneURL, treeish, cachedRemote, cb) { + if (process.platform === 'win32') { + log.verbose('setPermissions', from, 'skipping chownr on Windows') + resolveHead(from, cloneURL, treeish, cachedRemote, cb) + } else { + getGitDir(function (er, cs) { + if (er) { + log.error('setPermissions', from, 'could not get cache stat') + return cb(er) + } + + chownr(cachedRemote, cs.uid, cs.gid, function (er) { + if (er) { + log.error( + 'setPermissions', + 'Failed to change git repository ownership under npm cache for', + cachedRemote + ) + return cb(er) + } + + log.verbose('setPermissions', from, 'set permissions on', cachedRemote) + resolveHead(from, cloneURL, treeish, cachedRemote, cb) + }) + }) + } +} + +// always fetch the origin, even right after mirroring, because this way +// permissions will get set correctly +function updateRemote (from, cloneURL, treeish, cachedRemote, cb) { + git.whichAndExec( + ['fetch', '-a', 'origin'], + { cwd: cachedRemote, env: gitEnv() }, + function (er, stdout, stderr) { + if (er) { + var combined = (stdout + '\n' + stderr).trim() + log.error('git fetch -a origin (' + cloneURL + ')', combined) + return cb(er) + } + log.verbose('updateRemote', 'git fetch -a origin (' + cloneURL + ')', stdout.trim()) + + setPermissions(from, cloneURL, treeish, cachedRemote, cb) + } + ) +} + +// branches and tags are both symbolic labels that can be attached to different +// commits, so resolve the commit-ish to the current actual treeish the label +// corresponds to +// +// important for shrinkwrap +function resolveHead (from, cloneURL, treeish, cachedRemote, cb) { + log.verbose('resolveHead', from, 'original treeish:', treeish) + var args = ['rev-list', '-n1', treeish] + git.whichAndExec( + args, + { cwd: cachedRemote, env: gitEnv() }, + function (er, stdout, stderr) { + if (er) { + log.error('git ' + args.join(' ') + ':', stderr) + return cb(er) + } + + var resolvedTreeish = stdout.trim() + log.silly('resolveHead', from, 'resolved treeish:', resolvedTreeish) + + var resolvedURL = getResolved(cloneURL, resolvedTreeish) + if (!resolvedURL) { + return cb(new Error( + 'unable to clone ' + from + ' because git clone string ' + + cloneURL + ' is in a form npm can\'t handle' + )) + } + log.verbose('resolveHead', from, 'resolved Git URL:', resolvedURL) + + // generate a unique filename + var tmpdir = path.join( + npm.tmp, + 'git-cache-' + crypto.pseudoRandomBytes(6).toString('hex'), + resolvedTreeish + ) + log.silly('resolveHead', 'Git working directory:', tmpdir) + + mkdir(tmpdir, function (er) { + if (er) return cb(er) + + cloneResolved(from, resolvedURL, resolvedTreeish, cachedRemote, tmpdir, cb) + }) + } + ) +} + +// make a clone from the mirrored cache so we have a temporary directory in +// which we can check out the resolved treeish +function cloneResolved (from, resolvedURL, resolvedTreeish, cachedRemote, tmpdir, cb) { + var args = ['clone', cachedRemote, tmpdir] + git.whichAndExec( + args, + { cwd: cachedRemote, env: gitEnv() }, + function (er, stdout, stderr) { + stdout = (stdout + '\n' + stderr).trim() + if (er) { + log.error('git ' + args.join(' ') + ':', stderr) + return cb(er) + } + log.verbose('cloneResolved', from, 'clone', stdout) + + checkoutTreeish(from, resolvedURL, resolvedTreeish, tmpdir, cb) + } + ) +} + +// there is no safe way to do a one-step clone to a treeish that isn't +// guaranteed to be a branch, so explicitly check out the treeish once it's +// cloned +function checkoutTreeish (from, resolvedURL, resolvedTreeish, tmpdir, cb) { + var args = ['checkout', resolvedTreeish] + git.whichAndExec( + args, + { cwd: tmpdir, env: gitEnv() }, + function (er, stdout, stderr) { + stdout = (stdout + '\n' + stderr).trim() + if (er) { + log.error('git ' + args.join(' ') + ':', stderr) + return cb(er) + } + log.verbose('checkoutTreeish', from, 'checkout', stdout) + + // convince addLocal that the checkout is a local dependency + realizePackageSpecifier(tmpdir, function (er, spec) { + if (er) { + log.error('addRemoteGit', 'Failed to map', tmpdir, 'to a package specifier') + return cb(er) + } + + // ensure pack logic is applied + // https://github.com/npm/npm/issues/6400 + addLocal(spec, null, function (er, data) { + if (data) { + if (npm.config.get('save-exact')) { + log.verbose('addRemoteGit', 'data._from:', resolvedURL, '(save-exact)') + data._from = resolvedURL + } else { + log.verbose('addRemoteGit', 'data._from:', from) + data._from = from + } + + log.verbose('addRemoteGit', 'data._resolved:', resolvedURL) + data._resolved = resolvedURL + } + + cb(er, data) + }) + }) + } + ) +} + +function getGitDir (cb) { + correctMkdir(remotes, function (er, stats) { + if (er) return cb(er) + + // We don't need global templates when cloning. Use an empty directory for + // the templates, creating it (and setting its permissions) if necessary. + mkdir(templates, function (er) { + if (er) return cb(er) + + // Ensure that both the template and remotes directories have the correct + // permissions. + fs.chown(templates, stats.uid, stats.gid, function (er) { + cb(er, stats) + }) + }) + }) +} + +var gitEnv_ +function gitEnv () { + // git responds to env vars in some weird ways in post-receive hooks + // so don't carry those along. + if (gitEnv_) return gitEnv_ + + // allow users to override npm's insistence on not prompting for + // passphrases, but default to just failing when credentials + // aren't available + gitEnv_ = { GIT_ASKPASS: 'echo' } + + for (var k in process.env) { + if (!~VALID_VARIABLES.indexOf(k) && k.match(/^GIT/)) continue + gitEnv_[k] = process.env[k] + } + return gitEnv_ +} + +addRemoteGit.getResolved = getResolved +function getResolved (uri, treeish) { + // normalize hosted-git-info clone URLs back into regular URLs + // this will only work on URLs that hosted-git-info recognizes + // https://github.com/npm/npm/issues/7961 + var rehydrated = hostedFromURL(uri) + if (rehydrated) uri = rehydrated.toString() + + var parsed = url.parse(uri) + + // Checks for known protocols: + // http:, https:, ssh:, and git:, with optional git+ prefix. + if (!parsed.protocol || + !parsed.protocol.match(/^(((git\+)?(https?|ssh))|git|file):$/)) { + uri = 'git+ssh://' + uri + } + + if (!/^git[+:]/.test(uri)) { + uri = 'git+' + uri + } + + // Not all URIs are actually URIs, so use regex for the treeish. + return uri.replace(/(?:#.*)?$/, '#' + treeish) +} + +// similar to chmodr except it add permissions rather than overwriting them +// adapted from https://github.com/isaacs/chmodr/blob/master/chmodr.js +function addModeRecursive (cachedRemote, mode, cb) { + fs.readdir(cachedRemote, function (er, children) { + // Any error other than ENOTDIR means it's not readable, or doesn't exist. + // Give up. + if (er && er.code !== 'ENOTDIR') return cb(er) + if (er || !children.length) return addMode(cachedRemote, mode, cb) + + var len = children.length + var errState = null + children.forEach(function (child) { + addModeRecursive(path.resolve(cachedRemote, child), mode, then) + }) + + function then (er) { + if (errState) return undefined + if (er) return cb(errState = er) + if (--len === 0) return addMode(cachedRemote, dirMode(mode), cb) + } + }) +} + +function addMode (cachedRemote, mode, cb) { + fs.stat(cachedRemote, function (er, stats) { + if (er) return cb(er) + mode = stats.mode | mode + fs.chmod(cachedRemote, mode, cb) + }) +} + +// taken from https://github.com/isaacs/chmodr/blob/master/chmodr.js +function dirMode (mode) { + if (mode & parseInt('0400', 8)) mode |= parseInt('0100', 8) + if (mode & parseInt('040', 8)) mode |= parseInt('010', 8) + if (mode & parseInt('04', 8)) mode |= parseInt('01', 8) + return mode +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-remote-tarball.js b/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-remote-tarball.js new file mode 100644 index 00000000..bbc819a4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/cache/add-remote-tarball.js @@ -0,0 +1,120 @@ +var mkdir = require("mkdirp") + , assert = require("assert") + , log = require("npmlog") + , path = require("path") + , sha = require("sha") + , retry = require("retry") + , writeStreamAtomic = require("fs-write-stream-atomic") + , PassThrough = require('readable-stream').PassThrough + , npm = require("../npm.js") + , inflight = require("inflight") + , addLocalTarball = require("./add-local-tarball.js") + , cacheFile = require("npm-cache-filename") + +module.exports = addRemoteTarball + +function addRemoteTarball (u, pkgData, shasum, auth, cb_) { + assert(typeof u === "string", "must have module URL") + assert(typeof cb_ === "function", "must have callback") + + function cb (er, data) { + if (data) { + data._from = u + data._resolved = u + data._shasum = data._shasum || shasum + } + cb_(er, data) + } + + cb_ = inflight(u, cb_) + if (!cb_) return log.verbose("addRemoteTarball", u, "already in flight; waiting") + log.verbose("addRemoteTarball", u, "not in flight; adding") + + // XXX Fetch direct to cache location, store tarballs under + // ${cache}/registry.npmjs.org/pkg/-/pkg-1.2.3.tgz + var tmp = cacheFile(npm.tmp, u) + + function next (er, resp, shasum) { + if (er) return cb(er) + addLocalTarball(tmp, pkgData, shasum, cb) + } + + log.verbose("addRemoteTarball", [u, shasum]) + mkdir(path.dirname(tmp), function (er) { + if (er) return cb(er) + addRemoteTarball_(u, tmp, shasum, auth, next) + }) +} + +function addRemoteTarball_ (u, tmp, shasum, auth, cb) { + // Tuned to spread 3 attempts over about a minute. + // See formula at . + var operation = retry.operation({ + retries: npm.config.get("fetch-retries") + , factor: npm.config.get("fetch-retry-factor") + , minTimeout: npm.config.get("fetch-retry-mintimeout") + , maxTimeout: npm.config.get("fetch-retry-maxtimeout") + }) + + operation.attempt(function (currentAttempt) { + log.info("retry", "fetch attempt " + currentAttempt + + " at " + (new Date()).toLocaleTimeString()) + fetchAndShaCheck(u, tmp, shasum, auth, function (er, response, shasum) { + // Only retry on 408, 5xx or no `response`. + var sc = response && response.statusCode + var statusRetry = !sc || (sc === 408 || sc >= 500) + if (er && statusRetry && operation.retry(er)) { + log.warn("retry", "will retry, error on last attempt: " + er) + return + } + cb(er, response, shasum) + }) + }) +} + +function fetchAndShaCheck (u, tmp, shasum, auth, cb) { + npm.registry.fetch(u, { auth : auth }, function (er, response) { + if (er) { + log.error("fetch failed", u) + return cb(er, response) + } + + var tarball = writeStreamAtomic(tmp, { mode: npm.modes.file }) + tarball.on('error', function (er) { + cb(er) + tarball.destroy() + }) + + tarball.on("finish", function () { + if (!shasum) { + // Well, we weren't given a shasum, so at least sha what we have + // in case we want to compare it to something else later + return sha.get(tmp, function (er, shasum) { + log.silly("fetchAndShaCheck", "shasum", shasum) + cb(er, response, shasum) + }) + } + + // validate that the url we just downloaded matches the expected shasum. + log.silly("fetchAndShaCheck", "shasum", shasum) + sha.check(tmp, shasum, function (er) { + if (er && er.message) { + // add original filename for better debuggability + er.message = er.message + "\n" + "From: " + u + } + return cb(er, response, shasum) + }) + }) + + // 0.8 http streams have a bug, where if they're paused with data in + // their buffers when the socket closes, they call `end` before emptying + // those buffers, which results in the entire pipeline ending and thus + // the point that applied backpressure never being able to trigger a + // `resume`. + // We work around this by piping into a pass through stream that has + // unlimited buffering. The pass through stream is from readable-stream + // and is thus a current streams3 implementation that is free of these + // bugs even on 0.8. + response.pipe(PassThrough({highWaterMark: Infinity})).pipe(tarball) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/cache/cached-package-root.js b/bin/nodejs0.12.16/node_modules/npm/lib/cache/cached-package-root.js new file mode 100644 index 00000000..b4a4924b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/cache/cached-package-root.js @@ -0,0 +1,14 @@ +var assert = require("assert") +var resolve = require("path").resolve + +var npm = require("../npm.js") + +module.exports = getCacheRoot + +function getCacheRoot (data) { + assert(data, "must pass package metadata") + assert(data.name, "package metadata must include name") + assert(data.version, "package metadata must include version") + + return resolve(npm.cache, data.name, data.version) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/cache/caching-client.js b/bin/nodejs0.12.16/node_modules/npm/lib/cache/caching-client.js new file mode 100644 index 00000000..eb35c58c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/cache/caching-client.js @@ -0,0 +1,218 @@ +module.exports = CachingRegistryClient + +var path = require("path") + , fs = require("graceful-fs") + , url = require("url") + , assert = require("assert") + , inherits = require("util").inherits + +var RegistryClient = require("npm-registry-client") + , npm = require("../npm.js") + , log = require("npmlog") + , getCacheStat = require("./get-stat.js") + , cacheFile = require("npm-cache-filename") + , mkdirp = require("mkdirp") + , rimraf = require("rimraf") + , chownr = require("chownr") + , writeFile = require("write-file-atomic") + +function CachingRegistryClient (config) { + RegistryClient.call(this, adaptConfig(config)) + + this._mapToCache = cacheFile(config.get("cache")) + + // swizzle in our custom cache invalidation logic + this._request = this.request + this.request = this._invalidatingRequest + this.get = get +} +inherits(CachingRegistryClient, RegistryClient) + +CachingRegistryClient.prototype._invalidatingRequest = function (uri, params, cb) { + var client = this + this._request.call(this, uri, params, function () { + var args = arguments + + var method = params.method + if (method !== "HEAD" && method !== "GET") { + var invalidated = client._mapToCache(uri) + // invalidate cache + // + // This is irrelevant for commands that do etag / last-modified caching, + // but ls and view also have a timed cache, so this keeps the user from + // thinking that it didn't work when it did. + // Note that failure is an acceptable option here, since the only + // result will be a stale cache for some helper commands. + log.verbose("request", "invalidating", invalidated, "on", method) + return rimraf(invalidated, function () { + cb.apply(undefined, args) + }) + } + + cb.apply(undefined, args) + }) +} + +function get (uri, params, cb) { + assert(typeof uri === "string", "must pass registry URI to get") + assert(params && typeof params === "object", "must pass params to get") + assert(typeof cb === "function", "must pass callback to get") + + var parsed = url.parse(uri) + assert( + parsed.protocol === "http:" || parsed.protocol === "https:", + "must have a URL that starts with http: or https:" + ) + + var cacheBase = cacheFile(npm.config.get("cache"))(uri) + var cachePath = path.join(cacheBase, ".cache.json") + + // If the GET is part of a write operation (PUT or DELETE), then + // skip past the cache entirely, but still save the results. + if (uri.match(/\?write=true$/)) { + log.verbose("get", "GET as part of write; not caching result") + return get_.call(this, uri, cachePath, params, cb) + } + + var client = this + fs.stat(cachePath, function (er, stat) { + if (!er) { + fs.readFile(cachePath, function (er, data) { + try { + data = JSON.parse(data) + } + catch (ex) { + data = null + } + + params.stat = stat + params.data = data + + get_.call(client, uri, cachePath, params, cb) + }) + } + else { + get_.call(client, uri, cachePath, params, cb) + } + }) +} + +function get_ (uri, cachePath, params, cb) { + var staleOk = params.staleOk === undefined ? false : params.staleOk + , timeout = params.timeout === undefined ? -1 : params.timeout + , data = params.data + , stat = params.stat + , etag + , lastModified + + timeout = Math.min(timeout, npm.config.get("cache-max") || 0) + timeout = Math.max(timeout, npm.config.get("cache-min") || -Infinity) + if (process.env.COMP_CWORD !== undefined && + process.env.COMP_LINE !== undefined && + process.env.COMP_POINT !== undefined) { + timeout = Math.max(timeout, 60000) + } + + if (data) { + if (data._etag) etag = data._etag + if (data._lastModified) lastModified = data._lastModified + + if (stat && timeout && timeout > 0) { + if ((Date.now() - stat.mtime.getTime())/1000 < timeout) { + log.verbose("get", uri, "not expired, no request") + delete data._etag + delete data._lastModified + return cb(null, data, JSON.stringify(data), { statusCode : 304 }) + } + + if (staleOk) { + log.verbose("get", uri, "staleOk, background update") + delete data._etag + delete data._lastModified + process.nextTick( + cb.bind(null, null, data, JSON.stringify(data), { statusCode : 304 } ) + ) + cb = function () {} + } + } + } + + var options = { + etag : etag, + lastModified : lastModified, + follow : params.follow, + auth : params.auth + } + this.request(uri, options, function (er, remoteData, raw, response) { + // if we get an error talking to the registry, but we have it + // from the cache, then just pretend we got it. + if (er && cachePath && data && !data.error) { + er = null + response = { statusCode: 304 } + } + + if (response) { + log.silly("get", "cb", [response.statusCode, response.headers]) + if (response.statusCode === 304 && (etag || lastModified)) { + remoteData = data + log.verbose(etag ? "etag" : "lastModified", uri+" from cache") + } + } + + data = remoteData + if (!data) er = er || new Error("failed to fetch from registry: " + uri) + + if (er) return cb(er, data, raw, response) + + saveToCache(cachePath, data, saved) + + // just give the write the old college try. if it fails, whatever. + function saved () { + delete data._etag + delete data._lastModified + cb(er, data, raw, response) + } + + function saveToCache (cachePath, data, saved) { + log.verbose("get", "saving", data.name, "to", cachePath) + getCacheStat(function (er, st) { + mkdirp(path.dirname(cachePath), function (er, made) { + if (er) return saved() + + writeFile(cachePath, JSON.stringify(data), function (er) { + if (er) return saved() + + chownr(made || cachePath, st.uid, st.gid, saved) + }) + }) + }) + } + }) +} + +function adaptConfig (config) { + return { + proxy : { + http : config.get("proxy"), + https : config.get("https-proxy"), + localAddress : config.get("local-address") + }, + ssl : { + certificate : config.get("cert"), + key : config.get("key"), + ca : config.get("ca"), + strict : config.get("strict-ssl") + }, + retry : { + retries : config.get("fetch-retries"), + factor : config.get("fetch-retry-factor"), + minTimeout : config.get("fetch-retry-mintimeout"), + maxTimeout : config.get("fetch-retry-maxtimeout") + }, + userAgent : config.get("user-agent"), + log : log, + defaultTag : config.get("tag"), + couchToken : config.get("_token"), + maxSockets : config.get('maxsockets') + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/cache/get-stat.js b/bin/nodejs0.12.16/node_modules/npm/lib/cache/get-stat.js new file mode 100644 index 00000000..309f5622 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/cache/get-stat.js @@ -0,0 +1,6 @@ +var npm = require('../npm.js') +var correctMkdir = require('../utils/correct-mkdir.js') + +module.exports = function getCacheStat (cb) { + correctMkdir(npm.cache, cb) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/cache/update-index.js b/bin/nodejs0.12.16/node_modules/npm/lib/cache/update-index.js new file mode 100644 index 00000000..57e9a866 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/cache/update-index.js @@ -0,0 +1,104 @@ +module.exports = updateIndex + +var fs = require('graceful-fs') +var assert = require('assert') +var path = require('path') +var mkdir = require('mkdirp') +var chownr = require('chownr') +var npm = require('../npm.js') +var log = require('npmlog') +var cacheFile = require('npm-cache-filename') +var getCacheStat = require('./get-stat.js') +var mapToRegistry = require('../utils/map-to-registry.js') + +/* /-/all is special. + * It uses timestamp-based caching and partial updates, + * because it is a monster. + */ +function updateIndex (staleness, cb) { + assert(typeof cb === 'function', 'must pass callback to updateIndex') + + mapToRegistry('-/all', npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + timeout: staleness, + follow: true, + staleOk: true, + auth: auth + } + var cacheBase = cacheFile(npm.config.get('cache'))(uri) + var cachePath = path.join(cacheBase, '.cache.json') + log.info('updateIndex', cachePath) + + getCacheStat(function (er, st) { + if (er) return cb(er) + + mkdir(cacheBase, function (er, made) { + if (er) return cb(er) + + fs.readFile(cachePath, function (er, data) { + if (er) { + log.warn('', 'Building the local index for the first time, please be patient') + return updateIndex_(uri, params, {}, cachePath, cb) + } + + chownr(made || cachePath, st.uid, st.gid, function (er) { + if (er) return cb(er) + + try { + data = JSON.parse(data) + } catch (ex) { + fs.writeFile(cachePath, '{}', function (er) { + if (er) return cb(new Error('Broken cache.')) + + log.warn('', 'Building the local index for the first time, please be patient') + return updateIndex_(uri, params, {}, cachePath, cb) + }) + } + + var t = +data._updated || 0 + // use the cache and update in the background if it's not too old + if (Date.now() - t < 60000) { + cb(null, data) + cb = function () {} + } + + if (t === 0) { + log.warn('', 'Building the local index for the first time, please be patient') + } else { + log.verbose('updateIndex', 'Cached search data present with timestamp', t) + uri += '/since?stale=update_after&startkey=' + t + } + updateIndex_(uri, params, data, cachePath, cb) + }) + }) + }) + }) + }) +} + +function updateIndex_ (all, params, data, cachePath, cb) { + log.silly('update-index', 'fetching', all) + npm.registry.request(all, params, function (er, updates, _, res) { + if (er) return cb(er, data) + + var headers = res.headers + var updated = updates._updated || Date.parse(headers.date) + + Object.keys(updates).forEach(function (p) { data[p] = updates[p] }) + + data._updated = updated + getCacheStat(function (er, st) { + if (er) return cb(er) + + fs.writeFile(cachePath, JSON.stringify(data), function (er) { + delete data._updated + if (er) return cb(er) + chownr(cachePath, st.uid, st.gid, function (er) { + cb(er, data) + }) + }) + }) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/completion.js b/bin/nodejs0.12.16/node_modules/npm/lib/completion.js new file mode 100644 index 00000000..07e21e58 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/completion.js @@ -0,0 +1,248 @@ + +module.exports = completion + +completion.usage = "npm completion >> ~/.bashrc\n" + + "npm completion >> ~/.zshrc\n" + + "source <(npm completion)" + +var npm = require("./npm.js") + , npmconf = require("./config/core.js") + , configDefs = npmconf.defs + , configTypes = configDefs.types + , shorthands = configDefs.shorthands + , nopt = require("nopt") + , configNames = Object.keys(configTypes).filter(function (e) { + return e.charAt(0) !== "_" + }) + , shorthandNames = Object.keys(shorthands) + , allConfs = configNames.concat(shorthandNames) + , once = require("once") + + +completion.completion = function (opts, cb) { + if (opts.w > 3) return cb() + + var fs = require("graceful-fs") + , path = require("path") + , bashExists = null + , zshExists = null + fs.stat(path.resolve(process.env.HOME, ".bashrc"), function (er) { + bashExists = !er + next() + }) + fs.stat(path.resolve(process.env.HOME, ".zshrc"), function (er) { + zshExists = !er + next() + }) + function next () { + if (zshExists === null || bashExists === null) return + var out = [] + if (zshExists) out.push("~/.zshrc") + if (bashExists) out.push("~/.bashrc") + if (opts.w === 2) out = out.map(function (m) { + return [">>", m] + }) + cb(null, out) + } +} + +function completion (args, cb) { + if (process.platform === 'win32' && !(/^MINGW(32|64)$/.test(process.env.MSYSTEM))) { + var e = new Error('npm completion supported only in MINGW / Git bash on Windows') + e.code = 'ENOTSUP' + e.errno = require('constants').ENOTSUP + return cb(e) + } + + // if the COMP_* isn't in the env, then just dump the script. + if (process.env.COMP_CWORD === undefined + ||process.env.COMP_LINE === undefined + ||process.env.COMP_POINT === undefined + ) return dumpScript(cb) + + console.error(process.env.COMP_CWORD) + console.error(process.env.COMP_LINE) + console.error(process.env.COMP_POINT) + + //console.log("abracadabrasauce\nabracad cat monger") + //if (Math.random() * 3 < 1) console.log("man\\ bear\\ pig") + //else if (Math.random() * 3 < 1) + // console.log("porkchop\\ sandwiches\nporkman") + //else console.log("encephylophagy") + + // get the partial line and partial word, + // if the point isn't at the end. + // ie, tabbing at: npm foo b|ar + var w = +process.env.COMP_CWORD + , words = args.map(unescape) + , word = words[w] + , line = process.env.COMP_LINE + , point = +process.env.COMP_POINT + , partialLine = line.substr(0, point) + , partialWords = words.slice(0, w) + + // figure out where in that last word the point is. + var partialWord = args[w] + , i = partialWord.length + while (partialWord.substr(0, i) !== partialLine.substr(-1*i) && i > 0) { + i -- + } + partialWord = unescape(partialWord.substr(0, i)) + partialWords.push(partialWord) + + var opts = { words : words + , w : w + , word : word + , line : line + , lineLength : line.length + , point : point + , partialLine : partialLine + , partialWords : partialWords + , partialWord : partialWord + , raw: args + } + + cb = wrapCb(cb, opts) + + console.error(opts) + + if (partialWords.slice(0, -1).indexOf("--") === -1) { + if (word.charAt(0) === "-") return configCompl(opts, cb) + if (words[w - 1] + && words[w - 1].charAt(0) === "-" + && !isFlag(words[w - 1])) { + // awaiting a value for a non-bool config. + // don't even try to do this for now + console.error("configValueCompl") + return configValueCompl(opts, cb) + } + } + + // try to find the npm command. + // it's the first thing after all the configs. + // take a little shortcut and use npm's arg parsing logic. + // don't have to worry about the last arg being implicitly + // boolean'ed, since the last block will catch that. + var parsed = opts.conf = + nopt(configTypes, shorthands, partialWords.slice(0, -1), 0) + // check if there's a command already. + console.error(parsed) + var cmd = parsed.argv.remain[1] + if (!cmd) return cmdCompl(opts, cb) + + Object.keys(parsed).forEach(function (k) { + npm.config.set(k, parsed[k]) + }) + + // at this point, if words[1] is some kind of npm command, + // then complete on it. + // otherwise, do nothing + cmd = npm.commands[cmd] + if (cmd && cmd.completion) return cmd.completion(opts, cb) + + // nothing to do. + cb() +} + +function dumpScript (cb) { + var fs = require("graceful-fs") + , path = require("path") + , p = path.resolve(__dirname, "utils/completion.sh") + + // The Darwin patch below results in callbacks first for the write and then + // for the error handler, so make sure we only call our callback once. + cb = once(cb) + + fs.readFile(p, "utf8", function (er, d) { + if (er) return cb(er) + d = d.replace(/^\#\!.*?\n/, "") + + process.stdout.write(d, function () { cb() }) + process.stdout.on("error", function (er) { + // Darwin is a real dick sometimes. + // + // This is necessary because the "source" or "." program in + // bash on OS X closes its file argument before reading + // from it, meaning that you get exactly 1 write, which will + // work most of the time, and will always raise an EPIPE. + // + // Really, one should not be tossing away EPIPE errors, or any + // errors, so casually. But, without this, `. <(npm completion)` + // can never ever work on OS X. + if (er.errno === "EPIPE") er = null + cb(er) + }) + + }) +} + +function unescape (w) { + if (w.charAt(0) === "\"") return w.replace(/^"|"$/g, "") + else return w.replace(/\\ /g, " ") +} + +function escape (w) { + if (!w.match(/\s+/)) return w + return "\"" + w + "\"" +} + +// The command should respond with an array. Loop over that, +// wrapping quotes around any that have spaces, and writing +// them to stdout. Use console.log, not the outfd config. +// If any of the items are arrays, then join them with a space. +// Ie, returning ["a", "b c", ["d", "e"]] would allow it to expand +// to: "a", "b c", or "d" "e" +function wrapCb (cb, opts) { return function (er, compls) { + if (!Array.isArray(compls)) compls = compls ? [compls] : [] + compls = compls.map(function (c) { + if (Array.isArray(c)) c = c.map(escape).join(" ") + else c = escape(c) + return c + }) + if (opts.partialWord) compls = compls.filter(function (c) { + return c.indexOf(opts.partialWord) === 0 + }) + console.error([er && er.stack, compls, opts.partialWord]) + if (er || compls.length === 0) return cb(er) + + console.log(compls.join("\n")) + cb() +}} + +// the current word has a dash. Return the config names, +// with the same number of dashes as the current word has. +function configCompl (opts, cb) { + var word = opts.word + , split = word.match(/^(-+)((?:no-)*)(.*)$/) + , dashes = split[1] + , no = split[2] + , flags = configNames.filter(isFlag) + console.error(flags) + + return cb(null, allConfs.map(function (c) { + return dashes + c + }).concat(flags.map(function (f) { + return dashes + (no || "no-") + f + }))) +} + +// expand with the valid values of various config values. +// not yet implemented. +function configValueCompl (opts, cb) { + console.error("configValue", opts) + return cb(null, []) +} + +// check if the thing is a flag or not. +function isFlag (word) { + // shorthands never take args. + var split = word.match(/^(-*)((?:no-)+)?(.*)$/) + , no = split[2] + , conf = split[3] + return no || configTypes[conf] === Boolean || shorthands[conf] +} + +// complete against the npm commands +function cmdCompl (opts, cb) { + return cb(null, npm.fullList) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config.js b/bin/nodejs0.12.16/node_modules/npm/lib/config.js new file mode 100644 index 00000000..3c58a798 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config.js @@ -0,0 +1,285 @@ + +module.exports = config + +config.usage = "npm config set " + + "\nnpm config get []" + + "\nnpm config delete " + + "\nnpm config list" + + "\nnpm config edit" + + "\nnpm set " + + "\nnpm get []" + +var log = require("npmlog") + , npm = require("./npm.js") + , npmconf = require("./config/core.js") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , types = npmconf.defs.types + , ini = require("ini") + , editor = require("editor") + , os = require("os") + , umask = require("./utils/umask") + +config.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv[1] !== "config") argv.unshift("config") + if (argv.length === 2) { + var cmds = ["get", "set", "delete", "ls", "rm", "edit"] + if (opts.partialWord !== "l") cmds.push("list") + return cb(null, cmds) + } + + var action = argv[2] + switch (action) { + case "set": + // todo: complete with valid values, if possible. + if (argv.length > 3) return cb(null, []) + // fallthrough + case "get": + case "delete": + case "rm": + return cb(null, Object.keys(types)) + case "edit": + case "list": case "ls": + return cb(null, []) + default: return cb(null, []) + } +} + +// npm config set key value +// npm config get key +// npm config list +function config (args, cb) { + var action = args.shift() + switch (action) { + case "set": return set(args[0], args[1], cb) + case "get": return get(args[0], cb) + case "delete": case "rm": case "del": return del(args[0], cb) + case "list": case "ls": return list(cb) + case "edit": return edit(cb) + default: return unknown(action, cb) + } +} + +function edit (cb) { + var e = npm.config.get("editor") + , which = npm.config.get("global") ? "global" : "user" + , f = npm.config.get(which + "config") + if (!e) return cb(new Error("No EDITOR config or environ set.")) + npm.config.save(which, function (er) { + if (er) return cb(er) + fs.readFile(f, "utf8", function (er, data) { + if (er) data = "" + data = [ ";;;;" + , "; npm "+(npm.config.get("global") ? + "globalconfig" : "userconfig")+" file" + , "; this is a simple ini-formatted file" + , "; lines that start with semi-colons are comments." + , "; read `npm help config` for help on the various options" + , ";;;;" + , "" + , data + ].concat( [ ";;;;" + , "; all options with default values" + , ";;;;" + ] + ) + .concat(Object.keys(npmconf.defaults).reduce(function (arr, key) { + var obj = {} + obj[key] = npmconf.defaults[key] + if (key === "logstream") return arr + return arr.concat( + ini.stringify(obj) + .replace(/\n$/m, "") + .replace(/^/g, "; ") + .replace(/\n/g, "\n; ") + .split("\n")) + }, [])) + .concat([""]) + .join(os.EOL) + writeFileAtomic + ( f + , data + , function (er) { + if (er) return cb(er) + editor(f, { editor: e }, cb) + } + ) + }) + }) +} + +function del (key, cb) { + if (!key) return cb(new Error("no key provided")) + var where = npm.config.get("global") ? "global" : "user" + npm.config.del(key, where) + npm.config.save(where, cb) +} + +function set (key, val, cb) { + if (key === undefined) { + return unknown("", cb) + } + if (val === undefined) { + if (key.indexOf("=") !== -1) { + var k = key.split("=") + key = k.shift() + val = k.join("=") + } else { + val = "" + } + } + key = key.trim() + val = val.trim() + log.info("config", "set %j %j", key, val) + var where = npm.config.get("global") ? "global" : "user" + if (key.match(/umask/)) val = umask.fromString(val) + npm.config.set(key, val, where) + npm.config.save(where, cb) +} + +function get (key, cb) { + if (!key) return list(cb) + if (!public(key)) { + return cb(new Error("---sekretz---")) + } + var val = npm.config.get(key) + if (key.match(/umask/)) val = umask.toString(val) + console.log(val) + cb() +} + +function sort (a, b) { + return a > b ? 1 : -1 +} + +function public (k) { + return !(k.charAt(0) === "_" || + k.indexOf(":_") !== -1 || + types[k] !== types[k]) +} + +function getKeys (data) { + return Object.keys(data).filter(public).sort(sort) +} + +function list (cb) { + var msg = "" + , long = npm.config.get("long") + + var cli = npm.config.sources.cli.data + , cliKeys = getKeys(cli) + if (cliKeys.length) { + msg += "; cli configs\n" + cliKeys.forEach(function (k) { + if (cli[k] && typeof cli[k] === "object") return + if (k === "argv") return + msg += k + " = " + JSON.stringify(cli[k]) + "\n" + }) + msg += "\n" + } + + // env configs + var env = npm.config.sources.env.data + , envKeys = getKeys(env) + if (envKeys.length) { + msg += "; environment configs\n" + envKeys.forEach(function (k) { + if (env[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + JSON.stringify(env[k]) + + " (overridden)\n" + } else msg += k + " = " + JSON.stringify(env[k]) + "\n" + }) + msg += "\n" + } + + // user config file + var uconf = npm.config.sources.user.data + , uconfKeys = getKeys(uconf) + if (uconfKeys.length) { + msg += "; userconfig " + npm.config.get("userconfig") + "\n" + uconfKeys.forEach(function (k) { + var val = (k.charAt(0) === "_") + ? "---sekretz---" + : JSON.stringify(uconf[k]) + if (uconf[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + } + + // global config file + var gconf = npm.config.sources.global.data + , gconfKeys = getKeys(gconf) + if (gconfKeys.length) { + msg += "; globalconfig " + npm.config.get("globalconfig") + "\n" + gconfKeys.forEach(function (k) { + var val = (k.charAt(0) === "_") + ? "---sekretz---" + : JSON.stringify(gconf[k]) + if (gconf[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + } + + // builtin config file + var builtin = npm.config.sources.builtin || {} + if (builtin && builtin.data) { + var bconf = builtin.data + , bpath = builtin.path + , bconfKeys = getKeys(bconf) + if (bconfKeys.length) { + msg += "; builtin config " + bpath + "\n" + bconfKeys.forEach(function (k) { + var val = (k.charAt(0) === "_") + ? "---sekretz---" + : JSON.stringify(bconf[k]) + if (bconf[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + } + } + + // only show defaults if --long + if (!long) { + msg += "; node bin location = " + process.execPath + "\n" + + "; cwd = " + process.cwd() + "\n" + + "; HOME = " + process.env.HOME + "\n" + + "; 'npm config ls -l' to show all defaults.\n" + + console.log(msg) + return cb() + } + + var defaults = npmconf.defaults + , defKeys = getKeys(defaults) + msg += "; default values\n" + defKeys.forEach(function (k) { + if (defaults[k] && typeof defaults[k] === "object") return + var val = JSON.stringify(defaults[k]) + if (defaults[k] !== npm.config.get(k)) { + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + + console.log(msg) + return cb() +} + +function unknown (action, cb) { + cb("Usage:\n" + config.usage) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config/clear-credentials-by-uri.js b/bin/nodejs0.12.16/node_modules/npm/lib/config/clear-credentials-by-uri.js new file mode 100644 index 00000000..1944a6ef --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config/clear-credentials-by-uri.js @@ -0,0 +1,16 @@ +var assert = require("assert") + +var toNerfDart = require("./nerf-dart.js") + +module.exports = clearCredentialsByURI + +function clearCredentialsByURI (uri) { + assert(uri && typeof uri === "string", "registry URL is required") + + var nerfed = toNerfDart(uri) + + this.del(nerfed + ":_authToken", "user") + this.del(nerfed + ":_password", "user") + this.del(nerfed + ":username", "user") + this.del(nerfed + ":email", "user") +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config/core.js b/bin/nodejs0.12.16/node_modules/npm/lib/config/core.js new file mode 100644 index 00000000..b432a288 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config/core.js @@ -0,0 +1,441 @@ + +var CC = require("config-chain").ConfigChain +var inherits = require("inherits") +var configDefs = require("./defaults.js") +var types = configDefs.types +var once = require("once") +var fs = require("fs") +var path = require("path") +var nopt = require("nopt") +var ini = require("ini") +var Umask = configDefs.Umask +var mkdirp = require("mkdirp") +var umask = require("../utils/umask") + +exports.load = load +exports.Conf = Conf +exports.loaded = false +exports.rootConf = null +exports.usingBuiltin = false +exports.defs = configDefs + +Object.defineProperty(exports, "defaults", { get: function () { + return configDefs.defaults +}, enumerable: true }) + +Object.defineProperty(exports, "types", { get: function () { + return configDefs.types +}, enumerable: true }) + +exports.validate = validate + +var myUid = process.env.SUDO_UID !== undefined + ? process.env.SUDO_UID : (process.getuid && process.getuid()) +var myGid = process.env.SUDO_GID !== undefined + ? process.env.SUDO_GID : (process.getgid && process.getgid()) + + +var loading = false +var loadCbs = [] +function load () { + var cli, builtin, cb + for (var i = 0; i < arguments.length; i++) + switch (typeof arguments[i]) { + case "string": builtin = arguments[i]; break + case "object": cli = arguments[i]; break + case "function": cb = arguments[i]; break + } + + if (!cb) + cb = function () {} + + if (exports.loaded) { + var ret = exports.loaded + if (cli) { + ret = new Conf(ret) + ret.unshift(cli) + } + return process.nextTick(cb.bind(null, null, ret)) + } + + // either a fresh object, or a clone of the passed in obj + if (!cli) + cli = {} + else + cli = Object.keys(cli).reduce(function (c, k) { + c[k] = cli[k] + return c + }, {}) + + loadCbs.push(cb) + if (loading) + return + + loading = true + + cb = once(function (er, conf) { + if (!er) { + exports.loaded = conf + loading = false + } + loadCbs.forEach(function (fn) { + fn(er, conf) + }) + loadCbs.length = 0 + }) + + // check for a builtin if provided. + exports.usingBuiltin = !!builtin + var rc = exports.rootConf = new Conf() + if (builtin) + rc.addFile(builtin, "builtin") + else + rc.add({}, "builtin") + + rc.on("load", function () { + load_(builtin, rc, cli, cb) + }) + rc.on("error", cb) +} + +function load_(builtin, rc, cli, cb) { + var defaults = configDefs.defaults + var conf = new Conf(rc) + + conf.usingBuiltin = !!builtin + conf.add(cli, "cli") + conf.addEnv() + + conf.loadPrefix(function(er) { + if (er) + return cb(er) + + // If you're doing `npm --userconfig=~/foo.npmrc` then you'd expect + // that ~/.npmrc won't override the stuff in ~/foo.npmrc (or, indeed + // be used at all). + // + // However, if the cwd is ~, then ~/.npmrc is the home for the project + // config, and will override the userconfig. + // + // If you're not setting the userconfig explicitly, then it will be loaded + // twice, which is harmless but excessive. If you *are* setting the + // userconfig explicitly then it will override your explicit intent, and + // that IS harmful and unexpected. + // + // Solution: Do not load project config file that is the same as either + // the default or resolved userconfig value. npm will log a "verbose" + // message about this when it happens, but it is a rare enough edge case + // that we don't have to be super concerned about it. + var projectConf = path.resolve(conf.localPrefix, ".npmrc") + var defaultUserConfig = rc.get("userconfig") + var resolvedUserConfig = conf.get("userconfig") + if (!conf.get("global") && + projectConf !== defaultUserConfig && + projectConf !== resolvedUserConfig) { + conf.addFile(projectConf, "project") + conf.once("load", afterPrefix) + } else { + conf.add({}, "project") + afterPrefix() + } + }) + + function afterPrefix() { + conf.addFile(conf.get("userconfig"), "user") + conf.once("error", cb) + conf.once("load", afterUser) + } + + function afterUser () { + // globalconfig and globalignorefile defaults + // need to respond to the 'prefix' setting up to this point. + // Eg, `npm config get globalconfig --prefix ~/local` should + // return `~/local/etc/npmrc` + // annoying humans and their expectations! + if (conf.get("prefix")) { + var etc = path.resolve(conf.get("prefix"), "etc") + mkdirp(etc, function (err) { + defaults.globalconfig = path.resolve(etc, "npmrc") + defaults.globalignorefile = path.resolve(etc, "npmignore") + afterUserContinuation() + }) + } else { + afterUserContinuation() + } + } + + function afterUserContinuation() { + conf.addFile(conf.get("globalconfig"), "global") + + // move the builtin into the conf stack now. + conf.root = defaults + conf.add(rc.shift(), "builtin") + conf.once("load", function () { + conf.loadExtras(afterExtras) + }) + } + + function afterExtras(er) { + if (er) + return cb(er) + + // warn about invalid bits. + validate(conf) + + var cafile = conf.get("cafile") + + if (cafile) { + return conf.loadCAFile(cafile, finalize) + } + + finalize() + } + + function finalize(er) { + if (er) { + return cb(er) + } + + exports.loaded = conf + cb(er, conf) + } +} + +// Basically the same as CC, but: +// 1. Always ini +// 2. Parses environment variable names in field values +// 3. Field values that start with ~/ are replaced with process.env.HOME +// 4. Can inherit from another Conf object, using it as the base. +inherits(Conf, CC) +function Conf (base) { + if (!(this instanceof Conf)) + return new Conf(base) + + CC.apply(this) + + if (base) + if (base instanceof Conf) + this.root = base.list[0] || base.root + else + this.root = base + else + this.root = configDefs.defaults +} + +Conf.prototype.loadPrefix = require("./load-prefix.js") +Conf.prototype.loadCAFile = require("./load-cafile.js") +Conf.prototype.loadUid = require("./load-uid.js") +Conf.prototype.setUser = require("./set-user.js") +Conf.prototype.findPrefix = require("./find-prefix.js") +Conf.prototype.getCredentialsByURI = require("./get-credentials-by-uri.js") +Conf.prototype.setCredentialsByURI = require("./set-credentials-by-uri.js") +Conf.prototype.clearCredentialsByURI = require("./clear-credentials-by-uri.js") + +Conf.prototype.loadExtras = function(cb) { + this.setUser(function(er) { + if (er) + return cb(er) + this.loadUid(function(er) { + if (er) + return cb(er) + // Without prefix, nothing will ever work + mkdirp(this.prefix, cb) + }.bind(this)) + }.bind(this)) +} + +Conf.prototype.save = function (where, cb) { + var target = this.sources[where] + if (!target || !(target.path || target.source) || !target.data) { + if (where !== "builtin") + var er = new Error("bad save target: " + where) + if (cb) { + process.nextTick(cb.bind(null, er)) + return this + } + return this.emit("error", er) + } + + if (target.source) { + var pref = target.prefix || "" + Object.keys(target.data).forEach(function (k) { + target.source[pref + k] = target.data[k] + }) + if (cb) process.nextTick(cb) + return this + } + + var data = ini.stringify(target.data) + + then = then.bind(this) + done = done.bind(this) + this._saving ++ + + var mode = where === "user" ? "0600" : "0666" + if (!data.trim()) { + fs.unlink(target.path, function () { + // ignore the possible error (e.g. the file doesn't exist) + done(null) + }) + } else { + mkdirp(path.dirname(target.path), function (er) { + if (er) + return then(er) + fs.writeFile(target.path, data, "utf8", function (er) { + if (er) + return then(er) + if (where === "user" && myUid && myGid) + fs.chown(target.path, +myUid, +myGid, then) + else + then() + }) + }) + } + + function then (er) { + if (er) + return done(er) + fs.chmod(target.path, mode, done) + } + + function done (er) { + if (er) { + if (cb) return cb(er) + else return this.emit("error", er) + } + this._saving -- + if (this._saving === 0) { + if (cb) cb() + this.emit("save") + } + } + + return this +} + +Conf.prototype.addFile = function (file, name) { + name = name || file + var marker = {__source__:name} + this.sources[name] = { path: file, type: "ini" } + this.push(marker) + this._await() + fs.readFile(file, "utf8", function (er, data) { + if (er) // just ignore missing files. + return this.add({}, marker) + this.addString(data, file, "ini", marker) + }.bind(this)) + return this +} + +// always ini files. +Conf.prototype.parse = function (content, file) { + return CC.prototype.parse.call(this, content, file, "ini") +} + +Conf.prototype.add = function (data, marker) { + try { + Object.keys(data).forEach(function (k) { + data[k] = parseField(data[k], k) + }) + } + catch (e) { + this.emit("error", e) + return this + } + return CC.prototype.add.call(this, data, marker) +} + +Conf.prototype.addEnv = function (env) { + env = env || process.env + var conf = {} + Object.keys(env) + .filter(function (k) { return k.match(/^npm_config_/i) }) + .forEach(function (k) { + if (!env[k]) + return + + // leave first char untouched, even if + // it is a "_" - convert all other to "-" + var p = k.toLowerCase() + .replace(/^npm_config_/, "") + .replace(/(?!^)_/g, "-") + conf[p] = env[k] + }) + return CC.prototype.addEnv.call(this, "", conf, "env") +} + +function parseField (f, k) { + if (typeof f !== "string" && !(f instanceof String)) + return f + + // type can be an array or single thing. + var typeList = [].concat(types[k]) + var isPath = -1 !== typeList.indexOf(path) + var isBool = -1 !== typeList.indexOf(Boolean) + var isString = -1 !== typeList.indexOf(String) + var isUmask = -1 !== typeList.indexOf(Umask) + var isNumber = -1 !== typeList.indexOf(Number) + + f = (""+f).trim() + + if (f.match(/^".*"$/)) { + try { + f = JSON.parse(f) + } + catch (e) { + throw new Error("Failed parsing JSON config key " + k + ": " + f) + } + } + + if (isBool && !isString && f === "") + return true + + switch (f) { + case "true": return true + case "false": return false + case "null": return null + case "undefined": return undefined + } + + f = envReplace(f) + + if (isPath) { + var homePattern = process.platform === "win32" ? /^~(\/|\\)/ : /^~\// + if (f.match(homePattern) && process.env.HOME) { + f = path.resolve(process.env.HOME, f.substr(2)) + } + f = path.resolve(f) + } + + if (isUmask) + f = umask.fromString(f) + + if (isNumber && !isNaN(f)) + f = +f + + return f +} + +function envReplace (f) { + if (typeof f !== "string" || !f) return f + + // replace any ${ENV} values with the appropriate environ. + var envExpr = /(\\*)\$\{([^}]+)\}/g + return f.replace(envExpr, function (orig, esc, name) { + esc = esc.length && esc.length % 2 + if (esc) + return orig + if (undefined === process.env[name]) + throw new Error("Failed to replace env in config: "+orig) + return process.env[name] + }) +} + +function validate (cl) { + // warn about invalid configs at every level. + cl.list.forEach(function (conf) { + nopt.clean(conf, configDefs.types) + }) + + nopt.clean(cl.root, configDefs.types) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config/defaults.js b/bin/nodejs0.12.16/node_modules/npm/lib/config/defaults.js new file mode 100644 index 00000000..7a2789e1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config/defaults.js @@ -0,0 +1,380 @@ +// defaults, types, and shorthands. + + +var path = require("path") + , url = require("url") + , Stream = require("stream").Stream + , semver = require("semver") + , stableFamily = semver.parse(process.version) + , nopt = require("nopt") + , os = require("os") + , osenv = require("osenv") + , umask = require("../utils/umask") + +var log +try { + log = require("npmlog") +} catch (er) { + var util = require("util") + log = { warn: function (m) { + console.warn(m + " " + util.format.apply(util, [].slice.call(arguments, 1))) + } } +} + +exports.Umask = Umask +function Umask () {} +function validateUmask (data, k, val) { + return umask.validate(data, k, val) +} + +function validateSemver (data, k, val) { + if (!semver.valid(val)) return false + data[k] = semver.valid(val) +} + +function validateStream (data, k, val) { + if (!(val instanceof Stream)) return false + data[k] = val +} + +nopt.typeDefs.semver = { type: semver, validate: validateSemver } +nopt.typeDefs.Stream = { type: Stream, validate: validateStream } +nopt.typeDefs.Umask = { type: Umask, validate: validateUmask } + +nopt.invalidHandler = function (k, val, type) { + log.warn("invalid config", k + "=" + JSON.stringify(val)) + + if (Array.isArray(type)) { + if (type.indexOf(url) !== -1) type = url + else if (type.indexOf(path) !== -1) type = path + } + + switch (type) { + case Umask: + log.warn("invalid config", "Must be umask, octal number in range 0000..0777") + break + case url: + log.warn("invalid config", "Must be a full url with 'http://'") + break + case path: + log.warn("invalid config", "Must be a valid filesystem path") + break + case Number: + log.warn("invalid config", "Must be a numeric value") + break + case Stream: + log.warn("invalid config", "Must be an instance of the Stream class") + break + } +} + +if (!stableFamily || (+stableFamily.minor % 2)) stableFamily = null +else stableFamily = stableFamily.major + "." + stableFamily.minor + +var defaults + +var temp = osenv.tmpdir() +var home = osenv.home() + +var uidOrPid = process.getuid ? process.getuid() : process.pid + +if (home) process.env.HOME = home +else home = path.resolve(temp, "npm-" + uidOrPid) + +var cacheExtra = process.platform === "win32" ? "npm-cache" : ".npm" +var cacheRoot = process.platform === "win32" && process.env.APPDATA || home +var cache = path.resolve(cacheRoot, cacheExtra) + + +var globalPrefix +Object.defineProperty(exports, "defaults", {get: function () { + if (defaults) return defaults + + if (process.env.PREFIX) { + globalPrefix = process.env.PREFIX + } else if (process.platform === "win32") { + // c:\node\node.exe --> prefix=c:\node\ + globalPrefix = path.dirname(process.execPath) + } else { + // /usr/local/bin/node --> prefix=/usr/local + globalPrefix = path.dirname(path.dirname(process.execPath)) + + // destdir only is respected on Unix + if (process.env.DESTDIR) { + globalPrefix = path.join(process.env.DESTDIR, globalPrefix) + } + } + + defaults = { + access : null + , "always-auth" : false + + , "bin-links" : true + , browser : null + + , ca: null + , cafile: null + + , cache : cache + + , "cache-lock-stale": 60000 + , "cache-lock-retries": 10 + , "cache-lock-wait": 10000 + + , "cache-max": Infinity + , "cache-min": 10 + + , cert: null + + , color : true + , depth: Infinity + , description : true + , dev : false + , editor : osenv.editor() + , "engine-strict": false + , force : false + + , "fetch-retries": 2 + , "fetch-retry-factor": 10 + , "fetch-retry-mintimeout": 10000 + , "fetch-retry-maxtimeout": 60000 + + , git: "git" + , "git-tag-version": true + + , global : false + , globalconfig : path.resolve(globalPrefix, "etc", "npmrc") + , group : process.platform === "win32" ? 0 + : process.env.SUDO_GID || (process.getgid && process.getgid()) + , heading: "npm" + , "if-present": false + , "ignore-scripts": false + , "init-module": path.resolve(home, ".npm-init.js") + , "init-author-name" : "" + , "init-author-email" : "" + , "init-author-url" : "" + , "init-version": "1.0.0" + , "init-license": "ISC" + , json: false + , key: null + , link: false + , "local-address" : undefined + , loglevel : "warn" + , logstream : process.stderr + , long : false + , maxsockets : 50 + , message : "%s" + , "node-version" : process.version + , npat : false + , "onload-script" : false + , optional: true + , parseable : false + , prefix : globalPrefix + , production: process.env.NODE_ENV === "production" + , "proprietary-attribs": true + , proxy : null + , "https-proxy" : null + , "user-agent" : "npm/{npm-version} " + + "node/{node-version} " + + "{platform} " + + "{arch}" + , "rebuild-bundle" : true + , registry : "https://registry.npmjs.org/" + , rollback : true + , save : false + , "save-bundle": false + , "save-dev" : false + , "save-exact" : false + , "save-optional" : false + , "save-prefix": "^" + , scope : "" + , searchopts: "" + , searchexclude: null + , searchsort: "name" + , shell : osenv.shell() + , shrinkwrap: true + , "sign-git-tag": false + , spin: true + , "strict-ssl": true + , tag : "latest" + , "tag-version-prefix" : "v" + , tmp : temp + , unicode : true + , "unsafe-perm" : process.platform === "win32" + || process.platform === "cygwin" + || !( process.getuid && process.setuid + && process.getgid && process.setgid ) + || process.getuid() !== 0 + , usage : false + , user : process.platform === "win32" ? 0 : "nobody" + , userconfig : path.resolve(home, ".npmrc") + , umask: process.umask ? process.umask() : umask.fromString("022") + , version : false + , versions : false + , viewer: process.platform === "win32" ? "browser" : "man" + + , _exit : true + } + + return defaults +}}) + +exports.types = + { access : [null, "restricted", "public"] + , "always-auth" : Boolean + , "bin-links": Boolean + , browser : [null, String] + , ca: [null, String, Array] + , cafile : path + , cache : path + , "cache-lock-stale": Number + , "cache-lock-retries": Number + , "cache-lock-wait": Number + , "cache-max": Number + , "cache-min": Number + , cert: [null, String] + , color : ["always", Boolean] + , depth : Number + , description : Boolean + , dev : Boolean + , editor : String + , "engine-strict": Boolean + , force : Boolean + , "fetch-retries": Number + , "fetch-retry-factor": Number + , "fetch-retry-mintimeout": Number + , "fetch-retry-maxtimeout": Number + , git: String + , "git-tag-version": Boolean + , global : Boolean + , globalconfig : path + , group : [Number, String] + , "https-proxy" : [null, url] + , "user-agent" : String + , "heading": String + , "if-present": Boolean + , "ignore-scripts": Boolean + , "init-module": path + , "init-author-name" : String + , "init-author-email" : String + , "init-author-url" : ["", url] + , "init-license": String + , "init-version": semver + , json: Boolean + , key: [null, String] + , link: Boolean + // local-address must be listed as an IP for a local network interface + // must be IPv4 due to node bug + , "local-address" : getLocalAddresses() + , loglevel : ["silent", "error", "warn", "http", "info", "verbose", "silly"] + , logstream : Stream + , long : Boolean + , maxsockets : Number + , message: String + , "node-version" : [null, semver] + , npat : Boolean + , "onload-script" : [null, String] + , optional: Boolean + , parseable : Boolean + , prefix: path + , production: Boolean + , "proprietary-attribs": Boolean + , proxy : [null, false, url] // allow proxy to be disabled explicitly + , "rebuild-bundle" : Boolean + , registry : [null, url] + , rollback : Boolean + , save : Boolean + , "save-bundle": Boolean + , "save-dev" : Boolean + , "save-exact" : Boolean + , "save-optional" : Boolean + , "save-prefix": String + , scope : String + , searchopts : String + , searchexclude: [null, String] + , searchsort: [ "name", "-name" + , "description", "-description" + , "author", "-author" + , "date", "-date" + , "keywords", "-keywords" ] + , shell : String + , shrinkwrap: Boolean + , "sign-git-tag": Boolean + , spin: ["always", Boolean] + , "strict-ssl": Boolean + , tag : String + , tmp : path + , unicode : Boolean + , "unsafe-perm" : Boolean + , usage : Boolean + , user : [Number, String] + , userconfig : path + , umask: Umask + , version : Boolean + , "tag-version-prefix" : String + , versions : Boolean + , viewer: String + , _exit : Boolean + } + +function getLocalAddresses () { + var interfaces + // #8094: some environments require elevated permissions to enumerate + // interfaces, and synchronously throw EPERM when run without + // elevated privileges + try { + interfaces = os.networkInterfaces() + } catch (e) { + interfaces = {} + } + + return Object.keys(interfaces).map(function (nic) { + return interfaces[nic].filter(function (addr) { + return addr.family === 'IPv4' + }) + .map(function (addr) { + return addr.address + }) + }).reduce(function (curr, next) { + return curr.concat(next) + }, []).concat(undefined) +} + +exports.shorthands = + { s : ["--loglevel", "silent"] + , d : ["--loglevel", "info"] + , dd : ["--loglevel", "verbose"] + , ddd : ["--loglevel", "silly"] + , noreg : ["--no-registry"] + , N : ["--no-registry"] + , reg : ["--registry"] + , "no-reg" : ["--no-registry"] + , silent : ["--loglevel", "silent"] + , verbose : ["--loglevel", "verbose"] + , quiet: ["--loglevel", "warn"] + , q: ["--loglevel", "warn"] + , h : ["--usage"] + , H : ["--usage"] + , "?" : ["--usage"] + , help : ["--usage"] + , v : ["--version"] + , f : ["--force"] + , gangster : ["--force"] + , gangsta : ["--force"] + , desc : ["--description"] + , "no-desc" : ["--no-description"] + , "local" : ["--no-global"] + , l : ["--long"] + , m : ["--message"] + , p : ["--parseable"] + , porcelain : ["--parseable"] + , g : ["--global"] + , S : ["--save"] + , D : ["--save-dev"] + , E : ["--save-exact"] + , O : ["--save-optional"] + , y : ["--yes"] + , n : ["--no-yes"] + , B : ["--save-bundle"] + , C : ["--prefix"] + } diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config/find-prefix.js b/bin/nodejs0.12.16/node_modules/npm/lib/config/find-prefix.js new file mode 100644 index 00000000..8206612e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config/find-prefix.js @@ -0,0 +1,56 @@ +// try to find the most reasonable prefix to use + +module.exports = findPrefix + +var fs = require("fs") +var path = require("path") + +function findPrefix (p, cb_) { + function cb (er, p) { + process.nextTick(function () { + cb_(er, p) + }) + } + + p = path.resolve(p) + // if there's no node_modules folder, then + // walk up until we hopefully find one. + // if none anywhere, then use cwd. + var walkedUp = false + while (path.basename(p) === "node_modules") { + p = path.dirname(p) + walkedUp = true + } + if (walkedUp) return cb(null, p) + + findPrefix_(p, p, cb) +} + +function findPrefix_ (p, original, cb) { + if (p === "/" + || (process.platform === "win32" && p.match(/^[a-zA-Z]:(\\|\/)?$/))) { + return cb(null, original) + } + fs.readdir(p, function (er, files) { + // an error right away is a bad sign. + // unless the prefix was simply a non + // existent directory. + if (er && p === original) { + if (er.code === "ENOENT") return cb(null, original); + return cb(er) + } + + // walked up too high or something. + if (er) return cb(null, original) + + if (files.indexOf("node_modules") !== -1 + || files.indexOf("package.json") !== -1) { + return cb(null, p) + } + + var d = path.dirname(p) + if (d === p) return cb(null, original) + + return findPrefix_(d, original, cb) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config/get-credentials-by-uri.js b/bin/nodejs0.12.16/node_modules/npm/lib/config/get-credentials-by-uri.js new file mode 100644 index 00000000..f7477c6e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config/get-credentials-by-uri.js @@ -0,0 +1,74 @@ +var assert = require("assert") + +var toNerfDart = require("./nerf-dart.js") + +module.exports = getCredentialsByURI + +function getCredentialsByURI (uri) { + assert(uri && typeof uri === "string", "registry URL is required") + var nerfed = toNerfDart(uri) + var defnerf = toNerfDart(this.get("registry")) + + // hidden class micro-optimization + var c = { + scope : nerfed, + token : undefined, + password : undefined, + username : undefined, + email : undefined, + auth : undefined, + alwaysAuth : undefined + } + + // used to override scope matching for tokens as well as legacy auth + if (this.get(nerfed + ':always-auth') !== undefined) { + var val = this.get(nerfed + ':always-auth') + c.alwaysAuth = val === 'false' ? false : !!val + } else if (this.get('always-auth') !== undefined) { + c.alwaysAuth = this.get('always-auth') + } + + if (this.get(nerfed + ':_authToken')) { + c.token = this.get(nerfed + ':_authToken') + // the bearer token is enough, don't confuse things + return c + } + + // Handle the old-style _auth= style for the default + // registry, if set. + // + // XXX(isaacs): Remove when npm 1.4 is no longer relevant + var authDef = this.get("_auth") + var userDef = this.get("username") + var passDef = this.get("_password") + if (authDef && !(userDef && passDef)) { + authDef = new Buffer(authDef, "base64").toString() + authDef = authDef.split(":") + userDef = authDef.shift() + passDef = authDef.join(":") + } + + if (this.get(nerfed + ":_password")) { + c.password = new Buffer(this.get(nerfed + ":_password"), "base64").toString("utf8") + } else if (nerfed === defnerf && passDef) { + c.password = passDef + } + + if (this.get(nerfed + ":username")) { + c.username = this.get(nerfed + ":username") + } else if (nerfed === defnerf && userDef) { + c.username = userDef + } + + if (this.get(nerfed + ":email")) { + c.email = this.get(nerfed + ":email") + } else if (this.get("email")) { + c.email = this.get("email") + } + + if (c.username && c.password) { + c.auth = new Buffer(c.username + ":" + c.password).toString("base64") + } + + return c +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config/load-cafile.js b/bin/nodejs0.12.16/node_modules/npm/lib/config/load-cafile.js new file mode 100644 index 00000000..0037e4c9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config/load-cafile.js @@ -0,0 +1,34 @@ +module.exports = loadCAFile + +var fs = require("fs") + +function loadCAFile(cafilePath, cb) { + if (!cafilePath) + return process.nextTick(cb) + + fs.readFile(cafilePath, "utf8", afterCARead.bind(this)) + + function afterCARead(er, cadata) { + + if (er) { + // previous cafile no longer exists, so just continue on gracefully + if (er.code === 'ENOENT') return cb() + return cb(er) + } + + var delim = "-----END CERTIFICATE-----" + var output + + output = cadata + .split(delim) + .filter(function(xs) { + return !!xs.trim() + }) + .map(function(xs) { + return xs.trimLeft() + delim + }) + + this.set("ca", output) + cb(null) + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config/load-prefix.js b/bin/nodejs0.12.16/node_modules/npm/lib/config/load-prefix.js new file mode 100644 index 00000000..f9ef7cf0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config/load-prefix.js @@ -0,0 +1,49 @@ +module.exports = loadPrefix + +var findPrefix = require("./find-prefix.js") +var path = require("path") + +function loadPrefix (cb) { + var cli = this.list[0] + + Object.defineProperty(this, "prefix", + { set : function (prefix) { + var g = this.get("global") + this[g ? "globalPrefix" : "localPrefix"] = prefix + }.bind(this) + , get : function () { + var g = this.get("global") + return g ? this.globalPrefix : this.localPrefix + }.bind(this) + , enumerable : true + }) + + Object.defineProperty(this, "globalPrefix", + { set : function (prefix) { + this.set("prefix", prefix) + }.bind(this) + , get : function () { + return path.resolve(this.get("prefix")) + }.bind(this) + , enumerable : true + }) + + var p + Object.defineProperty(this, "localPrefix", + { set : function (prefix) { p = prefix }, + get : function () { return p } + , enumerable: true }) + + // try to guess at a good node_modules location. + // If we are *explicitly* given a prefix on the cli, then + // always use that. otherwise, infer local prefix from cwd. + if (Object.prototype.hasOwnProperty.call(cli, "prefix")) { + p = path.resolve(cli.prefix) + process.nextTick(cb) + } else { + findPrefix(process.cwd(), function (er, found) { + p = found + cb(er) + }) + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config/load-uid.js b/bin/nodejs0.12.16/node_modules/npm/lib/config/load-uid.js new file mode 100644 index 00000000..f90fc53f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config/load-uid.js @@ -0,0 +1,15 @@ +module.exports = loadUid + +var getUid = require("uid-number") + +// Call in the context of a npmconf object + +function loadUid (cb) { + // if we're not in unsafe-perm mode, then figure out who + // to run stuff as. Do this first, to support `npm update npm -g` + if (!this.get("unsafe-perm")) { + getUid(this.get("user"), this.get("group"), cb) + } else { + process.nextTick(cb) + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config/nerf-dart.js b/bin/nodejs0.12.16/node_modules/npm/lib/config/nerf-dart.js new file mode 100644 index 00000000..c1bfa1de --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config/nerf-dart.js @@ -0,0 +1,23 @@ +var url = require("url") + +module.exports = toNerfDart + +/** + * Maps a URL to an identifier. + * + * Name courtesy schiffertronix media LLC, a New Jersey corporation + * + * @param {String} uri The URL to be nerfed. + * + * @returns {String} A nerfed URL. + */ +function toNerfDart(uri) { + var parsed = url.parse(uri) + delete parsed.protocol + delete parsed.auth + delete parsed.query + delete parsed.search + delete parsed.hash + + return url.resolve(url.format(parsed), ".") +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config/set-credentials-by-uri.js b/bin/nodejs0.12.16/node_modules/npm/lib/config/set-credentials-by-uri.js new file mode 100644 index 00000000..de7abd00 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config/set-credentials-by-uri.js @@ -0,0 +1,42 @@ +var assert = require("assert") + +var toNerfDart = require("./nerf-dart.js") + +module.exports = setCredentialsByURI + +function setCredentialsByURI (uri, c) { + assert(uri && typeof uri === "string", "registry URL is required") + assert(c && typeof c === "object", "credentials are required") + + var nerfed = toNerfDart(uri) + + if (c.token) { + this.set(nerfed + ":_authToken", c.token, "user") + this.del(nerfed + ":_password", "user") + this.del(nerfed + ":username", "user") + this.del(nerfed + ":email", "user") + this.del(nerfed + ":always-auth", "user") + } + else if (c.username || c.password || c.email) { + assert(c.username, "must include username") + assert(c.password, "must include password") + assert(c.email, "must include email address") + + this.del(nerfed + ":_authToken", "user") + + var encoded = new Buffer(c.password, "utf8").toString("base64") + this.set(nerfed + ":_password", encoded, "user") + this.set(nerfed + ":username", c.username, "user") + this.set(nerfed + ":email", c.email, "user") + + if (c.alwaysAuth !== undefined) { + this.set(nerfed + ":always-auth", c.alwaysAuth, "user") + } + else { + this.del(nerfed + ":always-auth", "user") + } + } + else { + throw new Error("No credentials to set.") + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/config/set-user.js b/bin/nodejs0.12.16/node_modules/npm/lib/config/set-user.js new file mode 100644 index 00000000..f059c7d2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/config/set-user.js @@ -0,0 +1,29 @@ +module.exports = setUser + +var assert = require("assert") +var path = require("path") +var fs = require("fs") +var mkdirp = require("mkdirp") + +function setUser (cb) { + var defaultConf = this.root + assert(defaultConf !== Object.prototype) + + // If global, leave it as-is. + // If not global, then set the user to the owner of the prefix folder. + // Just set the default, so it can be overridden. + if (this.get("global")) return cb() + if (process.env.SUDO_UID) { + defaultConf.user = +(process.env.SUDO_UID) + return cb() + } + + var prefix = path.resolve(this.get("prefix")) + mkdirp(prefix, function (er) { + if (er) return cb(er) + fs.stat(prefix, function (er, st) { + defaultConf.user = st && st.uid + return cb(er) + }) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/dedupe.js b/bin/nodejs0.12.16/node_modules/npm/lib/dedupe.js new file mode 100644 index 00000000..c650ea26 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/dedupe.js @@ -0,0 +1,375 @@ +// traverse the node_modules/package.json tree +// looking for duplicates. If any duplicates are found, +// then move them up to the highest level necessary +// in order to make them no longer duplicated. +// +// This is kind of ugly, and really highlights the need for +// much better "put pkg X at folder Y" abstraction. Oh well, +// whatever. Perfect enemy of the good, and all that. + +var fs = require("fs") +var asyncMap = require("slide").asyncMap +var path = require("path") +var readJson = require("read-package-json") +var semver = require("semver") +var rm = require("./utils/gently-rm.js") +var log = require("npmlog") +var npm = require("./npm.js") +var mapToRegistry = require("./utils/map-to-registry.js") + +module.exports = dedupe + +dedupe.usage = "npm dedupe [pkg pkg...]" + +function dedupe (args, silent, cb) { + if (typeof silent === "function") cb = silent, silent = false + var dryrun = false + if (npm.command.match(/^find/)) dryrun = true + return dedupe_(npm.prefix, args, {}, dryrun, silent, cb) +} + +function dedupe_ (dir, filter, unavoidable, dryrun, silent, cb) { + readInstalled(path.resolve(dir), {}, null, function (er, data, counter) { + if (er) { + return cb(er) + } + + if (!data) { + return cb() + } + + // find out which things are dupes + var dupes = Object.keys(counter || {}).filter(function (k) { + if (filter.length && -1 === filter.indexOf(k)) return false + return counter[k] > 1 && !unavoidable[k] + }).reduce(function (s, k) { + s[k] = [] + return s + }, {}) + + // any that are unavoidable need to remain as they are. don't even + // try to touch them or figure it out. Maybe some day, we can do + // something a bit more clever here, but for now, just skip over it, + // and all its children. + ;(function U (obj) { + if (unavoidable[obj.name]) { + obj.unavoidable = true + } + if (obj.parent && obj.parent.unavoidable) { + obj.unavoidable = true + } + Object.keys(obj.children).forEach(function (k) { + U(obj.children[k]) + }) + })(data) + + // then collect them up and figure out who needs them + ;(function C (obj) { + if (dupes[obj.name] && !obj.unavoidable) { + dupes[obj.name].push(obj) + obj.duplicate = true + } + obj.dependents = whoDepends(obj) + Object.keys(obj.children).forEach(function (k) { + C(obj.children[k]) + }) + })(data) + + if (dryrun) { + var k = Object.keys(dupes) + if (!k.length) return cb() + return npm.commands.ls(k, silent, cb) + } + + var summary = Object.keys(dupes).map(function (n) { + return [n, dupes[n].filter(function (d) { + return d && d.parent && !d.parent.duplicate && !d.unavoidable + }).map(function M (d) { + return [d.path, d.version, d.dependents.map(function (k) { + return [k.path, k.version, k.dependencies[d.name] || ""] + })] + })] + }).map(function (item) { + var set = item[1] + + var ranges = set.map(function (i) { + return i[2].map(function (d) { + return d[2] + }) + }).reduce(function (l, r) { + return l.concat(r) + }, []).map(function (v, i, set) { + if (set.indexOf(v) !== i) return false + return v + }).filter(function (v) { + return v !== false + }) + + var locs = set.map(function (i) { + return i[0] + }) + + var versions = set.map(function (i) { + return i[1] + }).filter(function (v, i, set) { + return set.indexOf(v) === i + }) + + var has = set.map(function (i) { + return [i[0], i[1]] + }).reduce(function (set, kv) { + set[kv[0]] = kv[1] + return set + }, {}) + + var loc = locs.length ? locs.reduce(function (a, b) { + // a=/path/to/node_modules/foo/node_modules/bar + // b=/path/to/node_modules/elk/node_modules/bar + // ==/path/to/node_modules/bar + var nmReg = new RegExp("\\" + path.sep + "node_modules\\" + path.sep) + a = a.split(nmReg) + b = b.split(nmReg) + var name = a.pop() + b.pop() + // find the longest chain that both A and B share. + // then push the name back on it, and join by /node_modules/ + for (var i = 0, al = a.length, bl = b.length; i < al && i < bl && a[i] === b[i]; i++); + return a.slice(0, i).concat(name).join(path.sep + "node_modules" + path.sep) + }) : undefined + + return [item[0], { item: item + , ranges: ranges + , locs: locs + , loc: loc + , has: has + , versions: versions + }] + }).filter(function (i) { + return i[1].loc + }) + + findVersions(npm, summary, function (er, set) { + if (er) return cb(er) + if (!set.length) return cb() + installAndRetest(set, filter, dir, unavoidable, silent, cb) + }) + }) +} + +function installAndRetest (set, filter, dir, unavoidable, silent, cb) { + //return cb(null, set) + var remove = [] + + asyncMap(set, function (item, cb) { + // [name, has, loc, locMatch, regMatch, others] + var name = item[0] + var has = item[1] + var where = item[2] + var locMatch = item[3] + var regMatch = item[4] + var others = item[5] + + // nothing to be done here. oh well. just a conflict. + if (!locMatch && !regMatch) { + log.warn("unavoidable conflict", item[0], item[1]) + log.warn("unavoidable conflict", "Not de-duplicating") + unavoidable[item[0]] = true + return cb() + } + + // nothing to do except to clean up the extraneous deps + if (locMatch && has[where] === locMatch) { + remove.push.apply(remove, others) + return cb() + } + + if (regMatch) { + var what = name + "@" + regMatch + // where is /path/to/node_modules/foo/node_modules/bar + // for package "bar", but we need it to be just + // /path/to/node_modules/foo + var nmReg = new RegExp("\\" + path.sep + "node_modules\\" + path.sep) + where = where.split(nmReg) + where.pop() + where = where.join(path.sep + "node_modules" + path.sep) + remove.push.apply(remove, others) + + return npm.commands.install(where, what, cb) + } + + // hrm? + return cb(new Error("danger zone\n" + name + " " + + regMatch + " " + locMatch)) + + }, function (er) { + if (er) return cb(er) + asyncMap(remove, rm, function (er) { + if (er) return cb(er) + remove.forEach(function (r) { + log.info("rm", r) + }) + dedupe_(dir, filter, unavoidable, false, silent, cb) + }) + }) +} + +function findVersions (npm, summary, cb) { + // now, for each item in the summary, try to find the maximum version + // that will satisfy all the ranges. next step is to install it at + // the specified location. + asyncMap(summary, function (item, cb) { + var name = item[0] + var data = item[1] + var loc = data.loc + var locs = data.locs.filter(function (l) { + return l !== loc + }) + + // not actually a dupe, or perhaps all the other copies were + // children of a dupe, so this'll maybe be picked up later. + if (locs.length === 0) { + return cb(null, []) + } + + // { : } + var has = data.has + + // the versions that we already have. + // if one of these is ok, then prefer to use that. + // otherwise, try fetching from the registry. + var versions = data.versions + + var ranges = data.ranges + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, next) + }) + + function next (er, data) { + var regVersions = er ? [] : Object.keys(data.versions) + var locMatch = bestMatch(versions, ranges) + var tag = npm.config.get("tag") + var distTag = data["dist-tags"] && data["dist-tags"][tag] + + var regMatch + if (distTag && data.versions[distTag] && matches(distTag, ranges)) { + regMatch = distTag + } else { + regMatch = bestMatch(regVersions, ranges) + } + + cb(null, [[name, has, loc, locMatch, regMatch, locs]]) + } + }, cb) +} + +function matches (version, ranges) { + return !ranges.some(function (r) { + return !semver.satisfies(version, r, true) + }) +} + +function bestMatch (versions, ranges) { + return versions.filter(function (v) { + return matches(v, ranges) + }).sort(semver.compareLoose).pop() +} + + +function readInstalled (dir, counter, parent, cb) { + var pkg, children, realpath + + fs.realpath(dir, function (er, rp) { + realpath = rp + next() + }) + + readJson(path.resolve(dir, "package.json"), function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb() // not a package, probably. + counter[data.name] = counter[data.name] || 0 + counter[data.name]++ + pkg = + { _id: data._id + , name: data.name + , version: data.version + , dependencies: data.dependencies || {} + , optionalDependencies: data.optionalDependencies || {} + , devDependencies: data.devDependencies || {} + , bundledDependencies: data.bundledDependencies || [] + , path: dir + , realPath: dir + , children: {} + , parent: parent + , family: Object.create(parent ? parent.family : null) + , unavoidable: false + , duplicate: false + } + if (parent) { + parent.children[data.name] = pkg + parent.family[data.name] = pkg + } + next() + }) + + fs.readdir(path.resolve(dir, "node_modules"), function (er, c) { + children = children || [] // error is ok, just means no children. + // check if there are scoped packages. + asyncMap(c || [], function (child, cb) { + if (child.indexOf('@') === 0) { + fs.readdir(path.resolve(dir, "node_modules", child), function (er, scopedChildren) { + // error is ok, just means no children. + (scopedChildren || []).forEach(function (sc) { + children.push(path.join(child, sc)) + }) + cb() + }) + } else { + children.push(child) + cb() + } + }, function (er) { + if (er) return cb(er) + children = children.filter(function (p) { + return !p.match(/^[\._-]/) + }) + next(); + }); + }) + + function next () { + if (!children || !pkg || !realpath) return + + // ignore devDependencies. Just leave them where they are. + children = children.filter(function (c) { + return !pkg.devDependencies.hasOwnProperty(c) + }) + + pkg.realPath = realpath + if (pkg.realPath !== pkg.path) children = [] + var d = path.resolve(dir, "node_modules") + asyncMap(children, function (child, cb) { + readInstalled(path.resolve(d, child), counter, pkg, cb) + }, function (er) { + cb(er, pkg, counter) + }) + } +} + +function whoDepends (pkg) { + var start = pkg.parent || pkg + return whoDepends_(pkg, [], start) +} + +function whoDepends_ (pkg, who, test) { + if (test !== pkg && + test.dependencies[pkg.name] && + test.family[pkg.name] === pkg) { + who.push(test) + } + Object.keys(test.children).forEach(function (n) { + whoDepends_(pkg, who, test.children[n]) + }) + return who +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/deprecate.js b/bin/nodejs0.12.16/node_modules/npm/lib/deprecate.js new file mode 100644 index 00000000..56c9b06b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/deprecate.js @@ -0,0 +1,50 @@ +var npm = require("./npm.js") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + +module.exports = deprecate + +deprecate.usage = "npm deprecate [@] " + +deprecate.completion = function (opts, cb) { + // first, get a list of remote packages this user owns. + // once we have a user account, then don't complete anything. + if (opts.conf.argv.remain.length > 2) return cb() + // get the list of packages by user + var path = "/-/by-user/" + mapToRegistry(path, npm.config, function (er, uri, c) { + if (er) return cb(er) + + if (!(c && c.username)) return cb() + + var params = { + timeout : 60000, + auth : c + } + npm.registry.get(uri + c.username, params, function (er, list) { + if (er) return cb() + console.error(list) + return cb(null, list[c.username]) + }) + }) +} + +function deprecate (args, cb) { + var pkg = args[0] + , msg = args[1] + if (msg === undefined) return cb("Usage: " + deprecate.usage) + + // fetch the data and make sure it exists. + var p = npa(pkg) + + mapToRegistry(p.name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version : p.spec, + message : msg, + auth : auth + } + npm.registry.deprecate(uri, params, cb) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/dist-tag.js b/bin/nodejs0.12.16/node_modules/npm/lib/dist-tag.js new file mode 100644 index 00000000..6bbdc0a9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/dist-tag.js @@ -0,0 +1,151 @@ +module.exports = distTag + +var log = require("npmlog") +var npa = require("npm-package-arg") +var semver = require("semver") + +var npm = require("./npm.js") +var mapToRegistry = require("./utils/map-to-registry.js") +var readLocalPkg = require("./utils/read-local-package.js") + +distTag.usage = "npm dist-tag add @ []" + + "\nnpm dist-tag rm " + + "\nnpm dist-tag ls []" + +distTag.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, ["add", "rm", "ls"]) + } + + switch (argv[2]) { + default: + return cb() + } +} + +function distTag (args, cb) { + var cmd = args.shift() + switch (cmd) { + case "add": case "a": case "set": case "s": + return add(args[0], args[1], cb) + case "rm": case "r": case "del": case "d": case "remove": + return remove(args[1], args[0], cb) + case "ls": case "l": case "sl": case "list": + return list(args[0], cb) + default: + return cb("Usage:\n"+distTag.usage) + } +} + +function add (spec, tag, cb) { + var thing = npa(spec || "") + var pkg = thing.name + var version = thing.rawSpec + var t = (tag || npm.config.get("tag")).trim() + + log.verbose("dist-tag add", t, "to", pkg+"@"+version) + + if (!pkg || !version || !t) return cb("Usage:\n"+distTag.usage) + + if (semver.validRange(t)) { + var er = new Error("Tag name must not be a valid SemVer range: " + t) + return cb(er) + } + + fetchTags(pkg, function (er, tags) { + if (er) return cb(er) + + if (tags[t] === version) { + log.warn("dist-tag add", t, "is already set to version", version) + return cb() + } + tags[t] = version + + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + var params = { + package : pkg, + distTag : t, + version : version, + auth : auth + } + + npm.registry.distTags.add(base, params, function (er) { + if (er) return cb(er) + + console.log("+"+t+": "+pkg+"@"+version) + cb() + }) + }) + }) +} + +function remove (tag, pkg, cb) { + log.verbose("dist-tag del", tag, "from", pkg) + + fetchTags(pkg, function (er, tags) { + if (er) return cb(er) + + if (!tags[tag]) { + log.info("dist-tag del", tag, "is not a dist-tag on", pkg) + return cb(new Error(tag+" is not a dist-tag on "+pkg)) + } + + var version = tags[tag] + delete tags[tag] + + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + var params = { + package : pkg, + distTag : tag, + auth : auth + } + + npm.registry.distTags.rm(base, params, function (er) { + if (er) return cb(er) + + console.log("-"+tag+": "+pkg+"@"+version) + cb() + }) + }) + }) +} + +function list (pkg, cb) { + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(distTag.usage) + list(pkg, cb) + }) + + fetchTags(pkg, function (er, tags) { + if (er) { + log.error("dist-tag ls", "Couldn't get dist-tag data for", pkg) + return cb(er) + } + var msg = Object.keys(tags).map(function (k) { + return k+": "+tags[k] + }).sort().join("\n") + console.log(msg) + cb(er, tags) + }) +} + +function fetchTags (pkg, cb) { + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + if (er) return cb(er) + + var params = { + package : pkg, + auth : auth + } + npm.registry.distTags.fetch(base, params, function (er, tags) { + if (er) return cb(er) + if (!tags || !Object.keys(tags).length) { + return cb(new Error("No dist-tags found for " + pkg)) + } + + cb(null, tags) + }) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/docs.js b/bin/nodejs0.12.16/node_modules/npm/lib/docs.js new file mode 100644 index 00000000..f484f01f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/docs.js @@ -0,0 +1,71 @@ +module.exports = docs + +docs.usage = "npm docs " +docs.usage += "\n" +docs.usage += "npm docs ." + +var npm = require("./npm.js") + , opener = require("opener") + , path = require("path") + , log = require("npmlog") + , mapToRegistry = require("./utils/map-to-registry.js") + +docs.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function url (json) { + return json.homepage ? json.homepage : "https://npmjs.org/package/" + json.name +} + +function docs (args, cb) { + args = args || [] + var pending = args.length + if (!pending) return getDoc(".", cb) + args.forEach(function(proj) { + getDoc(proj, function(err) { + if (err) { + return cb(err) + } + --pending || cb() + }) + }) +} + +function getDoc (project, cb) { + project = project || "." + var package = path.resolve(npm.localPrefix, "package.json") + + if (project === "." || project === "./") { + var json + try { + json = require(package) + if (!json.name) throw new Error('package.json does not have a valid "name" property') + project = json.name + } catch (e) { + log.error(e.message) + return cb(docs.usage) + } + + return opener(url(json), { command: npm.config.get("browser") }, cb) + } + + mapToRegistry(project, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri + "/latest", { timeout : 3600, auth : auth }, next) + }) + + function next (er, json) { + var github = "https://github.com/" + project + "#readme" + + if (er) { + if (project.split("/").length !== 2) return cb(er) + return opener(github, { command: npm.config.get("browser") }, cb) + } + + return opener(url(json), { command: npm.config.get("browser") }, cb) + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/edit.js b/bin/nodejs0.12.16/node_modules/npm/lib/edit.js new file mode 100644 index 00000000..df2a6aaf --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/edit.js @@ -0,0 +1,31 @@ +// npm edit [@] +// open the package folder in the $EDITOR + +module.exports = edit +edit.usage = "npm edit " + +edit.completion = require("./utils/completion/installed-shallow.js") + +var npm = require("./npm.js") + , path = require("path") + , fs = require("graceful-fs") + , editor = require("editor") + +function edit (args, cb) { + var p = args[0] + if (args.length !== 1 || !p) return cb(edit.usage) + var e = npm.config.get("editor") + if (!e) return cb(new Error( + "No editor set. Set the 'editor' config, or $EDITOR environ.")) + p = p.split("/") + .join("/node_modules/") + .replace(/(\/node_modules)+/, "/node_modules") + var f = path.resolve(npm.dir, p) + fs.lstat(f, function (er) { + if (er) return cb(er) + editor(f, { editor: e }, function (er) { + if (er) return cb(er) + npm.commands.rebuild(args, cb) + }) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/explore.js b/bin/nodejs0.12.16/node_modules/npm/lib/explore.js new file mode 100644 index 00000000..1bd9ee0b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/explore.js @@ -0,0 +1,37 @@ +// npm explore [@] +// open a subshell to the package folder. + +module.exports = explore +explore.usage = "npm explore [ -- ]" +explore.completion = require("./utils/completion/installed-shallow.js") + +var npm = require("./npm.js") + , spawn = require("./utils/spawn") + , path = require("path") + , fs = require("graceful-fs") + +function explore (args, cb) { + if (args.length < 1 || !args[0]) return cb(explore.usage) + var p = args.shift() + args = args.join(" ").trim() + if (args) args = ["-c", args] + else args = [] + + var cwd = path.resolve(npm.dir, p) + var sh = npm.config.get("shell") + fs.stat(cwd, function (er, s) { + if (er || !s.isDirectory()) return cb(new Error( + "It doesn't look like "+p+" is installed.")) + if (!args.length) console.log( + "\nExploring "+cwd+"\n"+ + "Type 'exit' or ^D when finished\n") + + npm.spinner.stop() + var shell = spawn(sh, args, { cwd: cwd, stdio: "inherit" }) + shell.on("close", function (er) { + // only fail if non-interactive. + if (!args.length) return cb() + cb(er) + }) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/faq.js b/bin/nodejs0.12.16/node_modules/npm/lib/faq.js new file mode 100644 index 00000000..a1d515aa --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/faq.js @@ -0,0 +1,8 @@ + +module.exports = faq + +faq.usage = "npm faq" + +var npm = require("./npm.js") + +function faq (args, cb) { npm.commands.help(["faq"], cb) } diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/get.js b/bin/nodejs0.12.16/node_modules/npm/lib/get.js new file mode 100644 index 00000000..67fe602d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/get.js @@ -0,0 +1,12 @@ + +module.exports = get + +get.usage = "npm get (See `npm config`)" + +var npm = require("./npm.js") + +get.completion = npm.commands.config.completion + +function get (args, cb) { + npm.commands.config(["get"].concat(args), cb) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/help-search.js b/bin/nodejs0.12.16/node_modules/npm/lib/help-search.js new file mode 100644 index 00000000..44c8c95d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/help-search.js @@ -0,0 +1,210 @@ + +module.exports = helpSearch + +var fs = require("graceful-fs") + , path = require("path") + , asyncMap = require("slide").asyncMap + , npm = require("./npm.js") + , glob = require("glob") + , color = require("ansicolors") + +helpSearch.usage = "npm help-search " + +function helpSearch (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + if (!args.length) return cb(helpSearch.usage) + + var docPath = path.resolve(__dirname, "..", "doc") + return glob(docPath + "/*/*.md", function (er, files) { + if (er) + return cb(er) + readFiles(files, function (er, data) { + if (er) + return cb(er) + searchFiles(args, data, function (er, results) { + if (er) + return cb(er) + formatResults(args, results, cb) + }) + }) + }) +} + +function readFiles (files, cb) { + var res = {} + asyncMap(files, function (file, cb) { + fs.readFile(file, 'utf8', function (er, data) { + res[file] = data + return cb(er) + }) + }, function (er) { + return cb(er, res) + }) +} + +function searchFiles (args, files, cb) { + var results = [] + Object.keys(files).forEach(function (file) { + var data = files[file] + + // skip if no matches at all + var match + for (var a = 0, l = args.length; a < l && !match; a++) { + match = data.toLowerCase().indexOf(args[a].toLowerCase()) !== -1 + } + if (!match) + return + + var lines = data.split(/\n+/) + + // if a line has a search term, then skip it and the next line. + // if the next line has a search term, then skip all 3 + // otherwise, set the line to null. then remove the nulls. + l = lines.length + for (var i = 0; i < l; i ++) { + var line = lines[i] + , nextLine = lines[i + 1] + , ll + + match = false + if (nextLine) { + for (a = 0, ll = args.length; a < ll && !match; a ++) { + match = nextLine.toLowerCase() + .indexOf(args[a].toLowerCase()) !== -1 + } + if (match) { + // skip over the next line, and the line after it. + i += 2 + continue + } + } + + match = false + for (a = 0, ll = args.length; a < ll && !match; a ++) { + match = line.toLowerCase().indexOf(args[a].toLowerCase()) !== -1 + } + if (match) { + // skip over the next line + i ++ + continue + } + + lines[i] = null + } + + // now squish any string of nulls into a single null + lines = lines.reduce(function (l, r) { + if (!(r === null && l[l.length-1] === null)) l.push(r) + return l + }, []) + + if (lines[lines.length - 1] === null) lines.pop() + if (lines[0] === null) lines.shift() + + // now see how many args were found at all. + var found = {} + , totalHits = 0 + lines.forEach(function (line) { + args.forEach(function (arg) { + var hit = (line || "").toLowerCase() + .split(arg.toLowerCase()).length - 1 + if (hit > 0) { + found[arg] = (found[arg] || 0) + hit + totalHits += hit + } + }) + }) + + var cmd = "npm help " + if (path.basename(path.dirname(file)) === "api") { + cmd = "npm apihelp " + } + cmd += path.basename(file, ".md").replace(/^npm-/, "") + results.push({ file: file + , cmd: cmd + , lines: lines + , found: Object.keys(found) + , hits: found + , totalHits: totalHits + }) + }) + + // if only one result, then just show that help section. + if (results.length === 1) { + return npm.commands.help([results[0].file.replace(/\.md$/, "")], cb) + } + + if (results.length === 0) { + console.log("No results for " + args.map(JSON.stringify).join(" ")) + return cb() + } + + // sort results by number of results found, then by number of hits + // then by number of matching lines + results = results.sort(function (a, b) { + return a.found.length > b.found.length ? -1 + : a.found.length < b.found.length ? 1 + : a.totalHits > b.totalHits ? -1 + : a.totalHits < b.totalHits ? 1 + : a.lines.length > b.lines.length ? -1 + : a.lines.length < b.lines.length ? 1 + : 0 + }) + + cb(null, results) +} + +function formatResults (args, results, cb) { + if (!results) return cb(null) + + var cols = Math.min(process.stdout.columns || Infinity, 80) + 1 + + var out = results.map(function (res) { + var out = res.cmd + , r = Object.keys(res.hits).map(function (k) { + return k + ":" + res.hits[k] + }).sort(function (a, b) { + return a > b ? 1 : -1 + }).join(" ") + + out += ((new Array(Math.max(1, cols - out.length - r.length))) + .join(" ")) + r + + if (!npm.config.get("long")) return out + + out = "\n\n" + out + + "\n" + (new Array(cols)).join("—") + "\n" + + res.lines.map(function (line, i) { + if (line === null || i > 3) return "" + for (var out = line, a = 0, l = args.length; a < l; a ++) { + var finder = out.toLowerCase().split(args[a].toLowerCase()) + , newOut = "" + , p = 0 + + finder.forEach(function (f) { + newOut += out.substr(p, f.length) + + var hilit = out.substr(p + f.length, args[a].length) + if (npm.color) hilit = color.bgBlack(color.red(hilit)) + newOut += hilit + + p += f.length + args[a].length + }) + } + + return newOut + }).join("\n").trim() + return out + }).join("\n") + + if (results.length && !npm.config.get("long")) { + out = "Top hits for "+(args.map(JSON.stringify).join(" ")) + + "\n" + (new Array(cols)).join("—") + "\n" + + out + + "\n" + (new Array(cols)).join("—") + "\n" + + "(run with -l or --long to see more context)" + } + + console.log(out.trim()) + cb(null, results) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/help.js b/bin/nodejs0.12.16/node_modules/npm/lib/help.js new file mode 100644 index 00000000..5e6c8b8d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/help.js @@ -0,0 +1,240 @@ + +module.exports = help + +help.completion = function (opts, cb) { + if (opts.conf.argv.remain.length > 2) return cb(null, []) + getSections(cb) +} + +var path = require("path") + , spawn = require("./utils/spawn") + , npm = require("./npm.js") + , log = require("npmlog") + , opener = require("opener") + , glob = require("glob") + +function help (args, cb) { + npm.spinner.stop() + var argv = npm.config.get("argv").cooked + + var argnum = 0 + if (args.length === 2 && ~~args[0]) { + argnum = ~~args.shift() + } + + // npm help foo bar baz: search topics + if (args.length > 1 && args[0]) { + return npm.commands["help-search"](args, argnum, cb) + } + + var section = npm.deref(args[0]) || args[0] + + // npm help : show basic usage + if (!section) { + var valid = argv[0] === "help" ? 0 : 1 + return npmUsage(valid, cb) + } + + + // npm -h: show command usage + if ( npm.config.get("usage") + && npm.commands[section] + && npm.commands[section].usage + ) { + npm.config.set("loglevel", "silent") + log.level = "silent" + console.log(npm.commands[section].usage) + return cb() + } + + // npm apihelp
    : Prefer section 3 over section 1 + var apihelp = argv.length && -1 !== argv[0].indexOf("api") + var pref = apihelp ? [3, 1, 5, 7] : [1, 3, 5, 7] + if (argnum) + pref = [ argnum ].concat(pref.filter(function (n) { + return n !== argnum + })) + + // npm help
    : Try to find the path + var manroot = path.resolve(__dirname, "..", "man") + + // legacy + if (section === "global") section = "folders" + else if (section === "json") section = "package.json" + + // find either /section.n or /npm-section.n + // The glob is used in the glob. The regexp is used much + // further down. Globs and regexps are different + var compextglob = ".+(gz|bz2|lzma|[FYzZ]|xz)" + var compextre = "\\.(gz|bz2|lzma|[FYzZ]|xz)$" + var f = "+(npm-" + section + "|" + section + ").[0-9]?(" + compextglob + ")" + return glob(manroot + "/*/" + f, function (er, mans) { + if (er) return cb(er) + + if (!mans.length) return npm.commands["help-search"](args, cb) + + mans = mans.map(function (man) { + var ext = path.extname(man) + if (man.match(new RegExp(compextre))) man = path.basename(man, ext) + + return man + }) + + viewMan(pickMan(mans, pref), cb) + }) +} + +function pickMan (mans, pref_) { + var nre = /([0-9]+)$/ + var pref = {} + pref_.forEach(function (sect, i) { + pref[sect] = i + }) + mans = mans.sort(function (a, b) { + var an = a.match(nre)[1] + var bn = b.match(nre)[1] + return an === bn ? (a > b ? -1 : 1) + : pref[an] < pref[bn] ? -1 + : 1 + }) + return mans[0] +} + +function viewMan (man, cb) { + var nre = /([0-9]+)$/ + var num = man.match(nre)[1] + var section = path.basename(man, "." + num) + + // at this point, we know that the specified man page exists + var manpath = path.join(__dirname, "..", "man") + , env = {} + Object.keys(process.env).forEach(function (i) { + env[i] = process.env[i] + }) + env.MANPATH = manpath + var viewer = npm.config.get("viewer") + + var conf + switch (viewer) { + case "woman": + var a = ["-e", "(woman-find-file \"" + man + "\")"] + conf = { env: env, stdio: "inherit" } + var woman = spawn("emacsclient", a, conf) + woman.on("close", cb) + break + + case "browser": + opener(htmlMan(man), { command: npm.config.get("browser") }, cb) + break + + default: + conf = { env: env, stdio: "inherit" } + var manProcess = spawn("man", [num, section], conf) + manProcess.on("close", cb) + break + } +} + +function htmlMan (man) { + var sect = +man.match(/([0-9]+)$/)[1] + var f = path.basename(man).replace(/([0-9]+)$/, "html") + switch (sect) { + case 1: + sect = "cli" + break + case 3: + sect = "api" + break + case 5: + sect = "files" + break + case 7: + sect = "misc" + break + default: + throw new Error("invalid man section: " + sect) + } + return path.resolve(__dirname, "..", "html", "doc", sect, f) +} + +function npmUsage (valid, cb) { + npm.config.set("loglevel", "silent") + log.level = "silent" + console.log( + [ "\nUsage: npm " + , "" + , "where is one of:" + , npm.config.get("long") ? usages() + : " " + wrap(Object.keys(npm.commands)) + , "" + , "npm -h quick help on " + , "npm -l display full usage info" + , "npm faq commonly asked questions" + , "npm help search for help on " + , "npm help npm involved overview" + , "" + , "Specify configs in the ini-formatted file:" + , " " + npm.config.get("userconfig") + , "or on the command line via: npm --key value" + , "Config info can be viewed via: npm help config" + , "" + , "npm@" + npm.version + " " + path.dirname(__dirname) + ].join("\n")) + cb(valid) +} + +function usages () { + // return a string of : + var maxLen = 0 + return Object.keys(npm.commands).filter(function (c) { + return c === npm.deref(c) + }).reduce(function (set, c) { + set.push([c, npm.commands[c].usage || ""]) + maxLen = Math.max(maxLen, c.length) + return set + }, []).map(function (item) { + var c = item[0] + , usage = item[1] + return "\n " + c + (new Array(maxLen - c.length + 2).join(" ")) + + (usage.split("\n") + .join("\n" + (new Array(maxLen + 6).join(" ")))) + }).join("\n") +} + + +function wrap (arr) { + var out = [""] + , l = 0 + , line + + line = process.stdout.columns + if (!line) + line = 60 + else + line = Math.min(60, Math.max(line - 16, 24)) + + arr.sort(function (a,b) { return a --save` afterwards to install a package and" + ,"save it as a dependency in the package.json file." + ,"" + ,"Press ^C at any time to quit." + ].join("\n")) + } + initJson(dir, initFile, npm.config, function (er, data) { + log.resume() + log.silly("package data", data) + if (er && er.message === "canceled") { + log.warn("init", "canceled") + return cb(null, data) + } + log.info("init", "written successfully") + cb(er, data) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/install.js b/bin/nodejs0.12.16/node_modules/npm/lib/install.js new file mode 100644 index 00000000..c9c40dd3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/install.js @@ -0,0 +1,1196 @@ +// npm install +// +// See doc/install.md for more description + +// Managing contexts... +// there's a lot of state associated with an "install" operation, including +// packages that are already installed, parent packages, current shrinkwrap, and +// so on. We maintain this state in a "context" object that gets passed around. +// every time we dive into a deeper node_modules folder, the "family" list that +// gets passed along uses the previous "family" list as its __proto__. Any +// "resolved precise dependency" things that aren't already on this object get +// added, and then that's passed to the next generation of installation. + +module.exports = install + +install.usage = "npm install" + + "\nnpm install " + + "\nnpm install @" + + "\nnpm install @" + + "\nnpm install @" + + "\nnpm install " + + "\nnpm install " + + "\nnpm install " + + "\nnpm install " + + "\nnpm install /" + + "\n\nCan specify one or more: npm install ./foo.tgz bar@stable /some/folder" + + "\nIf no argument is supplied and ./npm-shrinkwrap.json is " + + "\npresent, installs dependencies specified in the shrinkwrap." + + "\nOtherwise, installs dependencies from ./package.json." + +install.completion = function (opts, cb) { + // install can complete to a folder with a package.json, or any package. + // if it has a slash, then it's gotta be a folder + // if it starts with https?://, then just give up, because it's a url + if (/^https?:\/\//.test(opts.partialWord)) { + // do not complete to URLs + return cb(null, []) + } + + if (/\//.test(opts.partialWord)) { + // Complete fully to folder if there is exactly one match and it + // is a folder containing a package.json file. If that is not the + // case we return 0 matches, which will trigger the default bash + // complete. + var lastSlashIdx = opts.partialWord.lastIndexOf("/") + var partialName = opts.partialWord.slice(lastSlashIdx + 1) + var partialPath = opts.partialWord.slice(0, lastSlashIdx) + if (partialPath === "") partialPath = "/" + + function annotatePackageDirMatch (sibling, cb) { + var fullPath = path.join(partialPath, sibling) + if (sibling.slice(0, partialName.length) !== partialName) { + return cb(null, null) // not name match + } + fs.readdir(fullPath, function (err, contents) { + if (err) return cb(null, { isPackage: false }) + + cb( + null, + { + fullPath: fullPath, + isPackage: contents.indexOf("package.json") !== -1 + } + ) + }) + } + + return fs.readdir(partialPath, function (err, siblings) { + if (err) return cb(null, []) // invalid dir: no matching + + asyncMap(siblings, annotatePackageDirMatch, function (err, matches) { + if (err) return cb(err) + + var cleaned = matches.filter(function (x) { return x !== null }) + if (cleaned.length !== 1) return cb(null, []) + if (!cleaned[0].isPackage) return cb(null, []) + + // Success - only one match and it is a package dir + return cb(null, [cleaned[0].fullPath]) + }) + }) + } + + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +var npm = require("./npm.js") + , semver = require("semver") + , readJson = require("read-package-json") + , readInstalled = require("read-installed") + , log = require("npmlog") + , path = require("path") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , cache = require("./cache.js") + , asyncMap = require("slide").asyncMap + , chain = require("slide").chain + , url = require("url") + , mkdir = require("mkdirp") + , lifecycle = require("./utils/lifecycle.js") + , archy = require("archy") + , npmInstallChecks = require("npm-install-checks") + , sortedObject = require("sorted-object") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , inflight = require("inflight") + , locker = require("./utils/locker.js") + , lock = locker.lock + , unlock = locker.unlock + , warnStrict = require("./utils/warn-deprecated.js")("engineStrict") + , warnPeers = require("./utils/warn-deprecated.js")("peerDependencies") + +function install (args, cb_) { + var hasArguments = !!args.length + + function cb (er, installed) { + if (er) return cb_(er) + + validateInstall(where, function (er, problem) { + if (er) return cb_(er) + + if (problem) { + var peerInvalidError = new Error("The package " + problem._id + + " does not satisfy its siblings' peerDependencies requirements!") + peerInvalidError.code = "EPEERINVALID" + peerInvalidError.packageName = problem.name + peerInvalidError.packageVersion = problem.version + peerInvalidError.peersDepending = problem.peersDepending + return cb(peerInvalidError) + } + + var tree = treeify(installed || []) + , pretty = prettify(tree, installed).trim() + + if (pretty) console.log(pretty) + save(where, installed, tree, pretty, hasArguments, cb_) + }) + } + + // the /path/to/node_modules/.. + var where = path.resolve(npm.dir, "..") + + // internal api: install(where, what, cb) + if (arguments.length === 3) { + where = args + args = [].concat(cb_) // pass in [] to do default dep-install + cb_ = arguments[2] + log.verbose("install", "where, what", [where, args]) + } + + if (!npm.config.get("global")) { + args = args.filter(function (a) { + return path.resolve(a) !== where + }) + } + + mkdir(where, function (er) { + if (er) return cb(er) + // install dependencies locally by default, + // or install current folder globally + if (!args.length) { + var opt = { dev: npm.config.get("dev") || !npm.config.get("production") } + + if (npm.config.get("global")) args = ["."] + else return readDependencies(null, where, opt, function (er, data) { + if (er) { + log.error("install", "Couldn't read dependencies") + return cb(er) + } + var deps = Object.keys(data.dependencies || {}) + log.verbose("install", "where, deps", [where, deps]) + + // FIXME: Install peerDependencies as direct dependencies, but only at + // the top level. Should only last until peerDependencies are nerfed to + // no longer implicitly install themselves. + var peers = [] + Object.keys(data.peerDependencies || {}).forEach(function (dep) { + if (!data.dependencies[dep]) { + log.verbose( + "install", + "peerDependency", dep, "wasn't going to be installed; adding" + ) + warnPeers([ + "The peer dependency "+dep+" included from "+data.name+" will no", + "longer be automatically installed to fulfill the peerDependency ", + "in npm 3+. Your application will need to depend on it explicitly." + ], dep+","+data.name) + peers.push(dep) + } + }) + log.verbose("install", "where, peers", [where, peers]) + + var context = { family: {} + , ancestors: {} + , explicit: false + , parent: data + , root: true + , wrap: null } + + if (data.name === path.basename(where) && + path.basename(path.dirname(where)) === "node_modules") { + // Only include in ancestry if it can actually be required. + // Otherwise, it does not count. + context.family[data.name] = + context.ancestors[data.name] = data.version + } + + installManyTop(deps.map(function (dep) { + var target = data.dependencies[dep] + return dep + "@" + target + }).concat(peers.map(function (dep) { + var target = data.peerDependencies[dep] + return dep + "@" + target + })), where, context, function(er, results) { + if (er || npm.config.get("production")) return cb(er, results) + lifecycle(data, "prepublish", where, function(er) { + return cb(er, results) + }) + }) + }) + } + + // initial "family" is the name:version of the root, if it's got + // a package.json file. + var jsonPath = path.resolve(where, "package.json") + log.verbose('install', 'initial load of', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + if (er + && er.code !== "ENOENT" + && er.code !== "ENOTDIR") return cb(er) + if (er) data = null + var context = { family: {} + , ancestors: {} + , explicit: true + , parent: data + , root: true + , wrap: null } + if (data && data.name === path.basename(where) && + path.basename(path.dirname(where)) === "node_modules") { + context.family[data.name] = context.ancestors[data.name] = data.version + } + var fn = npm.config.get("global") ? installMany : installManyTop + fn(args, where, context, cb) + }) + }) +} + +function validateInstall (where, cb) { + var jsonPath = path.resolve(where, 'package.json') + log.verbose('validateInstall', 'loading', jsonPath, 'for validation') + readJson(jsonPath, log.warn, function (er, data) { + if (er + && er.code !== 'ENOENT' + && er.code !== 'ENOTDIR') return cb(er) + + if (data && data.engineStrict) { + warnStrict([ + "Per-package engineStrict (found in this package's package.json) ", + "won't be used in npm 3+. Use the config setting `engine-strict` instead." + ], data.name) + } + + readInstalled(where, { log: log.warn, dev: true }, function (er, data) { + if (er) return cb(er) + + cb(null, findPeerInvalid_(data.dependencies, [])) + }) + }) +} + +function findPeerInvalid_ (packageMap, fpiList) { + if (fpiList.indexOf(packageMap) !== -1) + return undefined + + fpiList.push(packageMap) + + for (var packageName in packageMap) { + var pkg = packageMap[packageName] + + if (pkg.peerInvalid) { + var peersDepending = {} + for (var peerName in packageMap) { + var peer = packageMap[peerName] + if (peer.peerDependencies && peer.peerDependencies[packageName]) { + peersDepending[peer.name + "@" + peer.version] = + peer.peerDependencies[packageName] + } + } + return { name: pkg.name, peersDepending: peersDepending, version: pkg.version, _id: pkg._id } + } + + if (pkg.dependencies) { + var invalid = findPeerInvalid_(pkg.dependencies, fpiList) + if (invalid) + return invalid + } + } + + return null +} + +// reads dependencies for the package at "where". There are several cases, +// depending on our current state and the package's configuration: +// +// 1. If "context" is specified, then we examine the context to see if there's a +// shrinkwrap there. In that case, dependencies are read from the shrinkwrap. +// 2. Otherwise, if an npm-shrinkwrap.json file is present, dependencies are +// read from there. +// 3. Otherwise, dependencies come from package.json. +// +// Regardless of which case we fall into, "cb" is invoked with a first argument +// describing the full package (as though readJson had been used) but with +// "dependencies" read as described above. The second argument to "cb" is the +// shrinkwrap to use in processing this package's dependencies, which may be +// "wrap" (in case 1) or a new shrinkwrap (in case 2). +function readDependencies (context, where, opts, cb) { + var wrap = context ? context.wrap : null + + var jsonPath = path.resolve(where, 'package.json') + log.verbose('readDependencies', 'loading dependencies from', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + if (er && er.code === "ENOENT") er.code = "ENOPACKAGEJSON" + if (er) return cb(er) + + if (opts && opts.dev) { + if (!data.dependencies) data.dependencies = {} + Object.keys(data.devDependencies || {}).forEach(function (k) { + if (data.dependencies[k]) { + log.warn("package.json", "Dependency '%s' exists in both dependencies " + + "and devDependencies, using '%s@%s' from dependencies", + k, k, data.dependencies[k]) + } else { + data.dependencies[k] = data.devDependencies[k] + } + }) + } + + if (!npm.config.get("optional") && data.optionalDependencies) { + Object.keys(data.optionalDependencies).forEach(function (d) { + delete data.dependencies[d] + }) + } + + // User has opted out of shrinkwraps entirely + if (npm.config.get("shrinkwrap") === false) + return cb(null, data, null) + + if (wrap) { + log.verbose("readDependencies: using existing wrap", [where, wrap]) + var rv = {} + Object.keys(data).forEach(function (key) { + rv[key] = data[key] + }) + rv.dependencies = {} + Object.keys(wrap).forEach(function (key) { + log.verbose("from wrap", [key, wrap[key]]) + rv.dependencies[key] = readWrap(wrap[key]) + }) + log.verbose("readDependencies returned deps", rv.dependencies) + return cb(null, rv, wrap) + } + + var wrapfile = path.resolve(where, "npm-shrinkwrap.json") + + fs.readFile(wrapfile, "utf8", function (er, wrapjson) { + if (er) return cb(null, data, null) + + log.verbose("readDependencies", "npm-shrinkwrap.json is overriding dependencies") + var newwrap + try { + newwrap = JSON.parse(wrapjson) + } catch (ex) { + return cb(ex) + } + + log.info("shrinkwrap", "file %j", wrapfile) + var rv = {} + Object.keys(data).forEach(function (key) { + rv[key] = data[key] + }) + rv.dependencies = {} + Object.keys(newwrap.dependencies || {}).forEach(function (key) { + rv.dependencies[key] = readWrap(newwrap.dependencies[key]) + }) + + // fold in devDependencies if not already present, at top level + if (opts && opts.dev) { + Object.keys(data.devDependencies || {}).forEach(function (k) { + rv.dependencies[k] = rv.dependencies[k] || data.devDependencies[k] + }) + } + + log.verbose("readDependencies returned deps", rv.dependencies) + return cb(null, rv, newwrap.dependencies) + }) + }) +} + +function readWrap (w) { + return (w.resolved) ? w.resolved + : (w.from && url.parse(w.from).protocol) ? w.from + : w.version +} + +// if the -S|--save option is specified, then write installed packages +// as dependencies to a package.json file. +function save (where, installed, tree, pretty, hasArguments, cb) { + if (!hasArguments || + !npm.config.get("save") && + !npm.config.get("save-dev") && + !npm.config.get("save-optional") || + npm.config.get("global")) { + return cb(null, installed, tree, pretty) + } + + var saveBundle = npm.config.get("save-bundle") + var savePrefix = npm.config.get("save-prefix") + + // each item in the tree is a top-level thing that should be saved + // to the package.json file. + // The relevant tree shape is { : {what:} } + var saveTarget = path.resolve(where, "package.json") + + asyncMap(Object.keys(tree), function (k, cb) { + // if "from" is remote, git, or hosted, then save that instead. + var t = tree[k] + , f = npa(t.from) + , a = npa(t.what) + , w = [a.name, a.spec] + + + fs.stat(t.from, function (er){ + if (!er) { + w[1] = "file:" + t.from + } else if (['hosted', 'git', 'remote'].indexOf(f.type) !== -1) { + w[1] = t.from + } + cb(null, [w]) + }) + } + , function (er, arr) { + var things = arr.reduce(function (set, k) { + var rangeDescriptor = semver.valid(k[1], true) && + semver.gte(k[1], "0.1.0", true) && + !npm.config.get("save-exact") + ? savePrefix : "" + set[k[0]] = rangeDescriptor + k[1] + return set + }, {}) + + + // don't use readJson, because we don't want to do all the other + // tricky npm-specific stuff that's in there. + fs.readFile(saveTarget, function (er, data) { + // ignore errors here, just don't save it. + try { + data = JSON.parse(data.toString("utf8")) + } catch (ex) { + er = ex + } + + if (er) { + return cb(null, installed, tree, pretty) + } + + var deps = npm.config.get("save-optional") ? "optionalDependencies" + : npm.config.get("save-dev") ? "devDependencies" + : "dependencies" + + if (saveBundle) { + var bundle = data.bundleDependencies || data.bundledDependencies + delete data.bundledDependencies + if (!Array.isArray(bundle)) bundle = [] + data.bundleDependencies = bundle.sort() + } + + log.verbose("save", "saving", things) + data[deps] = data[deps] || {} + Object.keys(things).forEach(function (t) { + data[deps][t] = things[t] + if (saveBundle) { + var i = bundle.indexOf(t) + if (i === -1) bundle.push(t) + data.bundleDependencies = bundle.sort() + } + }) + + data[deps] = sortedObject(data[deps]) + + log.silly("save", "writing", saveTarget) + data = JSON.stringify(data, null, 2) + "\n" + writeFileAtomic(saveTarget, data, function (er) { + cb(er, installed, tree, pretty) + }) + }) + }) +} + + +// Outputting *all* the installed modules is a bit confusing, +// because the length of the path does not make it clear +// that the submodules are not immediately require()able. +// TODO: Show the complete tree, ls-style, but only if --long is provided +function prettify (tree, installed) { + function red (set, kv) { + set[kv[0]] = kv[1] + return set + } + + if (npm.config.get("json")) { + tree = Object.keys(tree).map(function (p) { + if (!tree[p]) return null + var what = npa(tree[p].what) + , name = what.name + , version = what.spec + , o = { name: name, version: version, from: tree[p].from } + o.dependencies = tree[p].children.map(function P (dep) { + var what = npa(dep.what) + , name = what.name + , version = what.spec + , o = { version: version, from: dep.from } + o.dependencies = dep.children.map(P).reduce(red, {}) + return [name, o] + }).reduce(red, {}) + return o + }) + + return JSON.stringify(tree, null, 2) + } + if (npm.config.get("parseable")) return parseable(installed) + + return Object.keys(tree).map(function (p) { + return archy({ label: tree[p].what + " " + p + , nodes: (tree[p].children || []).map(function P (c) { + if (npm.config.get("long")) { + return { label: c.what, nodes: c.children.map(P) } + } + var g = c.children.map(function (g) { + return g.what + }).join(", ") + if (g) g = " (" + g + ")" + return c.what + g + }) + }, "", { unicode: npm.config.get("unicode") }) + }).join("\n") +} + +function parseable (installed) { + var long = npm.config.get("long") + , cwd = process.cwd() + return installed.map(function (item) { + return path.resolve(cwd, item[1]) + + ( long ? ":" + item[0] : "" ) + }).join("\n") +} + +function treeify (installed) { + // each item is [what, where, parent, parentDir] + // If no parent, then report it. + // otherwise, tack it into the parent's children list. + // If the parent isn't a top-level then ignore it. + var whatWhere = installed.reduce(function (l, r) { + var parentDir = r[3] + , parent = r[2] + , where = r[1] + , what = r[0] + , from = r[4] + l[where] = { parentDir: parentDir + , parent: parent + , children: [] + , where: where + , what: what + , from: from } + return l + }, {}) + + // log.warn("install", whatWhere, "whatWhere") + return Object.keys(whatWhere).reduce(function (l, r) { + var ww = whatWhere[r] + //log.warn("r, ww", [r, ww]) + if (!ww.parent) { + l[r] = ww + } else { + var p = whatWhere[ww.parentDir] + if (p) p.children.push(ww) + else l[r] = ww + } + return l + }, {}) +} + + +// just like installMany, but also add the existing packages in +// where/node_modules to the family object. +function installManyTop (what, where, context, cb_) { + function cb (er, d) { + if (context.explicit || er) return cb_(er, d) + // since this wasn't an explicit install, let's build the top + // folder, so that `npm install` also runs the lifecycle scripts. + npm.commands.build([where], false, true, function (er) { + return cb_(er, d) + }) + } + + if (context.explicit) return next() + + var jsonPath = path.join(where, 'package.json') + log.verbose('installManyTop', 'reading for lifecycle', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + if (er) return next(er) + lifecycle(data, "preinstall", where, next) + }) + + function next (er) { + if (er) return cb(er) + installManyTop_(what, where, context, cb) + } +} + +function installManyTop_ (what, where, context, cb) { + var nm = path.resolve(where, "node_modules") + + fs.readdir(nm, function (er, pkgs) { + if (er) return installMany(what, where, context, cb) + + var scopes = [], unscoped = [] + pkgs.filter(function (p) { + return !p.match(/^[\._-]/) + }).forEach(function (p) { + // @names deserve deeper investigation + if (p[0] === "@") { + scopes.push(p) + } + else { + unscoped.push(p) + } + }) + + maybeScoped(scopes, nm, function (er, scoped) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + // recombine unscoped with @scope/package packages + asyncMap(unscoped.concat(scoped).map(function (p) { + return path.resolve(nm, p, "package.json") + }), function (jsonPath, cb) { + log.verbose('installManyTop', 'reading scoped package data from', jsonPath) + readJson(jsonPath, log.info, function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb(null, []) + cb(null, [[data.name, data.version]]) + }) + }, function (er, packages) { + // if there's nothing in node_modules, then don't freak out. + if (er) packages = [] + // add all the existing packages to the family list. + // however, do not add to the ancestors list. + packages.forEach(function (p) { + context.family[p[0]] = p[1] + }) + installMany(what, where, context, cb) + }) + }) + }) +} + +function maybeScoped (scopes, where, cb) { + // find packages in scopes + asyncMap(scopes, function (scope, cb) { + fs.readdir(path.resolve(where, scope), function (er, scoped) { + if (er) return cb(er) + var paths = scoped.map(function (p) { + return path.join(scope, p) + }) + cb(null, paths) + }) + }, cb) +} + +function installMany (what, where, context, cb) { + // readDependencies takes care of figuring out whether the list of + // dependencies we'll iterate below comes from an existing shrinkwrap from a + // parent level, a new shrinkwrap at this level, or package.json at this + // level, as well as which shrinkwrap (if any) our dependencies should use. + var opt = { dev: npm.config.get("dev") } + readDependencies(context, where, opt, function (er, data, wrap) { + if (er) data = {} + + var parent = data + + // if we're explicitly installing "what" into "where", then the shrinkwrap + // for "where" doesn't apply. This would be the case if someone were adding + // a new package to a shrinkwrapped package. (data.dependencies will not be + // used here except to indicate what packages are already present, so + // there's no harm in using that.) + if (context.explicit) wrap = null + + var deps = data.dependencies || {} + var devDeps = data.devDependencies || {} + + // what is a list of things. + // resolve each one. + asyncMap( what + , targetResolver(where, context, deps, devDeps) + , function (er, targets) { + + if (er) return cb(er) + + var bundled = data.bundleDependencies || data.bundledDependencies || [] + // only take the hit for readInstalled if there are probably bundled + // dependencies to read + if (bundled.length) { + readInstalled(where, { dev: true }, andBuildResolvedTree) + } else { + andBuildResolvedTree() + } + + function andBuildResolvedTree (er, current) { + if (er) return cb(er) + + // each target will be a data object corresponding + // to a package, folder, or whatever that is in the cache now. + var newPrev = Object.create(context.family) + , newAnc = Object.create(context.ancestors) + + if (!context.root) { + newAnc[data.name] = data.version + } + bundled.forEach(function (bundle) { + var bundleData = current.dependencies[bundle] + if ((!bundleData || !bundleData.version) && current.devDependencies) { + log.verbose( + 'installMany', bundle, 'was bundled with', + data.name + '@' + data.version + + ", but wasn't found in dependencies. Trying devDependencies" + ) + bundleData = current.devDependencies[bundle] + } + + if (!bundleData || !bundleData.version) { + log.warn( + 'installMany', bundle, 'was bundled with', + data.name + '@' + data.version + + ", but bundled package wasn't found in unpacked tree" + ) + } else { + log.verbose( + 'installMany', bundle + '@' + bundleData.version, + 'was bundled with', data.name + '@' + data.version + ) + newPrev[bundle] = bundleData.version + } + }) + targets.forEach(function (t) { + newPrev[t.name] = t.version + }) + log.silly("install resolved", targets) + targets.filter(function (t) { return t }).forEach(function (t) { + log.info("install", "%s into %s", t._id, where) + }) + asyncMap(targets, function (target, cb) { + log.info("installOne", target._id) + var wrapData = wrap ? wrap[target.name] : null + var newWrap = wrapData && wrapData.dependencies + ? wrap[target.name].dependencies || {} + : null + var newContext = { family: newPrev + , ancestors: newAnc + , parent: parent + , explicit: false + , wrap: newWrap } + installOne(target, where, newContext, cb) + }, cb) + } + }) + }) +} + +function targetResolver (where, context, deps, devDeps) { + var alreadyInstalledManually = [] + , resolveLeft = 0 + , nm = path.resolve(where, "node_modules") + , parent = context.parent + , wrap = context.wrap + + if (!context.explicit) readdir(nm) + + function readdir(name) { + resolveLeft++ + fs.readdir(name, function (er, inst) { + if (er) return resolveLeft-- + + // don't even mess with non-package looking things + inst = inst.filter(function (p) { + if (!p.match(/^[@\._-]/)) return true + // scoped packages + readdir(path.join(name, p)) + }) + + asyncMap(inst, function (pkg, cb) { + var jsonPath = path.resolve(name, pkg, 'package.json') + log.verbose('targetResolver', 'reading package data from', jsonPath) + readJson(jsonPath, log.info, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + // error means it's not a package, most likely. + if (er) return cb(null, []) + + // if it's a bundled dep, then assume that anything there is valid. + // otherwise, make sure that it's a semver match with what we want. + var bd = parent.bundleDependencies + var isBundled = bd && bd.indexOf(d.name) !== -1 + var expectedVersion = deps[d.name] || (devDeps && devDeps[d.name]) || "*" + var currentIsSatisfactory = semver.satisfies(d.version, expectedVersion, true) + if (isBundled || currentIsSatisfactory || deps[d.name] === d._resolved) { + return cb(null, d.name) + } + + // see if the package had been previously linked + fs.lstat(path.resolve(nm, pkg), function(err, s) { + if (err) return cb(null, []) + if (s.isSymbolicLink()) { + return cb(null, d.name) + } + + // something is there, but it's not satisfactory. Clobber it. + return cb(null, []) + }) + }) + }, function (er, inst) { + // this is the list of things that are valid and should be ignored. + alreadyInstalledManually = alreadyInstalledManually.concat(inst) + resolveLeft-- + }) + }) + } + + var to = 0 + return function resolver (what, cb) { + if (resolveLeft) return setTimeout(function () { + resolver(what, cb) + }, to++) + + // now we know what's been installed here manually, + // or tampered with in some way that npm doesn't want to overwrite. + if (alreadyInstalledManually.indexOf(npa(what).name) !== -1) { + log.verbose("already installed", "skipping %s %s", what, where) + return cb(null, []) + } + + // check for a version installed higher in the tree. + // If installing from a shrinkwrap, it must match exactly. + if (context.family[what]) { + log.verbose('install', what, 'is installed as', context.family[what]) + if (wrap && wrap[what].version === context.family[what]) { + log.verbose("shrinkwrap", "use existing", what) + return cb(null, []) + } + } + + // if it's identical to its parent, then it's probably someone + // doing `npm install foo` inside of the foo project. Print + // a warning, and skip it. + if (parent && parent.name === what && !npm.config.get("force")) { + log.warn("install", "Refusing to install %s as a dependency of itself" + , what) + return cb(null, []) + } + + if (wrap) { + var name = npa(what).name + if (wrap[name]) { + var wrapTarget = readWrap(wrap[name]) + what = name + "@" + wrapTarget + } else { + log.verbose("shrinkwrap", "skipping %s (not in shrinkwrap)", what) + } + } else if (deps[what]) { + what = what + "@" + deps[what] + } + + // This is where we actually fetch the package, if it's not already + // in the cache. + // If it's a git repo, then we want to install it, even if the parent + // already has a matching copy. + // If it's not a git repo, and the parent already has that pkg, then + // we can skip installing it again. + var pkgroot = path.resolve(npm.prefix, (parent && parent._from) || "") + cache.add(what, null, pkgroot, false, function (er, data) { + if (er && parent && parent.optionalDependencies && + parent.optionalDependencies.hasOwnProperty(npa(what).name)) { + log.warn("optional dep failed, continuing", what) + log.verbose("optional dep failed, continuing", [what, er]) + return cb(null, []) + } + + var type = npa(what).type + var isGit = type === "git" || type === "hosted" + + if (!er && + data && + !context.explicit && + context.family[data.name] === data.version && + !npm.config.get("force") && + !isGit) { + log.info("already installed", data.name + "@" + data.version) + return cb(null, []) + } + + + if (data && !data._from) data._from = what + if (er && parent && parent.name) er.parent = parent.name + return cb(er, data || []) + }) + } +} + +// we've already decided to install this. if anything's in the way, +// then uninstall it first. +function installOne (target, where, context, cb) { + // the --link flag makes this a "link" command if it's at the + // the top level. + var isGit = false + var type = npa(target._from).type + if (target && target._from) isGit = type === 'git' || type === 'hosted' + + if (where === npm.prefix && npm.config.get("link") + && !npm.config.get("global") && !isGit) { + return localLink(target, where, context, cb) + } + installOne_(target, where, context, function (er, installedWhat) { + + // check if this one is optional to its parent. + if (er && context.parent && context.parent.optionalDependencies && + context.parent.optionalDependencies.hasOwnProperty(target.name)) { + log.warn("optional dep failed, continuing", target._id) + log.verbose("optional dep failed, continuing", [target._id, er]) + er = null + } + + cb(er, installedWhat) + }) + +} + +function localLink (target, where, context, cb) { + log.verbose("localLink", target._id) + var jsonPath = path.resolve(npm.globalDir, target.name , 'package.json') + var parent = context.parent + + log.verbose('localLink', 'reading data to link', target.name, 'from', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + function thenLink () { + npm.commands.link([target.name], function (er, d) { + log.silly("localLink", "back from link", [er, d]) + cb(er, [resultList(target, where, parent && parent._id)]) + }) + } + + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er || data._id === target._id) { + if (er) { + install( path.resolve(npm.globalDir, "..") + , target._id + , function (er) { + if (er) return cb(er, []) + thenLink() + }) + } else thenLink() + } else { + log.verbose("localLink", "install locally (no link)", target._id) + installOne_(target, where, context, cb) + } + }) +} + +function resultList (target, where, parentId) { + var nm = path.resolve(where, "node_modules") + , targetFolder = path.resolve(nm, target.name) + , prettyWhere = where + + if (!npm.config.get("global")) { + prettyWhere = path.relative(process.cwd(), where) + } + + if (prettyWhere === ".") prettyWhere = null + + if (!npm.config.get("global")) { + // print out the folder relative to where we are right now. + targetFolder = path.relative(process.cwd(), targetFolder) + } + + return [ target._id + , targetFolder + , prettyWhere && parentId + , parentId && prettyWhere + , target._from ] +} + +var installed = Object.create(null) + +function installOne_ (target, where, context, cb_) { + var nm = path.resolve(where, "node_modules") + , targetFolder = path.resolve(nm, target.name) + , prettyWhere = path.relative(process.cwd(), where) + , parent = context.parent + + if (prettyWhere === ".") prettyWhere = null + + cb_ = inflight(target.name + ":" + where, cb_) + if (!cb_) { + return log.verbose("installOne", "of", target.name, "to", where, "already in flight; waiting") + } + else { + log.verbose("installOne", "of", target.name, "to", where, "not in flight; installing") + } + + function cb(er, data) { + unlock(nm, target.name, function () { cb_(er, data) }) + } + + lock(nm, target.name, function (er) { + if (er) return cb(er) + + if (targetFolder in installed) { + log.error("install", "trying to install", target.version, "to", targetFolder) + log.error("install", "but already installed versions", installed[targetFolder]) + installed[targetFolder].push(target.version) + } + else { + installed[targetFolder] = [target.version] + } + + var force = npm.config.get("force") + , nodeVersion = npm.config.get("node-version") + , strict = npm.config.get("engine-strict") + , c = npmInstallChecks + + chain( + [ [c.checkEngine, target, npm.version, nodeVersion, force, strict] + , [c.checkPlatform, target, force] + , [c.checkCycle, target, context.ancestors] + , [c.checkGit, targetFolder] + , [write, target, targetFolder, context] ] + , function (er, d) { + if (er) return cb(er) + + d.push(resultList(target, where, parent && parent._id)) + cb(er, d) + } + ) + }) +} + +function write (target, targetFolder, context, cb_) { + var up = npm.config.get("unsafe-perm") + , user = up ? null : npm.config.get("user") + , group = up ? null : npm.config.get("group") + , family = context.family + + function cb (er, data) { + // cache.unpack returns the data object, and all we care about + // is the list of installed packages from that last thing. + if (!er) return cb_(er, data) + + if (npm.config.get("rollback") === false) return cb_(er) + npm.rollbacks.push(targetFolder) + cb_(er, data) + } + + var bundled = [] + + log.silly("install write", "writing", target.name, target.version, "to", targetFolder) + chain( + [ [ cache.unpack, target.name, target.version, targetFolder, null, null, user, group ], + function writePackageJSON (cb) { + var jsonPath = path.resolve(targetFolder, 'package.json') + log.verbose('write', 'writing to', jsonPath) + writeFileAtomic(jsonPath, JSON.stringify(target, null, 2) + '\n', cb) + }, + [ lifecycle, target, "preinstall", targetFolder ], + function collectBundled (cb) { + if (!target.bundleDependencies) return cb() + + var bd = path.resolve(targetFolder, "node_modules") + fs.readdir(bd, function (er, b) { + // nothing bundled, maybe + if (er) return cb() + bundled = b || [] + cb() + }) + } ] + + // nest the chain so that we can throw away the results returned + // up until this point, since we really don't care about it. + , function X (er) { + if (er) return cb(er) + + // before continuing to installing dependencies, check for a shrinkwrap. + var opt = { dev: npm.config.get("dev") } + readDependencies(context, targetFolder, opt, function (er, data, wrap) { + if (er) return cb(er); + var deps = prepareForInstallMany(data, "dependencies", bundled, wrap, + family) + var depsTargetFolder = targetFolder + var depsContext = { family: family + , ancestors: context.ancestors + , parent: target + , explicit: false + , wrap: wrap } + + var actions = + [ [ installManyAndBuild, deps, depsTargetFolder, depsContext ] ] + + // FIXME: This is an accident waiting to happen! + // + // 1. If multiple children at the same level of the tree share a + // peerDependency that's not in the parent's dependencies, because + // the peerDeps don't get added to the family, they will keep + // getting reinstalled (worked around by inflighting installOne). + // 2. The installer can't safely build at the parent level because + // that's already being done by the parent's installAndBuild. This + // runs the risk of the peerDependency never getting built. + // + // The fix: Don't install peerDependencies; require them to be + // included as explicit dependencies / devDependencies, and warn + // or error when they're missing. See #5080 for more arguments in + // favor of killing implicit peerDependency installs with fire. + var peerDeps = prepareForInstallMany(data, "peerDependencies", bundled, + wrap, family) + peerDeps.forEach(function (pd) { + warnPeers([ + "The peer dependency "+pd+" included from "+data.name+" will no", + "longer be automatically installed to fulfill the peerDependency ", + "in npm 3+. Your application will need to depend on it explicitly." + ], pd+","+data.name) + }) + + // Package scopes cause an addditional tree level which needs to be + // considered when resolving a peerDependency's target folder. + var pdTargetFolder + if (npa(target.name).scope) { + pdTargetFolder = path.resolve(targetFolder, '../../..') + } else { + pdTargetFolder = path.resolve(targetFolder, '../..') + } + + var pdContext = context + if (peerDeps.length > 0) { + actions.push( + [ installMany, peerDeps, pdTargetFolder, pdContext ] + ) + } + + chain(actions, cb) + }) + }) +} + +function installManyAndBuild (deps, targetFolder, context, cb) { + installMany(deps, targetFolder, context, function (er, d) { + log.verbose("about to build", targetFolder) + if (er) return cb(er) + npm.commands.build( [targetFolder] + , npm.config.get("global") + , true + , function (er) { return cb(er, d) }) + }) +} + +function prepareForInstallMany (packageData, depsKey, bundled, wrap, family) { + var deps = Object.keys(packageData[depsKey] || {}) + + // don't install bundleDependencies, unless they're missing. + if (packageData.bundleDependencies) { + deps = deps.filter(function (d) { + return packageData.bundleDependencies.indexOf(d) === -1 || + bundled.indexOf(d) === -1 + }) + } + + return deps.filter(function (d) { + // prefer to not install things that are satisfied by + // something in the "family" list, unless we're installing + // from a shrinkwrap. + if (wrap) return wrap + if (semver.validRange(family[d], true)) { + return !semver.satisfies(family[d], packageData[depsKey][d], true) + } + return true + }).map(function (d) { + var v = packageData[depsKey][d] + var t = d + "@" + v + log.silly("prepareForInstallMany", "adding", t, "from", packageData.name, depsKey) + return t + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/link.js b/bin/nodejs0.12.16/node_modules/npm/lib/link.js new file mode 100644 index 00000000..f0123797 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/link.js @@ -0,0 +1,170 @@ +// link with no args: symlink the folder to the global location +// link with package arg: symlink the global to the local + +var npm = require("./npm.js") + , symlink = require("./utils/link.js") + , fs = require("graceful-fs") + , log = require("npmlog") + , asyncMap = require("slide").asyncMap + , chain = require("slide").chain + , path = require("path") + , build = require("./build.js") + , npa = require("npm-package-arg") + +module.exports = link + +link.usage = "npm link (in package dir)" + + "\nnpm link (link global into local)" + +link.completion = function (opts, cb) { + var dir = npm.globalDir + fs.readdir(dir, function (er, files) { + cb(er, files.filter(function (f) { + return !f.match(/^[\._-]/) + })) + }) +} + +function link (args, cb) { + if (process.platform === 'win32') { + var semver = require('semver') + if (!semver.gte(process.version, '0.7.9')) { + var msg = 'npm link not supported on windows prior to node 0.7.9' + var e = new Error(msg) + e.code = 'ENOTSUP' + e.errno = require('constants').ENOTSUP + return cb(e) + } + } + + if (npm.config.get("global")) { + return cb(new Error("link should never be --global.\n" + +"Please re-run this command with --local")) + } + + if (args.length === 1 && args[0] === ".") args = [] + if (args.length) return linkInstall(args, cb) + linkPkg(npm.prefix, cb) +} + +function linkInstall (pkgs, cb) { + asyncMap(pkgs, function (pkg, cb) { + var t = path.resolve(npm.globalDir, "..") + , pp = path.resolve(npm.globalDir, pkg) + , rp = null + , target = path.resolve(npm.dir, pkg) + + function n (er, data) { + if (er) return cb(er, data) + // install returns [ [folder, pkgId], ... ] + // but we definitely installed just one thing. + var d = data.filter(function (d) { return !d[3] }) + var what = npa(d[0][0]) + pp = d[0][1] + pkg = what.name + target = path.resolve(npm.dir, pkg) + next() + } + + // if it's a folder, a random not-installed thing, or not a scoped package, + // then link or install it first + if (pkg[0] !== "@" && (pkg.indexOf("/") !== -1 || pkg.indexOf("\\") !== -1)) { + return fs.lstat(path.resolve(pkg), function (er, st) { + if (er || !st.isDirectory()) { + npm.commands.install(t, pkg, n) + } else { + rp = path.resolve(pkg) + linkPkg(rp, n) + } + }) + } + + fs.lstat(pp, function (er, st) { + if (er) { + rp = pp + return npm.commands.install(t, pkg, n) + } else if (!st.isSymbolicLink()) { + rp = pp + next() + } else { + return fs.realpath(pp, function (er, real) { + if (er) log.warn("invalid symbolic link", pkg) + else rp = real + next() + }) + } + }) + + function next () { + chain + ( [ [function (cb) { + log.verbose("link", "symlinking %s to %s", pp, target) + cb() + }] + , [symlink, pp, target] + // do not run any scripts + , rp && [build, [target], npm.config.get("global"), build._noLC, true] + , [ resultPrinter, pkg, pp, target, rp ] ] + , cb ) + } + }, cb) +} + +function linkPkg (folder, cb_) { + var me = folder || npm.prefix + , readJson = require("read-package-json") + + log.verbose("linkPkg", folder) + + readJson(path.resolve(me, "package.json"), function (er, d) { + function cb (er) { + return cb_(er, [[d && d._id, target, null, null]]) + } + if (er) return cb(er) + if (!d.name) { + er = new Error("Package must have a name field to be linked") + return cb(er) + } + var target = path.resolve(npm.globalDir, d.name) + symlink(me, target, false, true, function (er) { + if (er) return cb(er) + log.verbose("link", "build target", target) + // also install missing dependencies. + npm.commands.install(me, [], function (er) { + if (er) return cb(er) + // build the global stuff. Don't run *any* scripts, because + // install command already will have done that. + build([target], true, build._noLC, true, function (er) { + if (er) return cb(er) + resultPrinter(path.basename(me), me, target, cb) + }) + }) + }) + }) +} + +function resultPrinter (pkg, src, dest, rp, cb) { + if (typeof cb !== "function") cb = rp, rp = null + var where = dest + rp = (rp || "").trim() + src = (src || "").trim() + // XXX If --json is set, then look up the data from the package.json + if (npm.config.get("parseable")) { + return parseableOutput(dest, rp || src, cb) + } + if (rp === src) rp = null + console.log(where + " -> " + src + (rp ? " -> " + rp: "")) + cb() +} + +function parseableOutput (dest, rp, cb) { + // XXX this should match ls --parseable and install --parseable + // look up the data from package.json, format it the same way. + // + // link is always effectively "long", since it doesn't help much to + // *just* print the target folder. + // However, we don't actually ever read the version number, so + // the second field is always blank. + console.log(dest + "::" + rp) + cb() +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/logout.js b/bin/nodejs0.12.16/node_modules/npm/lib/logout.js new file mode 100644 index 00000000..4c02f056 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/logout.js @@ -0,0 +1,40 @@ +module.exports = logout + +var dezalgo = require("dezalgo") +var log = require("npmlog") + +var npm = require("./npm.js") +var mapToRegistry = require("./utils/map-to-registry.js") + +logout.usage = "npm logout [--registry] [--scope]" + +function logout (args, cb) { + npm.spinner.start() + cb = dezalgo(cb) + + mapToRegistry("/", npm.config, function (err, uri, auth, normalized) { + if (err) return cb(err) + + if (auth.token) { + log.verbose("logout", "clearing session token for", normalized) + npm.registry.logout(normalized, { auth: auth }, function (err) { + if (err) return cb(err) + + npm.config.clearCredentialsByURI(normalized) + npm.spinner.stop() + npm.config.save("user", cb) + }) + } + else if (auth.username || auth.password) { + log.verbose("logout", "clearing user credentials for", normalized) + npm.config.clearCredentialsByURI(normalized) + npm.spinner.stop() + npm.config.save("user", cb) + } + else { + cb(new Error( + "Not logged in to", normalized + ",", "so can't log out." + )) + } + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/ls.js b/bin/nodejs0.12.16/node_modules/npm/lib/ls.js new file mode 100644 index 00000000..b133b414 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/ls.js @@ -0,0 +1,404 @@ + +// show the installed versions of packages +// +// --parseable creates output like this: +// ::: +// Flags are a :-separated list of zero or more indicators + +module.exports = exports = ls + +var npm = require("./npm.js") + , readInstalled = require("read-installed") + , log = require("npmlog") + , path = require("path") + , archy = require("archy") + , semver = require("semver") + , url = require("url") + , color = require("ansicolors") + , npa = require("npm-package-arg") + +ls.usage = "npm ls" + +ls.completion = require("./utils/completion/installed-deep.js") + +function ls (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + var dir = path.resolve(npm.dir, "..") + + // npm ls 'foo@~1.3' bar 'baz@<2' + if (!args) args = [] + else args = args.map(function (a) { + var p = npa(a) + , name = p.name + , ver = semver.validRange(p.rawSpec) || "" + + return [ name, ver ] + }) + + var depth = npm.config.get("depth") + var opt = { depth: depth, log: log.warn, dev: true } + readInstalled(dir, opt, function (er, data) { + pruneNestedExtraneous(data) + filterByEnv(data) + var bfs = bfsify(data, args) + , lite = getLite(bfs) + + if (er || silent) return cb(er, data, lite) + + var long = npm.config.get("long") + , json = npm.config.get("json") + , out + if (json) { + var seen = [] + var d = long ? bfs : lite + // the raw data can be circular + out = JSON.stringify(d, function (k, o) { + if (typeof o === "object") { + if (-1 !== seen.indexOf(o)) return "[Circular]" + seen.push(o) + } + return o + }, 2) + } else if (npm.config.get("parseable")) { + out = makeParseable(bfs, long, dir) + } else if (data) { + out = makeArchy(bfs, long, dir) + } + console.log(out) + + if (args.length && !data._found) process.exitCode = 1 + + // if any errors were found, then complain and exit status 1 + if (lite.problems && lite.problems.length) { + er = lite.problems.join("\n") + } + cb(er, data, lite) + }) +} + +function pruneNestedExtraneous (data, visited) { + visited = visited || [] + visited.push(data) + for (var i in data.dependencies) { + if (data.dependencies[i].extraneous) { + data.dependencies[i].dependencies = {} + } else if (visited.indexOf(data.dependencies[i]) === -1) { + pruneNestedExtraneous(data.dependencies[i], visited) + } + } +} + +function filterByEnv (data) { + var dev = npm.config.get("dev") + var production = npm.config.get("production") + if (dev === production) return + var dependencies = {} + var devDependencies = data.devDependencies || [] + Object.keys(data.dependencies).forEach(function (name) { + var keys = Object.keys(devDependencies) + if (production && keys.indexOf(name) !== -1) return + if (dev && keys.indexOf(name) === -1) return + dependencies[name] = data.dependencies[name] + }) + data.dependencies = dependencies +} + +function alphasort (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return a > b ? 1 + : a < b ? -1 : 0 +} + +function isCruft (data) { + return data.extraneous && data.error && data.error.code === 'ENOTDIR' +} + +function getLite (data, noname, depth) { + var lite = {} + , maxDepth = npm.config.get("depth") + + if (typeof depth === 'undefined') depth = 0 + if (!noname && data.name) lite.name = data.name + if (data.version) lite.version = data.version + if (data.extraneous) { + lite.extraneous = true + lite.problems = lite.problems || [] + lite.problems.push( "extraneous: " + + data.name + "@" + data.version + + " " + (data.path || "") ) + } + + if (data._from) + lite.from = data._from + + if (data._resolved) + lite.resolved = data._resolved + + if (data.invalid) { + lite.invalid = true + lite.problems = lite.problems || [] + lite.problems.push( "invalid: " + + data.name + "@" + data.version + + " " + (data.path || "") ) + } + + if (data.peerInvalid) { + lite.peerInvalid = true + lite.problems = lite.problems || [] + lite.problems.push( "peer invalid: " + + data.name + "@" + data.version + + " " + (data.path || "") ) + } + + if (data.dependencies) { + var deps = Object.keys(data.dependencies) + if (deps.length) lite.dependencies = deps.map(function (d) { + var dep = data.dependencies[d] + if (typeof dep === "string") { + lite.problems = lite.problems || [] + var p + if (data.depth > maxDepth) { + p = "max depth reached: " + } else { + p = "missing: " + } + p += d + "@" + dep + + ", required by " + + data.name + "@" + data.version + lite.problems.push(p) + return [d, { required: dep.requiredBy, missing: true }] + } else if (dep.peerMissing) { + lite.problems = lite.problems || [] + dep.peerMissing.forEach(function (missing) { + var pdm = 'peer dep missing: ' + + missing.requires + + ', required by ' + + missing.requiredBy + lite.problems.push(pdm) + }) + return [d, { required: dep, peerMissing: true }] + } else if (npm.config.get('json')) { + if (depth === maxDepth) delete dep.dependencies + return [d, getLite(dep, true, depth + 1)] + } + return [d, getLite(dep, true)] + }).reduce(function (deps, d) { + if (d[1].problems) { + lite.problems = lite.problems || [] + lite.problems.push.apply(lite.problems, d[1].problems) + } + deps[d[0]] = d[1] + return deps + }, {}) + } + return lite +} + +function bfsify (root, args, current, queue, seen) { + // walk over the data, and turn it from this: + // +-- a + // | `-- b + // | `-- a (truncated) + // `--b (truncated) + // into this: + // +-- a + // `-- b + // which looks nicer + args = args || [] + current = current || root + queue = queue || [] + seen = seen || [root] + var deps = current.dependencies = current.dependencies || {} + Object.keys(deps).forEach(function (d) { + var dep = deps[d] + if (typeof dep !== "object") return + if (seen.indexOf(dep) !== -1) { + if (npm.config.get("parseable") || !npm.config.get("long")) { + delete deps[d] + return + } else { + dep = deps[d] = Object.create(dep) + dep.dependencies = {} + } + } + queue.push(dep) + seen.push(dep) + }) + + if (!queue.length) { + // if there were args, then only show the paths to found nodes. + return filterFound(root, args) + } + return bfsify(root, args, queue.shift(), queue, seen) +} + +function filterFound (root, args) { + if (!args.length) return root + var deps = root.dependencies + if (deps) Object.keys(deps).forEach(function (d) { + var dep = filterFound(deps[d], args) + + // see if this one itself matches + var found = false + for (var i = 0; !found && i < args.length; i ++) { + if (d === args[i][0]) { + found = semver.satisfies(dep.version, args[i][1], true) + } + } + // included explicitly + if (found) dep._found = true + // included because a child was included + if (dep._found && !root._found) root._found = 1 + // not included + if (!dep._found) delete deps[d] + }) + if (!root._found) root._found = false + return root +} + +function makeArchy (data, long, dir) { + var out = makeArchy_(data, long, dir, 0) + return archy(out, "", { unicode: npm.config.get("unicode") }) +} + +function makeArchy_ (data, long, dir, depth, parent, d) { + if (typeof data === "string") { + if (depth -1 <= npm.config.get("depth")) { + // just missing + var unmet = "UNMET DEPENDENCY" + if (npm.color) { + unmet = color.bgBlack(color.red(unmet)) + } + data = unmet + " " + d + "@" + data + } else { + data = d+"@"+ data + } + return data + } + + var out = {} + // the top level is a bit special. + out.label = data._id || "" + if (data._found === true && data._id) { + if (npm.color) { + out.label = color.bgBlack(color.yellow(out.label.trim())) + " " + } else { + out.label = out.label.trim() + " " + } + } + if (data.link) out.label += " -> " + data.link + + if (data.invalid) { + if (data.realName !== data.name) out.label += " ("+data.realName+")" + var invalid = "invalid" + if (npm.color) invalid = color.bgBlack(color.red(invalid)) + out.label += " " + invalid + } + + if (data.peerInvalid) { + var peerInvalid = "peer invalid" + if (npm.color) peerInvalid = color.bgBlack(color.red(peerInvalid)) + out.label += " " + peerInvalid + } + + if (data.extraneous && data.path !== dir) { + var extraneous = "extraneous" + if (npm.color) extraneous = color.bgBlack(color.green(extraneous)) + out.label += " " + extraneous + } + + // add giturl to name@version + if (data._resolved) { + var type = npa(data._resolved).type + var isGit = type === 'git' || type === 'hosted' + if (isGit) { + out.label += ' (' + data._resolved + ')' + } + } + + if (long) { + if (dir === data.path) out.label += "\n" + dir + out.label += "\n" + getExtras(data, dir) + } else if (dir === data.path) { + if (out.label) out.label += " " + out.label += dir + } + + // now all the children. + out.nodes = [] + if (depth <= npm.config.get("depth")) { + out.nodes = Object.keys(data.dependencies || {}) + .sort(alphasort).map(function (d) { + return makeArchy_(data.dependencies[d], long, dir, depth + 1, data, d) + }) + } + + if (out.nodes.length === 0 && data.path === dir) { + out.nodes = ["(empty)"] + } + + return out +} + +function getExtras (data) { + var extras = [] + + if (data.description) extras.push(data.description) + if (data.repository) extras.push(data.repository.url) + if (data.homepage) extras.push(data.homepage) + if (data._from) { + var from = data._from + if (from.indexOf(data.name + "@") === 0) { + from = from.substr(data.name.length + 1) + } + var u = url.parse(from) + if (u.protocol) extras.push(from) + } + return extras.join("\n") +} + + +function makeParseable (data, long, dir, depth, parent, d) { + depth = depth || 0 + + return [ makeParseable_(data, long, dir, depth, parent, d) ] + .concat(Object.keys(data.dependencies || {}) + .sort(alphasort).map(function (d) { + return makeParseable(data.dependencies[d], long, dir, depth + 1, data, d) + })) + .filter(function (x) { return x }) + .join("\n") +} + +function makeParseable_ (data, long, dir, depth, parent, d) { + if (data.hasOwnProperty("_found") && data._found !== true) return "" + + if (typeof data === "string") { + if (data.depth < npm.config.get("depth")) { + data = npm.config.get("long") + ? path.resolve(parent.path, "node_modules", d) + + ":"+d+"@"+JSON.stringify(data)+":INVALID:MISSING" + : "" + } else { + data = path.resolve(data.path || "", "node_modules", d || "") + + (npm.config.get("long") + ? ":" + d + "@" + JSON.stringify(data) + + ":" // no realpath resolved + + ":MAXDEPTH" + : "") + } + + return data + } + + if (!npm.config.get("long")) return data.path + + return data.path + + ":" + (data._id || "") + + ":" + (data.realPath !== data.path ? data.realPath : "") + + (data.extraneous ? ":EXTRANEOUS" : "") + + (data.invalid ? ":INVALID" : "") + + (data.peerInvalid ? ":PEERINVALID" : "") +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/npm.js b/bin/nodejs0.12.16/node_modules/npm/lib/npm.js new file mode 100644 index 00000000..9d3f50c5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/npm.js @@ -0,0 +1,475 @@ +;(function(){ +// windows: running "npm blah" in this folder will invoke WSH, not node. +if (typeof WScript !== "undefined") { + WScript.echo("npm does not work when run\n" + +"with the Windows Scripting Host\n\n" + +"'cd' to a different directory,\n" + +"or type 'npm.cmd ',\n" + +"or type 'node npm '.") + WScript.quit(1) + return +} + + +var EventEmitter = require("events").EventEmitter + , npm = module.exports = new EventEmitter() + , npmconf = require("./config/core.js") + , log = require("npmlog") + , gfs = require('graceful-fs') + , fs = gfs.gracefulify(require('fs')) + , path = require("path") + , abbrev = require("abbrev") + , which = require("which") + , CachingRegClient = require("./cache/caching-client.js") + , charSpin = require("char-spinner") + +npm.config = { + loaded: false, + get: function() { + throw new Error('npm.load() required') + }, + set: function() { + throw new Error('npm.load() required') + } +} + +npm.commands = {} + +npm.rollbacks = [] + +try { + // startup, ok to do this synchronously + var j = JSON.parse(fs.readFileSync( + path.join(__dirname, "../package.json"))+"") + npm.version = j.version +} catch (ex) { + try { + log.info("error reading version", ex) + } catch (er) {} + npm.version = ex +} + +var commandCache = {} + // short names for common things + , aliases = { "rm" : "uninstall" + , "r" : "uninstall" + , "un" : "uninstall" + , "unlink" : "uninstall" + , "remove" : "uninstall" + , "rb" : "rebuild" + , "list" : "ls" + , "la" : "ls" + , "ll" : "ls" + , "ln" : "link" + , "i" : "install" + , "isntall" : "install" + , "up" : "update" + , "upgrade" : "update" + , "c" : "config" + , "dist-tags" : "dist-tag" + , "info" : "view" + , "show" : "view" + , "find" : "search" + , "s" : "search" + , "se" : "search" + , "author" : "owner" + , "home" : "docs" + , "issues": "bugs" + , "unstar": "star" // same function + , "apihelp" : "help" + , "login": "adduser" + , "add-user": "adduser" + , "tst": "test" + , "t": "test" + , "find-dupes": "dedupe" + , "ddp": "dedupe" + , "v": "view" + , "verison": "version" + } + + , aliasNames = Object.keys(aliases) + // these are filenames in . + , cmdList = [ "install" + , "uninstall" + , "cache" + , "config" + , "set" + , "get" + , "update" + , "outdated" + , "prune" + , "pack" + , "dedupe" + + , "rebuild" + , "link" + + , "publish" + , "star" + , "stars" + , "tag" + , "adduser" + , "logout" + , "unpublish" + , "owner" + , "access" + , "team" + , "deprecate" + , "shrinkwrap" + + , "help" + , "help-search" + , "ls" + , "search" + , "view" + , "init" + , "version" + , "edit" + , "explore" + , "docs" + , "repo" + , "bugs" + , "faq" + , "root" + , "prefix" + , "bin" + , "whoami" + , "dist-tag" + , "ping" + + , "test" + , "stop" + , "start" + , "restart" + , "run-script" + , "completion" + ] + , plumbing = [ "build" + , "unbuild" + , "xmas" + , "substack" + , "visnup" + ] + , littleGuys = [ "isntall", "verison" ] + , fullList = cmdList.concat(aliasNames).filter(function (c) { + return plumbing.indexOf(c) === -1 + }) + , abbrevs = abbrev(fullList) + +// we have our reasons +fullList = npm.fullList = fullList.filter(function (c) { + return littleGuys.indexOf(c) === -1 +}) + +npm.spinner = + { int: null + , started: false + , start: function () { + if (npm.spinner.int) return + var c = npm.config.get("spin") + if (!c) return + var stream = npm.config.get("logstream") + var opt = { tty: c !== "always", stream: stream } + opt.cleanup = !npm.spinner.started + npm.spinner.int = charSpin(opt) + npm.spinner.started = true + } + , stop: function () { + clearInterval(npm.spinner.int) + npm.spinner.int = null + } + } + +Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) { + Object.defineProperty(npm.commands, c, { get : function () { + if (!loaded) throw new Error( + "Call npm.load(config, cb) before using this command.\n"+ + "See the README.md or cli.js for example usage.") + var a = npm.deref(c) + if (c === "la" || c === "ll") { + npm.config.set("long", true) + } + + npm.command = c + if (commandCache[a]) return commandCache[a] + + var cmd = require(__dirname+"/"+a+".js") + + commandCache[a] = function () { + var args = Array.prototype.slice.call(arguments, 0) + if (typeof args[args.length - 1] !== "function") { + args.push(defaultCb) + } + if (args.length === 1) args.unshift([]) + + npm.registry.version = npm.version + if (!npm.registry.refer) { + npm.registry.refer = [a].concat(args[0]).map(function (arg) { + // exclude anything that might be a URL, path, or private module + // Those things will always have a slash in them somewhere + if (arg && arg.match && arg.match(/\/|\\/)) { + return "[REDACTED]" + } else { + return arg + } + }).filter(function (arg) { + return arg && arg.match + }).join(" ") + } + + cmd.apply(npm, args) + } + + Object.keys(cmd).forEach(function (k) { + commandCache[a][k] = cmd[k] + }) + + return commandCache[a] + }, enumerable: fullList.indexOf(c) !== -1, configurable: true }) + + // make css-case commands callable via camelCase as well + if (c.match(/\-([a-z])/)) { + addCommand(c.replace(/\-([a-z])/g, function (a, b) { + return b.toUpperCase() + })) + } +}) + +function defaultCb (er, data) { + if (er) console.error(er.stack || er.message) + else console.log(data) +} + +npm.deref = function (c) { + if (!c) return "" + if (c.match(/[A-Z]/)) c = c.replace(/([A-Z])/g, function (m) { + return "-" + m.toLowerCase() + }) + if (plumbing.indexOf(c) !== -1) return c + var a = abbrevs[c] + if (aliases[a]) a = aliases[a] + return a +} + +var loaded = false + , loading = false + , loadErr = null + , loadListeners = [] + +function loadCb (er) { + loadListeners.forEach(function (cb) { + process.nextTick(cb.bind(npm, er, npm)) + }) + loadListeners.length = 0 +} + +npm.load = function (cli, cb_) { + if (!cb_ && typeof cli === "function") cb_ = cli , cli = {} + if (!cb_) cb_ = function () {} + if (!cli) cli = {} + loadListeners.push(cb_) + if (loaded || loadErr) return cb(loadErr) + if (loading) return + loading = true + var onload = true + + function cb (er) { + if (loadErr) return + loadErr = er + if (er) return cb_(er) + if (npm.config.get("force")) { + log.warn("using --force", "I sure hope you know what you are doing.") + } + npm.config.loaded = true + loaded = true + loadCb(loadErr = er) + onload = onload && npm.config.get('onload-script') + if (onload) { + try { + require(onload) + } catch (err) { + log.warn('onload-script', 'failed to require onload script', onload) + log.warn('onload-script', err) + } + onload = false + } + } + + log.pause() + + load(npm, cli, cb) +} + +function load (npm, cli, cb) { + which(process.argv[0], function (er, node) { + if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) { + log.verbose("node symlink", node) + process.execPath = node + process.installPrefix = path.resolve(node, "..", "..") + } + + // look up configs + //console.error("about to look up configs") + + var builtin = path.resolve(__dirname, "..", "npmrc") + npmconf.load(cli, builtin, function (er, config) { + if (er === config) er = null + + npm.config = config + if (er) return cb(er) + + // if the "project" config is not a filename, and we're + // not in global mode, then that means that it collided + // with either the default or effective userland config + if (!config.get("global") + && config.sources.project + && config.sources.project.type !== "ini") { + log.verbose("config" + , "Skipping project config: %s. " + + "(matches userconfig)" + , config.localPrefix + "/.npmrc") + } + + // Include npm-version and node-version in user-agent + var ua = config.get("user-agent") || "" + ua = ua.replace(/\{node-version\}/gi, process.version) + ua = ua.replace(/\{npm-version\}/gi, npm.version) + ua = ua.replace(/\{platform\}/gi, process.platform) + ua = ua.replace(/\{arch\}/gi, process.arch) + config.set("user-agent", ua) + + var color = config.get("color") + + log.level = config.get("loglevel") + log.heading = config.get("heading") || "npm" + log.stream = config.get("logstream") + + switch (color) { + case "always": + log.enableColor() + npm.color = true + break + case false: + log.disableColor() + npm.color = false + break + default: + var tty = require("tty") + if (process.stdout.isTTY) npm.color = true + else if (!tty.isatty) npm.color = true + else if (tty.isatty(1)) npm.color = true + else npm.color = false + break + } + + log.resume() + + // at this point the configs are all set. + // go ahead and spin up the registry client. + npm.registry = new CachingRegClient(npm.config) + + var umask = npm.config.get("umask") + npm.modes = { exec: 0777 & (~umask) + , file: 0666 & (~umask) + , umask: umask } + + var gp = Object.getOwnPropertyDescriptor(config, "globalPrefix") + Object.defineProperty(npm, "globalPrefix", gp) + + var lp = Object.getOwnPropertyDescriptor(config, "localPrefix") + Object.defineProperty(npm, "localPrefix", lp) + + return cb(null, npm) + }) + }) +} + +Object.defineProperty(npm, "prefix", + { get : function () { + return npm.config.get("global") ? npm.globalPrefix : npm.localPrefix + } + , set : function (r) { + var k = npm.config.get("global") ? "globalPrefix" : "localPrefix" + return npm[k] = r + } + , enumerable : true + }) + +Object.defineProperty(npm, "bin", + { get : function () { + if (npm.config.get("global")) return npm.globalBin + return path.resolve(npm.root, ".bin") + } + , enumerable : true + }) + +Object.defineProperty(npm, "globalBin", + { get : function () { + var b = npm.globalPrefix + if (process.platform !== "win32") b = path.resolve(b, "bin") + return b + } + }) + +Object.defineProperty(npm, "dir", + { get : function () { + if (npm.config.get("global")) return npm.globalDir + return path.resolve(npm.prefix, "node_modules") + } + , enumerable : true + }) + +Object.defineProperty(npm, "globalDir", + { get : function () { + return (process.platform !== "win32") + ? path.resolve(npm.globalPrefix, "lib", "node_modules") + : path.resolve(npm.globalPrefix, "node_modules") + } + , enumerable : true + }) + +Object.defineProperty(npm, "root", + { get : function () { return npm.dir } }) + +Object.defineProperty(npm, "cache", + { get : function () { return npm.config.get("cache") } + , set : function (r) { return npm.config.set("cache", r) } + , enumerable : true + }) + +var tmpFolder +var rand = require("crypto").randomBytes(4).toString("hex") +Object.defineProperty(npm, "tmp", + { get : function () { + if (!tmpFolder) tmpFolder = "npm-" + process.pid + "-" + rand + return path.resolve(npm.config.get("tmp"), tmpFolder) + } + , enumerable : true + }) + +// the better to repl you with +Object.getOwnPropertyNames(npm.commands).forEach(function (n) { + if (npm.hasOwnProperty(n) || n === "config") return + + Object.defineProperty(npm, n, { get: function () { + return function () { + var args = Array.prototype.slice.call(arguments, 0) + , cb = defaultCb + + if (args.length === 1 && Array.isArray(args[0])) { + args = args[0] + } + + if (typeof args[args.length - 1] === "function") { + cb = args.pop() + } + + npm.commands[n](args, cb) + } + }, enumerable: false, configurable: true }) +}) + +if (require.main === module) { + require("../bin/npm-cli.js") +} +})() diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/outdated.js b/bin/nodejs0.12.16/node_modules/npm/lib/outdated.js new file mode 100644 index 00000000..ab1c3113 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/outdated.js @@ -0,0 +1,404 @@ +/* + +npm outdated [pkg] + +Does the following: + +1. check for a new version of pkg + +If no packages are specified, then run for all installed +packages. + +--parseable creates output like this: +::: + +*/ + +module.exports = outdated + +outdated.usage = "npm outdated [ [ ...]]" + +outdated.completion = require("./utils/completion/installed-deep.js") + + +var path = require("path") + , readJson = require("read-package-json") + , cache = require("./cache.js") + , asyncMap = require("slide").asyncMap + , npm = require("./npm.js") + , url = require("url") + , color = require("ansicolors") + , styles = require("ansistyles") + , table = require("text-table") + , semver = require("semver") + , os = require("os") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , readInstalled = require("read-installed") + , long = npm.config.get("long") + , log = require("npmlog") + +function outdated (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + var dir = path.resolve(npm.dir, "..") + + // default depth for `outdated` is 0 (cf. `ls`) + if (npm.config.get("depth") === Infinity) npm.config.set("depth", 0) + + outdated_(args, dir, {}, 0, function (er, list) { + if (!list) list = [] + if (er || silent || list.length === 0) return cb(er, list) + list.sort(function(a, b) { + var aa = a[1].toLowerCase() + , bb = b[1].toLowerCase() + return aa === bb ? 0 + : aa < bb ? -1 : 1 + }) + if (npm.config.get("json")) { + console.log(makeJSON(list)) + } else if (npm.config.get("parseable")) { + console.log(makeParseable(list)) + } else { + var outList = list.map(makePretty) + var outHead = [ "Package" + , "Current" + , "Wanted" + , "Latest" + , "Location" + ] + if (long) outHead.push("Package Type") + var outTable = [outHead].concat(outList) + + if (npm.color) { + outTable[0] = outTable[0].map(function(heading) { + return styles.underline(heading) + }) + } + + var tableOpts = { align: ["l", "r", "r", "r", "l"] + , stringLength: function(s) { return ansiTrim(s).length } + } + console.log(table(outTable, tableOpts)) + } + cb(null, list) + }) +} + +// [[ dir, dep, has, want, latest, type ]] +function makePretty (p) { + var dep = p[1] + , dir = path.resolve(p[0], "node_modules", dep) + , has = p[2] + , want = p[3] + , latest = p[4] + , type = p[6] + + if (!npm.config.get("global")) { + dir = path.relative(process.cwd(), dir) + } + + var columns = [ dep + , has || "MISSING" + , want + , latest + , dirToPrettyLocation(dir) + ] + if (long) columns[5] = type + + if (npm.color) { + columns[0] = color[has === want ? "yellow" : "red"](columns[0]) // dep + columns[2] = color.green(columns[2]) // want + columns[3] = color.magenta(columns[3]) // latest + columns[4] = color.brightBlack(columns[4]) // dir + if (long) columns[5] = color.brightBlack(columns[5]) // type + } + + return columns +} + +function ansiTrim (str) { + var r = new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|" + + "\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)", "g") + return str.replace(r, "") +} + +function dirToPrettyLocation (dir) { + return dir.replace(/^node_modules[/\\]/, "") + .replace(/[[/\\]node_modules[/\\]/g, " > ") +} + +function makeParseable (list) { + return list.map(function (p) { + + var dep = p[1] + , dir = path.resolve(p[0], "node_modules", dep) + , has = p[2] + , want = p[3] + , latest = p[4] + , type = p[6] + + var out = [ dir + , dep + "@" + want + , (has ? (dep + "@" + has) : "MISSING") + , dep + "@" + latest + ] + if (long) out.push(type) + + return out.join(":") + }).join(os.EOL) +} + +function makeJSON (list) { + var out = {} + list.forEach(function (p) { + var dir = path.resolve(p[0], "node_modules", p[1]) + if (!npm.config.get("global")) { + dir = path.relative(process.cwd(), dir) + } + out[p[1]] = { current: p[2] + , wanted: p[3] + , latest: p[4] + , location: dir + } + if (long) out[p[1]].type = p[6] + }) + return JSON.stringify(out, null, 2) +} + +function outdated_ (args, dir, parentHas, depth, cb) { + // get the deps from package.json, or {:"*"} + // asyncMap over deps: + // shouldHave = cache.add(dep, req).version + // if has === shouldHave then + // return outdated(args, dir/node_modules/dep, parentHas + has) + // else if dep in args or args is empty + // return [dir, dep, has, shouldHave] + + if (depth > npm.config.get("depth")) { + return cb(null, []) + } + var deps = null + var types = {} + readJson(path.resolve(dir, "package.json"), function (er, d) { + d = d || {} + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + deps = (er) ? true : (d.dependencies || {}) + if (!er) { + Object.keys(deps).forEach(function (k) { + types[k] = "dependencies" + }) + } + + if (npm.config.get("save-dev")) { + deps = d.devDependencies || {} + Object.keys(deps).forEach(function (k) { + types[k] = "devDependencies" + }) + + return next() + } + + if (npm.config.get("save")) { + // remove optional dependencies from dependencies during --save. + Object.keys(d.optionalDependencies || {}).forEach(function (k) { + delete deps[k] + }) + return next() + } + + if (npm.config.get("save-optional")) { + deps = d.optionalDependencies || {} + Object.keys(deps).forEach(function (k) { + types[k] = "optionalDependencies" + }) + return next() + } + + var doUpdate = npm.config.get("dev") || + (!npm.config.get("production") && + !Object.keys(parentHas).length && + !npm.config.get("global")) + + if (!er && d && doUpdate) { + Object.keys(d.devDependencies || {}).forEach(function (k) { + if (!(k in parentHas)) { + deps[k] = d.devDependencies[k] + types[k] = "devDependencies" + } + }) + } + return next() + }) + + var has = null + readInstalled(path.resolve(dir), { dev : true }, function (er, data) { + if (er) { + has = Object.create(parentHas) + return next() + } + var pkgs = Object.keys(data.dependencies) + pkgs = pkgs.filter(function (p) { + return !p.match(/^[\._-]/) + }) + asyncMap(pkgs, function (pkg, cb) { + var jsonFile = path.resolve(dir, "node_modules", pkg, "package.json") + readJson(jsonFile, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (d && d.name && d.private) delete deps[d.name] + cb(null, er ? [] : [[d.name, d.version, d._from]]) + }) + }, function (er, pvs) { + if (er) return cb(er) + has = Object.create(parentHas) + pvs.forEach(function (pv) { + has[pv[0]] = { + link: data.dependencies[pv[0]].link, + version: pv[1], + from: pv[2] + } + }) + + next() + }) + }) + + function next () { + if (!has || !deps) return + if (deps === true) { + deps = Object.keys(has).reduce(function (l, r) { + l[r] = "latest" + return l + }, {}) + } + + // now get what we should have, based on the dep. + // if has[dep] !== shouldHave[dep], then cb with the data + // otherwise dive into the folder + asyncMap(Object.keys(deps), function (dep, cb) { + if (!long) return shouldUpdate(args, dir, dep, has, deps[dep], depth, cb) + + shouldUpdate(args, dir, dep, has, deps[dep], depth, cb, types[dep]) + }, cb) + } +} + +function shouldUpdate (args, dir, dep, has, req, depth, cb, type) { + // look up the most recent version. + // if that's what we already have, or if it's not on the args list, + // then dive into it. Otherwise, cb() with the data. + + // { version: , from: } + var curr = has[dep] + + function skip (er) { + // show user that no viable version can be found + if (er) return cb(er) + outdated_( args + , path.resolve(dir, "node_modules", dep) + , has + , depth + 1 + , cb ) + } + + function doIt (wanted, latest) { + if (!long) { + return cb(null, [[ dir, dep, curr && curr.version, wanted, latest, req]]) + } + cb(null, [[ dir, dep, curr && curr.version, wanted, latest, req, type]]) + } + + if (args.length && args.indexOf(dep) === -1) return skip() + var parsed = npa(dep + '@' + req) + if (parsed.type === "git" || (parsed.hosted && parsed.hosted.type === "github")) { + return doIt("git", "git") + } + if (curr && curr.link) { + return doIt("linked", "linked") + } + + // search for the latest package + mapToRegistry(dep, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, updateDeps) + }) + + function updateLocalDeps (latestRegistryVersion) { + readJson(path.resolve(parsed.spec, 'package.json'), function (er, localDependency) { + if (er) return cb() + + var wanted = localDependency.version + var latest = localDependency.version + + if (latestRegistryVersion) { + latest = latestRegistryVersion + if (semver.lt(wanted, latestRegistryVersion)) { + wanted = latestRegistryVersion + req = dep + '@' + latest + } + } + + if (curr.version !== wanted) { + doIt(wanted, latest) + } else { + skip() + } + }) + } + + function updateDeps (er, d) { + if (er) { + if (parsed.type !== 'local') return cb(er) + return updateLocalDeps() + } + + if (!d || !d["dist-tags"] || !d.versions) return cb() + var l = d.versions[d["dist-tags"].latest] + if (!l) return cb() + + var r = req + if (d["dist-tags"][req]) + r = d["dist-tags"][req] + + if (semver.validRange(r, true)) { + // some kind of semver range. + // see if it's in the doc. + var vers = Object.keys(d.versions) + var v = semver.maxSatisfying(vers, r, true) + if (v) { + return onCacheAdd(null, d.versions[v]) + } + } + + // We didn't find the version in the doc. See if cache can find it. + cache.add(dep, req, null, false, onCacheAdd) + + function onCacheAdd(er, d) { + // if this fails, then it means we can't update this thing. + // it's probably a thing that isn't published. + if (er) { + if (er.code && er.code === "ETARGET") { + // no viable version found + return skip(er) + } + return skip() + } + + // check that the url origin hasn't changed (#1727) and that + // there is no newer version available + var dFromUrl = d._from && url.parse(d._from).protocol + var cFromUrl = curr && curr.from && url.parse(curr.from).protocol + + if (!curr || dFromUrl && cFromUrl && d._from !== curr.from + || d.version !== curr.version + || d.version !== l.version) { + if (parsed.type === 'local') return updateLocalDeps(l.version) + + doIt(d.version, l.version) + } + else { + skip() + } + } + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/owner.js b/bin/nodejs0.12.16/node_modules/npm/lib/owner.js new file mode 100644 index 00000000..b99c8f77 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/owner.js @@ -0,0 +1,254 @@ +module.exports = owner + +owner.usage = "npm owner add " + + "\nnpm owner rm " + + "\nnpm owner ls " + +var npm = require("./npm.js") + , log = require("npmlog") + , mapToRegistry = require("./utils/map-to-registry.js") + , readLocalPkg = require("./utils/read-local-package.js") + +owner.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length > 4) return cb() + if (argv.length <= 2) { + var subs = ["add", "rm"] + if (opts.partialWord === "l") subs.push("ls") + else subs.push("ls", "list") + return cb(null, subs) + } + + npm.commands.whoami([], true, function (er, username) { + if (er) return cb() + + var un = encodeURIComponent(username) + var byUser, theUser + switch (argv[2]) { + case "ls": + // FIXME: there used to be registry completion here, but it stopped + // making sense somewhere around 50,000 packages on the registry + return cb() + + case "rm": + if (argv.length > 3) { + theUser = encodeURIComponent(argv[3]) + byUser = "-/by-user/" + theUser + "|" + un + return mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + console.error(uri) + npm.registry.get(uri, { auth : auth }, function (er, d) { + if (er) return cb(er) + // return the intersection + return cb(null, d[theUser].filter(function (p) { + // kludge for server adminery. + return un === "isaacs" || d[un].indexOf(p) === -1 + })) + }) + }) + } + // else fallthrough + case "add": + if (argv.length > 3) { + theUser = encodeURIComponent(argv[3]) + byUser = "-/by-user/" + theUser + "|" + un + return mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + console.error(uri) + npm.registry.get(uri, { auth : auth }, function (er, d) { + console.error(uri, er || d) + // return mine that they're not already on. + if (er) return cb(er) + var mine = d[un] || [] + , theirs = d[theUser] || [] + return cb(null, mine.filter(function (p) { + return theirs.indexOf(p) === -1 + })) + }) + }) + } + // just list all users who aren't me. + return mapToRegistry("-/users", npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, list) { + if (er) return cb() + return cb(null, Object.keys(list).filter(function (n) { + return n !== un + })) + }) + }) + + default: + return cb() + } + }) +} + +function owner (args, cb) { + var action = args.shift() + switch (action) { + case "ls": case "list": return ls(args[0], cb) + case "add": return add(args[0], args[1], cb) + case "rm": case "remove": return rm(args[0], args[1], cb) + default: return unknown(action, cb) + } +} + +function ls (pkg, cb) { + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(owner.usage) + ls(pkg, cb) + }) + + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, data) { + var msg = "" + if (er) { + log.error("owner ls", "Couldn't get owner data", pkg) + return cb(er) + } + var owners = data.maintainers + if (!owners || !owners.length) msg = "admin party!" + else msg = owners.map(function (o) { + return o.name + " <" + o.email + ">" + }).join("\n") + console.log(msg) + cb(er, owners) + }) + }) +} + +function add (user, pkg, cb) { + if (!user) return cb(owner.usage) + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(new Error(owner.usage)) + add(user, pkg, cb) + }) + + log.verbose("owner add", "%s to %s", user, pkg) + mutate(pkg, user, function (u, owners) { + if (!owners) owners = [] + for (var i = 0, l = owners.length; i < l; i ++) { + var o = owners[i] + if (o.name === u.name) { + log.info( "owner add" + , "Already a package owner: " + o.name + " <" + o.email + ">") + return false + } + } + owners.push(u) + return owners + }, cb) +} + +function rm (user, pkg, cb) { + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(new Error(owner.usage)) + rm(user, pkg, cb) + }) + + log.verbose("owner rm", "%s from %s", user, pkg) + mutate(pkg, user, function (u, owners) { + var found = false + , m = owners.filter(function (o) { + var match = (o.name === user) + found = found || match + return !match + }) + if (!found) { + log.info("owner rm", "Not a package owner: " + user) + return false + } + if (!m.length) return new Error( + "Cannot remove all owners of a package. Add someone else first.") + return m + }, cb) +} + +function mutate (pkg, user, mutation, cb) { + if (user) { + var byUser = "-/user/org.couchdb.user:" + user + mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, mutate_) + }) + } else { + mutate_(null, null) + } + + function mutate_ (er, u) { + if (!er && user && (!u || u.error)) er = new Error( + "Couldn't get user data for " + user + ": " + JSON.stringify(u)) + + if (er) { + log.error("owner mutate", "Error getting user data for %s", user) + return cb(er) + } + + if (u) u = { "name" : u.name, "email" : u.email } + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, data) { + if (er) { + log.error("owner mutate", "Error getting package data for %s", pkg) + return cb(er) + } + + // save the number of maintainers before mutation so that we can figure + // out if maintainers were added or removed + var beforeMutation = data.maintainers.length + + var m = mutation(u, data.maintainers) + if (!m) return cb() // handled + if (m instanceof Error) return cb(m) // error + + data = { + _id : data._id, + _rev : data._rev, + maintainers : m + } + var dataPath = pkg.replace("/", "%2f") + "/-rev/" + data._rev + mapToRegistry(dataPath, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + method : "PUT", + body : data, + auth : auth + } + npm.registry.request(uri, params, function (er, data) { + if (!er && data.error) { + er = new Error("Failed to update package metadata: "+JSON.stringify(data)) + } + + if (er) { + log.error("owner mutate", "Failed to update package metadata") + } + else if (m.length > beforeMutation) { + console.log("+ %s (%s)", user, pkg) + } + else if (m.length < beforeMutation) { + console.log("- %s (%s)", user, pkg) + } + + cb(er, data) + }) + }) + }) + }) + } +} + +function unknown (action, cb) { + cb("Usage: \n" + owner.usage) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/pack.js b/bin/nodejs0.12.16/node_modules/npm/lib/pack.js new file mode 100644 index 00000000..532f7c5a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/pack.js @@ -0,0 +1,69 @@ +// npm pack +// Packs the specified package into a .tgz file, which can then +// be installed. + +module.exports = pack + +var npm = require("./npm.js") + , install = require("./install.js") + , cache = require("./cache.js") + , fs = require("graceful-fs") + , chain = require("slide").chain + , path = require("path") + , cwd = process.cwd() + , writeStreamAtomic = require('fs-write-stream-atomic') + , cachedPackageRoot = require("./cache/cached-package-root.js") + +pack.usage = "npm pack " + +// if it can be installed, it can be packed. +pack.completion = install.completion + +function pack (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + if (args.length === 0) args = ["."] + + chain(args.map(function (arg) { return function (cb) { + pack_(arg, cb) + }}), function (er, files) { + if (er || silent) return cb(er, files) + printFiles(files, cb) + }) +} + +function printFiles (files, cb) { + files = files.map(function (file) { + return path.relative(cwd, file) + }) + console.log(files.join("\n")) + cb() +} + +// add to cache, then cp to the cwd +function pack_ (pkg, cb) { + cache.add(pkg, null, null, false, function (er, data) { + if (er) return cb(er) + + // scoped packages get special treatment + var name = data.name + if (name[0] === "@") name = name.substr(1).replace(/\//g, "-") + var fname = name + "-" + data.version + ".tgz" + + var cached = path.join(cachedPackageRoot(data), "package.tgz") + , from = fs.createReadStream(cached) + , to = writeStreamAtomic(fname) + , errState = null + + from.on("error", cb_) + to.on("error", cb_) + to.on("close", cb_) + from.pipe(to) + + function cb_ (er) { + if (errState) return + if (er) return cb(errState = er) + cb(null, fname) + } + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/ping.js b/bin/nodejs0.12.16/node_modules/npm/lib/ping.js new file mode 100644 index 00000000..90639598 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/ping.js @@ -0,0 +1,20 @@ +var npm = require('./npm.js') + +module.exports = ping + +ping.usage = 'npm ping\nping registry' + +function ping (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + var registry = npm.config.get('registry') + if (!registry) return cb(new Error('no default registry set')) + var auth = npm.config.getCredentialsByURI(registry) + + npm.registry.ping(registry, {auth: auth}, function (er, pong) { + if (!silent) console.log(JSON.stringify(pong)) + cb(er, er ? null : pong) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/prefix.js b/bin/nodejs0.12.16/node_modules/npm/lib/prefix.js new file mode 100644 index 00000000..83d6ad1f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/prefix.js @@ -0,0 +1,11 @@ +module.exports = prefix + +var npm = require("./npm.js") + +prefix.usage = "npm prefix\nnpm prefix -g\n(just prints the prefix folder)" + +function prefix (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + if (!silent) console.log(npm.prefix) + process.nextTick(cb.bind(this, null, npm.prefix)) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/prune.js b/bin/nodejs0.12.16/node_modules/npm/lib/prune.js new file mode 100644 index 00000000..7bfe7680 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/prune.js @@ -0,0 +1,56 @@ +// prune extraneous packages. + +module.exports = prune + +prune.usage = "npm prune" + +var readInstalled = require("read-installed") + , npm = require("./npm.js") + , path = require("path") + , readJson = require("read-package-json") + , log = require("npmlog") + +prune.completion = require("./utils/completion/installed-deep.js") + +function prune (args, cb) { + //check if is a valid package.json file + var jsonFile = path.resolve(npm.dir, "..", "package.json" ) + readJson(jsonFile, log.warn, function (er) { + if (er) return cb(er) + next() + }) + + function next() { + var opt = { + depth: npm.config.get("depth"), + dev: !npm.config.get("production") || npm.config.get("dev") + } + readInstalled(npm.prefix, opt, function (er, data) { + if (er) return cb(er) + prune_(args, data, cb) + }) + } +} + +function prune_ (args, data, cb) { + npm.commands.unbuild(prunables(args, data, []), cb) +} + +function prunables (args, data, seen) { + var deps = data.dependencies || {} + return Object.keys(deps).map(function (d) { + if (typeof deps[d] !== "object" + || seen.indexOf(deps[d]) !== -1) return null + seen.push(deps[d]) + if (deps[d].extraneous + && (args.length === 0 || args.indexOf(d) !== -1)) { + var extra = deps[d] + delete deps[d] + return extra.path + } + return prunables(args, deps[d], seen) + }).filter(function (d) { return d !== null }) + .reduce(function FLAT (l, r) { + return l.concat(Array.isArray(r) ? r.reduce(FLAT,[]) : r) + }, []) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/publish.js b/bin/nodejs0.12.16/node_modules/npm/lib/publish.js new file mode 100644 index 00000000..af56a748 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/publish.js @@ -0,0 +1,151 @@ + +module.exports = publish + +var npm = require("./npm.js") + , log = require("npmlog") + , path = require("path") + , readJson = require("read-package-json") + , lifecycle = require("./utils/lifecycle.js") + , chain = require("slide").chain + , mapToRegistry = require("./utils/map-to-registry.js") + , cachedPackageRoot = require("./cache/cached-package-root.js") + , createReadStream = require("graceful-fs").createReadStream + , npa = require("npm-package-arg") + , semver = require('semver') + , getPublishConfig = require("./utils/get-publish-config.js") + +publish.usage = "npm publish [--tag ]" + + "\nnpm publish [--tag ]" + + "\n\nPublishes '.' if no argument supplied" + + "\n\nSets tag `latest` if no --tag specified" + +publish.completion = function (opts, cb) { + // publish can complete to a folder with a package.json + // or a tarball, or a tarball url. + // for now, not yet implemented. + return cb() +} + +function publish (args, isRetry, cb) { + if (typeof cb !== "function") { + cb = isRetry + isRetry = false + } + if (args.length === 0) args = ["."] + if (args.length !== 1) return cb(publish.usage) + + log.verbose("publish", args) + + var t = npm.config.get('tag').trim() + if (semver.validRange(t)) { + var er = new Error("Tag name must not be a valid SemVer range: " + t) + return cb(er) + } + + var arg = args[0] + // if it's a local folder, then run the prepublish there, first. + readJson(path.resolve(arg, "package.json"), function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + + if (data) { + if (!data.name) return cb(new Error("No name provided")) + if (!data.version) return cb(new Error("No version provided")) + } + + // Error is OK. Could be publishing a URL or tarball, however, that means + // that we will not have automatically run the prepublish script, since + // that gets run when adding a folder to the cache. + if (er) return cacheAddPublish(arg, false, isRetry, cb) + else cacheAddPublish(arg, true, isRetry, cb) + }) +} + +// didPre in this case means that we already ran the prepublish script, +// and that the "dir" is an actual directory, and not something silly +// like a tarball or name@version thing. +// That means that we can run publish/postpublish in the dir, rather than +// in the cache dir. +function cacheAddPublish (dir, didPre, isRetry, cb) { + npm.commands.cache.add(dir, null, null, false, function (er, data) { + if (er) return cb(er) + log.silly("publish", data) + var cachedir = path.resolve(cachedPackageRoot(data), "package") + chain([ !didPre && + [lifecycle, data, "prepublish", cachedir] + , [publish_, dir, data, isRetry, cachedir] + , [lifecycle, data, "publish", didPre ? dir : cachedir] + , [lifecycle, data, "postpublish", didPre ? dir : cachedir] ] + , cb ) + }) +} + +function publish_ (arg, data, isRetry, cachedir, cb) { + if (!data) return cb(new Error("no package.json file found")) + + var mappedConfig = getPublishConfig( + data.publishConfig, + npm.config, + npm.registry + ) + var config = mappedConfig.config + var registry = mappedConfig.client + + data._npmVersion = npm.version + data._nodeVersion = process.versions.node + + delete data.modules + if (data.private) return cb( + new Error( + "This package has been marked as private\n" + + "Remove the 'private' field from the package.json to publish it." + ) + ) + + mapToRegistry(data.name, config, function (er, registryURI, auth, registryBase) { + if (er) return cb(er) + + var tarballPath = cachedir + ".tgz" + + // we just want the base registry URL in this case + log.verbose("publish", "registryBase", registryBase) + log.silly("publish", "uploading", tarballPath) + + data._npmUser = { + name : auth.username, + email : auth.email + } + + var params = { + metadata : data, + body : createReadStream(tarballPath), + auth : auth + } + + // registry-frontdoor cares about the access level, which is only + // configurable for scoped packages + if (config.get("access")) { + if (!npa(data.name).scope && config.get("access") === "restricted") { + return cb(new Error("Can't restrict access to unscoped packages.")) + } + + params.access = config.get("access") + } + + registry.publish(registryBase, params, function (er) { + if (er && er.code === "EPUBLISHCONFLICT" && + npm.config.get("force") && !isRetry) { + log.warn("publish", "Forced publish over " + data._id) + return npm.commands.unpublish([data._id], function (er) { + // ignore errors. Use the force. Reach out with your feelings. + // but if it fails again, then report the first error. + publish([arg], er || true, cb) + }) + } + // report the unpublish error if this was a retry and unpublish failed + if (er && isRetry && isRetry !== true) return cb(isRetry) + if (er) return cb(er) + console.log("+ " + data._id) + cb() + }) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/rebuild.js b/bin/nodejs0.12.16/node_modules/npm/lib/rebuild.js new file mode 100644 index 00000000..c6b45e55 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/rebuild.js @@ -0,0 +1,73 @@ + +module.exports = rebuild + +var readInstalled = require("read-installed") + , semver = require("semver") + , log = require("npmlog") + , npm = require("./npm.js") + , npa = require("npm-package-arg") + +rebuild.usage = "npm rebuild [[@] [name[@] ...]]" + +rebuild.completion = require("./utils/completion/installed-deep.js") + +function rebuild (args, cb) { + var opt = { depth: npm.config.get("depth"), dev: true } + readInstalled(npm.prefix, opt, function (er, data) { + log.info("readInstalled", typeof data) + if (er) return cb(er) + var set = filter(data, args) + , folders = Object.keys(set).filter(function (f) { + return f !== npm.prefix + }) + if (!folders.length) return cb() + log.silly("rebuild set", folders) + cleanBuild(folders, set, cb) + }) +} + +function cleanBuild (folders, set, cb) { + npm.commands.build(folders, function (er) { + if (er) return cb(er) + console.log(folders.map(function (f) { + return set[f] + " " + f + }).join("\n")) + cb() + }) +} + +function filter (data, args, set, seen) { + if (!set) set = {} + if (!seen) seen = {} + if (set.hasOwnProperty(data.path)) return set + if (seen.hasOwnProperty(data.path)) return set + seen[data.path] = true + var pass + if (!args.length) pass = true // rebuild everything + else if (data.name && data._id) { + for (var i = 0, l = args.length; i < l; i ++) { + var arg = args[i] + , nv = npa(arg) + , n = nv.name + , v = nv.rawSpec + if (n !== data.name) continue + if (!semver.satisfies(data.version, v, true)) continue + pass = true + break + } + } + if (pass && data._id) { + log.verbose("rebuild", "path, id", [data.path, data._id]) + set[data.path] = data._id + } + // need to also dive through kids, always. + // since this isn't an install these won't get auto-built unless + // they're not dependencies. + Object.keys(data.dependencies || {}).forEach(function (d) { + // return + var dep = data.dependencies[d] + if (typeof dep === "string") return + filter(dep, args, set, seen) + }) + return set +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/repo.js b/bin/nodejs0.12.16/node_modules/npm/lib/repo.js new file mode 100644 index 00000000..9aaa2e93 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/repo.js @@ -0,0 +1,78 @@ + +module.exports = repo + +repo.usage = "npm repo " + +var npm = require("./npm.js") + , opener = require("opener") + , github = require("github-url-from-git") + , githubUserRepo = require("github-url-from-username-repo") + , path = require("path") + , readJson = require("read-package-json") + , fs = require("fs") + , url_ = require("url") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + +repo.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function repo (args, cb) { + var n = args.length && npa(args[0]).name || "." + fs.stat(n, function (er, s) { + if (er && er.code === "ENOENT") return callRegistry(n, cb) + else if (er) return cb(er) + if (!s.isDirectory()) return callRegistry(n, cb) + readJson(path.resolve(n, "package.json"), function (er, d) { + if (er) return cb(er) + getUrlAndOpen(d, cb) + }) + }) +} + +function getUrlAndOpen (d, cb) { + var r = d.repository + if (!r) return cb(new Error("no repository")) + // XXX remove this when npm@v1.3.10 from node 0.10 is deprecated + // from https://github.com/npm/npm-www/issues/418 + if (githubUserRepo(r.url)) + r.url = githubUserRepo(r.url) + + var url = (r.url && ~r.url.indexOf("github")) + ? github(r.url) + : nonGithubUrl(r.url) + + if (!url) + return cb(new Error("no repository: could not get url")) + opener(url, { command: npm.config.get("browser") }, cb) +} + +function callRegistry (n, cb) { + mapToRegistry(n, npm.config, function (er, uri) { + if (er) return cb(er) + + npm.registry.get(uri + "/latest", { timeout : 3600 }, function (er, d) { + if (er) return cb(er) + getUrlAndOpen(d, cb) + }) + }) +} + +function nonGithubUrl (url) { + try { + var idx = url.indexOf("@") + if (idx !== -1) { + url = url.slice(idx+1).replace(/:([^\d]+)/, "/$1") + } + url = url_.parse(url) + var protocol = url.protocol === "https:" + ? "https:" + : "http:" + return protocol + "//" + (url.host || "") + + url.path.replace(/\.git$/, "") + } + catch(e) {} +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/restart.js b/bin/nodejs0.12.16/node_modules/npm/lib/restart.js new file mode 100644 index 00000000..ea06e687 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/restart.js @@ -0,0 +1 @@ +module.exports = require("./utils/lifecycle.js").cmd("restart") diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/root.js b/bin/nodejs0.12.16/node_modules/npm/lib/root.js new file mode 100644 index 00000000..a7a0645a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/root.js @@ -0,0 +1,11 @@ +module.exports = root + +var npm = require("./npm.js") + +root.usage = "npm root\nnpm root -g\n(just prints the root folder)" + +function root (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + if (!silent) console.log(npm.dir) + process.nextTick(cb.bind(this, null, npm.dir)) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/run-script.js b/bin/nodejs0.12.16/node_modules/npm/lib/run-script.js new file mode 100644 index 00000000..1c1d9be9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/run-script.js @@ -0,0 +1,172 @@ +module.exports = runScript + +var lifecycle = require("./utils/lifecycle.js") + , npm = require("./npm.js") + , path = require("path") + , readJson = require("read-package-json") + , log = require("npmlog") + , chain = require("slide").chain + +runScript.usage = "npm run-script [-- ]" + +runScript.completion = function (opts, cb) { + + // see if there's already a package specified. + var argv = opts.conf.argv.remain + + if (argv.length >= 4) return cb() + + if (argv.length === 3) { + // either specified a script locally, in which case, done, + // or a package, in which case, complete against its scripts + var json = path.join(npm.localPrefix, "package.json") + return readJson(json, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) d = {} + var scripts = Object.keys(d.scripts || {}) + console.error("local scripts", scripts) + if (scripts.indexOf(argv[2]) !== -1) return cb() + // ok, try to find out which package it was, then + var pref = npm.config.get("global") ? npm.config.get("prefix") + : npm.localPrefix + var pkgDir = path.resolve( pref, "node_modules" + , argv[2], "package.json" ) + readJson(pkgDir, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) d = {} + var scripts = Object.keys(d.scripts || {}) + return cb(null, scripts) + }) + }) + } + + readJson(path.join(npm.localPrefix, "package.json"), function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + d = d || {} + cb(null, Object.keys(d.scripts || {})) + }) +} + +function runScript (args, cb) { + if (!args.length) return list(cb) + + var pkgdir = npm.localPrefix + , cmd = args.shift() + + readJson(path.resolve(pkgdir, "package.json"), function (er, d) { + if (er) return cb(er) + run(d, pkgdir, cmd, args, cb) + }) +} + +function list(cb) { + var json = path.join(npm.localPrefix, "package.json") + var cmdList = [ "publish", "install", "uninstall" + , "test", "stop", "start", "restart", "version" + ].reduce(function (l, p) { + return l.concat(["pre" + p, p, "post" + p]) + }, []) + return readJson(json, function(er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) d = {} + var allScripts = Object.keys(d.scripts || {}) + var scripts = [] + var runScripts = [] + allScripts.forEach(function (script) { + if (cmdList.indexOf(script) !== -1) scripts.push(script) + else runScripts.push(script) + }) + + if (log.level === "silent") { + return cb(null, allScripts) + } + + if (npm.config.get("json")) { + console.log(JSON.stringify(d.scripts || {}, null, 2)) + return cb(null, allScripts) + } + + if (npm.config.get("parseable")) { + allScripts.forEach(function(script) { + console.log(script + ":" + d.scripts[script]) + }) + return cb(null, allScripts) + } + + var s = "\n " + var prefix = " " + if (scripts.length) { + console.log("Lifecycle scripts included in %s:", d.name) + } + scripts.forEach(function(script) { + console.log(prefix + script + s + d.scripts[script]) + }) + if (!scripts.length && runScripts.length) { + console.log("Scripts available in %s via `npm run-script`:", d.name) + } + else if (runScripts.length) { + console.log("\navailable via `npm run-script`:") + } + runScripts.forEach(function(script) { + console.log(prefix + script + s + d.scripts[script]) + }) + return cb(null, allScripts) + }) +} + +function run (pkg, wd, cmd, args, cb) { + if (!pkg.scripts) pkg.scripts = {} + + var cmds + if (cmd === "restart" && !pkg.scripts.restart) { + cmds = [ + "prestop", "stop", "poststop", + "restart", + "prestart", "start", "poststart" + ] + } else { + if (!pkg.scripts[cmd]) { + if (cmd === "test") { + pkg.scripts.test = "echo \"Error: no test specified\"" + } else if (cmd === "env") { + if (process.platform === "win32") { + log.verbose("run-script using default platform env: SET (Windows)") + pkg.scripts[cmd] = "SET" + } else { + log.verbose("run-script using default platform env: env (Unix)") + pkg.scripts[cmd] = "env" + } + } else if (npm.config.get("if-present")) { + return cb(null); + } else { + return cb(new Error("missing script: " + cmd)) + } + } + cmds = [cmd] + } + + if (!cmd.match(/^(pre|post)/)) { + cmds = ["pre"+cmd].concat(cmds).concat("post"+cmd) + } + + log.verbose("run-script", cmds) + chain(cmds.map(function (c) { + // pass cli arguments after -- to script. + if (pkg.scripts[c] && c === cmd) { + pkg.scripts[c] = pkg.scripts[c] + joinArgs(args) + } + + // when running scripts explicitly, assume that they're trusted. + return [lifecycle, pkg, c, wd, true] + }), cb) +} + +// join arguments after '--' and pass them to script, +// handle special characters such as ', ", ' '. +function joinArgs (args) { + var joinedArgs = "" + args.forEach(function(arg) { + joinedArgs += ' "' + arg.replace(/"/g, '\\"') + '"' + }) + return joinedArgs +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/search.js b/bin/nodejs0.12.16/node_modules/npm/lib/search.js new file mode 100644 index 00000000..e60091cd --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/search.js @@ -0,0 +1,269 @@ + +module.exports = exports = search + +var npm = require("./npm.js") + , columnify = require("columnify") + , updateIndex = require("./cache/update-index.js") + +search.usage = "npm search [some search terms ...]" + +search.completion = function (opts, cb) { + var compl = {} + , partial = opts.partialWord + , ipartial = partial.toLowerCase() + , plen = partial.length + + // get the batch of data that matches so far. + // this is an example of using npm.commands.search programmatically + // to fetch data that has been filtered by a set of arguments. + search(opts.conf.argv.remain.slice(2), true, function (er, data) { + if (er) return cb(er) + Object.keys(data).forEach(function (name) { + data[name].words.split(" ").forEach(function (w) { + if (w.toLowerCase().indexOf(ipartial) === 0) { + compl[partial + w.substr(plen)] = true + } + }) + }) + cb(null, Object.keys(compl)) + }) +} + +function search (args, silent, staleness, cb) { + if (typeof cb !== "function") cb = staleness, staleness = 600 + if (typeof cb !== "function") cb = silent, silent = false + + var searchopts = npm.config.get("searchopts") + var searchexclude = npm.config.get("searchexclude") + + if (typeof searchopts !== "string") searchopts = "" + searchopts = searchopts.split(/\s+/) + var opts = searchopts.concat(args).map(function (s) { + return s.toLowerCase() + }).filter(function (s) { return s }) + + if (typeof searchexclude === "string") { + searchexclude = searchexclude.split(/\s+/) + } else { + searchexclude = [] + } + searchexclude = searchexclude.map(function (s) { + return s.toLowerCase() + }) + + getFilteredData(staleness, opts, searchexclude, function (er, data) { + // now data is the list of data that we want to show. + // prettify and print it, and then provide the raw + // data to the cb. + if (er || silent) return cb(er, data) + console.log(prettify(data, args)) + cb(null, data) + }) +} + +function getFilteredData (staleness, args, notArgs, cb) { + updateIndex(staleness, function (er, data) { + if (er) return cb(er) + return cb(null, filter(data, args, notArgs)) + }) +} + +function filter (data, args, notArgs) { + // data={:{package data}} + return Object.keys(data).map(function (d) { + return data[d] + }).filter(function (d) { + return typeof d === "object" + }).map(stripData).map(getWords).filter(function (data) { + return filterWords(data, args, notArgs) + }).reduce(function (l, r) { + l[r.name] = r + return l + }, {}) +} + +function stripData (data) { + return { name: data.name + , description: npm.config.get("description") ? data.description : "" + , maintainers: (data.maintainers || []).map(function (m) { + return "=" + m.name + }) + , url: !Object.keys(data.versions || {}).length ? data.url : null + , keywords: data.keywords || [] + , version: Object.keys(data.versions || {})[0] || [] + , time: data.time + && data.time.modified + && (new Date(data.time.modified).toISOString() + .split("T").join(" ") + .replace(/:[0-9]{2}\.[0-9]{3}Z$/, "")) + .slice(0, -5) // remove time + || "prehistoric" + } +} + +function getWords (data) { + data.words = [ data.name ] + .concat(data.description) + .concat(data.maintainers) + .concat(data.url && ("<" + data.url + ">")) + .concat(data.keywords) + .map(function (f) { return f && f.trim && f.trim() }) + .filter(function (f) { return f }) + .join(" ") + .toLowerCase() + return data +} + +function filterWords (data, args, notArgs) { + var words = data.words + for (var i = 0, l = args.length; i < l; i ++) { + if (!match(words, args[i])) return false + } + for (i = 0, l = notArgs.length; i < l; i ++) { + if (match(words, notArgs[i])) return false + } + return true +} + +function match (words, arg) { + if (arg.charAt(0) === "/") { + arg = arg.replace(/\/$/, "") + arg = new RegExp(arg.substr(1, arg.length - 1)) + return words.match(arg) + } + return words.indexOf(arg) !== -1 +} + +function prettify (data, args) { + var searchsort = (npm.config.get("searchsort") || "NAME").toLowerCase() + , sortField = searchsort.replace(/^\-+/, "") + , searchRev = searchsort.charAt(0) === "-" + , truncate = !npm.config.get("long") + + if (Object.keys(data).length === 0) { + return "No match found for "+(args.map(JSON.stringify).join(" ")) + } + + var lines = Object.keys(data).map(function (d) { + // strip keyname + return data[d] + }).map(function(dat) { + dat.author = dat.maintainers + delete dat.maintainers + dat.date = dat.time + delete dat.time + return dat + }).map(function(dat) { + // split keywords on whitespace or , + if (typeof dat.keywords === "string") { + dat.keywords = dat.keywords.split(/[,\s]+/) + } + if (Array.isArray(dat.keywords)) { + dat.keywords = dat.keywords.join(" ") + } + + // split author on whitespace or , + if (typeof dat.author === "string") { + dat.author = dat.author.split(/[,\s]+/) + } + if (Array.isArray(dat.author)) { + dat.author = dat.author.join(" ") + } + return dat + }) + + lines.sort(function(a, b) { + var aa = a[sortField].toLowerCase() + , bb = b[sortField].toLowerCase() + return aa === bb ? 0 + : aa < bb ? -1 : 1 + }) + + if (searchRev) lines.reverse() + + var columns = npm.config.get("description") + ? ["name", "description", "author", "date", "version", "keywords"] + : ["name", "author", "date", "version", "keywords"] + + var output = columnify(lines, { + include: columns + , truncate: truncate + , config: { + name: { maxWidth: 40, truncate: false, truncateMarker: "" } + , description: { maxWidth: 60 } + , author: { maxWidth: 20 } + , date: { maxWidth: 11 } + , version: { maxWidth: 11 } + , keywords: { maxWidth: Infinity } + } + }) + output = trimToMaxWidth(output) + output = highlightSearchTerms(output, args) + + return output +} + +var colors = [31, 33, 32, 36, 34, 35 ] + , cl = colors.length + +function addColorMarker (str, arg, i) { + var m = i % cl + 1 + , markStart = String.fromCharCode(m) + , markEnd = String.fromCharCode(0) + + if (arg.charAt(0) === "/") { + //arg = arg.replace(/\/$/, "") + return str.replace( new RegExp(arg.substr(1, arg.length - 2), "gi") + , function (bit) { return markStart + bit + markEnd } ) + + } + + // just a normal string, do the split/map thing + var pieces = str.toLowerCase().split(arg.toLowerCase()) + , p = 0 + + return pieces.map(function (piece) { + piece = str.substr(p, piece.length) + var mark = markStart + + str.substr(p+piece.length, arg.length) + + markEnd + p += piece.length + arg.length + return piece + mark + }).join("") +} + +function colorize (line) { + for (var i = 0; i < cl; i ++) { + var m = i + 1 + var color = npm.color ? "\033["+colors[i]+"m" : "" + line = line.split(String.fromCharCode(m)).join(color) + } + var uncolor = npm.color ? "\033[0m" : "" + return line.split("\u0000").join(uncolor) +} + +function getMaxWidth() { + var cols + try { + var tty = require("tty") + , stdout = process.stdout + cols = !tty.isatty(stdout.fd) ? Infinity : process.stdout.getWindowSize()[0] + cols = (cols === 0) ? Infinity : cols + } catch (ex) { cols = Infinity } + return cols +} + +function trimToMaxWidth(str) { + var maxWidth = getMaxWidth() + return str.split("\n").map(function(line) { + return line.slice(0, maxWidth) + }).join("\n") +} + +function highlightSearchTerms(str, terms) { + terms.forEach(function (arg, i) { + str = addColorMarker(str, arg, i) + }) + + return colorize(str).trim() +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/set.js b/bin/nodejs0.12.16/node_modules/npm/lib/set.js new file mode 100644 index 00000000..8bd8a857 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/set.js @@ -0,0 +1,13 @@ + +module.exports = set + +set.usage = "npm set (See `npm config`)" + +var npm = require("./npm.js") + +set.completion = npm.commands.config.completion + +function set (args, cb) { + if (!args.length) return cb(set.usage) + npm.commands.config(["set"].concat(args), cb) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/shrinkwrap.js b/bin/nodejs0.12.16/node_modules/npm/lib/shrinkwrap.js new file mode 100644 index 00000000..210e3ee0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/shrinkwrap.js @@ -0,0 +1,86 @@ +// emit JSON describing versions of all packages currently installed (for later +// use with shrinkwrap install) + +module.exports = exports = shrinkwrap + +var npm = require("./npm.js") + , log = require("npmlog") + , fs = require("fs") + , writeFileAtomic = require("write-file-atomic") + , path = require("path") + , readJson = require("read-package-json") + , sortedObject = require("sorted-object") + +shrinkwrap.usage = "npm shrinkwrap" + +function shrinkwrap (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + if (args.length) { + log.warn("shrinkwrap", "doesn't take positional args") + } + + // https://github.com/npm/npm/issues/7641 + // introduced because `npm ls` can now show dev and prod depenednecy + // trees separately + if (npm.config.get("dev")) { + npm.config.set("production", true) + } + npm.commands.ls([], true, function (er, _, pkginfo) { + if (er) return cb(er) + shrinkwrap_(pkginfo, silent, npm.config.get("dev"), cb) + }) +} + +function shrinkwrap_ (pkginfo, silent, dev, cb) { + if (pkginfo.problems) { + return cb(new Error("Problems were encountered\n" + +"Please correct and try again.\n" + +pkginfo.problems.join("\n"))) + } + + if (!dev) { + // remove dev deps unless the user does --dev + readJson(path.resolve(npm.prefix, "package.json"), function (er, data) { + if (er) + return cb(er) + if (data.devDependencies) { + Object.keys(data.devDependencies).forEach(function (dep) { + if (data.dependencies && data.dependencies[dep]) { + // do not exclude the dev dependency if it's also listed as a dependency + return + } + + log.warn("shrinkwrap", "Excluding devDependency: %s", dep, data.dependencies) + delete pkginfo.dependencies[dep] + }) + } + save(pkginfo, silent, cb) + }) + } else { + save(pkginfo, silent, cb) + } +} + + +function save (pkginfo, silent, cb) { + // copy the keys over in a well defined order + // because javascript objects serialize arbitrarily + pkginfo.dependencies = sortedObject(pkginfo.dependencies || {}) + var swdata + try { + swdata = JSON.stringify(pkginfo, null, 2) + "\n" + } catch (er) { + log.error("shrinkwrap", "Error converting package info to json") + return cb(er) + } + + var file = path.resolve(npm.prefix, "npm-shrinkwrap.json") + + writeFileAtomic(file, swdata, function (er) { + if (er) return cb(er) + if (silent) return cb(null, pkginfo) + console.log("wrote npm-shrinkwrap.json") + cb(null, pkginfo) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/star.js b/bin/nodejs0.12.16/node_modules/npm/lib/star.js new file mode 100644 index 00000000..03620e6b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/star.js @@ -0,0 +1,41 @@ + +module.exports = star + +var npm = require("./npm.js") + , log = require("npmlog") + , asyncMap = require("slide").asyncMap + , mapToRegistry = require("./utils/map-to-registry.js") + +star.usage = "npm star [pkg, pkg, ...]\n" + + "npm unstar [pkg, pkg, ...]" + +star.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function star (args, cb) { + if (!args.length) return cb(star.usage) + var s = npm.config.get("unicode") ? "\u2605 " : "(*)" + , u = npm.config.get("unicode") ? "\u2606 " : "( )" + , using = !(npm.command.match(/^un/)) + if (!using) s = u + asyncMap(args, function (pkg, cb) { + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + starred : using, + auth : auth + } + npm.registry.star(uri, params, function (er, data, raw, req) { + if (!er) { + console.log(s + " "+pkg) + log.verbose("star", data) + } + cb(er, data, raw, req) + }) + }) + }, cb) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/stars.js b/bin/nodejs0.12.16/node_modules/npm/lib/stars.js new file mode 100644 index 00000000..9307d6ce --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/stars.js @@ -0,0 +1,46 @@ +module.exports = stars + +stars.usage = "npm stars [username]" + +var npm = require("./npm.js") + , log = require("npmlog") + , mapToRegistry = require("./utils/map-to-registry.js") + +function stars (args, cb) { + npm.commands.whoami([], true, function (er, username) { + var name = args.length === 1 ? args[0] : username + + if (er) { + if (er.code === 'ENEEDAUTH' && !name) { + var needAuth = new Error("'npm stars' on your own user account requires auth") + needAuth.code = 'ENEEDAUTH' + return cb(needAuth) + } + + if (er.code !== 'ENEEDAUTH') return cb(er) + } + + mapToRegistry("", npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + username : name, + auth : auth + } + npm.registry.stars(uri, params, showstars) + }) + }) + + function showstars (er, data) { + if (er) return cb(er) + + if (data.rows.length === 0) { + log.warn("stars", "user has not starred any packages.") + } else { + data.rows.forEach(function(a) { + console.log(a.value) + }) + } + cb() + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/start.js b/bin/nodejs0.12.16/node_modules/npm/lib/start.js new file mode 100644 index 00000000..c2093f7a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/start.js @@ -0,0 +1 @@ +module.exports = require("./utils/lifecycle.js").cmd("start") diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/stop.js b/bin/nodejs0.12.16/node_modules/npm/lib/stop.js new file mode 100644 index 00000000..f3af33e7 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/stop.js @@ -0,0 +1 @@ +module.exports = require("./utils/lifecycle.js").cmd("stop") diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/substack.js b/bin/nodejs0.12.16/node_modules/npm/lib/substack.js new file mode 100644 index 00000000..e8fd3d24 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/substack.js @@ -0,0 +1,20 @@ +module.exports = substack +var npm = require("./npm.js") + +var isms = + [ "\033[32mbeep \033[35mboop\033[m" + , "Replace your configs with services" + , "SEPARATE ALL THE CONCERNS!" + , "MODULE ALL THE THINGS!" + , "\\o/" + , "but first, burritos" + , "full time mad scientist here" + , "c/,,\\" ] + +function substack (args, cb) { + var i = Math.floor(Math.random() * isms.length) + console.log(isms[i]) + var c = args.shift() + if (c) npm.commands[c](args, cb) + else cb() +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/tag.js b/bin/nodejs0.12.16/node_modules/npm/lib/tag.js new file mode 100644 index 00000000..6a958179 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/tag.js @@ -0,0 +1,41 @@ +// turns out tagging isn't very complicated +// all the smarts are in the couch. +module.exports = tag +tag.usage = "npm tag @ []" + +tag.completion = require("./unpublish.js").completion + +var npm = require("./npm.js") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , semver = require("semver") + , log = require("npmlog") + +function tag (args, cb) { + var thing = npa(args.shift() || "") + , project = thing.name + , version = thing.rawSpec + , t = args.shift() || npm.config.get("tag") + + t = t.trim() + + if (!project || !version || !t) return cb("Usage:\n"+tag.usage) + + if (semver.validRange(t)) { + var er = new Error("Tag name must not be a valid SemVer range: " + t) + return cb(er) + } + + log.warn("tag", "This command is deprecated. Use `npm dist-tag` instead.") + + mapToRegistry(project, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version : version, + tag : t, + auth : auth + } + npm.registry.tag(uri, params, cb) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/team.js b/bin/nodejs0.12.16/node_modules/npm/lib/team.js new file mode 100644 index 00000000..221e01bf --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/team.js @@ -0,0 +1,54 @@ +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm') + +module.exports = team + +team.subcommands = ['create', 'destroy', 'add', 'rm', 'ls', 'edit'] + +team.usage = + 'npm team create \n' + + 'npm team destroy \n' + + 'npm team add \n' + + 'npm team rm \n' + + 'npm team ls |\n' + + 'npm team edit ' + +team.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, team.subcommands) + } + switch (argv[2]) { + case 'ls': + case 'create': + case 'destroy': + case 'add': + case 'rm': + case 'edit': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function team (args, cb) { + // Entities are in the format : + var cmd = args.shift() + var entity = (args.shift() || '').split(':') + return mapToRegistry('/', npm.config, function (err, uri, auth) { + if (err) { return cb(err) } + try { + return npm.registry.team(cmd, uri, { + auth: auth, + scope: entity[0], + team: entity[1], + user: args.shift() + }, function (err, data) { + !err && data && console.log(JSON.stringify(data, undefined, 2)) + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + team.usage) + } + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/test.js b/bin/nodejs0.12.16/node_modules/npm/lib/test.js new file mode 100644 index 00000000..bb86d113 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/test.js @@ -0,0 +1,13 @@ +module.exports = test + +var testCmd = require("./utils/lifecycle.js").cmd("test") + +function test (args, cb) { + testCmd(args, function (er) { + if (!er) return cb() + if (er.code === "ELIFECYCLE") { + return cb("Test failed. See above for more details.") + } + return cb(er) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/unbuild.js b/bin/nodejs0.12.16/node_modules/npm/lib/unbuild.js new file mode 100644 index 00000000..69b53e06 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/unbuild.js @@ -0,0 +1,115 @@ +module.exports = unbuild +unbuild.usage = "npm unbuild \n(this is plumbing)" + +var readJson = require("read-package-json") + , gentlyRm = require("./utils/gently-rm.js") + , npm = require("./npm.js") + , path = require("path") + , isInside = require("path-is-inside") + , lifecycle = require("./utils/lifecycle.js") + , asyncMap = require("slide").asyncMap + , chain = require("slide").chain + , log = require("npmlog") + , build = require("./build.js") + +// args is a list of folders. +// remove any bins/etc, and then delete the folder. +function unbuild (args, silent, cb) { + if (typeof silent === "function") cb = silent, silent = false + asyncMap(args, unbuild_(silent), cb) +} + +function unbuild_ (silent) { return function (folder, cb_) { + function cb (er) { + cb_(er, path.relative(npm.root, folder)) + } + folder = path.resolve(folder) + var 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) { + // if no json, then just trash it, but no scripts or whatever. + if (er) return gentlyRm(folder, false, base, cb) + chain + ( [ [lifecycle, pkg, "preuninstall", folder, false, true] + , [lifecycle, pkg, "uninstall", folder, false, true] + , !silent && function(cb) { + console.log("unbuild " + pkg._id) + cb() + } + , [rmStuff, pkg, folder] + , [lifecycle, pkg, "postuninstall", folder, false, true] + , [gentlyRm, folder, false, base] ] + , cb ) + }) +}} + +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 parent = path.dirname(folder) + , gnm = npm.dir + , top = gnm === parent + + log.verbose("unbuild rmStuff", pkg._id, "from", gnm) + if (!top) log.verbose("unbuild rmStuff", "in", parent) + asyncMap([rmBins, rmMans], function (fn, cb) { + fn(pkg, folder, parent, top, cb) + }, cb) +} + +function rmBins (pkg, folder, parent, top, cb) { + if (!pkg.bin) return cb() + var 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] + , [gentlyRm, path.resolve(binRoot, b), true] ], cb) + } else { + gentlyRm(path.resolve(binRoot, b), true, cb) + } + }, cb) +} + +function rmMans (pkg, folder, parent, top, cb) { + if (!pkg.man + || !top + || process.platform === "win32" + || !npm.config.get("global")) { + return cb() + } + var 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)) { + man.forEach(rmMan) + } else { + rmMan(man) + } + + function rmMan (man) { + log.silly("rmMan", "preparing to remove", man) + var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) + if (!parseMan) { + log.error( + "rmMan", man, "is not a valid name for a man file.", + "Man files must end with a number, " + + "and optionally a .gz suffix if they are compressed." + ) + return cb() + } + + var stem = parseMan[1] + var sxn = parseMan[2] + var gz = parseMan[3] || "" + var bn = path.basename(stem) + var manDest = path.join( + manRoot, + "man"+sxn, + (bn.indexOf(pkg.name) === 0 ? bn : pkg.name+"-"+bn)+"."+sxn+gz + ) + gentlyRm(manDest, true, cb) + } + }, cb) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/uninstall.js b/bin/nodejs0.12.16/node_modules/npm/lib/uninstall.js new file mode 100644 index 00000000..2386cdf4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/uninstall.js @@ -0,0 +1,128 @@ + +// remove a package. + +module.exports = uninstall + +uninstall.usage = "npm uninstall [@ [[@] ...]" + + "\nnpm rm [@ [[@] ...]" + +uninstall.completion = require("./utils/completion/installed-shallow.js") + +var fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , log = require("npmlog") + , readJson = require("read-package-json") + , path = require("path") + , npm = require("./npm.js") + , asyncMap = require("slide").asyncMap + +function uninstall (args, cb) { + // this is super easy + // get the list of args that correspond to package names in either + // the global npm.dir, + // then call unbuild on all those folders to pull out their bins + // and mans and whatnot, and then delete the folder. + + var nm = npm.dir + if (args.length === 1 && args[0] === ".") args = [] + if (args.length) return uninstall_(args, nm, cb) + + // remove this package from the global space, if it's installed there + readJson(path.resolve(npm.localPrefix, "package.json"), function (er, pkg) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb(uninstall.usage) + uninstall_( [pkg.name] + , npm.globalDir + , cb ) + }) + +} + +function uninstall_ (args, nm, cb) { + // if we've been asked to --save or --save-dev or --save-optional, + // then also remove it from the associated dependencies hash. + var s = npm.config.get('save') + , d = npm.config.get('save-dev') + , o = npm.config.get('save-optional') + if (s || d || o) { + cb = saver(args, nm, cb) + } + + asyncMap(args, function (arg, cb) { + // uninstall .. should not delete /usr/local/lib/node_modules/.. + var p = path.join(path.resolve(nm), path.join("/", arg)) + if (path.resolve(p) === nm) { + log.warn("uninstall", "invalid argument: %j", arg) + return cb(null, []) + } + fs.lstat(p, function (er) { + if (er) { + log.warn("uninstall", "not installed in %s: %j", nm, arg) + return cb(null, []) + } + cb(null, p) + }) + }, function (er, folders) { + if (er) return cb(er) + asyncMap(folders, npm.commands.unbuild, cb) + }) +} + +function saver (args, nm, cb_) { + return cb + function cb (er, data) { + var s = npm.config.get('save') + , d = npm.config.get('save-dev') + , o = npm.config.get('save-optional') + if (er || !(s || d || o)) return cb_(er, data) + var pj = path.resolve(nm, '..', 'package.json') + // don't use readJson here, because we don't want all the defaults + // filled in, for mans and other bs. + fs.readFile(pj, 'utf8', function (er, json) { + var pkg + try { + pkg = JSON.parse(json) + } catch (_) {} + if (!pkg) return cb_(null, data) + + var bundle + if (npm.config.get('save-bundle')) { + bundle = pkg.bundleDependencies || pkg.bundledDependencies + if (!Array.isArray(bundle)) bundle = undefined + } + + var changed = false + args.forEach(function (a) { + ; [ [s, 'dependencies'] + , [o, 'optionalDependencies'] + , [d, 'devDependencies'] ].forEach(function (f) { + var flag = f[0] + , field = f[1] + if (!flag || !pkg[field] || !pkg[field].hasOwnProperty(a)) return + changed = true + + if (bundle) { + var i = bundle.indexOf(a) + if (i !== -1) bundle.splice(i, 1) + } + + delete pkg[field][a] + }) + }) + if (!changed) return cb_(null, data) + + if (bundle) { + delete pkg.bundledDependencies + if (bundle.length) { + pkg.bundleDependencies = bundle + } else { + delete pkg.bundleDependencies + } + } + + writeFileAtomic(pj, JSON.stringify(pkg, null, 2) + "\n", function (er) { + return cb_(er, data) + }) + }) + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/unpublish.js b/bin/nodejs0.12.16/node_modules/npm/lib/unpublish.js new file mode 100644 index 00000000..b1230c78 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/unpublish.js @@ -0,0 +1,115 @@ + +module.exports = unpublish + +var log = require("npmlog") +var npm = require("./npm.js") +var readJson = require("read-package-json") +var path = require("path") +var mapToRegistry = require("./utils/map-to-registry.js") +var npa = require("npm-package-arg") +var getPublishConfig = require("./utils/get-publish-config.js") + +unpublish.usage = "npm unpublish [@]" + +unpublish.completion = function (opts, cb) { + if (opts.conf.argv.remain.length >= 3) return cb() + npm.commands.whoami([], true, function (er, username) { + if (er) return cb() + + var un = encodeURIComponent(username) + if (!un) return cb() + var byUser = "-/by-user/" + un + mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, pkgs) { + // do a bit of filtering at this point, so that we don't need + // to fetch versions for more than one thing, but also don't + // accidentally a whole project. + pkgs = pkgs[un] + if (!pkgs || !pkgs.length) return cb() + var pp = npa(opts.partialWord).name + pkgs = pkgs.filter(function (p) { + return p.indexOf(pp) === 0 + }) + if (pkgs.length > 1) return cb(null, pkgs) + mapToRegistry(pkgs[0], npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, d) { + if (er) return cb(er) + var vers = Object.keys(d.versions) + if (!vers.length) return cb(null, pkgs) + return cb(null, vers.map(function (v) { + return pkgs[0] + "@" + v + })) + }) + }) + }) + }) + }) +} + +function unpublish (args, cb) { + if (args.length > 1) return cb(unpublish.usage) + + var thing = args.length ? npa(args[0]) : {} + , project = thing.name + , version = thing.rawSpec + + log.silly("unpublish", "args[0]", args[0]) + log.silly("unpublish", "thing", thing) + if (!version && !npm.config.get("force")) { + return cb("Refusing to delete entire project.\n" + + "Run with --force to do this.\n" + + unpublish.usage) + } + + if (!project || path.resolve(project) === npm.localPrefix) { + // if there's a package.json in the current folder, then + // read the package name and version out of that. + var cwdJson = path.join(npm.localPrefix, "package.json") + return readJson(cwdJson, function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb("Usage:\n" + unpublish.usage) + log.verbose('unpublish', data) + gotProject(data.name, data.version, data.publishConfig, cb) + }) + } + return gotProject(project, version, cb) +} + +function gotProject (project, version, publishConfig, cb_) { + if (typeof cb_ !== 'function') { + cb_ = publishConfig + publishConfig = null + } + + function cb (er) { + if (er) return cb_(er) + console.log("- " + project + (version ? "@" + version : "")) + cb_() + } + + var mappedConfig = getPublishConfig(publishConfig, npm.config, npm.registry) + var config = mappedConfig.config + var registry = mappedConfig.client + + // remove from the cache first + npm.commands.cache(["clean", project, version], function (er) { + if (er) { + log.error("unpublish", "Failed to clean cache") + return cb(er) + } + + mapToRegistry(project, config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version: version, + auth: auth + } + registry.unpublish(uri, params, cb) + }) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/update.js b/bin/nodejs0.12.16/node_modules/npm/lib/update.js new file mode 100644 index 00000000..389f3dad --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/update.js @@ -0,0 +1,58 @@ +/* +for each pkg in prefix that isn't a git repo + look for a new version of pkg that satisfies dep + if so, install it. + if not, then update it +*/ + +module.exports = update + +update.usage = "npm update [pkg]" + +var npm = require("./npm.js") + , asyncMap = require("slide").asyncMap + , log = require("npmlog") + + // load these, just so that we know that they'll be available, in case + // npm itself is getting overwritten. + , install = require("./install.js") + , build = require("./build.js") + +update.completion = npm.commands.outdated.completion + +function update (args, cb) { + npm.commands.outdated(args, true, function (er, outdated) { + if (er) return cb(er) + + var wanted = outdated.filter(function (ww) { + var dep = ww[1] + var current = ww[2] + var wanted = ww[3] + var latest = ww[4] + if (current === wanted && wanted !== latest) { + log.verbose( + 'outdated', + 'not updating', dep, + "because it's currently at the maximum version that matches its specified semver range" + ) + } + return current !== wanted + }) + if (wanted.length === 0) return cb() + + log.info('outdated', 'updating', wanted) + asyncMap(wanted, function (ww, cb) { + // [[ dir, dep, has, want, req ]] + var where = ww[0] + , dep = ww[1] + , want = ww[3] + , what = dep + "@" + want + , req = ww[5] + , url = require('url') + + // use the initial installation method (repo, tar, git) for updating + if (url.parse(req).protocol) what = req + npm.commands.install(where, what, cb) + }, cb) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/completion.sh b/bin/nodejs0.12.16/node_modules/npm/lib/utils/completion.sh new file mode 100644 index 00000000..3d524cb4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/completion.sh @@ -0,0 +1,58 @@ +#!/bin/bash +###-begin-npm-completion-### +# +# npm command completion script +# +# Installation: npm completion >> ~/.bashrc (or ~/.zshrc) +# Or, maybe: npm completion > /usr/local/etc/bash_completion.d/npm +# + +if type complete &>/dev/null; then + _npm_completion () { + local words cword + if type _get_comp_words_by_ref &>/dev/null; then + _get_comp_words_by_ref -n = -n @ -w words -i cword + else + cword="$COMP_CWORD" + words=("${COMP_WORDS[@]}") + fi + + local si="$IFS" + IFS=$'\n' COMPREPLY=($(COMP_CWORD="$cword" \ + COMP_LINE="$COMP_LINE" \ + COMP_POINT="$COMP_POINT" \ + npm completion -- "${words[@]}" \ + 2>/dev/null)) || return $? + IFS="$si" + } + complete -o default -F _npm_completion npm +elif type compdef &>/dev/null; then + _npm_completion() { + local si=$IFS + compadd -- $(COMP_CWORD=$((CURRENT-1)) \ + COMP_LINE=$BUFFER \ + COMP_POINT=0 \ + npm completion -- "${words[@]}" \ + 2>/dev/null) + IFS=$si + } + compdef _npm_completion npm +elif type compctl &>/dev/null; then + _npm_completion () { + local cword line point words si + read -Ac words + read -cn cword + let cword-=1 + read -l line + read -ln point + si="$IFS" + IFS=$'\n' reply=($(COMP_CWORD="$cword" \ + COMP_LINE="$line" \ + COMP_POINT="$point" \ + npm completion -- "${words[@]}" \ + 2>/dev/null)) || return $? + IFS="$si" + } + compctl -K _npm_completion npm +fi +###-end-npm-completion-### diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/correct-mkdir.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/correct-mkdir.js new file mode 100644 index 00000000..4425b23f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/correct-mkdir.js @@ -0,0 +1,117 @@ +var chownr = require('chownr') +var dezalgo = require('dezalgo') +var fs = require('graceful-fs') +var inflight = require('inflight') +var log = require('npmlog') +var mkdirp = require('mkdirp') + +// memoize the directories created by this step +var stats = {} +var effectiveOwner +module.exports = function correctMkdir (path, cb) { + cb = dezalgo(cb) + cb = inflight('correctMkdir:' + path, cb) + if (!cb) { + return log.verbose('correctMkdir', path, 'correctMkdir already in flight; waiting') + } else { + log.verbose('correctMkdir', path, 'correctMkdir not in flight; initializing') + } + + if (stats[path]) return cb(null, stats[path]) + + fs.stat(path, function (er, st) { + if (er) return makeDirectory(path, cb) + + if (!st.isDirectory()) { + log.error('correctMkdir', 'invalid dir %s', path) + return cb(er) + } + + var ownerStats = calculateOwner() + // there's always a chance the permissions could have been frobbed, so fix + if (st.uid !== ownerStats.uid) { + stats[path] = ownerStats + setPermissions(path, ownerStats, cb) + } else { + stats[path] = st + cb(null, stats[path]) + } + }) +} + +function calculateOwner () { + if (!effectiveOwner) { + effectiveOwner = { uid: 0, gid: 0 } + + if (process.getuid) effectiveOwner.uid = +process.getuid() + if (process.getgid) effectiveOwner.gid = +process.getgid() + + if (effectiveOwner.uid === 0) { + if (process.env.SUDO_UID) effectiveOwner.uid = +process.env.SUDO_UID + if (process.env.SUDO_GID) effectiveOwner.gid = +process.env.SUDO_GID + } + } + + return effectiveOwner +} + +function makeDirectory (path, cb) { + cb = inflight('makeDirectory:' + path, cb) + if (!cb) { + return log.verbose('makeDirectory', path, 'creation already in flight; waiting') + } else { + log.verbose('makeDirectory', path, 'creation not in flight; initializing') + } + + var owner = calculateOwner() + + if (!process.getuid) { + return mkdirp(path, function (er) { + log.verbose('makeCacheDir', 'UID & GID are irrelevant on', process.platform) + + stats[path] = owner + return cb(er, stats[path]) + }) + } + + if (owner.uid !== 0 || !process.env.HOME) { + log.silly( + 'makeDirectory', path, + 'uid:', owner.uid, + 'gid:', owner.gid + ) + stats[path] = owner + mkdirp(path, afterMkdir) + } else { + fs.stat(process.env.HOME, function (er, st) { + if (er) { + log.error('makeDirectory', 'homeless?') + return cb(er) + } + + log.silly( + 'makeDirectory', path, + 'uid:', st.uid, + 'gid:', st.gid + ) + stats[path] = st + mkdirp(path, afterMkdir) + }) + } + + function afterMkdir (er, made) { + if (er || !stats[path] || isNaN(stats[path].uid) || isNaN(stats[path].gid)) { + return cb(er, stats[path]) + } + + if (!made) return cb(er, stats[path]) + + setPermissions(made, stats[path], cb) + } +} + +function setPermissions (path, st, cb) { + chownr(path, st.uid, st.gid, function (er) { + return cb(er, st) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/depr-check.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/depr-check.js new file mode 100644 index 00000000..7a4b54e4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/depr-check.js @@ -0,0 +1,13 @@ +var log = require("npmlog") + +var deprecated = {} + , deprWarned = {} +module.exports = function deprCheck (data) { + if (deprecated[data._id]) data.deprecated = deprecated[data._id] + if (data.deprecated) deprecated[data._id] = data.deprecated + else return + if (!deprWarned[data._id]) { + deprWarned[data._id] = true + log.warn("deprecated", "%s: %s", data._id, data.deprecated) + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/error-handler.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/error-handler.js new file mode 100644 index 00000000..a17da36f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/error-handler.js @@ -0,0 +1,414 @@ + +module.exports = errorHandler + +var cbCalled = false + , log = require("npmlog") + , npm = require("../npm.js") + , rm = require("rimraf") + , itWorked = false + , path = require("path") + , wroteLogFile = false + , exitCode = 0 + , rollbacks = npm.rollbacks + , chain = require("slide").chain + , writeStreamAtomic = require("fs-write-stream-atomic") + , nameValidator = require("validate-npm-package-name") + + +process.on("exit", function (code) { + // console.error("exit", code) + if (!npm.config || !npm.config.loaded) return + if (code) itWorked = false + if (itWorked) log.info("ok") + else { + if (!cbCalled) { + log.error("", "cb() never called!") + } + + if (wroteLogFile) { + // just a line break + if (log.levels[log.level] <= log.levels.error) console.error("") + + log.error("", + ["Please include the following file with any support request:" + ," " + path.resolve("npm-debug.log") + ].join("\n")) + wroteLogFile = false + } + if (code) { + log.error("code", code) + } + } + + var doExit = npm.config.get("_exit") + if (doExit) { + // actually exit. + if (exitCode === 0 && !itWorked) { + exitCode = 1 + } + if (exitCode !== 0) process.exit(exitCode) + } else { + itWorked = false // ready for next exit + } +}) + +function exit (code, noLog) { + exitCode = exitCode || process.exitCode || code + + var doExit = npm.config ? npm.config.get("_exit") : true + log.verbose("exit", [code, doExit]) + if (log.level === "silent") noLog = true + + if (rollbacks.length) { + chain(rollbacks.map(function (f) { + return function (cb) { + npm.commands.unbuild([f], true, cb) + } + }), function (er) { + if (er) { + log.error("error rolling back", er) + if (!code) errorHandler(er) + else if (noLog) rm("npm-debug.log", reallyExit.bind(null, er)) + else writeLogFile(reallyExit.bind(this, er)) + } else { + if (!noLog && code) writeLogFile(reallyExit) + else rm("npm-debug.log", reallyExit) + } + }) + rollbacks.length = 0 + } + else if (code && !noLog) writeLogFile(reallyExit) + else rm("npm-debug.log", reallyExit) + + function reallyExit (er) { + if (er && !code) code = typeof er.errno === "number" ? er.errno : 1 + + // truncate once it's been written. + log.record.length = 0 + + itWorked = !code + + // just emit a fake exit event. + // if we're really exiting, then let it exit on its own, so that + // in-process stuff can finish or clean up first. + if (!doExit) process.emit("exit", code) + npm.spinner.stop() + } +} + + +function errorHandler (er) { + // console.error("errorHandler", er) + if (!npm.config || !npm.config.loaded) { + // logging won't work unless we pretend that it's ready + er = er || new Error("Exit prior to config file resolving.") + console.error(er.stack || er.message) + } + + if (cbCalled) { + er = er || new Error("Callback called more than once.") + } + + cbCalled = true + if (!er) return exit(0) + if (typeof er === "string") { + log.error("", er) + return exit(1, true) + } else if (!(er instanceof Error)) { + log.error("weird error", er) + return exit(1, true) + } + + var m = er.code || er.message.match(/^(?:Error: )?(E[A-Z]+)/) + if (m && !er.code) er.code = m + + ; [ "type" + , "fstream_path" + , "fstream_unc_path" + , "fstream_type" + , "fstream_class" + , "fstream_finish_call" + , "fstream_linkpath" + , "stack" + , "fstream_stack" + , "statusCode" + , "pkgid" + ].forEach(function (k) { + var v = er[k] + if (!v) return + if (k === "fstream_stack") v = v.join("\n") + log.verbose(k, v) + }) + + log.verbose("cwd", process.cwd()) + + var os = require("os") + // log.error("System", os.type() + " " + os.release()) + // log.error("command", process.argv.map(JSON.stringify).join(" ")) + // log.error("node -v", process.version) + // log.error("npm -v", npm.version) + log.error("", os.type() + " " + os.release()) + log.error("argv", process.argv.map(JSON.stringify).join(" ")) + log.error("node", process.version) + log.error("npm ", "v" + npm.version) + + ; [ "file" + , "path" + , "code" + , "errno" + , "syscall" + ].forEach(function (k) { + var v = er[k] + if (v) log.error(k, v) + }) + + // just a line break + if (log.levels[log.level] <= log.levels.error) console.error("") + + switch (er.code) { + case "ECONNREFUSED": + log.error("", er) + log.error("", ["\nIf you are behind a proxy, please make sure that the" + ,"'proxy' config is set properly. See: 'npm help config'" + ].join("\n")) + break + + case "EACCES": + case "EPERM": + log.error("", er) + log.error("", ["\nPlease try running this command again as root/Administrator." + ].join("\n")) + break + + case "ELIFECYCLE": + log.error("", er.message) + log.error("", ["","Failed at the "+er.pkgid+" "+er.stage+" script '"+er.script+"'." + ,"This is most likely a problem with the "+er.pkgname+" package," + ,"not with npm itself." + ,"Tell the author that this fails on your system:" + ," "+er.script + ,'You can get information on how to open an issue for this project with:' + ,' npm bugs ' + er.pkgname + ,'Or if that isn\'t available, you can get their info via:', + ,' npm owner ls ' + er.pkgname + ,"There is likely additional logging output above." + ].join("\n")) + break + + case "ENOGIT": + log.error("", er.message) + log.error("", ["","Failed using git." + ,"This is most likely not a problem with npm itself." + ,"Please check if you have git installed and in your PATH." + ].join("\n")) + break + + case "EJSONPARSE": + log.error("", er.message) + log.error("", "File: "+er.file) + log.error("", ["Failed to parse package.json data." + ,"package.json must be actual JSON, not just JavaScript." + ,"","This is not a bug in npm." + ,"Tell the package author to fix their package.json file." + ].join("\n"), "JSON.parse") + break + + // TODO(isaacs) + // Add a special case here for E401 and E403 explaining auth issues? + + case "E404": + var msg = [er.message] + if (er.pkgid && er.pkgid !== "-") { + msg.push("", "'" + er.pkgid + "' is not in the npm registry.") + + var valResult = nameValidator(er.pkgid) + + if (valResult.validForNewPackages) { + msg.push("You should bug the author to publish it (or use the name yourself!)") + } else { + msg.push("Your package name is not valid, because", "") + + var errorsArray = (valResult.errors || []).concat(valResult.warnings || []) + errorsArray.forEach(function(item, idx) { + msg.push(" " + (idx + 1) + ". " + item) + }) + } + + if (er.parent) { + msg.push("It was specified as a dependency of '"+er.parent+"'") + } + msg.push("\nNote that you can also install from a" + ,"tarball, folder, http url, or git url.") + } + // There's no need to have 404 in the message as well. + msg[0] = msg[0].replace(/^404\s+/, "") + log.error("404", msg.join("\n")) + break + + case "EPUBLISHCONFLICT": + log.error("publish fail", ["Cannot publish over existing version." + ,"Update the 'version' field in package.json and try again." + ,"" + ,"To automatically increment version numbers, see:" + ," npm help version" + ].join("\n")) + break + + case "EISGIT": + log.error("git", [er.message + ," "+er.path + ,"Refusing to remove it. Update manually," + ,"or move it out of the way first." + ].join("\n")) + break + + case "ECYCLE": + log.error("cycle", [er.message + ,"While installing: "+er.pkgid + ,"Found a pathological dependency case that npm cannot solve." + ,"Please report this to the package author." + ].join("\n")) + break + + case "EBADPLATFORM": + log.error("notsup", [er.message + ,"Not compatible with your operating system or architecture: "+er.pkgid + ,"Valid OS: "+er.os.join(",") + ,"Valid Arch: "+er.cpu.join(",") + ,"Actual OS: "+process.platform + ,"Actual Arch: "+process.arch + ].join("\n")) + break + + case "EEXIST": + log.error([er.message + ,"File exists: "+er.path + ,"Move it away, and try again."].join("\n")) + break + + case "ENEEDAUTH": + log.error("need auth", [er.message + ,"You need to authorize this machine using `npm adduser`" + ].join("\n")) + break + + case "EPEERINVALID": + var peerErrors = Object.keys(er.peersDepending).map(function (peer) { + return "Peer " + peer + " wants " + er.packageName + "@" + + er.peersDepending[peer] + }) + log.error("peerinvalid", [er.message].concat(peerErrors).join("\n")) + break + + case "ECONNRESET": + case "ENOTFOUND": + case "ETIMEDOUT": + case "EAI_FAIL": + log.error("network", [er.message + ,"This is most likely not a problem with npm itself" + ,"and is related to network connectivity." + ,"In most cases you are behind a proxy or have bad network settings." + ,"\nIf you are behind a proxy, please make sure that the" + ,"'proxy' config is set properly. See: 'npm help config'" + ].join("\n")) + break + + case "ENOPACKAGEJSON": + log.error("package.json", [er.message + ,"This is most likely not a problem with npm itself." + ,"npm can't find a package.json file in your current directory." + ].join("\n")) + break + + case "ETARGET": + var msg = [er.message + ,"This is most likely not a problem with npm itself." + ,"In most cases you or one of your dependencies are requesting" + ,"a package version that doesn't exist." + ] + if (er.parent) { + msg.push("\nIt was specified as a dependency of '"+er.parent+"'\n") + } + log.error("notarget", msg.join("\n")) + break + + case "ENOTSUP": + if (er.required) { + log.error("notsup", [er.message + ,"Not compatible with your version of node/npm: "+er.pkgid + ,"Required: "+JSON.stringify(er.required) + ,"Actual: " + +JSON.stringify({npm:npm.version + ,node:npm.config.get("node-version")}) + ].join("\n")) + break + } // else passthrough + + case "ENOSPC": + log.error("nospc", [er.message + ,"This is most likely not a problem with npm itself" + ,"and is related to insufficient space on your system." + ].join("\n")) + break + + case "EROFS": + log.error("rofs", [er.message + ,"This is most likely not a problem with npm itself" + ,"and is related to the file system being read-only." + ,"\nOften virtualized file systems, or other file systems" + ,"that don't support symlinks, give this error." + ].join("\n")) + break + + case "ENOENT": + log.error("enoent", [er.message + ,"This is most likely not a problem with npm itself" + ,"and is related to npm not being able to find a file." + ,er.file?"\nCheck if the file '"+er.file+"' is present.":"" + ].join("\n")) + break + + case "EISDIR": + log.error("eisdir", [er.message + ,"This is most likely not a problem with npm itself" + ,"and is related to npm not being able to find a package.json in" + ,"a package you are trying to install." + ].join("\n")) + break + + default: + log.error("", er.message || er) + log.error("", ["", "If you need help, you may report this error at:" + ," " + ].join("\n")) + break + } + + exit(typeof er.errno === "number" ? er.errno : 1) +} + +var writingLogFile = false +function writeLogFile (cb) { + if (writingLogFile) return cb() + writingLogFile = true + wroteLogFile = true + + var fstr = writeStreamAtomic("npm-debug.log") + , os = require("os") + , out = "" + + log.record.forEach(function (m) { + var pref = [m.id, m.level] + if (m.prefix) pref.push(m.prefix) + pref = pref.join(" ") + + m.message.trim().split(/\r?\n/).map(function (line) { + return (pref + " " + line).trim() + }).forEach(function (line) { + out += line + os.EOL + }) + }) + + fstr.end(out) + fstr.on("close", cb) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/gently-rm.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/gently-rm.js new file mode 100644 index 00000000..8e7d39b4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/gently-rm.js @@ -0,0 +1,197 @@ +// only remove the thing if it's a symlink into a specific folder. +// This is a very common use-case of npm's, but not so common elsewhere. + +module.exports = gentlyRm + +var npm = require('../npm.js') +var log = require('npmlog') +var resolve = require('path').resolve +var dirname = require('path').dirname +var lstat = require('graceful-fs').lstat +var readlink = require('graceful-fs').readlink +var isInside = require('path-is-inside') +var vacuum = require('fs-vacuum') +var some = require('async-some') +var asyncMap = require('slide').asyncMap +var normalize = require('path').normalize + +function gentlyRm (target, gently, base, cb) { + if (!cb) { + cb = base + base = undefined + } + + if (!cb) { + cb = gently + gently = false + } + + log.silly( + 'gentlyRm', + target, + 'is being', gently ? 'gently removed' : 'purged', + base ? 'from base ' + base : '' + ) + + // never rm the root, prefix, or bin dirs + // + // globals included because of `npm link` -- as far as the package requesting + // the link is concerned, the linked package is always installed globally + var prefixes = [ + npm.prefix, + npm.globalPrefix, + npm.dir, + npm.root, + npm.globalDir, + npm.bin, + npm.globalBin + ] + + var resolved = normalize(resolve(npm.prefix, target)) + if (prefixes.indexOf(resolved) !== -1) { + log.verbose('gentlyRm', resolved, "is part of npm and can't be removed") + return cb(new Error('May not delete: ' + resolved)) + } + + var options = { log: log.silly.bind(log, 'vacuum-fs') } + if (npm.config.get('force') || !gently) options.purge = true + if (base) options.base = normalize(resolve(npm.prefix, base)) + + if (!gently) { + log.verbose('gentlyRm', "don't care about contents; nuking", resolved) + return vacuum(resolved, options, cb) + } + + var parent = options.base = normalize(base ? resolve(npm.prefix, base) : npm.prefix) + + // is the parent directory managed by npm? + log.silly('gentlyRm', 'verifying', parent, 'is an npm working directory') + some(prefixes, isManaged(parent), function (er, matched) { + if (er) return cb(er) + + if (!matched) { + log.error('gentlyRm', 'containing path', parent, "isn't under npm's control") + return clobberFail(resolved, parent, cb) + } + log.silly('gentlyRm', 'containing path', parent, "is under npm's control, in", matched) + + // is the target directly contained within the (now known to be + // managed) parent? + if (isInside(resolved, parent)) { + log.silly('gentlyRm', 'deletion target', resolved, 'is under', parent) + log.verbose('gentlyRm', 'vacuuming from', resolved, 'up to', parent) + return vacuum(resolved, options, cb) + } + log.silly('gentlyRm', resolved, 'is not under', parent) + + // the target isn't directly within the parent, but is it itself managed? + log.silly('gentlyRm', 'verifying', resolved, 'is an npm working directory') + some(prefixes, isManaged(resolved), function (er, matched) { + if (er) return cb(er) + + if (matched) { + log.silly('gentlyRm', resolved, "is under npm's control, in", matched) + options.base = matched + log.verbose('gentlyRm', 'removing', resolved, 'with base', options.base) + return vacuum(resolved, options, cb) + } + log.verbose('gentlyRm', resolved, "is not under npm's control") + + // the target isn't managed directly, but maybe it's a link... + log.silly('gentlyRm', 'checking to see if', resolved, 'is a link') + lstat(resolved, function (er, stat) { + if (er) { + // race conditions are common when unbuilding + if (er.code === 'ENOENT') return cb(null) + return cb(er) + } + + if (!stat.isSymbolicLink()) { + log.error('gentlyRm', resolved, 'is outside', parent, 'and not a link') + return clobberFail(resolved, parent, cb) + } + + // ...and maybe the link source, when read... + log.silly('gentlyRm', resolved, 'is a link') + readlink(resolved, function (er, link) { + if (er) { + // race conditions are common when unbuilding + if (er.code === 'ENOENT') return cb(null) + return cb(er) + } + + // ...is inside the managed parent + var source = resolve(dirname(resolved), link) + if (isInside(source, parent)) { + log.silly('gentlyRm', source, 'symlink target', resolved, 'is inside', parent) + log.verbose('gentlyRm', 'vacuuming', resolved) + return vacuum(resolved, options, cb) + } + + log.error('gentlyRm', source, 'symlink target', resolved, 'is not controlled by npm', parent) + return clobberFail(target, parent, cb) + }) + }) + }) + }) +} + +var resolvedPaths = {} +function isManaged (target) { + return function predicate (path, cb) { + if (!path) { + log.verbose('isManaged', 'no path passed for target', target) + return cb(null, false) + } + + asyncMap([path, target], resolveSymlink, function (er, results) { + if (er) { + if (er.code === 'ENOENT') return cb(null, false) + + return cb(er) + } + + var path = results[0] + var target = results[1] + var inside = isInside(target, path) + if (!inside) log.silly('isManaged', target, 'is not inside', path) + + return cb(null, inside && path) + }) + } + + function resolveSymlink (toResolve, cb) { + var resolved = resolve(npm.prefix, toResolve) + + // if the path has already been memoized, return immediately + var cached = resolvedPaths[resolved] + if (cached) return cb(null, cached) + + // otherwise, check the path + lstat(resolved, function (er, stat) { + if (er) return cb(er) + + // if it's not a link, cache & return the path itself + if (!stat.isSymbolicLink()) { + resolvedPaths[resolved] = resolved + return cb(null, resolved) + } + + // otherwise, cache & return the link's source + readlink(resolved, function (er, source) { + if (er) return cb(er) + + resolved = resolve(resolved, source) + resolvedPaths[resolved] = resolved + cb(null, resolved) + }) + }) + } +} + +function clobberFail (target, root, cb) { + var er = new Error('Refusing to delete: ' + target + ' not in ' + root) + er.code = 'EEXIST' + er.path = target + return cb(er) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/get-publish-config.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/get-publish-config.js new file mode 100644 index 00000000..12ca00e2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/get-publish-config.js @@ -0,0 +1,25 @@ +var Conf = require('../config/core.js').Conf +var CachingRegClient = require('../cache/caching-client.js') +var log = require('npmlog') + +module.exports = getPublishConfig + +function getPublishConfig (publishConfig, defaultConfig, defaultClient) { + var config = defaultConfig + var client = defaultClient + log.verbose('getPublishConfig', publishConfig) + if (publishConfig) { + config = new Conf(defaultConfig) + config.save = defaultConfig.save.bind(defaultConfig) + + // don't modify the actual publishConfig object, in case we have + // to set a login token or some other data. + config.unshift(Object.keys(publishConfig).reduce(function (s, k) { + s[k] = publishConfig[k] + return s + }, {})) + client = new CachingRegClient(config) + } + + return { config: config, client: client } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/git.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/git.js new file mode 100644 index 00000000..24a2612a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/git.js @@ -0,0 +1,51 @@ + +// handle some git configuration for windows + +exports.spawn = spawnGit +exports.chainableExec = chainableExec +exports.whichAndExec = whichAndExec + +var exec = require("child_process").execFile + , spawn = require("./spawn") + , npm = require("../npm.js") + , which = require("which") + , git = npm.config.get("git") + , assert = require("assert") + , log = require("npmlog") + +function prefixGitArgs () { + return process.platform === "win32" ? ["-c", "core.longpaths=true"] : [] +} + +function execGit (args, options, cb) { + log.info('git', args) + var fullArgs = prefixGitArgs().concat(args || []) + return exec(git, fullArgs, options, cb) +} + +function spawnGit (args, options) { + log.info("git", args) + return spawn(git, prefixGitArgs().concat(args || []), options) +} + +function chainableExec () { + var args = Array.prototype.slice.call(arguments) + return [execGit].concat(args) +} + +function whichGit (cb) { + return which(git, cb) +} + +function whichAndExec (args, options, cb) { + assert.equal(typeof cb, "function", "no callback provided") + // check for git + whichGit(function (err) { + if (err) { + err.code = "ENOGIT" + return cb(err) + } + + execGit(args, options, cb) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/lifecycle.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/lifecycle.js new file mode 100644 index 00000000..b2585317 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/lifecycle.js @@ -0,0 +1,369 @@ +exports = module.exports = lifecycle +exports.cmd = cmd +exports.makeEnv = makeEnv + +var log = require("npmlog") +var spawn = require("./spawn") +var npm = require("../npm.js") +var path = require("path") +var fs = require("graceful-fs") +var chain = require("slide").chain +var Stream = require("stream").Stream +var PATH = "PATH" +var uidNumber = require("uid-number") +var umask = require("./umask") + +// windows calls it's path "Path" usually, but this is not guaranteed. +if (process.platform === "win32") { + PATH = "Path" + Object.keys(process.env).forEach(function (e) { + if (e.match(/^PATH$/i)) { + PATH = e + } + }) +} + +function lifecycle (pkg, stage, wd, unsafe, failOk, cb) { + if (typeof cb !== "function") cb = failOk, failOk = false + if (typeof cb !== "function") cb = unsafe, unsafe = false + if (typeof cb !== "function") cb = wd, wd = null + + while (pkg && pkg._data) pkg = pkg._data + if (!pkg) return cb(new Error("Invalid package data")) + + log.info(stage, pkg._id) + if (!pkg.scripts || npm.config.get('ignore-scripts')) pkg.scripts = {} + + validWd(wd || path.resolve(npm.dir, pkg.name), function (er, wd) { + if (er) return cb(er) + + unsafe = unsafe || npm.config.get("unsafe-perm") + + if ((wd.indexOf(npm.dir) !== 0 || + wd.indexOf(pkg.name) !== wd.length - pkg.name.length) && + !unsafe && pkg.scripts[stage]) { + log.warn( "cannot run in wd", "%s %s (wd=%s)" + , pkg._id, pkg.scripts[stage], wd) + return cb() + } + + // set the env variables, then run scripts as a child process. + var env = makeEnv(pkg) + env.npm_lifecycle_event = stage + env.npm_node_execpath = env.NODE = env.NODE || process.execPath + env.npm_execpath = require.main.filename + + // "nobody" typically doesn't have permission to write to /tmp + // even if it's never used, sh freaks out. + if (!npm.config.get("unsafe-perm")) env.TMPDIR = wd + + lifecycle_(pkg, stage, wd, env, unsafe, failOk, cb) + }) +} + +function checkForLink (pkg, cb) { + var f = path.join(npm.dir, pkg.name) + fs.lstat(f, function (er, s) { + cb(null, !(er || !s.isSymbolicLink())) + }) +} + +function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) { + var pathArr = [] + , p = wd.split("node_modules") + , acc = path.resolve(p.shift()) + + p.forEach(function (pp) { + pathArr.unshift(path.join(acc, "node_modules", ".bin")) + acc = path.join(acc, "node_modules", pp) + }) + pathArr.unshift(path.join(acc, "node_modules", ".bin")) + + // we also unshift the bundled node-gyp-bin folder so that + // the bundled one will be used for installing things. + pathArr.unshift(path.join(__dirname, "..", "..", "bin", "node-gyp-bin")) + + // prefer current node interpreter in child scripts + pathArr.push(path.dirname(process.execPath)) + + if (env[PATH]) pathArr.push(env[PATH]) + env[PATH] = pathArr.join(process.platform === "win32" ? ";" : ":") + + var packageLifecycle = pkg.scripts && pkg.scripts.hasOwnProperty(stage) + + if (packageLifecycle) { + // define this here so it's available to all scripts. + env.npm_lifecycle_script = pkg.scripts[stage] + } + + function done (er) { + if (er) { + if (npm.config.get("force")) { + log.info("forced, continuing", er) + er = null + } else if (failOk) { + log.warn("continuing anyway", er.message) + er = null + } + } + cb(er) + } + + chain + ( [ packageLifecycle && [runPackageLifecycle, pkg, env, wd, unsafe] + , [runHookLifecycle, pkg, env, wd, unsafe] ] + , done ) +} + +function validWd (d, cb) { + fs.stat(d, function (er, st) { + if (er || !st.isDirectory()) { + var p = path.dirname(d) + if (p === d) { + return cb(new Error("Could not find suitable wd")) + } + return validWd(p, cb) + } + return cb(null, d) + }) +} + +function runPackageLifecycle (pkg, env, wd, unsafe, cb) { + // run package lifecycle scripts in the package root, or the nearest parent. + var stage = env.npm_lifecycle_event + , cmd = env.npm_lifecycle_script + + var note = "\n> " + pkg._id + " " + stage + " " + wd + + "\n> " + cmd + "\n" + runCmd(note, cmd, pkg, env, stage, wd, unsafe, cb) +} + + +var running = false +var queue = [] +function dequeue() { + running = false + if (queue.length) { + var r = queue.shift() + runCmd.apply(null, r) + } +} + +function runCmd (note, cmd, pkg, env, stage, wd, unsafe, cb) { + if (running) { + queue.push([note, cmd, pkg, env, stage, wd, unsafe, cb]) + return + } + + running = true + log.pause() + var user = unsafe ? null : npm.config.get("user") + , group = unsafe ? null : npm.config.get("group") + + if (log.level !== 'silent') { + if (npm.spinner.int) { + npm.config.get("logstream").write("\r \r") + } + console.log(note) + } + log.verbose("unsafe-perm in lifecycle", unsafe) + + if (process.platform === "win32") { + unsafe = true + } + + if (unsafe) { + runCmd_(cmd, pkg, env, wd, stage, unsafe, 0, 0, cb) + } else { + uidNumber(user, group, function (er, uid, gid) { + runCmd_(cmd, pkg, env, wd, stage, unsafe, uid, gid, cb) + }) + } +} + +function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { + + function cb (er) { + cb_.apply(null, arguments) + log.resume() + process.nextTick(dequeue) + } + + var conf = { cwd: wd + , env: env + , stdio: [ 0, 1, 2 ] + } + + if (!unsafe) { + conf.uid = uid ^ 0 + conf.gid = gid ^ 0 + } + + var sh = 'sh' + var shFlag = '-c' + + if (process.platform === 'win32') { + sh = process.env.comspec || 'cmd' + shFlag = '/d /s /c' + conf.windowsVerbatimArguments = true + } + + var proc = spawn(sh, [shFlag, cmd], conf) + proc.on("error", procError) + proc.on("close", function (code, signal) { + if (signal) { + process.kill(process.pid, signal); + } else if (code) { + var er = new Error("Exit status " + code) + } + procError(er) + }) + + function procError (er) { + if (er && !npm.ROLLBACK) { + log.info(pkg._id, "Failed to exec "+stage+" script") + er.message = pkg._id + " " + + stage + ": `" + cmd +"`\n" + + er.message + if (er.code !== "EPERM") { + er.code = "ELIFECYCLE" + } + er.pkgid = pkg._id + er.stage = stage + er.script = cmd + er.pkgname = pkg.name + return cb(er) + } else if (er) { + log.error(pkg._id+"."+stage, er) + log.error(pkg._id+"."+stage, "continuing anyway") + return cb() + } + cb(er) + } +} + + +function runHookLifecycle (pkg, env, wd, unsafe, cb) { + // check for a hook script, run if present. + var stage = env.npm_lifecycle_event + , hook = path.join(npm.dir, ".hooks", stage) + , user = unsafe ? null : npm.config.get("user") + , group = unsafe ? null : npm.config.get("group") + , cmd = hook + + fs.stat(hook, function (er) { + if (er) return cb() + var note = "\n> " + pkg._id + " " + stage + " " + wd + + "\n> " + cmd + runCmd(note, hook, pkg, env, stage, wd, unsafe, cb) + }) +} + +function makeEnv (data, prefix, env) { + prefix = prefix || "npm_package_" + if (!env) { + env = {} + for (var i in process.env) if (!i.match(/^npm_/)) { + env[i] = process.env[i] + } + + // npat asks for tap output + if (npm.config.get("npat")) env.TAP = 1 + + // express and others respect the NODE_ENV value. + if (npm.config.get("production")) env.NODE_ENV = "production" + + } else if (!data.hasOwnProperty("_lifecycleEnv")) { + Object.defineProperty(data, "_lifecycleEnv", + { value : env + , enumerable : false + }) + } + + for (var i in data) if (i.charAt(0) !== "_") { + var envKey = (prefix+i).replace(/[^a-zA-Z0-9_]/g, '_') + if (i === "readme") { + continue + } + if (data[i] && typeof(data[i]) === "object") { + try { + // quick and dirty detection for cyclical structures + JSON.stringify(data[i]) + makeEnv(data[i], envKey+"_", env) + } catch (ex) { + // usually these are package objects. + // just get the path and basic details. + var d = data[i] + makeEnv( { name: d.name, version: d.version, path:d.path } + , envKey+"_", env) + } + } else { + env[envKey] = String(data[i]) + env[envKey] = -1 !== env[envKey].indexOf("\n") + ? JSON.stringify(env[envKey]) + : env[envKey] + } + + } + + if (prefix !== "npm_package_") return env + + prefix = "npm_config_" + var pkgConfig = {} + , keys = npm.config.keys + , pkgVerConfig = {} + , namePref = data.name + ":" + , verPref = data.name + "@" + data.version + ":" + + keys.forEach(function (i) { + // in some rare cases (e.g. working with nerf darts), there are segmented + // "private" (underscore-prefixed) config names -- don't export + if (i.charAt(0) === '_' && i.indexOf('_' + namePref) !== 0 || i.match(/:_/)) { + return + } + var value = npm.config.get(i) + if (value instanceof Stream || Array.isArray(value)) return + if (i.match(/umask/)) value = umask.toString(value) + if (!value) value = "" + else if (typeof value === "number") value = "" + value + else if (typeof value !== "string") value = JSON.stringify(value) + + value = -1 !== value.indexOf("\n") + ? JSON.stringify(value) + : value + i = i.replace(/^_+/, "") + if (i.indexOf(namePref) === 0) { + var k = i.substr(namePref.length).replace(/[^a-zA-Z0-9_]/g, "_") + pkgConfig[ k ] = value + } else if (i.indexOf(verPref) === 0) { + var k = i.substr(verPref.length).replace(/[^a-zA-Z0-9_]/g, "_") + pkgVerConfig[ k ] = value + } + var envKey = (prefix+i).replace(/[^a-zA-Z0-9_]/g, "_") + env[envKey] = value + }) + + prefix = "npm_package_config_" + ;[pkgConfig, pkgVerConfig].forEach(function (conf) { + for (var i in conf) { + var envKey = (prefix+i) + env[envKey] = conf[i] + } + }) + + return env +} + +function cmd (stage) { + function CMD (args, cb) { + npm.commands["run-script"]([stage].concat(args), cb) + } + CMD.usage = "npm "+stage+" [-- ]" + var installedShallow = require("./completion/installed-shallow.js") + CMD.completion = function (opts, cb) { + installedShallow(opts, function (d) { + return d.scripts && d.scripts[stage] + }, cb) + } + return CMD +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/link.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/link.js new file mode 100644 index 00000000..fb08f3f9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/link.js @@ -0,0 +1,40 @@ + +module.exports = link +link.ifExists = linkIfExists + +var fs = require("graceful-fs") + , chain = require("slide").chain + , mkdir = require("mkdirp") + , rm = require("./gently-rm.js") + , path = require("path") + , npm = require("../npm.js") + +function linkIfExists (from, to, gently, cb) { + fs.stat(from, function (er) { + if (er) return cb() + link(from, to, gently, cb) + }) +} + +function link (from, to, gently, abs, cb) { + if (typeof cb !== "function") cb = abs, abs = false + if (typeof cb !== "function") cb = gently, gently = null + if (npm.config.get("force")) gently = false + + to = path.resolve(to) + var target = from = path.resolve(from) + if (!abs && process.platform !== "win32") { + // junctions on windows must be absolute + target = path.relative(path.dirname(to), from) + // if there is no folder in common, then it will be much + // longer, and using a relative link is dumb. + if (target.length >= from.length) target = from + } + + chain + ( [ [fs, "stat", from] + , [rm, to, gently] + , [mkdir, path.dirname(to)] + , [fs, "symlink", target, to, "junction"] ] + , cb) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/locker.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/locker.js new file mode 100644 index 00000000..f1c12b87 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/locker.js @@ -0,0 +1,73 @@ +var crypto = require("crypto") +var resolve = require("path").resolve + +var lockfile = require("lockfile") +var log = require("npmlog") +var mkdirp = require("mkdirp") + +var npm = require("../npm.js") +var correctMkdir = require('../utils/correct-mkdir.js') + +var installLocks = {} + +function lockFileName (base, name) { + var c = name.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "") + , p = resolve(base, name) + , h = crypto.createHash("sha1").update(p).digest("hex") + , l = resolve(npm.cache, "_locks") + + return resolve(l, c.substr(0, 24)+"-"+h.substr(0, 16)+".lock") +} + +function lock (base, name, cb) { + var lockDir = resolve(npm.cache, "_locks") + correctMkdir(lockDir, function (er) { + if (er) return cb(er) + + var opts = { stale: npm.config.get("cache-lock-stale") + , retries: npm.config.get("cache-lock-retries") + , wait: npm.config.get("cache-lock-wait") } + var lf = lockFileName(base, name) + lockfile.lock(lf, opts, function (er) { + if (er) log.warn("locking", lf, "failed", er) + + if (!er) { + log.verbose("lock", "using", lf, "for", resolve(base, name)) + installLocks[lf] = true + } + + cb(er) + }) + }) +} + +function unlock (base, name, cb) { + var lf = lockFileName(base, name) + , locked = installLocks[lf] + if (locked === false) { + return process.nextTick(cb) + } + else if (locked === true) { + lockfile.unlock(lf, function (er) { + if (er) { + log.warn("unlocking", lf, "failed", er) + } + else { + installLocks[lf] = false + log.verbose("unlock", "done using", lf, "for", resolve(base, name)) + } + + cb(er) + }) + } + else { + throw new Error( + "Attempt to unlock " + resolve(base, name) + ", which hasn't been locked" + ) + } +} + +module.exports = { + lock : lock, + unlock : unlock +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/map-to-registry.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/map-to-registry.js new file mode 100644 index 00000000..ce4425f8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/map-to-registry.js @@ -0,0 +1,100 @@ +var url = require("url") + +var log = require("npmlog") + , npa = require("npm-package-arg") + +module.exports = mapToRegistry + +function mapToRegistry(name, config, cb) { + log.silly("mapToRegistry", "name", name) + var registry + + // the name itself takes precedence + var data = npa(name) + if (data.scope) { + // the name is definitely scoped, so escape now + name = name.replace("/", "%2f") + + log.silly("mapToRegistry", "scope (from package name)", data.scope) + + registry = config.get(data.scope + ":registry") + if (!registry) { + log.verbose("mapToRegistry", "no registry URL found in name for scope", data.scope) + } + } + + // ...then --scope=@scope or --scope=scope + var scope = config.get("scope") + if (!registry && scope) { + // I'm an enabler, sorry + if (scope.charAt(0) !== "@") scope = "@" + scope + + log.silly("mapToRegistry", "scope (from config)", scope) + + registry = config.get(scope + ":registry") + if (!registry) { + log.verbose("mapToRegistry", "no registry URL found in config for scope", scope) + } + } + + // ...and finally use the default registry + if (!registry) { + log.silly("mapToRegistry", "using default registry") + registry = config.get("registry") + } + + log.silly("mapToRegistry", "registry", registry) + + var auth = config.getCredentialsByURI(registry) + + // normalize registry URL so resolution doesn't drop a piece of registry URL + var normalized = registry.slice(-1) !== '/' ? registry + '/' : registry + var uri + log.silly('mapToRegistry', 'data', data) + if (data.type === 'remote') { + uri = data.spec + } else { + uri = url.resolve(normalized, name) + } + + log.silly('mapToRegistry', 'uri', uri) + + cb(null, uri, scopeAuth(uri, registry, auth), normalized) +} + +function scopeAuth (uri, registry, auth) { + var cleaned = { + scope: auth.scope, + email: auth.email, + alwaysAuth: auth.alwaysAuth, + token: undefined, + username: undefined, + password: undefined, + auth: undefined + } + + var requestHost + var registryHost + + if (auth.token || auth.auth || (auth.username && auth.password)) { + requestHost = url.parse(uri).hostname + registryHost = url.parse(registry).hostname + + if (requestHost === registryHost) { + cleaned.token = auth.token + cleaned.auth = auth.auth + cleaned.username = auth.username + cleaned.password = auth.password + } else if (auth.alwaysAuth) { + log.verbose('scopeAuth', 'alwaysAuth set for', registry) + cleaned.token = auth.token + cleaned.auth = auth.auth + cleaned.username = auth.username + cleaned.password = auth.password + } else { + log.silly('scopeAuth', uri, "doesn't share host with registry", registry) + } + } + + return cleaned +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/read-local-package.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/read-local-package.js new file mode 100644 index 00000000..d78951dd --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/read-local-package.js @@ -0,0 +1,12 @@ +exports = module.exports = readLocalPkg + +var npm = require("../npm.js") + , readJson = require("read-package-json") + +function readLocalPkg (cb) { + if (npm.config.get("global")) return cb() + var path = require("path") + readJson(path.resolve(npm.prefix, "package.json"), function (er, d) { + return cb(er, d && d.name) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/spawn.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/spawn.js new file mode 100644 index 00000000..ec27e416 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/spawn.js @@ -0,0 +1,34 @@ +module.exports = spawn + +var _spawn = require("child_process").spawn +var EventEmitter = require("events").EventEmitter + +function spawn (cmd, args, options) { + var raw = _spawn(cmd, args, options) + var cooked = new EventEmitter() + + raw.on("error", function (er) { + er.file = cmd + cooked.emit("error", er) + }).on("close", function (code, signal) { + // Create ENOENT error because Node.js v0.8 will not emit + // an `error` event if the command could not be found. + if (code === 127) { + var er = new Error('spawn ENOENT') + er.code = 'ENOENT' + er.errno = 'ENOENT' + er.syscall = 'spawn' + er.file = cmd + cooked.emit('error', er) + } else { + cooked.emit("close", code, signal) + } + }) + + cooked.stdin = raw.stdin + cooked.stdout = raw.stdout + cooked.stderr = raw.stderr + cooked.kill = function (sig) { return raw.kill(sig) } + + return cooked +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/tar.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/tar.js new file mode 100644 index 00000000..3bfeb44d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/tar.js @@ -0,0 +1,291 @@ +// commands for packing and unpacking tarballs +// this file is used by lib/cache.js + +var npm = require("../npm.js") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , writeStreamAtomic = require("fs-write-stream-atomic") + , path = require("path") + , log = require("npmlog") + , uidNumber = require("uid-number") + , rm = require("./gently-rm.js") + , readJson = require("read-package-json") + , myUid = process.getuid && process.getuid() + , myGid = process.getgid && process.getgid() + , tar = require("tar") + , zlib = require("zlib") + , fstream = require("fstream") + , Packer = require("fstream-npm") + , lifecycle = require("./lifecycle.js") + +if (process.env.SUDO_UID && myUid === 0) { + if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID + if (!isNaN(process.env.SUDO_GID)) myGid = +process.env.SUDO_GID +} + +exports.pack = pack +exports.unpack = unpack + +function pack (tarball, folder, pkg, dfc, cb) { + log.verbose("tar pack", [tarball, folder]) + if (typeof cb !== "function") cb = dfc, dfc = false + + log.verbose("tarball", tarball) + log.verbose("folder", folder) + + if (dfc) { + // do fancy crap + return lifecycle(pkg, "prepublish", folder, function (er) { + if (er) return cb(er) + pack_(tarball, folder, pkg, cb) + }) + } else { + pack_(tarball, folder, pkg, cb) + } +} + +function pack_ (tarball, folder, pkg, cb) { + new Packer({ path: folder, type: "Directory", isDirectory: true }) + .on("error", function (er) { + if (er) log.error("tar pack", "Error reading " + folder) + return cb(er) + }) + + // By default, npm includes some proprietary attributes in the + // package tarball. This is sane, and allowed by the spec. + // However, npm *itself* excludes these from its own package, + // so that it can be more easily bootstrapped using old and + // non-compliant tar implementations. + .pipe(tar.Pack({ noProprietary: !npm.config.get("proprietary-attribs") })) + .on("error", function (er) { + if (er) log.error("tar.pack", "tar creation error", tarball) + cb(er) + }) + .pipe(zlib.Gzip()) + .on("error", function (er) { + if (er) log.error("tar.pack", "gzip error "+tarball) + cb(er) + }) + .pipe(writeStreamAtomic(tarball)) + .on("error", function (er) { + if (er) log.error("tar.pack", "Could not write "+tarball) + cb(er) + }) + .on("close", cb) +} + + +function unpack (tarball, unpackTarget, dMode, fMode, uid, gid, cb) { + log.verbose("tar", "unpack", tarball) + log.verbose("tar", "unpacking to", unpackTarget) + if (typeof cb !== "function") cb = gid, gid = null + if (typeof cb !== "function") cb = uid, uid = null + if (typeof cb !== "function") cb = fMode, fMode = npm.modes.file + if (typeof cb !== "function") cb = dMode, dMode = npm.modes.exec + + uidNumber(uid, gid, function (er, uid, gid) { + if (er) return cb(er) + unpack_(tarball, unpackTarget, dMode, fMode, uid, gid, cb) + }) +} + +function unpack_ ( tarball, unpackTarget, dMode, fMode, uid, gid, cb ) { + rm(unpackTarget, function (er) { + if (er) return cb(er) + // gzip {tarball} --decompress --stdout \ + // | tar -mvxpf - --strip-components=1 -C {unpackTarget} + gunzTarPerm( tarball, unpackTarget + , dMode, fMode + , uid, gid + , function (er, folder) { + if (er) return cb(er) + readJson(path.resolve(folder, "package.json"), cb) + }) + }) +} + + +function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) { + if (!dMode) dMode = npm.modes.exec + if (!fMode) fMode = npm.modes.file + log.silly("gunzTarPerm", "modes", [dMode.toString(8), fMode.toString(8)]) + + var cbCalled = false + function cb (er) { + if (cbCalled) return + cbCalled = true + cb_(er, target) + } + + var fst = fs.createReadStream(tarball) + + fst.on("open", function (fd) { + fs.fstat(fd, function (er, st) { + if (er) return fst.emit("error", er) + if (st.size === 0) { + er = new Error("0-byte tarball\n" + + "Please run `npm cache clean`") + fst.emit("error", er) + } + }) + }) + + // figure out who we're supposed to be, if we're not pretending + // to be a specific user. + if (npm.config.get("unsafe-perm") && process.platform !== "win32") { + uid = myUid + gid = myGid + } + + function extractEntry (entry) { + log.silly("gunzTarPerm", "extractEntry", entry.path) + // never create things that are user-unreadable, + // or dirs that are user-un-listable. Only leads to headaches. + var originalMode = entry.mode = entry.mode || entry.props.mode + entry.mode = entry.mode | (entry.type === "Directory" ? dMode : fMode) + entry.mode = entry.mode & (~npm.modes.umask) + entry.props.mode = entry.mode + if (originalMode !== entry.mode) { + log.silly( "gunzTarPerm", "modified mode" + , [entry.path, originalMode, entry.mode]) + } + + // if there's a specific owner uid/gid that we want, then set that + if (process.platform !== "win32" && + typeof uid === "number" && + typeof gid === "number") { + entry.props.uid = entry.uid = uid + entry.props.gid = entry.gid = gid + } + } + + var extractOpts = { type: "Directory", path: target, strip: 1 } + + if (process.platform !== "win32" && + typeof uid === "number" && + typeof gid === "number") { + extractOpts.uid = uid + extractOpts.gid = gid + } + + var sawIgnores = {} + extractOpts.filter = function () { + // symbolic links are not allowed in packages. + if (this.type.match(/^.*Link$/)) { + log.warn( "excluding symbolic link" + , this.path.substr(target.length + 1) + + " -> " + this.linkpath ) + return false + } + + // Note: This mirrors logic in the fs read operations that are + // employed during tarball creation, in the fstream-npm module. + // It is duplicated here to handle tarballs that are created + // using other means, such as system tar or git archive. + if (this.type === "File") { + var base = path.basename(this.path) + if (base === ".npmignore") { + sawIgnores[ this.path ] = true + } else if (base === ".gitignore") { + var npmignore = this.path.replace(/\.gitignore$/, ".npmignore") + if (sawIgnores[npmignore]) { + // Skip this one, already seen. + return false + } else { + // Rename, may be clobbered later. + this.path = npmignore + this._path = npmignore + } + } + } + + return true + } + + + fst + .on("error", function (er) { + if (er) log.error("tar.unpack", "error reading "+tarball) + cb(er) + }) + .on("data", function OD (c) { + // detect what it is. + // Then, depending on that, we'll figure out whether it's + // a single-file module, gzipped tarball, or naked tarball. + // gzipped files all start with 1f8b08 + if (c[0] === 0x1F && + c[1] === 0x8B && + c[2] === 0x08) { + fst + .pipe(zlib.Unzip()) + .on("error", function (er) { + if (er) log.error("tar.unpack", "unzip error "+tarball) + cb(er) + }) + .pipe(tar.Extract(extractOpts)) + .on("entry", extractEntry) + .on("error", function (er) { + if (er) log.error("tar.unpack", "untar error "+tarball) + cb(er) + }) + .on("close", cb) + } else if (hasTarHeader(c)) { + // naked tar + fst + .pipe(tar.Extract(extractOpts)) + .on("entry", extractEntry) + .on("error", function (er) { + if (er) log.error("tar.unpack", "untar error "+tarball) + cb(er) + }) + .on("close", cb) + } else { + // naked js file + var jsOpts = { path: path.resolve(target, "index.js") } + + if (process.platform !== "win32" && + typeof uid === "number" && + typeof gid === "number") { + jsOpts.uid = uid + jsOpts.gid = gid + } + + fst + .pipe(fstream.Writer(jsOpts)) + .on("error", function (er) { + if (er) log.error("tar.unpack", "copy error "+tarball) + cb(er) + }) + .on("close", function () { + var j = path.resolve(target, "package.json") + readJson(j, function (er, d) { + if (er) { + log.error("not a package", tarball) + return cb(er) + } + writeFileAtomic(j, JSON.stringify(d) + "\n", cb) + }) + }) + } + + // now un-hook, and re-emit the chunk + fst.removeListener("data", OD) + fst.emit("data", c) + }) +} + +function hasTarHeader (c) { + return c[257] === 0x75 && // tar archives have 7573746172 at position + c[258] === 0x73 && // 257 and 003030 or 202000 at position 262 + c[259] === 0x74 && + c[260] === 0x61 && + c[261] === 0x72 && + + ((c[262] === 0x00 && + c[263] === 0x30 && + c[264] === 0x30) || + + (c[262] === 0x20 && + c[263] === 0x20 && + c[264] === 0x00)) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/umask.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/umask.js new file mode 100644 index 00000000..60748be1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/umask.js @@ -0,0 +1,17 @@ +var umask = require("umask") +var npmlog = require("npmlog") +var _fromString = umask.fromString + +module.exports = umask + +// fromString with logging callback +umask.fromString = function (val) { + _fromString(val, function (err, result) { + if (err) { + npmlog.warn("invalid umask", err.message) + } + val = result + }) + + return val +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/utils/warn-deprecated.js b/bin/nodejs0.12.16/node_modules/npm/lib/utils/warn-deprecated.js new file mode 100644 index 00000000..a751f007 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/utils/warn-deprecated.js @@ -0,0 +1,24 @@ +module.exports = warnDeprecated + +var log = require("npmlog") + +var deprecations = {} + +function warnDeprecated (type) { + return function warn (messages, instance) { + if (!instance) { + if (!deprecations[type]) { + deprecations[type] = {} + messages.forEach(function (m) { log.warn(type, m) }) + } + } + else { + if (!deprecations[type]) deprecations[type] = {} + + if (!deprecations[type][instance]) { + deprecations[type][instance] = true + messages.forEach(function (m) { log.warn(type, m) }) + } + } + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/version.js b/bin/nodejs0.12.16/node_modules/npm/lib/version.js new file mode 100644 index 00000000..2e4628f7 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/version.js @@ -0,0 +1,209 @@ +// npm version + +module.exports = version + +var semver = require('semver') +var path = require('path') +var fs = require('graceful-fs') +var writeFileAtomic = require('write-file-atomic') +var chain = require('slide').chain +var log = require('npmlog') +var npm = require('./npm.js') +var git = require('./utils/git.js') +var assert = require('assert') +var lifecycle = require('./utils/lifecycle.js') + +version.usage = 'npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease]' + + '\n(run in package dir)\n' + + "'npm -v' or 'npm --version' to print npm version " + + '(' + npm.version + ')\n' + + "'npm view version' to view a package's " + + 'published version\n' + + "'npm ls' to inspect current package/dependency versions" + +function version (args, silent, cb_) { + if (typeof cb_ !== 'function') { + cb_ = silent + silent = false + } + if (args.length > 1) return cb_(version.usage) + + var packagePath = path.join(npm.localPrefix, 'package.json') + fs.readFile(packagePath, function (er, data) { + if (data) data = data.toString() + try { + data = JSON.parse(data) + } catch (e) { + er = e + data = null + } + + if (!args.length) return dump(data, cb_) + + if (er) { + log.error('version', 'No valid package.json found') + return cb_(er) + } + + var newVersion = semver.valid(args[0]) + if (!newVersion) newVersion = semver.inc(data.version, args[0]) + if (!newVersion) return cb_(version.usage) + if (data.version === newVersion) return cb_(new Error('Version not changed')) + data.version = newVersion + var lifecycleData = Object.create(data) + lifecycleData._id = data.name + '@' + newVersion + var localData = {} + + var where = npm.prefix + chain([ + [checkGit, localData], + [lifecycle, lifecycleData, 'preversion', where], + [updatePackage, newVersion, silent], + [lifecycle, lifecycleData, 'version', where], + [commit, localData, newVersion], + [lifecycle, lifecycleData, 'postversion', where] ], + cb_) + }) +} + +function readPackage (cb) { + var packagePath = path.join(npm.localPrefix, 'package.json') + fs.readFile(packagePath, function (er, data) { + if (er) return cb(new Error(er)) + if (data) data = data.toString() + try { + data = JSON.parse(data) + } catch (e) { + er = e + data = null + } + cb(er, data) + }) +} + +function updatePackage (newVersion, silent, cb_) { + function cb (er) { + if (!er && !silent) console.log('v' + newVersion) + cb_(er) + } + + readPackage(function (er, data) { + if (er) return cb(new Error(er)) + data.version = newVersion + write(data, 'package.json', cb) + }) +} + +function commit (localData, newVersion, cb) { + updateShrinkwrap(newVersion, function (er, hasShrinkwrap) { + if (er || !localData.hasGit) return cb(er) + _commit(newVersion, hasShrinkwrap, cb) + }) +} + +function updateShrinkwrap (newVersion, cb) { + fs.readFile(path.join(npm.localPrefix, 'npm-shrinkwrap.json'), function (er, data) { + if (er && er.code === 'ENOENT') return cb(null, false) + + try { + data = data.toString() + data = JSON.parse(data) + } catch (er) { + log.error('version', 'Bad npm-shrinkwrap.json data') + return cb(er) + } + + data.version = newVersion + write(data, 'npm-shrinkwrap.json', function (er) { + if (er) { + log.error('version', 'Bad npm-shrinkwrap.json data') + return cb(er) + } + cb(null, true) + }) + }) +} + +function dump (data, cb) { + var v = {} + + if (data && data.name && data.version) v[data.name] = data.version + v.npm = npm.version + Object.keys(process.versions).sort().forEach(function (k) { + v[k] = process.versions[k] + }) + + if (npm.config.get('json')) v = JSON.stringify(v, null, 2) + + console.log(v) + cb() +} + +function checkGit (localData, cb) { + fs.stat(path.join(npm.localPrefix, '.git'), function (er, s) { + var doGit = !er && npm.config.get('git-tag-version') + if (!doGit) { + if (er) log.verbose('version', 'error checking for .git', er) + log.verbose('version', 'not tagging in git') + return cb(null, false) + } + + // check for git + git.whichAndExec( + [ 'status', '--porcelain' ], + { env: process.env }, + function (er, stdout) { + if (er && er.code === 'ENOGIT') { + log.warn( + 'version', + 'This is a Git checkout, but the git command was not found.', + 'npm could not create a Git tag for this release!' + ) + return cb(null, false) + } + + var lines = stdout.trim().split('\n').filter(function (line) { + return line.trim() && !line.match(/^\?\? /) + }).map(function (line) { + return line.trim() + }) + if (lines.length && !npm.config.get('force')) { + return cb(new Error( + 'Git working directory not clean.\n' + lines.join('\n') + )) + } + localData.hasGit = true + cb(null, true) + } + ) + }) +} + +function _commit (version, hasShrinkwrap, cb) { + var packagePath = path.join(npm.localPrefix, 'package.json') + var options = { env: process.env } + var message = npm.config.get('message').replace(/%s/g, version) + var sign = npm.config.get('sign-git-tag') + var flag = sign ? '-sm' : '-am' + chain( + [ + git.chainableExec([ 'add', packagePath ], options), + hasShrinkwrap && git.chainableExec([ 'add', 'npm-shrinkwrap.json' ], options), + git.chainableExec([ 'commit', '-m', message ], options), + git.chainableExec([ 'tag', npm.config.get('tag-version-prefix') + version, flag, message ], options) + ], + cb + ) +} + +function write (data, file, cb) { + assert(data && typeof data === 'object', 'must pass data to version write') + assert(typeof file === 'string', 'must pass filename to write to version write') + + log.verbose('version.write', 'data', data, 'to', file) + writeFileAtomic( + path.join(npm.localPrefix, file), + new Buffer(JSON.stringify(data, null, 2) + '\n'), + cb + ) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/view.js b/bin/nodejs0.12.16/node_modules/npm/lib/view.js new file mode 100644 index 00000000..d9e5f9ae --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/view.js @@ -0,0 +1,302 @@ +// npm view [pkg [pkg ...]] + +module.exports = view +view.usage = "npm view pkg[@version] [[.subfield]...]" + +var npm = require("./npm.js") + , readJson = require("read-package-json") + , log = require("npmlog") + , util = require("util") + , semver = require("semver") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , path = require("path") + +view.completion = function (opts, cb) { + if (opts.conf.argv.remain.length <= 2) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + return cb() + } + // have the package, get the fields. + var tag = npm.config.get("tag") + mapToRegistry(opts.conf.argv.remain[2], npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, d) { + if (er) return cb(er) + var dv = d.versions[d["dist-tags"][tag]] + , fields = [] + d.versions = Object.keys(d.versions).sort(semver.compareLoose) + fields = getFields(d).concat(getFields(dv)) + cb(null, fields) + }) + }) + + function getFields (d, f, pref) { + f = f || [] + if (!d) return f + pref = pref || [] + Object.keys(d).forEach(function (k) { + if (k.charAt(0) === "_" || k.indexOf(".") !== -1) return + var p = pref.concat(k).join(".") + f.push(p) + if (Array.isArray(d[k])) { + d[k].forEach(function (val, i) { + var pi = p + "[" + i + "]" + if (val && typeof val === "object") getFields(val, f, [p]) + else f.push(pi) + }) + return + } + if (typeof d[k] === "object") getFields(d[k], f, [p]) + }) + return f + } +} + +function view (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + if (!args.length) args = ["."] + + var pkg = args.shift() + , nv = npa(pkg) + , name = nv.name + , local = (name === "." || !name) + + if (npm.config.get("global") && local) { + return cb(new Error("Cannot use view command in global mode.")) + } + + if (local) { + var dir = npm.prefix + readJson(path.resolve(dir, "package.json"), function (er, d) { + d = d || {} + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (!d.name) return cb(new Error("Invalid package.json")) + + var p = d.name + nv = npa(p) + if (pkg && ~pkg.indexOf("@")) { + nv.rawSpec = pkg.split("@")[pkg.indexOf("@")] + } + + fetchAndRead(nv, args, silent, cb) + }) + } else { + fetchAndRead(nv, args, silent, cb) + } +} + +function fetchAndRead (nv, args, silent, cb) { + // get the data about this package + var name = nv.name + , version = nv.rawSpec || npm.config.get("tag") + + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, data) { + if (er) return cb(er) + if (data["dist-tags"] && data["dist-tags"].hasOwnProperty(version)) { + version = data["dist-tags"][version] + } + + if (data.time && data.time.unpublished) { + var u = data.time.unpublished + er = new Error("Unpublished by " + u.name + " on " + u.time) + er.statusCode = 404 + er.code = "E404" + er.pkgid = data._id + return cb(er, data) + } + + + var results = [] + , error = null + , versions = data.versions || {} + data.versions = Object.keys(versions).sort(semver.compareLoose) + if (!args.length) args = [""] + + // remove readme unless we asked for it + if (-1 === args.indexOf("readme")) { + delete data.readme + } + + Object.keys(versions).forEach(function (v) { + if (semver.satisfies(v, version, true)) args.forEach(function (args) { + // remove readme unless we asked for it + if (-1 === args.indexOf("readme")) { + delete versions[v].readme + } + results.push(showFields(data, versions[v], args)) + }) + }) + results = results.reduce(reducer, {}) + var retval = results + + if (args.length === 1 && args[0] === "") { + retval = cleanBlanks(retval) + log.silly("cleanup", retval) + } + + if (error || silent) cb(error, retval) + else printData(results, data._id, cb.bind(null, error, retval)) + }) + }) +} + +function cleanBlanks (obj) { + var clean = {} + Object.keys(obj).forEach(function (version) { + clean[version] = obj[version][""] + }) + return clean +} + +function reducer (l, r) { + if (r) Object.keys(r).forEach(function (v) { + l[v] = l[v] || {} + Object.keys(r[v]).forEach(function (t) { + l[v][t] = r[v][t] + }) + }) + return l +} + +// return whatever was printed +function showFields (data, version, fields) { + var o = {} + ;[data, version].forEach(function (s) { + Object.keys(s).forEach(function (k) { + o[k] = s[k] + }) + }) + return search(o, fields.split("."), version.version, fields) +} + +function search (data, fields, version, title) { + var field + , tail = fields + while (!field && fields.length) field = tail.shift() + fields = [field].concat(tail) + var o + if (!field && !tail.length) { + o = {} + o[version] = {} + o[version][title] = data + return o + } + var index = field.match(/(.+)\[([^\]]+)\]$/) + if (index) { + field = index[1] + index = index[2] + if (data.field && data.field.hasOwnProperty(index)) { + return search(data[field][index], tail, version, title) + } else { + field = field + "[" + index + "]" + } + } + if (Array.isArray(data)) { + if (data.length === 1) { + return search(data[0], fields, version, title) + } + var results = [] + data.forEach(function (data, i) { + var tl = title.length + , newt = title.substr(0, tl-(fields.join(".").length) - 1) + + "["+i+"]" + [""].concat(fields).join(".") + results.push(search(data, fields.slice(), version, newt)) + }) + results = results.reduce(reducer, {}) + return results + } + if (!data.hasOwnProperty(field)) return undefined + data = data[field] + if (tail.length) { + if (typeof data === "object") { + // there are more fields to deal with. + return search(data, tail, version, title) + } else { + return new Error("Not an object: "+data) + } + } + o = {} + o[version] = {} + o[version][title] = data + return o +} + +function printData (data, name, cb) { + var versions = Object.keys(data) + , msg = "" + , includeVersions = versions.length > 1 + , includeFields + + versions.forEach(function (v) { + var fields = Object.keys(data[v]) + includeFields = includeFields || (fields.length > 1) + fields.forEach(function (f) { + var d = cleanup(data[v][f]) + if (includeVersions || includeFields || typeof d !== "string") { + d = cleanup(data[v][f]) + d = npm.config.get("json") + ? JSON.stringify(d, null, 2) + : util.inspect(d, false, 5, npm.color) + } else if (typeof d === "string" && npm.config.get("json")) { + d = JSON.stringify(d) + } + if (f && includeFields) f += " = " + if (d.indexOf("\n") !== -1) d = " \n" + d + msg += (includeVersions ? name + "@" + v + " " : "") + + (includeFields ? f : "") + d + "\n" + }) + }) + + // preserve output symmetry by adding a whitespace-only line at the end if + // there's one at the beginning + if (/^\s*\n/.test(msg)) msg += "\n" + + // print directly to stdout to not unnecessarily add blank lines + process.stdout.write(msg) + + cb(null, data) +} +function cleanup (data) { + if (Array.isArray(data)) { + if (data.length === 1) { + data = data[0] + } else { + return data.map(cleanup) + } + } + if (!data || typeof data !== "object") return data + + if (typeof data.versions === "object" + && data.versions + && !Array.isArray(data.versions)) { + data.versions = Object.keys(data.versions || {}) + } + + var keys = Object.keys(data) + keys.forEach(function (d) { + if (d.charAt(0) === "_") delete data[d] + else if (typeof data[d] === "object") data[d] = cleanup(data[d]) + }) + keys = Object.keys(data) + if (keys.length <= 3 + && data.name + && (keys.length === 1 + || keys.length === 3 && data.email && data.url + || keys.length === 2 && (data.email || data.url))) { + data = unparsePerson(data) + } + return data +} +function unparsePerson (d) { + if (typeof d === "string") return d + return d.name + + (d.email ? " <"+d.email+">" : "") + + (d.url ? " ("+d.url+")" : "") +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/visnup.js b/bin/nodejs0.12.16/node_modules/npm/lib/visnup.js new file mode 100644 index 00000000..fff87bda --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/visnup.js @@ -0,0 +1,42 @@ +module.exports = visnup +var npm = require("./npm.js") + +var handsomeFace = [ + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 237, 236, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 235, 236, 235, 233, 237, 235, 233, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 235, 233, 232, 235, 235, 234, 233, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 237, 235, 232, 232, 234, 233, 233, 232, 232, 233, 232, 232, 235, 232, 233, 234, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 232, 232, 232, 239, 238, 235, 233, 232, 232, 232, 232, 232, 232, 232, 233, 235, 232, 233, 233, 232, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 234, 234, 232, 233, 234, 233, 234, 235, 233, 235, 60, 238, 238, 234, 234, 233, 234, 233, 238, 251, 246, 233, 233, 232, 0, 0, 0, 0, 0, 0] + ,[0, 0, 233, 233, 233, 232, 232, 239, 249, 251, 252, 231, 231, 188, 250, 254, 59, 60, 255, 231, 231, 231, 252, 235, 239, 235, 232, 233, 0, 0, 0, 0, 0, 0] + ,[0, 0, 232, 233, 232, 232, 232, 248, 231, 231, 231, 231, 231, 231, 231, 254, 238, 254, 231, 231, 231, 231, 231, 252, 233, 235, 237, 233, 234, 0, 0, 0, 0, 0] + ,[0, 0, 233, 232, 232, 232, 248, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 251, 233, 233, 233, 236, 233, 0, 0, 0, 0] + ,[232, 233, 233, 232, 232, 246, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 249, 233, 234, 234, 0, 0, 0, 0] + ,[232, 232, 232, 232, 233, 249, 231, 255, 255, 255, 255, 254, 109, 60, 239, 237, 238, 237, 235, 235, 235, 235, 236, 235, 235, 235, 234, 232, 232, 232, 232, 232, 233, 0] + ,[0, 232, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, 235, 236, 238, 238, 235, 188, 254, 254, 145, 236, 252, 254, 254, 254, 254, 249, 236, 235, 232, 232, 233, 0] + ,[0, 0, 233, 237, 249, 239, 233, 252, 231, 231, 231, 231, 231, 231, 254, 235, 235, 254, 231, 231, 251, 235, 237, 231, 231, 231, 231, 7, 237, 235, 232, 233, 233, 0] + ,[0, 0, 0, 0, 233, 248, 239, 233, 231, 231, 231, 231, 254, 233, 233, 235, 254, 255, 231, 254, 237, 236, 254, 239, 235, 235, 233, 233, 232, 232, 233, 232, 0, 0] + ,[0, 0, 0, 232, 233, 246, 255, 255, 236, 236, 236, 236, 236, 255, 231, 231, 231, 231, 231, 231, 252, 234, 248, 231, 231, 231, 231, 248, 232, 232, 232, 0, 0, 0] + ,[0, 0, 0, 0, 235, 237, 7, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 255, 238, 235, 7, 231, 231, 231, 246, 232, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 235, 103, 188, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 252, 232, 238, 231, 231, 255, 244, 232, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 235, 236, 103, 146, 253, 255, 231, 231, 231, 231, 231, 253, 251, 250, 250, 250, 246, 232, 235, 152, 255, 146, 66, 233, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 233, 103, 146, 146, 146, 146, 254, 231, 231, 231, 109, 103, 146, 255, 188, 239, 240, 103, 255, 253, 103, 238, 234, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 232, 235, 109, 146, 146, 146, 146, 146, 252, 152, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 103, 235, 233, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 235, 235, 103, 146, 146, 146, 146, 146, 146, 188, 188, 188, 188, 188, 188, 152, 146, 146, 146, 66, 235, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 233, 235, 66, 146, 146, 146, 146, 152, 255, 146, 240, 239, 241, 109, 146, 146, 146, 103, 233, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 237, 109, 146, 146, 146, 146, 146, 254, 231, 231, 188, 146, 146, 146, 103, 233, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 237, 60, 103, 146, 146, 146, 146, 146, 103, 66, 60, 235, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 233, 233, 236, 235, 237, 235, 237, 237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] + + +function visnup (args, cb) { + handsomeFace.forEach(function (line) { + console.log(line.map(function (ch) { + return "\033[" + (ch ? "48;5;" + ch : ch) + "m" + }).join(' ')) + }) + + var c = args.shift() + if (c) npm.commands[c](args, cb) + else cb() +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/whoami.js b/bin/nodejs0.12.16/node_modules/npm/lib/whoami.js new file mode 100644 index 00000000..84d7dc56 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/whoami.js @@ -0,0 +1,47 @@ +var npm = require("./npm.js") + +module.exports = whoami + +whoami.usage = "npm whoami\n(just prints username according to given registry)" + +function whoami (args, silent, cb) { + // FIXME: need tighter checking on this, but is a breaking change + if (typeof cb !== "function") { + cb = silent + silent = false + } + + var registry = npm.config.get("registry") + if (!registry) return cb(new Error("no default registry set")) + + var auth = npm.config.getCredentialsByURI(registry) + if (auth) { + if (auth.username) { + if (!silent) console.log(auth.username) + return process.nextTick(cb.bind(this, null, auth.username)) + } + else if (auth.token) { + return npm.registry.whoami(registry, { auth : auth }, function (er, username) { + if (er) return cb(er) + if (!username) { + var needNewSession = new Error( + "Your auth token is no longer valid. Please log in again." + ) + needNewSession.code = 'ENEEDAUTH' + return cb(needNewSession) + } + + if (!silent) console.log(username) + cb(null, username) + }) + } + } + + // At this point, if they have a credentials object, it doesn't have a token + // or auth in it. Probably just the default registry. + var needAuth = new Error( + "this command requires you to be logged in." + ) + needAuth.code = 'ENEEDAUTH' + process.nextTick(cb.bind(this, needAuth)) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/lib/xmas.js b/bin/nodejs0.12.16/node_modules/npm/lib/xmas.js new file mode 100644 index 00000000..cb914d00 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/lib/xmas.js @@ -0,0 +1,55 @@ +// happy xmas +var log = require("npmlog") + +module.exports = function (args, cb) { +var s = process.platform === "win32" ? " *" : " \u2605" + , f = "\uFF0F" + , b = "\uFF3C" + , x = process.platform === "win32" ? " " : "" + , o = [ "\u0069" , "\u0020", "\u0020", "\u0020", "\u0020", "\u0020" + , "\u0020", "\u0020", "\u0020", "\u0020", "\u0020", "\u0020" + , "\u0020", "\u2E1B","\u2042","\u2E2E","&","@","\uFF61" ] + , oc = [21,33,34,35,36,37] + , l = "\u005e" + +function w (s) { process.stderr.write(s) } + +w("\n") +;(function T (H) { + for (var i = 0; i < H; i ++) w(" ") + w(x+"\033[33m"+s+"\n") + var M = H * 2 - 1 + for (var L = 1; L <= H; L ++) { + var O = L * 2 - 2 + var S = (M - O) / 2 + for (i = 0; i < S; i ++) w(" ") + w(x+"\033[32m"+f) + for (i = 0; i < O; i ++) w( + "\033["+oc[Math.floor(Math.random()*oc.length)]+"m"+ + o[Math.floor(Math.random() * o.length)] + ) + w(x+"\033[32m"+b+"\n") + } + w(" ") + for (i = 1; i < H; i ++) w("\033[32m"+l) + w("| "+x+" |") + for (i = 1; i < H; i ++) w("\033[32m"+l) + if (H > 10) { + w("\n ") + for (i = 1; i < H; i ++) w(" ") + w("| "+x+" |") + for (i = 1; i < H; i ++) w(" ") + } +})(20) +w("\n\n") +log.heading = '' +log.addLevel('npm', 100000, log.headingStyle) +log.npm("loves you", "Happy Xmas, Noders!") +cb() +} +var dg=false +Object.defineProperty(module.exports, "usage", {get:function () { + if (dg) module.exports([], function () {}) + dg = true + return " " +}}) diff --git a/bin/nodejs0.12.16/node_modules/npm/make.bat b/bin/nodejs0.12.16/node_modules/npm/make.bat new file mode 100644 index 00000000..e4e15e72 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/make.bat @@ -0,0 +1,3 @@ +:: The tests run "make doc" in the prepublish script, +:: so this file gives windows something that'll exit +:: successfully, without having to install make. diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-README.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-README.1 new file mode 100644 index 00000000..b5519dc0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-README.1 @@ -0,0 +1,181 @@ +.TH "NPM" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm\fR \- a JavaScript package manager +.P +Build Status \fIhttps://img\.shields\.io/travis/npm/npm/master\.svg\fR \fIhttps://travis\-ci\.org/npm/npm\fR +.SH SYNOPSIS +.P +This is just enough info to get you up and running\. +.P +Much more info available via \fBnpm help\fP once it's installed\. +.SH IMPORTANT +.P +\fBYou need node v0\.8 or higher to run this program\.\fR +.P +To install an old \fBand unsupported\fR version of npm that works on node 0\.3 +and prior, clone the git repo and dig through the old tags and branches\. +.P +\fBnpm is configured to use npm, Inc\.'s public package registry at +https://registry\.npmjs\.org by default\.\fR +.P +You can configure npm to use any compatible registry you +like, and even run your own registry\. Check out the doc on +registries \fIhttps://docs\.npmjs\.com/misc/registry\fR\|\. +.P +Use of someone else's registry may be governed by terms of use\. The +terms of use for the default public registry are available at +https://www\.npmjs\.com\|\. +.SH Super Easy Install +.P +npm is bundled with node \fIhttp://nodejs\.org/download/\fR\|\. +.SS Windows Computers +.P +Get the MSI \fIhttp://nodejs\.org/download/\fR\|\. npm is in it\. +.SS Apple Macintosh Computers +.P +Get the pkg \fIhttp://nodejs\.org/download/\fR\|\. npm is in it\. +.SS Other Sorts of Unices +.P +Run \fBmake install\fP\|\. npm will be installed with node\. +.P +If you want a more fancy pants install (a different version, customized +paths, etc\.) then read on\. +.SH Fancy Install (Unix) +.P +There's a pretty robust install script at +https://www\.npmjs\.com/install\.sh\|\. You can download that and run it\. +.P +Here's an example using curl: +.P +.RS 2 +.nf +curl \-L https://www\.npmjs\.com/install\.sh | sh +.fi +.RE +.SS Slightly Fancier +.P +You can set any npm configuration params with that script: +.P +.RS 2 +.nf +npm_config_prefix=/some/path sh install\.sh +.fi +.RE +.P +Or, you can run it in uber\-debuggery mode: +.P +.RS 2 +.nf +npm_debug=1 sh install\.sh +.fi +.RE +.SS Even Fancier +.P +Get the code with git\. Use \fBmake\fP to build the docs and do other stuff\. +If you plan on hacking on npm, \fBmake link\fP is your friend\. +.P +If you've got the npm source code, you can also semi\-permanently set +arbitrary config keys using the \fB\|\./configure \-\-key=val \.\.\.\fP, and then +run npm commands by doing \fBnode cli\.js \fP\|\. (This is helpful +for testing, or running stuff without actually installing npm itself\.) +.SH Windows Install or Upgrade +.P +You can download a zip file from https://github\.com/npm/npm/releases, and +unpack it in the \fBnode_modules\\npm\\\fP folder inside node's installation folder\. +.P +To upgrade to npm 2, follow the Windows upgrade instructions in +the npm Troubleshooting Guide: +.P +https://github\.com/npm/npm/wiki/Troubleshooting#upgrading\-on\-windows +.P +If that's not fancy enough for you, then you can fetch the code with +git, and mess with it directly\. +.SH Installing on Cygwin +.P +No\. +.SH Uninstalling +.P +So sad to see you go\. +.P +.RS 2 +.nf +sudo npm uninstall npm \-g +.fi +.RE +.P +Or, if that fails, +.P +.RS 2 +.nf +sudo make uninstall +.fi +.RE +.SH More Severe Uninstalling +.P +Usually, the above instructions are sufficient\. That will remove +npm, but leave behind anything you've installed\. +.P +If you would like to remove all the packages that you have installed, +then you can use the \fBnpm ls\fP command to find them, and then \fBnpm rm\fP to +remove them\. +.P +To remove cruft left behind by npm 0\.x, you can use the included +\fBclean\-old\.sh\fP script file\. You can run it conveniently like this: +.P +.RS 2 +.nf +npm explore npm \-g \-\- sh scripts/clean\-old\.sh +.fi +.RE +.P +npm uses two configuration files, one for per\-user configs, and another +for global (every\-user) configs\. You can view them by doing: +.P +.RS 2 +.nf +npm config get userconfig # defaults to ~/\.npmrc +npm config get globalconfig # defaults to /usr/local/etc/npmrc +.fi +.RE +.P +Uninstalling npm does not remove configuration files by default\. You +must remove them yourself manually if you want them gone\. Note that +this means that future npm installs will not remember the settings that +you have chosen\. +.SH More Docs +.P +Check out the docs \fIhttps://docs\.npmjs\.com/\fR, +especially the faq \fIhttps://docs\.npmjs\.com/misc/faq\fR\|\. +.P +You can use the \fBnpm help\fP command to read any of them\. +.P +If you're a developer, and you want to use npm to publish your program, +you should read this \fIhttps://docs\.npmjs\.com/misc/developers\fR +.SH BUGS +.P +When you find issues, please report them: +.RS 0 +.IP \(bu 2 +web: +https://github\.com/npm/npm/issues + +.RE +.P +Be sure to include \fIall\fR of the output from the npm command that didn't work +as expected\. The \fBnpm\-debug\.log\fP file is also helpful to provide\. +.P +You can also look for isaacs in #node\.js on irc://irc\.freenode\.net\. He +will no doubt tell you to put the output in a gist or email\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help npm +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help help +.IP \(bu 2 +npm help 7 index + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-access.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-access.1 new file mode 100644 index 00000000..ffaa5587 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-access.1 @@ -0,0 +1,89 @@ +.TH "NPM\-ACCESS" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-access\fR \- Set access level on published packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm access public [] +npm access restricted [] + +npm access grant [] +npm access revoke [] + +npm access ls\-packages [||] +npm access ls\-collaborators [ []] +npm access edit [] +.fi +.RE +.SH DESCRIPTION +.P +Used to set access controls on private packages\. +.P +For all of the subcommands, \fBnpm access\fP will perform actions on the packages +in the current working directory if no package name is passed to the +subcommand\. +.RS 0 +.IP \(bu 2 +public / restricted: +Set a package to be either publicly accessible or restricted\. +.IP \(bu 2 +grant / revoke: +Add or remove the ability of users and teams to have read\-only or read\-write +access to a package\. +.IP \(bu 2 +ls\-packages: +Show all of the packages a user or a team is able to access, along with the +access level, except for read\-only public packages (it won't print the whole +registry listing) +.IP \(bu 2 +ls\-collaborators: +Show all of the access privileges for a package\. Will only show permissions +for packages to which you have at least read access\. If \fB\fP is passed in, +the list is filtered only to teams \fIthat\fR user happens to belong to\. +.IP \(bu 2 +edit: +Set the access privileges for a package at once using \fB$EDITOR\fP\|\. + +.RE +.SH DETAILS +.P +\fBnpm access\fP always operates directly on the current registry, configurable +from the command line using \fB\-\-registry=\fP\|\. +.P +Unscoped packages are \fIalways public\fR\|\. +.P +Scoped packages \fIdefault to restricted\fR, but you can either publish them as +public using \fBnpm publish \-\-access=public\fP, or set their access as public using +\fBnpm access public\fP after the initial publish\. +.P +You must have privileges to set the access of a package: +.RS 0 +.IP \(bu 2 +You are an owner of an unscoped or scoped package\. +.IP \(bu 2 +You are a member of the team that owns a scope\. +.IP \(bu 2 +You have been given read\-write privileges for a package, either as a member +of a team or directly as an owner\. + +.RE +.P +If your account is not paid, then attempts to publish scoped packages will fail +with an HTTP 402 status code (logically enough), unless you use +\fB\-\-access=public\fP\|\. +.P +Management of teams and team memberships is done with the \fBnpm team\fP command\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help team +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 7 registry + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-adduser.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-adduser.1 new file mode 100644 index 00000000..61a1afdb --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-adduser.1 @@ -0,0 +1,90 @@ +.TH "NPM\-ADDUSER" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-adduser\fR \- Add a registry user account +.SH SYNOPSIS +.P +.RS 2 +.nf +npm adduser [\-\-registry=url] [\-\-scope=@orgname] [\-\-always\-auth] + +aliases: login, add\-user +.fi +.RE +.SH DESCRIPTION +.P +Create or verify a user named \fB\fP in the specified registry, and +save the credentials to the \fB\|\.npmrc\fP file\. If no registry is specified, +the default registry will be used (see npm help 7 \fBnpm\-config\fP)\. +.P +The username, password, and email are read in from prompts\. +.P +To reset your password, go to https://www\.npmjs\.com/forgot +.P +To change your email address, go to https://www\.npmjs\.com/email\-edit +.P +You may use this command multiple times with the same user account to +authorize on a new machine\. When authenticating on a new machine, +the username, password and email address must all match with +your existing record\. +.P +\fBnpm login\fP is an alias to \fBadduser\fP and behaves exactly the same way\. +.SH CONFIGURATION +.SS registry +.P +Default: https://registry\.npmjs\.org/ +.P +The base URL of the npm package registry\. If \fBscope\fP is also specified, +this registry will only be used for packages with that scope\. See npm help 7 \fBnpm\-scope\fP\|\. +.SS scope +.P +Default: none +.P +If specified, the user and login credentials given will be associated +with the specified scope\. See npm help 7 \fBnpm\-scope\fP\|\. You can use both at the same time, +e\.g\. +.P +.RS 2 +.nf +npm adduser \-\-registry=http://myregistry\.example\.com \-\-scope=@myco +.fi +.RE +.P +This will set a registry for the given scope and login or create a user for +that registry at the same time\. +.SS always\-auth +.P +Default: false +.P +If specified, save configuration indicating that all requests to the given +registry should include authorization information\. Useful for private +registries\. Can be used with \fB\-\-registry\fP and / or \fB\-\-scope\fP, e\.g\. +.P +.RS 2 +.nf +npm adduser \-\-registry=http://private\-registry\.example\.com \-\-always\-auth +.fi +.RE +.P +This will ensure that all requests to that registry (including for tarballs) +include an authorization header\. This setting may be necessary for use with +private registries where metadata and package tarballs are stored on hosts with +different hostnames\. See \fBalways\-auth\fP in npm help 7 \fBnpm\-config\fP for more details on +always\-auth\. Registry\-specific configuration of \fBalways\-auth\fP takes precedence +over any global configuration\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help owner +.IP \(bu 2 +npm help whoami + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-bin.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-bin.1 new file mode 100644 index 00000000..9489f6b5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-bin.1 @@ -0,0 +1,30 @@ +.TH "NPM\-BIN" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-bin\fR \- Display npm bin folder +.SH SYNOPSIS +.P +.RS 2 +.nf +npm bin +.fi +.RE +.SH DESCRIPTION +.P +Print the folder where npm will install executables\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help prefix +.IP \(bu 2 +npm help root +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-bugs.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-bugs.1 new file mode 100644 index 00000000..219b4228 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-bugs.1 @@ -0,0 +1,61 @@ +.TH "NPM\-BUGS" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe +.SH SYNOPSIS +.P +.RS 2 +.nf +npm bugs +npm bugs (with no args in a package dir) + +aliases: issues +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +bug tracker URL, and then tries to open it using the \fB\-\-browser\fP +config param\. If no package name is provided, it will search for +a \fBpackage\.json\fP in the current folder and use the \fBname\fP property\. +.SH CONFIGURATION +.SS browser +.RS 0 +.IP \(bu 2 +Default: OS X: \fB"open"\fP, Windows: \fB"start"\fP, Others: \fB"xdg\-open"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The browser that is called by the \fBnpm bugs\fP command to open websites\. +.SS registry +.RS 0 +.IP \(bu 2 +Default: https://registry\.npmjs\.org/ +.IP \(bu 2 +Type: url + +.RE +.P +The base URL of the npm package registry\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help docs +.IP \(bu 2 +npm help view +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 5 package\.json + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-build.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-build.1 new file mode 100644 index 00000000..d2cdccc2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-build.1 @@ -0,0 +1,41 @@ +.TH "NPM\-BUILD" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-build\fR \- Build a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm build +.fi +.RE +.RS 0 +.IP \(bu 2 +\fB\fP: +A folder containing a \fBpackage\.json\fP file in its root\. + +.RE +.SH DESCRIPTION +.P +This is the plumbing command called by \fBnpm link\fP and \fBnpm install\fP\|\. +.P +It should generally be called during installation, but if you need to run it +directly, run: +.P +.RS 2 +.nf +npm run\-script build +.fi +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help link +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help 5 package\.json + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-bundle.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-bundle.1 new file mode 100644 index 00000000..e2de651c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-bundle.1 @@ -0,0 +1,17 @@ +.TH "NPM\-BUNDLE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-bundle\fR \- REMOVED +.SH DESCRIPTION +.P +The \fBnpm bundle\fP command has been removed in 1\.0, for the simple reason +that it is no longer necessary, as the default behavior is now to +install packages into the local space\. +.P +Just use \fBnpm install\fP now to do what \fBnpm bundle\fP used to do\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-cache.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-cache.1 new file mode 100644 index 00000000..0bb06ee7 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-cache.1 @@ -0,0 +1,86 @@ +.TH "NPM\-CACHE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-cache\fR \- Manipulates packages cache +.SH SYNOPSIS +.P +.RS 2 +.nf +npm cache add +npm cache add +npm cache add +npm cache add @ + +npm cache ls [] + +npm cache clean [] +.fi +.RE +.SH DESCRIPTION +.P +Used to add, list, or clear the npm cache folder\. +.RS 0 +.IP \(bu 2 +add: +Add the specified package to the local cache\. This command is primarily +intended to be used internally by npm, but it can provide a way to +add data to the local installation cache explicitly\. +.IP \(bu 2 +ls: +Show the data in the cache\. Argument is a path to show in the cache +folder\. Works a bit like the \fBfind\fP program, but limited by the +\fBdepth\fP config\. +.IP \(bu 2 +clean: +Delete data out of the cache folder\. If an argument is provided, then +it specifies a subpath to delete\. If no argument is provided, then +the entire cache is cleared\. + +.RE +.SH DETAILS +.P +npm stores cache data in the directory specified in \fBnpm config get cache\fP\|\. +For each package that is added to the cache, three pieces of information are +stored in \fB{cache}/{name}/{version}\fP: +.RS 0 +.IP \(bu 2 +\|\.\.\./package/package\.json: +The package\.json file, as npm sees it\. +.IP \(bu 2 +\|\.\.\./package\.tgz: +The tarball for that version\. + +.RE +.P +Additionally, whenever a registry request is made, a \fB\|\.cache\.json\fP file +is placed at the corresponding URI, to store the ETag and the requested +data\. This is stored in \fB{cache}/{hostname}/{path}/\.cache\.json\fP\|\. +.P +Commands that make non\-essential registry requests (such as \fBsearch\fP and +\fBview\fP, or the completion scripts) generally specify a minimum timeout\. +If the \fB\|\.cache\.json\fP file is younger than the specified timeout, then +they do not make an HTTP request to the registry\. +.SH CONFIGURATION +.SS cache +.P +Default: \fB~/\.npm\fP on Posix, or \fB%AppData%/npm\-cache\fP on Windows\. +.P +The root cache folder\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help pack + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-completion.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-completion.1 new file mode 100644 index 00000000..514a4785 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-completion.1 @@ -0,0 +1,37 @@ +.TH "NPM\-COMPLETION" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-completion\fR \- Tab Completion for npm +.SH SYNOPSIS +.P +.RS 2 +.nf +\|\. <(npm completion) +.fi +.RE +.SH DESCRIPTION +.P +Enables tab\-completion in all npm commands\. +.P +The synopsis above +loads the completions into your current shell\. Adding it to +your ~/\.bashrc or ~/\.zshrc will make the completions available +everywhere\. +.P +You may of course also pipe the output of npm completion to a file +such as \fB/usr/local/etc/bash_completion\.d/npm\fP if you have a system +that will read that file for you\. +.P +When \fBCOMP_CWORD\fP, \fBCOMP_LINE\fP, and \fBCOMP_POINT\fP are defined in the +environment, \fBnpm completion\fP acts in "plumbing mode", and outputs +completions based on the arguments\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 developers +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help npm + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-config.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-config.1 new file mode 100644 index 00000000..7605c453 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-config.1 @@ -0,0 +1,97 @@ +.TH "NPM\-CONFIG" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-config\fR \- Manage the npm configuration files +.SH SYNOPSIS +.P +.RS 2 +.nf +npm config set [\-\-global] +npm config get +npm config delete +npm config list +npm config edit +npm c [set|get|delete|list] +npm get +npm set [\-\-global] + +aliases: c +.fi +.RE +.SH DESCRIPTION +.P +npm gets its config settings from the command line, environment +variables, \fBnpmrc\fP files, and in some cases, the \fBpackage\.json\fP file\. +.P +See npm help 5 npmrc for more information about the npmrc files\. +.P +See npm help 7 \fBnpm\-config\fP for a more thorough discussion of the mechanisms +involved\. +.P +The \fBnpm config\fP command can be used to update and edit the contents +of the user and global npmrc files\. +.SH Sub\-commands +.P +Config supports the following sub\-commands: +.SS set +.P +.RS 2 +.nf +npm config set key value +.fi +.RE +.P +Sets the config key to the value\. +.P +If value is omitted, then it sets it to "true"\. +.SS get +.P +.RS 2 +.nf +npm config get key +.fi +.RE +.P +Echo the config value to stdout\. +.SS list +.P +.RS 2 +.nf +npm config list +.fi +.RE +.P +Show all the config settings\. +.SS delete +.P +.RS 2 +.nf +npm config delete key +.fi +.RE +.P +Deletes the key from all configuration files\. +.SS edit +.P +.RS 2 +.nf +npm config edit +.fi +.RE +.P +Opens the config file in an editor\. Use the \fB\-\-global\fP flag to edit the +global config\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help npm + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-dedupe.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-dedupe.1 new file mode 100644 index 00000000..0458853a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-dedupe.1 @@ -0,0 +1,76 @@ +.TH "NPM\-DEDUPE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-dedupe\fR \- Reduce duplication +.SH SYNOPSIS +.P +.RS 2 +.nf +npm dedupe [package names\.\.\.] +npm ddp [package names\.\.\.] + +aliases: find\-dupes, ddp +.fi +.RE +.SH DESCRIPTION +.P +Searches the local package tree and attempts to simplify the overall +structure by moving dependencies further up the tree, where they can +be more effectively shared by multiple dependent packages\. +.P +For example, consider this dependency graph: +.P +.RS 2 +.nf +a ++\-\- b <\-\- depends on c@1\.0\.x +| `\-\- c@1\.0\.3 +`\-\- d <\-\- depends on c@~1\.0\.9 + `\-\- c@1\.0\.10 +.fi +.RE +.P +In this case, npm help \fBnpm\-dedupe\fP will transform the tree to: +.P +.RS 2 +.nf +a ++\-\- b ++\-\- d +`\-\- c@1\.0\.10 +.fi +.RE +.P +Because of the hierarchical nature of node's module lookup, b and d +will both get their dependency met by the single c package at the root +level of the tree\. +.P +If a suitable version exists at the target location in the tree +already, then it will be left untouched, but the other duplicates will +be deleted\. +.P +If no suitable version can be found, then a warning is printed, and +nothing is done\. +.P +If any arguments are supplied, then they are filters, and only the +named packages will be touched\. +.P +Note that this operation transforms the dependency tree, and may +result in packages getting updated versions, perhaps from the npm +registry\. +.P +This feature is experimental, and may change in future versions\. +.P +The \fB\-\-tag\fP argument will apply to all of the affected dependencies\. If a +tag with the given name exists, the tagged version is preferred over newer +versions\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help ls +.IP \(bu 2 +npm help update +.IP \(bu 2 +npm help install + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-deprecate.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-deprecate.1 new file mode 100644 index 00000000..2d80be00 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-deprecate.1 @@ -0,0 +1,37 @@ +.TH "NPM\-DEPRECATE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-deprecate\fR \- Deprecate a version of a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm deprecate [@] +.fi +.RE +.SH DESCRIPTION +.P +This command will update the npm registry entry for a package, providing +a deprecation warning to all who attempt to install it\. +.P +It works on version ranges as well as specific versions, so you can do +something like this: +.P +.RS 2 +.nf +npm deprecate my\-thing@"< 0\.2\.3" "critical bug fixed in v0\.2\.3" +.fi +.RE +.P +Note that you must be the package owner to deprecate something\. See the +\fBowner\fP and \fBadduser\fP help topics\. +.P +To un\-deprecate a package, specify an empty string (\fB""\fP) for the \fBmessage\fP argument\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 registry + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-dist-tag.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-dist-tag.1 new file mode 100644 index 00000000..e5484350 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-dist-tag.1 @@ -0,0 +1,109 @@ +.TH "NPM\-DIST\-TAG" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-dist-tag\fR \- Modify package distribution tags +.SH SYNOPSIS +.P +.RS 2 +.nf +npm dist\-tag add @ [] +npm dist\-tag rm +npm dist\-tag ls [] + +aliases: dist\-tags +.fi +.RE +.SH DESCRIPTION +.P +Add, remove, and enumerate distribution tags on a package: +.RS 0 +.IP \(bu 2 +add: +Tags the specified version of the package with the specified tag, or the +\fB\-\-tag\fP config if not specified\. +.IP \(bu 2 +rm: +Clear a tag that is no longer in use from the package\. +.IP \(bu 2 +ls: +Show all of the dist\-tags for a package, defaulting to the package in +the current prefix\. + +.RE +.P +A tag can be used when installing packages as a reference to a version instead +of using a specific version number: +.P +.RS 2 +.nf +npm install @ +.fi +.RE +.P +When installing dependencies, a preferred tagged version may be specified: +.P +.RS 2 +.nf +npm install \-\-tag +.fi +.RE +.P +This also applies to \fBnpm dedupe\fP\|\. +.P +Publishing a package sets the \fBlatest\fP tag to the published version unless the +\fB\-\-tag\fP option is used\. For example, \fBnpm publish \-\-tag=beta\fP\|\. +.P +By default, \fBnpm install \fP (without any \fB@\fP or \fB@\fP +specifier) installs the \fBlatest\fP tag\. +.SH PURPOSE +.P +Tags can be used to provide an alias instead of version numbers\. +.P +For example, a project might choose to have multiple streams of development +and use a different tag for each stream, +e\.g\., \fBstable\fP, \fBbeta\fP, \fBdev\fP, \fBcanary\fP\|\. +.P +By default, the \fBlatest\fP tag is used by npm to identify the current version of +a package, and \fBnpm install \fP (without any \fB@\fP or \fB@\fP +specifier) installs the \fBlatest\fP tag\. Typically, projects only use the \fBlatest\fP +tag for stable release versions, and use other tags for unstable versions such +as prereleases\. +.P +The \fBnext\fP tag is used by some projects to identify the upcoming version\. +.P +By default, other than \fBlatest\fP, no tag has any special significance to npm +itself\. +.SH CAVEATS +.P +This command used to be known as \fBnpm tag\fP, which only created new tags, and so +had a different syntax\. +.P +Tags must share a namespace with version numbers, because they are specified in +the same slot: \fBnpm install @\fP vs \fBnpm install @\fP\|\. +.P +Tags that can be interpreted as valid semver ranges will be rejected\. For +example, \fBv1\.4\fP cannot be used as a tag, because it is interpreted by semver as +\fB>=1\.4\.0 <1\.5\.0\fP\|\. See https://github\.com/npm/npm/issues/6082\|\. +.P +The simplest way to avoid semver problems with tags is to use tags that do not +begin with a number or the letter \fBv\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help tag +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help dedupe +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-docs.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-docs.1 new file mode 100644 index 00000000..d1b5f118 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-docs.1 @@ -0,0 +1,60 @@ +.TH "NPM\-DOCS" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-docs\fR \- Docs for a package in a web browser maybe +.SH SYNOPSIS +.P +.RS 2 +.nf +npm docs [ [ \.\.\.]] +npm docs (with no args in a package dir) +npm home [ [ \.\.\.]] +npm home (with no args in a package dir) +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +documentation URL, and then tries to open it using the \fB\-\-browser\fP +config param\. You can pass multiple package names at once\. If no +package name is provided, it will search for a \fBpackage\.json\fP in +the current folder and use the \fBname\fP property\. +.SH CONFIGURATION +.SS browser +.RS 0 +.IP \(bu 2 +Default: OS X: \fB"open"\fP, Windows: \fB"start"\fP, Others: \fB"xdg\-open"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The browser that is called by the \fBnpm docs\fP command to open websites\. +.SS registry +.RS 0 +.IP \(bu 2 +Default: https://registry\.npmjs\.org/ +.IP \(bu 2 +Type: url + +.RE +.P +The base URL of the npm package registry\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help view +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 5 package\.json + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-edit.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-edit.1 new file mode 100644 index 00000000..fcf2f3aa --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-edit.1 @@ -0,0 +1,50 @@ +.TH "NPM\-EDIT" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-edit\fR \- Edit an installed package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm edit [@] +.fi +.RE +.SH DESCRIPTION +.P +Opens the package folder in the default editor (or whatever you've +configured as the npm \fBeditor\fP config \-\- see npm help 7 \fBnpm\-config\fP\|\.) +.P +After it has been edited, the package is rebuilt so as to pick up any +changes in compiled packages\. +.P +For instance, you can do \fBnpm install connect\fP to install connect +into your package, and then \fBnpm edit connect\fP to make a few +changes to your locally installed copy\. +.SH CONFIGURATION +.SS editor +.RS 0 +.IP \(bu 2 +Default: \fBEDITOR\fP environment variable if set, or \fB"vi"\fP on Posix, +or \fB"notepad"\fP on Windows\. +.IP \(bu 2 +Type: path + +.RE +.P +The command to run for \fBnpm edit\fP or \fBnpm config edit\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help explore +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-explore.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-explore.1 new file mode 100644 index 00000000..10de60d0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-explore.1 @@ -0,0 +1,55 @@ +.TH "NPM\-EXPLORE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-explore\fR \- Browse an installed package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm explore [ \-\- ] +.fi +.RE +.SH DESCRIPTION +.P +Spawn a subshell in the directory of the installed package specified\. +.P +If a command is specified, then it is run in the subshell, which then +immediately terminates\. +.P +This is particularly handy in the case of git submodules in the +\fBnode_modules\fP folder: +.P +.RS 2 +.nf +npm explore some\-dependency \-\- git pull origin master +.fi +.RE +.P +Note that the package is \fInot\fR automatically rebuilt afterwards, so be +sure to use \fBnpm rebuild \fP if you make any changes\. +.SH CONFIGURATION +.SS shell +.RS 0 +.IP \(bu 2 +Default: SHELL environment variable, or "bash" on Posix, or "cmd" on +Windows +.IP \(bu 2 +Type: path + +.RE +.P +The shell to run for the \fBnpm explore\fP command\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help edit +.IP \(bu 2 +npm help rebuild +.IP \(bu 2 +npm help build +.IP \(bu 2 +npm help install + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-help-search.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-help-search.1 new file mode 100644 index 00000000..cbda29e8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-help-search.1 @@ -0,0 +1,45 @@ +.TH "NPM\-HELP\-SEARCH" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-help-search\fR \- Search npm help documentation +.SH SYNOPSIS +.P +.RS 2 +.nf +npm help\-search some search terms +.fi +.RE +.SH DESCRIPTION +.P +This command will search the npm markdown documentation files for the +terms provided, and then list the results, sorted by relevance\. +.P +If only one result is found, then it will show that help topic\. +.P +If the argument to \fBnpm help\fP is not a known help topic, then it will +call \fBhelp\-search\fP\|\. It is rarely if ever necessary to call this +command directly\. +.SH CONFIGURATION +.SS long +.RS 0 +.IP \(bu 2 +Type: Boolean +.IP \(bu 2 +Default: false + +.RE +.P +If true, the "long" flag will cause help\-search to output context around +where the terms were found in the documentation\. +.P +If false, then help\-search will just list out the help topics found\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help npm +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help help + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-help.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-help.1 new file mode 100644 index 00000000..56b5e906 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-help.1 @@ -0,0 +1,57 @@ +.TH "NPM\-HELP" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-help\fR \- Get help on npm +.SH SYNOPSIS +.P +.RS 2 +.nf +npm help +npm help some search terms +.fi +.RE +.SH DESCRIPTION +.P +If supplied a topic, then show the appropriate documentation page\. +.P +If the topic does not exist, or if multiple terms are provided, then run +the \fBhelp\-search\fP command to find a match\. Note that, if \fBhelp\-search\fP +finds a single subject, then it will run \fBhelp\fP on that topic, so unique +matches are equivalent to specifying a topic name\. +.SH CONFIGURATION +.SS viewer +.RS 0 +.IP \(bu 2 +Default: "man" on Posix, "browser" on Windows +.IP \(bu 2 +Type: path + +.RE +.P +The program to use to view help content\. +.P +Set to \fB"browser"\fP to view html help content in the default web browser\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help npm +.IP \(bu 2 +README +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help help\-search +.IP \(bu 2 +npm help 7 index + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-init.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-init.1 new file mode 100644 index 00000000..a4643cce --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-init.1 @@ -0,0 +1,49 @@ +.TH "NPM\-INIT" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-init\fR \- Interactively create a package\.json file +.SH SYNOPSIS +.P +.RS 2 +.nf +npm init [\-f|\-\-force|\-y|\-\-yes] +.fi +.RE +.SH DESCRIPTION +.P +This will ask you a bunch of questions, and then write a package\.json for you\. +.P +It attempts to make reasonable guesses about what you want things to be set to, +and then writes a package\.json file with the options you've selected\. +.P +If you already have a package\.json file, it'll read that first, and default to +the options in there\. +.P +It is strictly additive, so it does not delete options from your package\.json +without a really good reason to do so\. +.P +If you invoke it with \fB\-f\fP, \fB\-\-force\fP, \fB\-y\fP, or \fB\-\-yes\fP, it will use only +defaults and not prompt you for any options\. +.SH CONFIGURATION +.SS scope +.RS 0 +.IP \(bu 2 +Default: none +.IP \(bu 2 +Type: String + +.RE +.P +The scope under which the new module should be created\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +https://github\.com/isaacs/init\-package\-json +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help version +.IP \(bu 2 +npm help 7 scope + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-install.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-install.1 new file mode 100644 index 00000000..371ed989 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-install.1 @@ -0,0 +1,413 @@ +.TH "NPM\-INSTALL" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-install\fR \- Install a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm install (with no args in a package dir) +npm install +npm install +npm install +npm install [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional] [\-\-save\-exact] [\-\-save\-bundle] +npm install [@/]@ +npm install [@/]@ +npm install [@/]@ +npm i (with any of the previous argument usage) +.fi +.RE +.SH DESCRIPTION +.P +This command installs a package, and any packages that it depends on\. If the +package has a shrinkwrap file, the installation of dependencies will be driven +by that\. See npm help shrinkwrap\. +.P +A \fBpackage\fP is: +.RS 0 +.IP \(bu 2 +a) a folder containing a program described by a npm help 5 \fBpackage\.json\fP file +.IP \(bu 2 +b) a gzipped tarball containing (a) +.IP \(bu 2 +c) a url that resolves to (b) +.IP \(bu 2 +d) a \fB@\fP that is published on the registry (see npm help 7 \fBnpm\-registry\fP) with (c) +.IP \(bu 2 +e) a \fB@\fP (see npm help \fBnpm\-dist\-tag\fP) that points to (d) +.IP \(bu 2 +f) a \fB\fP that has a "latest" tag satisfying (e) +.IP \(bu 2 +g) a \fB\fP that resolves to (b) + +.RE +.P +Even if you never publish your package, you can still get a lot of +benefits of using npm if you just want to write a node program (a), and +perhaps if you also want to be able to easily install it elsewhere +after packing it up into a tarball (b)\. +.RS 0 +.IP \(bu 2 +\fBnpm install\fP (in package directory, no arguments): + Install the dependencies in the local node_modules folder\. + In global mode (ie, with \fB\-g\fP or \fB\-\-global\fP appended to the command), + it installs the current package context (ie, the current working + directory) as a global package\. + By default, \fBnpm install\fP will install all modules listed as dependencies + in npm help 5 \fBpackage\.json\fP\|\. + With the \fB\-\-production\fP flag (or when the \fBNODE_ENV\fP environment variable + is set to \fBproduction\fP), npm will not install modules listed in + \fBdevDependencies\fP\|\. +.IP \(bu 2 +\fBnpm install \fP: + Install a package that is sitting in a folder on the filesystem\. +.IP \(bu 2 +\fBnpm install \fP: + Install a package that is sitting on the filesystem\. Note: if you just want + to link a dev directory into your npm root, you can do this more easily by + using \fBnpm link\fP\|\. + Example: +.P +.RS 2 +.nf + npm install \./package\.tgz +.fi +.RE +.IP \(bu 2 +\fBnpm install \fP: + Fetch the tarball url, and then install it\. In order to distinguish between + this and other options, the argument must start with "http://" or "https://" + Example: +.P +.RS 2 +.nf + npm install https://github\.com/indexzero/forever/tarball/v0\.5\.6 +.fi +.RE +.IP \(bu 2 +\fBnpm install [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional]\fP: + Do a \fB@\fP install, where \fB\fP is the "tag" config\. (See + npm help 7 \fBnpm\-config\fP\|\. The config's default value is \fBlatest\fP\|\.) + In most cases, this will install the latest version + of the module published on npm\. + Example: +.P +.RS 2 +.nf + npm install sax +.fi +.RE + \fBnpm install\fP takes 3 exclusive, optional flags which save or update + the package version in your main package\.json: +.RS 0 +.IP \(bu 2 +\fB\-\-save\fP: Package will appear in your \fBdependencies\fP\|\. +.IP \(bu 2 +\fB\-\-save\-dev\fP: Package will appear in your \fBdevDependencies\fP\|\. +.IP \(bu 2 +\fB\-\-save\-optional\fP: Package will appear in your \fBoptionalDependencies\fP\|\. +When using any of the above options to save dependencies to your +package\.json, there are two additional, optional flags: +.IP \(bu 2 +\fB\-\-save\-exact\fP: Saved dependencies will be configured with an +exact version rather than using npm's default semver range +operator\. +.IP \(bu 2 +\fB\-B, \-\-save\-bundle\fP: Saved dependencies will also be added to your \fBbundleDependencies\fP list\. +Note: if you do not include the @\-symbol on your scope name, npm will +interpret this as a GitHub repository instead, see below\. Scopes names +must also be followed by a slash\. +Examples: +.P +.RS 2 +.nf +npm install sax \-\-save +npm install githubname/reponame +npm install @myorg/privatepackage +npm install node\-tap \-\-save\-dev +npm install dtrace\-provider \-\-save\-optional +npm install readable\-stream \-\-save \-\-save\-exact +npm install ansi\-regex \-\-save \-\-save\-bundle +.fi +.RE + +.RE + +.RE +.P +.RS 2 +.nf +**Note**: If there is a file or folder named `` in the current +working directory, then it will try to install that, and only try to +fetch the package by name if it is not valid\. +.fi +.RE +.RS 0 +.IP \(bu 2 +\fBnpm install [@/]@\fP: + Install the version of the package that is referenced by the specified tag\. + If the tag does not exist in the registry data for that package, then this + will fail\. + Example: +.P +.RS 2 +.nf + npm install sax@latest + npm install @myorg/mypackage@latest +.fi +.RE +.IP \(bu 2 +\fBnpm install [@/]@\fP: + Install the specified version of the package\. This will fail if the + version has not been published to the registry\. + Example: +.P +.RS 2 +.nf + npm install sax@0\.1\.1 + npm install @myorg/privatepackage@1\.5\.0 +.fi +.RE +.IP \(bu 2 +\fBnpm install [@/]@\fP: + Install a version of the package matching the specified version range\. This + will follow the same rules for resolving dependencies described in npm help 5 \fBpackage\.json\fP\|\. + Note that most version ranges must be put in quotes so that your shell will + treat it as a single argument\. + Example: +.P +.RS 2 +.nf + npm install sax@">=0\.1\.0 <0\.2\.0" + npm install @myorg/privatepackage@">=0\.1\.0 <0\.2\.0" +.fi +.RE +.IP \(bu 2 +\fBnpm install \fP: + Install a package by cloning a git remote url\. The format of the git + url is: +.P +.RS 2 +.nf + ://[[:]@][:][:/][#] +.fi +.RE + \fB\fP is one of \fBgit\fP, \fBgit+ssh\fP, \fBgit+http\fP, or + \fBgit+https\fP\|\. If no \fB\fP is specified, then \fBmaster\fP is + used\. + The following git environment variables are recognized by npm and will be added + to the environment when running git: +.RS 0 +.IP \(bu 2 +\fBGIT_ASKPASS\fP +.IP \(bu 2 +\fBGIT_PROXY_COMMAND\fP +.IP \(bu 2 +\fBGIT_SSH\fP +.IP \(bu 2 +\fBGIT_SSH_COMMAND\fP +.IP \(bu 2 +\fBGIT_SSL_CAINFO\fP +.IP \(bu 2 +\fBGIT_SSL_NO_VERIFY\fP +See the git man page for details\. +Examples: +.P +.RS 2 +.nf +npm install git+ssh://git@github\.com:npm/npm\.git#v1\.0\.27 +npm install git+https://isaacs@github\.com/npm/npm\.git +npm install git://github\.com/npm/npm\.git#v1\.0\.27 +GIT_SSH_COMMAND='ssh \-i ~/\.ssh/custom_ident' npm install git+ssh://git@github\.com:npm/npm\.git +.fi +.RE + +.RE +.IP \(bu 2 +\fBnpm install /[#]\fP: +.IP \(bu 2 +\fBnpm install github:/[#]\fP: + Install the package at \fBhttps://github\.com/githubname/githubrepo\fP by + attempting to clone it using \fBgit\fP\|\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fP will be used\. + Examples: +.P +.RS 2 +.nf + npm install mygithubuser/myproject + npm install github:mygithubuser/myproject +.fi +.RE +.IP \(bu 2 +\fBnpm install gist:[/][#]\fP: + Install the package at \fBhttps://gist\.github\.com/gistID\fP by attempting to + clone it using \fBgit\fP\|\. The GitHub username associated with the gist is + optional and will not be saved in \fBpackage\.json\fP if \fB\-\-save\fP is used\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fP will be used\. + Example: +.P +.RS 2 +.nf + npm install gist:101a11beef +.fi +.RE +.IP \(bu 2 +\fBnpm install bitbucket:/[#]\fP: + Install the package at \fBhttps://bitbucket\.org/bitbucketname/bitbucketrepo\fP + by attempting to clone it using \fBgit\fP\|\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fP will be used\. + Example: +.P +.RS 2 +.nf + npm install bitbucket:mybitbucketuser/myproject +.fi +.RE +.IP \(bu 2 +\fBnpm install gitlab:/[#]\fP: + Install the package at \fBhttps://gitlab\.com/gitlabname/gitlabrepo\fP + by attempting to clone it using \fBgit\fP\|\. + If you don't specify a \fIcommit\-ish\fR then \fBmaster\fP will be used\. + Example: +.P +.RS 2 +.nf + npm install gitlab:mygitlabuser/myproject +.fi +.RE + +.RE +.P +You may combine multiple arguments, and even multiple types of arguments\. +For example: +.P +.RS 2 +.nf +npm install sax@">=0\.1\.0 <0\.2\.0" bench supervisor +.fi +.RE +.P +The \fB\-\-tag\fP argument will apply to all of the specified install targets\. If a +tag with the given name exists, the tagged version is preferred over newer +versions\. +.P +The \fB\-\-force\fP argument will force npm to fetch remote resources even if a +local copy exists on disk\. +.P +.RS 2 +.nf +npm install sax \-\-force +.fi +.RE +.P +The \fB\-\-global\fP argument will cause npm to install the package globally +rather than locally\. See npm help 5 \fBnpm\-folders\fP\|\. +.P +The \fB\-\-link\fP argument will cause npm to link global installs into the +local space in some cases\. +.P +The \fB\-\-no\-bin\-links\fP argument will prevent npm from creating symlinks for +any binaries the package might contain\. +.P +The \fB\-\-no\-optional\fP argument will prevent optional dependencies from +being installed\. +.P +The \fB\-\-no\-shrinkwrap\fP argument, which will ignore an available +shrinkwrap file and use the package\.json instead\. +.P +The \fB\-\-nodedir=/path/to/node/source\fP argument will allow npm to find the +node source code so that npm can compile native modules\. +.P +See npm help 7 \fBnpm\-config\fP\|\. Many of the configuration params have some +effect on installation, since that's most of what npm does\. +.SH ALGORITHM +.P +To install a package, npm uses the following algorithm: +.P +.RS 2 +.nf +install(where, what, family, ancestors) +fetch what, unpack to /node_modules/ +for each dep in what\.dependencies + resolve dep to precise version +for each dep@version in what\.dependencies + not in /node_modules//node_modules/* + and not in + add precise version deps to + install(/node_modules/, dep, family) +.fi +.RE +.P +For this \fBpackage{dep}\fP structure: \fBA{B,C}, B{C}, C{D}\fP, +this algorithm produces: +.P +.RS 2 +.nf +A ++\-\- B +`\-\- C + `\-\- D +.fi +.RE +.P +That is, the dependency from B to C is satisfied by the fact that A +already caused C to be installed at a higher level\. +.P +See npm help 5 folders for a more detailed description of the specific +folder structures that npm creates\. +.SS Limitations of npm's Install Algorithm +.P +There are some very rare and pathological edge\-cases where a cycle can +cause npm to try to install a never\-ending tree of packages\. Here is +the simplest case: +.P +.RS 2 +.nf +A \-> B \-> A' \-> B' \-> A \-> B \-> A' \-> B' \-> A \-> \.\.\. +.fi +.RE +.P +where \fBA\fP is some version of a package, and \fBA'\fP is a different version +of the same package\. Because \fBB\fP depends on a different version of \fBA\fP +than the one that is already in the tree, it must install a separate +copy\. The same is true of \fBA'\fP, which must install \fBB'\fP\|\. Because \fBB'\fP +depends on the original version of \fBA\fP, which has been overridden, the +cycle falls into infinite regress\. +.P +To avoid this situation, npm flat\-out refuses to install any +\fBname@version\fP that is already present anywhere in the tree of package +folder ancestors\. A more correct, but more complex, solution would be +to symlink the existing version into the new location\. If this ever +affects a real use\-case, it will be investigated\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help update +.IP \(bu 2 +npm help link +.IP \(bu 2 +npm help rebuild +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help build +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help tag +.IP \(bu 2 +npm help uninstall +.IP \(bu 2 +npm help shrinkwrap +.IP \(bu 2 +npm help 5 package\.json + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-link.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-link.1 new file mode 100644 index 00000000..a70d07cc --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-link.1 @@ -0,0 +1,102 @@ +.TH "NPM\-LINK" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-link\fR \- Symlink a package folder +.SH SYNOPSIS +.P +.RS 2 +.nf +npm link (in package folder) +npm link [@/] +npm ln (with any of the previous argument usage) +.fi +.RE +.SH DESCRIPTION +.P +Package linking is a two\-step process\. +.P +First, \fBnpm link\fP in a package folder will create a symlink in the global folder +\fB{prefix}/lib/node_modules/\fP that links to the package where the \fBnpm +link\fP command was executed\. (see npm help 7 \fBnpm\-config\fP for the value of \fBprefix\fP)\. +.P +Next, in some other location, \fBnpm link package\-name\fP will create a +symbolic link from globally\-installed \fBpackage\-name\fP to \fBnode_modules/\fP +of the current folder\. +.P +Note that \fBpackage\-name\fP is taken from \fBpackage\.json\fP, +not from directory name\. +.P +The package name can be optionally prefixed with a scope\. See npm help 7 \fBnpm\-scope\fP\|\. +The scope must be preceded by an @\-symbol and followed by a slash\. +.P +When creating tarballs for \fBnpm publish\fP, the linked packages are +"snapshotted" to their current state by resolving the symbolic links\. +.P +This is handy for installing your own stuff, so that you can work on it and +test it iteratively without having to continually rebuild\. +.P +For example: +.P +.RS 2 +.nf +cd ~/projects/node\-redis # go into the package directory +npm link # creates global link +cd ~/projects/node\-bloggy # go into some other package directory\. +npm link redis # link\-install the package +.fi +.RE +.P +Now, any changes to ~/projects/node\-redis will be reflected in +~/projects/node\-bloggy/node_modules/node\-redis/\. Note that the link should +be to the package name, not the directory name for that package\. +.P +You may also shortcut the two steps in one\. For example, to do the +above use\-case in a shorter way: +.P +.RS 2 +.nf +cd ~/projects/node\-bloggy # go into the dir of your main project +npm link \.\./node\-redis # link the dir of your dependency +.fi +.RE +.P +The second line is the equivalent of doing: +.P +.RS 2 +.nf +(cd \.\./node\-redis; npm link) +npm link node\-redis +.fi +.RE +.P +That is, it first creates a global link, and then links the global +installation target into your project's \fBnode_modules\fP folder\. +.P +If your linked package is scoped (see npm help 7 \fBnpm\-scope\fP) your link command must +include that scope, e\.g\. +.P +.RS 2 +.nf +npm link @myorg/privatepackage +.fi +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 developers +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-logout.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-logout.1 new file mode 100644 index 00000000..606fad15 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-logout.1 @@ -0,0 +1,57 @@ +.TH "NPM\-LOGOUT" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-logout\fR \- Log out of the registry +.SH SYNOPSIS +.P +.RS 2 +.nf +npm logout [\-\-registry=url] [\-\-scope=@orgname] +.fi +.RE +.SH DESCRIPTION +.P +When logged into a registry that supports token\-based authentication, tell the +server to end this token's session\. This will invalidate the token everywhere +you're using it, not just for the current environment\. +.P +When logged into a legacy registry that uses username and password authentication, this will +clear the credentials in your user configuration\. In this case, it will \fIonly\fR affect +the current environment\. +.P +If \fB\-\-scope\fP is provided, this will find the credentials for the registry +connected to that scope, if set\. +.SH CONFIGURATION +.SS registry +.P +Default: https://registry\.npmjs\.org/ +.P +The base URL of the npm package registry\. If \fBscope\fP is also specified, +it takes precedence\. +.SS scope +.P +Default: none +.P +If specified, you will be logged out of the specified scope\. See npm help 7 \fBnpm\-scope\fP\|\. +.P +.RS 2 +.nf +npm logout \-\-scope=@myco +.fi +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help whoami + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-ls.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-ls.1 new file mode 100644 index 00000000..70d1bb48 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-ls.1 @@ -0,0 +1,131 @@ +.TH "NPM\-LS" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-ls\fR \- List installed packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm list [[@/] \.\.\.] +npm ls [[@/] \.\.\.] +npm la [[@/] \.\.\.] +npm ll [[@/] \.\.\.] +.fi +.RE +.SH DESCRIPTION +.P +This command will print to stdout all the versions of packages that are +installed, as well as their dependencies, in a tree\-structure\. +.P +Positional arguments are \fBname@version\-range\fP identifiers, which will +limit the results to only the paths to the packages named\. Note that +nested packages will \fIalso\fR show the paths to the specified packages\. +For example, running \fBnpm ls promzard\fP in npm's source tree will show: +.P +.RS 2 +.nf +npm@2.15.1 /path/to/npm +└─┬ init\-package\-json@0\.0\.4 + └── promzard@0\.1\.5 +.fi +.RE +.P +It will print out extraneous, missing, and invalid packages\. +.P +If a project specifies git urls for dependencies these are shown +in parentheses after the name@version to make it easier for users to +recognize potential forks of a project\. +.P +When run as \fBll\fP or \fBla\fP, it shows extended information by default\. +.SH CONFIGURATION +.SS json +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show information in JSON format\. +.SS long +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show extended information\. +.SS parseable +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show parseable output instead of tree view\. +.SS global +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +List packages in the global install prefix instead of in the current +project\. +.SS depth +.RS 0 +.IP \(bu 2 +Type: Int + +.RE +.P +Max display depth of the dependency tree\. +.SS prod / production +.RS 0 +.IP \(bu 2 +Type: Boolean +.IP \(bu 2 +Default: false + +.RE +.P +Display only the dependency tree for packages in \fBdependencies\fP\|\. +.SS dev +.RS 0 +.IP \(bu 2 +Type: Boolean +.IP \(bu 2 +Default: false + +.RE +.P +Display only the dependency tree for packages in \fBdevDependencies\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help link +.IP \(bu 2 +npm help prune +.IP \(bu 2 +npm help outdated +.IP \(bu 2 +npm help update + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-outdated.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-outdated.1 new file mode 100644 index 00000000..2788606a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-outdated.1 @@ -0,0 +1,151 @@ +.TH "NPM\-OUTDATED" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-outdated\fR \- Check for outdated packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm outdated [ [ \.\.\.]] +.fi +.RE +.SH DESCRIPTION +.P +This command will check the registry to see if any (or, specific) installed +packages are currently outdated\. +.P +In the output: +.RS 0 +.IP \(bu 2 +\fBwanted\fP is the maximum version of the package that satisfies the semver +range specified in \fBpackage\.json\fP\|\. If there's no available semver range (i\.e\. +you're running \fBnpm outdated \-\-global\fP, or the package isn't included in +\fBpackage\.json\fP), then \fBwanted\fP shows the currently\-installed version\. +.IP \(bu 2 +\fBlatest\fP is the version of the package tagged as latest in the registry\. +Running \fBnpm publish\fP with no special configuration will publish the package +with a dist\-tag of \fBlatest\fP\|\. This may or may not be the maximum version of +the package, or the most\-recently published version of the package, depending +on how the package's developer manages the latest npm help dist\-tag\. +.IP \(bu 2 +\fBlocation\fP is where in the dependency tree the package is located\. Note that +\fBnpm outdated\fP defaults to a depth of 0, so unless you override that, you'll +always be seeing only top\-level dependencies that are outdated\. +.IP \(bu 2 +\fBpackage type\fP (when using \fB\-\-long\fP / \fB\-l\fP) tells you whether this package is +a \fBdependency\fP or a \fBdevDependency\fP\|\. Packages not included in \fBpackage\.json\fP +are always marked \fBdependencies\fP\|\. + +.RE +.SS An example +.P +.RS 2 +.nf +$ npm outdated +Package Current Wanted Latest Location +glob 5\.0\.15 5\.0\.15 6\.0\.1 test\-outdated\-output +nothingness 0\.0\.3 git git test\-outdated\-output +npm 3\.5\.1 3\.5\.2 3\.5\.1 test\-outdated\-output +local\-dev 0\.0\.3 linked linked test\-outdated\-output +once 1\.3\.2 1\.3\.3 1\.3\.3 test\-outdated\-output +.fi +.RE +.P +With these \fBdependencies\fP: +.P +.RS 2 +.nf +{ + "glob": "^5\.0\.15", + "nothingness": "github:othiym23/nothingness#master", + "npm": "^3\.5\.1", + "once": "^1\.3\.1" +} +.fi +.RE +.P +A few things to note: +.RS 0 +.IP \(bu 2 +\fBglob\fP requires \fB^5\fP, which prevents npm from installing \fBglob@6\fP, which is +outside the semver range\. +.IP \(bu 2 +Git dependencies will always be reinstalled, because of how they're specified\. +The installed committish might satisfy the dependency specifier (if it's +something immutable, like a commit SHA), or it might not, so \fBnpm outdated\fP and +\fBnpm update\fP have to fetch Git repos to check\. This is why currently doing a +reinstall of a Git dependency always forces a new clone and install\. +.IP \(bu 2 +\fBnpm@3\.5\.2\fP is marked as "wanted", but "latest" is \fBnpm@3\.5\.1\fP because npm +uses dist\-tags to manage its \fBlatest\fP and \fBnext\fP release channels\. \fBnpm update\fP +will install the \fInewest\fR version, but \fBnpm install npm\fP (with no semver range) +will install whatever's tagged as \fBlatest\fP\|\. +.IP \(bu 2 +\fBonce\fP is just plain out of date\. Reinstalling \fBnode_modules\fP from scratch or +running \fBnpm update\fP will bring it up to spec\. + +.RE +.SH CONFIGURATION +.SS json +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show information in JSON format\. +.SS long +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show extended information\. +.SS parseable +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show parseable output instead of tree view\. +.SS global +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Check packages in the global install prefix instead of in the current +project\. +.SS depth +.RS 0 +.IP \(bu 2 +Default: 0 +.IP \(bu 2 +Type: Int + +.RE +.P +Max depth for checking dependency tree\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help update +.IP \(bu 2 +npm help dist\-tag +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help 5 folders + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-owner.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-owner.1 new file mode 100644 index 00000000..0d5c9e39 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-owner.1 @@ -0,0 +1,49 @@ +.TH "NPM\-OWNER" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-owner\fR \- Manage package owners +.SH SYNOPSIS +.P +.RS 2 +.nf +npm owner ls +npm owner add +npm owner rm + +aliases: author +.fi +.RE +.SH DESCRIPTION +.P +Manage ownership of published packages\. +.RS 0 +.IP \(bu 2 +ls: +List all the users who have access to modify a package and push new versions\. +Handy when you need to know who to bug for help\. +.IP \(bu 2 +add: +Add a new user as a maintainer of a package\. This user is enabled to modify +metadata, publish new versions, and add other owners\. +.IP \(bu 2 +rm: +Remove a user from the package owner list\. This immediately revokes their +privileges\. + +.RE +.P +Note that there is only one level of access\. Either you can modify a package, +or you can't\. Future versions may contain more fine\-grained access levels, but +that is not implemented at this time\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm help 7 disputes + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-pack.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-pack.1 new file mode 100644 index 00000000..39ef99b5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-pack.1 @@ -0,0 +1,37 @@ +.TH "NPM\-PACK" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-pack\fR \- Create a tarball from a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm pack [ [ \.\.\.]] +.fi +.RE +.SH DESCRIPTION +.P +For anything that's installable (that is, a package folder, tarball, +tarball url, name@tag, name@version, or name), this command will fetch +it to the cache, and then copy the tarball to the current working +directory as \fB\-\.tgz\fP, and then write the filenames out to +stdout\. +.P +If the same package is specified multiple times, then the file will be +overwritten the second time\. +.P +If no arguments are supplied, then npm packs the current package folder\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help cache +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-ping.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-ping.1 new file mode 100644 index 00000000..e0900ffe --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-ping.1 @@ -0,0 +1,23 @@ +.TH "NPM\-PING" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-ping\fR \- Ping npm registry +.SH SYNOPSIS +.P +.RS 2 +.nf +npm ping [\-\-registry ] +.fi +.RE +.SH DESCRIPTION +.P +Ping the configured or given npm registry and verify authentication\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-prefix.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-prefix.1 new file mode 100644 index 00000000..2a2e4549 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-prefix.1 @@ -0,0 +1,34 @@ +.TH "NPM\-PREFIX" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-prefix\fR \- Display prefix +.SH SYNOPSIS +.P +.RS 2 +.nf +npm prefix [\-g] +.fi +.RE +.SH DESCRIPTION +.P +Print the local prefix to standard out\. This is the closest parent directory +to contain a package\.json file unless \fB\-g\fP is also specified\. +.P +If \fB\-g\fP is specified, this will be the value of the global prefix\. See +npm help 7 \fBnpm\-config\fP for more detail\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help root +.IP \(bu 2 +npm help bin +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-prune.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-prune.1 new file mode 100644 index 00000000..b41a0c42 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-prune.1 @@ -0,0 +1,35 @@ +.TH "NPM\-PRUNE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-prune\fR \- Remove extraneous packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm prune [ [ [ [\-\-tag ] [\-\-access ] +npm publish [\-\-tag ] [\-\-access ] +.fi +.RE +.SH DESCRIPTION +.P +Publishes a package to the registry so that it can be installed by name\. All +files in the package directory are included if no local \fB\|\.gitignore\fP or +\fB\|\.npmignore\fP file is present\. See npm help 7 \fBnpm\-developers\fP for full details on +what's included in the published package, as well as details on how the package +is built\. +.P +By default npm will publish to the public registry\. This can be overridden by +specifying a different default registry or using a npm help 7 \fBnpm\-scope\fP in the name +(see npm help 5 \fBpackage\.json\fP)\. +.RS 0 +.IP \(bu 2 +\fB\fP: +A folder containing a package\.json file +.IP \(bu 2 +\fB\fP: +A url or file path to a gzipped tar archive containing a single folder +with a package\.json file inside\. +.IP \(bu 2 +\fB[\-\-tag ]\fP +Registers the published package with the given tag, such that \fBnpm install +@\fP will install this version\. By default, \fBnpm publish\fP updates +and \fBnpm install\fP installs the \fBlatest\fP tag\. See npm help \fBnpm\-dist\-tag\fP for +details about tags\. +.IP \(bu 2 +\fB[\-\-access ]\fP +Tells the registry whether this package should be published as public or +restricted\. Only applies to scoped packages, which default to \fBrestricted\fP\|\. +If you don't have a paid account, you must publish with \fB\-\-access public\fP +to publish scoped packages\. + +.RE +.P +Fails if the package name and version combination already exists in +the specified registry\. +.P +Once a package is published with a given name and version, that +specific name and version combination can never be used again, even if +it is removed with npm help unpublish\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help 7 scope +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm help owner +.IP \(bu 2 +npm help deprecate +.IP \(bu 2 +npm help tag + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-rebuild.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-rebuild.1 new file mode 100644 index 00000000..5a5879ae --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-rebuild.1 @@ -0,0 +1,31 @@ +.TH "NPM\-REBUILD" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-rebuild\fR \- Rebuild a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm rebuild [ [ \.\.\.]] +npm rb [ [ \.\.\.]] +.fi +.RE +.RS 0 +.IP \(bu 2 +\fB\fP: +The package to rebuild + +.RE +.SH DESCRIPTION +.P +This command runs the \fBnpm build\fP command on the matched folders\. This is useful +when you install a new version of node, and must recompile all your C++ addons with +the new binary\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help build +.IP \(bu 2 +npm help install + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-repo.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-repo.1 new file mode 100644 index 00000000..93270713 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-repo.1 @@ -0,0 +1,37 @@ +.TH "NPM\-REPO" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-repo\fR \- Open package repository page in the browser +.SH SYNOPSIS +.P +.RS 2 +.nf +npm repo +npm repo (with no args in a package dir) +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +repository URL, and then tries to open it using the \fB\-\-browser\fP +config param\. If no package name is provided, it will search for +a \fBpackage\.json\fP in the current folder and use the \fBname\fP property\. +.SH CONFIGURATION +.SS browser +.RS 0 +.IP \(bu 2 +Default: OS X: \fB"open"\fP, Windows: \fB"start"\fP, Others: \fB"xdg\-open"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The browser that is called by the \fBnpm repo\fP command to open websites\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help docs +.IP \(bu 2 +npm help config + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-restart.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-restart.1 new file mode 100644 index 00000000..0ed41739 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-restart.1 @@ -0,0 +1,61 @@ +.TH "NPM\-RESTART" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-restart\fR \- Restart a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm restart [\-\- ] +.fi +.RE +.SH DESCRIPTION +.P +This restarts a package\. +.P +This runs a package's "stop", "restart", and "start" scripts, and associated +pre\- and post\- scripts, in the order given below: +.RS 0 +.IP 1. 3 +prerestart +.IP 2. 3 +prestop +.IP 3. 3 +stop +.IP 4. 3 +poststop +.IP 5. 3 +restart +.IP 6. 3 +prestart +.IP 7. 3 +start +.IP 8. 3 +poststart +.IP 9. 3 +postrestart + +.RE +.SH NOTE +.P +Note that the "restart" script is run \fBin addition to\fR the "stop" +and "start" scripts, not instead of them\. +.P +This is the behavior as of \fBnpm\fP major version 2\. A change in this +behavior will be accompanied by an increase in major version number +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help test +.IP \(bu 2 +npm help start +.IP \(bu 2 +npm help stop +.IP \(bu 2 +npm apihelp restart + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-rm.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-rm.1 new file mode 100644 index 00000000..1908b71d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-rm.1 @@ -0,0 +1,34 @@ +.TH "NPM\-RM" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-rm\fR \- Remove a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm rm +npm r +npm uninstall +npm un +.fi +.RE +.SH DESCRIPTION +.P +This uninstalls a package, completely removing everything npm installed +on its behalf\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help prune +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-root.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-root.1 new file mode 100644 index 00000000..d4fd4b1f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-root.1 @@ -0,0 +1,30 @@ +.TH "NPM\-ROOT" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-root\fR \- Display npm root +.SH SYNOPSIS +.P +.RS 2 +.nf +npm root +.fi +.RE +.SH DESCRIPTION +.P +Print the effective \fBnode_modules\fP folder to standard out\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help prefix +.IP \(bu 2 +npm help bin +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-run-script.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-run-script.1 new file mode 100644 index 00000000..66689fdf --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-run-script.1 @@ -0,0 +1,66 @@ +.TH "NPM\-RUN\-SCRIPT" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-run-script\fR \- Run arbitrary package scripts +.SH SYNOPSIS +.P +.RS 2 +.nf +npm run\-script [command] [\-\- ] +npm run [command] [\-\- ] +.fi +.RE +.SH DESCRIPTION +.P +This runs an arbitrary command from a package's \fB"scripts"\fP object\. If no +\fB"command"\fP is provided, it will list the available scripts\. \fBrun[\-script]\fP is +used by the test, start, restart, and stop commands, but can be called +directly, as well\. When the scripts in the package are printed out, they're +separated into lifecycle (test, start, restart) and directly\-run scripts\. +.P +As of \fBnpm@2\.0\.0\fP \fIhttp://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can +use custom arguments when executing scripts\. The special option \fB\-\-\fP is used by +getopt \fIhttp://goo\.gl/KxMmtG\fR to delimit the end of the options\. npm will pass +all the arguments after the \fB\-\-\fP directly to your script: +.P +.RS 2 +.nf +npm run test \-\- \-\-grep="pattern" +.fi +.RE +.P +The arguments will only be passed to the script specified after \fBnpm run\fP +and not to any pre or post script\. +.P +The \fBenv\fP script is a special built\-in command that can be used to list +environment variables that will be available to the script at runtime\. If an +"env" command is defined in your package it will take precedence over the +built\-in\. +.P +In addition to the shell's pre\-existing \fBPATH\fP, \fBnpm run\fP adds +\fBnode_modules/\.bin\fP to the \fBPATH\fP provided to scripts\. Any binaries provided by +locally\-installed dependencies can be used without the \fBnode_modules/\.bin\fP +prefix\. For example, if there is a \fBdevDependency\fP on \fBtap\fP in your package, +you should write: +.P +.RS 2 +.nf +"scripts": {"test": "tap test/\\*\.js"} +.fi +.RE +.P +instead of \fB"scripts": {"test": "node_modules/\.bin/tap test/\\*\.js"}\fP to run your tests\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help test +.IP \(bu 2 +npm help start +.IP \(bu 2 +npm help restart +.IP \(bu 2 +npm help stop + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-search.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-search.1 new file mode 100644 index 00000000..af719099 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-search.1 @@ -0,0 +1,60 @@ +.TH "NPM\-SEARCH" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-search\fR \- Search for packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm search [\-l|\-\-long] [search terms \.\.\.] + +aliases: s, se, find +.fi +.RE +.SH DESCRIPTION +.P +Search the registry for packages matching the search terms\. +.P +If a term starts with \fB/\fP, then it's interpreted as a regular expression\. +A trailing \fB/\fP will be ignored in this case\. (Note that many regular +expression characters must be escaped or quoted in most shells\.) +.SH CONFIGURATION +.SS long +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Display full package descriptions and other long text across multiple +lines\. When disabled (default) search results are truncated to fit +neatly on a single line\. Modules with extremely long names will +fall on multiple lines\. +.SS registry +.RS 0 +.IP \(bu 2 +Default: https://registry\.npmjs\.org/ +.IP \(bu 2 +Type : url + +.RE +.P +Search the specified registry for modules\. If you have configured npm to point to a different default registry, +such as your internal private module repository, \fBnpm search\fP will default to that registry when searching\. +Pass a different registry url such as the default above in order to override this setting\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help view + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-shrinkwrap.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-shrinkwrap.1 new file mode 100644 index 00000000..6d24291b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-shrinkwrap.1 @@ -0,0 +1,222 @@ +.TH "NPM\-SHRINKWRAP" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-shrinkwrap\fR \- Lock down dependency versions +.SH SYNOPSIS +.P +.RS 2 +.nf +npm shrinkwrap +.fi +.RE +.SH DESCRIPTION +.P +This command locks down the versions of a package's dependencies so +that you can control exactly which versions of each dependency will be +used when your package is installed\. The \fBpackage\.json\fP file is still +required if you want to use \fBnpm install\fP\|\. +.P +By default, \fBnpm install\fP recursively installs the target's +dependencies (as specified in \fBpackage\.json\fP), choosing the latest +available version that satisfies the dependency's semver pattern\. In +some situations, particularly when shipping software where each change +is tightly managed, it's desirable to fully specify each version of +each dependency recursively so that subsequent builds and deploys do +not inadvertently pick up newer versions of a dependency that satisfy +the semver pattern\. Specifying specific semver patterns in each +dependency's \fBpackage\.json\fP would facilitate this, but that's not always +possible or desirable, as when another author owns the npm package\. +It's also possible to check dependencies directly into source control, +but that may be undesirable for other reasons\. +.P +As an example, consider package A: +.P +.RS 2 +.nf +{ + "name": "A", + "version": "0\.1\.0", + "dependencies": { + "B": "<0\.1\.0" + } +} +.fi +.RE +.P +package B: +.P +.RS 2 +.nf +{ + "name": "B", + "version": "0\.0\.1", + "dependencies": { + "C": "<0\.1\.0" + } +} +.fi +.RE +.P +and package C: +.P +.RS 2 +.nf +{ + "name": "C", + "version": "0\.0\.1" +} +.fi +.RE +.P +If these are the only versions of A, B, and C available in the +registry, then a normal \fBnpm install A\fP will install: +.P +.RS 2 +.nf +A@0\.1\.0 +`\-\- B@0\.0\.1 + `\-\- C@0\.0\.1 +.fi +.RE +.P +However, if B@0\.0\.2 is published, then a fresh \fBnpm install A\fP will +install: +.P +.RS 2 +.nf +A@0\.1\.0 +`\-\- B@0\.0\.2 + `\-\- C@0\.0\.1 +.fi +.RE +.P +assuming the new version did not modify B's dependencies\. Of course, +the new version of B could include a new version of C and any number +of new dependencies\. If such changes are undesirable, the author of A +could specify a dependency on B@0\.0\.1\. However, if A's author and B's +author are not the same person, there's no way for A's author to say +that he or she does not want to pull in newly published versions of C +when B hasn't changed at all\. +.P +In this case, A's author can run +.P +.RS 2 +.nf +npm shrinkwrap +.fi +.RE +.P +This generates \fBnpm\-shrinkwrap\.json\fP, which will look something like this: +.P +.RS 2 +.nf +{ + "name": "A", + "version": "0\.1\.0", + "dependencies": { + "B": { + "version": "0\.0\.1", + "from": "B@^0\.0\.1", + "resolved": "https://registry\.npmjs\.org/B/\-/B\-0\.0\.1\.tgz", + "dependencies": { + "C": { + "version": "0\.0\.1", + "from": "org/C#v0\.0\.1", + "resolved": "git://github\.com/org/C\.git#5c380ae319fc4efe9e7f2d9c78b0faa588fd99b4" + } + } + } + } +} +.fi +.RE +.P +The shrinkwrap command has locked down the dependencies based on +what's currently installed in node_modules\. When \fBnpm install\fP +installs a package with an \fBnpm\-shrinkwrap\.json\fP in the package +root, the shrinkwrap file (rather than \fBpackage\.json\fP files) completely +drives the installation of that package and all of its dependencies +(recursively)\. So now the author publishes A@0\.1\.0, and subsequent +installs of this package will use B@0\.0\.1 and C@0\.0\.1, regardless the +dependencies and versions listed in A's, B's, and C's \fBpackage\.json\fP +files\. +.SS Using shrinkwrapped packages +.P +Using a shrinkwrapped package is no different than using any other +package: you can \fBnpm install\fP it by hand, or add a dependency to your +\fBpackage\.json\fP file and \fBnpm install\fP it\. +.SS Building shrinkwrapped packages +.P +To shrinkwrap an existing package: +.RS 0 +.IP 1. 3 +Run \fBnpm install\fP in the package root to install the current +versions of all dependencies\. +.IP 2. 3 +Validate that the package works as expected with these versions\. +.IP 3. 3 +Run \fBnpm shrinkwrap\fP, add \fBnpm\-shrinkwrap\.json\fP to git, and publish +your package\. + +.RE +.P +To add or update a dependency in a shrinkwrapped package: +.RS 0 +.IP 1. 3 +Run \fBnpm install\fP in the package root to install the current +versions of all dependencies\. +.IP 2. 3 +Add or update dependencies\. \fBnpm install\fP each new or updated +package individually and then update \fBpackage\.json\fP\|\. Note that they +must be explicitly named in order to be installed: running \fBnpm +install\fP with no arguments will merely reproduce the existing +shrinkwrap\. +.IP 3. 3 +Validate that the package works as expected with the new +dependencies\. +.IP 4. 3 +Run \fBnpm shrinkwrap\fP, commit the new \fBnpm\-shrinkwrap\.json\fP, and +publish your package\. + +.RE +.P +You can use npm help outdated to view dependencies with newer versions +available\. +.SS Other Notes +.P +A shrinkwrap file must be consistent with the package's \fBpackage\.json\fP +file\. \fBnpm shrinkwrap\fP will fail if required dependencies are not +already installed, since that would result in a shrinkwrap that +wouldn't actually work\. Similarly, the command will fail if there are +extraneous packages (not referenced by \fBpackage\.json\fP), since that would +indicate that \fBpackage\.json\fP is not correct\. +.P +Since \fBnpm shrinkwrap\fP is intended to lock down your dependencies for +production use, \fBdevDependencies\fP will not be included unless you +explicitly set the \fB\-\-dev\fP flag when you run \fBnpm shrinkwrap\fP\|\. If +installed \fBdevDependencies\fP are excluded, then npm will print a +warning\. If you want them to be installed with your module by +default, please consider adding them to \fBdependencies\fP instead\. +.P +If shrinkwrapped package A depends on shrinkwrapped package B, B's +shrinkwrap will not be used as part of the installation of A\. However, +because A's shrinkwrap is constructed from a valid installation of B +and recursively specifies all dependencies, the contents of B's +shrinkwrap will implicitly be included in A's shrinkwrap\. +.SS Caveats +.P +If you wish to lock down the specific bytes included in a package, for +example to have 100% confidence in being able to reproduce a +deployment or build, then you ought to check your dependencies into +source control, or pursue some other mechanism that can verify +contents rather than versions\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help ls + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-star.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-star.1 new file mode 100644 index 00000000..40237244 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-star.1 @@ -0,0 +1,30 @@ +.TH "NPM\-STAR" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-star\fR \- Mark your favorite packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm star [, \.\.\.] +npm unstar [, \.\.\.] +.fi +.RE +.SH DESCRIPTION +.P +"Starring" a package means that you have some interest in it\. It's +a vaguely positive way to show that you care\. +.P +"Unstarring" is the same thing, but in reverse\. +.P +It's a boolean thing\. Starring repeatedly has no additional effect\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help view +.IP \(bu 2 +npm help whoami +.IP \(bu 2 +npm help adduser + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-stars.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-stars.1 new file mode 100644 index 00000000..4827167e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-stars.1 @@ -0,0 +1,31 @@ +.TH "NPM\-STARS" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-stars\fR \- View packages marked as favorites +.SH SYNOPSIS +.P +.RS 2 +.nf +npm stars +npm stars [username] +.fi +.RE +.SH DESCRIPTION +.P +If you have starred a lot of neat things and want to find them again +quickly this command lets you do just that\. +.P +You may also want to see your friend's favorite packages, in this case +you will most certainly enjoy this command\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help star +.IP \(bu 2 +npm help view +.IP \(bu 2 +npm help whoami +.IP \(bu 2 +npm help adduser + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-start.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-start.1 new file mode 100644 index 00000000..71ea7699 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-start.1 @@ -0,0 +1,34 @@ +.TH "NPM\-START" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-start\fR \- Start a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm start [\-\- ] +.fi +.RE +.SH DESCRIPTION +.P +This runs an arbitrary command specified in the package's \fB"start"\fP property of +its \fB"scripts"\fP object\. If no \fB"start"\fP property is specified on the +\fB"scripts"\fP object, it will run \fBnode server\.js\fP\|\. +.P +As of \fBnpm@2\.0\.0\fP \fIhttp://blog\.npmjs\.org/post/98131109725/npm\-2\-0\-0\fR, you can +use custom arguments when executing scripts\. Refer to npm help run\-script for +more details\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help test +.IP \(bu 2 +npm help restart +.IP \(bu 2 +npm help stop + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-stop.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-stop.1 new file mode 100644 index 00000000..5b48d6bb --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-stop.1 @@ -0,0 +1,28 @@ +.TH "NPM\-STOP" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-stop\fR \- Stop a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm stop [\-\- ] +.fi +.RE +.SH DESCRIPTION +.P +This runs a package's "stop" script, if one was provided\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help test +.IP \(bu 2 +npm help start +.IP \(bu 2 +npm help restart + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-tag.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-tag.1 new file mode 100644 index 00000000..ec791e63 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-tag.1 @@ -0,0 +1,79 @@ +.TH "NPM\-TAG" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-tag\fR \- Tag a published version +.SH SYNOPSIS +.P +.RS 2 +.nf +npm tag @ [] +.fi +.RE +.SH DESCRIPTION +.P +THIS COMMAND IS DEPRECATED\. See npm help dist\-tag for details\. +.P +Tags the specified version of the package with the specified tag, or the +\fB\-\-tag\fP config if not specified\. +.P +A tag can be used when installing packages as a reference to a version instead +of using a specific version number: +.P +.RS 2 +.nf +npm install @ +.fi +.RE +.P +When installing dependencies, a preferred tagged version may be specified: +.P +.RS 2 +.nf +npm install \-\-tag +.fi +.RE +.P +This also applies to \fBnpm dedupe\fP\|\. +.P +Publishing a package always sets the "latest" tag to the published version\. +.SH PURPOSE +.P +Tags can be used to provide an alias instead of version numbers\. For +example, \fBnpm\fP currently uses the tag "next" to identify the upcoming +version, and the tag "latest" to identify the current version\. +.P +A project might choose to have multiple streams of development, e\.g\., +"stable", "canary"\. +.SH CAVEATS +.P +Tags must share a namespace with version numbers, because they are +specified in the same slot: \fBnpm install @\fP vs \fBnpm +install @\fP\|\. +.P +Tags that can be interpreted as valid semver ranges will be +rejected\. For example, \fBv1\.4\fP cannot be used as a tag, because it is +interpreted by semver as \fB>=1\.4\.0 <1\.5\.0\fP\|\. See +https://github\.com/npm/npm/issues/6082\|\. +.P +The simplest way to avoid semver problems with tags is to use tags +that do not begin with a number or the letter \fBv\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help dedupe +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm apihelp tag +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-team.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-team.1 new file mode 100644 index 00000000..5dd69613 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-team.1 @@ -0,0 +1,63 @@ +.TH "NPM\-TEAM" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-team\fR \- Manage organization teams and team memberships +.SH SYNOPSIS +.P +.RS 2 +.nf +npm team create +npm team destroy + +npm team add +npm team rm + +npm team ls | + +npm team edit +.fi +.RE +.SH DESCRIPTION +.P +Used to manage teams in organizations, and change team memberships\. Does not +handle permissions for packages\. +.P +Teams must always be fully qualified with the organization/scope they belond to +when operating on them, separated by a colon (\fB:\fP)\. That is, if you have a +\fBdevelopers\fP team on a \fBfoo\fP organization, you must always refer to that team as +\fBfoo:developers\fP in these commands\. +.RS 0 +.IP \(bu 2 +create / destroy: +Create a new team, or destroy an existing one\. +.IP \(bu 2 +add / rm: +Add a user to an existing team, or remove a user from a team they belong to\. +.IP \(bu 2 +ls: +If performed on an organization name, will return a list of existing teams +under that organization\. If performed on a team, it will instead return a list +of all users belonging to that particular team\. + +.RE +.SH DETAILS +.P +\fBnpm team\fP always operates directly on the current registry, configurable from +the command line using \fB\-\-registry=\fP\|\. +.P +In order to create teams and manage team membership, you must be a \fIteam admin\fR +under the given organization\. Listing teams and team memberships may be done by +any member of the organizations\. +.P +Organization creation and management of team admins and \fIorganization\fR members +is done through the website, not the npm CLI\. +.P +To use teams to manage permissions on packages belonging to your organization, +use the \fBnpm access\fP command to grant or revoke the appropriate permissions\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help access +.IP \(bu 2 +npm help 7 registr + +.RE diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-test.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-test.1 new file mode 100644 index 00000000..d416df70 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-test.1 @@ -0,0 +1,33 @@ +.TH "NPM\-TEST" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-test\fR \- Test a package +.SH SYNOPSIS +.P +.RS 2 +.nf + npm test [\-\- ] + + aliases: t, tst +.fi +.RE +.SH DESCRIPTION +.P +This runs a package's "test" script, if one was provided\. +.P +To run tests as a condition of installation, set the \fBnpat\fP config to +true\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help start +.IP \(bu 2 +npm help restart +.IP \(bu 2 +npm help stop + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-uninstall.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-uninstall.1 new file mode 100644 index 00000000..e0aede82 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-uninstall.1 @@ -0,0 +1,68 @@ +.TH "NPM\-UNINSTALL" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-uninstall\fR \- Remove a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm uninstall [@/] [\-\-save|\-\-save\-dev|\-\-save\-optional] +npm rm (with any of the previous argument usage) +.fi +.RE +.SH DESCRIPTION +.P +This uninstalls a package, completely removing everything npm installed +on its behalf\. +.P +Example: +.P +.RS 2 +.nf +npm uninstall sax +.fi +.RE +.P +In global mode (ie, with \fB\-g\fP or \fB\-\-global\fP appended to the command), +it uninstalls the current package context as a global package\. +.P +\fBnpm uninstall\fP takes 3 exclusive, optional flags which save or update +the package version in your main package\.json: +.RS 0 +.IP \(bu 2 +\fB\-\-save\fP: Package will be removed from your \fBdependencies\fP\|\. +.IP \(bu 2 +\fB\-\-save\-dev\fP: Package will be removed from your \fBdevDependencies\fP\|\. +.IP \(bu 2 +\fB\-\-save\-optional\fP: Package will be removed from your \fBoptionalDependencies\fP\|\. + +.RE +.P +Scope is optional and follows the usual rules for npm help 7 \fBnpm\-scope\fP\|\. +.P +Examples: +.P +.RS 2 +.nf +npm uninstall sax \-\-save +npm uninstall @myorg/privatepackage \-\-save +npm uninstall node\-tap \-\-save\-dev +npm uninstall dtrace\-provider \-\-save\-optional +.fi +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help prune +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-unpublish.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-unpublish.1 new file mode 100644 index 00000000..4d98fd9e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-unpublish.1 @@ -0,0 +1,47 @@ +.TH "NPM\-UNPUBLISH" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-unpublish\fR \- Remove a package from the registry +.SH SYNOPSIS +.P +.RS 2 +.nf +npm unpublish [@/][@] +.fi +.RE +.SH WARNING +.P +\fBIt is generally considered bad behavior to remove versions of a library +that others are depending on!\fR +.P +Consider using the \fBdeprecate\fP command +instead, if your intent is to encourage users to upgrade\. +.P +There is plenty of room on the registry\. +.SH DESCRIPTION +.P +This removes a package version from the registry, deleting its +entry and removing the tarball\. +.P +If no version is specified, or if all versions are removed then +the root package entry is removed from the registry entirely\. +.P +Even if a package version is unpublished, that specific name and +version combination can never be reused\. In order to publish the +package again, a new version number must be used\. +.P +The scope is optional and follows the usual rules for npm help 7 \fBnpm\-scope\fP\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help deprecate +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm help owner + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-update.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-update.1 new file mode 100644 index 00000000..18216e1d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-update.1 @@ -0,0 +1,166 @@ +.TH "NPM\-UPDATE" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-update\fR \- Update a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm update [\-g] [ [ \.\.\.]] + +aliases: up, upgrade +.fi +.RE +.SH DESCRIPTION +.P +This command will update all the packages listed to the latest version +(specified by the \fBtag\fP config), respecting semver\. +.P +It will also install missing packages\. As with all commands that install +packages, the \fB\-\-dev\fP flag will cause \fBdevDependencies\fP to be processed +as well\. +.P +If the \fB\-g\fP flag is specified, this command will update globally installed +packages\. +.P +If no package name is specified, all packages in the specified location (global +or local) will be updated\. +.P +As of \fBnpm@2\.6\.1\fP, the \fBnpm update\fP will only inspect top\-level packages\. +Prior versions of \fBnpm\fP would also recursively inspect all dependencies\. +To get the old behavior, use \fBnpm \-\-depth 9999 update\fP\|\. +.SH EXAMPLES +.P +IMPORTANT VERSION NOTE: these examples assume \fBnpm@2\.6\.1\fP or later\. For +older versions of \fBnpm\fP, you must specify \fB\-\-depth 0\fP to get the behavior +described below\. +.P +For the examples below, assume that the current package is \fBapp\fP and it depends +on dependencies, \fBdep1\fP (\fBdep2\fP, \.\. etc\.)\. The published versions of \fBdep1\fP are: +.P +.RS 2 +.nf +{ + "dist\-tags": { "latest": "1\.2\.2" }, + "versions": [ + "1\.2\.2", + "1\.2\.1", + "1\.2\.0", + "1\.1\.2", + "1\.1\.1", + "1\.0\.0", + "0\.4\.1", + "0\.4\.0", + "0\.2\.0" + ] +} +.fi +.RE +.SS Caret Dependencies +.P +If \fBapp\fP\|'s \fBpackage\.json\fP contains: +.P +.RS 2 +.nf +"dependencies": { + "dep1": "^1\.1\.1" +} +.fi +.RE +.P +Then \fBnpm update\fP will install \fBdep1@1\.2\.2\fP, because \fB1\.2\.2\fP is \fBlatest\fP and +\fB1\.2\.2\fP satisfies \fB^1\.1\.1\fP\|\. +.SS Tilde Dependencies +.P +However, if \fBapp\fP\|'s \fBpackage\.json\fP contains: +.P +.RS 2 +.nf +"dependencies": { + "dep1": "~1\.1\.1" +} +.fi +.RE +.P +In this case, running \fBnpm update\fP will install \fBdep1@1\.1\.2\fP\|\. Even though the \fBlatest\fP +tag points to \fB1\.2\.2\fP, this version does not satisfy \fB~1\.1\.1\fP, which is equivalent +to \fB>=1\.1\.1 <1\.2\.0\fP\|\. So the highest\-sorting version that satisfies \fB~1\.1\.1\fP is used, +which is \fB1\.1\.2\fP\|\. +.SS Caret Dependencies below 1\.0\.0 +.P +Suppose \fBapp\fP has a caret dependency on a version below \fB1\.0\.0\fP, for example: +.P +.RS 2 +.nf +"dependencies": { + "dep1": "^0\.2\.0" +} +.fi +.RE +.P +\fBnpm update\fP will install \fBdep1@0\.2\.0\fP, because there are no other +versions which satisfy \fB^0\.2\.0\fP\|\. +.P +If the dependence were on \fB^0\.4\.0\fP: +.P +.RS 2 +.nf +"dependencies": { + "dep1": "^0\.4\.0" +} +.fi +.RE +.P +Then \fBnpm update\fP will install \fBdep1@0\.4\.1\fP, because that is the highest\-sorting +version that satisfies \fB^0\.4\.0\fP (\fB>= 0\.4\.0 <0\.5\.0\fP) +.SS Recording Updates with \fB\-\-save\fP +.P +When you want to update a package and save the new version as +the minimum required dependency in \fBpackage\.json\fP, you can use +\fBnpm update \-\-save\fP\|\. For example if \fBpackage\.json\fP contains +.P +.RS 2 +.nf +"dependencies": { + "dep1": "^1\.1\.1" +} +.fi +.RE +.P +Then \fBnpm update \-\-save\fP will install \fBdep1@1\.2\.2\fP (i\.e\., \fBlatest\fP), +and \fBpackage\.json\fP will be modified: +.P +.RS 2 +.nf +"dependencies": { + "dep1": "^1\.2\.2" +} +.fi +.RE +.P +Note that \fBnpm\fP will only write an updated version to \fBpackage\.json\fP +if it installs a new package\. +.SS Updating Globally\-Installed Packages +.P +\fBnpm update \-g\fP will apply the \fBupdate\fP action to each globally installed +package that is \fBoutdated\fP \-\- that is, has a version that is different from +\fBlatest\fP\|\. +.P +NOTE: If a package has been upgraded to a version newer than \fBlatest\fP, it will +be \fIdowngraded\fR\|\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help outdated +.IP \(bu 2 +npm help shrinkwrap +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help ls + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-version.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-version.1 new file mode 100644 index 00000000..a3b52954 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-version.1 @@ -0,0 +1,124 @@ +.TH "NPM\-VERSION" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-version\fR \- Bump a package version +.SH SYNOPSIS +.P +.RS 2 +.nf +npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease] +.fi +.RE +.SH DESCRIPTION +.P +Run this in a package directory to bump the version and write the new +data back to \fBpackage\.json\fP and, if present, \fBnpm\-shrinkwrap\.json\fP\|\. +.P +The \fBnewversion\fP argument should be a valid semver string, \fIor\fR a +valid second argument to semver\.inc (one of \fBpatch\fP, \fBminor\fP, \fBmajor\fP, +\fBprepatch\fP, \fBpreminor\fP, \fBpremajor\fP, \fBprerelease\fP)\. In the second case, +the existing version will be incremented by 1 in the specified field\. +.P +If run in a git repo, it will also create a version commit and tag\. +This behavior is controlled by \fBgit\-tag\-version\fP (see below), and can +be disabled on the command line by running \fBnpm \-\-no\-git\-tag\-version version\fP\|\. +It will fail if the working directory is not clean, unless the \fB\-\-force\fP +flag is set\. +.P +If supplied with \fB\-\-message\fP (shorthand: \fB\-m\fP) config option, npm will +use it as a commit message when creating a version commit\. If the +\fBmessage\fP config contains \fB%s\fP then that will be replaced with the +resulting version number\. For example: +.P +.RS 2 +.nf +npm version patch \-m "Upgrade to %s for reasons" +.fi +.RE +.P +If the \fBsign\-git\-tag\fP config is set, then the tag will be signed using +the \fB\-s\fP flag to git\. Note that you must have a default GPG key set up +in your git config for this to work properly\. For example: +.P +.RS 2 +.nf +$ npm config set sign\-git\-tag true +$ npm version patch + +You need a passphrase to unlock the secret key for +user: "isaacs (http://blog\.izs\.me/) " +2048\-bit RSA key, ID 6C481CF6, created 2010\-08\-31 + +Enter passphrase: +.fi +.RE +.P +If \fBpreversion\fP, \fBversion\fP, or \fBpostversion\fP are in the \fBscripts\fP property of +the package\.json, they will be executed as part of running \fBnpm version\fP\|\. +.P +The exact order of execution is as follows: +.RS 0 +.IP 1. 3 +Check to make sure the git working directory is clean before we get started\. +Your scripts may add files to the commit in future steps\. +This step is skipped if the \fB\-\-force\fP flag is set\. +.IP 2. 3 +Run the \fBpreversion\fP script\. These scripts have access to the old \fBversion\fP in package\.json\. +A typical use would be running your full test suite before deploying\. +Any files you want added to the commit should be explicitly added using \fBgit add\fP\|\. +.IP 3. 3 +Bump \fBversion\fP in \fBpackage\.json\fP as requested (\fBpatch\fP, \fBminor\fP, \fBmajor\fP, etc)\. +.IP 4. 3 +Run the \fBversion\fP script\. These scripts have access to the new \fBversion\fP in package\.json +(so they can incorporate it into file headers in generated files for example)\. +Again, scripts should explicitly add generated files to the commit using \fBgit add\fP\|\. +.IP 5. 3 +Commit and tag\. +.IP 6. 3 +Run the \fBpostversion\fP script\. Use it to clean up the file system or automatically push +the commit and/or tag\. + +.RE +.P +Take the following example: +.P +.RS 2 +.nf +"scripts": { + "preversion": "npm test", + "version": "npm run build && git add \-A dist", + "postversion": "git push && git push \-\-tags && rm \-rf build/temp" +} +.fi +.RE +.P +This runs all your tests, and proceeds only if they pass\. Then runs your \fBbuild\fP script, and +adds everything in the \fBdist\fP directory to the commit\. After the commit, it pushes the new commit +and tag up to the server, and deletes the \fBbuild/temp\fP directory\. +.SH CONFIGURATION +.SS git\-tag\-version +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Commit and tag the version change\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help init +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help 7 semver +.IP \(bu 2 +npm help 7 config + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-view.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-view.1 new file mode 100644 index 00000000..a6d572f2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-view.1 @@ -0,0 +1,145 @@ +.TH "NPM\-VIEW" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-view\fR \- View registry info +.SH SYNOPSIS +.P +.RS 2 +.nf +npm view [@/][@] [[\.]\.\.\.] +npm v [@/][@] [[\.]\.\.\.] +.fi +.RE +.SH DESCRIPTION +.P +This command shows data about a package and prints it to the stream +referenced by the \fBoutfd\fP config, which defaults to stdout\. +.P +To show the package registry entry for the \fBconnect\fP package, you can do +this: +.P +.RS 2 +.nf +npm view connect +.fi +.RE +.P +The default version is "latest" if unspecified\. +.P +Field names can be specified after the package descriptor\. +For example, to show the dependencies of the \fBronn\fP package at version +0\.3\.5, you could do the following: +.P +.RS 2 +.nf +npm view ronn@0\.3\.5 dependencies +.fi +.RE +.P +You can view child fields by separating them with a period\. +To view the git repository URL for the latest version of npm, you could +do this: +.P +.RS 2 +.nf +npm view npm repository\.url +.fi +.RE +.P +This makes it easy to view information about a dependency with a bit of +shell scripting\. For example, to view all the data about the version of +opts that ronn depends on, you can do this: +.P +.RS 2 +.nf +npm view opts@$(npm view ronn dependencies\.opts) +.fi +.RE +.P +For fields that are arrays, requesting a non\-numeric field will return +all of the values from the objects in the list\. For example, to get all +the contributor names for the "express" project, you can do this: +.P +.RS 2 +.nf +npm view express contributors\.email +.fi +.RE +.P +You may also use numeric indices in square braces to specifically select +an item in an array field\. To just get the email address of the first +contributor in the list, you can do this: +.P +.RS 2 +.nf +npm view express contributors[0]\.email +.fi +.RE +.P +Multiple fields may be specified, and will be printed one after another\. +For exampls, to get all the contributor names and email addresses, you +can do this: +.P +.RS 2 +.nf +npm view express contributors\.name contributors\.email +.fi +.RE +.P +"Person" fields are shown as a string if they would be shown as an +object\. So, for example, this will show the list of npm contributors in +the shortened string format\. (See npm help 5 \fBpackage\.json\fP for more on this\.) +.P +.RS 2 +.nf +npm view npm contributors +.fi +.RE +.P +If a version range is provided, then data will be printed for every +matching version of the package\. This will show which version of jsdom +was required by each matching version of yui3: +.P +.RS 2 +.nf +npm view yui3@'>0\.5\.4' dependencies\.jsdom +.fi +.RE +.P +To show the \fBconnect\fP package version history, you can do +this: +.P +.RS 2 +.nf +npm view connect versions +.fi +.RE +.SH OUTPUT +.P +If only a single string field for a single version is output, then it +will not be colorized or quoted, so as to enable piping the output to +another command\. If the field is an object, it will be output as a JavaScript object literal\. +.P +If the \-\-json flag is given, the outputted fields will be JSON\. +.P +If the version range matches multiple versions, than each printed value +will be prefixed with the version it applies to\. +.P +If multiple fields are requested, than each of them are prefixed with +the field name\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help search +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help docs + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-whoami.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-whoami.1 new file mode 100644 index 00000000..fe74cc57 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm-whoami.1 @@ -0,0 +1,26 @@ +.TH "NPM\-WHOAMI" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-whoami\fR \- Display npm username +.SH SYNOPSIS +.P +.RS 2 +.nf +npm whoami +.fi +.RE +.SH DESCRIPTION +.P +Print the \fBusername\fP config to standard output\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help adduser + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man1/npm.1 b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm.1 new file mode 100644 index 00000000..5811b129 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man1/npm.1 @@ -0,0 +1,209 @@ +.TH "NPM" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm\fR \- javascript package manager +.SH SYNOPSIS +.P +.RS 2 +.nf +npm [args] +.fi +.RE +.SH VERSION +.P +2.15.1 +.SH DESCRIPTION +.P +npm is the package manager for the Node JavaScript platform\. It puts +modules in place so that node can find them, and manages dependency +conflicts intelligently\. +.P +It is extremely configurable to support a wide variety of use cases\. +Most commonly, it is used to publish, discover, install, and develop node +programs\. +.P +Run \fBnpm help\fP to get a list of available commands\. +.SH INTRODUCTION +.P +You probably got npm because you want to install stuff\. +.P +Use \fBnpm install blerg\fP to install the latest version of "blerg"\. Check out +npm help \fBnpm\-install\fP for more info\. It can do a lot of stuff\. +.P +Use the \fBnpm search\fP command to show everything that's available\. +Use \fBnpm ls\fP to show everything you've installed\. +.SH DEPENDENCIES +.P +If a package references to another package with a git URL, npm depends +on a preinstalled git\. +.P +If one of the packages npm tries to install is a native node module and +requires compiling of C++ Code, npm will use +node\-gyp \fIhttps://github\.com/TooTallNate/node\-gyp\fR for that task\. +For a Unix system, node\-gyp \fIhttps://github\.com/TooTallNate/node\-gyp\fR +needs Python, make and a buildchain like GCC\. On Windows, +Python and Microsoft Visual Studio C++ is needed\. Python 3 is +not supported by node\-gyp \fIhttps://github\.com/TooTallNate/node\-gyp\fR\|\. +For more information visit +the node\-gyp repository \fIhttps://github\.com/TooTallNate/node\-gyp\fR and +the node\-gyp Wiki \fIhttps://github\.com/TooTallNate/node\-gyp/wiki\fR\|\. +.SH DIRECTORIES +.P +See npm help 5 \fBnpm\-folders\fP to learn about where npm puts stuff\. +.P +In particular, npm has two modes of operation: +.RS 0 +.IP \(bu 2 +global mode: +.br +npm installs packages into the install prefix at +\fBprefix/lib/node_modules\fP and bins are installed in \fBprefix/bin\fP\|\. +.IP \(bu 2 +local mode: +.br +npm installs packages into the current project directory, which +defaults to the current working directory\. Packages are installed to +\fB\|\./node_modules\fP, and bins are installed to \fB\|\./node_modules/\.bin\fP\|\. + +.RE +.P +Local mode is the default\. Use \fB\-\-global\fP or \fB\-g\fP on any command to +operate in global mode instead\. +.SH DEVELOPER USAGE +.P +If you're using npm to develop and publish your code, check out the +following help topics: +.RS 0 +.IP \(bu 2 +json: +Make a package\.json file\. See npm help 5 \fBpackage\.json\fP\|\. +.IP \(bu 2 +link: +For linking your current working code into Node's path, so that you +don't have to reinstall every time you make a change\. Use +\fBnpm link\fP to do this\. +.IP \(bu 2 +install: +It's a good idea to install things if you don't need the symbolic link\. +Especially, installing other peoples code from the registry is done via +\fBnpm install\fP +.IP \(bu 2 +adduser: +Create an account or log in\. Credentials are stored in the +user config file\. +.IP \(bu 2 +publish: +Use the \fBnpm publish\fP command to upload your code to the registry\. + +.RE +.SH CONFIGURATION +.P +npm is extremely configurable\. It reads its configuration options from +5 places\. +.RS 0 +.IP \(bu 2 +Command line switches: +.br +Set a config with \fB\-\-key val\fP\|\. All keys take a value, even if they +are booleans (the config parser doesn't know what the options are at +the time of parsing\.) If no value is provided, then the option is set +to boolean \fBtrue\fP\|\. +.IP \(bu 2 +Environment Variables: +.br +Set any config by prefixing the name in an environment variable with +\fBnpm_config_\fP\|\. For example, \fBexport npm_config_key=val\fP\|\. +.IP \(bu 2 +User Configs: +.br +The file at $HOME/\.npmrc is an ini\-formatted list of configs\. If +present, it is parsed\. If the \fBuserconfig\fP option is set in the cli +or env, then that will be used instead\. +.IP \(bu 2 +Global Configs: +.br +The file found at \.\./etc/npmrc (from the node executable, by default +this resolves to /usr/local/etc/npmrc) will be parsed if it is found\. +If the \fBglobalconfig\fP option is set in the cli, env, or user config, +then that file is parsed instead\. +.IP \(bu 2 +Defaults: +.br +npm's default configuration options are defined in +lib/utils/config\-defs\.js\. These must not be changed\. + +.RE +.P +See npm help 7 \fBnpm\-config\fP for much much more information\. +.SH CONTRIBUTIONS +.P +Patches welcome! +.RS 0 +.IP \(bu 2 +code: +Read through npm help 7 \fBnpm\-coding\-style\fP if you plan to submit code\. +You don't have to agree with it, but you do have to follow it\. +.IP \(bu 2 +docs: +If you find an error in the documentation, edit the appropriate markdown +file in the "doc" folder\. (Don't worry about generating the man page\.) + +.RE +.P +Contributors are listed in npm's \fBpackage\.json\fP file\. You can view them +easily by doing \fBnpm view npm contributors\fP\|\. +.P +If you would like to contribute, but don't know what to work on, read +the contributing guidelines and check the issues list\. +.RS 0 +.IP \(bu 2 +https://github\.com/npm/npm/wiki/Contributing\-Guidelines +.IP \(bu 2 +https://github\.com/npm/npm/issues + +.RE +.SH BUGS +.P +When you find issues, please report them: +.RS 0 +.IP \(bu 2 +web: +https://github\.com/npm/npm/issues + +.RE +.P +Be sure to include \fIall\fR of the output from the npm command that didn't work +as expected\. The \fBnpm\-debug\.log\fP file is also helpful to provide\. +.P +You can also look for isaacs in #node\.js on irc://irc\.freenode\.net\. He +will no doubt tell you to put the output in a gist or email\. +.SH AUTHOR +.P +Isaac Z\. Schlueter \fIhttp://blog\.izs\.me/\fR :: +isaacs \fIhttps://github\.com/isaacs/\fR :: +@izs \fIhttp://twitter\.com/izs\fR :: +i@izs\.me +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help help +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +README +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 index +.IP \(bu 2 +npm apihelp npm + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-bin.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-bin.3 new file mode 100644 index 00000000..2ed1862b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-bin.3 @@ -0,0 +1,17 @@ +.TH "NPM\-BIN" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-bin\fR \- Display npm bin folder +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.bin(args, cb) +.fi +.RE +.SH DESCRIPTION +.P +Print the folder where npm will install executables\. +.P +This function should not be used programmatically\. Instead, just refer +to the \fBnpm\.bin\fP property\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-bugs.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-bugs.3 new file mode 100644 index 00000000..a8437a22 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-bugs.3 @@ -0,0 +1,23 @@ +.TH "NPM\-BUGS" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-bugs\fR \- Bugs for a package in a web browser maybe +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.bugs(package, callback) +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +bug tracker URL, and then tries to open it using the \fB\-\-browser\fP +config param\. +.P +Like other commands, the first parameter is an array\. This command only +uses the first element, which is expected to be a package name with an +optional version number\. +.P +This command will launch a browser, so this command may not be the most +friendly for programmatic use\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-cache.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-cache.3 new file mode 100644 index 00000000..7a239121 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-cache.3 @@ -0,0 +1,34 @@ +.TH "NPM\-CACHE" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-cache\fR \- manage the npm cache programmatically +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.cache([args], callback) + +// helpers +npm\.commands\.cache\.clean([args], callback) +npm\.commands\.cache\.add([args], callback) +npm\.commands\.cache\.read(name, version, forceBypass, callback) +.fi +.RE +.SH DESCRIPTION +.P +This acts much the same ways as the npm help cache command line +functionality\. +.P +The callback is called with the package\.json data of the thing that is +eventually added to or read from the cache\. +.P +The top level \fBnpm\.commands\.cache(\.\.\.)\fP functionality is a public +interface, and like all commands on the \fBnpm\.commands\fP object, it will +match the command line behavior exactly\. +.P +However, the cache folder structure and the cache helper functions are +considered \fBinternal\fR API surface, and as such, may change in future +releases of npm, potentially without warning or significant version +incrementation\. +.P +Use at your own risk\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-commands.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-commands.3 new file mode 100644 index 00000000..b7dbdcd8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-commands.3 @@ -0,0 +1,28 @@ +.TH "NPM\-COMMANDS" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-commands\fR \- npm commands +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands[](args, callback) +.fi +.RE +.SH DESCRIPTION +.P +npm comes with a full set of commands, and each of the commands takes a +similar set of arguments\. +.P +In general, all commands on the command object take an \fBarray\fR of positional +argument \fBstrings\fR\|\. The last argument to any function is a callback\. Some +commands are special and take other optional arguments\. +.P +All commands have their own man page\. See \fBman npm\-\fP for command\-line +usage, or \fBman 3 npm\-\fP for programmatic usage\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 index + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-config.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-config.3 new file mode 100644 index 00000000..9530d161 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-config.3 @@ -0,0 +1,49 @@ +.TH "NPM\-CONFIG" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-config\fR \- Manage the npm configuration files +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.config(args, callback) +var val = npm\.config\.get(key) +npm\.config\.set(key, val) +.fi +.RE +.SH DESCRIPTION +.P +This function acts much the same way as the command\-line version\. The first +element in the array tells config what to do\. Possible values are: +.RS 0 +.IP \(bu 2 +\fBset\fP + Sets a config parameter\. The second element in \fBargs\fP is interpreted as the + key, and the third element is interpreted as the value\. +.IP \(bu 2 +\fBget\fP + Gets the value of a config parameter\. The second element in \fBargs\fP is the + key to get the value of\. +.IP \(bu 2 +\fBdelete\fP (\fBrm\fP or \fBdel\fP) + Deletes a parameter from the config\. The second element in \fBargs\fP is the + key to delete\. +.IP \(bu 2 +\fBlist\fP (\fBls\fP) + Show all configs that aren't secret\. No parameters necessary\. +.IP \(bu 2 +\fBedit\fP: + Opens the config file in the default editor\. This command isn't very useful + programmatically, but it is made available\. + +.RE +.P +To programmatically access npm configuration settings, or set them for +the duration of a program, use the \fBnpm\.config\.set\fP and \fBnpm\.config\.get\fP +functions instead\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm apihelp npm + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-deprecate.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-deprecate.3 new file mode 100644 index 00000000..77bff55d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-deprecate.3 @@ -0,0 +1,43 @@ +.TH "NPM\-DEPRECATE" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-deprecate\fR \- Deprecate a version of a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.deprecate(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +This command will update the npm registry entry for a package, providing +a deprecation warning to all who attempt to install it\. +.P +The 'args' parameter must have exactly two elements: +.RS 0 +.IP \(bu 2 +\fBpackage[@version]\fP + The \fBversion\fP portion is optional, and may be either a range, or a + specific version, or a tag\. +.IP \(bu 2 +\fBmessage\fP + The warning message that will be printed whenever a user attempts to + install the package\. + +.RE +.P +Note that you must be the package owner to deprecate something\. See the +\fBowner\fP and \fBadduser\fP help topics\. +.P +To un\-deprecate a package, specify an empty string (\fB""\fP) for the \fBmessage\fP argument\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm apihelp publish +.IP \(bu 2 +npm apihelp unpublish +.IP \(bu 2 +npm help 7 registry + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-docs.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-docs.3 new file mode 100644 index 00000000..d82338cb --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-docs.3 @@ -0,0 +1,23 @@ +.TH "NPM\-DOCS" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-docs\fR \- Docs for a package in a web browser maybe +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.docs(package, callback) +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +documentation URL, and then tries to open it using the \fB\-\-browser\fP +config param\. +.P +Like other commands, the first parameter is an array\. This command only +uses the first element, which is expected to be a package name with an +optional version number\. +.P +This command will launch a browser, so this command may not be the most +friendly for programmatic use\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-edit.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-edit.3 new file mode 100644 index 00000000..90a19eee --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-edit.3 @@ -0,0 +1,28 @@ +.TH "NPM\-EDIT" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-edit\fR \- Edit an installed package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.edit(package, callback) +.fi +.RE +.SH DESCRIPTION +.P +Opens the package folder in the default editor (or whatever you've +configured as the npm \fBeditor\fP config \-\- see \fBnpm help config\fP\|\.) +.P +After it has been edited, the package is rebuilt so as to pick up any +changes in compiled packages\. +.P +For instance, you can do \fBnpm install connect\fP to install connect +into your package, and then \fBnpm\.commands\.edit(["connect"], callback)\fP +to make a few changes to your locally installed copy\. +.P +The first parameter is a string array with a single element, the package +to open\. The package can optionally have a version number attached\. +.P +Since this command opens an editor in a new process, be careful about where +and how this is used\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-explore.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-explore.3 new file mode 100644 index 00000000..020ef546 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-explore.3 @@ -0,0 +1,22 @@ +.TH "NPM\-EXPLORE" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-explore\fR \- Browse an installed package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.explore(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +Spawn a subshell in the directory of the installed package specified\. +.P +If a command is specified, then it is run in the subshell, which then +immediately terminates\. +.P +Note that the package is \fInot\fR automatically rebuilt afterwards, so be +sure to use \fBnpm rebuild \fP if you make any changes\. +.P +The first element in the 'args' parameter must be a package name\. After that is the optional command, which can be any number of strings\. All of the strings will be combined into one, space\-delimited command\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-help-search.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-help-search.3 new file mode 100644 index 00000000..a387b519 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-help-search.3 @@ -0,0 +1,41 @@ +.TH "NPM\-HELP\-SEARCH" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-help-search\fR \- Search the help pages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.helpSearch(args, [silent,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command is rarely useful, but it exists in the rare case that it is\. +.P +This command takes an array of search terms and returns the help pages that +match in order of best match\. +.P +If there is only one match, then npm displays that help section\. If there +are multiple results, the results are printed to the screen formatted and the +array of results is returned\. Each result is an object with these properties: +.RS 0 +.IP \(bu 2 +hits: +A map of args to number of hits on that arg\. For example, {"npm": 3} +.IP \(bu 2 +found: +Total number of unique args that matched\. +.IP \(bu 2 +totalHits: +Total number of hits\. +.IP \(bu 2 +lines: +An array of all matching lines (and some adjacent lines)\. +.IP \(bu 2 +file: +Name of the file that matched + +.RE +.P +The silent parameter is not necessary not used, but it may in the future\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-init.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-init.3 new file mode 100644 index 00000000..245d6254 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-init.3 @@ -0,0 +1,32 @@ +.TH "NPM" "" "March 2016" "" "" +.SH "NAME" +\fBnpm\fR +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.init(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +This will ask you a bunch of questions, and then write a package\.json for you\. +.P +It attempts to make reasonable guesses about what you want things to be set to, +and then writes a package\.json file with the options you've selected\. +.P +If you already have a package\.json file, it'll read that first, and default to +the options in there\. +.P +It is strictly additive, so it does not delete options from your package\.json +without a really good reason to do so\. +.P +Since this function expects to be run on the command\-line, it doesn't work very +well as a programmatically\. The best option is to roll your own, and since +JavaScript makes it stupid simple to output formatted JSON, that is the +preferred method\. If you're sure you want to handle command\-line prompting, +then go ahead and use this programmatically\. +.SH SEE ALSO +.P +npm help 5 package\.json + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-install.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-install.3 new file mode 100644 index 00000000..79b2ef44 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-install.3 @@ -0,0 +1,23 @@ +.TH "NPM\-INSTALL" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-install\fR \- install a package programmatically +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.install([where,] packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This acts much the same ways as installing on the command\-line\. +.P +The 'where' parameter is optional and only used internally, and it specifies +where the packages should be installed to\. +.P +The 'packages' parameter is an array of strings\. Each element in the array is +the name of a package to be installed\. +.P +Finally, 'callback' is a function that will be called when all packages have been +installed or when an error has been encountered\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-link.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-link.3 new file mode 100644 index 00000000..92cb36d1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-link.3 @@ -0,0 +1,41 @@ +.TH "NPM\-LINK" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-link\fR \- Symlink a package folder +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.link(callback) +npm\.commands\.link(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +Package linking is a two\-step process\. +.P +Without parameters, link will create a globally\-installed +symbolic link from \fBprefix/package\-name\fP to the current folder\. +.P +With a parameters, link will create a symlink from the local \fBnode_modules\fP +folder to the global symlink\. +.P +When creating tarballs for \fBnpm publish\fP, the linked packages are +"snapshotted" to their current state by resolving the symbolic links\. +.P +This is +handy for installing your own stuff, so that you can work on it and test it +iteratively without having to continually rebuild\. +.P +For example: +.P +.RS 2 +.nf +npm\.commands\.link(cb) # creates global link from the cwd + # (say redis package) +npm\.commands\.link('redis', cb) # link\-install the package +.fi +.RE +.P +Now, any changes to the redis package will be reflected in +the package in the current working directory + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-load.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-load.3 new file mode 100644 index 00000000..3651050e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-load.3 @@ -0,0 +1,34 @@ +.TH "NPM\-LOAD" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-load\fR \- Load config settings +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.load(conf, cb) +.fi +.RE +.SH DESCRIPTION +.P +npm\.load() must be called before any other function call\. Both parameters are +optional, but the second is recommended\. +.P +The first parameter is an object containing command\-line config params, and the +second parameter is a callback that will be called when npm is loaded and ready +to serve\. +.P +The first parameter should follow a similar structure as the package\.json +config object\. +.P +For example, to emulate the \-\-dev flag, pass an object that looks like this: +.P +.RS 2 +.nf +{ + "dev": true +} +.fi +.RE +.P +For a list of all the available command\-line configs, see \fBnpm help config\fP + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-ls.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-ls.3 new file mode 100644 index 00000000..04991c68 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-ls.3 @@ -0,0 +1,68 @@ +.TH "NPM\-LS" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-ls\fR \- List installed packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.ls(args, [silent,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command will print to stdout all the versions of packages that are +installed, as well as their dependencies, in a tree\-structure\. It will also +return that data using the callback\. +.P +This command does not take any arguments, but args must be defined\. +Beyond that, if any arguments are passed in, npm will politely warn that it +does not take positional arguments, though you may set config flags +like with any other command, such as \fBglobal\fP to list global packages\. +.P +It will print out extraneous, missing, and invalid packages\. +.P +If the silent parameter is set to true, nothing will be output to the screen, +but the data will still be returned\. +.P +Callback is provided an error if one occurred, the full data about which +packages are installed and which dependencies they will receive, and a +"lite" data object which just shows which versions are installed where\. +Note that the full data object is a circular structure, so care must be +taken if it is serialized to JSON\. +.SH CONFIGURATION +.SS long +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show extended information\. +.SS parseable +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show parseable output instead of tree view\. +.SS global +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +List packages in the global install prefix instead of in the current +project\. +.P +Note, if parseable is set or long isn't set, then duplicates will be trimmed\. +This means that if a submodule has the same dependency as a parent module, then the +dependency will only be output once\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-outdated.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-outdated.3 new file mode 100644 index 00000000..c39fbfc5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-outdated.3 @@ -0,0 +1,17 @@ +.TH "NPM\-OUTDATED" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-outdated\fR \- Check for outdated packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.outdated([packages,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command will check the registry to see if the specified packages are +currently outdated\. +.P +If the 'packages' parameter is left out, npm will check all packages\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-owner.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-owner.3 new file mode 100644 index 00000000..f7663384 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-owner.3 @@ -0,0 +1,43 @@ +.TH "NPM\-OWNER" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-owner\fR \- Manage package owners +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.owner(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +The first element of the 'args' parameter defines what to do, and the subsequent +elements depend on the action\. Possible values for the action are (order of +parameters are given in parenthesis): +.RS 0 +.IP \(bu 2 +ls (package): +List all the users who have access to modify a package and push new versions\. +Handy when you need to know who to bug for help\. +.IP \(bu 2 +add (user, package): +Add a new user as a maintainer of a package\. This user is enabled to modify +metadata, publish new versions, and add other owners\. +.IP \(bu 2 +rm (user, package): +Remove a user from the package owner list\. This immediately revokes their +privileges\. + +.RE +.P +Note that there is only one level of access\. Either you can modify a package, +or you can't\. Future versions may contain more fine\-grained access levels, but +that is not implemented at this time\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm apihelp publish +.IP \(bu 2 +npm help 7 registry + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-pack.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-pack.3 new file mode 100644 index 00000000..08cf033f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-pack.3 @@ -0,0 +1,23 @@ +.TH "NPM\-PACK" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-pack\fR \- Create a tarball from a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.pack([packages,] callback) +.fi +.RE +.SH DESCRIPTION +.P +For anything that's installable (that is, a package folder, tarball, +tarball url, name@tag, name@version, or name), this command will fetch +it to the cache, and then copy the tarball to the current working +directory as \fB\-\.tgz\fP, and then write the filenames out to +stdout\. +.P +If the same package is specified multiple times, then the file will be +overwritten the second time\. +.P +If no arguments are supplied, then npm packs the current package folder\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-ping.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-ping.3 new file mode 100644 index 00000000..30702e24 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-ping.3 @@ -0,0 +1,17 @@ +.TH "NPM\-PING" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-ping\fR \- Ping npm registry +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.registry\.ping(registry, options, function (er, pong)) +.fi +.RE +.SH DESCRIPTION +.P +Attempts to connect to the given registry, returning a \fBpong\fP +object with various metadata if it succeeds\. +.P +This function is primarily useful for debugging connection issues +to npm registries\. diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-prefix.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-prefix.3 new file mode 100644 index 00000000..d1a13389 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-prefix.3 @@ -0,0 +1,19 @@ +.TH "NPM\-PREFIX" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-prefix\fR \- Display prefix +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.prefix(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +Print the prefix to standard out\. +.P +\|'args' is never used and callback is never called with data\. +\|'args' must be present or things will break\. +.P +This function is not useful programmatically + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-prune.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-prune.3 new file mode 100644 index 00000000..d0dc0cac --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-prune.3 @@ -0,0 +1,21 @@ +.TH "NPM\-PRUNE" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-prune\fR \- Remove extraneous packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.prune([packages,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command removes "extraneous" packages\. +.P +The first parameter is optional, and it specifies packages to be removed\. +.P +No packages are specified, then all packages will be checked\. +.P +Extraneous packages are packages that are not listed on the parent +package's dependencies list\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-publish.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-publish.3 new file mode 100644 index 00000000..58829570 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-publish.3 @@ -0,0 +1,41 @@ +.TH "NPM\-PUBLISH" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-publish\fR \- Publish a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.publish([packages,] callback) +.fi +.RE +.SH DESCRIPTION +.P +Publishes a package to the registry so that it can be installed by name\. +Possible values in the 'packages' array are: +.RS 0 +.IP \(bu 2 +\fB\fP: +A folder containing a package\.json file +.IP \(bu 2 +\fB\fP: +A url or file path to a gzipped tar archive containing a single folder +with a package\.json file inside\. + +.RE +.P +If the package array is empty, npm will try to publish something in the +current working directory\. +.P +This command could fails if one of the packages specified already exists in +the registry\. Overwrites when the "force" environment variable is set\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm apihelp owner + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-rebuild.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-rebuild.3 new file mode 100644 index 00000000..5b08c2c6 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-rebuild.3 @@ -0,0 +1,19 @@ +.TH "NPM\-REBUILD" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-rebuild\fR \- Rebuild a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.rebuild([packages,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command runs the \fBnpm build\fP command on each of the matched packages\. This is useful +when you install a new version of node, and must recompile all your C++ addons with +the new binary\. If no 'packages' parameter is specify, every package will be rebuilt\. +.SH CONFIGURATION +.P +See \fBnpm help build\fP + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-repo.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-repo.3 new file mode 100644 index 00000000..72e41224 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-repo.3 @@ -0,0 +1,23 @@ +.TH "NPM\-REPO" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-repo\fR \- Open package repository page in the browser +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.repo(package, callback) +.fi +.RE +.SH DESCRIPTION +.P +This command tries to guess at the likely location of a package's +repository URL, and then tries to open it using the \fB\-\-browser\fP +config param\. +.P +Like other commands, the first parameter is an array\. This command only +uses the first element, which is expected to be a package name with an +optional version number\. +.P +This command will launch a browser, so this command may not be the most +friendly for programmatic use\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-restart.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-restart.3 new file mode 100644 index 00000000..a81e93bf --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-restart.3 @@ -0,0 +1,58 @@ +.TH "NPM\-RESTART" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-restart\fR \- Restart a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.restart(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This restarts a package (or multiple packages)\. +.P +This runs a package's "stop", "restart", and "start" scripts, and associated +pre\- and post\- scripts, in the order given below: +.RS 0 +.IP 1. 3 +prerestart +.IP 2. 3 +prestop +.IP 3. 3 +stop +.IP 4. 3 +poststop +.IP 5. 3 +restart +.IP 6. 3 +prestart +.IP 7. 3 +start +.IP 8. 3 +poststart +.IP 9. 3 +postrestart + +.RE +.P +If no version is specified, then it restarts the "active" version\. +.P +npm can restart multiple packages\. Just specify multiple packages in +the \fBpackages\fP parameter\. +.SH NOTE +.P +Note that the "restart" script is run \fBin addition to\fR the "stop" +and "start" scripts, not instead of them\. +.P +This is the behavior as of \fBnpm\fP major version 2\. A change in this +behavior will be accompanied by an increase in major version number +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm apihelp start +.IP \(bu 2 +npm apihelp stop + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-root.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-root.3 new file mode 100644 index 00000000..09a92403 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-root.3 @@ -0,0 +1,19 @@ +.TH "NPM\-ROOT" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-root\fR \- Display npm root +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.root(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +Print the effective \fBnode_modules\fP folder to standard out\. +.P +\|'args' is never used and callback is never called with data\. +\|'args' must be present or things will break\. +.P +This function is not useful programmatically\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-run-script.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-run-script.3 new file mode 100644 index 00000000..54becc99 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-run-script.3 @@ -0,0 +1,37 @@ +.TH "NPM\-RUN\-SCRIPT" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-run-script\fR \- Run arbitrary package scripts +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.run\-script(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +This runs an arbitrary command from a package's "scripts" object\. +.P +It is used by the test, start, restart, and stop commands, but can be +called directly, as well\. +.P +The 'args' parameter is an array of strings\. Behavior depends on the number +of elements\. If there is only one element, npm assumes that the element +represents a command to be run on the local repository\. If there is more than +one element, then the first is assumed to be the package and the second is +assumed to be the command to run\. All other elements are ignored\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm apihelp test +.IP \(bu 2 +npm apihelp start +.IP \(bu 2 +npm apihelp restart +.IP \(bu 2 +npm apihelp stop + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-search.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-search.3 new file mode 100644 index 00000000..4dedc603 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-search.3 @@ -0,0 +1,52 @@ +.TH "NPM\-SEARCH" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-search\fR \- Search for packages +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.search(searchTerms, [silent,] [staleness,] callback) +.fi +.RE +.SH DESCRIPTION +.P +Search the registry for packages matching the search terms\. The available parameters are: +.RS 0 +.IP \(bu 2 +searchTerms: +Array of search terms\. These terms are case\-insensitive\. +.IP \(bu 2 +silent: +If true, npm will not log anything to the console\. +.IP \(bu 2 +staleness: +This is the threshold for stale packages\. "Fresh" packages are not refreshed +from the registry\. This value is measured in seconds\. +.IP \(bu 2 +callback: +Returns an object where each key is the name of a package, and the value +is information about that package along with a 'words' property, which is +a space\-delimited string of all of the interesting words in that package\. +The only properties included are those that are searched, which generally include: +.RS 0 +.IP \(bu 2 +name +.IP \(bu 2 +description +.IP \(bu 2 +maintainers +.IP \(bu 2 +url +.IP \(bu 2 +keywords + +.RE + +.RE +.P +A search on the registry excludes any result that does not match all of the +search terms\. It also removes any items from the results that contain an +excluded term (the "searchexclude" config)\. The search is case insensitive +and doesn't try to read your mind (it doesn't do any verb tense matching or the +like)\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-shrinkwrap.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-shrinkwrap.3 new file mode 100644 index 00000000..5f6265f7 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-shrinkwrap.3 @@ -0,0 +1,24 @@ +.TH "NPM\-SHRINKWRAP" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-shrinkwrap\fR \- programmatically generate package shrinkwrap file +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.shrinkwrap(args, [silent,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This acts much the same ways as shrinkwrapping on the command\-line\. +.P +This command does not take any arguments, but 'args' must be defined\. +Beyond that, if any arguments are passed in, npm will politely warn that it +does not take positional arguments\. +.P +If the 'silent' parameter is set to true, nothing will be output to the screen, +but the shrinkwrap file will still be written\. +.P +Finally, 'callback' is a function that will be called when the shrinkwrap has +been saved\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-start.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-start.3 new file mode 100644 index 00000000..214030d4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-start.3 @@ -0,0 +1,17 @@ +.TH "NPM\-START" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-start\fR \- Start a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.start(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This runs a package's "start" script, if one was provided\. +.P +npm can start multiple packages\. Just specify multiple packages in the +\fBpackages\fP parameter\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-stop.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-stop.3 new file mode 100644 index 00000000..2a22406d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-stop.3 @@ -0,0 +1,17 @@ +.TH "NPM\-STOP" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-stop\fR \- Stop a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.stop(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This runs a package's "stop" script, if one was provided\. +.P +npm can run stop on multiple packages\. Just specify multiple packages +in the \fBpackages\fP parameter\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-tag.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-tag.3 new file mode 100644 index 00000000..6d68354a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-tag.3 @@ -0,0 +1,27 @@ +.TH "NPM\-TAG" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-tag\fR \- Tag a published version +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.tag(package@version, tag, callback) +.fi +.RE +.SH DESCRIPTION +.P +Tags the specified version of the package with the specified tag, or the +\fB\-\-tag\fP config if not specified\. +.P +The 'package@version' is an array of strings, but only the first two elements are +currently used\. +.P +The first element must be in the form package@version, where package +is the package name and version is the version number (much like installing a +specific version)\. +.P +The second element is the name of the tag to tag this version with\. If this +parameter is missing or falsey (empty), the default from the config will be +used\. For more information about how to set this config, check +\fBman 3 npm\-config\fP for programmatic usage or \fBman npm\-config\fP for cli usage\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-test.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-test.3 new file mode 100644 index 00000000..3dd84370 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-test.3 @@ -0,0 +1,20 @@ +.TH "NPM\-TEST" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-test\fR \- Test a package +.SH SYNOPSIS +.P +.RS 2 +.nf + npm\.commands\.test(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This runs a package's "test" script, if one was provided\. +.P +To run tests as a condition of installation, set the \fBnpat\fP config to +true\. +.P +npm can run tests on multiple packages\. Just specify multiple packages +in the \fBpackages\fP parameter\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-uninstall.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-uninstall.3 new file mode 100644 index 00000000..ab2b0ebf --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-uninstall.3 @@ -0,0 +1,20 @@ +.TH "NPM\-UNINSTALL" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-uninstall\fR \- uninstall a package programmatically +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.uninstall(packages, callback) +.fi +.RE +.SH DESCRIPTION +.P +This acts much the same ways as uninstalling on the command\-line\. +.P +The 'packages' parameter is an array of strings\. Each element in the array is +the name of a package to be uninstalled\. +.P +Finally, 'callback' is a function that will be called when all packages have been +uninstalled or when an error has been encountered\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-unpublish.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-unpublish.3 new file mode 100644 index 00000000..7be3c131 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-unpublish.3 @@ -0,0 +1,24 @@ +.TH "NPM\-UNPUBLISH" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-unpublish\fR \- Remove a package from the registry +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.unpublish(package, callback) +.fi +.RE +.SH DESCRIPTION +.P +This removes a package version from the registry, deleting its +entry and removing the tarball\. +.P +The package parameter must be defined\. +.P +Only the first element in the package parameter is used\. If there is no first +element, then npm assumes that the package at the current working directory +is what is meant\. +.P +If no version is specified, or if all versions are removed then +the root package entry is removed from the registry entirely\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-update.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-update.3 new file mode 100644 index 00000000..715c2e8f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-update.3 @@ -0,0 +1,26 @@ +.TH "NPM\-UPDATE" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-update\fR \- Update a package +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.update(packages, callback) +.fi +.RE +.TH "DESCRIPTION" "" "March 2016" "" "" +.SH "NAME" +\fBDESCRIPTION\fR +.P +Updates a package, upgrading it to the latest version\. It also installs any +missing packages\. +.P +The \fBpackages\fP argument is an array of packages to update\. The \fBcallback\fP +parameter will be called when done or when an error occurs\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help update + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-version.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-version.3 new file mode 100644 index 00000000..dfbeb30f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-version.3 @@ -0,0 +1,22 @@ +.TH "NPM\-VERSION" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-version\fR \- Bump a package version +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.version(newversion, callback) +.fi +.RE +.SH DESCRIPTION +.P +Run this in a package directory to bump the version and write the new +data back to the package\.json file\. +.P +If run in a git repo, it will also create a version commit and tag, and +fail if the repo is not clean\. +.P +Like all other commands, this function takes a string array as its first +parameter\. The difference, however, is this function will fail if it does +not have exactly one element\. The only element should be a version number\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-view.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-view.3 new file mode 100644 index 00000000..ffc3d94a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-view.3 @@ -0,0 +1,131 @@ +.TH "NPM\-VIEW" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-view\fR \- View registry info +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.view(args, [silent,] callback) +.fi +.RE +.SH DESCRIPTION +.P +This command shows data about a package and prints it to the stream +referenced by the \fBoutfd\fP config, which defaults to stdout\. +.P +The "args" parameter is an ordered list that closely resembles the command\-line +usage\. The elements should be ordered such that the first element is +the package and version (package@version)\. The version is optional\. After that, +the rest of the parameters are fields with optional subfields ("field\.subfield") +which can be used to get only the information desired from the registry\. +.P +The callback will be passed all of the data returned by the query\. +.P +For example, to get the package registry entry for the \fBconnect\fP package, +you can do this: +.P +.RS 2 +.nf +npm\.commands\.view(["connect"], callback) +.fi +.RE +.P +If no version is specified, "latest" is assumed\. +.P +Field names can be specified after the package descriptor\. +For example, to show the dependencies of the \fBronn\fP package at version +0\.3\.5, you could do the following: +.P +.RS 2 +.nf +npm\.commands\.view(["ronn@0\.3\.5", "dependencies"], callback) +.fi +.RE +.P +You can view child field by separating them with a period\. +To view the git repository URL for the latest version of npm, you could +do this: +.P +.RS 2 +.nf +npm\.commands\.view(["npm", "repository\.url"], callback) +.fi +.RE +.P +For fields that are arrays, requesting a non\-numeric field will return +all of the values from the objects in the list\. For example, to get all +the contributor names for the "express" project, you can do this: +.P +.RS 2 +.nf +npm\.commands\.view(["express", "contributors\.email"], callback) +.fi +.RE +.P +You may also use numeric indices in square braces to specifically select +an item in an array field\. To just get the email address of the first +contributor in the list, you can do this: +.P +.RS 2 +.nf +npm\.commands\.view(["express", "contributors[0]\.email"], callback) +.fi +.RE +.P +Multiple fields may be specified, and will be printed one after another\. +For exampls, to get all the contributor names and email addresses, you +can do this: +.P +.RS 2 +.nf +npm\.commands\.view(["express", "contributors\.name", "contributors\.email"], callback) +.fi +.RE +.P +"Person" fields are shown as a string if they would be shown as an +object\. So, for example, this will show the list of npm contributors in +the shortened string format\. (See \fBnpm help json\fP for more on this\.) +.P +.RS 2 +.nf +npm\.commands\.view(["npm", "contributors"], callback) +.fi +.RE +.P +If a version range is provided, then data will be printed for every +matching version of the package\. This will show which version of jsdom +was required by each matching version of yui3: +.P +.RS 2 +.nf +npm\.commands\.view(["yui3@>0\.5\.4", "dependencies\.jsdom"], callback) +.fi +.RE +.SH OUTPUT +.P +If only a single string field for a single version is output, then it +will not be colorized or quoted, so as to enable piping the output to +another command\. +.P +If the version range matches multiple versions, than each printed value +will be prefixed with the version it applies to\. +.P +If multiple fields are requested, than each of them are prefixed with +the field name\. +.P +Console output can be disabled by setting the 'silent' parameter to true\. +.SH RETURN VALUE +.P +The data returned will be an object in this formation: +.P +.RS 2 +.nf +{ : + { : + , \.\.\. } +, \.\.\. } +.fi +.RE +.P +corresponding to the list of fields selected\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-whoami.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-whoami.3 new file mode 100644 index 00000000..b0263849 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm-whoami.3 @@ -0,0 +1,19 @@ +.TH "NPM\-WHOAMI" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm-whoami\fR \- Display npm username +.SH SYNOPSIS +.P +.RS 2 +.nf +npm\.commands\.whoami(args, callback) +.fi +.RE +.SH DESCRIPTION +.P +Print the \fBusername\fP config to standard output\. +.P +\|'args' is never used and callback is never called with data\. +\|'args' must be present or things will break\. +.P +This function is not useful programmatically + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man3/npm.3 b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm.3 new file mode 100644 index 00000000..5750bf10 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man3/npm.3 @@ -0,0 +1,124 @@ +.TH "NPM" "3" "March 2016" "" "" +.SH "NAME" +\fBnpm\fR \- javascript package manager +.SH SYNOPSIS +.P +.RS 2 +.nf +var npm = require("npm") +npm\.load([configObject, ]function (er, npm) { + // use the npm object, now that it's loaded\. + + npm\.config\.set(key, val) + val = npm\.config\.get(key) + + console\.log("prefix = %s", npm\.prefix) + + npm\.commands\.install(["package"], cb) +}) +.fi +.RE +.SH VERSION +.P +2.15.1 +.SH DESCRIPTION +.P +This is the API documentation for npm\. +To find documentation of the command line +client, see npm help \fBnpm\fP\|\. +.P +Prior to using npm's commands, \fBnpm\.load()\fP must be called\. If you provide +\fBconfigObject\fP as an object map of top\-level configs, they override the values +stored in the various config locations\. In the npm command line client, this +set of configs is parsed from the command line options\. Additional +configuration params are loaded from two configuration files\. See +npm help \fBnpm\-config\fP, npm help 7 \fBnpm\-config\fP, and npm help 5 \fBnpmrc\fP for more information\. +.P +After that, each of the functions are accessible in the +commands object: \fBnpm\.commands\.\fP\|\. See npm help 7 \fBnpm\-index\fP for a list of +all possible commands\. +.P +All commands on the command object take an \fBarray\fR of positional argument +\fBstrings\fR\|\. The last argument to any function is a callback\. Some +commands take other optional arguments\. +.P +Configs cannot currently be set on a per function basis, as each call to +npm\.config\.set will change the value for \fIall\fR npm commands in that process\. +.P +To find API documentation for a specific command, run the \fBnpm apihelp\fP +command\. +.SH METHODS AND PROPERTIES +.RS 0 +.IP \(bu 2 +\fBnpm\.load(configs, cb)\fP + Load the configuration params, and call the \fBcb\fP function once the + globalconfig and userconfig files have been loaded as well, or on + nextTick if they've already been loaded\. +.IP \(bu 2 +\fBnpm\.config\fP + An object for accessing npm configuration parameters\. +.RS 0 +.IP \(bu 2 +\fBnpm\.config\.get(key)\fP +.IP \(bu 2 +\fBnpm\.config\.set(key, val)\fP +.IP \(bu 2 +\fBnpm\.config\.del(key)\fP + +.RE +.IP \(bu 2 +\fBnpm\.dir\fP or \fBnpm\.root\fP + The \fBnode_modules\fP directory where npm will operate\. +.IP \(bu 2 +\fBnpm\.prefix\fP + The prefix where npm is operating\. (Most often the current working + directory\.) +.IP \(bu 2 +\fBnpm\.cache\fP + The place where npm keeps JSON and tarballs it fetches from the + registry (or uploads to the registry)\. +.IP \(bu 2 +\fBnpm\.tmp\fP + npm's temporary working directory\. +.IP \(bu 2 +\fBnpm\.deref\fP + Get the "real" name for a command that has either an alias or + abbreviation\. + +.RE +.SH MAGIC +.P +For each of the methods in the \fBnpm\.commands\fP object, a method is added to the +npm object, which takes a set of positional string arguments rather than an +array and a callback\. +.P +If the last argument is a callback, then it will use the supplied +callback\. However, if no callback is provided, then it will print out +the error or results\. +.P +For example, this would work in a node repl: +.P +.RS 2 +.nf +> npm = require("npm") +> npm\.load() // wait a sec\.\.\. +> npm\.install("dnode", "express") +.fi +.RE +.P +Note that that \fIwon't\fR work in a node program, since the \fBinstall\fP +method will get called before the configuration load is completed\. +.SH ABBREVS +.P +In order to support \fBnpm ins foo\fP instead of \fBnpm install foo\fP, the +\fBnpm\.commands\fP object has a set of abbreviations as well as the full +method names\. Use the \fBnpm\.deref\fP method to find the real name\. +.P +For example: +.P +.RS 2 +.nf +var cmd = npm\.deref("unp") // cmd === "unpublish" +.fi +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man5/npm-folders.5 b/bin/nodejs0.12.16/node_modules/npm/man/man5/npm-folders.5 new file mode 100644 index 00000000..46f902a5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man5/npm-folders.5 @@ -0,0 +1,229 @@ +.TH "NPM\-FOLDERS" "5" "March 2016" "" "" +.SH "NAME" +\fBnpm-folders\fR \- Folder Structures Used by npm +.SH DESCRIPTION +.P +npm puts various things on your computer\. That's its job\. +.P +This document will tell you what it puts where\. +.SS tl;dr +.RS 0 +.IP \(bu 2 +Local install (default): puts stuff in \fB\|\./node_modules\fP of the current +package root\. +.IP \(bu 2 +Global install (with \fB\-g\fP): puts stuff in /usr/local or wherever node +is installed\. +.IP \(bu 2 +Install it \fBlocally\fR if you're going to \fBrequire()\fP it\. +.IP \(bu 2 +Install it \fBglobally\fR if you're going to run it on the command line\. +.IP \(bu 2 +If you need both, then install it in both places, or use \fBnpm link\fP\|\. + +.RE +.SS prefix Configuration +.P +The \fBprefix\fP config defaults to the location where node is installed\. +On most systems, this is \fB/usr/local\fP\|\. On windows, this is the exact +location of the node\.exe binary\. On Unix systems, it's one level up, +since node is typically installed at \fB{prefix}/bin/node\fP rather than +\fB{prefix}/node\.exe\fP\|\. +.P +When the \fBglobal\fP flag is set, npm installs things into this prefix\. +When it is not set, it uses the root of the current package, or the +current working directory if not in a package already\. +.SS Node Modules +.P +Packages are dropped into the \fBnode_modules\fP folder under the \fBprefix\fP\|\. +When installing locally, this means that you can +\fBrequire("packagename")\fP to load its main module, or +\fBrequire("packagename/lib/path/to/sub/module")\fP to load other modules\. +.P +Global installs on Unix systems go to \fB{prefix}/lib/node_modules\fP\|\. +Global installs on Windows go to \fB{prefix}/node_modules\fP (that is, no +\fBlib\fP folder\.) +.P +Scoped packages are installed the same way, except they are grouped together +in a sub\-folder of the relevant \fBnode_modules\fP folder with the name of that +scope prefix by the @ symbol, e\.g\. \fBnpm install @myorg/package\fP would place +the package in \fB{prefix}/node_modules/@myorg/package\fP\|\. See npm help 7 \fBscope\fP for +more details\. +.P +If you wish to \fBrequire()\fP a package, then install it locally\. +.SS Executables +.P +When in global mode, executables are linked into \fB{prefix}/bin\fP on Unix, +or directly into \fB{prefix}\fP on Windows\. +.P +When in local mode, executables are linked into +\fB\|\./node_modules/\.bin\fP so that they can be made available to scripts run +through npm\. (For example, so that a test runner will be in the path +when you run \fBnpm test\fP\|\.) +.SS Man Pages +.P +When in global mode, man pages are linked into \fB{prefix}/share/man\fP\|\. +.P +When in local mode, man pages are not installed\. +.P +Man pages are not installed on Windows systems\. +.SS Cache +.P +See npm help \fBnpm\-cache\fP\|\. Cache files are stored in \fB~/\.npm\fP on Posix, or +\fB~/npm\-cache\fP on Windows\. +.P +This is controlled by the \fBcache\fP configuration param\. +.SS Temp Files +.P +Temporary files are stored by default in the folder specified by the +\fBtmp\fP config, which defaults to the TMPDIR, TMP, or TEMP environment +variables, or \fB/tmp\fP on Unix and \fBc:\\windows\\temp\fP on Windows\. +.P +Temp files are given a unique folder under this root for each run of the +program, and are deleted upon successful exit\. +.SH More Information +.P +When installing locally, npm first tries to find an appropriate +\fBprefix\fP folder\. This is so that \fBnpm install foo@1\.2\.3\fP will install +to the sensible root of your package, even if you happen to have \fBcd\fPed +into some other folder\. +.P +Starting at the $PWD, npm will walk up the folder tree checking for a +folder that contains either a \fBpackage\.json\fP file, or a \fBnode_modules\fP +folder\. If such a thing is found, then that is treated as the effective +"current directory" for the purpose of running npm commands\. (This +behavior is inspired by and similar to git's \.git\-folder seeking +logic when running git commands in a working dir\.) +.P +If no package root is found, then the current folder is used\. +.P +When you run \fBnpm install foo@1\.2\.3\fP, then the package is loaded into +the cache, and then unpacked into \fB\|\./node_modules/foo\fP\|\. Then, any of +foo's dependencies are similarly unpacked into +\fB\|\./node_modules/foo/node_modules/\.\.\.\fP\|\. +.P +Any bin files are symlinked to \fB\|\./node_modules/\.bin/\fP, so that they may +be found by npm scripts when necessary\. +.SS Global Installation +.P +If the \fBglobal\fP configuration is set to true, then npm will +install packages "globally"\. +.P +For global installation, packages are installed roughly the same way, +but using the folders described above\. +.SS Cycles, Conflicts, and Folder Parsimony +.P +Cycles are handled using the property of node's module system that it +walks up the directories looking for \fBnode_modules\fP folders\. So, at every +stage, if a package is already installed in an ancestor \fBnode_modules\fP +folder, then it is not installed at the current location\. +.P +Consider the case above, where \fBfoo \-> bar \-> baz\fP\|\. Imagine if, in +addition to that, baz depended on bar, so you'd have: +\fBfoo \-> bar \-> baz \-> bar \-> baz \.\.\.\fP\|\. However, since the folder +structure is: \fBfoo/node_modules/bar/node_modules/baz\fP, there's no need to +put another copy of bar into \fB\|\.\.\./baz/node_modules\fP, since when it calls +require("bar"), it will get the copy that is installed in +\fBfoo/node_modules/bar\fP\|\. +.P +This shortcut is only used if the exact same +version would be installed in multiple nested \fBnode_modules\fP folders\. It +is still possible to have \fBa/node_modules/b/node_modules/a\fP if the two +"a" packages are different versions\. However, without repeating the +exact same package multiple times, an infinite regress will always be +prevented\. +.P +Another optimization can be made by installing dependencies at the +highest level possible, below the localized "target" folder\. +.SS Example +.P +Consider this dependency graph: +.P +.RS 2 +.nf +foo ++\-\- blerg@1\.2\.5 ++\-\- bar@1\.2\.3 +| +\-\- blerg@1\.x (latest=1\.3\.7) +| +\-\- baz@2\.x +| | `\-\- quux@3\.x +| | `\-\- bar@1\.2\.3 (cycle) +| `\-\- asdf@* +`\-\- baz@1\.2\.3 + `\-\- quux@3\.x + `\-\- bar +.fi +.RE +.P +In this case, we might expect a folder structure like this: +.P +.RS 2 +.nf +foo ++\-\- node_modules + +\-\- blerg (1\.2\.5) <\-\-\-[A] + +\-\- bar (1\.2\.3) <\-\-\-[B] + | `\-\- node_modules + | +\-\- baz (2\.0\.2) <\-\-\-[C] + | | `\-\- node_modules + | | `\-\- quux (3\.2\.0) + | `\-\- asdf (2\.3\.4) + `\-\- baz (1\.2\.3) <\-\-\-[D] + `\-\- node_modules + `\-\- quux (3\.2\.0) <\-\-\-[E] +.fi +.RE +.P +Since foo depends directly on \fBbar@1\.2\.3\fP and \fBbaz@1\.2\.3\fP, those are +installed in foo's \fBnode_modules\fP folder\. +.P +Even though the latest copy of blerg is 1\.3\.7, foo has a specific +dependency on version 1\.2\.5\. So, that gets installed at [A]\. Since the +parent installation of blerg satisfies bar's dependency on \fBblerg@1\.x\fP, +it does not install another copy under [B]\. +.P +Bar [B] also has dependencies on baz and asdf, so those are installed in +bar's \fBnode_modules\fP folder\. Because it depends on \fBbaz@2\.x\fP, it cannot +re\-use the \fBbaz@1\.2\.3\fP installed in the parent \fBnode_modules\fP folder [D], +and must install its own copy [C]\. +.P +Underneath bar, the \fBbaz \-> quux \-> bar\fP dependency creates a cycle\. +However, because bar is already in quux's ancestry [B], it does not +unpack another copy of bar into that folder\. +.P +Underneath \fBfoo \-> baz\fP [D], quux's [E] folder tree is empty, because its +dependency on bar is satisfied by the parent folder copy installed at [B]\. +.P +For a graphical breakdown of what is installed where, use \fBnpm ls\fP\|\. +.SS Publishing +.P +Upon publishing, npm will look in the \fBnode_modules\fP folder\. If any of +the items there are not in the \fBbundledDependencies\fP array, then they will +not be included in the package tarball\. +.P +This allows a package maintainer to install all of their dependencies +(and dev dependencies) locally, but only re\-publish those items that +cannot be found elsewhere\. See npm help 5 \fBpackage\.json\fP for more information\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help pack +.IP \(bu 2 +npm help cache +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help publish + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man5/npm-global.5 b/bin/nodejs0.12.16/node_modules/npm/man/man5/npm-global.5 new file mode 100644 index 00000000..46f902a5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man5/npm-global.5 @@ -0,0 +1,229 @@ +.TH "NPM\-FOLDERS" "5" "March 2016" "" "" +.SH "NAME" +\fBnpm-folders\fR \- Folder Structures Used by npm +.SH DESCRIPTION +.P +npm puts various things on your computer\. That's its job\. +.P +This document will tell you what it puts where\. +.SS tl;dr +.RS 0 +.IP \(bu 2 +Local install (default): puts stuff in \fB\|\./node_modules\fP of the current +package root\. +.IP \(bu 2 +Global install (with \fB\-g\fP): puts stuff in /usr/local or wherever node +is installed\. +.IP \(bu 2 +Install it \fBlocally\fR if you're going to \fBrequire()\fP it\. +.IP \(bu 2 +Install it \fBglobally\fR if you're going to run it on the command line\. +.IP \(bu 2 +If you need both, then install it in both places, or use \fBnpm link\fP\|\. + +.RE +.SS prefix Configuration +.P +The \fBprefix\fP config defaults to the location where node is installed\. +On most systems, this is \fB/usr/local\fP\|\. On windows, this is the exact +location of the node\.exe binary\. On Unix systems, it's one level up, +since node is typically installed at \fB{prefix}/bin/node\fP rather than +\fB{prefix}/node\.exe\fP\|\. +.P +When the \fBglobal\fP flag is set, npm installs things into this prefix\. +When it is not set, it uses the root of the current package, or the +current working directory if not in a package already\. +.SS Node Modules +.P +Packages are dropped into the \fBnode_modules\fP folder under the \fBprefix\fP\|\. +When installing locally, this means that you can +\fBrequire("packagename")\fP to load its main module, or +\fBrequire("packagename/lib/path/to/sub/module")\fP to load other modules\. +.P +Global installs on Unix systems go to \fB{prefix}/lib/node_modules\fP\|\. +Global installs on Windows go to \fB{prefix}/node_modules\fP (that is, no +\fBlib\fP folder\.) +.P +Scoped packages are installed the same way, except they are grouped together +in a sub\-folder of the relevant \fBnode_modules\fP folder with the name of that +scope prefix by the @ symbol, e\.g\. \fBnpm install @myorg/package\fP would place +the package in \fB{prefix}/node_modules/@myorg/package\fP\|\. See npm help 7 \fBscope\fP for +more details\. +.P +If you wish to \fBrequire()\fP a package, then install it locally\. +.SS Executables +.P +When in global mode, executables are linked into \fB{prefix}/bin\fP on Unix, +or directly into \fB{prefix}\fP on Windows\. +.P +When in local mode, executables are linked into +\fB\|\./node_modules/\.bin\fP so that they can be made available to scripts run +through npm\. (For example, so that a test runner will be in the path +when you run \fBnpm test\fP\|\.) +.SS Man Pages +.P +When in global mode, man pages are linked into \fB{prefix}/share/man\fP\|\. +.P +When in local mode, man pages are not installed\. +.P +Man pages are not installed on Windows systems\. +.SS Cache +.P +See npm help \fBnpm\-cache\fP\|\. Cache files are stored in \fB~/\.npm\fP on Posix, or +\fB~/npm\-cache\fP on Windows\. +.P +This is controlled by the \fBcache\fP configuration param\. +.SS Temp Files +.P +Temporary files are stored by default in the folder specified by the +\fBtmp\fP config, which defaults to the TMPDIR, TMP, or TEMP environment +variables, or \fB/tmp\fP on Unix and \fBc:\\windows\\temp\fP on Windows\. +.P +Temp files are given a unique folder under this root for each run of the +program, and are deleted upon successful exit\. +.SH More Information +.P +When installing locally, npm first tries to find an appropriate +\fBprefix\fP folder\. This is so that \fBnpm install foo@1\.2\.3\fP will install +to the sensible root of your package, even if you happen to have \fBcd\fPed +into some other folder\. +.P +Starting at the $PWD, npm will walk up the folder tree checking for a +folder that contains either a \fBpackage\.json\fP file, or a \fBnode_modules\fP +folder\. If such a thing is found, then that is treated as the effective +"current directory" for the purpose of running npm commands\. (This +behavior is inspired by and similar to git's \.git\-folder seeking +logic when running git commands in a working dir\.) +.P +If no package root is found, then the current folder is used\. +.P +When you run \fBnpm install foo@1\.2\.3\fP, then the package is loaded into +the cache, and then unpacked into \fB\|\./node_modules/foo\fP\|\. Then, any of +foo's dependencies are similarly unpacked into +\fB\|\./node_modules/foo/node_modules/\.\.\.\fP\|\. +.P +Any bin files are symlinked to \fB\|\./node_modules/\.bin/\fP, so that they may +be found by npm scripts when necessary\. +.SS Global Installation +.P +If the \fBglobal\fP configuration is set to true, then npm will +install packages "globally"\. +.P +For global installation, packages are installed roughly the same way, +but using the folders described above\. +.SS Cycles, Conflicts, and Folder Parsimony +.P +Cycles are handled using the property of node's module system that it +walks up the directories looking for \fBnode_modules\fP folders\. So, at every +stage, if a package is already installed in an ancestor \fBnode_modules\fP +folder, then it is not installed at the current location\. +.P +Consider the case above, where \fBfoo \-> bar \-> baz\fP\|\. Imagine if, in +addition to that, baz depended on bar, so you'd have: +\fBfoo \-> bar \-> baz \-> bar \-> baz \.\.\.\fP\|\. However, since the folder +structure is: \fBfoo/node_modules/bar/node_modules/baz\fP, there's no need to +put another copy of bar into \fB\|\.\.\./baz/node_modules\fP, since when it calls +require("bar"), it will get the copy that is installed in +\fBfoo/node_modules/bar\fP\|\. +.P +This shortcut is only used if the exact same +version would be installed in multiple nested \fBnode_modules\fP folders\. It +is still possible to have \fBa/node_modules/b/node_modules/a\fP if the two +"a" packages are different versions\. However, without repeating the +exact same package multiple times, an infinite regress will always be +prevented\. +.P +Another optimization can be made by installing dependencies at the +highest level possible, below the localized "target" folder\. +.SS Example +.P +Consider this dependency graph: +.P +.RS 2 +.nf +foo ++\-\- blerg@1\.2\.5 ++\-\- bar@1\.2\.3 +| +\-\- blerg@1\.x (latest=1\.3\.7) +| +\-\- baz@2\.x +| | `\-\- quux@3\.x +| | `\-\- bar@1\.2\.3 (cycle) +| `\-\- asdf@* +`\-\- baz@1\.2\.3 + `\-\- quux@3\.x + `\-\- bar +.fi +.RE +.P +In this case, we might expect a folder structure like this: +.P +.RS 2 +.nf +foo ++\-\- node_modules + +\-\- blerg (1\.2\.5) <\-\-\-[A] + +\-\- bar (1\.2\.3) <\-\-\-[B] + | `\-\- node_modules + | +\-\- baz (2\.0\.2) <\-\-\-[C] + | | `\-\- node_modules + | | `\-\- quux (3\.2\.0) + | `\-\- asdf (2\.3\.4) + `\-\- baz (1\.2\.3) <\-\-\-[D] + `\-\- node_modules + `\-\- quux (3\.2\.0) <\-\-\-[E] +.fi +.RE +.P +Since foo depends directly on \fBbar@1\.2\.3\fP and \fBbaz@1\.2\.3\fP, those are +installed in foo's \fBnode_modules\fP folder\. +.P +Even though the latest copy of blerg is 1\.3\.7, foo has a specific +dependency on version 1\.2\.5\. So, that gets installed at [A]\. Since the +parent installation of blerg satisfies bar's dependency on \fBblerg@1\.x\fP, +it does not install another copy under [B]\. +.P +Bar [B] also has dependencies on baz and asdf, so those are installed in +bar's \fBnode_modules\fP folder\. Because it depends on \fBbaz@2\.x\fP, it cannot +re\-use the \fBbaz@1\.2\.3\fP installed in the parent \fBnode_modules\fP folder [D], +and must install its own copy [C]\. +.P +Underneath bar, the \fBbaz \-> quux \-> bar\fP dependency creates a cycle\. +However, because bar is already in quux's ancestry [B], it does not +unpack another copy of bar into that folder\. +.P +Underneath \fBfoo \-> baz\fP [D], quux's [E] folder tree is empty, because its +dependency on bar is satisfied by the parent folder copy installed at [B]\. +.P +For a graphical breakdown of what is installed where, use \fBnpm ls\fP\|\. +.SS Publishing +.P +Upon publishing, npm will look in the \fBnode_modules\fP folder\. If any of +the items there are not in the \fBbundledDependencies\fP array, then they will +not be included in the package tarball\. +.P +This allows a package maintainer to install all of their dependencies +(and dev dependencies) locally, but only re\-publish those items that +cannot be found elsewhere\. See npm help 5 \fBpackage\.json\fP for more information\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help pack +.IP \(bu 2 +npm help cache +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help publish + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man5/npm-json.5 b/bin/nodejs0.12.16/node_modules/npm/man/man5/npm-json.5 new file mode 100644 index 00000000..4395b83a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man5/npm-json.5 @@ -0,0 +1,917 @@ +.TH "PACKAGE\.JSON" "5" "March 2016" "" "" +.SH "NAME" +\fBpackage.json\fR \- Specifics of npm's package\.json handling +.SH DESCRIPTION +.P +This document is all you need to know about what's required in your package\.json +file\. It must be actual JSON, not just a JavaScript object literal\. +.P +A lot of the behavior described in this document is affected by the config +settings described in npm help 7 \fBnpm\-config\fP\|\. +.SH name +.P +The \fImost\fR important things in your package\.json are the name and version fields\. +Those are actually required, and your package won't install without +them\. The name and version together form an identifier that is assumed +to be completely unique\. Changes to the package should come along with +changes to the version\. +.P +The name is what your thing is called\. +.P +Some rules: +.RS 0 +.IP \(bu 2 +The name must be less than or equal to 214 characters\. This includes the scope for +scoped packages\. +.IP \(bu 2 +The name can't start with a dot or an underscore\. +.IP \(bu 2 +New packages must not have uppercase letters in the name\. +.IP \(bu 2 +The name ends up being part of a URL, an argument on the command line, and a +folder name\. Therefore, the name can't contain any non\-URL\-safe characters\. + +.RE +.P +Some tips: +.RS 0 +.IP \(bu 2 +Don't use the same name as a core Node module\. +.IP \(bu 2 +Don't put "js" or "node" in the name\. It's assumed that it's js, since you're +writing a package\.json file, and you can specify the engine using the "engines" +field\. (See below\.) +.IP \(bu 2 +The name will probably be passed as an argument to require(), so it should +be something short, but also reasonably descriptive\. +.IP \(bu 2 +You may want to check the npm registry to see if there's something by that name +already, before you get too attached to it\. https://www\.npmjs\.com/ + +.RE +.P +A name can be optionally prefixed by a scope, e\.g\. \fB@myorg/mypackage\fP\|\. See +npm help 7 \fBnpm\-scope\fP for more detail\. +.SH version +.P +The \fImost\fR important things in your package\.json are the name and version fields\. +Those are actually required, and your package won't install without +them\. The name and version together form an identifier that is assumed +to be completely unique\. Changes to the package should come along with +changes to the version\. +.P +Version must be parseable by +node\-semver \fIhttps://github\.com/isaacs/node\-semver\fR, which is bundled +with npm as a dependency\. (\fBnpm install semver\fP to use it yourself\.) +.P +More on version numbers and ranges at npm help 7 semver\. +.SH description +.P +Put a description in it\. It's a string\. This helps people discover your +package, as it's listed in \fBnpm search\fP\|\. +.SH keywords +.P +Put keywords in it\. It's an array of strings\. This helps people +discover your package as it's listed in \fBnpm search\fP\|\. +.SH homepage +.P +The url to the project homepage\. +.P +\fBNOTE\fR: This is \fInot\fR the same as "url"\. If you put a "url" field, +then the registry will think it's a redirection to your package that has +been published somewhere else, and spit at you\. +.P +Literally\. Spit\. I'm so not kidding\. +.SH bugs +.P +The url to your project's issue tracker and / or the email address to which +issues should be reported\. These are helpful for people who encounter issues +with your package\. +.P +It should look like this: +.P +.RS 2 +.nf +{ "url" : "https://github\.com/owner/project/issues" +, "email" : "project@hostname\.com" +} +.fi +.RE +.P +You can specify either one or both values\. If you want to provide only a url, +you can specify the value for "bugs" as a simple string instead of an object\. +.P +If a url is provided, it will be used by the \fBnpm bugs\fP command\. +.SH license +.P +You should specify a license for your package so that people know how they are +permitted to use it, and any restrictions you're placing on it\. +.P +If you're using a common license such as BSD\-2\-Clause or MIT, add a +current SPDX license identifier for the license you're using, like this: +.P +.RS 2 +.nf +{ "license" : "BSD\-3\-Clause" } +.fi +.RE +.P +You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\fR\|\. +Ideally you should pick one that is +OSI \fIhttps://opensource\.org/licenses/alphabetical\fR approved\. +.P +If your package is licensed under multiple common licenses, use an SPDX license +expression syntax version 2\.0 string \fIhttps://npmjs\.com/package/spdx\fR, like this: +.P +.RS 2 +.nf +{ "license" : "(ISC OR GPL\-3\.0)" } +.fi +.RE +.P +If you are using a license that hasn't been assigned an SPDX identifier, or if +you are using a custom license, use a string value like this one: +.P +.RS 2 +.nf +{ "license" : "SEE LICENSE IN " } +.fi +.RE +.P +Then include a file named \fB\fP at the top level of the package\. +.P +Some old packages used license objects or a "licenses" property containing an +array of license objects: +.P +.RS 2 +.nf +// Not valid metadata +{ "license" : + { "type" : "ISC" + , "url" : "http://opensource\.org/licenses/ISC" + } +} + +// Not valid metadata +{ "licenses" : + [ + { "type": "MIT" + , "url": "http://www\.opensource\.org/licenses/mit\-license\.php" + } + , { "type": "Apache\-2\.0" + , "url": "http://opensource\.org/licenses/apache2\.0\.php" + } + ] +} +.fi +.RE +.P +Those styles are now deprecated\. Instead, use SPDX expressions, like this: +.P +.RS 2 +.nf +{ "license": "ISC" } + +{ "license": "(MIT OR Apache\-2\.0)" } +.fi +.RE +.P +Finally, if you do not wish to grant others the right to use a private or +unpublished package under any terms: +.P +.RS 2 +.nf +{ "license": "UNLICENSED"} +.fi +.RE +.P +Consider also setting \fB"private": true\fP to prevent accidental publication\. +.SH people fields: author, contributors +.P +The "author" is one person\. "contributors" is an array of people\. A "person" +is an object with a "name" field and optionally "url" and "email", like this: +.P +.RS 2 +.nf +{ "name" : "Barney Rubble" +, "email" : "b@rubble\.com" +, "url" : "http://barnyrubble\.tumblr\.com/" +} +.fi +.RE +.P +Or you can shorten that all into a single string, and npm will parse it for you: +.P +.RS 2 +.nf +"Barney Rubble (http://barnyrubble\.tumblr\.com/)" +.fi +.RE +.P +Both email and url are optional either way\. +.P +npm also sets a top\-level "maintainers" field with your npm user info\. +.SH files +.P +The "files" field is an array of files to include in your project\. If +you name a folder in the array, then it will also include the files +inside that folder\. (Unless they would be ignored by another rule\.) +.P +You can also provide a "\.npmignore" file in the root of your package or +in subdirectories, which will keep files from being included, even +if they would be picked up by the files array\. The \fB\|\.npmignore\fP file +works just like a \fB\|\.gitignore\fP\|\. +.P +Certain files are always included, regardless of settings: +.RS 0 +.IP \(bu 2 +\fBpackage\.json\fP +.IP \(bu 2 +\fBREADME\fP +.IP \(bu 2 +\fBCHANGES\fP / \fBCHANGELOG\fP / \fBHISTORY\fP (any casing and file extension) +.IP \(bu 2 +\fBLICENSE\fP / \fBLICENCE\fP +.IP \(bu 2 +The file in the "main" field + +.RE +.P +Conversely, some files are always ignored: +.RS 0 +.IP \(bu 2 +\fB\|\.git\fP +.IP \(bu 2 +\fBCVS\fP +.IP \(bu 2 +\fB\|\.svn\fP +.IP \(bu 2 +\fB\|\.hg\fP +.IP \(bu 2 +\fB\|\.lock\-wscript\fP +.IP \(bu 2 +\fB\|\.wafpickle\-N\fP +.IP \(bu 2 +\fB\|\.*\.swp\fP +.IP \(bu 2 +\fB\|\.DS_Store\fP +.IP \(bu 2 +\fB\|\._*\fP +.IP \(bu 2 +\fBnpm\-debug\.log\fP +.IP \(bu 2 +\fB\|\.npmrc\fP + +.RE +.SH main +.P +The main field is a module ID that is the primary entry point to your program\. +That is, if your package is named \fBfoo\fP, and a user installs it, and then does +\fBrequire("foo")\fP, then your main module's exports object will be returned\. +.P +This should be a module ID relative to the root of your package folder\. +.P +For most modules, it makes the most sense to have a main script and often not +much else\. +.SH bin +.P +A lot of packages have one or more executable files that they'd like to +install into the PATH\. npm makes this pretty easy (in fact, it uses this +feature to install the "npm" executable\.) +.P +To use this, supply a \fBbin\fP field in your package\.json which is a map of +command name to local file name\. On install, npm will symlink that file into +\fBprefix/bin\fP for global installs, or \fB\|\./node_modules/\.bin/\fP for local +installs\. +.P +For example, myapp could have this: +.P +.RS 2 +.nf +{ "bin" : { "myapp" : "\./cli\.js" } } +.fi +.RE +.P +So, when you install myapp, it'll create a symlink from the \fBcli\.js\fP script to +\fB/usr/local/bin/myapp\fP\|\. +.P +If you have a single executable, and its name should be the name +of the package, then you can just supply it as a string\. For example: +.P +.RS 2 +.nf +{ "name": "my\-program" +, "version": "1\.2\.5" +, "bin": "\./path/to/program" } +.fi +.RE +.P +would be the same as this: +.P +.RS 2 +.nf +{ "name": "my\-program" +, "version": "1\.2\.5" +, "bin" : { "my\-program" : "\./path/to/program" } } +.fi +.RE +.SH man +.P +Specify either a single file or an array of filenames to put in place for the +\fBman\fP program to find\. +.P +If only a single file is provided, then it's installed such that it is the +result from \fBman \fP, regardless of its actual filename\. For example: +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : "\./man/doc\.1" +} +.fi +.RE +.P +would link the \fB\|\./man/doc\.1\fP file in such that it is the target for \fBman foo\fP +.P +If the filename doesn't start with the package name, then it's prefixed\. +So, this: +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : [ "\./man/foo\.1", "\./man/bar\.1" ] +} +.fi +.RE +.P +will create files to do \fBman foo\fP and \fBman foo\-bar\fP\|\. +.P +Man files must end with a number, and optionally a \fB\|\.gz\fP suffix if they are +compressed\. The number dictates which man section the file is installed into\. +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : [ "\./man/foo\.1", "\./man/foo\.2" ] +} +.fi +.RE +.P +will create entries for \fBman foo\fP and \fBman 2 foo\fP +.SH directories +.P +The CommonJS Packages \fIhttp://wiki\.commonjs\.org/wiki/Packages/1\.0\fR spec details a +few ways that you can indicate the structure of your package using a \fBdirectories\fP +object\. If you look at npm's package\.json \fIhttps://registry\.npmjs\.org/npm/latest\fR, +you'll see that it has directories for doc, lib, and man\. +.P +In the future, this information may be used in other creative ways\. +.SS directories\.lib +.P +Tell people where the bulk of your library is\. Nothing special is done +with the lib folder in any way, but it's useful meta info\. +.SS directories\.bin +.P +If you specify a \fBbin\fP directory in \fBdirectories\.bin\fP, all the files in +that folder will be added\. +.P +Because of the way the \fBbin\fP directive works, specifying both a +\fBbin\fP path and setting \fBdirectories\.bin\fP is an error\. If you want to +specify individual files, use \fBbin\fP, and for all the files in an +existing \fBbin\fP directory, use \fBdirectories\.bin\fP\|\. +.SS directories\.man +.P +A folder that is full of man pages\. Sugar to generate a "man" array by +walking the folder\. +.SS directories\.doc +.P +Put markdown files in here\. Eventually, these will be displayed nicely, +maybe, someday\. +.SS directories\.example +.P +Put example scripts in here\. Someday, it might be exposed in some clever way\. +.SS directories\.test +.P +Put your tests in here\. It is currently not exposed, but it might be in the +future\. +.SH repository +.P +Specify the place where your code lives\. This is helpful for people who +want to contribute\. If the git repo is on GitHub, then the \fBnpm docs\fP +command will be able to find you\. +.P +Do it like this: +.P +.RS 2 +.nf +"repository" : + { "type" : "git" + , "url" : "https://github\.com/npm/npm\.git" + } + +"repository" : + { "type" : "svn" + , "url" : "https://v8\.googlecode\.com/svn/trunk/" + } +.fi +.RE +.P +The URL should be a publicly available (perhaps read\-only) url that can be handed +directly to a VCS program without any modification\. It should not be a url to an +html project page that you put in your browser\. It's for computers\. +.P +For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same +shortcut syntax you use for \fBnpm install\fP: +.P +.RS 2 +.nf +"repository": "npm/npm" + +"repository": "gist:11081aaa281" + +"repository": "bitbucket:example/repo" + +"repository": "gitlab:another/repo" +.fi +.RE +.SH scripts +.P +The "scripts" property is a dictionary containing script commands that are run +at various times in the lifecycle of your package\. The key is the lifecycle +event, and the value is the command to run at that point\. +.P +See npm help 7 \fBnpm\-scripts\fP to find out more about writing package scripts\. +.SH config +.P +A "config" object can be used to set configuration parameters used in package +scripts that persist across upgrades\. For instance, if a package had the +following: +.P +.RS 2 +.nf +{ "name" : "foo" +, "config" : { "port" : "8080" } } +.fi +.RE +.P +and then had a "start" command that then referenced the +\fBnpm_package_config_port\fP environment variable, then the user could +override that by doing \fBnpm config set foo:port 8001\fP\|\. +.P +See npm help 7 \fBnpm\-config\fP and npm help 7 \fBnpm\-scripts\fP for more on package +configs\. +.SH dependencies +.P +Dependencies are specified in a simple object that maps a package name to a +version range\. The version range is a string which has one or more +space\-separated descriptors\. Dependencies can also be identified with a +tarball or git URL\. +.P +\fBPlease do not put test harnesses or transpilers in your +\fBdependencies\fP object\.\fR See \fBdevDependencies\fP, below\. +.P +See npm help 7 semver for more details about specifying version ranges\. +.RS 0 +.IP \(bu 2 +\fBversion\fP Must match \fBversion\fP exactly +.IP \(bu 2 +\fB>version\fP Must be greater than \fBversion\fP +.IP \(bu 2 +\fB>=version\fP etc +.IP \(bu 2 +\fB=version1 <=version2\fP\|\. +.IP \(bu 2 +\fBrange1 || range2\fP Passes if either range1 or range2 are satisfied\. +.IP \(bu 2 +\fBgit\.\.\.\fP See 'Git URLs as Dependencies' below +.IP \(bu 2 +\fBuser/repo\fP See 'GitHub URLs' below +.IP \(bu 2 +\fBtag\fP A specific version tagged and published as \fBtag\fP See npm help \fBnpm\-tag\fP +.IP \(bu 2 +\fBpath/path/path\fP See Local Paths \fI#local\-paths\fR below + +.RE +.P +For example, these are all valid: +.P +.RS 2 +.nf +{ "dependencies" : + { "foo" : "1\.0\.0 \- 2\.9999\.9999" + , "bar" : ">=1\.0\.2 <2\.1\.2" + , "baz" : ">1\.0\.2 <=2\.3\.4" + , "boo" : "2\.0\.1" + , "qux" : "<1\.0\.0 || >=2\.3\.1 <2\.4\.5 || >=2\.5\.2 <3\.0\.0" + , "asd" : "http://asdf\.com/asdf\.tar\.gz" + , "til" : "~1\.2" + , "elf" : "~1\.2\.3" + , "two" : "2\.x" + , "thr" : "3\.3\.x" + , "lat" : "latest" + , "dyl" : "file:\.\./dyl" + } +} +.fi +.RE +.SS URLs as Dependencies +.P +You may specify a tarball URL in place of a version range\. +.P +This tarball will be downloaded and installed locally to your package at +install time\. +.SS Git URLs as Dependencies +.P +Git urls can be of the form: +.P +.RS 2 +.nf +git://github\.com/user/project\.git#commit\-ish +git+ssh://user@hostname:project\.git#commit\-ish +git+ssh://user@hostname/project\.git#commit\-ish +git+http://user@hostname/project/blah\.git#commit\-ish +git+https://user@hostname/project/blah\.git#commit\-ish +.fi +.RE +.P +The \fBcommit\-ish\fP can be any tag, sha, or branch which can be supplied as +an argument to \fBgit checkout\fP\|\. The default is \fBmaster\fP\|\. +.SH GitHub URLs +.P +As of version 1\.1\.65, you can refer to GitHub urls as just "foo": +"user/foo\-project"\. Just as with git URLs, a \fBcommit\-ish\fP suffix can be +included\. For example: +.P +.RS 2 +.nf +{ + "name": "foo", + "version": "0\.0\.0", + "dependencies": { + "express": "visionmedia/express", + "mocha": "visionmedia/mocha#4727d357ea" + } +} +.fi +.RE +.SH Local Paths +.P +As of version 2\.0\.0 you can provide a path to a local directory that contains a +package\. Local paths can be saved using \fBnpm install \-\-save\fP, using any of +these forms: +.P +.RS 2 +.nf +\|\.\./foo/bar +~/foo/bar +\|\./foo/bar +/foo/bar +.fi +.RE +.P +in which case they will be normalized to a relative path and added to your +\fBpackage\.json\fP\|\. For example: +.P +.RS 2 +.nf +{ + "name": "baz", + "dependencies": { + "bar": "file:\.\./foo/bar" + } +} +.fi +.RE +.P +This feature is helpful for local offline development and creating +tests that require npm installing where you don't want to hit an +external server, but should not be used when publishing packages +to the public registry\. +.SH devDependencies +.P +If someone is planning on downloading and using your module in their +program, then they probably don't want or need to download and build +the external test or documentation framework that you use\. +.P +In this case, it's best to map these additional items in a \fBdevDependencies\fP +object\. +.P +These things will be installed when doing \fBnpm link\fP or \fBnpm install\fP +from the root of a package, and can be managed like any other npm +configuration param\. See npm help 7 \fBnpm\-config\fP for more on the topic\. +.P +For build steps that are not platform\-specific, such as compiling +CoffeeScript or other languages to JavaScript, use the \fBprepublish\fP +script to do this, and make the required package a devDependency\. +.P +For example: +.P +.RS 2 +.nf +{ "name": "ethopia\-waza", + "description": "a delightfully fruity coffee varietal", + "version": "1\.2\.3", + "devDependencies": { + "coffee\-script": "~1\.6\.3" + }, + "scripts": { + "prepublish": "coffee \-o lib/ \-c src/waza\.coffee" + }, + "main": "lib/waza\.js" +} +.fi +.RE +.P +The \fBprepublish\fP script will be run before publishing, so that users +can consume the functionality without requiring them to compile it +themselves\. In dev mode (ie, locally running \fBnpm install\fP), it'll +run this script as well, so that you can test it easily\. +.SH peerDependencies +.P +In some cases, you want to express the compatibility of your package with a +host tool or library, while not necessarily doing a \fBrequire\fP of this host\. +This is usually referred to as a \fIplugin\fR\|\. Notably, your module may be exposing +a specific interface, expected and specified by the host documentation\. +.P +For example: +.P +.RS 2 +.nf +{ + "name": "tea\-latte", + "version": "1\.3\.5", + "peerDependencies": { + "tea": "2\.x" + } +} +.fi +.RE +.P +This ensures your package \fBtea\-latte\fP can be installed \fIalong\fR with the second +major version of the host package \fBtea\fP only\. \fBnpm install tea\-latte\fP could +possibly yield the following dependency graph: +.P +.RS 2 +.nf +├── tea\-latte@1\.3\.5 +└── tea@2\.2\.0 +.fi +.RE +.P +\fBNOTE: npm versions 1 and 2 will automatically install \fBpeerDependencies\fP if +they are not explicitly depended upon higher in the dependency tree\. In the +next major version of npm (npm@3), this will no longer be the case\. You will +receive a warning that the peerDependency is not installed instead\.\fR The +behavior in npms 1 & 2 was frequently confusing and could easily put you into +dependency hell, a situation that npm is designed to avoid as much as possible\. +.P +Trying to install another plugin with a conflicting requirement will cause an +error\. For this reason, make sure your plugin requirement is as broad as +possible, and not to lock it down to specific patch versions\. +.P +Assuming the host complies with semver \fIhttp://semver\.org/\fR, only changes in +the host package's major version will break your plugin\. Thus, if you've worked +with every 1\.x version of the host package, use \fB"^1\.0"\fP or \fB"1\.x"\fP to express +this\. If you depend on features introduced in 1\.5\.2, use \fB">= 1\.5\.2 < 2"\fP\|\. +.SH bundledDependencies +.P +This defines an array of package names that will be bundled when publishing the package\. +.P +In cases where you need to preserve npm packages locally or have them available through a single file download, you can bundle the packages in a tarball file by specifying the package names in the \fBbundledDependencies\fP array and executing \fBnpm pack\fP\|\. +.P +For example: +If we define a package\.json like this: +.P +.RS 2 +.nf +{ + "name": "awesome\-web\-framework", + "version": "1\.0\.0", + "bundledDependencies": [ + 'renderized', 'super\-streams' + ] +} +.fi +.RE +.P +we can obtain \fBawesome\-web\-framework\-1\.0\.0\.tgz\fP file by running \fBnpm pack\fP\|\. This file contains the dependencies \fBrenderized\fP and \fBsuper\-streams\fP which can be installed in a new project by executing \fBnpm install awesome\-web\-framework\-1\.0\.0\.tgz\fP\|\. +.P +If this is spelled \fB"bundleDependencies"\fP, then that is also honored\. +.SH optionalDependencies +.P +If a dependency can be used, but you would like npm to proceed if it cannot be +found or fails to install, then you may put it in the \fBoptionalDependencies\fP +object\. This is a map of package name to version or url, just like the +\fBdependencies\fP object\. The difference is that build failures do not cause +installation to fail\. +.P +It is still your program's responsibility to handle the lack of the +dependency\. For example, something like this: +.P +.RS 2 +.nf +try { + var foo = require('foo') + var fooVersion = require('foo/package\.json')\.version +} catch (er) { + foo = null +} +if ( notGoodFooVersion(fooVersion) ) { + foo = null +} + +// \.\. then later in your program \.\. + +if (foo) { + foo\.doFooThings() +} +.fi +.RE +.P +Entries in \fBoptionalDependencies\fP will override entries of the same name in +\fBdependencies\fP, so it's usually best to only put in one place\. +.SH engines +.P +You can specify the version of node that your stuff works on: +.P +.RS 2 +.nf +{ "engines" : { "node" : ">=0\.10\.3 <0\.12" } } +.fi +.RE +.P +And, like with dependencies, if you don't specify the version (or if you +specify "*" as the version), then any version of node will do\. +.P +If you specify an "engines" field, then npm will require that "node" be +somewhere on that list\. If "engines" is omitted, then npm will just assume +that it works on node\. +.P +You can also use the "engines" field to specify which versions of npm +are capable of properly installing your program\. For example: +.P +.RS 2 +.nf +{ "engines" : { "npm" : "~1\.0\.20" } } +.fi +.RE +.P +Note that, unless the user has set the \fBengine\-strict\fP config flag, this +field is advisory only\. +.SH engineStrict +.P +\fBNOTE: This feature is deprecated and will be removed in npm 3\.0\.0\.\fR +.P +If you are sure that your module will \fIdefinitely not\fR run properly on +versions of Node/npm other than those specified in the \fBengines\fP object, +then you can set \fB"engineStrict": true\fP in your package\.json file\. +This will override the user's \fBengine\-strict\fP config setting\. +.P +Please do not do this unless you are really very very sure\. If your +engines object is something overly restrictive, you can quite easily and +inadvertently lock yourself into obscurity and prevent your users from +updating to new versions of Node\. Consider this choice carefully\. +.SH os +.P +You can specify which operating systems your +module will run on: +.P +.RS 2 +.nf +"os" : [ "darwin", "linux" ] +.fi +.RE +.P +You can also blacklist instead of whitelist operating systems, +just prepend the blacklisted os with a '!': +.P +.RS 2 +.nf +"os" : [ "!win32" ] +.fi +.RE +.P +The host operating system is determined by \fBprocess\.platform\fP +.P +It is allowed to both blacklist, and whitelist, although there isn't any +good reason to do this\. +.SH cpu +.P +If your code only runs on certain cpu architectures, +you can specify which ones\. +.P +.RS 2 +.nf +"cpu" : [ "x64", "ia32" ] +.fi +.RE +.P +Like the \fBos\fP option, you can also blacklist architectures: +.P +.RS 2 +.nf +"cpu" : [ "!arm", "!mips" ] +.fi +.RE +.P +The host architecture is determined by \fBprocess\.arch\fP +.SH preferGlobal +.P +If your package is primarily a command\-line application that should be +installed globally, then set this value to \fBtrue\fP to provide a warning +if it is installed locally\. +.P +It doesn't actually prevent users from installing it locally, but it +does help prevent some confusion if it doesn't work as expected\. +.SH private +.P +If you set \fB"private": true\fP in your package\.json, then npm will refuse +to publish it\. +.P +This is a way to prevent accidental publication of private repositories\. If +you would like to ensure that a given package is only ever published to a +specific registry (for example, an internal registry), then use the +\fBpublishConfig\fP dictionary described below to override the \fBregistry\fP config +param at publish\-time\. +.SH publishConfig +.P +This is a set of config values that will be used at publish\-time\. It's +especially handy if you want to set the tag, registry or access, so that +you can ensure that a given package is not tagged with "latest", published +to the global public registry or that a scoped module is private by default\. +.P +Any config values can be overridden, but of course only "tag", "registry" and +"access" probably matter for the purposes of publishing\. +.P +See npm help 7 \fBnpm\-config\fP to see the list of config options that can be +overridden\. +.SH DEFAULT VALUES +.P +npm will default some values based on package contents\. +.RS 0 +.IP \(bu 2 +\fB"scripts": {"start": "node server\.js"}\fP +If there is a \fBserver\.js\fP file in the root of your package, then npm +will default the \fBstart\fP command to \fBnode server\.js\fP\|\. +.IP \(bu 2 +\fB"scripts":{"preinstall": "node\-gyp rebuild"}\fP +If there is a \fBbinding\.gyp\fP file in the root of your package, npm will +default the \fBpreinstall\fP command to compile using node\-gyp\. +.IP \(bu 2 +\fB"contributors": [\.\.\.]\fP +If there is an \fBAUTHORS\fP file in the root of your package, npm will +treat each line as a \fBName (url)\fP format, where email and url +are optional\. Lines which start with a \fB#\fP or are blank, will be +ignored\. + +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 semver +.IP \(bu 2 +npm help init +.IP \(bu 2 +npm help version +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help help +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help uninstall + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man5/npmrc.5 b/bin/nodejs0.12.16/node_modules/npm/man/man5/npmrc.5 new file mode 100644 index 00000000..e405d516 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man5/npmrc.5 @@ -0,0 +1,101 @@ +.TH "NPMRC" "5" "March 2016" "" "" +.SH "NAME" +\fBnpmrc\fR \- The npm config files +.SH DESCRIPTION +.P +npm gets its config settings from the command line, environment +variables, and \fBnpmrc\fP files\. +.P +The \fBnpm config\fP command can be used to update and edit the contents +of the user and global npmrc files\. +.P +For a list of available configuration options, see npm help 7 config\. +.SH FILES +.P +The four relevant files are: +.RS 0 +.IP \(bu 2 +per\-project config file (/path/to/my/project/\.npmrc) +.IP \(bu 2 +per\-user config file (~/\.npmrc) +.IP \(bu 2 +global config file ($PREFIX/etc/npmrc) +.IP \(bu 2 +npm builtin config file (/path/to/npm/npmrc) + +.RE +.P +All npm config files are an ini\-formatted list of \fBkey = value\fP +parameters\. Environment variables can be replaced using +\fB${VARIABLE_NAME}\fP\|\. For example: +.P +.RS 2 +.nf +prefix = ${HOME}/\.npm\-packages +.fi +.RE +.P +Each of these files is loaded, and config options are resolved in +priority order\. For example, a setting in the userconfig file would +override the setting in the globalconfig file\. +.P +Array values are specified by adding "[]" after the key name\. For +example: +.P +.RS 2 +.nf +key[] = "first value" +key[] = "second value" +.fi +.RE +.P +\fBNOTE:\fR Because local (per\-project or per\-user) \fB\|\.npmrc\fP files can contain +sensitive credentials, they must be readable and writable \fIonly\fR by your user +account (i\.e\. must have a mode of \fB0600\fP), otherwise they \fIwill be ignored by +npm!\fR +.SS Per\-project config file +.P +When working locally in a project, a \fB\|\.npmrc\fP file in the root of the +project (ie, a sibling of \fBnode_modules\fP and \fBpackage\.json\fP) will set +config values specific to this project\. +.P +Note that this only applies to the root of the project that you're +running npm in\. It has no effect when your module is published\. For +example, you can't publish a module that forces itself to install +globally, or in a different location\. +.P +Additionally, this file is not read in global mode, such as when running +\fBnpm install \-g\fP\|\. +.SS Per\-user config file +.P +\fB$HOME/\.npmrc\fP (or the \fBuserconfig\fP param, if set in the environment +or on the command line) +.SS Global config file +.P +\fB$PREFIX/etc/npmrc\fP (or the \fBglobalconfig\fP param, if set above): +This file is an ini\-file formatted list of \fBkey = value\fP parameters\. +Environment variables can be replaced as above\. +.SS Built\-in config file +.P +\fBpath/to/npm/itself/npmrc\fP +.P +This is an unchangeable "builtin" configuration file that npm keeps +consistent across updates\. Set fields in here using the \fB\|\./configure\fP +script that comes with npm\. This is primarily for distribution +maintainers to override default configs in a standard and consistent +manner\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help npm + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man5/package.json.5 b/bin/nodejs0.12.16/node_modules/npm/man/man5/package.json.5 new file mode 100644 index 00000000..4395b83a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man5/package.json.5 @@ -0,0 +1,917 @@ +.TH "PACKAGE\.JSON" "5" "March 2016" "" "" +.SH "NAME" +\fBpackage.json\fR \- Specifics of npm's package\.json handling +.SH DESCRIPTION +.P +This document is all you need to know about what's required in your package\.json +file\. It must be actual JSON, not just a JavaScript object literal\. +.P +A lot of the behavior described in this document is affected by the config +settings described in npm help 7 \fBnpm\-config\fP\|\. +.SH name +.P +The \fImost\fR important things in your package\.json are the name and version fields\. +Those are actually required, and your package won't install without +them\. The name and version together form an identifier that is assumed +to be completely unique\. Changes to the package should come along with +changes to the version\. +.P +The name is what your thing is called\. +.P +Some rules: +.RS 0 +.IP \(bu 2 +The name must be less than or equal to 214 characters\. This includes the scope for +scoped packages\. +.IP \(bu 2 +The name can't start with a dot or an underscore\. +.IP \(bu 2 +New packages must not have uppercase letters in the name\. +.IP \(bu 2 +The name ends up being part of a URL, an argument on the command line, and a +folder name\. Therefore, the name can't contain any non\-URL\-safe characters\. + +.RE +.P +Some tips: +.RS 0 +.IP \(bu 2 +Don't use the same name as a core Node module\. +.IP \(bu 2 +Don't put "js" or "node" in the name\. It's assumed that it's js, since you're +writing a package\.json file, and you can specify the engine using the "engines" +field\. (See below\.) +.IP \(bu 2 +The name will probably be passed as an argument to require(), so it should +be something short, but also reasonably descriptive\. +.IP \(bu 2 +You may want to check the npm registry to see if there's something by that name +already, before you get too attached to it\. https://www\.npmjs\.com/ + +.RE +.P +A name can be optionally prefixed by a scope, e\.g\. \fB@myorg/mypackage\fP\|\. See +npm help 7 \fBnpm\-scope\fP for more detail\. +.SH version +.P +The \fImost\fR important things in your package\.json are the name and version fields\. +Those are actually required, and your package won't install without +them\. The name and version together form an identifier that is assumed +to be completely unique\. Changes to the package should come along with +changes to the version\. +.P +Version must be parseable by +node\-semver \fIhttps://github\.com/isaacs/node\-semver\fR, which is bundled +with npm as a dependency\. (\fBnpm install semver\fP to use it yourself\.) +.P +More on version numbers and ranges at npm help 7 semver\. +.SH description +.P +Put a description in it\. It's a string\. This helps people discover your +package, as it's listed in \fBnpm search\fP\|\. +.SH keywords +.P +Put keywords in it\. It's an array of strings\. This helps people +discover your package as it's listed in \fBnpm search\fP\|\. +.SH homepage +.P +The url to the project homepage\. +.P +\fBNOTE\fR: This is \fInot\fR the same as "url"\. If you put a "url" field, +then the registry will think it's a redirection to your package that has +been published somewhere else, and spit at you\. +.P +Literally\. Spit\. I'm so not kidding\. +.SH bugs +.P +The url to your project's issue tracker and / or the email address to which +issues should be reported\. These are helpful for people who encounter issues +with your package\. +.P +It should look like this: +.P +.RS 2 +.nf +{ "url" : "https://github\.com/owner/project/issues" +, "email" : "project@hostname\.com" +} +.fi +.RE +.P +You can specify either one or both values\. If you want to provide only a url, +you can specify the value for "bugs" as a simple string instead of an object\. +.P +If a url is provided, it will be used by the \fBnpm bugs\fP command\. +.SH license +.P +You should specify a license for your package so that people know how they are +permitted to use it, and any restrictions you're placing on it\. +.P +If you're using a common license such as BSD\-2\-Clause or MIT, add a +current SPDX license identifier for the license you're using, like this: +.P +.RS 2 +.nf +{ "license" : "BSD\-3\-Clause" } +.fi +.RE +.P +You can check the full list of SPDX license IDs \fIhttps://spdx\.org/licenses/\fR\|\. +Ideally you should pick one that is +OSI \fIhttps://opensource\.org/licenses/alphabetical\fR approved\. +.P +If your package is licensed under multiple common licenses, use an SPDX license +expression syntax version 2\.0 string \fIhttps://npmjs\.com/package/spdx\fR, like this: +.P +.RS 2 +.nf +{ "license" : "(ISC OR GPL\-3\.0)" } +.fi +.RE +.P +If you are using a license that hasn't been assigned an SPDX identifier, or if +you are using a custom license, use a string value like this one: +.P +.RS 2 +.nf +{ "license" : "SEE LICENSE IN " } +.fi +.RE +.P +Then include a file named \fB\fP at the top level of the package\. +.P +Some old packages used license objects or a "licenses" property containing an +array of license objects: +.P +.RS 2 +.nf +// Not valid metadata +{ "license" : + { "type" : "ISC" + , "url" : "http://opensource\.org/licenses/ISC" + } +} + +// Not valid metadata +{ "licenses" : + [ + { "type": "MIT" + , "url": "http://www\.opensource\.org/licenses/mit\-license\.php" + } + , { "type": "Apache\-2\.0" + , "url": "http://opensource\.org/licenses/apache2\.0\.php" + } + ] +} +.fi +.RE +.P +Those styles are now deprecated\. Instead, use SPDX expressions, like this: +.P +.RS 2 +.nf +{ "license": "ISC" } + +{ "license": "(MIT OR Apache\-2\.0)" } +.fi +.RE +.P +Finally, if you do not wish to grant others the right to use a private or +unpublished package under any terms: +.P +.RS 2 +.nf +{ "license": "UNLICENSED"} +.fi +.RE +.P +Consider also setting \fB"private": true\fP to prevent accidental publication\. +.SH people fields: author, contributors +.P +The "author" is one person\. "contributors" is an array of people\. A "person" +is an object with a "name" field and optionally "url" and "email", like this: +.P +.RS 2 +.nf +{ "name" : "Barney Rubble" +, "email" : "b@rubble\.com" +, "url" : "http://barnyrubble\.tumblr\.com/" +} +.fi +.RE +.P +Or you can shorten that all into a single string, and npm will parse it for you: +.P +.RS 2 +.nf +"Barney Rubble (http://barnyrubble\.tumblr\.com/)" +.fi +.RE +.P +Both email and url are optional either way\. +.P +npm also sets a top\-level "maintainers" field with your npm user info\. +.SH files +.P +The "files" field is an array of files to include in your project\. If +you name a folder in the array, then it will also include the files +inside that folder\. (Unless they would be ignored by another rule\.) +.P +You can also provide a "\.npmignore" file in the root of your package or +in subdirectories, which will keep files from being included, even +if they would be picked up by the files array\. The \fB\|\.npmignore\fP file +works just like a \fB\|\.gitignore\fP\|\. +.P +Certain files are always included, regardless of settings: +.RS 0 +.IP \(bu 2 +\fBpackage\.json\fP +.IP \(bu 2 +\fBREADME\fP +.IP \(bu 2 +\fBCHANGES\fP / \fBCHANGELOG\fP / \fBHISTORY\fP (any casing and file extension) +.IP \(bu 2 +\fBLICENSE\fP / \fBLICENCE\fP +.IP \(bu 2 +The file in the "main" field + +.RE +.P +Conversely, some files are always ignored: +.RS 0 +.IP \(bu 2 +\fB\|\.git\fP +.IP \(bu 2 +\fBCVS\fP +.IP \(bu 2 +\fB\|\.svn\fP +.IP \(bu 2 +\fB\|\.hg\fP +.IP \(bu 2 +\fB\|\.lock\-wscript\fP +.IP \(bu 2 +\fB\|\.wafpickle\-N\fP +.IP \(bu 2 +\fB\|\.*\.swp\fP +.IP \(bu 2 +\fB\|\.DS_Store\fP +.IP \(bu 2 +\fB\|\._*\fP +.IP \(bu 2 +\fBnpm\-debug\.log\fP +.IP \(bu 2 +\fB\|\.npmrc\fP + +.RE +.SH main +.P +The main field is a module ID that is the primary entry point to your program\. +That is, if your package is named \fBfoo\fP, and a user installs it, and then does +\fBrequire("foo")\fP, then your main module's exports object will be returned\. +.P +This should be a module ID relative to the root of your package folder\. +.P +For most modules, it makes the most sense to have a main script and often not +much else\. +.SH bin +.P +A lot of packages have one or more executable files that they'd like to +install into the PATH\. npm makes this pretty easy (in fact, it uses this +feature to install the "npm" executable\.) +.P +To use this, supply a \fBbin\fP field in your package\.json which is a map of +command name to local file name\. On install, npm will symlink that file into +\fBprefix/bin\fP for global installs, or \fB\|\./node_modules/\.bin/\fP for local +installs\. +.P +For example, myapp could have this: +.P +.RS 2 +.nf +{ "bin" : { "myapp" : "\./cli\.js" } } +.fi +.RE +.P +So, when you install myapp, it'll create a symlink from the \fBcli\.js\fP script to +\fB/usr/local/bin/myapp\fP\|\. +.P +If you have a single executable, and its name should be the name +of the package, then you can just supply it as a string\. For example: +.P +.RS 2 +.nf +{ "name": "my\-program" +, "version": "1\.2\.5" +, "bin": "\./path/to/program" } +.fi +.RE +.P +would be the same as this: +.P +.RS 2 +.nf +{ "name": "my\-program" +, "version": "1\.2\.5" +, "bin" : { "my\-program" : "\./path/to/program" } } +.fi +.RE +.SH man +.P +Specify either a single file or an array of filenames to put in place for the +\fBman\fP program to find\. +.P +If only a single file is provided, then it's installed such that it is the +result from \fBman \fP, regardless of its actual filename\. For example: +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : "\./man/doc\.1" +} +.fi +.RE +.P +would link the \fB\|\./man/doc\.1\fP file in such that it is the target for \fBman foo\fP +.P +If the filename doesn't start with the package name, then it's prefixed\. +So, this: +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : [ "\./man/foo\.1", "\./man/bar\.1" ] +} +.fi +.RE +.P +will create files to do \fBman foo\fP and \fBman foo\-bar\fP\|\. +.P +Man files must end with a number, and optionally a \fB\|\.gz\fP suffix if they are +compressed\. The number dictates which man section the file is installed into\. +.P +.RS 2 +.nf +{ "name" : "foo" +, "version" : "1\.2\.3" +, "description" : "A packaged foo fooer for fooing foos" +, "main" : "foo\.js" +, "man" : [ "\./man/foo\.1", "\./man/foo\.2" ] +} +.fi +.RE +.P +will create entries for \fBman foo\fP and \fBman 2 foo\fP +.SH directories +.P +The CommonJS Packages \fIhttp://wiki\.commonjs\.org/wiki/Packages/1\.0\fR spec details a +few ways that you can indicate the structure of your package using a \fBdirectories\fP +object\. If you look at npm's package\.json \fIhttps://registry\.npmjs\.org/npm/latest\fR, +you'll see that it has directories for doc, lib, and man\. +.P +In the future, this information may be used in other creative ways\. +.SS directories\.lib +.P +Tell people where the bulk of your library is\. Nothing special is done +with the lib folder in any way, but it's useful meta info\. +.SS directories\.bin +.P +If you specify a \fBbin\fP directory in \fBdirectories\.bin\fP, all the files in +that folder will be added\. +.P +Because of the way the \fBbin\fP directive works, specifying both a +\fBbin\fP path and setting \fBdirectories\.bin\fP is an error\. If you want to +specify individual files, use \fBbin\fP, and for all the files in an +existing \fBbin\fP directory, use \fBdirectories\.bin\fP\|\. +.SS directories\.man +.P +A folder that is full of man pages\. Sugar to generate a "man" array by +walking the folder\. +.SS directories\.doc +.P +Put markdown files in here\. Eventually, these will be displayed nicely, +maybe, someday\. +.SS directories\.example +.P +Put example scripts in here\. Someday, it might be exposed in some clever way\. +.SS directories\.test +.P +Put your tests in here\. It is currently not exposed, but it might be in the +future\. +.SH repository +.P +Specify the place where your code lives\. This is helpful for people who +want to contribute\. If the git repo is on GitHub, then the \fBnpm docs\fP +command will be able to find you\. +.P +Do it like this: +.P +.RS 2 +.nf +"repository" : + { "type" : "git" + , "url" : "https://github\.com/npm/npm\.git" + } + +"repository" : + { "type" : "svn" + , "url" : "https://v8\.googlecode\.com/svn/trunk/" + } +.fi +.RE +.P +The URL should be a publicly available (perhaps read\-only) url that can be handed +directly to a VCS program without any modification\. It should not be a url to an +html project page that you put in your browser\. It's for computers\. +.P +For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same +shortcut syntax you use for \fBnpm install\fP: +.P +.RS 2 +.nf +"repository": "npm/npm" + +"repository": "gist:11081aaa281" + +"repository": "bitbucket:example/repo" + +"repository": "gitlab:another/repo" +.fi +.RE +.SH scripts +.P +The "scripts" property is a dictionary containing script commands that are run +at various times in the lifecycle of your package\. The key is the lifecycle +event, and the value is the command to run at that point\. +.P +See npm help 7 \fBnpm\-scripts\fP to find out more about writing package scripts\. +.SH config +.P +A "config" object can be used to set configuration parameters used in package +scripts that persist across upgrades\. For instance, if a package had the +following: +.P +.RS 2 +.nf +{ "name" : "foo" +, "config" : { "port" : "8080" } } +.fi +.RE +.P +and then had a "start" command that then referenced the +\fBnpm_package_config_port\fP environment variable, then the user could +override that by doing \fBnpm config set foo:port 8001\fP\|\. +.P +See npm help 7 \fBnpm\-config\fP and npm help 7 \fBnpm\-scripts\fP for more on package +configs\. +.SH dependencies +.P +Dependencies are specified in a simple object that maps a package name to a +version range\. The version range is a string which has one or more +space\-separated descriptors\. Dependencies can also be identified with a +tarball or git URL\. +.P +\fBPlease do not put test harnesses or transpilers in your +\fBdependencies\fP object\.\fR See \fBdevDependencies\fP, below\. +.P +See npm help 7 semver for more details about specifying version ranges\. +.RS 0 +.IP \(bu 2 +\fBversion\fP Must match \fBversion\fP exactly +.IP \(bu 2 +\fB>version\fP Must be greater than \fBversion\fP +.IP \(bu 2 +\fB>=version\fP etc +.IP \(bu 2 +\fB=version1 <=version2\fP\|\. +.IP \(bu 2 +\fBrange1 || range2\fP Passes if either range1 or range2 are satisfied\. +.IP \(bu 2 +\fBgit\.\.\.\fP See 'Git URLs as Dependencies' below +.IP \(bu 2 +\fBuser/repo\fP See 'GitHub URLs' below +.IP \(bu 2 +\fBtag\fP A specific version tagged and published as \fBtag\fP See npm help \fBnpm\-tag\fP +.IP \(bu 2 +\fBpath/path/path\fP See Local Paths \fI#local\-paths\fR below + +.RE +.P +For example, these are all valid: +.P +.RS 2 +.nf +{ "dependencies" : + { "foo" : "1\.0\.0 \- 2\.9999\.9999" + , "bar" : ">=1\.0\.2 <2\.1\.2" + , "baz" : ">1\.0\.2 <=2\.3\.4" + , "boo" : "2\.0\.1" + , "qux" : "<1\.0\.0 || >=2\.3\.1 <2\.4\.5 || >=2\.5\.2 <3\.0\.0" + , "asd" : "http://asdf\.com/asdf\.tar\.gz" + , "til" : "~1\.2" + , "elf" : "~1\.2\.3" + , "two" : "2\.x" + , "thr" : "3\.3\.x" + , "lat" : "latest" + , "dyl" : "file:\.\./dyl" + } +} +.fi +.RE +.SS URLs as Dependencies +.P +You may specify a tarball URL in place of a version range\. +.P +This tarball will be downloaded and installed locally to your package at +install time\. +.SS Git URLs as Dependencies +.P +Git urls can be of the form: +.P +.RS 2 +.nf +git://github\.com/user/project\.git#commit\-ish +git+ssh://user@hostname:project\.git#commit\-ish +git+ssh://user@hostname/project\.git#commit\-ish +git+http://user@hostname/project/blah\.git#commit\-ish +git+https://user@hostname/project/blah\.git#commit\-ish +.fi +.RE +.P +The \fBcommit\-ish\fP can be any tag, sha, or branch which can be supplied as +an argument to \fBgit checkout\fP\|\. The default is \fBmaster\fP\|\. +.SH GitHub URLs +.P +As of version 1\.1\.65, you can refer to GitHub urls as just "foo": +"user/foo\-project"\. Just as with git URLs, a \fBcommit\-ish\fP suffix can be +included\. For example: +.P +.RS 2 +.nf +{ + "name": "foo", + "version": "0\.0\.0", + "dependencies": { + "express": "visionmedia/express", + "mocha": "visionmedia/mocha#4727d357ea" + } +} +.fi +.RE +.SH Local Paths +.P +As of version 2\.0\.0 you can provide a path to a local directory that contains a +package\. Local paths can be saved using \fBnpm install \-\-save\fP, using any of +these forms: +.P +.RS 2 +.nf +\|\.\./foo/bar +~/foo/bar +\|\./foo/bar +/foo/bar +.fi +.RE +.P +in which case they will be normalized to a relative path and added to your +\fBpackage\.json\fP\|\. For example: +.P +.RS 2 +.nf +{ + "name": "baz", + "dependencies": { + "bar": "file:\.\./foo/bar" + } +} +.fi +.RE +.P +This feature is helpful for local offline development and creating +tests that require npm installing where you don't want to hit an +external server, but should not be used when publishing packages +to the public registry\. +.SH devDependencies +.P +If someone is planning on downloading and using your module in their +program, then they probably don't want or need to download and build +the external test or documentation framework that you use\. +.P +In this case, it's best to map these additional items in a \fBdevDependencies\fP +object\. +.P +These things will be installed when doing \fBnpm link\fP or \fBnpm install\fP +from the root of a package, and can be managed like any other npm +configuration param\. See npm help 7 \fBnpm\-config\fP for more on the topic\. +.P +For build steps that are not platform\-specific, such as compiling +CoffeeScript or other languages to JavaScript, use the \fBprepublish\fP +script to do this, and make the required package a devDependency\. +.P +For example: +.P +.RS 2 +.nf +{ "name": "ethopia\-waza", + "description": "a delightfully fruity coffee varietal", + "version": "1\.2\.3", + "devDependencies": { + "coffee\-script": "~1\.6\.3" + }, + "scripts": { + "prepublish": "coffee \-o lib/ \-c src/waza\.coffee" + }, + "main": "lib/waza\.js" +} +.fi +.RE +.P +The \fBprepublish\fP script will be run before publishing, so that users +can consume the functionality without requiring them to compile it +themselves\. In dev mode (ie, locally running \fBnpm install\fP), it'll +run this script as well, so that you can test it easily\. +.SH peerDependencies +.P +In some cases, you want to express the compatibility of your package with a +host tool or library, while not necessarily doing a \fBrequire\fP of this host\. +This is usually referred to as a \fIplugin\fR\|\. Notably, your module may be exposing +a specific interface, expected and specified by the host documentation\. +.P +For example: +.P +.RS 2 +.nf +{ + "name": "tea\-latte", + "version": "1\.3\.5", + "peerDependencies": { + "tea": "2\.x" + } +} +.fi +.RE +.P +This ensures your package \fBtea\-latte\fP can be installed \fIalong\fR with the second +major version of the host package \fBtea\fP only\. \fBnpm install tea\-latte\fP could +possibly yield the following dependency graph: +.P +.RS 2 +.nf +├── tea\-latte@1\.3\.5 +└── tea@2\.2\.0 +.fi +.RE +.P +\fBNOTE: npm versions 1 and 2 will automatically install \fBpeerDependencies\fP if +they are not explicitly depended upon higher in the dependency tree\. In the +next major version of npm (npm@3), this will no longer be the case\. You will +receive a warning that the peerDependency is not installed instead\.\fR The +behavior in npms 1 & 2 was frequently confusing and could easily put you into +dependency hell, a situation that npm is designed to avoid as much as possible\. +.P +Trying to install another plugin with a conflicting requirement will cause an +error\. For this reason, make sure your plugin requirement is as broad as +possible, and not to lock it down to specific patch versions\. +.P +Assuming the host complies with semver \fIhttp://semver\.org/\fR, only changes in +the host package's major version will break your plugin\. Thus, if you've worked +with every 1\.x version of the host package, use \fB"^1\.0"\fP or \fB"1\.x"\fP to express +this\. If you depend on features introduced in 1\.5\.2, use \fB">= 1\.5\.2 < 2"\fP\|\. +.SH bundledDependencies +.P +This defines an array of package names that will be bundled when publishing the package\. +.P +In cases where you need to preserve npm packages locally or have them available through a single file download, you can bundle the packages in a tarball file by specifying the package names in the \fBbundledDependencies\fP array and executing \fBnpm pack\fP\|\. +.P +For example: +If we define a package\.json like this: +.P +.RS 2 +.nf +{ + "name": "awesome\-web\-framework", + "version": "1\.0\.0", + "bundledDependencies": [ + 'renderized', 'super\-streams' + ] +} +.fi +.RE +.P +we can obtain \fBawesome\-web\-framework\-1\.0\.0\.tgz\fP file by running \fBnpm pack\fP\|\. This file contains the dependencies \fBrenderized\fP and \fBsuper\-streams\fP which can be installed in a new project by executing \fBnpm install awesome\-web\-framework\-1\.0\.0\.tgz\fP\|\. +.P +If this is spelled \fB"bundleDependencies"\fP, then that is also honored\. +.SH optionalDependencies +.P +If a dependency can be used, but you would like npm to proceed if it cannot be +found or fails to install, then you may put it in the \fBoptionalDependencies\fP +object\. This is a map of package name to version or url, just like the +\fBdependencies\fP object\. The difference is that build failures do not cause +installation to fail\. +.P +It is still your program's responsibility to handle the lack of the +dependency\. For example, something like this: +.P +.RS 2 +.nf +try { + var foo = require('foo') + var fooVersion = require('foo/package\.json')\.version +} catch (er) { + foo = null +} +if ( notGoodFooVersion(fooVersion) ) { + foo = null +} + +// \.\. then later in your program \.\. + +if (foo) { + foo\.doFooThings() +} +.fi +.RE +.P +Entries in \fBoptionalDependencies\fP will override entries of the same name in +\fBdependencies\fP, so it's usually best to only put in one place\. +.SH engines +.P +You can specify the version of node that your stuff works on: +.P +.RS 2 +.nf +{ "engines" : { "node" : ">=0\.10\.3 <0\.12" } } +.fi +.RE +.P +And, like with dependencies, if you don't specify the version (or if you +specify "*" as the version), then any version of node will do\. +.P +If you specify an "engines" field, then npm will require that "node" be +somewhere on that list\. If "engines" is omitted, then npm will just assume +that it works on node\. +.P +You can also use the "engines" field to specify which versions of npm +are capable of properly installing your program\. For example: +.P +.RS 2 +.nf +{ "engines" : { "npm" : "~1\.0\.20" } } +.fi +.RE +.P +Note that, unless the user has set the \fBengine\-strict\fP config flag, this +field is advisory only\. +.SH engineStrict +.P +\fBNOTE: This feature is deprecated and will be removed in npm 3\.0\.0\.\fR +.P +If you are sure that your module will \fIdefinitely not\fR run properly on +versions of Node/npm other than those specified in the \fBengines\fP object, +then you can set \fB"engineStrict": true\fP in your package\.json file\. +This will override the user's \fBengine\-strict\fP config setting\. +.P +Please do not do this unless you are really very very sure\. If your +engines object is something overly restrictive, you can quite easily and +inadvertently lock yourself into obscurity and prevent your users from +updating to new versions of Node\. Consider this choice carefully\. +.SH os +.P +You can specify which operating systems your +module will run on: +.P +.RS 2 +.nf +"os" : [ "darwin", "linux" ] +.fi +.RE +.P +You can also blacklist instead of whitelist operating systems, +just prepend the blacklisted os with a '!': +.P +.RS 2 +.nf +"os" : [ "!win32" ] +.fi +.RE +.P +The host operating system is determined by \fBprocess\.platform\fP +.P +It is allowed to both blacklist, and whitelist, although there isn't any +good reason to do this\. +.SH cpu +.P +If your code only runs on certain cpu architectures, +you can specify which ones\. +.P +.RS 2 +.nf +"cpu" : [ "x64", "ia32" ] +.fi +.RE +.P +Like the \fBos\fP option, you can also blacklist architectures: +.P +.RS 2 +.nf +"cpu" : [ "!arm", "!mips" ] +.fi +.RE +.P +The host architecture is determined by \fBprocess\.arch\fP +.SH preferGlobal +.P +If your package is primarily a command\-line application that should be +installed globally, then set this value to \fBtrue\fP to provide a warning +if it is installed locally\. +.P +It doesn't actually prevent users from installing it locally, but it +does help prevent some confusion if it doesn't work as expected\. +.SH private +.P +If you set \fB"private": true\fP in your package\.json, then npm will refuse +to publish it\. +.P +This is a way to prevent accidental publication of private repositories\. If +you would like to ensure that a given package is only ever published to a +specific registry (for example, an internal registry), then use the +\fBpublishConfig\fP dictionary described below to override the \fBregistry\fP config +param at publish\-time\. +.SH publishConfig +.P +This is a set of config values that will be used at publish\-time\. It's +especially handy if you want to set the tag, registry or access, so that +you can ensure that a given package is not tagged with "latest", published +to the global public registry or that a scoped module is private by default\. +.P +Any config values can be overridden, but of course only "tag", "registry" and +"access" probably matter for the purposes of publishing\. +.P +See npm help 7 \fBnpm\-config\fP to see the list of config options that can be +overridden\. +.SH DEFAULT VALUES +.P +npm will default some values based on package contents\. +.RS 0 +.IP \(bu 2 +\fB"scripts": {"start": "node server\.js"}\fP +If there is a \fBserver\.js\fP file in the root of your package, then npm +will default the \fBstart\fP command to \fBnode server\.js\fP\|\. +.IP \(bu 2 +\fB"scripts":{"preinstall": "node\-gyp rebuild"}\fP +If there is a \fBbinding\.gyp\fP file in the root of your package, npm will +default the \fBpreinstall\fP command to compile using node\-gyp\. +.IP \(bu 2 +\fB"contributors": [\.\.\.]\fP +If there is an \fBAUTHORS\fP file in the root of your package, npm will +treat each line as a \fBName (url)\fP format, where email and url +are optional\. Lines which start with a \fB#\fP or are blank, will be +ignored\. + +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 semver +.IP \(bu 2 +npm help init +.IP \(bu 2 +npm help version +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help help +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help uninstall + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-coding-style.7 b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-coding-style.7 new file mode 100644 index 00000000..0380eced --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-coding-style.7 @@ -0,0 +1,204 @@ +.TH "NPM\-CODING\-STYLE" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-coding-style\fR \- npm's "funny" coding style +.SH DESCRIPTION +.P +npm's coding style is a bit unconventional\. It is not different for +difference's sake, but rather a carefully crafted style that is +designed to reduce visual clutter and make bugs more apparent\. +.P +If you want to contribute to npm (which is very encouraged), you should +make your code conform to npm's style\. +.P +Note: this concerns npm's code not the specific packages that you can download from the npm registry\. +.SH Line Length +.P +Keep lines shorter than 80 characters\. It's better for lines to be +too short than to be too long\. Break up long lists, objects, and other +statements onto multiple lines\. +.SH Indentation +.P +Two\-spaces\. Tabs are better, but they look like hell in web browsers +(and on GitHub), and node uses 2 spaces, so that's that\. +.P +Configure your editor appropriately\. +.SH Curly braces +.P +Curly braces belong on the same line as the thing that necessitates them\. +.P +Bad: +.P +.RS 2 +.nf +function () +{ +.fi +.RE +.P +Good: +.P +.RS 2 +.nf +function () { +.fi +.RE +.P +If a block needs to wrap to the next line, use a curly brace\. Don't +use it if it doesn't\. +.P +Bad: +.P +.RS 2 +.nf +if (foo) { bar() } +while (foo) + bar() +.fi +.RE +.P +Good: +.P +.RS 2 +.nf +if (foo) bar() +while (foo) { + bar() +} +.fi +.RE +.SH Semicolons +.P +Don't use them except in four situations: +.RS 0 +.IP \(bu 2 +\fBfor (;;)\fP loops\. They're actually required\. +.IP \(bu 2 +null loops like: \fBwhile (something) ;\fP (But you'd better have a good +reason for doing that\.) +.IP \(bu 2 +\fBcase "foo": doSomething(); break\fP +.IP \(bu 2 +In front of a leading \fB(\fP or \fB[\fP at the start of the line\. +This prevents the expression from being interpreted +as a function call or property access, respectively\. + +.RE +.P +Some examples of good semicolon usage: +.P +.RS 2 +.nf +;(x || y)\.doSomething() +;[a, b, c]\.forEach(doSomething) +for (var i = 0; i < 10; i ++) { + switch (state) { + case "begin": start(); continue + case "end": finish(); break + default: throw new Error("unknown state") + } + end() +} +.fi +.RE +.P +Note that starting lines with \fB\-\fP and \fB+\fP also should be prefixed +with a semicolon, but this is much less common\. +.SH Comma First +.P +If there is a list of things separated by commas, and it wraps +across multiple lines, put the comma at the start of the next +line, directly below the token that starts the list\. Put the +final token in the list on a line by itself\. For example: +.P +.RS 2 +.nf +var magicWords = [ "abracadabra" + , "gesundheit" + , "ventrilo" + ] + , spells = { "fireball" : function () { setOnFire() } + , "water" : function () { putOut() } + } + , a = 1 + , b = "abc" + , etc + , somethingElse +.fi +.RE +.SH Whitespace +.P +Put a single space in front of ( for anything other than a function call\. +Also use a single space wherever it makes things more readable\. +.P +Don't leave trailing whitespace at the end of lines\. Don't indent empty +lines\. Don't use more spaces than are helpful\. +.SH Functions +.P +Use named functions\. They make stack traces a lot easier to read\. +.SH Callbacks, Sync/async Style +.P +Use the asynchronous/non\-blocking versions of things as much as possible\. +It might make more sense for npm to use the synchronous fs APIs, but this +way, the fs and http and child process stuff all uses the same callback\-passing +methodology\. +.P +The callback should always be the last argument in the list\. Its first +argument is the Error or null\. +.P +Be very careful never to ever ever throw anything\. It's worse than useless\. +Just send the error message back as the first argument to the callback\. +.SH Errors +.P +Always create a new Error object with your message\. Don't just return a +string message to the callback\. Stack traces are handy\. +.SH Logging +.P +Logging is done using the npmlog \fIhttps://github\.com/npm/npmlog\fR +utility\. +.P +Please clean up logs when they are no longer helpful\. In particular, +logging the same object over and over again is not helpful\. Logs should +report what's happening so that it's easier to track down where a fault +occurs\. +.P +Use appropriate log levels\. See npm help 7 \fBnpm\-config\fP and search for +"loglevel"\. +.SH Case, naming, etc\. +.P +Use \fBlowerCamelCase\fP for multiword identifiers when they refer to objects, +functions, methods, properties, or anything not specified in this section\. +.P +Use \fBUpperCamelCase\fP for class names (things that you'd pass to "new")\. +.P +Use \fBall\-lower\-hyphen\-css\-case\fP for multiword filenames and config keys\. +.P +Use named functions\. They make stack traces easier to follow\. +.P +Use \fBCAPS_SNAKE_CASE\fP for constants, things that should never change +and are rarely used\. +.P +Use a single uppercase letter for function names where the function +would normally be anonymous, but needs to call itself recursively\. It +makes it clear that it's a "throwaway" function\. +.SH null, undefined, false, 0 +.P +Boolean variables and functions should always be either \fBtrue\fP or +\fBfalse\fP\|\. Don't set it to 0 unless it's supposed to be a number\. +.P +When something is intentionally missing or removed, set it to \fBnull\fP\|\. +.P +Don't set things to \fBundefined\fP\|\. Reserve that value to mean "not yet +set to anything\." +.P +Boolean objects are verboten\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 developers +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help npm + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-config.7 b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-config.7 new file mode 100644 index 00000000..2c5ea3be --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-config.7 @@ -0,0 +1,1272 @@ +.TH "NPM\-CONFIG" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-config\fR \- More than you probably want to know about npm configuration +.SH DESCRIPTION +.P +npm gets its configuration values from the following sources, sorted by priority: +.SS Command Line Flags +.P +Putting \fB\-\-foo bar\fP on the command line sets the \fBfoo\fP configuration +parameter to \fB"bar"\fP\|\. A \fB\-\-\fP argument tells the cli parser to stop +reading flags\. A \fB\-\-flag\fP parameter that is at the \fIend\fR of the +command will be given the value of \fBtrue\fP\|\. +.SS Environment Variables +.P +Any environment variables that start with \fBnpm_config_\fP will be +interpreted as a configuration parameter\. For example, putting +\fBnpm_config_foo=bar\fP in your environment will set the \fBfoo\fP +configuration parameter to \fBbar\fP\|\. Any environment configurations that +are not given a value will be given the value of \fBtrue\fP\|\. Config +values are case\-insensitive, so \fBNPM_CONFIG_FOO=bar\fP will work the +same\. +.SS npmrc Files +.P +The four relevant files are: +.RS 0 +.IP \(bu 2 +per\-project config file (/path/to/my/project/\.npmrc) +.IP \(bu 2 +per\-user config file (~/\.npmrc) +.IP \(bu 2 +global config file ($PREFIX/npmrc) +.IP \(bu 2 +npm builtin config file (/path/to/npm/npmrc) + +.RE +.P +See npm help 5 npmrc for more details\. +.SS Default Configs +.P +A set of configuration parameters that are internal to npm, and are +defaults if nothing else is specified\. +.SH Shorthands and Other CLI Niceties +.P +The following shorthands are parsed on the command\-line: +.RS 0 +.IP \(bu 2 +\fB\-v\fP: \fB\-\-version\fP +.IP \(bu 2 +\fB\-h\fP, \fB\-?\fP, \fB\-\-help\fP, \fB\-H\fP: \fB\-\-usage\fP +.IP \(bu 2 +\fB\-s\fP, \fB\-\-silent\fP: \fB\-\-loglevel silent\fP +.IP \(bu 2 +\fB\-q\fP, \fB\-\-quiet\fP: \fB\-\-loglevel warn\fP +.IP \(bu 2 +\fB\-d\fP: \fB\-\-loglevel info\fP +.IP \(bu 2 +\fB\-dd\fP, \fB\-\-verbose\fP: \fB\-\-loglevel verbose\fP +.IP \(bu 2 +\fB\-ddd\fP: \fB\-\-loglevel silly\fP +.IP \(bu 2 +\fB\-g\fP: \fB\-\-global\fP +.IP \(bu 2 +\fB\-C\fP: \fB\-\-prefix\fP +.IP \(bu 2 +\fB\-l\fP: \fB\-\-long\fP +.IP \(bu 2 +\fB\-m\fP: \fB\-\-message\fP +.IP \(bu 2 +\fB\-p\fP, \fB\-\-porcelain\fP: \fB\-\-parseable\fP +.IP \(bu 2 +\fB\-reg\fP: \fB\-\-registry\fP +.IP \(bu 2 +\fB\-f\fP: \fB\-\-force\fP +.IP \(bu 2 +\fB\-desc\fP: \fB\-\-description\fP +.IP \(bu 2 +\fB\-S\fP: \fB\-\-save\fP +.IP \(bu 2 +\fB\-D\fP: \fB\-\-save\-dev\fP +.IP \(bu 2 +\fB\-O\fP: \fB\-\-save\-optional\fP +.IP \(bu 2 +\fB\-B\fP: \fB\-\-save\-bundle\fP +.IP \(bu 2 +\fB\-E\fP: \fB\-\-save\-exact\fP +.IP \(bu 2 +\fB\-y\fP: \fB\-\-yes\fP +.IP \(bu 2 +\fB\-n\fP: \fB\-\-yes false\fP +.IP \(bu 2 +\fBll\fP and \fBla\fP commands: \fBls \-\-long\fP + +.RE +.P +If the specified configuration param resolves unambiguously to a known +configuration parameter, then it is expanded to that configuration +parameter\. For example: +.P +.RS 2 +.nf +npm ls \-\-par +# same as: +npm ls \-\-parseable +.fi +.RE +.P +If multiple single\-character shorthands are strung together, and the +resulting combination is unambiguously not some other configuration +param, then it is expanded to its various component pieces\. For +example: +.P +.RS 2 +.nf +npm ls \-gpld +# same as: +npm ls \-\-global \-\-parseable \-\-long \-\-loglevel info +.fi +.RE +.SH Per\-Package Config Settings +.P +When running scripts (see npm help 7 \fBnpm\-scripts\fP) the package\.json "config" +keys are overwritten in the environment if there is a config param of +\fB[@]:\fP\|\. For example, if the package\.json has +this: +.P +.RS 2 +.nf +{ "name" : "foo" +, "config" : { "port" : "8080" } +, "scripts" : { "start" : "node server\.js" } } +.fi +.RE +.P +and the server\.js is this: +.P +.RS 2 +.nf +http\.createServer(\.\.\.)\.listen(process\.env\.npm_package_config_port) +.fi +.RE +.P +then the user could change the behavior by doing: +.P +.RS 2 +.nf +npm config set foo:port 80 +.fi +.RE +.P +See npm help 5 package\.json for more information\. +.SH Config Settings +.SS access +.RS 0 +.IP \(bu 2 +Default: \fBrestricted\fP +.IP \(bu 2 +Type: Access + +.RE +.P +When publishing scoped packages, the access level defaults to \fBrestricted\fP\|\. If +you want your scoped package to be publicly viewable (and installable) set +\fB\-\-access=public\fP\|\. The only valid values for \fBaccess\fP are \fBpublic\fP and +\fBrestricted\fP\|\. Unscoped packages \fIalways\fR have an access level of \fBpublic\fP\|\. +.SS always\-auth +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Force npm to always require authentication when accessing the registry, +even for \fBGET\fP requests\. +.SS bin\-links +.RS 0 +.IP \(bu 2 +Default: \fBtrue\fP +.IP \(bu 2 +Type: Boolean + +.RE +.P +Tells npm to create symlinks (or \fB\|\.cmd\fP shims on Windows) for package +executables\. +.P +Set to false to have it not do this\. This can be used to work around +the fact that some file systems don't support symlinks, even on +ostensibly Unix systems\. +.SS browser +.RS 0 +.IP \(bu 2 +Default: OS X: \fB"open"\fP, Windows: \fB"start"\fP, Others: \fB"xdg\-open"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The browser that is called by the \fBnpm docs\fP command to open websites\. +.SS ca +.RS 0 +.IP \(bu 2 +Default: The npm CA certificate +.IP \(bu 2 +Type: String, Array or null + +.RE +.P +The Certificate Authority signing certificate that is trusted for SSL +connections to the registry\. Values should be in PEM format with newlines +replaced by the string "\\n"\. For example: +.P +.RS 2 +.nf +ca="\-\-\-\-\-BEGIN CERTIFICATE\-\-\-\-\-\\nXXXX\\nXXXX\\n\-\-\-\-\-END CERTIFICATE\-\-\-\-\-" +.fi +.RE +.P +Set to \fBnull\fP to only allow "known" registrars, or to a specific CA cert +to trust only that specific signing authority\. +.P +Multiple CAs can be trusted by specifying an array of certificates: +.P +.RS 2 +.nf +ca[]="\.\.\." +ca[]="\.\.\." +.fi +.RE +.P +See also the \fBstrict\-ssl\fP config\. +.SS cafile +.RS 0 +.IP \(bu 2 +Default: \fBnull\fP +.IP \(bu 2 +Type: path + +.RE +.P +A path to a file containing one or multiple Certificate Authority signing +certificates\. Similar to the \fBca\fP setting, but allows for multiple CA's, as +well as for the CA information to be stored in a file on disk\. +.SS cache +.RS 0 +.IP \(bu 2 +Default: Windows: \fB%AppData%\\npm\-cache\fP, Posix: \fB~/\.npm\fP +.IP \(bu 2 +Type: path + +.RE +.P +The location of npm's cache directory\. See npm help \fBnpm\-cache\fP +.SS cache\-lock\-stale +.RS 0 +.IP \(bu 2 +Default: 60000 (1 minute) +.IP \(bu 2 +Type: Number + +.RE +.P +The number of ms before cache folder lockfiles are considered stale\. +.SS cache\-lock\-retries +.RS 0 +.IP \(bu 2 +Default: 10 +.IP \(bu 2 +Type: Number + +.RE +.P +Number of times to retry to acquire a lock on cache folder lockfiles\. +.SS cache\-lock\-wait +.RS 0 +.IP \(bu 2 +Default: 10000 (10 seconds) +.IP \(bu 2 +Type: Number + +.RE +.P +Number of ms to wait for cache lock files to expire\. +.SS cache\-max +.RS 0 +.IP \(bu 2 +Default: Infinity +.IP \(bu 2 +Type: Number + +.RE +.P +The maximum time (in seconds) to keep items in the registry cache before +re\-checking against the registry\. +.P +Note that no purging is done unless the \fBnpm cache clean\fP command is +explicitly used, and that only GET requests use the cache\. +.SS cache\-min +.RS 0 +.IP \(bu 2 +Default: 10 +.IP \(bu 2 +Type: Number + +.RE +.P +The minimum time (in seconds) to keep items in the registry cache before +re\-checking against the registry\. +.P +Note that no purging is done unless the \fBnpm cache clean\fP command is +explicitly used, and that only GET requests use the cache\. +.SS cert +.RS 0 +.IP \(bu 2 +Default: \fBnull\fP +.IP \(bu 2 +Type: String + +.RE +.P +A client certificate to pass when accessing the registry\. +.SS color +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean or \fB"always"\fP + +.RE +.P +If false, never shows colors\. If \fB"always"\fP then always shows colors\. +If true, then only prints color codes for tty file descriptors\. +.SS depth +.RS 0 +.IP \(bu 2 +Default: Infinity +.IP \(bu 2 +Type: Number + +.RE +.P +The depth to go when recursing directories for \fBnpm ls\fP, +\fBnpm cache ls\fP, and \fBnpm outdated\fP\|\. +.P +For \fBnpm outdated\fP, a setting of \fBInfinity\fP will be treated as \fB0\fP +since that gives more useful information\. To show the outdated status +of all packages and dependents, use a large integer value, +e\.g\., \fBnpm outdated \-\-depth 9999\fP +.SS description +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show the description in \fBnpm search\fP +.SS dev +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Install \fBdev\-dependencies\fP along with packages\. +.P +Note that \fBdev\-dependencies\fP are also installed if the \fBnpat\fP flag is +set\. +.SS editor +.RS 0 +.IP \(bu 2 +Default: \fBEDITOR\fP environment variable if set, or \fB"vi"\fP on Posix, +or \fB"notepad"\fP on Windows\. +.IP \(bu 2 +Type: path + +.RE +.P +The command to run for \fBnpm edit\fP or \fBnpm config edit\fP\|\. +.SS engine\-strict +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If set to true, then npm will stubbornly refuse to install (or even +consider installing) any package that claims to not be compatible with +the current Node\.js version\. +.SS force +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Makes various commands more forceful\. +.RS 0 +.IP \(bu 2 +lifecycle script failure does not block progress\. +.IP \(bu 2 +publishing clobbers previously published versions\. +.IP \(bu 2 +skips cache when requesting from the registry\. +.IP \(bu 2 +prevents checks against clobbering non\-npm files\. + +.RE +.SS fetch\-retries +.RS 0 +.IP \(bu 2 +Default: 2 +.IP \(bu 2 +Type: Number + +.RE +.P +The "retries" config for the \fBretry\fP module to use when fetching +packages from the registry\. +.SS fetch\-retry\-factor +.RS 0 +.IP \(bu 2 +Default: 10 +.IP \(bu 2 +Type: Number + +.RE +.P +The "factor" config for the \fBretry\fP module to use when fetching +packages\. +.SS fetch\-retry\-mintimeout +.RS 0 +.IP \(bu 2 +Default: 10000 (10 seconds) +.IP \(bu 2 +Type: Number + +.RE +.P +The "minTimeout" config for the \fBretry\fP module to use when fetching +packages\. +.SS fetch\-retry\-maxtimeout +.RS 0 +.IP \(bu 2 +Default: 60000 (1 minute) +.IP \(bu 2 +Type: Number + +.RE +.P +The "maxTimeout" config for the \fBretry\fP module to use when fetching +packages\. +.SS git +.RS 0 +.IP \(bu 2 +Default: \fB"git"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The command to use for git commands\. If git is installed on the +computer, but is not in the \fBPATH\fP, then set this to the full path to +the git binary\. +.SS git\-tag\-version +.RS 0 +.IP \(bu 2 +Default: \fBtrue\fP +.IP \(bu 2 +Type: Boolean + +.RE +.P +Tag the commit when using the \fBnpm version\fP command\. +.SS global +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Operates in "global" mode, so that packages are installed into the +\fBprefix\fP folder instead of the current working directory\. See +npm help 5 \fBnpm\-folders\fP for more on the differences in behavior\. +.RS 0 +.IP \(bu 2 +packages are installed into the \fB{prefix}/lib/node_modules\fP folder, instead of the +current working directory\. +.IP \(bu 2 +bin files are linked to \fB{prefix}/bin\fP +.IP \(bu 2 +man pages are linked to \fB{prefix}/share/man\fP + +.RE +.SS globalconfig +.RS 0 +.IP \(bu 2 +Default: {prefix}/etc/npmrc +.IP \(bu 2 +Type: path + +.RE +.P +The config file to read for global config options\. +.SS group +.RS 0 +.IP \(bu 2 +Default: GID of the current process +.IP \(bu 2 +Type: String or Number + +.RE +.P +The group to use when running package scripts in global mode as the root +user\. +.SS heading +.RS 0 +.IP \(bu 2 +Default: \fB"npm"\fP +.IP \(bu 2 +Type: String + +.RE +.P +The string that starts all the debugging log output\. +.SS https\-proxy +.RS 0 +.IP \(bu 2 +Default: null +.IP \(bu 2 +Type: url + +.RE +.P +A proxy to use for outgoing https requests\. If the \fBHTTPS_PROXY\fP or +\fBhttps_proxy\fP or \fBHTTP_PROXY\fP or \fBhttp_proxy\fP environment variables are set, +proxy settings will be honored by the underlying \fBrequest\fP library\. +.SS if\-present +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If true, npm will not exit with an error code when \fBrun\-script\fP is invoked for +a script that isn't defined in the \fBscripts\fP section of \fBpackage\.json\fP\|\. This +option can be used when it's desirable to optionally run a script when it's +present and fail if the script fails\. This is useful, for example, when running +scripts that may only apply for some builds in an otherwise generic CI setup\. +.SS ignore\-scripts +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If true, npm does not run scripts specified in package\.json files\. +.SS init\-module +.RS 0 +.IP \(bu 2 +Default: ~/\.npm\-init\.js +.IP \(bu 2 +Type: path + +.RE +.P +A module that will be loaded by the \fBnpm init\fP command\. See the +documentation for the +init\-package\-json \fIhttps://github\.com/isaacs/init\-package\-json\fR module +for more information, or npm help init\. +.SS init\-author\-name +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +The value \fBnpm init\fP should use by default for the package author's name\. +.SS init\-author\-email +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +The value \fBnpm init\fP should use by default for the package author's email\. +.SS init\-author\-url +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +The value \fBnpm init\fP should use by default for the package author's homepage\. +.SS init\-license +.RS 0 +.IP \(bu 2 +Default: "ISC" +.IP \(bu 2 +Type: String + +.RE +.P +The value \fBnpm init\fP should use by default for the package license\. +.SS init\-version +.RS 0 +.IP \(bu 2 +Default: "1\.0\.0" +.IP \(bu 2 +Type: semver + +.RE +.P +The value that \fBnpm init\fP should use by default for the package +version number, if not already set in package\.json\. +.SS json +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Whether or not to output JSON data, rather than the normal output\. +.P +This feature is currently experimental, and the output data structures +for many commands is either not implemented in JSON yet, or subject to +change\. Only the output from \fBnpm ls \-\-json\fP is currently valid\. +.SS key +.RS 0 +.IP \(bu 2 +Default: \fBnull\fP +.IP \(bu 2 +Type: String + +.RE +.P +A client key to pass when accessing the registry\. +.SS link +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If true, then local installs will link if there is a suitable globally +installed package\. +.P +Note that this means that local installs can cause things to be +installed into the global space at the same time\. The link is only done +if one of the two conditions are met: +.RS 0 +.IP \(bu 2 +The package is not already installed globally, or +.IP \(bu 2 +the globally installed version is identical to the version that is +being installed locally\. + +.RE +.SS local\-address +.RS 0 +.IP \(bu 2 +Default: undefined +.IP \(bu 2 +Type: IP Address + +.RE +.P +The IP address of the local interface to use when making connections +to the npm registry\. Must be IPv4 in versions of Node prior to 0\.12\. +.SS loglevel +.RS 0 +.IP \(bu 2 +Default: "warn" +.IP \(bu 2 +Type: String +.IP \(bu 2 +Values: "silent", "error", "warn", "http", "info", "verbose", "silly" + +.RE +.P +What level of logs to report\. On failure, \fIall\fR logs are written to +\fBnpm\-debug\.log\fP in the current working directory\. +.P +Any logs of a higher level than the setting are shown\. +The default is "warn", which shows warn and error output\. +.SS logstream +.RS 0 +.IP \(bu 2 +Default: process\.stderr +.IP \(bu 2 +Type: Stream + +.RE +.P +This is the stream that is passed to the +npmlog \fIhttps://github\.com/npm/npmlog\fR module at run time\. +.P +It cannot be set from the command line, but if you are using npm +programmatically, you may wish to send logs to somewhere other than +stderr\. +.P +If the \fBcolor\fP config is set to true, then this stream will receive +colored output if it is a TTY\. +.SS long +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Show extended information in \fBnpm ls\fP and \fBnpm search\fP\|\. +.SS maxsockets +.RS 0 +.IP \(bu 2 +Default: 50 +.IP \(bu 2 +Type: Number + +.RE +.P +The maximum number of connections to use per origin (protocol/host/port +combination)\. Passed to the \fBhttp\fP \fBAgent\fP used to make the request\. +.SS message +.RS 0 +.IP \(bu 2 +Default: "%s" +.IP \(bu 2 +Type: String + +.RE +.P +Commit message which is used by \fBnpm version\fP when creating version commit\. +.P +Any "%s" in the message will be replaced with the version number\. +.SS node\-version +.RS 0 +.IP \(bu 2 +Default: process\.version +.IP \(bu 2 +Type: semver or false + +.RE +.P +The node version to use when checking a package's \fBengines\fP map\. +.SS npat +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Run tests on installation\. +.SS onload\-script +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: path + +.RE +.P +A node module to \fBrequire()\fP when npm loads\. Useful for programmatic +usage\. +.SS optional +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Attempt to install packages in the \fBoptionalDependencies\fP object\. Note +that if these packages fail to install, the overall installation +process is not aborted\. +.SS parseable +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Output parseable results from commands that write to +standard output\. +.SS prefix +.RS 0 +.IP \(bu 2 +Default: see npm help 5 folders +.IP \(bu 2 +Type: path + +.RE +.P +The location to install global items\. If set on the command line, then +it forces non\-global commands to run in the specified folder\. +.SS production +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Set to true to run in "production" mode\. +.RS 0 +.IP 1. 3 +devDependencies are not installed at the topmost level when running +local \fBnpm install\fP without any arguments\. +.IP 2. 3 +Set the NODE_ENV="production" for lifecycle scripts\. + +.RE +.SS proprietary\-attribs +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Whether or not to include proprietary extended attributes in the +tarballs created by npm\. +.P +Unless you are expecting to unpack package tarballs with something other +than npm \-\- particularly a very outdated tar implementation \-\- leave +this as true\. +.SS proxy +.RS 0 +.IP \(bu 2 +Default: null +.IP \(bu 2 +Type: url + +.RE +.P +A proxy to use for outgoing http requests\. If the \fBHTTP_PROXY\fP or +\fBhttp_proxy\fP environment variables are set, proxy settings will be +honored by the underlying \fBrequest\fP library\. +.SS rebuild\-bundle +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Rebuild bundled dependencies after installation\. +.SS registry +.RS 0 +.IP \(bu 2 +Default: https://registry\.npmjs\.org/ +.IP \(bu 2 +Type: url + +.RE +.P +The base URL of the npm package registry\. +.SS rollback +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Remove failed installs\. +.SS save +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Save installed packages to a package\.json file as dependencies\. +.P +When used with the \fBnpm rm\fP command, it removes it from the \fBdependencies\fP +object\. +.P +Only works if there is already a package\.json file present\. +.SS save\-bundle +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If a package would be saved at install time by the use of \fB\-\-save\fP, +\fB\-\-save\-dev\fP, or \fB\-\-save\-optional\fP, then also put it in the +\fBbundleDependencies\fP list\. +.P +When used with the \fBnpm rm\fP command, it removes it from the +bundledDependencies list\. +.SS save\-dev +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Save installed packages to a package\.json file as \fBdevDependencies\fP\|\. +.P +When used with the \fBnpm rm\fP command, it removes it from the +\fBdevDependencies\fP object\. +.P +Only works if there is already a package\.json file present\. +.SS save\-exact +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Dependencies saved to package\.json using \fB\-\-save\fP, \fB\-\-save\-dev\fP or +\fB\-\-save\-optional\fP will be configured with an exact version rather than +using npm's default semver range operator\. +.SS save\-optional +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Save installed packages to a package\.json file as +optionalDependencies\. +.P +When used with the \fBnpm rm\fP command, it removes it from the +\fBdevDependencies\fP object\. +.P +Only works if there is already a package\.json file present\. +.SS save\-prefix +.RS 0 +.IP \(bu 2 +Default: '^' +.IP \(bu 2 +Type: String + +.RE +.P +Configure how versions of packages installed to a package\.json file via +\fB\-\-save\fP or \fB\-\-save\-dev\fP get prefixed\. +.P +For example if a package has version \fB1\.2\.3\fP, by default its version is +set to \fB^1\.2\.3\fP which allows minor upgrades for that package, but after +\fBnpm config set save\-prefix='~'\fP it would be set to \fB~1\.2\.3\fP which only allows +patch upgrades\. +.SS scope +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +Associate an operation with a scope for a scoped registry\. Useful when logging +in to a private registry for the first time: +\fBnpm login \-\-scope=@organization \-\-registry=registry\.organization\.com\fP, which +will cause \fB@organization\fP to be mapped to the registry for future installation +of packages specified according to the pattern \fB@organization/package\fP\|\. +.SS searchopts +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +Space\-separated options that are always passed to search\. +.SS searchexclude +.RS 0 +.IP \(bu 2 +Default: "" +.IP \(bu 2 +Type: String + +.RE +.P +Space\-separated options that limit the results from search\. +.SS searchsort +.RS 0 +.IP \(bu 2 +Default: "name" +.IP \(bu 2 +Type: String +.IP \(bu 2 +Values: "name", "\-name", "date", "\-date", "description", +"\-description", "keywords", "\-keywords" + +.RE +.P +Indication of which field to sort search results by\. Prefix with a \fB\-\fP +character to indicate reverse sort\. +.SS shell +.RS 0 +.IP \(bu 2 +Default: SHELL environment variable, or "bash" on Posix, or "cmd" on +Windows +.IP \(bu 2 +Type: path + +.RE +.P +The shell to run for the \fBnpm explore\fP command\. +.SS shrinkwrap +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +If set to false, then ignore \fBnpm\-shrinkwrap\.json\fP files when +installing\. +.SS sign\-git\-tag +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +If set to true, then the \fBnpm version\fP command will tag the version +using \fB\-s\fP to add a signature\. +.P +Note that git requires you to have set up GPG keys in your git configs +for this to work properly\. +.SS spin +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean or \fB"always"\fP + +.RE +.P +When set to \fBtrue\fP, npm will display an ascii spinner while it is doing +things, if \fBprocess\.stderr\fP is a TTY\. +.P +Set to \fBfalse\fP to suppress the spinner, or set to \fBalways\fP to output +the spinner even for non\-TTY outputs\. +.SS strict\-ssl +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Whether or not to do SSL key validation when making requests to the +registry via https\. +.P +See also the \fBca\fP config\. +.SS tag +.RS 0 +.IP \(bu 2 +Default: latest +.IP \(bu 2 +Type: String + +.RE +.P +If you ask npm to install a package and don't tell it a specific version, then +it will install the specified tag\. +.P +Also the tag that is added to the package@version specified by the \fBnpm +tag\fP command, if no explicit tag is given\. +.SS tag\-version\-prefix +.RS 0 +.IP \(bu 2 +Default: \fB"v"\fP +.IP \(bu 2 +Type: String + +.RE +.P +If set, alters the prefix used when tagging a new version when performing a +version increment using \fBnpm\-version\fP\|\. To remove the prefix altogether, set it +to the empty string: \fB""\fP\|\. +.P +Because other tools may rely on the convention that npm version tags look like +\fBv1\.0\.0\fP, \fIonly use this property if it is absolutely necessary\fR\|\. In +particular, use care when overriding this setting for public packages\. +.SS tmp +.RS 0 +.IP \(bu 2 +Default: TMPDIR environment variable, or "/tmp" +.IP \(bu 2 +Type: path + +.RE +.P +Where to store temporary files and folders\. All temp files are deleted +on success, but left behind on failure for forensic purposes\. +.SS unicode +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +When set to true, npm uses unicode characters in the tree output\. When +false, it uses ascii characters to draw trees\. +.SS unsafe\-perm +.RS 0 +.IP \(bu 2 +Default: false if running as root, true otherwise +.IP \(bu 2 +Type: Boolean + +.RE +.P +Set to true to suppress the UID/GID switching when running package +scripts\. If set explicitly to false, then installing as a non\-root user +will fail\. +.SS usage +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +Set to show short usage output (like the \-H output) +instead of complete help when doing npm help \fBnpm\-help\fP\|\. +.SS user +.RS 0 +.IP \(bu 2 +Default: "nobody" +.IP \(bu 2 +Type: String or Number + +.RE +.P +The UID to set to when running package scripts as root\. +.SS userconfig +.RS 0 +.IP \(bu 2 +Default: ~/\.npmrc +.IP \(bu 2 +Type: path + +.RE +.P +The location of user\-level configuration settings\. +.SS umask +.RS 0 +.IP \(bu 2 +Default: 022 +.IP \(bu 2 +Type: Octal numeric string in range 0000\.\.0777 (0\.\.511) + +.RE +.P +The "umask" value to use when setting the file creation mode on files +and folders\. +.P +Folders and executables are given a mode which is \fB0777\fP masked against +this value\. Other files are given a mode which is \fB0666\fP masked against +this value\. Thus, the defaults are \fB0755\fP and \fB0644\fP respectively\. +.SS user\-agent +.RS 0 +.IP \(bu 2 +Default: node/{process\.version} {process\.platform} {process\.arch} +.IP \(bu 2 +Type: String + +.RE +.P +Sets a User\-Agent to the request header +.SS version +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: boolean + +.RE +.P +If true, output the npm version and exit successfully\. +.P +Only relevant when specified explicitly on the command line\. +.SS versions +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: boolean + +.RE +.P +If true, output the npm version as well as node's \fBprocess\.versions\fP map, and +exit successfully\. +.P +Only relevant when specified explicitly on the command line\. +.SS viewer +.RS 0 +.IP \(bu 2 +Default: "man" on Posix, "browser" on Windows +.IP \(bu 2 +Type: path + +.RE +.P +The program to use to view help content\. +.P +Set to \fB"browser"\fP to view html help content in the default web browser\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help 5 folders +.IP \(bu 2 +npm help npm + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-developers.7 b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-developers.7 new file mode 100644 index 00000000..43739437 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-developers.7 @@ -0,0 +1,282 @@ +.TH "NPM\-DEVELOPERS" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-developers\fR \- Developer Guide +.SH DESCRIPTION +.P +So, you've decided to use npm to develop (and maybe publish/deploy) +your project\. +.P +Fantastic! +.P +There are a few things that you need to do above the simple steps +that your users will do to install your program\. +.SH About These Documents +.P +These are man pages\. If you install npm, you should be able to +then do \fBman npm\-thing\fP to get the documentation on a particular +topic, or \fBnpm help thing\fP to see the same information\. +.SH What is a \fBpackage\fP +.P +A package is: +.RS 0 +.IP \(bu 2 +a) a folder containing a program described by a package\.json file +.IP \(bu 2 +b) a gzipped tarball containing (a) +.IP \(bu 2 +c) a url that resolves to (b) +.IP \(bu 2 +d) a \fB@\fP that is published on the registry with (c) +.IP \(bu 2 +e) a \fB@\fP that points to (d) +.IP \(bu 2 +f) a \fB\fP that has a "latest" tag satisfying (e) +.IP \(bu 2 +g) a \fBgit\fP url that, when cloned, results in (a)\. + +.RE +.P +Even if you never publish your package, you can still get a lot of +benefits of using npm if you just want to write a node program (a), and +perhaps if you also want to be able to easily install it elsewhere +after packing it up into a tarball (b)\. +.P +Git urls can be of the form: +.P +.RS 2 +.nf +git://github\.com/user/project\.git#commit\-ish +git+ssh://user@hostname:project\.git#commit\-ish +git+http://user@hostname/project/blah\.git#commit\-ish +git+https://user@hostname/project/blah\.git#commit\-ish +.fi +.RE +.P +The \fBcommit\-ish\fP can be any tag, sha, or branch which can be supplied as +an argument to \fBgit checkout\fP\|\. The default is \fBmaster\fP\|\. +.SH The package\.json File +.P +You need to have a \fBpackage\.json\fP file in the root of your project to do +much of anything with npm\. That is basically the whole interface\. +.P +See npm help 5 \fBpackage\.json\fP for details about what goes in that file\. At the very +least, you need: +.RS 0 +.IP \(bu 2 +name: +This should be a string that identifies your project\. Please do not +use the name to specify that it runs on node, or is in JavaScript\. +You can use the "engines" field to explicitly state the versions of +node (or whatever else) that your program requires, and it's pretty +well assumed that it's javascript\. +It does not necessarily need to match your github repository name\. +So, \fBnode\-foo\fP and \fBbar\-js\fP are bad names\. \fBfoo\fP or \fBbar\fP are better\. +.IP \(bu 2 +version: +A semver\-compatible version\. +.IP \(bu 2 +engines: +Specify the versions of node (or whatever else) that your program +runs on\. The node API changes a lot, and there may be bugs or new +functionality that you depend on\. Be explicit\. +.IP \(bu 2 +author: +Take some credit\. +.IP \(bu 2 +scripts: +If you have a special compilation or installation script, then you +should put it in the \fBscripts\fP object\. You should definitely have at +least a basic smoke\-test command as the "scripts\.test" field\. +See npm help 7 scripts\. +.IP \(bu 2 +main: +If you have a single module that serves as the entry point to your +program (like what the "foo" package gives you at require("foo")), +then you need to specify that in the "main" field\. +.IP \(bu 2 +directories: +This is an object mapping names to folders\. The best ones to include are +"lib" and "doc", but if you use "man" to specify a folder full of man pages, +they'll get installed just like these ones\. + +.RE +.P +You can use \fBnpm init\fP in the root of your package in order to get you +started with a pretty basic package\.json file\. See npm help \fBnpm\-init\fP for +more info\. +.SH Keeping files \fIout\fR of your package +.P +Use a \fB\|\.npmignore\fP file to keep stuff out of your package\. If there's +no \fB\|\.npmignore\fP file, but there \fIis\fR a \fB\|\.gitignore\fP file, then npm will +ignore the stuff matched by the \fB\|\.gitignore\fP file\. If you \fIwant\fR to +include something that is excluded by your \fB\|\.gitignore\fP file, you can +create an empty \fB\|\.npmignore\fP file to override it\. Like \fBgit\fP, \fBnpm\fP looks +for \fB\|\.npmignore\fP and \fB\|\.gitignore\fP files in all subdirectories of your +package, not only the root directory\. +.P +\fB\|\.npmignore\fP files follow the same pattern rules \fIhttps://git\-scm\.com/book/en/v2/Git\-Basics\-Recording\-Changes\-to\-the\-Repository#Ignoring\-Files\fR +as \fB\|\.gitignore\fP files: +.RS 0 +.IP \(bu 2 +Blank lines or lines starting with \fB#\fP are ignored\. +.IP \(bu 2 +Standard glob patterns work\. +.IP \(bu 2 +You can end patterns with a forward slash \fB/\fP to specify a directory\. +.IP \(bu 2 +You can negate a pattern by starting it with an exclamation point \fB!\fP\|\. + +.RE +.P +By default, the following paths and files are ignored, so there's no +need to add them to \fB\|\.npmignore\fP explicitly: +.RS 0 +.IP \(bu 2 +\fB\|\.*\.swp\fP +.IP \(bu 2 +\fB\|\._*\fP +.IP \(bu 2 +\fB\|\.DS_Store\fP +.IP \(bu 2 +\fB\|\.git\fP +.IP \(bu 2 +\fB\|\.hg\fP +.IP \(bu 2 +\fB\|\.npmrc\fP +.IP \(bu 2 +\fB\|\.lock\-wscript\fP +.IP \(bu 2 +\fB\|\.svn\fP +.IP \(bu 2 +\fB\|\.wafpickle\-*\fP +.IP \(bu 2 +\fBconfig\.gypi\fP +.IP \(bu 2 +\fBCVS\fP +.IP \(bu 2 +\fBnpm\-debug\.log\fP + +.RE +.P +Additionally, everything in \fBnode_modules\fP is ignored, except for +bundled dependencies\. npm automatically handles this for you, so don't +bother adding \fBnode_modules\fP to \fB\|\.npmignore\fP\|\. +.P +The following paths and files are never ignored, so adding them to +\fB\|\.npmignore\fP is pointless: +.RS 0 +.IP \(bu 2 +\fBpackage\.json\fP +.IP \(bu 2 +\fBREADME\fP (and its variants) +.IP \(bu 2 +\fBCHANGELOG\fP (and its variants) +.IP \(bu 2 +\fBLICENSE\fP / \fBLICENCE\fP + +.RE +.SH Link Packages +.P +\fBnpm link\fP is designed to install a development package and see the +changes in real time without having to keep re\-installing it\. (You do +need to either re\-link or \fBnpm rebuild \-g\fP to update compiled packages, +of course\.) +.P +More info at npm help \fBnpm\-link\fP\|\. +.SH Before Publishing: Make Sure Your Package Installs and Works +.P +\fBThis is important\.\fR +.P +If you can not install it locally, you'll have +problems trying to publish it\. Or, worse yet, you'll be able to +publish it, but you'll be publishing a broken or pointless package\. +So don't do that\. +.P +In the root of your package, do this: +.P +.RS 2 +.nf +npm install \. \-g +.fi +.RE +.P +That'll show you that it's working\. If you'd rather just create a symlink +package that points to your working directory, then do this: +.P +.RS 2 +.nf +npm link +.fi +.RE +.P +Use \fBnpm ls \-g\fP to see if it's there\. +.P +To test a local install, go into some other folder, and then do: +.P +.RS 2 +.nf +cd \.\./some\-other\-folder +npm install \.\./my\-package +.fi +.RE +.P +to install it locally into the node_modules folder in that other place\. +.P +Then go into the node\-repl, and try using require("my\-thing") to +bring in your module's main module\. +.SH Create a User Account +.P +Create a user with the adduser command\. It works like this: +.P +.RS 2 +.nf +npm adduser +.fi +.RE +.P +and then follow the prompts\. +.P +This is documented better in npm help adduser\. +.SH Publish your package +.P +This part's easy\. In the root of your folder, do this: +.P +.RS 2 +.nf +npm publish +.fi +.RE +.P +You can give publish a url to a tarball, or a filename of a tarball, +or a path to a folder\. +.P +Note that pretty much \fBeverything in that folder will be exposed\fR +by default\. So, if you have secret stuff in there, use a +\fB\|\.npmignore\fP file to list out the globs to ignore, or publish +from a fresh checkout\. +.SH Brag about it +.P +Send emails, write blogs, blab in IRC\. +.P +Tell the world how easy it is to install your program! +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 faq +.IP \(bu 2 +npm help npm +.IP \(bu 2 +npm help init +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help adduser +.IP \(bu 2 +npm help 7 registry + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-disputes.7 b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-disputes.7 new file mode 100644 index 00000000..52dfcda4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-disputes.7 @@ -0,0 +1,124 @@ +.TH "NPM\-DISPUTES" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-disputes\fR \- Handling Module Name Disputes +.SH SYNOPSIS +.RS 0 +.IP 1. 3 +Get the author email with \fBnpm owner ls \fP +.IP 2. 3 +Email the author, CC support@npmjs\.com +.IP 3. 3 +After a few weeks, if there's no resolution, we'll sort it out\. + +.RE +.P +Don't squat on package names\. Publish code or move out of the way\. +.SH DESCRIPTION +.P +There sometimes arise cases where a user publishes a module, and then +later, some other user wants to use that name\. Here are some common +ways that happens (each of these is based on actual events\.) +.RS 0 +.IP 1. 3 +Joe writes a JavaScript module \fBfoo\fP, which is not node\-specific\. +Joe doesn't use node at all\. Bob wants to use \fBfoo\fP in node, so he +wraps it in an npm module\. Some time later, Joe starts using node, +and wants to take over management of his program\. +.IP 2. 3 +Bob writes an npm module \fBfoo\fP, and publishes it\. Perhaps much +later, Joe finds a bug in \fBfoo\fP, and fixes it\. He sends a pull +request to Bob, but Bob doesn't have the time to deal with it, +because he has a new job and a new baby and is focused on his new +erlang project, and kind of not involved with node any more\. Joe +would like to publish a new \fBfoo\fP, but can't, because the name is +taken\. +.IP 3. 3 +Bob writes a 10\-line flow\-control library, and calls it \fBfoo\fP, and +publishes it to the npm registry\. Being a simple little thing, it +never really has to be updated\. Joe works for Foo Inc, the makers +of the critically acclaimed and widely\-marketed \fBfoo\fP JavaScript +toolkit framework\. They publish it to npm as \fBfoojs\fP, but people are +routinely confused when \fBnpm install foo\fP is some different thing\. +.IP 4. 3 +Bob writes a parser for the widely\-known \fBfoo\fP file format, because +he needs it for work\. Then, he gets a new job, and never updates the +prototype\. Later on, Joe writes a much more complete \fBfoo\fP parser, +but can't publish, because Bob's \fBfoo\fP is in the way\. + +.RE +.P +The validity of Joe's claim in each situation can be debated\. However, +Joe's appropriate course of action in each case is the same\. +.RS 0 +.IP 1. 3 +\fBnpm owner ls foo\fP\|\. This will tell Joe the email address of the +owner (Bob)\. +.IP 2. 3 +Joe emails Bob, explaining the situation \fBas respectfully as +possible\fR, and what he would like to do with the module name\. He +adds the npm support staff support@npmjs\.com to the CC list of +the email\. Mention in the email that Bob can run \fBnpm owner add +joe foo\fP to add Joe as an owner of the \fBfoo\fP package\. +.IP 3. 3 +After a reasonable amount of time, if Bob has not responded, or if +Bob and Joe can't come to any sort of resolution, email support +support@npmjs\.com and we'll sort it out\. ("Reasonable" is +usually at least 4 weeks, but extra time is allowed around common +holidays\.) + +.RE +.SH REASONING +.P +In almost every case so far, the parties involved have been able to reach +an amicable resolution without any major intervention\. Most people +really do want to be reasonable, and are probably not even aware that +they're in your way\. +.P +Module ecosystems are most vibrant and powerful when they are as +self\-directed as possible\. If an admin one day deletes something you +had worked on, then that is going to make most people quite upset, +regardless of the justification\. When humans solve their problems by +talking to other humans with respect, everyone has the chance to end up +feeling good about the interaction\. +.SH EXCEPTIONS +.P +Some things are not allowed, and will be removed without discussion if +they are brought to the attention of the npm registry admins, including +but not limited to: +.RS 0 +.IP 1. 3 +Malware (that is, a package designed to exploit or harm the machine on +which it is installed)\. +.IP 2. 3 +Violations of copyright or licenses (for example, cloning an +MIT\-licensed program, and then removing or changing the copyright and +license statement)\. +.IP 3. 3 +Illegal content\. +.IP 4. 3 +"Squatting" on a package name that you \fIplan\fR to use, but aren't +actually using\. Sorry, I don't care how great the name is, or how +perfect a fit it is for the thing that someday might happen\. If +someone wants to use it today, and you're just taking up space with +an empty tarball, you're going to be evicted\. +.IP 5. 3 +Putting empty packages in the registry\. Packages must have SOME +functionality\. It can be silly, but it can't be \fInothing\fR\|\. (See +also: squatting\.) +.IP 6. 3 +Doing weird things with the registry, like using it as your own +personal application database or otherwise putting non\-packagey +things into it\. + +.RE +.P +If you see bad behavior like this, please report it right away\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 registry +.IP \(bu 2 +npm help owner + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-index.7 b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-index.7 new file mode 100644 index 00000000..6d08e163 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-index.7 @@ -0,0 +1,334 @@ +.TH "NPM\-INDEX" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-index\fR \- Index of all npm documentation +.SS npm help README +.P +a JavaScript package manager +.SH Command Line Documentation +.P +Using npm on the command line +.SS npm help npm +.P +javascript package manager +.SS npm help access +.P +Set access level on published packages +.SS npm help adduser +.P +Add a registry user account +.SS npm help bin +.P +Display npm bin folder +.SS npm help bugs +.P +Bugs for a package in a web browser maybe +.SS npm help build +.P +Build a package +.SS npm help bundle +.P +REMOVED +.SS npm help cache +.P +Manipulates packages cache +.SS npm help completion +.P +Tab Completion for npm +.SS npm help config +.P +Manage the npm configuration files +.SS npm help dedupe +.P +Reduce duplication +.SS npm help deprecate +.P +Deprecate a version of a package +.SS npm help dist\-tag +.P +Modify package distribution tags +.SS npm help docs +.P +Docs for a package in a web browser maybe +.SS npm help edit +.P +Edit an installed package +.SS npm help explore +.P +Browse an installed package +.SS npm help help\-search +.P +Search npm help documentation +.SS npm help help +.P +Get help on npm +.SS npm help init +.P +Interactively create a package\.json file +.SS npm help install +.P +Install a package +.SS npm help link +.P +Symlink a package folder +.SS npm help logout +.P +Log out of the registry +.SS npm help ls +.P +List installed packages +.SS npm help outdated +.P +Check for outdated packages +.SS npm help owner +.P +Manage package owners +.SS npm help pack +.P +Create a tarball from a package +.SS npm help ping +.P +Ping npm registry +.SS npm help prefix +.P +Display prefix +.SS npm help prune +.P +Remove extraneous packages +.SS npm help publish +.P +Publish a package +.SS npm help rebuild +.P +Rebuild a package +.SS npm help repo +.P +Open package repository page in the browser +.SS npm help restart +.P +Restart a package +.SS npm help rm +.P +Remove a package +.SS npm help root +.P +Display npm root +.SS npm help run\-script +.P +Run arbitrary package scripts +.SS npm help search +.P +Search for packages +.SS npm help shrinkwrap +.P +Lock down dependency versions +.SS npm help star +.P +Mark your favorite packages +.SS npm help stars +.P +View packages marked as favorites +.SS npm help start +.P +Start a package +.SS npm help stop +.P +Stop a package +.SS npm help tag +.P +Tag a published version +.SS npm help team +.P +Manage organization teams and team memberships +.SS npm help test +.P +Test a package +.SS npm help uninstall +.P +Remove a package +.SS npm help unpublish +.P +Remove a package from the registry +.SS npm help update +.P +Update a package +.SS npm help version +.P +Bump a package version +.SS npm help view +.P +View registry info +.SS npm help whoami +.P +Display npm username +.SH API Documentation +.P +Using npm in your Node programs +.SS npm apihelp npm +.P +javascript package manager +.SS npm apihelp bin +.P +Display npm bin folder +.SS npm apihelp bugs +.P +Bugs for a package in a web browser maybe +.SS npm apihelp cache +.P +manage the npm cache programmatically +.SS npm apihelp commands +.P +npm commands +.SS npm apihelp config +.P +Manage the npm configuration files +.SS npm apihelp deprecate +.P +Deprecate a version of a package +.SS npm apihelp docs +.P +Docs for a package in a web browser maybe +.SS npm apihelp edit +.P +Edit an installed package +.SS npm apihelp explore +.P +Browse an installed package +.SS npm apihelp help\-search +.P +Search the help pages +.SS npm apihelp init +.P +Interactively create a package\.json file +.SS npm apihelp install +.P +install a package programmatically +.SS npm apihelp link +.P +Symlink a package folder +.SS npm apihelp load +.P +Load config settings +.SS npm apihelp ls +.P +List installed packages +.SS npm apihelp outdated +.P +Check for outdated packages +.SS npm apihelp owner +.P +Manage package owners +.SS npm apihelp pack +.P +Create a tarball from a package +.SS npm apihelp ping +.P +Ping npm registry +.SS npm apihelp prefix +.P +Display prefix +.SS npm apihelp prune +.P +Remove extraneous packages +.SS npm apihelp publish +.P +Publish a package +.SS npm apihelp rebuild +.P +Rebuild a package +.SS npm apihelp repo +.P +Open package repository page in the browser +.SS npm apihelp restart +.P +Restart a package +.SS npm apihelp root +.P +Display npm root +.SS npm apihelp run\-script +.P +Run arbitrary package scripts +.SS npm apihelp search +.P +Search for packages +.SS npm apihelp shrinkwrap +.P +programmatically generate package shrinkwrap file +.SS npm apihelp start +.P +Start a package +.SS npm apihelp stop +.P +Stop a package +.SS npm apihelp tag +.P +Tag a published version +.SS npm apihelp test +.P +Test a package +.SS npm apihelp uninstall +.P +uninstall a package programmatically +.SS npm apihelp unpublish +.P +Remove a package from the registry +.SS npm apihelp update +.P +Update a package +.SS npm apihelp version +.P +Bump a package version +.SS npm apihelp view +.P +View registry info +.SS npm apihelp whoami +.P +Display npm username +.SH Files +.P +File system structures npm uses +.SS npm help 5 folders +.P +Folder Structures Used by npm +.SS npm help 5 npmrc +.P +The npm config files +.SS npm help 5 package\.json +.P +Specifics of npm's package\.json handling +.SH Misc +.P +Various other bits and bobs +.SS npm help 7 coding\-style +.P +npm's "funny" coding style +.SS npm help 7 config +.P +More than you probably want to know about npm configuration +.SS npm help 7 developers +.P +Developer Guide +.SS npm help 7 disputes +.P +Handling Module Name Disputes +.SS npm help 7 index +.P +Index of all npm documentation +.SS npm help 7 orgs +.P +Working with Teams & Orgs +.SS npm help 7 registry +.P +The JavaScript Package Registry +.SS npm help 7 scope +.P +Scoped packages +.SS npm help 7 scripts +.P +How npm handles the "scripts" field +.SS npm help 7 removing\-npm +.P +Cleaning the Slate +.SS npm help 7 semver +.P +The semantic versioner for npm + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-orgs.7 b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-orgs.7 new file mode 100644 index 00000000..cfecdf24 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-orgs.7 @@ -0,0 +1,146 @@ +.TH "NPM\-ORGS" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-orgs\fR \- Working with Teams & Orgs +.SH DESCRIPTION +.P +There are three levels of org users: +.RS 0 +.IP 1. 3 +Super admin, controls billing & adding people to the org\. +.IP 2. 3 +Team admin, manages team membership & package access\. +.IP 3. 3 +Developer, works on packages they are given access to\. + +.RE +.P +The super admin is the only person who can add users to the org because it impacts the monthly bill\. The super admin will use the website to manage membership\. Every org has a \fBdevelopers\fP team that all users are automatically added to\. +.P +The team admin is the person who manages team creation, team membership, and package access for teams\. The team admin grants package access to teams, not individuals\. +.P +The developer will be able to access packages based on the teams they are on\. Access is either read\-write or read\-only\. +.P +There are two main commands: +.RS 0 +.IP 1. 3 +\fBnpm team\fP see npm help access for more details +.IP 2. 3 +\fBnpm access\fP see npm help team for more details + +.RE +.SH Team Admins create teams +.RS 0 +.IP \(bu 2 +Check who you’ve added to your org: + +.RE +.P +.RS 2 +.nf +npm team ls :developers +.fi +.RE +.RS 0 +.IP \(bu 2 +Each org is automatically given a \fBdevelopers\fP team, so you can see the whole list of team members in your org\. This team automatically gets read\-write access to all packages, but you can change that with the \fBaccess\fP command\. +.IP \(bu 2 +Create a new team: + +.RE +.P +.RS 2 +.nf +npm team create +.fi +.RE +.RS 0 +.IP \(bu 2 +Add members to that team: + +.RE +.P +.RS 2 +.nf +npm team add +.fi +.RE +.SH Publish a package and adjust package access +.RS 0 +.IP \(bu 2 +In package directory, run + +.RE +.P +.RS 2 +.nf +npm init \-\-scope= +.fi +.RE +.P +to scope it for your org & publish as usual +.RS 0 +.IP \(bu 2 +Grant access: + +.RE +.P +.RS 2 +.nf +npm access grant [] +.fi +.RE +.RS 0 +.IP \(bu 2 +Revoke access: + +.RE +.P +.RS 2 +.nf +npm access revoke [] +.fi +.RE +.SH Monitor your package access +.RS 0 +.IP \(bu 2 +See what org packages a team member can access: + +.RE +.P +.RS 2 +.nf +npm access ls\-packages +.fi +.RE +.RS 0 +.IP \(bu 2 +See packages available to a specific team: + +.RE +.P +.RS 2 +.nf +npm access ls\-packages +.fi +.RE +.RS 0 +.IP \(bu 2 +Check which teams are collaborating on a package: + +.RE +.P +.RS 2 +.nf +npm access ls\-collaborators +.fi +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help team +.IP \(bu 2 +npm help access +.IP \(bu 2 +npm help 7 scope + +.RE diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-registry.7 b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-registry.7 new file mode 100644 index 00000000..95334bc0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-registry.7 @@ -0,0 +1,71 @@ +.TH "NPM\-REGISTRY" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-registry\fR \- The JavaScript Package Registry +.SH DESCRIPTION +.P +To resolve packages by name and version, npm talks to a registry website +that implements the CommonJS Package Registry specification for reading +package info\. +.P +Additionally, npm's package registry implementation supports several +write APIs as well, to allow for publishing packages and managing user +account information\. +.P +The official public npm registry is at https://registry\.npmjs\.org/\|\. It +is powered by a CouchDB database, of which there is a public mirror at +https://skimdb\.npmjs\.com/registry\|\. The code for the couchapp is +available at https://github\.com/npm/npm\-registry\-couchapp\|\. +.P +The registry URL used is determined by the scope of the package (see +npm help 7 \fBnpm\-scope\fP)\. If no scope is specified, the default registry is used, which is +supplied by the \fBregistry\fP config parameter\. See npm help \fBnpm\-config\fP, +npm help 5 \fBnpmrc\fP, and npm help 7 \fBnpm\-config\fP for more on managing npm's configuration\. +.SH Can I run my own private registry? +.P +Yes! +.P +The easiest way is to replicate the couch database, and use the same (or +similar) design doc to implement the APIs\. +.P +If you set up continuous replication from the official CouchDB, and then +set your internal CouchDB as the registry config, then you'll be able +to read any published packages, in addition to your private ones, and by +default will only publish internally\. +.P +If you then want to publish a package for the whole world to see, you can +simply override the \fB\-\-registry\fP option for that \fBpublish\fP command\. +.SH I don't want my package published in the official registry\. It's private\. +.P +Set \fB"private": true\fP in your package\.json to prevent it from being +published at all, or +\fB"publishConfig":{"registry":"http://my\-internal\-registry\.local"}\fP +to force it to be published only to your internal registry\. +.P +See npm help 5 \fBpackage\.json\fP for more info on what goes in the package\.json file\. +.SH Will you replicate from my registry into the public one? +.P +No\. If you want things to be public, then publish them into the public +registry using npm\. What little security there is would be for nought +otherwise\. +.SH Do I have to use couchdb to build a registry that npm can talk to? +.P +No, but it's way easier\. Basically, yes, you do, or you have to +effectively implement the entire CouchDB API anyway\. +.SH Is there a website or something to see package docs and such? +.P +Yes, head over to https://npmjs\.com/ +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help config +.IP \(bu 2 +npm help 7 config +.IP \(bu 2 +npm help 5 npmrc +.IP \(bu 2 +npm help 7 developers +.IP \(bu 2 +npm help 7 disputes + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-scope.7 b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-scope.7 new file mode 100644 index 00000000..9cb5e4c0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-scope.7 @@ -0,0 +1,128 @@ +.TH "NPM\-SCOPE" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-scope\fR \- Scoped packages +.SH DESCRIPTION +.P +All npm packages have a name\. Some package names also have a scope\. A scope +follows the usual rules for package names (url\-safe characters, no leading dots +or underscores)\. When used in package names, preceded by an @\-symbol and +followed by a slash, e\.g\. +.P +.RS 2 +.nf +@somescope/somepackagename +.fi +.RE +.P +Scopes are a way of grouping related packages together, and also affect a few +things about the way npm treats the package\. +.P +Scoped packages are supported by the public npm registry\. The npm +client is backwards\-compatible with un\-scoped registries, so it can be +used to work with scoped and un\-scoped registries at the same time\. +.SH Installing scoped packages +.P +Scoped packages are installed to a sub\-folder of the regular installation +folder, e\.g\. if your other packages are installed in \fBnode_modules/packagename\fP, +scoped modules will be in \fBnode_modules/@myorg/packagename\fP\|\. The scope folder +(\fB@myorg\fP) is simply the name of the scope preceded by an @\-symbol, and can +contain any number of scoped packages\. +.P +A scoped package is installed by referencing it by name, preceded by an +@\-symbol, in \fBnpm install\fP: +.P +.RS 2 +.nf +npm install @myorg/mypackage +.fi +.RE +.P +Or in \fBpackage\.json\fP: +.P +.RS 2 +.nf +"dependencies": { + "@myorg/mypackage": "^1\.3\.0" +} +.fi +.RE +.P +Note that if the @\-symbol is omitted in either case npm will instead attempt to +install from GitHub; see npm help \fBnpm\-install\fP\|\. +.SH Requiring scoped packages +.P +Because scoped packages are installed into a scope folder, you have to +include the name of the scope when requiring them in your code, e\.g\. +.P +.RS 2 +.nf +require('@myorg/mypackage') +.fi +.RE +.P +There is nothing special about the way Node treats scope folders, this is +just specifying to require the module \fBmypackage\fP in the folder called \fB@myorg\fP\|\. +.SH Publishing scoped packages +.P +Scoped packages can be published to any registry that supports them, including +the public npm registry\. +.P +(As of 2015\-04\-19, and with npm 2\.0 or newer, the public npm registry \fBdoes\fR +support scoped packages) +.P +If you wish, you may associate a scope with a registry; see below\. +.SS Publishing public scoped packages to the public npm registry +.P +To publish a public scoped package, you must specify \fB\-\-access public\fP with +the initial publication\. This will publish the package and set access +to \fBpublic\fP as if you had run \fBnpm access public\fP after publishing\. +.SS Publishing private scoped packages to the npm registry +.P +To publish a private scoped package to the npm registry, you must have +an npm Private Modules \fIhttps://www\.npmjs\.com/private\-modules\fR +account\. +.P +You can then publish the module with \fBnpm publish\fP or \fBnpm publish +\-\-access restricted\fP, and it will be present in the npm registry, with +restricted access\. You can then change the access permissions, if +desired, with \fBnpm access\fP or on the npmjs\.com website\. +.SH Associating a scope with a registry +.P +Scopes can be associated with a separate registry\. This allows you to +seamlessly use a mix of packages from the public npm registry and one or more +private registries, such as npm Enterprise\. +.P +You can associate a scope with a registry at login, e\.g\. +.P +.RS 2 +.nf +npm login \-\-registry=http://reg\.example\.com \-\-scope=@myco +.fi +.RE +.P +Scopes have a many\-to\-one relationship with registries: one registry can +host multiple scopes, but a scope only ever points to one registry\. +.P +You can also associate a scope with a registry using \fBnpm config\fP: +.P +.RS 2 +.nf +npm config set @myco:registry http://reg\.example\.com +.fi +.RE +.P +Once a scope is associated with a registry, any \fBnpm install\fP for a package +with that scope will request packages from that registry instead\. Any +\fBnpm publish\fP for a package name that contains the scope will be published to +that registry instead\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help publish +.IP \(bu 2 +npm help access + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-scripts.7 b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-scripts.7 new file mode 100644 index 00000000..9700d594 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man7/npm-scripts.7 @@ -0,0 +1,282 @@ +.TH "NPM\-SCRIPTS" "7" "March 2016" "" "" +.SH "NAME" +\fBnpm-scripts\fR \- How npm handles the "scripts" field +.SH DESCRIPTION +.P +npm supports the "scripts" property of the package\.json script, for the +following scripts: +.RS 0 +.IP \(bu 2 +prepublish: +Run BEFORE the package is published\. (Also run on local \fBnpm +install\fP without any arguments\.) +.IP \(bu 2 +publish, postpublish: +Run AFTER the package is published\. +.IP \(bu 2 +preinstall: +Run BEFORE the package is installed +.IP \(bu 2 +install, postinstall: +Run AFTER the package is installed\. +.IP \(bu 2 +preuninstall, uninstall: +Run BEFORE the package is uninstalled\. +.IP \(bu 2 +postuninstall: +Run AFTER the package is uninstalled\. +.IP \(bu 2 +preversion, version: +Run BEFORE bump the package version\. +.IP \(bu 2 +postversion: +Run AFTER bump the package version\. +.IP \(bu 2 +pretest, test, posttest: +Run by the \fBnpm test\fP command\. +.IP \(bu 2 +prestop, stop, poststop: +Run by the \fBnpm stop\fP command\. +.IP \(bu 2 +prestart, start, poststart: +Run by the \fBnpm start\fP command\. +.IP \(bu 2 +prerestart, restart, postrestart: +Run by the \fBnpm restart\fP command\. Note: \fBnpm restart\fP will run the +stop and start scripts if no \fBrestart\fP script is provided\. + +.RE +.P +Additionally, arbitrary scripts can be executed by running \fBnpm +run\-script \fP\|\. \fIPre\fR and \fIpost\fR commands with matching +names will be run for those as well (e\.g\. \fBpremyscript\fP, \fBmyscript\fP, +\fBpostmyscript\fP)\. +.SH COMMON USES +.P +If you need to perform operations on your package before it is used, in a way +that is not dependent on the operating system or architecture of the +target system, use a \fBprepublish\fP script\. This includes +tasks such as: +.RS 0 +.IP \(bu 2 +Compiling CoffeeScript source code into JavaScript\. +.IP \(bu 2 +Creating minified versions of JavaScript source code\. +.IP \(bu 2 +Fetching remote resources that your package will use\. + +.RE +.P +The advantage of doing these things at \fBprepublish\fP time is that they can be done once, in a +single place, thus reducing complexity and variability\. +Additionally, this means that: +.RS 0 +.IP \(bu 2 +You can depend on \fBcoffee\-script\fP as a \fBdevDependency\fP, and thus +your users don't need to have it installed\. +.IP \(bu 2 +You don't need to include minifiers in your package, reducing +the size for your users\. +.IP \(bu 2 +You don't need to rely on your users having \fBcurl\fP or \fBwget\fP or +other system tools on the target machines\. + +.RE +.SH DEFAULT VALUES +.P +npm will default some script values based on package contents\. +.RS 0 +.IP \(bu 2 +\fB"start": "node server\.js"\fP: +If there is a \fBserver\.js\fP file in the root of your package, then npm +will default the \fBstart\fP command to \fBnode server\.js\fP\|\. +.IP \(bu 2 +\fB"install": "node\-gyp rebuild"\fP: +If there is a \fBbindings\.gyp\fP file in the root of your package, npm will +default the \fBinstall\fP command to compile using node\-gyp\. + +.RE +.SH USER +.P +If npm was invoked with root privileges, then it will change the uid +to the user account or uid specified by the \fBuser\fP config, which +defaults to \fBnobody\fP\|\. Set the \fBunsafe\-perm\fP flag to run scripts with +root privileges\. +.SH ENVIRONMENT +.P +Package scripts run in an environment where many pieces of information +are made available regarding the setup of npm and the current state of +the process\. +.SS path +.P +If you depend on modules that define executable scripts, like test +suites, then those executables will be added to the \fBPATH\fP for +executing the scripts\. So, if your package\.json has this: +.P +.RS 2 +.nf +{ "name" : "foo" +, "dependencies" : { "bar" : "0\.1\.x" } +, "scripts": { "start" : "bar \./test" } } +.fi +.RE +.P +then you could run \fBnpm start\fP to execute the \fBbar\fP script, which is +exported into the \fBnode_modules/\.bin\fP directory on \fBnpm install\fP\|\. +.SS package\.json vars +.P +The package\.json fields are tacked onto the \fBnpm_package_\fP prefix\. So, +for instance, if you had \fB{"name":"foo", "version":"1\.2\.5"}\fP in your +package\.json file, then your package scripts would have the +\fBnpm_package_name\fP environment variable set to "foo", and the +\fBnpm_package_version\fP set to "1\.2\.5" +.SS configuration +.P +Configuration parameters are put in the environment with the +\fBnpm_config_\fP prefix\. For instance, you can view the effective \fBroot\fP +config by checking the \fBnpm_config_root\fP environment variable\. +.SS Special: package\.json "config" object +.P +The package\.json "config" keys are overwritten in the environment if +there is a config param of \fB[@]:\fP\|\. For example, +if the package\.json has this: +.P +.RS 2 +.nf +{ "name" : "foo" +, "config" : { "port" : "8080" } +, "scripts" : { "start" : "node server\.js" } } +.fi +.RE +.P +and the server\.js is this: +.P +.RS 2 +.nf +http\.createServer(\.\.\.)\.listen(process\.env\.npm_package_config_port) +.fi +.RE +.P +then the user could change the behavior by doing: +.P +.RS 2 +.nf +npm config set foo:port 80 +.fi +.RE +.SS current lifecycle event +.P +Lastly, the \fBnpm_lifecycle_event\fP environment variable is set to +whichever stage of the cycle is being executed\. So, you could have a +single script used for different parts of the process which switches +based on what's currently happening\. +.P +Objects are flattened following this format, so if you had +\fB{"scripts":{"install":"foo\.js"}}\fP in your package\.json, then you'd +see this in the script: +.P +.RS 2 +.nf +process\.env\.npm_package_scripts_install === "foo\.js" +.fi +.RE +.SH EXAMPLES +.P +For example, if your package\.json contains this: +.P +.RS 2 +.nf +{ "scripts" : + { "install" : "scripts/install\.js" + , "postinstall" : "scripts/install\.js" + , "uninstall" : "scripts/uninstall\.js" + } +} +.fi +.RE +.P +then \fBscripts/install\.js\fP will be called for the install +and post\-install stages of the lifecycle, and \fBscripts/uninstall\.js\fP +will be called when the package is uninstalled\. Since +\fBscripts/install\.js\fP is running for two different phases, it would +be wise in this case to look at the \fBnpm_lifecycle_event\fP environment +variable\. +.P +If you want to run a make command, you can do so\. This works just +fine: +.P +.RS 2 +.nf +{ "scripts" : + { "preinstall" : "\./configure" + , "install" : "make && make install" + , "test" : "make test" + } +} +.fi +.RE +.SH EXITING +.P +Scripts are run by passing the line as a script argument to \fBsh\fP\|\. +.P +If the script exits with a code other than 0, then this will abort the +process\. +.P +Note that these script files don't have to be nodejs or even +javascript programs\. They just have to be some kind of executable +file\. +.SH HOOK SCRIPTS +.P +If you want to run a specific script at a specific lifecycle event for +ALL packages, then you can use a hook script\. +.P +Place an executable file at \fBnode_modules/\.hooks/{eventname}\fP, and +it'll get run for all packages when they are going through that point +in the package lifecycle for any packages installed in that root\. +.P +Hook scripts are run exactly the same way as package\.json scripts\. +That is, they are in a separate child process, with the env described +above\. +.SH BEST PRACTICES +.RS 0 +.IP \(bu 2 +Don't exit with a non\-zero error code unless you \fIreally\fR mean it\. +Except for uninstall scripts, this will cause the npm action to +fail, and potentially be rolled back\. If the failure is minor or +only will prevent some optional features, then it's better to just +print a warning and exit successfully\. +.IP \(bu 2 +Try not to use scripts to do what npm can do for you\. Read through +npm help 5 \fBpackage\.json\fP to see all the things that you can specify and enable +by simply describing your package appropriately\. In general, this +will lead to a more robust and consistent state\. +.IP \(bu 2 +Inspect the env to determine where to put things\. For instance, if +the \fBnpm_config_binroot\fP environment variable is set to \fB/home/user/bin\fP, then +don't try to install executables into \fB/usr/local/bin\fP\|\. The user +probably set it up that way for a reason\. +.IP \(bu 2 +Don't prefix your script commands with "sudo"\. If root permissions +are required for some reason, then it'll fail with that error, and +the user will sudo the npm command in question\. +.IP \(bu 2 +Don't use \fBinstall\fP\|\. Use a \fB\|\.gyp\fP file for compilation, and \fBprepublish\fP +for anything else\. You should almost never have to explicitly set a +preinstall or install script\. If you are doing this, please consider if +there is another option\. The only valid use of \fBinstall\fP or \fBpreinstall\fP +scripts is for compilation which must be done on the target architecture\. + +.RE +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 5 package\.json +.IP \(bu 2 +npm help 7 developers +.IP \(bu 2 +npm help install + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man7/removing-npm.7 b/bin/nodejs0.12.16/node_modules/npm/man/man7/removing-npm.7 new file mode 100644 index 00000000..7d74be85 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man7/removing-npm.7 @@ -0,0 +1,78 @@ +.TH "NPM\-REMOVAL" "1" "March 2016" "" "" +.SH "NAME" +\fBnpm-removal\fR \- Cleaning the Slate +.SH SYNOPSIS +.P +So sad to see you go\. +.P +.RS 2 +.nf +sudo npm uninstall npm \-g +.fi +.RE +.P +Or, if that fails, get the npm source code, and do: +.P +.RS 2 +.nf +sudo make uninstall +.fi +.RE +.SH More Severe Uninstalling +.P +Usually, the above instructions are sufficient\. That will remove +npm, but leave behind anything you've installed\. +.P +If that doesn't work, or if you require more drastic measures, +continue reading\. +.P +Note that this is only necessary for globally\-installed packages\. Local +installs are completely contained within a project's \fBnode_modules\fP +folder\. Delete that folder, and everything is gone (unless a package's +install script is particularly ill\-behaved)\. +.P +This assumes that you installed node and npm in the default place\. If +you configured node with a different \fB\-\-prefix\fP, or installed npm with a +different prefix setting, then adjust the paths accordingly, replacing +\fB/usr/local\fP with your install prefix\. +.P +To remove everything npm\-related manually: +.P +.RS 2 +.nf +rm \-rf /usr/local/{lib/node{,/\.npm,_modules},bin,share/man}/npm* +.fi +.RE +.P +If you installed things \fIwith\fR npm, then your best bet is to uninstall +them with npm first, and then install them again once you have a +proper install\. This can help find any symlinks that are lying +around: +.P +.RS 2 +.nf +ls \-laF /usr/local/{lib/node{,/\.npm},bin,share/man} | grep npm +.fi +.RE +.P +Prior to version 0\.3, npm used shim files for executables and node +modules\. To track those down, you can do the following: +.P +.RS 2 +.nf +find /usr/local/{lib/node,bin} \-exec grep \-l npm \\{\\} \\; ; +.fi +.RE +.P +(This is also in the README file\.) +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +README +.IP \(bu 2 +npm help uninstall +.IP \(bu 2 +npm help prune + +.RE + diff --git a/bin/nodejs0.12.16/node_modules/npm/man/man7/semver.7 b/bin/nodejs0.12.16/node_modules/npm/man/man7/semver.7 new file mode 100644 index 00000000..10a02421 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/man/man7/semver.7 @@ -0,0 +1,414 @@ +.TH "SEMVER" "7" "March 2016" "" "" +.SH "NAME" +\fBsemver\fR \- The semantic versioner for npm +.SH Usage +.P +.RS 2 +.nf +$ npm install semver + +semver\.valid('1\.2\.3') // '1\.2\.3' +semver\.valid('a\.b\.c') // null +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 +.fi +.RE +.P +As a command\-line utility: +.P +.RS 2 +.nf +$ semver \-h + +Usage: semver [ [\.\.\.]] [\-r | \-i | \-\-preid | \-l | \-rv] +Test if version(s) satisfy the supplied range(s), and sort them\. + +Multiple versions or ranges may be supplied, unless increment +option is specified\. In that case, only a single version may +be used, and it is incremented by the specified level + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions\. + +If no versions are valid, or ranges are not satisfied, +then exits failure\. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them\. +.fi +.RE +.SH Versions +.P +A "version" is described by the \fBv2\.0\.0\fP specification found at +http://semver\.org/\|\. +.P +A leading \fB"="\fP or \fB"v"\fP character is stripped off and ignored\. +.SH Ranges +.P +A \fBversion range\fP is a set of \fBcomparators\fP which specify versions +that satisfy the range\. +.P +A \fBcomparator\fP is composed of an \fBoperator\fP and a \fBversion\fP\|\. The set +of primitive \fBoperators\fP is: +.RS 0 +.IP \(bu 2 +\fB<\fP Less than +.IP \(bu 2 +\fB<=\fP Less than or equal to +.IP \(bu 2 +\fB>\fP Greater than +.IP \(bu 2 +\fB>=\fP Greater than or equal to +.IP \(bu 2 +\fB=\fP Equal\. If no operator is specified, then equality is assumed, +so this operator is optional, but MAY be included\. + +.RE +.P +For example, the comparator \fB>=1\.2\.7\fP would match the versions +\fB1\.2\.7\fP, \fB1\.2\.8\fP, \fB2\.5\.3\fP, and \fB1\.3\.9\fP, but not the versions \fB1\.2\.6\fP +or \fB1\.1\.0\fP\|\. +.P +Comparators can be joined by whitespace to form a \fBcomparator set\fP, +which is satisfied by the \fBintersection\fR of all of the comparators +it includes\. +.P +A range is composed of one or more comparator sets, joined by \fB||\fP\|\. A +version matches a range if and only if every comparator in at least +one of the \fB||\fP\-separated comparator sets is satisfied by the version\. +.P +For example, the range \fB>=1\.2\.7 <1\.3\.0\fP would match the versions +\fB1\.2\.7\fP, \fB1\.2\.8\fP, and \fB1\.2\.99\fP, but not the versions \fB1\.2\.6\fP, \fB1\.3\.0\fP, +or \fB1\.1\.0\fP\|\. +.P +The range \fB1\.2\.7 || >=1\.2\.9 <2\.0\.0\fP would match the versions \fB1\.2\.7\fP, +\fB1\.2\.9\fP, and \fB1\.4\.6\fP, but not the versions \fB1\.2\.8\fP or \fB2\.0\.0\fP\|\. +.SS Prerelease Tags +.P +If a version has a prerelease tag (for example, \fB1\.2\.3\-alpha\.3\fP) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same \fB[major, minor, patch]\fP tuple also has a +prerelease tag\. +.P +For example, the range \fB>1\.2\.3\-alpha\.3\fP would be allowed to match the +version \fB1\.2\.3\-alpha\.7\fP, but it would \fInot\fR be satisfied by +\fB3\.4\.5\-alpha\.9\fP, even though \fB3\.4\.5\-alpha\.9\fP is technically "greater +than" \fB1\.2\.3\-alpha\.3\fP according to the SemVer sort rules\. The version +range only accepts prerelease tags on the \fB1\.2\.3\fP version\. The +version \fB3\.4\.5\fP \fIwould\fR satisfy the range, because it does not have a +prerelease flag, and \fB3\.4\.5\fP is greater than \fB1\.2\.3\-alpha\.7\fP\|\. +.P +The purpose for this behavior is twofold\. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption\. +Therefore, by default, they are excluded from range matching +semantics\. +.P +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use \fIthat specific\fR set of +alpha/beta/rc versions\. By including a prerelease tag in the range, +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 \fInext\fR set of prerelease versions\. +.SS Prerelease Identifiers +.P +The method \fB\|\.inc\fP takes an additional \fBidentifier\fP string argument that +will append the value of the string as a prerelease identifier: +.P +.RS 2 +.nf +> semver\.inc('1\.2\.3', 'prerelease', 'beta') +\|'1\.2\.4\-beta\.0' +.fi +.RE +.P +command\-line example: +.P +.RS 2 +.nf +$ semver 1\.2\.3 \-i prerelease \-\-preid beta +1\.2\.4\-beta\.0 +.fi +.RE +.P +Which then can be used to increment further: +.P +.RS 2 +.nf +$ semver 1\.2\.4\-beta\.0 \-i prerelease +1\.2\.4\-beta\.1 +.fi +.RE +.SS Advanced Range Syntax +.P +Advanced range syntax desugars to primitive comparators in +deterministic ways\. +.P +Advanced ranges may be combined in the same way as primitive +comparators using white space or \fB||\fP\|\. +.SS Hyphen Ranges \fBX\.Y\.Z \- A\.B\.C\fP +.P +Specifies an inclusive set\. +.RS 0 +.IP \(bu 2 +\fB1\.2\.3 \- 2\.3\.4\fP := \fB>=1\.2\.3 <=2\.3\.4\fP + +.RE +.P +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes\. +.RS 0 +.IP \(bu 2 +\fB1\.2 \- 2\.3\.4\fP := \fB>=1\.2\.0 <=2\.3\.4\fP + +.RE +.P +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts\. +.RS 0 +.IP \(bu 2 +\fB1\.2\.3 \- 2\.3\fP := \fB>=1\.2\.3 <2\.4\.0\fP +.IP \(bu 2 +\fB1\.2\.3 \- 2\fP := \fB>=1\.2\.3 <3\.0\.0\fP + +.RE +.SS X\-Ranges \fB1\.2\.x\fP \fB1\.X\fP \fB1\.2\.*\fP \fB*\fP +.P +Any of \fBX\fP, \fBx\fP, or \fB*\fP may be used to "stand in" for one of the +numeric values in the \fB[major, minor, patch]\fP tuple\. +.RS 0 +.IP \(bu 2 +\fB*\fP := \fB>=0\.0\.0\fP (Any version satisfies) +.IP \(bu 2 +\fB1\.x\fP := \fB>=1\.0\.0 <2\.0\.0\fP (Matching major version) +.IP \(bu 2 +\fB1\.2\.x\fP := \fB>=1\.2\.0 <1\.3\.0\fP (Matching major and minor versions) + +.RE +.P +A partial version range is treated as an X\-Range, so the special +character is in fact optional\. +.RS 0 +.IP \(bu 2 +\fB""\fP (empty string) := \fB*\fP := \fB>=0\.0\.0\fP +.IP \(bu 2 +\fB1\fP := \fB1\.x\.x\fP := \fB>=1\.0\.0 <2\.0\.0\fP +.IP \(bu 2 +\fB1\.2\fP := \fB1\.2\.x\fP := \fB>=1\.2\.0 <1\.3\.0\fP + +.RE +.SS Tilde Ranges \fB~1\.2\.3\fP \fB~1\.2\fP \fB~1\fP +.P +Allows patch\-level changes if a minor version is specified on the +comparator\. Allows minor\-level changes if not\. +.RS 0 +.IP \(bu 2 +\fB~1\.2\.3\fP := \fB>=1\.2\.3 <1\.(2+1)\.0\fP := \fB>=1\.2\.3 <1\.3\.0\fP +.IP \(bu 2 +\fB~1\.2\fP := \fB>=1\.2\.0 <1\.(2+1)\.0\fP := \fB>=1\.2\.0 <1\.3\.0\fP (Same as \fB1\.2\.x\fP) +.IP \(bu 2 +\fB~1\fP := \fB>=1\.0\.0 <(1+1)\.0\.0\fP := \fB>=1\.0\.0 <2\.0\.0\fP (Same as \fB1\.x\fP) +.IP \(bu 2 +\fB~0\.2\.3\fP := \fB>=0\.2\.3 <0\.(2+1)\.0\fP := \fB>=0\.2\.3 <0\.3\.0\fP +.IP \(bu 2 +\fB~0\.2\fP := \fB>=0\.2\.0 <0\.(2+1)\.0\fP := \fB>=0\.2\.0 <0\.3\.0\fP (Same as \fB0\.2\.x\fP) +.IP \(bu 2 +\fB~0\fP := \fB>=0\.0\.0 <(0+1)\.0\.0\fP := \fB>=0\.0\.0 <1\.0\.0\fP (Same as \fB0\.x\fP) +.IP \(bu 2 +\fB~1\.2\.3\-beta\.2\fP := \fB>=1\.2\.3\-beta\.2 <1\.3\.0\fP Note that prereleases in +the \fB1\.2\.3\fP version will be allowed, if they are greater than or +equal to \fBbeta\.2\fP\|\. So, \fB1\.2\.3\-beta\.4\fP would be allowed, but +\fB1\.2\.4\-beta\.2\fP would not, because it is a prerelease of a +different \fB[major, minor, patch]\fP tuple\. + +.RE +.SS Caret Ranges \fB^1\.2\.3\fP \fB^0\.2\.5\fP \fB^0\.0\.4\fP +.P +Allows changes that do not modify the left\-most non\-zero digit in the +\fB[major, minor, patch]\fP tuple\. In other words, this allows patch and +minor updates for versions \fB1\.0\.0\fP and above, patch updates for +versions \fB0\.X >=0\.1\.0\fP, and \fIno\fR updates for versions \fB0\.0\.X\fP\|\. +.P +Many authors treat a \fB0\.x\fP version as if the \fBx\fP were the major +"breaking\-change" indicator\. +.P +Caret ranges are ideal when an author may make breaking changes +between \fB0\.2\.4\fP and \fB0\.3\.0\fP releases, which is a common practice\. +However, it presumes that there will \fInot\fR be breaking changes between +\fB0\.2\.4\fP and \fB0\.2\.5\fP\|\. It allows for changes that are presumed to be +additive (but non\-breaking), according to commonly observed practices\. +.RS 0 +.IP \(bu 2 +\fB^1\.2\.3\fP := \fB>=1\.2\.3 <2\.0\.0\fP +.IP \(bu 2 +\fB^0\.2\.3\fP := \fB>=0\.2\.3 <0\.3\.0\fP +.IP \(bu 2 +\fB^0\.0\.3\fP := \fB>=0\.0\.3 <0\.0\.4\fP +.IP \(bu 2 +\fB^1\.2\.3\-beta\.2\fP := \fB>=1\.2\.3\-beta\.2 <2\.0\.0\fP Note that prereleases in +the \fB1\.2\.3\fP version will be allowed, if they are greater than or +equal to \fBbeta\.2\fP\|\. So, \fB1\.2\.3\-beta\.4\fP would be allowed, but +\fB1\.2\.4\-beta\.2\fP would not, because it is a prerelease of a +different \fB[major, minor, patch]\fP tuple\. +.IP \(bu 2 +\fB^0\.0\.3\-beta\fP := \fB>=0\.0\.3\-beta <0\.0\.4\fP Note that prereleases in the +\fB0\.0\.3\fP version \fIonly\fR will be allowed, if they are greater than or +equal to \fBbeta\fP\|\. So, \fB0\.0\.3\-pr\.2\fP would be allowed\. + +.RE +.P +When parsing caret ranges, a missing \fBpatch\fP value desugars to the +number \fB0\fP, but will allow flexibility within that value, even if the +major and minor versions are both \fB0\fP\|\. +.RS 0 +.IP \(bu 2 +\fB^1\.2\.x\fP := \fB>=1\.2\.0 <2\.0\.0\fP +.IP \(bu 2 +\fB^0\.0\.x\fP := \fB>=0\.0\.0 <0\.1\.0\fP +.IP \(bu 2 +\fB^0\.0\fP := \fB>=0\.0\.0 <0\.1\.0\fP + +.RE +.P +A missing \fBminor\fP and \fBpatch\fP values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero\. +.RS 0 +.IP \(bu 2 +\fB^1\.x\fP := \fB>=1\.0\.0 <2\.0\.0\fP +.IP \(bu 2 +\fB^0\.x\fP := \fB>=0\.0\.0 <1\.0\.0\fP + +.RE +.SS Range Grammar +.P +Putting all this together, here is a Backus\-Naur grammar for ranges, +for the benefit of parser authors: +.P +.RS 2 +.nf +range\-set ::= range ( logical\-or range ) * +logical\-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' \- ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '\.' xr ( '\.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'\-'9']['0'\-'9']+ +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '\-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '\.' part ) * +part ::= nr | [\-0\-9A\-Za\-z]+ +.fi +.RE +.SH Functions +.P +All methods and classes take a final \fBloose\fP boolean argument that, if +true, will be more forgiving about not\-quite\-valid semver strings\. +The resulting output will always be 100% strict, of course\. +.P +Strict\-mode Comparators and Ranges will be strict about the SemVer +strings that they parse\. +.RS 0 +.IP \(bu 2 +\fBvalid(v)\fP: Return the parsed version, or null if it's not valid\. +.IP \(bu 2 +\fBinc(v, release)\fP: Return the version incremented by the release +type (\fBmajor\fP, \fBpremajor\fP, \fBminor\fP, \fBpreminor\fP, \fBpatch\fP, +\fBprepatch\fP, or \fBprerelease\fP), or null if it's not valid +.RS 0 +.IP \(bu 2 +\fBpremajor\fP in one call will bump the version up to the next major +version and down to a prerelease of that major version\. +\fBpreminor\fP, and \fBprepatch\fP work the same way\. +.IP \(bu 2 +If called from a non\-prerelease version, the \fBprerelease\fP will work the +same as \fBprepatch\fP\|\. It increments the patch version, then makes a +prerelease\. If the input version is already a prerelease it simply +increments it\. + +.RE +.IP \(bu 2 +\fBmajor(v)\fP: Return the major version number\. +.IP \(bu 2 +\fBminor(v)\fP: Return the minor version number\. +.IP \(bu 2 +\fBpatch(v)\fP: Return the patch version number\. + +.RE +.SS Comparison +.RS 0 +.IP \(bu 2 +\fBgt(v1, v2)\fP: \fBv1 > v2\fP +.IP \(bu 2 +\fBgte(v1, v2)\fP: \fBv1 >= v2\fP +.IP \(bu 2 +\fBlt(v1, v2)\fP: \fBv1 < v2\fP +.IP \(bu 2 +\fBlte(v1, v2)\fP: \fBv1 <= v2\fP +.IP \(bu 2 +\fBeq(v1, v2)\fP: \fBv1 == v2\fP This is true if they're logically equivalent, +even if they're not the exact same string\. You already know how to +compare strings\. +.IP \(bu 2 +\fBneq(v1, v2)\fP: \fBv1 != v2\fP The opposite of \fBeq\fP\|\. +.IP \(bu 2 +\fBcmp(v1, comparator, v2)\fP: Pass in a comparison string, and it'll call +the corresponding function above\. \fB"==="\fP and \fB"!=="\fP do simple +string comparison, but are included for completeness\. Throws if an +invalid comparison string is provided\. +.IP \(bu 2 +\fBcompare(v1, v2)\fP: Return \fB0\fP if \fBv1 == v2\fP, or \fB1\fP if \fBv1\fP is greater, or \fB\-1\fP if +\fBv2\fP is greater\. Sorts in ascending order if passed to \fBArray\.sort()\fP\|\. +.IP \(bu 2 +\fBrcompare(v1, v2)\fP: The reverse of compare\. Sorts an array of versions +in descending order when passed to \fBArray\.sort()\fP\|\. +.IP \(bu 2 +\fBdiff(v1, v2)\fP: Returns difference between two versions by the release type +(\fBmajor\fP, \fBpremajor\fP, \fBminor\fP, \fBpreminor\fP, \fBpatch\fP, \fBprepatch\fP, or \fBprerelease\fP), +or null if the versions are the same\. + +.RE +.SS Ranges +.RS 0 +.IP \(bu 2 +\fBvalidRange(range)\fP: Return the valid range or null if it's not valid +.IP \(bu 2 +\fBsatisfies(version, range)\fP: Return true if the version satisfies the +range\. +.IP \(bu 2 +\fBmaxSatisfying(versions, range)\fP: Return the highest version in the list +that satisfies the range, or \fBnull\fP if none of them do\. +.IP \(bu 2 +\fBgtr(version, range)\fP: Return \fBtrue\fP if version is greater than all the +versions possible in the range\. +.IP \(bu 2 +\fBltr(version, range)\fP: Return \fBtrue\fP if version is less than all the +versions possible in the range\. +.IP \(bu 2 +\fBoutside(version, range, hilo)\fP: Return true if the version is outside +the bounds of the range in either the high or low direction\. The +\fBhilo\fP argument must be either the string \fB\|'>'\fP or \fB\|'<'\fP\|\. (This is +the function called by \fBgtr\fP and \fBltr\fP\|\.) + +.RE +.P +Note that, since ranges may be non\-contiguous, a version might not be +greater than a range, less than a range, \fIor\fR satisfy a range! For +example, the range \fB1\.2 <1\.2\.9 || >2\.0\.0\fP would have a hole from \fB1\.2\.9\fP +until \fB2\.0\.0\fP, so the version \fB1\.2\.10\fP would not be greater than the +range (because \fB2\.0\.1\fP satisfies, which is higher), nor less than the +range (since \fB1\.2\.8\fP satisfies, which is lower), and it also does not +satisfy the range\. +.P +If you want to know if a version satisfies or does not satisfy a +range, use the \fBsatisfies(version, range)\fP function\. + diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/.npmignore new file mode 100644 index 00000000..056d8e62 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/.npmignore @@ -0,0 +1,4 @@ +.nyc_output +nyc_output +node_modules +coverage diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/.travis.yml new file mode 100644 index 00000000..379f2614 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - '0.10' + - '0.12' + - 'iojs' diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/CONTRIBUTING.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/CONTRIBUTING.md new file mode 100644 index 00000000..a8d1a3d1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/CONTRIBUTING.md @@ -0,0 +1,3 @@ + To get started, sign the + Contributor License Agreement. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/README.md new file mode 100644 index 00000000..7dbb6485 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/README.md @@ -0,0 +1,23 @@ +# abbrev-js + +Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). + +Usage: + + var abbrev = require("abbrev"); + abbrev("foo", "fool", "folding", "flop"); + + // returns: + { fl: 'flop' + , flo: 'flop' + , flop: 'flop' + , fol: 'folding' + , fold: 'folding' + , foldi: 'folding' + , foldin: 'folding' + , folding: 'folding' + , foo: 'foo' + , fool: 'fool' + } + +This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/abbrev.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/abbrev.js new file mode 100644 index 00000000..e64fe7dc --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/abbrev.js @@ -0,0 +1,62 @@ + +module.exports = exports = abbrev.abbrev = abbrev + +abbrev.monkeyPatch = monkeyPatch + +function monkeyPatch () { + Object.defineProperty(Array.prototype, 'abbrev', { + value: function () { return abbrev(this) }, + enumerable: false, configurable: true, writable: true + }) + + Object.defineProperty(Object.prototype, 'abbrev', { + value: function () { return abbrev(Object.keys(this)) }, + enumerable: false, configurable: true, writable: true + }) +} + +function abbrev (list) { + if (arguments.length !== 1 || !Array.isArray(list)) { + list = Array.prototype.slice.call(arguments, 0) + } + for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { + args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) + } + + // sort them lexicographically, so that they're next to their nearest kin + args = args.sort(lexSort) + + // walk through each, seeing how much it has in common with the next and previous + var abbrevs = {} + , prev = "" + for (var i = 0, l = args.length ; i < l ; i ++) { + var current = args[i] + , next = args[i + 1] || "" + , nextMatches = true + , prevMatches = true + if (current === next) continue + for (var j = 0, cl = current.length ; j < cl ; j ++) { + var curChar = current.charAt(j) + nextMatches = nextMatches && curChar === next.charAt(j) + prevMatches = prevMatches && curChar === prev.charAt(j) + if (!nextMatches && !prevMatches) { + j ++ + break + } + } + prev = current + if (j === cl) { + abbrevs[current] = current + continue + } + for (var a = current.substr(0, j) ; j <= cl ; j ++) { + abbrevs[a] = current + a += current.charAt(j) + } + } + return abbrevs +} + +function lexSort (a, b) { + return a === b ? 0 : a > b ? 1 : -1 +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/package.json new file mode 100644 index 00000000..e51879a3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/package.json @@ -0,0 +1,47 @@ +{ + "name": "abbrev", + "version": "1.0.7", + "description": "Like ruby's abbrev module, but in js", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "main": "abbrev.js", + "scripts": { + "test": "tap test.js --cov" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" + }, + "license": "ISC", + "devDependencies": { + "tap": "^1.2.0" + }, + "gitHead": "821d09ce7da33627f91bbd8ed631497ed6f760c2", + "bugs": { + "url": "https://github.com/isaacs/abbrev-js/issues" + }, + "homepage": "https://github.com/isaacs/abbrev-js#readme", + "_id": "abbrev@1.0.7", + "_shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843", + "_from": "abbrev@>=1.0.7 <1.1.0", + "_npmVersion": "2.10.1", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843", + "tarball": "http://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/test.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/test.js new file mode 100644 index 00000000..f667df7a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/abbrev/test.js @@ -0,0 +1,47 @@ +var abbrev = require('./abbrev.js') +var assert = require("assert") +var util = require("util") + +console.log("TAP version 13") +var count = 0 + +function test (list, expect) { + count++ + var actual = abbrev(list) + assert.deepEqual(actual, expect, + "abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+ + "actual: "+util.inspect(actual)) + actual = abbrev.apply(exports, list) + assert.deepEqual(abbrev.apply(exports, list), expect, + "abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+ + "actual: "+util.inspect(actual)) + console.log('ok - ' + list.join(' ')) +} + +test([ "ruby", "ruby", "rules", "rules", "rules" ], +{ rub: 'ruby' +, ruby: 'ruby' +, rul: 'rules' +, rule: 'rules' +, rules: 'rules' +}) +test(["fool", "foom", "pool", "pope"], +{ fool: 'fool' +, foom: 'foom' +, poo: 'pool' +, pool: 'pool' +, pop: 'pope' +, pope: 'pope' +}) +test(["a", "ab", "abc", "abcd", "abcde", "acde"], +{ a: 'a' +, ab: 'ab' +, abc: 'abc' +, abcd: 'abcd' +, abcde: 'abcde' +, ac: 'acde' +, acd: 'acde' +, acde: 'acde' +}) + +console.log("1..%d", count) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/index.js new file mode 100644 index 00000000..cf8f4d44 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; +}; diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/license b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/license new file mode 100644 index 00000000..d70e4cd6 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/package.json new file mode 100644 index 00000000..f652d1f7 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/package.json @@ -0,0 +1,86 @@ +{ + "name": "ansi-regex", + "version": "2.0.0", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/ansi-regex.git" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha test/test.js", + "view-supported": "node test/viewCodes.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "mocha": "*" + }, + "gitHead": "57c3f2941a73079fa8b081e02a522e3d29913e2f", + "bugs": { + "url": "https://github.com/sindresorhus/ansi-regex/issues" + }, + "homepage": "https://github.com/sindresorhus/ansi-regex", + "_id": "ansi-regex@2.0.0", + "_shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107", + "_from": "ansi-regex@2.0.0", + "_npmVersion": "2.11.2", + "_nodeVersion": "0.12.5", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "dist": { + "shasum": "c5061b6e0ef8a81775e50f5d66151bf6bf371107", + "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/readme.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/readme.md new file mode 100644 index 00000000..2184036f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi-regex/readme.md @@ -0,0 +1,31 @@ +# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +var ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/.jshintrc b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/.jshintrc new file mode 100644 index 00000000..6d7a1282 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/.jshintrc @@ -0,0 +1,4 @@ +{ + "laxcomma": true, + "asi": true +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/.npmignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/History.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/History.md new file mode 100644 index 00000000..dbb509ba --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/History.md @@ -0,0 +1,23 @@ + +0.3.1 / 2016-01-14 +================== + + * add MIT LICENSE file (#23, @kasicka) + * preserve chaining after redundant style-method calls (#19, @drewblaisdell) + * package: add "license" field (#16, @BenjaminTsai) + +0.3.0 / 2014-05-09 +================== + + * package: remove "test" script and "devDependencies" + * package: remove "engines" section + * pacakge: remove "bin" section + * package: beautify + * examples: remove `starwars` example (#15) + * Documented goto, horizontalAbsolute, and eraseLine methods in README.md (#12, @Jammerwoch) + * add `.jshintrc` file + +< 0.3.0 +======= + + * Prehistoric diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/LICENSE new file mode 100644 index 00000000..142bd098 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/README.md new file mode 100644 index 00000000..bf2a1cb6 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/README.md @@ -0,0 +1,98 @@ +ansi.js +========= +### Advanced ANSI formatting tool for Node.js + +`ansi.js` is a module for Node.js that provides an easy-to-use API for +writing ANSI escape codes to `Stream` instances. ANSI escape codes are used to do +fancy things in a terminal window, like render text in colors, delete characters, +lines, the entire window, or hide and show the cursor, and lots more! + +#### Features: + + * 256 color support for the terminal! + * Make a beep sound from your terminal! + * Works with *any* writable `Stream` instance. + * Allows you to move the cursor anywhere on the terminal window. + * Allows you to delete existing contents from the terminal window. + * Allows you to hide and show the cursor. + * Converts CSS color codes and RGB values into ANSI escape codes. + * Low-level; you are in control of when escape codes are used, it's not abstracted. + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install ansi +``` + + +Example +------- + +``` js +var ansi = require('ansi') + , cursor = ansi(process.stdout) + +// You can chain your calls forever: +cursor + .red() // Set font color to red + .bg.grey() // Set background color to grey + .write('Hello World!') // Write 'Hello World!' to stdout + .bg.reset() // Reset the bgcolor before writing the trailing \n, + // to avoid Terminal glitches + .write('\n') // And a final \n to wrap things up + +// Rendering modes are persistent: +cursor.hex('#660000').bold().underline() + +// You can use the regular logging functions, text will be green: +console.log('This is blood red, bold text') + +// To reset just the foreground color: +cursor.fg.reset() + +console.log('This will still be bold') + +// to go to a location (x,y) on the console +// note: 1-indexed, not 0-indexed: +cursor.goto(10, 5).write('Five down, ten over') + +// to clear the current line: +cursor.horizontalAbsolute(0).eraseLine().write('Starting again') + +// to go to a different column on the current line: +cursor.horizontalAbsolute(5).write('column five') + +// Clean up after yourself! +cursor.reset() +``` + + +License +------- + +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/package.json new file mode 100644 index 00000000..2c7858b6 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansi/package.json @@ -0,0 +1,58 @@ +{ + "name": "ansi", + "description": "Advanced ANSI formatting tool for Node.js", + "license": "MIT", + "keywords": [ + "ansi", + "formatting", + "cursor", + "color", + "terminal", + "rgb", + "256", + "stream" + ], + "version": "0.3.1", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://tootallnate.net" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/ansi.js.git" + }, + "main": "./lib/ansi.js", + "gitHead": "4d0d4af94e0bdaa648bd7262acd3bde4b98d5246", + "bugs": { + "url": "https://github.com/TooTallNate/ansi.js/issues" + }, + "homepage": "https://github.com/TooTallNate/ansi.js#readme", + "_id": "ansi@0.3.1", + "scripts": {}, + "_shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21", + "_from": "ansi@latest", + "_npmVersion": "3.3.12", + "_nodeVersion": "5.3.0", + "_npmUser": { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + "maintainers": [ + { + "name": "TooTallNate", + "email": "nathan@tootallnate.net" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "dist": { + "shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21", + "tarball": "http://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/LICENSE new file mode 100644 index 00000000..aa9368a7 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/README.md new file mode 100644 index 00000000..10a7f9c3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/README.md @@ -0,0 +1,62 @@ +# ansicolors [![build status](https://secure.travis-ci.org/thlorenz/ansicolors.png)](http://next.travis-ci.org/thlorenz/ansicolors) + +Functions that surround a string with ansicolor codes so it prints in color. + +In case you need styles, like `bold`, have a look at [ansistyles](https://github.com/thlorenz/ansistyles). + +## Installation + + npm install ansicolors + +## Usage + +```js +var colors = require('ansicolors'); + +// foreground colors +var redHerring = colors.red('herring'); +var blueMoon = colors.blue('moon'); +var brighBlueMoon = colors.brightBlue('moon'); + +console.log(redHerring); // this will print 'herring' in red +console.log(blueMoon); // this 'moon' in blue +console.log(brightBlueMoon); // I think you got the idea + +// background colors +console.log(colors.bgYellow('printed on yellow background')); +console.log(colors.bgBrightBlue('printed on bright blue background')); + +// mixing background and foreground colors +// below two lines have same result (order in which bg and fg are combined doesn't matter) +console.log(colors.bgYellow(colors.blue('printed on yellow background in blue'))); +console.log(colors.blue(colors.bgYellow('printed on yellow background in blue'))); +``` + +## Advanced API + +**ansicolors** allows you to access opening and closing escape sequences separately. + +```js +var colors = require('ansicolors'); + +function inspect(obj, depth) { + return require('util').inspect(obj, false, depth || 5, true); +} + +console.log('open blue', inspect(colors.open.blue)); +console.log('close bgBlack', inspect(colors.close.bgBlack)); + +// => open blue '\u001b[34m' +// close bgBlack '\u001b[49m' +``` + +## Tests + +Look at the [tests](https://github.com/thlorenz/ansicolors/blob/master/test/ansicolors.js) to see more examples and/or run them via: + + npm explore ansicolors && npm test + +## Alternatives + +**ansicolors** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, +I'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js). diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/ansicolors.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/ansicolors.js new file mode 100644 index 00000000..995645f9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/ansicolors.js @@ -0,0 +1,65 @@ +// ColorCodes explained: http://www.termsys.demon.co.uk/vtansi.htm +'use strict'; + +var colorNums = { + white : 37 + , black : 30 + , blue : 34 + , cyan : 36 + , green : 32 + , magenta : 35 + , red : 31 + , yellow : 33 + , brightBlack : 90 + , brightRed : 91 + , brightGreen : 92 + , brightYellow : 93 + , brightBlue : 94 + , brightMagenta : 95 + , brightCyan : 96 + , brightWhite : 97 + } + , backgroundColorNums = { + bgBlack : 40 + , bgRed : 41 + , bgGreen : 42 + , bgYellow : 43 + , bgBlue : 44 + , bgMagenta : 45 + , bgCyan : 46 + , bgWhite : 47 + , bgBrightBlack : 100 + , bgBrightRed : 101 + , bgBrightGreen : 102 + , bgBrightYellow : 103 + , bgBrightBlue : 104 + , bgBrightMagenta : 105 + , bgBrightCyan : 106 + , bgBrightWhite : 107 + } + , open = {} + , close = {} + , colors = {} + ; + +Object.keys(colorNums).forEach(function (k) { + var o = open[k] = '\u001b[' + colorNums[k] + 'm'; + var c = close[k] = '\u001b[39m'; + + colors[k] = function (s) { + return o + s + c; + }; +}); + +Object.keys(backgroundColorNums).forEach(function (k) { + var o = open[k] = '\u001b[' + backgroundColorNums[k] + 'm'; + var c = close[k] = '\u001b[49m'; + + colors[k] = function (s) { + return o + s + c; + }; +}); + +module.exports = colors; +colors.open = open; +colors.close = close; diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/package.json new file mode 100644 index 00000000..3955b17d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansicolors/package.json @@ -0,0 +1,34 @@ +{ + "name": "ansicolors", + "version": "0.3.2", + "description": "Functions that surround a string with ansicolor codes so it prints in color.", + "main": "ansicolors.js", + "scripts": { + "test": "node test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/ansicolors.git" + }, + "keywords": [ + "ansi", + "colors", + "highlight", + "string" + ], + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "thlorenz.com" + }, + "license": "MIT", + "readmeFilename": "README.md", + "gitHead": "858847ca28e8b360d9b70eee0592700fa2ab087d", + "readme": "# ansicolors [![build status](https://secure.travis-ci.org/thlorenz/ansicolors.png)](http://next.travis-ci.org/thlorenz/ansicolors)\n\nFunctions that surround a string with ansicolor codes so it prints in color.\n\nIn case you need styles, like `bold`, have a look at [ansistyles](https://github.com/thlorenz/ansistyles).\n\n## Installation\n\n npm install ansicolors\n\n## Usage\n\n```js\nvar colors = require('ansicolors');\n\n// foreground colors\nvar redHerring = colors.red('herring');\nvar blueMoon = colors.blue('moon');\nvar brighBlueMoon = colors.brightBlue('moon');\n\nconsole.log(redHerring); // this will print 'herring' in red\nconsole.log(blueMoon); // this 'moon' in blue\nconsole.log(brightBlueMoon); // I think you got the idea\n\n// background colors\nconsole.log(colors.bgYellow('printed on yellow background'));\nconsole.log(colors.bgBrightBlue('printed on bright blue background'));\n\n// mixing background and foreground colors\n// below two lines have same result (order in which bg and fg are combined doesn't matter)\nconsole.log(colors.bgYellow(colors.blue('printed on yellow background in blue')));\nconsole.log(colors.blue(colors.bgYellow('printed on yellow background in blue')));\n```\n\n## Advanced API\n\n**ansicolors** allows you to access opening and closing escape sequences separately.\n\n```js\nvar colors = require('ansicolors');\n\nfunction inspect(obj, depth) {\n return require('util').inspect(obj, false, depth || 5, true);\n}\n\nconsole.log('open blue', inspect(colors.open.blue));\nconsole.log('close bgBlack', inspect(colors.close.bgBlack));\n\n// => open blue '\\u001b[34m'\n// close bgBlack '\\u001b[49m'\n```\n\n## Tests\n\nLook at the [tests](https://github.com/thlorenz/ansicolors/blob/master/test/ansicolors.js) to see more examples and/or run them via: \n\n npm explore ansicolors && npm test\n\n## Alternatives\n\n**ansicolors** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, \nI'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js).\n", + "bugs": { + "url": "https://github.com/thlorenz/ansicolors/issues" + }, + "homepage": "https://github.com/thlorenz/ansicolors", + "_id": "ansicolors@0.3.2", + "_from": "ansicolors@latest" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/LICENSE new file mode 100644 index 00000000..aa9368a7 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/README.md new file mode 100644 index 00000000..bf35d178 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/README.md @@ -0,0 +1,71 @@ +# ansistyles [![build status](https://secure.travis-ci.org/thlorenz/ansistyles.png)](http://next.travis-ci.org/thlorenz/ansistyles) + +Functions that surround a string with ansistyle codes so it prints in style. + +In case you need colors, like `red`, have a look at [ansicolors](https://github.com/thlorenz/ansicolors). + +## Installation + + npm install ansistyles + +## Usage + +```js +var styles = require('ansistyles'); + +console.log(styles.bright('hello world')); // prints hello world in 'bright' white +console.log(styles.underline('hello world')); // prints hello world underlined +console.log(styles.inverse('hello world')); // prints hello world black on white +``` + +## Combining with ansicolors + +Get the ansicolors module: + + npm install ansicolors + +```js +var styles = require('ansistyles') + , colors = require('ansicolors'); + + console.log( + // prints hello world underlined in blue on a green background + colors.bgGreen(colors.blue(styles.underline('hello world'))) + ); +``` + +## Tests + +Look at the [tests](https://github.com/thlorenz/ansistyles/blob/master/test/ansistyles.js) to see more examples and/or run them via: + + npm explore ansistyles && npm test + +## More Styles + +As you can see from [here](https://github.com/thlorenz/ansistyles/blob/master/ansistyles.js#L4-L15), more styles are available, +but didn't have any effect on the terminals that I tested on Mac Lion and Ubuntu Linux. + +I included them for completeness, but didn't show them in the examples because they seem to have no effect. + +### reset + +A style reset function is also included, please note however that this is not nestable. + +Therefore the below only underlines `hell` only, but not `world`. + +```js +console.log(styles.underline('hell' + styles.reset('o') + ' world')); +``` + +It is essentially the same as: + +```js +console.log(styles.underline('hell') + styles.reset('') + 'o world'); +``` + + + +## Alternatives + +**ansistyles** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, +I'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js). diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/ansistyles.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/ansistyles.js new file mode 100644 index 00000000..607332ec --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/ansistyles.js @@ -0,0 +1,38 @@ +'use strict'; + +/* + * Info: http://www.termsys.demon.co.uk/vtansi.htm#colors + * Following caveats + * bright - brightens the color (bold-blue is same as brigthtBlue) + * dim - nothing on Mac or Linux + * italic - nothing on Mac or Linux + * underline - underlines string + * blink - nothing on Mac or linux + * inverse - background becomes foreground and vice versa + * + * In summary, the only styles that work are: + * - bright, underline and inverse + * - the others are only included for completeness + */ + +var styleNums = { + reset : [0, 22] + , bright : [1, 22] + , dim : [2, 22] + , italic : [3, 23] + , underline : [4, 24] + , blink : [5, 25] + , inverse : [7, 27] + } + , styles = {} + ; + +Object.keys(styleNums).forEach(function (k) { + styles[k] = function (s) { + var open = styleNums[k][0] + , close = styleNums[k][1]; + return '\u001b[' + open + 'm' + s + '\u001b[' + close + 'm'; + }; +}); + +module.exports = styles; diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/package.json new file mode 100644 index 00000000..dd02ef7f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ansistyles/package.json @@ -0,0 +1,38 @@ +{ + "name": "ansistyles", + "version": "0.1.3", + "description": "Functions that surround a string with ansistyle codes so it prints in style.", + "main": "ansistyles.js", + "scripts": { + "test": "node test/ansistyles.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/ansistyles.git" + }, + "keywords": [ + "ansi", + "style", + "terminal", + "console" + ], + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "thlorenz.com" + }, + "license": "MIT", + "readmeFilename": "README.md", + "gitHead": "27bf1bc65231bcc7fd109bf13b13601b51f8cd04", + "readme": "# ansistyles [![build status](https://secure.travis-ci.org/thlorenz/ansistyles.png)](http://next.travis-ci.org/thlorenz/ansistyles)\n\nFunctions that surround a string with ansistyle codes so it prints in style.\n\nIn case you need colors, like `red`, have a look at [ansicolors](https://github.com/thlorenz/ansicolors).\n\n## Installation\n\n npm install ansistyles\n\n## Usage\n\n```js\nvar styles = require('ansistyles');\n\nconsole.log(styles.bright('hello world')); // prints hello world in 'bright' white\nconsole.log(styles.underline('hello world')); // prints hello world underlined\nconsole.log(styles.inverse('hello world')); // prints hello world black on white\n```\n\n## Combining with ansicolors\n\nGet the ansicolors module:\n\n npm install ansicolors\n\n```js\nvar styles = require('ansistyles')\n , colors = require('ansicolors');\n\n console.log(\n // prints hello world underlined in blue on a green background\n colors.bgGreen(colors.blue(styles.underline('hello world'))) \n );\n```\n\n## Tests\n\nLook at the [tests](https://github.com/thlorenz/ansistyles/blob/master/test/ansistyles.js) to see more examples and/or run them via: \n\n npm explore ansistyles && npm test\n\n## More Styles\n\nAs you can see from [here](https://github.com/thlorenz/ansistyles/blob/master/ansistyles.js#L4-L15), more styles are available,\nbut didn't have any effect on the terminals that I tested on Mac Lion and Ubuntu Linux.\n\nI included them for completeness, but didn't show them in the examples because they seem to have no effect.\n\n### reset\n\nA style reset function is also included, please note however that this is not nestable.\n\nTherefore the below only underlines `hell` only, but not `world`.\n\n```js\nconsole.log(styles.underline('hell' + styles.reset('o') + ' world'));\n```\n\nIt is essentially the same as:\n\n```js\nconsole.log(styles.underline('hell') + styles.reset('') + 'o world');\n```\n\n\n\n## Alternatives\n\n**ansistyles** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, \nI'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js).\n", + "bugs": { + "url": "https://github.com/thlorenz/ansistyles/issues" + }, + "homepage": "https://github.com/thlorenz/ansistyles", + "_id": "ansistyles@0.1.3", + "dist": { + "shasum": "b14f315fe763a2b3a88df9d3261a517e666c4615" + }, + "_from": "ansistyles@0.1.3", + "_resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/LICENSE new file mode 100644 index 00000000..c477f448 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/README.markdown b/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/README.markdown new file mode 100644 index 00000000..3b996b91 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/README.markdown @@ -0,0 +1,88 @@ +# archy + +Render nested hierarchies `npm ls` style with unicode pipes. + +[![browser support](http://ci.testling.com/substack/node-archy.png)](http://ci.testling.com/substack/node-archy) + +[![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy) + +# example + +``` js +var archy = require('archy'); +var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party\ntime!' + ] + } + ] +}); +console.log(s); +``` + +output + +``` +beep +├── ity +└─┬ boop + ├─┬ o_O + │ ├─┬ oh + │ │ ├── hello + │ │ └── puny + │ └── human + └── party + time! +``` + +# methods + +var archy = require('archy') + +## archy(obj, prefix='', opts={}) + +Return a string representation of `obj` with unicode pipe characters like how +`npm ls` looks. + +`obj` should be a tree of nested objects with `'label'` and `'nodes'` fields. +`'label'` is a string of text to display at a node level and `'nodes'` is an +array of the descendents of the current node. + +If a node is a string, that string will be used as the `'label'` and an empty +array of `'nodes'` will be used. + +`prefix` gets prepended to all the lines and is used by the algorithm to +recursively update. + +If `'label'` has newlines they will be indented at the present indentation level +with the current prefix. + +To disable unicode results in favor of all-ansi output set `opts.unicode` to +`false`. + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install archy +``` + +# license + +MIT diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/index.js new file mode 100644 index 00000000..039db0c5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/index.js @@ -0,0 +1,35 @@ +module.exports = function archy (obj, prefix, opts) { + if (prefix === undefined) prefix = ''; + if (!opts) opts = {}; + var chr = function (s) { + var chars = { + '│' : '|', + '└' : '`', + '├' : '+', + '─' : '-', + '┬' : '-' + }; + return opts.unicode === false ? chars[s] : s; + }; + + if (typeof obj === 'string') obj = { label : obj }; + + var nodes = obj.nodes || []; + var lines = (obj.label || '').split('\n'); + var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' '; + + return prefix + + lines.join(splitter) + '\n' + + nodes.map(function (node, ix) { + var last = ix === nodes.length - 1; + var more = node.nodes && node.nodes.length; + var prefix_ = prefix + (last ? ' ' : chr('│')) + ' '; + + return prefix + + (last ? chr('└') : chr('├')) + chr('─') + + (more ? chr('┬') : chr('─')) + ' ' + + archy(node, prefix_, opts).slice(prefix.length + 2) + ; + }).join('') + ; +}; diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/package.json new file mode 100644 index 00000000..5c4f000c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/archy/package.json @@ -0,0 +1,79 @@ +{ + "name": "archy", + "version": "1.0.0", + "description": "render nested hierarchies `npm ls` style with unicode pipes", + "main": "index.js", + "devDependencies": { + "tap": "~0.3.3", + "tape": "~0.1.1" + }, + "scripts": { + "test": "tap test" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "iexplore": [ + "6.0", + "7.0", + "8.0", + "9.0" + ], + "chrome": [ + "20.0" + ], + "firefox": [ + "10.0", + "15.0" + ], + "safari": [ + "5.1" + ], + "opera": [ + "12.0" + ] + } + }, + "repository": { + "type": "git", + "url": "http://github.com/substack/node-archy.git" + }, + "keywords": [ + "hierarchy", + "npm ls", + "unicode", + "pretty", + "print" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "gitHead": "30223c16191e877bf027b15b12daf077b9b55b84", + "bugs": { + "url": "https://github.com/substack/node-archy/issues" + }, + "homepage": "https://github.com/substack/node-archy", + "_id": "archy@1.0.0", + "_shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40", + "_from": "archy@>=1.0.0 <2.0.0", + "_npmVersion": "1.4.25", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "dist": { + "shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40", + "tarball": "http://registry.npmjs.org/archy/-/archy-1.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/.eslintrc b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/.eslintrc new file mode 100644 index 00000000..8afd0e88 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/.eslintrc @@ -0,0 +1,18 @@ +{ + "env" : { + "node" : true + }, + "rules" : { + "curly" : 0, + "no-lonely-if" : 1, + "no-mixed-requires" : 0, + "no-underscore-dangle" : 0, + "no-unused-vars" : [2, {"vars" : "all", "args" : "after-used"}], + "no-use-before-define" : [2, "nofunc"], + "quotes" : [1, "double", "avoid-escape"], + "semi" : [2, "never"], + "space-after-keywords" : 1, + "space-infix-ops" : 0, + "strict" : 0 + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/.npmignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/LICENSE new file mode 100644 index 00000000..efd5764b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2014-2015, Forrest L Norvell + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/README.md new file mode 100644 index 00000000..d43ba973 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/README.md @@ -0,0 +1,62 @@ +# some + +Short-circuited async Array.prototype.some implementation. + +Serially evaluates a list of values from a JS array or arraylike +against an asynchronous predicate, terminating on the first truthy +value. If the predicate encounters an error, pass it to the completion +callback. Otherwise, pass the truthy value passed by the predicate, or +`false` if no truthy value was passed. + +Is +[Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)-proof, +browser-safe, and pretty efficient. + +## Usage + +```javascript +var some = require("async-some"); +var resolve = require("path").resolve; +var stat = require("fs").stat; +var readFileSync = require("fs").readFileSync; + +some(["apple", "seaweed", "ham", "quince"], porkDetector, function (error, match) { + if (error) return console.error(error); + + if (match) return console.dir(JSON.parse(readFileSync(match))); + + console.error("time to buy more Sporkle™!"); +}); + +var PREFIX = resolve(__dirname, "../pork_store"); +function porkDetector(value, cb) { + var path = resolve(PREFIX, value + ".json"); + stat(path, function (er, stat) { + if (er) { + if (er.code === "ENOENT") return cb(null, false); + + return cb(er); + } + + cb(er, path); + }); +} +``` + +### some(list, test, callback) + +* `list` {Object} An arraylike (either an Array or the arguments arraylike) to + be checked. +* `test` {Function} The predicate against which the elements of `list` will be + tested. Takes two parameters: + * `element` {any} The element of the list to be tested. + * `callback` {Function} The continuation to be called once the test is + complete. Takes (again) two values: + * `error` {Error} Any errors that the predicate encountered. + * `value` {any} A truthy value. A non-falsy result terminates checking the + entire list. +* `callback` {Function} The callback to invoke when either a value has been + found or the entire input list has been processed with no result. Is invoked + with the traditional two parameters: + * `error` {Error} Errors that were encountered during the evaluation of some(). + * `match` {any} Value successfully matched by `test`, if any. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/package.json new file mode 100644 index 00000000..621a235e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/package.json @@ -0,0 +1,41 @@ +{ + "name": "async-some", + "version": "1.0.2", + "description": "short-circuited, asynchronous version of Array.protototype.some", + "main": "some.js", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/othiym23/async-some.git" + }, + "keywords": [ + "async", + "some", + "array", + "collections", + "fp" + ], + "author": { + "name": "Forrest L Norvell", + "email": "ogd@aoaioxxysz.net" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/othiym23/async-some/issues" + }, + "homepage": "https://github.com/othiym23/async-some", + "dependencies": { + "dezalgo": "^1.0.2" + }, + "devDependencies": { + "tap": "^1.1.0" + }, + "readme": "# some\n\nShort-circuited async Array.prototype.some implementation.\n\nSerially evaluates a list of values from a JS array or arraylike\nagainst an asynchronous predicate, terminating on the first truthy\nvalue. If the predicate encounters an error, pass it to the completion\ncallback. Otherwise, pass the truthy value passed by the predicate, or\n`false` if no truthy value was passed.\n\nIs\n[Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)-proof,\nbrowser-safe, and pretty efficient.\n\n## Usage\n\n```javascript\nvar some = require(\"async-some\");\nvar resolve = require(\"path\").resolve;\nvar stat = require(\"fs\").stat;\nvar readFileSync = require(\"fs\").readFileSync;\n\nsome([\"apple\", \"seaweed\", \"ham\", \"quince\"], porkDetector, function (error, match) {\n if (error) return console.error(error);\n\n if (match) return console.dir(JSON.parse(readFileSync(match)));\n\n console.error(\"time to buy more Sporkle™!\");\n});\n\nvar PREFIX = resolve(__dirname, \"../pork_store\");\nfunction porkDetector(value, cb) {\n var path = resolve(PREFIX, value + \".json\");\n stat(path, function (er, stat) {\n if (er) {\n if (er.code === \"ENOENT\") return cb(null, false);\n\n return cb(er);\n }\n\n cb(er, path);\n });\n}\n```\n\n### some(list, test, callback)\n\n* `list` {Object} An arraylike (either an Array or the arguments arraylike) to\n be checked.\n* `test` {Function} The predicate against which the elements of `list` will be\n tested. Takes two parameters:\n * `element` {any} The element of the list to be tested.\n * `callback` {Function} The continuation to be called once the test is\n complete. Takes (again) two values:\n * `error` {Error} Any errors that the predicate encountered.\n * `value` {any} A truthy value. A non-falsy result terminates checking the\n entire list.\n* `callback` {Function} The callback to invoke when either a value has been\n found or the entire input list has been processed with no result. Is invoked\n with the traditional two parameters:\n * `error` {Error} Errors that were encountered during the evaluation of some().\n * `match` {any} Value successfully matched by `test`, if any.\n", + "readmeFilename": "README.md", + "gitHead": "3a5086ad54739c48b2bbf073f23bcc95658199e3", + "_id": "async-some@1.0.2", + "_shasum": "4d8a81620d5958791b5b98f802d3207776e95509", + "_from": "async-some@>=1.0.2 <1.1.0" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/some.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/some.js new file mode 100644 index 00000000..d3a699d4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/async-some/some.js @@ -0,0 +1,47 @@ +var assert = require("assert") +var dezalgoify = require("dezalgo") + +module.exports = some + +/** + * short-circuited async Array.prototype.some implementation + * + * Serially evaluates a list of values from a JS array or arraylike + * against an asynchronous predicate, terminating on the first truthy + * value. If the predicate encounters an error, pass it to the completion + * callback. Otherwise, pass the truthy value passed by the predicate, or + * `false` if no truthy value was passed. + */ +function some (list, test, cb) { + assert("length" in list, "array must be arraylike") + assert.equal(typeof test, "function", "predicate must be callable") + assert.equal(typeof cb, "function", "callback must be callable") + + var array = slice(list) + , index = 0 + , length = array.length + , hecomes = dezalgoify(cb) + + map() + + function map () { + if (index >= length) return hecomes(null, false) + + test(array[index], reduce) + } + + function reduce (er, result) { + if (er) return hecomes(er, false) + if (result) return hecomes(null, result) + + index++ + map() + } +} + +// Array.prototype.slice on arguments arraylike is expensive +function slice(args) { + var l = args.length, a = [], i + for (i = 0; i < l; i++) a[i] = args[i] + return a +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/LICENCE b/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/LICENCE new file mode 100644 index 00000000..9f884d52 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/LICENCE @@ -0,0 +1,25 @@ +Copyright (c) Isaac Z. Schlueter +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/README.md new file mode 100644 index 00000000..8745e888 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/README.md @@ -0,0 +1,14 @@ +# block-stream + +A stream of blocks. + +Write data into it, and it'll output data in buffer blocks the size you +specify, padding with zeroes if necessary. + +```javascript +var block = new BlockStream(512) +fs.createReadStream("some-file").pipe(block) +block.pipe(fs.createWriteStream("block-file")) +``` + +When `.end()` or `.flush()` is called, it'll pad the block with zeroes. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/block-stream.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/block-stream.js new file mode 100644 index 00000000..3336bd2a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/block-stream.js @@ -0,0 +1,209 @@ +// write data to it, and it'll emit data in 512 byte blocks. +// if you .end() or .flush(), it'll emit whatever it's got, +// padded with nulls to 512 bytes. + +module.exports = BlockStream + +var Stream = require("stream").Stream + , inherits = require("inherits") + , assert = require("assert").ok + , debug = process.env.DEBUG ? console.error : function () {} + +function BlockStream (size, opt) { + this.writable = this.readable = true + this._opt = opt || {} + this._chunkSize = size || 512 + this._offset = 0 + this._buffer = [] + this._bufferLength = 0 + if (this._opt.nopad) this._zeroes = false + else { + this._zeroes = new Buffer(this._chunkSize) + for (var i = 0; i < this._chunkSize; i ++) { + this._zeroes[i] = 0 + } + } +} + +inherits(BlockStream, Stream) + +BlockStream.prototype.write = function (c) { + // debug(" BS write", c) + if (this._ended) throw new Error("BlockStream: write after end") + if (c && !Buffer.isBuffer(c)) c = new Buffer(c + "") + if (c.length) { + this._buffer.push(c) + this._bufferLength += c.length + } + // debug("pushed onto buffer", this._bufferLength) + if (this._bufferLength >= this._chunkSize) { + if (this._paused) { + // debug(" BS paused, return false, need drain") + this._needDrain = true + return false + } + this._emitChunk() + } + return true +} + +BlockStream.prototype.pause = function () { + // debug(" BS pausing") + this._paused = true +} + +BlockStream.prototype.resume = function () { + // debug(" BS resume") + this._paused = false + return this._emitChunk() +} + +BlockStream.prototype.end = function (chunk) { + // debug("end", chunk) + if (typeof chunk === "function") cb = chunk, chunk = null + if (chunk) this.write(chunk) + this._ended = true + this.flush() +} + +BlockStream.prototype.flush = function () { + this._emitChunk(true) +} + +BlockStream.prototype._emitChunk = function (flush) { + // debug("emitChunk flush=%j emitting=%j paused=%j", flush, this._emitting, this._paused) + + // emit a chunk + if (flush && this._zeroes) { + // debug(" BS push zeroes", this._bufferLength) + // push a chunk of zeroes + var padBytes = (this._bufferLength % this._chunkSize) + if (padBytes !== 0) padBytes = this._chunkSize - padBytes + if (padBytes > 0) { + // debug("padBytes", padBytes, this._zeroes.slice(0, padBytes)) + this._buffer.push(this._zeroes.slice(0, padBytes)) + this._bufferLength += padBytes + // debug(this._buffer[this._buffer.length - 1].length, this._bufferLength) + } + } + + if (this._emitting || this._paused) return + this._emitting = true + + // debug(" BS entering loops") + var bufferIndex = 0 + while (this._bufferLength >= this._chunkSize && + (flush || !this._paused)) { + // debug(" BS data emission loop", this._bufferLength) + + var out + , outOffset = 0 + , outHas = this._chunkSize + + while (outHas > 0 && (flush || !this._paused) ) { + // debug(" BS data inner emit loop", this._bufferLength) + var cur = this._buffer[bufferIndex] + , curHas = cur.length - this._offset + // debug("cur=", cur) + // debug("curHas=%j", curHas) + // If it's not big enough to fill the whole thing, then we'll need + // to copy multiple buffers into one. However, if it is big enough, + // then just slice out the part we want, to save unnecessary copying. + // Also, need to copy if we've already done some copying, since buffers + // can't be joined like cons strings. + if (out || curHas < outHas) { + out = out || new Buffer(this._chunkSize) + cur.copy(out, outOffset, + this._offset, this._offset + Math.min(curHas, outHas)) + } else if (cur.length === outHas && this._offset === 0) { + // shortcut -- cur is exactly long enough, and no offset. + out = cur + } else { + // slice out the piece of cur that we need. + out = cur.slice(this._offset, this._offset + outHas) + } + + if (curHas > outHas) { + // means that the current buffer couldn't be completely output + // update this._offset to reflect how much WAS written + this._offset += outHas + outHas = 0 + } else { + // output the entire current chunk. + // toss it away + outHas -= curHas + outOffset += curHas + bufferIndex ++ + this._offset = 0 + } + } + + this._bufferLength -= this._chunkSize + assert(out.length === this._chunkSize) + // debug("emitting data", out) + // debug(" BS emitting, paused=%j", this._paused, this._bufferLength) + this.emit("data", out) + out = null + } + // debug(" BS out of loops", this._bufferLength) + + // whatever is left, it's not enough to fill up a block, or we're paused + this._buffer = this._buffer.slice(bufferIndex) + if (this._paused) { + // debug(" BS paused, leaving", this._bufferLength) + this._needsDrain = true + this._emitting = false + return + } + + // if flushing, and not using null-padding, then need to emit the last + // chunk(s) sitting in the queue. We know that it's not enough to + // fill up a whole block, because otherwise it would have been emitted + // above, but there may be some offset. + var l = this._buffer.length + if (flush && !this._zeroes && l) { + if (l === 1) { + if (this._offset) { + this.emit("data", this._buffer[0].slice(this._offset)) + } else { + this.emit("data", this._buffer[0]) + } + } else { + var outHas = this._bufferLength + , out = new Buffer(outHas) + , outOffset = 0 + for (var i = 0; i < l; i ++) { + var cur = this._buffer[i] + , curHas = cur.length - this._offset + cur.copy(out, outOffset, this._offset) + this._offset = 0 + outOffset += curHas + this._bufferLength -= curHas + } + this.emit("data", out) + } + // truncate + this._buffer.length = 0 + this._bufferLength = 0 + this._offset = 0 + } + + // now either drained or ended + // debug("either draining, or ended", this._bufferLength, this._ended) + // means that we've flushed out all that we can so far. + if (this._needDrain) { + // debug("emitting drain", this._bufferLength) + this._needDrain = false + this.emit("drain") + } + + if ((this._bufferLength === 0) && this._ended && !this._endEmitted) { + // debug("emitting end", this._bufferLength) + this._endEmitted = true + this.emit("end") + } + + this._emitting = false + + // debug(" BS no longer emitting", flush, this._paused, this._emitting, this._bufferLength, this._chunkSize) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/package.json new file mode 100644 index 00000000..ea6ee6aa --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/block-stream/package.json @@ -0,0 +1,54 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "block-stream", + "description": "a stream of blocks", + "version": "0.0.8", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/block-stream.git" + }, + "engines": { + "node": "0.4 || >=0.5.8" + }, + "main": "block-stream.js", + "dependencies": { + "inherits": "~2.0.0" + }, + "devDependencies": { + "tap": "0.x" + }, + "scripts": { + "test": "tap test/" + }, + "license": "ISC", + "gitHead": "b35520314f4763af0788d65a846bb43d9c0a8f02", + "bugs": { + "url": "https://github.com/isaacs/block-stream/issues" + }, + "homepage": "https://github.com/isaacs/block-stream#readme", + "_id": "block-stream@0.0.8", + "_shasum": "0688f46da2bbf9cff0c4f68225a0cb95cbe8a46b", + "_from": "block-stream@0.0.8", + "_npmVersion": "2.10.0", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "0688f46da2bbf9cff0c4f68225a0cb95cbe8a46b", + "tarball": "http://registry.npmjs.org/block-stream/-/block-stream-0.0.8.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.8.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/LICENSE new file mode 100644 index 00000000..235bdd54 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/README.md new file mode 100644 index 00000000..7f5248f5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/README.md @@ -0,0 +1,31 @@ +# char-spinner + +Put a little spinner on process.stderr, as unobtrusively as possible. + +## USAGE + +```javascript +var spinner = require("char-spinner") + +// All options are optional +// even the options argument itself is optional +spinner(options) +``` + +## OPTIONS + +Usually the defaults are what you want. Mostly they're just +configurable for testing purposes. + +* `stream` Output stream. Default=`process.stderr` +* `tty` Only show spinner if output stream has a truish `.isTTY`. Default=`true` +* `string` String of chars to spin. Default=`'/-\\|'` +* `interval` Number of ms between frames, bigger = slower. Default=`50` +* `cleanup` Print `'\r \r'` to stream on process exit. Default=`true` +* `unref` Unreference the spinner interval so that the process can + exit normally. Default=`true` +* `delay` Number of frames to "skip over" before printing the spinner. + Useful if you want to avoid showing the spinner for very fast + actions. Default=`2` + +Returns the generated interval, if one was created. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/package.json new file mode 100644 index 00000000..81e62ccf --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/package.json @@ -0,0 +1,54 @@ +{ + "name": "char-spinner", + "version": "1.0.1", + "description": "Put a little spinner on process.stderr, as unobtrusively as possible.", + "main": "spin.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^0.4.10" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/char-spinner" + }, + "keywords": [ + "char", + "spinner" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/isaacs/char-spinner/issues" + }, + "homepage": "https://github.com/isaacs/char-spinner", + "gitHead": "091b2ff5960aa083f68a5619fa93999d072aa152", + "_id": "char-spinner@1.0.1", + "_shasum": "e6ea67bd247e107112983b7ab0479ed362800081", + "_from": "char-spinner@latest", + "_npmVersion": "1.4.13", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "e6ea67bd247e107112983b7ab0479ed362800081", + "tarball": "http://registry.npmjs.org/char-spinner/-/char-spinner-1.0.1.tgz" + }, + "_resolved": "https://registry.npmjs.org/char-spinner/-/char-spinner-1.0.1.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/spin.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/spin.js new file mode 100644 index 00000000..f12a4c0b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/char-spinner/spin.js @@ -0,0 +1,51 @@ +module.exports = spinner + +function spinner(opt) { + opt = opt || {} + var str = opt.stream || process.stderr + var tty = typeof opt.tty === 'boolean' ? opt.tty : true + var string = opt.string || '/-\\|' + var ms = typeof opt.interval === 'number' ? opt.interval : 50 + if (ms < 0) ms = 0 + if (tty && !str.isTTY) return false + var CR = str.isTTY ? '\u001b[0G' : '\u000d'; + var CLEAR = str.isTTY ? '\u001b[2K' : '\u000d \u000d'; + + var s = 0 + var sprite = string.split('') + var wrote = false + + var delay = typeof opt.delay === 'number' ? opt.delay : 2 + + var interval = setInterval(function() { + if (--delay >= 0) return + s = ++s % sprite.length + var c = sprite[s] + str.write(c + CR) + wrote = true + }, ms) + + var unref = typeof opt.unref === 'boolean' ? opt.unref : true + if (unref && typeof interval.unref === 'function') { + interval.unref() + } + + var cleanup = typeof opt.cleanup === 'boolean' ? opt.cleanup : true + if (cleanup) { + process.on('exit', function() { + if (wrote) { + str.write(CLEAR); + } + }) + } + + module.exports.clear = function () { + str.write(CLEAR); + }; + + return interval +} + +module.exports.clear = function () {}; + + diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/README.md new file mode 100644 index 00000000..5c0b421a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/README.md @@ -0,0 +1,3 @@ +Like `chmod -R`. + +Takes the same arguments as `fs.chmod()` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/chmodr.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/chmodr.js new file mode 100644 index 00000000..9ecfe28f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/chmodr.js @@ -0,0 +1,76 @@ +module.exports = chmodr +chmodr.sync = chmodrSync + +var fs = require("fs") +var path = require("path") + +function chmodr (p, mode, cb) { + fs.lstat(p, function (er, stats) { + if (er) + return cb(er) + if (stats.isSymbolicLink()) + return cb() + if (stats.isDirectory()) + return chmodrDir(p, mode, cb) + return fs.chmod(p, mode, cb) + }) +} + +function chmodrDir (p, mode, cb) { + fs.readdir(p, function (er, children) { + if (er) + return cb(er) + + if (!children.length) + return fs.chmod(p, dirMode(mode), cb) + + var len = children.length + var errState = null + children.forEach(function (child) { + chmodr(path.resolve(p, child), mode, then) + }) + + // return first error, but not until all are finished, + // so we don't keep performing FS operations after the cb + function then (er) { + len = len - 1 + if (er && !errState) + errState = er + if (len === 0) { + if (errState) + return cb(errState) + else + return fs.chmod(p, dirMode(mode), cb) + } + } + }) +} + +function chmodrSync (p, mode) { + var stats = fs.lstatSync(p) + if (stats.isSymbolicLink()) + return + if (stats.isDirectory()) + return chmodrDirSync(p, mode) + else + return fs.chmodSync(p, mode) +} + +function chmodrDirSync (p, mode) { + fs.readdirSync(p).forEach(function (child) { + chmodrSync(path.resolve(p, child), mode) + }) + return fs.chmodSync(p, dirMode(mode)) +} + +// If a party has r, add x +// so that dirs are listable +function dirMode(mode) { + if (mode & 0400) + mode |= 0100 + if (mode & 040) + mode |= 010 + if (mode & 04) + mode |= 01 + return mode +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/package.json new file mode 100644 index 00000000..25c8d7e5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/chmodr/package.json @@ -0,0 +1,53 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "chmodr", + "description": "like `chmod -R`", + "version": "1.0.2", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/chmodr.git" + }, + "main": "chmodr.js", + "devDependencies": { + "mkdirp": "0.3", + "rimraf": "", + "tap": "^1.3.2" + }, + "scripts": { + "test": "tap test/*.js" + }, + "license": "ISC", + "files": [ + "chmodr.js" + ], + "gitHead": "1eeeb38b3a4899714e11840fe28ea7fd93865f01", + "bugs": { + "url": "https://github.com/isaacs/chmodr/issues" + }, + "homepage": "https://github.com/isaacs/chmodr#readme", + "_id": "chmodr@1.0.2", + "_shasum": "04662b932d0f02ec66deaa2b0ea42811968e3eb9", + "_from": "chmodr@>=1.0.2 <1.1.0", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "04662b932d0f02ec66deaa2b0ea42811968e3eb9", + "tarball": "http://registry.npmjs.org/chmodr/-/chmodr-1.0.2.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/chmodr/-/chmodr-1.0.2.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/README.md new file mode 100644 index 00000000..a24ba7a9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/README.md @@ -0,0 +1,3 @@ +Like `chown -R`. + +Takes the same arguments as `fs.chown()` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/chownr.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/chownr.js new file mode 100644 index 00000000..880f821d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/chownr.js @@ -0,0 +1,52 @@ +module.exports = chownr +chownr.sync = chownrSync + +var fs = require("fs") +, path = require("path") + +function chownr (p, uid, gid, cb) { + fs.readdir(p, function (er, children) { + // any error other than ENOTDIR means it's not readable, or + // doesn't exist. give up. + if (er && er.code !== "ENOTDIR") return cb(er) + if (er || !children.length) return fs.chown(p, uid, gid, cb) + + var len = children.length + , errState = null + children.forEach(function (child) { + var pathChild = path.resolve(p, child); + fs.lstat(pathChild, function(er, stats) { + if (er) + return cb(er) + if (!stats.isSymbolicLink()) + chownr(pathChild, uid, gid, then) + else + then() + }) + }) + function then (er) { + if (errState) return + if (er) return cb(errState = er) + if (-- len === 0) return fs.chown(p, uid, gid, cb) + } + }) +} + +function chownrSync (p, uid, gid) { + var children + try { + children = fs.readdirSync(p) + } catch (er) { + if (er && er.code === "ENOTDIR") return fs.chownSync(p, uid, gid) + throw er + } + if (!children.length) return fs.chownSync(p, uid, gid) + + children.forEach(function (child) { + var pathChild = path.resolve(p, child) + var stats = fs.lstatSync(pathChild) + if (!stats.isSymbolicLink()) + chownrSync(pathChild, uid, gid) + }) + return fs.chownSync(p, uid, gid) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/package.json new file mode 100644 index 00000000..df3c96ec --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/chownr/package.json @@ -0,0 +1,54 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "chownr", + "description": "like `chown -R`", + "version": "1.0.1", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/chownr.git" + }, + "main": "chownr.js", + "files": [ + "chownr.js" + ], + "devDependencies": { + "mkdirp": "0.3", + "rimraf": "", + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "license": "ISC", + "gitHead": "c6c43844e80d7c7045e737a72b9fbb1ba0579a26", + "bugs": { + "url": "https://github.com/isaacs/chownr/issues" + }, + "homepage": "https://github.com/isaacs/chownr#readme", + "_id": "chownr@1.0.1", + "_shasum": "e2a75042a9551908bebd25b8523d5f9769d79181", + "_from": "chownr@1.0.1", + "_npmVersion": "3.2.2", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "e2a75042a9551908bebd25b8523d5f9769d79181", + "tarball": "http://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/.npmignore new file mode 100644 index 00000000..69f75d26 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/.npmignore @@ -0,0 +1,16 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log + +node_modules diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/.travis.yml new file mode 100644 index 00000000..97e45158 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.10" + - "0.8" \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/LICENSE new file mode 100644 index 00000000..6e93978e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/README.md new file mode 100644 index 00000000..536bd49d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/README.md @@ -0,0 +1,44 @@ +# cmd-shim + +The cmd-shim used in npm to create executable scripts on Windows, +since symlinks are not suitable for this purpose there. + +On Unix systems, you should use a symbolic link instead. + +[![Build Status](https://img.shields.io/travis/ForbesLindesay/cmd-shim/master.svg)](https://travis-ci.org/ForbesLindesay/cmd-shim) +[![Dependency Status](https://img.shields.io/david/ForbesLindesay/cmd-shim.svg)](https://david-dm.org/ForbesLindesay/cmd-shim) +[![NPM version](https://img.shields.io/npm/v/cmd-shim.svg)](https://www.npmjs.com/package/cmd-shim) + +## Installation + +``` +npm install cmd-shim +``` + +## API + +### cmdShim(from, to, cb) + +Create a cmd shim at `to` for the command line program at `from`. +e.g. + +```javascript +var cmdShim = require('cmd-shim'); +cmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) { + if (err) throw err; +}); +``` + +### cmdShim.ifExists(from, to, cb) + +The same as above, but will just continue if the file does not exist. +Source: + +```javascript +function cmdShimIfExists (from, to, cb) { + fs.stat(from, function (er) { + if (er) return cb() + cmdShim(from, to, cb) + }) +} +``` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/index.js new file mode 100644 index 00000000..353df162 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/index.js @@ -0,0 +1,180 @@ +// On windows, create a .cmd file. +// Read the #! in the file to see what it uses. The vast majority +// of the time, this will be either: +// "#!/usr/bin/env " +// or: +// "#! " +// +// Write a binroot/pkg.bin + ".cmd" file that has this line in it: +// @ %~dp0 %* + +module.exports = cmdShim +cmdShim.ifExists = cmdShimIfExists + +var fs = require("graceful-fs") + +var mkdir = require("mkdirp") + , path = require("path") + , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/ + +function cmdShimIfExists (from, to, cb) { + fs.stat(from, function (er) { + if (er) return cb() + cmdShim(from, to, cb) + }) +} + +// Try to unlink, but ignore errors. +// Any problems will surface later. +function rm (path, cb) { + fs.unlink(path, function(er) { + cb() + }) +} + +function cmdShim (from, to, cb) { + fs.stat(from, function (er, stat) { + if (er) + return cb(er) + + cmdShim_(from, to, cb) + }) +} + +function cmdShim_ (from, to, cb) { + var then = times(2, next, cb) + rm(to, then) + rm(to + ".cmd", then) + + function next(er) { + writeShim(from, to, cb) + } +} + +function writeShim (from, to, cb) { + // make a cmd file and a sh script + // First, check if the bin is a #! of some sort. + // If not, then assume it's something that'll be compiled, or some other + // sort of script, and just call it directly. + mkdir(path.dirname(to), function (er) { + if (er) + return cb(er) + fs.readFile(from, "utf8", function (er, data) { + if (er) return writeShim_(from, to, null, null, cb) + var firstLine = data.trim().split(/\r*\n/)[0] + , shebang = firstLine.match(shebangExpr) + if (!shebang) return writeShim_(from, to, null, null, cb) + var prog = shebang[1] + , args = shebang[2] || "" + return writeShim_(from, to, prog, args, cb) + }) + }) +} + +function writeShim_ (from, to, prog, args, cb) { + var shTarget = path.relative(path.dirname(to), from) + , target = shTarget.split("/").join("\\") + , longProg + , shProg = prog && prog.split("\\").join("/") + , shLongProg + shTarget = shTarget.split("\\").join("/") + args = args || "" + if (!prog) { + prog = "\"%~dp0\\" + target + "\"" + shProg = "\"$basedir/" + shTarget + "\"" + args = "" + target = "" + shTarget = "" + } else { + longProg = "\"%~dp0\\" + prog + ".exe\"" + shLongProg = "\"$basedir/" + prog + "\"" + target = "\"%~dp0\\" + target + "\"" + shTarget = "\"$basedir/" + shTarget + "\"" + } + + // @IF EXIST "%~dp0\node.exe" ( + // "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* + // ) ELSE ( + // SETLOCAL + // SET PATHEXT=%PATHEXT:;.JS;=;% + // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* + // ) + var cmd + if (longProg) { + cmd = "@IF EXIST " + longProg + " (\r\n" + + " " + longProg + " " + args + " " + target + " %*\r\n" + + ") ELSE (\r\n" + + " @SETLOCAL\r\n" + + " @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n" + + " " + prog + " " + args + " " + target + " %*\r\n" + + ")" + } else { + cmd = "@" + prog + " " + args + " " + target + " %*\r\n" + } + + // #!/bin/sh + // basedir=`dirname "$0"` + // + // case `uname` in + // *CYGWIN*) basedir=`cygpath -w "$basedir"`;; + // esac + // + // if [ -x "$basedir/node.exe" ]; then + // "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@" + // ret=$? + // else + // node "$basedir/node_modules/npm/bin/npm-cli.js" "$@" + // ret=$? + // fi + // exit $ret + + var sh = "#!/bin/sh\n" + + if (shLongProg) { + sh = sh + + "basedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")\n" + + "\n" + + "case `uname` in\n" + + " *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\n" + + "esac\n" + + "\n" + + sh = sh + + "if [ -x "+shLongProg+" ]; then\n" + + " " + shLongProg + " " + args + " " + shTarget + " \"$@\"\n" + + " ret=$?\n" + + "else \n" + + " " + shProg + " " + args + " " + shTarget + " \"$@\"\n" + + " ret=$?\n" + + "fi\n" + + "exit $ret\n" + } else { + sh = shProg + " " + args + " " + shTarget + " \"$@\"\n" + + "exit $?\n" + } + + var then = times(2, next, cb) + fs.writeFile(to + ".cmd", cmd, "utf8", then) + fs.writeFile(to, sh, "utf8", then) + function next () { + chmodShim(to, cb) + } +} + +function chmodShim (to, cb) { + var then = times(2, cb, cb) + fs.chmod(to, 0755, then) + fs.chmod(to + ".cmd", 0755, then) +} + +function times(n, ok, cb) { + var errState = null + return function(er) { + if (!errState) { + if (er) + cb(errState = er) + else if (--n === 0) + ok() + } + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/package.json new file mode 100644 index 00000000..9707abc3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/cmd-shim/package.json @@ -0,0 +1,52 @@ +{ + "name": "cmd-shim", + "version": "2.0.2", + "description": "Used in npm for command line application support", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ForbesLindesay/cmd-shim.git" + }, + "license": "BSD-2-Clause", + "dependencies": { + "graceful-fs": "^4.1.2", + "mkdirp": "~0.5.0" + }, + "devDependencies": { + "tap": "~0.4.11", + "rimraf": "~2.2.8" + }, + "gitHead": "8492e2a92b5062bb02a9eec509e57eea94b110a7", + "bugs": { + "url": "https://github.com/ForbesLindesay/cmd-shim/issues" + }, + "homepage": "https://github.com/ForbesLindesay/cmd-shim", + "_id": "cmd-shim@2.0.2", + "_shasum": "6fcbda99483a8fd15d7d30a196ca69d688a2efdb", + "_from": "cmd-shim@2.0.2", + "_npmVersion": "2.7.1", + "_nodeVersion": "1.6.2", + "_npmUser": { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + "dist": { + "shasum": "6fcbda99483a8fd15d7d30a196ca69d688a2efdb", + "tarball": "http://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz" + }, + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + } + ], + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/cmd-shim-2.0.2.tgz_1455116566936_0.7582207734230906" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/LICENSE new file mode 100644 index 00000000..b763f620 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Tim Oxley + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/Makefile b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/Makefile new file mode 100644 index 00000000..d3c7d425 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/Makefile @@ -0,0 +1,9 @@ + +all: columnify.js + +prepublish: all + +columnify.js: index.js package.json + babel index.js > columnify.js + +.PHONY: all prepublish diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/Readme.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/Readme.md new file mode 100644 index 00000000..350ff8a5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/Readme.md @@ -0,0 +1,470 @@ +# columnify + +[![NPM](https://nodei.co/npm/columnify.png?downloads=true&downloadRank=true&stars=true&chrome)](https://nodei.co/npm-dl/columnify/) +[![NPM](https://nodei.co/npm-dl/columnify.png?months=3&height=3&chrome)](https://nodei.co/npm/columnify/) + +[![Build Status](https://img.shields.io/travis/timoxley/columnify.svg?style=flat)](https://travis-ci.org/timoxley/columnify) +[![NPM Version](https://img.shields.io/npm/v/columnify.svg?style=flat)](https://npmjs.org/package/columnify) +[![License](http://img.shields.io/npm/l/columnify.svg?style=flat)](LICENSE) +[![Dependency Status](https://david-dm.org/timoxley/columnify.svg)](https://david-dm.org/timoxley/columnify) +[![devDependency Status](https://david-dm.org/timoxley/columnify/dev-status.svg)](https://david-dm.org/timoxley/columnify#info=devDependencies) + +Create text-based columns suitable for console output from objects or +arrays of objects. + +Columns are automatically resized to fit the content of the largest +cell. Each cell will be padded with spaces to fill the available space +and ensure column contents are left-aligned. + +Designed to [handle sensible wrapping in npm search results](https://github.com/isaacs/npm/pull/2328). + +`npm search` before & after integrating columnify: + +![npm-tidy-search](https://f.cloud.github.com/assets/43438/1848959/ae02ad04-76a1-11e3-8255-4781debffc26.gif) + +## Installation & Update + +``` +$ npm install --save columnify@latest +``` + +## Usage + +```javascript +var columnify = require('columnify') +var columns = columnify(data, options) +console.log(columns) +``` + +## Examples + +### Columnify Objects + +Objects are converted to a list of key/value pairs: + +```javascript +var data = { + "commander@0.6.1": 1, + "minimatch@0.2.14": 3, + "mkdirp@0.3.5": 2, + "sigmund@1.0.0": 3 +} + +console.log(columnify(data)) +``` +#### Output: +``` +KEY VALUE +commander@0.6.1 1 +minimatch@0.2.14 3 +mkdirp@0.3.5 2 +sigmund@1.0.0 3 +``` + +### Custom Column Names + +```javascript +var data = { + "commander@0.6.1": 1, + "minimatch@0.2.14": 3, + "mkdirp@0.3.5": 2, + "sigmund@1.0.0": 3 +} + +console.log(columnify(data, {columns: ['MODULE', 'COUNT']})) +``` +#### Output: +``` +MODULE COUNT +commander@0.6.1 1 +minimatch@0.2.14 3 +mkdirp@0.3.5 2 +sigmund@1.0.0 3 +``` + +### Columnify Arrays of Objects + +Column headings are extracted from the keys in supplied objects. + +```javascript +var columnify = require('columnify') + +var columns = columnify([{ + name: 'mod1', + version: '0.0.1' +}, { + name: 'module2', + version: '0.2.0' +}]) + +console.log(columns) +``` +#### Output: +``` +NAME VERSION +mod1 0.0.1 +module2 0.2.0 +``` + +### Filtering & Ordering Columns + +By default, all properties are converted into columns, whether or not +they exist on every object or not. + +To explicitly specify which columns to include, and in which order, +supply a "columns" or "include" array ("include" is just an alias). + +```javascript +var data = [{ + name: 'module1', + description: 'some description', + version: '0.0.1', +}, { + name: 'module2', + description: 'another description', + version: '0.2.0', +}] + +var columns = columnify(data, { + columns: ['name', 'version'] +}) + +console.log(columns) +``` + +#### Output: +``` +NAME VERSION +module1 0.0.1 +module2 0.2.0 +``` + +## Global and Per Column Options +You can set a number of options at a global level (ie. for all columns) or on a per column basis. + +Set options on a per column basis by using the `config` option to specify individual columns: + +```javascript +var columns = columnify(data, { + optionName: optionValue, + config: { + columnName: {optionName: optionValue}, + columnName: {optionName: optionValue}, + } +}) +``` + +### Maximum and Minimum Column Widths +As with all options, you can define the `maxWidth` and `minWidth` globally, or for specified columns. By default, wrapping will happen at word boundaries. Empty cells or those which do not fill the `minWidth` will be padded with spaces. + +```javascript +var columns = columnify([{ + name: 'mod1', + description: 'some description which happens to be far larger than the max', + version: '0.0.1', +}, { + name: 'module-two', + description: 'another description larger than the max', + version: '0.2.0', +}], { + minWidth: 20, + config: { + description: {maxWidth: 30} + } +}) + +console.log(columns) +``` + +#### Output: +``` +NAME DESCRIPTION VERSION +mod1 some description which happens 0.0.1 + to be far larger than the max +module-two another description larger 0.2.0 + than the max +``` + +#### Maximum Line Width + +You can set a hard maximum line width using the `maxLineWidth` option. +Beyond this value data is unceremoniously truncated with no truncation +marker. + +This can either be a number or 'auto' to set the value to the width of +stdout. + +Setting this value to 'auto' prevent TTY-imposed line-wrapping when +lines exceed the screen width. + +#### Truncating Column Cells Instead of Wrapping + +You can disable wrapping and instead truncate content at the maximum +column width by using the `truncate` option. Truncation respects word boundaries. A truncation marker, `…`, will appear next to the last word in any truncated line. + +```javascript +var columns = columnify(data, { + truncate: true, + config: { + description: { + maxWidth: 20 + } + } +}) + +console.log(columns) +``` +#### Output: +``` +NAME DESCRIPTION VERSION +mod1 some description… 0.0.1 +module-two another description… 0.2.0 +``` + + +### Align Right/Center +You can set the alignment of the column data by using the `align` option. + +```js +var data = { + "mocha@1.18.2": 1, + "commander@2.0.0": 1, + "debug@0.8.1": 1 +} + +columnify(data, {config: {value: {align: 'right'}}}) +``` + +#### Output: +``` +KEY VALUE +mocha@1.18.2 1 +commander@2.0.0 1 +debug@0.8.1 1 +``` + +`align: 'center'` works in a similar way. + + +### Padding Character + +Set a character to fill whitespace within columns with the `paddingChr` option. + +```js +var data = { + "shortKey": "veryVeryVeryVeryVeryLongVal", + "veryVeryVeryVeryVeryLongKey": "shortVal" +} + +columnify(data, { paddingChr: '.'}) +``` + +#### Output: +``` +KEY........................ VALUE...................... +shortKey................... veryVeryVeryVeryVeryLongVal +veryVeryVeryVeryVeryLongKey shortVal................... +``` + +### Preserve Existing Newlines + +By default, `columnify` sanitises text by replacing any occurance of 1 or more whitespace characters with a single space. + +`columnify` can be configured to respect existing new line characters using the `preserveNewLines` option. Note this will still collapse all other whitespace. + +```javascript +var data = [{ + name: "glob@3.2.9", + paths: [ + "node_modules/tap/node_modules/glob", + "node_modules/tape/node_modules/glob" + ].join('\n') +}, { + name: "nopt@2.2.1", + paths: [ + "node_modules/tap/node_modules/nopt" + ] +}, { + name: "runforcover@0.0.2", + paths: "node_modules/tap/node_modules/runforcover" +}] + +console.log(columnify(data, {preserveNewLines: true})) +``` +#### Output: +``` +NAME PATHS +glob@3.2.9 node_modules/tap/node_modules/glob + node_modules/tape/node_modules/glob +nopt@2.2.1 node_modules/tap/node_modules/nopt +runforcover@0.0.2 node_modules/tap/node_modules/runforcover +``` + +Compare this with output without `preserveNewLines`: + +```javascript +console.log(columnify(data, {preserveNewLines: false})) +// or just +console.log(columnify(data)) +``` + +``` +NAME PATHS +glob@3.2.9 node_modules/tap/node_modules/glob node_modules/tape/node_modules/glob +nopt@2.2.1 node_modules/tap/node_modules/nopt +runforcover@0.0.2 node_modules/tap/node_modules/runforcover +``` + +### Custom Truncation Marker + +You can change the truncation marker to something other than the default +`…` by using the `truncateMarker` option. + +```javascript +var columns = columnify(data, { + truncate: true, + truncateMarker: '>', + widths: { + description: { + maxWidth: 20 + } + } +}) + +console.log(columns) +``` +#### Output: +``` +NAME DESCRIPTION VERSION +mod1 some description> 0.0.1 +module-two another description> 0.2.0 +``` + +### Custom Column Splitter + +If your columns need some bling, you can split columns with custom +characters by using the `columnSplitter` option. + +```javascript +var columns = columnify(data, { + columnSplitter: ' | ' +}) + +console.log(columns) +``` +#### Output: +``` +NAME | DESCRIPTION | VERSION +mod1 | some description which happens to be far larger than the max | 0.0.1 +module-two | another description larger than the max | 0.2.0 +``` + +### Control Header Display + +Control whether column headers are displayed by using the `showHeaders` option. + +```javascript +var columns = columnify(data, { + showHeaders: false +}) +``` + +This also works well for hiding a single column header, like an `id` column: +```javascript +var columns = columnify(data, { + config: { + id: { showHeaders: false } + } +}) +``` + +### Transforming Column Data and Headers +If you need to modify the presentation of column content or heading content there are two useful options for doing that: `dataTransform` and `headerTransform`. Both of these take a function and need to return a valid string. + +```javascript +var columns = columnify([{ + name: 'mod1', + description: 'SOME DESCRIPTION TEXT.' +}, { + name: 'module-two', + description: 'SOME SLIGHTLY LONGER DESCRIPTION TEXT.' +}], { + dataTransform: function(data) { + return data.toLowerCase() + }, + config: { + name: { + headingTransform: function(heading) { + heading = "module " + heading + return "*" + heading.toUpperCase() + "*" + } + } + } +}) +``` +#### Output: +``` +*MODULE NAME* DESCRIPTION +mod1 some description text. +module-two some slightly longer description text. +``` + + +## Multibyte Character Support + +`columnify` uses [mycoboco/wcwidth.js](https://github.com/mycoboco/wcwidth.js) to calculate length of multibyte characters: + +```javascript +var data = [{ + name: 'module-one', + description: 'some description', + version: '0.0.1', +}, { + name: '这是一个很长的名字的模块', + description: '这真的是一个描述的内容这个描述很长', + version: "0.3.3" +}] + +console.log(columnify(data)) +``` + +#### Without multibyte handling: + +i.e. before columnify added this feature + +``` +NAME DESCRIPTION VERSION +module-one some description 0.0.1 +这是一个很长的名字的模块 这真的是一个描述的内容这个描述很长 0.3.3 +``` + +#### With multibyte handling: + +``` +NAME DESCRIPTION VERSION +module-one some description 0.0.1 +这是一个很长的名字的模块 这真的是一个描述的内容这个描述很长 0.3.3 +``` + +## Contributions + +``` + project : columnify + repo age : 1 year, 2 months + active : 32 days + commits : 120 + files : 54 + authors : + 90 Tim Oxley 75.0% + 8 Tim 6.7% + 7 Arjun Mehta 5.8% + 6 Dany 5.0% + 5 Wei Gao 4.2% + 2 Dany Shaanan 1.7% + 1 Seth Miller 0.8% + 1 Isaac Z. Schlueter 0.8% +``` + +## License + +MIT diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/columnify.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/columnify.js new file mode 100644 index 00000000..29772a5f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/columnify.js @@ -0,0 +1,308 @@ +"use strict"; + +var wcwidth = require('./width'); + +var _require = require('./utils'); + +var padRight = _require.padRight; +var padCenter = _require.padCenter; +var padLeft = _require.padLeft; +var splitIntoLines = _require.splitIntoLines; +var splitLongWords = _require.splitLongWords; +var truncateString = _require.truncateString; + +var DEFAULT_HEADING_TRANSFORM = function DEFAULT_HEADING_TRANSFORM(key) { + return key.toUpperCase(); +}; + +var DEFAULT_DATA_TRANSFORM = function DEFAULT_DATA_TRANSFORM(cell, column, index) { + return cell; +}; + +var DEFAULTS = Object.freeze({ + maxWidth: Infinity, + minWidth: 0, + columnSplitter: ' ', + truncate: false, + truncateMarker: '…', + preserveNewLines: false, + paddingChr: ' ', + showHeaders: true, + headingTransform: DEFAULT_HEADING_TRANSFORM, + dataTransform: DEFAULT_DATA_TRANSFORM +}); + +module.exports = function (items) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var columnConfigs = options.config || {}; + delete options.config; // remove config so doesn't appear on every column. + + var maxLineWidth = options.maxLineWidth || Infinity; + if (maxLineWidth === 'auto') maxLineWidth = process.stdout.columns || Infinity; + delete options.maxLineWidth; // this is a line control option, don't pass it to column + + // Option defaults inheritance: + // options.config[columnName] => options => DEFAULTS + options = mixin({}, DEFAULTS, options); + + options.config = options.config || Object.create(null); + + options.spacing = options.spacing || '\n'; // probably useless + options.preserveNewLines = !!options.preserveNewLines; + options.showHeaders = !!options.showHeaders; + options.columns = options.columns || options.include; // alias include/columns, prefer columns if supplied + var columnNames = options.columns || []; // optional user-supplied columns to include + + items = toArray(items, columnNames); + + // if not suppled column names, automatically determine columns from data keys + if (!columnNames.length) { + items.forEach(function (item) { + for (var columnName in item) { + if (columnNames.indexOf(columnName) === -1) columnNames.push(columnName); + } + }); + } + + // initialize column defaults (each column inherits from options.config) + var columns = columnNames.reduce(function (columns, columnName) { + var column = Object.create(options); + columns[columnName] = mixin(column, columnConfigs[columnName]); + return columns; + }, Object.create(null)); + + // sanitize column settings + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + column.name = columnName; + column.maxWidth = Math.ceil(column.maxWidth); + column.minWidth = Math.ceil(column.minWidth); + column.truncate = !!column.truncate; + column.align = column.align || 'left'; + }); + + // sanitize data + items = items.map(function (item) { + var result = Object.create(null); + columnNames.forEach(function (columnName) { + // null/undefined -> '' + result[columnName] = item[columnName] != null ? item[columnName] : ''; + // toString everything + result[columnName] = '' + result[columnName]; + if (columns[columnName].preserveNewLines) { + // merge non-newline whitespace chars + result[columnName] = result[columnName].replace(/[^\S\n]/gmi, ' '); + } else { + // merge all whitespace chars + result[columnName] = result[columnName].replace(/\s/gmi, ' '); + } + }); + return result; + }); + + // transform data cells + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + items = items.map(function (item, index) { + var col = Object.create(column); + item[columnName] = column.dataTransform(item[columnName], col, index); + + var changedKeys = Object.keys(col); + // disable default heading transform if we wrote to column.name + if (changedKeys.indexOf('name') !== -1) { + if (column.headingTransform !== DEFAULT_HEADING_TRANSFORM) return; + column.headingTransform = function (heading) { + return heading; + }; + } + changedKeys.forEach(function (key) { + return column[key] = col[key]; + }); + return item; + }); + }); + + // add headers + var headers = {}; + if (options.showHeaders) { + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + + if (!column.showHeaders) { + headers[columnName] = ''; + return; + } + + headers[columnName] = column.headingTransform(column.name); + }); + items.unshift(headers); + } + // get actual max-width between min & max + // based on length of data in columns + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + column.width = items.map(function (item) { + return item[columnName]; + }).reduce(function (min, cur) { + // if already at maxWidth don't bother testing + if (min >= column.maxWidth) return min; + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))); + }, 0); + }); + + // split long words so they can break onto multiple lines + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + items = items.map(function (item) { + item[columnName] = splitLongWords(item[columnName], column.width, column.truncateMarker); + return item; + }); + }); + + // wrap long lines. each item is now an array of lines. + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + items = items.map(function (item, index) { + var cell = item[columnName]; + item[columnName] = splitIntoLines(cell, column.width); + + // if truncating required, only include first line + add truncation char + if (column.truncate && item[columnName].length > 1) { + item[columnName] = splitIntoLines(cell, column.width - wcwidth(column.truncateMarker)); + var firstLine = item[columnName][0]; + if (!endsWith(firstLine, column.truncateMarker)) item[columnName][0] += column.truncateMarker; + item[columnName] = item[columnName].slice(0, 1); + } + return item; + }); + }); + + // recalculate column widths from truncated output/lines + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + column.width = items.map(function (item) { + return item[columnName].reduce(function (min, cur) { + if (min >= column.maxWidth) return min; + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))); + }, 0); + }).reduce(function (min, cur) { + if (min >= column.maxWidth) return min; + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, cur))); + }, 0); + }); + + var rows = createRows(items, columns, columnNames, options.paddingChr); // merge lines into rows + // conceive output + return rows.reduce(function (output, row) { + return output.concat(row.reduce(function (rowOut, line) { + return rowOut.concat(line.join(options.columnSplitter)); + }, [])); + }, []).map(function (line) { + return truncateString(line, maxLineWidth); + }).join(options.spacing); +}; + +/** + * Convert wrapped lines into rows with padded values. + * + * @param Array items data to process + * @param Array columns column width settings for wrapping + * @param Array columnNames column ordering + * @return Array items wrapped in arrays, corresponding to lines + */ + +function createRows(items, columns, columnNames, paddingChr) { + return items.map(function (item) { + var row = []; + var numLines = 0; + columnNames.forEach(function (columnName) { + numLines = Math.max(numLines, item[columnName].length); + }); + // combine matching lines of each rows + + var _loop = function _loop(i) { + row[i] = row[i] || []; + columnNames.forEach(function (columnName) { + var column = columns[columnName]; + var val = item[columnName][i] || ''; // || '' ensures empty columns get padded + if (column.align === 'right') row[i].push(padLeft(val, column.width, paddingChr));else if (column.align === 'center' || column.align === 'centre') row[i].push(padCenter(val, column.width, paddingChr));else row[i].push(padRight(val, column.width, paddingChr)); + }); + }; + + for (var i = 0; i < numLines; i++) { + _loop(i); + } + return row; + }); +} + +/** + * Object.assign + * + * @return Object Object with properties mixed in. + */ + +function mixin() { + var _Object; + + if (Object.assign) return (_Object = Object).assign.apply(_Object, arguments); + return ObjectAssign.apply(undefined, arguments); +} + +function ObjectAssign(target, firstSource) { + "use strict"; + + if (target === undefined || target === null) throw new TypeError("Cannot convert first argument to object"); + + var to = Object(target); + + var hasPendingException = false; + var pendingException; + + for (var i = 1; i < arguments.length; i++) { + var nextSource = arguments[i]; + if (nextSource === undefined || nextSource === null) continue; + + var keysArray = Object.keys(Object(nextSource)); + for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { + var nextKey = keysArray[nextIndex]; + try { + var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) to[nextKey] = nextSource[nextKey]; + } catch (e) { + if (!hasPendingException) { + hasPendingException = true; + pendingException = e; + } + } + } + + if (hasPendingException) throw pendingException; + } + return to; +} + +/** + * Adapted from String.prototype.endsWith polyfill. + */ + +function endsWith(target, searchString, position) { + position = position || target.length; + position = position - searchString.length; + var lastIndex = target.lastIndexOf(searchString); + return lastIndex !== -1 && lastIndex === position; +} + +function toArray(items, columnNames) { + if (Array.isArray(items)) return items; + var rows = []; + for (var key in items) { + var item = {}; + item[columnNames[0] || 'key'] = key; + item[columnNames[1] || 'value'] = items[key]; + rows.push(item); + } + return rows; +} + diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/index.js new file mode 100644 index 00000000..61927e04 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/index.js @@ -0,0 +1,297 @@ +"use strict" + +const wcwidth = require('./width') +const { + padRight, + padCenter, + padLeft, + splitIntoLines, + splitLongWords, + truncateString +} = require('./utils') + +const DEFAULT_HEADING_TRANSFORM = key => key.toUpperCase() + +const DEFAULT_DATA_TRANSFORM = (cell, column, index) => cell + +const DEFAULTS = Object.freeze({ + maxWidth: Infinity, + minWidth: 0, + columnSplitter: ' ', + truncate: false, + truncateMarker: '…', + preserveNewLines: false, + paddingChr: ' ', + showHeaders: true, + headingTransform: DEFAULT_HEADING_TRANSFORM, + dataTransform: DEFAULT_DATA_TRANSFORM +}) + +module.exports = function(items, options = {}) { + + let columnConfigs = options.config || {} + delete options.config // remove config so doesn't appear on every column. + + let maxLineWidth = options.maxLineWidth || Infinity + if (maxLineWidth === 'auto') maxLineWidth = process.stdout.columns || Infinity + delete options.maxLineWidth // this is a line control option, don't pass it to column + + // Option defaults inheritance: + // options.config[columnName] => options => DEFAULTS + options = mixin({}, DEFAULTS, options) + + options.config = options.config || Object.create(null) + + options.spacing = options.spacing || '\n' // probably useless + options.preserveNewLines = !!options.preserveNewLines + options.showHeaders = !!options.showHeaders; + options.columns = options.columns || options.include // alias include/columns, prefer columns if supplied + let columnNames = options.columns || [] // optional user-supplied columns to include + + items = toArray(items, columnNames) + + // if not suppled column names, automatically determine columns from data keys + if (!columnNames.length) { + items.forEach(function(item) { + for (let columnName in item) { + if (columnNames.indexOf(columnName) === -1) columnNames.push(columnName) + } + }) + } + + // initialize column defaults (each column inherits from options.config) + let columns = columnNames.reduce((columns, columnName) => { + let column = Object.create(options) + columns[columnName] = mixin(column, columnConfigs[columnName]) + return columns + }, Object.create(null)) + + // sanitize column settings + columnNames.forEach(columnName => { + let column = columns[columnName] + column.name = columnName + column.maxWidth = Math.ceil(column.maxWidth) + column.minWidth = Math.ceil(column.minWidth) + column.truncate = !!column.truncate + column.align = column.align || 'left' + }) + + // sanitize data + items = items.map(item => { + let result = Object.create(null) + columnNames.forEach(columnName => { + // null/undefined -> '' + result[columnName] = item[columnName] != null ? item[columnName] : '' + // toString everything + result[columnName] = '' + result[columnName] + if (columns[columnName].preserveNewLines) { + // merge non-newline whitespace chars + result[columnName] = result[columnName].replace(/[^\S\n]/gmi, ' ') + } else { + // merge all whitespace chars + result[columnName] = result[columnName].replace(/\s/gmi, ' ') + } + }) + return result + }) + + // transform data cells + columnNames.forEach(columnName => { + let column = columns[columnName] + items = items.map((item, index) => { + let col = Object.create(column) + item[columnName] = column.dataTransform(item[columnName], col, index) + + let changedKeys = Object.keys(col) + // disable default heading transform if we wrote to column.name + if (changedKeys.indexOf('name') !== -1) { + if (column.headingTransform !== DEFAULT_HEADING_TRANSFORM) return + column.headingTransform = heading => heading + } + changedKeys.forEach(key => column[key] = col[key]) + return item + }) + }) + + // add headers + let headers = {} + if(options.showHeaders) { + columnNames.forEach(columnName => { + let column = columns[columnName] + + if(!column.showHeaders){ + headers[columnName] = ''; + return; + } + + headers[columnName] = column.headingTransform(column.name) + }) + items.unshift(headers) + } + // get actual max-width between min & max + // based on length of data in columns + columnNames.forEach(columnName => { + let column = columns[columnName] + column.width = items + .map(item => item[columnName]) + .reduce((min, cur) => { + // if already at maxWidth don't bother testing + if (min >= column.maxWidth) return min + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))) + }, 0) + }) + + // split long words so they can break onto multiple lines + columnNames.forEach(columnName => { + let column = columns[columnName] + items = items.map(item => { + item[columnName] = splitLongWords(item[columnName], column.width, column.truncateMarker) + return item + }) + }) + + // wrap long lines. each item is now an array of lines. + columnNames.forEach(columnName => { + let column = columns[columnName] + items = items.map((item, index) => { + let cell = item[columnName] + item[columnName] = splitIntoLines(cell, column.width) + + // if truncating required, only include first line + add truncation char + if (column.truncate && item[columnName].length > 1) { + item[columnName] = splitIntoLines(cell, column.width - wcwidth(column.truncateMarker)) + let firstLine = item[columnName][0] + if (!endsWith(firstLine, column.truncateMarker)) item[columnName][0] += column.truncateMarker + item[columnName] = item[columnName].slice(0, 1) + } + return item + }) + }) + + // recalculate column widths from truncated output/lines + columnNames.forEach(columnName => { + let column = columns[columnName] + column.width = items.map(item => { + return item[columnName].reduce((min, cur) => { + if (min >= column.maxWidth) return min + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))) + }, 0) + }).reduce((min, cur) => { + if (min >= column.maxWidth) return min + return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, cur))) + }, 0) + }) + + + let rows = createRows(items, columns, columnNames, options.paddingChr) // merge lines into rows + // conceive output + return rows.reduce((output, row) => { + return output.concat(row.reduce((rowOut, line) => { + return rowOut.concat(line.join(options.columnSplitter)) + }, [])) + }, []) + .map(line => truncateString(line, maxLineWidth)) + .join(options.spacing) +} + +/** + * Convert wrapped lines into rows with padded values. + * + * @param Array items data to process + * @param Array columns column width settings for wrapping + * @param Array columnNames column ordering + * @return Array items wrapped in arrays, corresponding to lines + */ + +function createRows(items, columns, columnNames, paddingChr) { + return items.map(item => { + let row = [] + let numLines = 0 + columnNames.forEach(columnName => { + numLines = Math.max(numLines, item[columnName].length) + }) + // combine matching lines of each rows + for (let i = 0; i < numLines; i++) { + row[i] = row[i] || [] + columnNames.forEach(columnName => { + let column = columns[columnName] + let val = item[columnName][i] || '' // || '' ensures empty columns get padded + if (column.align === 'right') row[i].push(padLeft(val, column.width, paddingChr)) + else if (column.align === 'center' || column.align === 'centre') row[i].push(padCenter(val, column.width, paddingChr)) + else row[i].push(padRight(val, column.width, paddingChr)) + }) + } + return row + }) +} + +/** + * Object.assign + * + * @return Object Object with properties mixed in. + */ + +function mixin(...args) { + if (Object.assign) return Object.assign(...args) + return ObjectAssign(...args) +} + +function ObjectAssign(target, firstSource) { + "use strict"; + if (target === undefined || target === null) + throw new TypeError("Cannot convert first argument to object"); + + var to = Object(target); + + var hasPendingException = false; + var pendingException; + + for (var i = 1; i < arguments.length; i++) { + var nextSource = arguments[i]; + if (nextSource === undefined || nextSource === null) + continue; + + var keysArray = Object.keys(Object(nextSource)); + for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { + var nextKey = keysArray[nextIndex]; + try { + var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) + to[nextKey] = nextSource[nextKey]; + } catch (e) { + if (!hasPendingException) { + hasPendingException = true; + pendingException = e; + } + } + } + + if (hasPendingException) + throw pendingException; + } + return to; +} + +/** + * Adapted from String.prototype.endsWith polyfill. + */ + +function endsWith(target, searchString, position) { + position = position || target.length; + position = position - searchString.length; + let lastIndex = target.lastIndexOf(searchString); + return lastIndex !== -1 && lastIndex === position; +} + + +function toArray(items, columnNames) { + if (Array.isArray(items)) return items + let rows = [] + for (let key in items) { + let item = {} + item[columnNames[0] || 'key'] = key + item[columnNames[1] || 'value'] = items[key] + rows.push(item) + } + return rows +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/package.json new file mode 100644 index 00000000..9fbbd039 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/package.json @@ -0,0 +1,74 @@ +{ + "name": "columnify", + "version": "1.5.4", + "description": "Render data in text columns. Supports in-column text-wrap.", + "main": "columnify.js", + "scripts": { + "pretest": "npm prune", + "test": "make prepublish && tape test/*.js | tap-spec", + "bench": "npm test && node bench", + "prepublish": "make prepublish" + }, + "babel": { + "presets": [ + "es2015" + ] + }, + "author": { + "name": "Tim Oxley" + }, + "license": "MIT", + "devDependencies": { + "babel": "^6.3.26", + "babel-cli": "^6.3.17", + "babel-preset-es2015": "^6.3.13", + "chalk": "^1.1.1", + "tap-spec": "^4.1.1", + "tape": "^4.4.0" + }, + "repository": { + "type": "git", + "url": "git://github.com/timoxley/columnify.git" + }, + "keywords": [ + "column", + "text", + "ansi", + "console", + "terminal", + "wrap", + "table" + ], + "bugs": { + "url": "https://github.com/timoxley/columnify/issues" + }, + "homepage": "https://github.com/timoxley/columnify", + "dependencies": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + }, + "directories": { + "test": "test" + }, + "gitHead": "b5373b3d6344bf59e1ab63c912c188c34bce5889", + "_id": "columnify@1.5.4", + "_shasum": "4737ddf1c7b69a8a7c340570782e947eec8e78bb", + "_from": "columnify@latest", + "_npmVersion": "2.14.7", + "_nodeVersion": "4.2.3", + "_npmUser": { + "name": "timoxley", + "email": "secoif@gmail.com" + }, + "maintainers": [ + { + "name": "timoxley", + "email": "secoif@gmail.com" + } + ], + "dist": { + "shasum": "4737ddf1c7b69a8a7c340570782e947eec8e78bb", + "tarball": "http://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz" + }, + "_resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/utils.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/utils.js new file mode 100644 index 00000000..22a1aaeb --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/utils.js @@ -0,0 +1,193 @@ +"use strict" + +var wcwidth = require('./width') + +/** + * repeat string `str` up to total length of `len` + * + * @param String str string to repeat + * @param Number len total length of output string + */ + +function repeatString(str, len) { + return Array.apply(null, {length: len + 1}).join(str).slice(0, len) +} + +/** + * Pad `str` up to total length `max` with `chr`. + * If `str` is longer than `max`, padRight will return `str` unaltered. + * + * @param String str string to pad + * @param Number max total length of output string + * @param String chr optional. Character to pad with. default: ' ' + * @return String padded str + */ + +function padRight(str, max, chr) { + str = str != null ? str : '' + str = String(str) + var length = max - wcwidth(str) + if (length <= 0) return str + return str + repeatString(chr || ' ', length) +} + +/** + * Pad `str` up to total length `max` with `chr`. + * If `str` is longer than `max`, padCenter will return `str` unaltered. + * + * @param String str string to pad + * @param Number max total length of output string + * @param String chr optional. Character to pad with. default: ' ' + * @return String padded str + */ + +function padCenter(str, max, chr) { + str = str != null ? str : '' + str = String(str) + var length = max - wcwidth(str) + if (length <= 0) return str + var lengthLeft = Math.floor(length/2) + var lengthRight = length - lengthLeft + return repeatString(chr || ' ', lengthLeft) + str + repeatString(chr || ' ', lengthRight) +} + +/** + * Pad `str` up to total length `max` with `chr`, on the left. + * If `str` is longer than `max`, padRight will return `str` unaltered. + * + * @param String str string to pad + * @param Number max total length of output string + * @param String chr optional. Character to pad with. default: ' ' + * @return String padded str + */ + +function padLeft(str, max, chr) { + str = str != null ? str : '' + str = String(str) + var length = max - wcwidth(str) + if (length <= 0) return str + return repeatString(chr || ' ', length) + str +} + +/** + * Split a String `str` into lines of maxiumum length `max`. + * Splits on word boundaries. Preserves existing new lines. + * + * @param String str string to split + * @param Number max length of each line + * @return Array Array containing lines. + */ + +function splitIntoLines(str, max) { + function _splitIntoLines(str, max) { + return str.trim().split(' ').reduce(function(lines, word) { + var line = lines[lines.length - 1] + if (line && wcwidth(line.join(' ')) + wcwidth(word) < max) { + lines[lines.length - 1].push(word) // add to line + } + else lines.push([word]) // new line + return lines + }, []).map(function(l) { + return l.join(' ') + }) + } + return str.split('\n').map(function(str) { + return _splitIntoLines(str, max) + }).reduce(function(lines, line) { + return lines.concat(line) + }, []) +} + +/** + * Add spaces and `truncationChar` between words of + * `str` which are longer than `max`. + * + * @param String str string to split + * @param Number max length of each line + * @param Number truncationChar character to append to split words + * @return String + */ + +function splitLongWords(str, max, truncationChar) { + str = str.trim() + var result = [] + var words = str.split(' ') + var remainder = '' + + var truncationWidth = wcwidth(truncationChar) + + while (remainder || words.length) { + if (remainder) { + var word = remainder + remainder = '' + } else { + var word = words.shift() + } + + if (wcwidth(word) > max) { + // slice is based on length no wcwidth + var i = 0 + var wwidth = 0 + var limit = max - truncationWidth + while (i < word.length) { + var w = wcwidth(word.charAt(i)) + if (w + wwidth > limit) { + break + } + wwidth += w + ++i + } + + remainder = word.slice(i) // get remainder + // save remainder for next loop + + word = word.slice(0, i) // grab truncated word + word += truncationChar // add trailing … or whatever + } + result.push(word) + } + + return result.join(' ') +} + + +/** + * Truncate `str` into total width `max` + * If `str` is shorter than `max`, will return `str` unaltered. + * + * @param String str string to truncated + * @param Number max total wcwidth of output string + * @return String truncated str + */ + +function truncateString(str, max) { + + str = str != null ? str : '' + str = String(str) + + if(max == Infinity) return str + + var i = 0 + var wwidth = 0 + while (i < str.length) { + var w = wcwidth(str.charAt(i)) + if(w + wwidth > max) + break + wwidth += w + ++i + } + return str.slice(0, i) +} + + + +/** + * Exports + */ + +module.exports.padRight = padRight +module.exports.padCenter = padCenter +module.exports.padLeft = padLeft +module.exports.splitIntoLines = splitIntoLines +module.exports.splitLongWords = splitLongWords +module.exports.truncateString = truncateString diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/width.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/width.js new file mode 100644 index 00000000..bc061d03 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/columnify/width.js @@ -0,0 +1,6 @@ +var stripAnsi = require('strip-ansi') +var wcwidth = require('wcwidth') + +module.exports = function(str) { + return wcwidth(stripAnsi(str)) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/.npmignore new file mode 100644 index 00000000..19edf194 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/LICENCE b/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/LICENCE new file mode 100644 index 00000000..38f32cf1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/index.js new file mode 100644 index 00000000..588ee646 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/index.js @@ -0,0 +1,282 @@ +var ProtoList = require('proto-list') + , path = require('path') + , fs = require('fs') + , ini = require('ini') + , EE = require('events').EventEmitter + , url = require('url') + , http = require('http') + +var exports = module.exports = function () { + var args = [].slice.call(arguments) + , conf = new ConfigChain() + + while(args.length) { + var a = args.shift() + if(a) conf.push + ( 'string' === typeof a + ? json(a) + : a ) + } + + return conf +} + +//recursively find a file... + +var find = exports.find = function () { + var rel = path.join.apply(null, [].slice.call(arguments)) + + function find(start, rel) { + var file = path.join(start, rel) + try { + fs.statSync(file) + return file + } catch (err) { + if(path.dirname(start) !== start) // root + return find(path.dirname(start), rel) + } + } + return find(__dirname, rel) +} + +var parse = exports.parse = function (content, file, type) { + content = '' + content + // if we don't know what it is, try json and fall back to ini + // if we know what it is, then it must be that. + if (!type) { + try { return JSON.parse(content) } + catch (er) { return ini.parse(content) } + } else if (type === 'json') { + if (this.emit) { + try { return JSON.parse(content) } + catch (er) { this.emit('error', er) } + } else { + return JSON.parse(content) + } + } else { + return ini.parse(content) + } +} + +var json = exports.json = function () { + var args = [].slice.call(arguments).filter(function (arg) { return arg != null }) + var file = path.join.apply(null, args) + var content + try { + content = fs.readFileSync(file,'utf-8') + } catch (err) { + return + } + return parse(content, file, 'json') +} + +var env = exports.env = function (prefix, env) { + env = env || process.env + var obj = {} + var l = prefix.length + for(var k in env) { + if(k.indexOf(prefix) === 0) + obj[k.substring(l)] = env[k] + } + + return obj +} + +exports.ConfigChain = ConfigChain +function ConfigChain () { + EE.apply(this) + ProtoList.apply(this, arguments) + this._awaiting = 0 + this._saving = 0 + this.sources = {} +} + +// multi-inheritance-ish +var extras = { + constructor: { value: ConfigChain } +} +Object.keys(EE.prototype).forEach(function (k) { + extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k) +}) +ConfigChain.prototype = Object.create(ProtoList.prototype, extras) + +ConfigChain.prototype.del = function (key, where) { + // if not specified where, then delete from the whole chain, scorched + // earth style + if (where) { + var target = this.sources[where] + target = target && target.data + if (!target) { + return this.emit('error', new Error('not found '+where)) + } + delete target[key] + } else { + for (var i = 0, l = this.list.length; i < l; i ++) { + delete this.list[i][key] + } + } + return this +} + +ConfigChain.prototype.set = function (key, value, where) { + var target + + if (where) { + target = this.sources[where] + target = target && target.data + if (!target) { + return this.emit('error', new Error('not found '+where)) + } + } else { + target = this.list[0] + if (!target) { + return this.emit('error', new Error('cannot set, no confs!')) + } + } + target[key] = value + return this +} + +ConfigChain.prototype.get = function (key, where) { + if (where) { + where = this.sources[where] + if (where) where = where.data + if (where && Object.hasOwnProperty.call(where, key)) return where[key] + return undefined + } + return this.list[0][key] +} + +ConfigChain.prototype.save = function (where, type, cb) { + if (typeof type === 'function') cb = type, type = null + var target = this.sources[where] + if (!target || !(target.path || target.source) || !target.data) { + // TODO: maybe save() to a url target could be a PUT or something? + // would be easy to swap out with a reddis type thing, too + return this.emit('error', new Error('bad save target: '+where)) + } + + if (target.source) { + var pref = target.prefix || '' + Object.keys(target.data).forEach(function (k) { + target.source[pref + k] = target.data[k] + }) + return this + } + + var type = type || target.type + var data = target.data + if (target.type === 'json') { + data = JSON.stringify(data) + } else { + data = ini.stringify(data) + } + + this._saving ++ + fs.writeFile(target.path, data, 'utf8', function (er) { + this._saving -- + if (er) { + if (cb) return cb(er) + else return this.emit('error', er) + } + if (this._saving === 0) { + if (cb) cb() + this.emit('save') + } + }.bind(this)) + return this +} + +ConfigChain.prototype.addFile = function (file, type, name) { + name = name || file + var marker = {__source__:name} + this.sources[name] = { path: file, type: type } + this.push(marker) + this._await() + fs.readFile(file, 'utf8', function (er, data) { + if (er) this.emit('error', er) + this.addString(data, file, type, marker) + }.bind(this)) + return this +} + +ConfigChain.prototype.addEnv = function (prefix, env, name) { + name = name || 'env' + var data = exports.env(prefix, env) + this.sources[name] = { data: data, source: env, prefix: prefix } + return this.add(data, name) +} + +ConfigChain.prototype.addUrl = function (req, type, name) { + this._await() + var href = url.format(req) + name = name || href + var marker = {__source__:name} + this.sources[name] = { href: href, type: type } + this.push(marker) + http.request(req, function (res) { + var c = [] + var ct = res.headers['content-type'] + if (!type) { + type = ct.indexOf('json') !== -1 ? 'json' + : ct.indexOf('ini') !== -1 ? 'ini' + : href.match(/\.json$/) ? 'json' + : href.match(/\.ini$/) ? 'ini' + : null + marker.type = type + } + + res.on('data', c.push.bind(c)) + .on('end', function () { + this.addString(Buffer.concat(c), href, type, marker) + }.bind(this)) + .on('error', this.emit.bind(this, 'error')) + + }.bind(this)) + .on('error', this.emit.bind(this, 'error')) + .end() + + return this +} + +ConfigChain.prototype.addString = function (data, file, type, marker) { + data = this.parse(data, file, type) + this.add(data, marker) + return this +} + +ConfigChain.prototype.add = function (data, marker) { + if (marker && typeof marker === 'object') { + var i = this.list.indexOf(marker) + if (i === -1) { + return this.emit('error', new Error('bad marker')) + } + this.splice(i, 1, data) + marker = marker.__source__ + this.sources[marker] = this.sources[marker] || {} + this.sources[marker].data = data + // we were waiting for this. maybe emit 'load' + this._resolve() + } else { + if (typeof marker === 'string') { + this.sources[marker] = this.sources[marker] || {} + this.sources[marker].data = data + } + // trigger the load event if nothing was already going to do so. + this._await() + this.push(data) + process.nextTick(this._resolve.bind(this)) + } + return this +} + +ConfigChain.prototype.parse = exports.parse + +ConfigChain.prototype._await = function () { + this._awaiting++ +} + +ConfigChain.prototype._resolve = function () { + this._awaiting-- + if (this._awaiting === 0) this.emit('load', this) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/package.json new file mode 100644 index 00000000..854b983d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/package.json @@ -0,0 +1,61 @@ +{ + "name": "config-chain", + "version": "1.1.10", + "licenses": [ + { + "type": "MIT", + "url": "https://raw.githubusercontent.com/dominictarr/config-chain/master/LICENCE" + } + ], + "description": "HANDLE CONFIGURATION ONCE AND FOR ALL", + "homepage": "http://github.com/dominictarr/config-chain", + "repository": { + "type": "git", + "url": "git+https://github.com/dominictarr/config-chain.git" + }, + "dependencies": { + "proto-list": "~1.2.1", + "ini": "^1.3.4" + }, + "devDependencies": { + "tap": "0.3.0" + }, + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://dominictarr.com" + }, + "scripts": { + "test": "tap test/" + }, + "gitHead": "0b6db3e14b9cdbe31460292bc4caf3983f977816", + "bugs": { + "url": "https://github.com/dominictarr/config-chain/issues" + }, + "_id": "config-chain@1.1.10", + "_shasum": "7fc383de0fcc84d711cb465bd176579cad612346", + "_from": "config-chain@latest", + "_npmVersion": "3.3.12", + "_nodeVersion": "5.3.0", + "_npmUser": { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + }, + "dist": { + "shasum": "7fc383de0fcc84d711cb465bd176579cad612346", + "tarball": "http://registry.npmjs.org/config-chain/-/config-chain-1.1.10.tgz" + }, + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + }, + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.10.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/readme.markdown b/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/readme.markdown new file mode 100644 index 00000000..f6775f32 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/config-chain/readme.markdown @@ -0,0 +1,228 @@ +#config-chain + +USE THIS MODULE TO LOAD ALL YOUR CONFIGURATIONS + +``` js + + //npm install config-chain + + var cc = require('config-chain') + , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS. + , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS. + + // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN + // EARLIER ITEMS OVERIDE LATER ITEMS + // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST! + + //strings are interpereted as filenames. + //will be loaded synchronously + + var conf = + cc( + //OVERRIDE SETTINGS WITH COMMAND LINE OPTS + opts, + + //ENV VARS IF PREFIXED WITH 'myApp_' + + cc.env('myApp_'), //myApp_foo = 'like this' + + //FILE NAMED BY ENV + path.join(__dirname, 'config.' + env + '.json'), + + //IF `env` is PRODUCTION + env === 'prod' + ? path.join(__dirname, 'special.json') //load a special file + : null //NULL IS IGNORED! + + //SUBDIR FOR ENV CONFIG + path.join(__dirname, 'config', env, 'config.json'), + + //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE + cc.find('config.json'), + + //PUT DEFAULTS LAST + { + host: 'localhost' + port: 8000 + }) + + var host = conf.get('host') + + // or + + var host = conf.store.host + +``` + +FINALLY, EASY FLEXIBLE CONFIGURATIONS! + +##see also: [proto-list](https://github.com/isaacs/proto-list/) + +WHATS THAT YOU SAY? + +YOU WANT A "CLASS" SO THAT YOU CAN DO CRAYCRAY JQUERY CRAPS? + +EXTEND WITH YOUR OWN FUNCTIONALTY!? + +## CONFIGCHAIN LIVES TO SERVE ONLY YOU! + +```javascript +var cc = require('config-chain') + +// all the stuff you did before +var config = cc({ + some: 'object' + }, + cc.find('config.json'), + cc.env('myApp_') + ) + // CONFIGS AS A SERVICE, aka "CaaS", aka EVERY DEVOPS DREAM OMG! + .addUrl('http://configurator:1234/my-configs') + // ASYNC FTW! + .addFile('/path/to/file.json') + + // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT + // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST + // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE + .add({ another: 'object' }) + + // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!! + .on('error', function (er) { + // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW + // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\ + throw er + }) + + // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!! + .on('load', function (config) { + console.awesome('HOLY SHIT!') + }) +``` + +# BORING API DOCS + +## cc(...args) + +MAKE A CHAIN AND ADD ALL THE ARGS. + +If the arg is a STRING, then it shall be a JSON FILENAME. + +SYNC I/O! + +RETURN THE CHAIN! + +## cc.json(...args) + +Join the args INTO A JSON FILENAME! + +SYNC I/O! + +## cc.find(relativePath) + +SEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES. + +RETURN THE FOUND PATH! + +SYNC I/O! + +## cc.parse(content, file, type) + +Parse the content string, and guess the type from either the +specified type or the filename. + +RETURN THE RESULTING OBJECT! + +NO I/O! + +## cc.env(prefix, env=process.env) + +Get all the keys on the provided env object (or process.env) which are +prefixed by the specified prefix, and put the values on a new object. + +RETURN THE RESULTING OBJECT! + +NO I/O! + +## cc.ConfigChain() + +The ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING! + +One of these is returned by the main exported function, as well. + +It inherits (prototypically) from +[ProtoList](https://github.com/isaacs/proto-list/), and also inherits +(parasitically) from +[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter) + +It has all the methods from both, and except where noted, they are +unchanged. + +### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain. + +## chain.sources + +A list of all the places where it got stuff. The keys are the names +passed to addFile or addUrl etc, and the value is an object with some +info about the data source. + +## chain.addFile(filename, type, [name=filename]) + +Filename is the name of the file. Name is an arbitrary string to be +used later if you desire. Type is either 'ini' or 'json', and will +try to guess intelligently if omitted. + +Loaded files can be saved later. + +## chain.addUrl(url, type, [name=url]) + +Same as the filename thing, but with a url. + +Can't be saved later. + +## chain.addEnv(prefix, env, [name='env']) + +Add all the keys from the env object that start with the prefix. + +## chain.addString(data, file, type, [name]) + +Parse the string and add it to the set. (Mainly used internally.) + +## chain.add(object, [name]) + +Add the object to the set. + +## chain.root {Object} + +The root from which all the other config objects in the set descend +prototypically. + +Put your defaults here. + +## chain.set(key, value, name) + +Set the key to the value on the named config object. If name is +unset, then set it on the first config object in the set. (That is, +the one with the highest priority, which was added first.) + +## chain.get(key, [name]) + +Get the key from the named config object explicitly, or from the +resolved configs if not specified. + +## chain.save(name, type) + +Write the named config object back to its origin. + +Currently only supported for env and file config types. + +For files, encode the data according to the type. + +## chain.on('save', function () {}) + +When one or more files are saved, emits `save` event when they're all +saved. + +## chain.on('load', function (chain) {}) + +When the config chain has loaded all the specified files and urls and +such, the 'load' event fires. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/.travis.yml new file mode 100644 index 00000000..e742b52c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +before_script: npm install -g npm@latest +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/README.md new file mode 100644 index 00000000..fbe614f0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/README.md @@ -0,0 +1,29 @@ +# dezalgo + +Contain async insanity so that the dark pony lord doesn't eat souls + +See [this blog +post](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony). + +## USAGE + +Pass a callback to `dezalgo` and it will ensure that it is *always* +called in a future tick, and never in this tick. + +```javascript +var dz = require('dezalgo') + +var cache = {} +function maybeSync(arg, cb) { + cb = dz(cb) + + // this will actually defer to nextTick + if (cache[arg]) cb(null, cache[arg]) + + fs.readFile(arg, function (er, data) { + // since this is *already* defered, it will call immediately + if (er) cb(er) + cb(null, cache[arg] = data) + }) +} +``` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/dezalgo.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/dezalgo.js new file mode 100644 index 00000000..3d3b39c8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/dezalgo.js @@ -0,0 +1,22 @@ +var wrappy = require('wrappy') +module.exports = wrappy(dezalgo) + +var asap = require('asap') + +function dezalgo (cb) { + var sync = true + asap(function () { + sync = false + }) + + return function zalgoSafe() { + var args = arguments + var me = this + if (sync) + asap(function() { + cb.apply(me, args) + }) + else + cb.apply(me, args) + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/package.json new file mode 100644 index 00000000..8997465c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/dezalgo/package.json @@ -0,0 +1,52 @@ +{ + "name": "dezalgo", + "version": "1.0.3", + "description": "Contain async insanity so that the dark pony lord doesn't eat souls", + "main": "dezalgo.js", + "directories": { + "test": "test" + }, + "dependencies": { + "asap": "^2.0.0", + "wrappy": "1" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/dezalgo.git" + }, + "keywords": [ + "async", + "zalgo", + "the dark pony", + "he comes", + "asynchrony of all holy and good", + "T̯̪ͅo̯͖̹ ̻̮̖̲͢i̥̖n̢͈͇̝͍v͏͉ok̭̬̝ͅe̞͍̩̫͍̩͝ ̩̮̖̟͇͉́t͔͔͎̗h͏̗̟e̘͉̰̦̠̞͓ ͕h͉̟͎̪̠̱͠ḭ̮̩v̺͉͇̩e̵͖-̺̪m͍i̜n̪̲̲̲̮d̷ ̢r̠̼̯̹̦̦͘ͅe͓̳͓̙p̺̗̫͙͘ͅr͔̰͜e̴͓̞s͉̩̩͟ͅe͏̣n͚͇̗̭̺͍tì͙̣n͏̖̥̗͎̰̪g̞͓̭̱̯̫̕ ̣̱͜ͅc̦̰̰̠̮͎͙̀hao̺̜̻͍͙ͅs͉͓̘.͎̼̺̼͕̹͘", + "̠̞̱̰I͖͇̝̻n̦̰͍̰̟v̤̺̫̳̭̼̗͘ò̹̟̩̩͚k̢̥̠͍͉̦̬i̖͓͔̮̱̻͘n̶̳͙̫͎g̖̯̣̲̪͉ ̞͎̗͕͚ͅt̲͕̘̺̯̗̦h̘̦̲̜̻e̳͎͉̬͙ ̴̞̪̲̥f̜̯͓͓̭̭͢e̱̘͔̮e̜̤l̺̱͖̯͓͙͈͢i̵̦̬͉͔̫͚͕n͉g̨͖̙̙̹̹̟̤ ͉̪o̞̠͍̪̰͙ͅf̬̲̺ ͔͕̲͕͕̲̕c̙͉h̝͔̩̙̕ͅa̲͖̻̗̹o̥̼̫s̝̖̜̝͚̫̟.̺͚ ̸̱̲W̶̥̣͖̦i͏̤̬̱̳̣ͅt͉h̗̪̪ ̷̱͚̹̪ǫ͕̗̣̳̦͎u̼̦͔̥̮̕ţ͖͎̻͔͉ ̴͎̩òr̹̰̖͉͈͝d̷̲̦̖͓e̲͓̠r", + "̧͚̜͓̰̭̭Ṯ̫̹̜̮̟̮͝h͚̘̩̘̖̰́e ̥̘͓͉͔͙̼N̟̜̣̘͔̪e̞̞̤͢z̰̖̘͇p̠͟e̺̱̣͍͙̝ṛ̘̬͔̙͇̠d͝ḭ̯̱̥̗̩a̛ͅn͏̦ ̷̥hi̥v̖̳̹͉̮̱͝e̹̪̘̖̰̟-̴͙͓͚̜̻mi̗̺̻͙̺ͅn̪̯͈d ͏̘͓̫̳ͅơ̹͔̳̖̣͓f͈̹̘ ͕ͅc̗̤̠̜̮̥̥h̡͍̩̭̫͚̱a̤͉̤͔͜os͕̤̼͍̲̀ͅ.̡̱ ̦Za̯̱̗̭͍̣͚l̗͉̰̤g͏̣̭̬̗̲͖ͅo̶̭̩̳̟͈.̪̦̰̳", + "H̴̱̦̗̬̣͓̺e̮ ͉̠̰̞͎̖͟ẁh̛̺̯ͅo̖̫͡ ̢Ẁa̡̗i̸t͖̣͉̀ş͔̯̩ ̤̦̮͇̞̦̲B͎̭͇̦̼e̢hin͏͙̟̪d̴̰͓̻̣̮͕ͅ T͖̮̕h͖e̘̺̰̙͘ ̥Ẁ̦͔̻͚a̞͖̪͉l̪̠̻̰̣̠l̲͎͞", + "Z̘͍̼͎̣͔͝Ą̲̜̱̱̹̤͇L̶̝̰̭͔G͍̖͍O̫͜ͅ!̼̤ͅ", + "H̝̪̜͓̀̌̂̒E̢̙̠̣ ̴̳͇̥̟̠͍̐C̹̓̑̐̆͝Ó̶̭͓̚M̬̼Ĕ̖̤͔͔̟̹̽̿̊ͥ̍ͫS̻̰̦̻̖̘̱̒ͪ͌̅͟" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/dezalgo/issues" + }, + "homepage": "https://github.com/npm/dezalgo", + "readme": "# dezalgo\n\nContain async insanity so that the dark pony lord doesn't eat souls\n\nSee [this blog\npost](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony).\n\n## USAGE\n\nPass a callback to `dezalgo` and it will ensure that it is *always*\ncalled in a future tick, and never in this tick.\n\n```javascript\nvar dz = require('dezalgo')\n\nvar cache = {}\nfunction maybeSync(arg, cb) {\n cb = dz(cb)\n\n // this will actually defer to nextTick\n if (cache[arg]) cb(null, cache[arg])\n\n fs.readFile(arg, function (er, data) {\n // since this is *already* defered, it will call immediately\n if (er) cb(er)\n cb(null, cache[arg] = data)\n })\n}\n```\n", + "readmeFilename": "README.md", + "gitHead": "d4d3f3f6f47b1a326194d5281349c83dde258458", + "_id": "dezalgo@1.0.3", + "_shasum": "7f742de066fc748bc8db820569dddce49bf0d456", + "_from": "dezalgo@>=1.0.3 <1.1.0" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/LICENSE new file mode 100644 index 00000000..833ab5d3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/LICENSE @@ -0,0 +1,21 @@ +Copyright 2013 James Halliday (mail@substack.net) + +This project is free software released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/README.markdown b/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/README.markdown new file mode 100644 index 00000000..27b860d1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/README.markdown @@ -0,0 +1,54 @@ +editor +====== + +Launch $EDITOR in your program. + +example +======= + +``` js +var editor = require('editor'); +editor('beep.json', function (code, sig) { + console.log('finished editing with code ' + code); +}); +``` + +*** + +``` +$ node edit.js +``` + +![editor](http://substack.net/images/screenshots/editor.png) + +``` +finished editing with code 0 +``` + +methods +======= + +``` js +var editor = require('editor') +``` + +editor(file, opts={}, cb) +------------------------- + +Launch the `$EDITOR` (or `opts.editor`) for `file`. + +When the editor exits, `cb(code, sig)` fires. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install editor +``` + +license +======= + +MIT diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/index.js new file mode 100644 index 00000000..ba1a42b9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/index.js @@ -0,0 +1,20 @@ +var spawn = require('child_process').spawn; + +module.exports = function (file, opts, cb) { + if (typeof opts === 'function') { + cb = opts; + opts = {}; + } + if (!opts) opts = {}; + + var ed = /^win/.test(process.platform) ? 'notepad' : 'vim'; + var editor = opts.editor || process.env.VISUAL || process.env.EDITOR || ed; + var args = editor.split(/\s+/); + var bin = args.shift(); + + var ps = spawn(bin, args.concat([ file ]), { stdio: 'inherit' }); + + ps.on('exit', function (code, sig) { + if (typeof cb === 'function') cb(code, sig) + }); +}; diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/package.json new file mode 100644 index 00000000..a11d2277 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/editor/package.json @@ -0,0 +1,60 @@ +{ + "name": "editor", + "version": "1.0.0", + "description": "launch $EDITOR in your program", + "main": "index.js", + "directories": { + "example": "example", + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "~0.4.4" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/node-editor.git" + }, + "homepage": "https://github.com/substack/node-editor", + "keywords": [ + "text", + "edit", + "shell" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "engine": { + "node": ">=0.6" + }, + "gitHead": "15200af2c417c65a4df153f39f32143dcd476375", + "bugs": { + "url": "https://github.com/substack/node-editor/issues" + }, + "_id": "editor@1.0.0", + "_shasum": "60c7f87bd62bcc6a894fa8ccd6afb7823a24f742", + "_from": "editor@>=1.0.0 <1.1.0", + "_npmVersion": "2.7.5", + "_nodeVersion": "1.6.3", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "60c7f87bd62bcc6a894fa8ccd6afb7823a24f742", + "tarball": "http://registry.npmjs.org/editor/-/editor-1.0.0.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "_resolved": "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/.eslintrc b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/.eslintrc new file mode 100644 index 00000000..8afd0e88 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/.eslintrc @@ -0,0 +1,18 @@ +{ + "env" : { + "node" : true + }, + "rules" : { + "curly" : 0, + "no-lonely-if" : 1, + "no-mixed-requires" : 0, + "no-underscore-dangle" : 0, + "no-unused-vars" : [2, {"vars" : "all", "args" : "after-used"}], + "no-use-before-define" : [2, "nofunc"], + "quotes" : [1, "double", "avoid-escape"], + "semi" : [2, "never"], + "space-after-keywords" : 1, + "space-infix-ops" : 0, + "strict" : 0 + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/.npmignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/LICENSE new file mode 100644 index 00000000..2be9c78b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Forrest L Norvell + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/README.md new file mode 100644 index 00000000..87ce0cae --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/README.md @@ -0,0 +1,33 @@ +# fs-vacuum + +Remove the empty branches of a directory tree, optionally up to (but not +including) a specified base directory. Optionally nukes the leaf directory. + +## Usage + +```javascript +var logger = require("npmlog"); +var vacuum = require("fs-vacuum"); + +var options = { + base : "/path/to/my/tree/root", + purge : true, + log : logger.silly.bind(logger, "myCleanup") +}; + +/* Assuming there are no other files or directories in "out", "to", or "my", + * the final path will just be "/path/to/my/tree/root". + */ +vacuum("/path/to/my/tree/root/out/to/my/files", function (error) { + if (error) console.error("Unable to cleanly vacuum:", error.message); +}); +``` +# vacuum(directory, options, callback) + +* `directory` {String} Leaf node to remove. **Must be a directory, symlink, or file.** +* `options` {Object} + * `base` {String} No directories at or above this level of the filesystem will be removed. + * `purge` {Boolean} If set, nuke the whole leaf directory, including its contents. + * `log` {Function} A logging function that takes `npmlog`-compatible argument lists. +* `callback` {Function} Function to call once vacuuming is complete. + * `error` {Error} What went wrong along the way, if anything. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/package.json new file mode 100644 index 00000000..97813203 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/package.json @@ -0,0 +1,43 @@ +{ + "name": "fs-vacuum", + "version": "1.2.7", + "description": "recursively remove empty directories -- to a point", + "main": "vacuum.js", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fs-vacuum.git" + }, + "keywords": [ + "rm", + "rimraf", + "clean" + ], + "author": { + "name": "Forrest L Norvell", + "email": "ogd@aoaioxxysz.net" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/fs-vacuum/issues" + }, + "homepage": "https://github.com/npm/fs-vacuum", + "devDependencies": { + "mkdirp": "^0.5.0", + "tap": "^0.4.11", + "tmp": "0.0.24" + }, + "dependencies": { + "graceful-fs": "^4.1.2", + "path-is-inside": "^1.0.1", + "rimraf": "^2.2.8" + }, + "readme": "# fs-vacuum\n\nRemove the empty branches of a directory tree, optionally up to (but not\nincluding) a specified base directory. Optionally nukes the leaf directory.\n\n## Usage\n\n```javascript\nvar logger = require(\"npmlog\");\nvar vacuum = require(\"fs-vacuum\");\n\nvar options = {\n base : \"/path/to/my/tree/root\",\n purge : true,\n log : logger.silly.bind(logger, \"myCleanup\")\n};\n\n/* Assuming there are no other files or directories in \"out\", \"to\", or \"my\",\n * the final path will just be \"/path/to/my/tree/root\".\n */\nvacuum(\"/path/to/my/tree/root/out/to/my/files\", function (error) {\n if (error) console.error(\"Unable to cleanly vacuum:\", error.message);\n});\n```\n# vacuum(directory, options, callback)\n\n* `directory` {String} Leaf node to remove. **Must be a directory, symlink, or file.**\n* `options` {Object}\n * `base` {String} No directories at or above this level of the filesystem will be removed.\n * `purge` {Boolean} If set, nuke the whole leaf directory, including its contents.\n * `log` {Function} A logging function that takes `npmlog`-compatible argument lists.\n* `callback` {Function} Function to call once vacuuming is complete.\n * `error` {Error} What went wrong along the way, if anything.\n", + "readmeFilename": "README.md", + "gitHead": "498a44d987ee11bc355fe1ec479d55a689fc37ef", + "_id": "fs-vacuum@1.2.7", + "_shasum": "75e501f9d2889ba2fe9fe12f936ba5dad50ca35a", + "_from": "fs-vacuum@1.2.7" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/vacuum.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/vacuum.js new file mode 100644 index 00000000..4b867f67 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-vacuum/vacuum.js @@ -0,0 +1,114 @@ +var assert = require("assert") +var dirname = require("path").dirname +var resolve = require("path").resolve +var isInside = require("path-is-inside") + +var rimraf = require("rimraf") +var lstat = require("graceful-fs").lstat +var readdir = require("graceful-fs").readdir +var rmdir = require("graceful-fs").rmdir +var unlink = require("graceful-fs").unlink + +module.exports = vacuum + +function vacuum(leaf, options, cb) { + assert(typeof leaf === "string", "must pass in path to remove") + assert(typeof cb === "function", "must pass in callback") + + if (!options) options = {} + assert(typeof options === "object", "options must be an object") + + var log = options.log ? options.log : function () {} + + leaf = leaf && resolve(leaf) + var base = options.base && resolve(options.base) + if (base && !isInside(leaf, base)) { + return cb(new Error(leaf + " is not a child of " + base)) + } + + lstat(leaf, function (error, stat) { + if (error) { + if (error.code === "ENOENT") return cb(null) + + log(error.stack) + return cb(error) + } + + if (!(stat && (stat.isDirectory() || stat.isSymbolicLink() || stat.isFile()))) { + log(leaf, "is not a directory, file, or link") + return cb(new Error(leaf + " is not a directory, file, or link")) + } + + if (options.purge) { + log("purging", leaf) + rimraf(leaf, function (error) { + if (error) return cb(error) + + next(dirname(leaf)) + }) + } + else if (!stat.isDirectory()) { + log("removing", leaf) + unlink(leaf, function (error) { + if (error) return cb(error) + + next(dirname(leaf)) + }) + } + else { + next(leaf) + } + }) + + function next(branch) { + branch = branch && resolve(branch) + // either we've reached the base or we've reached the root + if ((base && branch === base) || branch === dirname(branch)) { + log("finished vacuuming up to", branch) + return cb(null) + } + + readdir(branch, function (error, files) { + if (error) { + if (error.code === "ENOENT") return cb(null) + + log("unable to check directory", branch, "due to", error.message) + return cb(error) + } + + if (files.length > 0) { + log("quitting because other entries in", branch) + return cb(null) + } + + log("removing", branch) + lstat(branch, function (error, stat) { + if (error) { + if (error.code === "ENOENT") return cb(null) + + log("unable to lstat", branch, "due to", error.message) + return cb(error) + } + + var remove = stat.isDirectory() ? rmdir : unlink + remove(branch, function (error) { + if (error) { + if (error.code === "ENOENT") { + log("quitting because lost the race to remove", branch) + return cb(null) + } + if (error.code === "ENOTEMPTY") { + log("quitting because new (racy) entries in", branch) + return cb(null) + } + + log("unable to remove", branch, "due to", error.message) + return cb(error) + } + + next(dirname(branch)) + }) + }) + }) + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/.npmignore new file mode 100644 index 00000000..373acdfc --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +coverage/ +.nyc_output/ diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/.travis.yml new file mode 100644 index 00000000..34ca82b0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +sudo: false +before_install: + - "npm -g install npm" +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" + - "4" + - "5" diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/README.md new file mode 100644 index 00000000..5331cc4b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/README.md @@ -0,0 +1,35 @@ +# fs-write-stream-atomic + +Like `fs.createWriteStream(...)`, but atomic. + +Writes to a tmp file and does an atomic `fs.rename` to move it into +place when it's done. + +First rule of debugging: **It's always a race condition.** + +## USAGE + +```javascript +var fsWriteStreamAtomic = require('fs-write-stream-atomic') +// options are optional. +var write = fsWriteStreamAtomic('output.txt', options) +var read = fs.createReadStream('input.txt') +read.pipe(write) + +// When the write stream emits a 'finish' or 'close' event, +// you can be sure that it is moved into place, and contains +// all the bytes that were written to it, even if something else +// was writing to `output.txt` at the same time. +``` + +### `fsWriteStreamAtomic(filename, [options])` + +* `filename` {String} The file we want to write to +* `options` {Object} + * `chown` {Object} User and group to set ownership after write + * `uid` {Number} + * `gid` {Number} + * `encoding` {String} default = 'utf8' + * `mode` {Number} default = `0666` + * `flags` {String} default = `'w'` + diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/index.js new file mode 100644 index 00000000..f7f3c1e2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/index.js @@ -0,0 +1,124 @@ +var fs = require('graceful-fs') +var Writable = require('readable-stream').Writable +var util = require('util') +var MurmurHash3 = require('imurmurhash') +var iferr = require('iferr') + +function murmurhex () { + var hash = MurmurHash3('') + for (var ii = 0; ii < arguments.length; ++ii) { + hash.hash(hash + arguments[ii]) + } + return hash.result() +} + +var invocations = 0 +function getTmpname (filename) { + return filename + '.' + murmurhex(__filename, process.pid, ++invocations) +} + +var setImmediate = global.setImmediate || setTimeout + +module.exports = WriteStreamAtomic + +// Requirements: +// 1. Write everything written to the stream to a temp file. +// 2. If there are no errors: +// a. moves the temp file into its final destination +// b. emits `finish` & `closed` ONLY after the file is +// fully flushed and renamed. +// 3. If there's an error, removes the temp file. + +util.inherits(WriteStreamAtomic, Writable) +function WriteStreamAtomic (path, options) { + if (!(this instanceof WriteStreamAtomic)) { + return new WriteStreamAtomic(path, options) + } + Writable.call(this, options) + + this.__atomicTarget = path + this.__atomicTmp = getTmpname(path) + + this.__atomicChown = options && options.chown + + this.__atomicClosed = false + + this.__atomicStream = fs.WriteStream(this.__atomicTmp, options) + + this.__atomicStream.once('open', handleOpen(this)) + this.__atomicStream.once('close', handleClose(this)) + this.__atomicStream.once('error', handleError(this)) +} + +// We have to suppress default finish emitting, because ordinarily it +// would happen as soon as `end` is called on us and all of the +// data has been written to our target stream. So we suppress +// finish from being emitted here, and only emit it after our +// target stream is closed and we've moved everything around. +WriteStreamAtomic.prototype.emit = function (event) { + if (event === 'finish') return this.__atomicStream.end() + return Writable.prototype.emit.apply(this, arguments) +} + +WriteStreamAtomic.prototype._write = function (buffer, encoding, cb) { + var flushed = this.__atomicStream.write(buffer, encoding) + if (flushed) return cb() + this.__atomicStream.once('drain', cb) +} + +function handleOpen (writeStream) { + return function (fd) { + writeStream.emit('open', fd) + } +} + +function handleClose (writeStream) { + return function () { + if (writeStream.__atomicClosed) return + writeStream.__atomicClosed = true + if (writeStream.__atomicChown) { + var uid = writeStream.__atomicChown.uid + var gid = writeStream.__atomicChown.gid + return fs.chown(writeStream.__atomicTmp, uid, gid, iferr(cleanup, moveIntoPlace)) + } else { + moveIntoPlace() + } + } + function cleanup (err) { + fs.unlink(writeStream.__atomicTmp, function () { + writeStream.emit('error', err) + writeStream.emit('close') + }) + } + function moveIntoPlace () { + fs.rename(writeStream.__atomicTmp, writeStream.__atomicTarget, iferr(cleanup, end)) + } + function end () { + // We have to use our parent class directly because we suppress `finish` + // events fired via our own emit method. + Writable.prototype.emit.call(writeStream, 'finish') + + // Delay the close to provide the same temporal separation a physical + // file operation would have– that is, the close event is emitted only + // after the async close operation completes. + setImmediate(function () { + writeStream.emit('close') + }) + } +} + +function handleError (writeStream) { + return function (er) { + cleanupSync() + writeStream.emit('error', er) + writeStream.__atomicClosed = true + writeStream.emit('close') + } + function cleanupSync () { + try { + fs.unlinkSync(writeStream.__atomicTmp) + } finally { + return + } + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/package.json new file mode 100644 index 00000000..c4f8b324 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fs-write-stream-atomic/package.json @@ -0,0 +1,70 @@ +{ + "name": "fs-write-stream-atomic", + "version": "1.0.8", + "description": "Like `fs.createWriteStream(...)`, but atomic.", + "main": "index.js", + "directories": { + "test": "test" + }, + "dependencies": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + }, + "devDependencies": { + "rimraf": "^2.4.4", + "standard": "^5.4.1", + "tap": "^2.3.1" + }, + "scripts": { + "test": "standard && tap --coverage test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fs-write-stream-atomic.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/fs-write-stream-atomic/issues" + }, + "homepage": "https://github.com/npm/fs-write-stream-atomic", + "gitHead": "b55824ee4de7f1ca23784929d68b1b8f5edbf4a4", + "_id": "fs-write-stream-atomic@1.0.8", + "_shasum": "e49aaddf288f87d46ff9e882f216a13abc40778b", + "_from": "fs-write-stream-atomic@>=1.0.5 <1.1.0", + "_npmVersion": "3.5.2", + "_nodeVersion": "4.2.2", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "e49aaddf288f87d46ff9e882f216a13abc40778b", + "tarball": "http://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.8.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "_resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.8.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/.npmignore new file mode 100644 index 00000000..f2b2c4d9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/.npmignore @@ -0,0 +1,3 @@ +# ignore the output junk from the example scripts +example/output +node_modules/ diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/.travis.yml new file mode 100644 index 00000000..1b8f396c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/.travis.yml @@ -0,0 +1,15 @@ +language: node_js +sudo: false +node_js: + - "5" + - "4" + - iojs + - "0.12" + - "0.10" + - "0.8" +before_install: + - "npm config set spin false" + - "npm install -g npm" +script: "npm test" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/README.md new file mode 100644 index 00000000..5366a3a7 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/README.md @@ -0,0 +1,18 @@ +# fstream-npm + +This is an fstream DirReader class that will read a directory and filter +things according to the semantics of what goes in an npm package. + +For example: + +```javascript +// This will print out all the files that would be included +// by 'npm publish' or 'npm install' of this directory. + +var FN = require("fstream-npm") +FN({ path: "./" }) + .on("child", function (e) { + console.error(e.path.substr(e.root.path.length + 1)) + }) +``` + diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/fstream-npm.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/fstream-npm.js new file mode 100644 index 00000000..0078a843 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/fstream-npm.js @@ -0,0 +1,343 @@ +var Ignore = require('fstream-ignore') +var inherits = require('inherits') +var path = require('path') +var fs = require('fs') + +module.exports = Packer + +inherits(Packer, Ignore) + +function Packer (props) { + if (!(this instanceof Packer)) { + return new Packer(props) + } + + if (typeof props === 'string') { + props = { path: props } + } + + props.ignoreFiles = props.ignoreFiles || [ '.npmignore', + '.gitignore', + 'package.json' ] + + Ignore.call(this, props) + + this.bundled = props.bundled + this.bundleLinks = props.bundleLinks + this.package = props.package + + // only do the magic bundling stuff for the node_modules folder that + // lives right next to a package.json file. + this.bundleMagic = this.parent && + this.parent.packageRoot && + this.basename === 'node_modules' + + // in a node_modules folder, resolve symbolic links to + // bundled dependencies when creating the package. + props.follow = this.follow = this.bundleMagic + // console.error("follow?", this.path, props.follow) + + if (this === this.root || + this.parent && + this.parent.bundleMagic && + this.basename.charAt(0) !== '.') { + this.readBundledLinks() + } + + this.on('entryStat', function (entry, props) { + // files should *always* get into tarballs + // in a user-writable state, even if they're + // being installed from some wackey vm-mounted + // read-only filesystem. + entry.mode = props.mode = props.mode | parseInt('0200', 8) + }) +} + +Packer.prototype.readBundledLinks = function () { + if (this._paused) { + this.once('resume', this.addIgnoreFiles) + return + } + + this.pause() + fs.readdir(this.path + '/node_modules', function (er, list) { + // no harm if there's no bundle + var l = list && list.length + if (er || l === 0) return this.resume() + + var errState = null + var then = function then (er) { + if (errState) return + if (er) { + errState = er + return this.resume() + } + if (--l === 0) return this.resume() + }.bind(this) + + list.forEach(function (pkg) { + if (pkg.charAt(0) === '.') return then() + var pd = this.path + '/node_modules/' + pkg + fs.realpath(pd, function (er, rp) { + if (er) return then() + this.bundleLinks = this.bundleLinks || {} + this.bundleLinks[pkg] = rp + then() + }.bind(this)) + }, this) + }.bind(this)) +} + +Packer.prototype.applyIgnores = function (entry, partial, entryObj) { + if (!entryObj || entryObj.type !== 'Directory') { + // package.json files can never be ignored. + if (entry === 'package.json') return true + + // readme files should never be ignored. + if (entry.match(/^readme(\.[^\.]*)$/i)) return true + + // license files should never be ignored. + if (entry.match(/^(license|licence)(\.[^\.]*)?$/i)) return true + + // changelogs should never be ignored. + if (entry.match(/^(changes|changelog|history)(\.[^\.]*)?$/i)) return true + } + + // special rules. see below. + if (entry === 'node_modules' && this.packageRoot) return true + + // package.json main file should never be ignored. + var mainFile = this.package && this.package.main + if (mainFile && path.resolve(this.path, entry) === path.resolve(this.path, mainFile)) return true + + // some files are *never* allowed under any circumstances + // (VCS folders, native build cruft, npm cruft, regular cruft) + if (entry === '.git' || + entry === 'CVS' || + entry === '.svn' || + entry === '.hg' || + entry === '.lock-wscript' || + entry.match(/^\.wafpickle-[0-9]+$/) || + (this.parent && this.parent.packageRoot && this.basename === 'build' && + entry === 'config.gypi') || + entry === 'npm-debug.log' || + entry === '.npmrc' || + entry.match(/^\..*\.swp$/) || + entry === '.DS_Store' || + entry.match(/^\._/) + ) { + return false + } + + // in a node_modules folder, we only include bundled dependencies + // also, prevent packages in node_modules from being affected + // by rules set in the containing package, so that + // bundles don't get busted. + // Also, once in a bundle, everything is installed as-is + // To prevent infinite cycles in the case of cyclic deps that are + // linked with npm link, even in a bundle, deps are only bundled + // if they're not already present at a higher level. + if (this.bundleMagic) { + // bubbling up. stop here and allow anything the bundled pkg allows + if (entry.indexOf('/') !== -1) return true + + // never include the .bin. It's typically full of platform-specific + // stuff like symlinks and .cmd files anyway. + if (entry === '.bin') return false + + // the package root. + var p = this.parent + // the package before this one. + var pp = p && p.parent + + // if this entry has already been bundled, and is a symlink, + // and it is the *same* symlink as this one, then exclude it. + if (pp && pp.bundleLinks && this.bundleLinks && + pp.bundleLinks[entry] && + pp.bundleLinks[entry] === this.bundleLinks[entry]) { + return false + } + + // since it's *not* a symbolic link, if we're *already* in a bundle, + // then we should include everything. + if (pp && pp.package && pp.basename === 'node_modules') { + return true + } + + // only include it at this point if it's a bundleDependency + var bd = this.package && this.package.bundleDependencies + + if (bd && !Array.isArray(bd)) { + throw new Error(this.package.name + '\'s `bundledDependencies` should ' + + 'be an array') + } + + var shouldBundle = bd && bd.indexOf(entry) !== -1 + // if we're not going to bundle it, then it doesn't count as a bundleLink + // if (this.bundleLinks && !shouldBundle) delete this.bundleLinks[entry] + return shouldBundle + } + // if (this.bundled) return true + + return Ignore.prototype.applyIgnores.call(this, entry, partial, entryObj) +} + +Packer.prototype.addIgnoreFiles = function () { + var entries = this.entries + // if there's a .npmignore, then we do *not* want to + // read the .gitignore. + if (entries.indexOf('.npmignore') !== -1) { + var i = entries.indexOf('.gitignore') + if (i !== -1) { + entries.splice(i, 1) + } + } + + this.entries = entries + + Ignore.prototype.addIgnoreFiles.call(this) +} + +Packer.prototype.readRules = function (buf, e) { + if (e !== 'package.json') { + return Ignore.prototype.readRules.call(this, buf, e) + } + + buf = buf.toString().trim() + + if (buf.length === 0) return [] + + try { + var p = this.package = JSON.parse(buf) + } catch (er) { + // just pretend it's a normal old file, not magic at all. + return [] + } + + if (this === this.root) { + this.bundleLinks = this.bundleLinks || {} + this.bundleLinks[p.name] = this._path + } + + this.packageRoot = true + this.emit('package', p) + + // make bundle deps predictable + if (p.bundledDependencies && !p.bundleDependencies) { + p.bundleDependencies = p.bundledDependencies + delete p.bundledDependencies + } + + if (!p.files || !Array.isArray(p.files)) return [] + + // ignore everything except what's in the files array. + return ['*'].concat(p.files.map(function (f) { + return '!' + f + })).concat(p.files.map(function (f) { + return '!' + f.replace(/\/+$/, '') + '/**' + })) +} + +Packer.prototype.getChildProps = function (stat) { + var props = Ignore.prototype.getChildProps.call(this, stat) + + props.package = this.package + + props.bundled = this.bundled && this.bundled.slice(0) + props.bundleLinks = this.bundleLinks && + Object.create(this.bundleLinks) + + // Directories have to be read as Packers + // otherwise fstream.Reader will create a DirReader instead. + if (stat.isDirectory()) { + props.type = this.constructor + } + + // only follow symbolic links directly in the node_modules folder. + props.follow = false + return props +} + +var order = [ + 'package.json', + '.npmignore', + '.gitignore', + /^README(\.md)?$/, + 'LICENCE', + 'LICENSE', + /\.js$/ +] + +Packer.prototype.sort = function (a, b) { + for (var i = 0, l = order.length; i < l; i++) { + var o = order[i] + if (typeof o === 'string') { + if (a === o) return -1 + if (b === o) return 1 + } else { + if (a.match(o)) return -1 + if (b.match(o)) return 1 + } + } + + // deps go in the back + if (a === 'node_modules') return 1 + if (b === 'node_modules') return -1 + + return Ignore.prototype.sort.call(this, a, b) +} + +Packer.prototype.emitEntry = function (entry) { + if (this._paused) { + this.once('resume', this.emitEntry.bind(this, entry)) + return + } + + // if there is a .gitignore, then we're going to + // rename it to .npmignore in the output. + if (entry.basename === '.gitignore') { + entry.basename = '.npmignore' + entry.path = path.resolve(entry.dirname, entry.basename) + } + + // all *.gyp files are renamed to binding.gyp for node-gyp + // but only when they are in the same folder as a package.json file. + if (entry.basename.match(/\.gyp$/) && + this.entries.indexOf('package.json') !== -1) { + entry.basename = 'binding.gyp' + entry.path = path.resolve(entry.dirname, entry.basename) + } + + // skip over symbolic links + if (entry.type === 'SymbolicLink') { + entry.abort() + return + } + + if (entry.type !== 'Directory') { + // make it so that the folder in the tarball is named "package" + var h = path.dirname((entry.root || entry).path) + var t = entry.path.substr(h.length + 1).replace(/^[^\/\\]+/, 'package') + var p = h + '/' + t + + entry.path = p + entry.dirname = path.dirname(p) + return Ignore.prototype.emitEntry.call(this, entry) + } + + // we don't want empty directories to show up in package + // tarballs. + // don't emit entry events for dirs, but still walk through + // and read them. This means that we need to proxy up their + // entry events so that those entries won't be missed, since + // .pipe() doesn't do anythign special with "child" events, on + // with "entry" events. + var me = this + entry.on('entry', function (e) { + if (e.parent === entry) { + e.parent = me + me.emit('entry', e) + } + }) + entry.on('package', this.emit.bind(this, 'package')) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/package.json new file mode 100644 index 00000000..e268209a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream-npm/package.json @@ -0,0 +1,40 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "fstream-npm", + "description": "fstream class for creating npm packages", + "version": "1.0.7", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fstream-npm.git" + }, + "scripts": { + "test": "standard && tap test/*.js" + }, + "main": "./fstream-npm.js", + "dependencies": { + "fstream-ignore": "^1.0.0", + "inherits": "2" + }, + "devDependencies": { + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.1", + "rimraf": "^2.4.2", + "standard": "^4.3.1", + "tap": "^1.3.2" + }, + "license": "ISC", + "readme": "# fstream-npm\n\nThis is an fstream DirReader class that will read a directory and filter\nthings according to the semantics of what goes in an npm package.\n\nFor example:\n\n```javascript\n// This will print out all the files that would be included\n// by 'npm publish' or 'npm install' of this directory.\n\nvar FN = require(\"fstream-npm\")\nFN({ path: \"./\" })\n .on(\"child\", function (e) {\n console.error(e.path.substr(e.root.path.length + 1))\n })\n```\n\n", + "readmeFilename": "README.md", + "gitHead": "d57b6b24f91156067f73417dd8785c6312bfc75f", + "bugs": { + "url": "https://github.com/npm/fstream-npm/issues" + }, + "homepage": "https://github.com/npm/fstream-npm#readme", + "_id": "fstream-npm@1.0.7", + "_shasum": "7ed0d1ac13d7686dd9e1bf6ceb8be273bf6d2f86", + "_from": "fstream-npm@>=1.0.7 <1.1.0" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/.npmignore new file mode 100644 index 00000000..4be12143 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/.npmignore @@ -0,0 +1,5 @@ +.*.swp +node_modules/ +examples/deep-copy/ +examples/path/ +examples/filter-copy/ diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/.travis.yml new file mode 100644 index 00000000..b5d9b146 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +node_js: + - iojs + - 0.12 + - 0.10 + - 0.8 +before_install: + - "npm config set spin false" + - "npm install -g npm/npm" diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/README.md new file mode 100644 index 00000000..043fa430 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/README.md @@ -0,0 +1,76 @@ +Like FS streams, but with stat on them, and supporting directories and +symbolic links, as well as normal files. Also, you can use this to set +the stats on a file, even if you don't change its contents, or to create +a symlink, etc. + +So, for example, you can "write" a directory, and it'll call `mkdir`. You +can specify a uid and gid, and it'll call `chown`. You can specify a +`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink +and provide a `linkpath` and it'll call `symlink`. + +Note that it won't automatically resolve symbolic links. So, if you +call `fstream.Reader('/some/symlink')` then you'll get an object +that stats and then ends immediately (since it has no data). To follow +symbolic links, do this: `fstream.Reader({path:'/some/symlink', follow: +true })`. + +There are various checks to make sure that the bytes emitted are the +same as the intended size, if the size is set. + +## Examples + +```javascript +fstream + .Writer({ path: "path/to/file" + , mode: 0755 + , size: 6 + }) + .write("hello\n") + .end() +``` + +This will create the directories if they're missing, and then write +`hello\n` into the file, chmod it to 0755, and assert that 6 bytes have +been written when it's done. + +```javascript +fstream + .Writer({ path: "path/to/file" + , mode: 0755 + , size: 6 + , flags: "a" + }) + .write("hello\n") + .end() +``` + +You can pass flags in, if you want to append to a file. + +```javascript +fstream + .Writer({ path: "path/to/symlink" + , linkpath: "./file" + , SymbolicLink: true + , mode: "0755" // octal strings supported + }) + .end() +``` + +If isSymbolicLink is a function, it'll be called, and if it returns +true, then it'll treat it as a symlink. If it's not a function, then +any truish value will make a symlink, or you can set `type: +'SymbolicLink'`, which does the same thing. + +Note that the linkpath is relative to the symbolic link location, not +the parent dir or cwd. + +```javascript +fstream + .Reader("path/to/dir") + .pipe(fstream.Writer("path/to/other/dir")) +``` + +This will do like `cp -Rp path/to/dir path/to/other/dir`. If the other +dir exists and isn't a directory, then it'll emit an error. It'll also +set the uid, gid, mode, etc. to be identical. In this way, it's more +like `rsync -a` than simply a copy. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/fstream.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/fstream.js new file mode 100644 index 00000000..474ea2fc --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/fstream.js @@ -0,0 +1,35 @@ +exports.Abstract = require('./lib/abstract.js') +exports.Reader = require('./lib/reader.js') +exports.Writer = require('./lib/writer.js') + +exports.File = { + Reader: require('./lib/file-reader.js'), + Writer: require('./lib/file-writer.js') +} + +exports.Dir = { + Reader: require('./lib/dir-reader.js'), + Writer: require('./lib/dir-writer.js') +} + +exports.Link = { + Reader: require('./lib/link-reader.js'), + Writer: require('./lib/link-writer.js') +} + +exports.Proxy = { + Reader: require('./lib/proxy-reader.js'), + Writer: require('./lib/proxy-writer.js') +} + +exports.Reader.Dir = exports.DirReader = exports.Dir.Reader +exports.Reader.File = exports.FileReader = exports.File.Reader +exports.Reader.Link = exports.LinkReader = exports.Link.Reader +exports.Reader.Proxy = exports.ProxyReader = exports.Proxy.Reader + +exports.Writer.Dir = exports.DirWriter = exports.Dir.Writer +exports.Writer.File = exports.FileWriter = exports.File.Writer +exports.Writer.Link = exports.LinkWriter = exports.Link.Writer +exports.Writer.Proxy = exports.ProxyWriter = exports.Proxy.Writer + +exports.collect = require('./lib/collect.js') diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/package.json new file mode 100644 index 00000000..878d2c1d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/fstream/package.json @@ -0,0 +1,42 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "fstream", + "description": "Advanced file system stream things", + "version": "1.0.8", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/fstream.git" + }, + "main": "fstream.js", + "engines": { + "node": ">=0.6" + }, + "dependencies": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + }, + "devDependencies": { + "standard": "^4.0.0", + "tap": "^1.2.0" + }, + "scripts": { + "test": "standard && tap examples/*.js" + }, + "license": "ISC", + "readme": "Like FS streams, but with stat on them, and supporting directories and\nsymbolic links, as well as normal files. Also, you can use this to set\nthe stats on a file, even if you don't change its contents, or to create\na symlink, etc.\n\nSo, for example, you can \"write\" a directory, and it'll call `mkdir`. You\ncan specify a uid and gid, and it'll call `chown`. You can specify a\n`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink\nand provide a `linkpath` and it'll call `symlink`.\n\nNote that it won't automatically resolve symbolic links. So, if you\ncall `fstream.Reader('/some/symlink')` then you'll get an object\nthat stats and then ends immediately (since it has no data). To follow\nsymbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:\ntrue })`.\n\nThere are various checks to make sure that the bytes emitted are the\nsame as the intended size, if the size is set.\n\n## Examples\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n })\n .write(\"hello\\n\")\n .end()\n```\n\nThis will create the directories if they're missing, and then write\n`hello\\n` into the file, chmod it to 0755, and assert that 6 bytes have\nbeen written when it's done.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n , flags: \"a\"\n })\n .write(\"hello\\n\")\n .end()\n```\n\nYou can pass flags in, if you want to append to a file.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/symlink\"\n , linkpath: \"./file\"\n , SymbolicLink: true\n , mode: \"0755\" // octal strings supported\n })\n .end()\n```\n\nIf isSymbolicLink is a function, it'll be called, and if it returns\ntrue, then it'll treat it as a symlink. If it's not a function, then\nany truish value will make a symlink, or you can set `type:\n'SymbolicLink'`, which does the same thing.\n\nNote that the linkpath is relative to the symbolic link location, not\nthe parent dir or cwd.\n\n```javascript\nfstream\n .Reader(\"path/to/dir\")\n .pipe(fstream.Writer(\"path/to/other/dir\"))\n```\n\nThis will do like `cp -Rp path/to/dir path/to/other/dir`. If the other\ndir exists and isn't a directory, then it'll emit an error. It'll also\nset the uid, gid, mode, etc. to be identical. In this way, it's more\nlike `rsync -a` than simply a copy.\n", + "readmeFilename": "README.md", + "gitHead": "d9f81146c50e687f1df04c1a0e7e4c173eb3dae2", + "bugs": { + "url": "https://github.com/isaacs/fstream/issues" + }, + "homepage": "https://github.com/isaacs/fstream#readme", + "_id": "fstream@1.0.8", + "_shasum": "7e8d7a73abb3647ef36e4b8a15ca801dba03d038", + "_from": "fstream@1.0.8" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/.npmignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/LICENSE new file mode 100644 index 00000000..e873a70b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2013 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/Makefile b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/Makefile new file mode 100644 index 00000000..72c8338c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/Makefile @@ -0,0 +1,5 @@ + +test: + @./node_modules/.bin/mocha test.js --reporter spec --require should + +.PHONY: test diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/Readme.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/Readme.md new file mode 100644 index 00000000..2f869cf3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/Readme.md @@ -0,0 +1,92 @@ + +# github-url-from-git + +```js +describe('parse(url)', function(){ + it('should support git://*', function(){ + var url = 'git://github.com/jamesor/mongoose-versioner'; + parse(url).should.equal('https://github.com/jamesor/mongoose-versioner'); + }) + + it('should support git://*.git', function(){ + var url = 'git://github.com/treygriffith/cellar.git'; + parse(url).should.equal('https://github.com/treygriffith/cellar'); + }) + + it('should support https://*', function(){ + var url = 'https://github.com/Empeeric/i18n-node'; + parse(url).should.equal('https://github.com/Empeeric/i18n-node'); + }) + + it('should support https://*.git', function(){ + var url = 'https://jpillora@github.com/banchee/tranquil.git'; + parse(url).should.equal('https://github.com/banchee/tranquil'); + }) + + it('should return undefined on failure', function(){ + var url = 'git://github.com/justgord/.git'; + assert(null == parse(url)); + }) + + it('should parse git@github.com:bcoe/thumbd.git', function() { + var url = 'git@github.com:bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git@github.com:bcoe/thumbd.git#2.7.0', function() { + var url = 'git@github.com:bcoe/thumbd.git#2.7.0'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git+https://github.com/bcoe/thumbd.git', function() { + var url = 'git+https://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git+ssh://github.com/bcoe/thumbd.git', function() { + var url = 'git+ssh://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function() { + var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git'; + parse(url).should.eql('https://github.com/EastCloud/node-websockets'); + }) + + // gist urls. + + it('should parse git@gist urls', function() { + var url = 'git@gist.github.com:3135914.git'; + parse(url).should.equal('https://gist.github.com/3135914') + }) + + it('should parse https://gist urls', function() { + var url = 'https://gist.github.com/3135914.git'; + parse(url).should.equal('https://gist.github.com/3135914') + }) + + // Handle arbitrary GitHub Enterprise domains. + + it('should parse parse extra GHE urls provided', function() { + var url = 'git://github.example.com/treygriffith/cellar.git'; + parse( + url, {extraBaseUrls: ['github.example.com']} + ).should.equal('https://github.example.com/treygriffith/cellar'); + }); + + it('should parse GHE urls with multiple subdomains', function() { + var url = 'git://github.internal.example.com/treygriffith/cellar.git'; + parse( + url, {extraBaseUrls: ['github.internal.example.com']} + ).should.equal('https://github.internal.example.com/treygriffith/cellar'); + }); +}) + +describe('re', function() { + it('should expose GitHub url parsing regex', function() { + parse.re.source.should.equal( + /^(?:https?:\/\/|git:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source + ) + }); +}) +``` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/index.js new file mode 100644 index 00000000..d4d37a0d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/index.js @@ -0,0 +1,32 @@ +// convert git:// form url to github URL, e.g., +// git://github.com/bcoe/foo.git +// https://github.com/bcoe/foo. +function githubUrlFromGit(url, opts){ + try { + var m = re(opts).exec(url.replace(/\.git(#.*)?$/, '')); + var host = m[1]; + var path = m[2]; + return 'https://' + host + '/' + path; + } catch (err) { + // ignore + } +}; + +// generate the git:// parsing regex +// with options, e.g., the ability +// to specify multiple GHE domains. +function re(opts) { + opts = opts || {}; + // whitelist of URLs that should be treated as GitHub repos. + var baseUrls = ['gist.github.com', 'github.com'].concat(opts.extraBaseUrls || []); + // build regex from whitelist. + return new RegExp( + /^(?:https?:\/\/|git:\/\/|git\+ssh:\/\/|git\+https:\/\/)?(?:[^@]+@)?/.source + + '(' + baseUrls.join('|') + ')' + + /[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source + ); +} + +githubUrlFromGit.re = re(); + +module.exports = githubUrlFromGit; diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/package.json new file mode 100644 index 00000000..bb4f999f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/package.json @@ -0,0 +1,57 @@ +{ + "name": "github-url-from-git", + "version": "1.4.0", + "description": "Parse a github git url and return the github repo url", + "main": "index.js", + "scripts": { + "test": "mocha test.js --reporter spec --require should" + }, + "repository": { + "type": "git", + "url": "https://github.com/visionmedia/node-github-url-from-git.git" + }, + "keywords": [ + "github", + "git", + "url", + "parser" + ], + "author": { + "name": "TJ Holowaychuk" + }, + "license": "MIT", + "devDependencies": { + "better-assert": "~1.0.0", + "mocha": "~1.9.0", + "should": "~1.2.2" + }, + "gitHead": "154df00b0b590c29be5d2a5822e7b2e160b75345", + "bugs": { + "url": "https://github.com/visionmedia/node-github-url-from-git/issues" + }, + "homepage": "https://github.com/visionmedia/node-github-url-from-git", + "_id": "github-url-from-git@1.4.0", + "_shasum": "285e6b520819001bde128674704379e4ff03e0de", + "_from": "github-url-from-git@>=1.4.0-0 <2.0.0-0", + "_npmVersion": "2.0.0-alpha.7", + "_npmUser": { + "name": "bcoe", + "email": "bencoe@gmail.com" + }, + "maintainers": [ + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + }, + { + "name": "bcoe", + "email": "bencoe@gmail.com" + } + ], + "dist": { + "shasum": "285e6b520819001bde128674704379e4ff03e0de", + "tarball": "http://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.4.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.4.0.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/test.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/test.js new file mode 100644 index 00000000..d1ca9c63 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-git/test.js @@ -0,0 +1,90 @@ +var parse = require('./'); +var assert = require('better-assert'); + +describe('parse(url)', function(){ + it('should support git://*', function(){ + var url = 'git://github.com/jamesor/mongoose-versioner'; + parse(url).should.equal('https://github.com/jamesor/mongoose-versioner'); + }) + + it('should support git://*.git', function(){ + var url = 'git://github.com/treygriffith/cellar.git'; + parse(url).should.equal('https://github.com/treygriffith/cellar'); + }) + + it('should support https://*', function(){ + var url = 'https://github.com/Empeeric/i18n-node'; + parse(url).should.equal('https://github.com/Empeeric/i18n-node'); + }) + + it('should support https://*.git', function(){ + var url = 'https://jpillora@github.com/banchee/tranquil.git'; + parse(url).should.equal('https://github.com/banchee/tranquil'); + }) + + it('should return undefined on failure', function(){ + var url = 'git://github.com/justgord/.git'; + assert(null == parse(url)); + }) + + it('should parse git@github.com:bcoe/thumbd.git', function() { + var url = 'git@github.com:bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git@github.com:bcoe/thumbd.git#2.7.0', function() { + var url = 'git@github.com:bcoe/thumbd.git#2.7.0'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git+https://github.com/bcoe/thumbd.git', function() { + var url = 'git+https://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git+ssh://github.com/bcoe/thumbd.git', function() { + var url = 'git+ssh://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function() { + var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git'; + parse(url).should.eql('https://github.com/EastCloud/node-websockets'); + }) + + // gist urls. + + it('should parse git@gist urls', function() { + var url = 'git@gist.github.com:3135914.git'; + parse(url).should.equal('https://gist.github.com/3135914') + }) + + it('should parse https://gist urls', function() { + var url = 'https://gist.github.com/3135914.git'; + parse(url).should.equal('https://gist.github.com/3135914') + }) + + // Handle arbitrary GitHub Enterprise domains. + + it('should parse parse extra GHE urls provided', function() { + var url = 'git://github.example.com/treygriffith/cellar.git'; + parse( + url, {extraBaseUrls: ['github.example.com']} + ).should.equal('https://github.example.com/treygriffith/cellar'); + }); + + it('should parse GHE urls with multiple subdomains', function() { + var url = 'git://github.internal.example.com/treygriffith/cellar.git'; + parse( + url, {extraBaseUrls: ['github.internal.example.com']} + ).should.equal('https://github.internal.example.com/treygriffith/cellar'); + }); +}) + +describe('re', function() { + it('should expose GitHub url parsing regex', function() { + parse.re.source.should.equal( + /^(?:https?:\/\/|git:\/\/|git\+ssh:\/\/|git\+https:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source + ) + }); +}) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/.npmignore new file mode 100644 index 00000000..849e0ca4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/.travis.yml new file mode 100644 index 00000000..1d8a1a65 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/LICENSE new file mode 100644 index 00000000..02155da2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Robert Kowalski ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/README.md new file mode 100644 index 00000000..7b6d1e48 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/README.md @@ -0,0 +1,21 @@ +[![Build Status](https://travis-ci.org/robertkowalski/github-url-from-username-repo.png?branch=master)](https://travis-ci.org/robertkowalski/github-url-from-username-repo) +[![Dependency Status](https://gemnasium.com/robertkowalski/github-url-from-username-repo.png)](https://gemnasium.com/robertkowalski/github-url-from-username-repo) + + +# github-url-from-username-repo + +## API + +### getUrl(url, [forBrowser]) + +Get's the url normalized for npm. +If `forBrowser` is true, return a GitHub url that is usable in a webbrowser. + +## Usage + +```javascript + +var getUrl = require("github-url-from-username-repo") +getUrl("visionmedia/express") // https://github.com/visionmedia/express + +``` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/index.js new file mode 100644 index 00000000..bfd48557 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/index.js @@ -0,0 +1,21 @@ +module.exports = getUrl + +function getUrl (r, forBrowser) { + if (!r) return null + // Regex taken from https://github.com/npm/npm-package-arg/commit/01dce583c64afae07b66a2a8a6033aeba871c3cd + // Note: This does not fully test the git ref format. + // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html + // + // The only way to do this properly would be to shell out to + // git-check-ref-format, and as this is a fast sync function, + // we don't want to do that. Just let git fail if it turns + // out that the commit-ish is invalid. + // GH usernames cannot start with . or - + if (/^[^@%\/\s\.-][^:@%\/\s]*\/[^@\s\/%]+(?:#.*)?$/.test(r)) { + if (forBrowser) + r = r.replace("#", "/tree/") + return "https://github.com/" + r + } + + return null +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/package.json new file mode 100644 index 00000000..dedb1fd8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/github-url-from-username-repo/package.json @@ -0,0 +1,36 @@ +{ + "name": "github-url-from-username-repo", + "version": "1.0.2", + "description": "Create urls from username/repo", + "main": "index.js", + "scripts": { + "test": "mocha -R spec" + }, + "devDependencies": { + "mocha": "~1.13.0" + }, + "repository": { + "type": "git", + "url": "git@github.com:robertkowalski/github-url-from-username-repo.git" + }, + "author": { + "name": "Robert Kowalski", + "email": "rok@kowalski.gd" + }, + "license": "BSD-2-Clause", + "bugs": { + "url": "https://github.com/robertkowalski/github-url-from-username-repo/issues" + }, + "keywords": [ + "git", + "github", + "repo" + ], + "readme": "[![Build Status](https://travis-ci.org/robertkowalski/github-url-from-username-repo.png?branch=master)](https://travis-ci.org/robertkowalski/github-url-from-username-repo)\n[![Dependency Status](https://gemnasium.com/robertkowalski/github-url-from-username-repo.png)](https://gemnasium.com/robertkowalski/github-url-from-username-repo)\n\n\n# github-url-from-username-repo\n\n## API\n\n### getUrl(url, [forBrowser])\n\nGet's the url normalized for npm.\nIf `forBrowser` is true, return a GitHub url that is usable in a webbrowser.\n\n## Usage\n\n```javascript\n\nvar getUrl = require(\"github-url-from-username-repo\")\ngetUrl(\"visionmedia/express\") // https://github.com/visionmedia/express\n\n```\n", + "readmeFilename": "README.md", + "gitHead": "d404a13f7f04edaed0e2f068a43b81230b8c7aee", + "homepage": "https://github.com/robertkowalski/github-url-from-username-repo", + "_id": "github-url-from-username-repo@1.0.2", + "_shasum": "7dd79330d2abe69c10c2cef79714c97215791dfa", + "_from": "github-url-from-username-repo@>=1.0.2-0 <2.0.0-0" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/README.md new file mode 100644 index 00000000..912bab50 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/README.md @@ -0,0 +1,365 @@ +# Glob + +Match files using the patterns the shell uses, like stars and stuff. + +[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) + +This is a glob implementation in JavaScript. It uses the `minimatch` +library to do its matching. + +![](oh-my-glob.gif) + +## Usage + +Install with npm + +``` +npm i glob +``` + +```javascript +var glob = require("glob") + +// options is optional +glob("**/*.js", options, function (er, files) { + // files is an array of filenames. + // If the `nonull` option is set, and nothing + // was found, then files is ["**/*.js"] + // er is an error object or null. +}) +``` + +## Glob Primer + +"Globs" are the patterns you type when you do stuff like `ls *.js` on +the command line, or put `build/*` in a `.gitignore` file. + +Before parsing the path part patterns, braced sections are expanded +into a set. Braced sections start with `{` and end with `}`, with any +number of comma-delimited sections within. Braced sections may contain +slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. + +The following characters have special magic meaning when used in a +path portion: + +* `*` Matches 0 or more characters in a single path portion +* `?` Matches 1 character +* `[...]` Matches a range of characters, similar to a RegExp range. + If the first character of the range is `!` or `^` then it matches + any character not in the range. +* `!(pattern|pattern|pattern)` Matches anything that does not match + any of the patterns provided. +* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the + patterns provided. +* `+(pattern|pattern|pattern)` Matches one or more occurrences of the + patterns provided. +* `*(a|b|c)` Matches zero or more occurrences of the patterns provided +* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns + provided +* `**` If a "globstar" is alone in a path portion, then it matches + zero or more directories and subdirectories searching for matches. + It does not crawl symlinked directories. + +### Dots + +If a file or directory path portion has a `.` as the first character, +then it will not match any glob pattern unless that pattern's +corresponding path part also has a `.` as its first character. + +For example, the pattern `a/.*/c` would match the file at `a/.b/c`. +However the pattern `a/*/c` would not, because `*` does not start with +a dot character. + +You can make glob treat dots as normal characters by setting +`dot:true` in the options. + +### Basename Matching + +If you set `matchBase:true` in the options, and the pattern has no +slashes in it, then it will seek for any file anywhere in the tree +with a matching basename. For example, `*.js` would match +`test/simple/basic.js`. + +### Empty Sets + +If no matching files are found, then an empty array is returned. This +differs from the shell, where the pattern itself is returned. For +example: + + $ echo a*s*d*f + a*s*d*f + +To get the bash-style behavior, set the `nonull:true` in the options. + +### See Also: + +* `man sh` +* `man bash` (Search for "Pattern Matching") +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## glob.hasMagic(pattern, [options]) + +Returns `true` if there are any special characters in the pattern, and +`false` otherwise. + +Note that the options affect the results. If `noext:true` is set in +the options object, then `+(a|b)` will not be considered a magic +pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` +then that is considered magical, unless `nobrace:true` is set in the +options. + +## glob(pattern, [options], cb) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* `cb` `{Function}` + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Perform an asynchronous glob search. + +## glob.sync(pattern, [options]) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* return: `{Array}` filenames found matching the pattern + +Perform a synchronous glob search. + +## Class: glob.Glob + +Create a Glob object by instantiating the `glob.Glob` class. + +```javascript +var Glob = require("glob").Glob +var mg = new Glob(pattern, options, cb) +``` + +It's an EventEmitter, and starts walking the filesystem to find matches +immediately. + +### new glob.Glob(pattern, [options], [cb]) + +* `pattern` `{String}` pattern to search for +* `options` `{Object}` +* `cb` `{Function}` Called when an error occurs, or matches are found + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Note that if the `sync` flag is set in the options, then matches will +be immediately available on the `g.found` member. + +### Properties + +* `minimatch` The minimatch object that the glob uses. +* `options` The options object passed in. +* `aborted` Boolean which is set to true when calling `abort()`. There + is no way at this time to continue a glob search after aborting, but + you can re-use the statCache to avoid having to duplicate syscalls. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `'FILE'` - Path exists, and is not a directory + * `'DIR'` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` +* `statCache` Cache of `fs.stat` results, to prevent statting the same + path multiple times. +* `symlinks` A record of which paths are symbolic links, which is + relevant in resolving `**` patterns. +* `realpathCache` An optional object which is passed to `fs.realpath` + to minimize unnecessary syscalls. It is stored on the instantiated + Glob object, and may be re-used. + +### Events + +* `end` When the matching is finished, this is emitted with all the + matches found. If the `nonull` option is set, and no match was found, + then the `matches` list contains the original pattern. The matches + are sorted, unless the `nosort` flag is set. +* `match` Every time a match is found, this is emitted with the specific + thing that matched. It is not deduplicated or resolved to a realpath. +* `error` Emitted when an unexpected error is encountered, or whenever + any fs error occurs if `options.strict` is set. +* `abort` When `abort()` is called, this event is raised. + +### Methods + +* `pause` Temporarily stop the search +* `resume` Resume the search +* `abort` Stop the search forever + +### Options + +All the options that can be passed to Minimatch can also be passed to +Glob to change pattern matching behavior. Also, some have been added, +or have glob-specific ramifications. + +All options are false by default, unless otherwise noted. + +All options are added to the Glob object, as well. + +If you are running many `glob` operations, you can pass a Glob object +as the `options` argument to a subsequent operation to shortcut some +`stat` and `readdir` calls. At the very least, you may pass in shared +`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that +parallel glob operations will be sped up by sharing information about +the filesystem. + +* `cwd` The current working directory in which to search. Defaults + to `process.cwd()`. +* `root` The place where patterns starting with `/` will be mounted + onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix + systems, and `C:\` or some such on Windows.) +* `dot` Include `.dot` files in normal matches and `globstar` matches. + Note that an explicit dot in a portion of the pattern will always + match dot files. +* `nomount` By default, a pattern starting with a forward-slash will be + "mounted" onto the root setting, so that a valid filesystem path is + returned. Set this flag to disable that behavior. +* `mark` Add a `/` character to directory matches. Note that this + requires additional stat calls. +* `nosort` Don't sort the results. +* `stat` Set to true to stat *all* results. This reduces performance + somewhat, and is completely unnecessary, unless `readdir` is presumed + to be an untrustworthy indicator of file existence. +* `silent` When an unusual error is encountered when attempting to + read a directory, a warning will be printed to stderr. Set the + `silent` option to true to suppress these warnings. +* `strict` When an unusual error is encountered when attempting to + read a directory, the process will just continue on in search of + other matches. Set the `strict` option to raise an error in these + cases. +* `cache` See `cache` property above. Pass in a previously generated + cache object to save some fs calls. +* `statCache` A cache of results of filesystem information, to prevent + unnecessary stat calls. While it should not normally be necessary + to set this, you may pass the statCache from one glob() call to the + options object of another, if you know that the filesystem will not + change between calls. (See "Race Conditions" below.) +* `symlinks` A cache of known symbolic links. You may pass in a + previously generated `symlinks` object to save `lstat` calls when + resolving `**` matches. +* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. +* `nounique` In some cases, brace-expanded patterns can result in the + same file showing up multiple times in the result set. By default, + this implementation prevents duplicates in the result set. Set this + flag to disable that behavior. +* `nonull` Set to never return an empty set, instead returning a set + containing the pattern itself. This is the default in glob(3). +* `debug` Set to enable debug logging in minimatch and glob. +* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. +* `noglobstar` Do not match `**` against multiple filenames. (Ie, + treat it as a normal `*` instead.) +* `noext` Do not match `+(a|b)` "extglob" patterns. +* `nocase` Perform a case-insensitive match. Note: on + case-insensitive filesystems, non-magic patterns will match by + default, since `stat` and `readdir` will not raise errors. +* `matchBase` Perform a basename-only match if the pattern does not + contain any slash characters. That is, `*.js` would be treated as + equivalent to `**/*.js`, matching all js files in all directories. +* `nodir` Do not match directories, only files. (Note: to match + *only* directories, simply put a `/` at the end of the pattern.) +* `ignore` Add a pattern or an array of glob patterns to exclude matches. + Note: `ignore` patterns are *always* in `dot:true` mode, regardless + of any other settings. +* `follow` Follow symlinked directories when expanding `**` patterns. + Note that this can result in a lot of duplicate references in the + presence of cyclic links. +* `realpath` Set to true to call `fs.realpath` on all of the results. + In the case of a symlink that cannot be resolved, the full absolute + path to the matched entry is returned (though it will usually be a + broken symlink) + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between node-glob and other +implementations, and are intentional. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.3, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +Note that symlinked directories are not crawled as part of a `**`, +though their contents may match against subsequent portions of the +pattern. This prevents infinite loops and duplicates and the like. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then glob returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +### Comments and Negation + +Previously, this module let you mark a pattern as a "comment" if it +started with a `#` character, or a "negated" pattern if it started +with a `!` character. + +These options were deprecated in version 5, and removed in version 6. + +To specify things that should not match, use the `ignore` option. + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes will always +be interpreted as escape characters, not path separators. + +Results from absolute patterns such as `/foo/*` are mounted onto the +root setting using `path.join`. On windows, this will by default result +in `/foo/*` matching `C:\foo\bar.txt`. + +## Race Conditions + +Glob searching, by its very nature, is susceptible to race conditions, +since it relies on directory walking and such. + +As a result, it is possible that a file that exists when glob looks for +it may have been deleted or modified by the time it returns the result. + +As part of its internal implementation, this program caches all stat +and readdir calls that it makes, in order to cut down on system +overhead. However, this also makes it even more susceptible to races, +especially if the cache or statCache objects are reused between glob +calls. + +Users are thus advised not to use a glob result as a guarantee of +filesystem state in the face of rapid changes. For the vast majority +of operations, this is never a problem. + +## Contributing + +Any change to behavior (including bugfixes) must come with a test. + +Patches that fail tests or reduce performance will be rejected. + +``` +# to run tests +npm test + +# to re-generate test fixtures +npm run test-regen + +# to benchmark against bash/zsh +npm run bench + +# to profile javascript +npm run prof +``` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/changelog.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/changelog.md new file mode 100644 index 00000000..0ad557d9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/changelog.md @@ -0,0 +1,67 @@ +## 7.0 + +- Raise error if `options.cwd` is specified, and not a directory + +## 6.0 + +- Remove comment and negation pattern support +- Ignore patterns are always in `dot:true` mode + +## 5.0 + +- Deprecate comment and negation patterns +- Fix regression in `mark` and `nodir` options from making all cache + keys absolute path. +- Abort if `fs.readdir` returns an error that's unexpected +- Don't emit `match` events for ignored items +- Treat ENOTSUP like ENOTDIR in readdir + +## 4.5 + +- Add `options.follow` to always follow directory symlinks in globstar +- Add `options.realpath` to call `fs.realpath` on all results +- Always cache based on absolute path + +## 4.4 + +- Add `options.ignore` +- Fix handling of broken symlinks + +## 4.3 + +- Bump minimatch to 2.x +- Pass all tests on Windows + +## 4.2 + +- Add `glob.hasMagic` function +- Add `options.nodir` flag + +## 4.1 + +- Refactor sync and async implementations for performance +- Throw if callback provided to sync glob function +- Treat symbolic links in globstar results the same as Bash 4.3 + +## 4.0 + +- Use `^` for dependency versions (bumped major because this breaks + older npm versions) +- Ensure callbacks are only ever called once +- switch to ISC license + +## 3.x + +- Rewrite in JavaScript +- Add support for setting root, cwd, and windows support +- Cache many fs calls +- Add globstar support +- emit match events + +## 2.x + +- Use `glob.h` and `fnmatch.h` from NetBSD + +## 1.x + +- `glob.h` static binding. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/common.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/common.js new file mode 100644 index 00000000..913d1303 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/common.js @@ -0,0 +1,235 @@ +exports.alphasort = alphasort +exports.alphasorti = alphasorti +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var path = require("path") +var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") +var Minimatch = minimatch.Minimatch + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = path.resolve(options.cwd) + self.changedCwd = self.cwd !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + self.cwdAbs = makeAbs(self, self.cwd) + self.nomount = !!options.nomount + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !(/\/$/.test(e)) + var c = self.cache[e] || self.cache[makeAbs(self, e)] + if (notDir && c) + notDir = c !== 'DIR' && !Array.isArray(c) + return notDir + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + + if (process.platform === 'win32') + abs = abs.replace(/\\/g, '/') + + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/glob.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/glob.js new file mode 100644 index 00000000..c1d72320 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/glob.js @@ -0,0 +1,782 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var globSync = require('./sync.js') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = require('inflight') +var util = require('util') +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = require('once') + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +function extend (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add) + var i = keys.length + while (i--) { + origin[keys[i]] = add[keys[i]] + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + var n = this.minimatch.set.length + this._processing = 0 + this.matches = new Array(n) + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + var sync = true + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + sync = false + + function done () { + --self._processing + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish() + }) + } else { + self._finish() + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + fs.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (this.matches[index][e]) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = this._makeAbs(e) + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + if (this.mark) + e = this._mark(e) + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er) + return cb() + + var isSym = lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + this.emit('error', error) + this.abort() + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && !stat.isDirectory()) + return cb(null, false, stat) + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return cb() + + return cb(null, c, stat) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/package.json new file mode 100644 index 00000000..1374fd02 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/package.json @@ -0,0 +1,76 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "glob", + "description": "a little globber", + "version": "7.0.3", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "main": "glob.js", + "files": [ + "glob.js", + "sync.js", + "common.js" + ], + "engines": { + "node": "*" + }, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "devDependencies": { + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^5.7.0", + "tick": "0.0.6" + }, + "scripts": { + "prepublish": "npm run benchclean", + "profclean": "rm -f v8.log profile.txt", + "test": "tap test/*.js --cov", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", + "bench": "bash benchmark.sh", + "prof": "bash prof.sh && cat profile.txt", + "benchclean": "node benchclean.js" + }, + "license": "ISC", + "gitHead": "2fc2278ab857c7df117213a2fb431de090be6353", + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" + }, + "homepage": "https://github.com/isaacs/node-glob#readme", + "_id": "glob@7.0.3", + "_shasum": "0aa235931a4a96ac13d60ffac2fb877bd6ed4f58", + "_from": "glob@7.0.3", + "_npmVersion": "3.7.3", + "_nodeVersion": "5.6.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "0aa235931a4a96ac13d60ffac2fb877bd6ed4f58", + "tarball": "http://registry.npmjs.org/glob/-/glob-7.0.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/glob-7.0.3.tgz_1457166529288_0.7840580905321985" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.3.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/sync.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/sync.js new file mode 100644 index 00000000..7f951892 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/glob/sync.js @@ -0,0 +1,467 @@ +module.exports = globSync +globSync.GlobSync = GlobSync + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = fs.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this.matches[index][e] = true + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + var abs = this._makeAbs(e) + if (this.mark) + e = this._mark(e) + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[this._makeAbs(e)] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + // lstat failed, doesn't exist + return null + } + + var isSym = lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + throw error + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this.matches[index][prefix] = true +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + return false + } + + if (lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/LICENSE new file mode 100644 index 00000000..4801e373 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/README.md new file mode 100644 index 00000000..8c0ffe4a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/README.md @@ -0,0 +1,53 @@ +# graceful-fs + +graceful-fs functions as a drop-in replacement for the fs module, +making various improvements. + +The improvements are meant to normalize behavior across different +platforms and environments, and to make filesystem access more +resilient to errors. + +## Improvements over [fs module](http://api.nodejs.org/fs.html) + +graceful-fs: + +* Queues up `open` and `readdir` calls, and retries them once + something closes if there is an EMFILE error from too many file + descriptors. +* fixes `lchmod` for Node versions prior to 0.6.2. +* implements `fs.lutimes` if possible. Otherwise it becomes a noop. +* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or + `lchown` if the user isn't root. +* makes `lchmod` and `lchown` become noops, if not available. +* retries reading a file if `read` results in EAGAIN error. + +On Windows, it retries renaming a file for up to one second if `EACCESS` +or `EPERM` error occurs, likely because antivirus software has locked +the directory. + +## USAGE + +```javascript +// use just like fs +var fs = require('graceful-fs') + +// now go and do stuff with it... +fs.readFileSync('some-file-or-whatever') +``` + +## Global Patching + +If you want to patch the global fs module (or any other fs-like +module) you can do this: + +```javascript +// Make sure to read the caveat below. +var realFs = require('fs') +var gracefulFs = require('graceful-fs') +gracefulFs.gracefulify(realFs) +``` + +This should only ever be done at the top-level application layer, in +order to delay on EMFILE errors from any fs-using dependencies. You +should **not** do this in a library, because it can cause unexpected +delays in other parts of the program. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/fs.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/fs.js new file mode 100644 index 00000000..ce2c61a8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/fs.js @@ -0,0 +1,21 @@ +'use strict' + +var fs = require('fs') + +module.exports = clone(fs) + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: obj.__proto__ } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/graceful-fs.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/graceful-fs.js new file mode 100644 index 00000000..70d35b97 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/graceful-fs.js @@ -0,0 +1,253 @@ +var fs = require('fs') +var polyfills = require('./polyfills.js') +var legacy = require('./legacy-streams.js') +var queue = [] + +var util = require('util') + +function noop () {} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(queue) + require('assert').equal(queue.length, 0) + }) +} + +module.exports = patch(require('./fs.js')) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { + module.exports = patch(fs) +} + +// Always patch fs.close/closeSync, because we want to +// retry() whenever a close happens *anywhere* in the program. +// This is essential when multiple graceful-fs instances are +// in play at the same time. +module.exports.close = +fs.close = (function (fs$close) { return function (fd, cb) { + return fs$close.call(fs, fd, function (err) { + if (!err) + retry() + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) +}})(fs.close) + +module.exports.closeSync = +fs.closeSync = (function (fs$closeSync) { return function (fd) { + // Note that graceful-fs also retries when fs.closeSync() fails. + // Looks like a bug to me, although it's probably a harmless one. + var rval = fs$closeSync.apply(fs, arguments) + retry() + return rval +}})(fs.closeSync) + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + fs.FileReadStream = ReadStream; // Legacy name. + fs.FileWriteStream = WriteStream; // Legacy name. + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + function readdir (path, cb) { + return go$readdir(path, cb) + + function go$readdir () { + return fs$readdir(path, function (err, files) { + if (files && files.sort) + files.sort(); // Backwards compatibility with graceful-fs. + + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [path, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + + var fs$WriteStream = fs.WriteStream + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + + fs.ReadStream = ReadStream + fs.WriteStream = WriteStream + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + queue.push(elem) +} + +function retry () { + var elem = queue.shift() + if (elem) { + debug('RETRY', elem[0].name, elem[1]) + elem[0].apply(null, elem[1]) + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/legacy-streams.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/legacy-streams.js new file mode 100644 index 00000000..891ad852 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/legacy-streams.js @@ -0,0 +1,118 @@ +var Stream = require('stream').Stream + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/package.json new file mode 100644 index 00000000..0e8b17db --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/package.json @@ -0,0 +1,76 @@ +{ + "name": "graceful-fs", + "description": "A drop-in replacement for fs, making various improvements.", + "version": "4.1.3", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/node-graceful-fs.git" + }, + "main": "graceful-fs.js", + "engines": { + "node": ">=0.4.0" + }, + "directories": { + "test": "test" + }, + "scripts": { + "test": "node test.js | tap -" + }, + "keywords": [ + "fs", + "module", + "reading", + "retry", + "retries", + "queue", + "error", + "errors", + "handling", + "EMFILE", + "EAGAIN", + "EINVAL", + "EPERM", + "EACCESS" + ], + "license": "ISC", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^5.4.2" + }, + "files": [ + "fs.js", + "graceful-fs.js", + "legacy-streams.js", + "polyfills.js" + ], + "gitHead": "694c56f3aed4aee62d6df169be123d3984f61b85", + "bugs": { + "url": "https://github.com/isaacs/node-graceful-fs/issues" + }, + "homepage": "https://github.com/isaacs/node-graceful-fs#readme", + "_id": "graceful-fs@4.1.3", + "_shasum": "92033ce11113c41e2628d61fdfa40bc10dc0155c", + "_from": "graceful-fs@latest", + "_npmVersion": "3.7.0", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "92033ce11113c41e2628d61fdfa40bc10dc0155c", + "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/graceful-fs-4.1.3.tgz_1454449326495_0.943017533281818" + }, + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.3.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/polyfills.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/polyfills.js new file mode 100644 index 00000000..1422604a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/graceful-fs/polyfills.js @@ -0,0 +1,252 @@ +var fs = require('./fs.js') +var constants = require('constants') + +var origCwd = process.cwd +var cwd = null +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} + +var chdir = process.chdir +process.chdir = function(d) { + cwd = null + chdir.call(process, d) +} + +module.exports = patch + +function patch (fs) { + // (re-)implement some things that are known busted or missing. + + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } + + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) + } + + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. + + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) + + fs.chmod = chownFix(fs.chmod) + fs.fchmod = chownFix(fs.fchmod) + fs.lchmod = chownFix(fs.lchmod) + + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) + + fs.chmodSync = chownFix(fs.chmodSync) + fs.fchmodSync = chownFix(fs.fchmodSync) + fs.lchmodSync = chownFix(fs.lchmodSync) + + // if lchmod/lchown do not exist, then make them no-ops + if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + process.nextTick(cb) + } + fs.lchownSync = function () {} + } + + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 1 second. + if (process.platform === "win32") { + fs.rename = (function (fs$rename) { return function (from, to, cb) { + var start = Date.now() + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 1000) { + return fs$rename(from, to, CB) + } + if (cb) cb(er) + }) + }})(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = (function (fs$read) { return function (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + }})(fs.read) + + fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) +} + +function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + callback = callback || noop + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } +} + +function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + cb = cb || noop + if (er) return cb(er) + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + return cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + + } else { + fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } + fs.lutimesSync = function () {} + } +} + +function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er, res) { + if (chownErOk(er)) er = null + cb(er, res) + }) + } +} + +function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } +} + +// ENOSYS means that the fs doesn't support the op. Just ignore +// that, because it doesn't matter. +// +// if there's no getuid, or if getuid() is something other +// than 0, and the error is EINVAL or EPERM, then just ignore +// it. +// +// This specific case is a silent failure in cp, install, tar, +// and most other unix tools that manage permissions. +// +// When running as root, or if other types of errors are +// encountered, then it's strict. +function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/.npmignore new file mode 100644 index 00000000..0672b812 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/.npmignore @@ -0,0 +1,3 @@ +*~ +.# +node_modules diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/.travis.yml new file mode 100644 index 00000000..9b328c26 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.11" + - "0.10" +script: "npm test" diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/LICENSE new file mode 100644 index 00000000..8ed0832d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/README.md new file mode 100644 index 00000000..3fd3b3f0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/README.md @@ -0,0 +1,99 @@ +# hosted-git-info + +This will let you identify and transform various git hosts URLs between +protocols. It also can tell you what the URL is for the raw path for +particular file for direct access without git. + +## Usage + +```javascript +var hostedGitInfo = require("hosted-git-info") +var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git") +/* info looks like: +{ + type: "github", + domain: "github.com", + user: "npm", + project: "hosted-git-info" +} +*/ +``` + +If the URL can't be matched with a git host, `null` will be returned. We +can match git, ssh and https urls. Additionally, we can match ssh connect +strings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg, +`github:npm/hosted-git-info`). Github specifically, is detected in the case +of a third, unprefixed, form: `npm/hosted-git-info`. + +If it does match, the returned object has properties of: + +* info.type -- The short name of the service +* info.domain -- The domain for git protocol use +* info.user -- The name of the user/org on the git host +* info.project -- The name of the project on the git host + +And methods of: + +* info.file(path) + +Given the path of a file relative to the repository, returns a URL for +directly fetching it from the githost. If no committish was set then +`master` will be used as the default. + +For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")` +would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json` + +* info.shortcut() + +eg, `github:npm/hosted-git-info` + +* info.browse() + +eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0` + +* info.bugs() + +eg, `https://github.com/npm/hosted-git-info/issues` + +* info.docs() + +eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme` + +* info.https() + +eg, `git+https://github.com/npm/hosted-git-info.git` + +* info.sshurl() + +eg, `git+ssh://git@github.com/npm/hosted-git-info.git` + +* info.ssh() + +eg, `git@github.com:npm/hosted-git-info.git` + +* info.path() + +eg, `npm/hosted-git-info` + +* info.getDefaultRepresentation() + +Returns the default output type. The default output type is based on the +string you passed in to be parsed + +* info.toString() + +Uses the getDefaultRepresentation to call one of the other methods to get a URL for +this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give +you a normalized version of the URL that still uses the same protocol. + +Shortcuts will still be returned as shortcuts, but the special case github +form of `org/project` will be normalized to `github:org/project`. + +SSH connect strings will be normalized into `git+ssh` URLs. + + +## Supported hosts + +Currently this supports Github, Bitbucket and Gitlab. Pull requests for +additional hosts welcome. + diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/git-host-info.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/git-host-info.js new file mode 100644 index 00000000..db82c20d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/git-host-info.js @@ -0,0 +1,64 @@ +'use strict' + +var gitHosts = module.exports = { + github: { + // First two are insecure and generally shouldn't be used any more, but + // they are still supported. + 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'github.com', + 'treepath': 'tree', + 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}' + }, + bitbucket: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'bitbucket.org', + 'treepath': 'src' + }, + gitlab: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gitlab.com', + 'treepath': 'tree', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#README', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues' + }, + gist: { + 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gist.github.com', + 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]+)(?:[.]git)?$/, + 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', + 'bugstemplate': 'https://{domain}/{project}', + 'gittemplate': 'git://{domain}/{project}.git{#committish}', + 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{project}{/committish}', + 'docstemplate': 'https://{domain}/{project}{/committish}', + 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', + 'shortcuttemplate': '{type}:{project}{#committish}', + 'pathtemplate': '{project}{#committish}' + } +} + +var gitHostDefaults = { + 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', + 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', + 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', + 'shortcuttemplate': '{type}:{user}/{project}{#committish}', + 'pathtemplate': '{user}/{project}{#committish}', + 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git)?$/ +} + +Object.keys(gitHosts).forEach(function (name) { + Object.keys(gitHostDefaults).forEach(function (key) { + if (gitHosts[name][key]) return + gitHosts[name][key] = gitHostDefaults[key] + }) + gitHosts[name].protocols_re = RegExp('^(' + + gitHosts[name].protocols.map(function (protocol) { + return protocol.replace(/([\\+*{}()\[\]$^|])/g, '\\$1') + }).join('|') + '):$') +}) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/git-host.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/git-host.js new file mode 100644 index 00000000..ca060336 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/git-host.js @@ -0,0 +1,96 @@ +'use strict' +var gitHosts = require('./git-host-info.js') + +var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation) { + var gitHostInfo = this + gitHostInfo.type = type + Object.keys(gitHosts[type]).forEach(function (key) { + gitHostInfo[key] = gitHosts[type][key] + }) + gitHostInfo.user = user + gitHostInfo.auth = auth + gitHostInfo.project = project + gitHostInfo.committish = committish + gitHostInfo.default = defaultRepresentation +} +GitHost.prototype = {} + +GitHost.prototype.hash = function () { + return this.committish ? '#' + this.committish : '' +} + +GitHost.prototype._fill = function (template, vars) { + if (!template) return + if (!vars) vars = {} + var self = this + Object.keys(this).forEach(function (key) { + if (self[key] != null && vars[key] == null) vars[key] = self[key] + }) + var rawAuth = vars.auth + var rawComittish = vars.committish + Object.keys(vars).forEach(function (key) { + vars[key] = encodeURIComponent(vars[key]) + }) + vars['auth@'] = rawAuth ? rawAuth + '@' : '' + vars['#committish'] = rawComittish ? '#' + rawComittish : '' + vars['/tree/committish'] = vars.committish + ? '/' + vars.treepath + '/' + vars.committish + : '' + vars['/committish'] = vars.committish ? '/' + vars.committish : '' + vars.committish = vars.committish || 'master' + var res = template + Object.keys(vars).forEach(function (key) { + res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]) + }) + return res +} + +GitHost.prototype.ssh = function () { + return this._fill(this.sshtemplate) +} + +GitHost.prototype.sshurl = function () { + return this._fill(this.sshurltemplate) +} + +GitHost.prototype.browse = function () { + return this._fill(this.browsetemplate) +} + +GitHost.prototype.docs = function () { + return this._fill(this.docstemplate) +} + +GitHost.prototype.bugs = function () { + return this._fill(this.bugstemplate) +} + +GitHost.prototype.https = function () { + return this._fill(this.httpstemplate) +} + +GitHost.prototype.git = function () { + return this._fill(this.gittemplate) +} + +GitHost.prototype.shortcut = function () { + return this._fill(this.shortcuttemplate) +} + +GitHost.prototype.path = function () { + return this._fill(this.pathtemplate) +} + +GitHost.prototype.file = function (P) { + return this._fill(this.filetemplate, { + path: P.replace(/^[/]+/g, '') + }) +} + +GitHost.prototype.getDefaultRepresentation = function () { + return this.default +} + +GitHost.prototype.toString = function () { + return (this[this.default] || this.sshurl).call(this) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/index.js new file mode 100644 index 00000000..4cbbc6f5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/index.js @@ -0,0 +1,103 @@ +'use strict' +var url = require('url') +var gitHosts = require('./git-host-info.js') +var GitHost = module.exports = require('./git-host.js') + +var protocolToRepresentationMap = { + 'git+ssh': 'sshurl', + 'git+https': 'https', + 'ssh': 'sshurl', + 'git': 'git' +} + +function protocolToRepresentation (protocol) { + if (protocol.substr(-1) === ':') protocol = protocol.slice(0, -1) + return protocolToRepresentationMap[protocol] || protocol +} + +var authProtocols = { + 'git:': true, + 'https:': true, + 'git+https:': true, + 'http:': true, + 'git+http:': true +} + +module.exports.fromUrl = function (giturl) { + if (giturl == null || giturl === '') return + var url = fixupUnqualifiedGist( + isGitHubShorthand(giturl) ? 'github:' + giturl : giturl + ) + var parsed = parseGitUrl(url) + var matches = Object.keys(gitHosts).map(function (gitHostName) { + var gitHostInfo = gitHosts[gitHostName] + var auth = null + if (parsed.auth && authProtocols[parsed.protocol]) { + auth = decodeURIComponent(parsed.auth) + } + var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null + var user = null + var project = null + var defaultRepresentation = null + if (parsed.protocol === gitHostName + ':') { + user = decodeURIComponent(parsed.host) + project = parsed.path && decodeURIComponent(parsed.path.replace(/^[/](.*?)(?:[.]git)?$/, '$1')) + defaultRepresentation = 'shortcut' + } else { + if (parsed.host !== gitHostInfo.domain) return + if (!gitHostInfo.protocols_re.test(parsed.protocol)) return + var pathmatch = gitHostInfo.pathmatch + var matched = parsed.path.match(pathmatch) + if (!matched) return + if (matched[1] != null) user = decodeURIComponent(matched[1]) + if (matched[2] != null) project = decodeURIComponent(matched[2]) + defaultRepresentation = protocolToRepresentation(parsed.protocol) + } + return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation) + }).filter(function (gitHostInfo) { return gitHostInfo }) + if (matches.length !== 1) return + return matches[0] +} + +function isGitHubShorthand (arg) { + // Note: This does not fully test the git ref format. + // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html + // + // The only way to do this properly would be to shell out to + // git-check-ref-format, and as this is a fast sync function, + // we don't want to do that. Just let git fail if it turns + // out that the commit-ish is invalid. + // GH usernames cannot start with . or - + return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg) +} + +function fixupUnqualifiedGist (giturl) { + // necessary for round-tripping gists + var parsed = url.parse(giturl) + if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) { + return parsed.protocol + '/' + parsed.host + } else { + return giturl + } +} + +function parseGitUrl (giturl) { + if (typeof giturl !== 'string') giturl = '' + giturl + var matched = giturl.match(/^([^@]+)@([^:]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) + if (!matched) return url.parse(giturl) + return { + protocol: 'git+ssh:', + slashes: true, + auth: matched[1], + host: matched[2], + port: null, + hostname: matched[2], + hash: matched[4], + search: null, + query: null, + pathname: '/' + matched[3], + path: '/' + matched[3], + href: 'git+ssh://' + matched[1] + '@' + matched[2] + + '/' + matched[3] + (matched[4] || '') + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/package.json new file mode 100644 index 00000000..40133a3f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/hosted-git-info/package.json @@ -0,0 +1,59 @@ +{ + "name": "hosted-git-info", + "version": "2.1.4", + "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", + "main": "index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/hosted-git-info.git" + }, + "keywords": [ + "git", + "github", + "bitbucket", + "gitlab" + ], + "author": { + "name": "Rebecca Turner", + "email": "me@re-becca.org", + "url": "http://re-becca.org" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/hosted-git-info/issues" + }, + "homepage": "https://github.com/npm/hosted-git-info", + "scripts": { + "test": "standard && tap test/*.js" + }, + "devDependencies": { + "standard": "^3.3.2", + "tap": "^0.4.13" + }, + "gitHead": "9e1a36df8eb050a663713c79e56d89dadba2bd8d", + "_id": "hosted-git-info@2.1.4", + "_shasum": "d9e953b26988be88096c46e926494d9604c300f8", + "_from": "hosted-git-info@>=2.1.2 <2.2.0", + "_npmVersion": "2.10.1", + "_nodeVersion": "2.0.2", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "dist": { + "shasum": "d9e953b26988be88096c46e926494d9604c300f8", + "tarball": "http://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.4.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.4.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/README.md new file mode 100644 index 00000000..fb08ec95 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/README.md @@ -0,0 +1,122 @@ +iMurmurHash.js +============== + +An incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js). + +This version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing. + +Installation +------------ + +To use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site. + +```html + + +``` + +--- + +To use iMurmurHash in Node.js, install the module using NPM: + +```bash +npm install imurmurhash +``` + +Then simply include it in your scripts: + +```javascript +MurmurHash3 = require('imurmurhash'); +``` + +Quick Example +------------- + +```javascript +// Create the initial hash +var hashState = MurmurHash3('string'); + +// Incrementally add text +hashState.hash('more strings'); +hashState.hash('even more strings'); + +// All calls can be chained if desired +hashState.hash('and').hash('some').hash('more'); + +// Get a result +hashState.result(); +// returns 0xe4ccfe6b +``` + +Functions +--------- + +### MurmurHash3 ([string], [seed]) +Get a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example: + +```javascript +// Use the cached object, calling the function again will return the same +// object (but reset, so the current state would be lost) +hashState = MurmurHash3(); +... + +// Create a new object that can be safely used however you wish. Calling the +// function again will simply return a new state object, and no state loss +// will occur, at the cost of creating more objects. +hashState = new MurmurHash3(); +``` + +Both methods can be mixed however you like if you have different use cases. + +--- + +### MurmurHash3.prototype.hash (string) +Incrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained. + +--- + +### MurmurHash3.prototype.result () +Get the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`. + +```javascript +// Do the whole string at once +MurmurHash3('this is a test string').result(); +// 0x70529328 + +// Do part of the string, get a result, then the other part +var m = MurmurHash3('this is a'); +m.result(); +// 0xbfc4f834 +m.hash(' test string').result(); +// 0x70529328 (same as above) +``` + +--- + +### MurmurHash3.prototype.reset ([seed]) +Reset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained. + +--- + +License (MIT) +------------- +Copyright (c) 2013 Gary Court, Jens Taylor + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/imurmurhash.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/imurmurhash.js new file mode 100644 index 00000000..8ad7dbda --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/imurmurhash.js @@ -0,0 +1,138 @@ +/** + * @preserve + * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) + * + * @author Jens Taylor + * @see http://github.com/homebrewing/brauhaus-diff + * @author Gary Court + * @see http://github.com/garycourt/murmurhash-js + * @author Austin Appleby + * @see http://sites.google.com/site/murmurhash/ + */ +(function(){ + var cache; + + // Call this function without `new` to use the cached object (good for + // single-threaded environments), or with `new` to create a new object. + // + // @param {string} key A UTF-16 or ASCII string + // @param {number} seed An optional positive integer + // @return {object} A MurmurHash3 object for incremental hashing + function MurmurHash3(key, seed) { + var m = this instanceof MurmurHash3 ? this : cache; + m.reset(seed) + if (typeof key === 'string' && key.length > 0) { + m.hash(key); + } + + if (m !== this) { + return m; + } + }; + + // Incrementally add a string to this hash + // + // @param {string} key A UTF-16 or ASCII string + // @return {object} this + MurmurHash3.prototype.hash = function(key) { + var h1, k1, i, top, len; + + len = key.length; + this.len += len; + + k1 = this.k1; + i = 0; + switch (this.rem) { + case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0; + case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0; + case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0; + case 3: + k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0; + k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0; + } + + this.rem = (len + this.rem) & 3; // & 3 is same as % 4 + len -= this.rem; + if (len > 0) { + h1 = this.h1; + while (1) { + k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; + k1 = (k1 << 15) | (k1 >>> 17); + k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; + + h1 ^= k1; + h1 = (h1 << 13) | (h1 >>> 19); + h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff; + + if (i >= len) { + break; + } + + k1 = ((key.charCodeAt(i++) & 0xffff)) ^ + ((key.charCodeAt(i++) & 0xffff) << 8) ^ + ((key.charCodeAt(i++) & 0xffff) << 16); + top = key.charCodeAt(i++); + k1 ^= ((top & 0xff) << 24) ^ + ((top & 0xff00) >> 8); + } + + k1 = 0; + switch (this.rem) { + case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16; + case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8; + case 1: k1 ^= (key.charCodeAt(i) & 0xffff); + } + + this.h1 = h1; + } + + this.k1 = k1; + return this; + }; + + // Get the result of this hash + // + // @return {number} The 32-bit hash + MurmurHash3.prototype.result = function() { + var k1, h1; + + k1 = this.k1; + h1 = this.h1; + + if (k1 > 0) { + k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; + k1 = (k1 << 15) | (k1 >>> 17); + k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; + h1 ^= k1; + } + + h1 ^= this.len; + + h1 ^= h1 >>> 16; + h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff; + h1 ^= h1 >>> 13; + h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff; + h1 ^= h1 >>> 16; + + return h1 >>> 0; + }; + + // Reset the hash object for reuse + // + // @param {number} seed An optional positive integer + MurmurHash3.prototype.reset = function(seed) { + this.h1 = typeof seed === 'number' ? seed : 0; + this.rem = this.k1 = this.len = 0; + return this; + }; + + // A cached object to use. This can be safely used if you're in a single- + // threaded environment, otherwise you need to create new hashes to use. + cache = new MurmurHash3(); + + if (typeof(module) != 'undefined') { + module.exports = MurmurHash3; + } else { + this.MurmurHash3 = MurmurHash3; + } +}()); diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/imurmurhash.min.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/imurmurhash.min.js new file mode 100644 index 00000000..7dcd3d98 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/imurmurhash.min.js @@ -0,0 +1,12 @@ +/** + * @preserve + * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) + * + * @author Jens Taylor + * @see http://github.com/homebrewing/brauhaus-diff + * @author Gary Court + * @see http://github.com/garycourt/murmurhash-js + * @author Austin Appleby + * @see http://sites.google.com/site/murmurhash/ + */ +!function(){function t(h,r){var s=this instanceof t?this:e;return s.reset(r),"string"==typeof h&&h.length>0&&s.hash(h),s!==this?s:void 0}var e;t.prototype.hash=function(t){var e,h,r,s,i;switch(i=t.length,this.len+=i,h=this.k1,r=0,this.rem){case 0:h^=i>r?65535&t.charCodeAt(r++):0;case 1:h^=i>r?(65535&t.charCodeAt(r++))<<8:0;case 2:h^=i>r?(65535&t.charCodeAt(r++))<<16:0;case 3:h^=i>r?(255&t.charCodeAt(r))<<24:0,h^=i>r?(65280&t.charCodeAt(r++))>>8:0}if(this.rem=3&i+this.rem,i-=this.rem,i>0){for(e=this.h1;;){if(h=4294967295&11601*h+3432906752*(65535&h),h=h<<15|h>>>17,h=4294967295&13715*h+461832192*(65535&h),e^=h,e=e<<13|e>>>19,e=4294967295&5*e+3864292196,r>=i)break;h=65535&t.charCodeAt(r++)^(65535&t.charCodeAt(r++))<<8^(65535&t.charCodeAt(r++))<<16,s=t.charCodeAt(r++),h^=(255&s)<<24^(65280&s)>>8}switch(h=0,this.rem){case 3:h^=(65535&t.charCodeAt(r+2))<<16;case 2:h^=(65535&t.charCodeAt(r+1))<<8;case 1:h^=65535&t.charCodeAt(r)}this.h1=e}return this.k1=h,this},t.prototype.result=function(){var t,e;return t=this.k1,e=this.h1,t>0&&(t=4294967295&11601*t+3432906752*(65535&t),t=t<<15|t>>>17,t=4294967295&13715*t+461832192*(65535&t),e^=t),e^=this.len,e^=e>>>16,e=4294967295&51819*e+2246770688*(65535&e),e^=e>>>13,e=4294967295&44597*e+3266445312*(65535&e),e^=e>>>16,e>>>0},t.prototype.reset=function(t){return this.h1="number"==typeof t?t:0,this.rem=this.k1=this.len=0,this},e=new t,"undefined"!=typeof module?module.exports=t:this.MurmurHash3=t}(); \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/package.json new file mode 100644 index 00000000..5735f16a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/imurmurhash/package.json @@ -0,0 +1,60 @@ +{ + "name": "imurmurhash", + "version": "0.1.4", + "description": "An incremental implementation of MurmurHash3", + "homepage": "https://github.com/jensyt/imurmurhash-js", + "main": "imurmurhash.js", + "files": [ + "imurmurhash.js", + "imurmurhash.min.js", + "package.json", + "README.md" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/jensyt/imurmurhash-js.git" + }, + "bugs": { + "url": "https://github.com/jensyt/imurmurhash-js/issues" + }, + "keywords": [ + "murmur", + "murmurhash", + "murmurhash3", + "hash", + "incremental" + ], + "author": { + "name": "Jens Taylor", + "email": "jensyt@gmail.com", + "url": "https://github.com/homebrewing" + }, + "license": "MIT", + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.8.19" + }, + "readme": "iMurmurHash.js\n==============\n\nAn incremental implementation of the MurmurHash3 (32-bit) hashing algorithm for JavaScript based on [Gary Court's implementation](https://github.com/garycourt/murmurhash-js) with [kazuyukitanimura's modifications](https://github.com/kazuyukitanimura/murmurhash-js).\n\nThis version works significantly faster than the non-incremental version if you need to hash many small strings into a single hash, since string concatenation (to build the single string to pass the non-incremental version) is fairly costly. In one case tested, using the incremental version was about 50% faster than concatenating 5-10 strings and then hashing.\n\nInstallation\n------------\n\nTo use iMurmurHash in the browser, [download the latest version](https://raw.github.com/jensyt/imurmurhash-js/master/imurmurhash.min.js) and include it as a script on your site.\n\n```html\n\n\n```\n\n---\n\nTo use iMurmurHash in Node.js, install the module using NPM:\n\n```bash\nnpm install imurmurhash\n```\n\nThen simply include it in your scripts:\n\n```javascript\nMurmurHash3 = require('imurmurhash');\n```\n\nQuick Example\n-------------\n\n```javascript\n// Create the initial hash\nvar hashState = MurmurHash3('string');\n\n// Incrementally add text\nhashState.hash('more strings');\nhashState.hash('even more strings');\n\n// All calls can be chained if desired\nhashState.hash('and').hash('some').hash('more');\n\n// Get a result\nhashState.result();\n// returns 0xe4ccfe6b\n```\n\nFunctions\n---------\n\n### MurmurHash3 ([string], [seed])\nGet a hash state object, optionally initialized with the given _string_ and _seed_. _Seed_ must be a positive integer if provided. Calling this function without the `new` keyword will return a cached state object that has been reset. This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one. If this constraint cannot be met, you can use `new` to create a new state object. For example:\n\n```javascript\n// Use the cached object, calling the function again will return the same\n// object (but reset, so the current state would be lost)\nhashState = MurmurHash3();\n...\n\n// Create a new object that can be safely used however you wish. Calling the\n// function again will simply return a new state object, and no state loss\n// will occur, at the cost of creating more objects.\nhashState = new MurmurHash3();\n```\n\nBoth methods can be mixed however you like if you have different use cases.\n\n---\n\n### MurmurHash3.prototype.hash (string)\nIncrementally add _string_ to the hash. This can be called as many times as you want for the hash state object, including after a call to `result()`. Returns `this` so calls can be chained.\n\n---\n\n### MurmurHash3.prototype.result ()\nGet the result of the hash as a 32-bit positive integer. This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object. This means that it is perfectly safe to get results and then continue adding strings via `hash`.\n\n```javascript\n// Do the whole string at once\nMurmurHash3('this is a test string').result();\n// 0x70529328\n\n// Do part of the string, get a result, then the other part\nvar m = MurmurHash3('this is a');\nm.result();\n// 0xbfc4f834\nm.hash(' test string').result();\n// 0x70529328 (same as above)\n```\n\n---\n\n### MurmurHash3.prototype.reset ([seed])\nReset the state object for reuse, optionally using the given _seed_ (defaults to 0 like the constructor). Returns `this` so calls can be chained.\n\n---\n\nLicense (MIT)\n-------------\nCopyright (c) 2013 Gary Court, Jens Taylor\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "README.md", + "_id": "imurmurhash@0.1.4", + "dist": { + "shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea", + "tarball": "http://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + }, + "_from": "imurmurhash@0.1.4", + "_npmVersion": "1.3.2", + "_npmUser": { + "name": "jensyt", + "email": "jensyt@gmail.com" + }, + "maintainers": [ + { + "name": "jensyt", + "email": "jensyt@gmail.com" + } + ], + "directories": {}, + "_shasum": "9218b9b2b928a238b13dc4fb6b6d576f231453ea", + "_resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/LICENSE new file mode 100644 index 00000000..235bdd54 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/README.md new file mode 100644 index 00000000..9360515a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/README.md @@ -0,0 +1,37 @@ +# inflight + +Add callbacks to requests in flight to avoid async duplication + +## USAGE + +```javascript +var inflight = require('inflight') + +// some request that does some stuff +function req(key, callback) { + // key is any random string. like a url or filename or whatever. + // + // will return either a falsey value, indicating that the + // request for this key is already in flight, or a new callback + // which when called will call all callbacks passed to inflightk + // with the same key + callback = inflight(key, callback) + + // If we got a falsey value back, then there's already a req going + if (!callback) return + + // this is where you'd fetch the url or whatever + // callback is also once()-ified, so it can safely be assigned + // to multiple events etc. First call wins. + setTimeout(function() { + callback(null, key) + }, 100) +} + +// only assigns a single setTimeout +// when it dings, all cbs get called +req('foo', cb1) +req('foo', cb2) +req('foo', cb3) +req('foo', cb4) +``` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/inflight.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/inflight.js new file mode 100644 index 00000000..5227a49d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/inflight.js @@ -0,0 +1,44 @@ +var wrappy = require('wrappy') +var reqs = Object.create(null) +var once = require('once') + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/package.json new file mode 100644 index 00000000..debdf5bf --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/package.json @@ -0,0 +1,36 @@ +{ + "name": "inflight", + "version": "1.0.4", + "description": "Add callbacks to requests in flight to avoid async duplication", + "main": "inflight.js", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + }, + "devDependencies": { + "tap": "^0.4.10" + }, + "scripts": { + "test": "tap test.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inflight" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "readme": "# inflight\n\nAdd callbacks to requests in flight to avoid async duplication\n\n## USAGE\n\n```javascript\nvar inflight = require('inflight')\n\n// some request that does some stuff\nfunction req(key, callback) {\n // key is any random string. like a url or filename or whatever.\n //\n // will return either a falsey value, indicating that the\n // request for this key is already in flight, or a new callback\n // which when called will call all callbacks passed to inflightk\n // with the same key\n callback = inflight(key, callback)\n\n // If we got a falsey value back, then there's already a req going\n if (!callback) return\n\n // this is where you'd fetch the url or whatever\n // callback is also once()-ified, so it can safely be assigned\n // to multiple events etc. First call wins.\n setTimeout(function() {\n callback(null, key)\n }, 100)\n}\n\n// only assigns a single setTimeout\n// when it dings, all cbs get called\nreq('foo', cb1)\nreq('foo', cb2)\nreq('foo', cb3)\nreq('foo', cb4)\n```\n", + "readmeFilename": "README.md", + "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", + "_id": "inflight@1.0.4", + "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "_from": "inflight@>=1.0.4 <1.1.0" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/test.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/test.js new file mode 100644 index 00000000..ac141409 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/inflight/test.js @@ -0,0 +1,97 @@ +var test = require('tap').test +var inf = require('./inflight.js') + + +function req (key, cb) { + cb = inf(key, cb) + if (cb) setTimeout(function () { + cb(key) + cb(key) + }) + return cb +} + +test('basic', function (t) { + var calleda = false + var a = req('key', function (k) { + t.notOk(calleda) + calleda = true + t.equal(k, 'key') + if (calledb) t.end() + }) + t.ok(a, 'first returned cb function') + + var calledb = false + var b = req('key', function (k) { + t.notOk(calledb) + calledb = true + t.equal(k, 'key') + if (calleda) t.end() + }) + + t.notOk(b, 'second should get falsey inflight response') +}) + +test('timing', function (t) { + var expect = [ + 'method one', + 'start one', + 'end one', + 'two', + 'tick', + 'three' + ] + var i = 0 + + function log (m) { + t.equal(m, expect[i], m + ' === ' + expect[i]) + ++i + if (i === expect.length) + t.end() + } + + function method (name, cb) { + log('method ' + name) + process.nextTick(cb) + } + + var one = inf('foo', function () { + log('start one') + var three = inf('foo', function () { + log('three') + }) + if (three) method('three', three) + log('end one') + }) + + method('one', one) + + var two = inf('foo', function () { + log('two') + }) + if (two) method('one', two) + + process.nextTick(log.bind(null, 'tick')) +}) + +test('parameters', function (t) { + t.plan(8) + + var a = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.ok(a, 'first returned cb function') + + var b = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.notOk(b, 'second should get falsey inflight response') + + setTimeout(function () { + a(1, 2, 3) + }) +}) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/LICENSE new file mode 100644 index 00000000..1d68a100 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/README.md new file mode 100644 index 00000000..b41e30c2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/inherits.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/inherits.js new file mode 100644 index 00000000..1b61effa --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/inherits.js @@ -0,0 +1 @@ +module.exports = require('util').inherits diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/inherits_browser.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/inherits_browser.js new file mode 100644 index 00000000..1464d7f3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/inherits_browser.js @@ -0,0 +1,23 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/package.json new file mode 100644 index 00000000..00ce0d78 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/package.json @@ -0,0 +1,51 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.1", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits" + }, + "license": "ISC", + "scripts": { + "test": "node test" + }, + "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "_id": "inherits@2.0.1", + "dist": { + "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "_from": "inherits@latest", + "_npmVersion": "1.3.8", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "homepage": "https://github.com/isaacs/inherits" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/test.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/test.js new file mode 100644 index 00000000..347dd1f2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/inherits/test.js @@ -0,0 +1,25 @@ +var inherits = require('./inherits.js') +var assert = require('assert') + +function test(c) { + assert(c.constructor === Child) + assert(c.constructor.super_ === Parent) + assert(Object.getPrototypeOf(c) === Child.prototype) + assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) + assert(c instanceof Child) + assert(c instanceof Parent) +} + +function Child() { + Parent.call(this) + test(this) +} + +function Parent() {} + +inherits(Child, Parent) + +var c = new Child +test(c) + +console.log('ok') diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/README.md new file mode 100644 index 00000000..dc6ff3c6 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/README.md @@ -0,0 +1,102 @@ +An ini format parser and serializer for node. + +Sections are treated as nested objects. Items before the first +heading are saved on the object directly. + +## Usage + +Consider an ini-file `config.ini` that looks like this: + + ; this comment is being ignored + scope = global + + [database] + user = dbuser + password = dbpassword + database = use_this_database + + [paths.default] + datadir = /var/lib/data + array[] = first value + array[] = second value + array[] = third value + +You can read, manipulate and write the ini-file like so: + + var fs = require('fs') + , ini = require('ini') + + var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8')) + + config.scope = 'local' + config.database.database = 'use_another_database' + config.paths.default.tmpdir = '/tmp' + delete config.paths.default.datadir + config.paths.default.array.push('fourth value') + + fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' })) + +This will result in a file called `config_modified.ini` being written +to the filesystem with the following content: + + [section] + scope=local + [section.database] + user=dbuser + password=dbpassword + database=use_another_database + [section.paths.default] + tmpdir=/tmp + array[]=first value + array[]=second value + array[]=third value + array[]=fourth value + + +## API + +### decode(inistring) + +Decode the ini-style formatted `inistring` into a nested object. + +### parse(inistring) + +Alias for `decode(inistring)` + +### encode(object, [options]) + +Encode the object `object` into an ini-style formatted string. If the +optional parameter `section` is given, then all top-level properties +of the object are put into this section and the `section`-string is +prepended to all sub-sections, see the usage example above. + +The `options` object may contain the following: + +* `section` A string which will be the first `section` in the encoded + ini data. Defaults to none. +* `whitespace` Boolean to specify whether to put whitespace around the + `=` character. By default, whitespace is omitted, to be friendly to + some persnickety old parsers that don't tolerate it well. But some + find that it's more human-readable and pretty with the whitespace. + +For backwards compatibility reasons, if a `string` options is passed +in, then it is assumed to be the `section` value. + +### stringify(object, [options]) + +Alias for `encode(object, [options])` + +### safe(val) + +Escapes the string `val` such that it is safe to be used as a key or +value in an ini-file. Basically escapes quotes. For example + + ini.safe('"unsafe string"') + +would result in + + "\"unsafe string\"" + +### unsafe(val) + +Unescapes the string `val` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/ini.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/ini.js new file mode 100644 index 00000000..b7e39ed8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/ini.js @@ -0,0 +1,190 @@ + +exports.parse = exports.decode = decode +exports.stringify = exports.encode = encode + +exports.safe = safe +exports.unsafe = unsafe + +var eol = process.platform === "win32" ? "\r\n" : "\n" + +function encode (obj, opt) { + var children = [] + , out = "" + + if (typeof opt === "string") { + opt = { + section: opt, + whitespace: false + } + } else { + opt = opt || {} + opt.whitespace = opt.whitespace === true + } + + var separator = opt.whitespace ? " = " : "=" + + Object.keys(obj).forEach(function (k, _, __) { + var val = obj[k] + if (val && Array.isArray(val)) { + val.forEach(function(item) { + out += safe(k + "[]") + separator + safe(item) + "\n" + }) + } + else if (val && typeof val === "object") { + children.push(k) + } else { + out += safe(k) + separator + safe(val) + eol + } + }) + + if (opt.section && out.length) { + out = "[" + safe(opt.section) + "]" + eol + out + } + + children.forEach(function (k, _, __) { + var nk = dotSplit(k).join('\\.') + var section = (opt.section ? opt.section + "." : "") + nk + var child = encode(obj[k], { + section: section, + whitespace: opt.whitespace + }) + if (out.length && child.length) { + out += eol + } + out += child + }) + + return out +} + +function dotSplit (str) { + return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') + .replace(/\\\./g, '\u0001') + .split(/\./).map(function (part) { + return part.replace(/\1/g, '\\.') + .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001') + }) +} + +function decode (str) { + var out = {} + , p = out + , section = null + , state = "START" + // section |key = value + , re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i + , lines = str.split(/[\r\n]+/g) + , section = null + + lines.forEach(function (line, _, __) { + if (!line || line.match(/^\s*[;#]/)) return + var match = line.match(re) + if (!match) return + if (match[1] !== undefined) { + section = unsafe(match[1]) + p = out[section] = out[section] || {} + return + } + var key = unsafe(match[2]) + , value = match[3] ? unsafe((match[4] || "")) : true + switch (value) { + case 'true': + case 'false': + case 'null': value = JSON.parse(value) + } + + // Convert keys with '[]' suffix to an array + if (key.length > 2 && key.slice(-2) === "[]") { + key = key.substring(0, key.length - 2) + if (!p[key]) { + p[key] = [] + } + else if (!Array.isArray(p[key])) { + p[key] = [p[key]] + } + } + + // safeguard against resetting a previously defined + // array by accidentally forgetting the brackets + if (Array.isArray(p[key])) { + p[key].push(value) + } + else { + p[key] = value + } + }) + + // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} + // use a filter to return the keys that have to be deleted. + Object.keys(out).filter(function (k, _, __) { + if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k])) return false + // see if the parent section is also an object. + // if so, add it to that, and mark this one for deletion + var parts = dotSplit(k) + , p = out + , l = parts.pop() + , nl = l.replace(/\\\./g, '.') + parts.forEach(function (part, _, __) { + if (!p[part] || typeof p[part] !== "object") p[part] = {} + p = p[part] + }) + if (p === out && nl === l) return false + p[nl] = out[k] + return true + }).forEach(function (del, _, __) { + delete out[del] + }) + + return out +} + +function isQuoted (val) { + return (val.charAt(0) === "\"" && val.slice(-1) === "\"") + || (val.charAt(0) === "'" && val.slice(-1) === "'") +} + +function safe (val) { + return ( typeof val !== "string" + || val.match(/[=\r\n]/) + || val.match(/^\[/) + || (val.length > 1 + && isQuoted(val)) + || val !== val.trim() ) + ? JSON.stringify(val) + : val.replace(/;/g, '\\;').replace(/#/g, "\\#") +} + +function unsafe (val, doUnesc) { + val = (val || "").trim() + if (isQuoted(val)) { + // remove the single quotes before calling JSON.parse + if (val.charAt(0) === "'") { + val = val.substr(1, val.length - 2); + } + try { val = JSON.parse(val) } catch (_) {} + } else { + // walk the val to find the first not-escaped ; character + var esc = false + var unesc = ""; + for (var i = 0, l = val.length; i < l; i++) { + var c = val.charAt(i) + if (esc) { + if ("\\;#".indexOf(c) !== -1) + unesc += c + else + unesc += "\\" + c + esc = false + } else if (";#".indexOf(c) !== -1) { + break + } else if (c === "\\") { + esc = true + } else { + unesc += c + } + } + if (esc) + unesc += "\\" + return unesc + } + return val +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/package.json new file mode 100644 index 00000000..be190386 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/ini/package.json @@ -0,0 +1,56 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "ini", + "description": "An ini encoder/decoder for node", + "version": "1.3.4", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/ini.git" + }, + "main": "ini.js", + "scripts": { + "test": "tap test/*.js" + }, + "engines": { + "node": "*" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^1.2.0" + }, + "license": "ISC", + "files": [ + "ini.js" + ], + "gitHead": "4a3001abc4c608e51add9f1d2b2cadf02b8e6dea", + "bugs": { + "url": "https://github.com/isaacs/ini/issues" + }, + "homepage": "https://github.com/isaacs/ini#readme", + "_id": "ini@1.3.4", + "_shasum": "0537cb79daf59b59a1a517dff706c86ec039162e", + "_from": "ini@latest", + "_npmVersion": "2.10.1", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "0537cb79daf59b59a1a517dff706c86ec039162e", + "tarball": "http://registry.npmjs.org/ini/-/ini-1.3.4.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/.npmignore new file mode 100644 index 00000000..edb88f44 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +.eslintrc diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/.travis.yml new file mode 100644 index 00000000..379f2614 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - '0.10' + - '0.12' + - 'iojs' diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/LICENSE new file mode 100644 index 00000000..235bdd54 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/README.md new file mode 100644 index 00000000..529a0d83 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/README.md @@ -0,0 +1,45 @@ +# init-package-json + +A node module to get your node module started. + +[![Build Status](https://secure.travis-ci.org/npm/init-package-json.svg)](http://travis-ci.org/npm/init-package-json) + +## Usage + +```javascript +var init = require('init-package-json') +var path = require('path') + +// a path to a promzard module. In the event that this file is +// not found, one will be provided for you. +var initFile = path.resolve(process.env.HOME, '.npm-init') + +// the dir where we're doin stuff. +var dir = process.cwd() + +// extra stuff that gets put into the PromZard module's context. +// In npm, this is the resolved config object. Exposed as 'config' +// Optional. +var configData = { some: 'extra stuff' } + +// Any existing stuff from the package.json file is also exposed in the +// PromZard module as the `package` object. There will also be free +// vars for: +// * `filename` path to the package.json file +// * `basename` the tip of the package dir +// * `dirname` the parent of the package dir + +init(dir, initFile, configData, function (er, data) { + // the data's already been written to {dir}/package.json + // now you can do stuff with it +}) +``` + +Or from the command line: + +``` +$ npm-init +``` + +See [PromZard](https://github.com/npm/promzard) for details about +what can go in the config file. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/default-input.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/default-input.js new file mode 100644 index 00000000..e61838c8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/default-input.js @@ -0,0 +1,238 @@ +var fs = require('fs') +var glob = require('glob') +var path = require('path') +var validateLicense = require('validate-npm-package-license') +var validateName = require('validate-npm-package-name') +var npa = require('npm-package-arg') +var semver = require('semver') + +// more popular packages should go here, maybe? +function isTestPkg (p) { + return !!p.match(/^(expresso|mocha|tap|coffee-script|coco|streamline)$/) +} + +function niceName (n) { + return n.replace(/^node-|[.-]js$/g, '').toLowerCase() +} + +function readDeps (test) { return function (cb) { + fs.readdir('node_modules', function (er, dir) { + if (er) return cb() + var deps = {} + var n = dir.length + if (n === 0) return cb(null, deps) + dir.forEach(function (d) { + if (d.match(/^\./)) return next() + if (test !== isTestPkg(d)) + return next() + + var dp = path.join(dirname, 'node_modules', d, 'package.json') + fs.readFile(dp, 'utf8', function (er, p) { + if (er) return next() + try { p = JSON.parse(p) } + catch (e) { return next() } + if (!p.version) return next() + if (p._requiredBy) { + if (!p._requiredBy.some(function (req) { return req === '#USER' })) return next() + } + deps[d] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version + return next() + }) + }) + function next () { + if (--n === 0) return cb(null, deps) + } + }) +}} + +var name = package.name || basename +var spec = npa(name) +var scope = config.get('scope') +if (scope) { + if (scope.charAt(0) !== '@') scope = '@' + scope + if (spec.scope) { + name = scope + '/' + spec.name.split('/')[1] + } else { + name = scope + '/' + name + } +} +exports.name = yes ? name : prompt('name', name, function (data) { + var its = validateName(data) + if (its.validForNewPackages) return data + var errors = (its.errors || []).concat(its.warnings || []) + var er = new Error('Sorry, ' + errors.join(' and ') + '.') + er.notValid = true + return er +}) + +var version = package.version || + config.get('init.version') || + config.get('init-version') || + '1.0.0' +exports.version = yes ? + version : + prompt('version', version, function (version) { + if (semver.valid(version)) return version + var er = new Error('Invalid version: "' + version + '"') + er.notValid = true + return er + }) + +if (!package.description) { + exports.description = yes ? '' : prompt('description') +} + +if (!package.main) { + exports.main = function (cb) { + fs.readdir(dirname, function (er, f) { + if (er) f = [] + + f = f.filter(function (f) { + return f.match(/\.js$/) + }) + + if (f.indexOf('index.js') !== -1) + f = 'index.js' + else if (f.indexOf('main.js') !== -1) + f = 'main.js' + else if (f.indexOf(basename + '.js') !== -1) + f = basename + '.js' + else + f = f[0] + + var index = f || 'index.js' + return cb(null, yes ? index : prompt('entry point', index)) + }) + } +} + +if (!package.bin) { + exports.bin = function (cb) { + fs.readdir(path.resolve(dirname, 'bin'), function (er, d) { + // no bins + if (er) return cb() + // just take the first js file we find there, or nada + return cb(null, d.filter(function (f) { + return f.match(/\.js$/) + })[0]) + }) + } +} + +exports.directories = function (cb) { + fs.readdir(dirname, function (er, dirs) { + if (er) return cb(er) + var res = {} + dirs.forEach(function (d) { + switch (d) { + case 'example': case 'examples': return res.example = d + case 'test': case 'tests': return res.test = d + case 'doc': case 'docs': return res.doc = d + case 'man': return res.man = d + } + }) + if (Object.keys(res).length === 0) res = undefined + return cb(null, res) + }) +} + +if (!package.dependencies) { + exports.dependencies = readDeps(false) +} + +if (!package.devDependencies) { + exports.devDependencies = readDeps(true) +} + +// MUST have a test script! +var s = package.scripts || {} +var notest = 'echo "Error: no test specified" && exit 1' +if (!package.scripts) { + exports.scripts = function (cb) { + fs.readdir(path.join(dirname, 'node_modules'), function (er, d) { + setupScripts(d || [], cb) + }) + } +} +function setupScripts (d, cb) { + // check to see what framework is in use, if any + function tx (test) { + return test || notest + } + if (!s.test || s.test === notest) { + var commands = { + 'tap':'tap test/*.js' + , 'expresso':'expresso test' + , 'mocha':'mocha' + } + var command + Object.keys(commands).forEach(function (k) { + if (d.indexOf(k) !== -1) command = commands[k] + }) + var ps = 'test command' + if (yes) { + s.test = command || notest + } else { + s.test = command ? prompt(ps, command, tx) : prompt(ps, tx) + } + } + return cb(null, s) +} + +if (!package.repository) { + exports.repository = function (cb) { + fs.readFile('.git/config', 'utf8', function (er, gconf) { + if (er || !gconf) { + return cb(null, yes ? '' : prompt('git repository')) + } + gconf = gconf.split(/\r?\n/) + var i = gconf.indexOf('[remote "origin"]') + if (i !== -1) { + var u = gconf[i + 1] + if (!u.match(/^\s*url =/)) u = gconf[i + 2] + if (!u.match(/^\s*url =/)) u = null + else u = u.replace(/^\s*url = /, '') + } + if (u && u.match(/^git@github.com:/)) + u = u.replace(/^git@github.com:/, 'https://github.com/') + + return cb(null, yes ? u : prompt('git repository', u)) + }) + } +} + +if (!package.keywords) { + exports.keywords = yes ? '' : prompt('keywords', function (s) { + if (!s) return undefined + if (Array.isArray(s)) s = s.join(' ') + if (typeof s !== 'string') return s + return s.split(/[\s,]+/) + }) +} + +if (!package.author) { + exports.author = config.get('init.author.name') || + config.get('init-author-name') + ? { + "name" : config.get('init.author.name') || + config.get('init-author-name'), + "email" : config.get('init.author.email') || + config.get('init-author-email'), + "url" : config.get('init.author.url') || + config.get('init-author-url') + } + : yes ? '' : prompt('author') +} + +var license = package.license || + config.get('init.license') || + config.get('init-license') || + 'ISC' +exports.license = yes ? license : prompt('license', license, function (data) { + var its = validateLicense(data) + if (its.validForNewPackages) return data + var errors = (its.errors || []).concat(its.warnings || []) + var er = new Error('Sorry, ' + errors.join(' and ') + '.') + er.notValid = true + return er +}) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/init-package-json.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/init-package-json.js new file mode 100644 index 00000000..37e07446 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/init-package-json.js @@ -0,0 +1,151 @@ + +module.exports = init +module.exports.yes = yes + +var PZ = require('promzard').PromZard +var path = require('path') +var def = require.resolve('./default-input.js') + +var fs = require('fs') +var semver = require('semver') +var read = require('read') + +// to validate the data object at the end as a worthwhile package +// and assign default values for things. +// readJson.extras(file, data, cb) +var readJson = require('read-package-json') + +function yes (conf) { + return !!( + conf.get('yes') || conf.get('y') || + conf.get('force') || conf.get('f') + ) +} + +function init (dir, input, config, cb) { + if (typeof config === 'function') + cb = config, config = {} + + // accept either a plain-jane object, or a config object + // with a "get" method. + if (typeof config.get !== 'function') { + var data = config + config = { + get: function (k) { + return data[k] + }, + toJSON: function () { + return data + } + } + } + + var package = path.resolve(dir, 'package.json') + input = path.resolve(input) + var pkg + var ctx = { yes: yes(config) } + + var es = readJson.extraSet + readJson.extraSet = es.filter(function (fn) { + return fn.name !== 'authors' && fn.name !== 'mans' + }) + readJson(package, function (er, d) { + readJson.extraSet = es + + if (er) pkg = {} + else pkg = d + + ctx.filename = package + ctx.dirname = path.dirname(package) + ctx.basename = path.basename(ctx.dirname) + if (!pkg.version || !semver.valid(pkg.version)) + delete pkg.version + + ctx.package = pkg + ctx.config = config || {} + + // make sure that the input is valid. + // if not, use the default + var pz = new PZ(input, ctx) + pz.backupFile = def + pz.on('error', cb) + pz.on('data', function (data) { + Object.keys(data).forEach(function (k) { + if (data[k] !== undefined && data[k] !== null) pkg[k] = data[k] + }) + + // only do a few of these. + // no need for mans or contributors if they're in the files + var es = readJson.extraSet + readJson.extraSet = es.filter(function (fn) { + return fn.name !== 'authors' && fn.name !== 'mans' + }) + readJson.extras(package, pkg, function (er, pkg) { + readJson.extraSet = es + if (er) return cb(er, pkg) + pkg = unParsePeople(pkg) + // no need for the readme now. + delete pkg.readme + delete pkg.readmeFilename + + // really don't want to have this lying around in the file + delete pkg._id + + // ditto + delete pkg.gitHead + + // if the repo is empty, remove it. + if (!pkg.repository) + delete pkg.repository + + // readJson filters out empty descriptions, but init-package-json + // traditionally leaves them alone + if (!pkg.description) + pkg.description = data.description + + var d = JSON.stringify(pkg, null, 2) + '\n' + function write (yes) { + fs.writeFile(package, d, 'utf8', function (er) { + if (!er && yes && !config.get('silent')) { + console.log('Wrote to %s:\n\n%s\n', package, d) + } + return cb(er, pkg) + }) + } + if (ctx.yes) { + return write(true) + } + console.log('About to write to %s:\n\n%s\n', package, d) + read({prompt:'Is this ok? ', default: 'yes'}, function (er, ok) { + if (!ok || ok.toLowerCase().charAt(0) !== 'y') { + console.log('Aborted.') + } else { + return write() + } + }) + }) + }) + }) + +} + +// turn the objects into somewhat more humane strings. +function unParsePeople (data) { + if (data.author) data.author = unParsePerson(data.author) + ;["maintainers", "contributors"].forEach(function (set) { + if (!Array.isArray(data[set])) return; + data[set] = data[set].map(unParsePerson) + }) + return data +} + +function unParsePerson (person) { + if (typeof person === "string") return person + var name = person.name || "" + var u = person.url || person.web + var url = u ? (" ("+u+")") : "" + var e = person.email || person.mail + var email = e ? (" <"+e+">") : "" + return name+email+url +} + diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/package.json new file mode 100644 index 00000000..00a40c18 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/init-package-json/package.json @@ -0,0 +1,82 @@ +{ + "name": "init-package-json", + "version": "1.9.3", + "main": "init-package-json.js", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/init-package-json.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "description": "A node module to get your node module started", + "dependencies": { + "glob": "^6.0.0", + "npm-package-arg": "^4.0.0", + "promzard": "^0.3.0", + "read": "~1.0.1", + "read-package-json": "1 || 2", + "semver": "2.x || 3.x || 4 || 5", + "validate-npm-package-license": "^3.0.1", + "validate-npm-package-name": "^2.0.1" + }, + "devDependencies": { + "npm": "^2", + "rimraf": "^2.1.4", + "tap": "^1.2.0" + }, + "keywords": [ + "init", + "package.json", + "package", + "helper", + "wizard", + "wizerd", + "prompt", + "start" + ], + "gitHead": "12eb24ff2f75f84a4a27436bc6f6cb765cbd9ee2", + "bugs": { + "url": "https://github.com/npm/init-package-json/issues" + }, + "homepage": "https://github.com/npm/init-package-json#readme", + "_id": "init-package-json@1.9.3", + "_shasum": "ca2ff94709b6d9aaad66533c11a0aff645f15c7d", + "_from": "init-package-json@1.9.3", + "_npmVersion": "3.5.4", + "_nodeVersion": "4.2.2", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "ca2ff94709b6d9aaad66533c11a0aff645f15c7d", + "tarball": "http://registry.npmjs.org/init-package-json/-/init-package-json-1.9.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.9.3.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/README.md new file mode 100644 index 00000000..41625a32 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/README.md @@ -0,0 +1,86 @@ +# lockfile + +A very polite lock file utility, which endeavors to not litter, and to +wait patiently for others. + +## Usage + +```javascript +var lockFile = require('lockfile') + +// opts is optional, and defaults to {} +lockFile.lock('some-file.lock', opts, function (er) { + // if the er happens, then it failed to acquire a lock. + // if there was not an error, then the file was created, + // and won't be deleted until we unlock it. + + // do my stuff, free of interruptions + // then, some time later, do: + lockFile.unlock('some-file.lock', function (er) { + // er means that an error happened, and is probably bad. + }) +}) +``` + +## Methods + +Sync methods return the value/throw the error, others don't. Standard +node fs stuff. + +All known locks are removed when the process exits. Of course, it's +possible for certain types of failures to cause this to fail, but a best +effort is made to not be a litterbug. + +### lockFile.lock(path, [opts], cb) + +Acquire a file lock on the specified path + +### lockFile.lockSync(path, [opts]) + +Acquire a file lock on the specified path + +### lockFile.unlock(path, cb) + +Close and unlink the lockfile. + +### lockFile.unlockSync(path) + +Close and unlink the lockfile. + +### lockFile.check(path, [opts], cb) + +Check if the lockfile is locked and not stale. + +Callback is called with `cb(error, isLocked)`. + +### lockFile.checkSync(path, [opts]) + +Check if the lockfile is locked and not stale. + +Returns boolean. + +## Options + +### opts.wait + +A number of milliseconds to wait for locks to expire before giving up. +Only used by lockFile.lock. Poll for `opts.wait` ms. If the lock is +not cleared by the time the wait expires, then it returns with the +original error. + +### opts.pollPeriod + +When using `opts.wait`, this is the period in ms in which it polls to +check if the lock has expired. Defaults to `100`. + +### opts.stale + +A number of milliseconds before locks are considered to have expired. + +### opts.retries + +Used by lock and lockSync. Retry `n` number of times before giving up. + +### opts.retryWait + +Used by lock. Wait `n` milliseconds before retrying. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/lockfile.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/lockfile.js new file mode 100644 index 00000000..3736a36e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/lockfile.js @@ -0,0 +1,311 @@ +var fs = require('fs') + +var wx = 'wx' +if (process.version.match(/^v0\.[0-6]/)) { + var c = require('constants') + wx = c.O_TRUNC | c.O_CREAT | c.O_WRONLY | c.O_EXCL +} + +var os = require('os') +exports.filetime = 'ctime' +if (os.platform() == "win32") { + exports.filetime = 'mtime' +} + +var debug +var util = require('util') +if (util.debuglog) + debug = util.debuglog('LOCKFILE') +else if (/\blockfile\b/i.test(process.env.NODE_DEBUG)) + debug = function() { + var msg = util.format.apply(util, arguments) + console.error('LOCKFILE %d %s', process.pid, msg) + } +else + debug = function() {} + +var locks = {} + +function hasOwnProperty (obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop) +} + +process.on('exit', function () { + debug('exit listener') + // cleanup + Object.keys(locks).forEach(exports.unlockSync) +}) + +// XXX https://github.com/joyent/node/issues/3555 +// Remove when node 0.8 is deprecated. +if (/^v0\.[0-8]\./.test(process.version)) { + debug('uncaughtException, version = %s', process.version) + process.on('uncaughtException', function H (er) { + debug('uncaughtException') + var l = process.listeners('uncaughtException').filter(function (h) { + return h !== H + }) + if (!l.length) { + // cleanup + try { Object.keys(locks).forEach(exports.unlockSync) } catch (e) {} + process.removeListener('uncaughtException', H) + throw er + } + }) +} + +exports.unlock = function (path, cb) { + debug('unlock', path) + // best-effort. unlocking an already-unlocked lock is a noop + delete locks[path] + fs.unlink(path, function (unlinkEr) { cb() }) +} + +exports.unlockSync = function (path) { + debug('unlockSync', path) + // best-effort. unlocking an already-unlocked lock is a noop + try { fs.unlinkSync(path) } catch (er) {} + delete locks[path] +} + + +// if the file can be opened in readonly mode, then it's there. +// if the error is something other than ENOENT, then it's not. +exports.check = function (path, opts, cb) { + if (typeof opts === 'function') cb = opts, opts = {} + debug('check', path, opts) + fs.open(path, 'r', function (er, fd) { + if (er) { + if (er.code !== 'ENOENT') return cb(er) + return cb(null, false) + } + + if (!opts.stale) { + return fs.close(fd, function (er) { + return cb(er, true) + }) + } + + fs.fstat(fd, function (er, st) { + if (er) return fs.close(fd, function (er2) { + return cb(er) + }) + + fs.close(fd, function (er) { + var age = Date.now() - st[exports.filetime].getTime() + return cb(er, age <= opts.stale) + }) + }) + }) +} + +exports.checkSync = function (path, opts) { + opts = opts || {} + debug('checkSync', path, opts) + if (opts.wait) { + throw new Error('opts.wait not supported sync for obvious reasons') + } + + try { + var fd = fs.openSync(path, 'r') + } catch (er) { + if (er.code !== 'ENOENT') throw er + return false + } + + if (!opts.stale) { + try { fs.closeSync(fd) } catch (er) {} + return true + } + + // file exists. however, might be stale + if (opts.stale) { + try { + var st = fs.fstatSync(fd) + } finally { + fs.closeSync(fd) + } + var age = Date.now() - st[exports.filetime].getTime() + return (age <= opts.stale) + } +} + + + +var req = 1 +exports.lock = function (path, opts, cb) { + if (typeof opts === 'function') cb = opts, opts = {} + opts.req = opts.req || req++ + debug('lock', path, opts) + opts.start = opts.start || Date.now() + + if (typeof opts.retries === 'number' && opts.retries > 0) { + debug('has retries', opts.retries) + var retries = opts.retries + opts.retries = 0 + cb = (function (orig) { return function cb (er, fd) { + debug('retry-mutated callback') + retries -= 1 + if (!er || retries < 0) return orig(er, fd) + + debug('lock retry', path, opts) + + if (opts.retryWait) setTimeout(retry, opts.retryWait) + else retry() + + function retry () { + opts.start = Date.now() + debug('retrying', opts.start) + exports.lock(path, opts, cb) + } + }})(cb) + } + + // try to engage the lock. + // if this succeeds, then we're in business. + fs.open(path, wx, function (er, fd) { + if (!er) { + debug('locked', path, fd) + locks[path] = fd + return fs.close(fd, function () { + return cb() + }) + } + + // something other than "currently locked" + // maybe eperm or something. + if (er.code !== 'EEXIST') return cb(er) + + // someone's got this one. see if it's valid. + if (!opts.stale) return notStale(er, path, opts, cb) + + return maybeStale(er, path, opts, false, cb) + }) +} + + +// Staleness checking algorithm +// 1. acquire $lock, fail +// 2. stat $lock, find that it is stale +// 3. acquire $lock.STALE +// 4. stat $lock, assert that it is still stale +// 5. unlink $lock +// 6. link $lock.STALE $lock +// 7. unlink $lock.STALE +// On any failure, clean up whatever we've done, and raise the error. +function maybeStale (originalEr, path, opts, hasStaleLock, cb) { + fs.stat(path, function (statEr, st) { + if (statEr) { + if (statEr.code === 'ENOENT') { + // expired already! + opts.stale = false + debug('lock stale enoent retry', path, opts) + exports.lock(path, opts, cb) + return + } + return cb(statEr) + } + + var age = Date.now() - st[exports.filetime].getTime() + if (age <= opts.stale) return notStale(originalEr, path, opts, cb) + + debug('lock stale', path, opts) + if (hasStaleLock) { + exports.unlock(path, function (er) { + if (er) return cb(er) + debug('lock stale retry', path, opts) + fs.link(path + '.STALE', path, function (er) { + fs.unlink(path + '.STALE', function () { + // best effort. if the unlink fails, oh well. + cb(er) + }) + }) + }) + } else { + debug('acquire .STALE file lock', opts) + exports.lock(path + '.STALE', opts, function (er) { + if (er) return cb(er) + maybeStale(originalEr, path, opts, true, cb) + }) + } + }) +} + +function notStale (er, path, opts, cb) { + debug('notStale', path, opts) + + // if we can't wait, then just call it a failure + if (typeof opts.wait !== 'number' || opts.wait <= 0) + return cb(er) + + // poll for some ms for the lock to clear + var now = Date.now() + var start = opts.start || now + var end = start + opts.wait + + if (end <= now) + return cb(er) + + debug('now=%d, wait until %d (delta=%d)', start, end, end-start) + var wait = Math.min(end - start, opts.pollPeriod || 100) + var timer = setTimeout(poll, wait) + + function poll () { + debug('notStale, polling', path, opts) + exports.lock(path, opts, cb) + } +} + +exports.lockSync = function (path, opts) { + opts = opts || {} + opts.req = opts.req || req++ + debug('lockSync', path, opts) + if (opts.wait || opts.retryWait) { + throw new Error('opts.wait not supported sync for obvious reasons') + } + + try { + var fd = fs.openSync(path, wx) + locks[path] = fd + try { fs.closeSync(fd) } catch (er) {} + debug('locked sync!', path, fd) + return + } catch (er) { + if (er.code !== 'EEXIST') return retryThrow(path, opts, er) + + if (opts.stale) { + var st = fs.statSync(path) + var ct = st[exports.filetime].getTime() + if (!(ct % 1000) && (opts.stale % 1000)) { + // probably don't have subsecond resolution. + // round up the staleness indicator. + // Yes, this will be wrong 1/1000 times on platforms + // with subsecond stat precision, but that's acceptable + // in exchange for not mistakenly removing locks on + // most other systems. + opts.stale = 1000 * Math.ceil(opts.stale / 1000) + } + var age = Date.now() - ct + if (age > opts.stale) { + debug('lockSync stale', path, opts, age) + exports.unlockSync(path) + return exports.lockSync(path, opts) + } + } + + // failed to lock! + debug('failed to lock', path, opts, er) + return retryThrow(path, opts, er) + } +} + +function retryThrow (path, opts, er) { + if (typeof opts.retries === 'number' && opts.retries > 0) { + var newRT = opts.retries - 1 + debug('retryThrow', path, opts, newRT) + opts.retries = newRT + return exports.lockSync(path, opts) + } + throw er +} + diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/package.json new file mode 100644 index 00000000..112d5ae1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/lockfile/package.json @@ -0,0 +1,63 @@ +{ + "name": "lockfile", + "version": "1.0.1", + "main": "lockfile.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "~0.2.5", + "touch": "0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/lockfile.git" + }, + "keywords": [ + "lockfile", + "lock", + "file", + "fs", + "O_EXCL" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "description": "A very polite lock file utility, which endeavors to not litter, and to wait patiently for others.", + "gitHead": "9d338ed8e3e3a166955d051f6b5fb6bb1e563ca8", + "bugs": { + "url": "https://github.com/isaacs/lockfile/issues" + }, + "homepage": "https://github.com/isaacs/lockfile#readme", + "_id": "lockfile@1.0.1", + "_shasum": "9d353ecfe3f54d150bb57f89d51746935a39c4f5", + "_from": "lockfile@>=1.0.0 <1.1.0", + "_npmVersion": "2.10.0", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "9d353ecfe3f54d150bb57f89d51746935a39c4f5", + "tarball": "http://registry.npmjs.org/lockfile/-/lockfile-1.0.1.tgz" + }, + "maintainers": [ + { + "name": "trevorburnham", + "email": "trevorburnham@gmail.com" + }, + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.1.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/.npmignore new file mode 100644 index 00000000..4dcec4c8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/.npmignore @@ -0,0 +1 @@ +/node_modules diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/.travis.yml new file mode 100644 index 00000000..e321cb14 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/CONTRIBUTORS b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/CONTRIBUTORS new file mode 100644 index 00000000..1f0a13e8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/CONTRIBUTORS @@ -0,0 +1,14 @@ +# Authors, sorted by whether or not they are me +Isaac Z. Schlueter +Brian Cottingham +Carlos Brito Lage +Jesse Dailey +Kevin O'Hara +Marco Rogers +Mark Cavage +Marko Mikulicic +Nathan Rajlich +Satheesh Natesan +Trent Mick +ashleybrener +n4kz diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/README.md new file mode 100644 index 00000000..af4b9c83 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/README.md @@ -0,0 +1,132 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n, key) { return n * 2 + key.length } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +// non-string keys ARE fully supported +var someObject = {} +cache.set(someObject, 'a value') +cache.set('[object Object]', 'a different value') +assert.equal(cache.get(someObject), 'a value') + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n, key){return n.length}`. The default is + `function(){return 1}`, which is fine if you want to store `max` + like-sized things. They item is passed as the first argument, and + the key is passed as the second argumnet. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `max` is optional and overrides the + cache `max` option if provided. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `rforEach(function(value,key,cache), [thisp])` + + The same as `cache.forEach(...)` but items are iterated over in + reverse order. (ie, less recently used items are iterated over + first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length()` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/package.json new file mode 100644 index 00000000..44c233be --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/lru-cache/package.json @@ -0,0 +1,40 @@ +{ + "name": "lru-cache", + "description": "A cache object that deletes the least-recently-used items.", + "version": "3.2.0", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "keywords": [ + "mru", + "lru", + "cache" + ], + "scripts": { + "test": "tap test --gc" + }, + "main": "lib/lru-cache.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-lru-cache.git" + }, + "devDependencies": { + "tap": "^1.2.0", + "weak": "" + }, + "license": "ISC", + "dependencies": { + "pseudomap": "^1.0.1" + }, + "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n, key) { return n * 2 + key.length }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\n// non-string keys ARE fully supported\nvar someObject = {}\ncache.set(someObject, 'a value')\ncache.set('[object Object]', 'a different value')\nassert.equal(cache.get(someObject), 'a value')\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n, key){return n.length}`. The default is\n `function(){return 1}`, which is fine if you want to store `max`\n like-sized things. They item is passed as the first argument, and\n the key is passed as the second argumnet.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value, maxAge)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think. `max` is optional and overrides the\n cache `max` option if provided.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `rforEach(function(value,key,cache), [thisp])`\n\n The same as `cache.forEach(...)` but items are iterated over in\n reverse order. (ie, less recently used items are iterated over\n first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n\n* `length()`\n\n Return total length of objects in cache taking into account\n `length` options function.\n\n* `itemCount`\n\n Return total quantity of objects currently in cache. Note, that\n `stale` (see options) items are returned as part of this item\n count.\n\n* `dump()`\n\n Return an array of the cache entries ready for serialization and usage\n with 'destinationCache.load(arr)`.\n\n* `load(cacheEntriesArray)`\n\n Loads another cache entries array, obtained with `sourceCache.dump()`,\n into the cache. The destination cache is reset before loading new entries\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/node-lru-cache/issues" + }, + "homepage": "https://github.com/isaacs/node-lru-cache#readme", + "_id": "lru-cache@3.2.0", + "_shasum": "71789b3b7f5399bec8565dda38aa30d2a097efee", + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz", + "_from": "lru-cache@>=3.2.0 <3.3.0" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/README.md new file mode 100644 index 00000000..bcb8acfc --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/README.md @@ -0,0 +1,216 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instanting the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +## Functions + +The top-level exported function has a `cache` property, which is an LRU +cache set to store 100 items. So, calling these methods repeatedly +with the same pattern and options will use the same Minimatch object, +saving the cost of parsing it multiple times. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/minimatch.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/minimatch.js new file mode 100644 index 00000000..008ceba9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/minimatch.js @@ -0,0 +1,912 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new Error('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + plType = stateChar + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + re += ')' + var pl = patternListStack.pop() + plType = pl.type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case '!': + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length + break + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway + } + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + var regExp = new RegExp('^' + re + '$', flags) + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/package.json new file mode 100644 index 00000000..5f019888 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/minimatch/package.json @@ -0,0 +1,60 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "3.0.0", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "posttest": "standard minimatch.js test/*.js", + "test": "tap test/*.js" + }, + "engines": { + "node": "*" + }, + "dependencies": { + "brace-expansion": "^1.0.0" + }, + "devDependencies": { + "standard": "^3.7.2", + "tap": "^1.2.0" + }, + "license": "ISC", + "files": [ + "minimatch.js" + ], + "gitHead": "270dbea567f0af6918cb18103e98c612aa717a20", + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "homepage": "https://github.com/isaacs/minimatch#readme", + "_id": "minimatch@3.0.0", + "_shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", + "_from": "minimatch@>=3.0.0 <3.1.0", + "_npmVersion": "3.3.2", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "5236157a51e4f004c177fb3c527ff7dd78f0ef83", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/.travis.yml new file mode 100644 index 00000000..0ae8cb68 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/LICENSE new file mode 100644 index 00000000..dfef9f00 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/LICENSE @@ -0,0 +1,21 @@ +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/README.markdown b/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/README.markdown new file mode 100644 index 00000000..041a85b1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/README.markdown @@ -0,0 +1,100 @@ +# mkdirp + +Like `mkdir -p`, but in node.js! + +[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) + +# example + +## pow.js + +```js +var mkdirp = require('mkdirp'); + +mkdirp('/tmp/foo/bar/baz', function (err) { + if (err) console.error(err) + else console.log('pow!') +}); +``` + +Output + +``` +pow! +``` + +And now /tmp/foo/bar/baz exists, huzzah! + +# methods + +```js +var mkdirp = require('mkdirp'); +``` + +## mkdirp(dir, opts, cb) + +Create a new directory and any necessary subdirectories at `dir` with octal +permission string `opts.mode`. If `opts` is a non-object, it will be treated as +the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +`cb(err, made)` fires with the error or the first directory `made` +that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and +`opts.fs.stat(path, cb)`. + +## mkdirp.sync(dir, opts) + +Synchronously create a new directory and any necessary subdirectories at `dir` +with octal permission string `opts.mode`. If `opts` is a non-object, it will be +treated as the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +Returns the first directory that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and +`opts.fs.statSync(path)`. + +# usage + +This package also ships with a `mkdirp` command. + +``` +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + +``` + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install mkdirp +``` + +to get the library, or + +``` +npm install -g mkdirp +``` + +to get the command. + +# license + +MIT diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/index.js new file mode 100644 index 00000000..47d20a6c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/index.js @@ -0,0 +1,98 @@ +var path = require('path'); +var fs = require('fs'); +var _0777 = parseInt('0777', 8); + +module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; + +function mkdirP (p, opts, f, made) { + if (typeof opts === 'function') { + f = opts; + opts = {}; + } + else if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + var cb = f || function () {}; + p = path.resolve(p); + + xfs.mkdir(p, mode, function (er) { + if (!er) { + made = made || p; + return cb(null, made); + } + switch (er.code) { + case 'ENOENT': + mkdirP(path.dirname(p), opts, function (er, made) { + if (er) cb(er, made); + else mkdirP(p, opts, cb, made); + }); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + xfs.stat(p, function (er2, stat) { + // if the stat fails, then that's super weird. + // let the original error be the failure reason. + if (er2 || !stat.isDirectory()) cb(er, made) + else cb(null, made); + }); + break; + } + }); +} + +mkdirP.sync = function sync (p, opts, made) { + if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + p = path.resolve(p); + + try { + xfs.mkdirSync(p, mode); + made = made || p; + } + catch (err0) { + switch (err0.code) { + case 'ENOENT' : + made = sync(path.dirname(p), opts, made); + sync(p, opts, made); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + var stat; + try { + stat = xfs.statSync(p); + } + catch (err1) { + throw err0; + } + if (!stat.isDirectory()) throw err0; + break; + } + } + + return made; +}; diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/package.json new file mode 100644 index 00000000..a0e69375 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/mkdirp/package.json @@ -0,0 +1,59 @@ +{ + "name": "mkdirp", + "description": "Recursively mkdir, like `mkdir -p`", + "version": "0.5.1", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "main": "index.js", + "keywords": [ + "mkdir", + "directory" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/substack/node-mkdirp.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "minimist": "0.0.8" + }, + "devDependencies": { + "tap": "1", + "mock-fs": "2 >=2.7.0" + }, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "license": "MIT", + "gitHead": "d4eff0f06093aed4f387e88e9fc301cb76beedc7", + "bugs": { + "url": "https://github.com/substack/node-mkdirp/issues" + }, + "homepage": "https://github.com/substack/node-mkdirp#readme", + "_id": "mkdirp@0.5.1", + "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "_from": "mkdirp@>=0.5.1 <0.6.0", + "_npmVersion": "2.9.0", + "_nodeVersion": "2.0.0", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/.jshintrc b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/.jshintrc new file mode 100644 index 00000000..3d352421 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/.jshintrc @@ -0,0 +1,7 @@ +{ + "asi": true, + "laxcomma": true, + "es5": true, + "node": true, + "strict": false +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/.npmignore new file mode 100644 index 00000000..5d1a0757 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/.npmignore @@ -0,0 +1,3 @@ +gyp/test +node_modules +test/.node-gyp diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/0001-gyp-always-install-into-PRODUCT_DIR.patch b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/0001-gyp-always-install-into-PRODUCT_DIR.patch new file mode 100644 index 00000000..0174a694 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/0001-gyp-always-install-into-PRODUCT_DIR.patch @@ -0,0 +1,34 @@ +From 9b5e8dc426ada891d67d27b09acc73122ab46849 Mon Sep 17 00:00:00 2001 +From: Nathan Rajlich +Date: Wed, 14 Nov 2012 16:48:52 -0800 +Subject: [PATCH 1/3] gyp: always install into $PRODUCT_DIR + +--- + gyp/pylib/gyp/generator/make.py | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/gyp/pylib/gyp/generator/make.py b/gyp/pylib/gyp/generator/make.py +index b88a433..9b3e4e3 100644 +--- a/gyp/pylib/gyp/generator/make.py ++++ b/gyp/pylib/gyp/generator/make.py +@@ -1888,11 +1888,13 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD + """Returns the location of the final output for an installable target.""" + # Xcode puts shared_library results into PRODUCT_DIR, and some gyp files + # rely on this. Emulate this behavior for mac. +- if (self.type == 'shared_library' and +- (self.flavor != 'mac' or self.toolset != 'target')): +- # Install all shared libs into a common directory (per toolset) for +- # convenient access with LD_LIBRARY_PATH. +- return '$(builddir)/lib.%s/%s' % (self.toolset, self.alias) ++ ++ # XXX(TooTallNate): disabling this code since we don't want this behavior... ++ #if (self.type == 'shared_library' and ++ # (self.flavor != 'mac' or self.toolset != 'target')): ++ # # Install all shared libs into a common directory (per toolset) for ++ # # convenient access with LD_LIBRARY_PATH. ++ # return '$(builddir)/lib.%s/%s' % (self.toolset, self.alias) + return '$(builddir)/' + self.alias + + +-- +2.3.2 (Apple Git-55) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/0002-gyp-apply-https-codereview.chromium.org-11361103.patch b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/0002-gyp-apply-https-codereview.chromium.org-11361103.patch new file mode 100644 index 00000000..88185b17 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/0002-gyp-apply-https-codereview.chromium.org-11361103.patch @@ -0,0 +1,35 @@ +From 511840e82116662aa825088fb8a52a9f799f7767 Mon Sep 17 00:00:00 2001 +From: Nathan Rajlich +Date: Wed, 14 Nov 2012 16:54:04 -0800 +Subject: [PATCH 2/3] gyp: apply https://codereview.chromium.org/11361103/ + +--- + gyp/pylib/gyp/generator/msvs.py | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/gyp/pylib/gyp/generator/msvs.py b/gyp/pylib/gyp/generator/msvs.py +index d8e0872..c59aea1 100644 +--- a/gyp/pylib/gyp/generator/msvs.py ++++ b/gyp/pylib/gyp/generator/msvs.py +@@ -2720,6 +2720,9 @@ def _GetMSBuildAttributes(spec, config, build_file): + product_name = spec.get('product_name', '$(ProjectName)') + target_name = prefix + product_name + msbuild_attributes['TargetName'] = target_name ++ if 'TargetExt' not in msbuild_attributes and 'product_extension' in spec: ++ ext = spec.get('product_extension') ++ msbuild_attributes['TargetExt'] = '.' + ext + + if spec.get('msvs_external_builder'): + external_out_dir = spec.get('msvs_external_builder_out_dir', '.') +@@ -2773,6 +2776,9 @@ def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file): + attributes['OutputDirectory']) + _AddConditionalProperty(properties, condition, 'TargetName', + attributes['TargetName']) ++ if 'TargetExt' in attributes: ++ _AddConditionalProperty(properties, condition, 'TargetExt', ++ attributes['TargetExt']) + + if attributes.get('TargetPath'): + _AddConditionalProperty(properties, condition, 'TargetPath', +-- +2.3.2 (Apple Git-55) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/0003-gyp-don-t-use-links-at-all-just-copy-the-files-inste.patch b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/0003-gyp-don-t-use-links-at-all-just-copy-the-files-inste.patch new file mode 100644 index 00000000..9389fa06 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/0003-gyp-don-t-use-links-at-all-just-copy-the-files-inste.patch @@ -0,0 +1,38 @@ +From 0cd9f08a6d4f4be6643001b6c3b5ad40e094bdcc Mon Sep 17 00:00:00 2001 +From: Nathan Zadoks +Date: Tue, 2 Jul 2013 11:07:16 -0700 +Subject: [PATCH 3/3] gyp: don't use links at all, just copy the files instead + +--- + gyp/pylib/gyp/generator/make.py | 2 +- + gyp/pylib/gyp/generator/ninja.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gyp/pylib/gyp/generator/make.py b/gyp/pylib/gyp/generator/make.py +index 9b3e4e3..b3f8a2b 100644 +--- a/gyp/pylib/gyp/generator/make.py ++++ b/gyp/pylib/gyp/generator/make.py +@@ -372,7 +372,7 @@ cmd_touch = touch $@ + + quiet_cmd_copy = COPY $@ + # send stderr to /dev/null to ignore messages when linking directories. +-cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@") ++cmd_copy = rm -rf "$@" && cp -af "$<" "$@" + + %(link_commands)s + """ +diff --git a/gyp/pylib/gyp/generator/ninja.py b/gyp/pylib/gyp/generator/ninja.py +index 7461814..c2951a4 100644 +--- a/gyp/pylib/gyp/generator/ninja.py ++++ b/gyp/pylib/gyp/generator/ninja.py +@@ -2020,7 +2020,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, + master_ninja.rule( + 'copy', + description='COPY $in $out', +- command='ln -f $in $out 2>/dev/null || (rm -rf $out && cp -af $in $out)') ++ command='rm -rf $out && cp -af $in $out') + master_ninja.newline() + + all_targets = set() +-- +2.3.2 (Apple Git-55) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/CHANGELOG.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/CHANGELOG.md new file mode 100644 index 00000000..d85f16cc --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/CHANGELOG.md @@ -0,0 +1,57 @@ +v3.3.0 2016-02-16 + +* [[`818d854a4d`](https://github.com/nodejs/node-gyp/commit/818d854a4d)] - Introduce NODEJS_ORG_MIRROR and IOJS_ORG_MIRROR (Rod Vagg) [#878](https://github.com/nodejs/node-gyp/pull/878) +* [[`d1e4cc4b62`](https://github.com/nodejs/node-gyp/commit/d1e4cc4b62)] - **(SEMVER-MINOR)** Download headers tarball for ~0.12.10 || ~0.10.42 (Rod Vagg) [#877](https://github.com/nodejs/node-gyp/pull/877) +* [[`6e28ad1bea`](https://github.com/nodejs/node-gyp/commit/6e28ad1bea)] - Allow for npmlog@2.x (Rebecca Turner) [#861](https://github.com/nodejs/node-gyp/pull/861) +* [[`07371e5812`](https://github.com/nodejs/node-gyp/commit/07371e5812)] - Use -fPIC for NetBSD. (Marcin Cieślak) [#856](https://github.com/nodejs/node-gyp/pull/856) +* [[`8c4b0ffa50`](https://github.com/nodejs/node-gyp/commit/8c4b0ffa50)] - **(SEMVER-MINOR)** Add --cafile command line option. (Ben Noordhuis) [#837](https://github.com/nodejs/node-gyp/pull/837) +* [[`b3ad43498e`](https://github.com/nodejs/node-gyp/commit/b3ad43498e)] - **(SEMVER-MINOR)** Make download() function testable. (Ben Noordhuis) [#837](https://github.com/nodejs/node-gyp/pull/837) + +v3.2.1 2015-12-03 + +* [[`ab89b477c4`](https://github.com/nodejs/node-gyp/commit/ab89b477c4)] - Upgrade gyp to b3cef02. (Ben Noordhuis) [#831](https://github.com/nodejs/node-gyp/pull/831) +* [[`90078ecb17`](https://github.com/nodejs/node-gyp/commit/90078ecb17)] - Define WIN32_LEAN_AND_MEAN conditionally. (Ben Noordhuis) [#824](https://github.com/nodejs/node-gyp/pull/824) + +v3.2.0 2015-11-25 + +* [[`268f1ca4c7`](https://github.com/nodejs/node-gyp/commit/268f1ca4c7)] - Use result of `which` when searching for python. (Refael Ackermann) [#668](https://github.com/nodejs/node-gyp/pull/668) +* [[`817ed9bd78`](https://github.com/nodejs/node-gyp/commit/817ed9bd78)] - Add test for python executable search logic. (Ben Noordhuis) [#756](https://github.com/nodejs/node-gyp/pull/756) +* [[`0e2dfda1f3`](https://github.com/nodejs/node-gyp/commit/0e2dfda1f3)] - Fix test/test-options when run through `npm test`. (Ben Noordhuis) [#755](https://github.com/nodejs/node-gyp/pull/755) +* [[`9bfa0876b4`](https://github.com/nodejs/node-gyp/commit/9bfa0876b4)] - Add support for AIX (Michael Dawson) [#753](https://github.com/nodejs/node-gyp/pull/753) +* [[`a8d441a0a2`](https://github.com/nodejs/node-gyp/commit/a8d441a0a2)] - Update README for Windows 10 support. (Jason Williams) [#766](https://github.com/nodejs/node-gyp/pull/766) +* [[`d1d6015276`](https://github.com/nodejs/node-gyp/commit/d1d6015276)] - Update broken links and switch to HTTPS. (andrew morton) + +v3.1.0 2015-11-14 + +* [[`9049241f91`](https://github.com/nodejs/node-gyp/commit/9049241f91)] - **gyp**: don't use links at all, just copy the files instead (Nathan Zadoks) +* [[`8ef90348d1`](https://github.com/nodejs/node-gyp/commit/8ef90348d1)] - **gyp**: apply https://codereview.chromium.org/11361103/ (Nathan Rajlich) +* [[`a2ed0df84e`](https://github.com/nodejs/node-gyp/commit/a2ed0df84e)] - **gyp**: always install into $PRODUCT_DIR (Nathan Rajlich) +* [[`cc8b2fa83e`](https://github.com/nodejs/node-gyp/commit/cc8b2fa83e)] - Update gyp to b3cef02. (Imran Iqbal) [#781](https://github.com/nodejs/node-gyp/pull/781) +* [[`f5d86eb84e`](https://github.com/nodejs/node-gyp/commit/f5d86eb84e)] - Update to tar@2.0.0. (Edgar Muentes) [#797](https://github.com/nodejs/node-gyp/pull/797) +* [[`2ac7de02c4`](https://github.com/nodejs/node-gyp/commit/2ac7de02c4)] - Fix infinite loop with zero-length options. (Ben Noordhuis) [#745](https://github.com/nodejs/node-gyp/pull/745) +* [[`101bed639b`](https://github.com/nodejs/node-gyp/commit/101bed639b)] - This platform value came from debian package, and now the value (Jérémy Lal) [#738](https://github.com/nodejs/node-gyp/pull/738) + +v3.0.3 2015-09-14 + +* [[`ad827cda30`](https://github.com/nodejs/node-gyp/commit/ad827cda30)] - tarballUrl global and && when checking for iojs (Lars-Magnus Skog) [#729](https://github.com/nodejs/node-gyp/pull/729) + +v3.0.2 2015-09-12 + +* [[`6e8c3bf3c6`](https://github.com/nodejs/node-gyp/commit/6e8c3bf3c6)] - add back support for passing additional cmdline args (Rod Vagg) [#723](https://github.com/nodejs/node-gyp/pull/723) +* [[`ff82f2f3b9`](https://github.com/nodejs/node-gyp/commit/ff82f2f3b9)] - fixed broken link in docs to Visual Studio 2013 download (simon-p-r) [#722](https://github.com/nodejs/node-gyp/pull/722) + +v3.0.1 2015-09-08 + +* [[`846337e36b`](https://github.com/nodejs/node-gyp/commit/846337e36b)] - normalise versions for target == this comparison (Rod Vagg) [#716](https://github.com/nodejs/node-gyp/pull/716) + +v3.0.0 2015-09-08 + +* [[`9720d0373c`](https://github.com/nodejs/node-gyp/commit/9720d0373c)] - remove node_modules from tree (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) +* [[`6dcf220db7`](https://github.com/nodejs/node-gyp/commit/6dcf220db7)] - test version major directly, don't use semver.satisfies() (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) +* [[`938dd18d1c`](https://github.com/nodejs/node-gyp/commit/938dd18d1c)] - refactor for clarity, fix dist-url, add env var dist-url functionality (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) +* [[`9e9df66a06`](https://github.com/nodejs/node-gyp/commit/9e9df66a06)] - use process.release, make aware of io.js & node v4 differences (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711) +* [[`1ea7ed01f4`](https://github.com/nodejs/node-gyp/commit/1ea7ed01f4)] - **deps**: update graceful-fs dependency to the latest (Sakthipriyan Vairamani) [#714](https://github.com/nodejs/node-gyp/pull/714) +* [[`0fbc387b35`](https://github.com/nodejs/node-gyp/commit/0fbc387b35)] - Update repository URLs. (Ben Noordhuis) [#715](https://github.com/nodejs/node-gyp/pull/715) +* [[`bbedb8868b`](https://github.com/nodejs/node-gyp/commit/bbedb8868b)] - **(SEMVER-MAJOR)** **win**: enable delay-load hook by default (Jeremiah Senkpiel) [#708](https://github.com/nodejs/node-gyp/pull/708) +* [[`85ed107565`](https://github.com/nodejs/node-gyp/commit/85ed107565)] - Merge pull request #664 from othiym23/othiym23/allow-semver-5 (Nathan Rajlich) +* [[`0c720d234c`](https://github.com/nodejs/node-gyp/commit/0c720d234c)] - allow semver@5 (Forrest L Norvell) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/History.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/History.md new file mode 100644 index 00000000..359bbad6 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/History.md @@ -0,0 +1,41 @@ + +2.0.2 / 2015-07-14 +================== + + * Use HTTPS for dist url (#656, @SonicHedgehog) + * Merge pull request #648 from nevosegal/master + * Merge pull request #650 from magic890/patch-1 + * Updated Installation section on README + * Updated link to gyp user documentation + * Fix download error message spelling (#643, @tomxtobin) + * Merge pull request #637 from lygstate/master + * Set NODE_GYP_DIR for addon.gypi to setting absolute path for + src/win_delay_load_hook.c, and fixes of the long relative path issue on Win32. + Fixes #636 (#637, @lygstate). + +2.0.1 / 2015-05-28 +================== + + * configure: try/catch the semver range.test() call + * README: update for visual studio 2013 (#510, @samccone) + +2.0.0 / 2015-05-24 +================== + + * configure: check for python2 executable by default, fallback to python + * configure: don't clobber existing $PYTHONPATH + * configure: use "path-array" for PYTHONPATH + * gyp: fix for non-acsii userprofile name on Windows + * gyp: always install into $PRODUCT_DIR + * gyp: apply https://codereview.chromium.org/11361103/ + * gyp: don't use links at all, just copy the files instead + * gyp: update gyp to e1c8fcf7 + * Updated README.md with updated Windows build info + * Show URL when a download fails + * package: add a "license" field + * move HMODULE m declaration to top + * Only add "-undefined dynamic_lookup" to loadable_module targets + * win: optionally allow node.exe/iojs.exe to be renamed + * Avoid downloading shasums if using tarPath + * Add target name preprocessor define: `NODE_GYP_MODULE_NAME` + * Show better error message in case of bad network settings diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/LICENSE new file mode 100644 index 00000000..142bd098 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/README.md new file mode 100644 index 00000000..1671dd19 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/README.md @@ -0,0 +1,199 @@ +node-gyp +========= +### Node.js native addon build tool + +`node-gyp` is a cross-platform command-line tool written in Node.js for compiling +native addon modules for Node.js. It bundles the [gyp](https://code.google.com/p/gyp/) +project used by the Chromium team and takes away the pain of dealing with the +various differences in build platforms. It is the replacement to the `node-waf` +program which is removed for node `v0.8`. If you have a native addon for node that +still has a `wscript` file, then you should definitely add a `binding.gyp` file +to support the latest versions of node. + +Multiple target versions of node are supported (i.e. `0.8`, `0.9`, `0.10`, ..., `1.0`, +etc.), regardless of what version of node is actually installed on your system +(`node-gyp` downloads the necessary development files for the target version). + +#### Features: + + * Easy to use, consistent interface + * Same commands to build your module on every platform + * Supports multiple target versions of Node + + +Installation +------------ + +You can install with `npm`: + +``` bash +$ npm install -g node-gyp +``` + +You will also need to install: + + * On Unix: + * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) + * `make` + * A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org) + * On Mac OS X: + * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) (already installed on Mac OS X) + * [Xcode](https://developer.apple.com/xcode/download/) + * You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Downloads` + * This step will install `gcc` and the related toolchain containing `make` + * On Windows: + * Python ([`v2.7.10`][python-v2.7.10] recommended, `v3.x.x` is __*not*__ supported) + * Make sure that you have a PYTHON environment variable, and it is set to drive:\path\to\python.exe not to a folder + * Windows XP/Vista/7: + * Microsoft Visual Studio C++ 2013 ([Express][msvc2013] version works well) + * If the install fails, try uninstalling any C++ 2010 x64&x86 Redistributable that you have installed first + * If you get errors that the 64-bit compilers are not installed you may also need the [compiler update for the Windows SDK 7.1] + * Windows 7/8: + * Microsoft Visual Studio C++ 2013 for Windows Desktop ([Express][msvc2013] version works well) + * Windows 10: + * Install the latest version of npm (3.3.6 at the time of writing) + * Install Python 2.7 from https://www.python.org/download/releases/2.7/ and make sure its on the System Path + * Install Visual Studio Community 2015 Edition. (Custom Install, Select Visual C++ during the installation) + * Set the environment variable GYP_MSVS_VERSION=2015 + * Run the command prompt as Administrator + * $ npm install (--msvs_version=2015) <-- Shouldn't be needed if you have set GYP_MSVS_VERSION env + * If the above steps have not worked or you are unsure please visit http://www.serverpals.com/blog/building-using-node-gyp-with-visual-studio-express-2015-on-windows-10-pro-x64 for a full walkthrough + * All Windows Versions + * For 64-bit builds of node and native modules you will _**also**_ need the [Windows 7 64-bit SDK][win7sdk] + * You may need to run one of the following commands if your build complains about WindowsSDKDir not being set, and you are sure you have already installed the SDK: + +``` +call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x86 +call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x64 +``` + +If you have multiple Python versions installed, you can identify which Python +version `node-gyp` uses by setting the '--python' variable: + +``` bash +$ node-gyp --python /path/to/python2.7 +``` + +If `node-gyp` is called by way of `npm` *and* you have multiple versions of +Python installed, then you can set `npm`'s 'python' config key to the appropriate +value: + +``` bash +$ npm config set python /path/to/executable/python2.7 +``` + +Note that OS X is just a flavour of Unix and so needs `python`, `make`, and C/C++. +An easy way to obtain these is to install XCode from Apple, +and then use it to install the command line tools (under Preferences -> Downloads). + +How to Use +---------- + +To compile your native addon, first go to its root directory: + +``` bash +$ cd my_node_addon +``` + +The next step is to generate the appropriate project build files for the current +platform. Use `configure` for that: + +``` bash +$ node-gyp configure +``` + +__Note__: The `configure` step looks for the `binding.gyp` file in the current +directory to process. See below for instructions on creating the `binding.gyp` file. + +Now you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file +(on Windows) in the `build/` directory. Next invoke the `build` command: + +``` bash +$ node-gyp build +``` + +Now you have your compiled `.node` bindings file! The compiled bindings end up +in `build/Debug/` or `build/Release/`, depending on the build mode. At this point +you can require the `.node` file with Node and run your tests! + +__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or +`-d`) switch when running either the `configure`, `build` or `rebuild` command. + + +The "binding.gyp" file +---------------------- + +Previously when node had `node-waf` you had to write a `wscript` file. The +replacement for that is the `binding.gyp` file, which describes the configuration +to build your module in a JSON-like format. This file gets placed in the root of +your package, alongside the `package.json` file. + +A barebones `gyp` file appropriate for building a node addon looks like: + +``` python +{ + "targets": [ + { + "target_name": "binding", + "sources": [ "src/binding.cc" ] + } + ] +} +``` + +Some additional resources for addons and writing `gyp` files: + + * ["Going Native" a nodeschool.io tutorial](http://nodeschool.io/#goingnative) + * ["Hello World" node addon example](https://github.com/nodejs/node/tree/master/test/addons/hello-world) + * [gyp user documentation](https://gyp.gsrc.io/docs/UserDocumentation.md) + * [gyp input format reference](https://gyp.gsrc.io/docs/InputFormatReference.md) + * [*"binding.gyp" files out in the wild* wiki page](https://github.com/nodejs/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild) + + +Commands +-------- + +`node-gyp` responds to the following commands: + +| **Command** | **Description** +|:--------------|:--------------------------------------------------------------- +| `build` | Invokes `make`/`msbuild.exe` and builds the native addon +| `clean` | Removes the `build` directory if it exists +| `configure` | Generates project build files for the current platform +| `rebuild` | Runs `clean`, `configure` and `build` all in a row +| `install` | Installs node development header files for the given version +| `list` | Lists the currently installed node development file versions +| `remove` | Removes the node development header files for the given version + + +License +------- + +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +[python-v2.7.10]: https://www.python.org/downloads/release/python-2710/ +[msvc2013]: https://www.microsoft.com/en-gb/download/details.aspx?id=44914 +[win7sdk]: https://www.microsoft.com/en-us/download/details.aspx?id=8279 +[compiler update for the Windows SDK 7.1]: https://www.microsoft.com/en-us/download/details.aspx?id=4422 diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/addon.gypi b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/addon.gypi new file mode 100644 index 00000000..88eea1bd --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/addon.gypi @@ -0,0 +1,108 @@ +{ + 'target_defaults': { + 'type': 'loadable_module', + 'win_delay_load_hook': 'true', + 'product_prefix': '', + + 'include_dirs': [ + '<(node_root_dir)/include/node', + '<(node_root_dir)/src', + '<(node_root_dir)/deps/uv/include', + '<(node_root_dir)/deps/v8/include' + ], + 'defines': [ + 'NODE_GYP_MODULE_NAME=>(_target_name)' + ], + + 'target_conditions': [ + ['_type=="loadable_module"', { + 'product_extension': 'node', + 'defines': [ + 'BUILDING_NODE_EXTENSION' + ], + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-undefined dynamic_lookup' + ], + }, + }], + + ['_type=="static_library"', { + # set to `1` to *disable* the -T thin archive 'ld' flag. + # older linkers don't support this flag. + 'standalone_static_library': '<(standalone_static_library)' + }], + + ['_win_delay_load_hook=="true"', { + # If the addon specifies `'win_delay_load_hook': 'true'` in its + # binding.gyp, link a delay-load hook into the DLL. This hook ensures + # that the addon will work regardless of whether the node/iojs binary + # is named node.exe, iojs.exe, or something else. + 'conditions': [ + [ 'OS=="win"', { + 'sources': [ + '<(node_gyp_dir)/src/win_delay_load_hook.c', + ], + 'msvs_settings': { + 'VCLinkerTool': { + 'DelayLoadDLLs': [ 'iojs.exe', 'node.exe' ], + # Don't print a linker warning when no imports from either .exe + # are used. + 'AdditionalOptions': [ '/ignore:4199' ], + }, + }, + }], + ], + }], + ], + + 'conditions': [ + [ 'OS=="mac"', { + 'defines': [ + '_DARWIN_USE_64_BIT_INODE=1' + ], + 'xcode_settings': { + 'DYLIB_INSTALL_NAME_BASE': '@rpath' + }, + }], + [ 'OS=="aix"', { + 'ldflags': [ + '-Wl,-bimport:<(node_exp_file)' + ], + }], + [ 'OS=="win"', { + 'libraries': [ + '-lkernel32.lib', + '-luser32.lib', + '-lgdi32.lib', + '-lwinspool.lib', + '-lcomdlg32.lib', + '-ladvapi32.lib', + '-lshell32.lib', + '-lole32.lib', + '-loleaut32.lib', + '-luuid.lib', + '-lodbc32.lib', + '-lDelayImp.lib', + '-l"<(node_root_dir)/$(ConfigurationName)/<(node_lib_file)"' + ], + 'msvs_disabled_warnings': [ + # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent' + # needs to have dll-interface to be used by + # clients of class 'node::ObjectWrap' + 4251 + ], + }, { + # OS!="win" + 'defines': [ + '_LARGEFILE_SOURCE', + '_FILE_OFFSET_BITS=64' + ], + }], + [ 'OS in "freebsd openbsd netbsd solaris" or \ + (OS=="linux" and target_arch!="ia32")', { + 'cflags': [ '-fPIC' ], + }] + ] + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/package.json new file mode 100644 index 00000000..01d51544 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/node-gyp/package.json @@ -0,0 +1,105 @@ +{ + "name": "node-gyp", + "description": "Node.js native addon build tool", + "license": "MIT", + "keywords": [ + "native", + "addon", + "module", + "c", + "c++", + "bindings", + "gyp" + ], + "version": "3.3.1", + "installVersion": 9, + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://tootallnate.net" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/node-gyp.git" + }, + "preferGlobal": true, + "bin": { + "node-gyp": "./bin/node-gyp.js" + }, + "main": "./lib/node-gyp.js", + "dependencies": { + "fstream": "^1.0.0", + "glob": "3 || 4", + "graceful-fs": "^4.1.2", + "minimatch": "1", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2", + "osenv": "0", + "path-array": "^1.0.0", + "request": "2", + "rimraf": "2", + "semver": "2.x || 3.x || 4 || 5", + "tar": "^2.0.0", + "which": "1" + }, + "engines": { + "node": ">= 0.8.0" + }, + "devDependencies": { + "tape": "~4.2.0" + }, + "scripts": { + "test": "tape test/test-*" + }, + "gitHead": "1dcf356ca7b658789447108b29a985c00ffcf0f5", + "bugs": { + "url": "https://github.com/nodejs/node-gyp/issues" + }, + "homepage": "https://github.com/nodejs/node-gyp#readme", + "_id": "node-gyp@3.3.1", + "_shasum": "80f7b6d7c2f9c0495ba42c518a670c99bdf6e4a0", + "_from": "node-gyp@3.3.1", + "_npmVersion": "3.3.12", + "_nodeVersion": "6.0.0-pre", + "_npmUser": { + "name": "bnoordhuis", + "email": "info@bnoordhuis.nl" + }, + "maintainers": [ + { + "name": "TooTallNate", + "email": "nathan@tootallnate.net" + }, + { + "name": "bnoordhuis", + "email": "info@bnoordhuis.nl" + }, + { + "name": "fishrock123", + "email": "fishrock123@rocketmail.com" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "dist": { + "shasum": "80f7b6d7c2f9c0495ba42c518a670c99bdf6e4a0", + "tarball": "http://registry.npmjs.org/node-gyp/-/node-gyp-3.3.1.tgz" + }, + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/node-gyp-3.3.1.tgz_1457115144174_0.4018901875242591" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.3.1.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/.npmignore new file mode 100644 index 00000000..08b25532 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/.travis.yml new file mode 100644 index 00000000..8c98c38b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/README.md new file mode 100644 index 00000000..eaeec040 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/README.md @@ -0,0 +1,211 @@ +If you want to write an option parser, and have it be good, there are +two ways to do it. The Right Way, and the Wrong Way. + +The Wrong Way is to sit down and write an option parser. We've all done +that. + +The Right Way is to write some complex configurable program with so many +options that you hit the limit of your frustration just trying to +manage them all, and defer it with duct-tape solutions until you see +exactly to the core of the problem, and finally snap and write an +awesome option parser. + +If you want to write an option parser, don't write an option parser. +Write a package manager, or a source control system, or a service +restarter, or an operating system. You probably won't end up with a +good one of those, but if you don't give up, and you are relentless and +diligent enough in your procrastination, you may just end up with a very +nice option parser. + +## USAGE + + // my-program.js + var nopt = require("nopt") + , Stream = require("stream").Stream + , path = require("path") + , knownOpts = { "foo" : [String, null] + , "bar" : [Stream, Number] + , "baz" : path + , "bloo" : [ "big", "medium", "small" ] + , "flag" : Boolean + , "pick" : Boolean + , "many1" : [String, Array] + , "many2" : [path] + } + , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] + , "b7" : ["--bar", "7"] + , "m" : ["--bloo", "medium"] + , "p" : ["--pick"] + , "f" : ["--flag"] + } + // everything is optional. + // knownOpts and shorthands default to {} + // arg list defaults to process.argv + // slice defaults to 2 + , parsed = nopt(knownOpts, shortHands, process.argv, 2) + console.log(parsed) + +This would give you support for any of the following: + +```bash +$ node my-program.js --foo "blerp" --no-flag +{ "foo" : "blerp", "flag" : false } + +$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag +{ bar: 7, foo: "Mr. Hand", flag: true } + +$ node my-program.js --foo "blerp" -f -----p +{ foo: "blerp", flag: true, pick: true } + +$ node my-program.js -fp --foofoo +{ foo: "Mr. Foo", flag: true, pick: true } + +$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. +{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } + +$ node my-program.js --blatzk -fp # unknown opts are ok. +{ blatzk: true, flag: true, pick: true } + +$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value +{ blatzk: 1000, flag: true, pick: true } + +$ node my-program.js --no-blatzk -fp # unless they start with "no-" +{ blatzk: false, flag: true, pick: true } + +$ node my-program.js --baz b/a/z # known paths are resolved. +{ baz: "/Users/isaacs/b/a/z" } + +# if Array is one of the types, then it can take many +# values, and will always be an array. The other types provided +# specify what types are allowed in the list. + +$ node my-program.js --many1 5 --many1 null --many1 foo +{ many1: ["5", "null", "foo"] } + +$ node my-program.js --many2 foo --many2 bar +{ many2: ["/path/to/foo", "path/to/bar"] } +``` + +Read the tests at the bottom of `lib/nopt.js` for more examples of +what this puppy can do. + +## Types + +The following types are supported, and defined on `nopt.typeDefs` + +* String: A normal string. No parsing is done. +* path: A file system path. Gets resolved against cwd if not absolute. +* url: A url. If it doesn't parse, it isn't accepted. +* Number: Must be numeric. +* Date: Must parse as a date. If it does, and `Date` is one of the options, + then it will return a Date object, not a string. +* Boolean: Must be either `true` or `false`. If an option is a boolean, + then it does not need a value, and its presence will imply `true` as + the value. To negate boolean flags, do `--no-whatever` or `--whatever + false` +* NaN: Means that the option is strictly not allowed. Any value will + fail. +* Stream: An object matching the "Stream" class in node. Valuable + for use when validating programmatically. (npm uses this to let you + supply any WriteStream on the `outfd` and `logfd` config options.) +* Array: If `Array` is specified as one of the types, then the value + will be parsed as a list of options. This means that multiple values + can be specified, and that the value will always be an array. + +If a type is an array of values not on this list, then those are +considered valid values. For instance, in the example above, the +`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, +and any other value will be rejected. + +When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be +interpreted as their JavaScript equivalents. + +You can also mix types and values, or multiple types, in a list. For +instance `{ blah: [Number, null] }` would allow a value to be set to +either a Number or null. When types are ordered, this implies a +preference, and the first type that can be used to properly interpret +the value will be used. + +To define a new type, add it to `nopt.typeDefs`. Each item in that +hash is an object with a `type` member and a `validate` method. The +`type` member is an object that matches what goes in the type list. The +`validate` method is a function that gets called with `validate(data, +key, val)`. Validate methods should assign `data[key]` to the valid +value of `val` if it can be handled properly, or return boolean +`false` if it cannot. + +You can also call `nopt.clean(data, types, typeDefs)` to clean up a +config object and remove its invalid properties. + +## Error Handling + +By default, nopt outputs a warning to standard error when invalid values for +known options are found. You can change this behavior by assigning a method +to `nopt.invalidHandler`. This method will be called with +the offending `nopt.invalidHandler(key, val, types)`. + +If no `nopt.invalidHandler` is assigned, then it will console.error +its whining. If it is assigned to boolean `false` then the warning is +suppressed. + +## Abbreviations + +Yes, they are supported. If you define options like this: + +```javascript +{ "foolhardyelephants" : Boolean +, "pileofmonkeys" : Boolean } +``` + +Then this will work: + +```bash +node program.js --foolhar --pil +node program.js --no-f --pileofmon +# etc. +``` + +## Shorthands + +Shorthands are a hash of shorter option names to a snippet of args that +they expand to. + +If multiple one-character shorthands are all combined, and the +combination does not unambiguously match any other option or shorthand, +then they will be broken up into their constituent parts. For example: + +```json +{ "s" : ["--loglevel", "silent"] +, "g" : "--global" +, "f" : "--force" +, "p" : "--parseable" +, "l" : "--long" +} +``` + +```bash +npm ls -sgflp +# just like doing this: +npm ls --loglevel silent --global --force --long --parseable +``` + +## The Rest of the args + +The config object returned by nopt is given a special member called +`argv`, which is an object with the following fields: + +* `remain`: The remaining args after all the parsing has occurred. +* `original`: The args as they originally appeared. +* `cooked`: The args after flags and shorthands are expanded. + +## Slicing + +Node programs are called with more or less the exact argv as it appears +in C land, after the v8 and node-specific options have been plucked off. +As such, `argv[0]` is always `node` and `argv[1]` is always the +JavaScript program being run. + +That's usually not very useful to you. So they're sliced off by +default. If you want them, then you can pass in `0` as the last +argument, or any other number that you'd like to slice off the start of +the list. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/package.json new file mode 100644 index 00000000..845fc6c8 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/nopt/package.json @@ -0,0 +1,38 @@ +{ + "name": "nopt", + "version": "3.0.6", + "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "main": "lib/nopt.js", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/nopt.git" + }, + "bin": { + "nopt": "./bin/nopt.js" + }, + "license": "ISC", + "dependencies": { + "abbrev": "1" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "readme": "If you want to write an option parser, and have it be good, there are\ntwo ways to do it. The Right Way, and the Wrong Way.\n\nThe Wrong Way is to sit down and write an option parser. We've all done\nthat.\n\nThe Right Way is to write some complex configurable program with so many\noptions that you hit the limit of your frustration just trying to\nmanage them all, and defer it with duct-tape solutions until you see\nexactly to the core of the problem, and finally snap and write an\nawesome option parser.\n\nIf you want to write an option parser, don't write an option parser.\nWrite a package manager, or a source control system, or a service\nrestarter, or an operating system. You probably won't end up with a\ngood one of those, but if you don't give up, and you are relentless and\ndiligent enough in your procrastination, you may just end up with a very\nnice option parser.\n\n## USAGE\n\n // my-program.js\n var nopt = require(\"nopt\")\n , Stream = require(\"stream\").Stream\n , path = require(\"path\")\n , knownOpts = { \"foo\" : [String, null]\n , \"bar\" : [Stream, Number]\n , \"baz\" : path\n , \"bloo\" : [ \"big\", \"medium\", \"small\" ]\n , \"flag\" : Boolean\n , \"pick\" : Boolean\n , \"many1\" : [String, Array]\n , \"many2\" : [path]\n }\n , shortHands = { \"foofoo\" : [\"--foo\", \"Mr. Foo\"]\n , \"b7\" : [\"--bar\", \"7\"]\n , \"m\" : [\"--bloo\", \"medium\"]\n , \"p\" : [\"--pick\"]\n , \"f\" : [\"--flag\"]\n }\n // everything is optional.\n // knownOpts and shorthands default to {}\n // arg list defaults to process.argv\n // slice defaults to 2\n , parsed = nopt(knownOpts, shortHands, process.argv, 2)\n console.log(parsed)\n\nThis would give you support for any of the following:\n\n```bash\n$ node my-program.js --foo \"blerp\" --no-flag\n{ \"foo\" : \"blerp\", \"flag\" : false }\n\n$ node my-program.js ---bar 7 --foo \"Mr. Hand\" --flag\n{ bar: 7, foo: \"Mr. Hand\", flag: true }\n\n$ node my-program.js --foo \"blerp\" -f -----p\n{ foo: \"blerp\", flag: true, pick: true }\n\n$ node my-program.js -fp --foofoo\n{ foo: \"Mr. Foo\", flag: true, pick: true }\n\n$ node my-program.js --foofoo -- -fp # -- stops the flag parsing.\n{ foo: \"Mr. Foo\", argv: { remain: [\"-fp\"] } }\n\n$ node my-program.js --blatzk -fp # unknown opts are ok.\n{ blatzk: true, flag: true, pick: true }\n\n$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value\n{ blatzk: 1000, flag: true, pick: true }\n\n$ node my-program.js --no-blatzk -fp # unless they start with \"no-\"\n{ blatzk: false, flag: true, pick: true }\n\n$ node my-program.js --baz b/a/z # known paths are resolved.\n{ baz: \"/Users/isaacs/b/a/z\" }\n\n# if Array is one of the types, then it can take many\n# values, and will always be an array. The other types provided\n# specify what types are allowed in the list.\n\n$ node my-program.js --many1 5 --many1 null --many1 foo\n{ many1: [\"5\", \"null\", \"foo\"] }\n\n$ node my-program.js --many2 foo --many2 bar\n{ many2: [\"/path/to/foo\", \"path/to/bar\"] }\n```\n\nRead the tests at the bottom of `lib/nopt.js` for more examples of\nwhat this puppy can do.\n\n## Types\n\nThe following types are supported, and defined on `nopt.typeDefs`\n\n* String: A normal string. No parsing is done.\n* path: A file system path. Gets resolved against cwd if not absolute.\n* url: A url. If it doesn't parse, it isn't accepted.\n* Number: Must be numeric.\n* Date: Must parse as a date. If it does, and `Date` is one of the options,\n then it will return a Date object, not a string.\n* Boolean: Must be either `true` or `false`. If an option is a boolean,\n then it does not need a value, and its presence will imply `true` as\n the value. To negate boolean flags, do `--no-whatever` or `--whatever\n false`\n* NaN: Means that the option is strictly not allowed. Any value will\n fail.\n* Stream: An object matching the \"Stream\" class in node. Valuable\n for use when validating programmatically. (npm uses this to let you\n supply any WriteStream on the `outfd` and `logfd` config options.)\n* Array: If `Array` is specified as one of the types, then the value\n will be parsed as a list of options. This means that multiple values\n can be specified, and that the value will always be an array.\n\nIf a type is an array of values not on this list, then those are\nconsidered valid values. For instance, in the example above, the\n`--bloo` option can only be one of `\"big\"`, `\"medium\"`, or `\"small\"`,\nand any other value will be rejected.\n\nWhen parsing unknown fields, `\"true\"`, `\"false\"`, and `\"null\"` will be\ninterpreted as their JavaScript equivalents.\n\nYou can also mix types and values, or multiple types, in a list. For\ninstance `{ blah: [Number, null] }` would allow a value to be set to\neither a Number or null. When types are ordered, this implies a\npreference, and the first type that can be used to properly interpret\nthe value will be used.\n\nTo define a new type, add it to `nopt.typeDefs`. Each item in that\nhash is an object with a `type` member and a `validate` method. The\n`type` member is an object that matches what goes in the type list. The\n`validate` method is a function that gets called with `validate(data,\nkey, val)`. Validate methods should assign `data[key]` to the valid\nvalue of `val` if it can be handled properly, or return boolean\n`false` if it cannot.\n\nYou can also call `nopt.clean(data, types, typeDefs)` to clean up a\nconfig object and remove its invalid properties.\n\n## Error Handling\n\nBy default, nopt outputs a warning to standard error when invalid values for\nknown options are found. You can change this behavior by assigning a method\nto `nopt.invalidHandler`. This method will be called with\nthe offending `nopt.invalidHandler(key, val, types)`.\n\nIf no `nopt.invalidHandler` is assigned, then it will console.error\nits whining. If it is assigned to boolean `false` then the warning is\nsuppressed.\n\n## Abbreviations\n\nYes, they are supported. If you define options like this:\n\n```javascript\n{ \"foolhardyelephants\" : Boolean\n, \"pileofmonkeys\" : Boolean }\n```\n\nThen this will work:\n\n```bash\nnode program.js --foolhar --pil\nnode program.js --no-f --pileofmon\n# etc.\n```\n\n## Shorthands\n\nShorthands are a hash of shorter option names to a snippet of args that\nthey expand to.\n\nIf multiple one-character shorthands are all combined, and the\ncombination does not unambiguously match any other option or shorthand,\nthen they will be broken up into their constituent parts. For example:\n\n```json\n{ \"s\" : [\"--loglevel\", \"silent\"]\n, \"g\" : \"--global\"\n, \"f\" : \"--force\"\n, \"p\" : \"--parseable\"\n, \"l\" : \"--long\"\n}\n```\n\n```bash\nnpm ls -sgflp\n# just like doing this:\nnpm ls --loglevel silent --global --force --long --parseable\n```\n\n## The Rest of the args\n\nThe config object returned by nopt is given a special member called\n`argv`, which is an object with the following fields:\n\n* `remain`: The remaining args after all the parsing has occurred.\n* `original`: The args as they originally appeared.\n* `cooked`: The args after flags and shorthands are expanded.\n\n## Slicing\n\nNode programs are called with more or less the exact argv as it appears\nin C land, after the v8 and node-specific options have been plucked off.\nAs such, `argv[0]` is always `node` and `argv[1]` is always the\nJavaScript program being run.\n\nThat's usually not very useful to you. So they're sliced off by\ndefault. If you want them, then you can pass in `0` as the last\nargument, or any other number that you'd like to slice off the start of\nthe list.\n", + "readmeFilename": "README.md", + "gitHead": "10a750c9bb99c1950160353459e733ac2aa18cb6", + "bugs": { + "url": "https://github.com/npm/nopt/issues" + }, + "homepage": "https://github.com/npm/nopt#readme", + "_id": "nopt@3.0.6", + "_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9", + "_from": "nopt@>=3.0.6 <3.1.0" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/.npmignore new file mode 100644 index 00000000..bca51b35 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/CHANGELOG.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/CHANGELOG.md new file mode 100644 index 00000000..f9ce58dd --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/CHANGELOG.md @@ -0,0 +1,5 @@ +### 1.0.0 (2014-12-25): + +* [`8b3d874`](https://github.com/npm/normalize-git-url/commit/8b3d874afd14f4cdde65d418e0a35a615c746bba) + Initial version, with simple tests. + ([@othiym23](https://github.com/othiym23)) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/LICENSE new file mode 100644 index 00000000..efd5764b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2014-2015, Forrest L Norvell + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/README.md new file mode 100644 index 00000000..0c4fe3e9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/README.md @@ -0,0 +1,40 @@ +# normalize-git-url + +You have a bunch of Git URLs. You want to convert them to a canonical +representation, probably for use inside npm so that it doesn't end up creating +a bunch of superfluous cached origins. You use this package. + +## Usage + +```javascript +var ngu = require('normalize-git-url'); +var normalized = ngu("git+ssh://git@github.com:organization/repo.git#hashbrowns") +// get back: +// { +// url : "ssh://git@github.com/organization/repo.git", +// branch : "hashbrowns" // did u know hashbrowns are delicious? +// } +``` + +## API + +There's just the one function, and all it takes is a single parameter, a non-normalized Git URL. + +### normalizeGitUrl(url) + +* `url` {String} The Git URL (very loosely speaking) to be normalized. + +Returns an object with the following format: + +* `url` {String} The normalized URL. +* `branch` {String} The treeish to be checked out once the repo at `url` is + cloned. It doesn't have to be a branch, but it's a lot easier to intuit what + the output is for with that name. + +## Limitations + +Right now this doesn't try to special-case GitHub too much -- it doesn't ensure +that `.git` is added to the end of URLs, it doesn't prefer `https:` over +`http:` or `ssh:`, it doesn't deal with redirects, and it doesn't try to +resolve symbolic names to treeish hashcodes. For now, it just tries to account +for minor differences in representation. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/normalize-git-url.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/normalize-git-url.js new file mode 100644 index 00000000..57bac857 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/normalize-git-url.js @@ -0,0 +1,38 @@ +var url = require('url') + +module.exports = function normalize (u) { + var parsed = url.parse(u) + // If parsing actually alters the URL, it is almost certainly an + // scp-style URL, or an invalid one. + var altered = u !== url.format(parsed) + + // git is so tricky! + // if the path is like ssh://foo:22/some/path then it works, but + // it needs the ssh:// + // If the path is like ssh://foo:some/path then it works, but + // only if you remove the ssh:// + if (parsed.protocol) { + parsed.protocol = parsed.protocol.replace(/^git\+/, '') + } + + // figure out what we should check out. + var checkout = parsed.hash && parsed.hash.substr(1) || 'master' + parsed.hash = '' + + var returnedUrl + if (altered) { + if (u.match(/^git\+https?/) && parsed.pathname.match(/\/?:[^0-9]/)) { + returnedUrl = u.replace(/^git\+(.*:[^:]+):(.*)/, '$1/$2') + } else { + returnedUrl = u.replace(/^(?:git\+)?ssh:\/\//, '') + } + returnedUrl = returnedUrl.replace(/#[^#]*$/, '') + } else { + returnedUrl = url.format(parsed) + } + + return { + url: returnedUrl, + branch: checkout + } +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/package.json new file mode 100644 index 00000000..372e891f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-git-url/package.json @@ -0,0 +1,42 @@ +{ + "name": "normalize-git-url", + "version": "3.0.1", + "description": "Normalizes Git URLs. For npm, but you can use it too.", + "main": "normalize-git-url.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^1.1.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/normalize-git-url.git" + }, + "keywords": [ + "git", + "github", + "url", + "normalize", + "npm" + ], + "author": { + "name": "Forrest L Norvell", + "email": "ogd@aoaioxxysz.net" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/normalize-git-url/issues" + }, + "homepage": "https://github.com/npm/normalize-git-url", + "readme": "# normalize-git-url\n\nYou have a bunch of Git URLs. You want to convert them to a canonical\nrepresentation, probably for use inside npm so that it doesn't end up creating\na bunch of superfluous cached origins. You use this package.\n\n## Usage\n\n```javascript\nvar ngu = require('normalize-git-url');\nvar normalized = ngu(\"git+ssh://git@github.com:organization/repo.git#hashbrowns\")\n// get back:\n// {\n// url : \"ssh://git@github.com/organization/repo.git\",\n// branch : \"hashbrowns\" // did u know hashbrowns are delicious?\n// }\n```\n\n## API\n\nThere's just the one function, and all it takes is a single parameter, a non-normalized Git URL.\n\n### normalizeGitUrl(url)\n\n* `url` {String} The Git URL (very loosely speaking) to be normalized.\n\nReturns an object with the following format:\n\n* `url` {String} The normalized URL.\n* `branch` {String} The treeish to be checked out once the repo at `url` is\n cloned. It doesn't have to be a branch, but it's a lot easier to intuit what\n the output is for with that name.\n\n## Limitations\n\nRight now this doesn't try to special-case GitHub too much -- it doesn't ensure\nthat `.git` is added to the end of URLs, it doesn't prefer `https:` over\n`http:` or `ssh:`, it doesn't deal with redirects, and it doesn't try to\nresolve symbolic names to treeish hashcodes. For now, it just tries to account\nfor minor differences in representation.\n", + "readmeFilename": "README.md", + "gitHead": "8393cd4345e404eb6ad2ff6853dcc8287807ca22", + "_id": "normalize-git-url@3.0.1", + "_shasum": "d40d419d05a15870271e50534dbb7b8ccd9b0a5c", + "_from": "normalize-git-url@latest" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/.npmignore new file mode 100644 index 00000000..096746c1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/.npmignore @@ -0,0 +1 @@ +/node_modules/ \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/.travis.yml new file mode 100644 index 00000000..e02e6b49 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/AUTHORS b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/AUTHORS new file mode 100644 index 00000000..a15de60e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/AUTHORS @@ -0,0 +1,4 @@ +# Names sorted by how much code was originally theirs. +Isaac Z. Schlueter +Meryn Stol +Robert Kowalski \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/LICENSE new file mode 100644 index 00000000..b3d0167f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/LICENSE @@ -0,0 +1,30 @@ +This package contains code originally written by Isaac Z. Schlueter. +Used with permission. + +Copyright (c) Meryn Stol ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/README.md new file mode 100644 index 00000000..cc30e117 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/README.md @@ -0,0 +1,107 @@ +# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data) + +normalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry. + +normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools. + +## Installation + +``` +npm install normalize-package-data +``` + +## Usage + +Basic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`. + +```javascript +normalizeData = require('normalize-package-data') +packageData = fs.readFileSync("package.json") +normalizeData(packageData) +// packageData is now normalized +``` + +#### Strict mode + +You may activate strict validation by passing true as the second argument. + +```javascript +normalizeData = require('normalize-package-data') +packageData = fs.readFileSync("package.json") +warnFn = function(msg) { console.error(msg) } +normalizeData(packageData, true) +// packageData is now normalized +``` + +If strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace. + +#### Warnings + +Optionally, you may pass a "warning" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data. + +```javascript +normalizeData = require('normalize-package-data') +packageData = fs.readFileSync("package.json") +warnFn = function(msg) { console.error(msg) } +normalizeData(packageData, warnFn) +// packageData is now normalized. Any number of warnings may have been logged. +``` + +You may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third. + +When `private` field is set to `true`, warnings will be suppressed. + +### Potential exceptions + +If the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback. + +## What normalization (currently) entails + +* The value of `name` field gets trimmed (unless in strict mode). +* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver). +* If `name` and/or `version` fields are missing, they are set to empty strings. +* If `files` field is not an array, it will be removed. +* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value. +* If `man` field is a string, it will become an array with the original string as its sole member. +* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\s+`. +* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties. +* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`. +* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs. +* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched. +* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved. +* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL. +* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`. +* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`. +* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git+https://github.com/[owner-name]/[repo-name].git +* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value. +* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. +* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed. +* If `homepage` field is not a string, it will be removed. +* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`. +* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/ . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. + +### Rules for name field + +If `name` field is given, the value of the name field must be a string. The string may not: + +* start with a period. +* contain the following characters: `/@\s+%` +* contain and characters that would need to be encoded for use in urls. +* resemble the word `node_modules` or `favicon.ico` (case doesn't matter). + +### Rules for version field + +If `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver). + +### Rules for license field + +The `license` field should be a valid *SPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/packages/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license). + +## Credits + +This package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson. + +## License + +normalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). +Copyright (c) 2013 Meryn Stol diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/package.json new file mode 100644 index 00000000..02f01987 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/normalize-package-data/package.json @@ -0,0 +1,86 @@ +{ + "name": "normalize-package-data", + "version": "2.3.5", + "author": { + "name": "Meryn Stol", + "email": "merynstol@gmail.com" + }, + "description": "Normalizes data that can be found in package.json files.", + "license": "BSD-2-Clause", + "repository": { + "type": "git", + "url": "git://github.com/npm/normalize-package-data.git" + }, + "main": "lib/normalize.js", + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "devDependencies": { + "async": "^1.5.0", + "tap": "^2.2.0", + "underscore": "^1.8.3" + }, + "contributors": [ + { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + { + "name": "Meryn Stol", + "email": "merynstol@gmail.com" + }, + { + "name": "Robert Kowalski", + "email": "rok@kowalski.gd" + } + ], + "gitHead": "3dc7756af20b3b1b24c6d75302448ca3659e0a65", + "bugs": { + "url": "https://github.com/npm/normalize-package-data/issues" + }, + "homepage": "https://github.com/npm/normalize-package-data#readme", + "_id": "normalize-package-data@2.3.5", + "_shasum": "8d924f142960e1777e7ffe170543631cc7cb02df", + "_from": "normalize-package-data@>=2.3.5 <2.4.0", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "8d924f142960e1777e7ffe170543631cc7cb02df", + "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "meryn", + "email": "merynstol@gmail.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/LICENSE new file mode 100644 index 00000000..215e9f0d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) npm, Inc. and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/README.md new file mode 100644 index 00000000..9956e80c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/README.md @@ -0,0 +1,21 @@ +# npm-cache-filename + +Given a cache folder and url, return the appropriate cache folder. + +## USAGE + +```javascript +var cf = require('npm-cache-filename'); +console.log(cf('/tmp/cache', 'https://registry.npmjs.org:1234/foo/bar')); +// outputs: /tmp/cache/registry.npmjs.org_1234/foo/bar +``` + +As a bonus, you can also bind it to a specific root path: + +```javascript +var cf = require('npm-cache-filename'); +var getFile = cf('/tmp/cache'); + +console.log(getFile('https://registry.npmjs.org:1234/foo/bar')); +// outputs: /tmp/cache/registry.npmjs.org_1234/foo/bar +``` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/index.js new file mode 100644 index 00000000..6c2aa0cf --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/index.js @@ -0,0 +1,24 @@ +var url = require('url');; +var path = require('path');; + +module.exports = cf;; + +function cf(root, u) { + if (!u) + return cf.bind(null, root);; + + u = url.parse(u);; + var h = u.host.replace(/:/g, '_');; + // Strip off any /-rev/... or ?rev=... bits + var revre = /(\?rev=|\?.*?&rev=|\/-rev\/).*$/;; + var parts = u.path.replace(revre, '').split('/').slice(1);; + // Make sure different git references get different folders + if (u.hash && u.hash.length > 1) { + parts.push(u.hash.slice(1));; + };; + var p = [root, h].concat(parts.map(function(part) { + return encodeURIComponent(part).replace(/%/g, '_');; + }));; + + return path.join.apply(path, p);; +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/package.json new file mode 100644 index 00000000..220c88f5 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/package.json @@ -0,0 +1,57 @@ +{ + "name": "npm-cache-filename", + "version": "1.0.2", + "description": "Given a cache folder and url, return the appropriate cache folder.", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/npm/npm-cache-filename.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/npm-cache-filename/issues" + }, + "homepage": "https://github.com/npm/npm-cache-filename", + "gitHead": "b7eef12919fdf544a3b83bba73093f7268c40c1e", + "_id": "npm-cache-filename@1.0.2", + "_shasum": "ded306c5b0bfc870a9e9faf823bc5f283e05ae11", + "_from": "npm-cache-filename@1.0.2", + "_npmVersion": "2.12.1", + "_nodeVersion": "2.2.2", + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" + }, + "dist": { + "shasum": "ded306c5b0bfc870a9e9faf823bc5f283e05ae11", + "tarball": "http://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "kat", + "email": "kat@lua.cz" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/test.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/test.js new file mode 100644 index 00000000..61f7dd1a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-cache-filename/test.js @@ -0,0 +1,23 @@ +var test = require('tap').test;; +test('it does the thing it says it does', function(t) { + var cf = require('./');; + + t.equal(cf('/tmp/cache', 'https://foo:134/xyz?adf=foo:bar/baz'), + '/tmp/cache/foo_134/xyz_3Fadf_3Dfoo_3Abar/baz');; + + var getFile = cf('/tmp/cache');; + t.equal(getFile('https://foo:134/xyz?adf=foo:bar/baz'), + '/tmp/cache/foo_134/xyz_3Fadf_3Dfoo_3Abar/baz');; + + t.equal(cf("/tmp", "https://foo:134/xyz/-rev/baz"), + '/tmp/foo_134/xyz') + t.equal(cf("/tmp", "https://foo:134/xyz/?rev=baz"), + '/tmp/foo_134/xyz') + t.equal(cf("/tmp", "https://foo:134/xyz/?foo&rev=baz"), + '/tmp/foo_134/xyz') + t.equal(cf("/tmp", "https://foo:134/xyz-rev/baz"), + '/tmp/foo_134/xyz-rev/baz') + t.equal(cf("/tmp", "git://foo:134/xyz-rev/baz.git#master"), + '/tmp/foo_134/xyz-rev/baz.git/master') + t.end(); +});; diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/LICENSE new file mode 100644 index 00000000..9f403583 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Robert Kowalski and Isaac Z. Schlueter ("Authors") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/README.md new file mode 100644 index 00000000..3005e725 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/README.md @@ -0,0 +1,25 @@ +# npm-install-checks + +A package that contains checks that npm runs during the installation. + +## API + +### .checkEngine(target, npmVer, nodeVer, force, strict, cb) +Check if node/npm version is supported by the package. + +Error type: `ENOTSUP` + +### .checkPlatform(target, force, cb) +Check if OS/Arch is supported by the package. + +Error type: `EBADPLATFORM` + +### .checkCycle(target, ancestors, cb) +Check for cyclic dependencies. + +Error type: `ECYCLE` + +### .checkGit(folder, cb) +Check if a folder is a .git folder. + +Error type: `EISGIT` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/index.js new file mode 100644 index 00000000..4ca75454 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/index.js @@ -0,0 +1,146 @@ +var fs = require("fs") +var path = require("path") +var log = require("npmlog") +var semver = require("semver") + +exports.checkEngine = checkEngine +function checkEngine (target, npmVer, nodeVer, force, strict, cb) { + var nodev = force ? null : nodeVer + , strict = strict || target.engineStrict + , eng = target.engines + if (!eng) return cb() + if (nodev && eng.node && !semver.satisfies(nodev, eng.node) + || eng.npm && !semver.satisfies(npmVer, eng.npm)) { + + if (strict) { + var er = new Error("Unsupported") + er.code = "ENOTSUP" + er.required = eng + er.pkgid = target._id + return cb(er) + } else { + log.warn( "engine", "%s: wanted: %j (current: %j)" + , target._id, eng, {node: nodev, npm: npmVer} ) + } + } + return cb() +} + +exports.checkPlatform = checkPlatform +function checkPlatform (target, force, cb) { + var platform = process.platform + , arch = process.arch + , osOk = true + , cpuOk = true + + if (force) { + return cb() + } + + if (target.os) { + osOk = checkList(platform, target.os) + } + if (target.cpu) { + cpuOk = checkList(arch, target.cpu) + } + if (!osOk || !cpuOk) { + var er = new Error("Unsupported") + er.code = "EBADPLATFORM" + er.os = target.os || ['any'] + er.cpu = target.cpu || ['any'] + er.pkgid = target._id + return cb(er) + } + return cb() +} + +function checkList (value, list) { + var tmp + , match = false + , blc = 0 + if (typeof list === "string") { + list = [list] + } + if (list.length === 1 && list[0] === "any") { + return true + } + for (var i = 0; i < list.length; ++i) { + tmp = list[i] + if (tmp[0] === '!') { + tmp = tmp.slice(1) + if (tmp === value) { + return false + } + ++blc + } else { + match = match || tmp === value + } + } + return match || blc === list.length +} + +exports.checkCycle = checkCycle +function checkCycle (target, ancestors, cb) { + // there are some very rare and pathological edge-cases where + // a cycle can cause npm to try to install a never-ending tree + // of stuff. + // Simplest: + // + // A -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ... + // + // Solution: Simply flat-out refuse to install any name@version + // that is already in the prototype tree of the ancestors object. + // A more correct, but more complex, solution would be to symlink + // the deeper thing into the new location. + // Will do that if anyone whines about this irl. + // + // Note: `npm install foo` inside of the `foo` package will abort + // earlier if `--force` is not set. However, if it IS set, then + // we need to still fail here, but just skip the first level. Of + // course, it'll still fail eventually if it's a true cycle, and + // leave things in an undefined state, but that's what is to be + // expected when `--force` is used. That is why getPrototypeOf + // is used *twice* here: to skip the first level of repetition. + + var p = Object.getPrototypeOf(Object.getPrototypeOf(ancestors)) + , name = target.name + , version = target.version + while (p && p !== Object.prototype && p[name] !== version) { + p = Object.getPrototypeOf(p) + } + if (p[name] !== version) return cb() + + var er = new Error("Unresolvable cycle detected") + var tree = [target._id, JSON.parse(JSON.stringify(ancestors))] + , t = Object.getPrototypeOf(ancestors) + while (t && t !== Object.prototype) { + if (t === p) t.THIS_IS_P = true + tree.push(JSON.parse(JSON.stringify(t))) + t = Object.getPrototypeOf(t) + } + log.verbose("unresolvable dependency tree", tree) + er.pkgid = target._id + er.code = "ECYCLE" + return cb(er) +} + +exports.checkGit = checkGit +function checkGit (folder, cb) { + // if it's a git repo then don't touch it! + fs.lstat(folder, function (er, s) { + if (er || !s.isDirectory()) return cb() + else checkGit_(folder, cb) + }) +} + +function checkGit_ (folder, cb) { + fs.stat(path.resolve(folder, ".git"), function (er, s) { + if (!er && s.isDirectory()) { + var e = new Error("Appears to be a git repo or submodule.") + e.path = folder + e.code = "EISGIT" + return cb(e) + } + cb() + }) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/package.json new file mode 100644 index 00000000..2874bbb4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-install-checks/package.json @@ -0,0 +1,77 @@ +{ + "name": "npm-install-checks", + "version": "1.0.7", + "description": "checks that npm runs during the installation of a module", + "main": "index.js", + "dependencies": { + "npmlog": "0.1 || 1 || 2", + "semver": "^2.3.0 || 3.x || 4 || 5" + }, + "devDependencies": { + "mkdirp": "~0.3.5", + "rimraf": "~2.2.5", + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/npm/npm-install-checks.git" + }, + "homepage": "https://github.com/npm/npm-install-checks", + "keywords": [ + "npm,", + "install" + ], + "author": { + "name": "Robert Kowalski", + "email": "rok@kowalski.gd" + }, + "license": "BSD-2-Clause", + "bugs": { + "url": "https://github.com/npm/npm-install-checks/issues" + }, + "gitHead": "4882a47d954ceeec567db87219bbc31f64af191e", + "_id": "npm-install-checks@1.0.7", + "_shasum": "6d91aeda0ac96801f1ed7aadee116a6c0a086a57", + "_from": "npm-install-checks@1.0.7", + "_npmVersion": "2.14.19", + "_nodeVersion": "4.2.4", + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" + }, + "dist": { + "shasum": "6d91aeda0ac96801f1ed7aadee116a6c0a086a57", + "tarball": "http://registry.npmjs.org/npm-install-checks/-/npm-install-checks-1.0.7.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "robertkowalski", + "email": "rok@kowalski.gd" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/npm-install-checks-1.0.7.tgz_1455329001145_0.8577833492308855" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-1.0.7.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/LICENSE new file mode 100644 index 00000000..235bdd54 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/README.md new file mode 100644 index 00000000..de2bf55c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/README.md @@ -0,0 +1,105 @@ +# npm-package-arg + +Parse package name and specifier passed to commands like `npm install` or +`npm cache add`. This just parses the text given-- it's worth noting that +`npm` has further logic it applies by looking at your disk to figure out +what ambiguous specifiers are. If you want that logic, please see +[realize-package-specifier]. + +[realize-package-specifier]: https://www.npmjs.org/package/realize-package-specifier + +Arguments look like: `foo@1.2`, `@bar/foo@1.2`, `foo@user/foo`, `http://x.com/foo.tgz`, +`git+https://github.com/user/foo`, `bitbucket:user/foo`, `foo.tar.gz` or `bar` + +## EXAMPLES + +```javascript +var assert = require("assert") +var npa = require("npm-package-arg") + +// Pass in the descriptor, and it'll return an object +var parsed = npa("@bar/foo@1.2") + +// Returns an object like: +{ + raw: '@bar/foo@1.2', // what was passed in + name: "@bar/foo", // the name of the package + scope: "@bar", // the private scope of the package, or null + type: "range", // the type of specifier this is + spec: ">=1.2.0 <1.3.0" // the expanded specifier + rawSpec: "1.2" // the specifier as passed in + } + +// Parsing urls pointing at hosted git services produces a variation: +var parsed = npa("git+https://github.com/user/foo") + +// Returns an object like: +{ + raw: 'git+https://github.com/user/foo', + scope: null, + name: null, + rawSpec: 'git+https://github.com/user/foo', + spec: 'user/foo', + type: 'hosted', + hosted: { + type: 'github', + ssh: 'git@github.com:user/foo.git', + sshurl: 'git+ssh://git@github.com/user/foo.git', + https: 'https://github.com/user/foo.git', + directUrl: 'https://raw.githubusercontent.com/user/foo/master/package.json' + } +} + +// Completely unreasonable invalid garbage throws an error +// Make sure you wrap this in a try/catch if you have not +// already sanitized the inputs! +assert.throws(function() { + npa("this is not \0 a valid package name or url") +}) +``` + +## USING + +`var npa = require('npm-package-arg')` + +* var result = npa(*arg*) + +Parses *arg* and returns a result object detailing what *arg* is. + +*arg* -- a package descriptor, like: `foo@1.2`, or `foo@user/foo`, or +`http://x.com/foo.tgz`, or `git+https://github.com/user/foo` + +## RESULT OBJECT + +The objects that are returned by npm-package-arg contain the following +keys: + +* `name` - If known, the `name` field expected in the resulting pkg. +* `type` - One of the following strings: + * `git` - A git repo + * `hosted` - A hosted project, from github, bitbucket or gitlab. Originally + either a full url pointing at one of these services or a shorthand like + `user/project` or `github:user/project` for github or `bitbucket:user/project` + for bitbucket. + * `tag` - A tagged version, like `"foo@latest"` + * `version` - A specific version number, like `"foo@1.2.3"` + * `range` - A version range, like `"foo@2.x"` + * `local` - A local file or folder path + * `remote` - An http url (presumably to a tgz) +* `spec` - The "thing". URL, the range, git repo, etc. +* `hosted` - If type=hosted this will be an object with the following keys: + * `type` - github, bitbucket or gitlab + * `ssh` - The ssh path for this git repo + * `sshUrl` - The ssh URL for this git repo + * `httpsUrl` - The HTTPS URL for this git repo + * `directUrl` - The URL for the package.json in this git repo +* `raw` - The original un-modified string that was provided. +* `rawSpec` - The part after the `name@...`, as it was originally + provided. +* `scope` - If a name is something like `@org/module` then the `scope` + field will be set to `org`. If it doesn't have a scoped name, then + scope is `null`. + +If you only include a name and no specifier part, eg, `foo` or `foo@` then +a default of `latest` will be used (as of 4.1.0). This is contrast with +previous behavior where `*` was used. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/npa.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/npa.js new file mode 100644 index 00000000..11a49b59 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/npa.js @@ -0,0 +1,184 @@ +var url = require("url") +var assert = require("assert") +var util = require("util") +var semver = require("semver") +var path = require("path") +var HostedGit = require("hosted-git-info") + +module.exports = npa + +var isWindows = process.platform === "win32" || global.FAKE_WINDOWS +var slashRe = isWindows ? /\\|[/]/ : /[/]/ + +var parseName = /^(?:@([^/]+?)[/])?([^/]+?)$/ +var nameAt = /^(@([^/]+?)[/])?([^/]+?)@/ +var debug = util.debuglog ? util.debuglog("npa") + : /\bnpa\b/i.test(process.env.NODE_DEBUG || "") + ? function () { + console.error("NPA: " + util.format.apply(util, arguments).split("\n").join("\nNPA: ")) + } : function () {} + +function validName (name) { + if (!name) { + debug("not a name %j", name) + return false + } + var n = name.trim() + if (!n || n.charAt(0) === "." + || !n.match(/^[a-zA-Z0-9]/) + || n.match(/[/()&?#|<>@:%\s\\*'"!~`]/) + || n.toLowerCase() === "node_modules" + || n !== encodeURIComponent(n) + || n.toLowerCase() === "favicon.ico") { + debug("not a valid name %j", name) + return false + } + return n +} + +function npa (arg) { + assert.equal(typeof arg, "string") + arg = arg.trim() + + var res = new Result + res.raw = arg + res.scope = null + + // See if it's something like foo@... + var nameparse = arg.match(nameAt) + debug("nameparse", nameparse) + if (nameparse && validName(nameparse[3]) && + (!nameparse[2] || validName(nameparse[2]))) { + res.name = (nameparse[1] || "") + nameparse[3] + if (nameparse[2]) + res.scope = "@" + nameparse[2] + arg = arg.substr(nameparse[0].length) + } else { + res.name = null + } + + res.rawSpec = arg + res.spec = arg + + var urlparse = url.parse(arg) + debug("urlparse", urlparse) + + // windows paths look like urls + // don't be fooled! + if (isWindows && urlparse && urlparse.protocol && + urlparse.protocol.match(/^[a-zA-Z]:$/)) { + debug("windows url-ish local path", urlparse) + urlparse = {} + } + + if (urlparse.protocol || HostedGit.fromUrl(arg)) { + return parseUrl(res, arg, urlparse) + } + + // at this point, it's not a url, and not hosted + // If it's a valid name, and doesn't already have a name, then assume + // $name@"" range + // + // if it's got / chars in it, then assume that it's local. + + if (res.name) { + if (arg == '') arg = 'latest' + var version = semver.valid(arg, true) + var range = semver.validRange(arg, true) + // foo@... + if (version) { + res.spec = version + res.type = "version" + } else if (range) { + res.spec = range + res.type = "range" + } else if (slashRe.test(arg)) { + parseLocal(res, arg) + } else { + res.type = "tag" + res.spec = arg + } + } else { + var p = arg.match(parseName) + if (p && validName(p[2]) && + (!p[1] || validName(p[1]))) { + res.type = "tag" + res.spec = "latest" + res.rawSpec = "" + res.name = arg + if (p[1]) + res.scope = "@" + p[1] + } else { + parseLocal(res, arg) + } + } + + return res +} + +function parseLocal (res, arg) { + // turns out nearly every character is allowed in fs paths + if (/\0/.test(arg)) { + throw new Error("Invalid Path: " + JSON.stringify(arg)) + } + res.type = "local" + res.spec = path.resolve(arg) +} + +function parseUrl (res, arg, urlparse) { + var gitHost = HostedGit.fromUrl(arg) + if (gitHost) { + res.type = "hosted" + res.spec = gitHost.toString(), + res.hosted = { + type: gitHost.type, + ssh: gitHost.ssh(), + sshUrl: gitHost.sshurl(), + httpsUrl: gitHost.https(), + gitUrl: gitHost.git(), + shortcut: gitHost.shortcut(), + directUrl: gitHost.file("package.json") + } + return res + } + // check the protocol, and then see if it's git or not + switch (urlparse.protocol) { + case "git:": + case "git+http:": + case "git+https:": + case "git+rsync:": + case "git+ftp:": + case "git+ssh:": + case "git+file:": + res.type = "git" + res.spec = arg.replace(/^git[+]/, "") + break + + case "http:": + case "https:": + res.type = "remote" + res.spec = arg + break + + case "file:": + res.type = "local" + res.spec = urlparse.pathname + break + + default: + throw new Error("Unsupported URL Type: " + arg) + break + } + + return res +} + + +function Result () { + if (!(this instanceof Result)) return new Result +} +Result.prototype.name = null +Result.prototype.type = null +Result.prototype.spec = null +Result.prototype.raw = null +Result.prototype.hosted = null diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/package.json new file mode 100644 index 00000000..d7927862 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-package-arg/package.json @@ -0,0 +1,62 @@ +{ + "name": "npm-package-arg", + "version": "4.1.0", + "description": "Parse the things that can be arguments to `npm install`", + "main": "npa.js", + "directories": { + "test": "test" + }, + "dependencies": { + "hosted-git-info": "^2.1.4", + "semver": "4 || 5" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/npm-package-arg.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/npm-package-arg/issues" + }, + "homepage": "https://github.com/npm/npm-package-arg", + "gitHead": "383b4783a076b825815be51eb1ab2e4bb8a1e1fc", + "_id": "npm-package-arg@4.1.0", + "_shasum": "2e015f8ac00737cb97f997c9cbf059f42a74527d", + "_from": "npm-package-arg@>=4.1.0 <4.2.0", + "_npmVersion": "3.4.0", + "_nodeVersion": "4.2.1", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "2e015f8ac00737cb97f997c9cbf059f42a74527d", + "tarball": "http://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.1.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.1.0.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/.npmignore new file mode 100644 index 00000000..6b0dc89c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/.npmignore @@ -0,0 +1,5 @@ +test/fixtures/cache +node_modules +npm-debug.log +.eslintrc +.jshintrc diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/.travis.yml new file mode 100644 index 00000000..bcaaa277 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/.travis.yml @@ -0,0 +1,12 @@ +language: node_js +node_js: + - "0.12" + - "0.10" + - "0.8" + - iojs +script: "npm test" +sudo: false +before_install: + - "npm install -g npm@latest" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/README.md new file mode 100644 index 00000000..0bebe4bd --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/README.md @@ -0,0 +1,318 @@ +# npm-registry-client + +The code that npm uses to talk to the registry. + +It handles all the caching and HTTP calls. + +## Usage + +```javascript +var RegClient = require('npm-registry-client') +var client = new RegClient(config) +var uri = "https://registry.npmjs.org/npm" +var params = {timeout: 1000} + +client.get(uri, params, function (error, data, raw, res) { + // error is an error if there was a problem. + // data is the parsed data object + // raw is the json string + // res is the response from couch +}) +``` + +# Registry URLs + +The registry calls take either a full URL pointing to a resource in the +registry, or a base URL for the registry as a whole (including the registry +path – but be sure to terminate the path with `/`). `http` and `https` URLs are +the only ones supported. + +## Using the client + +Every call to the client follows the same pattern: + +* `uri` {String} The *fully-qualified* URI of the registry API method being + invoked. +* `params` {Object} Per-request parameters. +* `callback` {Function} Callback to be invoked when the call is complete. + +### Credentials + +Many requests to the registry can by authenticated, and require credentials +for authorization. These credentials always look the same: + +* `username` {String} +* `password` {String} +* `email` {String} +* `alwaysAuth` {Boolean} Whether calls to the target registry are always + authed. + +**or** + +* `token` {String} +* `alwaysAuth` {Boolean} Whether calls to the target registry are always + authed. + +## API + +### client.access(uri, params, cb) + +* `uri` {String} Registry URL for the package's access API endpoint. + Looks like `/-/package//access`. +* `params` {Object} Object containing per-request properties. + * `access` {String} New access level for the package. Can be either + `public` or `restricted`. Registry will raise an error if trying + to change the access level of an unscoped package. + * `auth` {Credentials} + +Set the access level for scoped packages. For now, there are only two +access levels: "public" and "restricted". + +### client.adduser(uri, params, cb) + +* `uri` {String} Base registry URL. +* `params` {Object} Object containing per-request properties. + * `auth` {Credentials} +* `cb` {Function} + * `error` {Error | null} + * `data` {Object} the parsed data object + * `raw` {String} the json + * `res` {Response Object} response from couch + +Add a user account to the registry, or verify the credentials. + +### client.deprecate(uri, params, cb) + +* `uri` {String} Full registry URI for the deprecated package. +* `params` {Object} Object containing per-request properties. + * `version` {String} Semver version range. + * `message` {String} The message to use as a deprecation warning. + * `auth` {Credentials} +* `cb` {Function} + +Deprecate a version of a package in the registry. + +### client.distTags.fetch(uri, params, cb) + +* `uri` {String} Base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `package` {String} Name of the package. + * `auth` {Credentials} +* `cb` {Function} + +Fetch all of the `dist-tags` for the named package. + +### client.distTags.add(uri, params, cb) + +* `uri` {String} Base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `package` {String} Name of the package. + * `distTag` {String} Name of the new `dist-tag`. + * `version` {String} Exact version to be mapped to the `dist-tag`. + * `auth` {Credentials} +* `cb` {Function} + +Add (or replace) a single dist-tag onto the named package. + +### client.distTags.set(uri, params, cb) + +* `uri` {String} Base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `package` {String} Name of the package. + * `distTags` {Object} Object containing a map from tag names to package + versions. + * `auth` {Credentials} +* `cb` {Function} + +Set all of the `dist-tags` for the named package at once, creating any +`dist-tags` that do not already exit. Any `dist-tags` not included in the +`distTags` map will be removed. + +### client.distTags.update(uri, params, cb) + +* `uri` {String} Base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `package` {String} Name of the package. + * `distTags` {Object} Object containing a map from tag names to package + versions. + * `auth` {Credentials} +* `cb` {Function} + +Update the values of multiple `dist-tags`, creating any `dist-tags` that do +not already exist. Any pre-existing `dist-tags` not included in the `distTags` +map will be left alone. + +### client.distTags.rm(uri, params, cb) + +* `uri` {String} Base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `package` {String} Name of the package. + * `distTag` {String} Name of the new `dist-tag`. + * `auth` {Credentials} +* `cb` {Function} + +Remove a single `dist-tag` from the named package. + +### client.get(uri, params, cb) + +* `uri` {String} The complete registry URI to fetch +* `params` {Object} Object containing per-request properties. + * `timeout` {Number} Duration before the request times out. Optional + (default: never). + * `follow` {Boolean} Follow 302/301 responses. Optional (default: true). + * `staleOk` {Boolean} If there's cached data available, then return that to + the callback quickly, and update the cache the background. Optional + (default: false). + * `auth` {Credentials} Optional. +* `cb` {Function} + +Fetches data from the registry via a GET request, saving it in the cache folder +with the ETag or the "Last Modified" timestamp. + +### client.publish(uri, params, cb) + +* `uri` {String} The registry URI for the package to publish. +* `params` {Object} Object containing per-request properties. + * `metadata` {Object} Package metadata. + * `access` {String} Access for the package. Can be `public` or `restricted` (no default). + * `body` {Stream} Stream of the package body / tarball. + * `auth` {Credentials} +* `cb` {Function} + +Publish a package to the registry. + +Note that this does not create the tarball from a folder. + +### client.star(uri, params, cb) + +* `uri` {String} The complete registry URI for the package to star. +* `params` {Object} Object containing per-request properties. + * `starred` {Boolean} True to star the package, false to unstar it. Optional + (default: false). + * `auth` {Credentials} +* `cb` {Function} + +Star or unstar a package. + +Note that the user does not have to be the package owner to star or unstar a +package, though other writes do require that the user be the package owner. + +### client.stars(uri, params, cb) + +* `uri` {String} The base URL for the registry. +* `params` {Object} Object containing per-request properties. + * `username` {String} Name of user to fetch starred packages for. Optional + (default: user in `auth`). + * `auth` {Credentials} Optional (required if `username` is omitted). +* `cb` {Function} + +View your own or another user's starred packages. + +### client.tag(uri, params, cb) + +* `uri` {String} The complete registry URI to tag +* `params` {Object} Object containing per-request properties. + * `version` {String} Version to tag. + * `tag` {String} Tag name to apply. + * `auth` {Credentials} +* `cb` {Function} + +Mark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the +specified version. + +### client.unpublish(uri, params, cb) + +* `uri` {String} The complete registry URI of the package to unpublish. +* `params` {Object} Object containing per-request properties. + * `version` {String} version to unpublish. Optional – omit to unpublish all + versions. + * `auth` {Credentials} +* `cb` {Function} + +Remove a version of a package (or all versions) from the registry. When the +last version us unpublished, the entire document is removed from the database. + +### client.whoami(uri, params, cb) + +* `uri` {String} The base registry for the URI. +* `params` {Object} Object containing per-request properties. + * `auth` {Credentials} +* `cb` {Function} + +Simple call to see who the registry thinks you are. Especially useful with +token-based auth. + + +## PLUMBING + +The below are primarily intended for use by the rest of the API, or by the npm +caching logic directly. + +### client.request(uri, params, cb) + +* `uri` {String} URI pointing to the resource to request. +* `params` {Object} Object containing per-request properties. + * `method` {String} HTTP method. Optional (default: "GET"). + * `body` {Stream | Buffer | String | Object} The request body. Objects + that are not Buffers or Streams are encoded as JSON. Optional – body + only used for write operations. + * `etag` {String} The cached ETag. Optional. + * `lastModified` {String} The cached Last-Modified timestamp. Optional. + * `follow` {Boolean} Follow 302/301 responses. Optional (default: true). + * `auth` {Credentials} Optional. +* `cb` {Function} + * `error` {Error | null} + * `data` {Object} the parsed data object + * `raw` {String} the json + * `res` {Response Object} response from couch + +Make a generic request to the registry. All the other methods are wrappers +around `client.request`. + +### client.fetch(uri, params, cb) + +* `uri` {String} The complete registry URI to upload to +* `params` {Object} Object containing per-request properties. + * `headers` {Stream} HTTP headers to be included with the request. Optional. + * `auth` {Credentials} Optional. +* `cb` {Function} + +Fetch a package from a URL, with auth set appropriately if included. Used to +cache remote tarballs as well as request package tarballs from the registry. + +# Configuration + +The client uses its own configuration, which is just passed in as a simple +nested object. The following are the supported values (with their defaults, if +any): + +* `proxy.http` {URL} The URL to proxy HTTP requests through. +* `proxy.https` {URL} The URL to proxy HTTPS requests through. Defaults to be + the same as `proxy.http` if unset. +* `proxy.localAddress` {IP} The local address to use on multi-homed systems. +* `ssl.ca` {String} Certificate signing authority certificates to trust. +* `ssl.certificate` {String} Client certificate (PEM encoded). Enable access + to servers that require client certificates. +* `ssl.key` {String} Private key (PEM encoded) for client certificate. +* `ssl.strict` {Boolean} Whether or not to be strict with SSL certificates. + Default = `true` +* `retry.count` {Number} Number of times to retry on GET failures. Default = 2. +* `retry.factor` {Number} `factor` setting for `node-retry`. Default = 10. +* `retry.minTimeout` {Number} `minTimeout` setting for `node-retry`. + Default = 10000 (10 seconds) +* `retry.maxTimeout` {Number} `maxTimeout` setting for `node-retry`. + Default = 60000 (60 seconds) +* `userAgent` {String} User agent header to send. Default = + `"node/{process.version}"` +* `log` {Object} The logger to use. Defaults to `require("npmlog")` if + that works, otherwise logs are disabled. +* `defaultTag` {String} The default tag to use when publishing new packages. + Default = `"latest"` +* `couchToken` {Object} A token for use with + [couch-login](https://npmjs.org/package/couch-login). +* `sessionToken` {String} A random identifier for this set of client requests. + Default = 8 random hexadecimal bytes. +* `maxSockets` {Number} The maximum number of connections that will be open per + origin (unique combination of protocol:host:port). Passed to the + [httpAgent](https://nodejs.org/api/http.html#http_agent_maxsockets). + Default = 50 diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/index.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/index.js new file mode 100644 index 00000000..199c0766 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/index.js @@ -0,0 +1,79 @@ +// utilities for working with the js-registry site. + +module.exports = RegClient + +var join = require('path').join +var fs = require('graceful-fs') + +var npmlog +try { + npmlog = require('npmlog') +} catch (er) { + npmlog = { + error: noop, + warn: noop, + info: noop, + verbose: noop, + silly: noop, + http: noop, + pause: noop, + resume: noop + } +} + +function noop () {} + +function RegClient (config) { + this.config = Object.create(config || {}) + + this.config.proxy = this.config.proxy || {} + if (!this.config.proxy.https && this.config.proxy.http) { + this.config.proxy.https = this.config.proxy.http + } + + this.config.ssl = this.config.ssl || {} + if (this.config.ssl.strict === undefined) this.config.ssl.strict = true + + this.config.retry = this.config.retry || {} + if (typeof this.config.retry.retries !== 'number') this.config.retry.retries = 2 + if (typeof this.config.retry.factor !== 'number') this.config.retry.factor = 10 + if (typeof this.config.retry.minTimeout !== 'number') this.config.retry.minTimeout = 10000 + if (typeof this.config.retry.maxTimeout !== 'number') this.config.retry.maxTimeout = 60000 + if (typeof this.config.maxSockets !== 'number') this.config.maxSockets = 50 + + this.config.userAgent = this.config.userAgent || 'node/' + process.version + this.config.defaultTag = this.config.defaultTag || 'latest' + + this.log = this.config.log || npmlog + delete this.config.log + + var client = this + fs.readdirSync(join(__dirname, 'lib')).forEach(function (f) { + var entry = join(__dirname, 'lib', f) + + // lib/group-name/operation.js -> client.groupName.operation + var stat = fs.statSync(entry) + if (stat.isDirectory()) { + var groupName = f.replace(/-([a-z])/, dashToCamel) + fs.readdirSync(entry).forEach(function (f) { + if (!f.match(/\.js$/)) return + + if (!client[groupName]) { + // keep client.groupName.operation from stomping client.operation + client[groupName] = Object.create(client) + } + var name = f.replace(/\.js$/, '').replace(/-([a-z])/, dashToCamel) + client[groupName][name] = require(join(entry, f)) + }) + return + } + + if (!f.match(/\.js$/)) return + var name = f.replace(/\.js$/, '').replace(/-([a-z])/, dashToCamel) + client[name] = require(entry) + }) +} + +function dashToCamel (_, l) { + return l.toUpperCase() +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/package.json new file mode 100644 index 00000000..b4fbdffb --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-registry-client/package.json @@ -0,0 +1,85 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "npm-registry-client", + "description": "Client for the npm registry", + "version": "7.1.0", + "repository": { + "url": "git+https://github.com/npm/npm-registry-client.git" + }, + "main": "index.js", + "scripts": { + "test": "standard && tap test/*.js" + }, + "dependencies": { + "chownr": "^1.0.1", + "concat-stream": "^1.4.6", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "normalize-package-data": "~1.0.1 || ^2.0.0", + "npm-package-arg": "^3.0.0 || ^4.0.0", + "once": "^1.3.0", + "request": "^2.47.0", + "retry": "^0.8.0", + "rimraf": "2", + "semver": "2 >=2.2.1 || 3.x || 4 || 5", + "slide": "^1.1.3", + "npmlog": "~2.0.0" + }, + "devDependencies": { + "negotiator": "^0.4.9", + "nock": "^0.56.0", + "readable-stream": "^2.0.2", + "standard": "^4.0.0", + "tap": "^1.2.0" + }, + "optionalDependencies": { + "npmlog": "~2.0.0" + }, + "license": "ISC", + "gitHead": "d077cb652152a8c265369d9d169cba8a52239fb4", + "bugs": { + "url": "https://github.com/npm/npm-registry-client/issues" + }, + "homepage": "https://github.com/npm/npm-registry-client#readme", + "_id": "npm-registry-client@7.1.0", + "_shasum": "e3be14ab279fe5123e15ab5c8a650445415664a5", + "_from": "npm-registry-client@7.1.0", + "_npmVersion": "3.7.5", + "_nodeVersion": "5.4.0", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "e3be14ab279fe5123e15ab5c8a650445415664a5", + "tarball": "http://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "_npmOperationalInternal": { + "host": "packages-5-east.internal.npmjs.com", + "tmp": "tmp/npm-registry-client-7.1.0.tgz_1456435497334_0.35472381697036326" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.0.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/.npmignore new file mode 100644 index 00000000..849e0ca4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/.travis.yml new file mode 100644 index 00000000..1d8a1a65 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/LICENSE new file mode 100644 index 00000000..a8b7a939 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Robert Kowalski +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/README.md new file mode 100644 index 00000000..e0a22c6a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/README.md @@ -0,0 +1,6 @@ +[![Build Status](https://travis-ci.org/npm/npm-user-validate.png?branch=master)](https://travis-ci.org/npm/npm-user-validate) +[![devDependency Status](https://david-dm.org/npm/npm-user-validate/dev-status.png)](https://david-dm.org/npm/npm-user-validate#info=devDependencies) + +# npm-user-validate + +Validation for the npm client and npm-www (and probably other npm projects) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/npm-user-validate.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/npm-user-validate.js new file mode 100644 index 00000000..51eaa6fa --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/npm-user-validate.js @@ -0,0 +1,43 @@ +exports.email = email +exports.pw = pw +exports.username = username + +var requirements = exports.requirements = { + username: { + lowerCase: 'Username must be lowercase', + urlSafe: 'Username may not contain non-url-safe chars', + dot: 'Username may not start with "."' + }, + password: {}, + email: { + valid: 'Email must be an email address' + } +}; + +function username (un) { + if (un !== un.toLowerCase()) { + return new Error(requirements.username.lowerCase) + } + + if (un !== encodeURIComponent(un)) { + return new Error(requirements.username.urlSafe) + } + + if (un.charAt(0) === '.') { + return new Error(requirements.username.dot) + } + + return null +} + +function email (em) { + if (!em.match(/^.+@.+\..+$/)) { + return new Error(requirements.email.valid) + } + + return null +} + +function pw (pw) { + return null +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/package.json new file mode 100644 index 00000000..7a33cc2e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npm-user-validate/package.json @@ -0,0 +1,56 @@ +{ + "name": "npm-user-validate", + "version": "0.1.2", + "description": "User validations for npm", + "main": "npm-user-validate.js", + "devDependencies": { + "tap": "0.4.3" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/npm/npm-user-validate.git" + }, + "keywords": [ + "npm", + "validation", + "registry" + ], + "author": { + "name": "Robert Kowalski", + "email": "rok@kowalski.gd" + }, + "license": "BSD-2-Clause", + "gitHead": "e5b280babff5b73fe74b496461bcf424a51881e1", + "bugs": { + "url": "https://github.com/npm/npm-user-validate/issues" + }, + "homepage": "https://github.com/npm/npm-user-validate#readme", + "_id": "npm-user-validate@0.1.2", + "_shasum": "d585da0b47c9f41a9e6ca684b6fd84ba41ebe87d", + "_from": "npm-user-validate@>=0.1.1 <0.2.0", + "_npmVersion": "2.10.0", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "d585da0b47c9f41a9e6ca684b6fd84ba41ebe87d", + "tarball": "http://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.2.tgz" + }, + "maintainers": [ + { + "name": "robertkowalski", + "email": "rok@kowalski.gd" + }, + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.2.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/.travis.yml new file mode 100644 index 00000000..826f576f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/.travis.yml @@ -0,0 +1,14 @@ +language: node_js +sudo: false +node_js: + - "5" + - "4" + - iojs + - "0.12" + - "0.10" + - "0.8" +before_install: + - "npm install -g npm" +script: "npm test" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/README.md new file mode 100644 index 00000000..34dae50f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/README.md @@ -0,0 +1,195 @@ +# npmlog + +The logger util that npm uses. + +This logger is very basic. It does the logging for npm. It supports +custom levels and colored output. + +By default, logs are written to stderr. If you want to send log messages +to outputs other than streams, then you can change the `log.stream` +member, or you can just listen to the events that it emits, and do +whatever you want with them. + +# Basic Usage + +``` +var log = require('npmlog') + +// additional stuff ---------------------------+ +// message ----------+ | +// prefix ----+ | | +// level -+ | | | +// v v v v + log.info('fyi', 'I have a kitty cat: %j', myKittyCat) +``` + +## log.level + +* {String} + +The level to display logs at. Any logs at or above this level will be +displayed. The special level `silent` will prevent anything from being +displayed ever. + +## log.record + +* {Array} + +An array of all the log messages that have been entered. + +## log.maxRecordSize + +* {Number} + +The maximum number of records to keep. If log.record gets bigger than +10% over this value, then it is sliced down to 90% of this value. + +The reason for the 10% window is so that it doesn't have to resize a +large array on every log entry. + +## log.prefixStyle + +* {Object} + +A style object that specifies how prefixes are styled. (See below) + +## log.headingStyle + +* {Object} + +A style object that specifies how the heading is styled. (See below) + +## log.heading + +* {String} Default: "" + +If set, a heading that is printed at the start of every line. + +## log.stream + +* {Stream} Default: `process.stderr` + +The stream where output is written. + +## log.enableColor() + +Force colors to be used on all messages, regardless of the output +stream. + +## log.disableColor() + +Disable colors on all messages. + +## log.enableProgress() + +Enable the display of log activity spinner and progress bar + +## log.disableProgress() + +Disable the display of a progress bar + +## log.enableUnicode() + +Force the unicode theme to be used for the progress bar. + +## log.disableUnicode() + +Disable the use of unicode in the progress bar. + +## log.setGaugeTemplate(template) + +Overrides the default gauge template. + +## log.pause() + +Stop emitting messages to the stream, but do not drop them. + +## log.resume() + +Emit all buffered messages that were written while paused. + +## log.log(level, prefix, message, ...) + +* `level` {String} The level to emit the message at +* `prefix` {String} A string prefix. Set to "" to skip. +* `message...` Arguments to `util.format` + +Emit a log message at the specified level. + +## log\[level](prefix, message, ...) + +For example, + +* log.silly(prefix, message, ...) +* log.verbose(prefix, message, ...) +* log.info(prefix, message, ...) +* log.http(prefix, message, ...) +* log.warn(prefix, message, ...) +* log.error(prefix, message, ...) + +Like `log.log(level, prefix, message, ...)`. In this way, each level is +given a shorthand, so you can do `log.info(prefix, message)`. + +## log.addLevel(level, n, style, disp) + +* `level` {String} Level indicator +* `n` {Number} The numeric level +* `style` {Object} Object with fg, bg, inverse, etc. +* `disp` {String} Optional replacement for `level` in the output. + +Sets up a new level with a shorthand function and so forth. + +Note that if the number is `Infinity`, then setting the level to that +will cause all log messages to be suppressed. If the number is +`-Infinity`, then the only way to show it is to enable all log messages. + +## log.newItem(name, todo, weight) + +* `name` {String} Optional; progress item name. +* `todo` {Number} Optional; total amount of work to be done. Default 0. +* `weight` {Number} Optional; the weight of this item relative to others. Default 1. + +This adds a new `are-we-there-yet` item tracker to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `Tracker` object. + +## log.newStream(name, todo, weight) + +This adds a new `are-we-there-yet` stream tracker to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `TrackerStream` object. + +## log.newGroup(name, weight) + +This adds a new `are-we-there-yet` tracker group to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `TrackerGroup` object. + +# Events + +Events are all emitted with the message object. + +* `log` Emitted for all messages +* `log.` Emitted for all messages with the `` level. +* `` Messages with prefixes also emit their prefix as an event. + +# Style Objects + +Style objects can have the following fields: + +* `fg` {String} Color for the foreground text +* `bg` {String} Color for the background +* `bold`, `inverse`, `underline` {Boolean} Set the associated property +* `bell` {Boolean} Make a noise (This is pretty annoying, probably.) + +# Message Objects + +Every log event is emitted with a message object, and the `log.record` +list contains all of them that have been created. They have the +following fields: + +* `id` {Number} +* `level` {String} +* `prefix` {String} +* `message` {String} Result of `util.format()` +* `messageRaw` {Array} Arguments to `util.format()` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/example.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/example.js new file mode 100644 index 00000000..5e89f53c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/example.js @@ -0,0 +1,39 @@ +var log = require('./log.js') + +log.heading = 'npm' + +console.error('log.level=silly') +log.level = 'silly' +log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) +log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) +log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) +log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) +log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) +log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) +log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) + +console.error('log.level=silent') +log.level = 'silent' +log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) +log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) +log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) +log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) +log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) +log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) +log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) + +console.error('log.level=info') +log.level = 'info' +log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) +log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) +log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) +log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) +log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) +log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) +log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) +log.error('404', 'This is a longer\n'+ + 'message, with some details\n'+ + 'and maybe a stack.\n'+ + new Error('a 404 error').stack) +log.addLevel('noise', 10000, {beep: true}) +log.noise(false, 'LOUD NOISES') diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/log.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/log.js new file mode 100644 index 00000000..6745238c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/log.js @@ -0,0 +1,250 @@ +'use strict' +var Progress = require('are-we-there-yet') +var Gauge = require('gauge') +var EE = require('events').EventEmitter +var log = exports = module.exports = new EE +var util = require('util') + +var ansi = require('ansi') +log.cursor = ansi(process.stderr) +log.stream = process.stderr + +// by default, let ansi decide based on tty-ness. +var colorEnabled = undefined +log.enableColor = function () { + colorEnabled = true + this.cursor.enabled = true +} +log.disableColor = function () { + colorEnabled = false + this.cursor.enabled = false +} + +// default level +log.level = 'info' + +log.gauge = new Gauge(log.cursor) +log.tracker = new Progress.TrackerGroup() + +// no progress bars unless asked +log.progressEnabled = false + +var gaugeTheme = undefined + +log.enableUnicode = function () { + gaugeTheme = Gauge.unicode + log.gauge.setTheme(gaugeTheme) +} + +log.disableUnicode = function () { + gaugeTheme = Gauge.ascii + log.gauge.setTheme(gaugeTheme) +} + +var gaugeTemplate = undefined +log.setGaugeTemplate = function (template) { + gaugeTemplate = template + log.gauge.setTemplate(gaugeTemplate) +} + +log.enableProgress = function () { + if (this.progressEnabled) return + this.progressEnabled = true + if (this._pause) return + this.tracker.on('change', this.showProgress) + this.gauge.enable() + this.showProgress() +} + +log.disableProgress = function () { + if (!this.progressEnabled) return + this.clearProgress() + this.progressEnabled = false + this.tracker.removeListener('change', this.showProgress) + this.gauge.disable() +} + +var trackerConstructors = ['newGroup', 'newItem', 'newStream'] + +var mixinLog = function (tracker) { + // mixin the public methods from log into the tracker + // (except: conflicts and one's we handle specially) + Object.keys(log).forEach(function (P) { + if (P[0] === '_') return + if (trackerConstructors.filter(function (C) { return C === P }).length) return + if (tracker[P]) return + if (typeof log[P] !== 'function') return + var func = log[P] + tracker[P] = function () { + return func.apply(log, arguments) + } + }) + // if the new tracker is a group, make sure any subtrackers get + // mixed in too + if (tracker instanceof Progress.TrackerGroup) { + trackerConstructors.forEach(function (C) { + var func = tracker[C] + tracker[C] = function () { return mixinLog(func.apply(tracker, arguments)) } + }) + } + return tracker +} + +// Add tracker constructors to the top level log object +trackerConstructors.forEach(function (C) { + log[C] = function () { return mixinLog(this.tracker[C].apply(this.tracker, arguments)) } +}) + +log.clearProgress = function () { + if (!this.progressEnabled) return + this.gauge.hide() +} + +log.showProgress = function (name) { + if (!this.progressEnabled) return + this.gauge.show(name, this.tracker.completed()) +}.bind(log) // bind for use in tracker's on-change listener + +// temporarily stop emitting, but don't drop +log.pause = function () { + this._paused = true +} + +log.resume = function () { + if (!this._paused) return + this._paused = false + + var b = this._buffer + this._buffer = [] + b.forEach(function (m) { + this.emitLog(m) + }, this) + if (this.progressEnabled) this.enableProgress() +} + +log._buffer = [] + +var id = 0 +log.record = [] +log.maxRecordSize = 10000 +log.log = function (lvl, prefix, message) { + var l = this.levels[lvl] + if (l === undefined) { + return this.emit('error', new Error(util.format( + 'Undefined log level: %j', lvl))) + } + + var a = new Array(arguments.length - 2) + var stack = null + for (var i = 2; i < arguments.length; i ++) { + var arg = a[i-2] = arguments[i] + + // resolve stack traces to a plain string. + if (typeof arg === 'object' && arg && + (arg instanceof Error) && arg.stack) { + arg.stack = stack = arg.stack + '' + } + } + if (stack) a.unshift(stack + '\n') + message = util.format.apply(util, a) + + var m = { id: id++, + level: lvl, + prefix: String(prefix || ''), + message: message, + messageRaw: a } + + this.emit('log', m) + this.emit('log.' + lvl, m) + if (m.prefix) this.emit(m.prefix, m) + + this.record.push(m) + var mrs = this.maxRecordSize + var n = this.record.length - mrs + if (n > mrs / 10) { + var newSize = Math.floor(mrs * 0.9) + this.record = this.record.slice(-1 * newSize) + } + + this.emitLog(m) +}.bind(log) + +log.emitLog = function (m) { + if (this._paused) { + this._buffer.push(m) + return + } + if (this.progressEnabled) this.gauge.pulse(m.prefix) + var l = this.levels[m.level] + if (l === undefined) return + if (l < this.levels[this.level]) return + if (l > 0 && !isFinite(l)) return + + var style = log.style[m.level] + var disp = log.disp[m.level] || m.level + this.clearProgress() + m.message.split(/\r?\n/).forEach(function (line) { + if (this.heading) { + this.write(this.heading, this.headingStyle) + this.write(' ') + } + this.write(disp, log.style[m.level]) + var p = m.prefix || '' + if (p) this.write(' ') + this.write(p, this.prefixStyle) + this.write(' ' + line + '\n') + }, this) + this.showProgress() +} + +log.write = function (msg, style) { + if (!this.cursor) return + if (this.stream !== this.cursor.stream) { + this.cursor = ansi(this.stream, { enabled: colorEnabled }) + var options = {} + if (gaugeTheme != null) options.theme = gaugeTheme + if (gaugeTemplate != null) options.template = gaugeTemplate + this.gauge = new Gauge(options, this.cursor) + } + + style = style || {} + if (style.fg) this.cursor.fg[style.fg]() + if (style.bg) this.cursor.bg[style.bg]() + if (style.bold) this.cursor.bold() + if (style.underline) this.cursor.underline() + if (style.inverse) this.cursor.inverse() + if (style.beep) this.cursor.beep() + this.cursor.write(msg).reset() +} + +log.addLevel = function (lvl, n, style, disp) { + if (!disp) disp = lvl + this.levels[lvl] = n + this.style[lvl] = style + if (!this[lvl]) this[lvl] = function () { + var a = new Array(arguments.length + 1) + a[0] = lvl + for (var i = 0; i < arguments.length; i ++) { + a[i + 1] = arguments[i] + } + return this.log.apply(this, a) + }.bind(this) + this.disp[lvl] = disp +} + +log.prefixStyle = { fg: 'magenta' } +log.headingStyle = { fg: 'white', bg: 'black' } + +log.style = {} +log.levels = {} +log.disp = {} +log.addLevel('silly', -Infinity, { inverse: true }, 'sill') +log.addLevel('verbose', 1000, { fg: 'blue', bg: 'black' }, 'verb') +log.addLevel('info', 2000, { fg: 'green' }) +log.addLevel('http', 3000, { fg: 'green', bg: 'black' }) +log.addLevel('warn', 4000, { fg: 'black', bg: 'yellow' }, 'WARN') +log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!') +log.addLevel('silent', Infinity) + +// allow 'error' prefix +log.on('error', function(){}) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/package.json new file mode 100644 index 00000000..464fe178 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/npmlog/package.json @@ -0,0 +1,61 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "npmlog", + "description": "logger for npm", + "version": "2.0.2", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/npmlog.git" + }, + "main": "log.js", + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "ansi": "~0.3.1", + "are-we-there-yet": "~1.0.6", + "gauge": "~1.2.5" + }, + "devDependencies": { + "tap": "~5.1.2" + }, + "license": "ISC", + "gitHead": "79dc582bf1ce4d2010454d89738a0a4dbd113be9", + "bugs": { + "url": "https://github.com/npm/npmlog/issues" + }, + "homepage": "https://github.com/npm/npmlog#readme", + "_id": "npmlog@2.0.2", + "_shasum": "d0470238b9697b7c3c4d16bdea65a00b12a464ab", + "_from": "npmlog@2.0.2", + "_npmVersion": "3.6.0", + "_nodeVersion": "5.4.0", + "_npmUser": { + "name": "iarna", + "email": "me@re-becca.org" + }, + "dist": { + "shasum": "d0470238b9697b7c3c4d16bdea65a00b12a464ab", + "tarball": "http://registry.npmjs.org/npmlog/-/npmlog-2.0.2.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.2.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/once/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/once/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/once/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/once/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/once/README.md new file mode 100644 index 00000000..e1cfd25c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/once/README.md @@ -0,0 +1,51 @@ +# once + +Only call a function once. + +## usage + +```javascript +var once = require('once') + +function load (file, cb) { + cb = once(cb) + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Or add to the Function.prototype in a responsible way: + +```javascript +// only has to be done once +require('once').proto() + +function load (file, cb) { + cb = cb.once() + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Ironically, the prototype feature makes this module twice as +complicated as necessary. + +To check whether you function has been called, use `fn.called`. Once the +function is called for the first time the return value of the original +function is saved in `fn.value` and subsequent calls will continue to +return this value. + +```javascript +var once = require('once') + +function load (cb) { + cb = once(cb) + var stream = createStream() + stream.once('data', cb) + stream.once('end', function () { + if (!cb.called) cb(new Error('not found')) + }) +} +``` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/once/once.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/once/once.js new file mode 100644 index 00000000..ab3ca888 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/once/once.js @@ -0,0 +1,21 @@ +var wrappy = require('wrappy') +module.exports = wrappy(once) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/once/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/once/package.json new file mode 100644 index 00000000..0f941917 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/once/package.json @@ -0,0 +1,47 @@ +{ + "name": "once", + "version": "1.3.3", + "description": "Run a function exactly one time", + "main": "once.js", + "directories": { + "test": "test" + }, + "dependencies": { + "wrappy": "1" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "files": [ + "once.js" + ], + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once.git" + }, + "keywords": [ + "once", + "function", + "one", + "single" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/once/issues" + }, + "homepage": "https://github.com/isaacs/once#readme", + "_id": "once@1.3.3", + "_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20", + "_resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "_from": "once@>=1.3.3 <1.4.0" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/LICENSE.txt b/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/LICENSE.txt new file mode 100644 index 00000000..3b43e3d9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright © 2012–2015 Domenic Denicola + +This work is free. You can redistribute it and/or modify it under the +terms of the Do What The Fuck You Want To Public License, Version 2, +as published by Sam Hocevar. See below for more details. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/README.md new file mode 100644 index 00000000..ef0d98d7 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/README.md @@ -0,0 +1,57 @@ +# It Opens Stuff + +That is, in your desktop environment. This will make *actual windows pop up*, with stuff in them: + +```bash +npm install opener -g + +opener http://google.com +opener ./my-file.txt +opener firefox +opener npm run lint +``` + +Also if you want to use it programmatically you can do that too: + +```js +var opener = require("opener"); + +opener("http://google.com"); +opener("./my-file.txt"); +opener("firefox"); +opener("npm run lint"); +``` + +Plus, it returns the child process created, so you can do things like let your script exit while the window stays open: + +```js +var editor = opener("documentation.odt"); +editor.unref(); +// These other unrefs may be necessary if your OS's opener process +// exits before the process it started is complete. +editor.stdin.unref(); +editor.stdout.unref(); +editor.stderr.unref(); +``` + + +## Use It for Good + +Like opening the user's browser with a test harness in your package's test script: + +```json +{ + "scripts": { + "test": "opener ./test/runner.html" + }, + "devDependencies": { + "opener": "*" + } +} +``` + +## Why + +Because Windows has `start`, Macs have `open`, and *nix has `xdg-open`. At least +[according to some guy on StackOverflow](http://stackoverflow.com/q/1480971/3191). And I like things that work on all +three. Like Node.js. And Opener. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/opener.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/opener.js new file mode 100644 index 00000000..60c8810f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/opener.js @@ -0,0 +1,60 @@ +#!/usr/bin/env node + +"use strict"; + +var childProcess = require("child_process"); + +function opener(args, options, callback) { + // http://stackoverflow.com/q/1480971/3191, but see below for Windows. + var command = process.platform === "win32" ? "cmd" : + process.platform === "darwin" ? "open" : + "xdg-open"; + + if (typeof args === "string") { + args = [args]; + } + + if (typeof options === "function") { + callback = options; + options = {}; + } + + if (options && typeof options === "object" && options.command) { + if (process.platform === "win32") { + // *always* use cmd on windows + args = [options.command].concat(args); + } else { + command = options.command; + } + } + + if (process.platform === "win32") { + // On Windows, we really want to use the "start" command. But, the rules regarding arguments with spaces, and + // escaping them with quotes, can get really arcane. So the easiest way to deal with this is to pass off the + // responsibility to "cmd /c", which has that logic built in. + // + // Furthermore, if "cmd /c" double-quoted the first parameter, then "start" will interpret it as a window title, + // so we need to add a dummy empty-string window title: http://stackoverflow.com/a/154090/3191 + // + // Additionally, on Windows ampersand needs to be escaped when passed to "start" + args = args.map(function(value) { + return value.replace(/&/g, '^&'); + }); + args = ["/c", "start", '""'].concat(args); + } + + return childProcess.execFile(command, args, options, callback); +} + +// Export `opener` for programmatic access. +// You might use this to e.g. open a website: `opener("http://google.com")` +module.exports = opener; + +// If we're being called from the command line, just execute, using the command-line arguments. +if (require.main && require.main.id === module.id) { + opener(process.argv.slice(2), function (error) { + if (error) { + throw error; + } + }); +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/package.json new file mode 100644 index 00000000..09966ab2 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/opener/package.json @@ -0,0 +1,54 @@ +{ + "name": "opener", + "description": "Opens stuff, like webpages and files and executables, cross-platform", + "version": "1.4.1", + "author": { + "name": "Domenic Denicola", + "email": "d@domenic.me", + "url": "https://domenic.me/" + }, + "license": "WTFPL", + "repository": { + "type": "git", + "url": "https://github.com/domenic/opener" + }, + "main": "opener.js", + "bin": { + "opener": "opener.js" + }, + "files": [ + "opener.js" + ], + "scripts": { + "lint": "jshint opener.js" + }, + "devDependencies": { + "jshint": "^2.6.3" + }, + "gitHead": "d0ee95b19951703462fa593baa16e81fdff7827c", + "bugs": { + "url": "https://github.com/domenic/opener/issues" + }, + "homepage": "https://github.com/domenic/opener", + "_id": "opener@1.4.1", + "_shasum": "897590acd1aed3311b703b58bccb4d43f56f2895", + "_from": "opener@>=1.4.1 <1.5.0", + "_npmVersion": "2.7.0", + "_nodeVersion": "1.5.1", + "_npmUser": { + "name": "domenic", + "email": "d@domenic.me" + }, + "maintainers": [ + { + "name": "domenic", + "email": "domenic@domenicdenicola.com" + } + ], + "dist": { + "shasum": "897590acd1aed3311b703b58bccb4d43f56f2895", + "tarball": "http://registry.npmjs.org/opener/-/opener-1.4.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/opener/-/opener-1.4.1.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/.npmignore new file mode 100644 index 00000000..0b406a61 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/.travis.yml new file mode 100644 index 00000000..8c98c38b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/README.md new file mode 100644 index 00000000..be632e95 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/README.md @@ -0,0 +1,63 @@ +# osenv + +Look up environment settings specific to different operating systems. + +## Usage + +```javascript +var osenv = require('osenv') +var path = osenv.path() +var user = osenv.user() +// etc. + +// Some things are not reliably in the env, and have a fallback command: +var h = osenv.hostname(function (er, hostname) { + h = hostname +}) +// This will still cause it to be memoized, so calling osenv.hostname() +// is now an immediate operation. + +// You can always send a cb, which will get called in the nextTick +// if it's been memoized, or wait for the fallback data if it wasn't +// found in the environment. +osenv.hostname(function (er, hostname) { + if (er) console.error('error looking up hostname') + else console.log('this machine calls itself %s', hostname) +}) +``` + +## osenv.hostname() + +The machine name. Calls `hostname` if not found. + +## osenv.user() + +The currently logged-in user. Calls `whoami` if not found. + +## osenv.prompt() + +Either PS1 on unix, or PROMPT on Windows. + +## osenv.tmpdir() + +The place where temporary files should be created. + +## osenv.home() + +No place like it. + +## osenv.path() + +An array of the places that the operating system will search for +executables. + +## osenv.editor() + +Return the executable name of the editor program. This uses the EDITOR +and VISUAL environment variables, and falls back to `vi` on Unix, or +`notepad.exe` on Windows. + +## osenv.shell() + +The SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash' +or 'cmd'. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/osenv.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/osenv.js new file mode 100644 index 00000000..cfdb8290 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/osenv.js @@ -0,0 +1,72 @@ +var isWindows = process.platform === 'win32' +var path = require('path') +var exec = require('child_process').exec +var osTmpdir = require('os-tmpdir') +var osHomedir = require('os-homedir') + +// looking up envs is a bit costly. +// Also, sometimes we want to have a fallback +// Pass in a callback to wait for the fallback on failures +// After the first lookup, always returns the same thing. +function memo (key, lookup, fallback) { + var fell = false + var falling = false + exports[key] = function (cb) { + var val = lookup() + if (!val && !fell && !falling && fallback) { + fell = true + falling = true + exec(fallback, function (er, output, stderr) { + falling = false + if (er) return // oh well, we tried + val = output.trim() + }) + } + exports[key] = function (cb) { + if (cb) process.nextTick(cb.bind(null, null, val)) + return val + } + if (cb && !falling) process.nextTick(cb.bind(null, null, val)) + return val + } +} + +memo('user', function () { + return ( isWindows + ? process.env.USERDOMAIN + '\\' + process.env.USERNAME + : process.env.USER + ) +}, 'whoami') + +memo('prompt', function () { + return isWindows ? process.env.PROMPT : process.env.PS1 +}) + +memo('hostname', function () { + return isWindows ? process.env.COMPUTERNAME : process.env.HOSTNAME +}, 'hostname') + +memo('tmpdir', function () { + return osTmpdir() +}) + +memo('home', function () { + return osHomedir() +}) + +memo('path', function () { + return (process.env.PATH || + process.env.Path || + process.env.path).split(isWindows ? ';' : ':') +}) + +memo('editor', function () { + return process.env.EDITOR || + process.env.VISUAL || + (isWindows ? 'notepad.exe' : 'vi') +}) + +memo('shell', function () { + return isWindows ? process.env.ComSpec || 'cmd' + : process.env.SHELL || 'bash' +}) diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/package.json new file mode 100644 index 00000000..d9e62c76 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/package.json @@ -0,0 +1,75 @@ +{ + "name": "osenv", + "version": "0.1.3", + "main": "osenv.js", + "directories": { + "test": "test" + }, + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/osenv.git" + }, + "keywords": [ + "environment", + "variable", + "home", + "tmpdir", + "path", + "prompt", + "ps1" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "description": "Look up environment settings specific to different operating systems", + "gitHead": "f746b3405d8f9e28054d11b97e1436f6a15016c4", + "bugs": { + "url": "https://github.com/npm/osenv/issues" + }, + "homepage": "https://github.com/npm/osenv#readme", + "_id": "osenv@0.1.3", + "_shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217", + "_from": "osenv@0.1.3", + "_npmVersion": "3.0.0", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217", + "tarball": "http://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "robertkowalski", + "email": "rok@kowalski.gd" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/x.tap b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/x.tap new file mode 100644 index 00000000..9e0ff41b --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/osenv/x.tap @@ -0,0 +1,39 @@ +TAP version 13 + # Subtest: test/unix.js + TAP version 13 + # Subtest: basic unix sanity test + ok 1 - should be equal + ok 2 - should be equal + ok 3 - should be equal + ok 4 - should be equivalent + ok 5 - should be equal + ok 6 - should be equal + ok 7 - should be equal + ok 8 - should be equal + ok 9 - should be equal + ok 10 - should be equal + ok 11 - should be equal + ok 12 - should be equal + ok 13 - should be equal + ok 14 - should be equal + 1..14 + ok 1 - basic unix sanity test # time=10.712ms + + 1..1 + # time=18.422ms +ok 1 - test/unix.js # time=169.827ms + + # Subtest: test/windows.js + TAP version 13 + 1..0 # Skip windows tests, this is not windows + +ok 2 - test/windows.js # SKIP Skip windows tests, this is not windows + + # Subtest: test/nada.js + TAP version 13 + 1..0 + +ok 2 - test/nada.js + +1..3 +# time=274.247ms diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/path-is-inside/LICENSE.txt b/bin/nodejs0.12.16/node_modules/npm/node_modules/path-is-inside/LICENSE.txt new file mode 100644 index 00000000..7276fc4f --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/path-is-inside/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright © 2013–2014 Domenic Denicola + +This work is free. You can redistribute it and/or modify it under the +terms of the Do What The Fuck You Want To Public License, Version 2, +as published by Sam Hocevar. See below for more details. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/path-is-inside/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/path-is-inside/README.md new file mode 100644 index 00000000..2a195330 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/path-is-inside/README.md @@ -0,0 +1,35 @@ +# Is This Path Inside This Other Path? + +It turns out this question isn't trivial to answer using Node's built-in path APIs. A naive `indexOf`-based solution will fail sometimes on Windows, which is case-insensitive (see e.g. [isaacs/npm#4214][]). You might then think to be clever with `path.resolve`, but you have to be careful to account for situations whether the paths have different drive letters, or else you'll cause bugs like [isaacs/npm#4313][]. And let's not even get started on trailing slashes. + +The **path-is-inside** package will give you a robust, cross-platform way of detecting whether a given path is inside another path. + +## Usage + +Pretty simple. First the path being tested; then the potential parent. Like so: + +```js +var pathIsInside = require("path-is-inside"); + +pathIsInside("/x/y/z", "/x/y") // true +pathIsInside("/x/y", "/x/y/z") // false +``` + +## OS-Specific Behavior + +Like Node's built-in path module, path-is-inside treats all file paths on Windows as case-insensitive, whereas it treats all file paths on *-nix operating systems as case-sensitive. Keep this in mind especially when working on a Mac, where, despite Node's defaults, the OS usually treats paths case-insensitively. + +In practice, this means: + +```js +// On Windows + +pathIsInside("C:\\X\\Y\\Z", "C:\\x\\y") // true + +// On *-nix, including Mac OS X + +pathIsInside("/X/Y/Z", "/x/y") // false +``` + +[isaacs/npm#4214]: https://github.com/isaacs/npm/pull/4214 +[isaacs/npm#4313]: https://github.com/isaacs/npm/issues/4313 diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/path-is-inside/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/path-is-inside/package.json new file mode 100644 index 00000000..6a7116de --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/path-is-inside/package.json @@ -0,0 +1,43 @@ +{ + "name": "path-is-inside", + "description": "Tests whether one path is inside another path", + "keywords": [ + "path", + "directory", + "folder", + "inside", + "relative" + ], + "version": "1.0.1", + "author": { + "name": "Domenic Denicola", + "email": "domenic@domenicdenicola.com", + "url": "http://domenic.me" + }, + "license": "WTFPL", + "repository": { + "type": "git", + "url": "git://github.com/domenic/path-is-inside.git" + }, + "bugs": { + "url": "http://github.com/domenic/path-is-inside/issues" + }, + "main": "lib/path-is-inside.js", + "scripts": { + "test": "mocha", + "lint": "jshint lib" + }, + "devDependencies": { + "jshint": "~2.3.0", + "mocha": "~1.15.1" + }, + "readme": "# Is This Path Inside This Other Path?\n\nIt turns out this question isn't trivial to answer using Node's built-in path APIs. A naive `indexOf`-based solution will fail sometimes on Windows, which is case-insensitive (see e.g. [isaacs/npm#4214][]). You might then think to be clever with `path.resolve`, but you have to be careful to account for situations whether the paths have different drive letters, or else you'll cause bugs like [isaacs/npm#4313][]. And let's not even get started on trailing slashes.\n\nThe **path-is-inside** package will give you a robust, cross-platform way of detecting whether a given path is inside another path.\n\n## Usage\n\nPretty simple. First the path being tested; then the potential parent. Like so:\n\n```js\nvar pathIsInside = require(\"path-is-inside\");\n\npathIsInside(\"/x/y/z\", \"/x/y\") // true\npathIsInside(\"/x/y\", \"/x/y/z\") // false\n```\n\n## OS-Specific Behavior\n\nLike Node's built-in path module, path-is-inside treats all file paths on Windows as case-insensitive, whereas it treats all file paths on *-nix operating systems as case-sensitive. Keep this in mind especially when working on a Mac, where, despite Node's defaults, the OS usually treats paths case-insensitively.\n\nIn practice, this means:\n\n```js\n// On Windows\n\npathIsInside(\"C:\\\\X\\\\Y\\\\Z\", \"C:\\\\x\\\\y\") // true\n\n// On *-nix, including Mac OS X\n\npathIsInside(\"/X/Y/Z\", \"/x/y\") // false\n```\n\n[isaacs/npm#4214]: https://github.com/isaacs/npm/pull/4214\n[isaacs/npm#4313]: https://github.com/isaacs/npm/issues/4313\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/domenic/path-is-inside", + "_id": "path-is-inside@1.0.1", + "dist": { + "shasum": "c5e6c4764c4cd41f2ac839c53be5621d085726b3" + }, + "_from": "path-is-inside@1.0.1", + "_resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/.npmignore new file mode 100644 index 00000000..0b406a61 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/.travis.yml b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/.travis.yml new file mode 100644 index 00000000..a7cefba0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +before_install: + - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28' + - npm install -g npm@latest +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/LICENSE new file mode 100644 index 00000000..1d68a100 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/README.md new file mode 100644 index 00000000..ded3901c --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/README.md @@ -0,0 +1,27 @@ +# read-installed + +Read all the installed packages in a folder, and return a tree +structure with all the data. + +npm uses this. + +## 2.0.0 + +Breaking changes in `2.0.0`: + +The second argument is now an `Object` that contains the following keys: + + * `depth` optional, defaults to Infinity + * `log` optional log Function + * `dev` optional, default false, set to true to include devDependencies + +## Usage + +```javascript +var readInstalled = require("read-installed") +// optional options +var options = { dev: false, log: fn, depth: 2 } +readInstalled(folder, options, function (er, data) { + ... +}) +``` diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/package.json new file mode 100644 index 00000000..95f627b9 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/package.json @@ -0,0 +1,46 @@ +{ + "name": "read-installed", + "description": "Read all the installed packages in a folder, and return a tree structure with all the data.", + "version": "4.0.3", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/read-installed.git" + }, + "main": "read-installed.js", + "scripts": { + "test": "tap ./test/*.js" + }, + "dependencies": { + "debuglog": "^1.0.1", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1", + "graceful-fs": "^4.1.2" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.2" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^1.2.0" + }, + "readme": "# read-installed\n\nRead all the installed packages in a folder, and return a tree\nstructure with all the data.\n\nnpm uses this.\n\n## 2.0.0\n\nBreaking changes in `2.0.0`:\n\nThe second argument is now an `Object` that contains the following keys:\n\n * `depth` optional, defaults to Infinity\n * `log` optional log Function\n * `dev` optional, default false, set to true to include devDependencies\n\n## Usage\n\n```javascript\nvar readInstalled = require(\"read-installed\")\n// optional options\nvar options = { dev: false, log: fn, depth: 2 }\nreadInstalled(folder, options, function (er, data) {\n ...\n})\n```\n", + "readmeFilename": "README.md", + "gitHead": "da02df6acdb5f5ee31d8c637ef31fb50efb455c1", + "bugs": { + "url": "https://github.com/isaacs/read-installed/issues" + }, + "homepage": "https://github.com/isaacs/read-installed#readme", + "_id": "read-installed@4.0.3", + "_shasum": "ff9b8b67f187d1e4c29b9feb31f6b223acd19067", + "_from": "read-installed@4.0.3" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/read-installed.js b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/read-installed.js new file mode 100644 index 00000000..274902ac --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-installed/read-installed.js @@ -0,0 +1,407 @@ + +// Walk through the file-system "database" of installed +// packages, and create a data object related to the +// installed versions of each package. + +/* +This will traverse through all node_modules folders, +resolving the dependencies object to the object corresponding to +the package that meets that dep, or just the version/range if +unmet. + +Assuming that you had this folder structure: + +/path/to ++-- package.json { name = "root" } +`-- node_modules + +-- foo {bar, baz, asdf} + | +-- node_modules + | +-- bar { baz } + | `-- baz + `-- asdf + +where "foo" depends on bar, baz, and asdf, bar depends on baz, +and bar and baz are bundled with foo, whereas "asdf" is at +the higher level (sibling to foo), you'd get this object structure: + +{ +, path: "/path/to" +, parent: null +, dependencies: + { foo : + { version: "1.2.3" + , path: "/path/to/node_modules/foo" + , parent: + , dependencies: + { bar: + { parent: + , path: "/path/to/node_modules/foo/node_modules/bar" + , version: "2.3.4" + , dependencies: { baz: } + } + , baz: { ... } + , asdf: + } + } + , asdf: { ... } + } +} + +Unmet deps are left as strings. +Extraneous deps are marked with extraneous:true +deps that don't meet a requirement are marked with invalid:true +deps that don't meet a peer requirement are marked with peerInvalid:true + +to READ(packagefolder, parentobj, name, reqver) +obj = read package.json +installed = ./node_modules/* +if parentobj is null, and no package.json + obj = {dependencies:{:ANY}} +deps = Object.keys(obj.dependencies) +obj.path = packagefolder +obj.parent = parentobj +if name, && obj.name !== name, obj.invalid = true +if reqver, && obj.version !satisfies reqver, obj.invalid = true +if !reqver && parentobj, obj.extraneous = true +for each folder in installed + obj.dependencies[folder] = READ(packagefolder+node_modules+folder, + obj, folder, obj.dependencies[folder]) +# walk tree to find unmet deps +for each dep in obj.dependencies not in installed + r = obj.parent + while r + if r.dependencies[dep] + if r.dependencies[dep].verion !satisfies obj.dependencies[dep] + WARN + r.dependencies[dep].invalid = true + obj.dependencies[dep] = r.dependencies[dep] + r = null + else r = r.parent +return obj + + +TODO: +1. Find unmet deps in parent directories, searching as node does up +as far as the left-most node_modules folder. +2. Ignore anything in node_modules that isn't a package folder. + +*/ + +try { + var fs = require("graceful-fs") +} catch (er) { + var fs = require("fs") +} + +var path = require("path") +var asyncMap = require("slide").asyncMap +var semver = require("semver") +var readJson = require("read-package-json") +var url = require("url") +var util = require("util") +var extend = require("util-extend") + +var debug = require("debuglog")("read-installed") + +var readdir = require("readdir-scoped-modules") + +// Sentinel catch-all version constraint used when a dependency is not +// listed in the package.json file. +var ANY = {} + +module.exports = readInstalled + +function readInstalled (folder, opts, cb) { + if (typeof opts === 'function') { + cb = opts + opts = {} + } else { + opts = extend({}, opts) + } + + if (typeof opts.depth !== 'number') + opts.depth = Infinity + + opts.depth = Math.max(0, opts.depth) + + if (typeof opts.log !== 'function') + opts.log = function () {} + + opts.dev = !!opts.dev + opts.realpathSeen = {} + opts.findUnmetSeen = [] + + + readInstalled_(folder, null, null, null, 0, opts, function (er, obj) { + if (er) return cb(er) + // now obj has all the installed things, where they're installed + // figure out the inheritance links, now that the object is built. + resolveInheritance(obj, opts) + obj.root = true + unmarkExtraneous(obj, opts) + cb(null, obj) + }) +} + +function readInstalled_ (folder, parent, name, reqver, depth, opts, cb) { + var installed + , obj + , real + , link + , realpathSeen = opts.realpathSeen + + readdir(path.resolve(folder, "node_modules"), function (er, i) { + // error indicates that nothing is installed here + if (er) i = [] + installed = i.filter(function (f) { return f.charAt(0) !== "." }) + next() + }) + + readJson(path.resolve(folder, "package.json"), function (er, data) { + obj = copy(data) + + if (!parent) { + obj = obj || true + er = null + } + return next(er) + }) + + fs.lstat(folder, function (er, st) { + if (er) { + if (!parent) real = true + return next(er) + } + fs.realpath(folder, function (er, rp) { + debug("realpath(%j) = %j", folder, rp) + real = rp + if (st.isSymbolicLink()) link = rp + next(er) + }) + }) + + var errState = null + , called = false + function next (er) { + if (errState) return + if (er) { + errState = er + return cb(null, []) + } + debug('next', installed, obj && typeof obj, name, real) + if (!installed || !obj || !real || called) return + called = true + if (realpathSeen[real]) return cb(null, realpathSeen[real]) + if (obj === true) { + obj = {dependencies:{}, path:folder} + installed.forEach(function (i) { obj.dependencies[i] = ANY }) + } + if (name && obj.name !== name) obj.invalid = true + obj.realName = name || obj.name + obj.dependencies = obj.dependencies || {} + + // At this point, figure out what dependencies we NEED to get met + obj._dependencies = copy(obj.dependencies) + + if (reqver === ANY) { + // We were unable to determine the required version of this + // dependency from the package.json file, but we now know its actual + // version, so treat that version as the required version to avoid + // marking the dependency as invalid below. See #40. + reqver = obj.version; + } + + // "foo":"http://blah" and "foo":"latest" are always presumed valid + if (reqver + && semver.validRange(reqver, true) + && !semver.satisfies(obj.version, reqver, true)) { + obj.invalid = true + } + + // Mark as extraneous at this point. + // This will be un-marked in unmarkExtraneous, where we mark as + // not-extraneous everything that is required in some way from + // the root object. + obj.extraneous = true + + obj.path = obj.path || folder + obj.realPath = real + obj.link = link + if (parent && !obj.link) obj.parent = parent + realpathSeen[real] = obj + obj.depth = depth + //if (depth >= opts.depth) return cb(null, obj) + asyncMap(installed, function (pkg, cb) { + var rv = obj.dependencies[pkg] + if (!rv && obj.devDependencies && opts.dev) + rv = obj.devDependencies[pkg] + + if (depth > opts.depth) { + obj.dependencies = {} + return cb(null, obj) + } + + readInstalled_( path.resolve(folder, "node_modules/"+pkg) + , obj, pkg, obj.dependencies[pkg], depth + 1, opts + , cb ) + + }, function (er, installedData) { + if (er) return cb(er) + installedData.forEach(function (dep) { + obj.dependencies[dep.realName] = dep + }) + + // any strings here are unmet things. however, if it's + // optional, then that's fine, so just delete it. + if (obj.optionalDependencies) { + Object.keys(obj.optionalDependencies).forEach(function (dep) { + if (typeof obj.dependencies[dep] === "string") { + delete obj.dependencies[dep] + } + }) + } + return cb(null, obj) + }) + } +} + +// starting from a root object, call findUnmet on each layer of children +var riSeen = [] +function resolveInheritance (obj, opts) { + if (typeof obj !== "object") return + if (riSeen.indexOf(obj) !== -1) return + riSeen.push(obj) + if (typeof obj.dependencies !== "object") { + obj.dependencies = {} + } + Object.keys(obj.dependencies).forEach(function (dep) { + findUnmet(obj.dependencies[dep], opts) + }) + Object.keys(obj.dependencies).forEach(function (dep) { + if (typeof obj.dependencies[dep] === "object") { + resolveInheritance(obj.dependencies[dep], opts) + } else { + debug("unmet dep! %s %s@%s", obj.name, dep, obj.dependencies[dep]) + } + }) + findUnmet(obj, opts) +} + +// find unmet deps by walking up the tree object. +// No I/O +function findUnmet (obj, opts) { + var findUnmetSeen = opts.findUnmetSeen + if (findUnmetSeen.indexOf(obj) !== -1) return + findUnmetSeen.push(obj) + debug("find unmet parent=%s obj=", obj.parent && obj.parent.name, obj.name || obj) + var deps = obj.dependencies = obj.dependencies || {} + + debug(deps) + Object.keys(deps) + .filter(function (d) { return typeof deps[d] === "string" }) + .forEach(function (d) { + var found = findDep(obj, d) + debug("finding dep %j", d, found && found.name || found) + // "foo":"http://blah" and "foo":"latest" are always presumed valid + if (typeof deps[d] === "string" && + semver.validRange(deps[d], true) && + found && + !semver.satisfies(found.version, deps[d], true)) { + // the bad thing will happen + opts.log( "unmet dependency" + , obj.path + " requires "+d+"@'"+deps[d] + + "' but will load\n" + + found.path+",\nwhich is version "+found.version ) + found.invalid = true + } + if (found) { + deps[d] = found + } + }) + + var peerDeps = obj.peerDependencies = obj.peerDependencies || {} + Object.keys(peerDeps).forEach(function (d) { + var dependency + + if (!obj.parent) { + dependency = obj.dependencies[d] + + // read it as a missing dep + if (!dependency) { + obj.dependencies[d] = peerDeps[d] + } + } else { + var r = obj.parent + while (r && !dependency) { + dependency = r.dependencies && r.dependencies[d] + r = r.link ? null : r.parent + } + } + + if (!dependency) { + // mark as a missing dep! + obj.dependencies[d] = peerDeps[d] + } else if (!semver.satisfies(dependency.version, peerDeps[d], true)) { + dependency.peerInvalid = true + } + }) + + return obj +} + +function unmarkExtraneous (obj, opts) { + // Mark all non-required deps as extraneous. + // start from the root object and mark as non-extraneous all modules + // that haven't been previously flagged as extraneous then propagate + // to all their dependencies + + obj.extraneous = false + + var deps = obj._dependencies || [] + if (opts.dev && obj.devDependencies && (obj.root || obj.link)) { + Object.keys(obj.devDependencies).forEach(function (k) { + deps[k] = obj.devDependencies[k] + }) + } + + if (obj.peerDependencies) { + Object.keys(obj.peerDependencies).forEach(function (k) { + deps[k] = obj.peerDependencies[k] + }) + } + + debug("not extraneous", obj._id, deps) + Object.keys(deps).forEach(function (d) { + var dep = findDep(obj, d) + if (dep && dep.extraneous) { + unmarkExtraneous(dep, opts) + } + }) +} + +// Find the one that will actually be loaded by require() +// so we can make sure it's valid etc. +function findDep (obj, d) { + var r = obj + , found = null + while (r && !found) { + // if r is a valid choice, then use that. + // kinda weird if a pkg depends on itself, but after the first + // iteration of this loop, it indicates a dep cycle. + if (typeof r.dependencies[d] === "object") { + found = r.dependencies[d] + } + if (!found && r.realName === d) found = r + r = r.link ? null : r.parent + } + return found +} + +function copy (obj) { + if (!obj || typeof obj !== 'object') return obj + if (Array.isArray(obj)) return obj.map(copy) + + var o = {} + for (var i in obj) o[i] = copy(obj[i]) + return o +} diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/read-package-json/.npmignore b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-package-json/.npmignore new file mode 100644 index 00000000..0b406a61 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/read-package-json/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/read/LICENSE b/bin/nodejs0.12.16/node_modules/npm/node_modules/read/LICENSE new file mode 100644 index 00000000..32eb5170 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/read/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/read/README.md b/bin/nodejs0.12.16/node_modules/npm/node_modules/read/README.md new file mode 100644 index 00000000..5e074f55 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/read/README.md @@ -0,0 +1,53 @@ +## read + +For reading user input from stdin. + +Similar to the `readline` builtin's `question()` method, but with a +few more features. + +## USAGE + +```javascript +var read = require("read") +read(options, callback) +``` + +The callback gets called with either the user input, or the default +specified, or an error, as `callback(error, result, isDefault)` +node style. + +## OPTIONS + +Every option is optional. + +* `prompt` What to write to stdout before reading input. +* `silent` Don't echo the output as the user types it. +* `replace` Replace silenced characters with the supplied character value. +* `timeout` Number of ms to wait for user input before giving up. +* `default` The default value if the user enters nothing. +* `edit` Allow the user to edit the default value. +* `terminal` Treat the output as a TTY, whether it is or not. +* `input` Readable stream to get input data from. (default `process.stdin`) +* `output` Writeable stream to write prompts to. (default: `process.stdout`) + +If silent is true, and the input is a TTY, then read will set raw +mode, and read character by character. + +## COMPATIBILITY + +This module works sort of with node 0.6. It does not work with node +versions less than 0.6. It is best on node 0.8. + +On node version 0.6, it will remove all listeners on the input +stream's `data` and `keypress` events, because the readline module did +not fully clean up after itself in that version of node, and did not +make it possible to clean up after it in a way that has no potential +for side effects. + +Additionally, some of the readline options (like `terminal`) will not +function in versions of node before 0.8, because they were not +implemented in the builtin readline module. + +## CONTRIBUTING + +Patches welcome. diff --git a/bin/nodejs0.12.16/node_modules/npm/node_modules/read/package.json b/bin/nodejs0.12.16/node_modules/npm/node_modules/read/package.json new file mode 100644 index 00000000..23846d26 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/node_modules/read/package.json @@ -0,0 +1,57 @@ +{ + "name": "read", + "version": "1.0.7", + "main": "lib/read.js", + "dependencies": { + "mute-stream": "~0.0.4" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "engines": { + "node": ">=0.8" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "description": "read(1) for node programs", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/read.git" + }, + "license": "ISC", + "scripts": { + "test": "tap test/*.js" + }, + "files": [ + "lib/read.js" + ], + "gitHead": "b14516b9236c40140fd0666567f5d0c588a09a62", + "bugs": { + "url": "https://github.com/isaacs/read/issues" + }, + "homepage": "https://github.com/isaacs/read#readme", + "_id": "read@1.0.7", + "_shasum": "b3da19bd052431a97671d44a42634adf710b40c4", + "_from": "read@1.0.7", + "_npmVersion": "3.2.2", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "b3da19bd052431a97671d44a42634adf710b40c4", + "tarball": "http://registry.npmjs.org/read/-/read-1.0.7.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/npmrc b/bin/nodejs0.12.16/node_modules/npm/npmrc new file mode 100644 index 00000000..1bf2531d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/npmrc @@ -0,0 +1 @@ +prefix = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.12.16\ diff --git a/bin/nodejs0.12.16/node_modules/npm/npmrc.nrd b/bin/nodejs0.12.16/node_modules/npm/npmrc.nrd new file mode 100644 index 00000000..1bf2531d --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/npmrc.nrd @@ -0,0 +1 @@ +prefix = ~NEARD_WIN_PATH~\bin\nodejs\nodejs0.12.16\ diff --git a/bin/nodejs0.12.16/node_modules/npm/package.json b/bin/nodejs0.12.16/node_modules/npm/package.json new file mode 100644 index 00000000..9891dc90 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/package.json @@ -0,0 +1,196 @@ +{ + "version": "2.15.1", + "name": "npm", + "description": "a package manager for JavaScript", + "keywords": [ + "package manager", + "modules", + "install", + "package.json" + ], + "preferGlobal": true, + "config": { + "publishtest": false + }, + "homepage": "https://docs.npmjs.com/", + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "repository": { + "type": "git", + "url": "https://github.com/npm/npm" + }, + "bugs": { + "url": "http://github.com/npm/npm/issues" + }, + "directories": { + "doc": "./doc", + "man": "./man", + "lib": "./lib", + "bin": "./bin" + }, + "main": "./lib/npm.js", + "bin": "./bin/npm-cli.js", + "dependencies": { + "abbrev": "~1.0.7", + "ansi": "~0.3.1", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "archy": "~1.0.0", + "async-some": "~1.0.2", + "block-stream": "0.0.8", + "char-spinner": "~1.0.1", + "chmodr": "~1.0.2", + "chownr": "~1.0.1", + "cmd-shim": "~2.0.2", + "columnify": "~1.5.4", + "config-chain": "~1.1.10", + "dezalgo": "~1.0.3", + "editor": "~1.0.0", + "fs-vacuum": "~1.2.7", + "fs-write-stream-atomic": "~1.0.8", + "fstream": "~1.0.8", + "fstream-npm": "~1.0.7", + "github-url-from-git": "~1.4.0", + "github-url-from-username-repo": "~1.0.2", + "glob": "~7.0.3", + "graceful-fs": "~4.1.3", + "hosted-git-info": "~2.1.4", + "inflight": "~1.0.4", + "inherits": "~2.0.1", + "ini": "~1.3.4", + "init-package-json": "~1.9.3", + "lockfile": "~1.0.1", + "lru-cache": "~3.2.0", + "minimatch": "~3.0.0", + "mkdirp": "~0.5.1", + "node-gyp": "~3.3.1", + "nopt": "~3.0.6", + "normalize-git-url": "~3.0.1", + "normalize-package-data": "~2.3.5", + "npm-cache-filename": "~1.0.2", + "npm-install-checks": "~1.0.7", + "npm-package-arg": "~4.1.0", + "npm-registry-client": "~7.1.0", + "npm-user-validate": "~0.1.2", + "npmlog": "~2.0.2", + "once": "~1.3.3", + "opener": "~1.4.1", + "osenv": "~0.1.3", + "path-is-inside": "~1.0.0", + "read": "~1.0.7", + "read-installed": "~4.0.3", + "read-package-json": "~2.0.3", + "readable-stream": "~1.1.13", + "realize-package-specifier": "~3.0.1", + "request": "~2.69.0", + "retry": "~0.9.0", + "rimraf": "~2.5.2", + "semver": "~5.1.0", + "sha": "~2.0.1", + "slide": "~1.1.6", + "sorted-object": "~1.0.0", + "spdx-license-ids": "~1.2.0", + "strip-ansi": "~3.0.1", + "tar": "~2.2.1", + "text-table": "~0.2.0", + "uid-number": "0.0.6", + "umask": "~1.1.0", + "validate-npm-package-license": "~3.0.1", + "validate-npm-package-name": "~2.2.2", + "which": "~1.2.4", + "wrappy": "~1.0.1", + "write-file-atomic": "~1.1.4" + }, + "bundleDependencies": [ + "abbrev", + "ansi", + "ansi-regex", + "ansicolors", + "ansistyles", + "archy", + "async-some", + "block-stream", + "char-spinner", + "chmodr", + "chownr", + "cmd-shim", + "columnify", + "config-chain", + "dezalgo", + "editor", + "fs-vacuum", + "fs-write-stream-atomic", + "fstream", + "fstream-npm", + "github-url-from-git", + "github-url-from-username-repo", + "glob", + "graceful-fs", + "hosted-git-info", + "imurmurhash", + "inflight", + "inherits", + "ini", + "init-package-json", + "lockfile", + "lru-cache", + "minimatch", + "mkdirp", + "node-gyp", + "nopt", + "normalize-git-url", + "normalize-package-data", + "npm-cache-filename", + "npm-install-checks", + "npm-package-arg", + "npm-registry-client", + "npm-user-validate", + "npmlog", + "once", + "opener", + "osenv", + "path-is-inside", + "read", + "read-installed", + "read-package-json", + "readable-stream", + "realize-package-specifier", + "request", + "retry", + "rimraf", + "semver", + "sha", + "slide", + "sorted-object", + "spdx-license-ids", + "strip-ansi", + "tar", + "text-table", + "uid-number", + "umask", + "validate-npm-package-license", + "validate-npm-package-name", + "which", + "wrappy", + "write-file-atomic" + ], + "devDependencies": { + "deep-equal": "~1.0.1", + "marked": "~0.3.5", + "marked-man": "~0.1.5", + "npm-registry-couchapp": "~2.6.12", + "npm-registry-mock": "~1.0.0", + "require-inject": "~1.3.0", + "sprintf-js": "~1.0.2", + "tacks": "~1.0.9", + "tap": "~2.3.1" + }, + "scripts": { + "dumpconf": "env | grep npm | sort | uniq", + "prepublish": "node bin/npm-cli.js prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc", + "preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true", + "tap": "tap --timeout 240", + "test": "npm run test-tap", + "test-tap": "npm run tap -- \"test/tap/*.js\"" + }, + "license": "Artistic-2.0" +} diff --git a/bin/nodejs0.12.16/node_modules/npm/scripts/clean-old.sh b/bin/nodejs0.12.16/node_modules/npm/scripts/clean-old.sh new file mode 100644 index 00000000..6c20d78a --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/scripts/clean-old.sh @@ -0,0 +1,165 @@ +#!/bin/bash + +# look for old 0.x cruft, and get rid of it. +# Should already be sitting in the npm folder. + +# This doesn't have to be quite as cross-platform as install.sh. +# There are some bash-isms, because maintaining *two* +# fully-portable posix/bourne sh scripts is too much for +# one project with a sane maintainer. + +# If readlink isn't available, then this is just too tricky. +# However, greadlink is fine, so Solaris can join the party, too. +readlink="readlink" +which $readlink >/dev/null 2>/dev/null +if [ $? -ne 0 ]; then + readlink="greadlink" + which $readlink >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + echo "Can't find the readlink or greadlink command. Aborting." + exit 1 + fi +fi + +if [ "x$npm_config_prefix" != "x" ]; then + PREFIXES=$npm_config_prefix +else + node="$NODE" + if [ "x$node" = "x" ]; then + node=`which node` + fi + if [ "x$node" = "x" ]; then + echo "Can't find node to determine prefix. Aborting." + exit 1 + fi + + + PREFIX=`dirname $node` + PREFIX=`dirname $PREFIX` + echo "cleanup prefix=$PREFIX" + PREFIXES=$PREFIX + + altprefix=`"$node" -e process.installPrefix` + if [ "x$altprefix" != "x" ] && [ "x$altprefix" != "x$PREFIX" ]; then + echo "altprefix=$altprefix" + PREFIXES="$PREFIX $altprefix" + fi +fi + +# now prefix is where npm would be rooted by default +# go hunting. + +packages= +for prefix in $PREFIXES; do + packages="$packages + "`ls "$prefix"/lib/node/.npm 2>/dev/null | grep -v .cache` +done + +packages=`echo $packages` + +filelist=() +fid=0 + +for prefix in $PREFIXES; do + # remove any links into the .npm dir, or links to + # version-named shims/symlinks. + for folder in share/man bin lib/node; do + find $prefix/$folder -type l | while read file; do + target=`$readlink $file | grep '/\.npm/'` + if [ "x$target" != "x" ]; then + # found one! + filelist[$fid]="$file" + let 'fid++' + # also remove any symlinks to this file. + base=`basename "$file"` + base=`echo "$base" | awk -F@ '{print $1}'` + if [ "x$base" != "x" ]; then + find "`dirname $file`" -type l -name "$base"'*' \ + | while read l; do + target=`$readlink "$l" | grep "$base"` + if [ "x$target" != "x" ]; then + filelist[$fid]="$1" + let 'fid++' + fi + done + fi + fi + done + + # Scour for shim files. These are relics of 0.2 npm installs. + # note: grep -r is not portable. + find $prefix/$folder -type f \ + | xargs grep -sl '// generated by npm' \ + | while read file; do + filelist[$fid]="$file" + let 'fid++' + done + done + + # now remove the package modules, and the .npm folder itself. + if [ "x$packages" != "x" ]; then + for pkg in $packages; do + filelist[$fid]="$prefix/lib/node/$pkg" + let 'fid++' + for i in $prefix/lib/node/$pkg\@*; do + filelist[$fid]="$i" + let 'fid++' + done + done + fi + + for folder in lib/node/.npm lib/npm share/npm; do + if [ -d $prefix/$folder ]; then + filelist[$fid]="$prefix/$folder" + let 'fid++' + fi + done +done + +# now actually clean, but only if there's anything TO clean +if [ "${#filelist[@]}" -gt 0 ]; then + echo "" + echo "This script will find and eliminate any shims, symbolic" + echo "links, and other cruft that was installed by npm 0.x." + echo "" + + if [ "x$packages" != "x" ]; then + echo "The following packages appear to have been installed with" + echo "an old version of npm, and will be removed forcibly:" + for pkg in $packages; do + echo " $pkg" + done + echo "Make a note of these. You may want to install them" + echo "with npm 1.0 when this process is completed." + echo "" + fi + + OK= + if [ "x$1" = "x-y" ]; then + OK="yes" + fi + + while [ "$OK" != "y" ] && [ "$OK" != "yes" ] && [ "$OK" != "no" ]; do + echo "Is this OK?" + echo " enter 'yes' or 'no'" + echo " or 'show' to see a list of files " + read OK + if [ "x$OK" = "xshow" ] || [ "x$OK" = "xs" ]; then + for i in "${filelist[@]}"; do + echo "$i" + done + fi + done + if [ "$OK" = "no" ]; then + echo "Aborting" + exit 1 + fi + for i in "${filelist[@]}"; do + rm -rf "$i" + done +fi + +echo "" +echo 'All clean!' + +exit 0 diff --git a/bin/nodejs0.12.16/node_modules/npm/scripts/doc-build.sh b/bin/nodejs0.12.16/node_modules/npm/scripts/doc-build.sh new file mode 100644 index 00000000..d83a7f0e --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/scripts/doc-build.sh @@ -0,0 +1,119 @@ +#!/usr/bin/env bash + +if [[ $DEBUG != "" ]]; then + set -x +fi +set -o errexit +set -o pipefail + +if ! [ -x node_modules/.bin/marked-man ]; then + ps=0 + if [ -f .building_marked-man ]; then + pid=$(cat .building_marked-man) + ps=$(ps -p $pid | grep $pid | wc -l) || true + fi + + if [ -f .building_marked-man ] && [ $ps != 0 ]; then + while [ -f .building_marked-man ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install marked-man + echo $$ > .building_marked-man + sleep 1 + if [ $(cat .building_marked-man) == $$ ]; then + make node_modules/.bin/marked-man + rm .building_marked-man + else + while [ -f .building_marked-man ]; do + sleep 1 + done + fi + fi +fi + +if ! [ -x node_modules/.bin/marked ]; then + ps=0 + if [ -f .building_marked ]; then + pid=$(cat .building_marked) + ps=$(ps -p $pid | grep $pid | wc -l) || true + fi + + if [ -f .building_marked ] && [ $ps != 0 ]; then + while [ -f .building_marked ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install marked + echo $$ > .building_marked + sleep 1 + if [ $(cat .building_marked) == $$ ]; then + make node_modules/.bin/marked + rm .building_marked + else + while [ -f .building_marked ]; do + sleep 1 + done + fi + fi +fi + +src=$1 +dest=$2 +name=$(basename ${src%.*}) +date=$(date -u +'%Y-%m-%d %H:%M:%S') +version=$(node cli.js -v) + +mkdir -p $(dirname $dest) + +html_replace_tokens () { + local url=$1 + sed "s|@NAME@|$name|g" \ + | sed "s|@DATE@|$date|g" \ + | sed "s|@URL@|$url|g" \ + | sed "s|@VERSION@|$version|g" \ + | perl -p -e 's/]*)>([^\(]*\([0-9]\)) -- (.*?)<\/h1>/

    \2<\/h1>

    \3<\/p>/g' \ + | perl -p -e 's/npm-npm/npm/g' \ + | perl -p -e 's/([^"-])(npm-)?README(?!\.html)(\(1\))?/\1README<\/a>/g' \ + | perl -p -e 's/<a href="[^"]+README.html">README<\/a><\/title>/<title>README<\/title>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(1\))/\1<a href="..\/cli\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(3\))/\1<a href="..\/api\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(5\))/\1<a href="..\/files\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(7\))/\1<a href="..\/misc\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/\([1357]\)<\/a><\/h1>/<\/a><\/h1>/g' \ + | (if [ $(basename $(dirname $dest)) == "doc" ]; then + perl -p -e 's/ href="\.\.\// href="/g' + else + cat + fi) +} + +man_replace_tokens () { + sed "s|@VERSION@|$version|g" \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(1\)/npm help \2/g' \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(([57])\)/npm help \3 \2/g' \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(3\)/npm apihelp \2/g' \ + | perl -p -e 's/npm\(1\)/npm help npm/g' \ + | perl -p -e 's/npm\(3\)/npm apihelp npm/g' +} + +case $dest in + *.[1357]) + ./node_modules/.bin/marked-man --roff $src \ + | man_replace_tokens > $dest + exit $? + ;; + *.html) + url=${dest/html\//} + (cat html/dochead.html && \ + cat $src | ./node_modules/.bin/marked && + cat html/docfoot.html)\ + | html_replace_tokens $url \ + > $dest + exit $? + ;; + *) + echo "Invalid destination type: $dest" >&2 + exit 1 + ;; +esac diff --git a/bin/nodejs0.12.16/node_modules/npm/scripts/index-build.js b/bin/nodejs0.12.16/node_modules/npm/scripts/index-build.js new file mode 100644 index 00000000..f34ccdc0 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/scripts/index-build.js @@ -0,0 +1,63 @@ +#!/usr/bin/env node +var fs = require("fs") + , path = require("path") + , root = path.resolve(__dirname, "..") + , glob = require("glob") + , conversion = { "cli": 1, "api": 3, "files": 5, "misc": 7 } + +glob(root + "/{README.md,doc/*/*.md}", function (er, files) { + if (er) + throw er + output(files.map(function (f) { + var b = path.basename(f) + if (b === "README.md") + return [0, b] + if (b === "index.md") + return null + var s = conversion[path.basename(path.dirname(f))] + return [s, f] + }).filter(function (f) { + return f + }).sort(function (a, b) { + return (a[0] === b[0]) + ? ( path.basename(a[1]) === "npm.md" ? -1 + : path.basename(b[1]) === "npm.md" ? 1 + : a[1] > b[1] ? 1 : -1 ) + : a[0] - b[0] + })) +}) + +return + +function output (files) { + console.log( + "npm-index(7) -- Index of all npm documentation\n" + + "==============================================\n") + + writeLines(files, 0) + writeLines(files, 1, "Command Line Documentation", "Using npm on the command line") + writeLines(files, 3, "API Documentation", "Using npm in your Node programs") + writeLines(files, 5, "Files", "File system structures npm uses") + writeLines(files, 7, "Misc", "Various other bits and bobs") +} + +function writeLines (files, sxn, heading, desc) { + if (heading) { + console.log("## %s\n\n%s\n", heading, desc) + } + files.filter(function (f) { + return f[0] === sxn + }).forEach(writeLine) +} + + +function writeLine (sd) { + var sxn = sd[0] || 1 + , doc = sd[1] + , d = path.basename(doc, ".md") + + var content = fs.readFileSync(doc, "utf8").split("\n")[0].split("-- ")[1] + + console.log("### %s(%d)\n", d, sxn) + console.log(content + "\n") +} diff --git a/bin/nodejs0.12.16/node_modules/npm/scripts/install.sh b/bin/nodejs0.12.16/node_modules/npm/scripts/install.sh new file mode 100644 index 00000000..108e6158 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/scripts/install.sh @@ -0,0 +1,270 @@ +#!/bin/sh + +# A word about this shell script: +# +# It must work everywhere, including on systems that lack +# a /bin/bash, map 'sh' to ksh, ksh97, bash, ash, or zsh, +# and potentially have either a posix shell or bourne +# shell living at /bin/sh. +# +# See this helpful document on writing portable shell scripts: +# http://www.gnu.org/s/hello/manual/autoconf/Portable-Shell.html +# +# The only shell it won't ever work on is cmd.exe. + +if [ "x$0" = "xsh" ]; then + # run as curl | sh + # on some systems, you can just do cat>npm-install.sh + # which is a bit cuter. But on others, &1 is already closed, + # so catting to another script file won't do anything. + # Follow Location: headers, and fail on errors + curl -f -L -s https://www.npmjs.org/install.sh > npm-install-$$.sh + ret=$? + if [ $ret -eq 0 ]; then + (exit 0) + else + rm npm-install-$$.sh + echo "Failed to download script" >&2 + exit $ret + fi + sh npm-install-$$.sh + ret=$? + rm npm-install-$$.sh + exit $ret +fi + +# See what "npm_config_*" things there are in the env, +# and make them permanent. +# If this fails, it's not such a big deal. +configures="`env | grep 'npm_config_' | sed -e 's|^npm_config_||g'`" + +npm_config_loglevel="error" +if [ "x$npm_debug" = "x" ]; then + (exit 0) +else + echo "Running in debug mode." + echo "Note that this requires bash or zsh." + set -o xtrace + set -o pipefail + npm_config_loglevel="verbose" +fi +export npm_config_loglevel + +# make sure that node exists +node=`which node 2>&1` +ret=$? +if [ $ret -eq 0 ] && [ -x "$node" ]; then + (exit 0) +else + echo "npm cannot be installed without node.js." >&2 + echo "Install node first, and then try again." >&2 + echo "" >&2 + echo "Maybe node is installed, but not in the PATH?" >&2 + echo "Note that running as sudo can change envs." >&2 + echo "" + echo "PATH=$PATH" >&2 + exit $ret +fi + +# set the temp dir +TMP="${TMPDIR}" +if [ "x$TMP" = "x" ]; then + TMP="/tmp" +fi +TMP="${TMP}/npm.$$" +rm -rf "$TMP" || true +mkdir "$TMP" +if [ $? -ne 0 ]; then + echo "failed to mkdir $TMP" >&2 + exit 1 +fi + +BACK="$PWD" + +ret=0 +tar="${TAR}" +if [ -z "$tar" ]; then + tar="${npm_config_tar}" +fi +if [ -z "$tar" ]; then + tar=`which tar 2>&1` + ret=$? +fi + +if [ $ret -eq 0 ] && [ -x "$tar" ]; then + echo "tar=$tar" + echo "version:" + $tar --version + ret=$? +fi + +if [ $ret -eq 0 ]; then + (exit 0) +else + echo "No suitable tar program found." + exit 1 +fi + + + +# Try to find a suitable make +# If the MAKE environment var is set, use that. +# otherwise, try to find gmake, and then make. +# If no make is found, then just execute the necessary commands. + +# XXX For some reason, make is building all the docs every time. This +# is an annoying source of bugs. Figure out why this happens. +MAKE=NOMAKE + +if [ "x$MAKE" = "x" ]; then + make=`which gmake 2>&1` + if [ $? -eq 0 ] && [ -x "$make" ]; then + (exit 0) + else + make=`which make 2>&1` + if [ $? -eq 0 ] && [ -x "$make" ]; then + (exit 0) + else + make=NOMAKE + fi + fi +else + make="$MAKE" +fi + +if [ -x "$make" ]; then + (exit 0) +else + # echo "Installing without make. This may fail." >&2 + make=NOMAKE +fi + +# If there's no bash, then don't even try to clean +if [ -x "/bin/bash" ]; then + (exit 0) +else + clean="no" +fi + +node_version=`"$node" --version 2>&1` +ret=$? +if [ $ret -ne 0 ]; then + echo "You need node to run this program." >&2 + echo "node --version reports: $node_version" >&2 + echo "with exit code = $ret" >&2 + echo "Please install node before continuing." >&2 + exit $ret +fi + +t="${npm_install}" +if [ -z "$t" ]; then + # switch based on node version. + # note that we can only use strict sh-compatible patterns here. + case $node_version in + 0.[01234567].* | v0.[01234567].*) + echo "You are using an outdated and unsupported version of" >&2 + echo "node ($node_version). Please update node and try again." >&2 + exit 99 + ;; + *) + echo "install npm@latest" + t="latest" + ;; + esac +fi + +# need to echo "" after, because Posix sed doesn't treat EOF +# as an implied end of line. +url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \ + | sed -e 's/^.*tarball":"//' \ + | sed -e 's/".*$//'` + +ret=$? +if [ "x$url" = "x" ]; then + ret=125 + # try without the -e arg to sed. + url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \ + | sed 's/^.*tarball":"//' \ + | sed 's/".*$//'` + ret=$? + if [ "x$url" = "x" ]; then + ret=125 + fi +fi +if [ $ret -ne 0 ]; then + echo "Failed to get tarball url for npm/$t" >&2 + exit $ret +fi + + +echo "fetching: $url" >&2 + +cd "$TMP" \ + && curl -SsL "$url" \ + | $tar -xzf - \ + && cd "$TMP"/* \ + && (ver=`"$node" bin/read-package-json.js package.json version` + isnpm10=0 + if [ $ret -eq 0 ]; then + if [ -d node_modules ]; then + if "$node" node_modules/semver/bin/semver -v "$ver" -r "1" + then + isnpm10=1 + fi + else + if "$node" bin/semver -v "$ver" -r ">=1.0"; then + isnpm10=1 + fi + fi + fi + + ret=0 + if [ $isnpm10 -eq 1 ] && [ -f "scripts/clean-old.sh" ]; then + if [ "x$skipclean" = "x" ]; then + (exit 0) + else + clean=no + fi + if [ "x$clean" = "xno" ] \ + || [ "x$clean" = "xn" ]; then + echo "Skipping 0.x cruft clean" >&2 + ret=0 + elif [ "x$clean" = "xy" ] || [ "x$clean" = "xyes" ]; then + NODE="$node" /bin/bash "scripts/clean-old.sh" "-y" + ret=$? + else + NODE="$node" /bin/bash "scripts/clean-old.sh" </dev/tty + ret=$? + fi + fi + + if [ $ret -ne 0 ]; then + echo "Aborted 0.x cleanup. Exiting." >&2 + exit $ret + fi) \ + && (if [ "x$configures" = "x" ]; then + (exit 0) + else + echo "./configure $configures" + echo "$configures" > npmrc + fi) \ + && (if [ "$make" = "NOMAKE" ]; then + (exit 0) + elif "$make" uninstall install; then + (exit 0) + else + make="NOMAKE" + fi + if [ "$make" = "NOMAKE" ]; then + "$node" cli.js rm npm -gf + "$node" cli.js install -gf + fi) \ + && cd "$BACK" \ + && rm -rf "$TMP" \ + && echo "It worked" + +ret=$? +if [ $ret -ne 0 ]; then + echo "It failed" >&2 +fi +exit $ret diff --git a/bin/nodejs0.12.16/node_modules/npm/scripts/publish-tag.js b/bin/nodejs0.12.16/node_modules/npm/scripts/publish-tag.js new file mode 100644 index 00000000..22421922 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/scripts/publish-tag.js @@ -0,0 +1,3 @@ +var semver = require("semver") +var version = semver.parse(require("../package.json").version) +console.log('v%s.%s-next', version.major, version.minor) diff --git a/bin/nodejs0.12.16/node_modules/npm/scripts/release.sh b/bin/nodejs0.12.16/node_modules/npm/scripts/release.sh new file mode 100644 index 00000000..60a686fe --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/scripts/release.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# script for creating a zip and tarball for inclusion in node + +unset CDPATH + +set -e + +rm -rf release *.tgz || true +mkdir release +node ./cli.js pack --loglevel error >/dev/null +mv *.tgz release +cd release +tar xzf *.tgz + +mkdir node_modules +mv package node_modules/npm + +# make the zip for windows users +cp node_modules/npm/bin/*.cmd . +zipname=npm-$(node ../cli.js -v).zip +zip -q -9 -r -X "$zipname" *.cmd node_modules + +# make the tar for node's deps +cd node_modules +tarname=npm-$(node ../../cli.js -v).tgz +tar czf "$tarname" npm + +cd .. +mv "node_modules/$tarname" . + +rm -rf *.cmd +rm -rf node_modules + +echo "release/$tarname" +echo "release/$zipname" diff --git a/bin/nodejs0.12.16/node_modules/npm/scripts/relocate.sh b/bin/nodejs0.12.16/node_modules/npm/scripts/relocate.sh new file mode 100644 index 00000000..aa30f3df --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/scripts/relocate.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Change the cli shebang to point at the specified node +# Useful for when the program is moved around after install. +# Also used by the default 'make install' in node to point +# npm at the newly installed node, rather than the first one +# in the PATH, which would be the default otherwise. + +# bash /path/to/npm/scripts/relocate.sh $nodepath +# If $nodepath is blank, then it'll use /usr/bin/env + +dir="$(dirname "$(dirname "$0")")" +cli="$dir"/bin/npm-cli.js +tmp="$cli".tmp + +node="$1" +if [ "x$node" = "x" ]; then + node="/usr/bin/env node" +fi +node="#!$node" + +sed -e 1d "$cli" > "$tmp" +echo "$node" > "$cli" +cat "$tmp" >> "$cli" +rm "$tmp" +chmod ogu+x $cli diff --git a/bin/nodejs0.12.16/node_modules/npm/scripts/update-authors.sh b/bin/nodejs0.12.16/node_modules/npm/scripts/update-authors.sh new file mode 100644 index 00000000..c9b613c7 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/scripts/update-authors.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +git log --reverse --format='%aN <%aE>' | perl -wnE ' +BEGIN { + say "# Authors sorted by whether or not they\x27re me"; +} + +print $seen{$_} = $_ unless $seen{$_} +' > AUTHORS diff --git a/bin/nodejs0.12.16/node_modules/npm/test/common-tap.js b/bin/nodejs0.12.16/node_modules/npm/test/common-tap.js new file mode 100644 index 00000000..3e44e3d3 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/test/common-tap.js @@ -0,0 +1,87 @@ +// cheesy hackaround for test deps (read: nock) that rely on setImmediate +if (!global.setImmediate || !require('timers').setImmediate) { + require('timers').setImmediate = global.setImmediate = function () { + var args = [arguments[0], 0].concat([].slice.call(arguments, 1)) + setTimeout.apply(this, args) + } +} + +var spawn = require('child_process').spawn +var path = require('path') + +var port = exports.port = 1337 +exports.registry = 'http://localhost:' + port +process.env.npm_config_loglevel = 'error' + +var npm_config_cache = path.resolve(__dirname, 'npm_cache') +process.env.npm_config_cache = exports.npm_config_cache = npm_config_cache +process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') +process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') +process.env.random_env_var = 'foo' +// suppress warnings about using a prerelease version of node +process.env.npm_config_node_version = process.version.replace(/-.*$/, '') + +var bin = exports.bin = require.resolve('../bin/npm-cli.js') +var chain = require('slide').chain +var once = require('once') + +exports.npm = function (cmd, opts, cb) { + cb = once(cb) + cmd = [bin].concat(cmd) + opts = opts || {} + + opts.env = opts.env || process.env + if (!opts.env.npm_config_cache) { + opts.env.npm_config_cache = npm_config_cache + } + + var stdout = '' + var stderr = '' + var node = process.execPath + var child = spawn(node, cmd, opts) + + if (child.stderr) { + child.stderr.on('data', function (chunk) { + stderr += chunk + }) + } + + if (child.stdout) { + child.stdout.on('data', function (chunk) { + stdout += chunk + }) + } + + child.on('error', cb) + + child.on('close', function (code) { + cb(null, code, stdout, stderr) + }) + return child +} + +exports.makeGitRepo = function (params, cb) { + // git must be called after npm.load because it uses config + var git = require('../lib/utils/git.js') + + var root = params.path || process.cwd() + var user = params.user || 'PhantomFaker' + var email = params.email || 'nope@not.real' + var added = params.added || ['package.json'] + var message = params.message || 'stub repo' + + var opts = { cwd: root, env: { PATH: process.env.PATH }} + var commands = [ + git.chainableExec(['init'], opts), + git.chainableExec(['config', 'user.name', user], opts), + git.chainableExec(['config', 'user.email', email], opts), + git.chainableExec(['add'].concat(added), opts), + git.chainableExec(['commit', '-m', message], opts) + ] + + if (Array.isArray(params.commands)) { + commands = commands.concat(params.commands) + } + + chain(commands, cb) +} diff --git a/bin/nodejs0.12.16/node_modules/npm/test/common.js b/bin/nodejs0.12.16/node_modules/npm/test/common.js new file mode 100644 index 00000000..4ba53e17 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/test/common.js @@ -0,0 +1,7 @@ + +// whatever, it's just tests. +;["util","assert"].forEach(function (thing) { + thing = require("thing") + for (var i in thing) global[i] = thing[i] +} + diff --git a/bin/nodejs0.12.16/node_modules/npm/test/run.js b/bin/nodejs0.12.16/node_modules/npm/test/run.js new file mode 100644 index 00000000..cc51ffc6 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/test/run.js @@ -0,0 +1,193 @@ +// Everything in this file uses child processes, because we're +// testing a command line utility. + +var chain = require("slide").chain +var child_process = require("child_process") +var path = require("path") + , testdir = __dirname + , fs = require("graceful-fs") + , npmpkg = path.dirname(testdir) + , npmcli = path.resolve(npmpkg, "bin", "npm-cli.js") + +var temp = process.env.TMPDIR + || process.env.TMP + || process.env.TEMP + || ( process.platform === "win32" + ? "c:\\windows\\temp" + : "/tmp" ) + +temp = path.resolve(temp, "npm-test-" + process.pid) + +var root = path.resolve(temp, "root") + , cache = path.resolve(temp, "npm_cache") + +var failures = 0 + , mkdir = require("mkdirp") + , rimraf = require("rimraf") + +var pathEnvSplit = process.platform === "win32" ? ";" : ":" + , pathEnv = process.env.PATH.split(pathEnvSplit) + , npmPath = process.platform === "win32" ? root : path.join(root, "bin") + +pathEnv.unshift(npmPath, path.join(root, "node_modules", ".bin")) + +// lastly, make sure that we get the same node that is being used to do +// run this script. That's very important, especially when running this +// test file from in the node source folder. +pathEnv.unshift(path.dirname(process.execPath)) + +// the env for all the test installs etc. +var env = {} +Object.keys(process.env).forEach(function (i) { + env[i] = process.env[i] +}) +env.npm_config_prefix = root +env.npm_config_color = "always" +env.npm_config_global = "true" +// have to set this to false, or it'll try to test itself forever +env.npm_config_npat = "false" +env.PATH = pathEnv.join(pathEnvSplit) +env.NODE_PATH = path.join(root, "node_modules") +env.npm_config_cache = cache + + + +function cleanup (cb) { + if (failures !== 0) return + rimraf(root, function (er) { + if (er) cb(er) + mkdir(root, 0755, cb) + }) +} + +function prefix (content, pref) { + return pref + (content.trim().split(/\r?\n/).join("\n" + pref)) +} + +var execCount = 0 +function exec (cmd, cwd, shouldFail, cb) { + if (typeof shouldFail === "function") { + cb = shouldFail, shouldFail = false + } + console.error("\n+"+cmd + (shouldFail ? " (expect failure)" : "")) + + // special: replace 'node' with the current execPath, + // and 'npm' with the thing we installed. + var cmdShow = cmd + var npmReplace = path.resolve(npmPath, "npm") + var nodeReplace = process.execPath + if (process.platform === "win32") { + npmReplace = '"' + npmReplace + '"' + nodeReplace = '"' + nodeReplace + '"' + } + cmd = cmd.replace(/^npm /, npmReplace + " ") + cmd = cmd.replace(/^node /, nodeReplace + " ") + + console.error("$$$$$$ cd %s; PATH=%s %s", cwd, env.PATH, cmd) + + child_process.exec(cmd, {cwd: cwd, env: env}, function (er, stdout, stderr) { + console.error("$$$$$$ after command", cmd, cwd) + if (stdout) { + console.error(prefix(stdout, " 1> ")) + } + if (stderr) { + console.error(prefix(stderr, " 2> ")) + } + + execCount ++ + if (!shouldFail && !er || shouldFail && er) { + // stdout = (""+stdout).trim() + console.log("ok " + execCount + " " + cmdShow) + return cb() + } else { + console.log("not ok " + execCount + " " + cmdShow) + cb(new Error("failed "+cmdShow)) + } + }) +} + +function execChain (cmds, cb) { + chain(cmds.map(function (args) { + return [exec].concat(args) + }), cb) +} + +function flatten (arr) { + return arr.reduce(function (l, r) { + return l.concat(r) + }, []) +} + +function setup (cb) { + cleanup(function (er) { + if (er) return cb(er) + exec("node \""+npmcli+"\" install \""+npmpkg+"\"", root, false, cb) + }) +} + +function main (cb) { + console.log("# testing in %s", temp) + console.log("# global prefix = %s", root) + + + + failures = 0 + + process.chdir(testdir) + var base = path.resolve(root, path.join("lib", "node_modules")) + + // get the list of packages + var packages = fs.readdirSync(path.resolve(testdir, "packages")) + packages = packages.filter(function (p) { + return p && !p.match(/^\./) + }) + + installAllThenTestAll() + + function installAllThenTestAll () { + var packagesToRm = packages.slice(0) + if (process.platform !== "win32") { + // Windows can't handle npm rm npm due to file-in-use issues. + packagesToRm.push("npm") + } + + chain( + [ setup + , [ exec, "npm install "+npmpkg, testdir ] + , [ execChain, packages.map(function (p) { + return [ "npm install packages/"+p, testdir ] + }) ] + , [ execChain, packages.map(function (p) { + return [ "npm test -ddd", path.resolve(base, p) ] + }) ] + , [ execChain, packagesToRm.map(function (p) { + return [ "npm rm "+p, root ] + }) ] + , installAndTestEach + ] + , cb + ) + } + + function installAndTestEach (cb) { + var thingsToChain = [ + setup + , [ execChain, flatten(packages.map(function (p) { + return [ [ "npm install packages/"+p, testdir ] + , [ "npm test", path.resolve(base, p) ] + , [ "npm rm "+p, root ] ] + })) ] + ] + if (process.platform !== "win32") { + // Windows can't handle npm rm npm due to file-in-use issues. + thingsToChain.push([exec, "npm rm npm", testdir]) + } + + chain(thingsToChain, cb) + } +} + +main(function (er) { + console.log("1.." + execCount) + if (er) throw er +}) diff --git a/bin/nodejs0.12.16/node_modules/npm/test/update-test.sh b/bin/nodejs0.12.16/node_modules/npm/test/update-test.sh new file mode 100644 index 00000000..686a26d4 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/test/update-test.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +SELF_PATH="$0" +if [ "${SELF_PATH:0:1}" != "." ] && [ "${SELF_PATH:0:1}" != "/" ]; then + SELF_PATH=./"$SELF_PATH" +fi +SELF_PATH=$( cd -P -- "$(dirname -- "$SELF_PATH")" \ + && pwd -P \ + ) && SELF_PATH=$SELF_PATH/$(basename -- "$0") + +# resolve symlinks +while [ -h "$SELF_PATH" ]; do + DIR=$(dirname -- "$SELF_PATH") + SYM=$(readlink -- "$SELF_PATH") + SELF_PATH=$( cd -- "$DIR" \ + && cd -- $(dirname -- "$SYM") \ + && pwd \ + )/$(basename -- "$SYM") +done +DIR=$( dirname -- "$SELF_PATH" ) + +export npm_config_root=$DIR/root +export npm_config_binroot=$DIR/bin + +rm -rf $DIR/{root,bin} +mkdir -p $DIR/root +mkdir -p $DIR/bin +npm ls installed 2>/dev/null | grep -v npm | awk '{print $1}' | xargs npm rm &>/dev/null +npm install \ + base64@1.0.0 \ + eyes@0.1.1 \ + vows@0.2.5 \ + websocket-server@1.0.5 &>/dev/null +npm install ./test/packages/blerg &>/dev/null +npm install vows@0.3.0 &>/dev/null + +echo "" +echo "##" +echo "## starting update" +echo "##" +echo "" + +npm update + +echo "" +echo "##" +echo "## update done, all should be 'latest'" +echo "##" +echo "" + +list=$( npm ls installed remote 2>/dev/null ) +echo "$list" +notlatest=$( echo "$list" | grep -v latest ) +if [ "$notlatest" != "" ]; then + echo "Failed: not latest" + echo $notlatest +else + echo "ok" +fi diff --git a/bin/nodejs0.12.16/node_modules/npm/wercker.yml b/bin/nodejs0.12.16/node_modules/npm/wercker.yml new file mode 100644 index 00000000..a2938fe1 --- /dev/null +++ b/bin/nodejs0.12.16/node_modules/npm/wercker.yml @@ -0,0 +1,22 @@ +box: wercker/nodejs +# Build definition +build: + # The steps that will be executed on build + steps: + # A step that executes `npm install` command + - npm-install + # A step that executes `npm test` command + - npm-test + + # A custom script step, name value is used in the UI + # and the code value contains the command that get executed + - script: + name: echo nodejs information + code: | + echo "node version $(node -v) running" + echo "npm version $(npm -v) running" + after-steps: + - sherzberg/slack-notify: + subdomain: npm-inc + token: $SLACK_TOKEN + channel: github-commits diff --git a/bin/nodejs0.12.16/node_perfctr_provider.man b/bin/nodejs0.12.16/node_perfctr_provider.man new file mode 100644 index 00000000..2e15dafb --- /dev/null +++ b/bin/nodejs0.12.16/node_perfctr_provider.man @@ -0,0 +1,107 @@ +<instrumentationManifest + xmlns="http://schemas.microsoft.com/win/2004/08/events" + xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <instrumentation> + <counters xmlns="http://schemas.microsoft.com/win/2005/12/counters" + schemaVersion="1.1"> + <provider symbol="NodeCounterProvider" + applicationIdentity="node.exe" + providerType="userMode" + providerGuid="{1E2E15D7-3760-470E-8699-B9DB5248EDD5}"> + <counterSet symbol="NodeCounterSet" + guid="{3A22A8EC-297C-48AC-AB15-33EC93033FD8}" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet" + name="Node.js" + description="Node.js performance counters" + instances="multipleAggregate"> + + <counter id="1" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvreq" + name="HTTP server requests" + description="Number of HTTP server requests" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="2" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvrsp" + name="HTTP server responses" + description="Number of HTTP server responses" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="3" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclireq" + name="HTTP client requests" + description="Number of HTTP client requests" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="4" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclirsp" + name="HTTP client responses" + description="Number of HTTP client responses" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="5" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netsrvconn" + name="Active server connections" + description="Number of server connections" + type="perf_counter_rawcount" + detailLevel="standard" + aggregate="sum" /> + + <counter id="6" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbytesent" + name="Network bytes sent" + description="Number of bytes sent using TCP" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="7" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbyterecv" + name="Network bytes received" + description="Number of bytes received using TCP" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="8" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.gctime" + name="%Time in GC" + description="Percent of time for last GC" + type="perf_counter_rawcount" + detailLevel="standard" + aggregate="avg" /> + + <counter id="9" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebytesent" + name="Pipe bytes sent" + description="Number of bytes sent using pipe" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="10" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebyterecv" + name="Pipe bytes received" + description="Number of bytes received using pipe" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + </counterSet> + </provider> + </counters> + </instrumentation> +</instrumentationManifest> diff --git a/bin/nodejs0.12.16/nodevars.bat b/bin/nodejs0.12.16/nodevars.bat new file mode 100644 index 00000000..6cb8d29c --- /dev/null +++ b/bin/nodejs0.12.16/nodevars.bat @@ -0,0 +1,24 @@ +@echo off + +rem Ensure this Node.js and npm are first in the PATH +set PATH=%APPDATA%\npm;%~dp0;%PATH% + +setlocal enabledelayedexpansion +pushd "%~dp0" + +rem Figure out the node version. +set print_version=.\node.exe -p -e "process.versions.node + ' (' + process.arch + ')'" +for /F "usebackq delims=" %%v in (`%print_version%`) do set version=%%v + +rem Print message. +if exist npm.cmd ( + echo Your environment has been set up for using Node.js !version! and npm. +) else ( + echo Your environment has been set up for using Node.js !version!. +) + +popd +endlocal + +rem If we're in the node.js directory, change to the user's home dir. +if "%CD%\"=="%~dp0" cd /d "%HOMEDRIVE%%HOMEPATH%" diff --git a/bin/nodejs0.12.16/npm b/bin/nodejs0.12.16/npm new file mode 100644 index 00000000..1226afbc --- /dev/null +++ b/bin/nodejs0.12.16/npm @@ -0,0 +1,34 @@ +#!/bin/sh +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node +fi + +NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" + +case `uname` in + *MINGW*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; + *CYGWIN*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; +esac + +"$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/bin/nodejs0.12.16/npm.cmd b/bin/nodejs0.12.16/npm.cmd new file mode 100644 index 00000000..f111c59d --- /dev/null +++ b/bin/nodejs0.12.16/npm.cmd @@ -0,0 +1,19 @@ +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/bin/nodejs4.6.0/etc/.npmignore b/bin/nodejs4.6.0/etc/.npmignore new file mode 100644 index 00000000..d3f5a12f --- /dev/null +++ b/bin/nodejs4.6.0/etc/.npmignore @@ -0,0 +1 @@ + diff --git a/bin/nodejs4.6.0/etc/npmrc b/bin/nodejs4.6.0/etc/npmrc new file mode 100644 index 00000000..1d9e62dd --- /dev/null +++ b/bin/nodejs4.6.0/etc/npmrc @@ -0,0 +1,5 @@ +cache = ~NEARD_WIN_PATH~\tmp\npm-cache +globalconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs4.6.0\etc\npmrc +globalignorefile = ~NEARD_WIN_PATH~\bin\nodejs\nodejs4.6.0\etc\.npmignore +init-module = ~NEARD_WIN_PATH~\bin\nodejs\nodejs4.6.0\etc\.npm-init.js +userconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs4.6.0\etc\npmrc diff --git a/bin/nodejs4.6.0/etc/npmrc.nrd b/bin/nodejs4.6.0/etc/npmrc.nrd new file mode 100644 index 00000000..1d9e62dd --- /dev/null +++ b/bin/nodejs4.6.0/etc/npmrc.nrd @@ -0,0 +1,5 @@ +cache = ~NEARD_WIN_PATH~\tmp\npm-cache +globalconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs4.6.0\etc\npmrc +globalignorefile = ~NEARD_WIN_PATH~\bin\nodejs\nodejs4.6.0\etc\.npmignore +init-module = ~NEARD_WIN_PATH~\bin\nodejs\nodejs4.6.0\etc\.npm-init.js +userconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs4.6.0\etc\npmrc diff --git a/bin/nodejs4.6.0/launch.bat b/bin/nodejs4.6.0/launch.bat new file mode 100644 index 00000000..62238ad6 --- /dev/null +++ b/bin/nodejs4.6.0/launch.bat @@ -0,0 +1,12 @@ +@ECHO OFF +SETLOCAL EnableDelayedExpansion + +SET NEARD_NODEJS_PATH=%~dp0 +SET NEARD_NODEJS_PATH=!NEARD_NODEJS_PATH:~0,-1! +SET NEARD_NODEJS_NPM_PATH=%NEARD_NODEJS_PATH%\node_modules\npm +SET NEARD_NODEJS_CONFIG_PATH=%NEARD_NODEJS_NPM_PATH%\npmrc +ECHO prefix = %NEARD_NODEJS_PATH%>%NEARD_NODEJS_CONFIG_PATH% + +"%NEARD_NODEJS_PATH%\nodevars.bat" & "%NEARD_NODEJS_PATH%\npm" config set globalconfig "%NEARD_NODEJS_CONFIG_PATH%" --global + +ENDLOCAL \ No newline at end of file diff --git a/bin/nodejs4.6.0/neard.conf b/bin/nodejs4.6.0/neard.conf new file mode 100644 index 00000000..b766da05 --- /dev/null +++ b/bin/nodejs4.6.0/neard.conf @@ -0,0 +1,8 @@ +nodejsVersion = "4.6.0" +nodejsExe = "node.exe" +nodejsVars = "nodevars.bat" +nodejsNpm = "npm.cmd" +nodejsLaunch = "launch.bat" +nodejsConf = "node_modules/npm/npmrc" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/nodejs4.6.0/node.exe b/bin/nodejs4.6.0/node.exe new file mode 100644 index 00000000..092a1bff Binary files /dev/null and b/bin/nodejs4.6.0/node.exe differ diff --git a/bin/nodejs4.6.0/node_etw_provider.man b/bin/nodejs4.6.0/node_etw_provider.man new file mode 100644 index 00000000..8b42f409 --- /dev/null +++ b/bin/nodejs4.6.0/node_etw_provider.man @@ -0,0 +1,153 @@ +<instrumentationManifest + xmlns="http://schemas.microsoft.com/win/2004/08/events" + xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <instrumentation> + <events> + <provider name="NodeJS-ETW-provider" + guid="{77754E9B-264B-4D8D-B981-E4135C1ECB0C}" + symbol="NODE_ETW_PROVIDER" + resourceFileName="node.exe" + messageFileName="node.exe"> + + <tasks> + <task name="MethodRuntime" value="1" + symbol="JSCRIPT_METHOD_RUNTIME_TASK"> + <opcodes> + <opcode name="MethodLoad" value="10" + symbol="JSCRIPT_METHOD_METHODLOAD_OPCODE"/> + </opcodes> + </task> + </tasks> + + <opcodes> + <opcode name="NODE_HTTP_SERVER_REQUEST" value="10"/> + <opcode name="NODE_HTTP_SERVER_RESPONSE" value="11"/> + <opcode name="NODE_HTTP_CLIENT_REQUEST" value="12"/> + <opcode name="NODE_HTTP_CLIENT_RESPONSE" value="13"/> + <opcode name="NODE_NET_SERVER_CONNECTION" value="14"/> + <opcode name="NODE_NET_STREAM_END" value="15"/> + <opcode name="NODE_GC_START" value="16"/> + <opcode name="NODE_GC_DONE" value="17"/> + <opcode name="NODE_V8SYMBOL_REMOVE" value="21"/> + <opcode name="NODE_V8SYMBOL_MOVE" value="22"/> + <opcode name="NODE_V8SYMBOL_RESET" value="23"/> + </opcodes> + + <templates> + <template tid="node_connection"> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_http_client_request"> + <data name="url" inType="win:AnsiString" /> + <data name="method" inType="win:AnsiString" /> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_http_server_request"> + <data name="url" inType="win:AnsiString" /> + <data name="method" inType="win:AnsiString" /> + <data name="forwardedFor" inType="win:AnsiString" /> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_gc"> + <data name="gctype" inType="win:UInt32" /> + <data name="gccallbackflags" inType="win:UInt32" /> + </template> + + <template tid="V8AddressChange"> + <data name="addr1" inType="win:Pointer" outType="win:HexInt64"/> + <data name="addr2" inType="win:Pointer" outType="win:HexInt64"/> + </template> + + <template tid="MethodLoadUnload"> + <data name="ScriptContextID" inType="win:Pointer" outType="win:HexInt64"/> + <data name="MethodStartAddress" inType="win:Pointer" outType="win:HexInt64" /> + <data name="MethodSize" inType="win:UInt64" /> + <data name="MethodID" inType="win:UInt32" /> + <data name="MethodFlags" inType="win:UInt16" /> + <data name="MethodAddressRangeID" inType="win:UInt16" /> + <data name="SourceID" inType="win:UInt64" /> + <data name="Line" inType="win:UInt32" outType="xs:unsignedInt" /> + <data name="Column" inType="win:UInt32" outType="xs:unsignedInt" /> + <data name="MethodName" inType="win:UnicodeString" outType="xs:string" /> + </template> + </templates> + + <events> + <event value="1" + opcode="NODE_HTTP_SERVER_REQUEST" + template="node_http_server_request" + symbol="NODE_HTTP_SERVER_REQUEST_EVENT" + level="win:Informational"/> + <event value="2" + opcode="NODE_HTTP_SERVER_RESPONSE" + template="node_connection" + symbol="NODE_HTTP_SERVER_RESPONSE_EVENT" + level="win:Informational"/> + <event value="3" + opcode="NODE_HTTP_CLIENT_REQUEST" + template="node_http_client_request" + symbol="NODE_HTTP_CLIENT_REQUEST_EVENT" + level="win:Informational"/> + <event value="4" + opcode="NODE_HTTP_CLIENT_RESPONSE" + template="node_connection" + symbol="NODE_HTTP_CLIENT_RESPONSE_EVENT" + level="win:Informational"/> + <event value="5" + opcode="NODE_NET_SERVER_CONNECTION" + template="node_connection" + symbol="NODE_NET_SERVER_CONNECTION_EVENT" + level="win:Informational"/> + <event value="6" + opcode="NODE_NET_STREAM_END" + template="node_connection" + symbol="NODE_NET_STREAM_END_EVENT" + level="win:Informational"/> + <event value="7" + opcode="NODE_GC_START" + template="node_gc" + symbol="NODE_GC_START_EVENT" + level="win:Informational"/> + <event value="8" + opcode="NODE_GC_DONE" + template="node_gc" + symbol="NODE_GC_DONE_EVENT" + level="win:Informational"/> + <event value="9" + level="win:Informational" + opcode="MethodLoad" + symbol="MethodLoad" + task="MethodRuntime" + template="MethodLoadUnload"/> + <event value="21" + opcode="NODE_V8SYMBOL_REMOVE" + template="V8AddressChange" + symbol="NODE_V8SYMBOL_REMOVE_EVENT" + level="win:Informational" /> + <event value="22" + opcode="NODE_V8SYMBOL_MOVE" + template="V8AddressChange" + symbol="NODE_V8SYMBOL_MOVE_EVENT" + level="win:Informational" /> + <event value="23" + opcode="NODE_V8SYMBOL_RESET" + symbol="NODE_V8SYMBOL_RESET_EVENT" + level="win:Informational" /> + </events> + </provider> + </events> + </instrumentation> +</instrumentationManifest> diff --git a/bin/nodejs4.6.0/node_modules/npm/.mailmap b/bin/nodejs4.6.0/node_modules/npm/.mailmap new file mode 100644 index 00000000..ae0b4d28 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/.mailmap @@ -0,0 +1,53 @@ +Alex K. Wolfe <alexkwolfe@gmail.com> +Andrew Bradley <cspotcode@gmail.com> +Andrew Lunny <alunny@gmail.com> +Arlo Breault <arlolra@gmail.com> +Benjamin Coe <bencoe@gmail.com> +Benjamin Coe <bencoe@gmail.com> <ben@npmjs.com> +Brian White <mscdex@mscdex.net> <mscdex@gmail.com> +Cedric Nelson <cedric.nelson@gmail.com> +Charlie Robbins <charlie.robbins@gmail.com> +Dalmais Maxence <root@ip-10-195-202-5.ec2.internal> +Danila Gerasimov <danila.gerasimov@gmail.com> +David Beitey <david@davidjb.com> +Domenic Denicola <domenic@domenicdenicola.com> +Einar Otto Stangvik <einaros@gmail.com> +Erik Wienhold <git@ewie.name> +Evan Lucas <evan@btc.com> <evan.lucas@hattiesburgclinic.com> +Evan Lucas <evan@btc.com> <evanlucas@me.com> +Faiq Raza <faiqrazarizvi@gmail.com> +Forbes Lindesay <forbes@lindesay.co.uk> +Forrest L Norvell <ogd@aoaioxxysz.net> <forrest@npmjs.com> +Gabriel Barros <descartavel1@gmail.com> +Geoff Flarity <geoff.flarity@gmail.com> <gflarity@raptvm-x02.(none)> +Isaac Z. Schlueter <i@izs.me> <i@foohack.com> +Isaac Z. Schlueter <i@izs.me> isaacs <i@izs.me> +Jake Verbaten <raynos2@gmail.com> +James Sanders <jimmyjazz14@gmail.com> +Jason Smith <jhs@iriscouch.com> +Jonas Weber <github@jonasw.de> +Julien Meddah <julien.meddah@deveryware.com> +Kris Windham <kriswindham@gmail.com> +Lin Clark <lin.w.clark@gmail.com> +Luke Arduini <luke.arduini@gmail.com> <luke.arduini@me.com> +Maciej Małecki <me@mmalecki.com> <maciej.malecki@notimplemented.org> +Max Goodman <c@chromakode.com> +Maxim Bogushevich <boga1@mail.ru> +Maximilian Antoni <mail@maxantoni.de> <maximilian.antoni@juliusbaer.com> +Michael Hayes <michael@hayes.io> <mhayes@newrelic.com> +Nicolas Morel <marsup@gmail.com> +Olivier Melcher <olivier.melcher@gmail.com> +Ra'Shaun Stovall <rashaunstovall@gmail.com> +Rebecca Turner <me@re-becca.org> <turner@mikomi.org> +Rebecca Turner <me@re-becca.org> <rebecca@npmjs.com> +Ryan Emery <seebees@gmail.com> +Sam Mikes <smikes@cubane.com> +Takaya Kobayashi <jigsaw@live.jp> +Timo Weiß <timoweiss@Timo-MBP.local> +Tony <zearin@gonk.net> +Trent Mick <trentm@gmail.com> <trent.mick@joyent.com> +Visnu Pitiyanuvath <visnupx@gmail.com> +Will Elwood <w.elwood08@gmail.com> +Wout Mertens <Wout.Mertens@gmail.com> +Yeonghoon Park <sola92@gmail.com> +Zeke Sikelianos <zeke@sikelianos.com> diff --git a/bin/nodejs4.6.0/node_modules/npm/.npmignore b/bin/nodejs4.6.0/node_modules/npm/.npmignore new file mode 100644 index 00000000..825d694e --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/.npmignore @@ -0,0 +1,32 @@ +*.swp +.*.swp +npm-debug.log +/test/bin +/test/output.log +/test/packages/*/node_modules +/test/packages/npm-test-depends-on-spark/which-spark.log +/test/packages/test-package/random-data.txt +/test/root +/test/npm_cache +node_modules/marked +node_modules/ronn +node_modules/tap +node_modules/.bin +node_modules/npm-registry-mock +/npmrc +/release/ + +# don't need these in the npm package. +html/*.png + +# don't ignore .npmignore files +# these are used in some tests. +!.npmignore + +/npm-*.tgz + +*.pyc + +/test/tap/builtin-config + +.nyc_output diff --git a/bin/nodejs4.6.0/node_modules/npm/.travis.yml b/bin/nodejs4.6.0/node_modules/npm/.travis.yml new file mode 100644 index 00000000..f0f0e2ed --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/.travis.yml @@ -0,0 +1,33 @@ +sudo: false +# need to declare the language as well as the matrix below +language: node_js +# having top-level `env:` adds a phantom build +# https://github.com/travis-ci/travis-ci/issues/4681 +#env: DEPLOY_VERSION=testing +matrix: + include: + # LTS is our most important target + - node_js: "4" + # DEPLOY_VERSION is used to set the couchapp setup mode for test/tap/registry.js + # only gather coverage info for LTS + env: DEPLOY_VERSION=testing COVERALLS_REPO_TOKEN="$COVERALLS_OPTIONAL_TOKEN" + # next LTS and master is next most important + - node_js: "6" + env: DEPLOY_VERSION=testing + # still in LTS maintenance until fall 2016 (also still in wide use) + - node_js: "0.10" + env: DEPLOY_VERSION=testing + # will be unsupported as soon as 6 becomes LTS and 7 released + - node_js: "5" + env: DEPLOY_VERSION=testing + # technically in LTS / distros, unbeloved + - node_js: "0.12" + env: DEPLOY_VERSION=testing +before_install: + # explicitly install rimraf for LTS self-install + - "npm install -g rimraf" + - "node . install -g ." + # required by test/tap/registry.js + - "mkdir -p /var/run/couchdb" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/bin/nodejs4.6.0/node_modules/npm/AUTHORS b/bin/nodejs4.6.0/node_modules/npm/AUTHORS new file mode 100644 index 00000000..b6edb113 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/AUTHORS @@ -0,0 +1,372 @@ +# Authors sorted by whether or not they're me +Isaac Z. Schlueter <i@izs.me> +Steve Steiner <ssteinerX@gmail.com> +Mikeal Rogers <mikeal.rogers@gmail.com> +Aaron Blohowiak <aaron.blohowiak@gmail.com> +Martyn Smith <martyn@dollyfish.net.nz> +Charlie Robbins <charlie.robbins@gmail.com> +Francisco Treacy <francisco.treacy@gmail.com> +Cliffano Subagio <cliffano@gmail.com> +Christian Eager <christian.eager@nokia.com> +Dav Glass <davglass@gmail.com> +Alex K. Wolfe <alexkwolfe@gmail.com> +James Sanders <jimmyjazz14@gmail.com> +Reid Burke <me@reidburke.com> +Arlo Breault <arlolra@gmail.com> +Timo Derstappen <teemow@gmail.com> +Bart Teeuwisse <bart.teeuwisse@thecodemill.biz> +Ben Noordhuis <info@bnoordhuis.nl> +Tor Valamo <tor.valamo@gmail.com> +Whyme.Lyu <5longluna@gmail.com> +Olivier Melcher <olivier.melcher@gmail.com> +Tomaž Muraus <kami@k5-storitve.net> +Evan Meagher <evan.meagher@gmail.com> +Orlando Vazquez <ovazquez@gmail.com> +Kai Chen <kaichenxyz@gmail.com> +George Miroshnykov <gmiroshnykov@lohika.com> +Geoff Flarity <geoff.flarity@gmail.com> +Max Goodman <c@chromakode.com> +Pete Kruckenberg <pete@kruckenberg.com> +Laurie Harper <laurie@holoweb.net> +Chris Wong <chris@chriswongstudio.com> +Scott Bronson <brons_github@rinspin.com> +Federico Romero <federomero@gmail.com> +Visnu Pitiyanuvath <visnupx@gmail.com> +Irakli Gozalishvili <rfobic@gmail.com> +Mark Cahill <mark@tiemonster.info> +Tony <zearin@gonk.net> +Iain Sproat <iainsproat@gmail.com> +Trent Mick <trentm@gmail.com> +Felix Geisendörfer <felix@debuggable.com> +Jameson Little <t.jameson.little@gmail.com> +Conny Brunnkvist <conny@fuchsia.se> +Will Elwood <w.elwood08@gmail.com> +Dean Landolt <dean@deanlandolt.com> +Oleg Efimov <efimovov@gmail.com> +Martin Cooper <mfncooper@gmail.com> +Jann Horn <jannhorn@googlemail.com> +Andrew Bradley <cspotcode@gmail.com> +Maciej Małecki <me@mmalecki.com> +Stephen Sugden <glurgle@gmail.com> +Michael Budde <mbudde@gmail.com> +Jason Smith <jhs@iriscouch.com> +Gautham Pai <buzypi@gmail.com> +David Trejo <david.daniel.trejo@gmail.com> +Paul Vorbach <paul@vorb.de> +George Ornbo <george@shapeshed.com> +Tim Oxley <secoif@gmail.com> +Tyler Green <tyler.green2@gmail.com> +Dave Pacheco <dap@joyent.com> +Danila Gerasimov <danila.gerasimov@gmail.com> +Rod Vagg <rod@vagg.org> +Christian Howe <coderarity@gmail.com> +Andrew Lunny <alunny@gmail.com> +Henrik Hodne <dvyjones@binaryhex.com> +Adam Blackburn <regality@gmail.com> +Kris Windham <kriswindham@gmail.com> +Jens Grunert <jens.grunert@gmail.com> +Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl> +Dalmais Maxence <root@ip-10-195-202-5.ec2.internal> +Marcus Ekwall <marcus.ekwall@gmail.com> +Aaron Stacy <aaron.r.stacy@gmail.com> +Phillip Howell <phowell@cothm.org> +Domenic Denicola <domenic@domenicdenicola.com> +James Halliday <mail@substack.net> +Jeremy Cantrell <jmcantrell@gmail.com> +Ribettes <patlogan29@gmail.com> +Don Park <donpark@docuverse.com> +Einar Otto Stangvik <einaros@gmail.com> +Kei Son <heyacct@gmail.com> +Nicolas Morel <marsup@gmail.com> +Mark Dube <markisdee@gmail.com> +Nathan Rajlich <nathan@tootallnate.net> +Maxim Bogushevich <boga1@mail.ru> +Meaglin <Meaglin.wasabi@gmail.com> +Ben Evans <ben@bensbit.co.uk> +Nathan Zadoks <nathan@nathan7.eu> +Brian White <mscdex@mscdex.net> +Jed Schmidt <tr@nslator.jp> +Ian Livingstone <ianl@cs.dal.ca> +Patrick Pfeiffer <patrick@buzzle.at> +Paul Miller <paul@paulmillr.com> +Ryan Emery <seebees@gmail.com> +Carl Lange <carl@flax.ie> +Jan Lehnardt <jan@apache.org> +Stuart P. Bentley <stuart@testtrack4.com> +Johan Sköld <johan@skold.cc> +Stuart Knightley <stuart@stuartk.com> +Niggler <nirk.niggler@gmail.com> +Paolo Fragomeni <paolo@async.ly> +Jaakko Manninen <jaakko@rocketpack.fi> +Luke Arduini <luke.arduini@gmail.com> +Larz Conwell <larz@larz-laptop.(none)> +Marcel Klehr <mklehr@gmx.net> +Robert Kowalski <rok@kowalski.gd> +Forbes Lindesay <forbes@lindesay.co.uk> +Vaz Allen <vaz@tryptid.com> +Jake Verbaten <raynos2@gmail.com> +Schabse Laks <Dev@SLaks.net> +Florian Margaine <florian@margaine.com> +Johan Nordberg <its@johan-nordberg.com> +Ian Babrou <ibobrik@gmail.com> +Di Wu <dwu@palantir.com> +Mathias Bynens <mathias@qiwi.be> +Matt McClure <matt.mcclure@mapmyfitness.com> +Matt Lunn <matt@mattlunn.me.uk> +Alexey Kreschuk <akrsch@gmail.com> +elisee <elisee@sparklin.org> +Robert Gieseke <robert.gieseke@gmail.com> +François Frisch <francoisfrisch@gmail.com> +Trevor Burnham <tburnham@hubspot.com> +Alan Shaw <alan@freestyle-developments.co.uk> +TJ Holowaychuk <tj@vision-media.ca> +Nicholas Kinsey <pyro@feisty.io> +Paulo Cesar <pauloc062@gmail.com> +Elan Shanker <elan.shanker@gmail.com> +Jon Spencer <jon@jonspencer.ca> +Jason Diamond <jason@diamond.name> +Maximilian Antoni <mail@maxantoni.de> +Thom Blake <tblake@brightroll.com> +Jess Martin <jessmartin@gmail.com> +Spain Train <michael.spainhower@opower.com> +Alex Rodionov <p0deje@gmail.com> +Matt Colyer <matt@colyer.name> +Evan You <yyx990803@gmail.com> +bitspill <bitspill+github@bitspill.net> +Gabriel Falkenberg <gabriel.falkenberg@gmail.com> +Alexej Yaroshevich <alex@qfox.ru> +Quim Calpe <quim@kalpe.com> +Steve Mason <stevem@brandwatch.com> +Wil Moore III <wil.moore@wilmoore.com> +Sergey Belov <peimei@ya.ru> +Tom Huang <hzlhu.dargon@gmail.com> +CamilleM <camille.moulin@alterway.fr> +Sébastien Santoro <dereckson@espace-win.org> +Evan Lucas <evan@btc.com> +Quinn Slack <qslack@qslack.com> +Alex Kocharin <alex@kocharin.ru> +Daniel Santiago <daniel.santiago@highlevelwebs.com> +Denis Gladkikh <outcoldman@gmail.com> +Andrew Horton <andrew.j.horton@gmail.com> +Zeke Sikelianos <zeke@sikelianos.com> +Dylan Greene <dylang@gmail.com> +Franck Cuny <franck.cuny@gmail.com> +Yeonghoon Park <sola92@gmail.com> +Rafael de Oleza <rafa@spotify.com> +Mikola Lysenko <mikolalysenko@gmail.com> +Yazhong Liu <yorkiefixer@gmail.com> +Neil Gentleman <ngentleman@gmail.com> +Kris Kowal <kris.kowal@cixar.com> +Alex Gorbatchev <alex.gorbatchev@gmail.com> +Shawn Wildermuth <shawn@wildermuth.com> +Wesley de Souza <wesleywex@gmail.com> +yoyoyogi <yogesh.k@gmail.com> +J. Tangelder <j.tangelder@gmail.com> +Jean Lauliac <jean@lauliac.com> +Andrey Kislyuk <kislyuk@gmail.com> +Thorsten Lorenz <thlorenz@gmx.de> +Julian Gruber <julian@juliangruber.com> +Benjamin Coe <bencoe@gmail.com> +Alex Ford <Alex.Ford@CodeTunnel.com> +Matt Hickford <matt.hickford@gmail.com> +Sean McGivern <sean.mcgivern@rightscale.com> +C J Silverio <ceejceej@gmail.com> +Robin Tweedie <robin@songkick.com> +Miroslav Bajtoš <miroslav@strongloop.com> +David Glasser <glasser@davidglasser.net> +Gianluca Casati <casati_gianluca@yahoo.it> +Forrest L Norvell <ogd@aoaioxxysz.net> +Karsten Tinnefeld <k.tinnefeld@googlemail.com> +Bryan Burgers <bryan@burgers.io> +David Beitey <david@davidjb.com> +Evan You <yyou@google.com> +Zach Pomerantz <zmp@umich.edu> +Chris Williams <cwilliams88@gmail.com> +sudodoki <smd.deluzion@gmail.com> +Mick Thompson <dthompson@gmail.com> +Felix Rabe <felix@rabe.io> +Michael Hayes <michael@hayes.io> +Chris Dickinson <christopher.s.dickinson@gmail.com> +Bradley Meck <bradley.meck@gmail.com> +GeJ <geraud@gcu.info> +Andrew Terris <atterris@gmail.com> +Michael Nisi <michael.nisi@gmail.com> +fengmk2 <fengmk2@gmail.com> +Adam Meadows <adam.meadows@gmail.com> +Chulki Lee <chulki.lee@gmail.com> +不四 <busi.hyy@taobao.com> +dead_horse <dead_horse@qq.com> +Kenan Yildirim <kenan@kenany.me> +Laurie Voss <git@seldo.com> +Rebecca Turner <me@re-becca.org> +Hunter Loftis <hunter@hunterloftis.com> +Peter Richardson <github@zoomy.net> +Jussi Kalliokoski <jussi.kalliokoski@gmail.com> +Filip Weiss <me@fiws.net> +Timo Weiß <timoweiss@Timo-MBP.local> +Christopher Hiller <chiller@badwing.com> +Jérémy Lal <kapouer@melix.org> +Anders Janmyr <anders@janmyr.com> +Chris Meyers <chris.meyers.fsu@gmail.com> +Ludwig Magnusson <ludwig@mediatool.com> +Wout Mertens <Wout.Mertens@gmail.com> +Nick Santos <nick@medium.com> +Terin Stock <terinjokes@gmail.com> +Faiq Raza <faiqrazarizvi@gmail.com> +Thomas Torp <thomas@erupt.no> +Sam Mikes <smikes@cubane.com> +Mat Tyndall <mat.tyndall@gmail.com> +Tauren Mills <tauren@sportzing.com> +Ron Martinez <ramartin.net@gmail.com> +Kazuhito Hokamura <k.hokamura@gmail.com> +Tristan Davies <github@tristan.io> +David Volm <david@volminator.com> +Lin Clark <lin.w.clark@gmail.com> +Ben Page <bpage@dewalch.com> +Jeff Jo <jeffjo@squareup.com> +martinvd <martinvdpub@gmail.com> +Mark J. Titorenko <nospam-github.com@titorenko.net> +Oddur Sigurdsson <oddurs@gmail.com> +Eric Mill <eric@konklone.com> +Gabriel Barros <descartavel1@gmail.com> +KevinSheedy <kevinsheedy@gmail.com> +Aleksey Smolenchuk <aleksey@uber.com> +Ed Morley <emorley@mozilla.com> +Blaine Bublitz <blaine@iceddev.com> +Andrey Fedorov <anfedorov@gmail.com> +Daijiro Wachi <daijiro.wachi@gmail.com> +Luc Thevenard <lucthevenard@gmail.com> +Aria Stewart <aredridel@nbtsc.org> +Charlie Rudolph <charles.w.rudolph@gmail.com> +Vladimir Rutsky <rutsky@users.noreply.github.com> +Isaac Murchie <isaac@saucelabs.com> +Marcin Wosinek <marcin.wosinek@gmail.com> +David Marr <davemarr@gmail.com> +Bryan English <bryan@bryanenglish.com> +Anthony Zotti <amZotti@users.noreply.github.com> +Karl Horky <karl.horky@gmail.com> +Jordan Harband <ljharb@gmail.com> +Guðlaugur Stefán Egilsson <gulli@kolibri.is> +Helge Skogly Holm <helge.holm@gmail.com> +Peter A. Shevtsov <petr.shevtsov@gmail.com> +Alain Kalker <a.c.kalker@gmail.com> +Bryant Williams <b.n.williams@gmail.com> +Jonas Weber <github@jonasw.de> +Tim Whidden <twhid@twhid.com> +Andreas <functino@users.noreply.github.com> +Karolis Narkevicius <karolis.n@gmail.com> +Adrian Lynch <adi_ady_ade@hotmail.com> +Richard Littauer <richard.littauer@gmail.com> +Oli Evans <oli@zilla.org.uk> +Matt Brennan <mattyb1000@gmail.com> +Jeff Barczewski <jeff.barczewski@gmail.com> +Danny Fritz <dannyfritz@gmail.com> +Takaya Kobayashi <jigsaw@live.jp> +Ra'Shaun Stovall <rashaunstovall@gmail.com> +Julien Meddah <julien.meddah@deveryware.com> +Michiel Sikma <michiel@wedemandhtml.com> +Jakob Krigovsky <jakob.krigovsky@gmail.com> +Charmander <~@charmander.me> +Erik Wienhold <git@ewie.name> +James Butler <james.butler@sandfox.co.uk> +Kevin Kragenbrink <kevin@gaikai.com> +Arnaud Rinquin <rinquin.arnaud@gmail.com> +Mike MacCana <mike.maccana@gmail.com> +Antti Mattila <anttti@fastmail.fm> +laiso <laiso@lai.so> +Matt Zorn <zornme@gmail.com> +Kyle Mitchell <kyle@kemitchell.com> +Jeremiah Senkpiel <fishrock123@rocketmail.com> +Michael Klein <mischkl@users.noreply.github.com> +Simen Bekkhus <sbekkhus91@gmail.com> +Victor <victor.shih@gmail.com> +thefourtheye <thechargingvolcano@gmail.com> +Clay Carpenter <claycarpenter@gmail.com> +bangbang93 <bangbang93@163.com> +Nick Malaguti <nmalaguti@palantir.com> +Cedric Nelson <cedric.nelson@gmail.com> +Kat Marchán <kzm@sykosomatic.org> +Andrew <talktome@aboutandrew.co.uk> +Eduardo Pinho <enet4mikeenet@gmail.com> +Rachel Hutchison <rhutchix@intel.com> +Ryan Temple <ryantemple145@gmail.com> +Eugene Sharygin <eush77@gmail.com> +Nick Heiner <nick.heiner@opower.com> +James Talmage <james@talmage.io> +jane arc <jane@uber.com> +Joseph Dykstra <josephdykstra@gmail.com> +Joshua Egan <josh-egan@users.noreply.github.com> +Thomas Cort <thomasc@ssimicro.com> +Thaddee Tyl <thaddee.tyl@gmail.com> +Steve Klabnik <steve@steveklabnik.com> +Andrew Murray <radarhere@gmail.com> +Stephan Bönnemann <stephan@excellenteasy.com> +Kyle M. Tarplee <kyle.tarplee@numerica.us> +Derek Peterson <derekpetey@gmail.com> +Greg Whiteley <greg.whiteley@atomos.com> +murgatroid99 <mlumish@google.com> +Marcin Cieslak <saper@saper.info> +João Reis <reis@janeasystems.com> +Matthew Hasbach <hasbach.git@gmail.com> +Anna Henningsen <sqrt@entless.org> +Jon Hall <jon_hall@outlook.com> +James Hartig <james@levenlabs.com> +snopeks <stephaniesnopek@gmail.com> +Jason Kurian <JaKXz@users.noreply.github.com> +Juan Caicedo <retiredcanadianpoet@gmail.com> +Ashley Williams <ashley@bocoup.com> +Andrew Marcinkevičius <andrew.web@ifdattic.com> +Jorrit Schippers <jorrit@ncode.nl> +Alex Lukin <alex.lukin@softgrad.com> +Aria Stewart <aredridel@dinhe.net> +Tim <tim-github@baverstock.org.uk> +Nick Williams <WickyNilliams@users.noreply.github.com> +Louis Larry <louis.larry@gmail.com> +Jakub Gieryluk <jakub.g.opensource@gmail.com> +Martin von Gagern <Martin.vGagern@gmx.net> +Eymen Gunay <eymen@egunay.com> +ekmartin <mail@ekmartin.com> +Rafał Pocztarski <r.pocztarski@gmail.com> +Ashley Williams <ashley666ashley@gmail.com> +Mark Reeder <mreeder@uber.com> +Tiago Rodrigues <tmcrodrigues@gmail.com> +Chris Rebert <github@chrisrebert.com> +Jeff McMahan <jeffrey.lee.mcmahan@gmail.com> +Scott Addie <tobias.addie@gmail.com> +Julian Simioni <julian@simioni.org> +Jimb Esser <jimb@yahoo-inc.com> +Hal Henke <halhenke@gmail.com> +Alexis Campailla <alexis@janeasystems.com> +Beau Gunderson <beau@beaugunderson.com> +s100 <shughes1@uk.ibm.com> +Jonathan Persson <persson.jonathan@gmail.com> +Vedat Mahir YILMAZ <mahir@vedatmahir.com> +Jan Schär <jscissr@gmail.com> +Xcat Liu <xcatliu@gmail.com> +Neil Kistner <neil.kistner@gmail.com> +Hutson Betts <hbetts@factset.com> +Sergey Simonchik <sergey.simonchik@jetbrains.com> +Lewis Cowper <lewis.cowper@googlemail.com> +Arturo Coronel <aoitsu3@gmail.com> +Scott Plumlee <scott@plumlee.org> +gnerkus <ifeanyioraelosi@gmail.com> +Robert Ludwig <rob.ludwig@rideamigos.com> +Adam Byrne <misterbyrne@gmail.com> +GriffinSchneider <griffinschneider@gmail.com> +doug.wade <doug.wade@redfin.com> +rhgb <kaiserdaemon@gmail.com> +Yael <yaelz@users.noreply.github.com> +Yann Odeyer <yann@odeyer.com> +James Monger <jameskmonger@hotmail.co.uk> +Paul Irish <paul.irish@gmail.com> +Paul O'Leary McCann <polm@dampfkraft.com> +Francis Gulotta <wizard@roborooter.com> +Rachel Evans <git@rve.org.uk> +Michael Jackson <majgis@gmail.com> +Myles Borins <mborins@us.ibm.com> +André Herculano <andresilveirah@gmail.com> +Wyatt Preul <wpreul@gmail.com> +Gianluca Casati <fibo@users.noreply.github.com> +Tapani Moilanen <moilanen.tapani@gmail.com> +Simon MacDonald <simon.macdonald@gmail.com> +Adam Stankiewicz <sheerun@sher.pl> diff --git a/bin/nodejs4.6.0/node_modules/npm/CHANGELOG.md b/bin/nodejs4.6.0/node_modules/npm/CHANGELOG.md new file mode 100644 index 00000000..f20f9749 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/CHANGELOG.md @@ -0,0 +1,5822 @@ +### v2.15.9 (2016-06-30): + +What's this? An LTS release? Yes, that is indeed so. Small, as usual, and as +LTSs should be, really, but a release nonetheless! + +The star of the show is an updated `node-gyp` with some goodies. The rest is +just docs and some CI stuff. + +Happy hacking! + +#### DEPENDENCY UPDATE! + +* [`f9a07cc`](https://github.com/npm/npm/commit/f9a07cc873f1915827d8df97d0c43204d1eb128c) + [#13200](https://github.com/npm/npm/pull/13200) + [`node-gyp@3.4.0`](https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md): + AIX, Visual Studio 2015, and logging improvements. Oh my~! + ([@rvagg](https://github.com/rvagg)) + +#### CI TWEAKS + +* [`bee83b8`](https://github.com/npm/npm/commit/bee83b8500c31aba65451dfcb082f9b5d1d5ce34) + Globally install `rimraf` on CI to make the LTS self-install work better. + ([@othiym23](https://github.com/othiym23)) +* [`6b8c0ab`](https://github.com/npm/npm/commit/6b8c0ab6fcbf8a37e8693acb8bbac22293b10893) + This new Travis configuration only runs coverage checks against Node.js LTS, + which speeds up all the other test runs. By, like, a lot. Also, the entire + file has been extensively commented, so the next time we need to mess with it, + we'll be able to better remember why all the weird bits are there. + ([@othiym23](https://github.com/othiym23)) + +#### DOCUMENTATION FIXES + +* [`2c7a5be`](https://github.com/npm/npm/commit/2c7a5be080276e3fdca3375ab0f8f5edffff753e) + [#13156](https://github.com/npm/npm/pull/13156) + Fix old reference to `doc/install` in a source comment. + ([@sheerun](https://github.com/sheerun)) +* [`e1cf78c`](https://github.com/npm/npm/commit/e1cf78c5b77f95383bd4a7fc6eeb8adbbe68e12e) + [#13189](https://github.com/npm/npm/pull/13189) + [#13113](https://github.com/npm/npm/issues/13113) + [#13189](https://github.com/npm/npm/pull/13189) + Fixes a link to `npm-tag(3)` that was breaking to instead point to + `npm-dist-tag(1)`, as reported by [@SimenB](https://github.com/SimenB) + ([@macdonst](https://github.com/macdonst)) + +### v2.15.8 (2016-06-17): + +There's a very important bug fix and a long-awaited (and significant!) +deprecation in this hotfix release. [Hold on.](http://butt.holdings/) + +#### *WHOA* + +When Node.js 6.0.0 was released, the CLI team noticed an alarming upsurge in +bugs related to important files (like `README.md`) not being included in +published packages. The new bugs looked much like +[#5082](https://github.com/npm/npm/issues/5082), which had been around in one +form or another since April, 2014. #5082 used to be a very rare (and obnoxious) +bug that the CLI team hadn't had much luck reproducing, and we'd basically +marked it down as a race condition that arose on machines using slow and / or +rotating-media-based hard drives. + +Under 6.0.0, the behavior was reliable enough to be nearly deterministic, and +made it very difficult for publishers using `.npmignore` files in combination +with `"files"` stanzas in `package.json` to get their packages onto the +registry without one or more files missing from the packed tarball. The entire +saga is contained within [the issue](https://github.com/npm/npm/issues/5082), +but the summary is that an improvement to the performance of +[`fs.realpath()`](https://nodejs.org/api/fs.html#fs_fs_realpath_path_options_callback) +made it much more likely that the packing code would lose the race. + +Fixing this has proven to be very difficult, in part because the code used by +npm to produce package tarballs is more complicated than, strictly speaking, it +needs to be. [**@evanlucas**](https://github.com/evanlucas) contributed [a +patch](https://github.com/npm/fstream/pull/50) that passed the tests in a +[special test suite](https://github.com/othiym23/eliminate-5082) that I +([**@othiym23**](https://github.com/othiym23)) created (with help from +[**@addaleax**](https://github.com/addaleax)), but only _after_ we'd released +the fixed version of that package did we learn that it actually made the +problem _worse_ in other situations in npm proper. Eventually, +[**@rvagg**](https://github.com/rvagg) put together a more durable fix that +appears to completely address the errant behavior under Node.js 6.0.0. That's +the patch included in this release. Everybody should chip in for redback +insurance for Rod and his family; he's done the community a huge favor. + +Does this mean the long (2+ year) saga of #5082 is now over? At this point, I'm +going to quote from my latest summary on the issue: + +> The CLI team (mostly me, with input from the rest of the team) has decided that +> the overall complexity of the interaction between `fstream`, `fstream-ignore`, +> `fstream-npm`, and `node-tar` has grown more convoluted than the team is +> comfortable (maybe even capable of) supporting. +> +> - While I believe that @rvagg's (very targeted) fix addresses _this_ issue, I +> would be shocked if there aren't other race conditions in npm's packing +> logic. I've already identified a couple other places in the code that are +> most likely race conditions, even if they're harder to trigger than the +> current one. +> - The way that dependency bundling is integrated leads to a situation in +> which a bunch of logic is duplicated between `fstream-npm` and +> `lib/utils/tar.js` in npm itself, and the way `fstream`'s extension +> mechanism works makes this difficult to clean up. This caused a nasty +> regression ([#13088](https://github.com/npm/fstream/pull/50), see below) as +> of ~`npm@3.8.7` where the dependencies of `bundledDependencies` were no +> longer being included in the built package tarballs. +> - The interaction between `.npmignore`, `.gitignore`, and `files` is hopelessly +> complicated, scattered in many places throughout the code. We've been +> discussing [making the ignores and includes logic clearer and more +> predictable](https://github.com/npm/npm/wiki/Files-and-Ignores), and the +> current code fights our efforts to clean that up. +> +> So, our intention is still to replace `fstream`, `fstream-ignore`, and +> `fstream-npm` with something much simpler and purpose-built. There's no real +> reason to have a stream abstraction here when a simple recursive-descent +> filesystem visitor and a synchronous function that can answer whether a given +> path should be included in the packed tarball would do the job adequately. +> +> What's not yet clear is whether we'll need to replace `node-tar` in the +> process. `node-tar` is a very robust implementation of tar (it handles, like, +> everything), and it also includes some very important tweaks to prevent several +> classes of security exploits involving maliciously crafted packages. However, +> its packing API involves passing in an `fstream` instance, so we'd either need +> to produce something that follows enough of `fstream`'s contract for `node-tar` +> to keep working, or swap `node-tar` out for something like `tar-stream` (and +> then ensuring that our use of `tar-stream` is secure, which could involve +> security patches for either npm or `tar-stream`). + +The testing and review of `fstream@1.0.10` that the team has done leads us to +believe that this bug is fixed, but I'm feeling more than a little paranoid +about fstream now, so it's important that people keep a close eye on their +publishes for a while and let us know immediately if they notice any +irregularities. + +* [`2c49265`](https://github.com/npm/npm/commit/2c49265c6746d29ae0cd5f3532d28c5950f9847e) + [#5082](https://github.com/npm/npm/issues/5082) `fstream@1.0.10`: Ensure that + entries are collected after a paused stream resumes. + ([@rvagg](https://github.com/rvagg)) +* [`92e4344`](https://github.com/npm/npm/commit/92e43444d9204f749f83512aeab5d5e0a2d085a7) + [#5082](https://github.com/npm/npm/issues/5082) Remove the warning introduced + in `npm@3.10.0`, because it should no longer be necessary. + ([@othiym23](https://github.com/othiym23)) + +#### GOODBYE, FAITHFUL FRIEND + +At NodeConf Adventure 2016 (RIP in peace, Mikeal Rogers's NodeConf!), the CLI +team had an opportunity to talk to representatives from some of the larger +companies that we knew were still using Node.js 0.8 in production. After asking +them whether they were still using 0.8, we got back blank stares and questions +like, "0.8? You mean, from four years ago?" After establishing that being able +to run npm in their legacy environments was no longer necessary, the CLI team +made the decision to drop support for 0.8. (Faithful observers of our [team +meetings](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+npm+cli+team+meeting+) +will have known this was the plan for NodeConf since the beginning of 2016.) + +In practice, this means only what's in the commit below: we've removed 0.8 from +our continuous integration test matrix below, and will no longer be habitually +testing changes under Node 0.8. We may also give ourselves permission to use +`setImmediate()` in test code. However, since the project still supports +Node.js 0.10 and 0.12, it's unlikely that patches that rely on ES 2015 +functionality will land anytime soon. + +Looking forward, the team's current plan is to drop support for Node.js 0.10 +when its LTS maintenace window expires in October, 2016, and 0.12 when its +maintenance / LTS window ends at the end of 2016. We will also drop support for +Node.js 5.x when Node.js 6 becomes LTS and Node.js 7 is released, also in the +October-December 2016 timeframe. + +(Confused about Node.js's LTS policy? [Don't +be!](https://github.com/nodejs/LTS) If you look at [this +diagram](https://github.com/nodejs/LTS/blob/ce364a94b0e0619eba570cd57be396573e1ef889/schedule.png), +it should make all of the preceding clear.) + +If, in practice, this doesn't work with distribution packagers or other +community stakeholders responsible for packaging and distributing Node.js and +npm, please reach out to us. Aligning the npm CLI's LTS policy with Node's +helps everybody minimize the amount of work they need to do, and since all of +our teams are small and very busy, this is somewhere between a necessity and +non-negotiable. + +* [`4a1ecc0`](https://github.com/npm/npm/commit/4a1ecc068fb2660bd9bc3e2e2372aa0176d2193b) + Remove 0.8 from the Node.js testing matrix, and reorder to match real-world + priority, with comments. ([@othiym23](https://github.com/othiym23)) + +### v2.15.7 (2016-06-16): + +It pains me greatly that we haven't been able to fix +[#5082](https://github.com/npm/npm/issues/5082) yet, but warning you away from +potentially publishing incomplete packages takes priority over feeling cheesy +about landing a warning to help keep y'all out of trouble, so here you go +(_please read this next bit_ (_please clap_)): + +#### DANGER: PUBLISHING ON NODE 6.0.0 + +Publishing and packing are buggy under Node versions greater than 6.0.0. +Please use Node.js LTS (4.4.x) to publish packages. See +[#5082](https://github.com/npm/npm/issues/5082) for details and current +status. + +* [`dff00ce`](https://github.com/npm/npm/commit/dff00cedd56b9c04370f840299a7e657a7a835c6) + [#13077](https://github.com/npm/npm/pull/13077) + Warn when using Node 6+. + ([@othiym23](https://github.com/othiym23)) + +#### PACKAGING CHANGES + +* [`1877171`](https://github.com/npm/npm/commit/1877171648e20595a82de34073b643f7e01a339f) + [#12873](https://github.com/npm/npm/issues/12873) + Ignore `.nyc_output`. This will help avoid an accidental publish or commit filled with + code coverage data. + ([@TheAlphaNerd](https://github.com/TheAlphaNerd)) + +#### DOCUMENTATION CHANGES + +* [`470ae86`](https://github.com/npm/npm/commit/470ae86e052ae2f29ebec15b7547230b6240042e) + [#12983](https://github.com/npm/npm/pull/12983) + Describe how to run the lifecycle scripts of dependencies. How you do + this changed with `npm` v2. + ([@Tapppi](https://github.com/Tapppi)) +* [`9cedf37`](https://github.com/npm/npm/commit/9cedf37e5a3e26d0ffd6351af8cac974e3e011c2) + [#12776](https://github.com/npm/npm/pull/12776) + Remove mention of `<pkg>` arg for `run-script`. + ([@fibo](https://github.com/fibo)) +* [`55b8424`](https://github.com/npm/npm/commit/55b8424d7229f2021cac55f0b03de72403e7c0ff) + [#12840](https://github.com/npm/npm/pull/12840) + Remove sexualized language from comment. + ([@geek](https://github.com/geek)) +* [`d6bf0c3`](https://github.com/npm/npm/commit/d6bf0c393788a6398bf80b41c57956f2dbcf3b39) + [#12802](https://github.com/npm/npm/pull/12802) + Small grammar fix in `doc/cli/npm.md`. + ([@andresilveira](https://github.com/andresilveira)) + +#### DEPENDENCY UPDATES + +* [`2c2c568`](https://github.com/npm/npm/commit/2c2c56857ff801d5fe1b6d3157870cd16e65891b) + `readable-stream@2.1.4`: Brought up to date with Node 6.1.0's streams implementation. + ([@calvinmetcalf](https://github.com/calvinmetcalf)) +* [`d682e64`](https://github.com/npm/npm/commit/d682e6445845b0a2584935d5e2942409c43f6916) + [npm/npm-user-validate#8](https://github.com/npm/npm-user-validate/pull/8) + `npm-user-validate@0.1.4`: Add a maximum length limit for usernames based on + the (arbitrary) limit imposed by the primary npm registry. + ([@aredridel](https://github.com/aredridel)) +* [`448b65b`](https://github.com/npm/npm/commit/448b65b48cda3b782b714057fb4b8311cc1fa36a) + `which@1.2.10`: Remove unused dependency `is-absolute`, bug fixes. + ([@isaacs](https://github.com/isaacs)) +* [`7d15434`](https://github.com/npm/npm/commit/7d15434f0b0af8e70b119835b21968217224664f) + `require-inject@1.4.0`: Add `requireInject.withEmptyCache` and + `requireInject.installGlobally.andClearCache` to support loading modules to be + injected with an empty cache. + ([@iarna](https://github.com/iarna)) +* [`31845c0`](https://github.com/npm/npm/commit/31845c081bc6f3f8a2f3d83a3c792dccffbaa2a8) + `init-package-json@1.9.4`: + Replace use of reserved identifier `package` in, uh, the package. + ([@adius](https://github.com/adius)) +* [`d73ef3e`](https://github.com/npm/npm/commit/d73ef3e6b18d4905de668c5115bc6042905a02d9) + `glob@7.0.4`: Use userland `fs.realpath` implementation to get glob working under Node 6. + ([@isaacs](https://github.com/isaacs)) +* [`b47da85`](https://github.com/npm/npm/commit/b47da85cf83b946f2c8d29ab612c92028f31f6b0) + `inflight@1.0.5`: Correct link to package repository, add `"files"` stanza. + ([@iarna](https://github.com/iarna), [@jamestalmage](https://github.com/jamestalmage)) +* [`04815e4`](https://github.com/npm/npm/commit/04815e436035de785279fd000cdbc821cc1f3447) + [npm/npmlog#32](https://github.com/npm/npmlog/pull/32) + `npmlog@2.0.4`: Add `"files"` stanza to `package.json`. + ([@jamestalmage](https://github.com/jamestalmage)) +* [`9e29ad2`](https://github.com/npm/npm/commit/9e29ad227300bb970e7bcd21029944d4733e40db) + `wrappy@1.0.2`: Add `"files"` stanza to `package.json`. + ([@jamestalmage](https://github.com/jamestalmage)) +* [`44af4d4`](https://github.com/npm/npm/commit/44af4d475ac65bdce6d088173273ce4a4f74a49e) + `abbrev@1.0.9` ([@jorrit](https://github.com/jorrit)) +* [`6c977c0`](https://github.com/npm/npm/commit/6c977c0031d074479a26c7bec6ec83fd6c6526b2) + `npm-registry-client@7.1.2`: Add support for newer versions of `npmlog`. + ([@iarna](https://github.com/iarna)) + +### v2.15.6 (2016-05-12): + +I have a couple of doc fixes and a shrinkwrap fix for you all this week. + +#### PEER DEPENDENCIES AND SHRINKWRAPS + +* [`55c998a`](https://github.com/npm/npm/commit/55c998a098a306b90a84beef163a8890f9a616b1) + [#5135](https://github.com/npm/npm/issues/5135) + Fix a bug where peerDependencies & shrinkwraps didn't play nice together. (Where + the peerDependency resolver would end up installing its dep when it wasn't needed.) + ([@majgis](https://github.com/majgis)) + +#### NPM AND `node-gyp` DOCS IMPROVEMENTS + +* [`1826908`](https://github.com/npm/npm/commit/1826908b991510d8fbc71a0d0f2c01ff24fd83c2) + [#12636](https://github.com/npm/npm/pull/12636) + Improve `npm-scripts` documentation regarding when `node-gyp` is used. + ([@reconbot](https://github.com/reconbot)) +* [`f9ff7f3`](https://github.com/npm/npm/commit/f9ff7f36cc2c2c3fbb4f6eef91491b589d049d5f) + [#12586](https://github.com/npm/npm/pull/12586) + Correct `package.json` documentation as to when `node-gyp rebuild` called. + This now matches https://docs.npmjs.com/misc/scripts#default-values + ([@reconbot](https://github.com/reconbot)) + +### v2.15.5 (2016-05-05): + +This is a minor LTS release, bringing dependencies up to date and updating +our CI matrix to match what we support. + +Some of the dependency updates come out of our getting the development +branch's tests passing on Windows and so bring in fixes for a few Windows +related corner cases. + +#### CI UPDATES + +* [`bb6f0e5`](https://github.com/npm/npm/commit/bb6f0e5c95d4ad186768b1c962dd4c399f90ddb1) + [#12487](https://github.com/npm/npm/pull/12487) + Remove iojs from CI, add Node.js 6, prioritize 4 over 5. + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`f2f8753`](https://github.com/npm/npm/commit/f2f8753c4aef2a604a4bdca2677711c940234b8f) + `which@1.2.8`: + Properly handle relative path executables. + ([@isaacs](https://github.com/isaacs)) +* [`e287ca9`](https://github.com/npm/npm/commit/e287ca99c37680d8e4cfacf4cfebe2da98884865) + `read-package-json@2.0.4`: + Fix Windows issue with ENOTDIR detection. + ([@zkat](https://github.com/zkat)) +* [`1a0ce6c`](https://github.com/npm/npm/commit/1a0ce6cff4c347bad035dc89bba2ceed9dacbf73) + `realize-package-specifier@3.0.3`: + Use npa with windows fix. + Fix relative path resolution when the local file might also be a tag. + ([@zkat](https://github.com/zkat)) + ([@iarna](https://github.com/iarna)) +* [`a475c9a`](https://github.com/npm/npm/commit/a475c9a4e4b36d00080b11f379657ce68185adc6) + `lru-cache@4.0.1`: + Use Symbol if available. + ([@isaacs](https://github.com/isaacs)) +* [`7141e08`](https://github.com/npm/npm/commit/7141e08816c620b1889d7537c30dc5b254de4d1f) + `sorted-object@2.0.0` + ([@iamstarkov](https://github.com/iamstarkov)) +* [`27c6190`](https://github.com/npm/npm/commit/27c6190216cc8a5a280f0efbabb3444581968d40) + `request@2.72.0` + ([@simov](https://github.com/simov)) +* [`ab90daf`](https://github.com/npm/npm/commit/ab90daf70ba51b51f722fb4cd74ac5267621c4b4) + `readable-stream@2.1.2` + ([@calvinmetcalf](https://github.com/calvinmetcalf)) +* [`b1715f8`](https://github.com/npm/npm/commit/b1715f805426403273225bcfa91d1a52d7b56eb8) + `graceful-fs@4.1.4` + ([@isaacs](https://github.com/isaacs)) +* [`ca97de6`](https://github.com/npm/npm/commit/ca97de6c18059ef420235f4706898ad8758904e6) + `block-stream@0.0.9` + ([@isaacs](https://github.com/isaacs)) + +### v2.15.4 (2016-04-21): + +Gosh, it's been a peaceful couple of weeks! + +Overall, the CLI team has been focused on the project to [get the test suite +passing on Windows](https://github.com/npm/npm/pull/11444). Our efforts should +be paying off soon -- there's only a couple of tests left! + +It's very unlikely those particular changes will make their way into our current +`npm@2` LTS release, I think, but it will help `npm@3` a lot, as well as +whatever version makes it into [`node@6`, which will eventually be the next +Node.js LTS](https://github.com/nodejs/node/pull/6155). + +As far as this week goes, we've got a couple of dep updates and doc fixes. +Always happy to see community contributions flying in. 💚 + +#### DEP UPDATE MAGIC + +* [`b178c4a`](https://github.com/npm/npm/commit/b178c4ac9ce91c0a0794526a38b553c759132d18) + `spdx-license-ids@1.2.1`: + Minor project-related tweaks -- no license changes. + ([@shinnn](https://github.com/shinnn)) +* [`1adf179`](https://github.com/npm/npm/commit/1adf179948ab8cb97dfb2f46a61e9f37d944c42a) + `normalize-git-url@3.0.2`: + Fixes `file://` URLs on Windows. Turns out stuff like `file://C:\hello` is + actually fairly weird for a URL (it's not actually a valid URL, but we're just + gonna pretend.😉) + ([@zkat](https://github.com/zkat)) +* [`9cfd56c`](https://github.com/npm/npm/commit/9cfd56cdadc040c0b2fa7654cdb5e7d22dbef7cb) + `fs-vacuum@1.2.9`: + This one goes out to our fans at Big Blue: There was an AIX-specific issue + where `fs.rmDir` was failing with `EEXIST` instead of `ENOTEMPTY` with + non-empty directories. + ([@richardlau](https://github.com/richardlau)) + +#### HOORAY DOC CONTRIBUTIONS + +No seriously, we love these. Keep 'em comin'! + +* [`2afe8bf`](https://github.com/npm/npm/commit/2afe8bf415a159baa181a8102f72c96e1d189bc9) + [#12415](https://github.com/npm/npm/pull/12415) + Clarify that the `--cert` and `--key` options are actual certs and keys, not + paths to files containing them. + ([@rvedotrc](https://github.com/rvedotrc)) +* [`3522560`](https://github.com/npm/npm/commit/3522560b0a4bb6c9717a34f9728f156fd9760cad) + [#12107](https://github.com/npm/npm/pull/12107) + Document `npm login` as an alias to `npm adduser`. People are still surprised + by this so often. + ([@gnerkus](https://github.com/gnerkus)) + +### v2.15.3 (2016-03-31): + +Hiiiiiii!~👋 + +We're really happy to be getting more and more community contributions! Keep it +up! We really appreciate folks trying to help us, and we'll do our best to help +point you in the right direction. Even things like documentation are a huge +help. And remember -- you get socks for it, too!🎁 + +This week is as quiet as usual, aside from fixing a regression to `npm +deprecate` you might want to pay attention to! Other than that, just docs and +deps, as any good LTS release train should be. 🙆 + +#### FIXME + +* [`6e0b66e`](https://github.com/npm/npm/commit/6e0b66e282aa27d1b5371e2babaa859924121730) + [#11884](https://github.com/npm/npm/pull/11884) + Include `node_modules` in the list of files and directories that npm won't + include in packages ordinarily. (Modules listed in `bundledDependencies` and + things that those modules rely on, ARE included of course.) + ([@Jameskmonger](https://github.com/Jameskmonger)) +* [`9896290`](https://github.com/npm/npm/commit/98962909b160364030705575202ad133971033c1) + [#12079](https://github.com/npm/npm/pull/12079) + Back in `npm@2.13.1` we included [a patch that made it so `npm install pkg` + was basically `npm install pkg@latest` instead of + `pkg@*`](https://github.com/npm/npm/pull/9170) This is probably what most + users expected, but it also ended up [breaking `npm + deprecate`](https://github.com/npm/npm/pull/9170) when no version was provided + for a package. In that case, we were using `*` to mean "deprecate all + versions" and relying on the `pkg` -> `pkg@*` conversion. This patch fixes + `npm deprecate pkg` to work as it used to by special casing that particular + command's behavior. + ([@polm](https://github.com/polm)) +* [`6c1628f`](https://github.com/npm/npm/commit/6c1628f62b657db6c116be13849d00933a3388cd) + [#12146](https://github.com/npm/npm/pull/12146) + Adds `make doc-clean` to `prepublish` script, to clear out previously built + docs before publishing a new npm version. + ([@watilde](https://github.com/watilde)) +* [`6d3017e`](https://github.com/npm/npm/commit/6d3017e6eed8a771b395d10130ac1f498e2d3211) + [#12146](https://github.com/npm/npm/pull/12146) + Adds `doc-clean` phony target to `make publish`. + ([@watilde](https://github.com/watilde)) + +#### DOCS + +* [`d43921c`](https://github.com/npm/npm/commit/d43921c546617cdb94bbee444d7d67ef55f38dc5) + [#12147](https://github.com/npm/npm/pull/12147) + Document that the current behavior of `engines` is just to warn if the node + platform is incompatible. + ([@reconbot](https://github.com/reconbot)) +* [`3cfe99e`](https://github.com/npm/npm/commit/3cfe99e3a757c5d8cbb1c2789410e9802563abac) + [#12093](https://github.com/npm/npm/pull/12093) + Update `bugs` url in `package.json` to use the `https` URL for Github. + ([@watilde](https://github.com/watilde)) +* [`ecf865f`](https://github.com/npm/npm/commit/ecf865f4eed1419c75442e0d52bc34ba1647de15) + [#12075](https://github.com/npm/npm/pull/12075) + Add the `--ignore-scripts` flag to the `npm install` docs. + ([@paulirish](https://github.com/paulirish)) +* [`f0e6db3`](https://github.com/npm/npm/commit/f0e6db32827d88680ef2320e60c0863754a4fbc5) + [#12063](https://github.com/npm/npm/pull/12063) + Various minor fixes to the html docs homepage. + ([@watilde](https://github.com/watilde)) + +#### DEPS + +* [`e2660de`](https://github.com/npm/npm/commit/e2660de1c08ed68a1c6fc4ee75d10376595979be) + `npmlog@2.0.3` + ([@iarna](https://github.com/iarna)) + +### v2.15.2 (2016-03-24): + +It's always nice to see new contributors. 💚 + +This week sees another small release, but we're still chugging along on our +[Windows efforts](https://github.com/npm/npm/pull/11444). + +There's also some small process changes to our LTS process relatively recently +that you might wanna know about! 💁 + +For one, the `2.x` branch was removed in favor of just `lts`. If you're making +PRs exclusively against npm's LTS, please use that name from now on. `2.x` was +deleted. + +Also, [@othiym23](https://github.com/othiym23) put some time into [writing down +our LTS process and policy](https://github.com/npm/npm/wiki/LTS). Check it out +and ping us if you have questions or comments about it! + +In general, we're trying to make sure all our policy and such for our +contributors is written down, and we hope it makes it easier in general for +y'all. Forrest is also working on a shiny new Contributor's Guide right now, but +we'll link to that in the (near?) future, when it's ready to roll out. + +#### TESTS + +* [`1d0e468`](https://github.com/npm/npm/commit/1d0e468c06c7b8e2b95b7fe874a3399a16d9db74) + [#11931](https://github.com/npm/npm/pull/11931) + Removes a bunch of old, disabled tests that have just been sitting around, + doing nothing. + ([@othiym23](https://github.com/othiym23)) +* [`7ae8aa1`](https://github.com/npm/npm/commit/7ae8aa1d9dc47761024f6756114205db3fb2c80b) + [#11987](https://github.com/npm/npm/pull/11987) + There was a failure in the `outdated-symlink` test caused by using the default + registry instead of the mock registry tests. + ([@yodeyer](https://github.com/yodeyer)) + +#### DOCS + +* [`b2649fb`](https://github.com/npm/npm/commit/b2649fb360f239aadef1ab51a580cbf4fdf29722) + [#12006](https://github.com/npm/npm/pull/12006) + Access was Team and Team was Access, but someone from the community rolled + around and corrected it for us. Thanks a bunch! + ([@yaelz](https://github.com/yaelz)) + +### v2.15.1 (2016-03-17): + +#### SECURITY ADVISORY: BEARER TOKEN DISCLOSURE + +This release includes [the fix for a +vulnerability](https://github.com/npm/npm/commit/fea8cc92cee02c720b58f95f14d315507ccad401) +that could cause the unintentional leakage of bearer tokens. + +Here are details on this vulnerability and how it affects you. + +##### DETAILS + +Since 2014, npm’s registry has used HTTP bearer tokens to authenticate requests +from the npm’s command-line interface. A design flaw meant that the CLI was +sending these bearer tokens with _every_ request made by logged-in users, +regardless of the destination of their request. (The bearers only should have +been included for requests made against a registry or registries used for the +current install.) + +An attacker could exploit this flaw by setting up an HTTP server that could +collect authentication information, then use this authentication information to +impersonate the users whose tokens they collected. This impersonation would +allow them to do anything the compromised users could do, including publishing +new versions of packages. + +With the fixes we’ve released, the CLI will only send bearer tokens with +requests made against a registry. + +##### THINK YOU'RE AT RISK? REGENERATE YOUR TOKENS + +If you believe that your bearer token may have been leaked, [invalidate your +current npm bearer tokens](https://www.npmjs.com/settings/tokens) and rerun +`npm login` to generate new tokens. Keep in mind that this may cause continuous +integration builds in services like Travis to break, in which case you’ll need +to update the tokens in your CI server’s configuration. + +##### WILL THIS BREAK MY CURRENT SETUP? + +Maybe. + +npm’s CLI team believes that the fix won’t break any existing registry setups. +Due to the large number of registry software suites out in the wild, though, +it’s possible our change will be breaking in some cases. + +If so, please [file an issue](https://github.com/npm/npm/issues/new) describing +the software you’re using and how it broke. Our team will work with you to +mitigate the breakage. + +##### CREDIT & THANKS + +Thanks to Mitar, Will White & the team at Mapbox, Max Motovilov, and James +Taylor for reporting this vulnerability to npm. + +### BACK TO YOUR REGULARLY SCHEDULED PROGRAMMING + +Aside from that, it's another one of those releases again! Docs and tests, it +turns out, have a pretty easy time getting into LTS releases, and boring is +exactly how LTS should be. 💁 + +#### DOCS + +* [`981c89c`](https://github.com/npm/npm/commit/981c89c8e398ca22ab6bf466123b25728ef6f543) + [#11820](https://github.com/npm/npm/pull/11820) + The basic explanation for how `npm link` works was a bit confusing, and + somewhat incorrect. It should be clearer now. + ([@rhgb](https://github.com/rhgb)) +* [`35b2b45`](https://github.com/npm/npm/commit/35b2b45f181dcbfb297f53b577dc1f26efcf3aba) + [#11787](https://github.com/npm/npm/pull/11787) + The `verison` alias for `npm version` no longer shows up in the command list + when you do `npm -h`. + ([@doug-wade](https://github.com/doug-wade)) +* [`1c9d00f`](https://github.com/npm/npm/commit/1c9d00f788298a81a8a7293d7dcf430f01bdd7fd) + [#11786](https://github.com/npm/npm/pull/11786) + Add a comment to the `npm-scope.md` docs about `npm@>=2` being required in + order to use scoped packaged. + ([@doug-wade](https://github.com/doug-wade)) +* [`7d64fb1`](https://github.com/npm/npm/commit/7d64fb1452d360aa736f31c85d6776ce570b2365) + [#11762](https://github.com/npm/npm/pull/11762) + Roll back patch that previously advised people to use `--depth Infinity` + instead of `--depth 9999`. Just keep using `--depth 9999`. + ([@GriffinSchneider](https://github.com/GriffinSchneider)) + +#### TESTS + +* [`98a9ee4`](https://github.com/npm/npm/commit/98a9ee4773f83994b8eb63c0ff75a9283408ba1a) + [#11912](https://github.com/npm/npm/pull/11912) + Did you know npm can install itself? `npm install -g npm` is the way to + upgrade! Turns out that one of the tests that verified this functionality got + rewritten as part of our recent push for better tests, and in the process + omitted a detail about *how* the test ran. We're testing that corner case + again, now, by moving the install folder to `/tmp`, where the original legacy + test ran. + ([@iarna](https://github.com/iarna)) + +### v2.15.0 (2016-03-10): + +#### WHY IS THIS SEMVER-MINOR I THOUGHT THIS WAS LTS + +A brief note about LTS this week! + +npm, as you may know if you're using this `2.x` branch, has an LTS process for +releases. We also try and play nice with [Node.js' own LTS release +process](https://github.com/nodejs/LTS#lts-plan). That means we generally try to +avoid things like minor version bumps on our `2.x` branch (which is also tagged +`lts` in the `dist-tag`s). + +That said, we had a minor-bump update recently for `npm@3.8.0` which added a +`maxsockets` option to allow users to configure the number of concurrent sockets +that npm would keep open at a time -- a setting that has the potential to help a +bunch for people with fussy routers or internet connections that aren't very +happy with Node.js applications' usual concurrency storm. This change was done +to `npm-registry-client`, which we don't have a parallel LTS-tracking branch +for. + +After talking it over, we ended up deciding that this was a reasonable enough +addition to LTS, even though it's *technically* a `semver-minor` bump, taking +into account both its potential for bugfixing (specially on `2.x`!) and the +general hassle it would be to maintain another branch for `npm-registry-client`. + + +* [`6dd61e7`](https://github.com/npm/npm/commit/6dd61e781c145480dc255a3e6a748729868443fd) + Expose `maxsockets` config setting from new `npm-registry-client`. + ([@misterbyrne](https://github.com/misterbyrne)) +* [`8a021c3`](https://github.com/npm/npm/commit/8a021c35184e665bd1f3f70ae2f478af812ab614) + `npm-registry-client@7.1.0`: + Adds support for configuring the max number of concurrent sockets, defaulting + to `50`. + ([@iarna](https://github.com/iarna)) + +#### DOC PATCH IS HERE TOO + +* [`0ae9f74`](https://github.com/npm/npm/commit/0ae9f740001a1bdf5920bc464cf9e284d5d139f0) + [#11748](https://github.com/npm/npm/pull/11748) + Add command aliases as a separate section in documentation for npm + subcommands. + ([@watilde](https://github.com/watilde)) + +#### DEP UPDATES + +* [`bfc3888`](https://github.com/npm/npm/commit/bfc38887f832f701c16b7ee410c4e0220a90399f) + `strip-ansi@3.0.1` + ([@jbnicolai](https://github.com/jbnicolai)) +* [`d5f4d51`](https://github.com/npm/npm/commit/d5f4d51a1b7ea78d7431c7ed4fed30200b2622f8) + `node-gyp@3.3.1`: Fixes Android generator + ([@bnoordhuis](https://github.com/bnoordhuis)) +* [`4119df8`](https://github.com/npm/npm/commit/4119df8aecd2ae57b0492ad8c9a480d900833008) + `glob@7.0.3`: Some path-related fixes for Windows. + ([@isaacs](https://github.com/isaacs)) + +### v2.14.22 (2016-03-03): + +This week is all documentation improvements. In case you hadn't noticed, we +*love* doc patches. We love them so much, we give socks away if you submit +documentation PRs! + +These folks are all getting socks if they ask for them. The socks are +super-sweet. Do you have yours yet? 👣 + +* [`3f3c7d0`](https://github.com/npm/npm/commit/3f3c7d080f052a5db91ff6091f8b1b13f26b53d6) + [#11441](https://github.com/npm/npm/pull/11441) + Add a link to the [Contribution + Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines) to the + main npm docs. + ([@watilde](https://github.com/watilde)) +* [`9f87bb1`](https://github.com/npm/npm/commit/9f87bb1934acb33b678c17b7827165b17c071a82) + [#11441](https://github.com/npm/npm/pull/11441) + Remove Google Group email from npm docs about contributing. + ([@watilde](https://github.com/watilde)) +* [`93eaab3`](https://github.com/npm/npm/commit/93eaab3ee5ad16c7d90d1a4b38a95403fcf3f0f6) + [#11474](https://github.com/npm/npm/pull/11474) + Fix an invalid JSON error overlooked in + [#11196](https://github.com/npm/npm/pull/11196). + ([@robludwig](https://github.com/robludwig)) +* [`a407ca2`](https://github.com/npm/npm/commit/a407ca2bcf6a05117e55cf2ab69376e09094995e) + [#11483](https://github.com/npm/npm/pull/11483) + Add more details and an example to the documentation for bundledDependencies. + ([@gnerkus](https://github.com/gnerkus)) +* [`2c851a2`](https://github.com/npm/npm/commit/2c851a231afd874baa77c42ea5ba539c454ac79c) + [#11490](https://github.com/npm/npm/pull/11490) + Document the `--registry` flag for `npm search`. + ([@plumlee](https://github.com/plumlee)) + +### v2.14.21 (2016-02-25): + +Good news, everyone! There's a new LTS release with a few shinies here and there! + +#### USE THIS ONE INSTEAD + +We had some cases where the versions of npm and node used in some scripting situations were different than the ideal, or what folks actually expected. These should be particularly helpful to our Windows friends! <3 + +* [`02813c5`](https://github.com/npm/npm/commit/02813c55782a9def23f7f1e614edc38c6c88aed3) [#9253](https://github.com/npm/npm/issues/9253) Fix a bug where, when running lifecycle scripts, if the Node.js binary you ran `npm` with wasn't in your `PATH`, `npm` wouldn't use it to run your scripts. ([@segrey](https://github.com/segrey) and [@narqo](https://github.com/narqo)) +* [`a985dd5`](https://github.com/npm/npm/commit/a985dd50e06ee51ba5544577f977c7440c227ba2) [#11526](https://github.com/npm/npm/pull/11526) Prefer locally installed npm in Git Bash -- previous behavior was to use the global one. This was done previously for other shells, but not for Git Bash. ([@destroyerofbuilds](https://github.com/destroyerofbuilds)) + +#### SOCKS FOR THE SOCK GOD + +* [`f961092`](https://github.com/npm/npm/commit/f9610920079d8b88ae464b30007a92c594bd85a8) + [#11636.](https://github.com/npm/npm/issues/11636.) + Document the `--save-bundle` option for `npm install`. + ([@datyayu](https://github.com/datyayu)) +* [`7c908b6`](https://github.com/npm/npm/commit/7c908b618f7123f0a3b860c71eb779e33df35964) + [#11644](https://github.com/npm/npm/pull/11644) + Add documentation for the `test` directory for packages. + ([@lewiscowper](https://github.com/lewiscowper)) + +#### INTERNAL TEST IMPROVEMENTS + +The npm CLI team's time recently has been sunk into npm's many years of tech debt. Specifically, we've been working on improving the test suite. This isn't user visible, but in future should mean a more stable, easier to contribute to npm. Ordinarily we don't report these kinds of changes in the change log, but I thought I might share this week as this chunk is bigger than usual. + +These patches were previously released for `npm@3`, and then ported back to `npm@2` LTS. + +* [`437c537`](https://github.com/npm/npm/commit/437c537e2be5923c6d2c2753154564ba13db8fd9) [#11613](https://github.com/npm/npm/pull/11613) Fix up one of the tests after rebasing the legacy test rewrite to `npm@2`. ([@zkat](https://github.com/zkat)) +* [`55abd0c`](https://github.com/npm/npm/commit/55abd0cc20e87a144d33ce2d459f65e7506da576) [#11613](https://github.com/npm/npm/pull/11613) Test that the `package.json` `files` section and `.npmignore` do what they're supposed to. ([@zkat](https://github.com/zkat)) +* [`a2b99b6`](https://github.com/npm/npm/commit/a2b99b6273ada14b2121ebc0acb7933e630edd9d) [#11613](https://github.com/npm/npm/pull/11613) Test that npm's distribution binary is complete and can be installed and used. ([@iarna](https://github.com/iarna)) +* [`8a8c36c`](https://github.com/npm/npm/commit/8a8c36ce51166006022e5c5d4f8655bbc458d651) [#11613](https://github.com/npm/npm/pull/11613) Test that environment variables are properly passed into scripts. + ([@iarna](https://github.com/zkat)) +* [`a95b550`](https://github.com/npm/npm/commit/a95b5507616bd51e83d7eab5f2337b1aff6480b1) [#11613](https://github.com/npm/npm/pull/11613) Test that we don't leak auth info into the environment. ([@iarna](https://github.com/iarna)) +* [`a1c1c52`](https://github.com/npm/npm/commit/a1c1c52efeab24f6dba154d054f85d9efc833486) [#11613](https://github.com/npm/npm/pull/11613) Remove all the relatively cryptic legacy tests and creates new tap tests that check the same functionality. The *legacy* tests were tests that were originally a shell script that was ported to javascript early in `npm`'s history. ([@iarna](https:\\github.com/iarna) and [@zkat](https://github.com/zkat)) +* [`9d89581`](https://github.com/npm/npm/commit/9d895811d3ee70c2e672f3d8fa06574495b5b488) [#11613](https://github.com/npm/npm/pull/11613) `tacks@1.0.9`: Add a package that provides a tool to generate fixtures from folders and, relatedly, a module that an create and tear down filesystem fixtures easily. ([@iarna](https://github.com/iarna)) + +### v2.14.20 (2016-02-18): + +Hope y'all are having a nice week! As usual, it's a fairly limited release. The +most notable thing is some dependency updates that might help the Node.js CI +setup for Windows run a little better, even if we have some work to do on that +path length things, still. + +#### WHITTLING AWAY AT PATH LENGTHS + +So for all of you who don't know -- Node.js does, in fact, support long Windows +paths. Unfortunately, depending on the tool and the Windows version, a lot of +external tooling does not. This means, for example, that some (all?) versions of +Windows Explorer *can literally never delete npm from their system entirely +because of deeply-nested npm dependencies*. Which is pretty gnarly. + +Incidentally, if you run into that in particularly, you can use +[rimraf](npm.im/rimraf) to remove such files 💁. + +The latest victim of this issue was the Node.js CI setup for testing on Windows, +which uses some tooling or another that croaks on the usual path length limit +for that OS: 255 characters. + +This issue, of course, is largely not a problem as of `npm@3`, with its flat +trees, but it still occasionally and viciously bites LTS. + +We've taken another baby step towards alleviating this in this release by +updating a couple of dependencies that were preventing `npmlog` from deduping, +and then doing a dedupe on that and `gauge`. Hopefully it helps. + +* [`4199551`](https://github.com/npm/npm/commit/41995517e617674710748ab6d262670c96124393) + [#11528](https://github.com/npm/npm/pull/11528) + `npm-install-checks@1.0.7`: Just updates the version of npmlog so we can + dedupe it better. + ([@zkat](https://github.com/zkat)) +* [`14d72c7`](https://github.com/npm/npm/commit/14d72c756b89e2d167eb52c1849263dbddcb9f35) + [#11552](https://github.com/npm/npm/pull/11552) + [#11528](https://github.com/npm/npm/pull/11528) + `node-gyp@3.3.0`: AIX support, new `gyp`, update `npmlog` (for the dedupe), + adds `--cafile` command line option, and allows configuration of Node.js and + io.js mirrors. + ([@rvagg](https://github.com/rvagg)) +* [`0453cb9`](https://github.com/npm/npm/commit/0453cb94b33520eb723b7072cd2654b1d0142533) + [#11528](https://github.com/npm/npm/pull/11528) + Do a `dedupe` on `gauge` to flatten our dependencies a bit more. + ([@zkat](https://github.com/zkat)) + +#### OTHER DEP STUFF + +* [`686c0b3`](https://github.com/npm/npm/commit/686c0b37ec3a7b65f9b3849e1099805e5221c408) + `rimraf@2.5.2`: Just updates to glob@7. + ([@isaacs](https://github.com/isaacs)) + +#### @wyze, DOCUMENTATION HERO OF THE PEOPLE, GETS THEIR OWN HEADER + +* [`7232948`](https://github.com/npm/npm/commit/72329484c775376cb40d5b348f453eaaf2f0b821) + [#11416](https://github.com/npm/npm/pull/11416) + Logout docs were using a section copy-pasted from the adduser docs. + ([@wyze](https://github.com/wyze)) +* [`922b33a`](https://github.com/npm/npm/commit/922b33aba4362e1e90f42e9348f061a1cc73eafb) + [#11414](https://github.com/npm/npm/pull/11414) + Add colon for consistency. + ([@wyze](https://github.com/wyze)) + +### v2.14.19 (2016-02-11): + +Really tiny micro-release this week! The main thing to note is a dependency +update that means we no longer have `graceful-fs@3` in our dependency tree. This +has some implications for being able to run on future Node.js releases, so +better to get this out the door. 😁 + +#### DEPS + +* [`a556e0f`](https://github.com/npm/npm/commit/a556e0f9dcb5d7b44224ba9c16c9d0dc6c8d2532) + `cmd-shim@2.0.2`: Final straggler using `graceful-fs@<4`. + ([@ForbesLindesay](https://github.com/ForbesLindesay)) + +#### DOCS + +* [`69a2d59`](https://github.com/npm/npm/commit/69a2d599bf0cba674ee268483e9bd5c14333b89f) + [#11391](https://github.com/npm/npm/pull/11391) + Fixed versions of `shrinkwrap.json` in examples in documentation for `npm + shrinkwrap`, which did not quite match up. + ([@xcatliu](https://github.com/xcatliu)) + +### v2.14.18 (2016-02-04): + +Clearly our docs are perfect after all those wonderful PRs, 'cause this week's +gonna be all about dependency updates. Note: There is a small security-related +fix included here! + +#### SECURITY-RELATED DEPENDENCY UPDATE + +* [`5c095ef`](https://github.com/npm/npm/commit/5c095eff8dc006980d4d083f2007e4dacff23be3) + [#11341](https://github.com/npm/npm/pull/11341) + `request@2.69.0`: Includes security-related dependency updates involving + `hawk` and `is-my-json-valid` + ([@remy](https://github.com/remy) and [@simov](https://github.com/simov)) + +#### OTHER DEPENDENCY UPDATES + +* [`f9c2668`](https://github.com/npm/npm/commit/f9c2668ca3e6e2602d91250ce61280e5e12d0a00) + `which@1.2.4` + ([@isaacs](https://github.com/isaacs)) +* [`2907c43`](https://github.com/npm/npm/commit/2907c43ad4ef87e5f730c2576f680d6837fcbad0) + `spdx-license-ids@1.2.0` + ([@shinnn](https://github.com/shinnn)) +* [`7734069`](https://github.com/npm/npm/commit/773406960bf7f4a87b2ecb6ebf593c62d0e9f95d) + `rimraf@2.5.1` + ([@isaacs](https://github.com/isaacs)) +* [`f4b39a7`](https://github.com/npm/npm/commit/f4b39a7dd5e1335d92aa22c46d99abb33f271b8b) + `retry@0.9.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`ded1e7a`](https://github.com/npm/npm/commit/ded1e7a1c9c7bec29bb7c30a8f85546670e75b56) + Nest `retry@0.8.0` inside `npm-registry-client` to prevent invalid + dependency issue until the latter gets a dependency update. + ([@zkat](https://github.com/zkat)) +* [`ab9f867`](https://github.com/npm/npm/commit/ab9f8679f9687f91ad03adaab6211a897aeebbae) + `read-package-json@2.0.3` + ([@iarna](https://github.com/iarna)) +* [`b638c41`](https://github.com/npm/npm/commit/b638c41607bb936b9eaaceba2aeeda1d34e3a9b2) + `npmlog@2.0.2` + ([@iarna](https://github.com/iarna)) +* [`49f34af`](https://github.com/npm/npm/commit/49f34af463a674359269025d8438feb6a7c69960) + `init-package-json@1.9.3` + ([@iarna](https://github.com/iarna)) +* [`2305dab`](https://github.com/npm/npm/commit/2305dab4e7bff09bb7686cec653cf1e663dbf15d) + `graceful-fs@4.1.3`: Fixed `.close()` not being patched. + ([@isaacs](https://github.com/isaacs)) +* [`18496d9`](https://github.com/npm/npm/commit/18496d9a0fff94e3652655998e8333056aa52b15) + `fs-write-stream-atomic@1.0.8` + ([@iarna](https://github.com/iarna)) +* [`6637bc7`](https://github.com/npm/npm/commit/6637bc7a0e194d82554cd7c91e1794018fef5943) + `config-chain@1.1.10` + ([@dominictarr](https://github.com/dominictarr)) +* [`4222bad`](https://github.com/npm/npm/commit/4222badffed9e9edacea6a8a96a99a164d376158) + `columnify@1.5.4` + ([@timoxley](https://github.com/timoxley)) +* [`df9016f`](https://github.com/npm/npm/commit/df9016f327a2a9ce492ebc75b882b03069438e13) + `ansi@0.3.1`: Added a license file. + ([@TooTallNate](https://github.com/TooTallNate)) + +### v2.14.17 (2016-01-28): + +Another week, another small LTS release! + +#### BETTER ERROR REPORTING YAY + +So as it turns out, when stuff goes wrong, it's actually nice to give people a +better clue rather than just say "oh well 😏". + +* [`5b8ccb9`](https://github.com/npm/npm/commit/5b8ccb91cf11b4edb463609cd4ed1dee84ed4db0) + [#11289](https://github.com/npm/npm/pull/11289) + 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 previous just + make npm error out– this reduces that to a warning. + ([@evanlucas](https://github.com/evanlucas)) +* [`556e42a`](https://github.com/npm/npm/commit/556e42ac6bab078722ddc1dc6cce4428d001133b) + [#11300](https://github.com/npm/npm/pull/11300) + Report symlinked packages as 'linked' in the output for `npm outdated`. + ([@halhenke](https://github.com/halhenke)) +* [`3842317`](https://github.com/npm/npm/commit/3842317583e0ea2eca78e39aa03f5bc06ba21de7) + [#11290](https://github.com/npm/npm/pull/11290) + Suppress warnings about pre-release node versions. This should get node's CI + passing on non-Windows platforms without needing to modify the node version to + get rid of the pre-release suffix. + ([@iarna](https://github.com/iarna)) + +#### EVERYONE WANTS THOSE NPM SOCKS, GEEZE + +Did you know that you can get npm socks for contributing to our docs? I bet +these people do, and now so do you! + +* [`dcde451`](https://github.com/npm/npm/commit/dcde451cb85a6ca08acc6ef45782c652f1d8fc89) + [#11232](https://github.com/npm/npm/pull/11232) + Update automatically included/excluded packages in `package.json`. + ([@jscissr](https://github.com/jscissr)) +* [`e3f8d5b`](https://github.com/npm/npm/commit/e3f8d5be5ac5ec1d72db42f7abf50cc4a8c5935c) + [#11273](https://github.com/npm/npm/pull/11273) + Add an example for `npm view <pkg> versions`. + ([@vedatmahir](https://github.com/vedatmahir)) +* [`6a06ef2`](https://github.com/npm/npm/commit/6a06ef2252748089f0013de951f2d06160b90306) + [#11272](https://github.com/npm/npm/pull/11272) + Fix a typo in `npm-update.md`. + ([@jonathanp](https://github.com/jonathanp)) +* [`2515ff1`](https://github.com/npm/npm/commit/2515ff1de28f0b261fb25c79a66bd762a65961c4) + [#11215](https://github.com/npm/npm/pull/11215) + Correct small thinko in docs for SPDX expressions. + ([@kemitchell](https://github.com/kemitchell)) +* [`70f897b`](https://github.com/npm/npm/commit/70f897b03da9a5d5d4fd34614e9ee40e6f9e9653) + [#11196](https://github.com/npm/npm/pull/11196) + Make JSON snippets valid JSON in `npm update` docs. + ([@s100](https://github.com/s100)) + +### v2.14.16 (2016-01-21): + +Good to see you all again! It's been a while since we had an LTS release, and +the team continues to work hard to both get the issue tracker under control, and +get our test suite to be awesome and reliable. + +This is also the first LTS release of this year. + +We're gonna have an interesting time -- most of our focus this year will be +around stability and maintainability of the CLI, so you might actually end up +seeing a number of updates even over here, just for the sake of making sure +we're stable, that bugs get fixed, and tests have proper coverage. + +What better way to start this effort, then, than getting Travis tests green, fix +a few things here and there, and tweak a bunch of documentation? 😁 + +#### FIX ALL THE BUGS AND TWEAK ALL THE THINGS + +* [`24b13fb`](https://github.com/npm/npm/commit/24b13fbc57d34db1d5b0a37bcca122c00deba978) + [#11158](https://github.com/npm/npm/pull/11158) + Fix custom node-gyp env var quoting on Windows. + ([@orangemocha](https://github.com/orangemocha)) +* [`e2503f2`](https://github.com/npm/npm/commit/e2503f2be40157b05a9c500ec3b5d16090ffee50) + [#11142](https://github.com/npm/npm/pull/11142) + Fix race condition with `correctMkdir` in the cache directory. + ([@Jimbly](https://github.com/Jimbly)) + +* [`5c0e4c4`](https://github.com/npm/npm/commit/5c0e4c45a29d774ab729e86044377d4e5e424252) + [#10940](https://github.com/npm/npm/pull/10940) + Ignore failures replacing `package.json`. writeFileAtomic is not atomic in + Windows, it fails if the file is being accessed concurrently. + ([@orangemocha](https://github.com/orangemocha)) +* [`2c44d8d`](https://github.com/npm/npm/commit/2c44d8dc8c267d5e054d0175ce2f4750f0986463) + [#10903](https://github.com/npm/npm/pull/10903) + Add tests for `npm adduser --scope`. + ([@ekmartin](https://github.com/ekmartin)) +* [`4cb25d0`](https://github.com/npm/npm/commit/4cb25d0fed5c7792dfd1aec891380ecc1f8a5761) + [#10903](https://github.com/npm/npm/pull/10903) + Add a message informing users when they have been successfully logged in. + ([@ekmartin](https://github.com/ekmartin)) +* [`fe3ec6d`](https://github.com/npm/npm/commit/fe3ec6d6658262054c0c19c55373c21e84ab9f17) + [#10628](https://github.com/npm/npm/pull/10628) + Tell users how to open an issue with a package that has errored. + ([@trodrigues](https://github.com/trodrigues)) + +#### DOCS DOCS DOCS + +We got a TON of lovely documentation patches, too! Thanks all for submitting! + +* [`22482a1`](https://github.com/npm/npm/commit/22482a1f22079d72c3f8ca55c2f0c153bdd024c0) + [#11188](https://github.com/npm/npm/pull/11188) + Briefly explain what's included when you publish. + ([@beaugunderson](https://github.com/beaugunderson)) +* [`fa47724`](https://github.com/npm/npm/commit/fa4772438df0c66a19309dd1c1a3ce43cbee5461) + [#11150](https://github.com/npm/npm/pull/11150) + Advise use of `--depth Infinity` instead of `--depth 9999` in `npm update`. + ([@halhenke](https://github.com/halhenke)) +* [`248ddfe`](https://github.com/npm/npm/commit/248ddfe8f7ddd3318e14bf61de41cab4a638c8a3) + [#11130](https://github.com/npm/npm/pull/11130) + Nuke "using npm programmatically" section from README. The programmatic npm + API is unsupported, and is not guaranteed not to break in non-major versions. + Removing this section so newcomers aren't encouraged to discover or use it. + ([@ljharb](https://github.com/ljharb)) +* [`ae9c452`](https://github.com/npm/npm/commit/ae9c4521222d60ab4a69c19fee5e361c62f41fae) + [#11128](https://github.com/npm/npm/pull/11128) + Add link to local paths section indocs for `package.json`. + ([@orangejulius](https://github.com/orangejulius)) +* [`663a8c6`](https://github.com/npm/npm/commit/663a8c6b4b1647f9b86c15ef32e30023edc8c060) + [#11044](https://github.com/npm/npm/pull/11044) + Update default value documentation for the color option in npm's config. + ([@scottaddie](https://github.com/scottaddie)) +* [`5c1dda0`](https://github.com/npm/npm/commit/5c1dda0d3a18b2954872dba33fbc696ff0700ffe) + [#11037](https://github.com/npm/npm/pull/11037) + Correct the name property max length constraint verbiage. + ([@scottaddie](https://github.com/scottaddie)) +* [`8288365`](https://github.com/npm/npm/commit/8288365d08e97fa3a5b0d31703c015a8be49e07f) + [#10990](https://github.com/npm/npm/pull/10990) + Update folder docs to reflect that process.installPrefix was removed as of + 0.8.x. + ([@jeffmcmahan](https://github.com/jeffmcmahan)) +* [`61d63fa`](https://github.com/npm/npm/commit/61d63fa22c4f09742180c2de460a4ffb6c32738e) + [#10790](https://github.com/npm/npm/pull/10790) + Clarify that `npm install foo` is the same as `npm install foo@latest` now. + ([@cvrebert](https://github.com/cvrebert)) +* [`442c920`](https://github.com/npm/npm/commit/442c9207f375354c91d36df8711ba2d33e1c97f3) + [#10789](https://github.com/npm/npm/pull/10789) + Link over to `npm-dist-tag(1)` in `npm install` docs when they talk about the + `pkg@<tag>` syntax. + ([@cvrebert](https://github.com/cvrebert)) +* [`dca7a5e`](https://github.com/npm/npm/commit/dca7a5e2be3bfa306a870a123707d35c732406c0) + [#10788](https://github.com/npm/npm/pull/10788) + Link to tag docs in docs for `npm publish --tag`. + ([@cvrebert](https://github.com/cvrebert)) +* [`a72904e`](https://github.com/npm/npm/commit/a72904e8d4ab1d43ae8150fbe3f6468b0cbb1efd) + [#10787](https://github.com/npm/npm/pull/10787) + Explain why the `latest` tag matters. + ([@cvrebert](https://github.com/cvrebert)) +* [`9d0697a`](https://github.com/npm/npm/commit/9d0697a534046df7efda32170014041bbc1f4e7d) + [#10785](https://github.com/npm/npm/pull/10785) + Replace some quite marks in `npm dist-tag` docs for the sake of consistency. + ([@cvrebert](https://github.com/cvrebert)) + +#### I REALLY LIKE GREEN. CAN YOU TELL? + +So Travis is all green now on `npm@2`, thanks to the removal of nock and a few +other test suite tweaks. This is a fantastic step towards making sure we can all +have confidence in our test suite! 🎉 + +* [`64995be`](https://github.com/npm/npm/commit/64995be6d874356b15c136f9867302d805dfe1e9) [`75ab216`](https://github.com/npm/npm/commit/75ab2164cf79e28ac7f7ebe714f3c5aee99c6626) [`a9f6fe9`](https://github.com/npm/npm/commit/a9f6fe9dc558f17c4a7b9eb83329ac080f7df4b7) [`649c193`](https://github.com/npm/npm/commit/649c193adadf714c2819837f9372a29d724a5ec0) [`94cb05e`](https://github.com/npm/npm/commit/94cb05eaa9e5ad6675cf15c4ac0a44fbdde05900) [`6541690`](https://github.com/npm/npm/commit/65416907008061ac5a5f66b1630a57776803b526) [`255be6f`](https://github.com/npm/npm/commit/255be6f5bca9e3d216f3a5cbdf6714c6c9fcf132) [`9e84fa4`](https://github.com/npm/npm/commit/9e84fa43c49d04cf86ca1678e2a61412f5559cb9) [`8a587b0`](https://github.com/npm/npm/commit/8a587b0c1696ae7302891fa6355fc3e8670e00d3) [`bf812a5`](https://github.com/npm/npm/commit/bf812a54e497a573493346399798aa0b9373ac24) + [#10903](https://github.com/npm/npm/pull/10903) + Get rid of nock from tests, and get Travis green. + ([@zkat](https://github.com/zkat) and [@iarna](https://github.com/iarna)) +* [`70a5310`](https://github.com/npm/npm/commit/70a5310712c6666e753ca8f3bfff4a780ec6292d) + `npm-registry-couchapp@2.6.12`: + Better 0.8 compatibility, and ability to run in travis docker stuff. This + means the test suite should run a lot faster, too! + ([@iarna](https://github.com/iarna)) +* [`28fae39`](https://github.com/npm/npm/commit/28fae399212eda5554e6c0ffd8c9591144ab7b9d) + Get rid of sudo, for Travis! + ([@zkat](https://github.com/zkat)) + +### v2.14.15 (2015-12-10): + +Did you know that Bob Ross reached the rank of master sergeant in the US Air +Force before becoming perhaps the most soothing painter of all time? + +#### TWO HAPPY LITTLE BUG FIXES + +* [`f482664`](https://github.com/npm/npm/commit/f4826645dc6b5c0f05c5f9187efb28c1a293554f) + [#10505](https://github.com/npm/npm/issues/10505) `npm ls --json --depth=0` + now respects the depth parameter, when it is zero and when it is not zero. + ([@MarkReeder](https://github.com/MarkReeder)) +* [`529fa1f`](https://github.com/npm/npm/commit/529fa1ff2c6432a773af99a1c5209c0865f7a19c) + [#9099](https://github.com/npm/npm/issues/9099) I had always thought you + could run `npm version` from subdirectories in your project, which is great, + because now you can. I guess I was just ahead of my time. + ([@ekmartin](https://github.com/ekmartin)) + +#### NOW PAINT IN SOME NICE DOCS CHANGES + +* [`1fc7f2b`](https://github.com/npm/npm/commit/1fc7f2b523ea760e08adb9b861b28e3ba450e565) + [#10546](https://github.com/npm/npm/issues/10546) Goodbye, FAQ! You were + cheeky and fun until you weren't! Don't worry: npm still loves everyone, + especially you! ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`7fe6950`](https://github.com/npm/npm/commit/7fe6950b44d241bb4d90857a44d89d750af1e2b3) + [#10570](https://github.com/npm/npm/issues/10570) Update documentation URLs + to be HTTPS everywhere sensible. No HTTP shall be spared! + ([@rsp](https://github.com/rsp)) +* [`96ebb90`](https://github.com/npm/npm/commit/96ebb902439e4f6f37f8beffb589769146fecf24) + [#10650](https://github.com/npm/npm/issues/10650) Correctly note that there + are two lifecycle scripts run by an install phase in an example, instead of + three. ([@eymengunay](https://github.com/eymengunay)) +* [`5196893`](https://github.com/npm/npm/commit/5196893a7496f68a514b83641ff6b72f14d664dd) + [#10687](https://github.com/npm/npm/issues/10687) `npm outdated`'s output can + be a little puzzling sometimes. I've attempted to make it clearer, with some + examples, of what's going on with "wanted" and "latest" in more cases. + ([@othiym23](https://github.com/othiym23)) +* [`8e6712d`](https://github.com/npm/npm/commit/8e6712d4ee128858cab36c77723e35bddbb977ba) + [#10700](https://github.com/npm/npm/issues/10700) Hey, do you remember when + `search.npmjs.org` was a thing? I think I do? The last time I used it was in + like 2012, and it's gone now, so remove it from the docs. + ([@gagern](https://github.com/gagern)) +* [`27d2612`](https://github.com/npm/npm/commit/27d2612b3f5aa88b12c943d04e162ce4c3a350ae) + `semver@5.1.0`: Include BNF for SemVer expression grammar (which is also now + included in `npm help semver`). ([@isaacs](https://github.com/isaacs)) + +#### LAND YOUR DEPENDENCY UPGRADES IN PAIRS SO EVERYONE HAS A FRIEND + +* [`fc6c3c5`](https://github.com/npm/npm/commit/fc6c3c53a31e9e11c2616fcd378202e5b80bf286) + `request@2.67.0` ([@simov](https://github.com/simov)) +* [`07013fd`](https://github.com/npm/npm/commit/07013fd0fd55a2eb31fb9334631ee5d0dd5c41bb) + [isaacs/rimraf#89](https://github.com/isaacs/rimraf/pull/89) `rimraf@2.4.4` + ([@zerok](https://github.com/zerok)) +* [`bc149be`](https://github.com/npm/npm/commit/bc149bef871f0f00639509898cece531af3aa8b3) + [isaacs/once#7](https://github.com/isaacs/once/pull/7) `once@1.3.3` + ([@floatdrop](https://github.com/floatdrop)) +* [`ac598d3`](https://github.com/npm/npm/commit/ac598d36e1ad207bc0d8a7eadfd84b26146aec1f) + `lru-cache@3.2.0` ([@isaacs](https://github.com/isaacs)) +* [`1b915ce`](https://github.com/npm/npm/commit/1b915ce1e0787ccb6d8aa235d002d66565f2175d) + `npm-registry-client@7.0.9` ([@othiym23](https://github.com/othiym23)) +* [`df7dd78`](https://github.com/npm/npm/commit/df7dd78b8fe3cc58202996fa6c994fc55419bfa5) + `tap@2.3.1` ([@isaacs](https://github.com/isaacs)) + +### v2.14.14 (2015-12-03): + +#### FIX URL IN LICENSE + +The license incorrectly identified the registry URL as `registry.npmjs.com` and +this has been corrected to `registry.npmjs.org`. + +* [`6051a69`](https://github.com/npm/npm/commit/6051a69b1adc80f5f200077067e831643f655bd4) + [#10685](https://github.com/npm/npm/pull/10685) + Fix npm public registry URL in notices. + ([@kemitchell](https://github.com/kemitchell)) + +#### NO MORE MD5 + +We updated modules that had been using MD5 for non-security purposes. While +this is perfectly safe, if you compile Node in FIPS-compliance mode it will +explode if you try to use MD5. We've replaced MD5 with Murmur, which conveys +our intent better and is faster to boot. + +* [`30b5994`](https://github.com/npm/npm/commit/30b599496a9762482e1cef945a378e3a534fd366) + [#10629](https://github.com/npm/npm/issues/10629) + `write-file-atomic@1.1.4` + ([@othiym23](https://github.com/othiym23)) +* [`68c63ff`](https://github.com/npm/npm/commit/68c63ff1279d3d5ea7b2c970ab5562a8e0536f27) + [#10629](https://github.com/npm/npm/issues/10629) + `fs-write-stream-atomic@1.0.5` + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`e48e5a9`](https://github.com/npm/npm/commit/e48e5a90b4dcf76124b7e9ea3b295c1383e7f0c8) + [nodejs/node-gyp#831](https://github.com/nodejs/node-gyp/pull/831) + `node-gyp@3.2.1`: Improved \*BSD support. + ([@bnoordhuis](https://github.com/bnoordhuis)) + +### v2.14.13 (2015-11-25): + +#### THE npm CLI !== THE npm REGISTRY !== npm, INC. + +npm-the-CLI is licensed under the terms of the [Artistic License +2.0](https://github.com/npm/npm/blob/8d79c1a39dae908f27eaa37ff6b23515d505ef29/LICENSE), +which is a liberal open-source license that allows you to take this code and do +pretty much whatever you like with it (that is, of course, not legal language, +and if you're doing anything with npm that leaves you in doubt about your legal +rights, please seek the review of qualified counsel, which is to say, not +members of the CLI team, none of whom have passed the bar, to my knowledge). At +the same time the primary registry the CLI uses when looking up and downloading +packages is a commercial service run by npm, Inc., and it has its own [Terms of +Use](https://www.npmjs.com/policies/terms). + +Aside from clarifying the terms of use (and trying to make sure they're more +widely known), the only recent changes to npm's licenses have been making the +split between the CLI and registry clearer. You are still free to do whatever +you like with the CLI's source, and you are free to view, download, and publish +packages to and from `registry.npmjs.org`, but now the existing terms under +which you can do so are more clearly documented. Aside from the two commits +below, see also [the release notes for +`npm@2.14.11`](https://github.com/npm/npm/releases/tag/v2.14.11), which is where +the split between the CLI's code and the terms of use for the registry was +first made more clear. + +* [`1f3e936`](https://github.com/npm/npm/commit/1f3e936aab6840667948ef281e0c3621df365131) + [#10532](https://github.com/npm/npm/issues/10532) Clarify that + `registry.npmjs.org` is the default, but that you're free to use the npm CLI + with whatever registry you wish. ([@kemitchell](https://github.com/kemitchell)) +* [`6733539`](https://github.com/npm/npm/commit/6733539eeb9b32a5f2d1a6aa797987e2252fa760) + [#10532](https://github.com/npm/npm/issues/10532) Having semi-duplicate + release information in `README.md` was confusing and potentially inaccurate, + so remove it. ([@kemitchell](https://github.com/kemitchell)) + +#### EASE UP ON WINDOWS BASH USERS + +It turns out that a fair number of us use bash on Windows (through MINGW or +bundled with Git, plz – Cygwin is still a bridge too far, for both npm and +Node.js). [@jakub-g](https://github.com/jakub-g) did us all a favor and relaxed +the check for npm completion to support MINGW bash. Thanks, Jakub! + +* [`460cc09`](https://github.com/npm/npm/commit/460cc0950fd6a005c4e5c4f85af807814209b2bb) + [#10156](https://github.com/npm/npm/issues/10156) completion: enable on + Windows in git bash ([@jakub-g](https://github.com/jakub-g)) + +#### MAKE NODE-GYP A LITTLE BLUER + +* [`333e118`](https://github.com/npm/npm/commit/333e1181082842c21edc62f0ce515928424dff1f) + `node-gyp@3.2.0`: Support AIX, use `which` to find Python, updated to a newer + version of `gyp`, and more! ([@bnoordhuis](https://github.com/bnoordhuis)) + +#### WE LIKE SPDX AND ALL BUT IT'S NOT ACTUALLY A DIRECT DEP, SORRY + +* [`1f4b4bb`](https://github.com/npm/npm/commit/1f4b4bbdf8758281beecb7eaf75d05a6c4a77c15) + Removed `spdx` as a direct npm dependency, since we don't actually need it at + that level, and updated subdeps for `validate-npm-package-license` + ([@othiym23](https://github.com/othiym23)) + +#### A BOUNTEOUS THANKSGIVING CORNUCOPIA OF DOC TWEAKS + +These are great! Keep them coming! Sorry for letting them pile up so deep, +everybody. Also, a belated Thanksgiving to our Canadian friends, and a happy +Thanksgiving to all our friends in the USA. + +* [`6101f44`](https://github.com/npm/npm/commit/6101f44737645d9379c3396fae81bbc4d94e1f7e) + [#10250](https://github.com/npm/npm/issues/10250) Correct order of `org:team` + in `npm team` documentation. ([@louislarry](https://github.com/louislarry)) +* [`e8769f9`](https://github.com/npm/npm/commit/e8769f9807b91582c15ef130733e2e72b6c7bda4) + [#10371](https://github.com/npm/npm/issues/10371) Remove broken / duplicate + link to tag. ([@WickyNilliams](https://github.com/WickyNilliams)) +* [`1ae2dbe`](https://github.com/npm/npm/commit/1ae2dbe759feb80d8634569221ec6ee2c6d1d1ff) + [#10419](https://github.com/npm/npm/issues/10419) Remove references to + nonexistent `npm-rm(1)` documentation. ([@KenanY](https://github.com/KenanY)) +* [`777a271`](https://github.com/npm/npm/commit/777a271830a42d4ee62540a89f764a6e7d62de19) + [#10474](https://github.com/npm/npm/issues/10474) Clarify that install finds + dependencies in `package.json`. ([@sleekweasel](https://github.com/sleekweasel)) +* [`dcf4b5c`](https://github.com/npm/npm/commit/dcf4b5cbece1b0ef55ab7665d9acacc0b6b7cd6e) + [#10497](https://github.com/npm/npm/issues/10497) Clarify what a package is + slightly. ([@aredridel](https://github.com/aredridel)) +* [`447b3d6`](https://github.com/npm/npm/commit/447b3d669b2b6c483b8203754ac0a002c67bf015) + [#10539](https://github.com/npm/npm/issues/10539) Remove an extra, spuriously + capitalized letter. ([@alexlukin-softgrad](https://github.com/alexlukin-softgrad)) + +### v2.14.12 (2015-11-19): + +#### TEEN ORCS AT THE GATES + +This week heralds the general release of the primary npm registry's [new +support for private packages for +organizations](http://blog.npmjs.org/post/133542170540/private-packages-for-organizations). +For many potential users, it's the missing piece needed to make it easy for you +to move your organization's private work onto npm. And now it's here! The +functionality to support it has been in place in the CLI for a while now, +thanks to [@zkat](https://github.com/zkat)'s hard work. + +During our final testing before the release, our ace support team member +[@snopeks](https://github.com/snopeks) noticed that there had been some drift +between the CLI team's implementation and what npm was actually preparing to +ship. In the interests of everyone having a smooth experience with this +_extremely useful_ new feature, we quickly made a few changes to square up the +CLI and the web site experiences. + +* [`0e8b15e`](https://github.com/npm/npm/commit/0e8b15e9fbc89e31bd00e573b648846beddfb835) + [#9327](https://github.com/npm/npm/issues/9327) `npm access` no longer has + problems when run in a directory that doesn't contain a `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`c4e939c`](https://github.com/npm/npm/commit/c4e939c1d493601d25dcb88e6ffcca73076fd3fd) + [npm/npm-registry-client#126](https://github.com/npm/npm-registry-client/issues/126) + `npm-registry-client@7.0.8`: Allow the CLI to grant, revoke, and list + permissions on unscoped (public) packages on the primary registry. + ([@othiym23](https://github.com/othiym23)) + +#### A BRIEF NOTE ON NPM'S BACKWARDS COMPATIBILITY + +We don't often have much to say about the changes we make to our internal +testing and tooling, but I'm going to take this opportunity to reiterate that +npm tries hard to maintain compatibility with a wide variety of Node versions. +As this change shows, we want to ensure that npm works the same across: + +* Node.js 0.8 +* Node.js 0.10 +* Node.js 0.12 +* the latest io.js release +* Node.js 4 LTS +* Node.js 5 + +Contributors who send us pull requests often notice that it's very rare that +our tests pass across all of those versions (ironically, almost entirely due to +the packages we use for testing instead of any issues within npm itself). We're +currently beginning an effort, lasting the rest of 2015, to clean up our test +suite, and not only get it passing on all of the above versions of Node.js, but +working solidly on Windows as well. This is a compounding form of technical +debt that we're finally paying down, and our hope is that cleaning up the tests +will produce a more robust CLI that's a lot easier to write patches for. + +* [`d743620`](https://github.com/npm/npm/commit/d743620a0005213a65d25de771661b4d48a09717) + [#10233](https://github.com/npm/npm/issues/10233) Update Node.js versions + that Travis uses to test npm. ([@iarna](https://github.com/iarna)) + +#### TYPOS IN THE LICENSE, OH MY + +* [`58ac241`](https://github.com/npm/npm/commit/58ac241f556b2c202a8ee33321965e2540361ca7) + [#10478](https://github.com/npm/npm/issues/10478) Correct two typos in npm's + LICENSE. ([@jorrit](https://github.com/jorrit)) + +### v2.14.11 (2015-11-12): + +#### ASK FOR NOTHING, GET LATEST + +When you run `npm install foo`, you probably expect that you'll get the +`latest` version of `foo`, whatever that is. And good news! That's what this +change makes it do. + +We _think_ this is what everyone wants, but if this causes problems for you, we +want to know! If it proves problematic for people we will consider reverting it +(preferrably before this becomes `npm@latest`). + +Previously, when you ran `npm install foo` we would act as if you typed `npm +install foo@*`. Now, like any range-type specifier, in addition to matching the +range, it would also have to be `<=` the value of the `latest` dist-tag. +Further, it would exclude prerelease versions from the list of versions +considered for a match. + +This worked as expected most of the time, unless your `latest` was a prerelease +version, in which case that version wouldn't be used, to everyone's surprise. + +* [`6f0a646`](https://github.com/npm/npm/commit/6f0a646cd865b24fe3ff25365bf5421780e63e01) + [#10189](https://github.com/npm/npm/issues/10189) `npm-package-arg@4.1.0`: + Change the default version from `*` to `latest`. + ([@zkat](https://github.com/zkat)) + +#### LICENSE CLARIFICATION + +* [`54a9046`](https://github.com/npm/npm/commit/54a90461f068ea89baa5d70248cdf1581897936d) + [#10326](https://github.com/npm/npm/issues/10326) Clarify what-all is covered + by npm's license and point to the registry's terms of use. + ([@kemitchell](https://github.com/kemitchell)) + +#### CLOSER TO GREEN TRAVIS + +* [`28efd3d`](https://github.com/npm/npm/commit/28efd3d7dfb2fa3755076ae706ea4d38c6ee6900) + [#10232](https://github.com/npm/npm/issues/10232) `nock@1.9.0`: Downgrade + nock to a version that doesn't depend on streams2 in core so that more of our + tests can pass in 0.8. ([@iarna](https://github.com/iarna)) + +#### A BUG FIX + +* [`eacac8f`](https://github.com/npm/npm/commit/eacac8f05014d15217c3d8264d0b00a72eafe2d2) + [#9965](https://github.com/npm/npm/issues/9965) Fix a corrupt `package.json` + file introduced by a merge conflict in + [`022691a`](https://github.com/npm/npm/commit/022691a). + ([@waynebloss](https://github.com/waynebloss)) + +#### A DEPENDENCY UPGRADE + +* [`ea7d8e0`](https://github.com/npm/npm/commit/ea7d8e00a67a3d5877ed72c9728909c848468a9b) + [npm/nopt#51](https://github.com/npm/nopt/pull/51) `nopt@3.0.6`: Allow + types checked to be validated by passed-in name in addition to the JS name of + the type / class. ([@wbecker](https://github.com/wbecker)) + +### v2.14.10 (2015-11-05): + +There's nothing in here that that isn't in the `npm@3.4.0` release notes, but +all of the commit shasums have been adjusted to be correct. Enjoy! + +#### BUG FIXES VIA DEPENDENCY UPDATES + +* [`204c558`](https://github.com/npm/npm/commit/204c558c06637a753c0b41d0cf19f564a1ac3715) + [#8640](https://github.com/npm/npm/issues/8640) + [npm/normalize-package-data#69](https://github.com/npm/normalize-package-data/pull/69) + `normalize-package-data@2.3.5`: Fix a bug where if you didn't specify the + name of a scoped module's binary, it would install it such that it was + impossible to call it. ([@iarna](https://github.com/iarna)) +* [`bbdf4ee`](https://github.com/npm/npm/commit/bbdf4ee0a3cd12be6a2ace255b67d573a72f1f8f) + [npm/fstream-npm#14](https://github.com/npm/fstream-npm/pull/14) + `fstream-npm@1.0.7`: Only filter `config.gypi` when it's in the build + directory. ([@mscdex](https://github.com/mscdex)) +* [`d82ff81`](https://github.com/npm/npm/commit/d82ff81403e906931fac701775723626dcb443b3) + [npm/fstream-npm#15](https://github.com/npm/fstream-npm/pull/15) + `fstream-npm@1.0.6`: Stop including directories that happened to have names + matching whitelisted npm files in npm module tarballs. The most common cause + was that if you had a README directory then everything in it would be + included if wanted it or not. ([@taion](https://github.com/taion)) + +#### DOCUMENTATION FIXES + +* [`16361d1`](https://github.com/npm/npm/commit/16361d122f2ff6d1a4729c66153b7c24c698fd19) + [#10036](https://github.com/npm/npm/pull/10036) Fix typo / over-abbreviation. + ([@ifdattic](https://github.com/ifdattic)) +* [`d1343dd`](https://github.com/npm/npm/commit/d1343dda42f113dc322f95687f5a8c7d71a97c35) + [#10176](https://github.com/npm/npm/pull/10176) Fix broken link, scopes => + scope. ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`110663d`](https://github.com/npm/npm/commit/110663d000a3908a4853393d9abae481700cf4dc) + [#9460](https://github.com/npm/npm/issue/9460) Specifying the default command + run by "npm start" and the fact that you can pass it arguments. + ([@JuanCaicedo](https://github.com/JuanCaicedo)) + +#### DEPENDENCY UPDATES FOR THEIR OWN SAKE + +* [`7476d2d`](https://github.com/npm/npm/commit/7476d2d31552a41671c425aa7fcc2844e0381008) + [npm/npmlog#19](https://github.com/npm/npmlog/pull/19) + `npmlog@2.0.0`: Make it possible to emit log messages with `error` as the + prefix. + ([@bengl](https://github.com/bengl)) +* [`6ca7888`](https://github.com/npm/npm/commit/6ca7888862cfe8bf802dc7c66632c102acd94cf5) + `read-package-json@2.0.2`: Minor cleanups. + ([@KenanY](https://github.com/KenanY)) + +### v2.14.9 (2015-10-29): + +There's still life in `npm@2`, but for now, enjoy these dependency upgrades! +Also, [@othiym23](https://github.com/othiym23) says hi! _waves_ +[@zkat](https://github.com/zkat) has her hands full, and +[@iarna](https://github.com/iarna)'s handling `npm@3`, so I'm dealing with +`npm@2` and the totally nonexistent weird bridge `npm@1.4` LTS release that may +or may not be happening this week. + +#### CAN'T STOP WON'T STOP UPDATING THOSE DEPENDENCIES + +* [`f52f0cb`](https://github.com/npm/npm/commit/f52f0cb51526314197e9d67619feebbd82a397b7) + [#10150](https://github.com/npm/npm/issues/10150) `chmodr@1.0.2`: Use + `fs.lstat()` to check if an entry is a directory, making `chmodr()` work + properly with NFS mounts on Windows. ([@sheerun](https://github.com/sheerun)) +* [`f7011d7`](https://github.com/npm/npm/commit/f7011d7b3b1d9148a6cd8f7b8359d6fe3269a912) + [#10150](https://github.com/npm/npm/issues/10150) `which@1.2.0`: Additional + command-line parameters, which is nice but not used by npm. + ([@isaacs](https://github.com/isaacs)) +* [`ebcc0d8`](https://github.com/npm/npm/commit/ebcc0d8629388da0b849bbbad590382cd7268f51) + [#10150](https://github.com/npm/npm/issues/10150) `minimatch@3.0.0`: Don't + package browser version. ([@isaacs](https://github.com/isaacs)) +* [`8c98dce`](https://github.com/npm/npm/commit/8c98dce5ffe242bafbe92b849e73e8de1803e256) + [#10150](https://github.com/npm/npm/issues/10150) `fstream-ignore@1.0.3`: + Upgrade to use `minimatch@3` (for deduping purposes). + ([@othiym23](https://github.com/othiym23)) +* [`db9ef33`](https://github.com/npm/npm/commit/db9ef337c253ecf21c921055bf8742e10d1cb3bb) + [#10150](https://github.com/npm/npm/issues/10150) `request@2.65.0`: + Dependency upgrades and a few bug fixes, mostly related to cookie handling. + ([@simov](https://github.com/simov)) + +#### DEVDEPENDENCIES TOO, I GUESS, IT'S COOL + +* [`dfbf621`](https://github.com/npm/npm/commit/dfbf621afa09c46991249b4f9a995d1823ea7ede) + [#10150](https://github.com/npm/npm/issues/10150) `tap@2.2.0`: Better + handling of test order handling (including some test fixes for npm). + ([@isaacs](https://github.com/isaacs)) +* [`cf5ad5a`](https://github.com/npm/npm/commit/cf5ad5a8c88bfd72e30ef8a8d1d3c5508e0b3c23) + [#10150](https://github.com/npm/npm/issues/10150) `nock@2.16.0`: More + expectations, documentation, and bug fixes. + ([@pgte](https://github.com/pgte)) + +### v2.14.8 (2015-10-08): + +#### SLOWLY RECOVERING FROM FEELINGS + +OS&F is definitely my favorite convention I've gone to. Y'all should check it +out next year! Rebecca and Kat are back, although Forrest is out at +[&yet conf](http://andyetconf.com/). + +This week sees another tiny LTS release with non-code-related patches -- just +CI/release things. + +Meanwhile, have you heard? `npm@3` is much faster now! Go upgrade with `npm +install -g npm@latest` and give it a whirl if you haven't already! + +#### IF YOU CHANGE CASING ON A FILE, YOU ARE NOT MY FRIEND + +Seriously. I love me some case-sensitive filesystems, but a lot of us have to +deal with `git` and its funky support for case normalizing systems. Have mercy +and just don't bother if all you're changing is casing, please? Otherwise, I +have to do this little dance to prevent horrible conflicts. + +* [`c3a7b61`](https://github.com/npm/npm/commit/c3a7b619786650a45653c8b55b8741fc7bb5cfda) + [#9804](https://github.com/npm/npm/pulls/9804) Remove the readme file with + weird casing. + ([@zkat](https://github.com/zkat)) +* [`f3f619e`](https://github.com/npm/npm/commit/f3f619e06e4be1378dbf286f897b50e9c69c9557) + [#9804](https://github.com/npm/npm/pulls/9804) Add the readme file back in, + with desired casing. + ([@zkat](https://github.com/zkat)) + +#### IDK. OUR CI DOESN'T EVEN FULLY WORK YET BUT SURE + +Either way, it's nice to make sure we're running stuff on the latest Node. `4.2` +is getting released very soon, though (this week?), and that'll be the first +official LTS release! + +* [`bd0b9ab`](https://github.com/npm/npm/commit/bd0b9ab6e60a31448794bbd88f94672572c3cb55) + [#9827](https://github.com/npm/npm/pulls/9827) Add node `4.0` and `4.1` to + TravisCI + ([@JaKXz](https://github.com/JaKXz)) + +### v2.14.7 (2015-10-01): + +#### MORE RELEASE STAGGERING?! + +Hi all, and greetings from [Open Source & Feelings](http://osfeels.com)! + +So we're switching gears a little with how we handle our weekly releases: from +now on, we're going to stagger release weeks between dependency bumps and +regular patches. So, this week, aside from a doc change, we'll be doing only +version bumps. Expect actual patches next week! + +#### TOTALLY FOLLOWING THE RULES ALREADY + +So I snuck this in, because it's our own [@snopeks](https://github.com/snopeks)' +first contribution to the main `npm` repo. She's been helping with building +support documents for Orgs, and contributed her general intro guide to the new +feature so you can read it with `npm help orgs` right in your terminal! + +* [`8324ea0`](https://github.com/npm/npm/commit/8324ea023ace4e08b6b8959ad199e2457af9f9cf) + [#9761](https://github.com/npm/npm/pull/9761) Added general user guide for + Orgs. + ([@snopeks](https://github.com/snopeks)) + +#### JUST. ONE. MORE. + +* [`9a502ca`](https://github.com/npm/npm/commit/9a502ca96e2d43ec75a8f684c9ca33af7e910f0a) + Use unique package name in tests to work around weird test-state-based + failures. + ([@iarna](https://github.com/iarna)) + +#### OKAY ACTUALLY THE THING I WAS SUPPOSED TO DO + +Anyway -- here's your version bump! :) + +* [`4aeb94c`](https://github.com/npm/npm/commit/4aeb94c9f0df3f41802cf2e0397a998f3b527c25) + `request@2.64.0`: No longer defaulting to `application/json` for `json` + requests. Also some minor doc and packaging patches. + ([@simov](https://github.com/simov)) +* [`a18b213`](https://github.com/npm/npm/commit/a18b213e6945a8f5faf882927829ac95f844e2aa) + `glob@5.0.15`: Upgraded `minimatch` dependency. + ([@isaacs](https://github.com/isaacs)) +* [`9eb64d4`](https://github.com/npm/npm/commit/9eb64e44509519ca9d788502edb2eba4cea5c86b) + `nock@2.13.0` + ([@pgte](https://github.com/pgte)) + +### v2.14.6 (2015-09-24): + +#### `¯\_(ツ)_/¯` + +Since `2.x` is LTS now, you can expect a slowdown in overall release sizes. On +top of that, we had our all-company-npm-internal-conf thing on Monday and +Tuesday so there wasn't really time to do much at all. + +Still, we're bringing you a couple of tiny little changes this week! + +* [`7b7da13`](https://github.com/npm/npm/commit/7b7da13c6cdf5eae53c20d5c69afc4c16e6f715d) + [#9471](https://github.com/npm/npm/pull/9471) When the port for a tarball is + different than the registry it's in, but the hostname is the same, the + protocol is now allowed to change, too. + ([@fastest963](https://github.com/fastest963)) +* [`6643ada`](https://github.com/npm/npm/commit/6643adaf9f37f08893e3ad28b797c55a36b2a152) + `request@2.63.0`: Use `application/json` as the default content type when + making `json` requests. + ([@simov](https://github.com/simov)) + +### v2.14.5 (2015-09-17): + +#### NPM IS DEAD. LONG LIVE NPM + +That's right folks. As of this week, `npm@latest` is `npm@3`! There's some +really great shiny new things over there, and you should really take a look. + +Many kudos to [@iarna](https://github.com/iarna) for her hard work on `npm@3`! + +Don't worry, we'll keep `2.x` around for a while (as LTS), but you won't see +many, if any, new features on this end. From now on, we're going to use +`latest-2` and `next-2` as the dist tags for the `npm@2` branch. + +#### OKAY THAT'S FINE CAN I DEPRECATE THINGS NOW? + +Yes! Specially if you're using scoped packages. Apparently, deprecating them +never worked, but that should be better now. :) + +* [`eca7b24`](https://github.com/npm/npm/commit/eca7b24de9a0090da02a93a69726f5e70ab80543) + [#9558](https://github.com/npm/npm/issues/9558) Add tests for npm deprecate. + ([@zkat](https://github.com/zkat)) +* [`648fe16`](https://github.com/npm/npm/commit/648fe16157ef0db22395ae056d1dd4b4c1605bf4) + [#9558](https://github.com/npm/npm/issues/9558) `npm-registry-client@7.0.7`: + Fixes `npm deprecate` so you can actually deprecate scoped modules now (it + never worked). + ([@zkat](https://github.com/zkat)) + +#### WTF IS `node-waf` + +idk. Some old thing. We don't talk about it anymore. + +* [`cf1b39f`](https://github.com/npm/npm/commit/cf1b39fc95a9ffad7fba4c2fee705c53b19d1d16) + [#9584](https://github.com/npm/npm/issues/9584) Fix ancient references to + `node-waf` in the docs to refer to the `node-gyp` version of things. + ([@KenanY](https://github.com/KenanY)) + +#### THE `graceful-fs` AND `node-gyp` SAGA CONTINUES + +Last week had some sweeping `graceful-fs` upgrades, and this takes care of one +of the stragglers, as well as bumping `node-gyp`. `node@4` users might be +excited about this, or even `node@<4` users who previously had to cherry-pick a +bunch of patches to get the latest npm working. + +* [`e07354f`](https://github.com/npm/npm/commit/e07354f3ff3a6be568fe950f1f825897f72912d8) + `sha@2.0.1`: Upgraded graceful-fs! + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`83cb6ee`](https://github.com/npm/npm/commit/83cb6ee4045b85e565e9678ca1878877e1dc75bd) + `node-gyp@3.0.3` + ([@rvagg](https://github.com/rvagg)) + +#### DEPS! DEPS! MORE DEPS! OK STOP DEPS + +* [`0d60888`](https://github.com/npm/npm/commit/0d608889615a1cb63f5f852337e955053f201aeb) + `normalize-package-data@2.3.4`: Use an external package to check for built-in + node modules. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`79b4dac`](https://github.com/npm/npm/commit/79b4dac11f1c2d8ad5489fc3104734e1c10d4793) + `retry@0.8.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`c164941`](https://github.com/npm/npm/commit/c164941d3c792904d5b126a4fd36eefbe0699f52) + `request@2.62.0`: node 4 added to build targets. Option initialization issues + fixed. + ([@simov](https://github.com/simov)) +* [`0fd878a`](https://github.com/npm/npm/commit/0fd878a44d5ae303325808d1f00df4dce7549d50) + `lru-cache@2.7.0`: Cache serialization support and fixes a cache length bug. + ([@isaacs](https://github.com/isaacs)) +* [`6a7a114`](https://github.com/npm/npm/commit/6a7a114a45b4699995d6e09164fdfd0fa1274591) + `nock@2.12.0` + ([@pgte](https://github.com/pgte)) +* [`6b25e6d`](https://github.com/npm/npm/commit/6b25e6d2235c11f4444104db4545cb42a0267666) + `semver@5.0.3`: Removed uglify-js dead code. + ([@isaacs](https://github.com/isaacs)) + +### v2.14.4 (2015-09-10): + +#### THE GREAT NODEv4 SAGA + +So [Node 4 is out now](https://nodejs.org/en/blog/release/v4.0.0/) and that's +going to involve a number of things over in npm land. Most importantly, it's the +last major release that will include the `2.x` branch of npm. That also means +that `2.x` is going to go into LTS mode in the coming weeks -- once `npm@3` +becomes our official `latest` release. You can most likely expect Node 5 to +include `npm@3` by default, whenever that happens. We'll go into more detail +about LTS at that point, as well, so keep your eyes peeled for announcements! + +#### NODE IS DEAD. LONG LIVE NODE! + +Node 4 being released means that a few things that used to be floating patches +are finally making it right into npm proper. This week, we've got two such +updates, both to dependencies: + +* [`505d9e4`](https://github.com/npm/npm/commit/505d9e40c13b8b0bb3f70ee9886f7b73ba569407) + `node-gyp@3.0.1`: Support for node nightlies and compilation for both node and + io.js without extra patching + ([@rvagg](https://github.com/rvagg)) + +[@thefourtheye](https://github.com/thefourtheye) was kind enough to submit a +*bunch* of PRs to npm's dependencies updating them to `graceful-fs@4.1.2`, which +mainly makes it so we're no longer monkey-patching `fs`. The following are all +updates related to this: + +* [`10cb189`](https://github.com/npm/npm/commit/10cb189c773fef804214018d57509cc7a943184b) + `write-file-atomic@1.1.3` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`edfb80b`](https://github.com/npm/npm/commit/edfb80b39f8cfce9a993f139eb98248001198e09) + `tar@2.2.1` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`aa6e1ee`](https://github.com/npm/npm/commit/aa6e1eede7d71fa69d7256afdfbaa3406bc39a5b) + `read-package-json@2.0.1` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`18971a3`](https://github.com/npm/npm/commit/18971a361635ed3958ecd39b63930ae1e56f8612) + `read-installed@4.0.3` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`a4cba71`](https://github.com/npm/npm/commit/a4cba71bd2532236fda7385bf55e8790cafd4f0a) + `fstream@1.0.8` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`70a38e2`](https://github.com/npm/npm/commit/70a38e29418951ac61ab6cf269d188074fe8ac3a) + `fs-write-stream-atomic@1.0.4` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`9cbd20f`](https://github.com/npm/npm/commit/9cbd20f691e37960e4ba12d401abd1069657cb47) + `fs-vacuum@1.2.7` + ([@thefourtheye](https://github.com/thefourtheye)) + +#### OTHER PATCHES + +* [`c4dd521`](https://github.com/npm/npm/commit/c4dd5213b2f3283ea0392845e5f78cac4573529e) + [#9506](https://github.com/npm/npm/issues/9506) Make `npm link` work on + Windows when using node pre-release/RC releases. + ([@jon-hall](https://github.com/jon-hall)) +* [`b6bc29c`](https://github.com/npm/npm/commit/b6bc29c1401b3d6b570c09cbef1866bdb0436b59) + [#9544](https://github.com/npm/npm/issues/9549) `process.binding` is being + deprecated, so our only direct usage has been removed. + ([@ChALkeR](https://github.com/ChALkeR)) + +#### MORE DEPENDENCIES! + +* [`d940594`](https://github.com/npm/npm/commit/d940594e479a7f012b6dd6952e8ef985ba2a6216) + `tap@1.4.1` + ([@isaacs](https://github.com/isaacs)) +* [`ee38486`](https://github.com/npm/npm/commit/ee3848669331fd98879a3175789d963543f67ce3) + `which@1.1.2`: Added tests for Windows-related dead code that was previously + helping a silent failure happen. Travis stuff, too. + ([@isaacs](https://github.com/isaacs)) + +#### DOC UPDATES + +* [`475daf5`](https://github.com/npm/npm/commit/475daf54ad07777938d1d7ee1a3e576961e84510) + [#9492](https://github.com/npm/npm/issues/9492) Clarify how `.npmignore` and + `.gitignore` are found and used by npm. + ([@addaleax](https://github.com/addaleax)) +* [`b2c391d`](https://github.com/npm/npm/commit/b2c391d7833249626a6d7650363a83bcc778717a) + `nopt@3.0.4`: Minor clarifications to docs about how array and errors work. + ([@zkat](https://github.com/zkat)) + +### v2.14.3 (2015-09-03): + +#### TEAMS AND ORGS STILL BETA. CLI CODE STILL SOLID. + +Our closed beta for Teens and Orcs is happening! The web team is hard at work +making sure everything looks pretty and usable and such. Once we fix things +stemming from that beta, you can expect the feature to be available publicly. +Some time after that, it'll even be available for free for FOSS orgs. It'll Be +Done When It's Done™. + +#### OH GOOD, I CAN ACTUALLY UPSTREAM NOW + +Looks like last week's release foiled our own test suite when trying to upstream +it to Node! Just a friendly reminder that no, `.npmrc` is no longer included +then you pack/release a package! [@othiym23](https://github.com/othiym23) and +[@isaacs](https://github.com/isaacs) managed to suss the really strange test +failures resulting from that, and we've patched it in this release. + +* [`01a3428`](https://github.com/npm/npm/commit/01a3428534b754dca89a56fd1e49f55cb22f6f25) + [#9476](https://github.com/npm/npm/issues/9476) test: Recreate missing + `.npmrc` files when missing so downstream packagers can run tests on packed + npm. + ([@othiym23](https://github.com/othiym23)) + +#### TALKING ABOUT THE CHANGELOG IN THE CHANGELOG IS LIKE, POMO OR SOMETHING + +* [`c1e7a83`](https://github.com/npm/npm/commit/c1e7a83c0ae7aadf01aecc57cf8a0ae2009d4da8) + [#9431](https://github.com/npm/npm/issues/9431) CHANGELOG: clarify + windows-related nature of patch + ([@saper](https://github.com/saper)) + +#### devDependencies UPDATED + +No actual dep updates this week, but we're bumping a couple of devDeps: + +* [`8454835`](https://github.com/npm/npm/commit/84548351bfd63e3e305d195abbcad24c6b7c3e8e) + `tap@1.4.0`: Add `t.contains()` as alias to `t.match()` + ([@isaacs](https://github.com/isaacs)) +* [`13d2216`](https://github.com/npm/npm/commit/13d22161bcdeb6e1ed095d5ba2f77e6abfffa5eb) + `deep-equal@1.0.1`: Make `null == undefined` in non-strict mode + ([@isaacs](https://github.com/isaacs)) + +### v2.14.2 (2015-08-27): + +#### GETTING THAT PESKY `preferGlobal` WARNING RIGHT + +So apparently the `preferGlobal` option hasn't quite been warning correctly for +some time. But now it should be all better! tl;dr: if you try and install a +dependency with `preferGlobal: true`, and it's _not already_ in your +`package.json`, you'll get a warning that the author would really rather you +install it with `--global`. This should prevent Windows PowerShell from thinking +npm has failed just because of a benign warning. + +* [`bbb25f3`](https://github.com/npm/npm/commit/bbb25f30d582f8979168c79233a9f8f840974f90) + [#8841](https://github.com/npm/npm/issues/8841) + [#9409](https://github.com/npm/npm/issues/9409) The `preferGlobal` + warning shouldn't happen if the dependency being installed is listed in + `devDependencies`. ([@saper](https://github.com/saper)) +* [`222fcec`](https://github.com/npm/npm/commit/222fcec85ccd30d35899e5037079fb14625af4e2) + [#9409](https://github.com/npm/npm/issues/9409) `preferGlobal` now prints a + warning when there are no dependencies for the current package. + ([@zkat](https://github.com/zkat)) +* [`5cfed6d`](https://github.com/npm/npm/commit/5cfed6d7a1a5f2731688cfc8293b5e43a6355393) + [#9409](https://github.com/npm/npm/issues/9409) Verify that + `preferGlobal` is warning as expected (when a `preferGlobal` dependency is + installed, but isn't listed in either `dependencies` or `devDependencies`). + ([@zkat](https://github.com/zkat)) + +#### BUMP +1 + +* [`eeafce2`](https://github.com/npm/npm/commit/eeafce2d06883c0f51bf403415b6bc5f2647eba3) + `validate-npm-package-license@3.0.1`: Include additional metadata in parsed license object, + useful for license checkers. ([@kemitchell](https://github.com/kemitchell)) +* [`1502a28`](https://github.com/npm/npm/commit/1502a285f84aa548806b3eafc8889e6288e810f3) + `normalise-package-data@2.3.2`: Updated to use `validate-npm-package-license@3.0.1`. + ([@othiym23](https://github.com/othiym23)) +* [`cbde823`](https://github.com/npm/npm/commit/cbde8233436bf0ea62a4740869b4990322c20659) + `init-package-json@1.9.1`: Add a `silent` option to suppress output on writing the + generated `package.json`. Also, updated to use `validate-npm-package-license@3.0.1`. + ([@zkat](https://github.com/zkat)) +* [`08fda46`](https://github.com/npm/npm/commit/08fda465452b4d77f1ced8050ee3a35a77fc30a5) + `tar@2.2.0`: Minor improvements. ([@othiym23](https://github.com/othiym23)) +* [`dc2f20b`](https://github.com/npm/npm/commit/dc2f20b53fff77203139c863b48da0e959df2ac9) + `rimraf@2.4.3`: `EPERM` now triggers a delay / retry loop (since Windows throws + this when things still hold a handle). ([@isaacs](https://github.com/isaacs)) +* [`e8acb27`](https://github.com/npm/npm/commit/e8acb273aa67ee0394d0431650e1b2a7d09c8554) + `read@1.0.7`: Fix licensing ambiguity. ([@isaacs](https://github.com/isaacs)) + +#### OTHER STUFF THAT'S RELEVANT + +* [`73a1ee0`](https://github.com/npm/npm/commit/73a1ee0be90fa1928521b63f28bef83b8ffab61d) + [#9386](https://github.com/npm/npm/issues/9386) Include additional unignorable files in + documentation. + ([@mjhasbach](https://github.com/mjhasbach)) +* [`0313e40`](https://github.com/npm/npm/commit/0313e40ee0f757fce8861be590ad668c23d7be53) + [#9396](https://github.com/npm/npm/issues/9396) Improve the `EISDIR` error + message returned by npm's error-handling code to give users a better hint of + what's most likely going on. Usually, error reports with this error code are + about people trying to install things without a `package.json`. + ([@KenanY](https://github.com/KenanY)) +* [`2677457`](https://github.com/npm/npm/commit/26774579c739c5951351e58263cf4d6ea3d66ec8) + [#9360](https://github.com/npm/npm/issues/9360) Make it easier to run + only _some_ of npm tests with lifecycle scripts via `npm tap test/tap/testname.js`. + ([@iarna](https://github.com/iarna)) + +### v2.14.1 (2015-08-20): + +#### SECURITY FIX + +There are patches for two information leaks of moderate severity in `npm@2.14.1`: + +1. In some cases, npm was leaking sensitive credential information into the + child environment when running package and lifecycle scripts. This could + lead to packages being published with files (most notably `config.gypi`, a + file created by `node-gyp` that is a cache of environmental information + regenerated on every run) containing the bearer tokens used to authenticate + users to the registry. Users with affected packages have been notified (and + the affected tokens invalidated), and now npm has been modified to not + upload files that could contain this information, as well as scrubbing the + sensitive information out of the environment passed to child scripts. +2. Per-package `.npmrc` files are used by some maintainers as a way to scope + those packages to a specific registry and its credentials. This is a + reasonable use case, but by default `.npmrc` was packed into packages, + leaking those credentials. npm will no longer include `.npmrc` when packing + tarballs. + +If you maintain packages and believe you may be affected by either +of the above scenarios (especially if you've received a security +notification from npm recently), please upgrade to `npm@2.14.1` as +soon as possible. If you believe you may have inadvertently leaked +your credentials, upgrade to `npm@2.14.1` on the affected machine, +and run `npm logout` and then `npm login`. Your access tokens will be +invalidated, which will eliminate any risk posed by tokens inadvertently +included in published packages. We apologize for the inconvenience this +causes, as well as the oversight that led to the existence of this issue +in the first place. + +Huge thanks to [@ChALkeR](https://github.com/ChALkeR) for bringing these +issues to our attention, and for helping us identify affected packages +and maintainers. Thanks also to the Node.js security working group for +their coördination with the team in our response to this issue. We +appreciate everybody's patience and understanding tremendously. + +* [`b9474a8`](https://github.com/npm/npm/commit/b9474a843ca55b7c5fac6da33989e8eb39aff8b1) + `fstream-npm@1.0.5`: Stop publishing build cruft (`config.gypi`) and per-project + `.npmrc` files to keep local configuration out of published packages. + ([@othiym23](https://github.com/othiym23)) +* [`13c286d`](https://github.com/npm/npm/commit/13c286dbdc3fa8fec4cb79fc4d1ee505c8a41b2e) + [#9348](https://github.com/npm/npm/issues/9348) Filter "private" + (underscore-prefixed, even when scoped to a registry) configuration values + out of child environments. ([@othiym23](https://github.com/othiym23)) + +#### BETTER WINDOWS INTEGRATION, ONE STEP AT A TIME + +* [`e40e71f`](https://github.com/npm/npm/commit/e40e71f2f838a8a42392f44e3eeec04e323ab743) + [#6412](https://github.com/npm/npm/issues/6412) Improve the search strategy + used by the npm shims for Windows to prioritize your own local npm installs. + npm has really needed this tweak for a long time, so hammer on it and let us + know if you run into issues, but with luck it will Just Work. + ([@joaocgreis](https://github.com/joaocgreis)) +* [`204ebbb`](https://github.com/npm/npm/commit/204ebbb3e0cab696a429a878ceeb4a7e78ec2b94) + [#8751](https://github.com/npm/npm/issues/8751) + [#7333](https://github.com/npm/npm/issues/7333) Keep [autorun + scripts](https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) from + interfering with npm package and lifecycle script execution on Windows by + adding `/d` and `/s` when invoking `cmd.exe`. + ([@saper](https://github.com/saper)) + +#### IT SEEMED LIKE AN IDEA AT THE TIME + +* [`286f3d9`](https://github.com/npm/npm/commit/286f3d97103812f0fd84b70352addbe899e258f9) + [#9201](https://github.com/npm/npm/pull/9201) For a while npm was building + HTML partials for use on [`docs.npmjs.com`](https://docs.npmjs.com), but we + weren't actually using them. Stop building them, which makes running the full + test suite and installation process around a third faster. + ([@isaacs](https://github.com/isaacs)) + +#### A SINGLE LONELY DEPENDENCY UPGRADE + +* [`b343b95`](https://github.com/npm/npm/commit/b343b956ef777e321e4251ddc96ec6d80827d9e2) + `request@2.61.0`: Bug fixes and keep-alive tweaks. + ([@simov](https://github.com/simov)) + +### v2.14.0 (2015-08-13): + +#### IT'S HERE! KINDA! + +This release adds support for teens and orcs (err, teams and organizations) to +the npm CLI! Note that the web site and registry-side features of this are +still not ready for public consumption. + +A beta should be starting in the next couple of weeks, and the features +themselves will become public once all that's done. Keep an eye out for more +news! + +All of these changes were done under [`#9011`](https://github.com/npm/npm/pull/9011): + +* [`6424170`](https://github.com/npm/npm/commit/6424170fc17c666a6efc090370ec691e0cab1792) + Added new `npm team` command and subcommands. + ([@zkat](https://github.com/zkat)) +* [`52220d1`](https://github.com/npm/npm/commit/52220d146d474ec29b683bd99c06f75cbd46a9f4) + Added documentation for new `npm team` command. + ([@zkat](https://github.com/zkat)) +* [`4e66830`](https://github.com/npm/npm/commit/4e668304850d02df8eb27a779fda76fe5de645e7) + Updated `npm access` to support teams and organizations. + ([@zkat](https://github.com/zkat)) +* [`ea3eb87`](https://github.com/npm/npm/commit/ea3eb8733d9fa09ce34106b1b19fb1a8f95844a5) + Gussied up docs for `npm access` with new commands. + ([@zkat](https://github.com/zkat)) +* [`6e0b431`](https://github.com/npm/npm/commit/6e0b431c1de5e329c86e57d097aa88ebfedea864) + Fix up `npm whoami` to make the underlying API usable elsewhere. + ([@zkat](https://github.com/zkat)) +* [`f29c931`](https://github.com/npm/npm/commit/f29c931012ce5ccd69c29d83548f27e443bf7e62) + `npm-registry-client@7.0.1`: Upgrade `npm-registry-client` API to support + `team` and `access` calls against the registry. + ([@zkat](https://github.com/zkat)) + +#### A FEW EXTRA VERSION BUMPS + +* [`c977e12`](https://github.com/npm/npm/commit/c977e12cbfa50c2f52fc807f5cc19ba1cc1b39bf) + `init-package-json@1.8.0`: Checks for some `npm@3` metadata. + ([@iarna](https://github.com/iarna)) +* [`5c8c9e5`](https://github.com/npm/npm/commit/5c8c9e5ae177ba7d0d298cfa42f3fc7f0271e4ec) + `columnify@1.5.2`: Updated some dependencies. + ([@timoxley](https://github.com/timoxley)) +* [`5d56742`](https://github.com/npm/npm/commit/5d567425768b75aeab402c817a53d8b2bc60d8de) + `chownr@1.0.1`: Tests, docs, and minor style nits. + ([@isaacs](https://github.com/isaacs)) + +#### ALSO A DOC FIX + +* [`846fcc7`](https://github.com/npm/npm/commit/846fcc79b86984b109a97366b0422f995a45f8bf) + [`#9200`](https://github.com/npm/npm/pull/9200) Remove single quotes + around semver range, thus making it valid semver. + ([@KenanY](https://github.com/KenanY)) + +### v2.13.5 (2015-08-07): + +This is another quiet week for the `npm@2` release. +[@zkat](https://github.com/zkat) has been working hard on polishing the CLI +bits of the registry's new feature to support direct management of teams and +organizations, and [@iarna](https://github.com/iarna) continues to work through +the list of issues blocking the general release of `npm@3`, which is looking +more and more solid all the time. + +[@othiym23](https://github.com/othiym23) and [@zkat](https://github.com/zkat) +have also been at this week's Node.js / io.js [collaborator +summit](https://github.com/nodejs/summit/tree/master), both as facilitators and +participants. This is a valuable opportunity to get some face time with other +contributors and to work through a bunch of important discussions, but it does +leave us feeling kind of sleepy. Running meetings is hard! + +What does that leave for this release? A few of the more tricky bug fixes that +have been sitting around for a little while now, and a couple dependency +upgrades. Nothing too fancy, but most of these were contributed by developers +like _you_, which we think is swell. Thanks! + +#### BUG FIXES + +* [`d7271b8`](https://github.com/npm/npm/commit/d7271b8226712479cdd339bf85faf7e394923e0d) + [#4530](https://github.com/npm/npm/issues/4530) The bash completion script + for npm no longer alters global completion behavior around word breaks. + ([@whitty](https://github.com/whitty)) +* [`c9ce294`](https://github.com/npm/npm/commit/c9ce29415a0a8fc610690b6e9d91b64d6e36cfcc) + [#7198](https://github.com/npm/npm/issues/7198) When setting up dependencies + to be shared via `npm link <package>`, only run the lifecycle scripts during + the original link, not when running `npm link <package>` or `npm install + --link` against them. ([@murgatroid99](https://github.com/murgatroid99)) +* [`422da66`](https://github.com/npm/npm/commit/422da664bd3ce71313da447f170507faf5aac46a) + [#9108](https://github.com/npm/npm/issues/9108) Clear up minor confusion + around wording in `bundledDependencies` section of `package.json` docs. + ([@derekpeterson](https://github.com/derekpeterson)) +* [`6b42d99`](https://github.com/npm/npm/commit/6b42d99460885e715772d3487b1c548d2bc8a738) + [#9146](https://github.com/npm/npm/issues/9146) Include scripts that run for + `preversion`, `version`, and `postversion` in the section for lifecycle + scripts rather than the generic `npm run-script` output. + ([@othiym23](https://github.com/othiym23)) + +#### NOPE, NOT DONE WITH DEPENDENCY UPDATES + +* [`91a48bb`](https://github.com/npm/npm/commit/91a48bb5ef5a990781c86f8b69b8a32cf4fac2d9) + `chmodr@1.0.1`: Ignore symbolic links when recursively changing mode, just + like the Unix command. ([@isaacs](https://github.com/isaacs)) +* [`4bbc86e`](https://github.com/npm/npm/commit/4bbc86e3825e2eee9a8758ba26bdea0cb6a2581e) + `nock@2.10.0` ([@pgte](https://github.com/pgte)) + +### v2.13.4 (2015-07-30): + +#### JULY ENDS ON A FAIRLY QUIET NOTE + +Hey everyone! I hope you've had a great week. We're having a fairly small +release this week while we wrap up Teams and Orgs (or, as we've taken to calling +it internally, _Teens and Orcs_). + +In other exciting news, a bunch of us are gonna be at the [Node.js Collaborator +Summit](https://github.com/nodejs/summit/issues/1), and you can also find us at +[wafflejs](https://wafflejs.com/) on Wednesday. Hopefully we'll be seeing some +of you there. :) + +#### THE PATCH!!! + +So here it is. The patch. Hope it helps. (Thanks, +[@ktarplee](https://github.com/ktarplee)!) + +* [`2e58c48`](https://github.com/npm/npm/commit/2e58c4819e3cafe4ae23ab7f4a520fe09258cfd7) + [#9033](https://github.com/npm/npm/pull/9033) `npm version` now works on git + submodules + ([@ktarplee](https://github.com/ktarplee)) + +#### OH AND THERE'S A DEV DEPENDENCIES UPDATE + +Hooray. + +* [`d204683`](https://github.com/npm/npm/commit/d2046839d471322e61e3ceb0f00e78e5c481f967) + nock@2.9.1 + ([@pgte](https://github.com/pgte)) + +### v2.13.3 (2015-07-23): + +#### I'M SAVING THE GOOD JOKES FOR MORE INTERESTING RELEASES + +It's pretty hard to outdo last week's release buuuuut~ I promise I'll have a +treat when we release our shiny new **Teams and Organizations** feature! :D +(Coming Soon™). It'll be a real *gem*. + +That means it's a pretty low-key release this week. We got some nice +documentation tweaks, a few bugfixes, and other such things, though! + +Oh, and a _bunch of version bumps_. Thanks, `semver`! + +#### IT'S THE LITTLE THINGS THAT MATTER + +* [`2fac6ae`](https://github.com/npm/npm/commit/2fac6aeffefba2934c3db395b525d931599c34d8) + [#9012](https://github.com/npm/npm/issues/9012) A convenience for releases -- + using the globally-installed npm before now was causing minor annoyances, so + we just use the exact same npm we're releasing to build the new release. + ([@zkat](https://github.com/zkat)) + +#### WHAT DOES THIS BUTTON DO? + +There's a couple of doc updates! The last one might be interesting. + +* [`4cd3205`](https://github.com/npm/npm/commit/4cd32050c0f89b7f1ae486354fa2c35eea302ba5) + [#9002](https://github.com/npm/npm/issues/9002) Updated docs to list the + various files that npm automatically includes and excludes, regardless of + settings. + ([@SimenB](https://github.com/SimenB)) +* [`cf09e75`](https://github.com/npm/npm/commit/cf09e754931739af32647d667b671e72a4c79081) + [#9022](https://github.com/npm/npm/issues/9022) Document the `"access"` field + in `"publishConfig"`. Did you know you don't need to use `--access=public` + when publishing scoped packages?! Just put it in your `package.json`! + Go refresh yourself on scopes packages by [checking our docs](https://docs.npmjs.com/getting-started/scoped-packages) on them. + ([@boennemann](https://github.com/boennemann)) +* [`bfd73da`](https://github.com/npm/npm/commit/bfd73da33349cc2afb8278953b2ae16ea95023de) + [#9013](https://github.com/npm/npm/issues/9013) fixed typo in changelog + ([@radarhere](https://github.com/radarhere)) + +#### THE SEMVER MAJOR VERSION APOCALYPSE IS UPON US + +Basically, `semver` is up to `@5`, and that meant we needed to go in an update a +bunch of our dependencies manually. `node-gyp` is still pending update, since +it's not ours, though! + +* [`9232e58`](https://github.com/npm/npm/commit/9232e58d54c032c23716ef976023d36a42bfdcc9) + [#8972](https://github.com/npm/npm/issues/8972) `init-package-json@1.7.1` + ([@othiym23](https://github.com/othiym23)) +* [`ba44f6b`](https://github.com/npm/npm/commit/ba44f6b4201a4faee025341b123e372d8f45b6d9) + [#8972](https://github.com/npm/npm/issues/8972) `normalize-package-data@2.3.1` + ([@othiym23](https://github.com/othiym23)) +* [`3901d3c`](https://github.com/npm/npm/commit/3901d3cf191880bb4420b1d6b8aedbcd8fc26cdf) + [#8972](https://github.com/npm/npm/issues/8972) `npm-install-checks@1.0.6` + ([@othiym23](https://github.com/othiym23)) +* [`ffcc7dd`](https://github.com/npm/npm/commit/ffcc7dd12f8bb94ff0f64c465c57e460b3f24a24) + [#8972](https://github.com/npm/npm/issues/8972) `npm-package-arg@4.0.2` + ([@othiym23](https://github.com/othiym23)) +* [`7128f9e`](https://github.com/npm/npm/commit/7128f9ec10c0c8482087511b716dbddb54249626) + [#8972](https://github.com/npm/npm/issues/8972) `npm-registry-client@6.5.1` + ([@othiym23](https://github.com/othiym23)) +* [`af28911`](https://github.com/npm/npm/commit/af28911ecd54a844f848c6ae41887097d6aa2f3b) + [#8972](https://github.com/npm/npm/issues/8972) `read-installed@4.0.2` + ([@othiym23](https://github.com/othiym23)) +* [`3cc817a`](https://github.com/npm/npm/commit/3cc817a0f34f698b580ff6ff02308700efc54f7c) + [#8972](https://github.com/npm/npm/issues/8972) node-gyp needs its own version + of semver + ([@othiym23](https://github.com/othiym23)) +* [`f98eccc`](https://github.com/npm/npm/commit/f98eccc6e3a6699ca0aa9ecbad93a3b995583871) + [#8972](https://github.com/npm/npm/issues/8972) `semver@5.0.1`: Stop including + browser builds. + ([@isaacs](https://github.com/isaacs)) + +#### \*BUMP\* + +And some other version bumps for good measure. + +* [`254ecfb`](https://github.com/npm/npm/commit/254ecfb04f026c2fd16427db01a53600c1892c8b) + [#8990](https://github.com/npm/npm/issues/8990) `marked-man@0.1.5`: Fixes an + issue with documentation rendering where backticks in 2nd-level headers would + break rendering (?!?!) + ([@steveklabnik](https://github.com/steveklabnik)) +* [`79efd79`](https://github.com/npm/npm/commit/79efd79ac216da8cee8636fb2ed926b0196a4eb6) + `minimatch@2.0.10`: A pattern like `'*.!(x).!(y)'` should not match a name + like `'a.xyz.yab'`. + ([@isaacs](https://github.com/isaacs)) +* [`39c7dc9`](https://github.com/npm/npm/commit/39c7dc9a4e17cd35a5ed882ba671821c9a900f9e) + `request@2.60.0`: A few bug fixes and doc updates. + ([@simov](https://github.com/simov)) +* [`72d3c3a`](https://github.com/npm/npm/commit/72d3c3a9e1e461608aa21b14c01a650333330da9) + `rimraf@2.4.2`: Minor doc and dep updates + ([@isaacs](https://github.com/isaacs)) +* [`7513035`](https://github.com/npm/npm/commit/75130356a06f5f4fbec3786aac9f9f0b36dfe010) + `nock@2.9.1` + ([@pgte](https://github.com/pgte)) +* [`3d9aa82`](https://github.com/npm/npm/commit/3d9aa82260f0643a32c13d0c1ed16f644b6fd4ab) + Fixes this thing where Kat decided to save `nock` as a regular dependency ;) + ([@othiym23](https://github.com/othiym23)) + +### v2.13.2 (2015-07-16): + +#### HOLD ON TO YOUR TENTACLES... IT'S NPM RELEASE TIME! + +Kat: Hooray! Full team again, and we've got a pretty small patch release this +week, about everyone's favorite recurring issue: git URLs! + +Rebecca: No Way! Again? + +Kat: The ride never ends! In the meantime, there's some fun, exciting work in +the background to get orgs and teams out the door. Keep an eye out for news. :) + +Rebecca: And make sure to keep an eye out for patches for the super-fresh +`npm@3`! + +#### LET'S GIT INKY + +Rebecca: So what's this about another git URL issue? + +Kat: Welp, I apparently broke backwards-compatibility on what are actually +invalid `git+https` URLs! So I'm making it work, but we're gonna deprecate URLs +that look like `git+https://user@host:path/is/here`. + +Rebecca: What should we use instead?! + +Kat: Just do me a solid and use `git+ssh://user@host:path/here` or +`git+https://user@host/absolute/https/path` instead! + +* [`769f06e`](https://github.com/npm/npm/commit/769f06e5455d7a9fc738379de2e05868df0dab6f) + Updated tests for `getResolved` so the URLs are run through + `normalize-git-url`. + ([@zkat](https://github.com/zkat)) +* [`edbae68`](https://github.com/npm/npm/commit/edbae685bf48971e878ced373d6825fc1891ee47) + [#8881](https://github.com/npm/npm/issues/8881) Added tests to verify that `git+https:` URLs are handled compatibly. + ([@zkat](https://github.com/zkat)) + +#### NEWS FLASH! DOCUMENTATION IMPROVEMENTS! + +* [`bad4e014`](https://github.com/npm/npm/commit/bad4e0143cc95754a682f1da543b2b4e196e924b) + [#8924](https://github.com/npm/npm/pull/8924) Make sure documented default + values in `lib/cache.js` properly correspond to current code. + ([@watilde](https://github.com/watilde)) +* [`e7a11fd`](https://github.com/npm/npm/commit/e7a11fdf70e333cdfe3dac94a1a30907adb76d59) + [#8036](https://github.com/npm/npm/issues/8036) Clarify the documentation for + `.npmrc` to clarify that it's not read at the project level when doing global + installs. + ([@espadrine](https://github.com/espadrine)) + +#### STAY FRESH~ + +Kat: That's it for npm core changes! + +Rebecca: Great! Let's look at the fresh new dependencies, then! + +Kat: See you all next week! + +Both: Stay Freeesh~ + +(some cat form of Forrest can be seen snoring in the corner) + +* [`bfa1f45`](https://github.com/npm/npm/bfa1f45ee760d05039557d2245b7e3df9fda8def) + `normalize-git-url@3.0.1`: Fixes url normalization such that `git+https:` + accepts scp syntax, but get converted into absolute-path `https:` URLs. Also + fixes scp syntax so you can have absolute paths after the `:` + (`git@myhost.org:/some/absolute/place.git`) + ([@zkat](https://github.com/zkat)) +* [`6f757d2`](https://github.com/npm/npm/6f757d22b53f91da0bebec6b5d16c1f4dbe130b4) + `glob@5.0.15`: Better handling of ENOTSUP + ([@isaacs](https://github.com/isaacs)) +* [`0920819`](https://github.com/npm/npm/09208197fb8b0c6d5dbf6bd7f59970cf366de989) + `node-gyp@2.0.2`: Fixes an issue with long paths on Win32 + ([@TooTallNate](https://github.com/TooTallNate)) + +### v2.13.1 (2015-07-09): + +#### KAUAI WAS NICE. I MISS IT. + +But Forrest's still kinda on vacation, and not just mentally, because he's +hanging out with the fine meatbags at CascadiaFest. Enjoy this small bug +release. + +#### MAKE OURSELVES HAPPY + +* [`40981f2`](https://github.com/npm/npm/commit/40981f2e0c9c12bb003ccf188169afd1d201f5af) + [#8862](https://github.com/npm/npm/issues/8862) Make the lifecycle's safety + check work with scoped packages. ([@tcort](https://github.com/tcort)) +* [`5125856`](https://github.com/npm/npm/commit/512585622481dbbda9a0306932468d59efaff658) + [#8855](https://github.com/npm/npm/issues/8855) Make dependency versions of + `"*"` match `"latest"` when all versions are prerelease. + ([@iarna](https://github.com/iarna)) +* [`22fdc1d`](https://github.com/npm/npm/commit/22fdc1d52602ba7098af978c75fca8f7d1060141) + Visually emphasize the correct way to write lifecycle scripts. + ([@josh-egan](https://github.com/josh-egan)) + +#### MAKE TRAVIS HAPPY + +* [`413c3ac`](https://github.com/npm/npm/commit/413c3ac2ab2437f3011c6ca0d1630109ec14e604) + Use npm's `2.x` branch for testing its `2.x` branch. + ([@iarna](https://github.com/iarna)) +* [`7602f64`](https://github.com/npm/npm/commit/7602f64826f7a465d9f3a20bd87a376d992607e6) + Don't prompt for GnuPG passphrase in version lifecycle tests. + ([@othiym23](https://github.com/othiym23)) + +#### MAKE `npm outdated` HAPPY + +* [`d338668`](https://github.com/npm/npm/commit/d338668601d1ebe5247a26237106e80ea8cd7f48) + [#8796](https://github.com/npm/npm/issues/8796) `fstream-npm@1.0.4`: When packing the + package tarball, npm no longer crashes for packages with certain combinations of + `.npmignore` entries, `.gitignore` entries, and lifecycle scripts. + ([@iarna](https://github.com/iarna)) +* [`dbe7c9c`](https://github.com/npm/npm/commit/dbe7c9c74734be870d16dd61b9e7f746123011f6) + `nock@2.7.0`: Add matching based on query strings. + ([@othiym23](https://github.com/othiym23)) + +There are new versions of `strip-ansi` and `ansi-regex`, but npm only uses them +indirectly, so we pushed them down into their dependencies where they can get +updated at their own pace. + +* [`06b6ca5`](https://github.com/npm/npm/commit/06b6ca5b5333025f10c8d901628859bd4678e027) + undeduplicate `ansi-regex` ([@othiym23](https://github.com/othiym23)) +* [`b168e33`](https://github.com/npm/npm/commit/b168e33ad46faf47020a45f72ba8cec8c644bdb9) + undeduplicate `strip-ansi` ([@othiym23](https://github.com/othiym23)) + +### v2.13.0 (2015-07-02): + +#### FORREST IS OUT! LET'S SNEAK IN ALL THE THINGS! + +Well, not _everything_. Just a couple of goodies, like the new `npm ping` +command, and the ability to add files to the commits created by `npm version` +with the new version hooks. There's also a couple of bugfixes in `npm` itself +and some of its dependencies. Here we go! + +#### YES HELLO THIS IS NPM REGISTRY SORRY NO DOG HERE + +Yes, that's right! We now have a dedicated `npm ping` command. It's super simple +and super easy. You ping. We tell you whether you pinged right by saying hello +right back. This should help out folks dealing with things like proxy issues or +other registry-access debugging issues. Give it a shot! + +This addresses [#5750](https://github.com/npm/npm/issues/5750), and will help +with the `npm doctor` stuff described in +[#6756](https://github.com/npm/npm/issues/6756). + +* [`f1f7a85`](https://github.com/npm/npm/commit/f1f7a85) + Add ping command to CLI + ([@michaelnisi](https://github.com/michaelnisi)) +* [`8cec629`](https://github.com/npm/npm/commit/8cec629) + Add ping command to npm-registry-client + ([@michaelnisi](https://github.com/michaelnisi)) +* [`0c0c92d`](https://github.com/npm/npm/0c0c92d) + Fixed ping command issues (added docs, tests, fixed minor bugs, etc) + ([@zkat](https://github.com/zkat)) + +#### I'VE WANTED THIS FOR `version` SINCE LIKE LITERALLY FOREVER AND A DAY + +Seriously! This patch lets you add files to the `version` commit before it's +made, So you can add additional metadata files, more automated changes to +`package.json`, or even generate `CHANGELOG.md` automatically pre-commit if +you're into that sort of thing. I'm so happy this is there I can't even. Do you +have other fun usecases for this? Tell +[npmbot (@npmjs)](http://twitter.com/npmjs) about it! + +* [`582f170`](https://github.com/npm/npm/commit/582f170) + [#8620](https://github.com/npm/npm/issues/8620) version: Allow scripts to add + files to the commit. + ([@jamestalmage](https://github.com/jamestalmage)) + +#### ALL YOUR FILE DESCRIPTORS ARE BELONG TO US + +We've had problems in the past with things like `EMFILE` errors popping up when +trying to install packages with a bunch of dependencies. Isaac patched up +[`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to handle this case +better, so we should be seeing fewer of those. + +* [`022691a`](https://github.com/npm/npm/commit/022691a) + `graceful-fs@4.1.2`: Updated so we can monkey patch globally. + ([@isaacs](https://github.com/isaacs)) +* [`c9fb0fd`](https://github.com/npm/npm/commit/c9fb0fd) + Globally monkey-patch graceful-fs. This should fix some errors when installing + packages with lots of dependencies. + ([@isaacs](https://github.com/isaacs)) + +#### READ THE FINE DOCS. THEY'VE IMPROVED + +* [`5587d0d`](https://github.com/npm/npm/commit/5587d0d) + Nice clarification for `directories.bin` + ([@ujane](https://github.com/ujane)) +* [`20673c7`](https://github.com/npm/npm/commit/20673c7) + Hey, Windows folks! Check out + [`nvm-windows`](https://github.com/coreybutler/nvm-windows) + ([@ArtskydJ](https://github.com/ArtskydJ)) + +#### MORE NUMBERS! MORE VALUE! + +* [`5afa2d5`](https://github.com/npm/npm/commit/5afa2d5) + `validate-npm-package-name@2.2.2`: Documented package name rules in README + ([@zeusdeux](https://github.com/zeusdeux)) +* [`021f4d9`](https://github.com/npm/npm/commit/021f4d9) + `rimraf@2.4.1`: [#74](https://github.com/isaacs/rimraf/issues/74) Use async + function for bin (to better handle Window's `EBUSY`) + ([@isaacs](https://github.com/isaacs)) +* [`5223432`](https://github.com/npm/npm/commit/5223432) + `osenv@0.1.3`: Use `os.homedir()` polyfill for more reliable output. io.js + added the function and the polyfill does a better job than the prior solution. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`8ebbc90`](https://github.com/npm/npm/commit/8ebbc90) + `npm-cache-filename@1.0.2`: Make sure different git references get different + cache folders. This should prevent `foo/bar#v1.0` and `foo/bar#master` from + sharing the same cache folder. + ([@tomekwi](https://github.com/tomekwi)) +* [`367b854`](https://github.com/npm/npm/commit/367b854) + `lru-cache@2.6.5`: Minor test/typo changes + ([@isaacs](https://github.com/isaacs)) +* [`9fcae61`](https://github.com/npm/npm/commit/9fcae61) + `glob@5.0.13`: Tiny doc change + stop firing 'match' events for ignored items. + ([@isaacs](https://github.com/isaacs)) + +#### OH AND ONE MORE THING + +* [`7827249`](https://github.com/npm/npm/commit/7827249) + `PeerDependencies` errors now include the package version. + ([@NickHeiner](https://github.com/NickHeiner)) + +### v2.12.1 (2015-06-25): + +#### HEY WHERE DID EVERYBODY GO + +I keep [hearing some commotion](https://github.com/npm/npm/releases/tag/v3.0.0). +Is there something going on? Like, a party or something? Anyway, here's a small +release with at least two significant bug fixes, at least one of which some of +you have been waiting for for quite a while. + +#### REMEMBER WHEN I SAID "REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS?"? + +`npm@2.12.0` has a change that introduces a fix for a permissions problem +whereby the `_locks` directory in the cache directory can up being owned by +root. The fix in 2.12.0 takes care of that problem, but introduces a new +problem for Windows users where npm tries to call `process.getuid()`, which +doesn't exist on Windows. It was easy enough to fix (but more or less +impossible to test, thanks to all the external dependencies involved with +permissions and platforms and whatnot), but as a result, Windows users might +want to skip `npm@2.12.0` and go straight to `npm@2.12.1`. Sorry about that! + +* [`7e5da23`](https://github.com/npm/npm/commit/7e5da238ee869201fdb9027c27b79b0f76b440a8) + When using the new, "fixed" cache directory creator, be extra-careful to not + call `process.getuid()` on platforms that lack it. + ([@othiym23](https://github.com/othiym23)) + +#### WHEW! ALL DONE FIXING GIT FOREVER! + +New npm CLI team hero [@zkat](https://github.com/zkat) has finally (FINALLY) +fixed the regression somebody (hi!) introduced a couple months ago whereby git +URLs of the format `git+ssh://user@githost.com:org/repo.git` suddenly stopped +working, and also started being saved (and cached) incorrectly. I am 100% sure +there are absolutely no more bugs in the git caching code at all ever. Mm hm. +Yep. Pretty sure. Maybe. Hmm... I hope. + +*Sighs audibly.* + +[Let us know](http://github.com/npm/npm/issues/new) if we broke something else +with this fix. + +* [`94ca4a7`](https://github.com/npm/npm/commit/94ca4a711619ba8e40ce3d20bc42b13cdb7611b7) + [#8031](https://github.com/npm/npm/issues/8031) Even though + `git+ssh://user@githost.com:org/repo.git` isn't a URL, treat it like one for + the purposes of npm. ([@zkat](https://github.com/zkat)) +* [`e7f56e5`](https://github.com/npm/npm/commit/e7f56e5a97fcf1c52d5c5bee71303b0126129815) + [#8031](https://github.com/npm/npm/issues/8031) `normalize-git-url@2.0.0`: + Handle git URLs (and URL-like remote refs) in a manner consistent with npm's + docs. ([@zkat](https://github.com/zkat)) + +#### YEP, THERE ARE STILL DEPENDENCY UPGRADES + +* [`679bf47`](https://github.com/npm/npm/commit/679bf4745ac2cfbb01c9ce273e189807fd04fa33) + [#40](http://github.com/npm/read-installed/issues/40) `read-installed@4.0.1`: + Handle prerelease versions in top-level dependencies not in `package.json` + without marking those packages as invalid. + ([@benjamn](https://github.com/benjamn)) +* [`3a67410`](https://github.com/npm/npm/commit/3a6741068c9119174c920496778aeee870ebdac0) + `tap@1.3.1` ([@isaacs](https://github.com/isaacs)) +* [`151904a`](https://github.com/npm/npm/commit/151904af39dc24567f8c98529a2a64a4dbcc960a) + `nopt@3.0.3` ([@isaacs](https://github.com/isaacs)) + +### v2.12.0 (2015-06-18): + +#### REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS? + +About [a million people](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+EACCES+_locks) +have filed issues related to having a tough time using npm after they've run +npm once or twice with sudo. "Don't worry about it!" I said. "We've fixed all +those permissions problems ages ago! Use this one weird trick and you'll never +have to deal with this again!" + +Well, uh, if you run npm with root the first time you run npm on a machine, it +turns out that the directory npm uses to store lockfiles ends up being owned by +the wrong user (almost always root), and that can, well, it can cause problems +sometimes. By which I mean every time you run npm without being root it'll barf +with `EACCES` errors. Whoops! + +This is an obnoxious regression, and to prevent it from recurring, we've made +it so that the cache, cached git remotes, and the lockfile directories are all +created and maintained using the same utilty module, which not only creates the +relevant paths with the correct permissions, but will fix the permissions on +those directories (if it can) when it notices that they're broken. An `npm +install` run as root ought to be sufficient to fix things up (and if that +doesn't work, first tell us about it, and then run `sudo chown -R $(whoami) +$HOME/.npm`) + +Also, I apologize for inadvertently gaslighting any of you by claiming this bug +wasn't actually a bug. I do think we've got this permanently dealt with now, +but I'll be paying extra-close attention to permissions issues related to the +cache for a while. + +* [`85d1a53`](https://github.com/npm/npm/commit/85d1a53d7b5e0fc04823187e522ae3711ede61fa) + Set permissions on lock directory to the owner of the process. + ([@othiym23](https://github.com/othiym23)) + +#### I WENT TO NODECONF AND ALL I GOT WAS THIS LOUSY SPDX T-SHIRT + +That's not literally true. We spent very little time discussing SPDX, +[@kemitchell](https://github.com/kemitchell) is a champ, and I had a lot of fun +playing drum & bass to a mostly empty Boogie Barn and only ended up with one +moderately severe cold for my pains. Another winner of a NodeConf! (I would +probably wear a SPDX T-shirt if somebody gave me one, though.) + +A bunch of us did have a spirited discussion of the basics of open-source +intellectual property, and the convergence of me, +[@kemitchell](https://github.com/kemitchell), and +[@jandrieu](https://github.com/jandrieu) in one place allowed us to hammmer out +a small but significant issue that had been bedeviling early adopters of the +new SPDX expression syntax in `package.json` license fields: how to deal with +packages that are left without a license on purpose. + +Refer to [the docs](https://github.com/npm/npm/blob/16a3dd545b10f8a2464e2037506ce39124739b41/doc/files/package.json.md#license) +for the specifics, but the short version is that instead of using +`LicenseRef-LICENSE` for proprietary licenses, you can now use either +`UNLICENSED` if you want to make it clear that you don't _want_ your software +to be licensed (and want npm to stop warning you about this), or `SEE LICENSE +IN <filename>` if there's a license with custom text you want to use. At some +point in the near term, we'll be updating npm to verify that the mentioned +file actually exists, but for now you're all on the honor system. + +* [`4827fc7`](https://github.com/npm/npm/commit/4827fc784117c17f35dd9b51b21d1eff6094f661) + [#8557](https://github.com/npm/npm/issues/8557) + `normalize-package-data@2.2.1`: Allow `UNLICENSED` and `SEE LICENSE IN + <filename>` in "license" field of `package.json`. + ([@kemitchell](https://github.com/kemitchell)) +* [`16a3dd5`](https://github.com/npm/npm/commit/16a3dd545b10f8a2464e2037506ce39124739b41) + [#8557](https://github.com/npm/npm/issues/8557) Document the new accepted + values for the "license" field. + ([@kemitchell](https://github.com/kemitchell)) +* [`8155311`](https://github.com/npm/npm/commit/81553119350deaf199e79e38e35b52a5c8ad206c) + [#8557](https://github.com/npm/npm/issues/8557) `init-package-json@1.7.0`: + Support new "license" field values at init time. + ([@kemitchell](https://github.com/kemitchell)) + +#### SMALLISH BUG FIXES + +* [`9d8cac9`](https://github.com/npm/npm/commit/9d8cac94a258db648a2b1069b1c8c6529c79d013) + [#8548](https://github.com/npm/npm/issues/8548) Remove extraneous newline + from `npm view` output, making it easier to use in shell scripts. + ([@eush77](https://github.com/eush77)) +* [`765fd4b`](https://github.com/npm/npm/commit/765fd4bfca8ea3e2a4a399765b17eec40a3d893d) + [#8521](https://github.com/npm/npm/issues/8521) When checking for outdated + packages, or updating packages, raise an error when the registry is + unreachable instead of silently "succeeding". + ([@ryantemple](https://github.com/ryantemple)) + +#### SMALLERISH DOCUMENTATION TWEAKS + +* [`5018335`](https://github.com/npm/npm/commit/5018335ce1754a9f771954ecbc1a93acde9b8c0a) + [#8365](https://github.com/npm/npm/issues/8365) Add details about which git + environment variables are whitelisted by npm. + ([@nmalaguti](https://github.com/nmalaguti)) +* [`bed9edd`](https://github.com/npm/npm/commit/bed9edddfdcc6d22a80feab33b53e4ef9172ec72) + [#8554](https://github.com/npm/npm/issues/8554) Fix typo in version docs. + ([@rainyday](https://github.com/rainyday)) + +#### WELL, I GUESS THERE ARE MORE DEPENDENCY UPGRADES + +* [`7ce2f06`](https://github.com/npm/npm/commit/7ce2f06f6f34d469b1d2e248084d4f3fef10c05e) + `request@2.58.0`: Refactor tunneling logic, and use `extend` instead of + abusing `util._extend`. ([@simov](https://github.com/simov)) +* [`e6c6195`](https://github.com/npm/npm/commit/e6c61954aad42e20eec49745615c7640b2026a6c) + `nock@2.6.0`: Refined interception behavior. + ([@pgte](https://github.com/pgte)) +* [`9583cc3`](https://github.com/npm/npm/commit/9583cc3cb192c2fced006927cfba7cd37b588605) + `fstream-npm@1.0.3`: Ensure that `main` entry in `package.json` is always + included in the bundled package tarball. + ([@coderhaoxin](https://github.com/coderhaoxin)) +* [`df89493`](https://github.com/npm/npm/commit/df894930f2716adac28740b29b2e863170919990) + `fstream@1.0.7` ([@isaacs](https://github.com/isaacs)) +* [`9744049`](https://github.com/npm/npm/commit/974404934758124aa8ae5b54f7d5257c3bd6b588) + `dezalgo@1.0.3`: `dezalgo` should be usable in the browser, and can be now + that `asap` has been upgraded to be browserifiable. + ([@mvayngrib](https://github.com/mvayngrib)) + +### v2.11.3 (2015-06-11): + +This was a very quiet week. This release was done by +[@iarna](https://github.com/iarna), while the rest of the team hangs out at +NodeConf Adventure! + +#### TESTS IN 0.8 FAIL LESS + +* [`5b3b3c2`](https://github.com/npm/npm/commit/5b3b3c2) + [#8491](//github.com/npm/npm/pull/8491) + Updates a test to use only 0.8 compatible features + ([@watilde](https://github.com/watilde)) + +#### THE TREADMILL OF UPDATES NEVER CEASES + +* [`9f439da`](https://github.com/npm/npm/commit/9f439da) + `spdx@0.4.1`: License range updates + ([@kemitchell](https://github.com/kemitchell)) +* [`2dd055b`](https://github.com/npm/npm/commit/2dd055b) + `normalize-package-data@2.2.1`: Fixes a crashing bug when the package.json + `scripts` property is not an object. + ([@iarna](https://github.com/iarna)) +* [`e02e85d`](https://github.com/npm/npm/commit/e02e85d) + `osenv@0.1.2`: Switches to using the `os-tmpdir` module instead of + `os.tmpdir()` for greate consistency in behavior between node versions. + ([@iarna](https://github.com/iarna)) +* [`a6f0265`](https://github.com/npm/npm/commit/a6f0265) + `ini@1.3.4` ([@isaacs](https://github.com/isaacs)) +* [`7395977`](https://github.com/npm/npm/commit/7395977) + `rimraf@2.4.0` ([@isaacs](https://github.com/isaacs)) + +### v2.11.2 (2015-06-04): + +Another small release this week, brought to you by the latest addition to the +CLI team, [@zkat](https://github.com/zkat) (Hi, all!) + +Mostly small documentation tweaks and version updates. Oh! And `npm outdated` +is actually sorted now. Rejoice! + +It's gonna be a while before we get another palindromic version number. Enjoy it +while it lasts. :3 + +#### QUALITY OF LIFE HAS NEVER BEEN BETTER + +* [`31aada4`](https://github.com/npm/npm/commit/31aada4ccc369c0903ff7f233f464955d12c6fe2) + [#8401](https://github.com/npm/npm/issues/8401) `npm outdated` output is just + that much nicer to consume now, due to sorting by name. + ([@watilde](https://github.com/watilde)) +* [`458a919`](https://github.com/npm/npm/commit/458a91925d8b20c5e672ba71a86745aad654abaf) + [#8469](https://github.com/npm/npm/pull/8469) Explicitly set `cwd` for + `preversion`, `version`, and `postversion` scripts. This makes the scripts + findable relative to the root dir. + ([@alexkwolfe](https://github.com/alexkwolfe)) +* [`55d6d71`](https://github.com/npm/npm/commit/55d6d71562e979e745c9db88861cc39f99b9f3ec) + Ensure package name and version are included in display during `npm version` + lifecycle execution. Gets rid of those little `undefined`s in the console. + ([@othiym23](https://github.com/othiym23)) + +#### WORDS HAVE NEVER BEEN QUITE THIS READABLE + +* [`3901e49`](https://github.com/npm/npm/commit/3901e4974c800e7f9fba4a5b2ff88da1126d5ef8) + [#8462](https://github.com/npm/npm/pull/8462) English apparently requires + correspondence between indefinite articles and attached nouns. + ([@Enet4](https://github.com/Enet4)) +* [`5a744e4`](https://github.com/npm/npm/commit/5a744e4b143ef7b2f50c80a1d96fdae4204d452b) + [#8421](https://github.com/npm/npm/pull/8421) The effect of `npm prune`'s + `--production` flag and how to use it have been documented a bit better. + ([@foiseworth](https://github.com/foiseworth)) +* [`eada625`](https://github.com/npm/npm/commit/eada625993485f0a2c5324b06f02bfa0a95ce4bc) + We've updated our `.mailmap` and `AUTHORS` files to make sure credit is given + where credit is due. ([@othiym23](https://github.com/othiym23)) + +#### VERSION NUMBERS HAVE NEVER BEEN BIGGER + +* [`c929fd1`](https://github.com/npm/npm/commit/c929fd1d0604b5878ed05706447e078d3e41f5b3) + `readable-stream@1.1.13`: Manually deduped `v1.1.13` (streams3) to make + deduping more reliable on `npm@<3`. ([@othiym23](https://github.com/othiym23)) +* [`a9b4b78`](https://github.com/npm/npm/commit/a9b4b78dcc85571fd1cdd737903f7f37a5e6a755) + `request@2.57.0`: Replace dependency on IncomingMessage's `.client` with + `.socket` as the former was deprecated in io.js 2.2.0. + ([@othiym23](https://github.com/othiym23)) +* [`4b5e557`](https://github.com/npm/npm/commit/4b5e557a23cdefd521ad154111e3d4dcc81f1cdb) + `abbrev@1.0.7`: Better testing, with coverage. + ([@othiym23](https://github.com/othiym23)) +* [`561affe`](https://github.com/npm/npm/commit/561affee21df9bbea5a47298f2452f533be8f359) + `semver@4.3.6`: .npmignore added for less cruft, and better testing, with coverage. + ([@othiym23](https://github.com/othiym23)) +* [`60aef3c`](https://github.com/npm/npm/commit/60aef3cf5d84d757752db3eb8ede2cb385469e7b) + `graceful-fs@3.0.8`: io.js fixes. + ([@zkat](https://github.com/zkat)) +* [`f8bd453`](https://github.com/npm/npm/commit/f8bd453b1a1c46ba7666cb166595e8a011eae443) + `config-chain@1.1.9`: Added MIT license to package.json + ([@zkat](https://github.com/zkat)) + +### v2.11.1 (2015-05-28): + +This release brought to you from poolside at the Omni Amelia Island Resort and +JSConf 2015, which is why it's so tiny. + +#### CONFERENCE WIFI CAN'T STOP THESE BUG FIXES + +* [`cf109a6`](https://github.com/npm/npm/commit/cf109a682f38a059a994da953d5c1b4aaece5e2f) + [#8381](https://github.com/npm/npm/issues/8381) Documented a subtle gotcha + with `.npmrc`, which is that it needs to have its permissions set such that + only the owner can read or write the file. + ([@colakong](https://github.com/colakong)) +* [`180da67`](https://github.com/npm/npm/commit/180da67c9fa53103d625e2f031626c2453c7ebcd) + [#8365](https://github.com/npm/npm/issues/8365) Git 2.3 adds support for + `GIT_SSH_COMMAND`, which allows you to pass an explicit git command (with, + for example, a specific identity passed in on the command line). + ([@nmalaguti](https://github.com/nmalaguti)) + +#### MY (VIRGIN) PINA COLADA IS GETTING LOW, BETTER UPGRADE THESE DEPENDENCIES + +* [`b72de41`](https://github.com/npm/npm/commit/b72de41c5cc9f0c46d3fa8f062c75bd273641474) + `node-gyp@2.0.0`: Use a newer version of `gyp`, and generally improve support + for Visual Studios and Windows. + ([@TooTallNate](https://github.com/TooTallNate)) +* [`8edbe21`](https://github.com/npm/npm/commit/8edbe210af41e8f248f5bb92c72de92f54fda3b1) + `node-gyp@2.0.1`: Don't crash when Python's version doesn't parse as valid + semver. ([@TooTallNate](https://github.com/TooTallNate)) +* [`ba0e0a8`](https://github.com/npm/npm/commit/ba0e0a845a4f29717aba566b416a27d1a22f5d08) + `glob@5.0.10`: Add coverage to tests. ([@isaacs](https://github.com/isaacs)) +* [`7333701`](https://github.com/npm/npm/commit/7333701b5d4f01673f37d64992c63c4e15864d6d) + `request@2.56.0`: Bug fixes and dependency upgrades. + ([@simov](https://github.com/simov)) + +### v2.11.0 (2015-05-21): + +For the first time in a very long time, we've added new events to the life +cycle used by `npm run-script`. Since running `npm version (major|minor|patch)` +is typically the last thing many developers do before publishing their updated +packages, it makes sense to add life cycle hooks to run tests or otherwise +preflight the package before doing a full publish. Thanks, as always, to the +indefatigable [@watilde](https://github.com/watilde) for yet another great +usability improvement for npm! + +#### FEATURELETS + +* [`b07f7c7`](https://github.com/npm/npm/commit/b07f7c7c1e5021730b3c320f1b3a46e70f8a21ff) + [#7906](https://github.com/npm/npm/issues/7906) + Add new [`scripts`](https://github.com/npm/npm/blob/master/doc/misc/npm-scripts.md) to + allow you to run scripts before and after + the [`npm version`](https://github.com/npm/npm/blob/master/doc/cli/npm-version.md) + command has run. This makes it easy to, for instance, require that your + test suite passes before bumping the version by just adding `"preversion": + "npm test"` to the scripts section of your `package.json`. + ([@watilde](https://github.com/watilde)) +* [`8a46136`](https://github.com/npm/npm/commit/8a46136f42e416cbadb533bcf89d73d681ed421d) + [#8185](https://github.com/npm/npm/issues/8185) + When we get a "not found" error from the registry, we'll now check to see + if the package name you specified is invalid and if so, give you a better + error message. ([@thefourtheye](https://github.com/thefourtheye)) + +#### BUG FIXES + +* [`9bcf573`](https://github.com/npm/npm/commit/9bcf5730bd0316f210dafea898afe9103849cea9) + [#8324](https://github.com/npm/npm/pull/8324) On Windows, when you've configured a + custom `node-gyp`, run it with node itself instead of using the default open action (which + is almost never what you want). ([@bangbang93](https://github.com/bangbang93)) +* [`1da9b04`](https://github.com/npm/npm/commit/1da9b0411d3416c7fca17d08cbbcfca7ae86e92d) + [#7195](https://github.com/npm/npm/issues/7195) + [#7260](https://github.com/npm/npm/issues/7260) `npm-registry-client@6.4.0`: + (Re-)allow publication of existing mixed-case packages (part 1). + ([@smikes](https://github.com/smikes)) +* [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) + [#7195](https://github.com/npm/npm/issues/7195) + [#7260](https://github.com/npm/npm/issues/7260) + `normalize-package-data@2.2.0`: (Re-)allow publication of existing mixed-case + packages (part 2). ([@smikes](https://github.com/smikes)) + +#### DOCUMENTATION IMPROVEMENTS + +* [`f62ee05`](https://github.com/npm/npm/commit/f62ee05333b141539a8e851c620dd2e82ff06860) + [#8314](https://github.com/npm/npm/issues/8314) Update the README to warn + folks away from using the CLI's internal API. For the love of glob, just use a + child process to run the CLI! ([@claycarpenter](https://github.com/claycarpenter)) +* [`1093921`](https://github.com/npm/npm/commit/1093921c04db41ab46db24a170a634a4b2acd8d9) + [#8279](https://github.com/npm/npm/pull/8279) + Update the documentation to note that, yes, you can publish scoped packages to the + public registry now! ([@mantoni](https://github.com/mantoni)) +* [`f87cde5`](https://github.com/npm/npm/commit/f87cde5234a760d3e515ffdaacaed6f5b71dbf44) + [#8292](https://github.com/npm/npm/pull/8292) + Fix typo in an example and grammar in the description in + the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). + ([@vshih](https://github.com/vshih)) +* [`d3526ce`](https://github.com/npm/npm/commit/d3526ceb09a0c29fdb7d4124536ae09057d033e7) + Improve the formatting in + the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). + ([@othiym23](https://github.com/othiym23)) +* [`19fe6d2`](https://github.com/npm/npm/commit/19fe6d20883e28956ff916fe4dae42d73ee6195b) + [#8311](https://github.com/npm/npm/pull/8311) + Update [README.md](https://github.com/npm/npm#readme) to use syntax highlighting in + its code samples and bits of shell scripts. ([@SimenB](https://github.com/SimenB)) + +#### DEPENDENCY UPDATES! ALWAYS AND FOREVER! + +* [`fc52160`](https://github.com/npm/npm/commit/fc52160d0223226fffe4166f42fdfd3b899b3c1e) + [#4700](https://github.com/npm/npm/issues/4700) [#5044](https://github.com/npm/npm/issues/5044) + `init-package-json@1.6.0`: Make entering an invalid version while running `npm init` give + you an immediate error and prompt you to correct it. ([@watilde](https://github.com/watilde)) +* [`738853e`](https://github.com/npm/npm/commit/738853eb1f55636476a2a410c2c04732eec9d51e) + [#7763](https://github.com/npm/npm/issues/7763) `fs-write-stream-atomic@1.0.3`: Fix a bug + where errors would not propagate, making error messages unhelpful. + ([@iarna](https://github.com/iarna)) +* [`6d74a2d`](https://github.com/npm/npm/commit/6d74a2d2ac7f92750cf6a2cfafae1af23b569098) + `npm-package-arg@4.0.1`: Fix tests on windows ([@Bacra](https://github.com)) and with + more recent `hosted-git-info`. ([@iarna](https://github.com/iarna)) +* [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) + `hosted-git-info@2.1.4`: Correct spelling in its documentation. + ([@iarna](https://github.com/iarna)) +* [`d7956ca`](https://github.com/npm/npm/commit/d7956ca17c057d5383ff0d3fc5cf6ac2940b034d) + `glob@5.0.7`: Fix a bug where unusual error conditions could make + further use of the module fail. ([@isaacs](https://github.com/isaacs)) +* [`44f7d74`](https://github.com/npm/npm/commit/44f7d74c5d3181d37da7ea7949c86b344153f8d9) + `tap@1.1.0`: Update to the most recent tap to get a whole host of bug + fixes and integration with [coveralls](https://coveralls.io/). + ([@isaacs](https://github.com/isaacs)) +* [`c21e8a8`](https://github.com/npm/npm/commit/c21e8a8d94bcf0ad79dc583ddc53f8366d4813b3) + `nock@2.2.0` ([@othiym23](https://github.com/othiym23)) + +#### LICENSE FILES FOR THE LICENSE GOD + +* Add missing ISC license file to package ([@kasicka](https://github.com/kasicka)): + * [`aa9908c`](https://github.com/npm/npm/commit/aa9908c20017729673b9d410b77f9a16b7aae8a4) `realize-package-specifier@3.0.1` + * [`23a3b1a`](https://github.com/npm/npm/commit/23a3b1a726b9176c70ce0ccf3cd9d25c54429bdf) `fs-vacuum@1.2.6` + * [`8e04bba`](https://github.com/npm/npm/commit/8e04bba830d4353d84751d21803cd127c96153a7) `dezalgo@1.0.2` + * [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) `hosted-git-info@2.1.4` + * [`6a54917`](https://github.com/npm/npm/commit/6a54917fbd4df995495a95d4b548defd44b77c93) `write-file-atomic@1.1.2` + * [`971f92c`](https://github.com/npm/npm/commit/971f92c4a4e5514217d1e4db45d1ccf71a60ff19) `async-some@1.0.2` + * [`67b50b7`](https://github.com/npm/npm/commit/67b50b7667a42bb3340a660eb2e617e1a554d2d4) `normalize-git-url@1.0.1` + +#### SPDX LICENSE UPDATES + +* Switch license to + [BSD-2-Clause](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) from + plain "BSD" ([@isaacs](https://github.com/isaacs)): + * [`efdb733`](https://github.com/npm/npm/commit/efdb73332eeedcad4c609796929070b62abb37ab) `npm-user-validate@0.1.2` + * [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) `normalize-package-data@2.2.0` +* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from + [BSD](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) + ([@isaacs](https://github.com/isaacs)): + * [`c300956`](https://github.com/npm/npm/commit/c3009565a964f0ead4ac4ab234b1a458e2365f17) `block-stream@0.0.8` + * [`1de1253`](https://github.com/npm/npm/commit/1de125355765fecd31e682ed0ff9d2edbeac0bb0) `lockfile@1.0.1` + * [`0d5698a`](https://github.com/npm/npm/commit/0d5698ab132e376c7aec93ae357c274932116220) `osenv@0.1.1` + * [`2e84921`](https://github.com/npm/npm/commit/2e84921474e1ffb18de9fce4616e73171fa8046d) `abbrev@1.0.6` + * [`872fac9`](https://github.com/npm/npm/commit/872fac9d10c11607e4d0348c08a683b84e64d30b) `chmodr@0.1.1` + * [`01eb7f6`](https://github.com/npm/npm/commit/01eb7f60acba584346ad8aae846657899f3b6887) `chownr@0.0.2` + * [`294336f`](https://github.com/npm/npm/commit/294336f0f31c7b9fe31a50075ed750db6db134d1) `read@1.0.6` + * [`ebdf6a1`](https://github.com/npm/npm/commit/ebdf6a14d17962cdb7128402c53b452f91d44ca7) `graceful-fs@3.0.7` +* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from + [MIT](http://spdx.org/licenses/MIT.html#licenseText) + ([@isaacs](https://github.com/isaacs)): + * [`e5d237f`](https://github.com/npm/npm/commit/e5d237fc0f436dd2a89437ebf8a9632a2e35ccbe) `nopt@3.0.2` + * [`79fef14`](https://github.com/npm/npm/commit/79fef1421b78f044980f0d1bf0e97039b6992710) `rimraf@2.3.4` + * [`22527da`](https://github.com/npm/npm/commit/22527da4816e7c2746cdc0317c5fb4a85152d554) `minimatch@2.0.8` + * [`882ac87`](https://github.com/npm/npm/commit/882ac87a6c4123ca985d7ad4394ea5085e5b0ef5) `lru-cache@2.6.4` + * [`9d9d015`](https://github.com/npm/npm/commit/9d9d015a2e972f68664dda54fbb204db28b21ede) `npmlog@1.2.1` + +### v2.10.1 (2015-05-14): + +#### BUG FIXES & DOCUMENTATION TWEAKS + +* [`dc77520`](https://github.com/npm/npm/commit/dc7752013ffce13a3d3f13e518a0052c22fc1158) + When getting back a 404 from a request to a private registry that uses a + registry path that extends past the root + (`http://registry.enterprise.co/path/to/registry`), display the name of the + nonexistent package, rather than the first element in the registry API path. + Sorry, Artifactory users! ([@hayes](https://github.com/hayes)) +* [`f70dea9`](https://github.com/npm/npm/commit/f70dea9b4766f6eaa55012c3e8087e9cb04fd4ce) + Make clearer that `--registry` can be used on a per-publish basis to push a + package to a non-default registry. ([@mischkl](https://github.com/mischkl)) +* [`a3e26f5`](https://github.com/npm/npm/commit/a3e26f5b4465991a941a325468ab7725670d2a94) + Did you know that GitHub shortcuts can have commit-ishes included + (`org/repo#branch`)? They can! ([@iarna](https://github.com/iarna)) +* [`0e2c091`](https://github.com/npm/npm/commit/0e2c091a539b61fdc60423b6bbaaf30c24e4b1b8) + Some errors from `readPackage` were being swallowed, potentially leading to + invalid package trees on disk. ([@smikes](https://github.com/smikes)) + +#### DEPENDENCY UPDATES! STILL! MORE! AGAIN! + +* [`0b901ad`](https://github.com/npm/npm/commit/0b901ad0811d84dda6ca0755a9adc8d47825edd0) + `lru-cache@2.6.3`: Removed some cruft from the published package. + ([@isaacs](https://github.com/isaacs)) +* [`d713e0b`](https://github.com/npm/npm/commit/d713e0b14930c563e3fdb6ac6323bae2a8924652) + `mkdirp@0.5.1`: Made compliant with `standard`, dropped support for Node 0.6, + added (Travis) support for Node 0.12 and io.js. + ([@isaacs](https://github.com/isaacs)) +* [`a2d6578`](https://github.com/npm/npm/commit/a2d6578b6554c5c9d48fe2006751759f4da57520) + `glob@1.0.3`: Updated to use `tap@1`. ([@isaacs](https://github.com/isaacs)) +* [`64cd1a5`](https://github.com/npm/npm/commit/64cd1a570aaa5f24ccba190948ec9456297c97f5) + `fstream@ 1.0.6`: Made compliant with [`standard`](http://npm.im/standard) + (done by [@othiym23](https://github.com/othiym23), and then debugged and + fixed by [@iarna](https://github.com/iarna)), and license changed to ISC. + ([@othiym23](https://github.com/othiym23) / + [@iarna](https://github.com/iarna)) +* [`b527a7c`](https://github.com/npm/npm/commit/b527a7c2ba3c4002f443dd2c536ff4ff41a38b86) + `which@1.1.1`: Callers can pass in their own `PATH` instead of relying on + `process.env`. ([@isaacs](https://github.com/isaacs)) + +### v2.10.0 (2015-05-8): + +#### THE IMPLICATIONS ARE MORE PROFOUND THAN THEY APPEAR + +If you've done much development in The Enterprise®™, you know that keeping +track of software licenses is far more important than one might expect / hope / +fear. Tracking licenses is a hassle, and while many (if not most) of us have +(reluctantly) gotten around to setting a license to use by default with all our +new projects (even if it's just WTFPL), that's about as far as most of us think +about it. In big enterprise shops, ensuring that projects don't inadvertently +use software with unacceptably encumbered licenses is serious business, and +developers spend a surprising (and appalling) amount of time ensuring that +licensing is covered by writing automated checkers and other license auditing +tools. + +The Linux Foundation has been working on a machine-parseable syntax for license +expressions in the form of [SPDX](https://spdx.org/), an appropriately +enterprisey acronym. IP attorney and JavaScript culture hero [Kyle +Mitchell](http://kemitchell.com/) has put a considerable amount of effort into +bringing SPDX to JavaScript and Node. He's written +[`spdx.js`](https://github.com/kemitchell/spdx.js), a JavaScript SPDX +expression parser, and has integrated it into npm in a few different ways. + +For you as a user of npm, this means: + +* npm now has proper support for dual licensing in `package.json`, due to + SPDX's compound expression syntax. Run `npm help package.json` for details. +* npm will warn you if the `package.json` for your project is either missing a + `"license"` field, or if the value of that field isn't a valid SPDX + expression (pro tip: `"BSD"` becomes `"BSD-2-Clause"` in SPDX (unless you + really want one of its variants); `"MIT"` and `"ISC"` are fine as-is; the + [full list](https://github.com/shinnn/spdx-license-ids/blob/master/spdx-license-ids.json) + is its own package). +* `npm init` now demands that you use a valid SPDX expression when using it + interactively (pro tip: I mostly use `npm init -y`, having previously run + `npm config set init.license=MIT` / `npm config set init.author.email=foo` / + `npm config set init.author.name=me`). +* The documentation for `package.json` has been updated to tell you how to use + the `"license"` field properly with SPDX. + +In general, this shouldn't be a big deal for anybody other than people trying +to run their own automated license validators, but in the long run, if +everybody switches to this format, many people's lives will be made much +simpler. I think this is an important improvement for npm and am very thankful +to Kyle for taking the lead on this. Also, even if you think all of this is +completely stupid, just [choose a license](http://en.wikipedia.org/wiki/License-free_software) +anyway. Future you will thank past you someday, unless you are +[djb](http://cr.yp.to/), in which case you are djb, and more power to you. + +* [`8669f7d`](https://github.com/npm/npm/commit/8669f7d88c472ccdd60e140106ac43cca636a648) + [#8179](https://github.com/npm/npm/issues/8179) Document how to use SPDX in + `license` stanzas in `package.json`, including how to migrate from old busted + license declaration arrays to fancy new compound-license clauses. + ([@kemitchell](https://github.com/kemitchell)) +* [`98ad98c`](https://github.com/npm/npm/commit/98ad98cb11f3d3ba29a488ef1ab050b066d9c7f6) + [#8197](https://github.com/npm/npm/issues/8197) `init-package-json@1.5.0` + Ensure that packages bootstrapped with `npm init` use an SPDX-compliant + license expression. ([@kemitchell](https://github.com/kemitchell)) +* [`2ad3905`](https://github.com/npm/npm/commit/2ad3905e9139b0be2b22accf707b814469de813e) + [#8197](https://github.com/npm/npm/issues/8197) + `normalize-package-data@2.1.0`: Warn when a package is missing a license + declaration, or using a license expression that isn't valid SPDX. + ([@kemitchell](https://github.com/kemitchell)) +* [`127bb73`](https://github.com/npm/npm/commit/127bb73ccccc59a1267851c702d8ebd3f3a97e81) + [#8197](https://github.com/npm/npm/issues/8197) `tar@2.1.1`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`e9a933a`](https://github.com/npm/npm/commit/e9a933a9148180d9d799f99f4154f5110ff2cace) + [#8197](https://github.com/npm/npm/issues/8197) `once@1.3.2`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`412401f`](https://github.com/npm/npm/commit/412401fb6a19b18f3e02d97a24d4dafed650c186) + [#8197](https://github.com/npm/npm/issues/8197) `semver@4.3.4`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) + +As a corollary to the previous changes, I've put some work into making `npm +install` spew out fewer pointless warnings about missing values in transitive +dependencies. From now on, npm will only warn you about missing READMEs, +license fields, and the like for top-level projects (including packages you +directly install into your application, but we may relax that eventually). + +Practically _nobody_ liked having those warnings displayed for child +dependencies, for the simple reason that there was very little that anybody +could _do_ about those warnings, unless they happened to be the maintainers of +those dependencies themselves. Since many, many projects don't have +SPDX-compliant licenses, the number of warnings reached a level where they ran +the risk of turning into a block of visual noise that developers (read: me, and +probably you) would ignore forever. + +So I fixed it. If you still want to see the messages about child dependencies, +they're still there, but have been pushed down a logging level to `info`. You +can display them by running `npm install -d` or `npm install --loglevel=info`. + +* [`eb18245`](https://github.com/npm/npm/commit/eb18245f55fb4cd62a36867744bcd1b7be0a33e2) + Only warn on normalization errors for top-level dependencies. Transitive + dependency validation warnings are logged at `info` level. + ([@othiym23](https://github.com/othiym23)) + +#### BUG FIXES + +* [`e40e809`](https://github.com/npm/npm/commit/e40e8095d2bc9fa4eb8f01aa22067e0068fa8a54) + `tap@1.0.1`: TAP: The Next Generation. Fix up many tests to they work + properly with the new major version of `node-tap`. Look at all the colors! + ([@isaacs](https://github.com/isaacs)) +* [`f9314e9`](https://github.com/npm/npm/commit/f9314e97d26532c0ef2b03e98f3ed300b7cd5026) + `nock@1.9.0`: Minor tweaks and bug fixes. ([@pgte](https://github.com/pgte)) +* [`45c2b1a`](https://github.com/npm/npm/commit/45c2b1aaa051733fa352074994ae6e569fd51e8b) + [#8187](https://github.com/npm/npm/issues/8187) `npm ls` wasn't properly + recognizing dependencies installed from GitHub repositories as git + dependencies, and so wasn't displaying them as such. + ([@zornme](https://github.com/zornme)) +* [`1ab57c3`](https://github.com/npm/npm/commit/1ab57c38116c0403965c92bf60121f0f251433e4) + In some cases, `npm help` was using something that looked like a regular + expression where a glob pattern should be used, and vice versa. + ([@isaacs](https://github.com/isaacs)) + +### v2.9.1 (2015-04-30): + +#### WOW! MORE GIT FIXES! YOU LOVE THOSE! + +The first item below is actually a pretty big deal, as it fixes (with a +one-word change and a much, much longer test case (thanks again, +[@iarna](https://github.com/iarna))) a regression that's been around for months +now. If you're depending on multiple branches of a single git dependency in a +single project, you probably want to check out `npm@2.9.1` and verify that +things (again?) work correctly in your project. + +* [`178a6ad`](https://github.com/npm/npm/commit/178a6ad540215820d16217465a5f220d8c95a313) + [#7202](https://github.com/npm/npm/issues/7202) When caching git + dependencies, do so by the whole URL, including the branch name, so that if a + single application depends on multiple branches from the same repository (in + practice, multiple version tags), every install is of the correct version, + instead of reusing whichever branch the caching process happened to check out + first. ([@iarna](https://github.com/iarna)) +* [`63b79cc`](https://github.com/npm/npm/commit/63b79ccde092a9cb3b1f34abe43e1d2ba69c0dbf) + [#8084](https://github.com/npm/npm/issues/8084) Ensure that Bitbucket, + GitHub, and Gitlab dependencies are installed the same way as non-hosted git + dependencies, fixing `npm install --link`. + ([@laiso](https://github.com/laiso)) + +#### DOCUMENTATION FIXES AND TWEAKS + +These changes may seem simple and small (except Lin's fix to the package name +restrictions, which was more an egregious oversight on our part), but cleaner +documentation makes npm significantly more pleasant to use. I really appreciate +all the typo fixes, clarifications, and formatting tweaks people send us, and +am delighted that we get so many of these pull requests. Thanks, everybody! + +* [`ca478dc`](https://github.com/npm/npm/commit/ca478dcaa29b8f07cd6fe515a3c4518166819291) + [#8137](https://github.com/npm/npm/issues/8137) Somehow, we had failed to + clearly document the full restrictions on package names. + [@linclark](https://github.com/linclark) has now fixed that, although we will + take with us to our graves the reasons why the maximum package name length is 214 + characters (well, OK, it was that that was the longest name in the registry + when we decided to put a cap on the name length). + ([@linclark](https://github.com/linclark)) +* [`b574076`](https://github.com/npm/npm/commit/b5740767c320c1eff3576a8d63952534a0fbb936) + [#8079](https://github.com/npm/npm/issues/8079) Make the `npm shrinkwrap` + documentation use code formatting for examples consistently. It would be + great to do this for more commands HINT HINT. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`1ff636e`](https://github.com/npm/npm/commit/1ff636e2db3852a53e38c866fed7eafdacd307fc) + [#8105](https://github.com/npm/npm/issues/8105) Document that the global + `npmrc` goes in `$PREFIX/etc/npmrc`, instead of `$PREFIX/npmrc`. + ([@anttti](https://github.com/anttti)) +* [`c3f2f7c`](https://github.com/npm/npm/commit/c3f2f7c299342e1c1eccc55a976a63c607f51621) + [#8127](https://github.com/npm/npm/issues/8127) Document how to use `npm run + build` directly (hint: it's different from `npm build`!). + ([@mikemaccana](https://github.com/mikemaccana)) +* [`873e467`](https://github.com/npm/npm/commit/873e46757e1986761b15353f94580a071adcb383) + [#8069](https://github.com/npm/npm/issues/8069) Take the old, dead npm + mailing list address out of `package.json`. It seems that people don't have + much trouble figuring out how to report errors to npm. + ([@robertkowalski](https://github.com/robertkowalski)) + +#### ENROBUSTIFICATIONMENT + +* [`5abfc9c`](https://github.com/npm/npm/commit/5abfc9c9017da714e47a3aece750836b4f9af6a9) + [#7973](https://github.com/npm/npm/issues/7973) `npm run-script` completion + will only suggest run scripts, instead of including dependencies. If for some + reason you still wanted it to suggest dependencies, let us know. + ([@mantoni](https://github.com/mantoni)) +* [`4b564f0`](https://github.com/npm/npm/commit/4b564f0ce979dc74c09604f4d46fd25a2ee63804) + [#8081](https://github.com/npm/npm/issues/8081) Use `osenv` to parse the + environment's `PATH` in a platform-neutral way. + ([@watilde](https://github.com/watilde)) +* [`a4b6238`](https://github.com/npm/npm/commit/a4b62387b41848818973eeed056fd5c6570274f3) + [#8094](https://github.com/npm/npm/issues/8094) When we refactored the + configuration code to split out checking for IPv4 local addresses, we + inadvertently completely broke it by failing to return the values. In + addition, just the call to `os.getInterfaces()` could throw on systems where + querying the network configuration requires elevated privileges (e.g. Amazon + Lambda). Add the return, and trap errors so they don't cause npm to explode. + Thanks to [@mhart](https://github.com/mhart) for bringing this to our + attention! ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES WAIT FOR NO SOPHONT + +* [`000cd8b`](https://github.com/npm/npm/commit/000cd8b52104942ac3404f0ad0651d82f573da37) + `rimraf@2.3.3`: More informative assertions on argument validation failure. + ([@isaacs](https://github.com/isaacs)) +* [`530a2e3`](https://github.com/npm/npm/commit/530a2e369128270f3e098f0e9be061533003b0eb) + `lru-cache@2.6.2`: Revert to old key access-time behavior, as it was correct + all along. ([@isaacs](https://github.com/isaacs)) +* [`d88958c`](https://github.com/npm/npm/commit/d88958ca02ce81b027b9919aec539d0145875a59) + `minimatch@2.0.7`: Feature detection and test improvements. + ([@isaacs](https://github.com/isaacs)) +* [`3fa39e4`](https://github.com/npm/npm/commit/3fa39e4d492609d5d045033896dcd99f7b875329) + `nock@1.7.1` ([@pgte](https://github.com/pgte)) + +### v2.9.0 (2015-04-23): + +This week was kind of a breather to concentrate on fixing up the tests on the +`multi-stage` branch, and not mess with git issues for a little while. +Unfortunately, There are now enough severe git issues that we'll probably have +to spend another couple weeks tackling them. In the meantime, enjoy these two +small features. They're just enough to qualify for a semver-minor bump: + +#### NANOFEATURES + +* [`2799322`](https://github.com/npm/npm/commit/279932298ce5b589c5eea9439ac40b88b99c6a4a) + [#7426](https://github.com/npm/npm/issues/7426) Include local modules in `npm + outdated` and `npm update`. ([@ArnaudRinquin](https://github.com/ArnaudRinquin)) +* [`2114862`](https://github.com/npm/npm/commit/21148620fa03a582f4ec436bb16bd472664f2737) + [#8014](https://github.com/npm/npm/issues/8014) The prefix used before the + version on version tags is now configurable via `tag-version-prefix`. Be + careful with this one and read the docs before using it. + ([@kkragenbrink](https://github.com/kkragenbrink)) + +#### OTHER MINOR TWEAKS + +* [`18ce0ec`](https://github.com/npm/npm/commit/18ce0ecd2d94ad3af01e997f1396515892dd363c) + [#3032](https://github.com/npm/npm/issues/3032) `npm unpublish` will now use + the registry set in `package.json`, just like `npm publish`. This only + applies, for now, when unpublishing the entire package, as unpublishing a + single version requires the name be included on the command line and + therefore doesn't read from `package.json`. ([@watilde](https://github.com/watilde)) +* [`9ad2100`](https://github.com/npm/npm/commit/9ad210042242e51d52b2a8b633d8e59248f5faa4) + [#8008](https://github.com/npm/npm/issues/8008) Once again, when considering + what to install on `npm install`, include `devDependencies`. + ([@smikes](https://github.com/smikes)) +* [`5466260`](https://github.com/npm/npm/commit/546626059909dca1906454e820ca4e315c1795bd) + [#8003](https://github.com/npm/npm/issues/8003) Clarify the documentation + around scopes to make it easier to understand how they support private + packages. ([@smikes](https://github.com/smikes)) + +#### DEPENDENCIES WILL NOT STOP UNTIL YOU ARE VERY SLEEPY + +* [`faf65a7`](https://github.com/npm/npm/commit/faf65a7bbb2fad13216f64ed8f1243bafe743f97) + `init-package-json@1.4.2`: If there are multiple validation errors and + warnings, ensure they all get displayed (includes a rad new way of testing + `init-package-json` contributed by + [@michaelnisi](https://github.com/michaelnisi)). + ([@MisumiRize](https://github.com/MisumiRize)) +* [`7f10f38`](https://github.com/npm/npm/commit/7f10f38d29a8423d7cde8103fa7b64ac728da1e0) + `editor@1.0.0`: `1.0.0` is literally more than `0.1.0` (no change aside from + version number). ([@substack](https://github.com/substack)) +* [`4979af3`](https://github.com/npm/npm/commit/4979af3fcae5a3962383b7fdad3162381e62eefe) + [#6805](https://github.com/npm/npm/issues/6805) `npm-registry-client@6.3.3`: + Decode scoped package names sent by the registry so they look nicer. + ([@mmalecki](https://github.com/mmalecki)) + +### v2.8.4 (2015-04-16): + +This is the fourth release of npm this week, so it's mostly just landing a few +small outstanding PRs on dependencies and some tiny documentation tweaks. +`npm@2.8.3` is where the real action is. + +* [`ee2bd77`](https://github.com/npm/npm/commit/ee2bd77f3c64d38735d1d31028224a5c40422a9b) + [#7983](https://github.com/npm/npm/issues/7983) `tar@2.1.0`: Better error + reporting in corrupted tar files, and add support for the `fromBase` flag + (rescued from the dustbin of history by + [@deanmarano](https://github.com/deanmarano)). + ([@othiym23](https://github.com/othiym23)) +* [`d8eee6c`](https://github.com/npm/npm/commit/d8eee6cf9d2ff7aca68dfaed2de76824a3e0d9af) + `init-package-json@1.4.1`: Add support for a default author, and only add + scope to a package name once. ([@othiym23](https://github.com/othiym23)) +* [`4fc5d98`](https://github.com/npm/npm/commit/4fc5d98b785f601c60d4dc0a2c8674f0cccf6262) + `lru-cache@2.6.1`: Small tweaks to cache value aging and entry counting that + are irrelevant to npm. ([@isaacs](https://github.com/isaacs)) +* [`1fe5840`](https://github.com/npm/npm/commit/1fe584089f5bef133de5518aa26eaf6064be2bf7) + [#7946](https://github.com/npm/npm/issues/7946) Make `npm init` text + friendlier. ([@sandfox](https://github.com/sandfox)) + +### v2.8.3 (2015-04-15): + +#### TWO SMALL GIT TWEAKS + +This is the last of a set of releases intended to ensure npm's git support is +robust enough that we can stop working on it for a while. These fixes are +small, but prevent a common crasher and clear up one of the more confusing +error messages coming out of npm when working with repositories hosted on git. + +* [`387f889`](https://github.com/npm/npm/commit/387f889c0e8fb617d9cc9a42ed0a3ec49424ab5d) + [#7961](https://github.com/npm/npm/issues/7961) Ensure that hosted git SSH + URLs always have a valid protocol when stored in `resolved` fields in + `npm-shrinkwrap.json`. ([@othiym23](https://github.com/othiym23)) +* [`394c2f5`](https://github.com/npm/npm/commit/394c2f5a1227232c0baf42fbba1402aafe0d6ffb) + Switch the order in which hosted Git providers are checked to `git:`, + `git+https:`, then `git+ssh:` (from `git:`, `git+ssh:`, then `git+https:`) in + an effort to go from most to least likely to succeed, to make for less + confusing error message. ([@othiym23](https://github.com/othiym23)) + +### v2.8.2 (2015-04-14): + +#### PEACE IN OUR TIME + +npm has been having an issue with CouchDB's web server since the release +of io.js and Node.js 0.12.0 that has consumed a huge amount of my time +to little visible effect. Sam Mikes picked up the thread from me, and +after a [_lot_ of effort](https://github.com/npm/npm/issues/7699#issuecomment-93091111) +figured out that ultimately there are probably a couple problems with +the new HTTP Agent keep-alive handling in new versions of Node. In +addition, `npm-registry-client` was gratuitously sending a body along +with a GET request which was triggering the bugs. Sam removed about 10 bytes from +one file in `npm-registry-client`, and this problem, which has been bugging us for months, +completely went away. + +In conclusion, Sam Mikes is great, and anybody using a private registry +hosted on CouchDB should thank him for his hard work. Also, thanks to +the community at large for pitching in on this bug, which has been +around for months now. + +* [`431c3bf`](https://github.com/npm/npm/commit/431c3bf6cdec50f9f0c735f478cb2f3f337d3313) + [#7699](https://github.com/npm/npm/issues/7699) `npm-registry-client@6.3.2`: + Don't send body with HTTP GET requests when logging in. + ([@smikes](https://github.com/smikes)) + +### v2.8.1 (2015-04-12): + +#### CORRECTION: NPM'S GIT INTEGRATION IS DOING OKAY + +A [helpful bug report](https://github.com/npm/npm/issues/7872#issuecomment-91809553) +led to another round of changes to +[`hosted-git-info`](https://github.com/npm/hosted-git-info/commit/827163c74531b69985d1ede7abced4861e7b0cd4), +some additional test-writing, and a bunch of hands-on testing against actual +private repositories. While the complexity of npm's git dependency handling is +nearly fractal (because npm is very complex, and git is even more complex), +it's feeling way more solid than it has for a while. We think this is a +substantial improvement over what we had before, so give `npm@2.8.1` a shot if +you have particularly complex git use cases and +[let us know](https://github.com/npm/npm/issues/new) how it goes. + +(NOTE: These changes mostly affect cloning and saving references to packages +hosted in git repositories, and don't address some known issues with things +like lifecycle scripts not being run on npm dependencies. Work continues on +other issues that affect parity between git and npm registry packages.) + +* [`66377c6`](https://github.com/npm/npm/commit/66377c6ece2cf4d53d9a618b7d9824e1452bc293) + [#7872](https://github.com/npm/npm/issues/7872) `hosted-git-info@2.1.2`: Pass + through credentials embedded in SSH and HTTPs git URLs. + ([@othiym23](https://github.com/othiym23)) +* [`15efe12`](https://github.com/npm/npm/commit/15efe124753257728a0ddc64074fa5a4b9c2eb30) + [#7872](https://github.com/npm/npm/issues/7872) Use the new version of + `hosted-git-info` to pass along credentials embedded in git URLs. Test it. + Test it a lot. ([@othiym23](https://github.com/othiym23)) + +#### SCOPED DEPENDENCIES AND PEER DEPENDENCIES: NOT QUITE REESE'S + +Big thanks to [@ewie](https://github.com/ewie) for identifying an issue with +how npm was handling `peerDependencies` that were implicitly installed from the +`package.json` files of scoped dependencies. This +[will be a moot point](https://github.com/npm/npm/issues/6565#issuecomment-74971689) +with the release of `npm@3`, but until then, it's important that +`peerDependency` auto-installation work as expected. + +* [`b027319`](https://github.com/npm/npm/commit/b0273190c71eba14395ddfdd1d9f7ba625297523) + [#7920](https://github.com/npm/npm/issues/7920) Scoped packages with + `peerDependencies` were installing the `peerDependencies` into the wrong + directory. ([@ewie](https://github.com/ewie)) +* [`649e31a`](https://github.com/npm/npm/commit/649e31ae4fd02568bae5dc6b4ea783431ce3d63e) + [#7920](https://github.com/npm/npm/issues/7920) Test `peerDependency` + installs involving scoped packages using `npm-package-arg` instead of simple + path tests, for consistency. ([@othiym23](https://github.com/othiym23)) + +#### MAKING IT EASIER TO WRITE NPM TESTS, VERSION 0.0.1 + +[@iarna](https://github.com/iarna) and I +([@othiym23](https://github.com/othiym23)) have been discussing a +[candidate plan](https://github.com/npm/npm/wiki/rewriting-npm's-tests:-a-plan-maybe) +for improving npm's test suite, with the goal of making it easier for new +contributors to get involved with npm by reducing the learning curve +necessary to be able to write good tests for proposed changes. This is the +first substantial piece of that effort. Here's what the commit message for +[`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) +had to say about this work: + +> It's too difficult for npm contributors to figure out what the conventional +> style is for tests. Part of the problem is that the documentation in +> CONTRIBUTING.md is inadequate, but another important factor is that the tests +> themselves are written in a variety of styles. One of the most notable +> examples of this is the fact that many tests use fixture directories to store +> precooked test scenarios and package.json files. +> +> This had some negative consequences: +> +> * tests weren't idempotent +> * subtle dependencies between tests existed +> * new tests get written in this deprecated style because it's not +> obvious that the style is out of favor +> * it's hard to figure out why a lot of those directories existed, +> because they served a variety of purposes, so it was difficult to +> tell when it was safe to remove them +> +> All in all, the fixture directories were a major source of technical debt, and +> cleaning them up, while time-consuming, makes the whole test suite much more +> approachable, and makes it more likely that new tests written by outside +> contributors will follow a conventional style. To support that, all of the +> tests touched by this changed were cleaned up to pass the `standard` style +> checker. + +And here's a little extra context from a comment I left on [#7929](https://github.com/npm/npm/issues/7929): + +> One of the other things that encouraged me was looking at this +> [presentation on technical debt](http://www.slideshare.net/nnja/pycon-2015-technical-debt-the-monster-in-your-closet) +> from Pycon 2015, especially slide 53, which I interpreted in terms of +> difficulty getting new contributors to submit patches to an OSS project like +> npm. npm has a long ways to go, but I feel good about this change. + +* [`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) + [#7929](https://github.com/npm/npm/issues/7929) Eliminate fixture directories + from `test/tap`, leaving each test self-contained. + ([@othiym23](https://github.com/othiym23)) +* [`4928d30`](https://github.com/npm/npm/commit/4928d30140821c63e03fffed73f8d88ebdc43710) + [#7929](https://github.com/npm/npm/issues/7929) Move fixture files from + `test/tap/*` to `test/fixtures`. ([@othiym23](https://github.com/othiym23)) +* [`e925deb`](https://github.com/npm/npm/commit/e925debca91092a814c1a00933babc3a8cf975be) + [#7929](https://github.com/npm/npm/issues/7929) Tweak the run scripts to stop + slaughtering the CPU on doc rebuild. + ([@othiym23](https://github.com/othiym23)) +* [`65bf7cf`](https://github.com/npm/npm/commit/65bf7cffaf91c426b676c47529eee796f8b8b75c) + [#7923](https://github.com/npm/npm/issues/7923) Use an alias of scripts and + run-scripts in `npm run test-all` ([@watilde](https://github.com/watilde)) +* [`756a3fb`](https://github.com/npm/npm/commit/756a3fbb852a2469afe706635ed88d22c37743e5) + [#7923](https://github.com/npm/npm/issues/7923) Sync timeout time of `npm + run-script test-all` to be the same as `test` and `tap` scripts. + ([@watilde](https://github.com/watilde)) +* [`8299b5f`](https://github.com/npm/npm/commit/8299b5fb6373354a7fbaab6f333863758812ae90) + Set a timeout for tap tests for `npm run-script test-all`. + ([@othiym23](https://github.com/othiym23)) + +#### THE EVER-BEATING DRUM OF DEPENDENCY UPDATES + +* [`d90d0b9`](https://github.com/npm/npm/commit/d90d0b992acbf62fd5d68debf9d1dbd6cfa20804) + [#7924](https://github.com/npm/npm/issues/7924) Remove `child-process-close`, + as it was included for Node 0.6 compatibility, and npm no longer supports + 0.6. ([@robertkowalski](https://github.com/robertkowalski)) +* [`16427c1`](https://github.com/npm/npm/commit/16427c1f3ea3d71ee753c62eb4c2663c7b32b84f) + `lru-cache@2.5.2`: More accurate updating of expiry times when `maxAge` is + set. ([@isaacs](https://github.com/isaacs)) +* [`03cce83`](https://github.com/npm/npm/commit/03cce83b64344a9e0fe036dce214f4d68cfcc9e7) + `nock@1.6.0`: Mocked network error handling. + ([@pgte](https://github.com/pgte)) +* [`f93b1f0`](https://github.com/npm/npm/commit/f93b1f0b7eb5d1b8a7967e837bbd756db1091d00) + `glob@5.0.5`: Use `path-is-absolute` polyfill, allowing newer Node.js and + io.js versions to use `path.isAbsolute()`. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`a70d694`](https://github.com/npm/npm/commit/a70d69495a6e96997e64855d9e749d943ee6d64f) + `request@2.55.0`: Bug fixes and simplification. + ([@simov](https://github.com/simov)) +* [`2aecc6f`](https://github.com/npm/npm/commit/2aecc6f4083526feeb14615b4e5484edc66175b5) + `columnify@1.5.1`: Switch to using babel from 6to5. + ([@timoxley](https://github.com/timoxley)) + +### v2.8.0 (2015-04-09): + +#### WE WILL NEVER BE DONE FIXING NPM'S GIT SUPPORT + +If you look at [the last release's release +notes](https://github.com/npm/npm/blob/master/CHANGELOG.md#git-mean-git-tuff-git-all-the-way-away-from-my-stuff), +you will note that they confidently assert that it's perfectly OK to force all +GitHub URLs through the same `git:` -> `git+ssh:` fallback flow for cloning. It +turns out that many users depend on `git+https:` URLs in their build +environments because they use GitHub auth tokens instead of SSH keys. Also, in +some cases you just want to be able to explicitly say how a given dependency +should be cloned from GitHub. + +Because of the way we resolved the inconsistency in GitHub shorthand handling +[before](https://github.com/npm/npm/blob/master/CHANGELOG.md#bug-fixes-1), this +turned out to be difficult to work around. So instead of hacking around it, we +completely redid how git is handled within npm and its attendant packages. +Again. This time, we changed things so that `normalize-package-data` and +`read-package-json` leave more of the git logic to npm itself, which makes +handling shorthand syntax consistently much easier, and also allows users to +resume using explicit, fully-qualified git URLs without npm messing with them. + +Here's a summary of what's changed: + +* Instead of converting the GitHub shorthand syntax to a `git+ssh:`, `git:`, or + `git+https:` URL and saving that, save the shorthand itself to + `package.json`. +* If presented with shortcuts, try cloning via the git protocol, SSH, and HTTPS + (in that order). +* No longer prompt for credentials -- it didn't work right with the spinner, + and wasn't guaranteed to work anyway. We may experiment with doing this a + better way in the future. Users can override this by setting `GIT_ASKPASS` in + their environment if they want to experiment with interactive cloning, but + should also set `--no-spin` on the npm command line (or run `npm config set + spin=false`). +* **EXPERIMENTAL FEATURE**: Add support for `github:`, `gist:`, `bitbucket:`, + and `gitlab:` shorthand prefixes. GitHub shortcuts will continue to be + normalized to `org/repo` instead of being saved as `github:org/repo`, but + `gitlab:`, `gist:`, and `bitbucket:` prefixes will be used on the command + line and from `package.json`. BE CAREFUL WITH THIS. `package.json` files + published with the new shorthand syntax can _only_ be read by `npm@2.8.0` and + later, and this feature is mostly meant for playing around with it. If you + want to save git dependencies in a form that older versions of npm can read, + use `--save-exact`, which will save the git URL and resolved commit hash of + the head of the branch in a manner similar to the way that `--save-exact` + pins versions for registry dependencies. This is documented (so check `npm + help install` for details), but we're not going to make a lot of noise about + it until it has a chance to bake in a little more. + +It is [@othiym23](https://github.com/othiym23)'s sincere hope that this will +resolve all of the inconsistencies users were seeing with GitHub and git-hosted +packages, but given the level of change here, that may just be a fond wish. +Extra testing of this change is requested. + +* [`6b0f588`](https://github.com/npm/npm/commit/6b0f58877f37df9904490ffbaaad33862bd36dce) + [#7867](https://github.com/npm/npm/issues/7867) Use git shorthand and git + URLs as presented by user. Support new `hosted-git-info` shortcut syntax. + Save shorthand in `package.json`. Try cloning via `git:`, `git+ssh:`, and + `git+https:`, in that order, when supported by the underlying hosting + provider. ([@othiym23](https://github.com/othiym23)) +* [`75d4267`](https://github.com/npm/npm/commit/75d426787869d54ca7400408f562f971b34649ef) + [#7867](https://github.com/npm/npm/issues/7867) Document new GitHub, GitHub + gist, Bitbucket, and GitLab shorthand syntax. + ([@othiym23](https://github.com/othiym23)) +* [`7d92c75`](https://github.com/npm/npm/commit/7d92c7592998d90ec883fa989ca74f04ec1b93de) + [#7867](https://github.com/npm/npm/issues/7867) When `--save-exact` is used + with git shorthand or URLs, save the fully-resolved URL, with branch name + resolved to the exact hash for the commit checked out. + ([@othiym23](https://github.com/othiym23)) +* [`9220e59`](https://github.com/npm/npm/commit/9220e59f8def8c82c6d331a39ba29ad4c44e3a9b) + [#7867](https://github.com/npm/npm/issues/7867) Ensure that non-prefixed and + non-normalized GitHub shortcuts are saved to `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`dd398e9`](https://github.com/npm/npm/commit/dd398e98a8eba27eeba84378200da3d078fdf980) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.1`: + Ensure that `gist:` shorthand survives being round-tripped through + `package.json`. ([@othiym23](https://github.com/othiym23)) +* [`33d1420`](https://github.com/npm/npm/commit/33d1420bf2f629332fceb2ac7e174e63ac48f96a) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.0`: Add + support for auth embedded directly in git URLs. + ([@othiym23](https://github.com/othiym23)) +* [`23a1d5a`](https://github.com/npm/npm/commit/23a1d5a540e8db27f5cd0245de7c3694e2bddad1) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.0.2`: Make + it possible to determine in which form a hosted git URL was passed. + ([@iarna](https://github.com/iarna)) +* [`eaf75ac`](https://github.com/npm/npm/commit/eaf75acb718611ad5cfb360084ec86938d9c66c5) + [#7867](https://github.com/npm/npm/issues/7867) + `normalize-package-data@2.0.0`: Normalize GitHub specifiers so they pass + through shortcut syntax and preserve explicit URLs. + ([@iarna](https://github.com/iarna)) +* [`95e0535`](https://github.com/npm/npm/commit/95e0535e365e0aca49c634dd2061a0369b0475f1) + [#7867](https://github.com/npm/npm/issues/7867) `npm-package-arg@4.0.0`: Add + git URL and shortcut to hosted git spec and use `hosted-git-info@2.0.2`. + ([@iarna](https://github.com/iarna)) +* [`a808926`](https://github.com/npm/npm/commit/a8089268d5f3d57f42dbaba02ff6437da5121191) + [#7867](https://github.com/npm/npm/issues/7867) + `realize-package-specifier@3.0.0`: Use `npm-package-arg@4.0.0` and test + shortcut specifier behavior. ([@iarna](https://github.com/iarna)) +* [`6dd1e03`](https://github.com/npm/npm/commit/6dd1e039bddf8cf5383343f91d84bc5d78acd083) + [#7867](https://github.com/npm/npm/issues/7867) `init-package-json@1.4.0`: + Allow dependency on `read-package-json@2.0.0`. + ([@iarna](https://github.com/iarna)) +* [`63254bb`](https://github.com/npm/npm/commit/63254bb6358f66752aca6aa1a275271b3ae03f7c) + [#7867](https://github.com/npm/npm/issues/7867) `read-installed@4.0.0`: Use + `read-package-json@2.0.0`. ([@iarna](https://github.com/iarna)) +* [`254b887`](https://github.com/npm/npm/commit/254b8871f5a173bb464cc5b0ace460c7878b8097) + [#7867](https://github.com/npm/npm/issues/7867) `read-package-json@2.0.0`: + Use `normalize-package-data@2.0.0`. ([@iarna](https://github.com/iarna)) +* [`0b9f8be`](https://github.com/npm/npm/commit/0b9f8be62fe5252abe54d49e36a696f4816c2eca) + [#7867](https://github.com/npm/npm/issues/7867) `npm-registry-client@6.3.0`: + Mark compatibility with `normalize-package-data@2.0.0` and + `npm-package-arg@4.0.0`. ([@iarna](https://github.com/iarna)) +* [`f40ecaa`](https://github.com/npm/npm/commit/f40ecaad68f77abc50eb6f5b224e31dec3d250fc) + [#7867](https://github.com/npm/npm/issues/7867) Extract a common method to + use when cloning git repos for testing. + ([@othiym23](https://github.com/othiym23)) + +#### TEST FIXES FOR NODE 0.8 + +npm continues to [get closer](https://github.com/npm/npm/issues/7842) to being +completely green on Travis for Node 0.8. + +* [`26d36e9`](https://github.com/npm/npm/commit/26d36e9cf0eca69fe1863d2ea536c28555b9e8de) + [#7842](https://github.com/npm/npm/issues/7842) When spawning child + processes, map exit code 127 to ENOENT so Node 0.8 handles child process + failures the same as later versions. + ([@SonicHedgehog](https://github.com/SonicHedgehog)) +* [`54cd895`](https://github.com/npm/npm/commit/54cd8956ea783f96749e46597d8c2cb9397c5d5f) + [#7842](https://github.com/npm/npm/issues/7842) Node 0.8 requires -e with -p + when evaluating snippets; fix test. + ([@SonicHedgehog](https://github.com/SonicHedgehog)) + +#### SMALL FIX AND DOC TWEAK + +* [`20e9003`](https://github.com/npm/npm/commit/20e90031b847e9f7c7168f3dad8b1e526f9a2586) + `tar@2.0.1`: Fix regression where relative symbolic links within an + extraction root that pointed within an extraction root would get normalized + to absolute symbolic links. ([@isaacs](https://github.com/isaacs)) +* [`2ef8898`](https://github.com/npm/npm/commit/2ef88989c41bee1578570bb2172c90ede129dbd1) + [#7879](https://github.com/npm/npm/issues/7879) Better document that `npm + publish --tag=foo` will not set `latest` to that version. + ([@linclark](https://github.com/linclark)) + +### v2.7.6 (2015-04-02): + +#### GIT MEAN, GIT TUFF, GIT ALL THE WAY AWAY FROM MY STUFF + +Part of the reason that we're reluctant to take patches to how npm deals with +git dependencies is that every time we touch the git support, something breaks. +The last few releases are a case in point. `npm@2.7.4` completely broke +installing private modules from GitHub, and `npm@2.7.5` fixed them at the cost +of logging a misleading error message that caused many people to believe that +their dependencies hadn't been successfully installed when they actually had +been. + +This all started from a desire to ensure that GitHub shortcut syntax is being +handled correctly. The correct behavior is for npm to try to clone all +dependencies on GitHub (whether they're specified with the GitHub +`organization/repository` shortcut syntax or not) via the plain `git:` protocol +first, and to fall back to using `git+ssh:` if `git:` doesn't work. Previously, +sometimes npm would use `git:` and `git+ssh:` in some cases (most notably when +using GitHub shortcut syntax on the command line), and use `git+https:` in +others (when the GitHub shortcut syntax was present in `package.json`). This +led to subtle and hard-to-understand inconsistencies, and we're glad that as of +`npm@2.7.6`, we've finally gotten things to where they were before we started, +only slightly more consistent overall. + +We are now going to go back to our policy of being extremely reluctant to touch +the code that handles Git dependencies. + +* [`b747593`](https://github.com/npm/npm/commit/b7475936f473f029e6a027ba1b16277523747d0b) + [#7630](https://github.com/npm/npm/issues/7630) Don't automatically log all + git failures as errors. `maybeGithub` needs to be able to fail without + logging to support its fallback logic. + ([@othiym23](https://github.com/othiym23)) +* [`cd67a0d`](https://github.com/npm/npm/commit/cd67a0db07891d20871822696c26692c8a84866a) + [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote + URL, handle failures gracefully (without assuming standard output exists). + ([@othiym23](https://github.com/othiym23)) +* [`637c7d1`](https://github.com/npm/npm/commit/637c7d1411fe07f409cf91f2e65fd70685cb253c) + [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote + URL, handle failures gracefully (without assuming standard _error_ exists). + ([@othiym23](https://github.com/othiym23)) + +#### OTHER SIGNIFICANT FIXES + +* [`78005eb`](https://github.com/npm/npm/commit/78005ebb6f4103c20f077669c3929b7ea46a4c0d) + [#7743](https://github.com/npm/npm/issues/7743) Always quote arguments passed + to `npm run-script`. This allows build systems and the like to safely escape + glob patterns passed as arguments to `run-scripts` with `npm run-script + <script> -- <arguments>`. This is a tricky change to test, and may be + reverted or moved to `npm@3` if it turns out it breaks things for users. + ([@mantoni](https://github.com/mantoni)) +* [`da015ee`](https://github.com/npm/npm/commit/da015eee45f6daf384598151d06a9b57ffce136e) + [#7074](https://github.com/npm/npm/issues/7074) `read-package-json@1.3.3`: + `read-package-json` no longer caches `package.json` files, which trades a + very small performance loss for the elimination of a large class of really + annoying race conditions. See [#7074](https://github.com/npm/npm/issues/7074) + for the grisly details. ([@othiym23](https://github.com/othiym23)) +* [`dd20f57`](https://github.com/npm/npm/commit/dd20f5755291b9433f0d298ee0eead22cda6db36) + `init-package-json@1.3.2`: Only add the `@` to scoped package names if it's + not already there when reading from the filesystem + ([@watilde](https://github.com/watilde)), and support inline validation of + package names ([@michaelnisi](https://github.com/michaelnisi)). + +#### SMALL FIXES AND DEPENDENCY UPGRADES + +* [`1f380f6`](https://github.com/npm/npm/commit/1f380f66c1e944b8ffbf096fa94d09e931626e12) + [#7820](https://github.com/npm/npm/issues/7820) `are-we-there-yet@1.0.4`: Use + `readable-stream` instead of built-in `stream` module to better support + Node.js 0.8.x. ([@SonicHedgehog](https://github.com/SonicHedgehog)) +* [`d380188`](https://github.com/npm/npm/commit/d380188e161be31f5a4f53947de6bc28df4732d8) + `semver@4.3.3`: Don't throw on `semver.parse(null)`, and parse numeric + version strings more robustly. ([@isaacs](https://github.com/isaacs)) +* [`01d9964`](https://github.com/npm/npm/commit/01d99649265f921e1c61cf406613e7042bcea008) + `nock@1.4.0`: This change may need to be rolled back, or rolled forward, + because [nock depends on + `setImmediate`](https://github.com/npm/npm/issues/7842), which causes tests + to fail when run with Node.js 0.8. ([@othiym23](https://github.com/othiym23)) +* [`91f5cb1`](https://github.com/npm/npm/commit/91f5cb1fb91520fbe25a4da5b80848ed540b9ad3) + [#7791](https://github.com/npm/npm/issues/7791) Fix brackets in npmconf so + that `loaded` is set correctly. + ([@charmander](https://github.com/charmander)) +* [`1349e27`](https://github.com/npm/npm/commit/1349e27c936a8b0fc9f6440a6d6404ef3b19c587) + [#7818](https://github.com/npm/npm/issues/7818) Update `README.md` to point + out that the install script now lives on https://www.npmjs.com. + ([@weisjohn](https://github.com/weisjohn)) + +### v2.7.5 (2015-03-26): + +#### SECURITY FIXES + +* [`300834e`](https://github.com/npm/npm/commit/300834e91a4e2a95fb7fb59c309e7c3fc91d2312) + `tar@2.0.0`: Normalize symbolic links that point to targets outside the + extraction root. This prevents packages containing symbolic links from + overwriting targets outside the expected paths for a package. Thanks to [Tim + Cuthbertson](http://gfxmonk.net/) and the team at [Lift + Security](https://liftsecurity.io/) for working with the npm team to identify + this issue. ([@othiym23](https://github.com/othiym23)) +* [`0dc6875`](https://github.com/npm/npm/commit/0dc68757cffd5397c280bc71365d106523a5a052) + `semver@4.3.2`: Package versions can be no more than 256 characters long. + This prevents a situation in which parsing the version number can use + exponentially more time and memory to parse, leading to a potential denial of + service. Thanks to Adam Baldwin at Lift Security for bringing this to our + attention. ([@isaacs](https://github.com/isaacs)) + +#### BUG FIXES + +* [`5811468`](https://github.com/npm/npm/commit/5811468e104ccb6b26b8715dff390d68daa10066) + [#7713](https://github.com/npm/npm/issues/7713) Add a test for `npm link` and + `npm link <package>`. ([@watilde](https://github.com/watilde)) +* [`3cf3b0c`](https://github.com/npm/npm/commit/3cf3b0c8fddb6b66f969969feebea85fabd0360b) + [#7713](https://github.com/npm/npm/issues/7713) Only use absolute symbolic + links when `npm link`ing. ([@hokaccha](https://github.com/hokaccha)) +* [`f35aa93`](https://github.com/npm/npm/commit/f35aa933e136228a89e3fcfdebe8c7cc4f1e7c00) + [#7443](https://github.com/npm/npm/issues/7443) Keep relative URLs when + hitting search endpoint. ([@othiym23](https://github.com/othiym23)) +* [`eab6184`](https://github.com/npm/npm/commit/eab618425c51e3aa4416da28dcd8ca4ba63aec41) + [#7766](https://github.com/npm/npm/issues/7766) One last tweak to ensure that + GitHub shortcuts work with private repositories. + ([@iarna](https://github.com/iarna)) +* [`5d7f704`](https://github.com/npm/npm/commit/5d7f704823f5f92ddd7ff3e7dd2b8bcc66c73005) + [#7656](https://github.com/npm/npm/issues/7656) Don't try to load a deleted + CA file, allowing the `cafile` config to be changed. + ([@KenanY](https://github.com/KenanY)) +* [`a840a13`](https://github.com/npm/npm/commit/a840a13bbf0330157536381ea8e58d0bd93b4c05) + [#7746](https://github.com/npm/npm/issues/7746) Only fix up URL paths when + there are paths to fix up. ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`94df809`](https://github.com/npm/npm/commit/94df8095985bf5ba9d8db99dc445d05dac136aaf) + `request@2.54.0`: Fixes for Node.js 0.12 and io.js. + ([@simov](https://github.com/simov)) +* [`98a13ea`](https://github.com/npm/npm/commit/98a13eafdf098b53069ad15297008fcab9c61653) + `opener@1.4.1`: Deal with `start` on Windows more conventionally. + ([@domenic](https://github.com/domenic)) +* [`c2417c7`](https://github.com/npm/npm/commit/c2417c7702459a446f07d43ca3c4e99bde7fe9d6) + `require-inject@1.2.0`: Add installGlobally to bypass cleanups. + ([@iarna](https://github.com/iarna)) + +#### DOCUMENTATION FIXES + +* [`f87c728`](https://github.com/npm/npm/commit/f87c728f8732c9e977c0dc2060c0610649e79155) + [#7696](https://github.com/npm/npm/issues/7696) Months and minutes were + swapped in doc-build.sh ([@MeddahJ](https://github.com/MeddahJ)) +* [`4e216b2`](https://github.com/npm/npm/commit/4e216b29b30463f06afe6e3c645e205da5f50922) + [#7752](https://github.com/npm/npm/issues/7752) Update string examples to be + properly quoted. ([@snuggs](https://github.com/snuggs)) +* [`402f52a`](https://github.com/npm/npm/commit/402f52ab201efa348feb87cad753fc4b91e8a3fb) + [#7635](https://github.com/npm/npm/issues/7635) Clarify Windows installation + instructions. ([@msikma](https://github.com/msikma)) +* [`c910399`](https://github.com/npm/npm/commit/c910399ecfd8db49fe4496dd26887765a8aed20f) + small typo fix to `CHANGELOG.md` ([@e-jigsaw](https://github.com/e-jigsaw)) + +### v2.7.4 (2015-03-20): + +#### BUG FIXES + +* [`fe1bc38`](https://github.com/npm/npm/commit/fe1bc387a14475e373557de669e03d9d006d3173) + [#7672](https://github.com/npm/npm/issues/7672) `npm-registry-client@3.1.2`: + Fix client-side certificate handling by correcting property name. + ([@atamon](https://github.com/atamon)) +* [`3ce3cc2`](https://github.com/npm/npm/commit/3ce3cc242fc345bca6820185a4f5a013c5bc1944) + [#7635](https://github.com/npm/npm/issues/7635) `fstream-npm@1.0.2`: Raise a + more descriptive error when `bundledDependencies` isn't an array. + ([@KenanY](https://github.com/KenanY)) +* [`3a12723`](https://github.com/npm/npm/commit/3a127235076a1f00bc8befba56c024c6d0e7f477) + [#7661](https://github.com/npm/npm/issues/7661) Allow setting `--registry` on + the command line to trump the mapped registry for `--scope`. + ([@othiym23](https://github.com/othiym23)) +* [`89ce829`](https://github.com/npm/npm/commit/89ce829a00b526d0518f5cd855c323bffe182af0) + [#7630](https://github.com/npm/npm/issues/7630) `hosted-git-info@1.5.3`: Part + 3 of ensuring that GitHub shorthand is handled consistently. + ([@othiym23](https://github.com/othiym23)) +* [`63313eb`](https://github.com/npm/npm/commit/63313eb0c37891c355546fd1093010c8a0c3cd81) + [#7630](https://github.com/npm/npm/issues/7630) + `realize-package-specifier@2.2.0`: Part 2 of ensuring that GitHub shorthand + is handled consistently. ([@othiym23](https://github.com/othiym23)) +* [`3ed41bf`](https://github.com/npm/npm/commit/3ed41bf64a1bb752bb3155c74dd6ffbbd28c89c9) + [#7630](https://github.com/npm/npm/issues/7630) `npm-package-arg@3.1.1`: Part + 1 of ensuring that GitHub shorthand is handled consistently. + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`6a498c6`](https://github.com/npm/npm/commit/6a498c6aaa00611a0a1ea405255900c327103f8b) + `npm-registry-couchapp@2.6.7`: Ensure that npm continues to work with new + registry architecture. ([@bcoe](https://github.com/bcoe)) +* [`bd72c47`](https://github.com/npm/npm/commit/bd72c47ce8c58e287d496902c11845c8fea420d6) + `glob@5.0.3`: Updated to latest version. + ([@isaacs](https://github.com/isaacs)) +* [`4bfbaa2`](https://github.com/npm/npm/commit/4bfbaa2d8b9dc7067d999de8f55676db3a4f4196) + `npmlog@1.2.0`: Getting up to date with latest version (but not using any of + the new features). ([@othiym23](https://github.com/othiym23)) + +#### A NEW REGRESSION TEST + +* [`3703b0b`](https://github.com/npm/npm/commit/3703b0b87c127a64649bdbfc3bc697ebccc4aa24) + Add regression test for `npm version` to ensure `message` property in config + continues to be honored. ([@dannyfritz](https://github.com/dannyfritz)) + +### v2.7.3 (2015-03-16): + +#### HAHA WHOOPS LIL SHINKWRAP ISSUE THERE LOL + +* [`1549106`](https://github.com/npm/npm/commit/1549106f518000633915686f5f1ccc6afcf77f8f) + [#7641](https://github.com/npm/npm/issues/7641) Due to 448efd0, running `npm + shrinkwrap --dev` caused production dependencies to no longer be included in + `npm-shrinkwrap.json`. Whoopsie! ([@othiym23](https://github.com/othiym23)) + +### v2.7.2 (2015-03-12): + +#### NPM GASTROENTEROLOGY + +* [`fb0ac26`](https://github.com/npm/npm/commit/fb0ac26eecdd76f6eaa4a96a865b7c6f52ce5aa5) + [#7579](https://github.com/npm/npm/issues/7579) Only block removing files and + links when we're sure npm isn't responsible for them. This change is hard to + summarize, because if things are working correctly you should never see it, + but if you want more context, just [go read the commit + message](https://github.com/npm/npm/commit/fb0ac26eecdd76f6eaa4a96a865b7c6f52ce5aa5), + which lays it all out. ([@othiym23](https://github.com/othiym23)) +* [`051c473`](https://github.com/npm/npm/commit/051c4738486a826300f205b71590781ce7744f01) + [#7552](https://github.com/npm/npm/issues/7552) `bundledDependencies` are now + properly included in the installation context. This is another fantastically + hard-to-summarize bug, and once again, I encourage you to [read the commit + message](https://github.com/npm/npm/commit/051c4738486a826300f205b71590781ce7744f01) + if you're curious about the details. The snappy takeaway is that this + unbreaks many use cases for `ember-cli`. ([@othiym23](https://github.com/othiym23)) + +#### LESS DRAMATIC CHANGES + +* [`fcd9247`](https://github.com/npm/npm/commit/fcd92476f3a9092f6f8c83a19a24fe63b206edcd) + [#7597](https://github.com/npm/npm/issues/7597) Awk varies pretty + dramatically from platform to platform, so use Perl to generate the AUTHORS + list instead. ([@KenanY](https://github.com/KenanY)) +* [`721b17a`](https://github.com/npm/npm/commit/721b17a31690bec074eb8763d823d6de63406005) + [#7598](https://github.com/npm/npm/issues/7598) `npm install --save` really + isn't experimental anymore. ([@RichardLitt](https://github.com/RichardLitt)) + +#### DEPENDENCY REFRESH + +* [`a91f2c7`](https://github.com/npm/npm/commit/a91f2c7c9a5183d9cde7aae040ebd9ccdf104be7) + [#7559](https://github.com/npm/npm/issues/7559) `node-gyp@1.0.3` Switch + `node-gyp` to use `stdio` instead of `customFds` so it stops printing a + deprecation warning every time you build a native dependency. + ([@jeffbski](https://github.com/jeffbski)) +* [`0c85db7`](https://github.com/npm/npm/commit/0c85db7f0dde41762411e40a029153e6a65ef483) + `rimraf@2.3.2`: Globbing now deals with paths containing valid glob + metacharacters better. ([@isaacs](https://github.com/isaacs)) +* [`d14588e`](https://github.com/npm/npm/commit/d14588ed09b032c4c770e34b4c0f2436f5fccf6e) + `minimatch@2.0.4`: Bug fixes. ([@isaacs](https://github.com/isaacs)) +* [`aa9952e`](https://github.com/npm/npm/commit/aa9952e8270a6c1b7f97e579875dd6e3aa22abfd) + `graceful-fs@3.0.6`: Bug fixes. ([@isaacs](https://github.com/isaacs)) + +### v2.7.1 (2015-03-05): + +#### GITSANITY + +* [`6823807`](https://github.com/npm/npm/commit/6823807bba6c00228a724e1205ae90d67df0adad) + [#7121](https://github.com/npm/npm/issues/7121) `npm install --save` for Git + dependencies saves the URL passed in, instead of the temporary directory used + to clone the remote repo. Fixes using Git dependencies when shrinkwrapping. + In the process, rewrote the Git dependency caching code. Again. No more + single-letter variable names, and a much clearer workflow. + ([@othiym23](https://github.com/othiym23)) +* [`c8258f3`](https://github.com/npm/npm/commit/c8258f31365b045e5fcf15b865a363abbc3be616) + [#7486](https://github.com/npm/npm/issues/7486) When installing Git remotes, + the caching code was passing in the function `gitEnv` instead of the results + of invoking it. ([@functino](https://github.com/functino)) +* [`c618eed`](https://github.com/npm/npm/commit/c618eeda3e321fd454d77c476b53a0330f2344cc) + [#2556](https://github.com/npm/npm/issues/2556) Make it possible to install + Git dependencies when using `--link` by not linking just the Git + dependencies. ([@smikes](https://github.com/smikes)) + +#### WHY DID THIS TAKE SO LONG. + +* [`abdd040`](https://github.com/npm/npm/commit/abdd040da90932535472f593d5433a67ee074801) + `read-package-json@1.3.2`: Provide more helpful error messages when JSON + parse errors are encountered by using a more forgiving JSON parser than + JSON.parse. ([@smikes](https://github.com/smikes)) + +#### BUGS & TWEAKS + +* [`c56cfcd`](https://github.com/npm/npm/commit/c56cfcd79cd8ab4ccd06d2c03d7e04030d576683) + [#7525](https://github.com/npm/npm/issues/7525) `npm dedupe` handles scoped + packages. ([@KidkArolis](https://github.com/KidkArolis)) +* [`1b8ba74`](https://github.com/npm/npm/commit/1b8ba7426393cbae2c76ad2c35953782d4401871) + [#7531](https://github.com/npm/npm/issues/7531) `npm stars` and `npm whoami` + will no longer send the registry the error text saying you need to log in as + your username. ([@othiym23](https://github.com/othiym23)) +* [`6de1e91`](https://github.com/npm/npm/commit/6de1e91116a5105dfa75126532b9083d8672e034) + [#6441](https://github.com/npm/npm/issues/6441) Prevent needless reinstalls + by only updating packages when the current version isn't the same as the + version returned as `wanted` by `npm outdated`. + ([@othiym23](https://github.com/othiym23)) +* [`2abc3ee`](https://github.com/npm/npm/commit/2abc3ee08f0cabc4e7bfd7b973c0b59dc44715ff) + Add `npm upgrade` as an alias for `npm update`. + ([@othiym23](https://github.com/othiym23)) +* [`bcd4722`](https://github.com/npm/npm/commit/bcd47224e18884191a5d0057c2b2fff83ac8206e) + [#7508](https://github.com/npm/npm/issues/7508) FreeBSD uses `EAI_FAIL` + instead of `ENOTFOUND`. ([@othiym23](https://github.com/othiym23)) +* [`21c1ac4`](https://github.com/npm/npm/commit/21c1ac41280f0716a208cde14025a2ad5ef61fed) + [#7507](https://github.com/npm/npm/issues/7507) Update support URL in generic + error handler to `https:` from `http:`. + ([@watilde](https://github.com/watilde)) +* [`b6bd99a`](https://github.com/npm/npm/commit/b6bd99a73f575545fbbaef95c12237c47dd32561) + [#7492](https://github.com/npm/npm/issues/7492) On install, the + `package.json` `engineStrict` deprecation only warns for the current package. + ([@othiym23](https://github.com/othiym23)) +* [`4ef1412`](https://github.com/npm/npm/commit/4ef1412d0061239da2b1c4460ed6db37cc9ded27) + [#7075](https://github.com/npm/npm/issues/7075) If you try to tag a release + as a valid semver range, `npm publish` and `npm tag` will error early instead + of proceeding. ([@smikes](https://github.com/smikes)) +* [`ad53d0f`](https://github.com/npm/npm/commit/ad53d0f666125d9f50d661b54901c6e5bab4d603) + Use `rimraf` in npm build script because Windows doesn't know what rm is. + ([@othiym23](https://github.com/othiym23)) +* [`8885c4d`](https://github.com/npm/npm/commit/8885c4dfb618f2838930b5c5149abea300a762d6) + `rimraf@2.3.1`: Better Windows support. + ([@isaacs](https://github.com/isaacs)) +* [`8885c4d`](https://github.com/npm/npm/commit/8885c4dfb618f2838930b5c5149abea300a762d6) + `glob@4.4.2`: Handle bad symlinks properly. + ([@isaacs](https://github.com/isaacs)) + +###E TYPSO & CLARFIICATIONS + +dId yuo know that submiting fxies for doc tpyos is an exclelent way to get +strated contriburting to a new open-saurce porject? + +* [`42c605c`](https://github.com/npm/npm/commit/42c605c7b401f603c32ea70427e1a7666adeafd9) + Fix typo in `CHANGELOG.md` ([@adrianblynch](https://github.com/adrianblynch)) +* [`c9bd58d`](https://github.com/npm/npm/commit/c9bd58dd637b9c41441023584a13e3818d5db336) + Add note about `node_modules/.bin` being added to the path in `npm + run-script`. ([@quarterto](https://github.com/quarterto)) +* [`903bdd1`](https://github.com/npm/npm/commit/903bdd105b205d6e45d3a2ab83eea8e4071e9aeb) + Matt Ranney confused the world when he renamed `node-redis` to `redis`. "The + world" includes npm's documentation. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`dea9bb2`](https://github.com/npm/npm/commit/dea9bb2319183fe54bf4d173d8533d46d2c6611c) + Fix typo in contributor link. ([@watilde](https://github.com/watilde)) +* [`1226ca9`](https://github.com/npm/npm/commit/1226ca98d4d7650cc3ba16bf7ac62e44820f3bfa) + Properly close code block in npm-install.md. + ([@olizilla](https://github.com/olizilla)) + +### v2.7.0 (2015-02-26): + +#### SOMETIMES SEMVER MEANS "SUBJECTIVE-EMPATHETIC VERSIONING" + +For a very long time (maybe forever?), the documentation for `npm run-script` +has said that `npm restart` will only call `npm stop` and `npm start` when +there is no command defined as `npm restart` in `package.json`. The problem +with this documentation is that `npm run-script` was apparently never wired up +to actually work this way. + +Until now. + +If the patch below were landed on its own, free of context, it would be a +breaking change. But, since the "new" behavior is how the documentation claims +this feature has always worked, I'm classifying it as a patch-level bug fix. I +apologize in advance if this breaks anybody's deployment scripts, and if it +turns out to be a significant regression in practice, we can revert this change +and move it to `npm@3`, which is allowed to make breaking changes due to being +a new major version of semver. + +* [`2f6a1df`](https://github.com/npm/npm/commit/2f6a1df3e1e3e0a3bc4abb69e40f59a64204e7aa) + [#1999](https://github.com/npm/npm/issues/1999) Only run `stop` and `start` + scripts (plus their pre- and post- scripts) when there's no `restart` script + defined. This makes it easier to support graceful restarts of services + managed by npm. ([@watilde](https://github.com/watilde) / + [@scien](https://github.com/scien)) + +#### A SMALL FEATURE WITH BIG IMPLICATIONS + +* [`145af65`](https://github.com/npm/npm/commit/145af6587f45de135cc876be2027ed818ed4ca6a) + [#4887](https://github.com/npm/npm/issues/4887) Replace calls to the + `node-gyp` script bundled with npm by passing the + `--node-gyp=/path/to/node-gyp` option to npm. Swap in `pangyp` or a version + of `node-gyp` modified to work better with io.js without having to touch + npm's code! ([@ackalker](https://github.com/ackalker)) + +#### [@WATILDE'S](https://github.com/watilde) NPM USABILITY CORNER + +Following `npm@2.6.1`'s unexpected fix of many of the issues with `npm update +-g` simply by making `--depth=0` the default for `npm outdated`, friend of npm +[@watilde](https://github.com/watilde) has made several modest changes to npm's +behavior that together justify bumping npm's minor version, as well as making +npm significantly more pleasant to use: + +* [`448efd0`](https://github.com/npm/npm/commit/448efd0eaa6f97af0889bf47efc543a1ea2f8d7e) + [#2853](https://github.com/npm/npm/issues/2853) Add support for `--dev` and + `--prod` to `npm ls`, so that you can list only the trees of production or + development dependencies, as desired. + ([@watilde](https://github.com/watilde)) +* [`a0a8777`](https://github.com/npm/npm/commit/a0a87777af8bee180e4e9321699f050c29ed5ac4) + [#7463](https://github.com/npm/npm/issues/7463) Split the list printed by + `npm run-script` into lifecycle scripts and scripts directly invoked via `npm + run-script`. ([@watilde](https://github.com/watilde)) +* [`a5edc17`](https://github.com/npm/npm/commit/a5edc17d5ef1435b468a445156a4a109df80f92b) + [#6749](https://github.com/npm/npm/issues/6749) `init-package-json@1.3.1`: + Support for passing scopes to `npm init` so packages are initialized as part + of that scope / organization / team. ([@watilde](https://github.com/watilde)) + +#### SMALLER FEATURES AND FIXES + +It turns out that quite a few pull requests had piled up on npm's issue +tracker, and they included some nice small features and fixes: + +* [`f33e8b8`](https://github.com/npm/npm/commit/f33e8b8ff2de094071c5976be95e35110cf2ab1a) + [#7354](https://github.com/npm/npm/issues/7354) Add `--if-present` flag to + allow e.g. CI systems to call (semi-) standard build tasks defined in + `package.json`, but don't raise an error if no such script is defined. + ([@jussi-kalliokoski](https://github.com/jussi-kalliokoski)) +* [`7bf85cc`](https://github.com/npm/npm/commit/7bf85cc372ab5698593b01e139c383fa62c92516) + [#4005](https://github.com/npm/npm/issues/4005) + [#6248](https://github.com/npm/npm/issues/6248) Globally unlink a package + when `npm rm` / `npm unlink` is called with no arguments. + ([@isaacs](https://github.com/isaacs)) +* [`a2e04bd`](https://github.com/npm/npm/commit/a2e04bd921feab8f9e40a27e180ca9308eb709d7) + [#7294](https://github.com/npm/npm/issues/7294) Ensure that when depending on + `git+<proto>` URLs, npm doesn't keep tacking additional `git+` prefixes onto + the front. ([@twhid](https://github.com/twhid)) +* [`0f87f5e`](https://github.com/npm/npm/commit/0f87f5ed28960d962f34977953561d22983da4f9) + [#6422](https://github.com/npm/npm/issues/6422) When depending on GitHub + private repositories, make sure we construct the Git URLS correctly. + ([@othiym23](https://github.com/othiym23)) +* [`50f461d`](https://github.com/npm/npm/commit/50f461d248c4d22e881a9535dccc1d57d994dbc7) + [#4595](https://github.com/npm/npm/issues/4595) Support finding compressed + manpages. It's still up to the system to figure out how to display them, + though. ([@pshevtsov](https://github.com/pshevtsov)) +* [`44da664`](https://github.com/npm/npm/commit/44da66456b530c049ff50953f78368460df87461) + [#7465](https://github.com/npm/npm/issues/7465) When calling git, log the + **full** command, with all arguments, on error. + ([@thriqon](https://github.com/thriqon)) +* [`9748d5c`](https://github.com/npm/npm/commit/9748d5cd195d0269b32caf45129a93d29359a796) + Add parent to error on `ETARGET` error. + ([@davglass](https://github.com/davglass)) +* [`37038d7`](https://github.com/npm/npm/commit/37038d7db47a986001f77ac17b3e164000fc8ff3) + [#4663](https://github.com/npm/npm/issues/4663) Remove hackaround for Linux + tests, as it's evidently no longer necessary. + ([@mmalecki](https://github.com/mmalecki)) +* [`d7b7853`](https://github.com/npm/npm/commit/d7b785393dffce93bb70317fbc039a6428ca37c5) + [#2612](https://github.com/npm/npm/issues/2612) Add support for path + completion on `npm install`, which narrows completion to only directories + containing `package.json` files. ([@deestan](https://github.com/deestan)) +* [`628fcdb`](https://github.com/npm/npm/commit/628fcdb0be4e14c0312085a50dc2ae01dc713fa6) + Remove all command completion calls to `-/short`, because it's been removed + from the primary registry for quite some time, and is generally a poor idea + on any registry with more than a few hundred packages. + ([@othiym23](https://github.com/othiym23)) +* [`3f6061d`](https://github.com/npm/npm/commit/3f6061d75650441ee690472d1fa9c8dd7a7b1b28) + [#6659](https://github.com/npm/npm/issues/6659) Instead of removing zsh + completion global, make it a local instead. + ([@othiym23](https://github.com/othiym23)) + +#### DOCUMENTATION TWEAKS + +* [`5bc70e6`](https://github.com/npm/npm/commit/5bc70e6cfb3598da433806c6f447fc94c8e1d35d) + [#7417](https://github.com/npm/npm/issues/7417) Provide concrete examples of + how the new `npm update` defaults work in practice, tied to actual test + cases. Everyone interested in using `npm update -g` now that it's been fixed + should read these documents, as should anyone interested in writing + documentation for npm. ([@smikes](https://github.com/smikes)) +* [`8ac6f21`](https://github.com/npm/npm/commit/8ac6f2123a6af13dc9447fad96ec9cb583c45a71) + [#6543](https://github.com/npm/npm/issues/6543) Clarify `npm-scripts` + warnings to de-emphasize dangers of using `install` scripts. + ([@zeke](https://github.com/zeke)) +* [`ebe3b37`](https://github.com/npm/npm/commit/ebe3b37098efdada41dcc4c52a291e29296ea242) + [#6711](https://github.com/npm/npm/issues/6711) Note that git tagging of + versions can be disabled via `--no-git-tag-verson`. + ([@smikes](https://github.com/smikes)) +* [`2ef5771`](https://github.com/npm/npm/commit/2ef5771632006e6cee8cf17f836c0f98ab494bd1) + [#6711](https://github.com/npm/npm/issues/6711) Document `git-tag-version` + configuration option. ([@KenanY](https://github.com/KenanY)) +* [`95e59b2`](https://github.com/npm/npm/commit/95e59b287c9517780318e145371a859e8ebb2d20) + Document that `NODE_ENV=production` behaves analogously to `--production` on + `npm install`. ([@stefaneg](https://github.com/stefaneg)) +* [`687117a`](https://github.com/npm/npm/commit/687117a5bcd6a838cd1532ea7020ec6fcf0c33c0) + [#7463](https://github.com/npm/npm/issues/7463) Document the new script + grouping behavior in the man page for `npm run-script`. + ([@othiym23](https://github.com/othiym23)) +* [`536b2b6`](https://github.com/npm/npm/commit/536b2b6f55c349247b3e79b5d11b4c033ef5a3df) + Rescue one of the the disabled tests and make it work properly. + ([@smikes](https://github.com/smikes)) + +#### DEPENDENCY UPDATES + +* [`89fc6a4`](https://github.com/npm/npm/commit/89fc6a4e7ff8c524675fcc14493ca0a1e3a76d38) + `which@1.0.9`: Test for being run as root, as well as the current user. + ([@isaacs](https://github.com/isaacs)) +* [`5d0612f`](https://github.com/npm/npm/commit/5d0612f31e226cba32a05351c47b055c0ab6c557) + `glob@4.4.1`: Better error message to explain why calling sync glob with a + callback results in an error. ([@isaacs](https://github.com/isaacs)) +* [`64b07f6`](https://github.com/npm/npm/commit/64b07f6caf6cb07e4102f1e4e5f2ff2b944e452e) + `tap@0.7.1`: More accurate counts of pending & skipped tests. + ([@rmg](https://github.com/rmg)) +* [`8fda451`](https://github.com/npm/npm/commit/8fda45195dae1d6f792be556abe87f7763fab09b) + `semver@4.3.1`: Make official the fact that `node-semver` has moved from + [@isaacs](https://github.com/isaacs)'s organization to + [@npm](https://github.com/npm)'s. ([@isaacs](https://github.com/isaacs)) + +### v2.6.1 (2015-02-19): + +* [`8b98f0e`](https://github.com/npm/npm/commit/8b98f0e709d77a8616c944aebd48ab726f726f76) + [#4471](https://github.com/npm/npm/issues/4471) `npm outdated` (and only `npm + outdated`) now defaults to `--depth=0`. See the [docs for + `--depth`](https://github.com/npm/npm/blob/82f484672adb1a3caf526a8a48832789495bb43d/doc/misc/npm-config.md#depth) + for the mildly confusing details. ([@smikes](https://github.com/smikes)) +* [`aa79194`](https://github.com/npm/npm/commit/aa791942a9f3c8af6a650edec72a675deb7a7c6e) + [#6565](https://github.com/npm/npm/issues/6565) Tweak `peerDependency` + deprecation warning to include which peer dependency on which package is + going to need to change. ([@othiym23](https://github.com/othiym23)) +* [`5fa067f`](https://github.com/npm/npm/commit/5fa067fd47682ac3cdb12a2b009d8ca59b05f992) + [#7171](https://github.com/npm/npm/issues/7171) Tweak `engineStrict` + deprecation warning to include which `package.json` is using it. + ([@othiym23](https://github.com/othiym23)) +* [`0fe0caa`](https://github.com/npm/npm/commit/0fe0caa7eddb7acdacbe5ee81ceabaca27175c78) + `glob@4.4.0`: Glob patterns can now ignore matches. + ([@isaacs](https://github.com/isaacs)) + +### v2.6.0 (2015-02-12): + +#### A LONG-AWAITED GUEST + +* [`38c4825`](https://github.com/npm/npm/commit/38c48254d3d217b4babf5027cb39492be4052fc2) + [#5068](https://github.com/npm/npm/issues/5068) Add new logout command, and + make it do something useful on both bearer-based and basic-based authed + clients. ([@othiym23](https://github.com/othiym23)) +* [`4bf0f5d`](https://github.com/npm/npm/commit/4bf0f5d56c33649124b486e016ba4a620c105c1c) + `npm-registry-client@6.1.1`: Support new `logout` endpoint to invalidate + token for sessions. ([@othiym23](https://github.com/othiym23)) + +#### DEPRECATIONS + +* [`c8e08e6`](https://github.com/npm/npm/commit/c8e08e6d91f4016c80f572aac5a2080df0f78098) + [#6565](https://github.com/npm/npm/issues/6565) Warn that `peerDependency` + behavior is changing and add a note to the docs. + ([@othiym23](https://github.com/othiym23)) +* [`7c81a5f`](https://github.com/npm/npm/commit/7c81a5f5f058941f635a92f22641ea68e79b60db) + [#7171](https://github.com/npm/npm/issues/7171) Warn that `engineStrict` in + `package.json` will be going away in the next major version of npm (coming + soon!) ([@othiym23](https://github.com/othiym23)) + +#### BUG FIXES & TWEAKS + +* [`add5890`](https://github.com/npm/npm/commit/add5890ce447dabf120b907a85f715df1e065f44) + [#4668](https://github.com/npm/npm/issues/4668) `read-package-json@1.3.1`: + Warn when a `bin` symbolic link is a dangling reference. + ([@nicks](https://github.com/nicks)) +* [`4b42071`](https://github.com/npm/npm/commit/4b420714dfb84338d85def78c30bd665e32d72c1) + `semver@4.3.0`: Add functions to extract parts of the version triple, fix a + typo. ([@isaacs](https://github.com/isaacs)) +* [`a9aff38`](https://github.com/npm/npm/commit/a9aff38719918486fc381d67ad3371c475632ff7) + Use full path for man pages as the symbolic link source, instead of just the + file name. ([@bengl](https://github.com/bengl)) +* [`6fd0fbd`](https://github.com/npm/npm/commit/6fd0fbd8a0347fd47cb7ee0064e0902a2f8a087c) + [#7233](https://github.com/npm/npm/issues/7233) Ensure `globalconfig` path + exists before trying to edit it. ([@ljharb](https://github.com/ljharb)) +* [`a0a2620`](https://github.com/npm/npm/commit/a0a262047647d9e2690cebe5a89e6a0dd33202bb) + `ini@1.3.3`: Allow embedded, quoted equals signs in ini field names. + ([@isaacs](https://github.com/isaacs)) + +Also typos and other documentation issues were addressed by +[@rutsky](https://github.com/rutsky), [@imurchie](https://github.com/imurchie), +[@marcin-wosinek](https://github.com/marcin-wosinek), +[@marr](https://github.com/marr), [@amZotti](https://github.com/amZotti), and +[@karlhorky](https://github.com/karlhorky). Thank you, everyone! + +### v2.5.1 (2015-02-06): + +This release doesn't look like much, but considerable effort went into ensuring +that npm's tests will pass on io.js 1.1.0 and Node 0.11.16 / 0.12.0 on both OS +X and Linux. + +**NOTE:** there are no actual changes to npm's code in `npm@2.5.1`. Only test +code (and the upgrade of `request` to the latest version) has changed. + +#### `npm-registry-mock@1.0.0`: + +* [`0e8d473`](https://github.com/npm/npm/commit/0e8d4736a1cbdda41ae8eba8a02c7ff7ce80c2ff) + [#7281](https://github.com/npm/npm/issues/7281) `npm-registry-mock@1.0.0`: + Clean up API, set `connection: close`. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`4707bba`](https://github.com/npm/npm/commit/4707bba7d44dfab85cc45c2ecafa9c1601ba2e9a) + Further update tests to work with `npm-registry-mock@1.0.0`. + ([@othiym23](https://github.com/othiym23)) +* [`41a0f89`](https://github.com/npm/npm/commit/41a0f8959d4e02af9661588afa7d2b4543cc21b6) + Got rid of completely gratuitous global config manipulation in tests. + ([@othiym23](https://github.com/othiym23)) + +#### MINOR DEPENDENCY TWEAK + +* [`a4c7af9`](https://github.com/npm/npm/commit/a4c7af9c692f250c0fd017397ed9514fc263b752) + `request@2.53.0`: Tweaks to tunneling proxy behavior. + ([@nylen](https://github.com/nylen)) + +### v2.5.0 (2015-01-29): + +#### SMALL FEATURE I HAVE ALREADY USED TO MAINTAIN NPM ITSELF + +* [`9d61e96`](https://github.com/npm/npm/commit/9d61e96fb1f48687a85c211e4e0cd44c7f95a38e) + `npm outdated --long` now includes a column showing the type of dependency. + ([@watilde](https://github.com/watilde)) + +#### BUG FIXES & TWEAKS + +* [`fec4c96`](https://github.com/npm/npm/commit/fec4c967ee235030bf31393e8605e9e2811f4a39) + Allow `--no-proxy` to override `HTTP_PROXY` setting in environment. + ([@othiym23](https://github.com/othiym23)) +* [`589acb9`](https://github.com/npm/npm/commit/589acb9714f395c2ad0d98cb0ac4236f1842d2cc) + Only set `access` when publshing when it's explicitly set. + ([@othiym23](https://github.com/othiym23)) +* [`1027087`](https://github.com/npm/npm/commit/102708704c8c4f0ea99775d38f8d1efecf584940) + Add script and `Makefile` stanza to update AUTHORS. + ([@KenanY](https://github.com/KenanY)) +* [`eeff04d`](https://github.com/npm/npm/commit/eeff04da7979a0181becd36b8777d607e7aa1787) + Add `NPMOPTS` to top-level install in `Makefile` to override `userconfig`. + ([@aredridel](https://github.com/aredridel)) +* [`0d17328`](https://github.com/npm/npm/commit/0d173287336650606d4c91818bb7bcfb0c5d57a1) + `fstream@1.0.4`: Run chown only when necessary. + ([@silkentrance](https://github.com/silkentrance)) +* [`9aa4622`](https://github.com/npm/npm/commit/9aa46226ee63b9e183fd49fc72d9bdb0fae9605e) + `columnify@1.4.1`: ES6ified! ([@timoxley](https://github.com/timoxley)) +* [`51b2fd1`](https://github.com/npm/npm/commit/51b2fd1974e38b825ac5ca4a852ab3c4142624cc) + Update default version in `docs/npm-config.md`. + ([@lucthev](https://github.com/lucthev)) + +#### `npm-registry-client@6.0.7`: + +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + [#7226](https://github.com/npm/npm/issues/7226) Ensure that all request + settings are copied onto the agent. + ([@othiym23](https://github.com/othiym23)) +* [`e186f6e`](https://github.com/npm/npm/commit/e186f6e7cfeb4db9c94d7375638f0b2f0d472947) + Only set `access` on publish when it differs from the norm. + ([@othiym23](https://github.com/othiym23)) +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + Allow overriding request's environment-based proxy handling. + ([@othiym23](https://github.com/othiym23)) +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + Properly handle retry failures on fetch. + ([@othiym23](https://github.com/othiym23)) + +### v2.4.1 (2015-01-23): + +![bridge that doesn't meet in the middle](http://www.static-18.themodernnomad.com/wp-content/uploads/2011/08/bridge-fail.jpg) + +Let's accentuate the positive: the `dist-tag` endpoints for `npm dist-tag +{add,rm,ls}` are now live on the public npm registry. + +* [`f70272b`](https://github.com/npm/npm/commit/f70272bed7d77032d1e21553371dd5662fef32f2) + `npm-registry-client@6.0.3`: Properly escape JSON tag version strings and + filter `_etag` from CouchDB docs. ([@othiym23](https://github.com/othiym23)) + +### v2.4.0 (2015-01-22): + +#### REGISTRY 2: ACCESS AND DIST-TAGS + +NOTE: This week's registry-2 commands are leading the implementation on +registry.npmjs.org a little bit, so some of the following may not work for +another week or so. Also note that `npm access` has documentation and +subcommands that are not yet finished, because they depend on incompletely +specified registry API endpoints. Things are coming together very quickly, +though, so expect the missing pieces to be filled in the coming weeks. + +* [`c963eb2`](https://github.com/npm/npm/commit/c963eb295cf766921b1680f4a71fd0ed3e1bcad8) + [#7181](https://github.com/npm/npm/issues/7181) NEW `npm access public` and + `npm access restricted`: Toggle visibility of scoped packages. + ([@othiym23](https://github.com/othiym23)) +* [`dc51810`](https://github.com/npm/npm/commit/dc51810e08c0f104259146c9c035d255de4f7d1d) + [#6243](https://github.com/npm/npm/issues/6243) / + [#6854](https://github.com/npm/npm/issues/6854) NEW `npm dist-tags`: Directly + manage `dist-tags` on packages. Most notably, `dist-tags` can now be deleted. + ([@othiym23](https://github.com/othiym23)) +* [`4c7c132`](https://github.com/npm/npm/commit/4c7c132a6b8305dca2974943226c39c0cdc64ff9) + [#7181](https://github.com/npm/npm/issues/7181) / + [#6854](https://github.com/npm/npm/issues/6854) `npm-registry-client@6.0.1`: + Add new `access` and `dist-tags` endpoints + ([@othiym23](https://github.com/othiym23)) + +#### NOT EXACTLY SELF-DEPRECATING + +* [`10d5c77`](https://github.com/npm/npm/commit/10d5c77653487f15759ac7de262a97e9c655240c) + [#6274](https://github.com/npm/npm/issues/6274) Deprecate `npm tag` in favor + of `npm dist-tag`. ([@othiym23](https://github.com/othiym23)) + +#### BUG FIX AND TINY FEATURE + +* [`29a6ef3`](https://github.com/npm/npm/commit/29a6ef38ef86ac318c5d9ea4bee28ce614672fa6) + [#6850](https://github.com/npm/npm/issues/6850) Be smarter about determining + base of file deletion when unbuilding. ([@phated](https://github.com/phated)) +* [`4ad01ea`](https://github.com/npm/npm/commit/4ad01ea2930a7a1cf88be121cc5ce9eba40c6807) + `init-package-json@1.2.0`: Support `--save-exact` in `npm init`. + ([@gustavnikolaj](https://github.com/gustavnikolaj)) + +### v2.3.0 (2015-01-15): + +#### REGISTRY 2: OH MY STARS! WHO AM I? + +* [`e662a60`](https://github.com/npm/npm/commit/e662a60e2f9a542effd8e72279d4622fe514415e) + The new `whoami` endpoint might not return a value. + ([@othiym23](https://github.com/othiym23)) +* [`c2cccd4`](https://github.com/npm/npm/commit/c2cccd4bbc65885239ed646eb510155f7b8af13d) + `npm-registry-client@5.0.0`: Includes the following fine changes + ([@othiym23](https://github.com/othiym23)): + * [`ba6b73e`](https://github.com/npm/npm-registry-client/commit/ba6b73e351027246c228622014e4441412409bad) + [#92](https://github.com/npm/npm-registry-client/issues/92) BREAKING CHANGE: + Move `/whoami` endpoint out of the package namespace (to `/-/whoami`). + ([@othiym23](https://github.com/othiym23)) + * [`3b174b7`](https://github.com/npm/npm-registry-client/commit/3b174b75c0c9ea77e298e6bb664fb499824ecc7c) + [#93](https://github.com/npm/npm-registry-client/issues/93) Registries based + on token-based auth can now offer starring. + ([@bcoe](https://github.com/bcoe)) + * [`4701a29`](https://github.com/npm/npm-registry-client/commit/4701a29bcda41bc14aa91f361dd0d576e24677d7) + Fix HTTP[S] connection keep-alive on Node 0.11 / io.js 1.0. + ([@fengmk2](https://github.com/fengmk2)) + +#### BETTER REGISTRY METADATA CACHING + +* [`98e1e10`](https://github.com/npm/npm/commit/98e1e1080df1f2cab16ed68035603950ea3d2d48) + [#6791](https://github.com/npm/npm/issues/6791) Add caching based on + Last-Modified / If-Modified-Since headers. Includes this + `npm-registry-client@5.0.0` change ([@lxe](https://github.com/lxe)): + * [`07bc335`](https://github.com/npm/npm-registry-client/commit/07bc33502b93554cd7539bfcce37d6e2d5404cd0) + [#86](https://github.com/npm/npm-registry-client/issues/86) Add Last-Modified + / If-Modified-Since cache header handling. ([@lxe](https://github.com/lxe)) + +#### HOW MUCH IS THAT WINDOWS IN THE DOGGY? + +* [`706d49a`](https://github.com/npm/npm/commit/706d49ab45521360fce1a68779b8de899015d8c2) + [#7107](https://github.com/npm/npm/issues/7107) `getCacheStat` passes a stub + stat on Windows. ([@rmg](https://github.com/rmg)) +* [`5fce278`](https://github.com/npm/npm/commit/5fce278a688a1cb79183e012bde40b089c2e97a4) + [#5267](https://github.com/npm/npm/issues/5267) Use `%COMSPEC%` when set on + Windows. ([@edmorley](https://github.com/edmorley)) +* [`cc2e099`](https://github.com/npm/npm/commit/cc2e09912ce2f91567c485422e4e797c4deb9842) + [#7083](https://github.com/npm/npm/issues/7083) Ensure Git cache prefix + exists before repo clone on Windows. + ([@othiym23](https://github.com/othiym23)) + +#### THRILLING BUG FIXES + +* [`c6fb430`](https://github.com/npm/npm/commit/c6fb430e55672b3caf87d25cbd2aeeebc449e2f2) + [#4197](https://github.com/npm/npm/issues/4197) Report `umask` as a 0-padded + octal literal. ([@smikes](https://github.com/smikes)) +* [`209713e`](https://github.com/npm/npm/commit/209713ebd4b77da11ce27d90c3346f78d760ba52) + [#4197](https://github.com/npm/npm/issues/4197) `umask@1.1.0`: Properly + handle `umask`s (i.e. not decimal numbers). + ([@smikes](https://github.com/smikes)) +* [`9eac0a1`](https://github.com/npm/npm/commit/9eac0a14488c5979ebde4c17881c8cd74f395069) + Make the example for bin links non-destructive. + ([@KevinSheedy](https://github.com/KevinSheedy)) +* [`6338bcf`](https://github.com/npm/npm/commit/6338bcfcd9cd1b0cc48b051dae764dc436ab5332) + `glob@4.3.5`: " -> ', for some reason. ([@isaacs](https://github.com/isaacs)) + +### v2.2.0 (2015-01-08): + +* [`88c531d`](https://github.com/npm/npm/commit/88c531d1c0b3aced8f2a09632db01b5635e7226a) + [#7056](https://github.com/npm/npm/issues/7056) version doesn't need a + package.json. ([@othiym23](https://github.com/othiym23)) +* [`2656c19`](https://github.com/npm/npm/commit/2656c19f6b915c3173acc3b6f184cc321563da5f) + [#7095](https://github.com/npm/npm/issues/7095) Link to npm website instead + of registry. ([@konklone](https://github.com/konklone)) +* [`c76b801`](https://github.com/npm/npm/commit/c76b8013bf1758587565822626171b76cb465c9e) + [#7067](https://github.com/npm/npm/issues/7067) Obfuscate secrets, including + nerfed URLs. ([@smikes](https://github.com/smikes)) +* [`17f66ce`](https://github.com/npm/npm/commit/17f66ceb1bd421084e4ae82a6b66634a6e272929) + [#6849](https://github.com/npm/npm/issues/6849) Explain the tag workflow more + clearly. ([@smikes](https://github.com/smikes)) +* [`e309df6`](https://github.com/npm/npm/commit/e309df642de33d10d6dffadaa8a5d214a924d0dc) + [#7096](https://github.com/npm/npm/issues/7096) Really, `npm update -g` is + almost always a terrible idea. ([@smikes](https://github.com/smikes)) +* [`acf287d`](https://github.com/npm/npm/commit/acf287d2547c8a0a8871652c164019261b666d55) + [#6999](https://github.com/npm/npm/issues/6999) `npm run-script env`: add a + new default script that will print out environment values. + ([@gcb](https://github.com/gcb)) +* [`560c009`](https://github.com/npm/npm/commit/560c00945d4dec926cd29193e336f137c7f3f951) + [#6745](https://github.com/npm/npm/issues/6745) Document `npm update --dev`. + ([@smikes](https://github.com/smikes)) +* [`226a677`](https://github.com/npm/npm/commit/226a6776a1a9e28570485623b8adc2ec4b041335) + [#7046](https://github.com/npm/npm/issues/7046) We have never been the Node + package manager. ([@linclark](https://github.com/linclark)) +* [`38eef22`](https://github.com/npm/npm/commit/38eef2248f03bb8ab04cae1833e2a228fb887f3c) + `npm-install-checks@1.0.5`: Compatibility with npmlog@^1. + ([@iarna](https://github.com/iarna)) + +### v2.1.18 (2015-01-01): + +* [`bf8640b`](https://github.com/npm/npm/commit/bf8640b0395b5dff71260a0cede7efc699a7bcf5) + [#7044](https://github.com/npm/npm/issues/7044) Document `.npmignore` syntax. + ([@zeke](https://github.com/zeke)) + +### v2.1.17 (2014-12-25): + +merry npm xmas + +Working with [@phated](https://github.com/phated), I discovered that npm still +had some lingering race conditions around how it handles Git dependencies. The +following changes were intended to remedy to these issues. Thanks to +[@phated](https://github.com/phated) for all his help getting to the bottom of +these. + +* [`bdf1c84`](https://github.com/npm/npm/commit/bdf1c8483f5c4ad79b712db12d73276e15883923) + [#7006](https://github.com/npm/npm/issues/7006) Only `chown` template and + top-level Git cache directories. ([@othiym23](https://github.com/othiym23)) +* [`581a72d`](https://github.com/npm/npm/commit/581a72da18f35ec87edef6255adf4ef4714a478c) + [#7006](https://github.com/npm/npm/issues/7006) Map Git remote inflighting to + clone paths rather than Git URLs. ([@othiym23](https://github.com/othiym23)) +* [`1c48d08`](https://github.com/npm/npm/commit/1c48d08dea31a11ac11a285cac598a482481cade) + [#7009](https://github.com/npm/npm/issues/7009) `normalize-git-url@1.0.0`: + Normalize Git URLs while caching. ([@othiym23](https://github.com/othiym23)) +* [`5423cf0`](https://github.com/npm/npm/commit/5423cf0be8ff2b76bfff7c8e780e5f261235a86a) + [#7009](https://github.com/npm/npm/issues/7009) Pack tarballs to their final + locations atomically. ([@othiym23](https://github.com/othiym23)) +* [`7f6557f`](https://github.com/npm/npm/commit/7f6557ff317469ee4a87c542ff9a991e74ce9f38) + [#7009](https://github.com/npm/npm/issues/7009) Inflight local directory + packing, just to be safe. ([@othiym23](https://github.com/othiym23)) + +Other changes: + +* [`1c491e6`](https://github.com/npm/npm/commit/1c491e65d70af013e8d5ac008d6d9762d6d91793) + [#6991](https://github.com/npm/npm/issues/6991) `npm version`: fix regression + in dirty-checking behavior ([@rlidwka](https://github.com/rlidwka)) +* [`55ceb2b`](https://github.com/npm/npm/commit/55ceb2b08ff8a0f56b94cc972ca15d7862e8733c) + [#1991](https://github.com/npm/npm/issues/1991) modify docs to reflect actual + `npm restart` behavior ([@smikes](https://github.com/smikes)) +* [`fb8e31b`](https://github.com/npm/npm/commit/fb8e31b95476a50bda35a665a99eec8a5d25a4db) + [#6982](https://github.com/npm/npm/issues/6982) when doing registry + operations, ensure registry URL always ends with `/` + ([@othiym23](https://github.com/othiym23)) +* [`5bcba65`](https://github.com/npm/npm/commit/5bcba65bed2678ffe80fb596f72abe9871d131c8) + pull whitelisted Git environment variables out into a named constant + ([@othiym23](https://github.com/othiym23)) +* [`be04bbd`](https://github.com/npm/npm/commit/be04bbdc52ebfc820cd939df2f7d79fe87067747) + [#7000](https://github.com/npm/npm/issues/7000) No longer install badly-named + manpage files, and log an error when trying to uninstall them. + ([@othiym23](https://github.com/othiym23)) +* [`6b7c5ec`](https://github.com/npm/npm/commit/6b7c5eca6b65e1247d0e51f6400cf2637ac880ce) + [#7011](https://github.com/npm/npm/issues/7011) Send auth for tarball fetches + for packages in `npm-shrinkwrap.json` from private registries. + ([@othiym23](https://github.com/othiym23)) +* [`9b9de06`](https://github.com/npm/npm/commit/9b9de06a99893b40aa23f0335726dec6df7979db) + `glob@4.3.2`: Better handling of trailing slashes. + ([@isaacs](https://github.com/isaacs)) +* [`030f3c7`](https://github.com/npm/npm/commit/030f3c7450b8ce124a19073bfbae0948a0a1a02c) + `semver@4.2.0`: Diffing between version strings. + ([@isaacs](https://github.com/isaacs)) + +### v2.1.16 (2014-12-22): + +* [`a4e4e33`](https://github.com/npm/npm/commit/a4e4e33edb35c68813f04bf42bdf933a6f727bcd) + [#6987](https://github.com/npm/npm/issues/6987) `read-installed@3.1.5`: fixed + a regression where a new / empty package would cause read-installed to throw. + ([@othiym23](https://github.com/othiym23) / + [@pgilad](https://github.com/pgilad)) + +### v2.1.15 (2014-12-18): + +* [`e5a2dee`](https://github.com/npm/npm/commit/e5a2dee47c74f26c56fee5998545b97497e830c8) + [#6951](https://github.com/npm/npm/issues/6951) `fs-vacuum@1.2.5`: Use + `path-is-inside` for better Windows normalization. + ([@othiym23](https://github.com/othiym23)) +* [`ac6167c`](https://github.com/npm/npm/commit/ac6167c2b9432939c57296f7ddd11ad5f8f918b2) + [#6955](https://github.com/npm/npm/issues/6955) Call `path.normalize` in + `lib/utils/gently-rm.js` for better Windows normalization. + ([@ben-page](https://github.com/ben-page)) +* [`c625d71`](https://github.com/npm/npm/commit/c625d714795e3b5badd847945e2401adfad5a196) + [#6964](https://github.com/npm/npm/issues/6964) Clarify CA configuration + docs. ([@jeffjo](https://github.com/jeffjo)) +* [`58b8cb5`](https://github.com/npm/npm/commit/58b8cb5cdf26a854358b7c2ab636572dba9bac16) + [#6950](https://github.com/npm/npm/issues/6950) Fix documentation typos. + ([@martinvd](https://github.com/martinvd)) +* [`7c1299d`](https://github.com/npm/npm/commit/7c1299d00538ea998684a1903a4091eafc63b7f1) + [#6909](https://github.com/npm/npm/issues/6909) Remove confusing mention of + rubygems `~>` semver operator. ([@mjtko](https://github.com/mjtko)) +* [`7dfdcc6`](https://github.com/npm/npm/commit/7dfdcc6debd8ef1fc52a2b508997d15887aad824) + [#6909](https://github.com/npm/npm/issues/6909) `semver@4.1.1`: Synchronize + documentation with PR [#6909](https://github.com/npm/npm/issues/6909) + ([@othiym23](https://github.com/othiym23)) +* [`adfddf3`](https://github.com/npm/npm/commit/adfddf3b682e0ae08e4b59d87c1b380dd651c572) + [#6925](https://github.com/npm/npm/issues/6925) Correct typo in + `doc/api/npm-ls.md` ([@oddurs](https://github.com/oddurs)) +* [`f5c534b`](https://github.com/npm/npm/commit/f5c534b711ab173129baf366c4f08d68f6117333) + [#6920](https://github.com/npm/npm/issues/6920) Remove recommendation to run + as root from `README.md`. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`3ef4459`](https://github.com/npm/npm/commit/3ef445922cd39f25b992d91bd22c4d367882ea22) + [#6920](https://github.com/npm/npm/issues/6920) `npm-@googlegroups.com` has + gone the way of all things. That means it's gone. + ([@robertkowalski](https://github.com/robertkowalski)) + +### v2.1.14 (2014-12-13): + +* [`cf7aeae`](https://github.com/npm/npm/commit/cf7aeae3c3a24e48d3de4006fa082f0c6040922a) + [#6923](https://github.com/npm/npm/issues/6923) Overaggressive link update + for new website broke node-gyp. ([@othiym23](https://github.com/othiym23)) + +### v2.1.13 (2014-12-11): + +* [`cbb890e`](https://github.com/npm/npm/commit/cbb890eeacc0501ba1b8c6955f1c829c8af9f486) + [#6897](https://github.com/npm/npm/issues/6897) npm is a nice package manager + that runs server-side JavaScript. ([@othiym23](https://github.com/othiym23)) +* [`d9043c3`](https://github.com/npm/npm/commit/d9043c3b8d7450c3cb9ca795028c0e1c05377820) + [#6893](https://github.com/npm/npm/issues/6893) Remove erroneous docs about + preupdate / update / postupdate lifecycle scripts, which have never existed. + ([@devTristan](https://github.com/devTristan)) +* [`c5df4d0`](https://github.com/npm/npm/commit/c5df4d0d683cd3506808d1cd1acebff02a8b82db) + [#6884](https://github.com/npm/npm/issues/6884) Update npmjs.org to npmjs.com + in docs. ([@linclark](https://github.com/linclark)) +* [`cb6ff8d`](https://github.com/npm/npm/commit/cb6ff8dace1b439851701d4784d2d719c22ca7a7) + [#6879](https://github.com/npm/npm/issues/6879) npm version: Update + shrinkwrap post-check. ([@othiym23](https://github.com/othiym23)) +* [`2a340bd`](https://github.com/npm/npm/commit/2a340bdd548c6449468281e1444a032812bff677) + [#6868](https://github.com/npm/npm/issues/6868) Use magic numbers instead of + regexps to distinguish tarballs from other things. + ([@daxxog](https://github.com/daxxog)) +* [`f1c8bdb`](https://github.com/npm/npm/commit/f1c8bdb3f6b753d0600597e12346bdc3a34cb9c1) + [#6861](https://github.com/npm/npm/issues/6861) `npm-registry-client@4.0.5`: + Distinguish between error properties that are part of the response and error + strings that should be returned to the user. + ([@disrvptor](https://github.com/disrvptor)) +* [`d3a1b63`](https://github.com/npm/npm/commit/d3a1b6397fddef04b5198ca89d36d720aeb05eb6) + [#6762](https://github.com/npm/npm/issues/6762) Make `npm outdated` ignore + private packages. ([@KenanY](https://github.com/KenanY)) +* [`16d8542`](https://github.com/npm/npm/commit/16d854283ca5bcdb0cb2812fc5745d841652b952) + install.sh: Drop support for node < 0.8, remove engines bits. + ([@isaacs](https://github.com/isaacs)) +* [`b9c6046`](https://github.com/npm/npm/commit/b9c60466d5b713b1dc2947da14a5dfe42352e029) + `init-package-json@1.1.3`: ([@terinstock](https://github.com/terinstock)) + noticed that `init.license` configuration doesn't stick. Make sure that + dashed defaults don't trump dotted parameters. + ([@othiym23](https://github.com/othiym23)) +* [`b6d6acf`](https://github.com/npm/npm/commit/b6d6acfc02c8887f78067931babab8f7c5180fed) + `which@1.0.8`: No longer use graceful-fs for some reason. + ([@isaacs](https://github.com/isaacs)) +* [`d39f673`](https://github.com/npm/npm/commit/d39f673caf08a90fb2bb001d79c98062d2cd05f4) + `request@2.51.0`: Incorporate bug fixes. ([@nylen](https://github.com/nylen)) +* [`c7ad727`](https://github.com/npm/npm/commit/c7ad7279cc879930ec58ccc62fa642e621ecb65c) + `columnify@1.3.2`: Incorporate bug fixes. + ([@timoxley](https://github.com/timoxley)) + +### v2.1.12 (2014-12-04): + +* [`e5b1e44`](https://github.com/npm/npm/commit/e5b1e448bb4a9d6eae4ba0f67b1d3c2cea8ed383) + add alias verison=version ([@isaacs](https://github.com/isaacs)) +* [`5eed7bd`](https://github.com/npm/npm/commit/5eed7bddbd7bb92a44c4193c93e8529500c558e6) + `request@2.49.0` ([@nylen](https://github.com/nylen)) +* [`e72f81d`](https://github.com/npm/npm/commit/e72f81d8412540ae7d1e0edcc37c11bcb8169051) + `glob@4.3.1` / `minimatch@2.0.1` ([@isaacs](https://github.com/isaacs)) +* [`b8dcc36`](https://github.com/npm/npm/commit/b8dcc3637b5b71933b97162b7aff1b1a622c13e2) + `graceful-fs@3.0.5` ([@isaacs](https://github.com/isaacs)) + +### v2.1.11 (2014-11-27): + +* [`4861d28`](https://github.com/npm/npm/commit/4861d28ad0ebd959fe6bc15b9c9a50fcabe57f55) + `which@1.0.7`: License update. ([@isaacs](https://github.com/isaacs)) +* [`30a2ea8`](https://github.com/npm/npm/commit/30a2ea80c891d384b31a1cf28665bba4271915bd) + `ini@1.3.2`: License update. ([@isaacs](https://github.com/isaacs)) +* [`6a4ea05`](https://github.com/npm/npm/commit/6a4ea054f6ddf52fc58842ba2046564b04c5c0e2) + `fstream@1.0.3`: Propagate error events to downstream streams. + ([@gfxmonk](https://github.com/gfxmonk)) +* [`a558695`](https://github.com/npm/npm/commit/a5586954f1c18df7c96137e0a79f41a69e7a884e) + `tar@1.0.3`: Don't extract broken files, propagate `drain` event. + ([@gfxmonk](https://github.com/gfxmonk)) +* [`989624e`](https://github.com/npm/npm/commit/989624e8321f87734c1b1272fc2f646e7af1f81c) + [#6767](https://github.com/npm/npm/issues/6767) Actually pass parameters when + adding git repo to cach under Windows. + ([@othiym23](https://github.com/othiym23)) +* [`657af73`](https://github.com/npm/npm/commit/657af7308f7d6cd2f81389fcf0d762252acaf1ce) + [#6774](https://github.com/npm/npm/issues/6774) When verifying paths on + unbuild, resolve both source and target as symlinks. + ([@hokaccha](https://github.com/hokaccha)) +* [`fd19c40`](https://github.com/npm/npm/commit/fd19c4046414494f9647a6991c00f8406a939929) + [#6713](https://github.com/npm/npm/issues/6713) + `realize-package-specifier@1.3.0`: Make it so that `npm install foo@1` work + when a file named `1` exists. ([@iarna](https://github.com/iarna)) +* [`c8ac37a`](https://github.com/npm/npm/commit/c8ac37a470491b2ed28514536e2e198494638c79) + `npm-registry-client@4.0.4`: Fix regression in failed fetch retries. + ([@othiym23](https://github.com/othiym23)) + +### v2.1.10 (2014-11-20): + +* [`756f3d4`](https://github.com/npm/npm/commit/756f3d40fe18bc02bc93afe17016dfcc266c4b6b) + [#6735](https://github.com/npm/npm/issues/6735) Log "already built" messages + at info, not error. ([@smikes](https://github.com/smikes)) +* [`1b7330d`](https://github.com/npm/npm/commit/1b7330dafba3bbba171f74f1e58b261cb1b9301e) + [#6729](https://github.com/npm/npm/issues/6729) `npm-registry-client@4.0.3`: + GitHub won't redirect you through an HTML page to a compressed tarball if you + don't tell it you accept JSON responses. + ([@KenanY](https://github.com/KenanY)) +* [`d9c7857`](https://github.com/npm/npm/commit/d9c7857be02dacd274e55bf6d430d90d91509d53) + [#6506](https://github.com/npm/npm/issues/6506) + `readdir-scoped-modules@1.0.1`: Use `graceful-fs` so the whole dependency + tree gets read, even in case of `EMFILE`. + ([@sakana](https://github.com/sakana)) +* [`3a085be`](https://github.com/npm/npm/commit/3a085be158ace8f1e4395e69f8c102d3dea00c5f) + Grammar fix in docs. ([@icylace](https://github.com/icylace)) +* [`3f8e2ff`](https://github.com/npm/npm/commit/3f8e2ff8342d327d6f1375437ecf4bd945dc360f) + Did you know that npm has a Code of Conduct? Add a link to it to + CONTRIBUTING.md. ([@isaacs](https://github.com/isaacs)) +* [`319ccf6`](https://github.com/npm/npm/commit/319ccf633289e06e57a80d74c39706899348674c) + `glob@4.2.1`: Performance tuning. ([@isaacs](https://github.com/isaacs)) +* [`835f046`](https://github.com/npm/npm/commit/835f046e7568c33e81a0b48c84cff965024d8b8a) + `readable-stream@1.0.33`: Bug fixes. ([@rvagg](https://github.com/rvagg)) +* [`a34c38d`](https://github.com/npm/npm/commit/a34c38d0732fb246d11f2a776d2ad0d8db654338) + `request@2.48.0`: Bug fixes. ([@nylen](https://github.com/nylen)) + +### v2.1.9 (2014-11-13): + +* [`eed9f61`](https://github.com/npm/npm/commit/eed9f6101963364acffc59d7194fc1655180e80c) + [#6542](https://github.com/npm/npm/issues/6542) `npm owner add / remove` now + works properly with scoped packages + ([@othiym23](https://github.com/othiym23)) +* [`cd25973`](https://github.com/npm/npm/commit/cd25973825aa5315b7ebf26227bd32bd6be5533f) + [#6548](https://github.com/npm/npm/issues/6548) using sudo won't leave the + cache's git directories with bad permissions + ([@othiym23](https://github.com/othiym23)) +* [`56930ab`](https://github.com/npm/npm/commit/56930abcae6a6ea41f1b75e23765c61259cef2dd) + fixed irregular `npm cache ls` output (yes, that's a thing) + ([@othiym23](https://github.com/othiym23)) +* [`740f483`](https://github.com/npm/npm/commit/740f483db6ec872b453065842da080a646c3600a) + legacy tests no longer poison user's own cache + ([@othiym23](https://github.com/othiym23)) +* [`ce37f14`](https://github.com/npm/npm/commit/ce37f142a487023747a9086335618638ebca4372) + [#6169](https://github.com/npm/npm/issues/6169) add terse output similar to + `npm publish / unpublish` for `npm owner add / remove` + ([@KenanY](https://github.com/KenanY)) +* [`bf2b8a6`](https://github.com/npm/npm/commit/bf2b8a66d7188900bf1e957c052b893948b67e0e) + [#6680](https://github.com/npm/npm/issues/6680) pass auth credentials to + registry when downloading search index + ([@terinjokes](https://github.com/terinjokes)) +* [`00ecb61`](https://github.com/npm/npm/commit/00ecb6101422984696929f602e14da186f9f669c) + [#6400](https://github.com/npm/npm/issues/6400) `.npmignore` is respected for + git repos on cache / pack / publish + ([@othiym23](https://github.com/othiym23)) +* [`d1b3a9e`](https://github.com/npm/npm/commit/d1b3a9ec5e2b6d52765ba5da5afb08dba41c49c1) + [#6311](https://github.com/npm/npm/issues/6311) `npm ls -l --depth=0` no + longer prints phantom duplicate children + ([@othiym23](https://github.com/othiym23)) +* [`07c5f34`](https://github.com/npm/npm/commit/07c5f34e45c9b18c348ed53b5763b1c5d4325740) + [#6690](https://github.com/npm/npm/issues/6690) `uid-number@0.0.6`: clarify + confusing names in error-handling code ([@isaacs](https://github.com/isaacs)) +* [`1ac9be9`](https://github.com/npm/npm/commit/1ac9be9f3bab816211d72d13cb05b5587878a586) + [#6684](https://github.com/npm/npm/issues/6684) `npm init`: don't report + write if canceled ([@smikes](https://github.com/smikes)) +* [`7bb207d`](https://github.com/npm/npm/commit/7bb207d1d6592a9cffc986871e4b671575363c2f) + [#5754](https://github.com/npm/npm/issues/5754) never remove app directories + on failed install ([@othiym23](https://github.com/othiym23)) +* [`705ce60`](https://github.com/npm/npm/commit/705ce601e7b9c5428353e02ebb30cb76c1991fdd) + [#5754](https://github.com/npm/npm/issues/5754) `fs-vacuum@1.2.2`: don't + throw when another fs task writes to a directory being vacuumed + ([@othiym23](https://github.com/othiym23)) +* [`1b650f4`](https://github.com/npm/npm/commit/1b650f4f217c413a2ffb96e1701beb5aa67a0de2) + [#6255](https://github.com/npm/npm/issues/6255) ensure that order credentials + are used from `.npmrc` doesn't regress + ([@othiym23](https://github.com/othiym23)) +* [`9bb2c34`](https://github.com/npm/npm/commit/9bb2c3435cedef40b45d3e9bd7a8edfb8cbe7209) + [#6644](https://github.com/npm/npm/issues/6644) `warn` rather than `info` on + fetch failure ([@othiym23](https://github.com/othiym23)) +* [`e34a7b6`](https://github.com/npm/npm/commit/e34a7b6b7371b1893a062f627ae8e168546d7264) + [#6524](https://github.com/npm/npm/issues/6524) `npm-registry-client@4.0.2`: + proxy via `request` more transparently + ([@othiym23](https://github.com/othiym23)) +* [`40afd6a`](https://github.com/npm/npm/commit/40afd6aaf34c11a10e80ec87b115fb2bb907e3bd) + [#6524](https://github.com/npm/npm/issues/6524) push proxy settings into + `request` ([@tauren](https://github.com/tauren)) + +### v2.1.8 (2014-11-06): + +* [`063d843`](https://github.com/npm/npm/commit/063d843965f9f0bfa5732d7c2d6f5aa37a8260a2) + npm version now updates version in npm-shrinkwrap.json + ([@faiq](https://github.com/faiq)) +* [`3f53cd7`](https://github.com/npm/npm/commit/3f53cd795f8a600e904a97f215ba5b5a9989d9dd) + [#6559](https://github.com/npm/npm/issues/6559) save local dependencies in + npm-shrinkwrap.json ([@Torsph](https://github.com/Torsph)) +* [`e249262`](https://github.com/npm/npm/commit/e24926268b2d2220910bc81cce6d3b2e08d94eb1) + npm-faq.md: mention scoped pkgs in namespace Q + ([@smikes](https://github.com/smikes)) +* [`6b06ec4`](https://github.com/npm/npm/commit/6b06ec4ef5da490bdca1512fa7f12490245c192b) + [#6642](https://github.com/npm/npm/issues/6642) `init-package-json@1.1.2`: + Handle both `init-author-name` and `init.author.name`. + ([@othiym23](https://github.com/othiym23)) +* [`9cb334c`](https://github.com/npm/npm/commit/9cb334c8a895a55461aac18791babae779309a0e) + [#6409](https://github.com/npm/npm/issues/6409) document commit-ish with + GitHub URLs ([@smikes](https://github.com/smikes)) +* [`0aefae9`](https://github.com/npm/npm/commit/0aefae9bc2598a4b7a3ee7bb2306b42e3e12bb28) + [#2959](https://github.com/npm/npm/issues/2959) npm run no longer fails + silently ([@flipside](https://github.com/flipside)) +* [`e007a2c`](https://github.com/npm/npm/commit/e007a2c1e4fac1759fa61ac6e78c6b83b2417d11) + [#3908](https://github.com/npm/npm/issues/3908) include command in spawn + errors ([@smikes](https://github.com/smikes)) + +### v2.1.7 (2014-10-30): + +* [`6750b05`](https://github.com/npm/npm/commit/6750b05dcba20d8990a672957ec56c48f97e241a) + [#6398](https://github.com/npm/npm/issues/6398) `npm-registry-client@4.0.0`: + consistent API, handle relative registry paths, use auth more consistently + ([@othiym23](https://github.com/othiym23)) +* [`7719cfd`](https://github.com/npm/npm/commit/7719cfdd8b204dfeccc41289707ea58b4d608905) + [#6560](https://github.com/npm/npm/issues/6560) use new npm-registry-client + API ([@othiym23](https://github.com/othiym23)) +* [`ed61971`](https://github.com/npm/npm/commit/ed619714c93718b6c1922b8c286f4b6cd2b97c80) + move caching of search metadata from `npm-registry-client` to npm itself + ([@othiym23](https://github.com/othiym23)) +* [`3457041`](https://github.com/npm/npm/commit/34570414cd528debeb22943873440594d7f47abf) + handle caching of metadata independently from `npm-registry-client` + ([@othiym23](https://github.com/othiym23)) +* [`20a331c`](https://github.com/npm/npm/commit/20a331ced6a52faac6ec242e3ffdf28bcd447c40) + [#6538](https://github.com/npm/npm/issues/6538) map registry URLs to + credentials more safely ([@indexzero](https://github.com/indexzero)) +* [`4072e97`](https://github.com/npm/npm/commit/4072e97856bf1e7affb38333d080c172767eea27) + [#6589](https://github.com/npm/npm/issues/6589) `npm-registry-client@4.0.1`: + allow publishing of packages with names identical to built-in Node modules + ([@feross](https://github.com/feross)) +* [`254f0e4`](https://github.com/npm/npm/commit/254f0e4adaf2c56e9df25c7343c43b0b0804a3b5) + `tar@1.0.2`: better error-handling ([@runk](https://github.com/runk)) +* [`73ee2aa`](https://github.com/npm/npm/commit/73ee2aa4f1a47e43fe7cf4317a5446875f7521fa) + `request@2.47.0` ([@mikeal](https://github.com/mikeal)) + +### v2.1.6 (2014-10-23): + +* [`681b398`](https://github.com/npm/npm/commit/681b3987a18e7aba0aaf78c91a23c7cc0ab82ce8) + [#6523](https://github.com/npm/npm/issues/6523) fix default `logelevel` doc + ([@KenanY](https://github.com/KenanY)) +* [`80b368f`](https://github.com/npm/npm/commit/80b368ffd786d4d008734b56c4a6fe12d2cb2926) + [#6528](https://github.com/npm/npm/issues/6528) `npm version` should work in + a git directory without git ([@terinjokes](https://github.com/terinjokes)) +* [`5f5f9e4`](https://github.com/npm/npm/commit/5f5f9e4ddf544c2da6adf3f8c885238b0e745076) + [#6483](https://github.com/npm/npm/issues/6483) `init-package-json@1.1.1`: + Properly pick up default values from environment variables. + ([@othiym23](https://github.com/othiym23)) +* [`a114870`](https://github.com/npm/npm/commit/a1148702f53f82d49606b2e4dac7581261fff442) + perl 5.18.x doesn't like -pi without filenames + ([@othiym23](https://github.com/othiym23)) +* [`de5ba00`](https://github.com/npm/npm/commit/de5ba007a48db876eb5bfb6156435f3512d58977) + `request@2.46.0`: Tests and cleanup. + ([@othiym23](https://github.com/othiym23)) +* [`76933f1`](https://github.com/npm/npm/commit/76933f169f17b5273b32e924a7b392d5729931a7) + `fstream-npm@1.0.1`: Always include `LICENSE[.*]`, `LICENCE[.*]`, + `CHANGES[.*]`, `CHANGELOG[.*]`, and `HISTORY[.*]`. + ([@jonathanong](https://github.com/jonathanong)) + +### v2.1.5 (2014-10-16): + +* [`6a14b23`](https://github.com/npm/npm/commit/6a14b232a0e34158bd95bb25c607167be995c204) + [#6397](https://github.com/npm/npm/issues/6397) Defactor npmconf back into + npm. ([@othiym23](https://github.com/othiym23)) +* [`4000e33`](https://github.com/npm/npm/commit/4000e3333a76ca4844681efa8737cfac24b7c2c8) + [#6323](https://github.com/npm/npm/issues/6323) Install `peerDependencies` + from top. ([@othiym23](https://github.com/othiym23)) +* [`5d119ae`](https://github.com/npm/npm/commit/5d119ae246f27353b14ff063559d1ba8c616bb89) + [#6498](https://github.com/npm/npm/issues/6498) Better error messages on + malformed `.npmrc` properties. ([@nicks](https://github.com/nicks)) +* [`ae18efb`](https://github.com/npm/npm/commit/ae18efb65fed427b1ef18e4862885bf60b87b92e) + [#6093](https://github.com/npm/npm/issues/6093) Replace instances of 'hash' + with 'object' in documentation. ([@zeke](https://github.com/zeke)) +* [`53108b2`](https://github.com/npm/npm/commit/53108b276fec5f97a38250933a2768d58b6928da) + [#1558](https://github.com/npm/npm/issues/1558) Clarify how local paths + should be used. ([@KenanY](https://github.com/KenanY)) +* [`344fa1a`](https://github.com/npm/npm/commit/344fa1a219ac8867022df3dc58a47636dde8a242) + [#6488](https://github.com/npm/npm/issues/6488) Work around bug in marked. + ([@othiym23](https://github.com/othiym23)) + +OUTDATED DEPENDENCY CLEANUP JAMBOREE + +* [`60c2942`](https://github.com/npm/npm/commit/60c2942e13655d9ecdf6e0f1f97f10cb71a75255) + `realize-package-specifier@1.2.0`: Handle names and rawSpecs more + consistently. ([@iarna](https://github.com/iarna)) +* [`1b5c95f`](https://github.com/npm/npm/commit/1b5c95fbda77b87342bd48c5ecac5b1fd571ccfe) + `sha@1.3.0`: Change line endings? + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`d7dee3f`](https://github.com/npm/npm/commit/d7dee3f3f7d9e7c2061a4ecb4dd93e3e4bfe4f2e) + `request@2.45.0`: Dependency updates, better proxy support, better compressed + response handling, lots of 'use strict'. + ([@mikeal](https://github.com/mikeal)) +* [`3d75180`](https://github.com/npm/npm/commit/3d75180c2cc79fa3adfa0e4cb783a27192189a65) + `opener@1.4.0`: Added gratuitous return. + ([@Domenic](https://github.com/Domenic)) +* [`8e2703f`](https://github.com/npm/npm/commit/8e2703f78d280d1edeb749e257dda1f288bad6e3) + `retry@0.6.1` / `npm-registry-client@3.2.4`: Change of ownership. + ([@tim-kos](https://github.com/tim-kos)) +* [`c87b00f`](https://github.com/npm/npm/commit/c87b00f82f92434ee77831915012c77a6c244c39) + `once@1.3.1`: Wrap once with wrappy. ([@isaacs](https://github.com/isaacs)) +* [`01ec790`](https://github.com/npm/npm/commit/01ec790fd47def56eda6abb3b8d809093e8f493f) + `npm-user-validate@0.1.1`: Correct repository URL. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`389e52c`](https://github.com/npm/npm/commit/389e52c2d94c818ca8935ccdcf392994fec564a2) + `glob@4.0.6`: Now absolutely requires `graceful-fs`. + ([@isaacs](https://github.com/isaacs)) +* [`e15ab15`](https://github.com/npm/npm/commit/e15ab15a27a8f14cf0d9dc6f11dee452080378a0) + `ini@1.3.0`: Tighten up whitespace handling. + ([@isaacs](https://github.com/isaacs)) +* [`7610f3e`](https://github.com/npm/npm/commit/7610f3e62e699292ece081bfd33084d436e3246d) + `archy@1.0.0` ([@substack](https://github.com/substack)) +* [`9c13149`](https://github.com/npm/npm/commit/9c1314985e513e20ffa3ea0ca333ba2ab78299c9) + `semver@4.1.0`: Add support for prerelease identifiers. + ([@bromanko](https://github.com/bromanko)) +* [`f096c25`](https://github.com/npm/npm/commit/f096c250441b031d758f03afbe8d2321f94c7703) + `graceful-fs@3.0.4`: Add a bunch of additional tests, skip the unfortunate + complications of `graceful-fs@3.0.3`. ([@isaacs](https://github.com/isaacs)) + +### v2.1.4 (2014-10-09): + +* [`3aeb440`](https://github.com/npm/npm/commit/3aeb4401444fad83cc7a8d11bf2507658afa5248) + [#6442](https://github.com/npm/npm/issues/6442) proxying git needs `GIT_SSL_CAINFO` + ([@wmertens](https://github.com/wmertens)) +* [`a8da8d6`](https://github.com/npm/npm/commit/a8da8d6e0cd56d97728c0b76b51604ee06ef6264) + [#6413](https://github.com/npm/npm/issues/6413) write builtin config on any + global npm install ([@isaacs](https://github.com/isaacs)) +* [`9e4d632`](https://github.com/npm/npm/commit/9e4d632c0142ba55df07d624667738b8727336fc) + [#6343](https://github.com/npm/npm/issues/6343) don't pass run arguments to + pre & post scripts ([@TheLudd](https://github.com/TheLudd)) +* [`d831b1f`](https://github.com/npm/npm/commit/d831b1f7ca1a9921ea5b394e39b7130ecbc6d7b4) + [#6399](https://github.com/npm/npm/issues/6399) race condition: inflight + installs, prevent `peerDependency` problems + ([@othiym23](https://github.com/othiym23)) +* [`82b775d`](https://github.com/npm/npm/commit/82b775d6ff34c4beb6c70b2344d491a9f2026577) + [#6384](https://github.com/npm/npm/issues/6384) race condition: inflight + caching by URL rather than semver range + ([@othiym23](https://github.com/othiym23)) +* [`7bee042`](https://github.com/npm/npm/commit/7bee0429066fedcc9e6e962c043eb740b3792809) + `inflight@1.0.4`: callback can take arbitrary number of parameters + ([@othiym23](https://github.com/othiym23)) +* [`3bff494`](https://github.com/npm/npm/commit/3bff494f4abf17d6d7e0e4a3a76cf7421ecec35a) + [#5195](https://github.com/npm/npm/issues/5195) fixed regex color regression + for `npm search` ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`33ba2d5`](https://github.com/npm/npm/commit/33ba2d585160a0a2a322cb76c4cd989acadcc984) + [#6387](https://github.com/npm/npm/issues/6387) allow `npm view global` if + package is specified ([@evanlucas](https://github.com/evanlucas)) +* [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) + [#6388](https://github.com/npm/npm/issues/6388) npm-publish → + npm-developers(7) ([@kennydude](https://github.com/kennydude)) + +TEST CLEANUP EXTRAVAGANZA: + +* [`8d6bfcb`](https://github.com/npm/npm/commit/8d6bfcb88408f5885a2a67409854c43e5c3a23f6) + tap tests run with no system-wide side effects + ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`7a1472f`](https://github.com/npm/npm/commit/7a1472fbdbe99956ad19f629e7eb1cc07ba026ef) + added npm cache cleanup script + ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`0ce6a37`](https://github.com/npm/npm/commit/0ce6a3752fa9119298df15671254db6bc1d8e64c) + stripped out dead test code (othiym23) +* replace spawn with common.npm (@chrismeyersfsu): + * [`0dcd614`](https://github.com/npm/npm/commit/0dcd61446335eaf541bf5f2d5186ec1419f86a42) + test/tap/cache-shasum-fork.js + * [`97f861c`](https://github.com/npm/npm/commit/97f861c967606a7e51e3d5047cf805d9d1adea5a) + test/tap/false_name.js + * [`d01b3de`](https://github.com/npm/npm/commit/d01b3de6ce03f25bbf3db97bfcd3cc85830d6801) + test/tap/git-cache-locking.js + * [`7b63016`](https://github.com/npm/npm/commit/7b63016778124c6728d6bd89a045c841ae3900b6) + test/tap/pack-scoped.js + * [`c877553`](https://github.com/npm/npm/commit/c877553265c39673e03f0a97972f692af81a595d) + test/tap/scripts-whitespace-windows.js + * [`df98525`](https://github.com/npm/npm/commit/df98525331e964131299d457173c697cfb3d95b9) + test/tap/prepublish.js + * [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) + test/tap/prune.js + +### v2.1.3 (2014-10-02): + +BREAKING CHANGE FOR THE SQRT(i) PEOPLE ACTUALLY USING `npm submodule`: + +* [`1e64473`](https://github.com/npm/npm/commit/1e6447360207f45ad6188e5780fdf4517de6e23d) + `rm -rf npm submodule` command, which has been broken since the Carter + Administration ([@isaacs](https://github.com/isaacs)) + +BREAKING CHANGE IF YOU ARE FOR SOME REASON STILL USING NODE 0.6 AND YOU SHOULD +NOT BE DOING THAT CAN YOU NOT: + +* [`3e431f9`](https://github.com/npm/npm/commit/3e431f9d6884acb4cde8bcb8a0b122a76b33ee1d) + [joyent/node#8492](https://github.com/joyent/node/issues/8492) bye bye + customFds, hello stdio ([@othiym23](https://github.com/othiym23)) + +Other changes: + +* [`ea607a8`](https://github.com/npm/npm/commit/ea607a8a20e891ad38eed11b5ce2c3c0a65484b9) + [#6372](https://github.com/npm/npm/issues/6372) noisily error (without + aborting) on multi-{install,build} ([@othiym23](https://github.com/othiym23)) +* [`3ee2799`](https://github.com/npm/npm/commit/3ee2799b629fd079d2db21d7e8f25fa7fa1660d0) + [#6372](https://github.com/npm/npm/issues/6372) only make cache creation + requests in flight ([@othiym23](https://github.com/othiym23)) +* [`1a90ec2`](https://github.com/npm/npm/commit/1a90ec2f2cfbefc8becc6ef0c480e5edacc8a4cb) + [#6372](https://github.com/npm/npm/issues/6372) wait to put Git URLs in + flight until normalized ([@othiym23](https://github.com/othiym23)) +* [`664795b`](https://github.com/npm/npm/commit/664795bb7d8da7142417b3f4ef5986db3a394071) + [#6372](https://github.com/npm/npm/issues/6372) log what is and isn't in + flight ([@othiym23](https://github.com/othiym23)) +* [`00ef580`](https://github.com/npm/npm/commit/00ef58025a1f52dfabf2c4dc3898621d16a6e062) + `inflight@1.0.3`: fix largely theoretical race condition, because we really + really hate race conditions ([@isaacs](https://github.com/isaacs)) +* [`1cde465`](https://github.com/npm/npm/commit/1cde4658d897ae0f93ff1d65b258e1571b391182) + [#6363](https://github.com/npm/npm/issues/6363) + `realize-package-specifier@1.1.0`: handle local dependencies better + ([@iarna](https://github.com/iarna)) +* [`86f084c`](https://github.com/npm/npm/commit/86f084c6c6d7935cd85d72d9d94b8784c914d51e) + `realize-package-specifier@1.0.2`: dependency realization! in its own module! + ([@iarna](https://github.com/iarna)) +* [`553d830`](https://github.com/npm/npm/commit/553d830334552b83606b6bebefd821c9ea71e964) + `npm-package-arg@2.1.3`: simplified semver, better tests + ([@iarna](https://github.com/iarna)) +* [`bec9b61`](https://github.com/npm/npm/commit/bec9b61a316c19f5240657594f0905a92a474352) + `readable-stream@1.0.32`: for some reason + ([@rvagg](https://github.com/rvagg)) +* [`ff08ec5`](https://github.com/npm/npm/commit/ff08ec5f6d717bdbd559de0b2ede769306a9a763) + `dezalgo@1.0.1`: use wrappy for instrumentability + ([@isaacs](https://github.com/isaacs)) + +### v2.1.2 (2014-09-29): + +* [`a1aa20e`](https://github.com/npm/npm/commit/a1aa20e44bb8285c6be1e7fa63b9da920e3a70ed) + [#6282](https://github.com/npm/npm/issues/6282) + `normalize-package-data@1.0.3`: don't prune bundledDependencies + ([@isaacs](https://github.com/isaacs)) +* [`a1f5fe1`](https://github.com/npm/npm/commit/a1f5fe1005043ce20a06e8b17a3e201aa3215357) + move locks back into cache, now path-aware + ([@othiym23](https://github.com/othiym23)) +* [`a432c4b`](https://github.com/npm/npm/commit/a432c4b48c881294d6d79b5f41c2e1c16ad15a8a) + convert lib/utils/tar.js to use atomic streams + ([@othiym23](https://github.com/othiym23)) +* [`b8c3c74`](https://github.com/npm/npm/commit/b8c3c74a3c963564233204161cc263e0912c930b) + `fs-write-stream-atomic@1.0.2`: Now works with streams1 fs.WriteStreams. + ([@isaacs](https://github.com/isaacs)) +* [`c7ab76f`](https://github.com/npm/npm/commit/c7ab76f44cce5f42add5e3ba879bd10e7e00c3e6) + logging cleanup ([@othiym23](https://github.com/othiym23)) +* [`4b2d95d`](https://github.com/npm/npm/commit/4b2d95d0641435b09d047ae5cb2226f292bf38f0) + [#6329](https://github.com/npm/npm/issues/6329) efficiently validate tmp + tarballs safely ([@othiym23](https://github.com/othiym23)) + +### v2.1.1 (2014-09-26): + +* [`563225d`](https://github.com/npm/npm/commit/563225d813ea4c12f46d4f7821ac7f76ba8ee2d6) + [#6318](https://github.com/npm/npm/issues/6318) clean up locking; prefix + lockfile with "." ([@othiym23](https://github.com/othiym23)) +* [`c7f30e4`](https://github.com/npm/npm/commit/c7f30e4550fea882d31fcd4a55b681cd30713c44) + [#6318](https://github.com/npm/npm/issues/6318) remove locking code around + tarball packing and unpacking ([@othiym23](https://github.com/othiym23)) + +### v2.1.0 (2014-09-25): + +NEW FEATURE: + +* [`3635601`](https://github.com/npm/npm/commit/36356011b6f2e6a5a81490e85a0a44eb27199dd7) + [#5520](https://github.com/npm/npm/issues/5520) Add `'npm view .'`. + ([@evanlucas](https://github.com/evanlucas)) + +Other changes: + +* [`f24b552`](https://github.com/npm/npm/commit/f24b552b596d0627549cdd7c2d68fcf9006ea50a) + [#6294](https://github.com/npm/npm/issues/6294) Lock cache → lock cache + target. ([@othiym23](https://github.com/othiym23)) +* [`ad54450`](https://github.com/npm/npm/commit/ad54450104f94c82c501138b4eee488ce3a4555e) + [#6296](https://github.com/npm/npm/issues/6296) Ensure that npm-debug.log + file is created when rollbacks are done. + ([@isaacs](https://github.com/isaacs)) +* [`6810071`](https://github.com/npm/npm/commit/681007155a40ac9d165293bd6ec5d8a1423ccfca) + docs: Default loglevel "http" → "warn". + ([@othiym23](https://github.com/othiym23)) +* [`35ac89a`](https://github.com/npm/npm/commit/35ac89a940f23db875e882ce2888208395130336) + Skip installation of installed scoped packages. + ([@timoxley](https://github.com/timoxley)) +* [`e468527`](https://github.com/npm/npm/commit/e468527256ec599892b9b88d61205e061d1ab735) + Ensure cleanup executes for scripts-whitespace-windows test. + ([@timoxley](https://github.com/timoxley)) +* [`ef9101b`](https://github.com/npm/npm/commit/ef9101b7f346797749415086956a0394528a12c4) + Ensure cleanup executes for packed-scope test. + ([@timoxley](https://github.com/timoxley)) +* [`69b4d18`](https://github.com/npm/npm/commit/69b4d18cdbc2ae04c9afaffbd273b436a394f398) + `fs-write-stream-atomic@1.0.1`: Fix a race condition in our race-condition + fixer. ([@isaacs](https://github.com/isaacs)) +* [`26b17ff`](https://github.com/npm/npm/commit/26b17ff2e3b21ee26c6fdbecc8273520cff45718) + [#6272](https://github.com/npm/npm/issues/6272) `npmconf` decides what the + default prefix is. ([@othiym23](https://github.com/othiym23)) +* [`846faca`](https://github.com/npm/npm/commit/846facacc6427dafcf5756dcd36d9036539938de) + Fix development dependency is preferred over dependency. + ([@andersjanmyr](https://github.com/andersjanmyr)) +* [`9d1a9db`](https://github.com/npm/npm/commit/9d1a9db3af5adc48a7158a5a053eeb89ee41a0e7) + [#3265](https://github.com/npm/npm/issues/3265) Re-apply a71615a. Fixes + [#3265](https://github.com/npm/npm/issues/3265) again, with a test! + ([@glasser](https://github.com/glasser)) +* [`1d41db0`](https://github.com/npm/npm/commit/1d41db0b2744a7bd50971c35cc060ea0600fb4bf) + `marked-man@0.1.4`: Fixes formatting of synopsis blocks in man docs. + ([@kapouer](https://github.com/kapouer)) +* [`a623da0`](https://github.com/npm/npm/commit/a623da01bea1b2d3f3a18b9117cfd2d8e3cbdd77) + [#5867](https://github.com/npm/npm/issues/5867) Specify dummy git template + dir when cloning to prevent copying hooks. + ([@boneskull](https://github.com/boneskull)) + +### v2.0.2 (2014-09-19): + +* [`42c872b`](https://github.com/npm/npm/commit/42c872b32cadc0e555638fc78eab3a38a04401d8) + [#5920](https://github.com/npm/npm/issues/5920) + `fs-write-stream-atomic@1.0.0` ([@isaacs](https://github.com/isaacs)) +* [`6784767`](https://github.com/npm/npm/commit/6784767fe15e28b44c81a1d4bb1738c642a65d78) + [#5920](https://github.com/npm/npm/issues/5920) make all write streams atomic + ([@isaacs](https://github.com/isaacs)) +* [`f6fac00`](https://github.com/npm/npm/commit/f6fac000dd98ebdd5ea1d5921175735d463d328b) + [#5920](https://github.com/npm/npm/issues/5920) barf on 0-length cached + tarballs ([@isaacs](https://github.com/isaacs)) +* [`3b37592`](https://github.com/npm/npm/commit/3b37592a92ea98336505189ae8ca29248b0589f4) + `write-file-atomic@1.1.0`: use graceful-fs + ([@iarna](https://github.com/iarna)) + +### v2.0.1 (2014-09-18): + +* [`74c5ab0`](https://github.com/npm/npm/commit/74c5ab0a676793c6dc19a3fd5fe149f85fecb261) + [#6201](https://github.com/npm/npm/issues/6201) `npmconf@2.1.0`: scope + always-auth to registry URI ([@othiym23](https://github.com/othiym23)) +* [`774b127`](https://github.com/npm/npm/commit/774b127da1dd6fefe2f1299e73505d9146f00294) + [#6201](https://github.com/npm/npm/issues/6201) `npm-registry-client@3.2.2`: + use scoped always-auth settings ([@othiym23](https://github.com/othiym23)) +* [`f2d2190`](https://github.com/npm/npm/commit/f2d2190aa365d22378d03afab0da13f95614a583) + [#6201](https://github.com/npm/npm/issues/6201) support saving + `--always-auth` when logging in ([@othiym23](https://github.com/othiym23)) +* [`17c941a`](https://github.com/npm/npm/commit/17c941a2d583210fe97ed47e2968d94ce9f774ba) + [#6163](https://github.com/npm/npm/issues/6163) use `write-file-atomic` + instead of `fs.writeFile()` ([@fiws](https://github.com/fiws)) +* [`fb5724f`](https://github.com/npm/npm/commit/fb5724fd98e1509c939693568df83d11417ea337) + [#5925](https://github.com/npm/npm/issues/5925) `npm init -f`: allow `npm + init` to run without prompting + ([@michaelnisi](https://github.com/michaelnisi)) +* [`b706d63`](https://github.com/npm/npm/commit/b706d637d5965dbf8f7ce07dc5c4bc80887f30d8) + [#3059](https://github.com/npm/npm/issues/3059) disable prepublish when + running `npm install --production` + ([@jussi-kalliokoski](https://github.com/jussi-kalliokoski)) +* [`119f068`](https://github.com/npm/npm/commit/119f068eae2a36fa8b9c9ca557c70377792243a4) + attach the node version used when publishing a package to its registry + metadata ([@othiym23](https://github.com/othiym23)) +* [`8fe0081`](https://github.com/npm/npm/commit/8fe008181665519c2ac201ee432a3ece9798c31f) + seriously, don't use `npm -g update npm` + ([@thomblake](https://github.com/thomblake)) +* [`ea5b3d4`](https://github.com/npm/npm/commit/ea5b3d446b86dcabb0dbc6dba374d3039342ecb3) + `request@2.44.0` ([@othiym23](https://github.com/othiym23)) + +### v2.0.0 (2014-09-12): + +BREAKING CHANGES: + +* [`4378a17`](https://github.com/npm/npm/commit/4378a17db340404a725ffe2eb75c9936f1612670) + `semver@4.0.0`: prerelease versions no longer show up in ranges; `^0.x.y` + behaves the way it did in `semver@2` rather than `semver@3`; docs have been + reorganized for comprehensibility ([@isaacs](https://github.com/isaacs)) +* [`c6ddb64`](https://github.com/npm/npm/commit/c6ddb6462fe32bf3a27b2c4a62a032a92e982429) + npm now assumes that node is newer than 0.6 + ([@isaacs](https://github.com/isaacs)) + +Other changes: + +* [`ea515c3`](https://github.com/npm/npm/commit/ea515c3b858bf493a7b87fa4cdc2110a0d9cef7f) + [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all + callbacks have finished before proceeding + ([@othiym23](https://github.com/othiym23)) +* [`0b0a59d`](https://github.com/npm/npm/commit/0b0a59d504f20f424294b1590ace73a7464f0378) + [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just + before the CLI exits ([@isaacs](https://github.com/isaacs)) +* [`a11c88b`](https://github.com/npm/npm/commit/a11c88bdb1488b87d8dcac69df9a55a7a91184b6) + [#6175](https://github.com/npm/npm/issues/6175) pack scoped packages + correctly ([@othiym23](https://github.com/othiym23)) +* [`e4e48e0`](https://github.com/npm/npm/commit/e4e48e037d4e95fdb6acec80b04c5c6eaee59970) + [#6121](https://github.com/npm/npm/issues/6121) `read-installed@3.1.2`: don't + mark linked dev dependencies as extraneous + ([@isaacs](https://github.com/isaacs)) +* [`d673e41`](https://github.com/npm/npm/commit/d673e4185d43362c2b2a91acbca8c057e7303c7b) + `cmd-shim@2.0.1`: depend on `graceful-fs` directly + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`9d54d45`](https://github.com/npm/npm/commit/9d54d45e602d595bdab7eae09b9fa1dc46370147) + `npm-registry-couchapp@2.5.3`: make tests more reliable on Travis + ([@iarna](https://github.com/iarna)) +* [`673d738`](https://github.com/npm/npm/commit/673d738c6142c3d043dcee0b7aa02c9831a2e0ca) + ensure permissions are set correctly in cache when running as root + ([@isaacs](https://github.com/isaacs)) +* [`6e6a5fb`](https://github.com/npm/npm/commit/6e6a5fb74af10fd345411df4e121e554e2e3f33e) + prepare for upgrade to `node-semver@4.0.0` + ([@isaacs](https://github.com/isaacs)) +* [`ab8dd87`](https://github.com/npm/npm/commit/ab8dd87b943262f5996744e8d4cc30cc9358b7d7) + swap out `ronn` for `marked-man@0.1.3` ([@isaacs](https://github.com/isaacs)) +* [`803da54`](https://github.com/npm/npm/commit/803da5404d5a0b7c9defa3fe7fa0f2d16a2b19d3) + `npm-registry-client@3.2.0`: prepare for `node-semver@4.0.0` and include more + error information ([@isaacs](https://github.com/isaacs)) +* [`4af0e71`](https://github.com/npm/npm/commit/4af0e7134f5757c3d456d83e8349224a4ba12660) + make default error display less scary ([@isaacs](https://github.com/isaacs)) +* [`4fd9e79`](https://github.com/npm/npm/commit/4fd9e7901a15abff7a3dd478d99ce239b9580bca) + `npm-registry-client@3.2.1`: handle errors returned by the registry much, + much better ([@othiym23](https://github.com/othiym23)) +* [`ca791e2`](https://github.com/npm/npm/commit/ca791e27e97e51c1dd491bff6622ac90b54c3e23) + restore a long (always?) missing pass for deduping + ([@othiym23](https://github.com/othiym23)) +* [`ca0ef0e`](https://github.com/npm/npm/commit/ca0ef0e99bbdeccf28d550d0296baa4cb5e7ece2) + correctly interpret relative paths for local dependencies + ([@othiym23](https://github.com/othiym23)) +* [`5eb8db2`](https://github.com/npm/npm/commit/5eb8db2c370eeb4cd34f6e8dc6a935e4ea325621) + `npm-package-arg@2.1.2`: support git+file:// URLs for local bare repos + ([@othiym23](https://github.com/othiym23)) +* [`860a185`](https://github.com/npm/npm/commit/860a185c43646aca84cb93d1c05e2266045c316b) + tweak docs to no longer advocate checking in `node_modules` + ([@hunterloftis](https://github.com/hunterloftis)) +* [`80e9033`](https://github.com/npm/npm/commit/80e9033c40e373775e35c674faa6c1948661782b) + add links to nodejs.org downloads to docs + ([@meetar](https://github.com/meetar)) + +### v1.4.28 (2014-09-12): + +* [`f4540b6`](https://github.com/npm/npm/commit/f4540b6537a87e653d7495a9ddcf72949fdd4d14) + [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just + before the CLI exits ([@isaacs](https://github.com/isaacs)) +* [`1eabfd5`](https://github.com/npm/npm/commit/1eabfd5c03f33c2bd28823714ff02059eeee3899) + [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all + callbacks have finished before proceeding + ([@othiym23](https://github.com/othiym23)) + +### v2.0.0-beta.3 (2014-09-04): + +* [`fa79413`](https://github.com/npm/npm/commit/fa794138bec8edb7b88639db25ee9c010d2f4c2b) + [#6119](https://github.com/npm/npm/issues/6119) fall back to registry installs + if package.json is missing in a local directory ([@iarna](https://github.com/iarna)) +* [`16073e2`](https://github.com/npm/npm/commit/16073e2d8ae035961c4c189b602d4aacc6d6b387) + `npm-package-arg@2.1.0`: support file URIs as local specs + ([@othiym23](https://github.com/othiym23)) +* [`9164acb`](https://github.com/npm/npm/commit/9164acbdee28956fa816ce5e473c559395ae4ec2) + `github-url-from-username-repo@1.0.2`: don't match strings that are already + URIs ([@othiym23](https://github.com/othiym23)) +* [`4067d6b`](https://github.com/npm/npm/commit/4067d6bf303a69be13f3af4b19cf4fee1b0d3e12) + [#5629](https://github.com/npm/npm/issues/5629) support saving of local packages + in `package.json` ([@dylang](https://github.com/dylang)) +* [`1b2ffdf`](https://github.com/npm/npm/commit/1b2ffdf359a8c897a78f91fc5a5d535c97aaec97) + [#6097](https://github.com/npm/npm/issues/6097) document scoped packages + ([@seldo](https://github.com/seldo)) +* [`0a67d53`](https://github.com/npm/npm/commit/0a67d536067c4808a594d81288d34c0f7e97e105) + [#6007](https://github.com/npm/npm/issues/6007) `request@2.42.0`: properly + set headers on proxy requests ([@isaacs](https://github.com/isaacs)) +* [`9bac6b8`](https://github.com/npm/npm/commit/9bac6b860b674d24251bb7b8ba412fdb26cbc836) + `npmconf@2.0.8`: disallow semver ranges in tag configuration + ([@isaacs](https://github.com/isaacs)) +* [`d2d4d7c`](https://github.com/npm/npm/commit/d2d4d7cd3c32f91a87ffa11fe464d524029011c3) + [#6082](https://github.com/npm/npm/issues/6082) don't allow tagging with a + semver range as the tag name ([@isaacs](https://github.com/isaacs)) + +### v1.4.27 (2014-09-04): + +* [`4cf3c8f`](https://github.com/npm/npm/commit/4cf3c8fd78c9e2693a5f899f50c28f4823c88e2e) + [#6007](https://github.com/npm/npm/issues/6007) request@2.42.0: properly set + headers on proxy requests ([@isaacs](https://github.com/isaacs)) +* [`403cb52`](https://github.com/npm/npm/commit/403cb526be1472bb7545fa8e62d4976382cdbbe5) + [#6055](https://github.com/npm/npm/issues/6055) npmconf@1.1.8: restore + case-insensitivity of environmental config + ([@iarna](https://github.com/iarna)) + +### v2.0.0-beta.2 (2014-08-29): + +SPECIAL LABOR DAY WEEKEND RELEASE PARTY WOOO + +* [`ed207e8`](https://github.com/npm/npm/commit/ed207e88019de3150037048df6267024566e1093) + `npm-registry-client@3.1.7`: Clean up auth logic and improve logging around + auth decisions. Also error on trying to change a user document without + writing to it. ([@othiym23](https://github.com/othiym23)) +* [`66c7423`](https://github.com/npm/npm/commit/66c7423b7fb07a326b83c83727879410d43c439f) + `npmconf@2.0.7`: support -C as an alias for --prefix + ([@isaacs](https://github.com/isaacs)) +* [`0dc6a07`](https://github.com/npm/npm/commit/0dc6a07c778071c94c2251429c7d107e88a45095) + [#6059](https://github.com/npm/npm/issues/6059) run commands in prefix, not + cwd ([@isaacs](https://github.com/isaacs)) +* [`65d2179`](https://github.com/npm/npm/commit/65d2179af96737eb9038eaa24a293a62184aaa13) + `github-url-from-username-repo@1.0.1`: part 3 handle slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`e8d75d0`](https://github.com/npm/npm/commit/e8d75d0d9f148ce2b3e8f7671fa281945bac363d) + [#6057](https://github.com/npm/npm/issues/6057) `read-installed@3.1.1`: + properly handle extraneous dev dependencies of required dependencies + ([@othiym23](https://github.com/othiym23)) +* [`0602f70`](https://github.com/npm/npm/commit/0602f708f070d524ad41573afd4c57171cab21ad) + [#6064](https://github.com/npm/npm/issues/6064) ls: do not show deps of + extraneous deps ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-beta.1 (2014-08-28): + +* [`78a1fc1`](https://github.com/npm/npm/commit/78a1fc12307a0cbdbc944775ed831b876ee65855) + `github-url-from-git@1.4.0`: add support for git+https and git+ssh + ([@stefanbuck](https://github.com/stefanbuck)) +* [`bf247ed`](https://github.com/npm/npm/commit/bf247edf5429c6b3ec4d4cb798fa0eb0a9c19fc1) + `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`4bbe682`](https://github.com/npm/npm/commit/4bbe682a6d4eabcd23f892932308c9f228bf4de3) + `cmd-shim@2.0.0`: upgrade to graceful-fs 3 + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`ae1d590`](https://github.com/npm/npm/commit/ae1d590bdfc2476a4ed446e760fea88686e3ae05) + `npm-package-arg@2.0.4`: accept slashes in branch names + ([@thealphanerd](https://github.com/thealphanerd)) +* [`b2f51ae`](https://github.com/npm/npm/commit/b2f51aecadf585711e145b6516f99e7c05f53614) + `semver@3.0.1`: semver.clean() is cleaner + ([@isaacs](https://github.com/isaacs)) +* [`1d041a8`](https://github.com/npm/npm/commit/1d041a8a5ebd5bf6cecafab2072d4ec07823adab) + `github-url-from-username-repo@1.0.0`: accept slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`02c85d5`](https://github.com/npm/npm/commit/02c85d592c4058e5d9eafb0be36b6743ae631998) + `async-some@1.0.1` ([@othiym23](https://github.com/othiym23)) +* [`5af493e`](https://github.com/npm/npm/commit/5af493efa8a463cd1acc4a9a394699e2c0793b9c) + ensure lifecycle spawn errors caught properly + ([@isaacs](https://github.com/isaacs)) +* [`60fe012`](https://github.com/npm/npm/commit/60fe012fac9570d6c72554cdf34a6fa95bf0f0a6) + `npmconf@2.0.6`: init.version defaults to 1.0.0 + ([@isaacs](https://github.com/isaacs)) +* [`b4c717b`](https://github.com/npm/npm/commit/b4c717bbf58fb6a0d64ad229036c79a184297ee2) + `npm-registry-client@3.1.4`: properly encode % in passwords + ([@isaacs](https://github.com/isaacs)) +* [`7b55f44`](https://github.com/npm/npm/commit/7b55f44420252baeb3f30da437d22956315c31c9) + doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) + +### v1.4.26 (2014-08-28): + +* [`eceea95`](https://github.com/npm/npm/commit/eceea95c804fa15b18e91c52c0beb08d42a3e77d) + `github-url-from-git@1.4.0`: add support for git+https and git+ssh + ([@stefanbuck](https://github.com/stefanbuck)) +* [`e561758`](https://github.com/npm/npm/commit/e5617587e7d7ab686192391ce55357dbc7fed0a3) + `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`0c4fab3`](https://github.com/npm/npm/commit/0c4fab372ee76eab01dda83b6749429a8564902e) + `cmd-shim@2.0.0`: upgrade to graceful-fs 3 + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`2d69e4d`](https://github.com/npm/npm/commit/2d69e4d95777671958b5e08d3b2f5844109d73e4) + `github-url-from-username-repo@1.0.0`: accept slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`81f9b2b`](https://github.com/npm/npm/commit/81f9b2bac9d34c223ea093281ba3c495f23f10d1) + ensure lifecycle spawn errors caught properly + ([@isaacs](https://github.com/isaacs)) +* [`bfaab8c`](https://github.com/npm/npm/commit/bfaab8c6e0942382a96b250634ded22454c36b5a) + `npm-registry-client@2.0.7`: properly encode % in passwords + ([@isaacs](https://github.com/isaacs)) +* [`91cfb58`](https://github.com/npm/npm/commit/91cfb58dda851377ec604782263519f01fd96ad8) + doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-beta.0 (2014-08-21): + +* [`685f8be`](https://github.com/npm/npm/commit/685f8be1f2770cc75fd0e519a8d7aac72735a270) + `npm-registry-client@3.1.3`: Print the notification header returned by the + registry, and make sure status codes are printed without gratuitous quotes + around them. ([@isaacs](https://github.com/isaacs) / + [@othiym23](https://github.com/othiym23)) +* [`a8cb676`](https://github.com/npm/npm/commit/a8cb676aef0561eaf04487d2719672b097392c85) + [#5900](https://github.com/npm/npm/issues/5900) remove `npm` from its own + `engines` field in `package.json`. None of us remember why it was there. + ([@timoxley](https://github.com/timoxley)) +* [`6c47201`](https://github.com/npm/npm/commit/6c47201a7d071e8bf091b36933daf4199cc98e80) + [#5752](https://github.com/npm/npm/issues/5752), + [#6013](https://github.com/npm/npm/issues/6013) save git URLs correctly in + `_resolved` fields ([@isaacs](https://github.com/isaacs)) +* [`e4e1223`](https://github.com/npm/npm/commit/e4e1223a91c37688ba3378e1fc9d5ae045654d00) + [#5936](https://github.com/npm/npm/issues/5936) document the use of tags in + `package.json` ([@KenanY](https://github.com/KenanY)) +* [`c92b8d4`](https://github.com/npm/npm/commit/c92b8d4db7bde2a501da5b7d612684de1d629a42) + [#6004](https://github.com/npm/npm/issues/6004) manually installed scoped + packages are tracked correctly ([@dead](https://github.com/dead)-horse) +* [`21ca0aa`](https://github.com/npm/npm/commit/21ca0aaacbcfe2b89b0a439d914da0cae62de550) + [#5945](https://github.com/npm/npm/issues/5945) link scoped packages + correctly ([@dead](https://github.com/dead)-horse) +* [`16bead7`](https://github.com/npm/npm/commit/16bead7f2c82aec35b83ff0ec04df051ba456764) + [#5958](https://github.com/npm/npm/issues/5958) ensure that file streams work + in all versions of node ([@dead](https://github.com/dead)-horse) +* [`dbf0cab`](https://github.com/npm/npm/commit/dbf0cab29d0db43ac95e4b5a1fbdea1e0af75f10) + you can now pass quoted args to `npm run-script` + ([@bcoe](https://github.com/bcoe)) +* [`0583874`](https://github.com/npm/npm/commit/05838743f01ccb8d2432b3858d66847002fb62df) + `tar@1.0.1`: Add test for removing an extract target immediately after + unpacking. + ([@isaacs](https://github.com/isaacs)) +* [`cdf3b04`](https://github.com/npm/npm/commit/cdf3b0428bc0b0183fb41dcde9e34e8f42c5e3a7) + `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, and + `retries` options. Part 2 of race condition leading to `ENOENT` + ([@isaacs](https://github.com/isaacs)) + errors. +* [`22d72a8`](https://github.com/npm/npm/commit/22d72a87a9e1a9ab56d9585397f63551887d9125) + `fstream@1.0.2`: Fix a double-finish call which can result in excess FS + operations after the `close` event. Part 1 of race condition leading to + `ENOENT` errors. + ([@isaacs](https://github.com/isaacs)) + +### v1.4.25 (2014-08-21): + +* [`64c0ec2`](https://github.com/npm/npm/commit/64c0ec241ef5d83761ca8de54acb3c41b079956e) + `npm-registry-client@2.0.6`: Print the notification header returned by the + registry, and make sure status codes are printed without gratuitous quotes + around them. + ([@othiym23](https://github.com/othiym23)) +* [`a8ed12b`](https://github.com/npm/npm/commit/a8ed12b) `tar@1.0.1`: + Add test for removing an extract target immediately after unpacking. + ([@isaacs](https://github.com/isaacs)) +* [`70fd11d`](https://github.com/npm/npm/commit/70fd11d) + `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, + and `retries` options. Part 2 of race condition leading to `ENOENT` + errors. + ([@isaacs](https://github.com/isaacs)) +* [`0072c4d`](https://github.com/npm/npm/commit/0072c4d) + `fstream@1.0.2`: Fix a double-finish call which can result in excess + FS operations after the `close` event. Part 2 of race condition + leading to `ENOENT` errors. + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha.7 (2014-08-14): + +* [`f23f1d8`](https://github.com/npm/npm/commit/f23f1d8e8f86ec1b7ab8dad68250bccaa67d61b1) + doc: update version doc to include `pre-*` increment args + ([@isaacs](https://github.com/isaacs)) +* [`b6bb746`](https://github.com/npm/npm/commit/b6bb7461824d4dc1c0936f46bd7929b5cd597986) + build: add 'make tag' to tag current release as latest + ([@isaacs](https://github.com/isaacs)) +* [`27c4bb6`](https://github.com/npm/npm/commit/27c4bb606e46e5eaf604b19fe8477bc6567f8b2e) + build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) +* [`cff66c3`](https://github.com/npm/npm/commit/cff66c3bf2850880058ebe2a26655dafd002495e) + build: add script to output `v1.4-next` publish tag + ([@isaacs](https://github.com/isaacs)) +* [`22abec8`](https://github.com/npm/npm/commit/22abec8833474879ac49b9604c103bc845dad779) + build: remove outdated `docpublish` make target + ([@isaacs](https://github.com/isaacs)) +* [`1be4de5`](https://github.com/npm/npm/commit/1be4de51c3976db8564f72b00d50384c921f0917) + build: remove `unpublish` step from `make publish` + ([@isaacs](https://github.com/isaacs)) +* [`e429e20`](https://github.com/npm/npm/commit/e429e2011f4d78e398f2461bca3e5a9a146fbd0c) + doc: add new changelog ([@othiym23](https://github.com/othiym23)) +* [`9243d20`](https://github.com/npm/npm/commit/9243d207896ea307082256604c10817f7c318d68) + lifecycle: test lifecycle path modification + ([@isaacs](https://github.com/isaacs)) +* [`021770b`](https://github.com/npm/npm/commit/021770b9cb07451509f0a44afff6c106311d8cf6) + lifecycle: BREAKING CHANGE do not add the directory containing node executable + ([@chulkilee](https://github.com/chulkilee)) +* [`1d5c41d`](https://github.com/npm/npm/commit/1d5c41dd0d757bce8b87f10c4135f04ece55aeb9) + install: rename .gitignore when unpacking foreign tarballs + ([@isaacs](https://github.com/isaacs)) +* [`9aac267`](https://github.com/npm/npm/commit/9aac2670a73423544d92b27cc301990a16a9563b) + cache: detect non-gzipped tar files more reliably + ([@isaacs](https://github.com/isaacs)) +* [`3f24755`](https://github.com/npm/npm/commit/3f24755c8fce3c7ab11ed1dc632cc40d7ef42f62) + `readdir-scoped-modules@1.0.0` ([@isaacs](https://github.com/isaacs)) +* [`151cd2f`](https://github.com/npm/npm/commit/151cd2ff87b8ac2fc9ea366bc9b7f766dc5b9684) + `read-installed@3.1.0` ([@isaacs](https://github.com/isaacs)) +* [`f5a9434`](https://github.com/npm/npm/commit/f5a94343a8ebe4a8cd987320b55137aef53fb3fd) + test: fix Travis timeouts ([@dylang](https://github.com/dylang)) +* [`126cafc`](https://github.com/npm/npm/commit/126cafcc6706814c88af3042f2ffff408747bff4) + `npm-registry-couchapp@2.5.0` ([@othiym23](https://github.com/othiym23)) + +### v1.4.24 (2014-08-14): + +* [`9344bd9`](https://github.com/npm/npm/commit/9344bd9b2929b5c399a0e0e0b34d45bce7bc24bb) + doc: add new changelog ([@othiym23](https://github.com/othiym23)) +* [`4be76fd`](https://github.com/npm/npm/commit/4be76fd65e895883c337a99f275ccc8c801adda3) + doc: update version doc to include `pre-*` increment args + ([@isaacs](https://github.com/isaacs)) +* [`e4f2620`](https://github.com/npm/npm/commit/e4f262036080a282ad60e236a9aeebd39fde9fe4) + build: add `make tag` to tag current release as `latest` + ([@isaacs](https://github.com/isaacs)) +* [`ec2596a`](https://github.com/npm/npm/commit/ec2596a7cb626772780b25b0a94a7e547a812bd5) + build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) +* [`9ee55f8`](https://github.com/npm/npm/commit/9ee55f892b8b473032a43c59912c5684fd1b39e6) + build: add script to output `v1.4-next` publish tag + ([@isaacs](https://github.com/isaacs)) +* [`aecb56f`](https://github.com/npm/npm/commit/aecb56f95a84687ea46920a0b98aaa587fee1568) + build: remove outdated `docpublish` make target + ([@isaacs](https://github.com/isaacs)) +* [`b57a9b7`](https://github.com/npm/npm/commit/b57a9b7ccd13e6b38831ed63595c8ea5763da247) + build: remove unpublish step from `make publish` + ([@isaacs](https://github.com/isaacs)) +* [`2c6acb9`](https://github.com/npm/npm/commit/2c6acb96c71c16106965d5cd829b67195dd673c7) + install: rename `.gitignore` when unpacking foreign tarballs + ([@isaacs](https://github.com/isaacs)) +* [`22f3681`](https://github.com/npm/npm/commit/22f3681923e993a47fc1769ba735bfa3dd138082) + cache: detect non-gzipped tar files more reliably + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha.6 (2014-08-07): + +BREAKING CHANGE: + +* [`ea547e2`](https://github.com/npm/npm/commit/ea547e2) Bump semver to + version 3: `^0.x.y` is now functionally the same as `=0.x.y`. + ([@isaacs](https://github.com/isaacs)) + +Other changes: + +* [`d987707`](https://github.com/npm/npm/commit/d987707) move fetch into + npm-registry-client ([@othiym23](https://github.com/othiym23)) +* [`9b318e2`](https://github.com/npm/npm/commit/9b318e2) `read-installed@3.0.0` + ([@isaacs](https://github.com/isaacs)) +* [`9d73de7`](https://github.com/npm/npm/commit/9d73de7) remove unnecessary + mkdirps ([@isaacs](https://github.com/isaacs)) +* [`33ccd13`](https://github.com/npm/npm/commit/33ccd13) Don't squash execute + perms in `_git-remotes/` dir ([@adammeadows](https://github.com/adammeadows)) +* [`48fd233`](https://github.com/npm/npm/commit/48fd233) `npm-package-arg@2.0.1` + ([@isaacs](https://github.com/isaacs)) + +### v1.4.23 (2014-07-31): + +* [`8dd11d1`](https://github.com/npm/npm/commit/8dd11d1) update several + dependencies to avoid using `semver`s starting with 0. + +### v1.4.22 (2014-07-31): + +* [`d9a9e84`](https://github.com/npm/npm/commit/d9a9e84) `read-package-json@1.2.4` + ([@isaacs](https://github.com/isaacs)) +* [`86f0340`](https://github.com/npm/npm/commit/86f0340) + `github-url-from-git@1.2.0` ([@isaacs](https://github.com/isaacs)) +* [`a94136a`](https://github.com/npm/npm/commit/a94136a) `fstream@0.1.29` + ([@isaacs](https://github.com/isaacs)) +* [`bb82d18`](https://github.com/npm/npm/commit/bb82d18) `glob@4.0.5` + ([@isaacs](https://github.com/isaacs)) +* [`5b6bcf4`](https://github.com/npm/npm/commit/5b6bcf4) `cmd-shim@1.1.2` + ([@isaacs](https://github.com/isaacs)) +* [`c2aa8b3`](https://github.com/npm/npm/commit/c2aa8b3) license: Cleaned up + legalese with actual lawyer ([@isaacs](https://github.com/isaacs)) +* [`63fe0ee`](https://github.com/npm/npm/commit/63fe0ee) `init-package-json@1.0.0` + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha-5 (2014-07-22): + +This release bumps up to 2.0 because of this breaking change, which could +potentially affect how your package's scripts are run: + +* [`df4b0e7`](https://github.com/npm/npm/commit/df4b0e7fc1abd9a54f98db75ec9e4d03d37d125b) + [#5518](https://github.com/npm/npm/issues/5518) BREAKING CHANGE: support + passing arguments to `run` scripts ([@bcoe](https://github.com/bcoe)) + +Other changes: + +* [`cd422c9`](https://github.com/npm/npm/commit/cd422c9de510766797c65720d70f085000f50543) + [#5748](https://github.com/npm/npm/issues/5748) link binaries for scoped + packages ([@othiym23](https://github.com/othiym23)) +* [`4c3c778`](https://github.com/npm/npm/commit/4c3c77839920e830991e0c229c3c6a855c914d67) + [#5758](https://github.com/npm/npm/issues/5758) `npm link` includes scope + when linking scoped package ([@fengmk2](https://github.com/fengmk2)) +* [`f9f58dd`](https://github.com/npm/npm/commit/f9f58dd0f5b715d4efa6619f13901916d8f99c47) + [#5707](https://github.com/npm/npm/issues/5707) document generic pre- / + post-commands ([@sudodoki](https://github.com/sudodoki)) +* [`ac7a480`](https://github.com/npm/npm/commit/ac7a4801d80361b41dce4a18f22bcdf75e396000) + [#5406](https://github.com/npm/npm/issues/5406) `npm cache` displays usage + when called without arguments + ([@michaelnisi](https://github.com/michaelnisi)) +* [`f4554e9`](https://github.com/npm/npm/commit/f4554e99d34f77a8a02884493748f7d49a9a9d8b) + Test fixes for Windows ([@isaacs](https://github.com/isaacs)) +* update dependencies ([@othiym23](https://github.com/othiym23)) + + +### v1.5.0-alpha-4 (2014-07-18): + +* fall back to `_auth` config as default auth when using default registry + ([@isaacs](https://github.com/isaacs)) +* support for 'init.version' for those who don't want to deal with semver 0.0.x + oddities ([@rvagg](https://github.com/rvagg)) +* [`be06213`](https://github.com/npm/npm/commit/be06213415f2d51a50d2c792b4cd0d3412a9a7b1) + remove residual support for `win` log level + ([@aterris](https://github.com/aterris)) + +### v1.5.0-alpha-3 (2014-07-17): + +* [`a3a85dd`](https://github.com/npm/npm/commit/a3a85dd004c9245a71ad2f0213bd1a9a90d64cd6) + `--save` scoped packages correctly ([@othiym23](https://github.com/othiym23)) +* [`18a3385`](https://github.com/npm/npm/commit/18a3385bcf8bfb8312239216afbffb7eec759150) + `npm-registry-client@3.0.2` ([@othiym23](https://github.com/othiym23)) +* [`375988b`](https://github.com/npm/npm/commit/375988b9bf5aa5170f06a790d624d31b1eb32c6d) + invalid package names are an early error for optional deps + ([@othiym23](https://github.com/othiym23)) +* consistently use `node-package-arg` instead of arbitrary package spec + splitting ([@othiym23](https://github.com/othiym23)) + +### v1.4.21 (2014-07-14): + +* [`88f51aa`](https://github.com/npm/npm/commit/88f51aa27eb9a958d1fa7ec50fee5cfdedd05110) + fix handling for 301s in `npm-registry-client@2.0.3` + ([@Raynos](https://github.com/Raynos)) + +### v1.5.0-alpha-2 (2014-07-01): + +* [`54cf625`](https://github.com/npm/npm/commit/54cf62534e3331e3f454e609e44f0b944e819283) + fix handling for 301s in `npm-registry-client@3.0.1` + ([@Raynos](https://github.com/Raynos)) +* [`e410861`](https://github.com/npm/npm/commit/e410861c69a3799c1874614cb5b87af8124ff98d) + don't crash if no username set on `whoami` + ([@isaacs](https://github.com/isaacs)) +* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) + respect `--json` for output ([@isaacs](https://github.com/isaacs)) +* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) + outdated: Don't show headings if there's nothing to output + ([@isaacs](https://github.com/isaacs)) +* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) + outdated: Default to `latest` rather than `*` for unspecified deps + ([@isaacs](https://github.com/isaacs)) + +### v1.4.20 (2014-07-02): + +* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) + respect `--json` for output ([@isaacs](https://github.com/isaacs)) +* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) + outdated: Don't show headings if there's nothing to output + ([@isaacs](https://github.com/isaacs)) +* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) + outdated: Default to `latest` rather than `*` for unspecified deps + ([@isaacs](https://github.com/isaacs)) + +### v1.5.0-alpha-1 (2014-07-01): + +* [`eef4884`](https://github.com/npm/npm/commit/eef4884d6487ee029813e60a5f9c54e67925d9fa) + use the correct piece of the spec for GitHub shortcuts + ([@othiym23](https://github.com/othiym23)) + +### v1.5.0-alpha-0 (2014-07-01): + +* [`7f55057`](https://github.com/npm/npm/commit/7f55057807cfdd9ceaf6331968e666424f48116c) + install scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) + ([@othiym23](https://github.com/othiym23)) +* [`0df7e16`](https://github.com/npm/npm/commit/0df7e16c0232d8f4d036ebf4ec3563215517caac) + publish scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) + ([@othiym23](https://github.com/othiym23)) +* [`0689ba2`](https://github.com/npm/npm/commit/0689ba249b92b4c6279a26804c96af6f92b3a501) + support (and save) --scope=@s config + ([@othiym23](https://github.com/othiym23)) +* [`f34878f`](https://github.com/npm/npm/commit/f34878fc4cee29901e4daf7bace94be01e25cad7) + scope credentials to registry ([@othiym23](https://github.com/othiym23)) +* [`0ac7ca2`](https://github.com/npm/npm/commit/0ac7ca233f7a69751fe4386af6c4daa3ee9fc0da) + capture and store bearer tokens when sent by registry + ([@othiym23](https://github.com/othiym23)) +* [`63c3277`](https://github.com/npm/npm/commit/63c3277f089b2c4417e922826bdc313ac854cad6) + only delete files that are created by npm + ([@othiym23](https://github.com/othiym23)) +* [`4f54043`](https://github.com/npm/npm/commit/4f540437091d1cbca3915cd20c2da83c2a88bb8e) + `npm-package-arg@2.0.0` ([@othiym23](https://github.com/othiym23)) +* [`9e1460e`](https://github.com/npm/npm/commit/9e1460e6ac9433019758481ec031358f4af4cd44) + `read-package-json@1.2.3` ([@othiym23](https://github.com/othiym23)) +* [`719d8ad`](https://github.com/npm/npm/commit/719d8adb9082401f905ff4207ede494661f8a554) + `fs-vacuum@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`9ef8fe4`](https://github.com/npm/npm/commit/9ef8fe4d6ead3acb3e88c712000e2d3a9480ebec) + `async-some@1.0.0` ([@othiym23](https://github.com/othiym23)) +* [`a964f65`](https://github.com/npm/npm/commit/a964f65ab662107b62a4ca58535ce817e8cca331) + `npmconf@2.0.1` ([@othiym23](https://github.com/othiym23)) +* [`113765b`](https://github.com/npm/npm/commit/113765bfb7d3801917c1d9f124b8b3d942bec89a) + `npm-registry-client@3.0.0` ([@othiym23](https://github.com/othiym23)) + +### v1.4.19 (2014-07-01): + +* [`f687433`](https://github.com/npm/npm/commit/f687433) relative URLS for + working non-root registry URLS ([@othiym23](https://github.com/othiym23)) +* [`bea190c`](https://github.com/npm/npm/commit/bea190c) + [#5591](https://github.com/npm/npm/issues/5591) bump nopt and npmconf + ([@isaacs](https://github.com/isaacs)) + +### v1.4.18 (2014-06-29): + +* Bump glob dependency from 4.0.2 to 4.0.3. It now uses graceful-fs when + available, increasing resilience to [various filesystem + errors](https://github.com/isaacs/node-graceful-fs#improvements-over-fs-module). + ([@isaacs](https://github.com/isaacs)) + +### v1.4.17 (2014-06-27): + +* replace escape codes with ansicolors + ([@othiym23](https://github.com/othiym23)) +* Allow to build all the docs OOTB. ([@GeJ](https://github.com/GeJ)) +* Use core.longpaths on win32 git - fixes + [#5525](https://github.com/npm/npm/issues/5525) ([@bmeck](https://github.com/bmeck)) +* `npmconf@1.1.2` ([@isaacs](https://github.com/isaacs)) +* Consolidate color sniffing in config/log loading process + ([@isaacs](https://github.com/isaacs)) +* add verbose log when project config file is ignored + ([@isaacs](https://github.com/isaacs)) +* npmconf: Float patch to remove 'scope' from config defs + ([@isaacs](https://github.com/isaacs)) +* doc: npm-explore can't handle a version + ([@robertkowalski](https://github.com/robertkowalski)) +* Add user-friendly errors for ENOSPC and EROFS. + ([@voodootikigod](https://github.com/voodootikigod)) +* bump tar and fstream deps ([@isaacs](https://github.com/isaacs)) +* Run the npm-registry-couchapp tests along with npm tests + ([@isaacs](https://github.com/isaacs)) + +### v1.2.8000 (2014-06-17): + +* Same as v1.4.16, but with the spinner disabled, and a version number that + starts with v1.2. + +### v1.4.16 (2014-06-17): + +* `npm-registry-client@2.0.2` ([@isaacs](https://github.com/isaacs)) +* `fstream@0.1.27` ([@isaacs](https://github.com/isaacs)) +* `sha@1.2.4` ([@isaacs](https://github.com/isaacs)) +* `rimraf@2.2.8` ([@isaacs](https://github.com/isaacs)) +* `npmlog@1.0.1` ([@isaacs](https://github.com/isaacs)) +* `npm-registry-client@2.0.1` ([@isaacs](https://github.com/isaacs)) +* removed redundant dependency ([@othiym23](https://github.com/othiym23)) +* `npmconf@1.0.5` ([@isaacs](https://github.com/isaacs)) +* Properly handle errors that can occur in the config-loading process + ([@isaacs](https://github.com/isaacs)) + +### v1.4.15 (2014-06-10): + +* cache: atomic de-race-ified package.json writing + ([@isaacs](https://github.com/isaacs)) +* `fstream@0.1.26` ([@isaacs](https://github.com/isaacs)) +* `graceful-fs@3.0.2` ([@isaacs](https://github.com/isaacs)) +* `osenv@0.1.0` ([@isaacs](https://github.com/isaacs)) +* Only spin the spinner when we're fetching stuff + ([@isaacs](https://github.com/isaacs)) +* Update `osenv@0.1.0` which removes ~/tmp as possible tmp-folder + ([@robertkowalski](https://github.com/robertkowalski)) +* `ini@1.2.1` ([@isaacs](https://github.com/isaacs)) +* `graceful-fs@3` ([@isaacs](https://github.com/isaacs)) +* Update glob and things depending on glob + ([@isaacs](https://github.com/isaacs)) +* github-url-from-username-repo and read-package-json updates + ([@isaacs](https://github.com/isaacs)) +* `editor@0.1.0` ([@isaacs](https://github.com/isaacs)) +* `columnify@1.1.0` ([@isaacs](https://github.com/isaacs)) +* bump ansi and associated deps ([@isaacs](https://github.com/isaacs)) + +### v1.4.14 (2014-06-05): + +* char-spinner: update to not bork windows + ([@isaacs](https://github.com/isaacs)) + +### v1.4.13 (2014-05-23): + +* Fix `npm install` on a tarball. + ([`ed3abf1`](https://github.com/npm/npm/commit/ed3abf1aa10000f0f687330e976d78d1955557f6), + [#5330](https://github.com/npm/npm/issues/5330), + [@othiym23](https://github.com/othiym23)) +* Fix an issue with the spinner on Node 0.8. + ([`9f00306`](https://github.com/npm/npm/commit/9f003067909440390198c0b8f92560d84da37762), + [@isaacs](https://github.com/isaacs)) +* Re-add `npm.commands.cache.clean` and `npm.commands.cache.read` APIs, and + document `npm.commands.cache.*` as npm-cache(3). + ([`e06799e`](https://github.com/npm/npm/commit/e06799e77e60c1fc51869619083a25e074d368b3), + [@isaacs](https://github.com/isaacs)) + +### v1.4.12 (2014-05-23): + +* remove normalize-package-data from top level, de-^-ify inflight dep + ([@isaacs](https://github.com/isaacs)) +* Always sort saved bundleDependencies ([@isaacs](https://github.com/isaacs)) +* add inflight to bundledDependencies + ([@othiym23](https://github.com/othiym23)) + +### v1.4.11 (2014-05-22): + +* fix `npm ls` labeling issue +* `node-gyp@0.13.1` +* default repository to https:// instead of git:// +* addLocalTarball: Remove extraneous unpack + ([@isaacs](https://github.com/isaacs)) +* Massive cache folder refactor ([@othiym23](https://github.com/othiym23) and + [@isaacs](https://github.com/isaacs)) +* Busy Spinner, no http noise ([@isaacs](https://github.com/isaacs)) +* Per-project .npmrc file support ([@isaacs](https://github.com/isaacs)) +* `npmconf@1.0.0`, Refactor config/uid/prefix loading process + ([@isaacs](https://github.com/isaacs)) +* Allow once-disallowed characters in passwords + ([@isaacs](https://github.com/isaacs)) +* Send npm version as 'version' header ([@isaacs](https://github.com/isaacs)) +* fix cygwin encoding issue (Karsten Tinnefeld) +* Allow non-github repositories with `npm repo` + ([@evanlucas](https://github.com/evanlucas)) +* Allow peer deps to be satisfied by grandparent +* Stop optional deps moving into deps on `update --save` + ([@timoxley](https://github.com/timoxley)) +* Ensure only matching deps update with `update --save*` + ([@timoxley](https://github.com/timoxley)) +* Add support for `prerelease`, `preminor`, `prepatch` to `npm version` + +### v1.4.10 (2014-05-05): + +* Don't set referer if already set +* fetch: Send referer and npm-session headers +* `run-script`: Support `--parseable` and `--json` +* list runnable scripts ([@evanlucas](https://github.com/evanlucas)) +* Use marked instead of ronn for html docs + +### v1.4.9 (2014-05-01): + +* Send referer header (with any potentially private stuff redacted) +* Fix critical typo bug in previous npm release + +### v1.4.8 (2014-05-01): + +* Check SHA before using files from cache +* adduser: allow change of the saved password +* Make `npm install` respect `config.unicode` +* Fix lifecycle to pass `Infinity` for config env value +* Don't return 0 exit code on invalid command +* cache: Handle 404s and other HTTP errors as errors +* Resolve ~ in path configs to env.HOME +* Include npm version in default user-agent conf +* npm init: Use ISC as default license, use save-prefix for deps +* Many test and doc fixes + +### v1.4.7 (2014-04-15): + +* Add `--save-prefix` option that can be used to override the default of `^` + when using `npm install --save` and its counterparts. + ([`64eefdf`](https://github.com/npm/npm/commit/64eefdfe26bb27db8dc90e3ab5d27a5ef18a4470), + [@thlorenz](https://github.com/thlorenz)) +* Allow `--silent` to silence the echoing of commands that occurs with `npm + run`. + ([`c95cf08`](https://github.com/npm/npm/commit/c95cf086e5b97dbb48ff95a72517b203a8f29eab), + [@Raynos](https://github.com/Raynos)) +* Some speed improvements to the cache, which should improve install times. + ([`cb94310`](https://github.com/npm/npm/commit/cb94310a6adb18cb7b881eacb8d67171eda8b744), + [`3b0870f`](https://github.com/npm/npm/commit/3b0870fb2f40358b3051abdab6be4319d196b99d), + [`120f5a9`](https://github.com/npm/npm/commit/120f5a93437bbbea9249801574a2f33e44e81c33), + [@isaacs](https://github.com/isaacs)) +* Improve ability to retry registry requests when a subset of the registry + servers are down. + ([`4a5257d`](https://github.com/npm/npm/commit/4a5257de3870ac3dafa39667379f19f6dcd6093e), + https://github.com/npm/npm-registry-client/commit/7686d02cb0b844626d6a401e58c0755ef3bc8432, + [@isaacs](https://github.com/isaacs)) +* Fix marking of peer dependencies as extraneous. + ([`779b164`](https://github.com/npm/npm/commit/779b1649764607b062c031c7e5c972151b4a1754), + https://github.com/npm/read-installed/commit/6680ba6ef235b1ca3273a00b70869798ad662ddc, + [@isaacs](https://github.com/isaacs)) +* Fix npm crashing when doing `npm shrinkwrap` in the presence of a + `package.json` with no dependencies. + ([`a9d9fa5`](https://github.com/npm/npm/commit/a9d9fa5ad3b8c925a589422b7be28d2735f320b0), + [@kislyuk](https://github.com/kislyuk)) +* Fix error when using `npm view` on packages that have no versions or have + been unpublished. + ([`94df2f5`](https://github.com/npm/npm/commit/94df2f56d684b35d1df043660180fc321b743dc8), + [@juliangruber](https://github.com/juliangruber); + [`2241a09`](https://github.com/npm/npm/commit/2241a09c843669c70633c399ce698cec3add40b3), + [@isaacs](https://github.com/isaacs)) + +### v1.4.6 (2014-03-19): + +* Fix extraneous package detection to work in more cases. + ([`f671286`](https://github.com/npm/npm/commit/f671286), npm/read-installed#20, + [@LaurentVB](https://github.com/LaurentVB)) + +### v1.4.5 (2014-03-18): + +* Sort dependencies in `package.json` when doing `npm install --save` and all + its variants. + ([`6fd6ff7`](https://github.com/npm/npm/commit/6fd6ff7e536ea6acd33037b1878d4eca1f931985), + [@domenic](https://github.com/domenic)) +* Add `--save-exact` option, usable alongside `--save` and its variants, which + will write the exact version number into `package.json` instead of the + appropriate semver-compatibility range. + ([`17f07df`](https://github.com/npm/npm/commit/17f07df8ad8e594304c2445bf7489cb53346f2c5), + [@timoxley](https://github.com/timoxley)) +* Accept gzipped content from the registry to speed up downloads and save + bandwidth. + ([`a3762de`](https://github.com/npm/npm/commit/a3762de843b842be8fa0ab57cdcd6b164f145942), + npm/npm-registry-client#40, [@fengmk2](https://github.com/fengmk2)) +* Fix `npm ls`'s `--depth` and `--log` options. + ([`1d29b17`](https://github.com/npm/npm/commit/1d29b17f5193d52a5c4faa412a95313dcf41ed91), + npm/read-installed#13, [@zertosh](https://github.com/zertosh)) +* Fix "Adding a cache directory to the cache will make the world implode" in + certain cases. + ([`9a4b2c4`](https://github.com/npm/npm/commit/9a4b2c4667c2b1e0054e3d5611ab86acb1760834), + domenic/path-is-inside#1, [@pmarques](https://github.com/pmarques)) +* Fix readmes not being uploaded in certain rare cases. + ([`527b72c`](https://github.com/npm/npm/commit/527b72cca6c55762b51e592c48a9f28cc7e2ff8b), + [@isaacs](https://github.com/isaacs)) + +### v1.4.4 (2014-02-20): + +* Add `npm t` as an alias for `npm test` (which is itself an alias for `npm run + test`, or even `npm run-script test`). We like making running your tests + easy. ([`14e650b`](https://github.com/npm/npm/commit/14e650bce0bfebba10094c961ac104a61417a5de), [@isaacs](https://github.com/isaacs)) + +### v1.4.3 (2014-02-16): + +* Add back `npm prune --production`, which was removed in 1.3.24. + ([`acc4d02`](https://github.com/npm/npm/commit/acc4d023c57d07704b20a0955e4bf10ee91bdc83), + [@davglass](https://github.com/davglass)) +* Default `npm install --save` and its counterparts to use the `^` version + specifier, instead of `~`. + ([`0a3151c`](https://github.com/npm/npm/commit/0a3151c9cbeb50c1c65895685c2eabdc7e2608dc), + [@mikolalysenko](https://github.com/mikolalysenko)) +* Make `npm shrinkwrap` output dependencies in a sorted order, so that diffs + between shrinkwrap files should be saner now. + ([`059b2bf`](https://github.com/npm/npm/commit/059b2bfd06ae775205a37257dca80142596a0113), + [@Raynos](https://github.com/Raynos)) +* Fix `npm dedupe` not correctly respecting dependency constraints. + ([`86028e9`](https://github.com/npm/npm/commit/86028e9fd8524d5e520ce01ba2ebab5a030103fc), + [@rafeca](https://github.com/rafeca)) +* Fix `npm ls` giving spurious warnings when you used `"latest"` as a version + specifier. + (https://github.com/npm/read-installed/commit/d2956400e0386931c926e0f30c334840e0938f14, + [@bajtos](https://github.com/bajtos)) +* Fixed a bug where using `npm link` on packages without a `name` value could + cause npm to delete itself. + ([`401a642`](https://github.com/npm/npm/commit/401a64286aa6665a94d1d2f13604f7014c5fce87), + [@isaacs](https://github.com/isaacs)) +* Fixed `npm install ./pkg@1.2.3` to actually install the directory at + `pkg@1.2.3`; before it would try to find version `1.2.3` of the package + `./pkg` in the npm registry. + ([`46d8768`](https://github.com/npm/npm/commit/46d876821d1dd94c050d5ebc86444bed12c56739), + [@rlidwka](https://github.com/rlidwka); see also + [`f851b79`](https://github.com/npm/npm/commit/f851b79a71d9a5f5125aa85877c94faaf91bea5f)) +* Fix `npm outdated` to respect the `color` configuration option. + ([`d4f6f3f`](https://github.com/npm/npm/commit/d4f6f3ff83bd14fb60d3ac6392cb8eb6b1c55ce1), + [@timoxley](https://github.com/timoxley)) +* Fix `npm outdated --parseable`. + ([`9575a23`](https://github.com/npm/npm/commit/9575a23f955ce3e75b509c89504ef0bd707c8cf6), + [@yhpark](https://github.com/yhpark)) +* Fix a lockfile-related errors when using certain Git URLs. + ([`164b97e`](https://github.com/npm/npm/commit/164b97e6089f64e686db7a9a24016f245effc37f), + [@nigelzor](https://github.com/nigelzor)) + +### v1.4.2 (2014-02-13): + +* Fixed an issue related to mid-publish GET requests made against the registry. + (https://github.com/npm/npm-registry-client/commit/acbec48372bc1816c67c9e7cbf814cf50437ff93, + [@isaacs](https://github.com/isaacs)) + +### v1.4.1 (2014-02-13): + +* Fix `npm shrinkwrap` forgetting to shrinkwrap dependencies that were also + development dependencies. + ([`9c575c5`](https://github.com/npm/npm/commit/9c575c56efa9b0c8b0d4a17cb9c1de3833004bcd), + [@diwu1989](https://github.com/diwu1989)) +* Fixed publishing of pre-existing packages with uppercase characters in their + name. + (https://github.com/npm/npm-registry-client/commit/9345d3b6c3d8510dd5c4418f27ee1fce59acebad, + [@isaacs](https://github.com/isaacs)) + +### v1.4.0 (2014-02-12): + +* Remove `npm publish --force`. See + https://github.com/npm/npmjs.org/issues/148. + ([@isaacs](https://github.com/isaacs), + npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) +* Other changes to the registry client related to saved configs and couch + logins. ([@isaacs](https://github.com/isaacs); + npm/npm-registry-client@25e2b019a1588155e5f87d035c27e79963b75951, + npm/npm-registry-client@9e41e9101b68036e0f078398785f618575f3cdde, + npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) +* Show an error to the user when doing `npm update` and the `package.json` + specifies a version that does not exist. + ([@evanlucas](https://github.com/evanlucas), + [`027a33a`](https://github.com/npm/npm/commit/027a33a5c594124cc1d82ddec5aee2c18bc8dc32)) +* Fix some issues with cache ownership in certain installation configurations. + ([@outcoldman](https://github.com/outcoldman), + [`a132690`](https://github.com/npm/npm/commit/a132690a2876cda5dcd1e4ca751f21dfcb11cb9e)) +* Fix issues where GitHub shorthand dependencies `user/repo` were not always + treated the same as full Git URLs. + ([@robertkowalski](https://github.com/robertkowalski), + https://github.com/meryn/normalize-package-data/commit/005d0b637aec1895117fcb4e3b49185eebf9e240) + +### v1.3.26 (2014-02-02): + +* Fixes and updates to publishing code + ([`735427a`](https://github.com/npm/npm/commit/735427a69ba4fe92aafa2d88f202aaa42920a9e2) + and + [`c0ac832`](https://github.com/npm/npm/commit/c0ac83224d49aa62e55577f8f27d53bbfd640dc5), + [@isaacs](https://github.com/isaacs)) +* Fix `npm bugs` with no arguments. + ([`b99d465`](https://github.com/npm/npm/commit/b99d465221ac03bca30976cbf4d62ca80ab34091), + [@Hoops](https://github.com/Hoops)) + +### v1.3.25 (2014-01-25): + +* Remove gubblebum blocky font from documentation headers. + ([`6940c9a`](https://github.com/npm/npm/commit/6940c9a100160056dc6be8f54a7ad7fa8ceda7e2), + [@isaacs](https://github.com/isaacs)) + +### v1.3.24 (2014-01-19): + +* Make the search output prettier, with nice truncated columns, and a `--long` + option to create wrapping columns. + ([`20439b2`](https://github.com/npm/npm/commit/20439b2) and + [`3a6942d`](https://github.com/npm/npm/commit/3a6942d), + [@timoxley](https://github.com/timoxley)) +* Support multiple packagenames in `npm docs`. + ([`823010b`](https://github.com/npm/npm/commit/823010b), + [@timoxley](https://github.com/timoxley)) +* Fix the `npm adduser` bug regarding "Error: default value must be string or + number" again. ([`b9b4248`](https://github.com/npm/npm/commit/b9b4248), + [@isaacs](https://github.com/isaacs)) +* Fix `scripts` entries containing whitespaces on Windows. + ([`80282ed`](https://github.com/npm/npm/commit/80282ed), + [@robertkowalski](https://github.com/robertkowalski)) +* Fix `npm update` for Git URLs that have credentials in them + ([`93fc364`](https://github.com/npm/npm/commit/93fc364), + [@danielsantiago](https://github.com/danielsantiago)) +* Fix `npm install` overwriting `npm link`-ed dependencies when they are tagged + Git dependencies. ([`af9bbd9`](https://github.com/npm/npm/commit/af9bbd9), + [@evanlucas](https://github.com/evanlucas)) +* Remove `npm prune --production` since it buggily removed some dependencies + that were necessary for production; see + [#4509](https://github.com/npm/npm/issues/4509). Hopefully it can make its + triumphant return, one day. + ([`1101b6a`](https://github.com/npm/npm/commit/1101b6a), + [@isaacs](https://github.com/isaacs)) + +Dependency updates: +* [`909cccf`](https://github.com/npm/npm/commit/909cccf) `read-package-json@1.1.6` +* [`a3891b6`](https://github.com/npm/npm/commit/a3891b6) `rimraf@2.2.6` +* [`ac6efbc`](https://github.com/npm/npm/commit/ac6efbc) `sha@1.2.3` +* [`dd30038`](https://github.com/npm/npm/commit/dd30038) `node-gyp@0.12.2` +* [`c8c3ebe`](https://github.com/npm/npm/commit/c8c3ebe) `npm-registry-client@0.3.3` +* [`4315286`](https://github.com/npm/npm/commit/4315286) `npmconf@0.1.12` + +### v1.3.23 (2014-01-03): + +* Properly handle installations that contained a certain class of circular + dependencies. + ([`5dc93e8`](https://github.com/npm/npm/commit/5dc93e8c82604c45b6067b1acf1c768e0bfce754), + [@substack](https://github.com/substack)) + +### v1.3.22 (2013-12-25): + +* Fix a critical bug in `npm adduser` that would manifest in the error message + "Error: default value must be string or number." + ([`fba4bd2`](https://github.com/npm/npm/commit/fba4bd24bc2ab00ccfeda2043aa53af7d75ef7ce), + [@isaacs](https://github.com/isaacs)) +* Allow `npm bugs` in the current directory to open the current package's bugs + URL. + ([`d04cf64`](https://github.com/npm/npm/commit/d04cf6483932c693452f3f778c2fa90f6153a4af), + [@evanlucas](https://github.com/evanlucas)) +* Several fixes to various error messages to include more useful or updated + information. + ([`1e6f2a7`](https://github.com/npm/npm/commit/1e6f2a72ca058335f9f5e7ca22d01e1a8bb0f9f7), + [`ff46366`](https://github.com/npm/npm/commit/ff46366bd40ff0ef33c7bac8400bc912c56201d1), + [`8b4bb48`](https://github.com/npm/npm/commit/8b4bb4815d80a3612186dc5549d698e7b988eb03); + [@rlidwka](https://github.com/rlidwka), + [@evanlucas](https://github.com/evanlucas)) + +### v1.3.21 (2013-12-17): + +* Fix a critical bug that prevented publishing due to incorrect hash + calculation. + ([`4ca4a2c`](https://github.com/npm/npm-registry-client/commit/4ca4a2c6333144299428be6b572e2691aa59852e), + [@dominictarr](https://github.com/dominictarr)) + +### v1.3.20 (2013-12-17): + +* Fixes a critical bug in v1.3.19. Thankfully, due to that bug, no one could + install npm v1.3.19 :) + +### v1.3.19 (2013-12-16): + +* Adds atomic PUTs for publishing packages, which should result in far fewer + requests and less room for replication errors on the server-side. + +### v1.3.18 (2013-12-16): + +* Added an `--ignore-scripts` option, which will prevent `package.json` scripts + from being run. Most notably, this will work on `npm install`, so e.g. `npm + install --ignore-scripts` will not run preinstall and prepublish scripts. + ([`d7e67bf`](https://github.com/npm/npm/commit/d7e67bf0d94b085652ec1c87d595afa6f650a8f6), + [@sqs](https://github.com/sqs)) +* Fixed a bug introduced in 1.3.16 that would manifest with certain cache + configurations, by causing spurious errors saying "Adding a cache directory + to the cache will make the world implode." + ([`966373f`](https://github.com/npm/npm/commit/966373fad8d741637f9744882bde9f6e94000865), + [@domenic](https://github.com/domenic)) +* Re-fixed the multiple download of URL dependencies, whose fix was reverted in + 1.3.17. + ([`a362c3f`](https://github.com/npm/npm/commit/a362c3f1919987419ed8a37c8defa19d2e6697b0), + [@spmason](https://github.com/spmason)) + +### v1.3.17 (2013-12-11): + +* This release reverts + [`644c2ff`](https://github.com/npm/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), + which avoided re-downloading URL and shinkwrap dependencies when doing `npm + install`. You can see the in-depth reasoning in + [`d8c907e`](https://github.com/npm/npm/commit/d8c907edc2019b75cff0f53467e34e0ffd7e5fba); + the problem was, that the patch changed the behavior of `npm install -f` to + reinstall all dependencies. +* A new version of the no-re-downloading fix has been submitted as + [#4303](https://github.com/npm/npm/issues/4303) and will hopefully be + included in the next release. + +### v1.3.16 (2013-12-11): + +* Git URL dependencies are now updated on `npm install`, fixing a two-year old + bug + ([`5829ecf`](https://github.com/npm/npm/commit/5829ecf032b392d2133bd351f53d3c644961396b), + [@robertkowalski](https://github.com/robertkowalski)). Additional progress on + reducing the resulting Git-related I/O is tracked as + [#4191](https://github.com/npm/npm/issues/4191), but for now, this will be a + big improvement. +* Added a `--json` mode to `npm outdated` to give a parseable output. + ([`0b6c9b7`](https://github.com/npm/npm/commit/0b6c9b7c8c5579f4d7d37a0c24d9b7a12ccbe5fe), + [@yyx990803](https://github.com/yyx990803)) +* Made `npm outdated` much prettier and more useful. It now outputs a + color-coded and easy-to-read table. + ([`fd3017f`](https://github.com/npm/npm/commit/fd3017fc3e9d42acf6394a5285122edb4dc16106), + [@quimcalpe](https://github.com/quimcalpe)) +* Added the `--depth` option to `npm outdated`, so that e.g. you can do `npm + outdated --depth=0` to show only top-level outdated dependencies. + ([`1d184ef`](https://github.com/npm/npm/commit/1d184ef3f4b4bc309d38e9128732e3e6fb46d49c), + [@yyx990803](https://github.com/yyx990803)) +* Added a `--no-git-tag-version` option to `npm version`, for doing the usual + job of `npm version` minus the Git tagging. This could be useful if you need + to increase the version in other related files before actually adding the + tag. + ([`59ca984`](https://github.com/npm/npm/commit/59ca9841ba4f4b2f11b8e72533f385c77ae9f8bd), + [@evanlucas](https://github.com/evanlucas)) +* Made `npm repo` and `npm docs` work without any arguments, adding them to the + list of npm commands that work on the package in the current directory when + invoked without arguments. + ([`bf9048e`](https://github.com/npm/npm/commit/bf9048e2fa16d43fbc4b328d162b0a194ca484e8), + [@robertkowalski](https://github.com/robertkowalski); + [`07600d0`](https://github.com/npm/npm/commit/07600d006c652507cb04ac0dae9780e35073dd67), + [@wilmoore](https://github.com/wilmoore)). There are a few other commands we + still want to implement this for; see + [#4204](https://github.com/npm/npm/issues/4204). +* Pass through the `GIT_SSL_NO_VERIFY` environment variable to Git, if it is + set; we currently do this with a few other environment variables, but we + missed that one. + ([`c625de9`](https://github.com/npm/npm/commit/c625de91770df24c189c77d2e4bc821f2265efa8), + [@arikon](https://github.com/arikon)) +* Fixed `npm dedupe` on Windows due to incorrect path separators being used + ([`7677de4`](https://github.com/npm/npm/commit/7677de4583100bc39407093ecc6bc13715bf8161), + [@mcolyer](https://github.com/mcolyer)). +* Fixed the `npm help` command when multiple words were searched for; it + previously gave a `ReferenceError`. + ([`6a28dd1`](https://github.com/npm/npm/commit/6a28dd147c6957a93db12b1081c6e0da44fe5e3c), + [@dereckson](https://github.com/dereckson)) +* Stopped re-downloading URL and shrinkwrap dependencies, as demonstrated in + [#3463](https://github.com/npm/npm/issues/3463) + ([`644c2ff`](https://github.com/isaacs/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), + [@spmason](https://github.com/spmason)). You can use the `--force` option to + force re-download and installation of all dependencies. diff --git a/bin/nodejs4.6.0/node_modules/npm/CONTRIBUTING.md b/bin/nodejs4.6.0/node_modules/npm/CONTRIBUTING.md new file mode 100644 index 00000000..65a91001 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/CONTRIBUTING.md @@ -0,0 +1,12 @@ +## Before you submit a new issue + +* Check if there's a simple solution in the + [Troubleshooting](https://github.com/npm/npm/wiki/Troubleshooting) + wiki. +* [Search for similar + issues](https://github.com/npm/npm/search?q=Similar%20issues&type=Issues). +* Ensure your new issue conforms to the [Contributing + Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines). + +Participation in this open source project is subject to the [npm Code +of Conduct](http://www.npmjs.com/policies/conduct). diff --git a/bin/nodejs4.6.0/node_modules/npm/LICENSE b/bin/nodejs4.6.0/node_modules/npm/LICENSE new file mode 100644 index 00000000..072a301d --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/LICENSE @@ -0,0 +1,281 @@ +The npm application +Copyright (c) npm, Inc. and Contributors +Licensed on the terms of The Artistic License 2.0 + +Node package dependencies of the npm application +Copyright (c) their respective copyright owners +Licensed on their respective license terms + +The npm public registry at https://registry.npmjs.org +and the npm website at https://www.npmjs.com +Operated by npm, Inc. +Use governed by terms published on https://www.npmjs.com + +"Node.js" +Trademark Joyent, Inc., https://joyent.com +Neither npm nor npm, Inc. are affiliated with Joyent, Inc. + +The Node.js application +Project of Node Foundation, https://nodejs.org + +The npm Logo +Copyright (c) Mathias Pettersson and Brian Hammond + +"Gubblebum Blocky" typeface +Copyright (c) Tjarda Koster, https://jelloween.deviantart.com +Used with permission + + +-------- + + +The Artistic License 2.0 + +Copyright (c) 2000-2006, The Perl Foundation. + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +This license establishes the terms under which a given free software +Package may be copied, modified, distributed, and/or redistributed. +The intent is that the Copyright Holder maintains some artistic +control over the development of that Package while still keeping the +Package available as open source and free software. + +You are always permitted to make arrangements wholly outside of this +license directly with the Copyright Holder of a given Package. If the +terms of this license do not permit the full use that you propose to +make of the Package, you should contact the Copyright Holder and seek +a different licensing arrangement. + +Definitions + + "Copyright Holder" means the individual(s) or organization(s) + named in the copyright notice for the entire Package. + + "Contributor" means any party that has contributed code or other + material to the Package, in accordance with the Copyright Holder's + procedures. + + "You" and "your" means any person who would like to copy, + distribute, or modify the Package. + + "Package" means the collection of files distributed by the + Copyright Holder, and derivatives of that collection and/or of + those files. A given Package may consist of either the Standard + Version, or a Modified Version. + + "Distribute" means providing a copy of the Package or making it + accessible to anyone else, or in the case of a company or + organization, to others outside of your company or organization. + + "Distributor Fee" means any fee that you charge for Distributing + this Package or providing support for this Package to another + party. It does not mean licensing fees. + + "Standard Version" refers to the Package if it has not been + modified, or has been modified only in ways explicitly requested + by the Copyright Holder. + + "Modified Version" means the Package, if it has been changed, and + such changes were not explicitly requested by the Copyright + Holder. + + "Original License" means this Artistic License as Distributed with + the Standard Version of the Package, in its current version or as + it may be modified by The Perl Foundation in the future. + + "Source" form means the source code, documentation source, and + configuration files for the Package. + + "Compiled" form means the compiled bytecode, object code, binary, + or any other form resulting from mechanical transformation or + translation of the Source form. + + +Permission for Use and Modification Without Distribution + +(1) You are permitted to use the Standard Version and create and use +Modified Versions for any purpose without restriction, provided that +you do not Distribute the Modified Version. + + +Permissions for Redistribution of the Standard Version + +(2) You may Distribute verbatim copies of the Source form of the +Standard Version of this Package in any medium without restriction, +either gratis or for a Distributor Fee, provided that you duplicate +all of the original copyright notices and associated disclaimers. At +your discretion, such verbatim copies may or may not include a +Compiled form of the Package. + +(3) You may apply any bug fixes, portability changes, and other +modifications made available from the Copyright Holder. The resulting +Package will still be considered the Standard Version, and as such +will be subject to the Original License. + + +Distribution of Modified Versions of the Package as Source + +(4) You may Distribute your Modified Version as Source (either gratis +or for a Distributor Fee, and with or without a Compiled form of the +Modified Version) provided that you clearly document how it differs +from the Standard Version, including, but not limited to, documenting +any non-standard features, executables, or modules, and provided that +you do at least ONE of the following: + + (a) make the Modified Version available to the Copyright Holder + of the Standard Version, under the Original License, so that the + Copyright Holder may include your modifications in the Standard + Version. + + (b) ensure that installation of your Modified Version does not + prevent the user installing or running the Standard Version. In + addition, the Modified Version must bear a name that is different + from the name of the Standard Version. + + (c) allow anyone who receives a copy of the Modified Version to + make the Source form of the Modified Version available to others + under + + (i) the Original License or + + (ii) a license that permits the licensee to freely copy, + modify and redistribute the Modified Version using the same + licensing terms that apply to the copy that the licensee + received, and requires that the Source form of the Modified + Version, and of any works derived from it, be made freely + available in that license fees are prohibited but Distributor + Fees are allowed. + + +Distribution of Compiled Forms of the Standard Version +or Modified Versions without the Source + +(5) You may Distribute Compiled forms of the Standard Version without +the Source, provided that you include complete instructions on how to +get the Source of the Standard Version. Such instructions must be +valid at the time of your distribution. If these instructions, at any +time while you are carrying out such distribution, become invalid, you +must provide new instructions on demand or cease further distribution. +If you provide valid instructions or cease distribution within thirty +days after you become aware that the instructions are invalid, then +you do not forfeit any of your rights under this license. + +(6) You may Distribute a Modified Version in Compiled form without +the Source, provided that you comply with Section 4 with respect to +the Source of the Modified Version. + + +Aggregating or Linking the Package + +(7) You may aggregate the Package (either the Standard Version or +Modified Version) with other packages and Distribute the resulting +aggregation provided that you do not charge a licensing fee for the +Package. Distributor Fees are permitted, and licensing fees for other +components in the aggregation are permitted. The terms of this license +apply to the use and Distribution of the Standard or Modified Versions +as included in the aggregation. + +(8) You are permitted to link Modified and Standard Versions with +other works, to embed the Package in a larger work of your own, or to +build stand-alone binary or bytecode versions of applications that +include the Package, and Distribute the result without restriction, +provided the result does not expose a direct interface to the Package. + + +Items That are Not Considered Part of a Modified Version + +(9) Works (including, but not limited to, modules and scripts) that +merely extend or make use of the Package, do not, by themselves, cause +the Package to be a Modified Version. In addition, such works are not +considered parts of the Package itself, and are not subject to the +terms of this license. + + +General Provisions + +(10) Any use, modification, and distribution of the Standard or +Modified Versions is governed by this Artistic License. By using, +modifying or distributing the Package, you accept this license. Do not +use, modify, or distribute the Package, if you do not accept this +license. + +(11) If your Modified Version has been derived from a Modified +Version made by someone other than you, you are nevertheless required +to ensure that your Modified Version complies with the requirements of +this license. + +(12) This license does not grant you the right to use any trademark, +service mark, tradename, or logo of the Copyright Holder. + +(13) This license includes the non-exclusive, worldwide, +free-of-charge patent license to make, have made, use, offer to sell, +sell, import and otherwise transfer the Package with respect to any +patent claims licensable by the Copyright Holder that are necessarily +infringed by the Package. If you institute patent litigation +(including a cross-claim or counterclaim) against any party alleging +that the Package constitutes direct or contributory patent +infringement, then this Artistic License to you shall terminate on the +date that such litigation is filed. + +(14) Disclaimer of Warranty: +THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS +IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL +LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------- + + +The following additional terms shall apply to use of the npm software, the npm +website, the npm repository and any other services or products offered by npm, +Inc.: + +"Node.js" trademark Joyent, Inc. npm is not officially part of the Node.js +project, and is neither owned by nor affiliated with Joyent, Inc. + +"npm" and "The npm Registry" are owned by npm, Inc. All rights reserved. + +Modules published on the npm registry are not officially endorsed by npm, Inc. +or the Node.js project. + +Data published to the npm registry is not part of npm itself, and is the sole +property of the publisher. While every effort is made to ensure accountability, +there is absolutely no guarantee, warrantee, or assertion expressed or implied +as to the quality, fitness for a specific purpose, or lack of malice in any +given npm package. Packages downloaded through the npm registry are +independently licensed and are not covered by this license. + +Additional policies relating to, and restrictions on use of, npm products and +services are available on the npm website. All such policies and restrictions, +as updated from time to time, are hereby incorporated into this license +agreement. By using npm, you acknowledge your agreement to all such policies +and restrictions. + +If you have a complaint about a package in the public npm registry, and cannot +resolve it with the package owner, please email support@npmjs.com and explain +the situation. See the [npm Dispute Resolution +policy](https://github.com/npm/policies/blob/master/disputes.md) for more +details. + +Any data published to The npm Registry (including user account information) may +be removed or modified at the sole discretion of the npm server administrators. + +"npm Logo" contributed by Mathias Pettersson and Brian Hammond, +use is subject to https://www.npmjs.com/policies/trademark + +"Gubblebum Blocky" font +Copyright (c) by Tjarda Koster, https://jelloween.deviantart.com +included for use in the npm website and documentation, +used with permission. + +This program uses several Node modules contained in the node_modules/ +subdirectory, according to the terms of their respective licenses. diff --git a/bin/nodejs4.6.0/node_modules/npm/Makefile b/bin/nodejs4.6.0/node_modules/npm/Makefile new file mode 100644 index 00000000..038fef59 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/Makefile @@ -0,0 +1,192 @@ +# vim: set softtabstop=2 shiftwidth=2: +SHELL = bash + +PUBLISHTAG = $(shell node scripts/publish-tag.js) +BRANCH = $(shell git rev-parse --abbrev-ref HEAD) + +markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md + +html_docdeps = html/dochead.html \ + html/docfoot.html \ + scripts/doc-build.sh \ + package.json + +cli_mandocs = $(shell find doc/cli -name '*.md' \ + |sed 's|.md|.1|g' \ + |sed 's|doc/cli/|man/man1/|g' ) \ + man/man1/npm-README.1 + +api_mandocs = $(shell find doc/api -name '*.md' \ + |sed 's|.md|.3|g' \ + |sed 's|doc/api/|man/man3/|g' ) + +files_mandocs = $(shell find doc/files -name '*.md' \ + |sed 's|.md|.5|g' \ + |sed 's|doc/files/|man/man5/|g' ) \ + man/man5/npm-json.5 \ + man/man5/npm-global.5 + +misc_mandocs = $(shell find doc/misc -name '*.md' \ + |sed 's|.md|.7|g' \ + |sed 's|doc/misc/|man/man7/|g' ) \ + man/man7/npm-index.7 + +cli_htmldocs = $(shell find doc/cli -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/cli/|html/doc/cli/|g' ) \ + html/doc/README.html + +api_htmldocs = $(shell find doc/api -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/api/|html/doc/api/|g' ) + +files_htmldocs = $(shell find doc/files -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/files/|html/doc/files/|g' ) \ + html/doc/files/npm-json.html \ + html/doc/files/npm-global.html + +misc_htmldocs = $(shell find doc/misc -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/misc/|html/doc/misc/|g' ) \ + html/doc/index.html + +mandocs = $(api_mandocs) $(cli_mandocs) $(files_mandocs) $(misc_mandocs) + +htmldocs = $(api_htmldocs) $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs) + +all: doc + +latest: + @echo "Installing latest published npm" + @echo "Use 'make install' or 'make link' to install the code" + @echo "in this folder that you're looking at right now." + node cli.js install -g -f npm ${NPMOPTS} + +install: all + node cli.js install -g -f ${NPMOPTS} + +# backwards compat +dev: install + +link: uninstall + node cli.js link -f + +clean: markedclean marked-manclean doc-clean uninstall + rm -rf npmrc + node cli.js cache clean + +uninstall: + node cli.js rm npm -g -f + +doc: $(mandocs) $(htmldocs) + +markedclean: + rm -rf node_modules/marked node_modules/.bin/marked .building_marked + +marked-manclean: + rm -rf node_modules/marked-man node_modules/.bin/marked-man .building_marked-man + +docclean: doc-clean +doc-clean: + rm -rf \ + .building_marked \ + .building_marked-man \ + html/doc \ + html/api \ + man + +# use `npm install marked-man` for this to work. +man/man1/npm-README.1: README.md scripts/doc-build.sh package.json + @[ -d man/man1 ] || mkdir -p man/man1 + scripts/doc-build.sh $< $@ + +man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json + @[ -d man/man1 ] || mkdir -p man/man1 + scripts/doc-build.sh $< $@ + +man/man3/%.3: doc/api/%.md scripts/doc-build.sh package.json + @[ -d man/man3 ] || mkdir -p man/man3 + scripts/doc-build.sh $< $@ + +man/man5/npm-json.5: man/man5/package.json.5 + cp $< $@ + +man/man5/npm-global.5: man/man5/npm-folders.5 + cp $< $@ + +man/man5/%.5: doc/files/%.md scripts/doc-build.sh package.json + @[ -d man/man5 ] || mkdir -p man/man5 + scripts/doc-build.sh $< $@ + +doc/misc/npm-index.md: scripts/index-build.js package.json + node scripts/index-build.js > $@ + +html/doc/index.html: doc/misc/npm-index.md $(html_docdeps) + @[ -d html/doc ] || mkdir -p html/doc + scripts/doc-build.sh $< $@ + +man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json + @[ -d man/man7 ] || mkdir -p man/man7 + scripts/doc-build.sh $< $@ + +html/doc/README.html: README.md $(html_docdeps) + @[ -d html/doc ] || mkdir -p html/doc + scripts/doc-build.sh $< $@ + +html/doc/cli/%.html: doc/cli/%.md $(html_docdeps) + @[ -d html/doc/cli ] || mkdir -p html/doc/cli + scripts/doc-build.sh $< $@ + +html/doc/api/%.html: doc/api/%.md $(html_docdeps) + @[ -d html/doc/api ] || mkdir -p html/doc/api + scripts/doc-build.sh $< $@ + +html/doc/files/npm-json.html: html/doc/files/package.json.html + cp $< $@ +html/doc/files/npm-global.html: html/doc/files/npm-folders.html + cp $< $@ + +html/doc/files/%.html: doc/files/%.md $(html_docdeps) + @[ -d html/doc/files ] || mkdir -p html/doc/files + scripts/doc-build.sh $< $@ + +html/doc/misc/%.html: doc/misc/%.md $(html_docdeps) + @[ -d html/doc/misc ] || mkdir -p html/doc/misc + scripts/doc-build.sh $< $@ + + +marked: node_modules/.bin/marked + +node_modules/.bin/marked: + node cli.js install marked --no-global + +marked-man: node_modules/.bin/marked-man + +node_modules/.bin/marked-man: + node cli.js install marked-man --no-global + +doc: man + +man: $(cli_docs) $(api_docs) + +test: doc + node cli.js test + +tag: + npm tag npm@$(PUBLISHTAG) latest + +publish: link doc-clean doc + @git push origin :v$(shell npm -v) 2>&1 || true + git clean -fd &&\ + git push origin $(BRANCH) &&\ + git push origin --tags &&\ + npm publish --tag=$(PUBLISHTAG) + +release: + @bash scripts/release.sh + +sandwich: + @[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || (echo "make it yourself" && exit 13) + +.PHONY: all latest install dev link doc clean uninstall test man doc-clean docclean release diff --git a/bin/nodejs4.6.0/node_modules/npm/README.md b/bin/nodejs4.6.0/node_modules/npm/README.md new file mode 100644 index 00000000..247cefe5 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/README.md @@ -0,0 +1,169 @@ +npm(1) -- a JavaScript package manager +============================== +[![Build Status](https://img.shields.io/travis/npm/npm/master.svg)](https://travis-ci.org/npm/npm) +## SYNOPSIS + +This is just enough info to get you up and running. + +Much more info available via `npm help` once it's installed. + +## IMPORTANT + +**You need node v0.8 or higher to run this program.** + +To install an old **and unsupported** version of npm that works on node 0.3 +and prior, clone the git repo and dig through the old tags and branches. + +**npm is configured to use npm, Inc.'s public package registry at +<https://registry.npmjs.org> by default.** + +You can configure npm to use any compatible registry you +like, and even run your own registry. Check out the [doc on +registries](https://docs.npmjs.com/misc/registry). + +Use of someone else's registry may be governed by terms of use. The +terms of use for the default public registry are available at +<https://www.npmjs.com>. + +## Super Easy Install + +npm is bundled with [node](http://nodejs.org/download/). + +### Windows Computers + +[Get the MSI](http://nodejs.org/download/). npm is in it. + +### Apple Macintosh Computers + +[Get the pkg](http://nodejs.org/download/). npm is in it. + +### Other Sorts of Unices + +Run `make install`. npm will be installed with node. + +If you want a more fancy pants install (a different version, customized +paths, etc.) then read on. + +## Fancy Install (Unix) + +There's a pretty robust install script at +<https://www.npmjs.com/install.sh>. You can download that and run it. + +Here's an example using curl: + +```sh +curl -L https://www.npmjs.com/install.sh | sh +``` + +### Slightly Fancier + +You can set any npm configuration params with that script: + +```sh +npm_config_prefix=/some/path sh install.sh +``` + +Or, you can run it in uber-debuggery mode: + +```sh +npm_debug=1 sh install.sh +``` + +### Even Fancier + +Get the code with git. Use `make` to build the docs and do other stuff. +If you plan on hacking on npm, `make link` is your friend. + +If you've got the npm source code, you can also semi-permanently set +arbitrary config keys using the `./configure --key=val ...`, and then +run npm commands by doing `node cli.js <cmd> <args>`. (This is helpful +for testing, or running stuff without actually installing npm itself.) + +## Windows Install or Upgrade + +You can download a zip file from <https://github.com/npm/npm/releases>, and +unpack it in the `node_modules\npm\` folder inside node's installation folder. + +To upgrade to npm 2, follow the Windows upgrade instructions in +the npm Troubleshooting Guide: + +<https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows> + +If that's not fancy enough for you, then you can fetch the code with +git, and mess with it directly. + +## Installing on Cygwin + +No. + +## Uninstalling + +So sad to see you go. + +```sh +sudo npm uninstall npm -g +``` +Or, if that fails, + +```sh +sudo make uninstall +``` + +## More Severe Uninstalling + +Usually, the above instructions are sufficient. That will remove +npm, but leave behind anything you've installed. + +If you would like to remove all the packages that you have installed, +then you can use the `npm ls` command to find them, and then `npm rm` to +remove them. + +To remove cruft left behind by npm 0.x, you can use the included +`clean-old.sh` script file. You can run it conveniently like this: + +```sh +npm explore npm -g -- sh scripts/clean-old.sh +``` + +npm uses two configuration files, one for per-user configs, and another +for global (every-user) configs. You can view them by doing: + +```sh +npm config get userconfig # defaults to ~/.npmrc +npm config get globalconfig # defaults to /usr/local/etc/npmrc +``` + +Uninstalling npm does not remove configuration files by default. You +must remove them yourself manually if you want them gone. Note that +this means that future npm installs will not remember the settings that +you have chosen. + +## More Docs + +Check out the [docs](https://docs.npmjs.com/), +especially the [faq](https://docs.npmjs.com/misc/faq). + +You can use the `npm help` command to read any of them. + +If you're a developer, and you want to use npm to publish your program, +you should [read this](https://docs.npmjs.com/misc/developers) + +## BUGS + +When you find issues, please report them: + +* web: + <https://github.com/npm/npm/issues> + +Be sure to include *all* of the output from the npm command that didn't work +as expected. The `npm-debug.log` file is also helpful to provide. + +You can also look for isaacs in #node.js on irc://irc.freenode.net. He +will no doubt tell you to put the output in a gist or email. + +## SEE ALSO + +* npm(1) +* npm-faq(7) +* npm-help(1) +* npm-index(7) diff --git a/bin/nodejs4.6.0/node_modules/npm/appveyor.yml b/bin/nodejs4.6.0/node_modules/npm/appveyor.yml new file mode 100644 index 00000000..9ab88c30 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/appveyor.yml @@ -0,0 +1,38 @@ +environment: + matrix: + # LTS is our most important target + - nodejs_version: "4" + # next LTS and master is next most important + - nodejs_version: "6" + # still in LTS maintenance until fall 2016 + # (also still in wide use) + - nodejs_version: "0.10" + # will be unsupported as soon as 6 becomes LTS and 7 released + - nodejs_version: "5" + # technically in LTS / distros, unbeloved + - nodejs_version: "0.12" + COVERALLS_REPO_TOKEN: + secure: XdC0aySefK0HLh1GNk6aKrzZPbCfPQLyA4mYtFGEp4DrTuZA/iuCUS0LDqFYO8JQ +platform: + - x86 + - x64 +install: + - ps: Install-Product node $env:nodejs_version $env:platform + - npm config set spin false + - npm rebuild + - node . install -g . + - set "PATH=%APPDATA%\npm;C:\Program Files\Git\mingw64\libexec;%PATH%" + - npm install --loglevel=http +test_script: + - node --version + - npm --version + - npm test +notifications: +- provider: Slack + incoming_webhook: + secure: vXiG5AgpqxJsXZ0N0CTYDuVrX6RMjBybZKtOx6IbRxCyjgd+DAx6Z9/0XgYQjuof7QFJY3M/U6HxaREQVYbNVHA+C5N5dNALRbKzAC8QNbA= +# GO_FAST +matrix: + fast_finish: true +# we don't need the builds, we just need tests +build: off diff --git a/bin/nodejs4.6.0/node_modules/npm/bin/npm b/bin/nodejs4.6.0/node_modules/npm/bin/npm new file mode 100644 index 00000000..1226afbc --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/bin/npm @@ -0,0 +1,34 @@ +#!/bin/sh +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node +fi + +NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" + +case `uname` in + *MINGW*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; + *CYGWIN*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; +esac + +"$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/bin/nodejs4.6.0/node_modules/npm/bin/npm-cli.js b/bin/nodejs4.6.0/node_modules/npm/bin/npm-cli.js new file mode 100644 index 00000000..a1fa7f99 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/bin/npm-cli.js @@ -0,0 +1,75 @@ +#!/usr/bin/env node +;(function () { // wrapper in case we're in module_context mode + +// windows: running "npm blah" in this folder will invoke WSH, not node. +if (typeof WScript !== "undefined") { + WScript.echo("npm does not work when run\n" + +"with the Windows Scripting Host\n\n" + +"'cd' to a different directory,\n" + +"or type 'npm.cmd <args>',\n" + +"or type 'node npm <args>'.") + WScript.quit(1) + return +} + + +process.title = "npm" + +var log = require("npmlog") +log.pause() // will be unpaused when config is loaded. +log.info("it worked if it ends with", "ok") + +var path = require("path") + , npm = require("../lib/npm.js") + , npmconf = require("../lib/config/core.js") + , errorHandler = require("../lib/utils/error-handler.js") + + , configDefs = npmconf.defs + , shorthands = configDefs.shorthands + , types = configDefs.types + , nopt = require("nopt") + +// if npm is called as "npmg" or "npm_g", then +// run in global mode. +if (path.basename(process.argv[1]).slice(-1) === "g") { + process.argv.splice(1, 1, "npm", "-g") +} + +log.verbose("cli", process.argv) + +var conf = nopt(types, shorthands) +npm.argv = conf.argv.remain +if (npm.deref(npm.argv[0])) npm.command = npm.argv.shift() +else conf.usage = true + + +if (conf.version) { + console.log(npm.version) + return +} + +if (conf.versions) { + npm.command = "version" + conf.usage = false + npm.argv = [] +} + +log.info("using", "npm@%s", npm.version) +log.info("using", "node@%s", process.version) + +process.on("uncaughtException", errorHandler) + +if (conf.usage && npm.command !== "help") { + npm.argv.unshift(npm.command) + npm.command = "help" +} + +// now actually fire up npm and run the command. +// this is how to use npm programmatically: +conf._exit = true +npm.load(conf, function (er) { + if (er) return errorHandler(er) + npm.commands[npm.command](npm.argv, errorHandler) +}) + +})() diff --git a/bin/nodejs4.6.0/node_modules/npm/bin/npm.cmd b/bin/nodejs4.6.0/node_modules/npm/bin/npm.cmd new file mode 100644 index 00000000..f111c59d --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/bin/npm.cmd @@ -0,0 +1,19 @@ +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/bin/nodejs4.6.0/node_modules/npm/bin/read-package-json.js b/bin/nodejs4.6.0/node_modules/npm/bin/read-package-json.js new file mode 100644 index 00000000..ed46e264 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/bin/read-package-json.js @@ -0,0 +1,22 @@ +var argv = process.argv +if (argv.length < 3) { + console.error("Usage: read-package.json <file> [<fields> ...]") + process.exit(1) +} + +var fs = require("fs") + , file = argv[2] + , readJson = require("read-package-json") + +readJson(file, function (er, data) { + if (er) throw er + if (argv.length === 3) console.log(data) + else argv.slice(3).forEach(function (field) { + field = field.split(".") + var val = data + field.forEach(function (f) { + val = val[f] + }) + console.log(val) + }) +}) diff --git a/bin/nodejs4.6.0/node_modules/npm/cli.js b/bin/nodejs4.6.0/node_modules/npm/cli.js new file mode 100644 index 00000000..922bf23a --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/cli.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require("./bin/npm-cli.js") diff --git a/bin/nodejs4.6.0/node_modules/npm/configure b/bin/nodejs4.6.0/node_modules/npm/configure new file mode 100644 index 00000000..32b8da57 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/configure @@ -0,0 +1,33 @@ +#!/bin/bash + +# set configurations that will be "sticky" on this system, +# surviving npm self-updates. + +CONFIGS=() +i=0 + +# get the location of this file. +unset CDPATH +CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc + +while [ $# -gt 0 ]; do + conf="$1" + case $conf in + --help) + echo "./configure --param=value ..." + exit 0 + ;; + --*) + CONFIGS[$i]="${conf:2}" + ;; + *) + CONFIGS[$i]="$conf" + ;; + esac + let i++ + shift +done + +for c in "${CONFIGS[@]}"; do + echo "$c" >> "$CONFFILE" +done diff --git a/bin/nodejs4.6.0/node_modules/npm/html/docfoot.html b/bin/nodejs4.6.0/node_modules/npm/html/docfoot.html new file mode 100644 index 00000000..0cf4145d --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/html/docfoot.html @@ -0,0 +1,13 @@ +</div> + +<table border=0 cellspacing=0 cellpadding=0 id=npmlogo> +<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18> </td></tr> +<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td colspan=6 style="width:60px;height:10px;background:#fff"> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td></tr> +<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2> </td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td></tr> +<tr><td style="width:10px;height:10px;background:#fff" rowspan=2> </td></tr> +<tr><td style="width:10px;height:10px;background:#fff"> </td></tr> +<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> +<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> +</table> +<p id="footer">@NAME@ — npm@@VERSION@</p> + diff --git a/bin/nodejs4.6.0/node_modules/npm/html/dochead.html b/bin/nodejs4.6.0/node_modules/npm/html/dochead.html new file mode 100644 index 00000000..4d52bb8d --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/html/dochead.html @@ -0,0 +1,11 @@ +<!doctype html> +<html> + <title>@NAME@ + + + + + + +

    + diff --git a/bin/nodejs4.6.0/node_modules/npm/html/favicon.ico b/bin/nodejs4.6.0/node_modules/npm/html/favicon.ico new file mode 100644 index 00000000..9e0d4eef Binary files /dev/null and b/bin/nodejs4.6.0/node_modules/npm/html/favicon.ico differ diff --git a/bin/nodejs4.6.0/node_modules/npm/html/index.html b/bin/nodejs4.6.0/node_modules/npm/html/index.html new file mode 100644 index 00000000..6dcacdc8 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/html/index.html @@ -0,0 +1,93 @@ + + + + + + npm - JavaScript Package Manager + +

    npm

    + +

    npm is a package manager for node. You can use it to install + and publish your node programs. It manages dependencies and does other cool stuff.

    + +

    Easy Zero Line Install

    + +

    Install Node.js
    +(npm comes with it.)

    + +

    Because a one-line install is one too many.

    + +

    Fancy Install

    + +
      +
    1. Get the code. +
    2. Do what the README + says to do. +
    + +

    There's a pretty thorough install script at +https://npmjs.org/install.sh

    + +

    For maximum security, make sure to thoroughly inspect every +program that you run on your computer!

    + +

    Other Cool Stuff

    + + + + + diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/access.js b/bin/nodejs4.6.0/node_modules/npm/lib/access.js new file mode 100644 index 00000000..e6398eb1 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/access.js @@ -0,0 +1,127 @@ +'use strict' + +var resolve = require('path').resolve + +var readPackageJson = require('read-package-json') +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm.js') + +var whoami = require('./whoami') + +module.exports = access + +access.usage = + 'npm access public []\n' + + 'npm access restricted []\n' + + 'npm access grant []\n' + + 'npm access revoke []\n' + + 'npm access ls-packages [||]\n' + + 'npm access ls-collaborators [ []]\n' + + 'npm access edit []' + +access.subcommands = ['public', 'restricted', 'grant', 'revoke', + 'ls-packages', 'ls-collaborators', 'edit'] + +access.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, access.subcommands) + } + + switch (argv[2]) { + case 'grant': + if (argv.length === 3) { + return cb(null, ['read-only', 'read-write']) + } else { + return cb(null, []) + } + break + case 'public': + case 'restricted': + case 'ls-packages': + case 'ls-collaborators': + case 'edit': + return cb(null, []) + case 'revoke': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function access (args, cb) { + var cmd = args.shift() + var params + return parseParams(cmd, args, function (err, p) { + if (err) { return cb(err) } + params = p + return mapToRegistry(params.package, npm.config, invokeCmd) + }) + + function invokeCmd (err, uri, auth, base) { + if (err) { return cb(err) } + params.auth = auth + try { + return npm.registry.access(cmd, uri, params, function (err, data) { + !err && data && console.log(JSON.stringify(data, undefined, 2)) + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + access.usage) + } + } +} + +function parseParams (cmd, args, cb) { + // mapToRegistry will complain if package is undefined, + // but it's not needed for ls-packages + var params = { 'package': '' } + if (cmd === 'grant') { + params.permissions = args.shift() + } + if (['grant', 'revoke', 'ls-packages'].indexOf(cmd) !== -1) { + var entity = (args.shift() || '').split(':') + params.scope = entity[0] + params.team = entity[1] + } + + if (cmd === 'ls-packages') { + if (!params.scope) { + whoami([], true, function (err, scope) { + params.scope = scope + cb(err, params) + }) + } else { + cb(null, params) + } + } else { + getPackage(args.shift(), function (err, pkg) { + if (err) return cb(err) + params.package = pkg + + if (cmd === 'ls-collaborators') params.user = args.shift() + cb(null, params) + }) + } +} + +function getPackage (name, cb) { + if (name && name.trim()) { + cb(null, name.trim()) + } else { + readPackageJson( + resolve(npm.prefix, 'package.json'), + function (err, data) { + if (err) { + if (err.code === 'ENOENT') { + cb(new Error('no package name passed to command and no package.json found')) + } else { + cb(err) + } + } else { + cb(null, data.name) + } + } + ) + } +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/adduser.js b/bin/nodejs4.6.0/node_modules/npm/lib/adduser.js new file mode 100644 index 00000000..c815f2b5 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/adduser.js @@ -0,0 +1,177 @@ +module.exports = adduser + +var log = require("npmlog") + , npm = require("./npm.js") + , read = require("read") + , userValidate = require("npm-user-validate") + , crypto + +try { + crypto = require("crypto") +} catch (ex) {} + +adduser.usage = 'npm adduser [--registry=url] [--scope=@orgname] [--always-auth]' + + '\n\naliases: login' + +function adduser (args, cb) { + npm.spinner.stop() + if (!crypto) return cb(new Error( + "You must compile node with ssl support to use the adduser feature")) + + var creds = npm.config.getCredentialsByURI(npm.config.get("registry")) + var c = { u : creds.username || "" + , p : creds.password || "" + , e : creds.email || "" + } + , u = {} + , fns = [readUsername, readPassword, readEmail, save] + + loop() + function loop (er) { + if (er) return cb(er) + var fn = fns.shift() + if (fn) return fn(c, u, loop) + cb() + } +} + +function readUsername (c, u, cb) { + var v = userValidate.username + read({prompt: "Username: ", default: c.u || ""}, function (er, un) { + if (er) { + return cb(er.message === "cancelled" ? er.message : er) + } + + // make sure it's valid. we have to do this here, because + // couchdb will only ever say "bad password" with a 401 when + // you try to PUT a _users record that the validate_doc_update + // rejects for *any* reason. + + if (!un) { + return readUsername(c, u, cb) + } + + var error = v(un) + if (error) { + log.warn(error.message) + return readUsername(c, u, cb) + } + + c.changed = c.u !== un + u.u = un + cb(er) + }) +} + +function readPassword (c, u, cb) { + var v = userValidate.pw + + var prompt + if (c.p && !c.changed) { + prompt = "Password: (or leave unchanged) " + } else { + prompt = "Password: " + } + + read({prompt: prompt, silent: true}, function (er, pw) { + if (er) { + return cb(er.message === "cancelled" ? er.message : er) + } + + if (!c.changed && pw === "") { + // when the username was not changed, + // empty response means "use the old value" + pw = c.p + } + + if (!pw) { + return readPassword(c, u, cb) + } + + var error = v(pw) + if (error) { + log.warn(error.message) + return readPassword(c, u, cb) + } + + c.changed = c.changed || c.p !== pw + u.p = pw + cb(er) + }) +} + +function readEmail (c, u, cb) { + var v = userValidate.email + var r = { prompt: "Email: (this IS public) ", default: c.e || "" } + read(r, function (er, em) { + if (er) { + return cb(er.message === "cancelled" ? er.message : er) + } + + if (!em) { + return readEmail(c, u, cb) + } + + var error = v(em) + if (error) { + log.warn(error.message) + return readEmail(c, u, cb) + } + + u.e = em + cb(er) + }) +} + +function save (c, u, cb) { + npm.spinner.start() + + // save existing configs, but yank off for this PUT + var uri = npm.config.get("registry") + var scope = npm.config.get("scope") + + // there may be a saved scope and no --registry (for login) + if (scope) { + if (scope.charAt(0) !== "@") scope = "@" + scope + + var scopedRegistry = npm.config.get(scope + ":registry") + var cliRegistry = npm.config.get("registry", "cli") + if (scopedRegistry && !cliRegistry) uri = scopedRegistry + } + + var params = { + auth : { + username : u.u, + password : u.p, + email : u.e + } + } + npm.registry.adduser(uri, params, function (er, doc) { + npm.spinner.stop() + if (er) return cb(er) + + // don't want this polluting the configuration + npm.config.del("_token", "user") + + if (scope) npm.config.set(scope + ":registry", uri, "user") + + if (doc && doc.token) { + npm.config.setCredentialsByURI(uri, { + token : doc.token + }) + } + else { + npm.config.setCredentialsByURI(uri, { + username : u.u, + password : u.p, + email : u.e, + alwaysAuth : npm.config.get("always-auth") + }) + } + + log.info('adduser', 'Authorized user %s', u.u) + var scopeMessage = scope ? ' to scope ' + scope : '' + console.log('Logged in as %s%s on %s.', u.u, scopeMessage, uri) + npm.config.save('user', cb) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/bin.js b/bin/nodejs4.6.0/node_modules/npm/lib/bin.js new file mode 100644 index 00000000..a019852f --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/bin.js @@ -0,0 +1,19 @@ +module.exports = bin + +var npm = require("./npm.js") +var osenv = require("osenv") + +bin.usage = "npm bin\nnpm bin -g\n(just prints the bin folder)" + +function bin (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + var b = npm.bin + , PATH = osenv.path() + + if (!silent) console.log(b) + process.nextTick(cb.bind(this, null, b)) + + if (npm.config.get("global") && PATH.indexOf(b) === -1) { + npm.config.get("logstream").write("(not in PATH env variable)\n") + } +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/bugs.js b/bin/nodejs4.6.0/node_modules/npm/lib/bugs.js new file mode 100644 index 00000000..aa013a1e --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/bugs.js @@ -0,0 +1,69 @@ + +module.exports = bugs + +bugs.usage = "npm bugs " + +var npm = require("./npm.js") + , log = require("npmlog") + , opener = require("opener") + , path = require("path") + , readJson = require("read-package-json") + , npa = require("npm-package-arg") + , fs = require("fs") + , mapToRegistry = require("./utils/map-to-registry.js") + +bugs.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function bugs (args, cb) { + var n = args.length && npa(args[0]).name || "." + fs.stat(n, function (er, s) { + if (er) { + if (er.code === "ENOENT") return callRegistry(n, cb) + return cb(er) + } + if (!s.isDirectory()) return callRegistry(n, cb) + readJson(path.resolve(n, "package.json"), function(er, d) { + if (er) return cb(er) + getUrlAndOpen(d, cb) + }) + }) +} + +function getUrlAndOpen (d, cb) { + var repo = d.repository || d.repositories + , url + if (d.bugs) { + url = (typeof d.bugs === "string") ? d.bugs : d.bugs.url + } + else if (repo) { + if (Array.isArray(repo)) repo = repo.shift() + if (repo.hasOwnProperty("url")) repo = repo.url + log.verbose("bugs", "repository", repo) + if (repo && repo.match(/^(https?:\/\/|git(:\/\/|@))github.com/)) { + url = repo.replace(/^git(@|:\/\/)/, "https://") + .replace(/^https?:\/\/github.com:/, "https://github.com/") + .replace(/\.git$/, "")+"/issues" + } + } + if (!url) { + url = "https://www.npmjs.org/package/" + d.name + } + log.silly("bugs", "url", url) + opener(url, { command: npm.config.get("browser") }, cb) +} + +function callRegistry (name, cb) { + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri + "/latest", { auth : auth }, function (er, d) { + if (er) return cb(er) + + getUrlAndOpen(d, cb) + }) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/build.js b/bin/nodejs4.6.0/node_modules/npm/lib/build.js new file mode 100644 index 00000000..e1e99de2 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/build.js @@ -0,0 +1,253 @@ +// npm build command + +// everything about the installation after the creation of +// the .npm/{name}/{version}/package folder. +// linking the modules into the npm.root, +// resolving dependencies, etc. + +// This runs AFTER install or link are completed. + +var npm = require("./npm.js") + , log = require("npmlog") + , chain = require("slide").chain + , fs = require("graceful-fs") + , path = require("path") + , lifecycle = require("./utils/lifecycle.js") + , readJson = require("read-package-json") + , link = require("./utils/link.js") + , linkIfExists = link.ifExists + , cmdShim = require("cmd-shim") + , cmdShimIfExists = cmdShim.ifExists + , asyncMap = require("slide").asyncMap + , ini = require("ini") + , writeFile = require("write-file-atomic") + +module.exports = build +build.usage = "npm build \n(this is plumbing)" + +build._didBuild = {} +build._noLC = {} +function build (args, global, didPre, didRB, cb) { + if (typeof cb !== "function") cb = didRB, didRB = false + if (typeof cb !== "function") cb = didPre, didPre = false + if (typeof cb !== "function") { + cb = global, global = npm.config.get("global") + } + // it'd be nice to asyncMap these, but actually, doing them + // in parallel generally munges up the output from node-waf + var builder = build_(global, didPre, didRB) + chain(args.map(function (arg) { return function (cb) { + builder(arg, cb) + }}), cb) +} + +function build_ (global, didPre, didRB) { return function (folder, cb) { + folder = path.resolve(folder) + if (build._didBuild[folder]) log.info("build", "already built", folder) + build._didBuild[folder] = true + log.info("build", folder) + readJson(path.resolve(folder, "package.json"), function (er, pkg) { + if (er) return cb(er) + chain + ( [ !didPre && [lifecycle, pkg, "preinstall", folder] + , [linkStuff, pkg, folder, global, didRB] + , [writeBuiltinConf, pkg, folder] + , didPre !== build._noLC && [lifecycle, pkg, "install", folder] + , didPre !== build._noLC && [lifecycle, pkg, "postinstall", folder] + , didPre !== build._noLC + && npm.config.get("npat") + && [lifecycle, pkg, "test", folder] ] + , cb ) + }) +}} + +function writeBuiltinConf (pkg, folder, cb) { + // the builtin config is "sticky". Any time npm installs + // itself globally, it puts its builtin config file there + var parent = path.dirname(folder) + var dir = npm.globalDir + + if (pkg.name !== "npm" || + !npm.config.get("global") || + !npm.config.usingBuiltin || + dir !== parent) { + return cb() + } + + var data = ini.stringify(npm.config.sources.builtin.data) + writeFile(path.resolve(folder, "npmrc"), data, cb) +} + +function linkStuff (pkg, folder, global, didRB, cb) { + // allow to opt out of linking binaries. + if (npm.config.get("bin-links") === false) return 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 parent = pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder) + var gnm = global && npm.globalDir + var gtop = parent === gnm + + log.info('linkStuff', pkg._id) + log.silly('linkStuff', pkg._id, 'has', parent, 'as its parent node_modules') + if (global) log.silly('linkStuff', pkg._id, 'is part of a global install') + if (gnm) log.silly('linkStuff', pkg._id, 'is installed into a global node_modules') + if (gtop) log.silly('linkStuff', pkg._id, 'is installed into the top-level global node_modules') + + shouldWarn(pkg, folder, global, function () { + asyncMap( + [linkBins, linkMans, !didRB && rebuildBundles], + function (fn, cb) { + if (!fn) return cb() + log.verbose(fn.name, pkg._id) + fn(pkg, folder, parent, gtop, cb) + }, + cb + ) + }) +} + +function shouldWarn(pkg, folder, global, cb) { + var parent = path.dirname(folder) + , top = parent === npm.dir + , cwd = npm.localPrefix + + readJson(path.resolve(cwd, "package.json"), function(er, topPkg) { + if (er) return cb(er) + + var linkedPkg = path.basename(cwd) + , currentPkg = path.basename(folder) + + // current searched package is the linked package on first call + if (linkedPkg !== currentPkg) { + + // don't generate a warning if it's listed in dependencies + if (Object.keys(topPkg.dependencies || {}) + .concat(Object.keys(topPkg.devDependencies || {})) + .indexOf(currentPkg) === -1) { + + if (top && pkg.preferGlobal && !global) { + log.warn("prefer global", pkg._id + " should be installed with -g") + } + } + } + + cb() + }) +} + +function rebuildBundles (pkg, folder, parent, gtop, cb) { + if (!npm.config.get("rebuild-bundle")) return cb() + + var deps = Object.keys(pkg.dependencies || {}) + .concat(Object.keys(pkg.devDependencies || {})) + , bundles = pkg.bundleDependencies || pkg.bundledDependencies || [] + + fs.readdir(path.resolve(folder, "node_modules"), function (er, files) { + // error means no bundles + if (er) return cb() + + log.verbose("rebuildBundles", files) + // don't asyncMap these, because otherwise build script output + // gets interleaved and is impossible to read + chain(files.filter(function (file) { + // rebuild if: + // not a .folder, like .bin or .hooks + return !file.match(/^[\._-]/) + // not some old 0.x style bundle + && file.indexOf("@") === -1 + // either not a dep, or explicitly bundled + && (deps.indexOf(file) === -1 || bundles.indexOf(file) !== -1) + }).map(function (file) { + file = path.resolve(folder, "node_modules", file) + return function (cb) { + if (build._didBuild[file]) return cb() + log.verbose("rebuild bundle", file) + // if file is not a package dir, then don't do it. + fs.lstat(path.resolve(file, "package.json"), function (er) { + if (er) return cb() + build_(false)(file, cb) + }) + }}), cb) + }) +} + +function linkBins (pkg, folder, parent, gtop, cb) { + if (!pkg.bin || !gtop && path.basename(parent) !== "node_modules") { + return cb() + } + var binRoot = gtop ? npm.globalBin + : path.resolve(parent, ".bin") + log.verbose("link bins", [pkg.bin, binRoot, gtop]) + + asyncMap(Object.keys(pkg.bin), function (b, cb) { + linkBin( path.resolve(folder, pkg.bin[b]) + , path.resolve(binRoot, b) + , gtop && folder + , function (er) { + if (er) return cb(er) + // bins should always be executable. + // XXX skip chmod on windows? + var src = path.resolve(folder, pkg.bin[b]) + fs.chmod(src, npm.modes.exec, function (er) { + if (er && er.code === "ENOENT" && npm.config.get("ignore-scripts")) { + return cb() + } + if (er || !gtop) return cb(er) + var dest = path.resolve(binRoot, b) + , out = npm.config.get("parseable") + ? dest + "::" + src + ":BINFILE" + : dest + " -> " + src + console.log(out) + cb() + }) + }) + }, cb) +} + +function linkBin (from, to, gently, cb) { + if (process.platform !== "win32") { + return linkIfExists(from, to, gently, cb) + } else { + return cmdShimIfExists(from, to, cb) + } +} + +function linkMans (pkg, folder, parent, gtop, cb) { + if (!pkg.man || !gtop || process.platform === "win32") return cb() + + var manRoot = path.resolve(npm.config.get("prefix"), "share", "man") + log.verbose("linkMans", "man files are", pkg.man, "in", manRoot) + + // make sure that the mans are unique. + // otherwise, if there are dupes, it'll fail with EEXIST + var set = pkg.man.reduce(function (acc, man) { + acc[path.basename(man)] = man + return acc + }, {}) + pkg.man = pkg.man.filter(function (man) { + return set[path.basename(man)] === man + }) + + asyncMap(pkg.man, function (man, cb) { + if (typeof man !== "string") return cb() + log.silly("linkMans", "preparing to link", man) + var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) + if (!parseMan) { + return cb(new Error( + man+" is not a valid name for a man file. " + + "Man files must end with a number, " + + "and optionally a .gz suffix if they are compressed." + )) + } + + var stem = parseMan[1] + var sxn = parseMan[2] + var bn = path.basename(stem) + var manSrc = path.resolve(folder, man) + var manDest = path.join(manRoot, "man" + sxn, bn) + + linkIfExists(manSrc, manDest, gtop && folder, cb) + }, cb) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/cache.js b/bin/nodejs4.6.0/node_modules/npm/lib/cache.js new file mode 100644 index 00000000..6dcf2d7e --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/cache.js @@ -0,0 +1,354 @@ +// XXX lib/utils/tar.js and this file need to be rewritten. + +// URL-to-cache folder mapping: +// : -> ! +// @ -> _ +// http://registry.npmjs.org/foo/version -> cache/http!/... +// + +/* +fetching a URL: +1. Check for URL in inflight URLs. If present, add cb, and return. +2. Acquire lock at {cache}/{sha(url)}.lock + retries = {cache-lock-retries, def=10} + stale = {cache-lock-stale, def=60000} + wait = {cache-lock-wait, def=10000} +3. if lock can't be acquired, then fail +4. fetch url, clear lock, call cbs + +cache folders: +1. urls: http!/server.com/path/to/thing +2. c:\path\to\thing: file!/c!/path/to/thing +3. /path/to/thing: file!/path/to/thing +4. git@ private: git_github.com!npm/npm +5. git://public: git!/github.com/npm/npm +6. git+blah:// git-blah!/server.com/foo/bar + +adding a folder: +1. tar into tmp/random/package.tgz +2. untar into tmp/random/contents/package, stripping one dir piece +3. tar tmp/random/contents/package to cache/n/v/package.tgz +4. untar cache/n/v/package.tgz into cache/n/v/package +5. rm tmp/random + +Adding a url: +1. fetch to tmp/random/package.tgz +2. goto folder(2) + +adding a name@version: +1. registry.get(name/version) +2. if response isn't 304, add url(dist.tarball) + +adding a name@range: +1. registry.get(name) +2. Find a version that satisfies +3. add name@version + +adding a local tarball: +1. untar to tmp/random/{blah} +2. goto folder(2) + +adding a namespaced package: +1. lookup registry for @namespace +2. namespace_registry.get('name') +3. add url(namespace/latest.tarball) +*/ + +exports = module.exports = cache + +cache.unpack = unpack +cache.clean = clean +cache.read = read + +var npm = require("./npm.js") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , assert = require("assert") + , rm = require("./utils/gently-rm.js") + , readJson = require("read-package-json") + , log = require("npmlog") + , path = require("path") + , asyncMap = require("slide").asyncMap + , tar = require("./utils/tar.js") + , fileCompletion = require("./utils/completion/file-completion.js") + , deprCheck = require("./utils/depr-check.js") + , addNamed = require("./cache/add-named.js") + , addLocal = require("./cache/add-local.js") + , addRemoteTarball = require("./cache/add-remote-tarball.js") + , addRemoteGit = require("./cache/add-remote-git.js") + , inflight = require("inflight") + , realizePackageSpecifier = require("realize-package-specifier") + , npa = require("npm-package-arg") + , getStat = require("./cache/get-stat.js") + , cachedPackageRoot = require("./cache/cached-package-root.js") + , mapToRegistry = require("./utils/map-to-registry.js") + +cache.usage = "npm cache add " + + "\nnpm cache add " + + "\nnpm cache add " + + "\nnpm cache add " + + "\nnpm cache add @" + + "\nnpm cache ls []" + + "\nnpm cache clean [[@]]" + +cache.completion = function (opts, cb) { + + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, ["add", "ls", "clean"]) + } + + switch (argv[2]) { + case "clean": + case "ls": + // cache and ls are easy, because the completion is + // what ls_ returns anyway. + // just get the partial words, minus the last path part + var p = path.dirname(opts.partialWords.slice(3).join("/")) + if (p === ".") p = "" + return ls_(p, 2, cb) + case "add": + // Same semantics as install and publish. + return npm.commands.install.completion(opts, cb) + } +} + +function cache (args, cb) { + var cmd = args.shift() + switch (cmd) { + case "rm": case "clear": case "clean": return clean(args, cb) + case "list": case "sl": case "ls": return ls(args, cb) + case "add": return add(args, npm.prefix, cb) + default: return cb("Usage: "+cache.usage) + } +} + +// if the pkg and ver are in the cache, then +// just do a readJson and return. +// if they're not, then fetch them from the registry. +function read (name, ver, forceBypass, cb) { + assert(typeof name === "string", "must include name of module to install") + assert(typeof cb === "function", "must include callback") + + if (forceBypass === undefined || forceBypass === null) forceBypass = true + + var root = cachedPackageRoot({name : name, version : ver}) + function c (er, data) { + if (er) log.verbose("cache", "addNamed error for", name+"@"+ver, er) + if (data) deprCheck(data) + + return cb(er, data) + } + + if (forceBypass && npm.config.get("force")) { + log.verbose("using force", "skipping cache") + return addNamed(name, ver, null, c) + } + + readJson(path.join(root, "package", "package.json"), function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + + if (data) { + if (!data.name) return cb(new Error("No name provided")) + if (!data.version) return cb(new Error("No version provided")) + } + + if (er) return addNamed(name, ver, null, c) + else c(er, data) + }) +} + +function normalize (args) { + var normalized = "" + if (args.length > 0) { + var a = npa(args[0]) + if (a.name) normalized = a.name + if (a.rawSpec) normalized = [normalized, a.rawSpec].join("/") + if (args.length > 1) normalized = [normalized].concat(args.slice(1)).join("/") + } + + if (normalized.substr(-1) === "/") { + normalized = normalized.substr(0, normalized.length - 1) + } + normalized = path.normalize(normalized) + log.silly("ls", "normalized", normalized) + + return normalized +} + +// npm cache ls [] +function ls (args, cb) { + var prefix = npm.config.get("cache") + if (prefix.indexOf(process.env.HOME) === 0) { + prefix = "~" + prefix.substr(process.env.HOME.length) + } + ls_(normalize(args), npm.config.get("depth"), function (er, files) { + console.log(files.map(function (f) { + return path.join(prefix, f) + }).join("\n").trim()) + cb(er, files) + }) +} + +// Calls cb with list of cached pkgs matching show. +function ls_ (req, depth, cb) { + return fileCompletion(npm.cache, req, depth, cb) +} + +// npm cache clean [] +function clean (args, cb) { + assert(typeof cb === "function", "must include callback") + + if (!args) args = [] + + var f = path.join(npm.cache, normalize(args)) + if (f === npm.cache) { + fs.readdir(npm.cache, function (er, files) { + if (er) return cb() + asyncMap( files.filter(function (f) { + return npm.config.get("force") || f !== "-" + }).map(function (f) { + return path.join(npm.cache, f) + }) + , rm, cb ) + }) + } + else { + rm(f, cb) + } +} + +// npm cache add +// npm cache add +// npm cache add +// npm cache add +cache.add = function (pkg, ver, where, scrub, cb) { + assert(typeof pkg === "string", "must include name of package to install") + assert(typeof cb === "function", "must include callback") + + if (scrub) { + return clean([], function (er) { + if (er) return cb(er) + add([pkg, ver], where, cb) + }) + } + return add([pkg, ver], where, cb) +} + + +var adding = 0 +function add (args, where, cb) { + // this is hot code. almost everything passes through here. + // the args can be any of: + // ["url"] + // ["pkg", "version"] + // ["pkg@version"] + // ["pkg", "url"] + // This is tricky, because urls can contain @ + // Also, in some cases we get [name, null] rather + // that just a single argument. + + var usage = "Usage:\n" + + " npm cache add \n" + + " npm cache add @\n" + + " npm cache add \n" + + " npm cache add \n" + , spec + + log.silly("cache add", "args", args) + + if (args[1] === undefined) args[1] = null + + // at this point the args length must ==2 + if (args[1] !== null) { + spec = args[0]+"@"+args[1] + } else if (args.length === 2) { + spec = args[0] + } + + log.verbose("cache add", "spec", spec) + + if (!spec) return cb(usage) + + if (adding <= 0) { + npm.spinner.start() + } + adding++ + cb = afterAdd(cb) + + realizePackageSpecifier(spec, where, function (err, p) { + if (err) return cb(err) + + log.silly("cache add", "parsed spec", p) + + switch (p.type) { + case "local": + case "directory": + addLocal(p, null, cb) + break + case "remote": + // get auth, if possible + mapToRegistry(p.raw, npm.config, function (err, uri, auth) { + if (err) return cb(err) + + addRemoteTarball(p.spec, {name : p.name}, null, auth, cb) + }) + break + case "git": + case "hosted": + addRemoteGit(p.rawSpec, cb) + break + default: + if (p.name) return addNamed(p.name, p.spec, null, cb) + + cb(new Error("couldn't figure out how to install " + spec)) + } + }) +} + +function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) { + if (typeof cb !== "function") cb = gid, gid = null + if (typeof cb !== "function") cb = uid, uid = null + if (typeof cb !== "function") cb = fMode, fMode = null + if (typeof cb !== "function") cb = dMode, dMode = null + + read(pkg, ver, false, function (er) { + if (er) { + log.error("unpack", "Could not read data for %s", pkg + "@" + ver) + return cb(er) + } + npm.commands.unbuild([unpackTarget], true, function (er) { + if (er) return cb(er) + tar.unpack( path.join(cachedPackageRoot({name : pkg, version : ver}), "package.tgz") + , unpackTarget + , dMode, fMode + , uid, gid + , cb ) + }) + }) +} + +function afterAdd (cb) { return function (er, data) { + adding-- + if (adding <= 0) npm.spinner.stop() + + if (er || !data || !data.name || !data.version) return cb(er, data) + log.silly("cache", "afterAdd", data.name+"@"+data.version) + + // Save the resolved, shasum, etc. into the data so that the next + // time we load from this cached data, we have all the same info. + // Ignore if it fails. + var pj = path.join(cachedPackageRoot(data), "package", "package.json") + + var done = inflight(pj, cb) + if (!done) return log.verbose("afterAdd", pj, "already in flight; not writing") + log.verbose("afterAdd", pj, "not in flight; writing") + + getStat(function (er, cs) { + if (er) return done(er) + writeFileAtomic(pj, JSON.stringify(data), {chown : cs}, function (er) { + if (!er) log.verbose("afterAdd", pj, "written") + return done(null, data) + }) + }) +}} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/completion.js b/bin/nodejs4.6.0/node_modules/npm/lib/completion.js new file mode 100644 index 00000000..ff6ca494 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/completion.js @@ -0,0 +1,248 @@ + +module.exports = completion + +completion.usage = "npm completion >> ~/.bashrc\n" + + "npm completion >> ~/.zshrc\n" + + "source <(npm completion)" + +var npm = require("./npm.js") + , npmconf = require("./config/core.js") + , configDefs = npmconf.defs + , configTypes = configDefs.types + , shorthands = configDefs.shorthands + , nopt = require("nopt") + , configNames = Object.keys(configTypes).filter(function (e) { + return e.charAt(0) !== "_" + }) + , shorthandNames = Object.keys(shorthands) + , allConfs = configNames.concat(shorthandNames) + , once = require("once") + + +completion.completion = function (opts, cb) { + if (opts.w > 3) return cb() + + var fs = require("graceful-fs") + , path = require("path") + , bashExists = null + , zshExists = null + fs.stat(path.resolve(process.env.HOME, ".bashrc"), function (er) { + bashExists = !er + next() + }) + fs.stat(path.resolve(process.env.HOME, ".zshrc"), function (er) { + zshExists = !er + next() + }) + function next () { + if (zshExists === null || bashExists === null) return + var out = [] + if (zshExists) out.push("~/.zshrc") + if (bashExists) out.push("~/.bashrc") + if (opts.w === 2) out = out.map(function (m) { + return [">>", m] + }) + cb(null, out) + } +} + +function completion (args, cb) { + if (process.platform === 'win32' && !(/^MINGW(32|64)$/.test(process.env.MSYSTEM))) { + var e = new Error('npm completion supported only in MINGW / Git bash on Windows') + e.code = 'ENOTSUP' + e.errno = require('constants').ENOTSUP + return cb(e) + } + + // if the COMP_* isn't in the env, then just dump the script. + if (process.env.COMP_CWORD === undefined + ||process.env.COMP_LINE === undefined + ||process.env.COMP_POINT === undefined + ) return dumpScript(cb) + + console.error(process.env.COMP_CWORD) + console.error(process.env.COMP_LINE) + console.error(process.env.COMP_POINT) + + //console.log("abracadabrasauce\nabracad cat monger") + //if (Math.random() * 3 < 1) console.log("man\\ bear\\ pig") + //else if (Math.random() * 3 < 1) + // console.log("porkchop\\ sandwiches\nporkman") + //else console.log("encephylophagy") + + // get the partial line and partial word, + // if the point isn't at the end. + // ie, tabbing at: npm foo b|ar + var w = +process.env.COMP_CWORD + , words = args.map(unescape) + , word = words[w] + , line = process.env.COMP_LINE + , point = +process.env.COMP_POINT + , partialLine = line.substr(0, point) + , partialWords = words.slice(0, w) + + // figure out where in that last word the point is. + var partialWord = args[w] + , i = partialWord.length + while (partialWord.substr(0, i) !== partialLine.substr(-1*i) && i > 0) { + i -- + } + partialWord = unescape(partialWord.substr(0, i)) + partialWords.push(partialWord) + + var opts = { words : words + , w : w + , word : word + , line : line + , lineLength : line.length + , point : point + , partialLine : partialLine + , partialWords : partialWords + , partialWord : partialWord + , raw: args + } + + cb = wrapCb(cb, opts) + + console.error(opts) + + if (partialWords.slice(0, -1).indexOf("--") === -1) { + if (word.charAt(0) === "-") return configCompl(opts, cb) + if (words[w - 1] + && words[w - 1].charAt(0) === "-" + && !isFlag(words[w - 1])) { + // awaiting a value for a non-bool config. + // don't even try to do this for now + console.error("configValueCompl") + return configValueCompl(opts, cb) + } + } + + // try to find the npm command. + // it's the first thing after all the configs. + // take a little shortcut and use npm's arg parsing logic. + // don't have to worry about the last arg being implicitly + // boolean'ed, since the last block will catch that. + var parsed = opts.conf = + nopt(configTypes, shorthands, partialWords.slice(0, -1), 0) + // check if there's a command already. + console.error(parsed) + var cmd = parsed.argv.remain[1] + if (!cmd) return cmdCompl(opts, cb) + + Object.keys(parsed).forEach(function (k) { + npm.config.set(k, parsed[k]) + }) + + // at this point, if words[1] is some kind of npm command, + // then complete on it. + // otherwise, do nothing + cmd = npm.commands[cmd] + if (cmd && cmd.completion) return cmd.completion(opts, cb) + + // nothing to do. + cb() +} + +function dumpScript (cb) { + var fs = require("graceful-fs") + , path = require("path") + , p = path.resolve(__dirname, "utils/completion.sh") + + // The Darwin patch below results in callbacks first for the write and then + // for the error handler, so make sure we only call our callback once. + cb = once(cb) + + fs.readFile(p, "utf8", function (er, d) { + if (er) return cb(er) + d = d.replace(/^\#\!.*?\n/, "") + + process.stdout.write(d, function () { cb() }) + process.stdout.on("error", function (er) { + // Darwin is a pain sometimes. + // + // This is necessary because the "source" or "." program in + // bash on OS X closes its file argument before reading + // from it, meaning that you get exactly 1 write, which will + // work most of the time, and will always raise an EPIPE. + // + // Really, one should not be tossing away EPIPE errors, or any + // errors, so casually. But, without this, `. <(npm completion)` + // can never ever work on OS X. + if (er.errno === "EPIPE") er = null + cb(er) + }) + + }) +} + +function unescape (w) { + if (w.charAt(0) === "\"") return w.replace(/^"|"$/g, "") + else return w.replace(/\\ /g, " ") +} + +function escape (w) { + if (!w.match(/\s+/)) return w + return "\"" + w + "\"" +} + +// The command should respond with an array. Loop over that, +// wrapping quotes around any that have spaces, and writing +// them to stdout. Use console.log, not the outfd config. +// If any of the items are arrays, then join them with a space. +// Ie, returning ["a", "b c", ["d", "e"]] would allow it to expand +// to: "a", "b c", or "d" "e" +function wrapCb (cb, opts) { return function (er, compls) { + if (!Array.isArray(compls)) compls = compls ? [compls] : [] + compls = compls.map(function (c) { + if (Array.isArray(c)) c = c.map(escape).join(" ") + else c = escape(c) + return c + }) + if (opts.partialWord) compls = compls.filter(function (c) { + return c.indexOf(opts.partialWord) === 0 + }) + console.error([er && er.stack, compls, opts.partialWord]) + if (er || compls.length === 0) return cb(er) + + console.log(compls.join("\n")) + cb() +}} + +// the current word has a dash. Return the config names, +// with the same number of dashes as the current word has. +function configCompl (opts, cb) { + var word = opts.word + , split = word.match(/^(-+)((?:no-)*)(.*)$/) + , dashes = split[1] + , no = split[2] + , flags = configNames.filter(isFlag) + console.error(flags) + + return cb(null, allConfs.map(function (c) { + return dashes + c + }).concat(flags.map(function (f) { + return dashes + (no || "no-") + f + }))) +} + +// expand with the valid values of various config values. +// not yet implemented. +function configValueCompl (opts, cb) { + console.error("configValue", opts) + return cb(null, []) +} + +// check if the thing is a flag or not. +function isFlag (word) { + // shorthands never take args. + var split = word.match(/^(-*)((?:no-)+)?(.*)$/) + , no = split[2] + , conf = split[3] + return no || configTypes[conf] === Boolean || shorthands[conf] +} + +// complete against the npm commands +function cmdCompl (opts, cb) { + return cb(null, npm.fullList) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/config.js b/bin/nodejs4.6.0/node_modules/npm/lib/config.js new file mode 100644 index 00000000..3c58a798 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/config.js @@ -0,0 +1,285 @@ + +module.exports = config + +config.usage = "npm config set " + + "\nnpm config get []" + + "\nnpm config delete " + + "\nnpm config list" + + "\nnpm config edit" + + "\nnpm set " + + "\nnpm get []" + +var log = require("npmlog") + , npm = require("./npm.js") + , npmconf = require("./config/core.js") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , types = npmconf.defs.types + , ini = require("ini") + , editor = require("editor") + , os = require("os") + , umask = require("./utils/umask") + +config.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv[1] !== "config") argv.unshift("config") + if (argv.length === 2) { + var cmds = ["get", "set", "delete", "ls", "rm", "edit"] + if (opts.partialWord !== "l") cmds.push("list") + return cb(null, cmds) + } + + var action = argv[2] + switch (action) { + case "set": + // todo: complete with valid values, if possible. + if (argv.length > 3) return cb(null, []) + // fallthrough + case "get": + case "delete": + case "rm": + return cb(null, Object.keys(types)) + case "edit": + case "list": case "ls": + return cb(null, []) + default: return cb(null, []) + } +} + +// npm config set key value +// npm config get key +// npm config list +function config (args, cb) { + var action = args.shift() + switch (action) { + case "set": return set(args[0], args[1], cb) + case "get": return get(args[0], cb) + case "delete": case "rm": case "del": return del(args[0], cb) + case "list": case "ls": return list(cb) + case "edit": return edit(cb) + default: return unknown(action, cb) + } +} + +function edit (cb) { + var e = npm.config.get("editor") + , which = npm.config.get("global") ? "global" : "user" + , f = npm.config.get(which + "config") + if (!e) return cb(new Error("No EDITOR config or environ set.")) + npm.config.save(which, function (er) { + if (er) return cb(er) + fs.readFile(f, "utf8", function (er, data) { + if (er) data = "" + data = [ ";;;;" + , "; npm "+(npm.config.get("global") ? + "globalconfig" : "userconfig")+" file" + , "; this is a simple ini-formatted file" + , "; lines that start with semi-colons are comments." + , "; read `npm help config` for help on the various options" + , ";;;;" + , "" + , data + ].concat( [ ";;;;" + , "; all options with default values" + , ";;;;" + ] + ) + .concat(Object.keys(npmconf.defaults).reduce(function (arr, key) { + var obj = {} + obj[key] = npmconf.defaults[key] + if (key === "logstream") return arr + return arr.concat( + ini.stringify(obj) + .replace(/\n$/m, "") + .replace(/^/g, "; ") + .replace(/\n/g, "\n; ") + .split("\n")) + }, [])) + .concat([""]) + .join(os.EOL) + writeFileAtomic + ( f + , data + , function (er) { + if (er) return cb(er) + editor(f, { editor: e }, cb) + } + ) + }) + }) +} + +function del (key, cb) { + if (!key) return cb(new Error("no key provided")) + var where = npm.config.get("global") ? "global" : "user" + npm.config.del(key, where) + npm.config.save(where, cb) +} + +function set (key, val, cb) { + if (key === undefined) { + return unknown("", cb) + } + if (val === undefined) { + if (key.indexOf("=") !== -1) { + var k = key.split("=") + key = k.shift() + val = k.join("=") + } else { + val = "" + } + } + key = key.trim() + val = val.trim() + log.info("config", "set %j %j", key, val) + var where = npm.config.get("global") ? "global" : "user" + if (key.match(/umask/)) val = umask.fromString(val) + npm.config.set(key, val, where) + npm.config.save(where, cb) +} + +function get (key, cb) { + if (!key) return list(cb) + if (!public(key)) { + return cb(new Error("---sekretz---")) + } + var val = npm.config.get(key) + if (key.match(/umask/)) val = umask.toString(val) + console.log(val) + cb() +} + +function sort (a, b) { + return a > b ? 1 : -1 +} + +function public (k) { + return !(k.charAt(0) === "_" || + k.indexOf(":_") !== -1 || + types[k] !== types[k]) +} + +function getKeys (data) { + return Object.keys(data).filter(public).sort(sort) +} + +function list (cb) { + var msg = "" + , long = npm.config.get("long") + + var cli = npm.config.sources.cli.data + , cliKeys = getKeys(cli) + if (cliKeys.length) { + msg += "; cli configs\n" + cliKeys.forEach(function (k) { + if (cli[k] && typeof cli[k] === "object") return + if (k === "argv") return + msg += k + " = " + JSON.stringify(cli[k]) + "\n" + }) + msg += "\n" + } + + // env configs + var env = npm.config.sources.env.data + , envKeys = getKeys(env) + if (envKeys.length) { + msg += "; environment configs\n" + envKeys.forEach(function (k) { + if (env[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + JSON.stringify(env[k]) + + " (overridden)\n" + } else msg += k + " = " + JSON.stringify(env[k]) + "\n" + }) + msg += "\n" + } + + // user config file + var uconf = npm.config.sources.user.data + , uconfKeys = getKeys(uconf) + if (uconfKeys.length) { + msg += "; userconfig " + npm.config.get("userconfig") + "\n" + uconfKeys.forEach(function (k) { + var val = (k.charAt(0) === "_") + ? "---sekretz---" + : JSON.stringify(uconf[k]) + if (uconf[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + } + + // global config file + var gconf = npm.config.sources.global.data + , gconfKeys = getKeys(gconf) + if (gconfKeys.length) { + msg += "; globalconfig " + npm.config.get("globalconfig") + "\n" + gconfKeys.forEach(function (k) { + var val = (k.charAt(0) === "_") + ? "---sekretz---" + : JSON.stringify(gconf[k]) + if (gconf[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + } + + // builtin config file + var builtin = npm.config.sources.builtin || {} + if (builtin && builtin.data) { + var bconf = builtin.data + , bpath = builtin.path + , bconfKeys = getKeys(bconf) + if (bconfKeys.length) { + msg += "; builtin config " + bpath + "\n" + bconfKeys.forEach(function (k) { + var val = (k.charAt(0) === "_") + ? "---sekretz---" + : JSON.stringify(bconf[k]) + if (bconf[k] !== npm.config.get(k)) { + if (!long) return + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + } + } + + // only show defaults if --long + if (!long) { + msg += "; node bin location = " + process.execPath + "\n" + + "; cwd = " + process.cwd() + "\n" + + "; HOME = " + process.env.HOME + "\n" + + "; 'npm config ls -l' to show all defaults.\n" + + console.log(msg) + return cb() + } + + var defaults = npmconf.defaults + , defKeys = getKeys(defaults) + msg += "; default values\n" + defKeys.forEach(function (k) { + if (defaults[k] && typeof defaults[k] === "object") return + var val = JSON.stringify(defaults[k]) + if (defaults[k] !== npm.config.get(k)) { + msg += "; " + k + " = " + val + + " (overridden)\n" + } else msg += k + " = " + val + "\n" + }) + msg += "\n" + + console.log(msg) + return cb() +} + +function unknown (action, cb) { + cb("Usage:\n" + config.usage) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/dedupe.js b/bin/nodejs4.6.0/node_modules/npm/lib/dedupe.js new file mode 100644 index 00000000..c650ea26 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/dedupe.js @@ -0,0 +1,375 @@ +// traverse the node_modules/package.json tree +// looking for duplicates. If any duplicates are found, +// then move them up to the highest level necessary +// in order to make them no longer duplicated. +// +// This is kind of ugly, and really highlights the need for +// much better "put pkg X at folder Y" abstraction. Oh well, +// whatever. Perfect enemy of the good, and all that. + +var fs = require("fs") +var asyncMap = require("slide").asyncMap +var path = require("path") +var readJson = require("read-package-json") +var semver = require("semver") +var rm = require("./utils/gently-rm.js") +var log = require("npmlog") +var npm = require("./npm.js") +var mapToRegistry = require("./utils/map-to-registry.js") + +module.exports = dedupe + +dedupe.usage = "npm dedupe [pkg pkg...]" + +function dedupe (args, silent, cb) { + if (typeof silent === "function") cb = silent, silent = false + var dryrun = false + if (npm.command.match(/^find/)) dryrun = true + return dedupe_(npm.prefix, args, {}, dryrun, silent, cb) +} + +function dedupe_ (dir, filter, unavoidable, dryrun, silent, cb) { + readInstalled(path.resolve(dir), {}, null, function (er, data, counter) { + if (er) { + return cb(er) + } + + if (!data) { + return cb() + } + + // find out which things are dupes + var dupes = Object.keys(counter || {}).filter(function (k) { + if (filter.length && -1 === filter.indexOf(k)) return false + return counter[k] > 1 && !unavoidable[k] + }).reduce(function (s, k) { + s[k] = [] + return s + }, {}) + + // any that are unavoidable need to remain as they are. don't even + // try to touch them or figure it out. Maybe some day, we can do + // something a bit more clever here, but for now, just skip over it, + // and all its children. + ;(function U (obj) { + if (unavoidable[obj.name]) { + obj.unavoidable = true + } + if (obj.parent && obj.parent.unavoidable) { + obj.unavoidable = true + } + Object.keys(obj.children).forEach(function (k) { + U(obj.children[k]) + }) + })(data) + + // then collect them up and figure out who needs them + ;(function C (obj) { + if (dupes[obj.name] && !obj.unavoidable) { + dupes[obj.name].push(obj) + obj.duplicate = true + } + obj.dependents = whoDepends(obj) + Object.keys(obj.children).forEach(function (k) { + C(obj.children[k]) + }) + })(data) + + if (dryrun) { + var k = Object.keys(dupes) + if (!k.length) return cb() + return npm.commands.ls(k, silent, cb) + } + + var summary = Object.keys(dupes).map(function (n) { + return [n, dupes[n].filter(function (d) { + return d && d.parent && !d.parent.duplicate && !d.unavoidable + }).map(function M (d) { + return [d.path, d.version, d.dependents.map(function (k) { + return [k.path, k.version, k.dependencies[d.name] || ""] + })] + })] + }).map(function (item) { + var set = item[1] + + var ranges = set.map(function (i) { + return i[2].map(function (d) { + return d[2] + }) + }).reduce(function (l, r) { + return l.concat(r) + }, []).map(function (v, i, set) { + if (set.indexOf(v) !== i) return false + return v + }).filter(function (v) { + return v !== false + }) + + var locs = set.map(function (i) { + return i[0] + }) + + var versions = set.map(function (i) { + return i[1] + }).filter(function (v, i, set) { + return set.indexOf(v) === i + }) + + var has = set.map(function (i) { + return [i[0], i[1]] + }).reduce(function (set, kv) { + set[kv[0]] = kv[1] + return set + }, {}) + + var loc = locs.length ? locs.reduce(function (a, b) { + // a=/path/to/node_modules/foo/node_modules/bar + // b=/path/to/node_modules/elk/node_modules/bar + // ==/path/to/node_modules/bar + var nmReg = new RegExp("\\" + path.sep + "node_modules\\" + path.sep) + a = a.split(nmReg) + b = b.split(nmReg) + var name = a.pop() + b.pop() + // find the longest chain that both A and B share. + // then push the name back on it, and join by /node_modules/ + for (var i = 0, al = a.length, bl = b.length; i < al && i < bl && a[i] === b[i]; i++); + return a.slice(0, i).concat(name).join(path.sep + "node_modules" + path.sep) + }) : undefined + + return [item[0], { item: item + , ranges: ranges + , locs: locs + , loc: loc + , has: has + , versions: versions + }] + }).filter(function (i) { + return i[1].loc + }) + + findVersions(npm, summary, function (er, set) { + if (er) return cb(er) + if (!set.length) return cb() + installAndRetest(set, filter, dir, unavoidable, silent, cb) + }) + }) +} + +function installAndRetest (set, filter, dir, unavoidable, silent, cb) { + //return cb(null, set) + var remove = [] + + asyncMap(set, function (item, cb) { + // [name, has, loc, locMatch, regMatch, others] + var name = item[0] + var has = item[1] + var where = item[2] + var locMatch = item[3] + var regMatch = item[4] + var others = item[5] + + // nothing to be done here. oh well. just a conflict. + if (!locMatch && !regMatch) { + log.warn("unavoidable conflict", item[0], item[1]) + log.warn("unavoidable conflict", "Not de-duplicating") + unavoidable[item[0]] = true + return cb() + } + + // nothing to do except to clean up the extraneous deps + if (locMatch && has[where] === locMatch) { + remove.push.apply(remove, others) + return cb() + } + + if (regMatch) { + var what = name + "@" + regMatch + // where is /path/to/node_modules/foo/node_modules/bar + // for package "bar", but we need it to be just + // /path/to/node_modules/foo + var nmReg = new RegExp("\\" + path.sep + "node_modules\\" + path.sep) + where = where.split(nmReg) + where.pop() + where = where.join(path.sep + "node_modules" + path.sep) + remove.push.apply(remove, others) + + return npm.commands.install(where, what, cb) + } + + // hrm? + return cb(new Error("danger zone\n" + name + " " + + regMatch + " " + locMatch)) + + }, function (er) { + if (er) return cb(er) + asyncMap(remove, rm, function (er) { + if (er) return cb(er) + remove.forEach(function (r) { + log.info("rm", r) + }) + dedupe_(dir, filter, unavoidable, false, silent, cb) + }) + }) +} + +function findVersions (npm, summary, cb) { + // now, for each item in the summary, try to find the maximum version + // that will satisfy all the ranges. next step is to install it at + // the specified location. + asyncMap(summary, function (item, cb) { + var name = item[0] + var data = item[1] + var loc = data.loc + var locs = data.locs.filter(function (l) { + return l !== loc + }) + + // not actually a dupe, or perhaps all the other copies were + // children of a dupe, so this'll maybe be picked up later. + if (locs.length === 0) { + return cb(null, []) + } + + // { : } + var has = data.has + + // the versions that we already have. + // if one of these is ok, then prefer to use that. + // otherwise, try fetching from the registry. + var versions = data.versions + + var ranges = data.ranges + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, next) + }) + + function next (er, data) { + var regVersions = er ? [] : Object.keys(data.versions) + var locMatch = bestMatch(versions, ranges) + var tag = npm.config.get("tag") + var distTag = data["dist-tags"] && data["dist-tags"][tag] + + var regMatch + if (distTag && data.versions[distTag] && matches(distTag, ranges)) { + regMatch = distTag + } else { + regMatch = bestMatch(regVersions, ranges) + } + + cb(null, [[name, has, loc, locMatch, regMatch, locs]]) + } + }, cb) +} + +function matches (version, ranges) { + return !ranges.some(function (r) { + return !semver.satisfies(version, r, true) + }) +} + +function bestMatch (versions, ranges) { + return versions.filter(function (v) { + return matches(v, ranges) + }).sort(semver.compareLoose).pop() +} + + +function readInstalled (dir, counter, parent, cb) { + var pkg, children, realpath + + fs.realpath(dir, function (er, rp) { + realpath = rp + next() + }) + + readJson(path.resolve(dir, "package.json"), function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb() // not a package, probably. + counter[data.name] = counter[data.name] || 0 + counter[data.name]++ + pkg = + { _id: data._id + , name: data.name + , version: data.version + , dependencies: data.dependencies || {} + , optionalDependencies: data.optionalDependencies || {} + , devDependencies: data.devDependencies || {} + , bundledDependencies: data.bundledDependencies || [] + , path: dir + , realPath: dir + , children: {} + , parent: parent + , family: Object.create(parent ? parent.family : null) + , unavoidable: false + , duplicate: false + } + if (parent) { + parent.children[data.name] = pkg + parent.family[data.name] = pkg + } + next() + }) + + fs.readdir(path.resolve(dir, "node_modules"), function (er, c) { + children = children || [] // error is ok, just means no children. + // check if there are scoped packages. + asyncMap(c || [], function (child, cb) { + if (child.indexOf('@') === 0) { + fs.readdir(path.resolve(dir, "node_modules", child), function (er, scopedChildren) { + // error is ok, just means no children. + (scopedChildren || []).forEach(function (sc) { + children.push(path.join(child, sc)) + }) + cb() + }) + } else { + children.push(child) + cb() + } + }, function (er) { + if (er) return cb(er) + children = children.filter(function (p) { + return !p.match(/^[\._-]/) + }) + next(); + }); + }) + + function next () { + if (!children || !pkg || !realpath) return + + // ignore devDependencies. Just leave them where they are. + children = children.filter(function (c) { + return !pkg.devDependencies.hasOwnProperty(c) + }) + + pkg.realPath = realpath + if (pkg.realPath !== pkg.path) children = [] + var d = path.resolve(dir, "node_modules") + asyncMap(children, function (child, cb) { + readInstalled(path.resolve(d, child), counter, pkg, cb) + }, function (er) { + cb(er, pkg, counter) + }) + } +} + +function whoDepends (pkg) { + var start = pkg.parent || pkg + return whoDepends_(pkg, [], start) +} + +function whoDepends_ (pkg, who, test) { + if (test !== pkg && + test.dependencies[pkg.name] && + test.family[pkg.name] === pkg) { + who.push(test) + } + Object.keys(test.children).forEach(function (n) { + whoDepends_(pkg, who, test.children[n]) + }) + return who +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/deprecate.js b/bin/nodejs4.6.0/node_modules/npm/lib/deprecate.js new file mode 100644 index 00000000..ba108401 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/deprecate.js @@ -0,0 +1,54 @@ +var npm = require("./npm.js") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + +module.exports = deprecate + +deprecate.usage = "npm deprecate [@] " + +deprecate.completion = function (opts, cb) { + // first, get a list of remote packages this user owns. + // once we have a user account, then don't complete anything. + if (opts.conf.argv.remain.length > 2) return cb() + // get the list of packages by user + var path = "/-/by-user/" + mapToRegistry(path, npm.config, function (er, uri, c) { + if (er) return cb(er) + + if (!(c && c.username)) return cb() + + var params = { + timeout : 60000, + auth : c + } + npm.registry.get(uri + c.username, params, function (er, list) { + if (er) return cb() + console.error(list) + return cb(null, list[c.username]) + }) + }) +} + +function deprecate (args, cb) { + var pkg = args[0] + , msg = args[1] + if (msg === undefined) return cb("Usage: " + deprecate.usage) + + // fetch the data and make sure it exists. + var p = npa(pkg) + + // npa makes the default spec "latest", but for deprecation + // "*" is the appropriate default. + if (p.rawSpec === '') p.spec = '*' + + mapToRegistry(p.name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version : p.spec, + message : msg, + auth : auth + } + npm.registry.deprecate(uri, params, cb) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/dist-tag.js b/bin/nodejs4.6.0/node_modules/npm/lib/dist-tag.js new file mode 100644 index 00000000..6bbdc0a9 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/dist-tag.js @@ -0,0 +1,151 @@ +module.exports = distTag + +var log = require("npmlog") +var npa = require("npm-package-arg") +var semver = require("semver") + +var npm = require("./npm.js") +var mapToRegistry = require("./utils/map-to-registry.js") +var readLocalPkg = require("./utils/read-local-package.js") + +distTag.usage = "npm dist-tag add @ []" + + "\nnpm dist-tag rm " + + "\nnpm dist-tag ls []" + +distTag.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, ["add", "rm", "ls"]) + } + + switch (argv[2]) { + default: + return cb() + } +} + +function distTag (args, cb) { + var cmd = args.shift() + switch (cmd) { + case "add": case "a": case "set": case "s": + return add(args[0], args[1], cb) + case "rm": case "r": case "del": case "d": case "remove": + return remove(args[1], args[0], cb) + case "ls": case "l": case "sl": case "list": + return list(args[0], cb) + default: + return cb("Usage:\n"+distTag.usage) + } +} + +function add (spec, tag, cb) { + var thing = npa(spec || "") + var pkg = thing.name + var version = thing.rawSpec + var t = (tag || npm.config.get("tag")).trim() + + log.verbose("dist-tag add", t, "to", pkg+"@"+version) + + if (!pkg || !version || !t) return cb("Usage:\n"+distTag.usage) + + if (semver.validRange(t)) { + var er = new Error("Tag name must not be a valid SemVer range: " + t) + return cb(er) + } + + fetchTags(pkg, function (er, tags) { + if (er) return cb(er) + + if (tags[t] === version) { + log.warn("dist-tag add", t, "is already set to version", version) + return cb() + } + tags[t] = version + + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + var params = { + package : pkg, + distTag : t, + version : version, + auth : auth + } + + npm.registry.distTags.add(base, params, function (er) { + if (er) return cb(er) + + console.log("+"+t+": "+pkg+"@"+version) + cb() + }) + }) + }) +} + +function remove (tag, pkg, cb) { + log.verbose("dist-tag del", tag, "from", pkg) + + fetchTags(pkg, function (er, tags) { + if (er) return cb(er) + + if (!tags[tag]) { + log.info("dist-tag del", tag, "is not a dist-tag on", pkg) + return cb(new Error(tag+" is not a dist-tag on "+pkg)) + } + + var version = tags[tag] + delete tags[tag] + + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + var params = { + package : pkg, + distTag : tag, + auth : auth + } + + npm.registry.distTags.rm(base, params, function (er) { + if (er) return cb(er) + + console.log("-"+tag+": "+pkg+"@"+version) + cb() + }) + }) + }) +} + +function list (pkg, cb) { + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(distTag.usage) + list(pkg, cb) + }) + + fetchTags(pkg, function (er, tags) { + if (er) { + log.error("dist-tag ls", "Couldn't get dist-tag data for", pkg) + return cb(er) + } + var msg = Object.keys(tags).map(function (k) { + return k+": "+tags[k] + }).sort().join("\n") + console.log(msg) + cb(er, tags) + }) +} + +function fetchTags (pkg, cb) { + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + if (er) return cb(er) + + var params = { + package : pkg, + auth : auth + } + npm.registry.distTags.fetch(base, params, function (er, tags) { + if (er) return cb(er) + if (!tags || !Object.keys(tags).length) { + return cb(new Error("No dist-tags found for " + pkg)) + } + + cb(null, tags) + }) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/docs.js b/bin/nodejs4.6.0/node_modules/npm/lib/docs.js new file mode 100644 index 00000000..f484f01f --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/docs.js @@ -0,0 +1,71 @@ +module.exports = docs + +docs.usage = "npm docs " +docs.usage += "\n" +docs.usage += "npm docs ." + +var npm = require("./npm.js") + , opener = require("opener") + , path = require("path") + , log = require("npmlog") + , mapToRegistry = require("./utils/map-to-registry.js") + +docs.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function url (json) { + return json.homepage ? json.homepage : "https://npmjs.org/package/" + json.name +} + +function docs (args, cb) { + args = args || [] + var pending = args.length + if (!pending) return getDoc(".", cb) + args.forEach(function(proj) { + getDoc(proj, function(err) { + if (err) { + return cb(err) + } + --pending || cb() + }) + }) +} + +function getDoc (project, cb) { + project = project || "." + var package = path.resolve(npm.localPrefix, "package.json") + + if (project === "." || project === "./") { + var json + try { + json = require(package) + if (!json.name) throw new Error('package.json does not have a valid "name" property') + project = json.name + } catch (e) { + log.error(e.message) + return cb(docs.usage) + } + + return opener(url(json), { command: npm.config.get("browser") }, cb) + } + + mapToRegistry(project, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri + "/latest", { timeout : 3600, auth : auth }, next) + }) + + function next (er, json) { + var github = "https://github.com/" + project + "#readme" + + if (er) { + if (project.split("/").length !== 2) return cb(er) + return opener(github, { command: npm.config.get("browser") }, cb) + } + + return opener(url(json), { command: npm.config.get("browser") }, cb) + } +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/edit.js b/bin/nodejs4.6.0/node_modules/npm/lib/edit.js new file mode 100644 index 00000000..df2a6aaf --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/edit.js @@ -0,0 +1,31 @@ +// npm edit [@] +// open the package folder in the $EDITOR + +module.exports = edit +edit.usage = "npm edit " + +edit.completion = require("./utils/completion/installed-shallow.js") + +var npm = require("./npm.js") + , path = require("path") + , fs = require("graceful-fs") + , editor = require("editor") + +function edit (args, cb) { + var p = args[0] + if (args.length !== 1 || !p) return cb(edit.usage) + var e = npm.config.get("editor") + if (!e) return cb(new Error( + "No editor set. Set the 'editor' config, or $EDITOR environ.")) + p = p.split("/") + .join("/node_modules/") + .replace(/(\/node_modules)+/, "/node_modules") + var f = path.resolve(npm.dir, p) + fs.lstat(f, function (er) { + if (er) return cb(er) + editor(f, { editor: e }, function (er) { + if (er) return cb(er) + npm.commands.rebuild(args, cb) + }) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/explore.js b/bin/nodejs4.6.0/node_modules/npm/lib/explore.js new file mode 100644 index 00000000..1bd9ee0b --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/explore.js @@ -0,0 +1,37 @@ +// npm explore [@] +// open a subshell to the package folder. + +module.exports = explore +explore.usage = "npm explore [ -- ]" +explore.completion = require("./utils/completion/installed-shallow.js") + +var npm = require("./npm.js") + , spawn = require("./utils/spawn") + , path = require("path") + , fs = require("graceful-fs") + +function explore (args, cb) { + if (args.length < 1 || !args[0]) return cb(explore.usage) + var p = args.shift() + args = args.join(" ").trim() + if (args) args = ["-c", args] + else args = [] + + var cwd = path.resolve(npm.dir, p) + var sh = npm.config.get("shell") + fs.stat(cwd, function (er, s) { + if (er || !s.isDirectory()) return cb(new Error( + "It doesn't look like "+p+" is installed.")) + if (!args.length) console.log( + "\nExploring "+cwd+"\n"+ + "Type 'exit' or ^D when finished\n") + + npm.spinner.stop() + var shell = spawn(sh, args, { cwd: cwd, stdio: "inherit" }) + shell.on("close", function (er) { + // only fail if non-interactive. + if (!args.length) return cb() + cb(er) + }) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/faq.js b/bin/nodejs4.6.0/node_modules/npm/lib/faq.js new file mode 100644 index 00000000..a1d515aa --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/faq.js @@ -0,0 +1,8 @@ + +module.exports = faq + +faq.usage = "npm faq" + +var npm = require("./npm.js") + +function faq (args, cb) { npm.commands.help(["faq"], cb) } diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/get.js b/bin/nodejs4.6.0/node_modules/npm/lib/get.js new file mode 100644 index 00000000..67fe602d --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/get.js @@ -0,0 +1,12 @@ + +module.exports = get + +get.usage = "npm get (See `npm config`)" + +var npm = require("./npm.js") + +get.completion = npm.commands.config.completion + +function get (args, cb) { + npm.commands.config(["get"].concat(args), cb) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/help-search.js b/bin/nodejs4.6.0/node_modules/npm/lib/help-search.js new file mode 100644 index 00000000..44c8c95d --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/help-search.js @@ -0,0 +1,210 @@ + +module.exports = helpSearch + +var fs = require("graceful-fs") + , path = require("path") + , asyncMap = require("slide").asyncMap + , npm = require("./npm.js") + , glob = require("glob") + , color = require("ansicolors") + +helpSearch.usage = "npm help-search " + +function helpSearch (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + if (!args.length) return cb(helpSearch.usage) + + var docPath = path.resolve(__dirname, "..", "doc") + return glob(docPath + "/*/*.md", function (er, files) { + if (er) + return cb(er) + readFiles(files, function (er, data) { + if (er) + return cb(er) + searchFiles(args, data, function (er, results) { + if (er) + return cb(er) + formatResults(args, results, cb) + }) + }) + }) +} + +function readFiles (files, cb) { + var res = {} + asyncMap(files, function (file, cb) { + fs.readFile(file, 'utf8', function (er, data) { + res[file] = data + return cb(er) + }) + }, function (er) { + return cb(er, res) + }) +} + +function searchFiles (args, files, cb) { + var results = [] + Object.keys(files).forEach(function (file) { + var data = files[file] + + // skip if no matches at all + var match + for (var a = 0, l = args.length; a < l && !match; a++) { + match = data.toLowerCase().indexOf(args[a].toLowerCase()) !== -1 + } + if (!match) + return + + var lines = data.split(/\n+/) + + // if a line has a search term, then skip it and the next line. + // if the next line has a search term, then skip all 3 + // otherwise, set the line to null. then remove the nulls. + l = lines.length + for (var i = 0; i < l; i ++) { + var line = lines[i] + , nextLine = lines[i + 1] + , ll + + match = false + if (nextLine) { + for (a = 0, ll = args.length; a < ll && !match; a ++) { + match = nextLine.toLowerCase() + .indexOf(args[a].toLowerCase()) !== -1 + } + if (match) { + // skip over the next line, and the line after it. + i += 2 + continue + } + } + + match = false + for (a = 0, ll = args.length; a < ll && !match; a ++) { + match = line.toLowerCase().indexOf(args[a].toLowerCase()) !== -1 + } + if (match) { + // skip over the next line + i ++ + continue + } + + lines[i] = null + } + + // now squish any string of nulls into a single null + lines = lines.reduce(function (l, r) { + if (!(r === null && l[l.length-1] === null)) l.push(r) + return l + }, []) + + if (lines[lines.length - 1] === null) lines.pop() + if (lines[0] === null) lines.shift() + + // now see how many args were found at all. + var found = {} + , totalHits = 0 + lines.forEach(function (line) { + args.forEach(function (arg) { + var hit = (line || "").toLowerCase() + .split(arg.toLowerCase()).length - 1 + if (hit > 0) { + found[arg] = (found[arg] || 0) + hit + totalHits += hit + } + }) + }) + + var cmd = "npm help " + if (path.basename(path.dirname(file)) === "api") { + cmd = "npm apihelp " + } + cmd += path.basename(file, ".md").replace(/^npm-/, "") + results.push({ file: file + , cmd: cmd + , lines: lines + , found: Object.keys(found) + , hits: found + , totalHits: totalHits + }) + }) + + // if only one result, then just show that help section. + if (results.length === 1) { + return npm.commands.help([results[0].file.replace(/\.md$/, "")], cb) + } + + if (results.length === 0) { + console.log("No results for " + args.map(JSON.stringify).join(" ")) + return cb() + } + + // sort results by number of results found, then by number of hits + // then by number of matching lines + results = results.sort(function (a, b) { + return a.found.length > b.found.length ? -1 + : a.found.length < b.found.length ? 1 + : a.totalHits > b.totalHits ? -1 + : a.totalHits < b.totalHits ? 1 + : a.lines.length > b.lines.length ? -1 + : a.lines.length < b.lines.length ? 1 + : 0 + }) + + cb(null, results) +} + +function formatResults (args, results, cb) { + if (!results) return cb(null) + + var cols = Math.min(process.stdout.columns || Infinity, 80) + 1 + + var out = results.map(function (res) { + var out = res.cmd + , r = Object.keys(res.hits).map(function (k) { + return k + ":" + res.hits[k] + }).sort(function (a, b) { + return a > b ? 1 : -1 + }).join(" ") + + out += ((new Array(Math.max(1, cols - out.length - r.length))) + .join(" ")) + r + + if (!npm.config.get("long")) return out + + out = "\n\n" + out + + "\n" + (new Array(cols)).join("—") + "\n" + + res.lines.map(function (line, i) { + if (line === null || i > 3) return "" + for (var out = line, a = 0, l = args.length; a < l; a ++) { + var finder = out.toLowerCase().split(args[a].toLowerCase()) + , newOut = "" + , p = 0 + + finder.forEach(function (f) { + newOut += out.substr(p, f.length) + + var hilit = out.substr(p + f.length, args[a].length) + if (npm.color) hilit = color.bgBlack(color.red(hilit)) + newOut += hilit + + p += f.length + args[a].length + }) + } + + return newOut + }).join("\n").trim() + return out + }).join("\n") + + if (results.length && !npm.config.get("long")) { + out = "Top hits for "+(args.map(JSON.stringify).join(" ")) + + "\n" + (new Array(cols)).join("—") + "\n" + + out + + "\n" + (new Array(cols)).join("—") + "\n" + + "(run with -l or --long to see more context)" + } + + console.log(out.trim()) + cb(null, results) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/help.js b/bin/nodejs4.6.0/node_modules/npm/lib/help.js new file mode 100644 index 00000000..5e6c8b8d --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/help.js @@ -0,0 +1,240 @@ + +module.exports = help + +help.completion = function (opts, cb) { + if (opts.conf.argv.remain.length > 2) return cb(null, []) + getSections(cb) +} + +var path = require("path") + , spawn = require("./utils/spawn") + , npm = require("./npm.js") + , log = require("npmlog") + , opener = require("opener") + , glob = require("glob") + +function help (args, cb) { + npm.spinner.stop() + var argv = npm.config.get("argv").cooked + + var argnum = 0 + if (args.length === 2 && ~~args[0]) { + argnum = ~~args.shift() + } + + // npm help foo bar baz: search topics + if (args.length > 1 && args[0]) { + return npm.commands["help-search"](args, argnum, cb) + } + + var section = npm.deref(args[0]) || args[0] + + // npm help : show basic usage + if (!section) { + var valid = argv[0] === "help" ? 0 : 1 + return npmUsage(valid, cb) + } + + + // npm -h: show command usage + if ( npm.config.get("usage") + && npm.commands[section] + && npm.commands[section].usage + ) { + npm.config.set("loglevel", "silent") + log.level = "silent" + console.log(npm.commands[section].usage) + return cb() + } + + // npm apihelp
    : Prefer section 3 over section 1 + var apihelp = argv.length && -1 !== argv[0].indexOf("api") + var pref = apihelp ? [3, 1, 5, 7] : [1, 3, 5, 7] + if (argnum) + pref = [ argnum ].concat(pref.filter(function (n) { + return n !== argnum + })) + + // npm help
    : Try to find the path + var manroot = path.resolve(__dirname, "..", "man") + + // legacy + if (section === "global") section = "folders" + else if (section === "json") section = "package.json" + + // find either /section.n or /npm-section.n + // The glob is used in the glob. The regexp is used much + // further down. Globs and regexps are different + var compextglob = ".+(gz|bz2|lzma|[FYzZ]|xz)" + var compextre = "\\.(gz|bz2|lzma|[FYzZ]|xz)$" + var f = "+(npm-" + section + "|" + section + ").[0-9]?(" + compextglob + ")" + return glob(manroot + "/*/" + f, function (er, mans) { + if (er) return cb(er) + + if (!mans.length) return npm.commands["help-search"](args, cb) + + mans = mans.map(function (man) { + var ext = path.extname(man) + if (man.match(new RegExp(compextre))) man = path.basename(man, ext) + + return man + }) + + viewMan(pickMan(mans, pref), cb) + }) +} + +function pickMan (mans, pref_) { + var nre = /([0-9]+)$/ + var pref = {} + pref_.forEach(function (sect, i) { + pref[sect] = i + }) + mans = mans.sort(function (a, b) { + var an = a.match(nre)[1] + var bn = b.match(nre)[1] + return an === bn ? (a > b ? -1 : 1) + : pref[an] < pref[bn] ? -1 + : 1 + }) + return mans[0] +} + +function viewMan (man, cb) { + var nre = /([0-9]+)$/ + var num = man.match(nre)[1] + var section = path.basename(man, "." + num) + + // at this point, we know that the specified man page exists + var manpath = path.join(__dirname, "..", "man") + , env = {} + Object.keys(process.env).forEach(function (i) { + env[i] = process.env[i] + }) + env.MANPATH = manpath + var viewer = npm.config.get("viewer") + + var conf + switch (viewer) { + case "woman": + var a = ["-e", "(woman-find-file \"" + man + "\")"] + conf = { env: env, stdio: "inherit" } + var woman = spawn("emacsclient", a, conf) + woman.on("close", cb) + break + + case "browser": + opener(htmlMan(man), { command: npm.config.get("browser") }, cb) + break + + default: + conf = { env: env, stdio: "inherit" } + var manProcess = spawn("man", [num, section], conf) + manProcess.on("close", cb) + break + } +} + +function htmlMan (man) { + var sect = +man.match(/([0-9]+)$/)[1] + var f = path.basename(man).replace(/([0-9]+)$/, "html") + switch (sect) { + case 1: + sect = "cli" + break + case 3: + sect = "api" + break + case 5: + sect = "files" + break + case 7: + sect = "misc" + break + default: + throw new Error("invalid man section: " + sect) + } + return path.resolve(__dirname, "..", "html", "doc", sect, f) +} + +function npmUsage (valid, cb) { + npm.config.set("loglevel", "silent") + log.level = "silent" + console.log( + [ "\nUsage: npm " + , "" + , "where is one of:" + , npm.config.get("long") ? usages() + : " " + wrap(Object.keys(npm.commands)) + , "" + , "npm -h quick help on " + , "npm -l display full usage info" + , "npm faq commonly asked questions" + , "npm help search for help on " + , "npm help npm involved overview" + , "" + , "Specify configs in the ini-formatted file:" + , " " + npm.config.get("userconfig") + , "or on the command line via: npm --key value" + , "Config info can be viewed via: npm help config" + , "" + , "npm@" + npm.version + " " + path.dirname(__dirname) + ].join("\n")) + cb(valid) +} + +function usages () { + // return a string of : + var maxLen = 0 + return Object.keys(npm.commands).filter(function (c) { + return c === npm.deref(c) + }).reduce(function (set, c) { + set.push([c, npm.commands[c].usage || ""]) + maxLen = Math.max(maxLen, c.length) + return set + }, []).map(function (item) { + var c = item[0] + , usage = item[1] + return "\n " + c + (new Array(maxLen - c.length + 2).join(" ")) + + (usage.split("\n") + .join("\n" + (new Array(maxLen + 6).join(" ")))) + }).join("\n") +} + + +function wrap (arr) { + var out = [""] + , l = 0 + , line + + line = process.stdout.columns + if (!line) + line = 60 + else + line = Math.min(60, Math.max(line - 16, 24)) + + arr.sort(function (a,b) { return a --save` afterwards to install a package and" + ,"save it as a dependency in the package.json file." + ,"" + ,"Press ^C at any time to quit." + ].join("\n")) + } + initJson(dir, initFile, npm.config, function (er, data) { + log.resume() + log.silly("package data", data) + if (er && er.message === "canceled") { + log.warn("init", "canceled") + return cb(null, data) + } + log.info("init", "written successfully") + cb(er, data) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/install.js b/bin/nodejs4.6.0/node_modules/npm/lib/install.js new file mode 100644 index 00000000..9f0d7da6 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/install.js @@ -0,0 +1,1196 @@ +// npm install +// +// See doc/cli/npm-install.md for more description +// +// Managing contexts... +// there's a lot of state associated with an "install" operation, including +// packages that are already installed, parent packages, current shrinkwrap, and +// so on. We maintain this state in a "context" object that gets passed around. +// every time we dive into a deeper node_modules folder, the "family" list that +// gets passed along uses the previous "family" list as its __proto__. Any +// "resolved precise dependency" things that aren't already on this object get +// added, and then that's passed to the next generation of installation. + +module.exports = install + +install.usage = "npm install" + + "\nnpm install " + + "\nnpm install @" + + "\nnpm install @" + + "\nnpm install @" + + "\nnpm install " + + "\nnpm install " + + "\nnpm install " + + "\nnpm install " + + "\nnpm install /" + + "\n\nCan specify one or more: npm install ./foo.tgz bar@stable /some/folder" + + "\nIf no argument is supplied and ./npm-shrinkwrap.json is " + + "\npresent, installs dependencies specified in the shrinkwrap." + + "\nOtherwise, installs dependencies from ./package.json." + +install.completion = function (opts, cb) { + // install can complete to a folder with a package.json, or any package. + // if it has a slash, then it's gotta be a folder + // if it starts with https?://, then just give up, because it's a url + if (/^https?:\/\//.test(opts.partialWord)) { + // do not complete to URLs + return cb(null, []) + } + + if (/\//.test(opts.partialWord)) { + // Complete fully to folder if there is exactly one match and it + // is a folder containing a package.json file. If that is not the + // case we return 0 matches, which will trigger the default bash + // complete. + var lastSlashIdx = opts.partialWord.lastIndexOf("/") + var partialName = opts.partialWord.slice(lastSlashIdx + 1) + var partialPath = opts.partialWord.slice(0, lastSlashIdx) + if (partialPath === "") partialPath = "/" + + function annotatePackageDirMatch (sibling, cb) { + var fullPath = path.join(partialPath, sibling) + if (sibling.slice(0, partialName.length) !== partialName) { + return cb(null, null) // not name match + } + fs.readdir(fullPath, function (err, contents) { + if (err) return cb(null, { isPackage: false }) + + cb( + null, + { + fullPath: fullPath, + isPackage: contents.indexOf("package.json") !== -1 + } + ) + }) + } + + return fs.readdir(partialPath, function (err, siblings) { + if (err) return cb(null, []) // invalid dir: no matching + + asyncMap(siblings, annotatePackageDirMatch, function (err, matches) { + if (err) return cb(err) + + var cleaned = matches.filter(function (x) { return x !== null }) + if (cleaned.length !== 1) return cb(null, []) + if (!cleaned[0].isPackage) return cb(null, []) + + // Success - only one match and it is a package dir + return cb(null, [cleaned[0].fullPath]) + }) + }) + } + + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +var npm = require("./npm.js") + , semver = require("semver") + , readJson = require("read-package-json") + , readInstalled = require("read-installed") + , log = require("npmlog") + , path = require("path") + , fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , cache = require("./cache.js") + , asyncMap = require("slide").asyncMap + , chain = require("slide").chain + , url = require("url") + , mkdir = require("mkdirp") + , lifecycle = require("./utils/lifecycle.js") + , archy = require("archy") + , npmInstallChecks = require("npm-install-checks") + , sortedObject = require("sorted-object") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , inflight = require("inflight") + , locker = require("./utils/locker.js") + , lock = locker.lock + , unlock = locker.unlock + , warnStrict = require("./utils/warn-deprecated.js")("engineStrict") + , warnPeers = require("./utils/warn-deprecated.js")("peerDependencies") + +function install (args, cb_) { + var hasArguments = !!args.length + + function cb (er, installed) { + if (er) return cb_(er) + + validateInstall(where, function (er, problem) { + if (er) return cb_(er) + + if (problem) { + var peerInvalidError = new Error("The package " + problem._id + + " does not satisfy its siblings' peerDependencies requirements!") + peerInvalidError.code = "EPEERINVALID" + peerInvalidError.packageName = problem.name + peerInvalidError.packageVersion = problem.version + peerInvalidError.peersDepending = problem.peersDepending + return cb(peerInvalidError) + } + + var tree = treeify(installed || []) + , pretty = prettify(tree, installed).trim() + + if (pretty) console.log(pretty) + save(where, installed, tree, pretty, hasArguments, cb_) + }) + } + + // the /path/to/node_modules/.. + var where = path.resolve(npm.dir, "..") + + // internal api: install(where, what, cb) + if (arguments.length === 3) { + where = args + args = [].concat(cb_) // pass in [] to do default dep-install + cb_ = arguments[2] + log.verbose("install", "where, what", [where, args]) + } + + if (!npm.config.get("global")) { + args = args.filter(function (a) { + return path.resolve(a) !== where + }) + } + + mkdir(where, function (er) { + if (er) return cb(er) + // install dependencies locally by default, + // or install current folder globally + if (!args.length) { + var opt = { dev: npm.config.get("dev") || !npm.config.get("production") } + + if (npm.config.get("global")) args = ["."] + else return readDependencies(null, where, opt, function (er, data) { + if (er) { + log.error("install", "Couldn't read dependencies") + return cb(er) + } + var deps = Object.keys(data.dependencies || {}) + log.verbose("install", "where, deps", [where, deps]) + + // FIXME: Install peerDependencies as direct dependencies, but only at + // the top level. Should only last until peerDependencies are nerfed to + // no longer implicitly install themselves. + var peers = [] + Object.keys(data.peerDependencies || {}).forEach(function (dep) { + if (!data.dependencies[dep]) { + log.verbose( + "install", + "peerDependency", dep, "wasn't going to be installed; adding" + ) + warnPeers([ + "The peer dependency "+dep+" included from "+data.name+" will no", + "longer be automatically installed to fulfill the peerDependency ", + "in npm 3+. Your application will need to depend on it explicitly." + ], dep+","+data.name) + peers.push(dep) + } + }) + log.verbose("install", "where, peers", [where, peers]) + + var context = { family: {} + , ancestors: {} + , explicit: false + , parent: data + , root: true + , wrap: null } + + if (data.name === path.basename(where) && + path.basename(path.dirname(where)) === "node_modules") { + // Only include in ancestry if it can actually be required. + // Otherwise, it does not count. + context.family[data.name] = + context.ancestors[data.name] = data.version + } + + installManyTop(deps.map(function (dep) { + var target = data.dependencies[dep] + return dep + "@" + target + }).concat(peers.map(function (dep) { + var target = data.peerDependencies[dep] + return dep + "@" + target + })), where, context, function(er, results) { + if (er || npm.config.get("production")) return cb(er, results) + lifecycle(data, "prepublish", where, function(er) { + return cb(er, results) + }) + }) + }) + } + + // initial "family" is the name:version of the root, if it's got + // a package.json file. + var jsonPath = path.resolve(where, "package.json") + log.verbose('install', 'initial load of', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + if (er + && er.code !== "ENOENT" + && er.code !== "ENOTDIR") return cb(er) + if (er) data = null + var context = { family: {} + , ancestors: {} + , explicit: true + , parent: data + , root: true + , wrap: null } + if (data && data.name === path.basename(where) && + path.basename(path.dirname(where)) === "node_modules") { + context.family[data.name] = context.ancestors[data.name] = data.version + } + var fn = npm.config.get("global") ? installMany : installManyTop + fn(args, where, context, cb) + }) + }) +} + +function validateInstall (where, cb) { + var jsonPath = path.resolve(where, 'package.json') + log.verbose('validateInstall', 'loading', jsonPath, 'for validation') + readJson(jsonPath, log.warn, function (er, data) { + if (er + && er.code !== 'ENOENT' + && er.code !== 'ENOTDIR') return cb(er) + + if (data && data.engineStrict) { + warnStrict([ + "Per-package engineStrict (found in this package's package.json) ", + "won't be used in npm 3+. Use the config setting `engine-strict` instead." + ], data.name) + } + + readInstalled(where, { log: log.warn, dev: true }, function (er, data) { + if (er) return cb(er) + + cb(null, findPeerInvalid_(data.dependencies, [])) + }) + }) +} + +function findPeerInvalid_ (packageMap, fpiList) { + if (fpiList.indexOf(packageMap) !== -1) + return undefined + + fpiList.push(packageMap) + + for (var packageName in packageMap) { + var pkg = packageMap[packageName] + + if (pkg.peerInvalid) { + var peersDepending = {} + for (var peerName in packageMap) { + var peer = packageMap[peerName] + if (peer.peerDependencies && peer.peerDependencies[packageName]) { + peersDepending[peer.name + "@" + peer.version] = + peer.peerDependencies[packageName] + } + } + return { name: pkg.name, peersDepending: peersDepending, version: pkg.version, _id: pkg._id } + } + + if (pkg.dependencies) { + var invalid = findPeerInvalid_(pkg.dependencies, fpiList) + if (invalid) + return invalid + } + } + + return null +} + +// reads dependencies for the package at "where". There are several cases, +// depending on our current state and the package's configuration: +// +// 1. If "context" is specified, then we examine the context to see if there's a +// shrinkwrap there. In that case, dependencies are read from the shrinkwrap. +// 2. Otherwise, if an npm-shrinkwrap.json file is present, dependencies are +// read from there. +// 3. Otherwise, dependencies come from package.json. +// +// Regardless of which case we fall into, "cb" is invoked with a first argument +// describing the full package (as though readJson had been used) but with +// "dependencies" read as described above. The second argument to "cb" is the +// shrinkwrap to use in processing this package's dependencies, which may be +// "wrap" (in case 1) or a new shrinkwrap (in case 2). +function readDependencies (context, where, opts, cb) { + var wrap = context ? context.wrap : null + + var jsonPath = path.resolve(where, 'package.json') + log.verbose('readDependencies', 'loading dependencies from', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + if (er && er.code === "ENOENT") er.code = "ENOPACKAGEJSON" + if (er) return cb(er) + + if (opts && opts.dev) { + if (!data.dependencies) data.dependencies = {} + Object.keys(data.devDependencies || {}).forEach(function (k) { + if (data.dependencies[k]) { + log.warn("package.json", "Dependency '%s' exists in both dependencies " + + "and devDependencies, using '%s@%s' from dependencies", + k, k, data.dependencies[k]) + } else { + data.dependencies[k] = data.devDependencies[k] + } + }) + } + + if (!npm.config.get("optional") && data.optionalDependencies) { + Object.keys(data.optionalDependencies).forEach(function (d) { + delete data.dependencies[d] + }) + } + + // User has opted out of shrinkwraps entirely + if (npm.config.get("shrinkwrap") === false) + return cb(null, data, null) + + if (wrap) { + log.verbose("readDependencies: using existing wrap", [where, wrap]) + var rv = {} + Object.keys(data).forEach(function (key) { + rv[key] = data[key] + }) + rv.dependencies = {} + Object.keys(wrap).forEach(function (key) { + log.verbose("from wrap", [key, wrap[key]]) + rv.dependencies[key] = readWrap(wrap[key]) + }) + log.verbose("readDependencies returned deps", rv.dependencies) + return cb(null, rv, wrap) + } + + var wrapfile = path.resolve(where, "npm-shrinkwrap.json") + + fs.readFile(wrapfile, "utf8", function (er, wrapjson) { + if (er) return cb(null, data, null) + + log.verbose("readDependencies", "npm-shrinkwrap.json is overriding dependencies") + var newwrap + try { + newwrap = JSON.parse(wrapjson) + } catch (ex) { + return cb(ex) + } + + log.info("shrinkwrap", "file %j", wrapfile) + var rv = {} + Object.keys(data).forEach(function (key) { + rv[key] = data[key] + }) + rv.dependencies = {} + Object.keys(newwrap.dependencies || {}).forEach(function (key) { + rv.dependencies[key] = readWrap(newwrap.dependencies[key]) + }) + + // fold in devDependencies if not already present, at top level + if (opts && opts.dev) { + Object.keys(data.devDependencies || {}).forEach(function (k) { + rv.dependencies[k] = rv.dependencies[k] || data.devDependencies[k] + }) + } + + log.verbose("readDependencies returned deps", rv.dependencies) + return cb(null, rv, newwrap.dependencies) + }) + }) +} + +function readWrap (w) { + return (w.resolved) ? w.resolved + : (w.from && url.parse(w.from).protocol) ? w.from + : w.version +} + +// if the -S|--save option is specified, then write installed packages +// as dependencies to a package.json file. +function save (where, installed, tree, pretty, hasArguments, cb) { + if (!hasArguments || + !npm.config.get("save") && + !npm.config.get("save-dev") && + !npm.config.get("save-optional") || + npm.config.get("global")) { + return cb(null, installed, tree, pretty) + } + + var saveBundle = npm.config.get("save-bundle") + var savePrefix = npm.config.get("save-prefix") + + // each item in the tree is a top-level thing that should be saved + // to the package.json file. + // The relevant tree shape is { : {what:} } + var saveTarget = path.resolve(where, "package.json") + + asyncMap(Object.keys(tree), function (k, cb) { + // if "from" is remote, git, or hosted, then save that instead. + var t = tree[k] + , f = npa(t.from) + , a = npa(t.what) + , w = [a.name, a.spec] + + + fs.stat(t.from, function (er){ + if (!er) { + w[1] = "file:" + t.from + } else if (['hosted', 'git', 'remote'].indexOf(f.type) !== -1) { + w[1] = t.from + } + cb(null, [w]) + }) + } + , function (er, arr) { + var things = arr.reduce(function (set, k) { + var rangeDescriptor = semver.valid(k[1], true) && + semver.gte(k[1], "0.1.0", true) && + !npm.config.get("save-exact") + ? savePrefix : "" + set[k[0]] = rangeDescriptor + k[1] + return set + }, {}) + + + // don't use readJson, because we don't want to do all the other + // tricky npm-specific stuff that's in there. + fs.readFile(saveTarget, function (er, data) { + // ignore errors here, just don't save it. + try { + data = JSON.parse(data.toString("utf8")) + } catch (ex) { + er = ex + } + + if (er) { + return cb(null, installed, tree, pretty) + } + + var deps = npm.config.get("save-optional") ? "optionalDependencies" + : npm.config.get("save-dev") ? "devDependencies" + : "dependencies" + + if (saveBundle) { + var bundle = data.bundleDependencies || data.bundledDependencies + delete data.bundledDependencies + if (!Array.isArray(bundle)) bundle = [] + data.bundleDependencies = bundle.sort() + } + + log.verbose("save", "saving", things) + data[deps] = data[deps] || {} + Object.keys(things).forEach(function (t) { + data[deps][t] = things[t] + if (saveBundle) { + var i = bundle.indexOf(t) + if (i === -1) bundle.push(t) + data.bundleDependencies = bundle.sort() + } + }) + + data[deps] = sortedObject(data[deps]) + + log.silly("save", "writing", saveTarget) + data = JSON.stringify(data, null, 2) + "\n" + writeFileAtomic(saveTarget, data, function (er) { + cb(er, installed, tree, pretty) + }) + }) + }) +} + + +// Outputting *all* the installed modules is a bit confusing, +// because the length of the path does not make it clear +// that the submodules are not immediately require()able. +// TODO: Show the complete tree, ls-style, but only if --long is provided +function prettify (tree, installed) { + function red (set, kv) { + set[kv[0]] = kv[1] + return set + } + + if (npm.config.get("json")) { + tree = Object.keys(tree).map(function (p) { + if (!tree[p]) return null + var what = npa(tree[p].what) + , name = what.name + , version = what.spec + , o = { name: name, version: version, from: tree[p].from } + o.dependencies = tree[p].children.map(function P (dep) { + var what = npa(dep.what) + , name = what.name + , version = what.spec + , o = { version: version, from: dep.from } + o.dependencies = dep.children.map(P).reduce(red, {}) + return [name, o] + }).reduce(red, {}) + return o + }) + + return JSON.stringify(tree, null, 2) + } + if (npm.config.get("parseable")) return parseable(installed) + + return Object.keys(tree).map(function (p) { + return archy({ label: tree[p].what + " " + p + , nodes: (tree[p].children || []).map(function P (c) { + if (npm.config.get("long")) { + return { label: c.what, nodes: c.children.map(P) } + } + var g = c.children.map(function (g) { + return g.what + }).join(", ") + if (g) g = " (" + g + ")" + return c.what + g + }) + }, "", { unicode: npm.config.get("unicode") }) + }).join("\n") +} + +function parseable (installed) { + var long = npm.config.get("long") + , cwd = process.cwd() + return installed.map(function (item) { + return path.resolve(cwd, item[1]) + + ( long ? ":" + item[0] : "" ) + }).join("\n") +} + +function treeify (installed) { + // each item is [what, where, parent, parentDir] + // If no parent, then report it. + // otherwise, tack it into the parent's children list. + // If the parent isn't a top-level then ignore it. + var whatWhere = installed.reduce(function (l, r) { + var parentDir = r[3] + , parent = r[2] + , where = r[1] + , what = r[0] + , from = r[4] + l[where] = { parentDir: parentDir + , parent: parent + , children: [] + , where: where + , what: what + , from: from } + return l + }, {}) + + // log.warn("install", whatWhere, "whatWhere") + return Object.keys(whatWhere).reduce(function (l, r) { + var ww = whatWhere[r] + //log.warn("r, ww", [r, ww]) + if (!ww.parent) { + l[r] = ww + } else { + var p = whatWhere[ww.parentDir] + if (p) p.children.push(ww) + else l[r] = ww + } + return l + }, {}) +} + + +// just like installMany, but also add the existing packages in +// where/node_modules to the family object. +function installManyTop (what, where, context, cb_) { + function cb (er, d) { + if (context.explicit || er) return cb_(er, d) + // since this wasn't an explicit install, let's build the top + // folder, so that `npm install` also runs the lifecycle scripts. + npm.commands.build([where], false, true, function (er) { + return cb_(er, d) + }) + } + + if (context.explicit) return next() + + var jsonPath = path.join(where, 'package.json') + log.verbose('installManyTop', 'reading for lifecycle', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + if (er) return next(er) + lifecycle(data, "preinstall", where, next) + }) + + function next (er) { + if (er) return cb(er) + installManyTop_(what, where, context, cb) + } +} + +function installManyTop_ (what, where, context, cb) { + var nm = path.resolve(where, "node_modules") + + fs.readdir(nm, function (er, pkgs) { + if (er) return installMany(what, where, context, cb) + + var scopes = [], unscoped = [] + pkgs.filter(function (p) { + return !p.match(/^[\._-]/) + }).forEach(function (p) { + // @names deserve deeper investigation + if (p[0] === "@") { + scopes.push(p) + } + else { + unscoped.push(p) + } + }) + + maybeScoped(scopes, nm, function (er, scoped) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + // recombine unscoped with @scope/package packages + asyncMap(unscoped.concat(scoped).map(function (p) { + return path.resolve(nm, p, "package.json") + }), function (jsonPath, cb) { + log.verbose('installManyTop', 'reading scoped package data from', jsonPath) + readJson(jsonPath, log.info, function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb(null, []) + cb(null, [[data.name, data.version]]) + }) + }, function (er, packages) { + // if there's nothing in node_modules, then don't freak out. + if (er) packages = [] + // add all the existing packages to the family list. + // however, do not add to the ancestors list. + packages.forEach(function (p) { + context.family[p[0]] = p[1] + }) + installMany(what, where, context, cb) + }) + }) + }) +} + +function maybeScoped (scopes, where, cb) { + // find packages in scopes + asyncMap(scopes, function (scope, cb) { + fs.readdir(path.resolve(where, scope), function (er, scoped) { + if (er) return cb(er) + var paths = scoped.map(function (p) { + return path.join(scope, p) + }) + cb(null, paths) + }) + }, cb) +} + +function installMany (what, where, context, cb) { + // readDependencies takes care of figuring out whether the list of + // dependencies we'll iterate below comes from an existing shrinkwrap from a + // parent level, a new shrinkwrap at this level, or package.json at this + // level, as well as which shrinkwrap (if any) our dependencies should use. + var opt = { dev: npm.config.get("dev") } + readDependencies(context, where, opt, function (er, data, wrap) { + if (er) data = {} + + var parent = data + + // if we're explicitly installing "what" into "where", then the shrinkwrap + // for "where" doesn't apply. This would be the case if someone were adding + // a new package to a shrinkwrapped package. (data.dependencies will not be + // used here except to indicate what packages are already present, so + // there's no harm in using that.) + if (context.explicit) wrap = null + + var deps = data.dependencies || {} + var devDeps = data.devDependencies || {} + + // what is a list of things. + // resolve each one. + asyncMap( what + , targetResolver(where, context, deps, devDeps) + , function (er, targets) { + + if (er) return cb(er) + + var bundled = data.bundleDependencies || data.bundledDependencies || [] + // only take the hit for readInstalled if there are probably bundled + // dependencies to read + if (bundled.length) { + readInstalled(where, { dev: true }, andBuildResolvedTree) + } else { + andBuildResolvedTree() + } + + function andBuildResolvedTree (er, current) { + if (er) return cb(er) + + // each target will be a data object corresponding + // to a package, folder, or whatever that is in the cache now. + var newPrev = Object.create(context.family) + , newAnc = Object.create(context.ancestors) + + if (!context.root) { + newAnc[data.name] = data.version + } + bundled.forEach(function (bundle) { + var bundleData = current.dependencies[bundle] + if ((!bundleData || !bundleData.version) && current.devDependencies) { + log.verbose( + 'installMany', bundle, 'was bundled with', + data.name + '@' + data.version + + ", but wasn't found in dependencies. Trying devDependencies" + ) + bundleData = current.devDependencies[bundle] + } + + if (!bundleData || !bundleData.version) { + log.warn( + 'installMany', bundle, 'was bundled with', + data.name + '@' + data.version + + ", but bundled package wasn't found in unpacked tree" + ) + } else { + log.verbose( + 'installMany', bundle + '@' + bundleData.version, + 'was bundled with', data.name + '@' + data.version + ) + newPrev[bundle] = bundleData.version + } + }) + targets.forEach(function (t) { + newPrev[t.name] = t.version + }) + log.silly("install resolved", targets) + targets.filter(function (t) { return t }).forEach(function (t) { + log.info("install", "%s into %s", t._id, where) + }) + asyncMap(targets, function (target, cb) { + log.info("installOne", target._id) + var wrapData = wrap ? wrap[target.name] : null + var newWrap = wrapData && wrapData.dependencies + ? wrap[target.name].dependencies || {} + : null + var newContext = { family: newPrev + , ancestors: newAnc + , parent: parent + , explicit: false + , wrap: newWrap } + installOne(target, where, newContext, cb) + }, cb) + } + }) + }) +} + +function targetResolver (where, context, deps, devDeps) { + var alreadyInstalledManually = [] + , resolveLeft = 0 + , nm = path.resolve(where, "node_modules") + , parent = context.parent + , wrap = context.wrap + + if (!context.explicit) readdir(nm) + + function readdir(name) { + resolveLeft++ + fs.readdir(name, function (er, inst) { + if (er) return resolveLeft-- + + // don't even mess with non-package looking things + inst = inst.filter(function (p) { + if (!p.match(/^[@\._-]/)) return true + // scoped packages + readdir(path.join(name, p)) + }) + + asyncMap(inst, function (pkg, cb) { + var jsonPath = path.resolve(name, pkg, 'package.json') + log.verbose('targetResolver', 'reading package data from', jsonPath) + readJson(jsonPath, log.info, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + // error means it's not a package, most likely. + if (er) return cb(null, []) + + // if it's a bundled dep, then assume that anything there is valid. + // otherwise, make sure that it's a semver match with what we want. + var bd = parent.bundleDependencies + var isBundled = bd && bd.indexOf(d.name) !== -1 + var expectedVersion = deps[d.name] || (devDeps && devDeps[d.name]) || "*" + var currentIsSatisfactory = semver.satisfies(d.version, expectedVersion, true) + if (isBundled || currentIsSatisfactory || deps[d.name] === d._resolved) { + return cb(null, d.name) + } + + // see if the package had been previously linked + fs.lstat(path.resolve(nm, pkg), function(err, s) { + if (err) return cb(null, []) + if (s.isSymbolicLink()) { + return cb(null, d.name) + } + + // something is there, but it's not satisfactory. Clobber it. + return cb(null, []) + }) + }) + }, function (er, inst) { + // this is the list of things that are valid and should be ignored. + alreadyInstalledManually = alreadyInstalledManually.concat(inst) + resolveLeft-- + }) + }) + } + + var to = 0 + return function resolver (what, cb) { + if (resolveLeft) return setTimeout(function () { + resolver(what, cb) + }, to++) + + // now we know what's been installed here manually, + // or tampered with in some way that npm doesn't want to overwrite. + if (alreadyInstalledManually.indexOf(npa(what).name) !== -1) { + log.verbose("already installed", "skipping %s %s", what, where) + return cb(null, []) + } + + // check for a version installed higher in the tree. + // If installing from a shrinkwrap, it must match exactly. + if (context.family[what]) { + log.verbose('install', what, 'is installed as', context.family[what]) + if (wrap && wrap[what].version === context.family[what]) { + log.verbose("shrinkwrap", "use existing", what) + return cb(null, []) + } + } + + // if it's identical to its parent, then it's probably someone + // doing `npm install foo` inside of the foo project. Print + // a warning, and skip it. + if (parent && parent.name === what && !npm.config.get("force")) { + log.warn("install", "Refusing to install %s as a dependency of itself" + , what) + return cb(null, []) + } + + if (wrap) { + var name = npa(what).name + if (wrap[name]) { + var wrapTarget = readWrap(wrap[name]) + what = name + "@" + wrapTarget + } else { + log.verbose("shrinkwrap", "skipping %s (not in shrinkwrap)", what) + } + } else if (deps[what]) { + what = what + "@" + deps[what] + } + + // This is where we actually fetch the package, if it's not already + // in the cache. + // If it's a git repo, then we want to install it, even if the parent + // already has a matching copy. + // If it's not a git repo, and the parent already has that pkg, then + // we can skip installing it again. + var pkgroot = path.resolve(npm.prefix, (parent && parent._from) || "") + cache.add(what, null, pkgroot, false, function (er, data) { + if (er && parent && parent.optionalDependencies && + parent.optionalDependencies.hasOwnProperty(npa(what).name)) { + log.warn("optional dep failed, continuing", what) + log.verbose("optional dep failed, continuing", [what, er]) + return cb(null, []) + } + + var type = npa(what).type + var isGit = type === "git" || type === "hosted" + + if (!er && + data && + !context.explicit && + context.family[data.name] === data.version && + !npm.config.get("force") && + !isGit) { + log.info("already installed", data.name + "@" + data.version) + return cb(null, []) + } + + + if (data && !data._from) data._from = what + if (er && parent && parent.name) er.parent = parent.name + return cb(er, data || []) + }) + } +} + +// we've already decided to install this. if anything's in the way, +// then uninstall it first. +function installOne (target, where, context, cb) { + // the --link flag makes this a "link" command if it's at the + // the top level. + var isGit = false + var type = npa(target._from).type + if (target && target._from) isGit = type === 'git' || type === 'hosted' + + if (where === npm.prefix && npm.config.get("link") + && !npm.config.get("global") && !isGit) { + return localLink(target, where, context, cb) + } + installOne_(target, where, context, function (er, installedWhat) { + + // check if this one is optional to its parent. + if (er && context.parent && context.parent.optionalDependencies && + context.parent.optionalDependencies.hasOwnProperty(target.name)) { + log.warn("optional dep failed, continuing", target._id) + log.verbose("optional dep failed, continuing", [target._id, er]) + er = null + } + + cb(er, installedWhat) + }) + +} + +function localLink (target, where, context, cb) { + log.verbose("localLink", target._id) + var jsonPath = path.resolve(npm.globalDir, target.name , 'package.json') + var parent = context.parent + + log.verbose('localLink', 'reading data to link', target.name, 'from', jsonPath) + readJson(jsonPath, log.warn, function (er, data) { + function thenLink () { + npm.commands.link([target.name], function (er, d) { + log.silly("localLink", "back from link", [er, d]) + cb(er, [resultList(target, where, parent && parent._id)]) + }) + } + + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er || data._id === target._id) { + if (er) { + install( path.resolve(npm.globalDir, "..") + , target._id + , function (er) { + if (er) return cb(er, []) + thenLink() + }) + } else thenLink() + } else { + log.verbose("localLink", "install locally (no link)", target._id) + installOne_(target, where, context, cb) + } + }) +} + +function resultList (target, where, parentId) { + var nm = path.resolve(where, "node_modules") + , targetFolder = path.resolve(nm, target.name) + , prettyWhere = where + + if (!npm.config.get("global")) { + prettyWhere = path.relative(process.cwd(), where) + } + + if (prettyWhere === ".") prettyWhere = null + + if (!npm.config.get("global")) { + // print out the folder relative to where we are right now. + targetFolder = path.relative(process.cwd(), targetFolder) + } + + return [ target._id + , targetFolder + , prettyWhere && parentId + , parentId && prettyWhere + , target._from ] +} + +var installed = Object.create(null) + +function installOne_ (target, where, context, cb_) { + var nm = path.resolve(where, "node_modules") + , targetFolder = path.resolve(nm, target.name) + , prettyWhere = path.relative(process.cwd(), where) + , parent = context.parent + + if (prettyWhere === ".") prettyWhere = null + + cb_ = inflight(target.name + ":" + where, cb_) + if (!cb_) { + return log.verbose("installOne", "of", target.name, "to", where, "already in flight; waiting") + } + else { + log.verbose("installOne", "of", target.name, "to", where, "not in flight; installing") + } + + function cb(er, data) { + unlock(nm, target.name, function () { cb_(er, data) }) + } + + lock(nm, target.name, function (er) { + if (er) return cb(er) + + if (targetFolder in installed) { + log.error("install", "trying to install", target.version, "to", targetFolder) + log.error("install", "but already installed versions", installed[targetFolder]) + installed[targetFolder].push(target.version) + } + else { + installed[targetFolder] = [target.version] + } + + var force = npm.config.get("force") + , nodeVersion = npm.config.get("node-version") + , strict = npm.config.get("engine-strict") + , c = npmInstallChecks + + chain( + [ [c.checkEngine, target, npm.version, nodeVersion, force, strict] + , [c.checkPlatform, target, force] + , [c.checkCycle, target, context.ancestors] + , [c.checkGit, targetFolder] + , [write, target, targetFolder, context] ] + , function (er, d) { + if (er) return cb(er) + + d.push(resultList(target, where, parent && parent._id)) + cb(er, d) + } + ) + }) +} + +function write (target, targetFolder, context, cb_) { + var up = npm.config.get("unsafe-perm") + , user = up ? null : npm.config.get("user") + , group = up ? null : npm.config.get("group") + , family = context.family + + function cb (er, data) { + // cache.unpack returns the data object, and all we care about + // is the list of installed packages from that last thing. + if (!er) return cb_(er, data) + + if (npm.config.get("rollback") === false) return cb_(er) + npm.rollbacks.push(targetFolder) + cb_(er, data) + } + + var bundled = [] + + log.silly("install write", "writing", target.name, target.version, "to", targetFolder) + chain( + [ [ cache.unpack, target.name, target.version, targetFolder, null, null, user, group ], + function writePackageJSON (cb) { + var jsonPath = path.resolve(targetFolder, 'package.json') + log.verbose('write', 'writing to', jsonPath) + writeFileAtomic(jsonPath, JSON.stringify(target, null, 2) + '\n', cb) + }, + [ lifecycle, target, "preinstall", targetFolder ], + function collectBundled (cb) { + if (!target.bundleDependencies) return cb() + + var bd = path.resolve(targetFolder, "node_modules") + fs.readdir(bd, function (er, b) { + // nothing bundled, maybe + if (er) return cb() + bundled = b || [] + cb() + }) + } ] + + // nest the chain so that we can throw away the results returned + // up until this point, since we really don't care about it. + , function X (er) { + if (er) return cb(er) + + // before continuing to installing dependencies, check for a shrinkwrap. + var opt = { dev: npm.config.get("dev") } + readDependencies(context, targetFolder, opt, function (er, data, wrap) { + if (er) return cb(er); + var deps = prepareForInstallMany(data, "dependencies", bundled, wrap, + family) + var depsTargetFolder = targetFolder + var depsContext = { family: family + , ancestors: context.ancestors + , parent: target + , explicit: false + , wrap: wrap } + + var actions = + [ [ installManyAndBuild, deps, depsTargetFolder, depsContext ] ] + + // FIXME: This is an accident waiting to happen! + // + // 1. If multiple children at the same level of the tree share a + // peerDependency that's not in the parent's dependencies, because + // the peerDeps don't get added to the family, they will keep + // getting reinstalled (worked around by inflighting installOne). + // 2. The installer can't safely build at the parent level because + // that's already being done by the parent's installAndBuild. This + // runs the risk of the peerDependency never getting built. + // + // The fix: Don't install peerDependencies; require them to be + // included as explicit dependencies / devDependencies, and warn + // or error when they're missing. See #5080 for more arguments in + // favor of killing implicit peerDependency installs with fire. + var peerDeps = prepareForInstallMany(data, "peerDependencies", bundled, + wrap, family) + peerDeps.forEach(function (pd) { + warnPeers([ + "The peer dependency "+pd+" included from "+data.name+" will no", + "longer be automatically installed to fulfill the peerDependency ", + "in npm 3+. Your application will need to depend on it explicitly." + ], pd+","+data.name) + }) + + // Package scopes cause an addditional tree level which needs to be + // considered when resolving a peerDependency's target folder. + var pdTargetFolder + if (npa(target.name).scope) { + pdTargetFolder = path.resolve(targetFolder, '../../..') + } else { + pdTargetFolder = path.resolve(targetFolder, '../..') + } + + var pdContext = context + if (peerDeps.length > 0) { + actions.push( + [ installMany, peerDeps, pdTargetFolder, pdContext ] + ) + } + + chain(actions, cb) + }) + }) +} + +function installManyAndBuild (deps, targetFolder, context, cb) { + installMany(deps, targetFolder, context, function (er, d) { + log.verbose("about to build", targetFolder) + if (er) return cb(er) + npm.commands.build( [targetFolder] + , npm.config.get("global") + , true + , function (er) { return cb(er, d) }) + }) +} + +function prepareForInstallMany (packageData, depsKey, bundled, wrap, family) { + var deps = Object.keys(packageData[depsKey] || {}) + + // don't install bundleDependencies, unless they're missing. + if (packageData.bundleDependencies) { + deps = deps.filter(function (d) { + return packageData.bundleDependencies.indexOf(d) === -1 || + bundled.indexOf(d) === -1 + }) + } + + return deps.filter(function (d) { + // prefer to not install things that are satisfied by + // something in the "family" list, unless we're installing + // from a shrinkwrap. + if (depsKey !== "peerDependencies" && wrap) return true + if (semver.validRange(family[d], true)) { + return !semver.satisfies(family[d], packageData[depsKey][d], true) + } + return true + }).map(function (d) { + var v = packageData[depsKey][d] + var t = d + "@" + v + log.silly("prepareForInstallMany", "adding", t, "from", packageData.name, depsKey) + return t + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/link.js b/bin/nodejs4.6.0/node_modules/npm/lib/link.js new file mode 100644 index 00000000..f0123797 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/link.js @@ -0,0 +1,170 @@ +// link with no args: symlink the folder to the global location +// link with package arg: symlink the global to the local + +var npm = require("./npm.js") + , symlink = require("./utils/link.js") + , fs = require("graceful-fs") + , log = require("npmlog") + , asyncMap = require("slide").asyncMap + , chain = require("slide").chain + , path = require("path") + , build = require("./build.js") + , npa = require("npm-package-arg") + +module.exports = link + +link.usage = "npm link (in package dir)" + + "\nnpm link (link global into local)" + +link.completion = function (opts, cb) { + var dir = npm.globalDir + fs.readdir(dir, function (er, files) { + cb(er, files.filter(function (f) { + return !f.match(/^[\._-]/) + })) + }) +} + +function link (args, cb) { + if (process.platform === 'win32') { + var semver = require('semver') + if (!semver.gte(process.version, '0.7.9')) { + var msg = 'npm link not supported on windows prior to node 0.7.9' + var e = new Error(msg) + e.code = 'ENOTSUP' + e.errno = require('constants').ENOTSUP + return cb(e) + } + } + + if (npm.config.get("global")) { + return cb(new Error("link should never be --global.\n" + +"Please re-run this command with --local")) + } + + if (args.length === 1 && args[0] === ".") args = [] + if (args.length) return linkInstall(args, cb) + linkPkg(npm.prefix, cb) +} + +function linkInstall (pkgs, cb) { + asyncMap(pkgs, function (pkg, cb) { + var t = path.resolve(npm.globalDir, "..") + , pp = path.resolve(npm.globalDir, pkg) + , rp = null + , target = path.resolve(npm.dir, pkg) + + function n (er, data) { + if (er) return cb(er, data) + // install returns [ [folder, pkgId], ... ] + // but we definitely installed just one thing. + var d = data.filter(function (d) { return !d[3] }) + var what = npa(d[0][0]) + pp = d[0][1] + pkg = what.name + target = path.resolve(npm.dir, pkg) + next() + } + + // if it's a folder, a random not-installed thing, or not a scoped package, + // then link or install it first + if (pkg[0] !== "@" && (pkg.indexOf("/") !== -1 || pkg.indexOf("\\") !== -1)) { + return fs.lstat(path.resolve(pkg), function (er, st) { + if (er || !st.isDirectory()) { + npm.commands.install(t, pkg, n) + } else { + rp = path.resolve(pkg) + linkPkg(rp, n) + } + }) + } + + fs.lstat(pp, function (er, st) { + if (er) { + rp = pp + return npm.commands.install(t, pkg, n) + } else if (!st.isSymbolicLink()) { + rp = pp + next() + } else { + return fs.realpath(pp, function (er, real) { + if (er) log.warn("invalid symbolic link", pkg) + else rp = real + next() + }) + } + }) + + function next () { + chain + ( [ [function (cb) { + log.verbose("link", "symlinking %s to %s", pp, target) + cb() + }] + , [symlink, pp, target] + // do not run any scripts + , rp && [build, [target], npm.config.get("global"), build._noLC, true] + , [ resultPrinter, pkg, pp, target, rp ] ] + , cb ) + } + }, cb) +} + +function linkPkg (folder, cb_) { + var me = folder || npm.prefix + , readJson = require("read-package-json") + + log.verbose("linkPkg", folder) + + readJson(path.resolve(me, "package.json"), function (er, d) { + function cb (er) { + return cb_(er, [[d && d._id, target, null, null]]) + } + if (er) return cb(er) + if (!d.name) { + er = new Error("Package must have a name field to be linked") + return cb(er) + } + var target = path.resolve(npm.globalDir, d.name) + symlink(me, target, false, true, function (er) { + if (er) return cb(er) + log.verbose("link", "build target", target) + // also install missing dependencies. + npm.commands.install(me, [], function (er) { + if (er) return cb(er) + // build the global stuff. Don't run *any* scripts, because + // install command already will have done that. + build([target], true, build._noLC, true, function (er) { + if (er) return cb(er) + resultPrinter(path.basename(me), me, target, cb) + }) + }) + }) + }) +} + +function resultPrinter (pkg, src, dest, rp, cb) { + if (typeof cb !== "function") cb = rp, rp = null + var where = dest + rp = (rp || "").trim() + src = (src || "").trim() + // XXX If --json is set, then look up the data from the package.json + if (npm.config.get("parseable")) { + return parseableOutput(dest, rp || src, cb) + } + if (rp === src) rp = null + console.log(where + " -> " + src + (rp ? " -> " + rp: "")) + cb() +} + +function parseableOutput (dest, rp, cb) { + // XXX this should match ls --parseable and install --parseable + // look up the data from package.json, format it the same way. + // + // link is always effectively "long", since it doesn't help much to + // *just* print the target folder. + // However, we don't actually ever read the version number, so + // the second field is always blank. + console.log(dest + "::" + rp) + cb() +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/logout.js b/bin/nodejs4.6.0/node_modules/npm/lib/logout.js new file mode 100644 index 00000000..4c02f056 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/logout.js @@ -0,0 +1,40 @@ +module.exports = logout + +var dezalgo = require("dezalgo") +var log = require("npmlog") + +var npm = require("./npm.js") +var mapToRegistry = require("./utils/map-to-registry.js") + +logout.usage = "npm logout [--registry] [--scope]" + +function logout (args, cb) { + npm.spinner.start() + cb = dezalgo(cb) + + mapToRegistry("/", npm.config, function (err, uri, auth, normalized) { + if (err) return cb(err) + + if (auth.token) { + log.verbose("logout", "clearing session token for", normalized) + npm.registry.logout(normalized, { auth: auth }, function (err) { + if (err) return cb(err) + + npm.config.clearCredentialsByURI(normalized) + npm.spinner.stop() + npm.config.save("user", cb) + }) + } + else if (auth.username || auth.password) { + log.verbose("logout", "clearing user credentials for", normalized) + npm.config.clearCredentialsByURI(normalized) + npm.spinner.stop() + npm.config.save("user", cb) + } + else { + cb(new Error( + "Not logged in to", normalized + ",", "so can't log out." + )) + } + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/ls.js b/bin/nodejs4.6.0/node_modules/npm/lib/ls.js new file mode 100644 index 00000000..b133b414 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/ls.js @@ -0,0 +1,404 @@ + +// show the installed versions of packages +// +// --parseable creates output like this: +// ::: +// Flags are a :-separated list of zero or more indicators + +module.exports = exports = ls + +var npm = require("./npm.js") + , readInstalled = require("read-installed") + , log = require("npmlog") + , path = require("path") + , archy = require("archy") + , semver = require("semver") + , url = require("url") + , color = require("ansicolors") + , npa = require("npm-package-arg") + +ls.usage = "npm ls" + +ls.completion = require("./utils/completion/installed-deep.js") + +function ls (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + var dir = path.resolve(npm.dir, "..") + + // npm ls 'foo@~1.3' bar 'baz@<2' + if (!args) args = [] + else args = args.map(function (a) { + var p = npa(a) + , name = p.name + , ver = semver.validRange(p.rawSpec) || "" + + return [ name, ver ] + }) + + var depth = npm.config.get("depth") + var opt = { depth: depth, log: log.warn, dev: true } + readInstalled(dir, opt, function (er, data) { + pruneNestedExtraneous(data) + filterByEnv(data) + var bfs = bfsify(data, args) + , lite = getLite(bfs) + + if (er || silent) return cb(er, data, lite) + + var long = npm.config.get("long") + , json = npm.config.get("json") + , out + if (json) { + var seen = [] + var d = long ? bfs : lite + // the raw data can be circular + out = JSON.stringify(d, function (k, o) { + if (typeof o === "object") { + if (-1 !== seen.indexOf(o)) return "[Circular]" + seen.push(o) + } + return o + }, 2) + } else if (npm.config.get("parseable")) { + out = makeParseable(bfs, long, dir) + } else if (data) { + out = makeArchy(bfs, long, dir) + } + console.log(out) + + if (args.length && !data._found) process.exitCode = 1 + + // if any errors were found, then complain and exit status 1 + if (lite.problems && lite.problems.length) { + er = lite.problems.join("\n") + } + cb(er, data, lite) + }) +} + +function pruneNestedExtraneous (data, visited) { + visited = visited || [] + visited.push(data) + for (var i in data.dependencies) { + if (data.dependencies[i].extraneous) { + data.dependencies[i].dependencies = {} + } else if (visited.indexOf(data.dependencies[i]) === -1) { + pruneNestedExtraneous(data.dependencies[i], visited) + } + } +} + +function filterByEnv (data) { + var dev = npm.config.get("dev") + var production = npm.config.get("production") + if (dev === production) return + var dependencies = {} + var devDependencies = data.devDependencies || [] + Object.keys(data.dependencies).forEach(function (name) { + var keys = Object.keys(devDependencies) + if (production && keys.indexOf(name) !== -1) return + if (dev && keys.indexOf(name) === -1) return + dependencies[name] = data.dependencies[name] + }) + data.dependencies = dependencies +} + +function alphasort (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return a > b ? 1 + : a < b ? -1 : 0 +} + +function isCruft (data) { + return data.extraneous && data.error && data.error.code === 'ENOTDIR' +} + +function getLite (data, noname, depth) { + var lite = {} + , maxDepth = npm.config.get("depth") + + if (typeof depth === 'undefined') depth = 0 + if (!noname && data.name) lite.name = data.name + if (data.version) lite.version = data.version + if (data.extraneous) { + lite.extraneous = true + lite.problems = lite.problems || [] + lite.problems.push( "extraneous: " + + data.name + "@" + data.version + + " " + (data.path || "") ) + } + + if (data._from) + lite.from = data._from + + if (data._resolved) + lite.resolved = data._resolved + + if (data.invalid) { + lite.invalid = true + lite.problems = lite.problems || [] + lite.problems.push( "invalid: " + + data.name + "@" + data.version + + " " + (data.path || "") ) + } + + if (data.peerInvalid) { + lite.peerInvalid = true + lite.problems = lite.problems || [] + lite.problems.push( "peer invalid: " + + data.name + "@" + data.version + + " " + (data.path || "") ) + } + + if (data.dependencies) { + var deps = Object.keys(data.dependencies) + if (deps.length) lite.dependencies = deps.map(function (d) { + var dep = data.dependencies[d] + if (typeof dep === "string") { + lite.problems = lite.problems || [] + var p + if (data.depth > maxDepth) { + p = "max depth reached: " + } else { + p = "missing: " + } + p += d + "@" + dep + + ", required by " + + data.name + "@" + data.version + lite.problems.push(p) + return [d, { required: dep.requiredBy, missing: true }] + } else if (dep.peerMissing) { + lite.problems = lite.problems || [] + dep.peerMissing.forEach(function (missing) { + var pdm = 'peer dep missing: ' + + missing.requires + + ', required by ' + + missing.requiredBy + lite.problems.push(pdm) + }) + return [d, { required: dep, peerMissing: true }] + } else if (npm.config.get('json')) { + if (depth === maxDepth) delete dep.dependencies + return [d, getLite(dep, true, depth + 1)] + } + return [d, getLite(dep, true)] + }).reduce(function (deps, d) { + if (d[1].problems) { + lite.problems = lite.problems || [] + lite.problems.push.apply(lite.problems, d[1].problems) + } + deps[d[0]] = d[1] + return deps + }, {}) + } + return lite +} + +function bfsify (root, args, current, queue, seen) { + // walk over the data, and turn it from this: + // +-- a + // | `-- b + // | `-- a (truncated) + // `--b (truncated) + // into this: + // +-- a + // `-- b + // which looks nicer + args = args || [] + current = current || root + queue = queue || [] + seen = seen || [root] + var deps = current.dependencies = current.dependencies || {} + Object.keys(deps).forEach(function (d) { + var dep = deps[d] + if (typeof dep !== "object") return + if (seen.indexOf(dep) !== -1) { + if (npm.config.get("parseable") || !npm.config.get("long")) { + delete deps[d] + return + } else { + dep = deps[d] = Object.create(dep) + dep.dependencies = {} + } + } + queue.push(dep) + seen.push(dep) + }) + + if (!queue.length) { + // if there were args, then only show the paths to found nodes. + return filterFound(root, args) + } + return bfsify(root, args, queue.shift(), queue, seen) +} + +function filterFound (root, args) { + if (!args.length) return root + var deps = root.dependencies + if (deps) Object.keys(deps).forEach(function (d) { + var dep = filterFound(deps[d], args) + + // see if this one itself matches + var found = false + for (var i = 0; !found && i < args.length; i ++) { + if (d === args[i][0]) { + found = semver.satisfies(dep.version, args[i][1], true) + } + } + // included explicitly + if (found) dep._found = true + // included because a child was included + if (dep._found && !root._found) root._found = 1 + // not included + if (!dep._found) delete deps[d] + }) + if (!root._found) root._found = false + return root +} + +function makeArchy (data, long, dir) { + var out = makeArchy_(data, long, dir, 0) + return archy(out, "", { unicode: npm.config.get("unicode") }) +} + +function makeArchy_ (data, long, dir, depth, parent, d) { + if (typeof data === "string") { + if (depth -1 <= npm.config.get("depth")) { + // just missing + var unmet = "UNMET DEPENDENCY" + if (npm.color) { + unmet = color.bgBlack(color.red(unmet)) + } + data = unmet + " " + d + "@" + data + } else { + data = d+"@"+ data + } + return data + } + + var out = {} + // the top level is a bit special. + out.label = data._id || "" + if (data._found === true && data._id) { + if (npm.color) { + out.label = color.bgBlack(color.yellow(out.label.trim())) + " " + } else { + out.label = out.label.trim() + " " + } + } + if (data.link) out.label += " -> " + data.link + + if (data.invalid) { + if (data.realName !== data.name) out.label += " ("+data.realName+")" + var invalid = "invalid" + if (npm.color) invalid = color.bgBlack(color.red(invalid)) + out.label += " " + invalid + } + + if (data.peerInvalid) { + var peerInvalid = "peer invalid" + if (npm.color) peerInvalid = color.bgBlack(color.red(peerInvalid)) + out.label += " " + peerInvalid + } + + if (data.extraneous && data.path !== dir) { + var extraneous = "extraneous" + if (npm.color) extraneous = color.bgBlack(color.green(extraneous)) + out.label += " " + extraneous + } + + // add giturl to name@version + if (data._resolved) { + var type = npa(data._resolved).type + var isGit = type === 'git' || type === 'hosted' + if (isGit) { + out.label += ' (' + data._resolved + ')' + } + } + + if (long) { + if (dir === data.path) out.label += "\n" + dir + out.label += "\n" + getExtras(data, dir) + } else if (dir === data.path) { + if (out.label) out.label += " " + out.label += dir + } + + // now all the children. + out.nodes = [] + if (depth <= npm.config.get("depth")) { + out.nodes = Object.keys(data.dependencies || {}) + .sort(alphasort).map(function (d) { + return makeArchy_(data.dependencies[d], long, dir, depth + 1, data, d) + }) + } + + if (out.nodes.length === 0 && data.path === dir) { + out.nodes = ["(empty)"] + } + + return out +} + +function getExtras (data) { + var extras = [] + + if (data.description) extras.push(data.description) + if (data.repository) extras.push(data.repository.url) + if (data.homepage) extras.push(data.homepage) + if (data._from) { + var from = data._from + if (from.indexOf(data.name + "@") === 0) { + from = from.substr(data.name.length + 1) + } + var u = url.parse(from) + if (u.protocol) extras.push(from) + } + return extras.join("\n") +} + + +function makeParseable (data, long, dir, depth, parent, d) { + depth = depth || 0 + + return [ makeParseable_(data, long, dir, depth, parent, d) ] + .concat(Object.keys(data.dependencies || {}) + .sort(alphasort).map(function (d) { + return makeParseable(data.dependencies[d], long, dir, depth + 1, data, d) + })) + .filter(function (x) { return x }) + .join("\n") +} + +function makeParseable_ (data, long, dir, depth, parent, d) { + if (data.hasOwnProperty("_found") && data._found !== true) return "" + + if (typeof data === "string") { + if (data.depth < npm.config.get("depth")) { + data = npm.config.get("long") + ? path.resolve(parent.path, "node_modules", d) + + ":"+d+"@"+JSON.stringify(data)+":INVALID:MISSING" + : "" + } else { + data = path.resolve(data.path || "", "node_modules", d || "") + + (npm.config.get("long") + ? ":" + d + "@" + JSON.stringify(data) + + ":" // no realpath resolved + + ":MAXDEPTH" + : "") + } + + return data + } + + if (!npm.config.get("long")) return data.path + + return data.path + + ":" + (data._id || "") + + ":" + (data.realPath !== data.path ? data.realPath : "") + + (data.extraneous ? ":EXTRANEOUS" : "") + + (data.invalid ? ":INVALID" : "") + + (data.peerInvalid ? ":PEERINVALID" : "") +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/npm.js b/bin/nodejs4.6.0/node_modules/npm/lib/npm.js new file mode 100644 index 00000000..9d3f50c5 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/npm.js @@ -0,0 +1,475 @@ +;(function(){ +// windows: running "npm blah" in this folder will invoke WSH, not node. +if (typeof WScript !== "undefined") { + WScript.echo("npm does not work when run\n" + +"with the Windows Scripting Host\n\n" + +"'cd' to a different directory,\n" + +"or type 'npm.cmd ',\n" + +"or type 'node npm '.") + WScript.quit(1) + return +} + + +var EventEmitter = require("events").EventEmitter + , npm = module.exports = new EventEmitter() + , npmconf = require("./config/core.js") + , log = require("npmlog") + , gfs = require('graceful-fs') + , fs = gfs.gracefulify(require('fs')) + , path = require("path") + , abbrev = require("abbrev") + , which = require("which") + , CachingRegClient = require("./cache/caching-client.js") + , charSpin = require("char-spinner") + +npm.config = { + loaded: false, + get: function() { + throw new Error('npm.load() required') + }, + set: function() { + throw new Error('npm.load() required') + } +} + +npm.commands = {} + +npm.rollbacks = [] + +try { + // startup, ok to do this synchronously + var j = JSON.parse(fs.readFileSync( + path.join(__dirname, "../package.json"))+"") + npm.version = j.version +} catch (ex) { + try { + log.info("error reading version", ex) + } catch (er) {} + npm.version = ex +} + +var commandCache = {} + // short names for common things + , aliases = { "rm" : "uninstall" + , "r" : "uninstall" + , "un" : "uninstall" + , "unlink" : "uninstall" + , "remove" : "uninstall" + , "rb" : "rebuild" + , "list" : "ls" + , "la" : "ls" + , "ll" : "ls" + , "ln" : "link" + , "i" : "install" + , "isntall" : "install" + , "up" : "update" + , "upgrade" : "update" + , "c" : "config" + , "dist-tags" : "dist-tag" + , "info" : "view" + , "show" : "view" + , "find" : "search" + , "s" : "search" + , "se" : "search" + , "author" : "owner" + , "home" : "docs" + , "issues": "bugs" + , "unstar": "star" // same function + , "apihelp" : "help" + , "login": "adduser" + , "add-user": "adduser" + , "tst": "test" + , "t": "test" + , "find-dupes": "dedupe" + , "ddp": "dedupe" + , "v": "view" + , "verison": "version" + } + + , aliasNames = Object.keys(aliases) + // these are filenames in . + , cmdList = [ "install" + , "uninstall" + , "cache" + , "config" + , "set" + , "get" + , "update" + , "outdated" + , "prune" + , "pack" + , "dedupe" + + , "rebuild" + , "link" + + , "publish" + , "star" + , "stars" + , "tag" + , "adduser" + , "logout" + , "unpublish" + , "owner" + , "access" + , "team" + , "deprecate" + , "shrinkwrap" + + , "help" + , "help-search" + , "ls" + , "search" + , "view" + , "init" + , "version" + , "edit" + , "explore" + , "docs" + , "repo" + , "bugs" + , "faq" + , "root" + , "prefix" + , "bin" + , "whoami" + , "dist-tag" + , "ping" + + , "test" + , "stop" + , "start" + , "restart" + , "run-script" + , "completion" + ] + , plumbing = [ "build" + , "unbuild" + , "xmas" + , "substack" + , "visnup" + ] + , littleGuys = [ "isntall", "verison" ] + , fullList = cmdList.concat(aliasNames).filter(function (c) { + return plumbing.indexOf(c) === -1 + }) + , abbrevs = abbrev(fullList) + +// we have our reasons +fullList = npm.fullList = fullList.filter(function (c) { + return littleGuys.indexOf(c) === -1 +}) + +npm.spinner = + { int: null + , started: false + , start: function () { + if (npm.spinner.int) return + var c = npm.config.get("spin") + if (!c) return + var stream = npm.config.get("logstream") + var opt = { tty: c !== "always", stream: stream } + opt.cleanup = !npm.spinner.started + npm.spinner.int = charSpin(opt) + npm.spinner.started = true + } + , stop: function () { + clearInterval(npm.spinner.int) + npm.spinner.int = null + } + } + +Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) { + Object.defineProperty(npm.commands, c, { get : function () { + if (!loaded) throw new Error( + "Call npm.load(config, cb) before using this command.\n"+ + "See the README.md or cli.js for example usage.") + var a = npm.deref(c) + if (c === "la" || c === "ll") { + npm.config.set("long", true) + } + + npm.command = c + if (commandCache[a]) return commandCache[a] + + var cmd = require(__dirname+"/"+a+".js") + + commandCache[a] = function () { + var args = Array.prototype.slice.call(arguments, 0) + if (typeof args[args.length - 1] !== "function") { + args.push(defaultCb) + } + if (args.length === 1) args.unshift([]) + + npm.registry.version = npm.version + if (!npm.registry.refer) { + npm.registry.refer = [a].concat(args[0]).map(function (arg) { + // exclude anything that might be a URL, path, or private module + // Those things will always have a slash in them somewhere + if (arg && arg.match && arg.match(/\/|\\/)) { + return "[REDACTED]" + } else { + return arg + } + }).filter(function (arg) { + return arg && arg.match + }).join(" ") + } + + cmd.apply(npm, args) + } + + Object.keys(cmd).forEach(function (k) { + commandCache[a][k] = cmd[k] + }) + + return commandCache[a] + }, enumerable: fullList.indexOf(c) !== -1, configurable: true }) + + // make css-case commands callable via camelCase as well + if (c.match(/\-([a-z])/)) { + addCommand(c.replace(/\-([a-z])/g, function (a, b) { + return b.toUpperCase() + })) + } +}) + +function defaultCb (er, data) { + if (er) console.error(er.stack || er.message) + else console.log(data) +} + +npm.deref = function (c) { + if (!c) return "" + if (c.match(/[A-Z]/)) c = c.replace(/([A-Z])/g, function (m) { + return "-" + m.toLowerCase() + }) + if (plumbing.indexOf(c) !== -1) return c + var a = abbrevs[c] + if (aliases[a]) a = aliases[a] + return a +} + +var loaded = false + , loading = false + , loadErr = null + , loadListeners = [] + +function loadCb (er) { + loadListeners.forEach(function (cb) { + process.nextTick(cb.bind(npm, er, npm)) + }) + loadListeners.length = 0 +} + +npm.load = function (cli, cb_) { + if (!cb_ && typeof cli === "function") cb_ = cli , cli = {} + if (!cb_) cb_ = function () {} + if (!cli) cli = {} + loadListeners.push(cb_) + if (loaded || loadErr) return cb(loadErr) + if (loading) return + loading = true + var onload = true + + function cb (er) { + if (loadErr) return + loadErr = er + if (er) return cb_(er) + if (npm.config.get("force")) { + log.warn("using --force", "I sure hope you know what you are doing.") + } + npm.config.loaded = true + loaded = true + loadCb(loadErr = er) + onload = onload && npm.config.get('onload-script') + if (onload) { + try { + require(onload) + } catch (err) { + log.warn('onload-script', 'failed to require onload script', onload) + log.warn('onload-script', err) + } + onload = false + } + } + + log.pause() + + load(npm, cli, cb) +} + +function load (npm, cli, cb) { + which(process.argv[0], function (er, node) { + if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) { + log.verbose("node symlink", node) + process.execPath = node + process.installPrefix = path.resolve(node, "..", "..") + } + + // look up configs + //console.error("about to look up configs") + + var builtin = path.resolve(__dirname, "..", "npmrc") + npmconf.load(cli, builtin, function (er, config) { + if (er === config) er = null + + npm.config = config + if (er) return cb(er) + + // if the "project" config is not a filename, and we're + // not in global mode, then that means that it collided + // with either the default or effective userland config + if (!config.get("global") + && config.sources.project + && config.sources.project.type !== "ini") { + log.verbose("config" + , "Skipping project config: %s. " + + "(matches userconfig)" + , config.localPrefix + "/.npmrc") + } + + // Include npm-version and node-version in user-agent + var ua = config.get("user-agent") || "" + ua = ua.replace(/\{node-version\}/gi, process.version) + ua = ua.replace(/\{npm-version\}/gi, npm.version) + ua = ua.replace(/\{platform\}/gi, process.platform) + ua = ua.replace(/\{arch\}/gi, process.arch) + config.set("user-agent", ua) + + var color = config.get("color") + + log.level = config.get("loglevel") + log.heading = config.get("heading") || "npm" + log.stream = config.get("logstream") + + switch (color) { + case "always": + log.enableColor() + npm.color = true + break + case false: + log.disableColor() + npm.color = false + break + default: + var tty = require("tty") + if (process.stdout.isTTY) npm.color = true + else if (!tty.isatty) npm.color = true + else if (tty.isatty(1)) npm.color = true + else npm.color = false + break + } + + log.resume() + + // at this point the configs are all set. + // go ahead and spin up the registry client. + npm.registry = new CachingRegClient(npm.config) + + var umask = npm.config.get("umask") + npm.modes = { exec: 0777 & (~umask) + , file: 0666 & (~umask) + , umask: umask } + + var gp = Object.getOwnPropertyDescriptor(config, "globalPrefix") + Object.defineProperty(npm, "globalPrefix", gp) + + var lp = Object.getOwnPropertyDescriptor(config, "localPrefix") + Object.defineProperty(npm, "localPrefix", lp) + + return cb(null, npm) + }) + }) +} + +Object.defineProperty(npm, "prefix", + { get : function () { + return npm.config.get("global") ? npm.globalPrefix : npm.localPrefix + } + , set : function (r) { + var k = npm.config.get("global") ? "globalPrefix" : "localPrefix" + return npm[k] = r + } + , enumerable : true + }) + +Object.defineProperty(npm, "bin", + { get : function () { + if (npm.config.get("global")) return npm.globalBin + return path.resolve(npm.root, ".bin") + } + , enumerable : true + }) + +Object.defineProperty(npm, "globalBin", + { get : function () { + var b = npm.globalPrefix + if (process.platform !== "win32") b = path.resolve(b, "bin") + return b + } + }) + +Object.defineProperty(npm, "dir", + { get : function () { + if (npm.config.get("global")) return npm.globalDir + return path.resolve(npm.prefix, "node_modules") + } + , enumerable : true + }) + +Object.defineProperty(npm, "globalDir", + { get : function () { + return (process.platform !== "win32") + ? path.resolve(npm.globalPrefix, "lib", "node_modules") + : path.resolve(npm.globalPrefix, "node_modules") + } + , enumerable : true + }) + +Object.defineProperty(npm, "root", + { get : function () { return npm.dir } }) + +Object.defineProperty(npm, "cache", + { get : function () { return npm.config.get("cache") } + , set : function (r) { return npm.config.set("cache", r) } + , enumerable : true + }) + +var tmpFolder +var rand = require("crypto").randomBytes(4).toString("hex") +Object.defineProperty(npm, "tmp", + { get : function () { + if (!tmpFolder) tmpFolder = "npm-" + process.pid + "-" + rand + return path.resolve(npm.config.get("tmp"), tmpFolder) + } + , enumerable : true + }) + +// the better to repl you with +Object.getOwnPropertyNames(npm.commands).forEach(function (n) { + if (npm.hasOwnProperty(n) || n === "config") return + + Object.defineProperty(npm, n, { get: function () { + return function () { + var args = Array.prototype.slice.call(arguments, 0) + , cb = defaultCb + + if (args.length === 1 && Array.isArray(args[0])) { + args = args[0] + } + + if (typeof args[args.length - 1] === "function") { + cb = args.pop() + } + + npm.commands[n](args, cb) + } + }, enumerable: false, configurable: true }) +}) + +if (require.main === module) { + require("../bin/npm-cli.js") +} +})() diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/outdated.js b/bin/nodejs4.6.0/node_modules/npm/lib/outdated.js new file mode 100644 index 00000000..ab1c3113 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/outdated.js @@ -0,0 +1,404 @@ +/* + +npm outdated [pkg] + +Does the following: + +1. check for a new version of pkg + +If no packages are specified, then run for all installed +packages. + +--parseable creates output like this: +::: + +*/ + +module.exports = outdated + +outdated.usage = "npm outdated [ [ ...]]" + +outdated.completion = require("./utils/completion/installed-deep.js") + + +var path = require("path") + , readJson = require("read-package-json") + , cache = require("./cache.js") + , asyncMap = require("slide").asyncMap + , npm = require("./npm.js") + , url = require("url") + , color = require("ansicolors") + , styles = require("ansistyles") + , table = require("text-table") + , semver = require("semver") + , os = require("os") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , readInstalled = require("read-installed") + , long = npm.config.get("long") + , log = require("npmlog") + +function outdated (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + var dir = path.resolve(npm.dir, "..") + + // default depth for `outdated` is 0 (cf. `ls`) + if (npm.config.get("depth") === Infinity) npm.config.set("depth", 0) + + outdated_(args, dir, {}, 0, function (er, list) { + if (!list) list = [] + if (er || silent || list.length === 0) return cb(er, list) + list.sort(function(a, b) { + var aa = a[1].toLowerCase() + , bb = b[1].toLowerCase() + return aa === bb ? 0 + : aa < bb ? -1 : 1 + }) + if (npm.config.get("json")) { + console.log(makeJSON(list)) + } else if (npm.config.get("parseable")) { + console.log(makeParseable(list)) + } else { + var outList = list.map(makePretty) + var outHead = [ "Package" + , "Current" + , "Wanted" + , "Latest" + , "Location" + ] + if (long) outHead.push("Package Type") + var outTable = [outHead].concat(outList) + + if (npm.color) { + outTable[0] = outTable[0].map(function(heading) { + return styles.underline(heading) + }) + } + + var tableOpts = { align: ["l", "r", "r", "r", "l"] + , stringLength: function(s) { return ansiTrim(s).length } + } + console.log(table(outTable, tableOpts)) + } + cb(null, list) + }) +} + +// [[ dir, dep, has, want, latest, type ]] +function makePretty (p) { + var dep = p[1] + , dir = path.resolve(p[0], "node_modules", dep) + , has = p[2] + , want = p[3] + , latest = p[4] + , type = p[6] + + if (!npm.config.get("global")) { + dir = path.relative(process.cwd(), dir) + } + + var columns = [ dep + , has || "MISSING" + , want + , latest + , dirToPrettyLocation(dir) + ] + if (long) columns[5] = type + + if (npm.color) { + columns[0] = color[has === want ? "yellow" : "red"](columns[0]) // dep + columns[2] = color.green(columns[2]) // want + columns[3] = color.magenta(columns[3]) // latest + columns[4] = color.brightBlack(columns[4]) // dir + if (long) columns[5] = color.brightBlack(columns[5]) // type + } + + return columns +} + +function ansiTrim (str) { + var r = new RegExp("\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|" + + "\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)", "g") + return str.replace(r, "") +} + +function dirToPrettyLocation (dir) { + return dir.replace(/^node_modules[/\\]/, "") + .replace(/[[/\\]node_modules[/\\]/g, " > ") +} + +function makeParseable (list) { + return list.map(function (p) { + + var dep = p[1] + , dir = path.resolve(p[0], "node_modules", dep) + , has = p[2] + , want = p[3] + , latest = p[4] + , type = p[6] + + var out = [ dir + , dep + "@" + want + , (has ? (dep + "@" + has) : "MISSING") + , dep + "@" + latest + ] + if (long) out.push(type) + + return out.join(":") + }).join(os.EOL) +} + +function makeJSON (list) { + var out = {} + list.forEach(function (p) { + var dir = path.resolve(p[0], "node_modules", p[1]) + if (!npm.config.get("global")) { + dir = path.relative(process.cwd(), dir) + } + out[p[1]] = { current: p[2] + , wanted: p[3] + , latest: p[4] + , location: dir + } + if (long) out[p[1]].type = p[6] + }) + return JSON.stringify(out, null, 2) +} + +function outdated_ (args, dir, parentHas, depth, cb) { + // get the deps from package.json, or {:"*"} + // asyncMap over deps: + // shouldHave = cache.add(dep, req).version + // if has === shouldHave then + // return outdated(args, dir/node_modules/dep, parentHas + has) + // else if dep in args or args is empty + // return [dir, dep, has, shouldHave] + + if (depth > npm.config.get("depth")) { + return cb(null, []) + } + var deps = null + var types = {} + readJson(path.resolve(dir, "package.json"), function (er, d) { + d = d || {} + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + deps = (er) ? true : (d.dependencies || {}) + if (!er) { + Object.keys(deps).forEach(function (k) { + types[k] = "dependencies" + }) + } + + if (npm.config.get("save-dev")) { + deps = d.devDependencies || {} + Object.keys(deps).forEach(function (k) { + types[k] = "devDependencies" + }) + + return next() + } + + if (npm.config.get("save")) { + // remove optional dependencies from dependencies during --save. + Object.keys(d.optionalDependencies || {}).forEach(function (k) { + delete deps[k] + }) + return next() + } + + if (npm.config.get("save-optional")) { + deps = d.optionalDependencies || {} + Object.keys(deps).forEach(function (k) { + types[k] = "optionalDependencies" + }) + return next() + } + + var doUpdate = npm.config.get("dev") || + (!npm.config.get("production") && + !Object.keys(parentHas).length && + !npm.config.get("global")) + + if (!er && d && doUpdate) { + Object.keys(d.devDependencies || {}).forEach(function (k) { + if (!(k in parentHas)) { + deps[k] = d.devDependencies[k] + types[k] = "devDependencies" + } + }) + } + return next() + }) + + var has = null + readInstalled(path.resolve(dir), { dev : true }, function (er, data) { + if (er) { + has = Object.create(parentHas) + return next() + } + var pkgs = Object.keys(data.dependencies) + pkgs = pkgs.filter(function (p) { + return !p.match(/^[\._-]/) + }) + asyncMap(pkgs, function (pkg, cb) { + var jsonFile = path.resolve(dir, "node_modules", pkg, "package.json") + readJson(jsonFile, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (d && d.name && d.private) delete deps[d.name] + cb(null, er ? [] : [[d.name, d.version, d._from]]) + }) + }, function (er, pvs) { + if (er) return cb(er) + has = Object.create(parentHas) + pvs.forEach(function (pv) { + has[pv[0]] = { + link: data.dependencies[pv[0]].link, + version: pv[1], + from: pv[2] + } + }) + + next() + }) + }) + + function next () { + if (!has || !deps) return + if (deps === true) { + deps = Object.keys(has).reduce(function (l, r) { + l[r] = "latest" + return l + }, {}) + } + + // now get what we should have, based on the dep. + // if has[dep] !== shouldHave[dep], then cb with the data + // otherwise dive into the folder + asyncMap(Object.keys(deps), function (dep, cb) { + if (!long) return shouldUpdate(args, dir, dep, has, deps[dep], depth, cb) + + shouldUpdate(args, dir, dep, has, deps[dep], depth, cb, types[dep]) + }, cb) + } +} + +function shouldUpdate (args, dir, dep, has, req, depth, cb, type) { + // look up the most recent version. + // if that's what we already have, or if it's not on the args list, + // then dive into it. Otherwise, cb() with the data. + + // { version: , from: } + var curr = has[dep] + + function skip (er) { + // show user that no viable version can be found + if (er) return cb(er) + outdated_( args + , path.resolve(dir, "node_modules", dep) + , has + , depth + 1 + , cb ) + } + + function doIt (wanted, latest) { + if (!long) { + return cb(null, [[ dir, dep, curr && curr.version, wanted, latest, req]]) + } + cb(null, [[ dir, dep, curr && curr.version, wanted, latest, req, type]]) + } + + if (args.length && args.indexOf(dep) === -1) return skip() + var parsed = npa(dep + '@' + req) + if (parsed.type === "git" || (parsed.hosted && parsed.hosted.type === "github")) { + return doIt("git", "git") + } + if (curr && curr.link) { + return doIt("linked", "linked") + } + + // search for the latest package + mapToRegistry(dep, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, updateDeps) + }) + + function updateLocalDeps (latestRegistryVersion) { + readJson(path.resolve(parsed.spec, 'package.json'), function (er, localDependency) { + if (er) return cb() + + var wanted = localDependency.version + var latest = localDependency.version + + if (latestRegistryVersion) { + latest = latestRegistryVersion + if (semver.lt(wanted, latestRegistryVersion)) { + wanted = latestRegistryVersion + req = dep + '@' + latest + } + } + + if (curr.version !== wanted) { + doIt(wanted, latest) + } else { + skip() + } + }) + } + + function updateDeps (er, d) { + if (er) { + if (parsed.type !== 'local') return cb(er) + return updateLocalDeps() + } + + if (!d || !d["dist-tags"] || !d.versions) return cb() + var l = d.versions[d["dist-tags"].latest] + if (!l) return cb() + + var r = req + if (d["dist-tags"][req]) + r = d["dist-tags"][req] + + if (semver.validRange(r, true)) { + // some kind of semver range. + // see if it's in the doc. + var vers = Object.keys(d.versions) + var v = semver.maxSatisfying(vers, r, true) + if (v) { + return onCacheAdd(null, d.versions[v]) + } + } + + // We didn't find the version in the doc. See if cache can find it. + cache.add(dep, req, null, false, onCacheAdd) + + function onCacheAdd(er, d) { + // if this fails, then it means we can't update this thing. + // it's probably a thing that isn't published. + if (er) { + if (er.code && er.code === "ETARGET") { + // no viable version found + return skip(er) + } + return skip() + } + + // check that the url origin hasn't changed (#1727) and that + // there is no newer version available + var dFromUrl = d._from && url.parse(d._from).protocol + var cFromUrl = curr && curr.from && url.parse(curr.from).protocol + + if (!curr || dFromUrl && cFromUrl && d._from !== curr.from + || d.version !== curr.version + || d.version !== l.version) { + if (parsed.type === 'local') return updateLocalDeps(l.version) + + doIt(d.version, l.version) + } + else { + skip() + } + } + } +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/owner.js b/bin/nodejs4.6.0/node_modules/npm/lib/owner.js new file mode 100644 index 00000000..b99c8f77 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/owner.js @@ -0,0 +1,254 @@ +module.exports = owner + +owner.usage = "npm owner add " + + "\nnpm owner rm " + + "\nnpm owner ls " + +var npm = require("./npm.js") + , log = require("npmlog") + , mapToRegistry = require("./utils/map-to-registry.js") + , readLocalPkg = require("./utils/read-local-package.js") + +owner.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length > 4) return cb() + if (argv.length <= 2) { + var subs = ["add", "rm"] + if (opts.partialWord === "l") subs.push("ls") + else subs.push("ls", "list") + return cb(null, subs) + } + + npm.commands.whoami([], true, function (er, username) { + if (er) return cb() + + var un = encodeURIComponent(username) + var byUser, theUser + switch (argv[2]) { + case "ls": + // FIXME: there used to be registry completion here, but it stopped + // making sense somewhere around 50,000 packages on the registry + return cb() + + case "rm": + if (argv.length > 3) { + theUser = encodeURIComponent(argv[3]) + byUser = "-/by-user/" + theUser + "|" + un + return mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + console.error(uri) + npm.registry.get(uri, { auth : auth }, function (er, d) { + if (er) return cb(er) + // return the intersection + return cb(null, d[theUser].filter(function (p) { + // kludge for server adminery. + return un === "isaacs" || d[un].indexOf(p) === -1 + })) + }) + }) + } + // else fallthrough + case "add": + if (argv.length > 3) { + theUser = encodeURIComponent(argv[3]) + byUser = "-/by-user/" + theUser + "|" + un + return mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + console.error(uri) + npm.registry.get(uri, { auth : auth }, function (er, d) { + console.error(uri, er || d) + // return mine that they're not already on. + if (er) return cb(er) + var mine = d[un] || [] + , theirs = d[theUser] || [] + return cb(null, mine.filter(function (p) { + return theirs.indexOf(p) === -1 + })) + }) + }) + } + // just list all users who aren't me. + return mapToRegistry("-/users", npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, list) { + if (er) return cb() + return cb(null, Object.keys(list).filter(function (n) { + return n !== un + })) + }) + }) + + default: + return cb() + } + }) +} + +function owner (args, cb) { + var action = args.shift() + switch (action) { + case "ls": case "list": return ls(args[0], cb) + case "add": return add(args[0], args[1], cb) + case "rm": case "remove": return rm(args[0], args[1], cb) + default: return unknown(action, cb) + } +} + +function ls (pkg, cb) { + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(owner.usage) + ls(pkg, cb) + }) + + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, data) { + var msg = "" + if (er) { + log.error("owner ls", "Couldn't get owner data", pkg) + return cb(er) + } + var owners = data.maintainers + if (!owners || !owners.length) msg = "admin party!" + else msg = owners.map(function (o) { + return o.name + " <" + o.email + ">" + }).join("\n") + console.log(msg) + cb(er, owners) + }) + }) +} + +function add (user, pkg, cb) { + if (!user) return cb(owner.usage) + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(new Error(owner.usage)) + add(user, pkg, cb) + }) + + log.verbose("owner add", "%s to %s", user, pkg) + mutate(pkg, user, function (u, owners) { + if (!owners) owners = [] + for (var i = 0, l = owners.length; i < l; i ++) { + var o = owners[i] + if (o.name === u.name) { + log.info( "owner add" + , "Already a package owner: " + o.name + " <" + o.email + ">") + return false + } + } + owners.push(u) + return owners + }, cb) +} + +function rm (user, pkg, cb) { + if (!pkg) return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(new Error(owner.usage)) + rm(user, pkg, cb) + }) + + log.verbose("owner rm", "%s from %s", user, pkg) + mutate(pkg, user, function (u, owners) { + var found = false + , m = owners.filter(function (o) { + var match = (o.name === user) + found = found || match + return !match + }) + if (!found) { + log.info("owner rm", "Not a package owner: " + user) + return false + } + if (!m.length) return new Error( + "Cannot remove all owners of a package. Add someone else first.") + return m + }, cb) +} + +function mutate (pkg, user, mutation, cb) { + if (user) { + var byUser = "-/user/org.couchdb.user:" + user + mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, mutate_) + }) + } else { + mutate_(null, null) + } + + function mutate_ (er, u) { + if (!er && user && (!u || u.error)) er = new Error( + "Couldn't get user data for " + user + ": " + JSON.stringify(u)) + + if (er) { + log.error("owner mutate", "Error getting user data for %s", user) + return cb(er) + } + + if (u) u = { "name" : u.name, "email" : u.email } + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, data) { + if (er) { + log.error("owner mutate", "Error getting package data for %s", pkg) + return cb(er) + } + + // save the number of maintainers before mutation so that we can figure + // out if maintainers were added or removed + var beforeMutation = data.maintainers.length + + var m = mutation(u, data.maintainers) + if (!m) return cb() // handled + if (m instanceof Error) return cb(m) // error + + data = { + _id : data._id, + _rev : data._rev, + maintainers : m + } + var dataPath = pkg.replace("/", "%2f") + "/-rev/" + data._rev + mapToRegistry(dataPath, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + method : "PUT", + body : data, + auth : auth + } + npm.registry.request(uri, params, function (er, data) { + if (!er && data.error) { + er = new Error("Failed to update package metadata: "+JSON.stringify(data)) + } + + if (er) { + log.error("owner mutate", "Failed to update package metadata") + } + else if (m.length > beforeMutation) { + console.log("+ %s (%s)", user, pkg) + } + else if (m.length < beforeMutation) { + console.log("- %s (%s)", user, pkg) + } + + cb(er, data) + }) + }) + }) + }) + } +} + +function unknown (action, cb) { + cb("Usage: \n" + owner.usage) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/pack.js b/bin/nodejs4.6.0/node_modules/npm/lib/pack.js new file mode 100644 index 00000000..532f7c5a --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/pack.js @@ -0,0 +1,69 @@ +// npm pack +// Packs the specified package into a .tgz file, which can then +// be installed. + +module.exports = pack + +var npm = require("./npm.js") + , install = require("./install.js") + , cache = require("./cache.js") + , fs = require("graceful-fs") + , chain = require("slide").chain + , path = require("path") + , cwd = process.cwd() + , writeStreamAtomic = require('fs-write-stream-atomic') + , cachedPackageRoot = require("./cache/cached-package-root.js") + +pack.usage = "npm pack " + +// if it can be installed, it can be packed. +pack.completion = install.completion + +function pack (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + if (args.length === 0) args = ["."] + + chain(args.map(function (arg) { return function (cb) { + pack_(arg, cb) + }}), function (er, files) { + if (er || silent) return cb(er, files) + printFiles(files, cb) + }) +} + +function printFiles (files, cb) { + files = files.map(function (file) { + return path.relative(cwd, file) + }) + console.log(files.join("\n")) + cb() +} + +// add to cache, then cp to the cwd +function pack_ (pkg, cb) { + cache.add(pkg, null, null, false, function (er, data) { + if (er) return cb(er) + + // scoped packages get special treatment + var name = data.name + if (name[0] === "@") name = name.substr(1).replace(/\//g, "-") + var fname = name + "-" + data.version + ".tgz" + + var cached = path.join(cachedPackageRoot(data), "package.tgz") + , from = fs.createReadStream(cached) + , to = writeStreamAtomic(fname) + , errState = null + + from.on("error", cb_) + to.on("error", cb_) + to.on("close", cb_) + from.pipe(to) + + function cb_ (er) { + if (errState) return + if (er) return cb(errState = er) + cb(null, fname) + } + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/ping.js b/bin/nodejs4.6.0/node_modules/npm/lib/ping.js new file mode 100644 index 00000000..90639598 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/ping.js @@ -0,0 +1,20 @@ +var npm = require('./npm.js') + +module.exports = ping + +ping.usage = 'npm ping\nping registry' + +function ping (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + var registry = npm.config.get('registry') + if (!registry) return cb(new Error('no default registry set')) + var auth = npm.config.getCredentialsByURI(registry) + + npm.registry.ping(registry, {auth: auth}, function (er, pong) { + if (!silent) console.log(JSON.stringify(pong)) + cb(er, er ? null : pong) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/prefix.js b/bin/nodejs4.6.0/node_modules/npm/lib/prefix.js new file mode 100644 index 00000000..83d6ad1f --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/prefix.js @@ -0,0 +1,11 @@ +module.exports = prefix + +var npm = require("./npm.js") + +prefix.usage = "npm prefix\nnpm prefix -g\n(just prints the prefix folder)" + +function prefix (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + if (!silent) console.log(npm.prefix) + process.nextTick(cb.bind(this, null, npm.prefix)) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/prune.js b/bin/nodejs4.6.0/node_modules/npm/lib/prune.js new file mode 100644 index 00000000..7bfe7680 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/prune.js @@ -0,0 +1,56 @@ +// prune extraneous packages. + +module.exports = prune + +prune.usage = "npm prune" + +var readInstalled = require("read-installed") + , npm = require("./npm.js") + , path = require("path") + , readJson = require("read-package-json") + , log = require("npmlog") + +prune.completion = require("./utils/completion/installed-deep.js") + +function prune (args, cb) { + //check if is a valid package.json file + var jsonFile = path.resolve(npm.dir, "..", "package.json" ) + readJson(jsonFile, log.warn, function (er) { + if (er) return cb(er) + next() + }) + + function next() { + var opt = { + depth: npm.config.get("depth"), + dev: !npm.config.get("production") || npm.config.get("dev") + } + readInstalled(npm.prefix, opt, function (er, data) { + if (er) return cb(er) + prune_(args, data, cb) + }) + } +} + +function prune_ (args, data, cb) { + npm.commands.unbuild(prunables(args, data, []), cb) +} + +function prunables (args, data, seen) { + var deps = data.dependencies || {} + return Object.keys(deps).map(function (d) { + if (typeof deps[d] !== "object" + || seen.indexOf(deps[d]) !== -1) return null + seen.push(deps[d]) + if (deps[d].extraneous + && (args.length === 0 || args.indexOf(d) !== -1)) { + var extra = deps[d] + delete deps[d] + return extra.path + } + return prunables(args, deps[d], seen) + }).filter(function (d) { return d !== null }) + .reduce(function FLAT (l, r) { + return l.concat(Array.isArray(r) ? r.reduce(FLAT,[]) : r) + }, []) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/publish.js b/bin/nodejs4.6.0/node_modules/npm/lib/publish.js new file mode 100644 index 00000000..af56a748 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/publish.js @@ -0,0 +1,151 @@ + +module.exports = publish + +var npm = require("./npm.js") + , log = require("npmlog") + , path = require("path") + , readJson = require("read-package-json") + , lifecycle = require("./utils/lifecycle.js") + , chain = require("slide").chain + , mapToRegistry = require("./utils/map-to-registry.js") + , cachedPackageRoot = require("./cache/cached-package-root.js") + , createReadStream = require("graceful-fs").createReadStream + , npa = require("npm-package-arg") + , semver = require('semver') + , getPublishConfig = require("./utils/get-publish-config.js") + +publish.usage = "npm publish [--tag ]" + + "\nnpm publish [--tag ]" + + "\n\nPublishes '.' if no argument supplied" + + "\n\nSets tag `latest` if no --tag specified" + +publish.completion = function (opts, cb) { + // publish can complete to a folder with a package.json + // or a tarball, or a tarball url. + // for now, not yet implemented. + return cb() +} + +function publish (args, isRetry, cb) { + if (typeof cb !== "function") { + cb = isRetry + isRetry = false + } + if (args.length === 0) args = ["."] + if (args.length !== 1) return cb(publish.usage) + + log.verbose("publish", args) + + var t = npm.config.get('tag').trim() + if (semver.validRange(t)) { + var er = new Error("Tag name must not be a valid SemVer range: " + t) + return cb(er) + } + + var arg = args[0] + // if it's a local folder, then run the prepublish there, first. + readJson(path.resolve(arg, "package.json"), function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + + if (data) { + if (!data.name) return cb(new Error("No name provided")) + if (!data.version) return cb(new Error("No version provided")) + } + + // Error is OK. Could be publishing a URL or tarball, however, that means + // that we will not have automatically run the prepublish script, since + // that gets run when adding a folder to the cache. + if (er) return cacheAddPublish(arg, false, isRetry, cb) + else cacheAddPublish(arg, true, isRetry, cb) + }) +} + +// didPre in this case means that we already ran the prepublish script, +// and that the "dir" is an actual directory, and not something silly +// like a tarball or name@version thing. +// That means that we can run publish/postpublish in the dir, rather than +// in the cache dir. +function cacheAddPublish (dir, didPre, isRetry, cb) { + npm.commands.cache.add(dir, null, null, false, function (er, data) { + if (er) return cb(er) + log.silly("publish", data) + var cachedir = path.resolve(cachedPackageRoot(data), "package") + chain([ !didPre && + [lifecycle, data, "prepublish", cachedir] + , [publish_, dir, data, isRetry, cachedir] + , [lifecycle, data, "publish", didPre ? dir : cachedir] + , [lifecycle, data, "postpublish", didPre ? dir : cachedir] ] + , cb ) + }) +} + +function publish_ (arg, data, isRetry, cachedir, cb) { + if (!data) return cb(new Error("no package.json file found")) + + var mappedConfig = getPublishConfig( + data.publishConfig, + npm.config, + npm.registry + ) + var config = mappedConfig.config + var registry = mappedConfig.client + + data._npmVersion = npm.version + data._nodeVersion = process.versions.node + + delete data.modules + if (data.private) return cb( + new Error( + "This package has been marked as private\n" + + "Remove the 'private' field from the package.json to publish it." + ) + ) + + mapToRegistry(data.name, config, function (er, registryURI, auth, registryBase) { + if (er) return cb(er) + + var tarballPath = cachedir + ".tgz" + + // we just want the base registry URL in this case + log.verbose("publish", "registryBase", registryBase) + log.silly("publish", "uploading", tarballPath) + + data._npmUser = { + name : auth.username, + email : auth.email + } + + var params = { + metadata : data, + body : createReadStream(tarballPath), + auth : auth + } + + // registry-frontdoor cares about the access level, which is only + // configurable for scoped packages + if (config.get("access")) { + if (!npa(data.name).scope && config.get("access") === "restricted") { + return cb(new Error("Can't restrict access to unscoped packages.")) + } + + params.access = config.get("access") + } + + registry.publish(registryBase, params, function (er) { + if (er && er.code === "EPUBLISHCONFLICT" && + npm.config.get("force") && !isRetry) { + log.warn("publish", "Forced publish over " + data._id) + return npm.commands.unpublish([data._id], function (er) { + // ignore errors. Use the force. Reach out with your feelings. + // but if it fails again, then report the first error. + publish([arg], er || true, cb) + }) + } + // report the unpublish error if this was a retry and unpublish failed + if (er && isRetry && isRetry !== true) return cb(isRetry) + if (er) return cb(er) + console.log("+ " + data._id) + cb() + }) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/rebuild.js b/bin/nodejs4.6.0/node_modules/npm/lib/rebuild.js new file mode 100644 index 00000000..c6b45e55 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/rebuild.js @@ -0,0 +1,73 @@ + +module.exports = rebuild + +var readInstalled = require("read-installed") + , semver = require("semver") + , log = require("npmlog") + , npm = require("./npm.js") + , npa = require("npm-package-arg") + +rebuild.usage = "npm rebuild [[@] [name[@] ...]]" + +rebuild.completion = require("./utils/completion/installed-deep.js") + +function rebuild (args, cb) { + var opt = { depth: npm.config.get("depth"), dev: true } + readInstalled(npm.prefix, opt, function (er, data) { + log.info("readInstalled", typeof data) + if (er) return cb(er) + var set = filter(data, args) + , folders = Object.keys(set).filter(function (f) { + return f !== npm.prefix + }) + if (!folders.length) return cb() + log.silly("rebuild set", folders) + cleanBuild(folders, set, cb) + }) +} + +function cleanBuild (folders, set, cb) { + npm.commands.build(folders, function (er) { + if (er) return cb(er) + console.log(folders.map(function (f) { + return set[f] + " " + f + }).join("\n")) + cb() + }) +} + +function filter (data, args, set, seen) { + if (!set) set = {} + if (!seen) seen = {} + if (set.hasOwnProperty(data.path)) return set + if (seen.hasOwnProperty(data.path)) return set + seen[data.path] = true + var pass + if (!args.length) pass = true // rebuild everything + else if (data.name && data._id) { + for (var i = 0, l = args.length; i < l; i ++) { + var arg = args[i] + , nv = npa(arg) + , n = nv.name + , v = nv.rawSpec + if (n !== data.name) continue + if (!semver.satisfies(data.version, v, true)) continue + pass = true + break + } + } + if (pass && data._id) { + log.verbose("rebuild", "path, id", [data.path, data._id]) + set[data.path] = data._id + } + // need to also dive through kids, always. + // since this isn't an install these won't get auto-built unless + // they're not dependencies. + Object.keys(data.dependencies || {}).forEach(function (d) { + // return + var dep = data.dependencies[d] + if (typeof dep === "string") return + filter(dep, args, set, seen) + }) + return set +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/repo.js b/bin/nodejs4.6.0/node_modules/npm/lib/repo.js new file mode 100644 index 00000000..9aaa2e93 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/repo.js @@ -0,0 +1,78 @@ + +module.exports = repo + +repo.usage = "npm repo " + +var npm = require("./npm.js") + , opener = require("opener") + , github = require("github-url-from-git") + , githubUserRepo = require("github-url-from-username-repo") + , path = require("path") + , readJson = require("read-package-json") + , fs = require("fs") + , url_ = require("url") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + +repo.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function repo (args, cb) { + var n = args.length && npa(args[0]).name || "." + fs.stat(n, function (er, s) { + if (er && er.code === "ENOENT") return callRegistry(n, cb) + else if (er) return cb(er) + if (!s.isDirectory()) return callRegistry(n, cb) + readJson(path.resolve(n, "package.json"), function (er, d) { + if (er) return cb(er) + getUrlAndOpen(d, cb) + }) + }) +} + +function getUrlAndOpen (d, cb) { + var r = d.repository + if (!r) return cb(new Error("no repository")) + // XXX remove this when npm@v1.3.10 from node 0.10 is deprecated + // from https://github.com/npm/npm-www/issues/418 + if (githubUserRepo(r.url)) + r.url = githubUserRepo(r.url) + + var url = (r.url && ~r.url.indexOf("github")) + ? github(r.url) + : nonGithubUrl(r.url) + + if (!url) + return cb(new Error("no repository: could not get url")) + opener(url, { command: npm.config.get("browser") }, cb) +} + +function callRegistry (n, cb) { + mapToRegistry(n, npm.config, function (er, uri) { + if (er) return cb(er) + + npm.registry.get(uri + "/latest", { timeout : 3600 }, function (er, d) { + if (er) return cb(er) + getUrlAndOpen(d, cb) + }) + }) +} + +function nonGithubUrl (url) { + try { + var idx = url.indexOf("@") + if (idx !== -1) { + url = url.slice(idx+1).replace(/:([^\d]+)/, "/$1") + } + url = url_.parse(url) + var protocol = url.protocol === "https:" + ? "https:" + : "http:" + return protocol + "//" + (url.host || "") + + url.path.replace(/\.git$/, "") + } + catch(e) {} +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/restart.js b/bin/nodejs4.6.0/node_modules/npm/lib/restart.js new file mode 100644 index 00000000..ea06e687 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/restart.js @@ -0,0 +1 @@ +module.exports = require("./utils/lifecycle.js").cmd("restart") diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/root.js b/bin/nodejs4.6.0/node_modules/npm/lib/root.js new file mode 100644 index 00000000..a7a0645a --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/root.js @@ -0,0 +1,11 @@ +module.exports = root + +var npm = require("./npm.js") + +root.usage = "npm root\nnpm root -g\n(just prints the root folder)" + +function root (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + if (!silent) console.log(npm.dir) + process.nextTick(cb.bind(this, null, npm.dir)) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/run-script.js b/bin/nodejs4.6.0/node_modules/npm/lib/run-script.js new file mode 100644 index 00000000..1c1d9be9 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/run-script.js @@ -0,0 +1,172 @@ +module.exports = runScript + +var lifecycle = require("./utils/lifecycle.js") + , npm = require("./npm.js") + , path = require("path") + , readJson = require("read-package-json") + , log = require("npmlog") + , chain = require("slide").chain + +runScript.usage = "npm run-script [-- ]" + +runScript.completion = function (opts, cb) { + + // see if there's already a package specified. + var argv = opts.conf.argv.remain + + if (argv.length >= 4) return cb() + + if (argv.length === 3) { + // either specified a script locally, in which case, done, + // or a package, in which case, complete against its scripts + var json = path.join(npm.localPrefix, "package.json") + return readJson(json, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) d = {} + var scripts = Object.keys(d.scripts || {}) + console.error("local scripts", scripts) + if (scripts.indexOf(argv[2]) !== -1) return cb() + // ok, try to find out which package it was, then + var pref = npm.config.get("global") ? npm.config.get("prefix") + : npm.localPrefix + var pkgDir = path.resolve( pref, "node_modules" + , argv[2], "package.json" ) + readJson(pkgDir, function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) d = {} + var scripts = Object.keys(d.scripts || {}) + return cb(null, scripts) + }) + }) + } + + readJson(path.join(npm.localPrefix, "package.json"), function (er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + d = d || {} + cb(null, Object.keys(d.scripts || {})) + }) +} + +function runScript (args, cb) { + if (!args.length) return list(cb) + + var pkgdir = npm.localPrefix + , cmd = args.shift() + + readJson(path.resolve(pkgdir, "package.json"), function (er, d) { + if (er) return cb(er) + run(d, pkgdir, cmd, args, cb) + }) +} + +function list(cb) { + var json = path.join(npm.localPrefix, "package.json") + var cmdList = [ "publish", "install", "uninstall" + , "test", "stop", "start", "restart", "version" + ].reduce(function (l, p) { + return l.concat(["pre" + p, p, "post" + p]) + }, []) + return readJson(json, function(er, d) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) d = {} + var allScripts = Object.keys(d.scripts || {}) + var scripts = [] + var runScripts = [] + allScripts.forEach(function (script) { + if (cmdList.indexOf(script) !== -1) scripts.push(script) + else runScripts.push(script) + }) + + if (log.level === "silent") { + return cb(null, allScripts) + } + + if (npm.config.get("json")) { + console.log(JSON.stringify(d.scripts || {}, null, 2)) + return cb(null, allScripts) + } + + if (npm.config.get("parseable")) { + allScripts.forEach(function(script) { + console.log(script + ":" + d.scripts[script]) + }) + return cb(null, allScripts) + } + + var s = "\n " + var prefix = " " + if (scripts.length) { + console.log("Lifecycle scripts included in %s:", d.name) + } + scripts.forEach(function(script) { + console.log(prefix + script + s + d.scripts[script]) + }) + if (!scripts.length && runScripts.length) { + console.log("Scripts available in %s via `npm run-script`:", d.name) + } + else if (runScripts.length) { + console.log("\navailable via `npm run-script`:") + } + runScripts.forEach(function(script) { + console.log(prefix + script + s + d.scripts[script]) + }) + return cb(null, allScripts) + }) +} + +function run (pkg, wd, cmd, args, cb) { + if (!pkg.scripts) pkg.scripts = {} + + var cmds + if (cmd === "restart" && !pkg.scripts.restart) { + cmds = [ + "prestop", "stop", "poststop", + "restart", + "prestart", "start", "poststart" + ] + } else { + if (!pkg.scripts[cmd]) { + if (cmd === "test") { + pkg.scripts.test = "echo \"Error: no test specified\"" + } else if (cmd === "env") { + if (process.platform === "win32") { + log.verbose("run-script using default platform env: SET (Windows)") + pkg.scripts[cmd] = "SET" + } else { + log.verbose("run-script using default platform env: env (Unix)") + pkg.scripts[cmd] = "env" + } + } else if (npm.config.get("if-present")) { + return cb(null); + } else { + return cb(new Error("missing script: " + cmd)) + } + } + cmds = [cmd] + } + + if (!cmd.match(/^(pre|post)/)) { + cmds = ["pre"+cmd].concat(cmds).concat("post"+cmd) + } + + log.verbose("run-script", cmds) + chain(cmds.map(function (c) { + // pass cli arguments after -- to script. + if (pkg.scripts[c] && c === cmd) { + pkg.scripts[c] = pkg.scripts[c] + joinArgs(args) + } + + // when running scripts explicitly, assume that they're trusted. + return [lifecycle, pkg, c, wd, true] + }), cb) +} + +// join arguments after '--' and pass them to script, +// handle special characters such as ', ", ' '. +function joinArgs (args) { + var joinedArgs = "" + args.forEach(function(arg) { + joinedArgs += ' "' + arg.replace(/"/g, '\\"') + '"' + }) + return joinedArgs +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/search.js b/bin/nodejs4.6.0/node_modules/npm/lib/search.js new file mode 100644 index 00000000..e60091cd --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/search.js @@ -0,0 +1,269 @@ + +module.exports = exports = search + +var npm = require("./npm.js") + , columnify = require("columnify") + , updateIndex = require("./cache/update-index.js") + +search.usage = "npm search [some search terms ...]" + +search.completion = function (opts, cb) { + var compl = {} + , partial = opts.partialWord + , ipartial = partial.toLowerCase() + , plen = partial.length + + // get the batch of data that matches so far. + // this is an example of using npm.commands.search programmatically + // to fetch data that has been filtered by a set of arguments. + search(opts.conf.argv.remain.slice(2), true, function (er, data) { + if (er) return cb(er) + Object.keys(data).forEach(function (name) { + data[name].words.split(" ").forEach(function (w) { + if (w.toLowerCase().indexOf(ipartial) === 0) { + compl[partial + w.substr(plen)] = true + } + }) + }) + cb(null, Object.keys(compl)) + }) +} + +function search (args, silent, staleness, cb) { + if (typeof cb !== "function") cb = staleness, staleness = 600 + if (typeof cb !== "function") cb = silent, silent = false + + var searchopts = npm.config.get("searchopts") + var searchexclude = npm.config.get("searchexclude") + + if (typeof searchopts !== "string") searchopts = "" + searchopts = searchopts.split(/\s+/) + var opts = searchopts.concat(args).map(function (s) { + return s.toLowerCase() + }).filter(function (s) { return s }) + + if (typeof searchexclude === "string") { + searchexclude = searchexclude.split(/\s+/) + } else { + searchexclude = [] + } + searchexclude = searchexclude.map(function (s) { + return s.toLowerCase() + }) + + getFilteredData(staleness, opts, searchexclude, function (er, data) { + // now data is the list of data that we want to show. + // prettify and print it, and then provide the raw + // data to the cb. + if (er || silent) return cb(er, data) + console.log(prettify(data, args)) + cb(null, data) + }) +} + +function getFilteredData (staleness, args, notArgs, cb) { + updateIndex(staleness, function (er, data) { + if (er) return cb(er) + return cb(null, filter(data, args, notArgs)) + }) +} + +function filter (data, args, notArgs) { + // data={:{package data}} + return Object.keys(data).map(function (d) { + return data[d] + }).filter(function (d) { + return typeof d === "object" + }).map(stripData).map(getWords).filter(function (data) { + return filterWords(data, args, notArgs) + }).reduce(function (l, r) { + l[r.name] = r + return l + }, {}) +} + +function stripData (data) { + return { name: data.name + , description: npm.config.get("description") ? data.description : "" + , maintainers: (data.maintainers || []).map(function (m) { + return "=" + m.name + }) + , url: !Object.keys(data.versions || {}).length ? data.url : null + , keywords: data.keywords || [] + , version: Object.keys(data.versions || {})[0] || [] + , time: data.time + && data.time.modified + && (new Date(data.time.modified).toISOString() + .split("T").join(" ") + .replace(/:[0-9]{2}\.[0-9]{3}Z$/, "")) + .slice(0, -5) // remove time + || "prehistoric" + } +} + +function getWords (data) { + data.words = [ data.name ] + .concat(data.description) + .concat(data.maintainers) + .concat(data.url && ("<" + data.url + ">")) + .concat(data.keywords) + .map(function (f) { return f && f.trim && f.trim() }) + .filter(function (f) { return f }) + .join(" ") + .toLowerCase() + return data +} + +function filterWords (data, args, notArgs) { + var words = data.words + for (var i = 0, l = args.length; i < l; i ++) { + if (!match(words, args[i])) return false + } + for (i = 0, l = notArgs.length; i < l; i ++) { + if (match(words, notArgs[i])) return false + } + return true +} + +function match (words, arg) { + if (arg.charAt(0) === "/") { + arg = arg.replace(/\/$/, "") + arg = new RegExp(arg.substr(1, arg.length - 1)) + return words.match(arg) + } + return words.indexOf(arg) !== -1 +} + +function prettify (data, args) { + var searchsort = (npm.config.get("searchsort") || "NAME").toLowerCase() + , sortField = searchsort.replace(/^\-+/, "") + , searchRev = searchsort.charAt(0) === "-" + , truncate = !npm.config.get("long") + + if (Object.keys(data).length === 0) { + return "No match found for "+(args.map(JSON.stringify).join(" ")) + } + + var lines = Object.keys(data).map(function (d) { + // strip keyname + return data[d] + }).map(function(dat) { + dat.author = dat.maintainers + delete dat.maintainers + dat.date = dat.time + delete dat.time + return dat + }).map(function(dat) { + // split keywords on whitespace or , + if (typeof dat.keywords === "string") { + dat.keywords = dat.keywords.split(/[,\s]+/) + } + if (Array.isArray(dat.keywords)) { + dat.keywords = dat.keywords.join(" ") + } + + // split author on whitespace or , + if (typeof dat.author === "string") { + dat.author = dat.author.split(/[,\s]+/) + } + if (Array.isArray(dat.author)) { + dat.author = dat.author.join(" ") + } + return dat + }) + + lines.sort(function(a, b) { + var aa = a[sortField].toLowerCase() + , bb = b[sortField].toLowerCase() + return aa === bb ? 0 + : aa < bb ? -1 : 1 + }) + + if (searchRev) lines.reverse() + + var columns = npm.config.get("description") + ? ["name", "description", "author", "date", "version", "keywords"] + : ["name", "author", "date", "version", "keywords"] + + var output = columnify(lines, { + include: columns + , truncate: truncate + , config: { + name: { maxWidth: 40, truncate: false, truncateMarker: "" } + , description: { maxWidth: 60 } + , author: { maxWidth: 20 } + , date: { maxWidth: 11 } + , version: { maxWidth: 11 } + , keywords: { maxWidth: Infinity } + } + }) + output = trimToMaxWidth(output) + output = highlightSearchTerms(output, args) + + return output +} + +var colors = [31, 33, 32, 36, 34, 35 ] + , cl = colors.length + +function addColorMarker (str, arg, i) { + var m = i % cl + 1 + , markStart = String.fromCharCode(m) + , markEnd = String.fromCharCode(0) + + if (arg.charAt(0) === "/") { + //arg = arg.replace(/\/$/, "") + return str.replace( new RegExp(arg.substr(1, arg.length - 2), "gi") + , function (bit) { return markStart + bit + markEnd } ) + + } + + // just a normal string, do the split/map thing + var pieces = str.toLowerCase().split(arg.toLowerCase()) + , p = 0 + + return pieces.map(function (piece) { + piece = str.substr(p, piece.length) + var mark = markStart + + str.substr(p+piece.length, arg.length) + + markEnd + p += piece.length + arg.length + return piece + mark + }).join("") +} + +function colorize (line) { + for (var i = 0; i < cl; i ++) { + var m = i + 1 + var color = npm.color ? "\033["+colors[i]+"m" : "" + line = line.split(String.fromCharCode(m)).join(color) + } + var uncolor = npm.color ? "\033[0m" : "" + return line.split("\u0000").join(uncolor) +} + +function getMaxWidth() { + var cols + try { + var tty = require("tty") + , stdout = process.stdout + cols = !tty.isatty(stdout.fd) ? Infinity : process.stdout.getWindowSize()[0] + cols = (cols === 0) ? Infinity : cols + } catch (ex) { cols = Infinity } + return cols +} + +function trimToMaxWidth(str) { + var maxWidth = getMaxWidth() + return str.split("\n").map(function(line) { + return line.slice(0, maxWidth) + }).join("\n") +} + +function highlightSearchTerms(str, terms) { + terms.forEach(function (arg, i) { + str = addColorMarker(str, arg, i) + }) + + return colorize(str).trim() +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/set.js b/bin/nodejs4.6.0/node_modules/npm/lib/set.js new file mode 100644 index 00000000..8bd8a857 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/set.js @@ -0,0 +1,13 @@ + +module.exports = set + +set.usage = "npm set (See `npm config`)" + +var npm = require("./npm.js") + +set.completion = npm.commands.config.completion + +function set (args, cb) { + if (!args.length) return cb(set.usage) + npm.commands.config(["set"].concat(args), cb) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/shrinkwrap.js b/bin/nodejs4.6.0/node_modules/npm/lib/shrinkwrap.js new file mode 100644 index 00000000..210e3ee0 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/shrinkwrap.js @@ -0,0 +1,86 @@ +// emit JSON describing versions of all packages currently installed (for later +// use with shrinkwrap install) + +module.exports = exports = shrinkwrap + +var npm = require("./npm.js") + , log = require("npmlog") + , fs = require("fs") + , writeFileAtomic = require("write-file-atomic") + , path = require("path") + , readJson = require("read-package-json") + , sortedObject = require("sorted-object") + +shrinkwrap.usage = "npm shrinkwrap" + +function shrinkwrap (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + if (args.length) { + log.warn("shrinkwrap", "doesn't take positional args") + } + + // https://github.com/npm/npm/issues/7641 + // introduced because `npm ls` can now show dev and prod depenednecy + // trees separately + if (npm.config.get("dev")) { + npm.config.set("production", true) + } + npm.commands.ls([], true, function (er, _, pkginfo) { + if (er) return cb(er) + shrinkwrap_(pkginfo, silent, npm.config.get("dev"), cb) + }) +} + +function shrinkwrap_ (pkginfo, silent, dev, cb) { + if (pkginfo.problems) { + return cb(new Error("Problems were encountered\n" + +"Please correct and try again.\n" + +pkginfo.problems.join("\n"))) + } + + if (!dev) { + // remove dev deps unless the user does --dev + readJson(path.resolve(npm.prefix, "package.json"), function (er, data) { + if (er) + return cb(er) + if (data.devDependencies) { + Object.keys(data.devDependencies).forEach(function (dep) { + if (data.dependencies && data.dependencies[dep]) { + // do not exclude the dev dependency if it's also listed as a dependency + return + } + + log.warn("shrinkwrap", "Excluding devDependency: %s", dep, data.dependencies) + delete pkginfo.dependencies[dep] + }) + } + save(pkginfo, silent, cb) + }) + } else { + save(pkginfo, silent, cb) + } +} + + +function save (pkginfo, silent, cb) { + // copy the keys over in a well defined order + // because javascript objects serialize arbitrarily + pkginfo.dependencies = sortedObject(pkginfo.dependencies || {}) + var swdata + try { + swdata = JSON.stringify(pkginfo, null, 2) + "\n" + } catch (er) { + log.error("shrinkwrap", "Error converting package info to json") + return cb(er) + } + + var file = path.resolve(npm.prefix, "npm-shrinkwrap.json") + + writeFileAtomic(file, swdata, function (er) { + if (er) return cb(er) + if (silent) return cb(null, pkginfo) + console.log("wrote npm-shrinkwrap.json") + cb(null, pkginfo) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/star.js b/bin/nodejs4.6.0/node_modules/npm/lib/star.js new file mode 100644 index 00000000..03620e6b --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/star.js @@ -0,0 +1,41 @@ + +module.exports = star + +var npm = require("./npm.js") + , log = require("npmlog") + , asyncMap = require("slide").asyncMap + , mapToRegistry = require("./utils/map-to-registry.js") + +star.usage = "npm star [pkg, pkg, ...]\n" + + "npm unstar [pkg, pkg, ...]" + +star.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function star (args, cb) { + if (!args.length) return cb(star.usage) + var s = npm.config.get("unicode") ? "\u2605 " : "(*)" + , u = npm.config.get("unicode") ? "\u2606 " : "( )" + , using = !(npm.command.match(/^un/)) + if (!using) s = u + asyncMap(args, function (pkg, cb) { + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + starred : using, + auth : auth + } + npm.registry.star(uri, params, function (er, data, raw, req) { + if (!er) { + console.log(s + " "+pkg) + log.verbose("star", data) + } + cb(er, data, raw, req) + }) + }) + }, cb) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/stars.js b/bin/nodejs4.6.0/node_modules/npm/lib/stars.js new file mode 100644 index 00000000..9307d6ce --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/stars.js @@ -0,0 +1,46 @@ +module.exports = stars + +stars.usage = "npm stars [username]" + +var npm = require("./npm.js") + , log = require("npmlog") + , mapToRegistry = require("./utils/map-to-registry.js") + +function stars (args, cb) { + npm.commands.whoami([], true, function (er, username) { + var name = args.length === 1 ? args[0] : username + + if (er) { + if (er.code === 'ENEEDAUTH' && !name) { + var needAuth = new Error("'npm stars' on your own user account requires auth") + needAuth.code = 'ENEEDAUTH' + return cb(needAuth) + } + + if (er.code !== 'ENEEDAUTH') return cb(er) + } + + mapToRegistry("", npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + username : name, + auth : auth + } + npm.registry.stars(uri, params, showstars) + }) + }) + + function showstars (er, data) { + if (er) return cb(er) + + if (data.rows.length === 0) { + log.warn("stars", "user has not starred any packages.") + } else { + data.rows.forEach(function(a) { + console.log(a.value) + }) + } + cb() + } +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/start.js b/bin/nodejs4.6.0/node_modules/npm/lib/start.js new file mode 100644 index 00000000..c2093f7a --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/start.js @@ -0,0 +1 @@ +module.exports = require("./utils/lifecycle.js").cmd("start") diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/stop.js b/bin/nodejs4.6.0/node_modules/npm/lib/stop.js new file mode 100644 index 00000000..f3af33e7 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/stop.js @@ -0,0 +1 @@ +module.exports = require("./utils/lifecycle.js").cmd("stop") diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/substack.js b/bin/nodejs4.6.0/node_modules/npm/lib/substack.js new file mode 100644 index 00000000..e8fd3d24 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/substack.js @@ -0,0 +1,20 @@ +module.exports = substack +var npm = require("./npm.js") + +var isms = + [ "\033[32mbeep \033[35mboop\033[m" + , "Replace your configs with services" + , "SEPARATE ALL THE CONCERNS!" + , "MODULE ALL THE THINGS!" + , "\\o/" + , "but first, burritos" + , "full time mad scientist here" + , "c/,,\\" ] + +function substack (args, cb) { + var i = Math.floor(Math.random() * isms.length) + console.log(isms[i]) + var c = args.shift() + if (c) npm.commands[c](args, cb) + else cb() +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/tag.js b/bin/nodejs4.6.0/node_modules/npm/lib/tag.js new file mode 100644 index 00000000..6a958179 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/tag.js @@ -0,0 +1,41 @@ +// turns out tagging isn't very complicated +// all the smarts are in the couch. +module.exports = tag +tag.usage = "npm tag @ []" + +tag.completion = require("./unpublish.js").completion + +var npm = require("./npm.js") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , semver = require("semver") + , log = require("npmlog") + +function tag (args, cb) { + var thing = npa(args.shift() || "") + , project = thing.name + , version = thing.rawSpec + , t = args.shift() || npm.config.get("tag") + + t = t.trim() + + if (!project || !version || !t) return cb("Usage:\n"+tag.usage) + + if (semver.validRange(t)) { + var er = new Error("Tag name must not be a valid SemVer range: " + t) + return cb(er) + } + + log.warn("tag", "This command is deprecated. Use `npm dist-tag` instead.") + + mapToRegistry(project, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version : version, + tag : t, + auth : auth + } + npm.registry.tag(uri, params, cb) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/team.js b/bin/nodejs4.6.0/node_modules/npm/lib/team.js new file mode 100644 index 00000000..221e01bf --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/team.js @@ -0,0 +1,54 @@ +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm') + +module.exports = team + +team.subcommands = ['create', 'destroy', 'add', 'rm', 'ls', 'edit'] + +team.usage = + 'npm team create \n' + + 'npm team destroy \n' + + 'npm team add \n' + + 'npm team rm \n' + + 'npm team ls |\n' + + 'npm team edit ' + +team.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, team.subcommands) + } + switch (argv[2]) { + case 'ls': + case 'create': + case 'destroy': + case 'add': + case 'rm': + case 'edit': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function team (args, cb) { + // Entities are in the format : + var cmd = args.shift() + var entity = (args.shift() || '').split(':') + return mapToRegistry('/', npm.config, function (err, uri, auth) { + if (err) { return cb(err) } + try { + return npm.registry.team(cmd, uri, { + auth: auth, + scope: entity[0], + team: entity[1], + user: args.shift() + }, function (err, data) { + !err && data && console.log(JSON.stringify(data, undefined, 2)) + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + team.usage) + } + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/test.js b/bin/nodejs4.6.0/node_modules/npm/lib/test.js new file mode 100644 index 00000000..bb86d113 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/test.js @@ -0,0 +1,13 @@ +module.exports = test + +var testCmd = require("./utils/lifecycle.js").cmd("test") + +function test (args, cb) { + testCmd(args, function (er) { + if (!er) return cb() + if (er.code === "ELIFECYCLE") { + return cb("Test failed. See above for more details.") + } + return cb(er) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/unbuild.js b/bin/nodejs4.6.0/node_modules/npm/lib/unbuild.js new file mode 100644 index 00000000..69b53e06 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/unbuild.js @@ -0,0 +1,115 @@ +module.exports = unbuild +unbuild.usage = "npm unbuild \n(this is plumbing)" + +var readJson = require("read-package-json") + , gentlyRm = require("./utils/gently-rm.js") + , npm = require("./npm.js") + , path = require("path") + , isInside = require("path-is-inside") + , lifecycle = require("./utils/lifecycle.js") + , asyncMap = require("slide").asyncMap + , chain = require("slide").chain + , log = require("npmlog") + , build = require("./build.js") + +// args is a list of folders. +// remove any bins/etc, and then delete the folder. +function unbuild (args, silent, cb) { + if (typeof silent === "function") cb = silent, silent = false + asyncMap(args, unbuild_(silent), cb) +} + +function unbuild_ (silent) { return function (folder, cb_) { + function cb (er) { + cb_(er, path.relative(npm.root, folder)) + } + folder = path.resolve(folder) + var 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) { + // if no json, then just trash it, but no scripts or whatever. + if (er) return gentlyRm(folder, false, base, cb) + chain + ( [ [lifecycle, pkg, "preuninstall", folder, false, true] + , [lifecycle, pkg, "uninstall", folder, false, true] + , !silent && function(cb) { + console.log("unbuild " + pkg._id) + cb() + } + , [rmStuff, pkg, folder] + , [lifecycle, pkg, "postuninstall", folder, false, true] + , [gentlyRm, folder, false, base] ] + , cb ) + }) +}} + +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 parent = path.dirname(folder) + , gnm = npm.dir + , top = gnm === parent + + log.verbose("unbuild rmStuff", pkg._id, "from", gnm) + if (!top) log.verbose("unbuild rmStuff", "in", parent) + asyncMap([rmBins, rmMans], function (fn, cb) { + fn(pkg, folder, parent, top, cb) + }, cb) +} + +function rmBins (pkg, folder, parent, top, cb) { + if (!pkg.bin) return cb() + var 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] + , [gentlyRm, path.resolve(binRoot, b), true] ], cb) + } else { + gentlyRm(path.resolve(binRoot, b), true, cb) + } + }, cb) +} + +function rmMans (pkg, folder, parent, top, cb) { + if (!pkg.man + || !top + || process.platform === "win32" + || !npm.config.get("global")) { + return cb() + } + var 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)) { + man.forEach(rmMan) + } else { + rmMan(man) + } + + function rmMan (man) { + log.silly("rmMan", "preparing to remove", man) + var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) + if (!parseMan) { + log.error( + "rmMan", man, "is not a valid name for a man file.", + "Man files must end with a number, " + + "and optionally a .gz suffix if they are compressed." + ) + return cb() + } + + var stem = parseMan[1] + var sxn = parseMan[2] + var gz = parseMan[3] || "" + var bn = path.basename(stem) + var manDest = path.join( + manRoot, + "man"+sxn, + (bn.indexOf(pkg.name) === 0 ? bn : pkg.name+"-"+bn)+"."+sxn+gz + ) + gentlyRm(manDest, true, cb) + } + }, cb) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/uninstall.js b/bin/nodejs4.6.0/node_modules/npm/lib/uninstall.js new file mode 100644 index 00000000..2386cdf4 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/uninstall.js @@ -0,0 +1,128 @@ + +// remove a package. + +module.exports = uninstall + +uninstall.usage = "npm uninstall [@ [[@] ...]" + + "\nnpm rm [@ [[@] ...]" + +uninstall.completion = require("./utils/completion/installed-shallow.js") + +var fs = require("graceful-fs") + , writeFileAtomic = require("write-file-atomic") + , log = require("npmlog") + , readJson = require("read-package-json") + , path = require("path") + , npm = require("./npm.js") + , asyncMap = require("slide").asyncMap + +function uninstall (args, cb) { + // this is super easy + // get the list of args that correspond to package names in either + // the global npm.dir, + // then call unbuild on all those folders to pull out their bins + // and mans and whatnot, and then delete the folder. + + var nm = npm.dir + if (args.length === 1 && args[0] === ".") args = [] + if (args.length) return uninstall_(args, nm, cb) + + // remove this package from the global space, if it's installed there + readJson(path.resolve(npm.localPrefix, "package.json"), function (er, pkg) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb(uninstall.usage) + uninstall_( [pkg.name] + , npm.globalDir + , cb ) + }) + +} + +function uninstall_ (args, nm, cb) { + // if we've been asked to --save or --save-dev or --save-optional, + // then also remove it from the associated dependencies hash. + var s = npm.config.get('save') + , d = npm.config.get('save-dev') + , o = npm.config.get('save-optional') + if (s || d || o) { + cb = saver(args, nm, cb) + } + + asyncMap(args, function (arg, cb) { + // uninstall .. should not delete /usr/local/lib/node_modules/.. + var p = path.join(path.resolve(nm), path.join("/", arg)) + if (path.resolve(p) === nm) { + log.warn("uninstall", "invalid argument: %j", arg) + return cb(null, []) + } + fs.lstat(p, function (er) { + if (er) { + log.warn("uninstall", "not installed in %s: %j", nm, arg) + return cb(null, []) + } + cb(null, p) + }) + }, function (er, folders) { + if (er) return cb(er) + asyncMap(folders, npm.commands.unbuild, cb) + }) +} + +function saver (args, nm, cb_) { + return cb + function cb (er, data) { + var s = npm.config.get('save') + , d = npm.config.get('save-dev') + , o = npm.config.get('save-optional') + if (er || !(s || d || o)) return cb_(er, data) + var pj = path.resolve(nm, '..', 'package.json') + // don't use readJson here, because we don't want all the defaults + // filled in, for mans and other bs. + fs.readFile(pj, 'utf8', function (er, json) { + var pkg + try { + pkg = JSON.parse(json) + } catch (_) {} + if (!pkg) return cb_(null, data) + + var bundle + if (npm.config.get('save-bundle')) { + bundle = pkg.bundleDependencies || pkg.bundledDependencies + if (!Array.isArray(bundle)) bundle = undefined + } + + var changed = false + args.forEach(function (a) { + ; [ [s, 'dependencies'] + , [o, 'optionalDependencies'] + , [d, 'devDependencies'] ].forEach(function (f) { + var flag = f[0] + , field = f[1] + if (!flag || !pkg[field] || !pkg[field].hasOwnProperty(a)) return + changed = true + + if (bundle) { + var i = bundle.indexOf(a) + if (i !== -1) bundle.splice(i, 1) + } + + delete pkg[field][a] + }) + }) + if (!changed) return cb_(null, data) + + if (bundle) { + delete pkg.bundledDependencies + if (bundle.length) { + pkg.bundleDependencies = bundle + } else { + delete pkg.bundleDependencies + } + } + + writeFileAtomic(pj, JSON.stringify(pkg, null, 2) + "\n", function (er) { + return cb_(er, data) + }) + }) + } +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/unpublish.js b/bin/nodejs4.6.0/node_modules/npm/lib/unpublish.js new file mode 100644 index 00000000..b1230c78 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/unpublish.js @@ -0,0 +1,115 @@ + +module.exports = unpublish + +var log = require("npmlog") +var npm = require("./npm.js") +var readJson = require("read-package-json") +var path = require("path") +var mapToRegistry = require("./utils/map-to-registry.js") +var npa = require("npm-package-arg") +var getPublishConfig = require("./utils/get-publish-config.js") + +unpublish.usage = "npm unpublish [@]" + +unpublish.completion = function (opts, cb) { + if (opts.conf.argv.remain.length >= 3) return cb() + npm.commands.whoami([], true, function (er, username) { + if (er) return cb() + + var un = encodeURIComponent(username) + if (!un) return cb() + var byUser = "-/by-user/" + un + mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, pkgs) { + // do a bit of filtering at this point, so that we don't need + // to fetch versions for more than one thing, but also don't + // accidentally a whole project. + pkgs = pkgs[un] + if (!pkgs || !pkgs.length) return cb() + var pp = npa(opts.partialWord).name + pkgs = pkgs.filter(function (p) { + return p.indexOf(pp) === 0 + }) + if (pkgs.length > 1) return cb(null, pkgs) + mapToRegistry(pkgs[0], npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, d) { + if (er) return cb(er) + var vers = Object.keys(d.versions) + if (!vers.length) return cb(null, pkgs) + return cb(null, vers.map(function (v) { + return pkgs[0] + "@" + v + })) + }) + }) + }) + }) + }) +} + +function unpublish (args, cb) { + if (args.length > 1) return cb(unpublish.usage) + + var thing = args.length ? npa(args[0]) : {} + , project = thing.name + , version = thing.rawSpec + + log.silly("unpublish", "args[0]", args[0]) + log.silly("unpublish", "thing", thing) + if (!version && !npm.config.get("force")) { + return cb("Refusing to delete entire project.\n" + + "Run with --force to do this.\n" + + unpublish.usage) + } + + if (!project || path.resolve(project) === npm.localPrefix) { + // if there's a package.json in the current folder, then + // read the package name and version out of that. + var cwdJson = path.join(npm.localPrefix, "package.json") + return readJson(cwdJson, function (er, data) { + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (er) return cb("Usage:\n" + unpublish.usage) + log.verbose('unpublish', data) + gotProject(data.name, data.version, data.publishConfig, cb) + }) + } + return gotProject(project, version, cb) +} + +function gotProject (project, version, publishConfig, cb_) { + if (typeof cb_ !== 'function') { + cb_ = publishConfig + publishConfig = null + } + + function cb (er) { + if (er) return cb_(er) + console.log("- " + project + (version ? "@" + version : "")) + cb_() + } + + var mappedConfig = getPublishConfig(publishConfig, npm.config, npm.registry) + var config = mappedConfig.config + var registry = mappedConfig.client + + // remove from the cache first + npm.commands.cache(["clean", project, version], function (er) { + if (er) { + log.error("unpublish", "Failed to clean cache") + return cb(er) + } + + mapToRegistry(project, config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version: version, + auth: auth + } + registry.unpublish(uri, params, cb) + }) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/update.js b/bin/nodejs4.6.0/node_modules/npm/lib/update.js new file mode 100644 index 00000000..389f3dad --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/update.js @@ -0,0 +1,58 @@ +/* +for each pkg in prefix that isn't a git repo + look for a new version of pkg that satisfies dep + if so, install it. + if not, then update it +*/ + +module.exports = update + +update.usage = "npm update [pkg]" + +var npm = require("./npm.js") + , asyncMap = require("slide").asyncMap + , log = require("npmlog") + + // load these, just so that we know that they'll be available, in case + // npm itself is getting overwritten. + , install = require("./install.js") + , build = require("./build.js") + +update.completion = npm.commands.outdated.completion + +function update (args, cb) { + npm.commands.outdated(args, true, function (er, outdated) { + if (er) return cb(er) + + var wanted = outdated.filter(function (ww) { + var dep = ww[1] + var current = ww[2] + var wanted = ww[3] + var latest = ww[4] + if (current === wanted && wanted !== latest) { + log.verbose( + 'outdated', + 'not updating', dep, + "because it's currently at the maximum version that matches its specified semver range" + ) + } + return current !== wanted + }) + if (wanted.length === 0) return cb() + + log.info('outdated', 'updating', wanted) + asyncMap(wanted, function (ww, cb) { + // [[ dir, dep, has, want, req ]] + var where = ww[0] + , dep = ww[1] + , want = ww[3] + , what = dep + "@" + want + , req = ww[5] + , url = require('url') + + // use the initial installation method (repo, tar, git) for updating + if (url.parse(req).protocol) what = req + npm.commands.install(where, what, cb) + }, cb) + }) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/version.js b/bin/nodejs4.6.0/node_modules/npm/lib/version.js new file mode 100644 index 00000000..2e4628f7 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/version.js @@ -0,0 +1,209 @@ +// npm version + +module.exports = version + +var semver = require('semver') +var path = require('path') +var fs = require('graceful-fs') +var writeFileAtomic = require('write-file-atomic') +var chain = require('slide').chain +var log = require('npmlog') +var npm = require('./npm.js') +var git = require('./utils/git.js') +var assert = require('assert') +var lifecycle = require('./utils/lifecycle.js') + +version.usage = 'npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease]' + + '\n(run in package dir)\n' + + "'npm -v' or 'npm --version' to print npm version " + + '(' + npm.version + ')\n' + + "'npm view version' to view a package's " + + 'published version\n' + + "'npm ls' to inspect current package/dependency versions" + +function version (args, silent, cb_) { + if (typeof cb_ !== 'function') { + cb_ = silent + silent = false + } + if (args.length > 1) return cb_(version.usage) + + var packagePath = path.join(npm.localPrefix, 'package.json') + fs.readFile(packagePath, function (er, data) { + if (data) data = data.toString() + try { + data = JSON.parse(data) + } catch (e) { + er = e + data = null + } + + if (!args.length) return dump(data, cb_) + + if (er) { + log.error('version', 'No valid package.json found') + return cb_(er) + } + + var newVersion = semver.valid(args[0]) + if (!newVersion) newVersion = semver.inc(data.version, args[0]) + if (!newVersion) return cb_(version.usage) + if (data.version === newVersion) return cb_(new Error('Version not changed')) + data.version = newVersion + var lifecycleData = Object.create(data) + lifecycleData._id = data.name + '@' + newVersion + var localData = {} + + var where = npm.prefix + chain([ + [checkGit, localData], + [lifecycle, lifecycleData, 'preversion', where], + [updatePackage, newVersion, silent], + [lifecycle, lifecycleData, 'version', where], + [commit, localData, newVersion], + [lifecycle, lifecycleData, 'postversion', where] ], + cb_) + }) +} + +function readPackage (cb) { + var packagePath = path.join(npm.localPrefix, 'package.json') + fs.readFile(packagePath, function (er, data) { + if (er) return cb(new Error(er)) + if (data) data = data.toString() + try { + data = JSON.parse(data) + } catch (e) { + er = e + data = null + } + cb(er, data) + }) +} + +function updatePackage (newVersion, silent, cb_) { + function cb (er) { + if (!er && !silent) console.log('v' + newVersion) + cb_(er) + } + + readPackage(function (er, data) { + if (er) return cb(new Error(er)) + data.version = newVersion + write(data, 'package.json', cb) + }) +} + +function commit (localData, newVersion, cb) { + updateShrinkwrap(newVersion, function (er, hasShrinkwrap) { + if (er || !localData.hasGit) return cb(er) + _commit(newVersion, hasShrinkwrap, cb) + }) +} + +function updateShrinkwrap (newVersion, cb) { + fs.readFile(path.join(npm.localPrefix, 'npm-shrinkwrap.json'), function (er, data) { + if (er && er.code === 'ENOENT') return cb(null, false) + + try { + data = data.toString() + data = JSON.parse(data) + } catch (er) { + log.error('version', 'Bad npm-shrinkwrap.json data') + return cb(er) + } + + data.version = newVersion + write(data, 'npm-shrinkwrap.json', function (er) { + if (er) { + log.error('version', 'Bad npm-shrinkwrap.json data') + return cb(er) + } + cb(null, true) + }) + }) +} + +function dump (data, cb) { + var v = {} + + if (data && data.name && data.version) v[data.name] = data.version + v.npm = npm.version + Object.keys(process.versions).sort().forEach(function (k) { + v[k] = process.versions[k] + }) + + if (npm.config.get('json')) v = JSON.stringify(v, null, 2) + + console.log(v) + cb() +} + +function checkGit (localData, cb) { + fs.stat(path.join(npm.localPrefix, '.git'), function (er, s) { + var doGit = !er && npm.config.get('git-tag-version') + if (!doGit) { + if (er) log.verbose('version', 'error checking for .git', er) + log.verbose('version', 'not tagging in git') + return cb(null, false) + } + + // check for git + git.whichAndExec( + [ 'status', '--porcelain' ], + { env: process.env }, + function (er, stdout) { + if (er && er.code === 'ENOGIT') { + log.warn( + 'version', + 'This is a Git checkout, but the git command was not found.', + 'npm could not create a Git tag for this release!' + ) + return cb(null, false) + } + + var lines = stdout.trim().split('\n').filter(function (line) { + return line.trim() && !line.match(/^\?\? /) + }).map(function (line) { + return line.trim() + }) + if (lines.length && !npm.config.get('force')) { + return cb(new Error( + 'Git working directory not clean.\n' + lines.join('\n') + )) + } + localData.hasGit = true + cb(null, true) + } + ) + }) +} + +function _commit (version, hasShrinkwrap, cb) { + var packagePath = path.join(npm.localPrefix, 'package.json') + var options = { env: process.env } + var message = npm.config.get('message').replace(/%s/g, version) + var sign = npm.config.get('sign-git-tag') + var flag = sign ? '-sm' : '-am' + chain( + [ + git.chainableExec([ 'add', packagePath ], options), + hasShrinkwrap && git.chainableExec([ 'add', 'npm-shrinkwrap.json' ], options), + git.chainableExec([ 'commit', '-m', message ], options), + git.chainableExec([ 'tag', npm.config.get('tag-version-prefix') + version, flag, message ], options) + ], + cb + ) +} + +function write (data, file, cb) { + assert(data && typeof data === 'object', 'must pass data to version write') + assert(typeof file === 'string', 'must pass filename to write to version write') + + log.verbose('version.write', 'data', data, 'to', file) + writeFileAtomic( + path.join(npm.localPrefix, file), + new Buffer(JSON.stringify(data, null, 2) + '\n'), + cb + ) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/view.js b/bin/nodejs4.6.0/node_modules/npm/lib/view.js new file mode 100644 index 00000000..d9e5f9ae --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/view.js @@ -0,0 +1,302 @@ +// npm view [pkg [pkg ...]] + +module.exports = view +view.usage = "npm view pkg[@version] [[.subfield]...]" + +var npm = require("./npm.js") + , readJson = require("read-package-json") + , log = require("npmlog") + , util = require("util") + , semver = require("semver") + , mapToRegistry = require("./utils/map-to-registry.js") + , npa = require("npm-package-arg") + , path = require("path") + +view.completion = function (opts, cb) { + if (opts.conf.argv.remain.length <= 2) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + return cb() + } + // have the package, get the fields. + var tag = npm.config.get("tag") + mapToRegistry(opts.conf.argv.remain[2], npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, d) { + if (er) return cb(er) + var dv = d.versions[d["dist-tags"][tag]] + , fields = [] + d.versions = Object.keys(d.versions).sort(semver.compareLoose) + fields = getFields(d).concat(getFields(dv)) + cb(null, fields) + }) + }) + + function getFields (d, f, pref) { + f = f || [] + if (!d) return f + pref = pref || [] + Object.keys(d).forEach(function (k) { + if (k.charAt(0) === "_" || k.indexOf(".") !== -1) return + var p = pref.concat(k).join(".") + f.push(p) + if (Array.isArray(d[k])) { + d[k].forEach(function (val, i) { + var pi = p + "[" + i + "]" + if (val && typeof val === "object") getFields(val, f, [p]) + else f.push(pi) + }) + return + } + if (typeof d[k] === "object") getFields(d[k], f, [p]) + }) + return f + } +} + +function view (args, silent, cb) { + if (typeof cb !== "function") cb = silent, silent = false + + if (!args.length) args = ["."] + + var pkg = args.shift() + , nv = npa(pkg) + , name = nv.name + , local = (name === "." || !name) + + if (npm.config.get("global") && local) { + return cb(new Error("Cannot use view command in global mode.")) + } + + if (local) { + var dir = npm.prefix + readJson(path.resolve(dir, "package.json"), function (er, d) { + d = d || {} + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) + if (!d.name) return cb(new Error("Invalid package.json")) + + var p = d.name + nv = npa(p) + if (pkg && ~pkg.indexOf("@")) { + nv.rawSpec = pkg.split("@")[pkg.indexOf("@")] + } + + fetchAndRead(nv, args, silent, cb) + }) + } else { + fetchAndRead(nv, args, silent, cb) + } +} + +function fetchAndRead (nv, args, silent, cb) { + // get the data about this package + var name = nv.name + , version = nv.rawSpec || npm.config.get("tag") + + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth : auth }, function (er, data) { + if (er) return cb(er) + if (data["dist-tags"] && data["dist-tags"].hasOwnProperty(version)) { + version = data["dist-tags"][version] + } + + if (data.time && data.time.unpublished) { + var u = data.time.unpublished + er = new Error("Unpublished by " + u.name + " on " + u.time) + er.statusCode = 404 + er.code = "E404" + er.pkgid = data._id + return cb(er, data) + } + + + var results = [] + , error = null + , versions = data.versions || {} + data.versions = Object.keys(versions).sort(semver.compareLoose) + if (!args.length) args = [""] + + // remove readme unless we asked for it + if (-1 === args.indexOf("readme")) { + delete data.readme + } + + Object.keys(versions).forEach(function (v) { + if (semver.satisfies(v, version, true)) args.forEach(function (args) { + // remove readme unless we asked for it + if (-1 === args.indexOf("readme")) { + delete versions[v].readme + } + results.push(showFields(data, versions[v], args)) + }) + }) + results = results.reduce(reducer, {}) + var retval = results + + if (args.length === 1 && args[0] === "") { + retval = cleanBlanks(retval) + log.silly("cleanup", retval) + } + + if (error || silent) cb(error, retval) + else printData(results, data._id, cb.bind(null, error, retval)) + }) + }) +} + +function cleanBlanks (obj) { + var clean = {} + Object.keys(obj).forEach(function (version) { + clean[version] = obj[version][""] + }) + return clean +} + +function reducer (l, r) { + if (r) Object.keys(r).forEach(function (v) { + l[v] = l[v] || {} + Object.keys(r[v]).forEach(function (t) { + l[v][t] = r[v][t] + }) + }) + return l +} + +// return whatever was printed +function showFields (data, version, fields) { + var o = {} + ;[data, version].forEach(function (s) { + Object.keys(s).forEach(function (k) { + o[k] = s[k] + }) + }) + return search(o, fields.split("."), version.version, fields) +} + +function search (data, fields, version, title) { + var field + , tail = fields + while (!field && fields.length) field = tail.shift() + fields = [field].concat(tail) + var o + if (!field && !tail.length) { + o = {} + o[version] = {} + o[version][title] = data + return o + } + var index = field.match(/(.+)\[([^\]]+)\]$/) + if (index) { + field = index[1] + index = index[2] + if (data.field && data.field.hasOwnProperty(index)) { + return search(data[field][index], tail, version, title) + } else { + field = field + "[" + index + "]" + } + } + if (Array.isArray(data)) { + if (data.length === 1) { + return search(data[0], fields, version, title) + } + var results = [] + data.forEach(function (data, i) { + var tl = title.length + , newt = title.substr(0, tl-(fields.join(".").length) - 1) + + "["+i+"]" + [""].concat(fields).join(".") + results.push(search(data, fields.slice(), version, newt)) + }) + results = results.reduce(reducer, {}) + return results + } + if (!data.hasOwnProperty(field)) return undefined + data = data[field] + if (tail.length) { + if (typeof data === "object") { + // there are more fields to deal with. + return search(data, tail, version, title) + } else { + return new Error("Not an object: "+data) + } + } + o = {} + o[version] = {} + o[version][title] = data + return o +} + +function printData (data, name, cb) { + var versions = Object.keys(data) + , msg = "" + , includeVersions = versions.length > 1 + , includeFields + + versions.forEach(function (v) { + var fields = Object.keys(data[v]) + includeFields = includeFields || (fields.length > 1) + fields.forEach(function (f) { + var d = cleanup(data[v][f]) + if (includeVersions || includeFields || typeof d !== "string") { + d = cleanup(data[v][f]) + d = npm.config.get("json") + ? JSON.stringify(d, null, 2) + : util.inspect(d, false, 5, npm.color) + } else if (typeof d === "string" && npm.config.get("json")) { + d = JSON.stringify(d) + } + if (f && includeFields) f += " = " + if (d.indexOf("\n") !== -1) d = " \n" + d + msg += (includeVersions ? name + "@" + v + " " : "") + + (includeFields ? f : "") + d + "\n" + }) + }) + + // preserve output symmetry by adding a whitespace-only line at the end if + // there's one at the beginning + if (/^\s*\n/.test(msg)) msg += "\n" + + // print directly to stdout to not unnecessarily add blank lines + process.stdout.write(msg) + + cb(null, data) +} +function cleanup (data) { + if (Array.isArray(data)) { + if (data.length === 1) { + data = data[0] + } else { + return data.map(cleanup) + } + } + if (!data || typeof data !== "object") return data + + if (typeof data.versions === "object" + && data.versions + && !Array.isArray(data.versions)) { + data.versions = Object.keys(data.versions || {}) + } + + var keys = Object.keys(data) + keys.forEach(function (d) { + if (d.charAt(0) === "_") delete data[d] + else if (typeof data[d] === "object") data[d] = cleanup(data[d]) + }) + keys = Object.keys(data) + if (keys.length <= 3 + && data.name + && (keys.length === 1 + || keys.length === 3 && data.email && data.url + || keys.length === 2 && (data.email || data.url))) { + data = unparsePerson(data) + } + return data +} +function unparsePerson (d) { + if (typeof d === "string") return d + return d.name + + (d.email ? " <"+d.email+">" : "") + + (d.url ? " ("+d.url+")" : "") +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/visnup.js b/bin/nodejs4.6.0/node_modules/npm/lib/visnup.js new file mode 100644 index 00000000..fff87bda --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/visnup.js @@ -0,0 +1,42 @@ +module.exports = visnup +var npm = require("./npm.js") + +var handsomeFace = [ + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 237, 236, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 235, 236, 235, 233, 237, 235, 233, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 235, 233, 232, 235, 235, 234, 233, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 237, 235, 232, 232, 234, 233, 233, 232, 232, 233, 232, 232, 235, 232, 233, 234, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 232, 232, 232, 239, 238, 235, 233, 232, 232, 232, 232, 232, 232, 232, 233, 235, 232, 233, 233, 232, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 234, 234, 232, 233, 234, 233, 234, 235, 233, 235, 60, 238, 238, 234, 234, 233, 234, 233, 238, 251, 246, 233, 233, 232, 0, 0, 0, 0, 0, 0] + ,[0, 0, 233, 233, 233, 232, 232, 239, 249, 251, 252, 231, 231, 188, 250, 254, 59, 60, 255, 231, 231, 231, 252, 235, 239, 235, 232, 233, 0, 0, 0, 0, 0, 0] + ,[0, 0, 232, 233, 232, 232, 232, 248, 231, 231, 231, 231, 231, 231, 231, 254, 238, 254, 231, 231, 231, 231, 231, 252, 233, 235, 237, 233, 234, 0, 0, 0, 0, 0] + ,[0, 0, 233, 232, 232, 232, 248, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 251, 233, 233, 233, 236, 233, 0, 0, 0, 0] + ,[232, 233, 233, 232, 232, 246, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 249, 233, 234, 234, 0, 0, 0, 0] + ,[232, 232, 232, 232, 233, 249, 231, 255, 255, 255, 255, 254, 109, 60, 239, 237, 238, 237, 235, 235, 235, 235, 236, 235, 235, 235, 234, 232, 232, 232, 232, 232, 233, 0] + ,[0, 232, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, 235, 236, 238, 238, 235, 188, 254, 254, 145, 236, 252, 254, 254, 254, 254, 249, 236, 235, 232, 232, 233, 0] + ,[0, 0, 233, 237, 249, 239, 233, 252, 231, 231, 231, 231, 231, 231, 254, 235, 235, 254, 231, 231, 251, 235, 237, 231, 231, 231, 231, 7, 237, 235, 232, 233, 233, 0] + ,[0, 0, 0, 0, 233, 248, 239, 233, 231, 231, 231, 231, 254, 233, 233, 235, 254, 255, 231, 254, 237, 236, 254, 239, 235, 235, 233, 233, 232, 232, 233, 232, 0, 0] + ,[0, 0, 0, 232, 233, 246, 255, 255, 236, 236, 236, 236, 236, 255, 231, 231, 231, 231, 231, 231, 252, 234, 248, 231, 231, 231, 231, 248, 232, 232, 232, 0, 0, 0] + ,[0, 0, 0, 0, 235, 237, 7, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 255, 238, 235, 7, 231, 231, 231, 246, 232, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 235, 103, 188, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 252, 232, 238, 231, 231, 255, 244, 232, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 235, 236, 103, 146, 253, 255, 231, 231, 231, 231, 231, 253, 251, 250, 250, 250, 246, 232, 235, 152, 255, 146, 66, 233, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 233, 103, 146, 146, 146, 146, 254, 231, 231, 231, 109, 103, 146, 255, 188, 239, 240, 103, 255, 253, 103, 238, 234, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 232, 235, 109, 146, 146, 146, 146, 146, 252, 152, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 103, 235, 233, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 235, 235, 103, 146, 146, 146, 146, 146, 146, 188, 188, 188, 188, 188, 188, 152, 146, 146, 146, 66, 235, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 233, 235, 66, 146, 146, 146, 146, 152, 255, 146, 240, 239, 241, 109, 146, 146, 146, 103, 233, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 237, 109, 146, 146, 146, 146, 146, 254, 231, 231, 188, 146, 146, 146, 103, 233, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 237, 60, 103, 146, 146, 146, 146, 146, 103, 66, 60, 235, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ,[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 233, 233, 236, 235, 237, 235, 237, 237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] + + +function visnup (args, cb) { + handsomeFace.forEach(function (line) { + console.log(line.map(function (ch) { + return "\033[" + (ch ? "48;5;" + ch : ch) + "m" + }).join(' ')) + }) + + var c = args.shift() + if (c) npm.commands[c](args, cb) + else cb() +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/whoami.js b/bin/nodejs4.6.0/node_modules/npm/lib/whoami.js new file mode 100644 index 00000000..84d7dc56 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/whoami.js @@ -0,0 +1,47 @@ +var npm = require("./npm.js") + +module.exports = whoami + +whoami.usage = "npm whoami\n(just prints username according to given registry)" + +function whoami (args, silent, cb) { + // FIXME: need tighter checking on this, but is a breaking change + if (typeof cb !== "function") { + cb = silent + silent = false + } + + var registry = npm.config.get("registry") + if (!registry) return cb(new Error("no default registry set")) + + var auth = npm.config.getCredentialsByURI(registry) + if (auth) { + if (auth.username) { + if (!silent) console.log(auth.username) + return process.nextTick(cb.bind(this, null, auth.username)) + } + else if (auth.token) { + return npm.registry.whoami(registry, { auth : auth }, function (er, username) { + if (er) return cb(er) + if (!username) { + var needNewSession = new Error( + "Your auth token is no longer valid. Please log in again." + ) + needNewSession.code = 'ENEEDAUTH' + return cb(needNewSession) + } + + if (!silent) console.log(username) + cb(null, username) + }) + } + } + + // At this point, if they have a credentials object, it doesn't have a token + // or auth in it. Probably just the default registry. + var needAuth = new Error( + "this command requires you to be logged in." + ) + needAuth.code = 'ENEEDAUTH' + process.nextTick(cb.bind(this, needAuth)) +} diff --git a/bin/nodejs4.6.0/node_modules/npm/lib/xmas.js b/bin/nodejs4.6.0/node_modules/npm/lib/xmas.js new file mode 100644 index 00000000..cb914d00 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/lib/xmas.js @@ -0,0 +1,55 @@ +// happy xmas +var log = require("npmlog") + +module.exports = function (args, cb) { +var s = process.platform === "win32" ? " *" : " \u2605" + , f = "\uFF0F" + , b = "\uFF3C" + , x = process.platform === "win32" ? " " : "" + , o = [ "\u0069" , "\u0020", "\u0020", "\u0020", "\u0020", "\u0020" + , "\u0020", "\u0020", "\u0020", "\u0020", "\u0020", "\u0020" + , "\u0020", "\u2E1B","\u2042","\u2E2E","&","@","\uFF61" ] + , oc = [21,33,34,35,36,37] + , l = "\u005e" + +function w (s) { process.stderr.write(s) } + +w("\n") +;(function T (H) { + for (var i = 0; i < H; i ++) w(" ") + w(x+"\033[33m"+s+"\n") + var M = H * 2 - 1 + for (var L = 1; L <= H; L ++) { + var O = L * 2 - 2 + var S = (M - O) / 2 + for (i = 0; i < S; i ++) w(" ") + w(x+"\033[32m"+f) + for (i = 0; i < O; i ++) w( + "\033["+oc[Math.floor(Math.random()*oc.length)]+"m"+ + o[Math.floor(Math.random() * o.length)] + ) + w(x+"\033[32m"+b+"\n") + } + w(" ") + for (i = 1; i < H; i ++) w("\033[32m"+l) + w("| "+x+" |") + for (i = 1; i < H; i ++) w("\033[32m"+l) + if (H > 10) { + w("\n ") + for (i = 1; i < H; i ++) w(" ") + w("| "+x+" |") + for (i = 1; i < H; i ++) w(" ") + } +})(20) +w("\n\n") +log.heading = '' +log.addLevel('npm', 100000, log.headingStyle) +log.npm("loves you", "Happy Xmas, Noders!") +cb() +} +var dg=false +Object.defineProperty(module.exports, "usage", {get:function () { + if (dg) module.exports([], function () {}) + dg = true + return " " +}}) diff --git a/bin/nodejs4.6.0/node_modules/npm/make.bat b/bin/nodejs4.6.0/node_modules/npm/make.bat new file mode 100644 index 00000000..e4e15e72 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/make.bat @@ -0,0 +1,3 @@ +:: The tests run "make doc" in the prepublish script, +:: so this file gives windows something that'll exit +:: successfully, without having to install make. diff --git a/bin/nodejs4.6.0/node_modules/npm/npmrc b/bin/nodejs4.6.0/node_modules/npm/npmrc new file mode 100644 index 00000000..93c784d3 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/npmrc @@ -0,0 +1 @@ +prefix = ~NEARD_WIN_PATH~\bin\nodejs\nodejs4.6.0\ diff --git a/bin/nodejs4.6.0/node_modules/npm/npmrc.nrd b/bin/nodejs4.6.0/node_modules/npm/npmrc.nrd new file mode 100644 index 00000000..93c784d3 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/npmrc.nrd @@ -0,0 +1 @@ +prefix = ~NEARD_WIN_PATH~\bin\nodejs\nodejs4.6.0\ diff --git a/bin/nodejs4.6.0/node_modules/npm/package.json b/bin/nodejs4.6.0/node_modules/npm/package.json new file mode 100644 index 00000000..a07aae7a --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/package.json @@ -0,0 +1,199 @@ +{ + "version": "2.15.9", + "name": "npm", + "description": "a package manager for JavaScript", + "keywords": [ + "package manager", + "modules", + "install", + "package.json" + ], + "preferGlobal": true, + "config": { + "publishtest": false + }, + "homepage": "https://docs.npmjs.com/", + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "repository": { + "type": "git", + "url": "https://github.com/npm/npm" + }, + "bugs": { + "url": "https://github.com/npm/npm/issues" + }, + "directories": { + "doc": "./doc", + "man": "./man", + "lib": "./lib", + "bin": "./bin" + }, + "main": "./lib/npm.js", + "bin": "./bin/npm-cli.js", + "dependencies": { + "abbrev": "~1.0.9", + "ansi": "~0.3.1", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "archy": "~1.0.0", + "async-some": "~1.0.2", + "block-stream": "0.0.9", + "char-spinner": "~1.0.1", + "chmodr": "~1.0.2", + "chownr": "~1.0.1", + "cmd-shim": "~2.0.2", + "columnify": "~1.5.4", + "config-chain": "~1.1.10", + "dezalgo": "~1.0.3", + "editor": "~1.0.0", + "fs-vacuum": "~1.2.9", + "fs-write-stream-atomic": "~1.0.8", + "fstream": "~1.0.10", + "fstream-npm": "~1.0.7", + "github-url-from-git": "~1.4.0", + "github-url-from-username-repo": "~1.0.2", + "glob": "~7.0.4", + "graceful-fs": "~4.1.4", + "hosted-git-info": "~2.1.4", + "inflight": "~1.0.4", + "inherits": "~2.0.1", + "ini": "~1.3.4", + "init-package-json": "~1.9.4", + "lockfile": "~1.0.1", + "lru-cache": "~4.0.1", + "minimatch": "~3.0.0", + "mkdirp": "~0.5.1", + "node-gyp": "~3.4.0", + "nopt": "~3.0.6", + "normalize-git-url": "~3.0.2", + "normalize-package-data": "~2.3.5", + "npm-cache-filename": "~1.0.2", + "npm-install-checks": "~1.0.7", + "npm-package-arg": "~4.1.0", + "npm-registry-client": "~7.1.2", + "npm-user-validate": "~0.1.4", + "npmlog": "~2.0.4", + "once": "~1.3.3", + "opener": "~1.4.1", + "osenv": "~0.1.3", + "path-is-inside": "~1.0.0", + "read": "~1.0.7", + "read-installed": "~4.0.3", + "read-package-json": "~2.0.4", + "readable-stream": "~2.1.4", + "realize-package-specifier": "~3.0.1", + "request": "~2.72.0", + "retry": "~0.9.0", + "rimraf": "~2.5.2", + "semver": "~5.1.0", + "sha": "~2.0.1", + "slide": "~1.1.6", + "sorted-object": "~2.0.0", + "spdx-license-ids": "~1.2.1", + "strip-ansi": "~3.0.1", + "tar": "~2.2.1", + "text-table": "~0.2.0", + "uid-number": "0.0.6", + "umask": "~1.1.0", + "validate-npm-package-license": "~3.0.1", + "validate-npm-package-name": "~2.2.2", + "which": "~1.2.10", + "wrappy": "~1.0.2", + "write-file-atomic": "~1.1.4" + }, + "bundleDependencies": [ + "abbrev", + "ansi", + "ansi-regex", + "ansicolors", + "ansistyles", + "archy", + "async-some", + "block-stream", + "char-spinner", + "chmodr", + "chownr", + "cmd-shim", + "columnify", + "config-chain", + "dezalgo", + "editor", + "fs-vacuum", + "fs-write-stream-atomic", + "fstream", + "fstream-npm", + "github-url-from-git", + "github-url-from-username-repo", + "glob", + "graceful-fs", + "hosted-git-info", + "imurmurhash", + "inflight", + "inherits", + "ini", + "init-package-json", + "lockfile", + "lru-cache", + "minimatch", + "mkdirp", + "node-gyp", + "nopt", + "normalize-git-url", + "normalize-package-data", + "npm-cache-filename", + "npm-install-checks", + "npm-package-arg", + "npm-registry-client", + "npm-user-validate", + "npmlog", + "once", + "opener", + "osenv", + "path-is-inside", + "read", + "read-installed", + "read-package-json", + "readable-stream", + "realize-package-specifier", + "request", + "retry", + "rimraf", + "semver", + "sha", + "slide", + "sorted-object", + "spdx-license-ids", + "strip-ansi", + "tar", + "text-table", + "uid-number", + "umask", + "validate-npm-package-license", + "validate-npm-package-name", + "which", + "wrappy", + "write-file-atomic" + ], + "devDependencies": { + "deep-equal": "~1.0.1", + "marked": "~0.3.5", + "marked-man": "~0.1.5", + "npm-registry-couchapp": "~2.6.12", + "npm-registry-mock": "~1.0.1", + "require-inject": "~1.4.0", + "sprintf-js": "~1.0.3", + "tacks": "~1.2.1", + "tap": "~5.7.1" + }, + "scripts": { + "dumpconf": "env | grep npm | sort | uniq", + "prepublish": "node bin/npm-cli.js prune --prefix=. --no-global && rimraf test/*/*/node_modules && make doc-clean && make -j4 doc", + "preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true", + "tap": "tap --reporter=classic --timeout 300", + "tap-cover": "tap --coverage --reporter=classic --timeout 600", + "test": "npm run test-tap", + "test-coverage": "npm run tap-cover -- \"test/tap/*.js\"", + "test-tap": "npm run tap -- \"test/tap/*.js\"", + "test-node": "\"$NODE\" \"node_modules/.bin/tap\" --timeout 240 \"test/tap/*.js\"" + }, + "license": "Artistic-2.0" +} diff --git a/bin/nodejs4.6.0/node_modules/npm/scripts/clean-old.sh b/bin/nodejs4.6.0/node_modules/npm/scripts/clean-old.sh new file mode 100644 index 00000000..6c20d78a --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/scripts/clean-old.sh @@ -0,0 +1,165 @@ +#!/bin/bash + +# look for old 0.x cruft, and get rid of it. +# Should already be sitting in the npm folder. + +# This doesn't have to be quite as cross-platform as install.sh. +# There are some bash-isms, because maintaining *two* +# fully-portable posix/bourne sh scripts is too much for +# one project with a sane maintainer. + +# If readlink isn't available, then this is just too tricky. +# However, greadlink is fine, so Solaris can join the party, too. +readlink="readlink" +which $readlink >/dev/null 2>/dev/null +if [ $? -ne 0 ]; then + readlink="greadlink" + which $readlink >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + echo "Can't find the readlink or greadlink command. Aborting." + exit 1 + fi +fi + +if [ "x$npm_config_prefix" != "x" ]; then + PREFIXES=$npm_config_prefix +else + node="$NODE" + if [ "x$node" = "x" ]; then + node=`which node` + fi + if [ "x$node" = "x" ]; then + echo "Can't find node to determine prefix. Aborting." + exit 1 + fi + + + PREFIX=`dirname $node` + PREFIX=`dirname $PREFIX` + echo "cleanup prefix=$PREFIX" + PREFIXES=$PREFIX + + altprefix=`"$node" -e process.installPrefix` + if [ "x$altprefix" != "x" ] && [ "x$altprefix" != "x$PREFIX" ]; then + echo "altprefix=$altprefix" + PREFIXES="$PREFIX $altprefix" + fi +fi + +# now prefix is where npm would be rooted by default +# go hunting. + +packages= +for prefix in $PREFIXES; do + packages="$packages + "`ls "$prefix"/lib/node/.npm 2>/dev/null | grep -v .cache` +done + +packages=`echo $packages` + +filelist=() +fid=0 + +for prefix in $PREFIXES; do + # remove any links into the .npm dir, or links to + # version-named shims/symlinks. + for folder in share/man bin lib/node; do + find $prefix/$folder -type l | while read file; do + target=`$readlink $file | grep '/\.npm/'` + if [ "x$target" != "x" ]; then + # found one! + filelist[$fid]="$file" + let 'fid++' + # also remove any symlinks to this file. + base=`basename "$file"` + base=`echo "$base" | awk -F@ '{print $1}'` + if [ "x$base" != "x" ]; then + find "`dirname $file`" -type l -name "$base"'*' \ + | while read l; do + target=`$readlink "$l" | grep "$base"` + if [ "x$target" != "x" ]; then + filelist[$fid]="$1" + let 'fid++' + fi + done + fi + fi + done + + # Scour for shim files. These are relics of 0.2 npm installs. + # note: grep -r is not portable. + find $prefix/$folder -type f \ + | xargs grep -sl '// generated by npm' \ + | while read file; do + filelist[$fid]="$file" + let 'fid++' + done + done + + # now remove the package modules, and the .npm folder itself. + if [ "x$packages" != "x" ]; then + for pkg in $packages; do + filelist[$fid]="$prefix/lib/node/$pkg" + let 'fid++' + for i in $prefix/lib/node/$pkg\@*; do + filelist[$fid]="$i" + let 'fid++' + done + done + fi + + for folder in lib/node/.npm lib/npm share/npm; do + if [ -d $prefix/$folder ]; then + filelist[$fid]="$prefix/$folder" + let 'fid++' + fi + done +done + +# now actually clean, but only if there's anything TO clean +if [ "${#filelist[@]}" -gt 0 ]; then + echo "" + echo "This script will find and eliminate any shims, symbolic" + echo "links, and other cruft that was installed by npm 0.x." + echo "" + + if [ "x$packages" != "x" ]; then + echo "The following packages appear to have been installed with" + echo "an old version of npm, and will be removed forcibly:" + for pkg in $packages; do + echo " $pkg" + done + echo "Make a note of these. You may want to install them" + echo "with npm 1.0 when this process is completed." + echo "" + fi + + OK= + if [ "x$1" = "x-y" ]; then + OK="yes" + fi + + while [ "$OK" != "y" ] && [ "$OK" != "yes" ] && [ "$OK" != "no" ]; do + echo "Is this OK?" + echo " enter 'yes' or 'no'" + echo " or 'show' to see a list of files " + read OK + if [ "x$OK" = "xshow" ] || [ "x$OK" = "xs" ]; then + for i in "${filelist[@]}"; do + echo "$i" + done + fi + done + if [ "$OK" = "no" ]; then + echo "Aborting" + exit 1 + fi + for i in "${filelist[@]}"; do + rm -rf "$i" + done +fi + +echo "" +echo 'All clean!' + +exit 0 diff --git a/bin/nodejs4.6.0/node_modules/npm/scripts/doc-build.sh b/bin/nodejs4.6.0/node_modules/npm/scripts/doc-build.sh new file mode 100644 index 00000000..d83a7f0e --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/scripts/doc-build.sh @@ -0,0 +1,119 @@ +#!/usr/bin/env bash + +if [[ $DEBUG != "" ]]; then + set -x +fi +set -o errexit +set -o pipefail + +if ! [ -x node_modules/.bin/marked-man ]; then + ps=0 + if [ -f .building_marked-man ]; then + pid=$(cat .building_marked-man) + ps=$(ps -p $pid | grep $pid | wc -l) || true + fi + + if [ -f .building_marked-man ] && [ $ps != 0 ]; then + while [ -f .building_marked-man ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install marked-man + echo $$ > .building_marked-man + sleep 1 + if [ $(cat .building_marked-man) == $$ ]; then + make node_modules/.bin/marked-man + rm .building_marked-man + else + while [ -f .building_marked-man ]; do + sleep 1 + done + fi + fi +fi + +if ! [ -x node_modules/.bin/marked ]; then + ps=0 + if [ -f .building_marked ]; then + pid=$(cat .building_marked) + ps=$(ps -p $pid | grep $pid | wc -l) || true + fi + + if [ -f .building_marked ] && [ $ps != 0 ]; then + while [ -f .building_marked ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install marked + echo $$ > .building_marked + sleep 1 + if [ $(cat .building_marked) == $$ ]; then + make node_modules/.bin/marked + rm .building_marked + else + while [ -f .building_marked ]; do + sleep 1 + done + fi + fi +fi + +src=$1 +dest=$2 +name=$(basename ${src%.*}) +date=$(date -u +'%Y-%m-%d %H:%M:%S') +version=$(node cli.js -v) + +mkdir -p $(dirname $dest) + +html_replace_tokens () { + local url=$1 + sed "s|@NAME@|$name|g" \ + | sed "s|@DATE@|$date|g" \ + | sed "s|@URL@|$url|g" \ + | sed "s|@VERSION@|$version|g" \ + | perl -p -e 's/]*)>([^\(]*\([0-9]\)) -- (.*?)<\/h1>/

    \2<\/h1>

    \3<\/p>/g' \ + | perl -p -e 's/npm-npm/npm/g' \ + | perl -p -e 's/([^"-])(npm-)?README(?!\.html)(\(1\))?/\1README<\/a>/g' \ + | perl -p -e 's/<a href="[^"]+README.html">README<\/a><\/title>/<title>README<\/title>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(1\))/\1<a href="..\/cli\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(3\))/\1<a href="..\/api\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(5\))/\1<a href="..\/files\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(7\))/\1<a href="..\/misc\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/\([1357]\)<\/a><\/h1>/<\/a><\/h1>/g' \ + | (if [ $(basename $(dirname $dest)) == "doc" ]; then + perl -p -e 's/ href="\.\.\// href="/g' + else + cat + fi) +} + +man_replace_tokens () { + sed "s|@VERSION@|$version|g" \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(1\)/npm help \2/g' \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(([57])\)/npm help \3 \2/g' \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(3\)/npm apihelp \2/g' \ + | perl -p -e 's/npm\(1\)/npm help npm/g' \ + | perl -p -e 's/npm\(3\)/npm apihelp npm/g' +} + +case $dest in + *.[1357]) + ./node_modules/.bin/marked-man --roff $src \ + | man_replace_tokens > $dest + exit $? + ;; + *.html) + url=${dest/html\//} + (cat html/dochead.html && \ + cat $src | ./node_modules/.bin/marked && + cat html/docfoot.html)\ + | html_replace_tokens $url \ + > $dest + exit $? + ;; + *) + echo "Invalid destination type: $dest" >&2 + exit 1 + ;; +esac diff --git a/bin/nodejs4.6.0/node_modules/npm/scripts/index-build.js b/bin/nodejs4.6.0/node_modules/npm/scripts/index-build.js new file mode 100644 index 00000000..f34ccdc0 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/scripts/index-build.js @@ -0,0 +1,63 @@ +#!/usr/bin/env node +var fs = require("fs") + , path = require("path") + , root = path.resolve(__dirname, "..") + , glob = require("glob") + , conversion = { "cli": 1, "api": 3, "files": 5, "misc": 7 } + +glob(root + "/{README.md,doc/*/*.md}", function (er, files) { + if (er) + throw er + output(files.map(function (f) { + var b = path.basename(f) + if (b === "README.md") + return [0, b] + if (b === "index.md") + return null + var s = conversion[path.basename(path.dirname(f))] + return [s, f] + }).filter(function (f) { + return f + }).sort(function (a, b) { + return (a[0] === b[0]) + ? ( path.basename(a[1]) === "npm.md" ? -1 + : path.basename(b[1]) === "npm.md" ? 1 + : a[1] > b[1] ? 1 : -1 ) + : a[0] - b[0] + })) +}) + +return + +function output (files) { + console.log( + "npm-index(7) -- Index of all npm documentation\n" + + "==============================================\n") + + writeLines(files, 0) + writeLines(files, 1, "Command Line Documentation", "Using npm on the command line") + writeLines(files, 3, "API Documentation", "Using npm in your Node programs") + writeLines(files, 5, "Files", "File system structures npm uses") + writeLines(files, 7, "Misc", "Various other bits and bobs") +} + +function writeLines (files, sxn, heading, desc) { + if (heading) { + console.log("## %s\n\n%s\n", heading, desc) + } + files.filter(function (f) { + return f[0] === sxn + }).forEach(writeLine) +} + + +function writeLine (sd) { + var sxn = sd[0] || 1 + , doc = sd[1] + , d = path.basename(doc, ".md") + + var content = fs.readFileSync(doc, "utf8").split("\n")[0].split("-- ")[1] + + console.log("### %s(%d)\n", d, sxn) + console.log(content + "\n") +} diff --git a/bin/nodejs4.6.0/node_modules/npm/scripts/install.sh b/bin/nodejs4.6.0/node_modules/npm/scripts/install.sh new file mode 100644 index 00000000..108e6158 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/scripts/install.sh @@ -0,0 +1,270 @@ +#!/bin/sh + +# A word about this shell script: +# +# It must work everywhere, including on systems that lack +# a /bin/bash, map 'sh' to ksh, ksh97, bash, ash, or zsh, +# and potentially have either a posix shell or bourne +# shell living at /bin/sh. +# +# See this helpful document on writing portable shell scripts: +# http://www.gnu.org/s/hello/manual/autoconf/Portable-Shell.html +# +# The only shell it won't ever work on is cmd.exe. + +if [ "x$0" = "xsh" ]; then + # run as curl | sh + # on some systems, you can just do cat>npm-install.sh + # which is a bit cuter. But on others, &1 is already closed, + # so catting to another script file won't do anything. + # Follow Location: headers, and fail on errors + curl -f -L -s https://www.npmjs.org/install.sh > npm-install-$$.sh + ret=$? + if [ $ret -eq 0 ]; then + (exit 0) + else + rm npm-install-$$.sh + echo "Failed to download script" >&2 + exit $ret + fi + sh npm-install-$$.sh + ret=$? + rm npm-install-$$.sh + exit $ret +fi + +# See what "npm_config_*" things there are in the env, +# and make them permanent. +# If this fails, it's not such a big deal. +configures="`env | grep 'npm_config_' | sed -e 's|^npm_config_||g'`" + +npm_config_loglevel="error" +if [ "x$npm_debug" = "x" ]; then + (exit 0) +else + echo "Running in debug mode." + echo "Note that this requires bash or zsh." + set -o xtrace + set -o pipefail + npm_config_loglevel="verbose" +fi +export npm_config_loglevel + +# make sure that node exists +node=`which node 2>&1` +ret=$? +if [ $ret -eq 0 ] && [ -x "$node" ]; then + (exit 0) +else + echo "npm cannot be installed without node.js." >&2 + echo "Install node first, and then try again." >&2 + echo "" >&2 + echo "Maybe node is installed, but not in the PATH?" >&2 + echo "Note that running as sudo can change envs." >&2 + echo "" + echo "PATH=$PATH" >&2 + exit $ret +fi + +# set the temp dir +TMP="${TMPDIR}" +if [ "x$TMP" = "x" ]; then + TMP="/tmp" +fi +TMP="${TMP}/npm.$$" +rm -rf "$TMP" || true +mkdir "$TMP" +if [ $? -ne 0 ]; then + echo "failed to mkdir $TMP" >&2 + exit 1 +fi + +BACK="$PWD" + +ret=0 +tar="${TAR}" +if [ -z "$tar" ]; then + tar="${npm_config_tar}" +fi +if [ -z "$tar" ]; then + tar=`which tar 2>&1` + ret=$? +fi + +if [ $ret -eq 0 ] && [ -x "$tar" ]; then + echo "tar=$tar" + echo "version:" + $tar --version + ret=$? +fi + +if [ $ret -eq 0 ]; then + (exit 0) +else + echo "No suitable tar program found." + exit 1 +fi + + + +# Try to find a suitable make +# If the MAKE environment var is set, use that. +# otherwise, try to find gmake, and then make. +# If no make is found, then just execute the necessary commands. + +# XXX For some reason, make is building all the docs every time. This +# is an annoying source of bugs. Figure out why this happens. +MAKE=NOMAKE + +if [ "x$MAKE" = "x" ]; then + make=`which gmake 2>&1` + if [ $? -eq 0 ] && [ -x "$make" ]; then + (exit 0) + else + make=`which make 2>&1` + if [ $? -eq 0 ] && [ -x "$make" ]; then + (exit 0) + else + make=NOMAKE + fi + fi +else + make="$MAKE" +fi + +if [ -x "$make" ]; then + (exit 0) +else + # echo "Installing without make. This may fail." >&2 + make=NOMAKE +fi + +# If there's no bash, then don't even try to clean +if [ -x "/bin/bash" ]; then + (exit 0) +else + clean="no" +fi + +node_version=`"$node" --version 2>&1` +ret=$? +if [ $ret -ne 0 ]; then + echo "You need node to run this program." >&2 + echo "node --version reports: $node_version" >&2 + echo "with exit code = $ret" >&2 + echo "Please install node before continuing." >&2 + exit $ret +fi + +t="${npm_install}" +if [ -z "$t" ]; then + # switch based on node version. + # note that we can only use strict sh-compatible patterns here. + case $node_version in + 0.[01234567].* | v0.[01234567].*) + echo "You are using an outdated and unsupported version of" >&2 + echo "node ($node_version). Please update node and try again." >&2 + exit 99 + ;; + *) + echo "install npm@latest" + t="latest" + ;; + esac +fi + +# need to echo "" after, because Posix sed doesn't treat EOF +# as an implied end of line. +url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \ + | sed -e 's/^.*tarball":"//' \ + | sed -e 's/".*$//'` + +ret=$? +if [ "x$url" = "x" ]; then + ret=125 + # try without the -e arg to sed. + url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \ + | sed 's/^.*tarball":"//' \ + | sed 's/".*$//'` + ret=$? + if [ "x$url" = "x" ]; then + ret=125 + fi +fi +if [ $ret -ne 0 ]; then + echo "Failed to get tarball url for npm/$t" >&2 + exit $ret +fi + + +echo "fetching: $url" >&2 + +cd "$TMP" \ + && curl -SsL "$url" \ + | $tar -xzf - \ + && cd "$TMP"/* \ + && (ver=`"$node" bin/read-package-json.js package.json version` + isnpm10=0 + if [ $ret -eq 0 ]; then + if [ -d node_modules ]; then + if "$node" node_modules/semver/bin/semver -v "$ver" -r "1" + then + isnpm10=1 + fi + else + if "$node" bin/semver -v "$ver" -r ">=1.0"; then + isnpm10=1 + fi + fi + fi + + ret=0 + if [ $isnpm10 -eq 1 ] && [ -f "scripts/clean-old.sh" ]; then + if [ "x$skipclean" = "x" ]; then + (exit 0) + else + clean=no + fi + if [ "x$clean" = "xno" ] \ + || [ "x$clean" = "xn" ]; then + echo "Skipping 0.x cruft clean" >&2 + ret=0 + elif [ "x$clean" = "xy" ] || [ "x$clean" = "xyes" ]; then + NODE="$node" /bin/bash "scripts/clean-old.sh" "-y" + ret=$? + else + NODE="$node" /bin/bash "scripts/clean-old.sh" </dev/tty + ret=$? + fi + fi + + if [ $ret -ne 0 ]; then + echo "Aborted 0.x cleanup. Exiting." >&2 + exit $ret + fi) \ + && (if [ "x$configures" = "x" ]; then + (exit 0) + else + echo "./configure $configures" + echo "$configures" > npmrc + fi) \ + && (if [ "$make" = "NOMAKE" ]; then + (exit 0) + elif "$make" uninstall install; then + (exit 0) + else + make="NOMAKE" + fi + if [ "$make" = "NOMAKE" ]; then + "$node" cli.js rm npm -gf + "$node" cli.js install -gf + fi) \ + && cd "$BACK" \ + && rm -rf "$TMP" \ + && echo "It worked" + +ret=$? +if [ $ret -ne 0 ]; then + echo "It failed" >&2 +fi +exit $ret diff --git a/bin/nodejs4.6.0/node_modules/npm/scripts/publish-tag.js b/bin/nodejs4.6.0/node_modules/npm/scripts/publish-tag.js new file mode 100644 index 00000000..22421922 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/scripts/publish-tag.js @@ -0,0 +1,3 @@ +var semver = require("semver") +var version = semver.parse(require("../package.json").version) +console.log('v%s.%s-next', version.major, version.minor) diff --git a/bin/nodejs4.6.0/node_modules/npm/scripts/release.sh b/bin/nodejs4.6.0/node_modules/npm/scripts/release.sh new file mode 100644 index 00000000..60a686fe --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/scripts/release.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# script for creating a zip and tarball for inclusion in node + +unset CDPATH + +set -e + +rm -rf release *.tgz || true +mkdir release +node ./cli.js pack --loglevel error >/dev/null +mv *.tgz release +cd release +tar xzf *.tgz + +mkdir node_modules +mv package node_modules/npm + +# make the zip for windows users +cp node_modules/npm/bin/*.cmd . +zipname=npm-$(node ../cli.js -v).zip +zip -q -9 -r -X "$zipname" *.cmd node_modules + +# make the tar for node's deps +cd node_modules +tarname=npm-$(node ../../cli.js -v).tgz +tar czf "$tarname" npm + +cd .. +mv "node_modules/$tarname" . + +rm -rf *.cmd +rm -rf node_modules + +echo "release/$tarname" +echo "release/$zipname" diff --git a/bin/nodejs4.6.0/node_modules/npm/scripts/relocate.sh b/bin/nodejs4.6.0/node_modules/npm/scripts/relocate.sh new file mode 100644 index 00000000..aa30f3df --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/scripts/relocate.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Change the cli shebang to point at the specified node +# Useful for when the program is moved around after install. +# Also used by the default 'make install' in node to point +# npm at the newly installed node, rather than the first one +# in the PATH, which would be the default otherwise. + +# bash /path/to/npm/scripts/relocate.sh $nodepath +# If $nodepath is blank, then it'll use /usr/bin/env + +dir="$(dirname "$(dirname "$0")")" +cli="$dir"/bin/npm-cli.js +tmp="$cli".tmp + +node="$1" +if [ "x$node" = "x" ]; then + node="/usr/bin/env node" +fi +node="#!$node" + +sed -e 1d "$cli" > "$tmp" +echo "$node" > "$cli" +cat "$tmp" >> "$cli" +rm "$tmp" +chmod ogu+x $cli diff --git a/bin/nodejs4.6.0/node_modules/npm/scripts/update-authors.sh b/bin/nodejs4.6.0/node_modules/npm/scripts/update-authors.sh new file mode 100644 index 00000000..c9b613c7 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/scripts/update-authors.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +git log --reverse --format='%aN <%aE>' | perl -wnE ' +BEGIN { + say "# Authors sorted by whether or not they\x27re me"; +} + +print $seen{$_} = $_ unless $seen{$_} +' > AUTHORS diff --git a/bin/nodejs4.6.0/node_modules/npm/test/common-tap.js b/bin/nodejs4.6.0/node_modules/npm/test/common-tap.js new file mode 100644 index 00000000..87b2af7b --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/test/common-tap.js @@ -0,0 +1,97 @@ +// cheesy hackaround for test deps (read: nock) that rely on setImmediate +if (!global.setImmediate || !require('timers').setImmediate) { + require('timers').setImmediate = global.setImmediate = function () { + var args = [arguments[0], 0].concat([].slice.call(arguments, 1)) + setTimeout.apply(this, args) + } +} +var spawn = require('child_process').spawn +var path = require('path') + +var port = exports.port = 1337 +exports.registry = 'http://localhost:' + port +process.env.npm_config_loglevel = 'error' + +var npm_config_cache = path.resolve(__dirname, 'npm_cache') +process.env.npm_config_cache = exports.npm_config_cache = npm_config_cache +process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') +process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') +process.env.random_env_var = 'foo' +// suppress warnings about using a prerelease version of node +process.env.npm_config_node_version = process.version.replace(/-.*$/, '') + +var bin = exports.bin = require.resolve('../bin/npm-cli.js') +var chain = require('slide').chain +var once = require('once') + +exports.npm = function npm (cmd, opts, cb) { + cb = once(cb) + cmd = [bin].concat(cmd) + opts = opts || {} + + opts.env = opts.env || process.env + if (!opts.env.npm_config_cache) { + opts.env.npm_config_cache = npm_config_cache + } + + var stdout = '' + var stderr = '' + var node = process.execPath + var child = spawn(node, cmd, opts) + + if (child.stderr) { + child.stderr.on('data', function (chunk) { + stderr += chunk + }) + } + + if (child.stdout) { + child.stdout.on('data', function (chunk) { + stdout += chunk + }) + } + + child.on('error', cb) + + child.on('close', function (code) { + cb(null, code, stdout, stderr) + }) + return child +} + +exports.makeGitRepo = function makeGitRepo (params, cb) { + // git must be called after npm.load because it uses config + var git = require('../lib/utils/git.js') + + var root = params.path || process.cwd() + var user = params.user || 'PhantomFaker' + var email = params.email || 'nope@not.real' + var added = params.added || ['package.json'] + var message = params.message || 'stub repo' + + var opts = { cwd: root, env: { PATH: process.env.PATH }} + var commands = [ + git.chainableExec(['init'], opts), + git.chainableExec(['config', 'user.name', user], opts), + git.chainableExec(['config', 'user.email', email], opts), + git.chainableExec(['add'].concat(added), opts), + git.chainableExec(['commit', '-m', message], opts) + ] + + if (Array.isArray(params.commands)) { + commands = commands.concat(params.commands) + } + + chain(commands, cb) +} + +exports.rmFromInShrinkwrap = function rmFromInShrinkwrap (obj) { + for (var i in obj) { + if (i === "from") + delete obj[i] + else if (i === "dependencies") + for (var j in obj[i]) + exports.rmFromInShrinkwrap(obj[i][j]) + } + return obj +} \ No newline at end of file diff --git a/bin/nodejs4.6.0/node_modules/npm/test/run.js b/bin/nodejs4.6.0/node_modules/npm/test/run.js new file mode 100644 index 00000000..cc51ffc6 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/test/run.js @@ -0,0 +1,193 @@ +// Everything in this file uses child processes, because we're +// testing a command line utility. + +var chain = require("slide").chain +var child_process = require("child_process") +var path = require("path") + , testdir = __dirname + , fs = require("graceful-fs") + , npmpkg = path.dirname(testdir) + , npmcli = path.resolve(npmpkg, "bin", "npm-cli.js") + +var temp = process.env.TMPDIR + || process.env.TMP + || process.env.TEMP + || ( process.platform === "win32" + ? "c:\\windows\\temp" + : "/tmp" ) + +temp = path.resolve(temp, "npm-test-" + process.pid) + +var root = path.resolve(temp, "root") + , cache = path.resolve(temp, "npm_cache") + +var failures = 0 + , mkdir = require("mkdirp") + , rimraf = require("rimraf") + +var pathEnvSplit = process.platform === "win32" ? ";" : ":" + , pathEnv = process.env.PATH.split(pathEnvSplit) + , npmPath = process.platform === "win32" ? root : path.join(root, "bin") + +pathEnv.unshift(npmPath, path.join(root, "node_modules", ".bin")) + +// lastly, make sure that we get the same node that is being used to do +// run this script. That's very important, especially when running this +// test file from in the node source folder. +pathEnv.unshift(path.dirname(process.execPath)) + +// the env for all the test installs etc. +var env = {} +Object.keys(process.env).forEach(function (i) { + env[i] = process.env[i] +}) +env.npm_config_prefix = root +env.npm_config_color = "always" +env.npm_config_global = "true" +// have to set this to false, or it'll try to test itself forever +env.npm_config_npat = "false" +env.PATH = pathEnv.join(pathEnvSplit) +env.NODE_PATH = path.join(root, "node_modules") +env.npm_config_cache = cache + + + +function cleanup (cb) { + if (failures !== 0) return + rimraf(root, function (er) { + if (er) cb(er) + mkdir(root, 0755, cb) + }) +} + +function prefix (content, pref) { + return pref + (content.trim().split(/\r?\n/).join("\n" + pref)) +} + +var execCount = 0 +function exec (cmd, cwd, shouldFail, cb) { + if (typeof shouldFail === "function") { + cb = shouldFail, shouldFail = false + } + console.error("\n+"+cmd + (shouldFail ? " (expect failure)" : "")) + + // special: replace 'node' with the current execPath, + // and 'npm' with the thing we installed. + var cmdShow = cmd + var npmReplace = path.resolve(npmPath, "npm") + var nodeReplace = process.execPath + if (process.platform === "win32") { + npmReplace = '"' + npmReplace + '"' + nodeReplace = '"' + nodeReplace + '"' + } + cmd = cmd.replace(/^npm /, npmReplace + " ") + cmd = cmd.replace(/^node /, nodeReplace + " ") + + console.error("$$$$$$ cd %s; PATH=%s %s", cwd, env.PATH, cmd) + + child_process.exec(cmd, {cwd: cwd, env: env}, function (er, stdout, stderr) { + console.error("$$$$$$ after command", cmd, cwd) + if (stdout) { + console.error(prefix(stdout, " 1> ")) + } + if (stderr) { + console.error(prefix(stderr, " 2> ")) + } + + execCount ++ + if (!shouldFail && !er || shouldFail && er) { + // stdout = (""+stdout).trim() + console.log("ok " + execCount + " " + cmdShow) + return cb() + } else { + console.log("not ok " + execCount + " " + cmdShow) + cb(new Error("failed "+cmdShow)) + } + }) +} + +function execChain (cmds, cb) { + chain(cmds.map(function (args) { + return [exec].concat(args) + }), cb) +} + +function flatten (arr) { + return arr.reduce(function (l, r) { + return l.concat(r) + }, []) +} + +function setup (cb) { + cleanup(function (er) { + if (er) return cb(er) + exec("node \""+npmcli+"\" install \""+npmpkg+"\"", root, false, cb) + }) +} + +function main (cb) { + console.log("# testing in %s", temp) + console.log("# global prefix = %s", root) + + + + failures = 0 + + process.chdir(testdir) + var base = path.resolve(root, path.join("lib", "node_modules")) + + // get the list of packages + var packages = fs.readdirSync(path.resolve(testdir, "packages")) + packages = packages.filter(function (p) { + return p && !p.match(/^\./) + }) + + installAllThenTestAll() + + function installAllThenTestAll () { + var packagesToRm = packages.slice(0) + if (process.platform !== "win32") { + // Windows can't handle npm rm npm due to file-in-use issues. + packagesToRm.push("npm") + } + + chain( + [ setup + , [ exec, "npm install "+npmpkg, testdir ] + , [ execChain, packages.map(function (p) { + return [ "npm install packages/"+p, testdir ] + }) ] + , [ execChain, packages.map(function (p) { + return [ "npm test -ddd", path.resolve(base, p) ] + }) ] + , [ execChain, packagesToRm.map(function (p) { + return [ "npm rm "+p, root ] + }) ] + , installAndTestEach + ] + , cb + ) + } + + function installAndTestEach (cb) { + var thingsToChain = [ + setup + , [ execChain, flatten(packages.map(function (p) { + return [ [ "npm install packages/"+p, testdir ] + , [ "npm test", path.resolve(base, p) ] + , [ "npm rm "+p, root ] ] + })) ] + ] + if (process.platform !== "win32") { + // Windows can't handle npm rm npm due to file-in-use issues. + thingsToChain.push([exec, "npm rm npm", testdir]) + } + + chain(thingsToChain, cb) + } +} + +main(function (er) { + console.log("1.." + execCount) + if (er) throw er +}) diff --git a/bin/nodejs4.6.0/node_modules/npm/wercker.yml b/bin/nodejs4.6.0/node_modules/npm/wercker.yml new file mode 100644 index 00000000..a2938fe1 --- /dev/null +++ b/bin/nodejs4.6.0/node_modules/npm/wercker.yml @@ -0,0 +1,22 @@ +box: wercker/nodejs +# Build definition +build: + # The steps that will be executed on build + steps: + # A step that executes `npm install` command + - npm-install + # A step that executes `npm test` command + - npm-test + + # A custom script step, name value is used in the UI + # and the code value contains the command that get executed + - script: + name: echo nodejs information + code: | + echo "node version $(node -v) running" + echo "npm version $(npm -v) running" + after-steps: + - sherzberg/slack-notify: + subdomain: npm-inc + token: $SLACK_TOKEN + channel: github-commits diff --git a/bin/nodejs4.6.0/node_perfctr_provider.man b/bin/nodejs4.6.0/node_perfctr_provider.man new file mode 100644 index 00000000..f82a79fa --- /dev/null +++ b/bin/nodejs4.6.0/node_perfctr_provider.man @@ -0,0 +1,107 @@ +<instrumentationManifest + xmlns="http://schemas.microsoft.com/win/2004/08/events" + xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <instrumentation> + <counters xmlns="http://schemas.microsoft.com/win/2005/12/counters" + schemaVersion="1.1"> + <provider symbol="NodeCounterProvider" + applicationIdentity="node.exe" + providerType="userMode" + providerGuid="{793C9B44-3D6B-4F57-B5D7-4FF80ADCF9A2}"> + <counterSet symbol="NodeCounterSet" + guid="{3A22A8EC-297C-48AC-AB15-33EC93033FD8}" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet" + name="Node.js" + description="Node.js performance counters" + instances="multipleAggregate"> + + <counter id="1" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvreq" + name="HTTP server requests" + description="Number of HTTP server requests" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="2" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvrsp" + name="HTTP server responses" + description="Number of HTTP server responses" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="3" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclireq" + name="HTTP client requests" + description="Number of HTTP client requests" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="4" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclirsp" + name="HTTP client responses" + description="Number of HTTP client responses" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="5" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netsrvconn" + name="Active server connections" + description="Number of server connections" + type="perf_counter_rawcount" + detailLevel="standard" + aggregate="sum" /> + + <counter id="6" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbytesent" + name="Network bytes sent" + description="Number of bytes sent using TCP" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="7" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbyterecv" + name="Network bytes received" + description="Number of bytes received using TCP" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="8" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.gctime" + name="%Time in GC" + description="Percent of time for last GC" + type="perf_counter_rawcount" + detailLevel="standard" + aggregate="avg" /> + + <counter id="9" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebytesent" + name="Pipe bytes sent" + description="Number of bytes sent using pipe" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="10" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebyterecv" + name="Pipe bytes received" + description="Number of bytes received using pipe" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + </counterSet> + </provider> + </counters> + </instrumentation> +</instrumentationManifest> diff --git a/bin/nodejs4.6.0/nodevars.bat b/bin/nodejs4.6.0/nodevars.bat new file mode 100644 index 00000000..cbe2d9a5 --- /dev/null +++ b/bin/nodejs4.6.0/nodevars.bat @@ -0,0 +1,24 @@ +@echo off + +rem Ensure this Node.js and npm are first in the PATH +set "PATH=%APPDATA%\npm;%~dp0;%PATH%" + +setlocal enabledelayedexpansion +pushd "%~dp0" + +rem Figure out the Node.js version. +set print_version=.\node.exe -p -e "process.versions.node + ' (' + process.arch + ')'" +for /F "usebackq delims=" %%v in (`%print_version%`) do set version=%%v + +rem Print message. +if exist npm.cmd ( + echo Your environment has been set up for using Node.js !version! and npm. +) else ( + echo Your environment has been set up for using Node.js !version!. +) + +popd +endlocal + +rem If we're in the Node.js directory, change to the user's home dir. +if "%CD%\"=="%~dp0" cd /d "%HOMEDRIVE%%HOMEPATH%" diff --git a/bin/nodejs4.6.0/npm b/bin/nodejs4.6.0/npm new file mode 100644 index 00000000..1226afbc --- /dev/null +++ b/bin/nodejs4.6.0/npm @@ -0,0 +1,34 @@ +#!/bin/sh +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node +fi + +NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" + +case `uname` in + *MINGW*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; + *CYGWIN*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; +esac + +"$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/bin/nodejs4.6.0/npm.cmd b/bin/nodejs4.6.0/npm.cmd new file mode 100644 index 00000000..f111c59d --- /dev/null +++ b/bin/nodejs4.6.0/npm.cmd @@ -0,0 +1,19 @@ +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/bin/nodejs5.12.0/etc/.npmignore b/bin/nodejs5.12.0/etc/.npmignore new file mode 100644 index 00000000..d3f5a12f --- /dev/null +++ b/bin/nodejs5.12.0/etc/.npmignore @@ -0,0 +1 @@ + diff --git a/bin/nodejs5.12.0/etc/npmrc b/bin/nodejs5.12.0/etc/npmrc new file mode 100644 index 00000000..42512fd7 --- /dev/null +++ b/bin/nodejs5.12.0/etc/npmrc @@ -0,0 +1,5 @@ +cache = ~NEARD_WIN_PATH~\tmp\npm-cache +globalconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs5.12.0\etc\npmrc +globalignorefile = ~NEARD_WIN_PATH~\bin\nodejs\nodejs5.12.0\etc\.npmignore +init-module = ~NEARD_WIN_PATH~\bin\nodejs\nodejs5.12.0\etc\.npm-init.js +userconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs5.12.0\etc\npmrc diff --git a/bin/nodejs5.12.0/etc/npmrc.nrd b/bin/nodejs5.12.0/etc/npmrc.nrd new file mode 100644 index 00000000..42512fd7 --- /dev/null +++ b/bin/nodejs5.12.0/etc/npmrc.nrd @@ -0,0 +1,5 @@ +cache = ~NEARD_WIN_PATH~\tmp\npm-cache +globalconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs5.12.0\etc\npmrc +globalignorefile = ~NEARD_WIN_PATH~\bin\nodejs\nodejs5.12.0\etc\.npmignore +init-module = ~NEARD_WIN_PATH~\bin\nodejs\nodejs5.12.0\etc\.npm-init.js +userconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs5.12.0\etc\npmrc diff --git a/bin/nodejs5.12.0/launch.bat b/bin/nodejs5.12.0/launch.bat new file mode 100644 index 00000000..62238ad6 --- /dev/null +++ b/bin/nodejs5.12.0/launch.bat @@ -0,0 +1,12 @@ +@ECHO OFF +SETLOCAL EnableDelayedExpansion + +SET NEARD_NODEJS_PATH=%~dp0 +SET NEARD_NODEJS_PATH=!NEARD_NODEJS_PATH:~0,-1! +SET NEARD_NODEJS_NPM_PATH=%NEARD_NODEJS_PATH%\node_modules\npm +SET NEARD_NODEJS_CONFIG_PATH=%NEARD_NODEJS_NPM_PATH%\npmrc +ECHO prefix = %NEARD_NODEJS_PATH%>%NEARD_NODEJS_CONFIG_PATH% + +"%NEARD_NODEJS_PATH%\nodevars.bat" & "%NEARD_NODEJS_PATH%\npm" config set globalconfig "%NEARD_NODEJS_CONFIG_PATH%" --global + +ENDLOCAL \ No newline at end of file diff --git a/bin/nodejs5.12.0/neard.conf b/bin/nodejs5.12.0/neard.conf new file mode 100644 index 00000000..3be16247 --- /dev/null +++ b/bin/nodejs5.12.0/neard.conf @@ -0,0 +1,8 @@ +nodejsVersion = "5.12.0" +nodejsExe = "node.exe" +nodejsVars = "nodevars.bat" +nodejsNpm = "npm.cmd" +nodejsLaunch = "launch.bat" +nodejsConf = "node_modules/npm/npmrc" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/nodejs5.12.0/node.exe b/bin/nodejs5.12.0/node.exe new file mode 100644 index 00000000..a379629f Binary files /dev/null and b/bin/nodejs5.12.0/node.exe differ diff --git a/bin/nodejs5.12.0/node_etw_provider.man b/bin/nodejs5.12.0/node_etw_provider.man new file mode 100644 index 00000000..8fda75aa --- /dev/null +++ b/bin/nodejs5.12.0/node_etw_provider.man @@ -0,0 +1,185 @@ +<instrumentationManifest + xmlns="http://schemas.microsoft.com/win/2004/08/events" + xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <instrumentation> + <events> + <provider name="NodeJS-ETW-provider" + guid="{77754E9B-264B-4D8D-B981-E4135C1ECB0C}" + symbol="NODE_ETW_PROVIDER" + message="$(string.NodeJS-ETW-provider.name)" + resourceFileName="node.exe" + messageFileName="node.exe"> + + <tasks> + <task name="MethodRuntime" value="1" + symbol="JSCRIPT_METHOD_RUNTIME_TASK"> + <opcodes> + <opcode name="MethodLoad" value="10" + symbol="JSCRIPT_METHOD_METHODLOAD_OPCODE"/> + </opcodes> + </task> + </tasks> + + <opcodes> + <opcode name="NODE_HTTP_SERVER_REQUEST" value="10"/> + <opcode name="NODE_HTTP_SERVER_RESPONSE" value="11"/> + <opcode name="NODE_HTTP_CLIENT_REQUEST" value="12"/> + <opcode name="NODE_HTTP_CLIENT_RESPONSE" value="13"/> + <opcode name="NODE_NET_SERVER_CONNECTION" value="14"/> + <opcode name="NODE_NET_STREAM_END" value="15"/> + <opcode name="NODE_GC_START" value="16"/> + <opcode name="NODE_GC_DONE" value="17"/> + <opcode name="NODE_V8SYMBOL_REMOVE" value="21"/> + <opcode name="NODE_V8SYMBOL_MOVE" value="22"/> + <opcode name="NODE_V8SYMBOL_RESET" value="23"/> + </opcodes> + + <templates> + <template tid="node_connection"> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_http_client_request"> + <data name="url" inType="win:AnsiString" /> + <data name="method" inType="win:AnsiString" /> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_http_server_request"> + <data name="url" inType="win:AnsiString" /> + <data name="method" inType="win:AnsiString" /> + <data name="forwardedFor" inType="win:AnsiString" /> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_gc"> + <data name="gctype" inType="win:UInt32" /> + <data name="gccallbackflags" inType="win:UInt32" /> + </template> + + <template tid="V8AddressChange"> + <data name="addr1" inType="win:Pointer" outType="win:HexInt64"/> + <data name="addr2" inType="win:Pointer" outType="win:HexInt64"/> + </template> + + <template tid="MethodLoadUnload"> + <data name="ScriptContextID" inType="win:Pointer" outType="win:HexInt64"/> + <data name="MethodStartAddress" inType="win:Pointer" outType="win:HexInt64" /> + <data name="MethodSize" inType="win:UInt64" /> + <data name="MethodID" inType="win:UInt32" /> + <data name="MethodFlags" inType="win:UInt16" /> + <data name="MethodAddressRangeID" inType="win:UInt16" /> + <data name="SourceID" inType="win:UInt64" /> + <data name="Line" inType="win:UInt32" outType="xs:unsignedInt" /> + <data name="Column" inType="win:UInt32" outType="xs:unsignedInt" /> + <data name="MethodName" inType="win:UnicodeString" outType="xs:string" /> + </template> + </templates> + + <events> + <event value="1" + opcode="NODE_HTTP_SERVER_REQUEST" + template="node_http_server_request" + symbol="NODE_HTTP_SERVER_REQUEST_EVENT" + message="$(string.NodeJS-ETW-provider.event.1.message)" + level="win:Informational"/> + <event value="2" + opcode="NODE_HTTP_SERVER_RESPONSE" + template="node_connection" + symbol="NODE_HTTP_SERVER_RESPONSE_EVENT" + message="$(string.NodeJS-ETW-provider.event.2.message)" + level="win:Informational"/> + <event value="3" + opcode="NODE_HTTP_CLIENT_REQUEST" + template="node_http_client_request" + symbol="NODE_HTTP_CLIENT_REQUEST_EVENT" + message="$(string.NodeJS-ETW-provider.event.3.message)" + level="win:Informational"/> + <event value="4" + opcode="NODE_HTTP_CLIENT_RESPONSE" + template="node_connection" + symbol="NODE_HTTP_CLIENT_RESPONSE_EVENT" + message="$(string.NodeJS-ETW-provider.event.4.message)" + level="win:Informational"/> + <event value="5" + opcode="NODE_NET_SERVER_CONNECTION" + template="node_connection" + symbol="NODE_NET_SERVER_CONNECTION_EVENT" + message="$(string.NodeJS-ETW-provider.event.5.message)" + level="win:Informational"/> + <event value="6" + opcode="NODE_NET_STREAM_END" + template="node_connection" + symbol="NODE_NET_STREAM_END_EVENT" + message="$(string.NodeJS-ETW-provider.event.6.message)" + level="win:Informational"/> + <event value="7" + opcode="NODE_GC_START" + template="node_gc" + symbol="NODE_GC_START_EVENT" + message="$(string.NodeJS-ETW-provider.event.7.message)" + level="win:Informational"/> + <event value="8" + opcode="NODE_GC_DONE" + template="node_gc" + symbol="NODE_GC_DONE_EVENT" + message="$(string.NodeJS-ETW-provider.event.8.message)" + level="win:Informational"/> + <event value="9" + level="win:Informational" + opcode="MethodLoad" + symbol="MethodLoad" + message="$(string.NodeJS-ETW-provider.event.9.message)" + task="MethodRuntime" + template="MethodLoadUnload"/> + <event value="21" + opcode="NODE_V8SYMBOL_REMOVE" + template="V8AddressChange" + symbol="NODE_V8SYMBOL_REMOVE_EVENT" + message="$(string.NodeJS-ETW-provider.event.21.message)" + level="win:Informational" /> + <event value="22" + opcode="NODE_V8SYMBOL_MOVE" + template="V8AddressChange" + symbol="NODE_V8SYMBOL_MOVE_EVENT" + message="$(string.NodeJS-ETW-provider.event.22.message)" + level="win:Informational" /> + <event value="23" + opcode="NODE_V8SYMBOL_RESET" + symbol="NODE_V8SYMBOL_RESET_EVENT" + message="$(string.NodeJS-ETW-provider.event.23.message)" + level="win:Informational" /> + </events> + </provider> + </events> + </instrumentation> + <localization> + <resources culture="en-US"> + <stringTable> + <string id="NodeJS-ETW-provider.name" value="Node.js ETW Provider"/> + <string id="NodeJS-ETW-provider.event.1.message" value="Node.js HTTP Server Request%nMethod: %2%nRemote: %6%nPort: %5%nURL: %1"/> + <string id="NodeJS-ETW-provider.event.2.message" value="Node.js HTTP Server Response%nRemote: %3%nPort: %2"/> + <string id="NodeJS-ETW-provider.event.3.message" value="Node.js HTTP Client Request%nMethod: %2%nRemote: %5%nPort: %4%nURL: %1"/> + <string id="NodeJS-ETW-provider.event.4.message" value="Node.js HTTP Client Response%nRemote: %3%nPort: %2"/> + <string id="NodeJS-ETW-provider.event.5.message" value="Node.js Net Server Connection%nRemote: %3%nPort: %2"/> + <string id="NodeJS-ETW-provider.event.6.message" value="Node.js Net Stream End%nRemote: %3%nPort: %2"/> + <string id="NodeJS-ETW-provider.event.7.message" value="Node.js Garbage Collection Start"/> + <string id="NodeJS-ETW-provider.event.8.message" value="Node.js Garbage Collection Done"/> + <string id="NodeJS-ETW-provider.event.9.message" value="Node.js Function Compiled: %10"/> + <string id="NodeJS-ETW-provider.event.21.message" value="Node.js V8 Symbol Remove"/> + <string id="NodeJS-ETW-provider.event.22.message" value="Node.js V8 Symbol Move"/> + <string id="NodeJS-ETW-provider.event.23.message" value="Node.js V8 Symbol Reset"/> + </stringTable> + </resources> + </localization> +</instrumentationManifest> diff --git a/bin/nodejs5.12.0/node_modules/npm/.mailmap b/bin/nodejs5.12.0/node_modules/npm/.mailmap new file mode 100644 index 00000000..082245ae --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/.mailmap @@ -0,0 +1,63 @@ +Alex K. Wolfe <alexkwolfe@gmail.com> +Andrew Bradley <cspotcode@gmail.com> +Andrew Lunny <alunny@gmail.com> +Arlo Breault <arlolra@gmail.com> +Ashley Williams <ashley@npmjs.com> <ashley@bocoup.com> +Ashley Williams <ashley@npmjs.com> <ashley666ashley@gmail.com> +Benjamin Coe <bencoe@gmail.com> +Benjamin Coe <bencoe@gmail.com> <ben@npmjs.com> +Brian White <mscdex@mscdex.net> <mscdex@gmail.com> +Cedric Nelson <cedric.nelson@gmail.com> +Charlie Robbins <charlie.robbins@gmail.com> +Dalmais Maxence <root@ip-10-195-202-5.ec2.internal> +Danila Gerasimov <danila.gerasimov@gmail.com> +Dave Galbraith <dave@jut.io> +David Beitey <david@davidjb.com> +Domenic Denicola <domenic@domenicdenicola.com> +Einar Otto Stangvik <einaros@gmail.com> +Erik Wienhold <git@ewie.name> +Evan Lucas <evan@btc.com> <evan.lucas@hattiesburgclinic.com> +Evan Lucas <evan@btc.com> <evanlucas@me.com> +Faiq Raza <faiqrazarizvi@gmail.com> +Forbes Lindesay <forbes@lindesay.co.uk> +Forrest L Norvell <ogd@aoaioxxysz.net> <forrest@npmjs.com> +Gabriel Barros <descartavel1@gmail.com> +Geoff Flarity <geoff.flarity@gmail.com> <gflarity@raptvm-x02.(none)> +Ifeanyi Oraelosi <ifeanyioraelosi@gmail.com> +Isaac Z. Schlueter <i@izs.me> <i@foohack.com> +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> +Jason Smith <jhs@iriscouch.com> +Jonas Weber <github@jonasw.de> +Julien Meddah <julien.meddah@deveryware.com> +Kevin Lorenz <mail@kevinlorenz.com> +Kris Windham <kriswindham@gmail.com> +Lin Clark <lin.w.clark@gmail.com> +Luke Arduini <luke.arduini@gmail.com> <luke.arduini@me.com> +Maciej Małecki <me@mmalecki.com> <maciej.malecki@notimplemented.org> +Martin Ek <mail@ekmartin.com> +Max Goodman <c@chromakode.com> +Maxim Bogushevich <boga1@mail.ru> +Maximilian Antoni <mail@maxantoni.de> <maximilian.antoni@juliusbaer.com> +Michael Hayes <michael@hayes.io> <mhayes@newrelic.com> +Nicolas Morel <marsup@gmail.com> +Olivier Melcher <olivier.melcher@gmail.com> +Ra'Shaun Stovall <rashaunstovall@gmail.com> +Rebecca Turner <me@re-becca.org> <turner@mikomi.org> +Rebecca Turner <me@re-becca.org> <rebecca@npmjs.com> +Ryan Emery <seebees@gmail.com> +Sam Mikes <smikes@cubane.com> +Stephanie Snopek <stephaniesnopek@gmail.com> +Takaya Kobayashi <jigsaw@live.jp> +Thomas Reggi <thomas@reggi.com> +Timo Weiß <timoweiss@Timo-MBP.local> +Tony <zearin@gonk.net> +Trent Mick <trentm@gmail.com> <trent.mick@joyent.com> +Visnu Pitiyanuvath <visnupx@gmail.com> +Will Elwood <w.elwood08@gmail.com> +Wout Mertens <Wout.Mertens@gmail.com> +Yeonghoon Park <sola92@gmail.com> +Zeke Sikelianos <zeke@sikelianos.com> +Zoujie Wzj <zoujie.wzj@alibaba-inc.com> diff --git a/bin/nodejs5.12.0/node_modules/npm/.npmignore b/bin/nodejs5.12.0/node_modules/npm/.npmignore new file mode 100644 index 00000000..4bff9d51 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/.npmignore @@ -0,0 +1,30 @@ +*.swp +.*.swp +npm-debug.log +/test/bin +/test/output.log +/test/packages/*/node_modules +/test/packages/npm-test-depends-on-spark/which-spark.log +/test/packages/test-package/random-data.txt +/test/root +/test/npm_cache +node_modules/marked +node_modules/ronn +node_modules/tap +node_modules/.bin +node_modules/npm-registry-mock +/npmrc +/release/ + +# don't need these in the npm package. +html/*.png + +# don't ignore .npmignore files +# these are used in some tests. +!.npmignore + +/npm-*.tgz + +*.pyc + +/test/tap/builtin-config diff --git a/bin/nodejs5.12.0/node_modules/npm/.travis.yml b/bin/nodejs5.12.0/node_modules/npm/.travis.yml new file mode 100644 index 00000000..852fd1f1 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/.travis.yml @@ -0,0 +1,18 @@ +language: node_js +node_js: + - "5" + - "4" + - iojs + - "0.12" + - "0.10" + - "0.8" +env: + - DEPLOY_VERSION=testing +before_install: + - "npm config set spin false" + - "node . install -g ." + - "mkdir -p /var/run/couchdb" +sudo: false +script: "npm test" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/bin/nodejs5.12.0/node_modules/npm/AUTHORS b/bin/nodejs5.12.0/node_modules/npm/AUTHORS new file mode 100644 index 00000000..ce4520fd --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/AUTHORS @@ -0,0 +1,391 @@ +# Authors sorted by whether or not they're me +Isaac Z. Schlueter <i@izs.me> +Steve Steiner <ssteinerX@gmail.com> +Mikeal Rogers <mikeal.rogers@gmail.com> +Aaron Blohowiak <aaron.blohowiak@gmail.com> +Martyn Smith <martyn@dollyfish.net.nz> +Charlie Robbins <charlie.robbins@gmail.com> +Francisco Treacy <francisco.treacy@gmail.com> +Cliffano Subagio <cliffano@gmail.com> +Christian Eager <christian.eager@nokia.com> +Dav Glass <davglass@gmail.com> +Alex K. Wolfe <alexkwolfe@gmail.com> +James Sanders <jimmyjazz14@gmail.com> +Reid Burke <me@reidburke.com> +Arlo Breault <arlolra@gmail.com> +Timo Derstappen <teemow@gmail.com> +Bart Teeuwisse <bart.teeuwisse@thecodemill.biz> +Ben Noordhuis <info@bnoordhuis.nl> +Tor Valamo <tor.valamo@gmail.com> +Whyme.Lyu <5longluna@gmail.com> +Olivier Melcher <olivier.melcher@gmail.com> +Tomaž Muraus <kami@k5-storitve.net> +Evan Meagher <evan.meagher@gmail.com> +Orlando Vazquez <ovazquez@gmail.com> +Kai Chen <kaichenxyz@gmail.com> +George Miroshnykov <gmiroshnykov@lohika.com> +Geoff Flarity <geoff.flarity@gmail.com> +Max Goodman <c@chromakode.com> +Pete Kruckenberg <pete@kruckenberg.com> +Laurie Harper <laurie@holoweb.net> +Chris Wong <chris@chriswongstudio.com> +Scott Bronson <brons_github@rinspin.com> +Federico Romero <federomero@gmail.com> +Visnu Pitiyanuvath <visnupx@gmail.com> +Irakli Gozalishvili <rfobic@gmail.com> +Mark Cahill <mark@tiemonster.info> +Tony <zearin@gonk.net> +Iain Sproat <iainsproat@gmail.com> +Trent Mick <trentm@gmail.com> +Felix Geisendörfer <felix@debuggable.com> +Jameson Little <t.jameson.little@gmail.com> +Conny Brunnkvist <conny@fuchsia.se> +Will Elwood <w.elwood08@gmail.com> +Dean Landolt <dean@deanlandolt.com> +Oleg Efimov <efimovov@gmail.com> +Martin Cooper <mfncooper@gmail.com> +Jann Horn <jannhorn@googlemail.com> +Andrew Bradley <cspotcode@gmail.com> +Maciej Małecki <me@mmalecki.com> +Stephen Sugden <glurgle@gmail.com> +Michael Budde <mbudde@gmail.com> +Jason Smith <jhs@iriscouch.com> +Gautham Pai <buzypi@gmail.com> +David Trejo <david.daniel.trejo@gmail.com> +Paul Vorbach <paul@vorb.de> +George Ornbo <george@shapeshed.com> +Tim Oxley <secoif@gmail.com> +Tyler Green <tyler.green2@gmail.com> +Dave Pacheco <dap@joyent.com> +Danila Gerasimov <danila.gerasimov@gmail.com> +Rod Vagg <rod@vagg.org> +Christian Howe <coderarity@gmail.com> +Andrew Lunny <alunny@gmail.com> +Henrik Hodne <dvyjones@binaryhex.com> +Adam Blackburn <regality@gmail.com> +Kris Windham <kriswindham@gmail.com> +Jens Grunert <jens.grunert@gmail.com> +Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl> +Dalmais Maxence <root@ip-10-195-202-5.ec2.internal> +Marcus Ekwall <marcus.ekwall@gmail.com> +Aaron Stacy <aaron.r.stacy@gmail.com> +Phillip Howell <phowell@cothm.org> +Domenic Denicola <domenic@domenicdenicola.com> +James Halliday <mail@substack.net> +Jeremy Cantrell <jmcantrell@gmail.com> +Ribettes <patlogan29@gmail.com> +Don Park <donpark@docuverse.com> +Einar Otto Stangvik <einaros@gmail.com> +Kei Son <heyacct@gmail.com> +Nicolas Morel <marsup@gmail.com> +Mark Dube <markisdee@gmail.com> +Nathan Rajlich <nathan@tootallnate.net> +Maxim Bogushevich <boga1@mail.ru> +Meaglin <Meaglin.wasabi@gmail.com> +Ben Evans <ben@bensbit.co.uk> +Nathan Zadoks <nathan@nathan7.eu> +Brian White <mscdex@mscdex.net> +Jed Schmidt <tr@nslator.jp> +Ian Livingstone <ianl@cs.dal.ca> +Patrick Pfeiffer <patrick@buzzle.at> +Paul Miller <paul@paulmillr.com> +Ryan Emery <seebees@gmail.com> +Carl Lange <carl@flax.ie> +Jan Lehnardt <jan@apache.org> +Stuart P. Bentley <stuart@testtrack4.com> +Johan Sköld <johan@skold.cc> +Stuart Knightley <stuart@stuartk.com> +Niggler <nirk.niggler@gmail.com> +Paolo Fragomeni <paolo@async.ly> +Jaakko Manninen <jaakko@rocketpack.fi> +Luke Arduini <luke.arduini@gmail.com> +Larz Conwell <larz@larz-laptop.(none)> +Marcel Klehr <mklehr@gmx.net> +Robert Kowalski <rok@kowalski.gd> +Forbes Lindesay <forbes@lindesay.co.uk> +Vaz Allen <vaz@tryptid.com> +Jake Verbaten <raynos2@gmail.com> +Schabse Laks <Dev@SLaks.net> +Florian Margaine <florian@margaine.com> +Johan Nordberg <its@johan-nordberg.com> +Ian Babrou <ibobrik@gmail.com> +Di Wu <dwu@palantir.com> +Mathias Bynens <mathias@qiwi.be> +Matt McClure <matt.mcclure@mapmyfitness.com> +Matt Lunn <matt@mattlunn.me.uk> +Alexey Kreschuk <akrsch@gmail.com> +elisee <elisee@sparklin.org> +Robert Gieseke <robert.gieseke@gmail.com> +François Frisch <francoisfrisch@gmail.com> +Trevor Burnham <tburnham@hubspot.com> +Alan Shaw <alan@freestyle-developments.co.uk> +TJ Holowaychuk <tj@vision-media.ca> +Nicholas Kinsey <pyro@feisty.io> +Paulo Cesar <pauloc062@gmail.com> +Elan Shanker <elan.shanker@gmail.com> +Jon Spencer <jon@jonspencer.ca> +Jason Diamond <jason@diamond.name> +Maximilian Antoni <mail@maxantoni.de> +Thom Blake <tblake@brightroll.com> +Jess Martin <jessmartin@gmail.com> +Spain Train <michael.spainhower@opower.com> +Alex Rodionov <p0deje@gmail.com> +Matt Colyer <matt@colyer.name> +Evan You <yyx990803@gmail.com> +bitspill <bitspill+github@bitspill.net> +Gabriel Falkenberg <gabriel.falkenberg@gmail.com> +Alexej Yaroshevich <alex@qfox.ru> +Quim Calpe <quim@kalpe.com> +Steve Mason <stevem@brandwatch.com> +Wil Moore III <wil.moore@wilmoore.com> +Sergey Belov <peimei@ya.ru> +Tom Huang <hzlhu.dargon@gmail.com> +CamilleM <camille.moulin@alterway.fr> +Sébastien Santoro <dereckson@espace-win.org> +Evan Lucas <evan@btc.com> +Quinn Slack <qslack@qslack.com> +Alex Kocharin <alex@kocharin.ru> +Daniel Santiago <daniel.santiago@highlevelwebs.com> +Denis Gladkikh <outcoldman@gmail.com> +Andrew Horton <andrew.j.horton@gmail.com> +Zeke Sikelianos <zeke@sikelianos.com> +Dylan Greene <dylang@gmail.com> +Franck Cuny <franck.cuny@gmail.com> +Yeonghoon Park <sola92@gmail.com> +Rafael de Oleza <rafa@spotify.com> +Mikola Lysenko <mikolalysenko@gmail.com> +Yazhong Liu <yorkiefixer@gmail.com> +Neil Gentleman <ngentleman@gmail.com> +Kris Kowal <kris.kowal@cixar.com> +Alex Gorbatchev <alex.gorbatchev@gmail.com> +Shawn Wildermuth <shawn@wildermuth.com> +Wesley de Souza <wesleywex@gmail.com> +yoyoyogi <yogesh.k@gmail.com> +J. Tangelder <j.tangelder@gmail.com> +Jean Lauliac <jean@lauliac.com> +Andrey Kislyuk <kislyuk@gmail.com> +Thorsten Lorenz <thlorenz@gmx.de> +Julian Gruber <julian@juliangruber.com> +Benjamin Coe <bencoe@gmail.com> +Alex Ford <Alex.Ford@CodeTunnel.com> +Matt Hickford <matt.hickford@gmail.com> +Sean McGivern <sean.mcgivern@rightscale.com> +C J Silverio <ceejceej@gmail.com> +Robin Tweedie <robin@songkick.com> +Miroslav Bajtoš <miroslav@strongloop.com> +David Glasser <glasser@davidglasser.net> +Gianluca Casati <casati_gianluca@yahoo.it> +Forrest L Norvell <ogd@aoaioxxysz.net> +Karsten Tinnefeld <k.tinnefeld@googlemail.com> +Bryan Burgers <bryan@burgers.io> +David Beitey <david@davidjb.com> +Evan You <yyou@google.com> +Zach Pomerantz <zmp@umich.edu> +Chris Williams <cwilliams88@gmail.com> +sudodoki <smd.deluzion@gmail.com> +Mick Thompson <dthompson@gmail.com> +Felix Rabe <felix@rabe.io> +Michael Hayes <michael@hayes.io> +Chris Dickinson <christopher.s.dickinson@gmail.com> +Bradley Meck <bradley.meck@gmail.com> +GeJ <geraud@gcu.info> +Andrew Terris <atterris@gmail.com> +Michael Nisi <michael.nisi@gmail.com> +fengmk2 <fengmk2@gmail.com> +Adam Meadows <adam.meadows@gmail.com> +Chulki Lee <chulki.lee@gmail.com> +不四 <busi.hyy@taobao.com> +dead_horse <dead_horse@qq.com> +Kenan Yildirim <kenan@kenany.me> +Laurie Voss <git@seldo.com> +Rebecca Turner <me@re-becca.org> +Hunter Loftis <hunter@hunterloftis.com> +Peter Richardson <github@zoomy.net> +Jussi Kalliokoski <jussi.kalliokoski@gmail.com> +Filip Weiss <me@fiws.net> +Timo Weiß <timoweiss@Timo-MBP.local> +Christopher Hiller <chiller@badwing.com> +Jérémy Lal <kapouer@melix.org> +Anders Janmyr <anders@janmyr.com> +Chris Meyers <chris.meyers.fsu@gmail.com> +Ludwig Magnusson <ludwig@mediatool.com> +Wout Mertens <Wout.Mertens@gmail.com> +Nick Santos <nick@medium.com> +Terin Stock <terinjokes@gmail.com> +Faiq Raza <faiqrazarizvi@gmail.com> +Thomas Torp <thomas@erupt.no> +Sam Mikes <smikes@cubane.com> +Mat Tyndall <mat.tyndall@gmail.com> +Tauren Mills <tauren@sportzing.com> +Ron Martinez <ramartin.net@gmail.com> +Kazuhito Hokamura <k.hokamura@gmail.com> +Tristan Davies <github@tristan.io> +David Volm <david@volminator.com> +Lin Clark <lin.w.clark@gmail.com> +Ben Page <bpage@dewalch.com> +Jeff Jo <jeffjo@squareup.com> +martinvd <martinvdpub@gmail.com> +Mark J. Titorenko <nospam-github.com@titorenko.net> +Oddur Sigurdsson <oddurs@gmail.com> +Eric Mill <eric@konklone.com> +Gabriel Barros <descartavel1@gmail.com> +KevinSheedy <kevinsheedy@gmail.com> +Aleksey Smolenchuk <aleksey@uber.com> +Ed Morley <emorley@mozilla.com> +Blaine Bublitz <blaine@iceddev.com> +Andrey Fedorov <anfedorov@gmail.com> +Daijiro Wachi <daijiro.wachi@gmail.com> +Luc Thevenard <lucthevenard@gmail.com> +Aria Stewart <aredridel@nbtsc.org> +Charlie Rudolph <charles.w.rudolph@gmail.com> +Vladimir Rutsky <rutsky@users.noreply.github.com> +Isaac Murchie <isaac@saucelabs.com> +Marcin Wosinek <marcin.wosinek@gmail.com> +David Marr <davemarr@gmail.com> +Bryan English <bryan@bryanenglish.com> +Anthony Zotti <amZotti@users.noreply.github.com> +Karl Horky <karl.horky@gmail.com> +Jordan Harband <ljharb@gmail.com> +Guðlaugur Stefán Egilsson <gulli@kolibri.is> +Helge Skogly Holm <helge.holm@gmail.com> +Peter A. Shevtsov <petr.shevtsov@gmail.com> +Alain Kalker <a.c.kalker@gmail.com> +Bryant Williams <b.n.williams@gmail.com> +Jonas Weber <github@jonasw.de> +Tim Whidden <twhid@twhid.com> +Andreas <functino@users.noreply.github.com> +Karolis Narkevicius <karolis.n@gmail.com> +Adrian Lynch <adi_ady_ade@hotmail.com> +Richard Littauer <richard.littauer@gmail.com> +Oli Evans <oli@zilla.org.uk> +Matt Brennan <mattyb1000@gmail.com> +Jeff Barczewski <jeff.barczewski@gmail.com> +Danny Fritz <dannyfritz@gmail.com> +Takaya Kobayashi <jigsaw@live.jp> +Ra'Shaun Stovall <rashaunstovall@gmail.com> +Julien Meddah <julien.meddah@deveryware.com> +Michiel Sikma <michiel@wedemandhtml.com> +Jakob Krigovsky <jakob.krigovsky@gmail.com> +Charmander <~@charmander.me> +Erik Wienhold <git@ewie.name> +James Butler <james.butler@sandfox.co.uk> +Kevin Kragenbrink <kevin@gaikai.com> +Arnaud Rinquin <rinquin.arnaud@gmail.com> +Mike MacCana <mike.maccana@gmail.com> +Antti Mattila <anttti@fastmail.fm> +laiso <laiso@lai.so> +Matt Zorn <zornme@gmail.com> +Kyle Mitchell <kyle@kemitchell.com> +Jeremiah Senkpiel <fishrock123@rocketmail.com> +Michael Klein <mischkl@users.noreply.github.com> +Simen Bekkhus <sbekkhus91@gmail.com> +Victor <victor.shih@gmail.com> +thefourtheye <thechargingvolcano@gmail.com> +Clay Carpenter <claycarpenter@gmail.com> +bangbang93 <bangbang93@163.com> +Nick Malaguti <nmalaguti@palantir.com> +Cedric Nelson <cedric.nelson@gmail.com> +Kat Marchán <kzm@sykosomatic.org> +Andrew <talktome@aboutandrew.co.uk> +Eduardo Pinho <enet4mikeenet@gmail.com> +Rachel Hutchison <rhutchix@intel.com> +Ryan Temple <ryantemple145@gmail.com> +Eugene Sharygin <eush77@gmail.com> +James Talmage <james@talmage.io> +jane arc <jane@uber.com> +Joseph Dykstra <josephdykstra@gmail.com> +Andrew Crites <ajcrites@gmail.com> +Joshua Egan <josh-egan@users.noreply.github.com> +Carlos Alberto <euprogramador@gmail.com> +Thomas Cort <thomasc@ssimicro.com> +Thaddee Tyl <thaddee.tyl@gmail.com> +Steve Klabnik <steve@steveklabnik.com> +Andrew Murray <radarhere@gmail.com> +Stephan Bönnemann <stephan@excellenteasy.com> +Kyle M. Tarplee <kyle.tarplee@numerica.us> +Derek Peterson <derekpetey@gmail.com> +Greg Whiteley <greg.whiteley@atomos.com> +murgatroid99 <mlumish@google.com> +Marcin Cieslak <saper@saper.info> +João Reis <reis@janeasystems.com> +Matthew Hasbach <hasbach.git@gmail.com> +Jon Hall <jon_hall@outlook.com> +Anna Henningsen <sqrt@entless.org> +James Treworgy <jamietre@gmail.com> +James Hartig <james@levenlabs.com> +Stephanie Snopek <stephaniesnopek@gmail.com> +Kent C. Dodds <kent@doddsfamily.us> +Aaron Krause <aaronjkrause@gmail.com> +Daniel K O'Leary <daniel@dko.io> +fscherwi <fscherwi@users.noreply.github.com> +Thomas Reggi <thomas@reggi.com> +Thomas Michael McTiernan <thomasmctiernan@gmail.com> +Jason Kurian <JaKXz@users.noreply.github.com> +Sebastiaan Deckers <seb@ninja.sg> +lady3bean <lady3bean@users.noreply.github.com> +Tomi Carr <TaMe3971@users.noreply.github.com> +Juan Caicedo <retiredcanadianpoet@gmail.com> +Ashley Williams <ashley@npmjs.com> +Andrew Marcinkevičius <andrew.web@ifdattic.com> +Jorrit Schippers <jorrit@ncode.nl> +Alex Lukin <alex.lukin@softgrad.com> +Aria Stewart <aredridel@dinhe.net> +Tiago Rodrigues <tmcrodrigues@gmail.com> +Tim <tim-github@baverstock.org.uk> +Nick Williams <WickyNilliams@users.noreply.github.com> +Louis Larry <louis.larry@gmail.com> +Ben Gotow <bengotow@gmail.com> +Jakub Gieryluk <jakub.g.opensource@gmail.com> +Kevin Lorenz <mail@kevinlorenz.com> +Martin von Gagern <Martin.vGagern@gmx.net> +Eymen Gunay <eymen@egunay.com> +Martin Ek <mail@ekmartin.com> +Rafał Pocztarski <r.pocztarski@gmail.com> +Mark Reeder <mreeder@uber.com> +Chris Rebert <github@chrisrebert.com> +Scott Addie <tobias.addie@gmail.com> +Jeff McMahan <jeffrey.lee.mcmahan@gmail.com> +Tim Krins <timkrins@gmail.com> +Hal Henke <halhenke@gmail.com> +Julian Simioni <julian@simioni.org> +Jimb Esser <jimb@yahoo-inc.com> +Alexis Campailla <alexis@janeasystems.com> +Chris Chua <chris.sirhc@gmail.com> +Beau Gunderson <beau@beaugunderson.com> +Dave Galbraith <dave@jut.io> +s100 <shughes1@uk.ibm.com> +Sergey Simonchik <sergey.simonchik@jetbrains.com> +Vanja Radovanović <elvanja@gmail.com> +Jonathan Persson <persson.jonathan@gmail.com> +Vedat Mahir YILMAZ <mahir@vedatmahir.com> +Samuel Reed <samuel.trace.reed@gmail.com> +Rafał Legiędź <rafal.legiedz@gmail.com> +Jan Schär <jscissr@gmail.com> +Xcat Liu <xcatliu@gmail.com> +harryh <Aourin@users.noreply.github.com> +Prayag Verma <prayag.verma@gmail.com> +Neil Kistner <neil.kistner@gmail.com> +Zoujie Wzj <zoujie.wzj@alibaba-inc.com> +Ryan Hendrickson <ryan.hendrickson@alum.mit.edu> +Arturo Coronel <aoitsu3@gmail.com> +Hutson Betts <hbetts@factset.com> +Lewis Cowper <lewis.cowper@googlemail.com> +Adam Byrne <misterbyrne@gmail.com> +Ifeanyi Oraelosi <ifeanyioraelosi@gmail.com> +Robert Ludwig <rob.ludwig@rideamigos.com> +Chris Warren <chris@ixalon.net> +Scott Plumlee <scott@plumlee.org> +Daniel Pedersen <daniel@scandinav.se> +rhgb <kaiserdaemon@gmail.com> +doug.wade <doug.wade@redfin.com> +Zac <zdoege@gm.slc.edu> +GriffinSchneider <griffinschneider@gmail.com> +Andres Kalle <mjomble@gmail.com> +thefourtheye <thefourtheye@users.noreply.github.com> +Yael <yaelz@users.noreply.github.com> +Yann Odeyer <yann@odeyer.com> +James Monger <jameskmonger@hotmail.co.uk> +Thomas Hallock <thomas@1stdibs.com> +Paul Irish <paul.irish@gmail.com> +Paul O'Leary McCann <polm@dampfkraft.com> +Francis Gulotta <wizard@roborooter.com> diff --git a/bin/nodejs5.12.0/node_modules/npm/CHANGELOG.md b/bin/nodejs5.12.0/node_modules/npm/CHANGELOG.md new file mode 100644 index 00000000..f7fd9806 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/CHANGELOG.md @@ -0,0 +1,3400 @@ +### v3.8.6 (2016-03-31) + +Heeeeeey y'all. + +Kat here! Rebecca's been schmoozing with folks at [Microsoft +Build](https://build.microsoft.com/), so I'm doing the `npm@3` release this +week. + +Speaking of Build, it looks like Microsoft is doing some bash thing. This might +be really good news for our Windows users once it rolls around. We're keeping an +eye out and feeling hopeful. 🙆 + +As far as the release goes: We're really happy to be getting more and more +community contributions! Keep it up! We really appreciate folks trying to help +us, and we'll do our best to help point you in the right direction. Even things +like documentation are a huge help. And remember -- you get socks for it, too! + +#### FIXES + +* [`f8fb4d8`](https://github.com/npm/npm/commit/f8fb4d83923810eb78d075bd200a9376c64c3e3a) + [#12079](https://github.com/npm/npm/pull/12079) + Back in `npm@3.2.2` we included [a patch that made it so `npm install pkg` was + basically `npm install pkg@latest` instead of + `pkg@*`](https://github.com/npm/npm/pull/9170) + This is probably what most users expected, but it also ended up [breaking `npm + deprecate`](https://github.com/npm/npm/pull/9170) when no version was provided + for a package. In that case, we were using `*` to mean "deprecate all + versions" and relying on the `pkg` -> `pkg@*` conversion. + This patch fixes `npm deprecate pkg` to work as it used to by special casing + that particular command's behavior. + ([@polm](https://github.com/polm)) +* [`458f773`](https://github.com/npm/npm/commit/458f7734f3376aba0b6ff16d34a25892f7717e40) + [#12146](https://github.com/npm/npm/pull/12146) + Adds `make doc-clean` to `prepublish` script, to clear out previously built + docs before publishing a new npm version + ([@watilde](https://github.com/watilde)) +* [`f0d1521`](https://github.com/npm/npm/commit/f0d1521038e956b2197673f36c464684293ce99d) + [#12146](https://github.com/npm/npm/pull/12146) + Adds `doc-clean` phony target to `make publish`. + ([@watilde](https://github.com/watilde)) + +#### DOC UPDATES + +* [`ea92ffc`](https://github.com/npm/npm/commit/ea92ffc9dd2a063896353fc52c104e85ec061360) + [#12147](https://github.com/npm/npm/pull/12147) + Document that the current behavior of `engines` is just to warn if the node + platform is incompatible. + ([@reconbot](https://github.com/reconbot)) +* [`cd1ba44`](https://github.com/npm/npm/commit/cd1ba4423b3ca889c741141b95b0d9472b9f71ea) + [#12143](https://github.com/npm/npm/pull/12143) + Remove `npm faq` command, since the [FAQ was + removed](https://github.com/npm/npm/pull/10547). + ([@watilde](https://github.com/watilde)) +* [`50a12cb`](https://github.com/npm/npm/commit/50a12cb1f5f158af78d6962ad20ff0a98bc18f18) + [#12143](https://github.com/npm/npm/pull/12143) + Remove references to the FAQ from the docs, since [it was + removed](https://github.com/npm/npm/pull/10547). + ([@watilde](https://github.com/watilde)) +* [`60051c2`](https://github.com/npm/npm/commit/60051c25e2ab80c667137dfcd04b242eea25980e) + [#12093](https://github.com/npm/npm/pull/12093) + Update `bugs` url in `package.json` to use the `https` URL for Github. + ([@watilde](https://github.com/watilde)) +* [`af30c37`](https://github.com/npm/npm/commit/af30c374ef22ed1a1c71b14fced7c4b8350e4e82) + [#12075](https://github.com/npm/npm/pull/12075) + Add the `--ignore-scripts` flag to the `npm install` docs. + ([@paulirish](https://github.com/paulirish)) +* [`632b214`](https://github.com/npm/npm/commit/632b214b2f2450e844410792e5947e46844612ff) + [#12063](https://github.com/npm/npm/pull/12063) + Various minor fixes to the html docs homepage. + ([@watilde](https://github.com/watilde)) + +#### DEP BUMPS + +* [`3da0171`](https://github.com/npm/npm/commit/3da01716a0e41d6b5adee2b4fc70fcaf08c0eb24) + `lodash.without@4.1.2` + ([@jdalton](https://github.com/jdalton)) +* [`69ccf6d`](https://github.com/npm/npm/commit/69ccf6dd4caf95cd0628054307487cae1885acd0) + `lodash.uniq@4.2.1` + ([@jdalton](https://github.com/jdalton)) +* [`b50c41a`](https://github.com/npm/npm/commit/b50c41a9930dc5353a23c5ae2ff87bb99e11d482) + `lodash.union@4.2.1` + ([@jdalton](https://github.com/jdalton)) +* [`59c1ad7`](https://github.com/npm/npm/commit/59c1ad7b6f243d07618ed5703bd11d787732fc57) + `lodash.clonedeep@4.3.2` + ([@jdalton](https://github.com/jdalton)) +* [`2b4f797`](https://github.com/npm/npm/commit/2b4f797dba8e7a1376c8335b7223e82d02cd8243) + `lodash._baseuniq@4.5.1` + ([@jdalton](https://github.com/jdalton)) + +### v3.8.5 (2016-03-24) + +Like my esteemed colleague [@zkat](https://github.com/zkat) said in this +week's [LTS release notes](https://github.com/npm/npm/releases/tag/v2.15.2), +this week is another small release but we are continuing to work on our +[Windows efforts](https://github.com/npm/npm/pull/11444). + +You may also be interested in reading the [LTS process and +policy](https://github.com/npm/npm/wiki/LTS) that +[@othiym23](https://github.com/othiym23) put together recently. If you have any +feedback, we would love to hear. + +#### DOCTOR IT HURTS WHEN LINK TO MY LINK + +Well then, don't do that. + +* [`0d4a0b1`](https://github.com/npm/npm/commit/0d4a0b1) + [#11442](https://github.com/npm/npm/pull/11442) + Fail if the user asks us to make a link from a module back on to itself. + ([@antialias](https://github.com/antialias)) + +#### ERR MODULE LIST TOO LONG + +* [`b271ed2`](https://github.com/npm/npm/commit/b271ed2) + [#11983](https://github.com/npm/npm/issues/11983) + Exit early if no arguments were provided to search instead of trying to display all the modules, + running out of memory, and then crashing. + ([@SimenB](https://github.com/SimenB)) + +#### ELIMINATE UNUSED MODULE + +* [`b8c7cd7`](https://github.com/npm/npm/commit/b8c7cd7) + [#12000](https://github.com/npm/npm/pull/12000) + Stop depending on [`async-some`](https://npmjs.com/package/async-some) as it's no + longer used in npm. + ([@watilde](https://github.com/watilde)) + +#### DOCUMENTATION IMPROVEMENTS + +* [`fdd6b28`](https://github.com/npm/npm/commit/fdd6b28) + [#11884](https://github.com/npm/npm/pull/11884) + Include `node_modules` in the list of files and directories that npm won't + include in packages ordinarily. (Modules listed in `bundledDependencies` and things + that those modules rely on, ARE included of course.) + ([@Jameskmonger](https://github.com/Jameskmonger)) +* [`aac15eb`](https://github.com/npm/npm/commit/aac15eb) + [#12006](https://github.com/npm/npm/pull/12006) + Fix typo in npm-orgs documentation, where teams docs went to access docs and vice versa. + ([@yaelz](https://github.com/yaelz)) + +#### FEWER NETWORK TESTS + +* [`3e41360`](https://github.com/npm/npm/commit/3e41360) + [#11987](https://github.com/npm/npm/pull/11987) + Fix test that was inappropriately hitting the network + ([@yodeyer](https://github.com/yodeyer)) + +### v3.8.4 (2016-03-24) + +Was erroneously released with just a changelog typo correction and was +otherwise the same as 3.8.3. + +### v3.8.3 (2016-03-17): + +#### SECURITY ADVISORY: BEARER TOKEN DISCLOSURE + +This release includes [the fix for a +vulnerability](https://github.com/npm/npm/commit/f67ecad59e99a03e5aad8e93cd1a086ae087cb29) +that could cause the unintentional leakage of bearer tokens. + +Here are details on this vulnerability and how it affects you. + +##### DETAILS + +Since 2014, npm’s registry has used HTTP bearer tokens to authenticate requests +from the npm’s command-line interface. A design flaw meant that the CLI was +sending these bearer tokens with _every_ request made by logged-in users, +regardless of the destination of their request. (The bearers only should have +been included for requests made against a registry or registries used for the +current install.) + +An attacker could exploit this flaw by setting up an HTTP server that could +collect authentication information, then use this authentication information to +impersonate the users whose tokens they collected. This impersonation would +allow them to do anything the compromised users could do, including publishing +new versions of packages. + +With the fixes we’ve released, the CLI will only send bearer tokens with +requests made against a registry. + +##### THINK YOU'RE AT RISK? REGENERATE YOUR TOKENS + +If you believe that your bearer token may have been leaked, [invalidate your +current npm bearer tokens](https://www.npmjs.com/settings/tokens) and rerun +`npm login` to generate new tokens. Keep in mind that this may cause continuous +integration builds in services like Travis to break, in which case you’ll need +to update the tokens in your CI server’s configuration. + +##### WILL THIS BREAK MY CURRENT SETUP? + +Maybe. + +npm’s CLI team believes that the fix won’t break any existing registry setups. +Due to the large number of registry software suites out in the wild, though, +it’s possible our change will be breaking in some cases. + +If so, please [file an issue](https://github.com/npm/npm/issues/new) describing +the software you’re using and how it broke. Our team will work with you to +mitigate the breakage. + +##### CREDIT & THANKS + +Thanks to Mitar, Will White & the team at Mapbox, Max Motovilov, and James +Taylor for reporting this vulnerability to npm. + +#### PERFORMANCE IMPROVEMENTS + +The updated [`are-we-there-yet`](https://npmjs.com/package/are-we-there-yet) +changes how it tracks how complete things are to be much more efficient. +The summary is that `are-we-there-yet` was refactored to remove an expensive +tree walk. + +The result for you should be faster installs when working with very large trees. + +Previously `are-we-there-yet` computed this when you asked by passing the request down +its tree of progress indicators, totaling up the results. In doing so, it had to walk the +entire tree of progress indicators. + +By contrast, `are-we-there-yet` now updates a running total when a change +is made, bubbling that up the tree from whatever branch made progress. This +bubbling was already going on so there was nearly no cost associated with taking advantage of it. + +* [`32f2bd0`](https://github.com/npm/npm/commit/32f2bd0e26116db253e619d67c4feae1de3ad2c2) + `npmlog@2.0.3`: + Bring in substantial performance improvements from `are-we-there-yet`. + ([@iarna](https://github.com/iarna)) + +#### DUCT TAPE FOR BUGS + +* [`473d324`](https://github.com/npm/npm/commit/473d3244a8ddfd6b260d0aa0d395b119d595bf97) + [#11947](https://github.com/npm/npm/pull/11947) + Guard against bugs that could cause the installer to crash with errors like: + + ``` + TypeError: Cannot read property 'target' of null + ``` + + This doesn't fix the bugs, but it does at least make the installer less + likely to explode. + ([@thefourtheye](https://github.com/thefourtheye)) + +#### DOC FIXES + +* [`ffa428a`](https://github.com/npm/npm/commit/ffa428a4eee482aa620819bc8df994a76fad7b0c) + [#11880](https://github.com/npm/npm/pull/11880) + Fix typo in `npm install` documentation. + ([@watilde](https://github.com/watilde)) + +#### DEPENDENCY UPDATES + +* [`7537fe1`](https://github.com/npm/npm/commit/7537fe1748c27e6f1144b279b256cd3376d5c41c) + `sorted-object@2.0.0`: + Create objects with `{}` instead of `Object.create(null)` to make the results + strictly equal to what, say, parsed JSON would provide. + ([@domenic](https://github.com/domenic)) +* [`8defb0f`](https://github.com/npm/npm/commit/8defb0f7b3ebdbe15c9ef5036052c10eda7e3161) + `readable-stream@2.0.6`: + Fix sync write issue on 0.10. + ([@calvinmetcalf](https://github.com/calvinmetcalf)) + +#### TEST FIXES FOR THE SELF TESTS + +* [`c3edeab`](https://github.com/npm/npm/commit/c3edeabece4400308264e7cf4bc4448bd2729f55) + [#11912](https://github.com/npm/npm/pull/11912) + Change the self installation test to do its work in `/tmp`. + Previously this was installing into a temp subdir in `test/tap`, which + wouldn't catch the case where a module was installed in the local + `node_modules` folder but not in dependencies, as node would look up + the tree and use the copy from the version of npm being tested. + ([@iarna](https://github.com/iarna)) + +### v3.8.2 (2016-03-10): + +#### HAVING TROUBLE INSTALLING C MODULES ON ANDROID? + +This release includes an updated `node-gyp` with fixes for Android. + +* [`634ecba`](https://github.com/npm/npm/commit/634ecba320fb5a3287e8b7debfd8b931827b9e19) + `node-gyp@3.3.1`: + Fix bug in builds for Android. + ([@bnoordhuis](https://github.com/bnoordhuis)) + +#### NPM LOGOUT CLEANS UP BETTER + +* [`460ed21`](https://github.com/npm/npm/commit/460ed217876ac78d21477c288f1c06563fb770b4) + [#10529](https://github.com/npm/npm/issues/10529) + If you ran `npm logout` with a scope, while we did invalidate your auth + token, we weren't removing the auth token from your config file. This patch causes + the auth token to be removed. + ([@wyze](https://github.com/wyze)) + +#### HELP MORE HELPFUL + +* [`d1d0233`](https://github.com/npm/npm/commit/d1d02335d297da2734b538de44d8967bdcd354cf) + [#11003](https://github.com/npm/npm/issues/11003) + Update help to only show command names and their shortcuts. Previously + some typo corrections were shown, along with various alternate + spellings. + ([@watilde](https://github.com/watilde)) +* [`47928cd`](https://github.com/npm/npm/commit/47928cd6264e1d6d0ef67435b71c66d01bea664a) + [#11003](https://github.com/npm/npm/issues/11003) + Remove "verison" typo from the help listing. + ([@doug-wade](https://github.com/doug-wade)) + +#### MORE COMPLETE CONFIG LISTINGS + +* [`cf5fd40`](https://github.com/npm/npm/commit/cf5fd401494d96325d74a8bb8c326aa0045a714c) + [#11472](https://github.com/npm/npm/issues/11472) + Make `npm config list` include the per-project `.npmrc` in the output. + ([@mjomble](https://github.com/mjomble)) + +#### DEPTH LIMITED PARSEABLE DEP LISTINGS + +* [`611070f`](https://github.com/npm/npm/commit/611070f0f7a1e185c75cadae46179194084b398f) + [#11495](https://github.com/npm/npm/issues/11495) + Made `npm ls --parseable` honor the `--depth=#` option. + ([@zacdoe](https://github.com/zacdoe)) + +#### PROGRESS FOR THE (NON) UNICODE REVOLUTION + +* [`ff90382`](https://github.com/npm/npm/commit/ff9038227a1976b5e936442716d9877f43c6c9b4) + [#11781](https://github.com/npm/npm/issues/11781) + Make the progress bars honor the unicode option. + ([@watilde](https://github.com/watilde)) + +#### `npm view --json`, NOW ACTUALLY JSON + +* [`24ab70a`](https://github.com/npm/npm/commit/24ab70a4ccfeaa005b80252da313bb589510668e) + [#11808](https://github.com/npm/npm/issues/11808) + Make `npm view` produce valid JSON when requested with `--json`. + Previously `npm view` produced some sort of weird hybrid output, with multiple + JSON docs. + ([@doug-wade](https://github.com/doug-wade)) + +#### DOCUMENTATION CHANGES + +* [`6fb0499`](https://github.com/npm/npm/commit/6fb0499bea868fdc637656d210c94f051481ecd4) + [#11726](https://github.com/npm/npm/issues/11726) + Previously we patched the `npm update` docs to suggest using `--depth + Infinity` instead of `--depth 9999`, but that was a mistake. We forgot + that `npm outdated` (on which `npm update` is built) has a special + case where it treats `Infinity` as `0`. This reverts that patch. + ([@GriffinSchneider](https://github.com/GriffinSchneider)) +* [`f0bf684`](https://github.com/npm/npm/commit/f0bf684a87ea5eea03432a17f38678fed4960d43) + [#11748](https://github.com/npm/npm/pull/11748) + Document all of the various aliases for commands in the documentation + for those commands. + ([@watilde](https://github.com/watilde)) +* [`fe04443`](https://github.com/npm/npm/commit/fe04443d8988e2e41bd4047078e06a26d05d380d) + [#10968](https://github.com/npm/npm/issues/10968) + The `npm-scope` document notes that scopes have been available on the + public registry for a while. This adds that you'll need `npm@2` or later + to use them. + ([@doug-wade](https://github.com/doug-wade)) +* [`3db37a5`](https://github.com/npm/npm/commit/3db37a52b2b2e3193ef250ad2cf96dfd2def2777) + [#11820](https://github.com/npm/npm/pull/11820) + The command `npm link` should be linking package from local folder to + global, and `npm link package-name` should be from global to local. The + description in the documentation was reversed and this fixes that. + ([@rhgb](https://github.com/rhgb)) + +#### GLOB FOR THE GLOB THRONE + +* [`be55882`](https://github.com/npm/npm/commit/be55882dc4ee5ce0777b4badc9141dab5bf5be4d) + `glob@7.0.3`: + Fix a race condition and some windows edge cases. + ([@isaacs](https://github.com/isaacs)) + +### v3.8.1 (2016-03-03): + +This week the install summary got better, killing your npm process now +also kills the scripts it was running and a rarely used search flag got +documented. + +Our improvements on the test suite on Windows are beginning to pick up +steam, you can follow along by +[watching the PR](https://github.com/npm/npm/pull/11444). + +#### BETTER INSTALL SUMMARIES + +* [`e40d457`](https://github.com/npm/npm/commit/e40d4572cc98db06757df5b8bb6b7dbd0546d3d7) + [#11699](https://github.com/npm/npm/issues/11699) + Ensure that flags like `--production` passed to install don't result in + the summary at the end being incorrectly filtered. That summary is + produced by the same code as `npm ls` and therefore responds to flags + the same way it does. This is undesirable when it's an install summary, + however, as we don't want it to filter anything. + + This fixes an issue where `npm install --production <module>` would + result in npm exiting with an error code. The `--production` flag would + make `npm ls` filter out `<module>` as it wasn't saved to the + `package.json` and thus wasn't a production dependency. The install + report is limited to show just the modules installed, so with that + filtered out nothing is available. With nothing available `npm ls` + would set `npm` to exit with an error code. + ([@ixalon](https://github.com/ixalon)) +* [`99337b4`](https://github.com/npm/npm/commit/99337b469163a4b211b9c6ff1aa9712ae0d601d2) + [#11600](https://github.com/npm/npm/pull/11600) + Make the report of installed modules really only show those modules + that were installed. Previously it selected which modules from your + tree to display based on `name@version` which worked great when your + tree was deduped but would list things it hadn't touched when there + were duplicates. + ([@iarna](https://github.com/iarna)) + +#### SCRIPTS BETTER FOLLOW THE LEADER + +* [`5454347`](https://github.com/npm/npm/commit/545434766eb3681d3f40b745f9f3187ed63f310a) + [#10868](https://github.com/npm/npm/pull/10868) + When running a lifecycle script, say through `npm start`, killing npm + wouldn't forward that on to the children. It does now. + ([@daniel-pedersen](https://github.com/daniel-pedersen)) + +#### SEARCHING SPECIFIC REGISTRIES + +* [`6020447`](https://github.com/npm/npm/commit/60204479f76458a9864aa530cda2b3333f95c2b0) + [#11490](https://github.com/npm/npm/pull/11490) + Add docs for using the `--registry` flag with search. + ([@plumlee](https://github.com/plumlee)) + +#### LODASH UPDATES + +* [`bb14204`](https://github.com/npm/npm/commit/bb14204183dad620a6650452a26cdc64111f8136) + `lodash.without@4.1.1` + ([@jdalton](https://github.com/jdalton)) +* [`0089059`](https://github.com/npm/npm/commit/0089059c562aee9ad0398e55d2c12c68a6150e79) + `lodash.keys@4.0.5` + ([@jdalton](https://github.com/jdalton)) +* [`6ee1de4`](https://github.com/npm/npm/commit/6ee1de4474d9683a1f7023067d440780eeb10311) + `lodash.clonedeep@4.3.1` + ([@jdalton](https://github.com/jdalton)) + +### v3.8.0 (2016-02-25): + +This week brings a quality of life improvement for some Windows users, and +an important knob to be tuned for folks experiencing network problems. + +#### LIMIT CONCURRENT REQUESTS + +We've long known that `npm`'s tendency to try to request all your +dependencies simultaneously upset some network hardware (particular, +consumer grade routers & proxies of all sorts). One of the reasons that we're +planning to write our own npm specific version of `request` is to be able to +more easily control this sort of thing. + +But fortunately, you don't have to wait for that. +[@misterbyrne](https://github.com/misterbyrne) took a look at our existing +code and realized it could be added painlessly TODAY. The new default +maximum is `50`, instead of `Infinity`. If you're having network issues you +can try setting that value down to something lower (if you do, please let us +know... the default is subject to tuning). + +* [`910f9ac`](https://github.com/npm/npm/commit/910f9accf398466b8497952bee9f566ab50ade8c) + [`f7be667`](https://github.com/npm/npm/commit/f7be667548a132ec190ac9d60a31885a7b4fe2b3) + Add a new config option, `maxsockets` and `npm-registry-client@7.1.0` to + take advantage of it. + ([@misterbyrne](https://github.com/misterbyrne)) + +#### WINDOWS GIT BASH + +We think it's pretty keen too, we were making it really hard to actually +upgrade if you were using it. NO MORE! + +* [`d60351c`](https://github.com/npm/npm/commit/d60351ccae87d71a5f5eac73e3085c6290b52a69) + [#11524](https://github.com/npm/npm/issues/11524) + Prefer locally installed npm in Git Bash -- previous behavior was to use + the global one. This was done previously for other shells, but not for Git + Bash. + ([@destroyerofbuilds](https://github.com/destroyerofbuilds)) + +#### DOCUMENTATION IMPROVEMENTS + +* [`b63de3c`](https://github.com/npm/npm/commit/b63de3c97c4c27078944249a4d5bbe1c502c23bc) + [#11636](https://github.com/npm/npm/issues/11636) + Document `--save-bundle` option in main install page. + ([@datyayu](https://github.com/datyayu)) +* [`3d26453`](https://github.com/npm/npm/commit/3d264532d6d9df60420e985334aebb53c668d32b) + [#11644](https://github.com/npm/npm/pull/11644) + Add `directories.test` to the `package.json` documentation. + ([@lewiscowper](https://github.com/lewiscowper)) +* [`b64d124`](https://github.com/npm/npm/commit/b64d12432fdad344199b678d700306340d3607eb) + [#11441](https://github.com/npm/npm/pull/11441) + Add a link in documentation to the contribution guidelines. + ([@watilde](https://github.com/watilde)) +* [`82fc548`](https://github.com/npm/npm/commit/82fc548b0e2abbdc4f7968c20b118c30cca79a24) + [#11441](https://github.com/npm/npm/pull/11441/commits) + Remove mentions of the long defunct Google group. + ([@watilde](https://github.com/watilde)) +* [`c6ad091`](https://github.com/npm/npm/commit/c6ad09131af2e2766d6034257a8fcaa294184121) + [#11474](https://github.com/npm/npm/pull/11474) + Correct invalid JSON in npm-update docs. + ([@robludwig](https://github.com/robludwig)) +* [`4906c90`](https://github.com/npm/npm/commit/4906c90ed2668adf59ebee759c7ebb811aa46e57) + Expand on the documentation for `bundlededDependencies`, explaining what they are + and when you might want to use them. + ([@gnerkus](https://github.com/gnerkus)) + +#### DEPENDENCY UPDATES + +* [`93cdc25`](https://github.com/npm/npm/commit/93cdc25432b71cbc9c25c54ae316770e18f4b01e) + `strip-ansi@3.0.1`: + Non-user visible tests & maintainer doc updates. + ([@jbnicolai](https://github.com/jbnicolai)) +* [`3b2ccef`](https://github.com/npm/npm/commit/3b2ccef30dc2038b99ba93cd1404a1d01dac8790) + `lodash.keys@4.0.4` + ([@jdalton](https://github.com/jdalton)) +* [`30e9eb9`](https://github.com/npm/npm/commit/30e9eb97397a8f85081d328ea9aa54c2a7852613) + `lodash._baseuniq@4.5.0` + ([@jdalton](https://github.com/jdalton)) + + +### v3.7.5 (2016-02-22): + +A quick fixup release because when I updated glob, I missed the subdep copies of itself +that it installed deeper in the tree. =/ + +This only effected people trying to update to `3.7.4` from `npm@2` or `npm@1`. Updates from +`npm@3` worked fine (as it fixes up the missing subdeps during installation). + +#### OH MY GLOB + +* [`63fa704`](https://github.com/npm/npm/commit/63fa7044569127e6e29510dc499a865189806076) + [#11633](https://github.com/npm/npm/issues/11633) + When updating the top level `npm` to `glob@7`, the subdeps that + still depended on `glob@6` got new versions installed but they + weren't added to the commit. This adds them back in. + ([@iarna](https://github.com/iarna)) + +### v3.7.4 (2016-02-18): + +I'm ([@iarna](https://github.com/iarna)) back from vacation in the frozen +wastes of Maine! This release sees a couple of bug fixes, some +documentation updates, a bunch of dependency updates and improvements to our +test suite. + +#### FIXES FOR `update`, FIXES FOR `ls` + +* [`53cdb96`](https://github.com/npm/npm/commit/53cdb96634fc329378b4ea4e767ba9987986a76e) + [#11362](https://github.com/npm/npm/issues/11362) + Make `npm update` stop trying to update linked packages. + ([@rhendric](https://github.com/rhendric)) +* [`8d90d25`](https://github.com/npm/npm/commit/8d90d25b3da086843ce43911329c9572bd109078) + [#11559](https://github.com/npm/npm/issues/11559) + Only list runtime dependencies when doing `npm ls --production`. + ([@yibn2008](https://github.com/yibn2008)) + +#### @wyze, DOCUMENTATION HERO OF THE PEOPLE, GETS THEIR OWN HEADER + +* [`b78b301`](https://github.com/npm/npm/commit/b78b30171038ab737eff0b070281277e35af25b4) + [#11416](https://github.com/npm/npm/pull/11416) + Logout docs were using a section copy-pasted from the adduser docs. + ([@wyze](https://github.com/wyze)) +* [`649e28f`](https://github.com/npm/npm/commit/649e28f50aa323e75202eeedb824434535a0a4a0) + [#11414](https://github.com/npm/npm/pull/11414) + Add colon for consistency. + ([@wyze](https://github.com/wyze)) + +#### WHITTLING AWAY AT PATH LENGTHS + +So for all of you who don't know -- Node.js does, in fact, support long Windows +paths. Unfortunately, depending on the tool and the Windows version, a lot of +external tooling does not. This means, for example, that some (all?) versions of +Windows Explorer *can literally never delete npm from their system entirely +because of deeply-nested npm dependencies*. Which is pretty gnarly. + +Incidentally, if you run into that in particularly, you can use +[rimraf](npm.im/rimraf) to remove such files 💁. + +The latest victim of this issue was the Node.js CI setup for testing on Windows, +which uses some tooling or another that croaks on the usual path length limit +for that OS: 255 characters. + +This isn't ordinarily an issue with `npm@3` as it produces mostly flat +trees, but you may be surprised to learn that `npm`'s own distribution isn't +flat, due to needing to be compatible with `npm@1.2`, which ships with +`node@0.8`! + +We've taken another baby step towards alleviating this in this release by +updating a couple of dependencies that were preventing `npmlog` from deduping, +and then doing a dedupe on that and `gauge`. Hopefully it helps. + +* [`f3c32bc`](https://github.com/npm/npm/commit/f3c32bc3127301741d2fa3a26be6f5f127a35908) + [#11528](https://github.com/npm/npm/pull/11528) + `node-gyp@3.3.0`: + Update to a more recent version that uses a version of npmlog compatible + with npm itself. Also adds: AIX support, new `gyp`, `--cafile` command + line option, and allows configuration of Node.js and io.js mirrors. + ([@rvagg](https://github.com/rvagg)) + +#### INTERNAL TEST IMPROVEMENTS + +The `npm` core team's time recently has been sunk into `npm`'s many years of +tech debt. Specifically, we've been working on improving the test suite. +This isn't user visible, but in future should mean a more stable, easier to +contribute to `npm`. Ordinarily we don't report these kinds of changes in +the change log, but I thought I might share this week as this chunk is +bigger than usual. + +* [`07f020a`](https://github.com/npm/npm/commit/07f020a09e94ae393c67526985444e128ef6f83c) + [#11292](https://github.com/npm/npm/pull/11292) + `tacks@1.0.9`: + Add a package that provides a tool to generate fixtures from folders and, relatedly, + a module that an create and tear down filesystem fixtures easily. + ([@iarna](https://github.com/iarna)) +* [`0837346`](https://github.com/npm/npm/commit/083734631f9b11b17c08bca8ba8cb736a7b1e3fb) + [#11292](https://github.com/npm/npm/pull/11292) + Remove all the relatively cryptic legacy tests and creates new tap tests + that check the same functionality. The *legacy* tests were tests that + were originally a shell script that was ported to javascript early in + `npm`'s history. + ([@iarna](https://github.com/iarna)) + ([@zkat](https://github.com/zkat)) +* [`5a701e7`](https://github.com/npm/npm/commit/5a701e71a0130787fb98450f9de92117b4ef88e1) + [#11292](https://github.com/npm/npm/pull/11292) + Test that we don't leak auth info into the environment. + ([@zkat](https://github.com/zkat)) +* [`502d7d0`](https://github.com/npm/npm/commit/502d7d0628f08b09d8d13538ebccc63de8b3edf5) + [#11292](https://github.com/npm/npm/pull/11292) + Test that env vars properly passed into scripts. + ([@zkat](https://github.com/zkat)) +* [`420f267`](https://github.com/npm/npm/commit/420f2672ee8c909f18bee10b1fc7d4ad91cf328b) + [#11292](https://github.com/npm/npm/pull/11292) + Test that npm's distribution binary is complete and can be installed and used. + ([@iarna](https://github.com/iarna)) +* [`b7e99be`](https://github.com/npm/npm/commit/b7e99be1b1086f2d6098c653c1e20791269c9177) + [#11292](https://github.com/npm/npm/pull/11292) + Test that the `package.json` `files` section and `.npmignore` do what + they're supposed to. + ([@zkat](https://github.com/zkat)) + +#### DEPENDENCY UPDATES + +* [`4611098`](https://github.com/npm/npm/commit/4611098fd8c65d61a0645deb05bf38c81300ffca) + `rimraf@2.5.2`: + Use `glob@7.0.0`. + ([@isaacs](https://github.com/isaacs)) +* [`41b2772`](https://github.com/npm/npm/commit/41b2772cb83627f3b5b926cf81e150e7148cb124) + `glob@7.0.0`: + Raise error if `options.cwd` is specified, and not a directory. + ([@isaacs](https://github.com/isaacs)) +* [`c14e74a`](https://github.com/npm/npm/commit/c14e74ab5d17c764f3aa37123a9632fa965f8760) + `gauge@1.2.7`: Update to newer lodash versions, for a smaller tree. + ([@iarna](https://github.com/iarna)) +* [`d629363`](https://github.com/npm/npm/commit/d6293630ddc25bfa26d19b6be4fd2685976d7358) + `lodash.without@4.1.0` + ([@jdalton](https://github.com/jdalton)) +* [`3ea4c80`](https://github.com/npm/npm/commit/3ea4c8049ca8df9f64426b1db8a29b9579950134) + `lodash.uniq@4.2.0` + ([@jdalton](https://github.com/jdalton)) +* [`8ddcc8d`](https://github.com/npm/npm/commit/8ddcc8deb554660a3f7f474fae9758c967d94552) + `lodash.union@4.2.0` + ([@jdalton](https://github.com/jdalton)) +* [`2b656a6`](https://github.com/npm/npm/commit/2b656a672d351f32ee2af24dcee528356dcd64f4) + `lodash.keys@4.0.3` + ([@jdalton](https://github.com/jdalton)) +* [`ac171f8`](https://github.com/npm/npm/commit/ac171f8f0318a7dd3c515f3b83502dfa9e87adb8) + `lodash.isarguments@3.0.7` + ([@jdalton](https://github.com/jdalton)) +* [`bcccd90`](https://github.com/npm/npm/commit/bcccd9057b75d800c799ab15f00924f700415d3e) + `lodash.clonedeep@4.3.0` + ([@jdalton](https://github.com/jdalton)) +* [`8165bca`](https://github.com/npm/npm/commit/8165bca537d86305a3d08f080f86223a26615aa8) + `lodash._baseuniq@4.4.0` + ([@jdalton](https://github.com/jdalton)) + +### v3.7.3 (2016-02-11): + +Hey all! We've got a pretty small release this week -- just documentation +updates and a couple of dependencies. This release also includes a particular +dependency upgrade that makes it so we're exclusively using the latest version +of `graceful-fs`, which'll make it so things keep working with future Node.js +releases. + +A certain internal Node.js API was deprecated and slated for future removal from +Node Core. This API was critical for versions of `graceful-fs@<4`, before a +different approach was used to achieve similar ends. By upgrading this library, +and making sure all our dependencies are also updated, we've ensured npm will +continue to work once the API is finally removed. Older versions of npm, on the +other hand, will simply not work on future versions of Node.js. + +#### DEPENDENCY UPGRADES + +* [`29536f4`](https://github.com/npm/npm/commit/29536f42da6c06091c9acbc8952f72daa8a9412c) + `cmd-shim@2.0.2`: + Final straggler using `graceful-fs@<4`. + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`5f59e74`](https://github.com/npm/npm/commit/5f59e748ef4c066756bb204a452cecd0543c7a2f) + `lodash.uniq@4.1.0` + ([@jdalton](https://github.com/jdalton)) +* [`987cabe`](https://github.com/npm/npm/commit/987cabe8a18abcb5a685685958bf74c7258a979c) + `lodash.union@4.1.0` + ([@jdalton](https://github.com/jdalton)) +* [`5c641f0`](https://github.com/npm/npm/commit/5c641f05fdc153c6bb06a89c46fe2a345ce413db) + `lodash.clonedeep@4.1.0` + ([@jdalton](https://github.com/jdalton)) + +#### EVERYONE GETTING SOCKS LIKE IT'S OPRAH'S SHOW + +* [`9ea5658`](https://github.com/npm/npm/commit/9ea56582ca4d0991dbed44f992c88f08a643cb4b) + [#11410](https://github.com/npm/npm/pull/11410) + Fixed a small spelling error in `npm-config.md`. + ([@pra85](https://github.com/pra85)) +* [`2a11e56`](https://github.com/npm/npm/commit/2a11e562a14bce18b6ddca6c20d17f97b6a8ec2f) + [#11403](https://github.com/npm/npm/pull/11403) + Removes `--depth Infinity` warning from documentation -- this operation should + actually be totally safe as of `npm@3`. (The warning remains for `npm@2`.) + ([@Aourin](https://github.com/Aourin)) +* [`42a4727`](https://github.com/npm/npm/commit/42a4727bfb1e21c890b8e2babda55e06ac2bda29) + [#11391](https://github.com/npm/npm/pull/11391) + Fixed versions of `shrinkwrap.json` in examples in documentation for `npm + shrinkwrap`, which did not quite match up. + ([@xcatliu](https://github.com/xcatliu)) + +### v3.7.2 (2016-02-04): + +This week, the CLI team has been busy working on rewriting tests to support +getting coverage reports going and running all of our tests on Windows. +Meanwhile, we've got a bunch of dependency updates and one or two other +things. + +#### TESTS WENT INTO HIDING + +Last week we took a patch from [@substack](https://github.com/substack) to +stop the installer from reordering arrays in an installed module's +`package.json`... but somehow I dropped the test when I was rebasing. + +* [`21b9271`](https://github.com/npm/npm/commit/21b927182514a0ff6d9f34480bfc39f72e3e9f8c) + [#10063](https://github.com/npm/npm/issues/10063) + Restore test that verifies that we don't re-order arrays in a module's + `package.json` on install. + ([@substack](https://github.com/substack)) + +#### DOCUMENTATION FIXES + +* [`c67521d`](https://github.com/npm/npm/commit/c67521dc6c1e41d39d02c74105e41442851d23bb) + [#11348](https://github.com/npm/npm/pull/11348) + Improve the documentation around which files are ALWAYS included in published packages + and which are ALWAYS excluded. + ([@jscissr](https://github.com/jscissr)) +* [`7ef6793`](https://github.com/npm/npm/commit/7ef6793cd191cc8d88340f7e1ce9c9e3d6f0b2f4) + [#11348](https://github.com/npm/npm/pull/11348) + The release date on the 3.7.0 changelog entry was wrong. I honestly don't + know how I keep doing this. =D + ([@rafek](https://github.com/rafek)) + +#### DEPENDENCY UPDATES + +* [`8a3c80c`](https://github.com/npm/npm/commit/8a3c80c4fd3d82fe937f30bc7cbd3dee51a8a893) + `graceful-fs@4.1.3`: + Fix a bug where close wasn't getting made graceful. + ([@isaacs](https://github.com/isaacs)) + +`lodash` saw updates across most of its modules this week with browser +campatibility fixes that don't really impact us. + +* [`2df342b`](https://github.com/npm/npm/commit/2df342bf30efa99b98016acc8a5dc03e00b58b9c) + `lodash.without@4.0.2` + ([@jdalton](https://github.com/jdalton)) +* [`86aa91d`](https://github.com/npm/npm/commit/86aa91dce60f6b6a92bb3ba2bf6e6be1f6afc750) + `lodash.uniq@4.0.2` + ([@jdalton](https://github.com/jdalton)) +* [`0a94bf6`](https://github.com/npm/npm/commit/0a94bf6af0ebd38d080f92257e0cd9bae40b31ff) + `lodash.union@4.0.2` + ([@jdalton](https://github.com/jdalton)) +* [`b4c9582`](https://github.com/npm/npm/commit/b4c9582b4ef5991f3d155e0c6142ed1c631860af) + `lodash.isarguments@3.0.6` + ([@jdalton](https://github.com/jdalton)) +* [`efe766c`](https://github.com/npm/npm/commit/efe766c63c0948a4ae4c0d12f2b834629ab86e92) + `lodash.keys@4.0.2`: Minor code cleanup and the above. + ([@jdalton](https://github.com/jdalton)) +* [`36abb24`](https://github.com/npm/npm/commit/36abb24ef31017adbf325e7f833d5d4b0f03f5d4) + `lodash.clonedeep@4.0.4`: + Add support for cloning prototype objects and the above. + ([@jdalton](https://github.com/jdalton)) + +### v3.7.1 (2016-02-01): + +Super quick Monday patch on last week's release. + +If you ever wondered why we release things to the `npm@next` tag for a week +before promoting them to `npm@latest`, this is it! + +#### RELEASE TRAIN VINDICATED (again) + +* [`adcaf04`](adcaf047811dcc475ab1984fc93fe34540fc03d7) + [#11349](https://github.com/npm/npm/issues/11349) + Revert last weeks change to use JSON clone instead of `lodash.cloneDeep`. + ([@iarna](https://github.com/iarna)) + +### v3.7.0 (2016-01-29): + +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](https://github.com/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 + +* [`c680fa9`](https://github.com/npm/npm/commit/c680fa9f8135759eb5512f4b86e47fa265733f79) + `npmlog@2.0.2`: New `are-we-there-yet` with performance patches from + [@STRML](https://github.com/STRML). New `gauge` with timer churn + performance patch. + ([@iarna](https://github.com/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. + +* [`1d1ea7e`](https://github.com/npm/npm/commit/1d1ea7eeb958034878eb6573149aeecc686888d3) + [#11306](https://github.com/npm/npm/pull/11306) + Use JSON clone instead of `lodash.cloneDeep`. + ([@STRML](https://github.com/STRML)) + +#### NEW FEATURE: GIT SUBMODULE SUPPORT + +Long, long requested– the referenced issue is from 2011– we're finally +getting rudimentary git submodule support. + +* [`39dea9c`](https://github.com/npm/npm/commit/39dea9ca4216c6ea628f5ca47d2b34a4b251a1ed) + [#1876](https://github.com/npm/npm/issues/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 `.gitmodules` file. + ([@gagern](https://github.com/gagern)) + +#### ROBUSTNESS + +* [`5dec02a`](https://github.com/npm/npm/commit/5dec02a3d0e82202c021e27aff9d006283fdc25a) + [#10347](https://github.com/npm/npm/issues/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 make `npm` error out– this reduces that to a warning. + ([@evanlucas](https://github.com/evanlucas)) + +#### BUG FIXES + +* [`9ab8b8d`](https://github.com/npm/npm/commit/9ab8b8d047792612ae7f9a6079745d51d5283a53) + [#10820](https://github.com/npm/npm/issues/10820) + Fix a bug with `npm ls` where if you asked for ONLY production dependencies in output + it would exclude dependencies that were BOTH production AND development dependencies. + ([@davidvgalbraith](https://github.com/davidvgalbraith)) +* [`6803fed`](https://github.com/npm/npm/commit/6803fedadb8f9b36cd85f7338ecf75d1d183c833) + [#8982](https://github.com/npm/npm/issues/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, `npm` + would incorrectly refuse to run lifecycle scripts. + ([@elvanja](https://github.com/elvanja)) +* [`3eae40b`](https://github.com/npm/npm/commit/3eae40b7a681aa067dfe4fea8c9a76da5b508b48) + [#9253](https://github.com/npm/npm/issues/9253) + Fix a bug where, when running lifecycle scripts, if the Node.js binary you ran + `npm` with wasn't in your `PATH`, `npm` wouldn't use it to run your scripts. + ([@segrey](https://github.com/segrey)) +* [`61daa6a`](https://github.com/npm/npm/commit/61daa6ae8cbc041d3a0d8a6f8f268b47dd8176eb) + [#11014](https://github.com/npm/npm/issues/11014) + Fix a bug where running `rimraf node_modules/<package>` followed by `npm + rm --save <package>` would fail. `npm` now correctly removes the module + from your `package.json` even though it doesn't exist on disk. + ([@davidvgalbraith](https://github.com/davidvgalbraith)) +* [`a605586`](https://github.com/npm/npm/commit/a605586df134ee97c95f89c4b4bd6bc73f7aa439) + [#9679](https://github.com/npm/npm/issues/9679) + Fix a bug where `npm install --save git+https://…` would save a `https://` + url to your `package.json` which was a problem because `npm` wouldn't then + know that it was a git repo. + ([@gagern](https://github.com/gagern)) +* [`bbdc700`](https://github.com/npm/npm/commit/bbdc70024467c365cc4e06b8410947c04b6f145b) + [#10063](https://github.com/npm/npm/issues/10063) + Fix a bug where `npm` would change the order of array properties in the + `package.json` files of dependencies. `npm` adds a bunch of stuff to + `package.json` files in your `node_modules` folder 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 that `npm` itself maintains, but _is_ a problem for properties + used by other packages. + ([@substack](https://github.com/substack)) + +#### DOCS IMPROVEMENTS + +* [`2609a29`](https://github.com/npm/npm/commit/2609a2950704f577ac888668e81ba514568fab44) + [#11273](https://github.com/npm/npm/pull/11273) + Include an example of viewing package version history in the `npm view` documentation. + ([@vedatmahir](https://github.com/vedatmahir)) +* [`719ea9c`](https://github.com/npm/npm/commit/719ea9c45a5c3233f3afde043b89824aad2df0a7) + [#11272](https://github.com/npm/npm/pull/11272) + Fix typographical issue in `npm update` documentation. + ([@jonathanp](https://github.com/jonathanp)) +* [`cb9df5a`](https://github.com/npm/npm/commit/cb9df5a37091e06071d8704b629e7ebaa41c37fe) + [#11215](https://github.com/npm/npm/pull/11215) + Do not call `SEE LICENSE IN <filename>` an _SPDX expression_, as it's not. + ([@kemitchell](https://github.com/kemitchell)) +* [`f427934`](https://github.com/npm/npm/commit/f4279346c368da4bca09385f773e8eed1d389e5e) + [#11196](https://github.com/npm/npm/pull/11196) + Correct the `package.json` examples in the `npm update` documentation to actually be + valid JSON and not just JavaScript object literals. + ([@s100](https://github.com/s100)) + +#### DEPENDENCY UPDATES + +* [`a7b2407`](https://github.com/npm/npm/commit/a7b24074cb59a1ab17c0d8eff1498047e6a123e5) + `retry@0.9.0`: New features and interface agnostic refactoring. + ([@tim-kos](https://github.com/tim-kos)) +* [`220fc77`](https://github.com/npm/npm/commit/220fc7702ae3e5d601dfefd3e95c14e9b32327de) + `request@2.69.0`: + A bunch of small bug fixes and module updates. + ([@simov](https://github.com/simov)) +* [`9e5c84f`](https://github.com/npm/npm/commit/9e5c84f1903748897e54f8ff099729ff744eab0f) + `which@1.2.4`: + Update `isexe` and fix bug in `pathExt`, in which files without extensions + would sometimes be preferred to files with extensions on Windows, even though + those without extensions aren't executable. + `pathExt` is a list of extensions that are considered executable (exe, cmd, + bat, com on Windows). + ([@isaacs](https://github.com/isaacs)) +* [`375b9c4`](https://github.com/npm/npm/commit/375b9c42fe0c6de47ac2f92527354b2ea79b7968) + `rimraf@2.5.1`: Minor doc formatting fixes. + ([@isaacs](https://github.com/isaacs)) +* [`ef1971e`](https://github.com/npm/npm/commit/ef1971e6270c2bc72e6392b51a8b84f52708f7e7) + `lodash.clonedeep@4.0.2`: + Misc minor code cleanup. No functional changes. + ([@jdalton](https://github.com/jdalton)) + +### v3.6.0 (2016-01-20): + +Hi all! This is a bigger release, in part 'cause we didn't have one last +week. The most important thing you need to know is that when `npm@3.6.0` replaces +`npm@3.5.4` as `next`, `npm@3.5.4` WILL NOT be moved on to `latest`. This is due to +a packaging error that tickles bugs in some earlier releases and makes upgrades to it +from those versions break the install. + +#### NEW FEATURES‼ + +* [`ff504d4`](https://github.com/npm/npm/commit/ff504d449ea1fa996cbb02c8078964643c51e5f6) + [#8752](https://github.com/npm/npm/issues/8752) + In `npm outdated`, report symlinked packages as having a wanted & latest + version of `linked`. + ([@halhenke](https://github.com/halhenke)) +* [`f44d8c9`](https://github.com/npm/npm/commit/f44d8c9a3940f7041f8136f8754a54b13f1f9d60) + [#10775](https://github.com/npm/npm/issues/10775) + Add a success message to `adduser` / `login`. + ([@ekmartin](https://github.com/ekmartin)) +* [`3109303`](https://github.com/npm/npm/commit/310930395c9bf1577cf085b9742210bfc71bb019) + [#10043](https://github.com/npm/npm/pull/10043) + Warn if you try to use `npm run x` if you don't have a `node_modules` folder, since + whatever you're trying to do _probably_ won't work. + ([@timkrins](https://github.com/timkrins)) + +* [`9ed2849`](https://github.com/npm/npm/commit/9ed2849cd7e8cc97111dca42a940905284afe55d) + [`e9f1ad8`](https://github.com/npm/npm/commit/e9f1ad88ce58ecd111811e11afa52ac19fc8696e) + [`f10d300`](https://github.com/npm/npm/commit/f10d300e5effa7a5756c8d461eef284c283a41d1) + [`8b593d8`](https://github.com/npm/npm/commit/8b593d8d187d6ac85d2a59cbe647afb5516c1b94) + [#10717](https://github.com/npm/npm/pull/10717) + `npm version` can now take a `from-git` argument, which instructs `npm` to read the + version from git and update your `package.json` to what it finds. This is in contrast + to its normal use where `npm` _tells_ git about your new version. + ([@ekmartin](https://github.com/ekmartin)) + +#### 3.5.4 WAS NOT SO GREAT + +The `npm@3.5.4` package was missing some dependencies. Specifically, `glob` +and `has-unicode` had major release updates which meant that subdeps that +relied on older major versions couldn't use the npm supplied versions any +more, and so they needed their own copies. + +This went undetected because the actions necessary to run the tests (which +check for this sort of thing) resolved the missing modules. + +Further, it didn't have symptoms when upgrading from _most_ versions of npm. +Unfortunately, some versions had bugs that were tickled by this and resulted +in broken upgrades, most notably, `npm@3.3.12`, the version that's been in +Node.js 5. + +* [`1d3325c`](https://github.com/npm/npm/commit/1d3325c040621a4792db80fb232f4994b9d5c5f2) + [`02611c6`](https://github.com/npm/npm/commit/02611c673a4d2bbe8fcef8d48407768da31c90d2) + [`39d5fea`](https://github.com/npm/npm/commit/39d5feadefdde38d75a18f23343bc6ec37153638) + [`7d0e830`](https://github.com/npm/npm/commit/7d0e830f26c73b9d9277b29949227ba9cca27fd9) + [#11129](https://github.com/npm/npm/pull/11129) + Update the underlying dependencies to allow use for the new versions of + `glob` and `has-unicode`. + ([@iarna](https://github.com/iarna)) + +#### WHEN MISSING PATHS ARE OK + +* [`bb638fa`](https://github.com/npm/npm/commit/bb638fa4f48d24d2c9935861d5d751c5621eea49) + [#11212](https://github.com/npm/npm/pull/11212) + When trying to determine if a file was controlled by npm before going to + remove it, we check to see if it is inside any of a list of paths that npm + considers to be under its control. Not all of those paths always exist + (and that's ok!) Previously we were calling it a failure to match if ANY + of them didn't exist. We now only do so if NONE of them exist. If some + do, then we do our usual checks on them. + + This showed up as an error where you would see something like: + ``` + npm warn gentlyRm not removing /path/to/thing as it wasn't installed by /path/to/other/thing + ``` + But it totally was installed by it. + ([@iarna](https://github.com/iarna)) + +#### BETTER NODE PRE-RELEASE SUPPORT + +Historically, if you used a pre-release version of Node.js, you would get +dozens and dozens of warnings when EVERY engine check failed across all of +your modules, because `>= 0.10.0` doesn't match prereleases. + +You might find this stream of redundent warnings undesirable. I do. + +We've moved this into a SINGLE warning you'll get about using a pre-release +version of Node.js and now suppress those other warnings. + +* [`6952f79`](https://github.com/npm/npm/commit/6952f7981e451a2d599a4f513573af208bdfe103) + [#11212](https://github.com/npm/npm/pull/11212) + Engine check warnings are now issued along with any other warnings about + your tree, instead of emitting in the middle of your install (and then + disappearing behind the giant tree of stuff installed). + ([@iarna](https://github.com/iarna)) +* [`ee2ebe9`](https://github.com/npm/npm/commit/ee2ebe96fb3d105787835b72085bbd2eee66a629) + [#11212](https://github.com/npm/npm/pull/11212) + Suppress engine verification warnings about pre-release versions of Node.js. + ([@iarna](https://github.com/iarna)) +* [`135b7e0`](https://github.com/npm/npm/commit/135b7e078311e8b4e2c8e2b662eed9ba6c2e2537) + [#11212](https://github.com/npm/npm/pull/11212) + Explicitly warn, in only one place, if you are using a pre-release version + of Node.js. + ([@iarna](https://github.com/iarna)) + +#### BUG FIXES + +* [`ea331c8`](https://github.com/npm/npm/commit/ea331c82157c65f7643cd4b49fd24031c84bf601) + [#10938](https://github.com/npm/npm/issues/10938) + When removing a package, sometimes the `node_modules/.bin` wouldn't be + cleaned up entirely. This would result in package folders that contained + only a `node_modules/.bin` directory. In turn, this would result in `npm + ls` and other tools complaining about these broken directories. + To fix this, the `unbuild` step now explicitly deletes the + `node_modules/.bin` folder as its final step. + ([@chrisirhc](https://github.com/chrisirhc)) +* [`00720db`](https://github.com/npm/npm/commit/00720db2c326cf8f968c662444a4575ae8c3020a) + [#11158](https://github.com/npm/npm/pull/11158) + On Windows, the `node-gyp` wrapper would fail if your path to `node-gyp` + contained spaces. This fixes that problem by quoting use of that path. + ([@orangemocha](https://github.com/orangemocha)) +* [`69ac933`](https://github.com/npm/npm/commit/69ac9333506752bf2e5af70b3b3e03c6181de3e7) + [#11142](https://github.com/npm/npm/pull/11142) + Fix a race condition when making directories in the cache, which could + lead to `ENOENT` failures. + ([@Jimbly](https://github.com/Jimbly)) +* [`e982858`](https://github.com/npm/npm/commit/e982858d9bed65cede9cbb12df9216a4bb9e6fc9) + [#9696](https://github.com/npm/npm/issues/9696) + When replacing the `package.json` in the cache you sometimes see `EPERM` errors on + Windows that you wouldn't on Unix-like operating systems. This ignores those errors + and allows Windows to continue. Longer term, we'll be adding something to retry + these errors, but ultimately fail if there really is an ongoing permissions issue. + ([@orangemocha](https://github.com/orangemocha)) + +#### DOC CHANGES + +* [`3666081`](https://github.com/npm/npm/commit/3666081abd02184ba97a7cdb6ae238085d640b4b) + [#11188](https://github.com/npm/npm/pull/11188) + Add brief description to publish documentation of what's included in + published tarballs. + ([@beaugunderson](https://github.com/beaugunderson)) +* [`b463e34`](https://github.com/npm/npm/commit/b463e3424b296cfc4bd384fc8bfe0e2329649164) + [#11150](https://github.com/npm/npm/pull/11150) + In npm update docs, advise use of `--depth Infinity` instead of `--depth + 9999`. + ([@halhenke](https://github.com/halhenke)) +* [`382e71a`](https://github.com/npm/npm/commit/382e71a7ee5d1ca3dba55c1e753d529eb8ae6895) + [#11128](https://github.com/npm/npm/pull/11128) + In the `package.json` docs, make the reference to the "Local Paths" section + a link to it as well. + ([@orangejulius](https://github.com/orangejulius)) +* [`5277e7f`](https://github.com/npm/npm/commit/5277e7f236e8cb40d7f4a1054506f2d3d159716e) + [#11090](https://github.com/npm/npm/pull/11090) + Fix the 3.5.4 release date in CHANGELOG.md. + ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`e6d238a`](https://github.com/npm/npm/commit/e6d238a3d90beeb0af23fa75a9b5e50671d6e4c5) + [#11130](https://github.com/npm/npm/pull/11130) + Eliminate the "using npm programmatically" section from the README. The + documentation for this was removed a while ago and is unsupported. + ([@ljharb](https://github.com/ljharb)) + +#### DEPENDENCY UPDATES + +* [`b0dde5c`](https://github.com/npm/npm/commit/b0dde5c3407b58d78969d3da01af2629fcba1c73) + `config-chain@1.1.10`: Update tests for most recent version of `ini`. + ([@dominictarr](https://github.com/dominictarr)) +* [`c62f414`](https://github.com/npm/npm/commit/c62f414534971761a48ce3cbc3e25214fb09e494) + `glob@6.0.4`: Eliminated use of `util._extend`. + ([@isaacs](https://github.com/isaacs)) +* [`98a6779`](https://github.com/npm/npm/commit/98a67797978ed7ce534e16b705d3a2a9ca0e6cc1) + `lodash.clonedeep@4.0.1`: Bug fixes, including the non-linear performance + that was biting npm a while back. + ([@jdalton](https://github.com/jdalton)) +* [`0e8c4ce`](https://github.com/npm/npm/commit/0e8c4cebddaefbf5eca0abaad512db266c6722c9) + `lodash.without@4.0.1` + ([@jdalton](https://github.com/jdalton)) +* [`1fd19f5`](https://github.com/npm/npm/commit/1fd19f57a3551d7d30a6b8a9ce967ef50e0ff0ba) + `lodash.uniq@4.0.1` + ([@jdalton](https://github.com/jdalton)) +* [`b7486c5`](https://github.com/npm/npm/commit/b7486c550f3391f733d1e1907652be95fddf4368) + `lodash.union@4.0.1` + ([@jdalton](https://github.com/jdalton)) +* [`54bb591`](https://github.com/npm/npm/commit/54bb5911e18f8fb86eb94159f34b13f0c0aa2e30) + `lodash.keys@4.0.0` + ([@jdalton](https://github.com/jdalton)) +* [`26f7a7a`](https://github.com/npm/npm/commit/26f7a7aaae0575a85deba2241ee69b433dd1ba98) + `lodash.isarray@4.0.0` + ([@jdalton](https://github.com/jdalton)) +* [`ed38bd3`](https://github.com/npm/npm/commit/ed38bd3baf544dfc0630fd321d279f137700bd4d) + `lodash.isarguments@3.0.5` + ([@jdalton](https://github.com/jdalton)) + +### v3.5.4 (2016-01-07): + +I hope you all had fantastic winter holidays, if it's winter where you are +and if there are holidays‼ We went a few weeks without releases because +staff was taking time away from work here and there. A new year has come +and we're back now, and refreshed and ready to dig in! + +This week brings us a bunch of documentation improvements and some module +updates. The core team's focus continues to be on improving tests, +particularly with Windows, so there's not too much to call out here. + +#### DOCUMENTATION IMPROVEMENTS + +* [`6b0031e`](https://github.com/npm/npm/commit/6b0031e28c0b10fb2622fdadde41f5cd294348e8) + [#11044](https://github.com/npm/npm/pull/11044) + Correct documentation regarding the defaults for the `color` config option. + ([@scottaddie](https://github.com/scottaddie)) +* [`c6ce69e`](https://github.com/npm/npm/commit/c6ce69eaed7f17b5f1876ac13ecfae3d14a72f24) + [#10990](https://github.com/npm/npm/pull/10990) + Drop mentions in documentation of `process.installPrefix`, as it hasn't + been a thing since Node.js 0.6 and we don't support that. + ([@jeffmcmahan](https://github.com/jeffmcmahan)) +* [`dee92d1`](https://github.com/npm/npm/commit/dee92d1f78608a10becf57aae86d5d495f2272bd) + [#11037](https://github.com/npm/npm/pull/11037) + Clarify the documentation on the max length of the `name` property in + `package.json` files. + ([@scottaddie](https://github.com/scottaddie)) +* [`4b9d7bb`](https://github.com/npm/npm/commit/4b9d7bb1a4fc3f1edcf563379abfd2273af10881) + [#10787](https://github.com/npm/npm/pull/10787) + Make the formatting in the documentation for `npm dist-tag` more + consistent with other docs. + ([@cvrebert](https://github.com/cvrebert)) +* [`7f77a80`](https://github.com/npm/npm/commit/7f77a80d561ee4b2b8c0aba1226fe89dfe339bcd) + [#10787](https://github.com/npm/npm/pull/10787) + Add documentation to the `npm dist-tag` docs that explains in greater + detail how `latest` is different than other tags. Further, improve the + documentation with better examples. Add a discussion of common practice + for using dist tags to manage alpha's and beta's. + ([@cvrebert](https://github.com/cvrebert)) +* [`6db58dd`](https://github.com/npm/npm/commit/6db58dd0d7719c4675a239d43164edc066842b14) + [`2ee6371`](https://github.com/npm/npm/commit/2ee6371911bd3a4d566c5d7bc8734facc60cb27c) + [#10788](https://github.com/npm/npm/pull/10788) + [#10789](https://github.com/npm/npm/pull/10789) + Improve documentation cross referencing. + ([@cvrebert](https://github.com/cvrebert)) +* [`7ba629a`](https://github.com/npm/npm/commit/7ba629a2ad3eaf736529e053b533cabe3a0d7123) + [#10790](https://github.com/npm/npm/pull/10790) + Document more clearly that `npm install foo` means `npm install + foo@latest`. + ([@cvrebert](https://github.com/cvrebert)) + +#### A FEW MODULE UPDATES + +* [`fc2e8d5`](https://github.com/npm/npm/commit/fc2e8d58a91728cb06936eea686efaa4fdec3f06) + `glob@6.0.3`: Remove deprecated features and fix a bunch of bugs. + ([@isaacs](https://github.com/isaacs)) +* [`5b820c4`](https://github.com/npm/npm/commit/5b820c4e17c907fa8c23771c0cd8e74dd5fdaa51) + `has-unicode@2.0.0`: Change the default on Windows to be false, as + international Windows installs often install to non-unicode codepages and + there's no way to detect this short of a system call or a call to a + command line program. + ([@iarna](https://github.com/iarna)) +* [`238fe84`](https://github.com/npm/npm/commit/238fe84ac61297f1d71701d80368afaa40463305) + `which@1.2.1`: Fixed bugs with uid/gid checks and with quoted Windows PATH + parts. + ([@isaacs](https://github.com/isaacs)) +* [`5e510e1`](https://github.com/npm/npm/commit/5e510e13d022a22d58742b126482d3b38a14cc83) + `rimraf@2.5.0`: Add ability to disable glob support / pass in options. + ([@isaacs](https://github.com/isaacs)) +* [`7558215`](https://github.com/npm/npm/commit/755821569466b7be0883f4b0573eeb83c24109eb) + `readable-stream@2.0.5`: Minor performance improvements. + ([@calvinmetcalf](https://github.com/calvinmetcalf)) +* [`64e8499`](https://github.com/npm/npm/commit/64e84992c812a73d590be443c09a6977d0ae9040) + `fs-write-stream-atomic@1.0.8`: Rewrite to use modern streams even on 0.8 + plus a bunch of tests. + ([@iarna](https://github.com/iarna)) +* [`74d92a0`](https://github.com/npm/npm/commit/74d92a08d72ce3603244de4bb3e3706d2b928cef) + `columnify@1.5.4`: Some bug fixes around large inputs. + ([@timoxley](https://github.com/timoxley)) + +#### FIX NPM'S TESTS ON 0.8 + +This doesn't impact you as a user of npm, and ordinarily that means we +wouldn't call it out here, but if you've ever wanted to contribute, having +that green travis badge makes it a lot easier to do so with confidence! + +* [`b14cdbb`](https://github.com/npm/npm/commit/b14cdbb6002b04bfbefaff70cc45810c20d5a366) + [#10872](https://github.com/npm/npm/pull/10872) + Rewrite tests using nock to use other alternatives. + ([@zkat](https://github.com/zkat)) +* [`59ed01a`](https://github.com/npm/npm/commit/59ed01a8ea7960b1467aed52164fc36a03c77770) + [#10872](https://github.com/npm/npm/pull/10872) + Work around Node.js 0.8 http back-pressure bug. + + 0.8 http streams have a bug, where if they're paused with data in their + buffers when the socket closes, they call `end` before emptying those + buffers, which results in the entire pipeline ending and thus the point + that applied backpressure never being able to trigger a `resume`. + + We work around this by piping into a pass through stream that has + unlimited buffering. The pass through stream is from readable-stream and + is thus a current streams3 implementation that is free of these bugs even + on 0.8. + ([@iarna](https://github.com/iarna)) + +### v3.5.3 (2015-12-10): + +Did you know that Bob Ross reached the rank of master sergeant in the US Air +Force before becoming perhaps the most soothing painter of all time? + +#### TWO HAPPY LITTLE BUG FIXES + +* [`71c9590`](https://github.com/npm/npm/commit/71c9590be61b6a7b7fa8b6dc19baa588cda26a27) + [#10505](https://github.com/npm/npm/issues/10505) `npm ls --json --depth=0` + now respects the depth parameter, when it is zero and when it is not zero. + ([@MarkReeder](https://github.com/MarkReeder)) +* [`954fa67`](https://github.com/npm/npm/commit/954fa67f1ca3739992abd244e217a0aaf8465660) + [#9099](https://github.com/npm/npm/issues/9099) I had always thought you + could run `npm version` from subdirectories in your project, which is great, + because now you can. I guess I was just ahead of my time. + ([@ekmartin](https://github.com/ekmartin)) + +#### NOW PAINT IN SOME NICE DOCS CHANGES + +* [`b88c37c`](https://github.com/npm/npm/commit/b88c37c1cced40e9e41402cc54a5efc3c33cd13e) + [#10546](https://github.com/npm/npm/issues/10546) Goodbye, FAQ! You were + cheeky and fun until you weren't! Don't worry: npm still loves everyone, + especially you! ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`2d3afe9`](https://github.com/npm/npm/commit/2d3afe9644ba69681a36721e79c45d27def71939) + [#10570](https://github.com/npm/npm/issues/10570) Update documentation URLs + to be HTTPS everywhere sensible. No HTTP shall be spared! + ([@rsp](https://github.com/rsp)) +* [`6abd0e0`](https://github.com/npm/npm/commit/6abd0e0626d0f642ce0dae0e128ced80433f15a1) + [#10650](https://github.com/npm/npm/issues/10650) Correctly note that there + are two lifecycle scripts run by an install phase in an example, instead of + three. ([@eymengunay](https://github.com/eymengunay)) +* [`a5e8df5`](https://github.com/npm/npm/commit/a5e8df53b8d6d75398cb6a55a44dcf374b0f1661) + [#10687](https://github.com/npm/npm/issues/10687) `npm outdated`'s output can + be a little puzzling sometimes. I've attempted to make it clearer, with some + examples, of what's going on with "wanted" and "latest" in more cases. + ([@othiym23](https://github.com/othiym23)) +* [`8f52833`](https://github.com/npm/npm/commit/8f52833f5d15c4f94467234607d40e75198af1aa) + [#10700](https://github.com/npm/npm/issues/10700) Hey, do you remember when + `search.npmjs.org` was a thing? I think I do? The last time I used it was in + like 2012, and it's gone now, so remove it from the docs. + ([@gagern](https://github.com/gagern)) +* [`b6a53b8`](https://github.com/npm/npm/commit/b6a53b889c948053dcbf6d7aab9ad1cd4226dc32) + [npm/docs#477](https://github.com/npm/docs/issues/477) Continue to airbrush + the CLI API docs out of history. ([@verpixelt](https://github.com/verpixelt)) +* [`b835b72`](https://github.com/npm/npm/commit/b835b72d1dd23b0a17321a85d8d395322d18005d) + `semver@5.1.0`: Include BNF for SemVer expression grammar (which is also now + included in `npm help semver`). ([@isaacs](https://github.com/isaacs)) + +#### LAND YOUR DEPENDENCY UPGRADES IN PAIRS SO EVERYONE HAS A FRIEND + +* [`95e99fa`](https://github.com/npm/npm/commit/95e99faadcdc85a16210dd79c0e7d83add1b9f3e) + `request@2.67.0` ([@simov](https://github.com/simov)) +* [`b49199a`](https://github.com/npm/npm/commit/b49199ac96dfb1afe5719286621a318576dd69ae) + [isaacs/rimraf#89](https://github.com/isaacs/rimraf/pull/89) `rimraf@2.4.4` + ([@zerok](https://github.com/zerok)) +* [`6632418`](https://github.com/npm/npm/commit/66324189a734a1665e1b78a06ba44089d9c3a11c) + [npm/nopt#51](https://github.com/npm/nopt/pull/51) `nopt@3.0.6` + ([@wbecker](https://github.com/wbecker)) +* [`f0a3b3e`](https://github.com/npm/npm/commit/f0a3b3e0dbbdaf11ec55dccd59cc21bfa05f9240) + [isaacs/once#7](https://github.com/isaacs/once/pull/7) `once@1.3.3` + ([@floatdrop](https://github.com/floatdrop)) + +### v3.5.2 (2015-12-03): + +Weeeelcome to another npm release! The short version is that we fixed +some `ENOENT` and some modules that resulted in modules going missing. We +also eliminated the use of MD5 in our code base to help folks using +Node.js in FIPS mode. And we fixed a bad URL in our license file. + +#### FIX URL IN LICENSE + +The license incorrectly identified the registry URL as +`registry.npmjs.com` and this has been corrected to `registry.npmjs.org`. + +* [`cb6d81b`](https://github.com/npm/npm/commit/cb6d81bd611f68c6126a90127a9dfe5604d46c8c) + [#10685](https://github.com/npm/npm/pull/10685) + Fix npm public registry URL in notices. + ([@kemitchell](https://github.com/kemitchell)) + +#### ENOENT? MORE LIKE ENOMOREBUGS + +The headliner this week was uncovered by the fixes to bundled dependency +handling over the past few releases. What had been a frustratingly +intermittent and hard to reproduce bug became something that happened +every time in Travis. This fixes another whole bunch of errors where you +would, while running an install have it crash with an `ENOENT` on +`rename`, or the install would finish but some modules would be +mysteriously missing and you'd have to install a second time. + +What's going on was a bit involved, so bear with me: + +`npm@3` generates a list of actions to take against the tree on disk. +With the exception of lifecycle scripts, it expects these all to be able +to act independently without interfering with each other. + +This means, for instance, that one should be able to upgrade `b` in +`a→b→c` without having npm reinstall `c`. + +That works fine by the way. + +But it also means that the move action should be able to move `b` in +`a→b→c@1.0.1` to `a→d→b→c@1.0.2` without moving or removing `c@1.0.1` and +while leaving `c@1.0.2` in place if it was already installed. + +That is, the `move` action moves an individual node, replacing itself +with an empty spot if it had children. This is not, as it might first +appear, something where you move an entire branch to another location on +the tree. + +When moving `b` we already took care to leave `c@1.0.1` in place so that +other moves (or removes) could handle it, but we were stomping on the +destination and so `c@1.0.2` was being removed. + +* [`f4385d8`](https://github.com/npm/npm/commit/f4385d8e7678349e75c80fae8a1f8f366f197937) + [#10655](https://github.com/npm/npm/pull/10655) + Preserve destination `node_modules` when moving. + ([@iarna](https://github.com/iarna)) + +There was also a bug with `remove` where it was pruning the entire tree +at the remove point, prior to running moves and adds. + +This was fine most of the time, but if we were moving one of the deps out +from inside it, kaboom. + +* [`19c626d`](https://github.com/npm/npm/commit/19c626d69888f0cdc6e960254b3fdf523ec4b52c) + [#10655](https://github.com/npm/npm/pull/10655) + Get rid of the remove commit phase– we could have it prune _just_ the + module being removed, but that isn't gaining us anything. + ([@iarna](https://github.com/iarna)) + +After all that, we shouldn't be upgrading the `add` of a bundled package +to a `move`. Moves save us from having to extract the package, but with a +bundled dependency it's included in another package already so that +doesn't gain us anything. + +* [`641a93b`](https://github.com/npm/npm/commit/641a93bd66a6aa4edf2d6167344b50d1a2afb593) + [#10655](https://github.com/npm/npm/pull/10655) + Don't convert adds to moves with bundled deps. + ([@iarna](https://github.com/iarna)) + +While I was in there, I also took some time to improve diagnostics to +make this sort of thing easier to track down in the future: + +* [`a04ec04`](https://github.com/npm/npm/commit/a04ec04804e562b511cd31afe89c8ba94aa37ff2) + [#10655](https://github.com/npm/ npm/pull/10655) + Wrap rename so errors have stack traces. + ([@iarna](https://github.com/iarna)) +* [`8ea142f`](https://github.com/npm/npm/commit/8ea142f896a2764290ca5472442b27b047ab7a1a) + [#10655](https://github.com/npm/npm/pull/10655) + Add silly logging so function is debuggable + ([@iarna](https://github.com/iarna)) + +#### NO MORE MD5 + +We updated modules that had been using MD5 for non-security purposes. +While this is perfectly safe, if you compile Node in FIPS-compliance mode +it will explode if you try to use MD5. We've replaced MD5 with Murmur, +which conveys our intent better and is faster to boot. + +* [`f068b26`](https://github.com/npm/npm/commit/f068b2661a8d0269c184867e003cd08cb6c56cf2) + [#10629](https://github.com/npm/npm/issues/10629) + `unique-filename@1.1.0` + ([@iarna](https://github.com/iarna)) +* [`dba1b24`](https://github.com/npm/npm/commit/dba1b2402aaa2beceec798d3bd22d00650e01069) + [#10629](https://github.com/npm/npm/issues/10629) + `write-file-atomic@1.1.4` + ([@othiym23](https://github.com/othiym23)) +* [`8347a30`](https://github.com/npm/npm/commit/8347a308ef0d2cf0f58f96bba3635af642ec611f) + [#10629](https://github.com/npm/npm/issues/10629) + `fs-write-stream-atomic@1.0.5` + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`9e2a2bb`](https://github.com/npm/npm/commit/9e2a2bb5bc71a0ab3b3637e8eec212aa22d5c99f) + [nodejs/node-gyp#831](https://github.com/nodejs/node-gyp/pull/831) + `node-gyp@3.2.1`: + Improved \*BSD support. + ([@bnoordhuis](https://github.com/bnoordhuis)) + +### v3.5.1 (2015-11-25): + +#### THE npm CLI !== THE npm REGISTRY !== npm, INC. + +npm-the-CLI is licensed under the terms of the [Artistic License +2.0](https://github.com/npm/npm/blob/8d79c1a39dae908f27eaa37ff6b23515d505ef29/LICENSE), +which is a liberal open-source license that allows you to take this code and do +pretty much whatever you like with it (that is, of course, not legal language, +and if you're doing anything with npm that leaves you in doubt about your legal +rights, please seek the review of qualified counsel, which is to say, not +members of the CLI team, none of whom have passed the bar, to my knowledge). At +the same time the primary registry the CLI uses when looking up and downloading +packages is a commercial service run by npm, Inc., and it has its own [Terms of +Use](https://www.npmjs.com/policies/terms). + +Aside from clarifying the terms of use (and trying to make sure they're more +widely known), the only recent changes to npm's licenses have been making the +split between the CLI and registry clearer. You are still free to do whatever +you like with the CLI's source, and you are free to view, download, and publish +packages to and from `registry.npmjs.org`, but now the existing terms under +which you can do so are more clearly documented. Aside from the two commits +below, see also [the release notes for +`npm@3.4.1`](https://github.com/npm/npm/releases/tag/v3.4.1), which is where +the split between the CLI's code and the terms of use for the registry was +first made more clear. + +* [`35a5dd5`](https://github.com/npm/npm/commit/35a5dd5abbfeec4f98a2b4534ec4ef5d16760581) + [#10532](https://github.com/npm/npm/issues/10532) Clarify that + `registry.npmjs.org` is the default, but that you're free to use the npm CLI + with whatever registry you wish. ([@kemitchell](https://github.com/kemitchell)) +* [`fa6b013`](https://github.com/npm/npm/commit/fa6b0136a0e4a19d8979b2013622e5ff3f0446f8) + [#10532](https://github.com/npm/npm/issues/10532) Having semi-duplicate + release information in `README.md` was confusing and potentially inaccurate, + so remove it. ([@kemitchell](https://github.com/kemitchell)) + +#### EASE UP ON WINDOWS BASH USERS + +It turns out that a fair number of us use bash on Windows (through MINGW or +bundled with Git, plz – Cygwin is still a bridge too far, for both npm and +Node.js). [@jakub-g](https://github.com/jakub-g) did us all a favor and relaxed +the check for npm completion to support MINGW bash. Thanks, Jakub! + +* [`09498e4`](https://github.com/npm/npm/commit/09498e45c5c9e683f092ab1372670f81db4762b6) + [#10156](https://github.com/npm/npm/issues/10156) completion: enable on + Windows in git bash ([@jakub-g](https://github.com/jakub-g)) + +#### THE ONGOING SAGA OF BUNDLED DEPENDENCIES + +`npm@3.5.0` fixed up a serious issue with how `npm@3.4.1` (and potentially +`npm@3.4.0` and `npm@3.3.12`) handled the case in which dependencies bundled +into a package tarball are handled improperly when one or more of their own +dependencies are older than what's latest on the registry. Unfortunately, in +fixing that (quite severe) regression (see [`npm@3.5.0`'s release notes' for +details](https://github.com/npm/npm/releases/tag/v3.5.0)), we introduced a new +(small, and fortunately cosmetic) issue where npm superfluously warns you about +bundled dependencies being stale. We have now fixed that, and hope that we +haven't introduced any _other_ regressions in the process. :D + +* [`20824a7`](https://github.com/npm/npm/commit/20824a75bf7639fb0951a588e3c017a370ae6ec2) + [#10501](https://github.com/npm/npm/issues/10501) Only warn about replacing + bundled dependencies when actually doing so. ([@iarna](https://github.com/iarna)) + +#### MAKE NODE-GYP A LITTLE BLUER + +* [`1d14d88`](https://github.com/npm/npm/commit/1d14d882c3b5af0a7fee46e8e0e343d07e4c38cb) + `node-gyp@3.2.0`: Support AIX, use `which` to find Python, updated to a newer + version of `gyp`, and more! ([@bnoordhuis](https://github.com/bnoordhuis)) + +#### A BOUNTEOUS THANKSGIVING CORNUCOPIA OF DOC TWEAKS + +These are great! Keep them coming! Sorry for letting them pile up so deep, +everybody. Also, a belated Thanksgiving to our Canadian friends, and a happy +Thanksgiving to all our friends in the USA. + +* [`4659f1c`](https://github.com/npm/npm/commit/4659f1c5ad617c46a5e89b48abf0b1c4e6f04307) + [#10244](https://github.com/npm/npm/issues/10244) In `npm@3`, `npm dedupe` + doesn't take any arguments, so update documentation to reflect that. + ([@bengotow](https://github.com/bengotow)) +* [`625a7ee`](https://github.com/npm/npm/commit/625a7ee6b4391e90cb28a95f20a73fd794e1eebe) + [#10250](https://github.com/npm/npm/issues/10250) Correct order of `org:team` + in `npm team` documentation. ([@louislarry](https://github.com/louislarry)) +* [`bea7f87`](https://github.com/npm/npm/commit/bea7f87399d784e3a6d3393afcca658a61a40d77) + [#10371](https://github.com/npm/npm/issues/10371) Remove broken / duplicate + link to tag. ([@WickyNilliams](https://github.com/WickyNilliams)) +* [`0a25e29`](https://github.com/npm/npm/commit/0a25e2956e9ddd4065d6bd929559321afc512fde) + [#10419](https://github.com/npm/npm/issues/10419) Remove references to + nonexistent `npm-rm(1)` documentation. ([@KenanY](https://github.com/KenanY)) +* [`19b94e1`](https://github.com/npm/npm/commit/19b94e1e6781fe2f98ada0a3f49a1bda25e3e32d) + [#10474](https://github.com/npm/npm/issues/10474) Clarify that install finds + dependencies in `package.json`. ([@sleekweasel](https://github.com/sleekweasel)) +* [`b25efc8`](https://github.com/npm/npm/commit/b25efc88067c843ffdda86ea0f50f95d136a638e) + [#9948](https://github.com/npm/npm/issues/9948) Encourage users to file an + issue, rather than emailing authors. ([@trodrigues](https://github.com/trodrigues)) +* [`24f4ced`](https://github.com/npm/npm/commit/24f4cedc83b10061f26362bf2f005ab935e0cbfe) + [#10497](https://github.com/npm/npm/issues/10497) Clarify what a package is + slightly. ([@aredridel](https://github.com/aredridel)) +* [`e8168d4`](https://github.com/npm/npm/commit/e8168d40caae00b2914ea09dbe4bd1b09ba3dcd5) + [#10539](https://github.com/npm/npm/issues/10539) Remove an extra, spuriously + capitalized letter. ([@alexlukin-softgrad](https://github.com/alexlukin-softgrad)) + +### v3.5.0 (2015-11-19): + +#### TEEN ORCS AT THE GATES + +This week heralds the general release of the primary npm registry's [new +support for private packages for +organizations](http://blog.npmjs.org/post/133542170540/private-packages-for-organizations). +For many potential users, it's the missing piece needed to make it easy for you +to move your organization's private work onto npm. And now it's here! The +functionality to support it has been in place in the CLI for a while now, +thanks to [@zkat](https://github.com/zkat)'s hard work. + +During our final testing before the release, our ace support team member +[@snopeks](https://github.com/snopeks) noticed that there had been some drift +between the CLI team's implementation and what npm was actually preparing to +ship. In the interests of everyone having a smooth experience with this +_extremely useful_ new feature, we quickly made a few changes to square up the +CLI and the web site experiences. + +* [`d7fb92d`](https://github.com/npm/npm/commit/d7fb92d1c53ba5196ad6dd2101a06792a4c0412b) + [#9327](https://github.com/npm/npm/issues/9327) `npm access` no longer has + problems when run in a directory that doesn't contain a `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`17df3b5`](https://github.com/npm/npm/commit/17df3b5d5dffb2e9c223b9cfa2d5fd78c39492a4) + [npm/npm-registry-client#126](https://github.com/npm/npm-registry-client/issues/126) + `npm-registry-client@7.0.8`: Allow the CLI to grant, revoke, and list + permissions on unscoped (public) packages on the primary registry. + ([@othiym23](https://github.com/othiym23)) + +#### NON-OPTIONAL INSTALLS, DEFINITELY NON-OPTIONAL + +* [`180263b`](https://github.com/npm/npm/commit/180263b) + [#10465](https://github.com/npm/npm/pull/10465) + When a non-optional dep fails, we check to see if it's only required by + ONLY optional dependencies. If it is, we make it fail all the deps in + that chain (and roll them back). If it isn't then we give an error. + + We do this by walking up through all of our ancestors until we either hit an + optional dependency or the top of the tree. If we hit the top, we know to + give the error. + + If you installed a module by hand but didn't `--save` it, your module + won't have the top of the tree as an anscestor and so this code was + failing to abort the install with an error + + This updates the logic so that hitting the top OR a module that was + requested by the user will trigger the error message. + ([@iarna](https://github.com/iarna)) + +* [`b726a0e`](https://github.com/npm/npm/commit/b726a0e) + [#9204](https://github.com/npm/npm/issues/9204) + Ideally we would like warnings about your install to come AFTER the + output from your compile steps or the giant tree of installed modules. + + To that end, we've moved warnings about failed optional deps to the show + after your install completes. + ([@iarna](https://github.com/iarna)) + +#### OVERRIDING BUNDLING + +* [`aed71fb`](https://github.com/npm/npm/commit/aed71fb) + [#10482](https://github.com/npm/npm/issues/10482) + We've been in our bundled modules code a lot lately, and our last go at + this introduced a new bug, where if you had a module `a` that bundled + a module `b`, which in turn required `c`, and the version of `c` that + got bundled wasn't compatible with `b`'s `package.json`, we would then + install a compatible version of `c`, but also erase `b` at the same time. + + This fixes that. It also reworks our bundled module support to be much + closer to being in line with how we handle non-bundled modules and we're + hopeful this will reduce any future errors around them. The new structure + is hopefully much easier to reason about anyway. + ([@iarna](https://github.com/iarna)) + +#### A BRIEF NOTE ON NPM'S BACKWARDS COMPATIBILITY + +We don't often have much to say about the changes we make to our internal +testing and tooling, but I'm going to take this opportunity to reiterate that +npm tries hard to maintain compatibility with a wide variety of Node versions. +As this change shows, we want to ensure that npm works the same across: + +* Node.js 0.8 +* Node.js 0.10 +* Node.js 0.12 +* the latest io.js release +* Node.js 4 LTS +* Node.js 5 + +Contributors who send us pull requests often notice that it's very rare that +our tests pass across all of those versions (ironically, almost entirely due to +the packages we use for testing instead of any issues within npm itself). We're +currently beginning an effort, lasting the rest of 2015, to clean up our test +suite, and not only get it passing on all of the above versions of Node.js, but +working solidly on Windows as well. This is a compounding form of technical +debt that we're finally paying down, and our hope is that cleaning up the tests +will produce a more robust CLI that's a lot easier to write patches for. + +* [`791ec6b`](https://github.com/npm/npm/commit/791ec6b1bac0d1df59f5ebb4ccd16a29a5dc73f0) + [#10233](https://github.com/npm/npm/issues/10233) Update Node.js versions + that Travis uses to test npm. ([@iarna](https://github.com/iarna)) + +#### 0.8 + npm <1.4 COMPATIBLE? SURE WHY NOT + +Hey, you found the feature we added! + +* [`231c58a`](https://github.com/npm/npm/commit/231c58a) + [#10337](https://github.com/npm/npm/pull/10337) + Add two new flags, first `--legacy-bundling` which installs your + dependencies such that if you bundle those dependencies, npm versions + prior to `1.4` can still install them. This eliminates all automatic + deduping. + + Second, `--global-style` which will install modules in your `node_modules` + folder with the same layout as global modules. Only your direct + dependencies will show in `node_modules` and everything they depend on + will be flattened in their `node_modules` folders. This obviously will + elminate some deduping. + ([@iarna](https://github.com/iarna)) + +#### TYPOS IN THE LICENSE, OH MY + +* [`8d79c1a`](https://github.com/npm/npm/commit/8d79c1a39dae908f27eaa37ff6b23515d505ef29) + [#10478](https://github.com/npm/npm/issues/10478) Correct two typos in npm's + LICENSE. ([@jorrit](https://github.com/jorrit)) + +### v3.4.1 (2015-11-12): + +#### ASK FOR NOTHING, GET LATEST + +When you run `npm install foo`, you probably expect that you'll get the +`latest` version of `foo`, whatever that is. And good news! That's what +this change makes it do. + +We _think_ this is what everyone wants, but if this causes problems for +you, we want to know! If it proves problematic for people we will consider +reverting it (preferrably before this becomes `npm@latest`). + +Previously, when you ran `npm install foo` we would act as if you typed +`npm install foo@*`. Now, like any range-type specifier, in addition to +matching the range, it would also have to be `<=` the value of the +`latest` dist-tag. Further, it would exclude prerelease versions from the +list of versions considered for a match. + +This worked as expected most of the time, unless your `latest` was a +prerelease version, in which case that version wouldn't be used, to +everyone's surprise. Worse, if all your versions were prerelease versions +it would just refuse to install anything. (We fixed that in +[`npm@3.2.2`](https://github.com/npm/npm/releases/tag/v3.2.2) with +[`e4a38080`](https://github.com/npm/npm/commit/e4a38080).) + +* [`1e834c2`](https://github.com/npm/npm/commit/1e834c2) + [#10189](https://github.com/npm/npm/issues/10189) + `npm-package-arg@4.1.0` Change the default version from `*` to `latest`. + ([@zkat](https://github.com/zkat)) + +#### BUGS + +* [`bec4a84`](https://github.com/npm/npm/commit/bec4a84) + [#10338](https://github.com/npm/npm/pull/10338) + Failed installs could result in more rollback (removal of just installed + packages) than we intended. This bug was first introduced by + [`83975520`](https://github.com/npm/npm/commit/83975520). + ([@iarna](https://github.com/iarna)) +* [`06c732f`](https://github.com/npm/npm/commit/06c732f) + [#10338](https://github.com/npm/npm/pull/10338) + Updating a module could result in the module stealing some of its + dependencies from the top level, potentially breaking other modules or + resulting in many redundent installations. This bug was first introduced + by [`971fd47a`](https://github.com/npm/npm/commit/971fd47a). + ([@iarna](https://github.com/iarna)) +* [`5653366`](https://github.com/npm/npm/commit/5653366) + [#9980](https://github.com/npm/npm/issues/9980) + npm, when removing a module, would refuse to remove the symlinked + binaries if the module itself was symlinked as well. npm goes to some + effort to ensure that it doesn't remove things that aren't is, and this + code was being too conservative. This code has been rewritten to be + easier to follow and to be unit-testable. + ([@iarna](https://github.com/iarna)) + +#### LICENSE CLARIFICATION + +* [`80acf20`](https://github.com/npm/npm/commit/80acf20) + [#10326](https://github.com/npm/npm/pull/10326) + Update npm's licensing to more completely cover all of the various + things that are npm. + ([@kemitchell](https://github.com/kemitchell)) + +#### CLOSER TO GREEN TRAVIS + +* [`fc12da9`](https://github.com/npm/npm/commit/fc12da9) + [#10232](https://github.com/npm/npm/pull/10232) + `nock@1.9.0` + Downgrade nock to a version that doesn't depend on streams2 in core so + that more of our tests can pass in 0.8. + ([@iarna](https://github.com/iarna)) + +### v3.4.0 (2015-11-05): + +#### A NEW FEATURE + +This was a group effort, with [@isaacs](https://github.com/isaacs) +dropping the implementation in back in August. Then, a few days ago, +[@ashleygwilliams](https://github.com/ashleygwilliams) wrote up docs and +just today [@othiym23](https://github.com/othiym23) wrote a test. + +It's a handy shortcut to update a dependency and then make sure tests +still pass. + +This new command: + +``` +npm install-test x +``` + +is the equivalent of running: + +``` +npm install x && npm test +``` + +* [`1ac3e08`](https://github.com/npm/npm/commit/1ac3e08) + [`bcb04f6`](https://github.com/npm/npm/commit/bcb04f6) + [`b6c17dd`](https://github.com/npm/npm/commit/b6c17dd) + [#9443](https://github.com/npm/npm/pull/9443) + Add `npm install-test` command, alias `npm it`. + ([@isaacs](https://github.com/isaacs), + [@ashleygwilliams](https://github.com/ashleygwilliams), + [@othiym23](https://github.com/othiym23)) + +#### BUG FIXES VIA DEPENDENCY UPDATES + +* [`31c0080`](https://github.com/npm/npm/commit/31c0080) + [#8640](https://github.com/npm/npm/issues/8640) + [npm/normalize-package-data#69](https://github.com/npm/normalize-package-data/pull/69) + `normalize-package-data@2.3.5`: + Fix a bug where if you didn't specify the name of a scoped module's + binary, it would install it such that it was impossible to call it. + ([@iarna](https://github.com/iarna)) +* [`02b37bc`](https://github.com/npm/npm/commit/02b37bc) + [npm/fstream-npm#14](https://github.com/npm/fstream-npm/pull/14) + `fstream-npm@1.0.7`: + Only filter `config.gypi` when it's in the build directory. + ([@mscdex](https://github.com/mscdex)) +* [`accb9d2`](https://github.com/npm/npm/commit/accb9d2) + [npm/fstream-npm#15](https://github.com/npm/fstream-npm/pull/15) + `fstream-npm@1.0.6`: + Stop including directories that happened to have names matching whitelisted + npm files in npm module tarballs. The most common cause was that if you had + a README directory then everything in it would be included if wanted it + or not. + ([@taion](https://github.com/taion)) + +#### DOCUMENTATION FIXES + +* [`7cf6366`](https://github.com/npm/npm/commit/7cf6366) + [#10036](https://github.com/npm/npm/pull/10036) + Fix typo / over-abbreviation. + ([@ifdattic](https://github.com/ifdattic)) +* [`d0ad8f4`](https://github.com/npm/npm/commit/d0ad8f4) + [#10176](https://github.com/npm/npm/pull/10176) + Fix broken link, scopes => scope. + ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`d623783`](https://github.com/npm/npm/commit/d623783) + [#9460](https://github.com/npm/npm/issue/9460) + Specifying the default command run by "npm start" and the + fact that you can pass it arguments. + ([@JuanCaicedo](https://github.com/JuanCaicedo)) + +#### DEPENDENCY UPDATES FOR THEIR OWN SAKE + +* [`0a4c29e`](https://github.com/npm/npm/commit/0a4c29e) + [npm/npmlog#19](https://github.com/npm/npmlog/pull/19) + `npmlog@2.0.0`: Make it possible to emit log messages with `error` as the + prefix. + ([@bengl](https://github.com/bengl)) +* [`9463ce9`](https://github.com/npm/npm/commit/9463ce9) + `read-package-json@2.0.2`: + Minor cleanups. + ([@KenanY](https://github.com/KenanY)) + +### v3.3.12 (2015-11-02): + +Hi, a little hot-fix release for a bug introduced in 3.3.11. The ENOENT fix +last week ([`f0e2088`](https://github.com/npm/npm/commit/f0e2088)) broke +upgrades of modules that have bundled dependencies (like `npm`, augh!) + +* [`aedf7cf`](https://github.com/npm/npm/commit/aedf7cf) + [#10192](//github.com/npm/npm/pull/10192) + If a bundled module is going to be replacing a module that's currently on + disk (for instance, when you upgrade a module that includes bundled + dependencies) we want to select the version from the bundle in preference + over the one that was there previously. + ([@iarna](https://github.com/iarna)) + +### v3.3.11 (2015-10-29): + +This is a dependency update week, so that means no PRs from our lovely +users. Look for those next week. As it happens, the dependencies updated +were just devdeps, so nothing for you all to worry about. + +But the bug fixes, oh geez, I tracked down some really long standing stuff +this week!! The headliner is those intermittent `ENOENT` errors that no one +could reproduce consistently? I think they're nailed! But also pretty +important, the bug where `hapi` would install w/ a dep missing? Squashed! + +#### EEEEEEENOENT + +* [`f0e2088`](https://github.com/npm/npm/commit/f0e2088) + [#10026](https://github.com/npm/npm/issues/10026) + Eliminate some, if not many, of the `ENOENT` errors `npm@3` has seen over + the past few months. This was happening when npm would, in its own mind, + correct a bundled dependency, due to a `package.json` specifying an + incompatible version. Then, when npm extracted the bundled version, what + was on disk didn't match its mind and… well, when it tried to act on what + was in its mind, we got an `ENOENT` because it didn't actually exist on + disk. + ([@iarna](https://github.com/iarna)) + +#### PARTIAL SHRINKWRAPS, NO LONGER A BAD DAY + +* [`712fd9c`](https://github.com/npm/npm/commit/712fd9c) + [#10153](https://github.com/npm/npm/pull/10153) + Imagine that you have a module, let's call it `fun-time`, and it depends + on two dependencies, `need-fun@1` and `need-time`. Further, `need-time` + requires `need-fun@2`. So after install the logical tree will look like + this: + + ``` + fun-time + ├── need-fun@1 + └── need-time + └── need-fun@2 + ``` + + Now, the `fun-time` author also distributes a shrinkwrap, but it only includes + the `need-fun@1` in it. + + Resolving dependencies would look something like this: + + 1. Require `need-fun@1`: Use version from shrinkwrap (ignoring version) + 2. Require `need-time`: User version in package.json + 1. Require `need-fun@2`: Use version from shrinkwrap, which oh hey, is + already installed at the top level, so no further action is needed. + + Which results in this tree: + + ``` + fun-time + ├── need-fun@1 + └── need-time + ``` + + We're ignoring the version check on things specified in the shrinkwrap + so that you can override the version that will be installed. This is + because you may want to use a different version than is specified + by your dependencies' dependencies' `package.json` files. + + To fix this, we now only allow overrides of a dependency version when + that dependency is a child (in the tree) of the thing that requires it. + This means that when we're looking for `need-fun@2` we'll see `need-fun@1` + and reject it because, although it's from a shrinkwrap, it's parent is + `fun-time` and the package doing the requiring is `need-time`. + + ([@iarna](https://github.com/iarna)) + +#### STRING `package.bin` AND NON-NPMJS REGISTRIES + +* [`3de1463`](https://github.com/npm/npm/commit/3de1463) + [#9187](https://github.com/npm/npm/issues/9187) + If you were using a module with the `bin` field in your `package.json` set + to a string on a non-npmjs registry then npm would crash, due to the our + expectation that the `bin` field would be an object. We now pass all + `package.json` data through a routine that normalizes the format, + including the `bin` field. (This is the same routine that your + `package.json` is passed through when read off of disk or sent to the + registry for publication.) Doing this also ensures that older modules on + npm's own registry will be treated exactly the same as new ones. (In the + past we weren't always super careful about scrubbing `package.json` data + on publish. And even when we were, those rules have subtly changed over + time.) + ([@iarna](https://github.com/iarna)) + +### v3.3.10 (2015-10-22): + +Hey you all! Welcome to a busy bug fix and PR week. We've got changes +to how `npm install` replaces dependencies during updates, improvements +to shrinkwrap behavior, and all sorts of doc updates. + +In other news, `npm@3` landed in node master in preparation for `node@5` +with [`41923c0`](https://github.com/nodejs/node/commit/41923c0). + +#### UPDATED DEPS NOW MAKE MORE SENSE + +* [`971fd47`](https://github.com/npm/npm/commit/971fd47) + [#9929](https://github.com/npm/npm/pull/9929) + Make the tree more consistent by doing updates in place. This means + that trees after a dependency version update will more often look + the same as after a fresh install. + ([@iarna](https://github.com/iarna)) + +#### SHRINKWRAP + DEV DEPS NOW RESPECTED + +* [`eb28a8c`](https://github.com/npm/npm/commit/eb28a8c) + [#9647](https://github.com/npm/npm/issues/9647) + If a shrinkwrap already has dev deps, don't throw them away when + someone later runs `npm install --save`. + ([@iarna](https://github.com/iarna)) + +#### FANTASTIC DOCUMENTATION UPDATES + +* [`291162c`](https://github.com/npm/npm/commit/291162c) + [#10021](https://github.com/npm/npm/pull/10021) + Improve wording in the FAQ to be more empathetic and less jokey. + ([@TaMe3971](https://github.com/TaMe3971)) +* [`9a28c54`](https://github.com/npm/npm/commit/9a28c54) + [#10020](https://github.com/npm/npm/pull/10020) + Document the command to see the list of config defaults in the section + on config defaults. + ([@lady3bean](https://github.com/lady3bean)) +* [`8770b0a`](https://github.com/npm/npm/commit/8770b0a) + [#7600](https://github.com/npm/npm/issues/7600) + Add shortcuts to all command documentation. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`e9b7d0d`](https://github.com/npm/npm/commit/e9b7d0d) + [#9950](https://github.com/npm/npm/pull/9950) + On errors that can be caused by outdated node & npm, suggest updating + as a part of the error message. + ([@ForbesLindesay](https://github.com/ForbesLindesay)) + +#### NEW STANDARD HAS ALWAYS BEEN STANDARD + +* [`40c1b0f`](https://github.com/npm/npm/commit/40c1b0f) + [#9954](https://github.com/npm/npm/pull/9954) + Update to `standard@5` and reformat the source to work with it. + ([@cbas](https://github.com/cbas)) + +### v3.3.9 (2015-10-15): + +This week sees a few small changes ready to land: + +#### TRAVIS NODE 0.8 BUILDS REJOICE + +* [`25a234b`](https://github.com/npm/npm/commit/25a234b) + [#9668](https://github.com/npm/npm/issues/9668) + Install `npm@3`'s bundled dependencies with `npm@2`, so that the ancient npm + that ships with node 0.8 can install `npm@3` directly. + ([@othiym23](https://github.com/othiym23)) + +#### SMALL ERROR MESSAGE IMPROVEMENT + +* [`a332f61`](https://github.com/npm/npm/commit/a332f61) + [#9927](https://github.com/npm/npm/pull/9927) + Update error messages where we report a list of versions that you could + have installed to show this as a comma separated list instead of as JSON. + ([@iarna](https://github.com/iarna)) + +#### DEPENDENCY UPDATES + +* [`4cd74b0`](https://github.com/npm/npm/commit/4cd74b0) + `nock@2.15.0` + ([@pgte](https://github.com/pgte)) +* [`9360976`](https://github.com/npm/npm/commit/9360976) + `tap@2.1.1` + ([@isaacs](https://github.com/isaacs)) +* [`1ead0a4`](https://github.com/npm/npm/commit/1ead0a4) + `which@1.2.0` + ([@isaacs](https://github.com/isaacs)) +* [`759f88a`](https://github.com/npm/npm/commit/759f88a) + `has-unicode@1.0.1` + ([@iarna](https://github.com/iarna)) + +### v3.3.8 (2015-10-12): + +This is a small update release, we're reverting +[`22a3af0`](https://github.com/npm/npm/commit/22a3af0) from last week's +release, as it is resulting in crashes. We'll revisit this PR during this +week. + +* [`ddde1d5`](https://github.com/npm/npm/commit/ddde1d5) + Revert "lifecycle: Swap out custom logic with add-to-path module" + ([@iarna](https://github.com/iarna)) + +### v3.3.7 (2015-10-08): + +So, as Kat mentioned in last week's 2.x release, we're now swapping weeks +between accepting PRs and doing dependency updates, in an effort to keep +release management work from taking over our lives. This week is a PR week, +so we've got a bunch of goodies for you. + +Relatedly, this week means 3.3.6 is now `latest` and it is WAY faster than +previous 3.x releases. Give it or this a look! + +#### OPTIONAL DEPS, MORE OPTIONAL + +* [`2289234`](https://github.com/npm/npm/commit/2289234) + [#9643](https://github.com/npm/npm/issues/9643) + [#9664](https://github.com/npm/npm/issues/9664) + `npm@3` was triggering `npm@2`'s build mechanics when it was linking bin files + into the tree. This was originally intended to trigger rebuilds of + bundled modules, but `npm@3`'s flat module structure confused it. This + caused two seemingly unrelated issues. First, failing optional + dependencies could under some circumstances (if they were built during + this phase) trigger a full build failure. And second, rebuilds were being + triggered of already installed modules, again, in some circumstances. + Both of these are fixed by disabling the `npm@2` mechanics and adding a + special rebuild phase for the initial installation of bundled modules. + ([@iarna](https://github.com/iarna)) + +#### BAD NAME, NO CRASH + +* [`b78fec9`](https://github.com/npm/npm/commit/b78fec9) + [#9766](https://github.com/npm/npm/issues/9766) + Refactor all attempts to read the module name or package name to go via a + single function, with appropriate guards unusual circumstances where they + aren't where we expect them. This ultimately will ensure we don't see any + more recurrences of the `localeCompare` error and related crashers. + ([@iarna](https://github.com/iarna)) + +#### MISCELLANEOUS BUG FIXES + +* [`22a3af0`](https://github.com/npm/npm/commit/22a3af0) + [#9553](https://github.com/npm/npm/pull/9553) + Factor the lifecycle code to manage paths out into its own module and use that. + ([@kentcdodds](https://github.com/kentcdodds)) +* [`6a29fe3`](https://github.com/npm/npm/commit/6a29fe3) + [#9677](https://github.com/npm/npm/pull/9677) + Start testing our stuff in node 4 on travis + ([@fscherwi](https://github.com/fscherwi)) +* [`508c6a4`](https://github.com/npm/npm/commit/508c6a4) + [#9669](https://github.com/npm/npm/issues/9669) + Make `recalculateMetadata` more resilient to unexpectedly bogus dependency specifiers. + ([@tmct](https://github.com/tmct)) +* [`3c44763`](https://github.com/npm/npm/commit/3c44763) + [#9643](https://github.com/npm/npm/issues/9463) + Update `install --only` to ignore the `NODE_ENV` var and _just_ use the only + value, if specified. + ([@watilde](https://github.com/watilde)) +* [`87336c3`](https://github.com/npm/npm/commit/87336c3) + [#9879](https://github.com/npm/npm/pull/9879) + `npm@3`'s shrinkwrap was refusing to shrinkwrap if an optional dependency + was missing– patch it to allow this. + ([@mantoni](https://github.com/mantoni)) + +#### DOCUMENTATION UPDATES + +* [`82659fd`](https://github.com/npm/npm/commit/82659fd) + [#9208](https://github.com/npm/npm/issues/9208) + Correct the npm style guide around quote usage + ([@aaroncrows](https://github.com/aaroncrows)) +* [`a69c83a`](https://github.com/npm/npm/commit/a69c83a) + [#9645](https://github.com/npm/npm/pull/9645) + Fix spelling error in README + ([@dkoleary88](https://github.com/dkoleary88)) +* [`f2cf054`](https://github.com/npm/npm/commit/f2cf054) + [#9714](https://github.com/npm/npm/pull/9714) + Fix typos in our documentation + ([@reggi](https://github.com/reggi)) +* [`7224bef`](https://github.com/npm/npm/commit/7224bef) + [#9759](https://github.com/npm/npm/pull/9759) + Fix typo in npm-team docs + ([@zkat](https://github.com/zkat)) +* [`7e6e007`](https://github.com/npm/npm/commit/7e6e007) + [#9820](https://github.com/npm/npm/pull/9820) + Correct documentation as to `binding.gyp` + ([@KenanY](https://github.com/KenanY)) + +### v3.3.6 (2015-09-30): + +I have the most exciting news for you this week. YOU HAVE NO IDEA. Well, +ok, maybe you do if you follow my twitter. + +Performance just got 5 bazillion times better (under some circumstances, +ymmv, etc). So– my test scenario is our very own website. In `npm@2`, on my +macbook running `npm ls` takes about 5 seconds. Personally it's more than +I'd like, but it's entire workable. In `npm@3` it has been taking _50_ seconds, +which is appalling. But after doing some work on Monday isolating the performance +issues I've been able to reduce `npm@3`'s run time back down to 5 seconds. + +Other scenarios were even worse, there was one that until now in `npm@3` that +took almost 6 minutes, and has been reduced to 14 seconds. + +* [`7bc0d4c`](https://github.com/npm/npm/commit/7bc0d4c) + [`cf42217`](https://github.com/npm/npm/commit/cf42217) + [#8826](https://github.com/npm/npm/issues/8826) + Stop using deepclone on super big datastructures. Avoid cloning + all-together even when that means mutating things, when possible. + Otherwise use a custom written tree-copying function that understands + the underlying datastructure well enough to only copy what we absolutely + need to. + ([@iarna](https://github.com/iarna)) + +In other news, look for us this Friday and Saturday at the amazing +[Open Source and Feelings](https://osfeels.com) conference, where something like a +third of the company will be attending. + +#### And finally a dependency update + +* [`a6a4437`](https://github.com/npm/npm/commit/a6a4437) + `glob@5.0.15` + ([@isaacs](https://github.com/isaacs)) + +#### And some subdep updates + +* [`cc5e6a0`](https://github.com/npm/npm/commit/cc5e6a0) + `hoek@2.16.3` + ([@nlf](https://github.com/nlf)) +* [`912a516`](https://github.com/npm/npm/commit/912a516) + `boom@2.9.0` + ([@arb](https://github.com/arb)) +* [`63944e9`](https://github.com/npm/npm/commit/63944e9) + `bluebird@2.10.1` + ([@petkaantonov](https://github.com/petkaantonov)) +* [`ef16003`](https://github.com/npm/npm/commit/ef16003) + `mime-types@2.1.7` & `mime-db@1.19.0` + ([@dougwilson](https://github.com/dougwilson)) +* [`2b8c0dd`](https://github.com/npm/npm/commit/2b8c0dd) + `request@2.64.0` + ([@simov](https://github.com/simov)) +* [`8139124`](https://github.com/npm/npm/commit/8139124) + `brace-expansion@1.1.1` + ([@juliangruber](https://github.com/juliangruber)) + +### v3.3.5 (2015-09-24): + +Some of you all may not be aware, but npm is ALSO a company. I tell you this +'cause npm-the-company had an all-staff get together this week, flying in +our remote folks from around the world. That was great, but it also +basically eliminated normal work on Monday and Tuesday. + +Still, we've got a couple of really important bug fixes this week. Plus a +lil bit from the [now LTS 2.x branch](https://github.com/npm/npm/releases/tag/v2.14.6). + +#### ATTENTION WINDOWS USERS + +If you previously updated to npm 3 and you try to update again, you may get +an error messaging telling you that npm won't install npm into itself. Until you +are at 3.3.5 or greater, you can get around this with `npm install -f -g npm`. + +* [`bef06f5`](https://github.com/npm/npm/commit/bef06f5) + [#9741](https://github.com/npm/npm/pull/9741) Uh... so... er... it + seems that since `npm@3.2.0` on Windows with a default configuration, it's + been impossible to update npm. Well, that's not actually true, there's a + work around (see above), but it shouldn't be complaining in the first + place. + ([@iarna](https://github.com/iarna)) + +#### STACK OVERFLOWS ON PUBLISH + +* [`330b496`](https://github.com/npm/npm/commit/330b496) + [#9667](https://github.com/npm/npm/pull/9667) + We were keeping track of metadata about your project while packing the + tree in a way that resulted in this data being written to packed tar files + headers. When this metadata included cycles, it resulted in the the tar + file entering an infinite recursive loop and eventually crashing with a + stack overflow. + + I've patched this by keeping track of your metadata by closing over the + variables in question instead, and I've further restricted gathering and + tracking the metadata to times when it's actually needed. (Which is only + if you need bundled modules.) + ([@iarna](https://github.com/iarna)) + +#### LESS CRASHY ERROR MESSAGES ON BAD PACKAGES + +* [`829921f`](https://github.com/npm/npm/commit/829921f) + [#9741](https://github.com/npm/npm/pull/9741) + Packages with invalid names or versions were crashing the installer. These + are now captured and warned as was originally intended. + ([@iarna](https://github.com/iarna)) + +#### ONE DEPENDENCY UPDATE + +* [`963295c`](https://github.com/npm/npm/commit/963295c) + `npm-install-checks@2.0.1` + ([@iarna](https://github.com/iarna)) + +#### AND ONE SUBDEPENDENCY + +* [`448737d`](https://github.com/npm/npm/commit/448737d) + `request@2.63.0` + ([@simov](https://github.com/simov)) + +### v3.3.4 (2015-09-17): + +This is a relatively quiet release, bringing a few bug fixes and +some module updates, plus via the +[2.14.5 release](https://github.com/npm/npm/releases/tag/v2.14.5) +some forward compatibility fixes with versions of Node that +aren't yet released. + +#### NO BETA NOTICE THIS TIME!! + +But, EXCITING NEWS FRIENDS, this week marks the exit of `npm@3` +from beta. This means that the week of this release, +[v3.3.3](https://github.com/npm/npm/releases/tag/v3.3.3) will +become `latest` and this version (v3.3.4) will become `next`!! + +#### CRUFT FOR THE CRUFT GODS + +What I call "cruft", by which I mean, files sitting around in +your `node_modules` folder, will no longer produce warnings in +`npm ls` nor during `npm install`. This brings `npm@3`'s behavior +in line with `npm@2`. + +* [`a127801`](https://github.com/npm/npm/commit/a127801) + [#9285](https://github.com/npm/npm/pull/9586) + Stop warning about cruft in module directories. + ([@iarna](https://github.com/iarna)) + +#### BETTER ERROR MESSAGE + +* [`95ee92c`](https://github.com/npm/npm/commit/95ee92c) + [#9433](https://github.com/npm/npm/issues/9433) + Give better error messages for invalid urls in the dependecy + list. + ([@jamietre](https://github.com/jamietre)) + +#### MODULE UPDATES + +* [`ebb92ca`](https://github.com/npm/npm/commit/ebb92ca) + `retry@0.8.0` ([@tim-kos](https://github.com/tim-kos)) +* [`55f1285`](https://github.com/npm/npm/commit/55f1285) + `normalize-package-data@2.3.4` ([@zkat](https://github.com/zkat)) +* [`6d4ebff`](https://github.com/npm/npm/commit/6d4ebff) + `sha@2.0.1` ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`09a9c7a`](https://github.com/npm/npm/commit/09a9c7a) + `semver@5.0.3` ([@isaacs](https://github.com/isaacs)) +* [`745000f`](https://github.com/npm/npm/commit/745000f) + `node-gyp@3.0.3` ([@rvagg](https://github.com/rvagg)) + +#### SUB DEP MODULE UPDATES + +* [`578ca25`](https://github.com/npm/npm/commit/578ca25) + `request@2.62.0` ([@simov](https://github.com/simov)) +* [`1d8996e`](https://github.com/npm/npm/commit/1d8996e) + `jju@1.2.1` ([@rlidwka](https://github.com/rlidwka)) +* [`6da1ba4`](https://github.com/npm/npm/commit/6da1ba4) + `hoek@2.16.2` ([@nlf](https://github.com/nlf)) + +### v3.3.3 (2015-09-10): + +This short week brought us brings us a few small bug fixes, a +doc change and a whole lotta dependency updates. + +Plus, as usual, this includes a forward port of everything in +[`npm@2.14.4`](https://github.com/npm/npm/releases/tag/v2.14.4). + +#### BETA BUT NOT FOREVER + +**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until +we're confident that it's stable and have assessed the effect of +the breaking changes on the community. During that time we will +still be doing `npm@2` releases, with `npm@2` tagged as `latest` +and `next`. We'll _also_ be publishing new releases of `npm@3` +as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. +We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant +bugs remaining. So do us a solid and deploy it in non-critical +CI environments and for day-to-day use, but maybe don't use it +for production maintenance or frontline continuous deployment +just yet. + +#### REMOVE INSTALLED BINARIES ON WINDOWS + +So waaaay back at the start of August, I fixed a bug with +[#9198](https://github.com/npm/npm/pull/9198). That fix made it +so that if you had two modules installed that both installed the +same binary (eg `gulp` & `gulp-cli`), that removing one wouldn't +remove the binary if it was owned by the other. + +It did this by doing some hocus-pocus that, turns out, was +Unix-specific, so on Windows it just threw up its hands and +stopped removing installed binaries at all. Not great. + +So today we're fixing that– it let us maintain the same safety +that we added in #9198, but ALSO works with Windows. + +* [`25fbaed`](https://github.com/npm/npm/commit/25fbaed) + [#9394](https://github.com/npm/npm/issues/9394) + Treat cmd-shims the same way we treat symlinks + ([@iarna](https://github.com/iarna)) + +#### API DOCUMENTATION HAS BEEN SACRIFICED THE API GOD + +The documentation of the internal APIs of npm is going away, +because it would lead people into thinking they should integrate +with npm by using it. Please don't do that! In the future, we'd +like to give you a suite of stand alone modules that provide +better, more stand alone APIs for your applications to build on. +But for now, call the npm binary with `process.exec` or +`process.spawn` instead. + +* [`2fb60bf`](https://github.com/npm/npm/commit/2fb60bf) + Remove misleading API documentation + ([@othiym23](https://github.com/othiym23)) + +#### ALLOW `npm link` ON WINDOWS W/ PRERELEASE VERSIONS OF NODE + +We never meant to have this be a restriction in the first place +and it was only just discovered with the recent node 4.0.0 +release candidate. + +* [`6665e54`](https://github.com/npm/npm/commit/6665e54) + [#9505](https://github.com/npm/npm/pull/9505) + Allow npm link to run on Windows with prerelease versions of + node + ([@jon-hall](https://github.com/jon-hall)) + +#### graceful-fs update + +We're updating all of npm's deps to use the most recent +`graceful-fs`. This turns out to be important for future not yet +released versions of node, because older versions monkey-patch +`fs` in ways that will break in the future. Plus it ALSO makes +use of `process.binding` which is an internal API that npm +definitely shouldn't have been using. We're not done yet, but +this is the bulk of them. + +* [`e7bc98e`](https://github.com/npm/npm/commit/e7bc98e) + `write-file-atomic@1.1.3` + ([@iarna](https://github.com/iarna)) +* [`7417600`](https://github.com/npm/npm/commit/7417600) + `tar@2.2.1` + ([@zkat](https://github.com/zkat)) +* [`e4e9d40`](https://github.com/npm/npm/commit/e4e9d40) + `read-package-json@2.0.1` + ([@zkat](https://github.com/zkat)) +* [`481611d`](https://github.com/npm/npm/commit/481611d) + `read-installed@4.0.3` + ([@zkat](https://github.com/zkat)) +* [`0dabbda`](https://github.com/npm/npm/commit/0dabbda) + `npm-registry-client@7.0.4` + ([@zkat](https://github.com/zkat)) +* [`c075a91`](https://github.com/npm/npm/commit/c075a91) + `fstream@1.0.8` + ([@zkat](https://github.com/zkat)) +* [`2e4341a`](https://github.com/npm/npm/commit/2e4341a) + `fs-write-stream-atomic@1.0.4` + ([@zkat](https://github.com/zkat)) +* [`18ad16e`](https://github.com/npm/npm/commit/18ad16e) + `fs-vacuum@1.2.7` + ([@zkat](https://github.com/zkat)) + +#### DEPENDENCY UPDATES + +* [`9d6666b`](https://github.com/npm/npm/commit/9d6666b) + `node-gyp@3.0.1` + ([@rvagg](https://github.com/rvagg)) +* [`349c4df`](https://github.com/npm/npm/commit/349c4df) + `retry@0.7.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`f507551`](https://github.com/npm/npm/commit/f507551) + `which@1.1.2` + ([@isaacs](https://github.com/isaacs)) +* [`e5b6743`](https://github.com/npm/npm/commit/e5b6743) + `nopt@3.0.4` + ([@zkat](https://github.com/zkat)) + +#### THE DEPENDENCIES OF OUR DEPENDENCIES ARE OUR DEPENDENCIES UPDATES + +* [`316382d`](https://github.com/npm/npm/commit/316382d) + `mime-types@2.1.6` & `mime-db@1.18.0` +* [`64b741e`](https://github.com/npm/npm/commit/64b741e) + `spdx-correct@1.0.1` +* [`fff62ac`](https://github.com/npm/npm/commit/fff62ac) + `process-nextick-args@1.0.3` +* [`9d6488c`](https://github.com/npm/npm/commit/9d6488c) + `cryptiles@2.0.5` +* [`1912012`](https://github.com/npm/npm/commit/1912012) + `bluebird@2.10.0` +* [`4d09402`](https://github.com/npm/npm/commit/4d09402) + `readdir-scoped-modules@1.0.2` + +### v3.3.2 (2015-09-04): + +#### PLEASE HOLD FOR THE NEXT AVAILABLE MAINTAINER + +This is a tiny little maintenance release, both to update dependencies and to +keep `npm@3` up to date with changes made to `npm@2`. +[@othiym23](https://github.com/othiym23) is putting out this release (again) as +his esteemed colleague [@iarna](https://github.com/iarna) finishes relocating +herself, her family, and her sizable anime collection all the way across North +America. It contains [all the goodies in +`npm@2.14.3`](https://github.com/npm/npm/releases/tag/v2.14.3) and one other +dependency update. + +#### BETA WARNINGS FOR FUN AND PROFIT + +**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're +confident that it's stable and have assessed the effect of the breaking +changes on the community. During that time we will still be doing `npm@2` +releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be +publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` +alongside those versions until we're ready to switch everyone over to +`npm@3`. We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant bugs +remaining. So do us a solid and deploy it in non-critical CI environments +and for day-to-day use, but maybe don't use it for production maintenance or +frontline continuous deployment just yet. + +That said, it's getting there! It will be leaving beta very soon! + +#### ONE OTHER DEPENDENCY UPDATE + +* [`bb5de34`](https://github.com/npm/npm/commit/bb5de3493531228df0bd3f0742d5493c826be6dd) + `is-my-json-valid@2.12.2`: Upgrade to a new, modernized version of + `json-pointer`. ([@mafintosh](https://github.com/mafintosh)) + +### v3.3.1 (2015-08-27): + +Hi all, this `npm@3` update brings you another round of bug fixes. The +headliner here is that `npm update` works again. We're running down the +clock on blocker 3.x issues! Shortly after that hits zero we'll be +promoting 3.x to latest!! + +And of course, we have changes that were brought forward from 2.x. Check out +the release notes for +[2.14.1](https://github.com/npm/npm/releases/tag/v2.14.1) and +[2.14.2](https://github.com/npm/npm/releases/tag/v2.14.2). + +#### BETA WARNINGS FOR FUN AND PROFIT + +**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're +confident that it's stable and have assessed the effect of the breaking +changes on the community. During that time we will still be doing `npm@2` +releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be +publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` +alongside those versions until we're ready to switch everyone over to +`npm@3`. We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant bugs +remaining. So do us a solid and deploy it in non-critical CI environments +and for day-to-day use, but maybe don't use it for production maintenance or +frontline continuous deployment just yet. + +#### NPM UPDATE, NOW AGAIN YOUR FRIEND + +* [`f130a00`](https://github.com/npm/npm/commit/f130a00) + [#9095](https://github.com/npm/npm/issues/9095) + `npm update` once again works! Previously, after selecting packages + to update, it would then pick the wrong location to run the install + from. ([@iarna](https://github.com/iarna)) + +#### MORE VERBOSING FOR YOUR VERBOSE LIFECYCLES + +* [`d088b7d`](https://github.com/npm/npm/commit/d088b7d) + [#9227](https://github.com/npm/npm/pull/9227) + Add some additional logging at the verbose and silly levels + when running lifecycle scripts. Hopefully this will make + debugging issues with them a bit easier! + ([@saper](https://github.com/saper)) + +#### AND SOME OTHER BUG FIXES… + +* [`f4a5784`](https://github.com/npm/npm/commit/f4a5784) + [#9308](https://github.com/npm/npm/issues/9308) + Make fetching metadata for local modules faster! This ALSO means + that doing things like running `npm repo` won't build your + module and maybe run `prepublish`. + ([@iarna](https://github.com/iarna)) + +* [`4468c92`](https://github.com/npm/npm/commit/4468c92) + [#9205](https://github.com/npm/npm/issues/9205) + Fix a bug where local modules would sometimes not resolve relative + links using the correct base path. + ([@iarna](https://github.com/iarna)) + +* [`d395a6b`](https://github.com/npm/npm/commit/d395a6b) + [#8995](https://github.com/npm/npm/issues/8995) + Certain combinations of packages could result in different install orders for their + initial installation than for reinstalls run on the same folder. + ([@iarna](https://github.com/iarna)) + +* [`d119ea6`](https://github.com/npm/npm/commit/d119ea6) + [#9113](https://github.com/npm/npm/issues/9113) + Make extraneous packages _always_ up in `npm ls`. Previously, if an + extraneous package had a dependency that depended back on the original + package this would result in the package not showing up in `ls`. + ([@iarna](https://github.com/iarna)) + +* [`02420dc`](https://github.com/npm/npm/commit/02420dc) + [#9113](https://github.com/npm/npm/issues/9113) + Stop warning about missing top level package.json files. Errors in said + files will still be reported. + ([@iarna](https://github.com/iarna)) + +#### SOME DEP UPDATES + +* [`1ed1364`](https://github.com/npm/npm/commit/1ed1364) `rimraf@2.4.3` + ([@isaacs](https://github.com/isaacs)) Added EPERM to delay/retry loop +* [`e7b8315`](https://github.com/npm/npm/commit/e7b8315) `read@1.0.7` + Smaller distribution package, better metadata + ([@isaacs](https://github.com/isaacs)) + +#### SOME DEPS OF DEPS UPDATES + +* [`b273bcc`](https://github.com/npm/npm/commit/b273bcc) `mime-types@2.1.5` +* [`df6e225`](https://github.com/npm/npm/commit/df6e225) `mime-db@1.17.0` +* [`785f2ad`](https://github.com/npm/npm/commit/785f2ad) `is-my-json-valid@2.12.1` +* [`88170dd`](https://github.com/npm/npm/commit/88170dd) `form-data@1.0.0-rc3` +* [`af5357b`](https://github.com/npm/npm/commit/af5357b) `request@2.61.0` +* [`337f96a`](https://github.com/npm/npm/commit/337f96a) `chalk@1.1.1` +* [`3dfd74d`](https://github.com/npm/npm/commit/3dfd74d) `async@1.4.2` + +### v3.3.0 (2015-08-13): + +This is a pretty EXCITING week. But I may be a little excitable– or +possibly sleep deprived, it's sometimes hard to tell them apart. =D So +[Kat](https://github.com/zkat) really went the extra mile this week and got +the client side support for teams and orgs out in this week's 2.x release. +You can't use that just yet, 'cause we have to turn on some server side +stuff too, but this way it'll be there for you all the moment we do! Check +out the details over in the [2.14.0 release +notes](https://github.com/npm/npm/releases/tag/v2.14.0)! + +But we over here in 3.x ALSO got a new feature this week, check out the new +`--only` and `--also` flags for better control over when dev and production +dependencies are used by various npm commands. + +That, and some important bug fixes round out this week. Enjoy everyone! + +#### NEVER SHALL NOT BETA THE BETA + +**_THIS IS BETA SOFTWARE_**. EXCITING NEW BETA WARNING!!! Ok, I fibbed, +EXACTLY THE SAME BETA WARNINGS: `npm@3` will remain in beta until we're +confident that it's stable and have assessed the effect of the breaking +changes on the community. During that time we will still be doing `npm@2` +releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be +publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` +alongside those versions until we're ready to switch everyone over to +`npm@3`. We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant bugs +remaining. So do us a solid and deploy it in non-critical CI environments +and for day-to-day use, but maybe don't use it for production maintenance or +frontline continuous deployment just yet. + +#### ONLY ALSO DEV + +Hey we've got a SUPER cool new feature for you all, thanks to the fantastic +work of [@davglass](https://github.com/davglass) and +[@bengl](https://github.com/bengl) we have `--only=prod`, +`--only=dev`, `--also=prod` and `--also=dev` options. These apply in +various ways to: `npm install`, `npm ls`, `npm outdated` and `npm update`. + +So for instance: + +``` +npm install --only=dev +``` + +Only installs dev dependencies. By contrast: + +``` +npm install --only=prod +``` + +Will only install prod dependencies and is very similar to `--production` +but differs in that it doesn't set the environment variables that +`--production` does. + +The related new flag, `--also` is most useful with things like: + +``` +npm shrinkwrap --also=dev +``` + +As shrinkwraps don't include dev deps by default. This replaces passing in +`--dev` in that scenario. + +And that leads into the fact that this deprecates `--dev` as its semantics +across commands were inconsistent and confusing. + +* [`3ab1eea`](https://github.com/npm/npm/commit/3ab1eea) + [#9024](https://github.com/npm/npm/pull/9024) + Add support for `--only`, `--also` and deprecate `--dev` + ([@bengl](https://github.com/bengl)) + +#### DON'T TOUCH! THAT'S NOT YOUR BIN + +* [`b31812e`](https://github.com/npm/npm/commit/b31812e) + [#8996](https://github.com/npm/npm/pull/8996) + When removing a module that has bin files, if one that we're going to + remove is a symlink to a DIFFERENT module, leave it alone. This only happens + when you have two modules that try to provide the same bin. + ([@iarna](https://github.com/iarna)) + +#### THERE'S AN END IN SIGHT + +* [`d2178a9`](https://github.com/npm/npm/commit/d2178a9) + [#9223](https://github.com/npm/npm/pull/9223) + Close a bunch of infinite loops that could show up with symlink cycles in your dependencies. + ([@iarna](https://github.com/iarna)) + +#### OOPS DIDN'T MEAN TO FIX THAT + +Well, not _just_ yet. This was scheduled for next week, but it snuck into +2.x this week. + +* [`139dd92`](https://github.com/npm/npm/commit/139dd92) + [#8716](https://github.com/npm/npm/pull/8716) + `npm init` will now only pick up the modules you install, not everything + else that got flattened with them. + ([@iarna](https://github.com/iarna)) + +### v3.2.2 (2015-08-08): + +Lot's of lovely bug fixes for `npm@3`. I'm also suuuuper excited that I +think we have a handle on stack explosions that effect a small portion of +our users. We also have some tantalizing clues as to where some low hanging +fruit may be for performance issues. + +And of course, in addition to the `npm@3` specific bug fixes, there are some +great one's coming in from `npm@2`! [@othiym23](https://github.com/othiym23) +put together that release this week– check out its +[release notes](https://github.com/npm/npm/releases/tag/v2.13.4) for the deets. + +#### AS ALWAYS STILL BETA + +**_THIS IS BETA SOFTWARE_**. Just like the airline safety announcements, +we're not taking this plane off till we finish telling you: `npm@3` will +remain in beta until we're confident that it's stable and have assessed the +effect of the breaking changes on the community. During that time we will +still be doing `npm@2` releases, with `npm@2` tagged as `latest` and `next`. +We'll _also_ be publishing new releases of `npm@3` as `npm@v3.x-next` and +`npm@v3.x-latest` alongside those versions until we're ready to switch +everyone over to `npm@3`. We need your help to find and fix its remaining +bugs. It's a significant rewrite, so we are _sure_ there still significant +bugs remaining. So do us a solid and deploy it in non-critical CI +environments and for day-to-day use, but maybe don't use it for production +maintenance or frontline continuous deployment just yet. + +#### BUG FIXES + +* [`a8c8a13`](https://github.com/npm/npm/commit/a8c8a13) + [#9050](https://github.com/npm/npm/issues/9050) + Resolve peer deps relative to the parent of the requirer + ([@iarna](http://github.com/iarna)) +* [`05f0226`](https://github.com/npm/npm/commit/05f0226) + [#9077](https://github.com/npm/npm/issues/9077) + Fix crash when saving `git+ssh` urls + ([@iarna](http://github.com/iarna)) +* [`e4a3808`](https://github.com/npm/npm/commit/e4a3808) + [#8951](https://github.com/npm/npm/issues/8951) + Extend our patch to allow `*` to match something when a package only has + prerelease versions to everything and not just the cache. + ([@iarna](http://github.com/iarna)) +* [`d135abf`](https://github.com/npm/npm/commit/d135abf) + [#8871](https://github.com/npm/npm/issues/8871) + Don't warn about a missing `package.json` or missing fields in the global + install directory. + ([@iarna](http://github.com/iarna)) + +#### DEP VERSION BUMPS + +* [`990ee4f`](https://github.com/npm/npm/commit/990ee4f) + `path-is-inside@1.0.1` ([@domenic](https://github.com/domenic)) +* [`1f71ec0`](https://github.com/npm/npm/commit/1f71ec0) + `lodash.clonedeep@3.0.2` ([@jdalton](https://github.com/jdalton)) +* [`a091354`](https://github.com/npm/npm/commit/a091354) + `marked@0.3.5` ([@chjj](https://github.com/chjj)) +* [`fc51f28`](https://github.com/npm/npm/commit/fc51f28) + `tap@1.3.2` ([@isaacs](https://github.com/isaacs)) +* [`3569ec0`](https://github.com/npm/npm/commit/3569ec0) + `nock@2.10.0` ([@pgte](https://github.com/pgte)) +* [`ad5f6fd`](https://github.com/npm/npm/commit/ad5f6fd) + `npm-registry-mock@1.0.1` ([@isaacs](https://github.com/isaacs)) + +### v3.2.1 (2015-07-31): + +#### AN EXTRA QUIET RELEASE + +A bunch of stuff got deferred for various reasons, which just means more +branches to land next week! + +Don't forget to check out [Kat's 2.x release](https://github.com/npm/npm/releases/tag/v2.13.4) for other quiet goodies. + +#### AS ALWAYS STILL BETA + +**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, +you can't be excused. `npm@3` will remain in beta until we're confident +that it's stable and have assessed the effect of the breaking changes on the +community. During that time we will still be doing `npm@2` releases, with +`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new +releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. We need your +help to find and fix its remaining bugs. It's a significant rewrite, so we +are _sure_ there still significant bugs remaining. So do us a solid and +deploy it in non-critical CI environments and for day-to-day use, but maybe +don't use it for production maintenance or frontline continuous deployment +just yet. + + +#### MAKING OUR TESTS TEST THE THING THEY TEST + +* [`6e53c3d`](https://github.com/npm/npm/commit/6e53c3d) + [#8985](https://github.com/npm/npm/pull/8985) + Many thanks to @bengl for noticing that one of our tests wasn't testing + what it claimed it was testing! ([@bengl](https://github.com/bengl)) + +#### MY PACKAGE.JSON WAS ALREADY IN THE RIGHT ORDER + +* [`eb2c7aa`](https://github.com/npm/npm/commit/d00d0f) + [#9068](https://github.com/npm/npm/pull/9079) + Stop sorting keys in the `package.json` that we haven't edited. Many + thanks to [@Qix-](https://github.com/Qix-) for bringing this up and + providing a first pass at a patch for this. + ([@iarna](https://github.com/iarna)) + +#### DEV DEP UPDATE + +* [`555f60c`](https://github.com/npm/npm/commit/555f60c) `marked@0.3.4` + +### v3.2.0 (2015-07-24): + +#### MORE CONFIG, BETTER WINDOWS AND A BUG FIX + +This is a smallish release with a new config option and some bug fixes. And +lots of module updates. + +#### BETA BETAS ON + +**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, +you can't be excused. `npm@3` will remain in beta until we're confident +that it's stable and have assessed the effect of the breaking changes on the +community. During that time we will still be doing `npm@2` releases, with +`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new +releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. We need your +help to find and fix its remaining bugs. It's a significant rewrite, so we +are _sure_ there still significant bugs remaining. So do us a solid and +deploy it in non-critical CI environments and for day-to-day use, but maybe +don't use it for production maintenance or frontline continuous deployment +just yet. + + +#### NEW CONFIGS, LESS PROGRESS + +* [`423d8f7`](https://github.com/npm/npm/commit/423d8f7) + [#8704](https://github.com/npm/npm/issues/8704) + Add the ability to disable the new progress bar with `--no-progress` + ([@iarna](https://github.com/iarna)) + +#### AND BUG FIXES + +* [`b3ee452`](https://github.com/npm/npm/commit/b3ee452) + [#9038](https://github.com/npm/npm/pull/9038) + We previously disabled the use of the new `fs.access` API on Windows, but + the bug we were seeing is fixed in `io.js@1.5.0` so we now use `fs.access` + if you're using that version or greater. + ([@iarna](https://github.com/iarna)) + +* [`b181fa3`](https://github.com/npm/npm/commit/b181fa3) + [#8921](https://github.com/npm/npm/issues/8921) + [#8637](https://github.com/npm/npm/issues/8637) + Rejigger how we validate modules for install. This allow is to fix + a problem where arch/os checking wasn't being done at all. + It also made it easy to add back in a check that declines to + install a module in itself unless you force it. + ([@iarna](https://github.com/iarna)) + +#### AND A WHOLE BUNCH OF SUBDEP VERSIONS + +These are all development dependencies and semver-compatible subdep +upgrades, so they should not have visible impact on users. + +* [`6b3f6d9`](https://github.com/npm/npm/commit/6b3f6d9) `standard@4.3.3` +* [`f4e22e5`](https://github.com/npm/npm/commit/f4e22e5) `readable-stream@2.0.2` (inside concat-stream) +* [`f130bfc`](https://github.com/npm/npm/commit/f130bfc) `minimatch@2.0.10` (inside node-gyp's copy of glob) +* [`36c6a0d`](https://github.com/npm/npm/commit/36c6a0d) `caseless@0.11.0` +* [`80df59c`](https://github.com/npm/npm/commit/80df59c) `chalk@1.1.0` +* [`ea935d9`](https://github.com/npm/npm/commit/ea935d9) `bluebird@2.9.34` +* [`3588a0c`](https://github.com/npm/npm/commit/3588a0c) `extend@3.0.0` +* [`c6a8450`](https://github.com/npm/npm/commit/c6a8450) `form-data@1.0.0-rc2` +* [`a04925b`](https://github.com/npm/npm/commit/a04925b) `har-validator@1.8.0` +* [`ee7c095`](https://github.com/npm/npm/commit/ee7c095) `has-ansi@2.0.0` +* [`944fc34`](https://github.com/npm/npm/commit/944fc34) `hawk@3.1.0` +* [`783dc7b`](https://github.com/npm/npm/commit/783dc7b) `lodash._basecallback@3.3.1` +* [`acef0fe`](https://github.com/npm/npm/commit/acef0fe) `lodash._baseclone@3.3.0` +* [`dfe959a`](https://github.com/npm/npm/commit/dfe959a) `lodash._basedifference@3.0.3` +* [`a03bc76`](https://github.com/npm/npm/commit/a03bc76) `lodash._baseflatten@3.1.4` +* [`8a07d50`](https://github.com/npm/npm/commit/8a07d50) `lodash._basetostring@3.0.1` +* [`7785e3f`](https://github.com/npm/npm/commit/7785e3f) `lodash._baseuniq@3.0.3` +* [`826fb35`](https://github.com/npm/npm/commit/826fb35) `lodash._createcache@3.1.2` +* [`76030b3`](https://github.com/npm/npm/commit/76030b3) `lodash._createpadding@3.6.1` +* [`1a49ec6`](https://github.com/npm/npm/commit/1a49ec6) `lodash._getnative@3.9.1` +* [`eebe47f`](https://github.com/npm/npm/commit/eebe47f) `lodash.isarguments@3.0.4` +* [`09994d4`](https://github.com/npm/npm/commit/09994d4) `lodash.isarray@3.0.4` +* [`b6f8dbf`](https://github.com/npm/npm/commit/b6f8dbf) `lodash.keys@3.1.2` +* [`c67dd6b`](https://github.com/npm/npm/commit/c67dd6b) `lodash.pad@3.1.1` +* [`4add042`](https://github.com/npm/npm/commit/4add042) `lodash.repeat@3.0.1` +* [`e04993c`](https://github.com/npm/npm/commit/e04993c) `lru-cache@2.6.5` +* [`2ed7da4`](https://github.com/npm/npm/commit/2ed7da4) `mime-db@1.15.0` +* [`ae08244`](https://github.com/npm/npm/commit/ae08244) `mime-types@2.1.3` +* [`e71410e`](https://github.com/npm/npm/commit/e71410e) `os-homedir@1.0.1` +* [`67c13e0`](https://github.com/npm/npm/commit/67c13e0) `process-nextick-args@1.0.2` +* [`12ee041`](https://github.com/npm/npm/commit/12ee041) `qs@4.0.0` +* [`15564a6`](https://github.com/npm/npm/commit/15564a6) `spdx-license-ids@1.0.2` +* [`8733bff`](https://github.com/npm/npm/commit/8733bff) `supports-color@2.0.0` +* [`230943c`](https://github.com/npm/npm/commit/230943c) `tunnel-agent@0.4.1` +* [`26a4653`](https://github.com/npm/npm/commit/26a4653) `ansi-styles@2.1.0` +* [`3d27081`](https://github.com/npm/npm/commit/3d27081) `bl@1.0.0` +* [`9efa110`](https://github.com/npm/npm/commit/9efa110) `async@1.4.0` + +#### MERGED FORWARD + +* As usual, we've ported all the `npm@2` goodies in this week's + [v2.13.3](https://github.com/npm/npm/releases/tag/v2.13.3) + release. + +### v3.1.3 (2015-07-17): + +Rebecca: So Kat, I hear this week's other release uses a dialog between us to +explain what changed? + +Kat: Well, you could say that… + +Rebecca: I would! This week I fixed more `npm@3` bugs! + +Kat: That sounds familiar. + +Rebecca: Eheheheh, well, before we look at those, a word from our sponsor… + +#### BETA IS AS BETA DOES + +**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, +you can't be excused. `npm@3` will remain in beta until we're confident +that it's stable and have assessed the effect of the breaking changes on the +community. During that time we will still be doing `npm@2` releases, with +`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new +releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. We need your +help to find and fix its remaining bugs. It's a significant rewrite, so we +are _sure_ there still significant bugs remaining. So do us a solid and +deploy it in non-critical CI environments and for day-to-day use, but maybe +don't use it for production maintenance or frontline continuous deployment +just yet. + +Rebecca: Ok, enough of the dialoguing, that's Kat's schtick. But do remember +kids, betas hide in dark hallways waiting to break your stuff, stuff like… + +#### SO MANY LINKS YOU COULD MAKE A CHAIN + +* [`6d69ec9`](https://github.com/npm/npm/6d69ec9) + [#8967](https://github.com/npm/npm/issues/8967) + Removing a module linked into your globals would result in having + all of its subdeps removed. Since the npm release process does + exactly this, it burned me -every- -single- -week-. =D + While we're here, we also removed extraneous warns that used to + spill out when you'd remove a symlink. + ([@iarna](https://github.com/iarna)) + +* [`fdb360f`](https://github.com/npm/npm/fdb360f) + [#8874](https://github.com/npm/npm/issues/8874) + Linking scoped modules was failing outright, but this fixes that + and updates our tests so we don't do it again. + ([@iarna](https://github.com/iarna)) + +#### WE'LL TRY NOT TO CRACK YOUR WINDOWS + +* [`9fafb18`](https://github.com/npm/npm/9fafb18) + [#8701](https://github.com/npm/npm/issues/8701) + `npm@3` introduced permissions checks that run before it actually tries to + do something. This saves you from having an install fail half way + through. We did this using the shiny new `fs.access` function available + in `node 0.12` and `io.js`, with fallback options for older nodes. Unfortunately + the way we implemented the fallback caused racey problems for Windows systems. + This fixes that by ensuring we only ever run any one check on a directory once. + BUT it turns out there are bugs in `fs.access` on Windows. So this ALSO just disables + the use of `fs.access` on Windows entirely until that settles out. + ([@iarna](https://github.com/iarna)) + +#### ZOOM ZOOM, DEP UPDATES + +* [`5656baa`](https://github.com/npm/npm/5656baa) + `gauge@1.2.2`: Better handle terminal resizes while printing the progress bar + ([@iarna](https://github.com/iarna)) + +#### MERGED FORWARD + +* Check out Kat's [super-fresh release notes for v2.13.2](https://github.com/npm/npm/releases/tag/v2.13.2) + and see all the changes we ported from `npm@2`. + +### v3.1.2 + +#### SO VERY BETA RELEASE + +So, `v3.1.1` managed to actually break installing local modules. And then +immediately after I drove to an island for the weekend. 😁 So let's get +this fixed outside the usual release train! + +Fortunately it didn't break installing _global_ modules and so you could +swap it out for another version at least. + +#### DISCLAIMER MEANS WHAT IT SAYS + +**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, +you can't be excused. `npm@3` will remain in beta until we're confident +that it's stable and have assessed the effect of the breaking changes on the +community. During that time we will still be doing `npm@2` releases, with +`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new +releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. We need your +help to find and fix its remaining bugs. It's a significant rewrite, so we +are _sure_ there still significant bugs remaining. So do us a solid and +deploy it in non-critical CI environments and for day-to-day use, but maybe +don't use it for production maintenance or frontline continuous deployment +just yet. + +#### THIS IS IT, THE REASON + +* [`f5e19df`](https://github.com/npm/npm/commit/f5e19df) + [#8893](https://github.com/npm/npm/issues/8893) + Fix crash when installing local modules introduced by the fix for + [#8608](https://github.com/npm/npm/issues/8608) + ([@iarna](https://github.com/iarna) + +### v3.1.1 + +#### RED EYE RELEASE + +Rebecca's up too late writing tests, so you can have `npm@3` bug fixes! Lots +of great new issues from you all! ❤️️ Keep it up! + +#### YUP STILL BETA, PLEASE PAY ATTENTION + +**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, +you can't be excused. `npm@3` will remain in beta until we're confident +that it's stable and have assessed the effect of the breaking changes on the +community. During that time we will still be doing `npm@2` releases, with +`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new +releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. We need your +help to find and fix its remaining bugs. It's a significant rewrite, so we +are _sure_ there still significant bugs remaining. So do us a solid and +deploy it in non-critical CI environments and for day-to-day use, but maybe +don't use it for production maintenance or frontline continuous deployment +just yet. + +#### BOOGS + +* [`9badfd6`](https://github.com/npm/npm/commit/9babfd63f19f2d80b2d2624e0963b0bdb0d76ef4) + [#8608](https://github.com/npm/npm/issues/8608) + Make global installs and uninstalls MUCH faster by only reading the directories of + modules referred to by arguments. + ([@iarna](https://github.com/iarna) +* [`075a5f0`](https://github.com/npm/npm/commit/075a5f046ab6837f489b08d44cb601e9fdb369b7) + [#8660](https://github.com/npm/npm/issues/8660) + Failed optional deps would still result in the optional deps own + dependencies being installed. We now find them and fail them out of the + tree. + ([@iarna](https://github.com/iarna) +* [`c9fbbb5`](https://github.com/npm/npm/commit/c9fbbb540083396ea58fd179d81131d959d8e049) + [#8863](https://github.com/npm/npm/issues/8863) + The "no compatible version found" error message was including only the + version requested, not the name of the package we wanted. Ooops! + ([@iarna](https://github.com/iarna) +* [`32e6bbd`](https://github.com/npm/npm/commit/32e6bbd21744dcbe8c0720ab53f60caa7f2a0588) + [#8806](https://github.com/npm/npm/issues/8806) + The "uninstall" lifecycle was being run after all of a module's dependencies has been + removed. This reverses that order-- this means "uninstall" lifecycles can make use + of the package's dependencies. + ([@iarna](https://github.com/iarna) + +#### MERGED FORWARD + +* Check out the [v2.13.1 release notes](https://github.com/npm/npm/releases/tag/v2.13.1) + and see all the changes we ported from `npm@2`. + +### v3.1.0 (2015-07-02): + +This has been a brief week of bug fixes, plus some fun stuff merged forward +from this weeks 2.x release. See the +[2.13.0 release notes](https://github.com/npm/npm/releases/tag/v2.13.0) +for details on that. + +You all have been AWESOME with +[all](https://github.com/npm/npm/milestones/3.x) +[the](https://github.com/npm/npm/milestones/3.2.0) +`npm@3` bug reports! Thank you and keep up the great work! + +#### NEW PLACE, SAME CODE + +Remember how last week we said `npm@3` would go to `3.0-next` and latest +tags? Yeaaah, no, please use `npm@v3.x-next` and `npm@v3.x-latest` going forward. + +I dunno why we said "suuure, we'll never do a feature release till we're out +of beta" when we're still forward porting `npm@2.x` features. `¯\_(ツ)_/¯` + +If you do accidentally use the old tag names, I'll be maintaining them +for a few releases, but they won't be around forever. + +#### YUP STILL BETA, PLEASE PAY ATTENTION + +**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're +confident that it's stable and have assessed the effect of the breaking +changes on the community. During that time we will still be doing `npm@2` +releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be +publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` +alongside those versions until we're ready to switch everyone over to +`npm@3`. We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant bugs +remaining. So do us a solid and deploy it in non-critical CI environments +and for day-to-day use, but maybe don't use it for production maintenance +or frontline continuous deployment just yet. + +#### BUGS ON THE WINDOWS + + * [`0030ade`](https://github.com/npm/npm/commit/0030ade) + [#8685](https://github.com/npm/npm/issues/8685) + Windows would hang when trying to clone git repos + ([@euprogramador](https://github.com/npm/npm/pull/8777)) + * [`b259bcc`](https://github.com/npm/npm/commit/b259bcc) + [#8786](https://github.com/npm/npm/pull/8786) + Windows permissions checks would cause installations to fail under some + circumstances. We're disabling the checks entirely for this release. + I'm hoping to check back with this next week to get a Windows friendly + fix in. + ([@iarna](https://github.com/iarna)) + +#### SO MANY BUGS SQUASHED, JUST CALL US RAID + + * [`0848698`](https://github.com/npm/npm/commit/0848698) + [#8686](https://github.com/npm/npm/pull/8686) + Stop leaving progress bar cruft on the screen during publication + ([@ajcrites](https://github.com/ajcrites)) + * [`57c3cea`](https://github.com/npm/npm/commit/57c3cea) + [#8695](https://github.com/npm/npm/pull/8695) + Remote packages with shrinkwraps made npm cause node + iojs to explode + and catch fire. NO MORE. + ([@iarna](https://github.com/iarna)) + * [`2875ba3`](https://github.com/npm/npm/commit/2875ba3) + [#8723](https://github.com/npm/npm/pull/8723) + I uh, told you that engineStrict checking had gone away last week. + TURNS OUT I LIED. So this is making that actually be true. + ([@iarna](https://github.com/iarna)) + * [`28064e5`](https://github.com/npm/npm/commit/28064e5) + [#3358](https://github.com/npm/npm/issues/3358) + Consistently allow Unicode BOMs at the start of package.json files. + Previously this was allowed some of time, like when you were installing + modules, but not others, like running npm version or installing w/ + `--save`. + ([@iarna](https://github.com/iarna)) + * [`3cb6ad2`](https://github.com/npm/npm/commit/3cb6ad2) + [#8736](https://github.com/npm/npm/issues/8766) + `npm@3` wasn't running the "install" lifecycle in your current (toplevel) + module. This broke modules that relied on C compilation. BOO. + ([@iarna](https://github.com/iarna)) + * [`68da583`](https://github.com/npm/npm/commit/68da583) + [#8766](https://github.com/npm/npm/issues/8766) + To my great shame, `npm link package` wasn't working AT ALL if you + didn't have `package` already installed. + ([@iarna](https://github.com/iarna)) + * [`edd7448`](https://github.com/npm/npm/commit/edd7448) + `read-package-tree@5.0.0`: This update makes read-package-tree not explode + when there's bad data in your node_modules folder. `npm@2` silently + ignores this sort of thing. + ([@iarna](https://github.com/iarna)) + * [`0bb08c8`](https://github.com/npm/npm/commit/0bb08c8) + [#8778](https://github.com/npm/npm/pull/8778) + RELATEDLY, we now show any errors from your node_modules folder after + your installation completes as warnings. We're also reporting these in + `npm ls` now. + ([@iarna](https://github.com/iarna)) + * [`6c248ff`](https://github.com/npm/npm/commit/6c248ff) + [#8779](https://github.com/npm/npm/pull/8779) + Hey, you know how we used to complain if your `package.json` was + missing stuff? Well guess what, we are again. I know, I know, you can + thank me later. + ([@iarna](https://github.com/iarna)) + * [`d6f7c98`](https://github.com/npm/npm/commit/d6f7c98) + So, when we were rolling back after errors we had untested code that + tried to undo moves. Being untested it turns out it was very broken. + I've removed it until we have time to do this right. + ([@iarna](https://github.com/iarna)) + +#### NEW VERSION + +Just the one. Others came in via the 2.x release. Do check out its +changelog, immediately following this message. + + * [`4e602c5`](https://github.com/npm/npm/commit/4e602c5) `lodash@3.2.2` + +### v3.0.0 (2015-06-25): + +Wow, it's finally here! This has been a long time coming. We are all +delighted and proud to be getting this out into the world, and are looking +forward to working with the npm user community to get it production-ready +as quickly as possible. + +`npm@3` constitutes a nearly complete rewrite of npm's installer to be +easier to maintain, and to bring a bunch of valuable new features and +design improvements to you all. + +[@othiym23](https://github.com/othiym23) and +[@isaacs](https://github.com/isaacs) have been +[talking about the changes](http://blog.npmjs.org/post/91303926460/npm-cli-roadmap-a-periodic-update) +in this release for well over a year, and it's been the primary focus of +[@iarna](https://github.com/iarna) since she joined the team. + +Given that this is a near-total rewrite, all changes listed here are +[@iarna](https://github.com/iarna)'s work unless otherwise specified. + +#### NO, REALLY, READ THIS PARAGRAPH. IT'S THE IMPORTANT ONE. + +**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're +confident that it's stable and have assessed the effect of the breaking +changes on the community. During that time we will still be doing `npm@2` +releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be +publishing new releases of `npm@3` as `npm@3.0-next` and `npm@3.0-latest` +alongside those versions until we're ready to switch everyone over to +`npm@3`. We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant bugs +remaining. So do us a solid and deploy it in non-critical CI environments +and for day-to-day use, but maybe don't use it for production maintenance +or frontline continuous deployment just yet. + +#### BREAKING CHANGES + +##### `peerDependencies` + +`grunt`, `gulp`, and `broccoli` plugin maintainers take note! You will be +affected by this change! + +* [#6930](https://github.com/npm/npm/issues/6930) + ([#6565](https://github.com/npm/npm/issues/6565)) + `peerDependencies` no longer cause _anything_ to be implicitly installed. + Instead, npm will now warn if a packages `peerDependencies` are missing, + but it's up to the consumer of the module (i.e. you) to ensure the peers + get installed / are included in `package.json` as direct `dependencies` + or `devDependencies` of your package. +* [#3803](https://github.com/npm/npm/issues/3803) + npm also no longer checks `peerDependencies` until after it has fully + resolved the tree. + +This shifts the responsibility for fulfilling peer dependencies from library +/ framework / plugin maintainers to application authors, and is intended to +get users out of the dependency hell caused by conflicting `peerDependency` +constraints. npm's job is to keep you _out_ of dependency hell, not put you +in it. + +##### `engineStrict` + +* [#6931](https://github.com/npm/npm/issues/6931) The rarely-used + `package.json` option `engineStrict` has been deprecated for several + months, producing warnings when it was used. Starting with `npm@3`, the + value of the field is ignored, and engine violations will only produce + warnings. If you, as a user, want strict `engines` field enforcement, + just run `npm config set engine-strict true`. + +As with the peer dependencies change, this is about shifting control from +module authors to application authors. It turns out `engineStrict` was very +difficult to understand even harder to use correctly, and more often than +not just made modules using it difficult to deploy. + +##### `npm view` + +* [`77f1aec`](https://github.com/npm/npm/commit/77f1aec) With `npm view` (aka + `npm info`), always return arrays for versions, maintainers, etc. Previously + npm would return a plain value if there was only one, and multiple values if + there were more. ([@KenanY](https://github.com/KenanY)) + +#### KNOWN BUGS + +Again, this is a _**BETA RELEASE**_, so not everything is working just yet. +Here are the issues that we already know about. If you run into something +that isn't on this list, +[let us know](https://github.com/npm/npm/issues/new)! + +* [#8575](https://github.com/npm/npm/issues/8575) + Circular deps will never be removed by the prune-on-uninstall code. +* [#8588](https://github.com/npm/npm/issues/8588) + Local deps where the dep name and the name in the package.json differ + don't result in an error. +* [#8637](https://github.com/npm/npm/issues/8637) + Modules can install themselves as direct dependencies. `npm@2` declined to + do this. +* [#8660](https://github.com/npm/npm/issues/8660) + Dependencies of failed optional dependencies aren't rolled back when the + optional dependency is, and then are reported as extraneous thereafter. + +#### NEW FEATURES + +##### The multi-stage installer! + +* [#5919](https://github.com/npm/npm/issues/5919) + Previously the installer had a set of steps it executed for each package + and it would immediately start executing them as soon as it decided to + act on a package. + + But now it executes each of those steps at the same time for all + packages, waiting for all of one stage to complete before moving on. This + eliminates many race conditions and makes the code easier to reason + about. + +This fixes, for instance: + +* [#6926](https://github.com/npm/npm/issues/6926) + ([#5001](https://github.com/npm/npm/issues/5001), + [#6170](https://github.com/npm/npm/issues/6170)) + `install` and `postinstall` lifecycle scripts now only execute `after` + all the module with the script's dependencies are installed. + +##### Install: it looks different! + +You'll now get a tree much like the one produced by `npm ls` that +highlights in orange the packages that were installed. Similarly, any +removed packages will have their names prefixed by a `-`. + +Also, `npm outdated` used to include the name of the module in the +`Location` field: + +``` +Package Current Wanted Latest Location +deep-equal MISSING 1.0.0 1.0.0 deep-equal +glob 4.5.3 4.5.3 5.0.10 rimraf > glob +``` + +Now it shows the module that required it as the final point in the +`Location` field: + +``` +Package Current Wanted Latest Location +deep-equal MISSING 1.0.0 1.0.0 npm +glob 4.5.3 4.5.3 5.0.10 npm > rimraf +``` + +Previously the `Location` field was telling you where the module was on +disk. Now it tells you what requires the module. When more than one thing +requires the module you'll see it listed once for each thing requiring it. + +##### Install: it works different! + +* [#6928](https://github.com/npm/npm/issues/6928) + ([#2931](https://github.com/npm/npm/issues/2931) + [#2950](https://github.com/npm/npm/issues/2950)) + `npm install` when you have an `npm-shrinkwrap.json` will ensure you have + the modules specified in it are installed in exactly the shape specified + no matter what you had when you started. +* [#6913](https://github.com/npm/npm/issues/6913) + ([#1341](https://github.com/npm/npm/issues/1341) + [#3124](https://github.com/npm/npm/issues/3124) + [#4956](https://github.com/npm/npm/issues/4956) + [#6349](https://github.com/npm/npm/issues/6349) + [#5465](https://github.com/npm/npm/issues/5465)) + `npm install` when some of your dependencies are missing sub-dependencies + will result in those sub-dependencies being installed. That is, `npm + install` now knows how to fix broken installs, most of the time. +* [#5465](https://github.com/npm/npm/issues/5465) + If you directly `npm install` a module that's already a subdep of + something else and your new version is incompatible, it will now install + the previous version nested in the things that need it. +* [`a2b50cf`](https://github.com/npm/npm/commit/a2b50cf) + [#5693](https://github.com/npm/npm/issues/5693) + When installing a new module, if it's mentioned in your + `npm-shrinkwrap.json` or your `package.json` use the version specifier + from there if you didn't specify one yourself. + +##### Flat, flat, flat! + +Your dependencies will now be installed *maximally flat*. Insofar as is +possible, all of your dependencies, and their dependencies, and THEIR +dependencies will be installed in your project's `node_modules` folder with no +nesting. You'll only see modules nested underneath one another when two (or +more) modules have conflicting dependencies. + +* [#3697](https://github.com/npm/npm/issues/3697) + This will hopefully eliminate most cases where Windows users ended up + with paths that were too long for Explorer and other standard tools to + deal with. +* [#6912](https://github.com/npm/npm/issues/6912) + ([#4761](https://github.com/npm/npm/issues/4761) + [#4037](https://github.com/npm/npm/issues/4037)) + This also means that your installs will be deduped from the start. +* [#5827](https://github.com/npm/npm/issues/5827) + This deduping even extends to git deps. +* [#6936](https://github.com/npm/npm/issues/6936) + ([#5698](https://github.com/npm/npm/issues/5698)) + Various commands are dedupe aware now. + +This has some implications for the behavior of other commands: + +* `npm uninstall` removes any dependencies of the module that you specified + that aren't required by any other module. Previously, it would only + remove those that happened to be installed under it, resulting in left + over cruft if you'd ever deduped. +* `npm ls` now shows you your dependency tree organized around what + requires what, rather than where those modules are on disk. +* [#6937](https://github.com/npm/npm/issues/6937) + `npm dedupe` now flattens the tree in addition to deduping. + +And bundling of dependencies when packing or publishing changes too: + +* [#2442](https://github.com/npm/npm/issues/2442) + bundledDependencies no longer requires that you specify deduped sub deps. + npm can now see that a dependency is required by something bundled and + automatically include it. To put that another way, bundledDependencies + should ONLY include things that you included in dependencies, + optionalDependencies or devDependencies. +* [#5437](https://github.com/npm/npm/issues/5437) + When bundling a dependency that's both a `devDependency` and the child of + a regular `dependency`, npm bundles the child dependency. + +As a demonstration of our confidence in our own work, npm's own +dependencies are now flattened, deduped, and bundled in the `npm@3` style. +This means that `npm@3` can't be packed or published by `npm@2`, which is +something to be aware of if you're hacking on npm. + +##### Shrinkwraps: they are a-changin'! + +First of all, they should be idempotent now +([#5779](https://github.com/npm/npm/issues/5779)). No more differences +because the first time you install (without `npm-shrinkwrap.json`) and the +second time (with `npm-shrinkwrap.json`). + +* [#6781](https://github.com/npm/npm/issues/6781) + Second, if you save your changes to `package.json` and you have + `npm-shrinkwrap.json`, then it will be updated as well. This applies to + all of the commands that update your tree: + * `npm install --save` + * `npm update --save` + * `npm dedupe --save` ([#6410](https://github.com/npm/npm/issues/6410)) + * `npm uninstall --save` +* [#4944](https://github.com/npm/npm/issues/4944) + ([#5161](https://github.com/npm/npm/issues/5161) + [#5448](https://github.com/npm/npm/issues/5448)) + Third, because `node_modules` folders are now deduped and flat, + shrinkwrap has to also be smart enough to handle this. + +And finally, enjoy this shrinkwrap bug fix: + +* [#3675](https://github.com/npm/npm/issues/3675) + When shrinkwrapping a dependency that's both a `devDependency` and the + child of a regular `dependency`, npm now correctly includes the child. + +##### The Age of Progress (Bars)! + +* [#6911](https://github.com/npm/npm/issues/6911) + ([#1257](https://github.com/npm/npm/issues/1257) + [#5340](https://github.com/npm/npm/issues/5340) + [#6420](https://github.com/npm/npm/issues/6420)) + The spinner is gone (yay? boo? will you miss it?), and in its place npm + has _progress bars_, so you actually have some sense of how long installs + will take. It's provided in Unicode and non-Unicode variants, and Unicode + support is automatically detected from your environment. + +#### TINY JEWELS + +The bottom is where we usually hide the less interesting bits of each +release, but each of these are small but incredibly useful bits of this +release, and very much worth checking out: + +* [`9ebe312`](https://github.com/npm/npm/commit/9ebe312) + Build system maintainers, rejoice: npm does a better job of cleaning up + after itself in your temporary folder. +* [#6942](https://github.com/npm/npm/issues/6942) + Check for permissions issues prior to actually trying to install + anything. +* Emit warnings at the end of the installation when possible, so that + they'll be on your screen when npm stops. +* [#3505](https://github.com/npm/npm/issues/3505) + `npm --dry-run`: You can now ask that npm only report what it _would have + done_ with the new `--dry-run` flag. This can be passed to any of the + commands that change your `node_modules` folder: `install`, `uninstall`, + `update` and `dedupe`. +* [`81b46fb`](https://github.com/npm/npm/commit/81b46fb) + npm now knows the correct URLs for `npm bugs` and `npm repo` for + repositories hosted on Bitbucket and GitLab, just like it does for GitHub + (and GitHub support now extends to projects hosted as gists as well as + traditional repositories). +* [`5be4008a`](https://github.com/npm/npm/commit/5be4008a09730cfa3891d9f145e4ec7f2accd144) + npm has been cleaned up to pass the [`standard`](http://npm.im/standard) + style checker. Forrest and Rebecca both feel this makes it easier to read + and understand the code, and should also make it easier for new + contributors to put merge-ready patches. + ([@othiym23](https://github.com/othiym23)) + +#### ZARRO BOOGS + +* [`6401643`](https://github.com/npm/npm/commit/6401643) + Make sure the global install directory exists before installing to it. + ([@thefourtheye](https://github.com/thefourtheye)) +* [#6158](https://github.com/npm/npm/issues/6158) + When we remove modules we do so inside-out running unbuild for each one. +* [`960a765`](https://github.com/npm/npm/commit/960a765) + The short usage information for each subcommand has been brought in sync + with the documentation. ([@smikes](https://github.com/smikes)) diff --git a/bin/nodejs5.12.0/node_modules/npm/CONTRIBUTING.md b/bin/nodejs5.12.0/node_modules/npm/CONTRIBUTING.md new file mode 100644 index 00000000..65a91001 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/CONTRIBUTING.md @@ -0,0 +1,12 @@ +## Before you submit a new issue + +* Check if there's a simple solution in the + [Troubleshooting](https://github.com/npm/npm/wiki/Troubleshooting) + wiki. +* [Search for similar + issues](https://github.com/npm/npm/search?q=Similar%20issues&type=Issues). +* Ensure your new issue conforms to the [Contributing + Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines). + +Participation in this open source project is subject to the [npm Code +of Conduct](http://www.npmjs.com/policies/conduct). diff --git a/bin/nodejs5.12.0/node_modules/npm/LICENSE b/bin/nodejs5.12.0/node_modules/npm/LICENSE new file mode 100644 index 00000000..cd9b6bd9 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/LICENSE @@ -0,0 +1,235 @@ +The npm application +Copyright (c) npm, Inc. and Contributors +Licensed on the terms of The Artistic License 2.0 + +Node package dependencies of the npm application +Copyright (c) their respective copyright owners +Licensed on their respective license terms + +The npm public registry at https://registry.npmjs.org +and the npm website at https://www.npmjs.com +Operated by npm, Inc. +Use governed by terms published on https://www.npmjs.com + +"Node.js" +Trademark Joyent, Inc., https://joyent.com +Neither npm nor npm, Inc. are affiliated with Joyent, Inc. + +The Node.js application +Project of Node Foundation, https://nodejs.org + +The npm Logo +Copyright (c) Mathias Pettersson and Brian Hammond + +"Gubblebum Blocky" typeface +Copyright (c) Tjarda Koster, https://jelloween.deviantart.com +Used with permission + + +-------- + + +The Artistic License 2.0 + +Copyright (c) 2000-2006, The Perl Foundation. + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +This license establishes the terms under which a given free software +Package may be copied, modified, distributed, and/or redistributed. +The intent is that the Copyright Holder maintains some artistic +control over the development of that Package while still keeping the +Package available as open source and free software. + +You are always permitted to make arrangements wholly outside of this +license directly with the Copyright Holder of a given Package. If the +terms of this license do not permit the full use that you propose to +make of the Package, you should contact the Copyright Holder and seek +a different licensing arrangement. + +Definitions + + "Copyright Holder" means the individual(s) or organization(s) + named in the copyright notice for the entire Package. + + "Contributor" means any party that has contributed code or other + material to the Package, in accordance with the Copyright Holder's + procedures. + + "You" and "your" means any person who would like to copy, + distribute, or modify the Package. + + "Package" means the collection of files distributed by the + Copyright Holder, and derivatives of that collection and/or of + those files. A given Package may consist of either the Standard + Version, or a Modified Version. + + "Distribute" means providing a copy of the Package or making it + accessible to anyone else, or in the case of a company or + organization, to others outside of your company or organization. + + "Distributor Fee" means any fee that you charge for Distributing + this Package or providing support for this Package to another + party. It does not mean licensing fees. + + "Standard Version" refers to the Package if it has not been + modified, or has been modified only in ways explicitly requested + by the Copyright Holder. + + "Modified Version" means the Package, if it has been changed, and + such changes were not explicitly requested by the Copyright + Holder. + + "Original License" means this Artistic License as Distributed with + the Standard Version of the Package, in its current version or as + it may be modified by The Perl Foundation in the future. + + "Source" form means the source code, documentation source, and + configuration files for the Package. + + "Compiled" form means the compiled bytecode, object code, binary, + or any other form resulting from mechanical transformation or + translation of the Source form. + + +Permission for Use and Modification Without Distribution + +(1) You are permitted to use the Standard Version and create and use +Modified Versions for any purpose without restriction, provided that +you do not Distribute the Modified Version. + + +Permissions for Redistribution of the Standard Version + +(2) You may Distribute verbatim copies of the Source form of the +Standard Version of this Package in any medium without restriction, +either gratis or for a Distributor Fee, provided that you duplicate +all of the original copyright notices and associated disclaimers. At +your discretion, such verbatim copies may or may not include a +Compiled form of the Package. + +(3) You may apply any bug fixes, portability changes, and other +modifications made available from the Copyright Holder. The resulting +Package will still be considered the Standard Version, and as such +will be subject to the Original License. + + +Distribution of Modified Versions of the Package as Source + +(4) You may Distribute your Modified Version as Source (either gratis +or for a Distributor Fee, and with or without a Compiled form of the +Modified Version) provided that you clearly document how it differs +from the Standard Version, including, but not limited to, documenting +any non-standard features, executables, or modules, and provided that +you do at least ONE of the following: + + (a) make the Modified Version available to the Copyright Holder + of the Standard Version, under the Original License, so that the + Copyright Holder may include your modifications in the Standard + Version. + + (b) ensure that installation of your Modified Version does not + prevent the user installing or running the Standard Version. In + addition, the Modified Version must bear a name that is different + from the name of the Standard Version. + + (c) allow anyone who receives a copy of the Modified Version to + make the Source form of the Modified Version available to others + under + + (i) the Original License or + + (ii) a license that permits the licensee to freely copy, + modify and redistribute the Modified Version using the same + licensing terms that apply to the copy that the licensee + received, and requires that the Source form of the Modified + Version, and of any works derived from it, be made freely + available in that license fees are prohibited but Distributor + Fees are allowed. + + +Distribution of Compiled Forms of the Standard Version +or Modified Versions without the Source + +(5) You may Distribute Compiled forms of the Standard Version without +the Source, provided that you include complete instructions on how to +get the Source of the Standard Version. Such instructions must be +valid at the time of your distribution. If these instructions, at any +time while you are carrying out such distribution, become invalid, you +must provide new instructions on demand or cease further distribution. +If you provide valid instructions or cease distribution within thirty +days after you become aware that the instructions are invalid, then +you do not forfeit any of your rights under this license. + +(6) You may Distribute a Modified Version in Compiled form without +the Source, provided that you comply with Section 4 with respect to +the Source of the Modified Version. + + +Aggregating or Linking the Package + +(7) You may aggregate the Package (either the Standard Version or +Modified Version) with other packages and Distribute the resulting +aggregation provided that you do not charge a licensing fee for the +Package. Distributor Fees are permitted, and licensing fees for other +components in the aggregation are permitted. The terms of this license +apply to the use and Distribution of the Standard or Modified Versions +as included in the aggregation. + +(8) You are permitted to link Modified and Standard Versions with +other works, to embed the Package in a larger work of your own, or to +build stand-alone binary or bytecode versions of applications that +include the Package, and Distribute the result without restriction, +provided the result does not expose a direct interface to the Package. + + +Items That are Not Considered Part of a Modified Version + +(9) Works (including, but not limited to, modules and scripts) that +merely extend or make use of the Package, do not, by themselves, cause +the Package to be a Modified Version. In addition, such works are not +considered parts of the Package itself, and are not subject to the +terms of this license. + + +General Provisions + +(10) Any use, modification, and distribution of the Standard or +Modified Versions is governed by this Artistic License. By using, +modifying or distributing the Package, you accept this license. Do not +use, modify, or distribute the Package, if you do not accept this +license. + +(11) If your Modified Version has been derived from a Modified +Version made by someone other than you, you are nevertheless required +to ensure that your Modified Version complies with the requirements of +this license. + +(12) This license does not grant you the right to use any trademark, +service mark, tradename, or logo of the Copyright Holder. + +(13) This license includes the non-exclusive, worldwide, +free-of-charge patent license to make, have made, use, offer to sell, +sell, import and otherwise transfer the Package with respect to any +patent claims licensable by the Copyright Holder that are necessarily +infringed by the Package. If you institute patent litigation +(including a cross-claim or counterclaim) against any party alleging +that the Package constitutes direct or contributory patent +infringement, then this Artistic License to you shall terminate on the +date that such litigation is filed. + +(14) Disclaimer of Warranty: +THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS +IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL +LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------- diff --git a/bin/nodejs5.12.0/node_modules/npm/Makefile b/bin/nodejs5.12.0/node_modules/npm/Makefile new file mode 100644 index 00000000..55292941 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/Makefile @@ -0,0 +1,182 @@ +# vim: set softtabstop=2 shiftwidth=2: +SHELL = bash + +PUBLISHTAG = $(shell node scripts/publish-tag.js) +BRANCH = $(shell git rev-parse --abbrev-ref HEAD) + +markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md + +html_docdeps = html/dochead.html \ + html/docfoot.html \ + scripts/doc-build.sh \ + package.json + +cli_mandocs = $(shell find doc/cli -name '*.md' \ + |sed 's|.md|.1|g' \ + |sed 's|doc/cli/|man/man1/|g' ) \ + man/man1/npm-README.1 + +files_mandocs = $(shell find doc/files -name '*.md' \ + |sed 's|.md|.5|g' \ + |sed 's|doc/files/|man/man5/|g' ) \ + man/man5/npm-json.5 \ + man/man5/npm-global.5 + +misc_mandocs = $(shell find doc/misc -name '*.md' \ + |sed 's|.md|.7|g' \ + |sed 's|doc/misc/|man/man7/|g' ) \ + man/man7/npm-index.7 + +cli_htmldocs = $(shell find doc/cli -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/cli/|html/doc/cli/|g' ) \ + html/doc/README.html + +files_htmldocs = $(shell find doc/files -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/files/|html/doc/files/|g' ) \ + html/doc/files/npm-json.html \ + html/doc/files/npm-global.html + +misc_htmldocs = $(shell find doc/misc -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/misc/|html/doc/misc/|g' ) \ + html/doc/index.html + +mandocs = $(cli_mandocs) $(files_mandocs) $(misc_mandocs) + +htmldocs = $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs) + +all: doc + +latest: + @echo "Installing latest published npm" + @echo "Use 'make install' or 'make link' to install the code" + @echo "in this folder that you're looking at right now." + node cli.js install -g -f npm ${NPMOPTS} + +install: all + node cli.js install -g -f ${NPMOPTS} + +# backwards compat +dev: install + +link: uninstall + node cli.js link -f + +clean: markedclean marked-manclean doc-clean uninstall + rm -rf npmrc + node cli.js cache clean + +uninstall: + node cli.js rm npm -g -f + +doc: $(mandocs) $(htmldocs) + +markedclean: + rm -rf node_modules/marked node_modules/.bin/marked .building_marked + +marked-manclean: + rm -rf node_modules/marked-man node_modules/.bin/marked-man .building_marked-man + +docclean: doc-clean +doc-clean: + rm -rf \ + .building_marked \ + .building_marked-man \ + html/doc \ + man + +# use `npm install marked-man` for this to work. +man/man1/npm-README.1: README.md scripts/doc-build.sh package.json + @[ -d man/man1 ] || mkdir -p man/man1 + scripts/doc-build.sh $< $@ + +man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json + @[ -d man/man1 ] || mkdir -p man/man1 + scripts/doc-build.sh $< $@ + +man/man5/npm-json.5: man/man5/package.json.5 + cp $< $@ + +man/man5/npm-global.5: man/man5/npm-folders.5 + cp $< $@ + +man/man5/%.5: doc/files/%.md scripts/doc-build.sh package.json + @[ -d man/man5 ] || mkdir -p man/man5 + scripts/doc-build.sh $< $@ + +doc/misc/npm-index.md: scripts/index-build.js package.json + node scripts/index-build.js > $@ + +html/doc/index.html: doc/misc/npm-index.md $(html_docdeps) + @[ -d html/doc ] || mkdir -p html/doc + scripts/doc-build.sh $< $@ + +man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json + @[ -d man/man7 ] || mkdir -p man/man7 + scripts/doc-build.sh $< $@ + +html/doc/README.html: README.md $(html_docdeps) + @[ -d html/doc ] || mkdir -p html/doc + scripts/doc-build.sh $< $@ + +html/doc/cli/%.html: doc/cli/%.md $(html_docdeps) + @[ -d html/doc/cli ] || mkdir -p html/doc/cli + scripts/doc-build.sh $< $@ + +html/doc/files/npm-json.html: html/doc/files/package.json.html + cp $< $@ + +html/doc/files/npm-global.html: html/doc/files/npm-folders.html + cp $< $@ + +html/doc/files/%.html: doc/files/%.md $(html_docdeps) + @[ -d html/doc/files ] || mkdir -p html/doc/files + scripts/doc-build.sh $< $@ + +html/doc/misc/%.html: doc/misc/%.md $(html_docdeps) + @[ -d html/doc/misc ] || mkdir -p html/doc/misc + scripts/doc-build.sh $< $@ + + +marked: node_modules/.bin/marked + +node_modules/.bin/marked: + node cli.js install marked --no-global + +marked-man: node_modules/.bin/marked-man + +node_modules/.bin/marked-man: + node cli.js install marked-man --no-global + +doc: man + +man: $(cli_docs) + +test: doc + node cli.js test + +tag: + npm tag npm@$(PUBLISHTAG) latest + +ls-ok: + node . ls >/dev/null + +gitclean: + git clean -fd + +publish: gitclean ls-ok link doc-clean doc + @git push origin :v$(shell npm -v) 2>&1 || true + git push origin $(BRANCH) &&\ + git push origin --tags &&\ + npm publish --tag=$(PUBLISHTAG) + +release: gitclean ls-ok markedclean marked-manclean doc-clean doc + node cli.js prune --production + @bash scripts/release.sh + +sandwich: + @[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || (echo "make it yourself" && exit 13) + +.PHONY: all latest install dev link doc clean uninstall test man doc-clean docclean release ls-ok realclean diff --git a/bin/nodejs5.12.0/node_modules/npm/README.md b/bin/nodejs5.12.0/node_modules/npm/README.md new file mode 100644 index 00000000..45e96faa --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/README.md @@ -0,0 +1,167 @@ +npm(1) -- a JavaScript package manager +============================== +[![Build Status](https://img.shields.io/travis/npm/npm/master.svg)](https://travis-ci.org/npm/npm) +## SYNOPSIS + +This is just enough info to get you up and running. + +Much more info available via `npm help` once it's installed. + +## IMPORTANT + +**You need node v0.8 or higher to run this program.** + +To install an old **and unsupported** version of npm that works on node 0.3 +and prior, clone the git repo and dig through the old tags and branches. + +**npm is configured to use npm, Inc.'s public package registry at +<https://registry.npmjs.org> by default.** + +You can configure npm to use any compatible registry you +like, and even run your own registry. Check out the [doc on +registries](https://docs.npmjs.com/misc/registry). + +Use of someone else's registry may be governed by terms of use. The +terms of use for the default public registry are available at +<https://www.npmjs.com>. + +## Super Easy Install + +npm is bundled with [node](http://nodejs.org/download/). + +### Windows Computers + +[Get the MSI](http://nodejs.org/download/). npm is in it. + +### Apple Macintosh Computers + +[Get the pkg](http://nodejs.org/download/). npm is in it. + +### Other Sorts of Unices + +Run `make install`. npm will be installed with node. + +If you want a more fancy pants install (a different version, customized +paths, etc.) then read on. + +## Fancy Install (Unix) + +There's a pretty robust install script at +<https://www.npmjs.com/install.sh>. You can download that and run it. + +Here's an example using curl: + +```sh +curl -L https://www.npmjs.com/install.sh | sh +``` + +### Slightly Fancier + +You can set any npm configuration params with that script: + +```sh +npm_config_prefix=/some/path sh install.sh +``` + +Or, you can run it in uber-debuggery mode: + +```sh +npm_debug=1 sh install.sh +``` + +### Even Fancier + +Get the code with git. Use `make` to build the docs and do other stuff. +If you plan on hacking on npm, `make link` is your friend. + +If you've got the npm source code, you can also semi-permanently set +arbitrary config keys using the `./configure --key=val ...`, and then +run npm commands by doing `node cli.js <cmd> <args>`. (This is helpful +for testing, or running stuff without actually installing npm itself.) + +## Windows Install or Upgrade + +You can download a zip file from <https://github.com/npm/npm/releases>, and +unpack it in the `node_modules\npm\` folder inside node's installation folder. + +To upgrade to npm 2, follow the Windows upgrade instructions in +the npm Troubleshooting Guide: + +<https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows> + +If that's not fancy enough for you, then you can fetch the code with +git, and mess with it directly. + +## Installing on Cygwin + +No. + +## Uninstalling + +So sad to see you go. + +```sh +sudo npm uninstall npm -g +``` +Or, if that fails, + +```sh +sudo make uninstall +``` + +## More Severe Uninstalling + +Usually, the above instructions are sufficient. That will remove +npm, but leave behind anything you've installed. + +If you would like to remove all the packages that you have installed, +then you can use the `npm ls` command to find them, and then `npm rm` to +remove them. + +To remove cruft left behind by npm 0.x, you can use the included +`clean-old.sh` script file. You can run it conveniently like this: + +```sh +npm explore npm -g -- sh scripts/clean-old.sh +``` + +npm uses two configuration files, one for per-user configs, and another +for global (every-user) configs. You can view them by doing: + +```sh +npm config get userconfig # defaults to ~/.npmrc +npm config get globalconfig # defaults to /usr/local/etc/npmrc +``` + +Uninstalling npm does not remove configuration files by default. You +must remove them yourself manually if you want them gone. Note that +this means that future npm installs will not remember the settings that +you have chosen. + +## More Docs + +Check out the [docs](https://docs.npmjs.com/), + +You can use the `npm help` command to read any of them. + +If you're a developer, and you want to use npm to publish your program, +you should [read this](https://docs.npmjs.com/misc/developers) + +## BUGS + +When you find issues, please report them: + +* web: + <https://github.com/npm/npm/issues> + +Be sure to include *all* of the output from the npm command that didn't work +as expected. The `npm-debug.log` file is also helpful to provide. + +You can also look for isaacs in #node.js on irc://irc.freenode.net. He +will no doubt tell you to put the output in a gist or email. + +## SEE ALSO + +* npm(1) +* npm-help(1) +* npm-index(7) diff --git a/bin/nodejs5.12.0/node_modules/npm/bin/npm b/bin/nodejs5.12.0/node_modules/npm/bin/npm new file mode 100644 index 00000000..1226afbc --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/bin/npm @@ -0,0 +1,34 @@ +#!/bin/sh +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node +fi + +NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" + +case `uname` in + *MINGW*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; + *CYGWIN*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; +esac + +"$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/bin/nodejs5.12.0/node_modules/npm/bin/npm-cli.js b/bin/nodejs5.12.0/node_modules/npm/bin/npm-cli.js new file mode 100644 index 00000000..190a252b --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/bin/npm-cli.js @@ -0,0 +1,76 @@ +#!/usr/bin/env node +;(function () { // wrapper in case we're in module_context mode + + // windows: running "npm blah" in this folder will invoke WSH, not node. + /*global WScript*/ + if (typeof WScript !== 'undefined') { + WScript.echo( + 'npm does not work when run\n' + + 'with the Windows Scripting Host\n\n' + + "'cd' to a different directory,\n" + + "or type 'npm.cmd <args>',\n" + + "or type 'node npm <args>'." + ) + WScript.quit(1) + return + } + + process.title = 'npm' + + var log = require('npmlog') + log.pause() // will be unpaused when config is loaded. + + log.info('it worked if it ends with', 'ok') + + var path = require('path') + var npm = require('../lib/npm.js') + var npmconf = require('../lib/config/core.js') + var errorHandler = require('../lib/utils/error-handler.js') + + var configDefs = npmconf.defs + var shorthands = configDefs.shorthands + var types = configDefs.types + var nopt = require('nopt') + + // if npm is called as "npmg" or "npm_g", then + // run in global mode. + if (path.basename(process.argv[1]).slice(-1) === 'g') { + process.argv.splice(1, 1, 'npm', '-g') + } + + log.verbose('cli', process.argv) + + var conf = nopt(types, shorthands) + npm.argv = conf.argv.remain + if (npm.deref(npm.argv[0])) npm.command = npm.argv.shift() + else conf.usage = true + + if (conf.version) { + console.log(npm.version) + return + } + + if (conf.versions) { + npm.command = 'version' + conf.usage = false + npm.argv = [] + } + + log.info('using', 'npm@%s', npm.version) + log.info('using', 'node@%s', process.version) + + process.on('uncaughtException', errorHandler) + + if (conf.usage && npm.command !== 'help') { + npm.argv.unshift(npm.command) + npm.command = 'help' + } + + // now actually fire up npm and run the command. + // this is how to use npm programmatically: + conf._exit = true + npm.load(conf, function (er) { + if (er) return errorHandler(er) + npm.commands[npm.command](npm.argv, errorHandler) + }) +})() diff --git a/bin/nodejs5.12.0/node_modules/npm/bin/npm.cmd b/bin/nodejs5.12.0/node_modules/npm/bin/npm.cmd new file mode 100644 index 00000000..f111c59d --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/bin/npm.cmd @@ -0,0 +1,19 @@ +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/bin/nodejs5.12.0/node_modules/npm/bin/read-package-json.js b/bin/nodejs5.12.0/node_modules/npm/bin/read-package-json.js new file mode 100644 index 00000000..9f32701c --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/bin/read-package-json.js @@ -0,0 +1,24 @@ +var argv = process.argv +if (argv.length < 3) { + console.error('Usage: read-package.json <file> [<fields> ...]') + process.exit(1) +} + +var file = argv[2] +var readJson = require('read-package-json') + +readJson(file, function (er, data) { + if (er) throw er + if (argv.length === 3) { + console.log(data) + } else { + argv.slice(3).forEach(function (field) { + field = field.split('.') + var val = data + field.forEach(function (f) { + val = val[f] + }) + console.log(val) + }) + } +}) diff --git a/bin/nodejs5.12.0/node_modules/npm/changelogs/CHANGELOG-1.md b/bin/nodejs5.12.0/node_modules/npm/changelogs/CHANGELOG-1.md new file mode 100644 index 00000000..0adaed7d --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/changelogs/CHANGELOG-1.md @@ -0,0 +1,743 @@ +### v1.4.29 (2015-10-29): + +#### THINGS ARE HAPPENING IN LTS LAND + +In a special one-off release as part of the [strategy to get a version of npm +into Node LTS that works with the current +registry](https://github.com/nodejs/LTS/issues/37), modify npm to print out +this deprecation banner literally every time npm is invoked to do anything: + +``` +npm WARN deprecated This version of npm lacks support for important features, +npm WARN deprecated such as scoped packages, offered by the primary npm +npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the +npm WARN deprecated latest stable version. To upgrade to npm@2, run: +npm WARN deprecated +npm WARN deprecated npm -g install npm@latest-2 +npm WARN deprecated +npm WARN deprecated To upgrade to the latest stable version, run: +npm WARN deprecated +npm WARN deprecated npm -g install npm@latest +npm WARN deprecated +npm WARN deprecated (Depending on how Node.js was installed on your system, you +npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if +npm WARN deprecated on Windows, run them from an Administrator prompt.) +npm WARN deprecated +npm WARN deprecated If you're running the version of npm bundled with +npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS +npm WARN deprecated will be bundled with a version of npm@2, which has some small +npm WARN deprecated backwards-incompatible changes made to `npm run-script` and +npm WARN deprecated semver behavior. +``` + +The message basically tells the tale: Node 0.10 will finally be getting +`npm@2`, so those of you who haven't upgraded your build systems to deal with +its (relatively small) breaking changes should do so now. + +Also, this version doesn't even pretend that it can deal with scoped packages, +which, given the confusing behavior of older versions of `npm@1.4`, where it +would sometimes try to install packages from GitHub, is a distinct improvement. + +There is no good reason for you as an end user to upgrade to this version of +npm yourself. + +* [`709e9b4`](https://github.com/npm/npm/commit/709e9b44f5df9817a1c4babfbf26a2329bd265fb) + Print 20-line deprecation banner on all command invocations. + ([@othiym23](https://github.com/othiym23)) +* [`0c29d09`](https://github.com/npm/npm/commit/0c29d0906608e8e174bd30a7a245e19795326051) + Crash out immediately with an exhortation to upgrade on attempts to use + scoped packages. ([@othiym23](https://github.com/othiym23)) + +### v1.5.0-alpha-4 (2014-07-18): + +* fall back to `_auth` config as default auth when using default registry + ([@isaacs](https://github.com/isaacs)) +* support for 'init.version' for those who don't want to deal with semver 0.0.x + oddities ([@rvagg](https://github.com/rvagg)) +* [`be06213`](https://github.com/npm/npm/commit/be06213415f2d51a50d2c792b4cd0d3412a9a7b1) + remove residual support for `win` log level + ([@aterris](https://github.com/aterris)) + +### v1.5.0-alpha-3 (2014-07-17): + +* [`a3a85dd`](https://github.com/npm/npm/commit/a3a85dd004c9245a71ad2f0213bd1a9a90d64cd6) + `--save` scoped packages correctly ([@othiym23](https://github.com/othiym23)) +* [`18a3385`](https://github.com/npm/npm/commit/18a3385bcf8bfb8312239216afbffb7eec759150) + `npm-registry-client@3.0.2` ([@othiym23](https://github.com/othiym23)) +* [`375988b`](https://github.com/npm/npm/commit/375988b9bf5aa5170f06a790d624d31b1eb32c6d) + invalid package names are an early error for optional deps + ([@othiym23](https://github.com/othiym23)) +* consistently use `node-package-arg` instead of arbitrary package spec + splitting ([@othiym23](https://github.com/othiym23)) + +### v1.5.0-alpha-2 (2014-07-01): + +* [`54cf625`](https://github.com/npm/npm/commit/54cf62534e3331e3f454e609e44f0b944e819283) + fix handling for 301s in `npm-registry-client@3.0.1` + ([@Raynos](https://github.com/Raynos)) +* [`e410861`](https://github.com/npm/npm/commit/e410861c69a3799c1874614cb5b87af8124ff98d) + don't crash if no username set on `whoami` + ([@isaacs](https://github.com/isaacs)) +* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) + respect `--json` for output ([@isaacs](https://github.com/isaacs)) +* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) + outdated: Don't show headings if there's nothing to output + ([@isaacs](https://github.com/isaacs)) +* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) + outdated: Default to `latest` rather than `*` for unspecified deps + ([@isaacs](https://github.com/isaacs)) + +### v1.5.0-alpha-1 (2014-07-01): + +* [`eef4884`](https://github.com/npm/npm/commit/eef4884d6487ee029813e60a5f9c54e67925d9fa) + use the correct piece of the spec for GitHub shortcuts + ([@othiym23](https://github.com/othiym23)) + +### v1.5.0-alpha-0 (2014-07-01): + +* [`7f55057`](https://github.com/npm/npm/commit/7f55057807cfdd9ceaf6331968e666424f48116c) + install scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) + ([@othiym23](https://github.com/othiym23)) +* [`0df7e16`](https://github.com/npm/npm/commit/0df7e16c0232d8f4d036ebf4ec3563215517caac) + publish scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) + ([@othiym23](https://github.com/othiym23)) +* [`0689ba2`](https://github.com/npm/npm/commit/0689ba249b92b4c6279a26804c96af6f92b3a501) + support (and save) --scope=@s config + ([@othiym23](https://github.com/othiym23)) +* [`f34878f`](https://github.com/npm/npm/commit/f34878fc4cee29901e4daf7bace94be01e25cad7) + scope credentials to registry ([@othiym23](https://github.com/othiym23)) +* [`0ac7ca2`](https://github.com/npm/npm/commit/0ac7ca233f7a69751fe4386af6c4daa3ee9fc0da) + capture and store bearer tokens when sent by registry + ([@othiym23](https://github.com/othiym23)) +* [`63c3277`](https://github.com/npm/npm/commit/63c3277f089b2c4417e922826bdc313ac854cad6) + only delete files that are created by npm + ([@othiym23](https://github.com/othiym23)) +* [`4f54043`](https://github.com/npm/npm/commit/4f540437091d1cbca3915cd20c2da83c2a88bb8e) + `npm-package-arg@2.0.0` ([@othiym23](https://github.com/othiym23)) +* [`9e1460e`](https://github.com/npm/npm/commit/9e1460e6ac9433019758481ec031358f4af4cd44) + `read-package-json@1.2.3` ([@othiym23](https://github.com/othiym23)) +* [`719d8ad`](https://github.com/npm/npm/commit/719d8adb9082401f905ff4207ede494661f8a554) + `fs-vacuum@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`9ef8fe4`](https://github.com/npm/npm/commit/9ef8fe4d6ead3acb3e88c712000e2d3a9480ebec) + `async-some@1.0.0` ([@othiym23](https://github.com/othiym23)) +* [`a964f65`](https://github.com/npm/npm/commit/a964f65ab662107b62a4ca58535ce817e8cca331) + `npmconf@2.0.1` ([@othiym23](https://github.com/othiym23)) +* [`113765b`](https://github.com/npm/npm/commit/113765bfb7d3801917c1d9f124b8b3d942bec89a) + `npm-registry-client@3.0.0` ([@othiym23](https://github.com/othiym23)) + +### v1.4.28 (2014-09-12): + +* [`f4540b6`](https://github.com/npm/npm/commit/f4540b6537a87e653d7495a9ddcf72949fdd4d14) + [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just + before the CLI exits ([@isaacs](https://github.com/isaacs)) +* [`1eabfd5`](https://github.com/npm/npm/commit/1eabfd5c03f33c2bd28823714ff02059eeee3899) + [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all + callbacks have finished before proceeding + ([@othiym23](https://github.com/othiym23)) + +### v1.4.27 (2014-09-04): + +* [`4cf3c8f`](https://github.com/npm/npm/commit/4cf3c8fd78c9e2693a5f899f50c28f4823c88e2e) + [#6007](https://github.com/npm/npm/issues/6007) request@2.42.0: properly set + headers on proxy requests ([@isaacs](https://github.com/isaacs)) +* [`403cb52`](https://github.com/npm/npm/commit/403cb526be1472bb7545fa8e62d4976382cdbbe5) + [#6055](https://github.com/npm/npm/issues/6055) npmconf@1.1.8: restore + case-insensitivity of environmental config + ([@iarna](https://github.com/iarna)) + +### v1.4.26 (2014-08-28): + +* [`eceea95`](https://github.com/npm/npm/commit/eceea95c804fa15b18e91c52c0beb08d42a3e77d) + `github-url-from-git@1.4.0`: add support for git+https and git+ssh + ([@stefanbuck](https://github.com/stefanbuck)) +* [`e561758`](https://github.com/npm/npm/commit/e5617587e7d7ab686192391ce55357dbc7fed0a3) + `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`0c4fab3`](https://github.com/npm/npm/commit/0c4fab372ee76eab01dda83b6749429a8564902e) + `cmd-shim@2.0.0`: upgrade to graceful-fs 3 + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`2d69e4d`](https://github.com/npm/npm/commit/2d69e4d95777671958b5e08d3b2f5844109d73e4) + `github-url-from-username-repo@1.0.0`: accept slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`81f9b2b`](https://github.com/npm/npm/commit/81f9b2bac9d34c223ea093281ba3c495f23f10d1) + ensure lifecycle spawn errors caught properly + ([@isaacs](https://github.com/isaacs)) +* [`bfaab8c`](https://github.com/npm/npm/commit/bfaab8c6e0942382a96b250634ded22454c36b5a) + `npm-registry-client@2.0.7`: properly encode % in passwords + ([@isaacs](https://github.com/isaacs)) +* [`91cfb58`](https://github.com/npm/npm/commit/91cfb58dda851377ec604782263519f01fd96ad8) + doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) + +### v1.4.25 (2014-08-21): + +* [`64c0ec2`](https://github.com/npm/npm/commit/64c0ec241ef5d83761ca8de54acb3c41b079956e) + `npm-registry-client@2.0.6`: Print the notification header returned by the + registry, and make sure status codes are printed without gratuitous quotes + around them. + ([@othiym23](https://github.com/othiym23)) +* [`a8ed12b`](https://github.com/npm/npm/commit/a8ed12b) `tar@1.0.1`: + Add test for removing an extract target immediately after unpacking. + ([@isaacs](https://github.com/isaacs)) +* [`70fd11d`](https://github.com/npm/npm/commit/70fd11d) + `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, + and `retries` options. Part 2 of race condition leading to `ENOENT` + errors. + ([@isaacs](https://github.com/isaacs)) +* [`0072c4d`](https://github.com/npm/npm/commit/0072c4d) + `fstream@1.0.2`: Fix a double-finish call which can result in excess + FS operations after the `close` event. Part 2 of race condition + leading to `ENOENT` errors. + ([@isaacs](https://github.com/isaacs)) + +### v1.4.24 (2014-08-14): + +* [`9344bd9`](https://github.com/npm/npm/commit/9344bd9b2929b5c399a0e0e0b34d45bce7bc24bb) + doc: add new changelog ([@othiym23](https://github.com/othiym23)) +* [`4be76fd`](https://github.com/npm/npm/commit/4be76fd65e895883c337a99f275ccc8c801adda3) + doc: update version doc to include `pre-*` increment args + ([@isaacs](https://github.com/isaacs)) +* [`e4f2620`](https://github.com/npm/npm/commit/e4f262036080a282ad60e236a9aeebd39fde9fe4) + build: add `make tag` to tag current release as `latest` + ([@isaacs](https://github.com/isaacs)) +* [`ec2596a`](https://github.com/npm/npm/commit/ec2596a7cb626772780b25b0a94a7e547a812bd5) + build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) +* [`9ee55f8`](https://github.com/npm/npm/commit/9ee55f892b8b473032a43c59912c5684fd1b39e6) + build: add script to output `v1.4-next` publish tag + ([@isaacs](https://github.com/isaacs)) +* [`aecb56f`](https://github.com/npm/npm/commit/aecb56f95a84687ea46920a0b98aaa587fee1568) + build: remove outdated `docpublish` make target + ([@isaacs](https://github.com/isaacs)) +* [`b57a9b7`](https://github.com/npm/npm/commit/b57a9b7ccd13e6b38831ed63595c8ea5763da247) + build: remove unpublish step from `make publish` + ([@isaacs](https://github.com/isaacs)) +* [`2c6acb9`](https://github.com/npm/npm/commit/2c6acb96c71c16106965d5cd829b67195dd673c7) + install: rename `.gitignore` when unpacking foreign tarballs + ([@isaacs](https://github.com/isaacs)) +* [`22f3681`](https://github.com/npm/npm/commit/22f3681923e993a47fc1769ba735bfa3dd138082) + cache: detect non-gzipped tar files more reliably + ([@isaacs](https://github.com/isaacs)) + +### v1.4.23 (2014-07-31): + +* [`8dd11d1`](https://github.com/npm/npm/commit/8dd11d1) update several + dependencies to avoid using `semver`s starting with 0. + +### v1.4.22 (2014-07-31): + +* [`d9a9e84`](https://github.com/npm/npm/commit/d9a9e84) `read-package-json@1.2.4` + ([@isaacs](https://github.com/isaacs)) +* [`86f0340`](https://github.com/npm/npm/commit/86f0340) + `github-url-from-git@1.2.0` ([@isaacs](https://github.com/isaacs)) +* [`a94136a`](https://github.com/npm/npm/commit/a94136a) `fstream@0.1.29` + ([@isaacs](https://github.com/isaacs)) +* [`bb82d18`](https://github.com/npm/npm/commit/bb82d18) `glob@4.0.5` + ([@isaacs](https://github.com/isaacs)) +* [`5b6bcf4`](https://github.com/npm/npm/commit/5b6bcf4) `cmd-shim@1.1.2` + ([@isaacs](https://github.com/isaacs)) +* [`c2aa8b3`](https://github.com/npm/npm/commit/c2aa8b3) license: Cleaned up + legalese with actual lawyer ([@isaacs](https://github.com/isaacs)) +* [`63fe0ee`](https://github.com/npm/npm/commit/63fe0ee) `init-package-json@1.0.0` + ([@isaacs](https://github.com/isaacs)) + +### v1.4.21 (2014-07-14): + +* [`88f51aa`](https://github.com/npm/npm/commit/88f51aa27eb9a958d1fa7ec50fee5cfdedd05110) + fix handling for 301s in `npm-registry-client@2.0.3` + ([@Raynos](https://github.com/Raynos)) + +### v1.4.20 (2014-07-02): + +* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) + respect `--json` for output ([@isaacs](https://github.com/isaacs)) +* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) + outdated: Don't show headings if there's nothing to output + ([@isaacs](https://github.com/isaacs)) +* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) + outdated: Default to `latest` rather than `*` for unspecified deps + ([@isaacs](https://github.com/isaacs)) + +### v1.4.19 (2014-07-01): + +* [`f687433`](https://github.com/npm/npm/commit/f687433) relative URLS for + working non-root registry URLS ([@othiym23](https://github.com/othiym23)) +* [`bea190c`](https://github.com/npm/npm/commit/bea190c) + [#5591](https://github.com/npm/npm/issues/5591) bump nopt and npmconf + ([@isaacs](https://github.com/isaacs)) + +### v1.4.18 (2014-06-29): + +* Bump glob dependency from 4.0.2 to 4.0.3. It now uses graceful-fs when + available, increasing resilience to [various filesystem + errors](https://github.com/isaacs/node-graceful-fs#improvements-over-fs-module). + ([@isaacs](https://github.com/isaacs)) + +### v1.4.17 (2014-06-27): + +* replace escape codes with ansicolors + ([@othiym23](https://github.com/othiym23)) +* Allow to build all the docs OOTB. ([@GeJ](https://github.com/GeJ)) +* Use core.longpaths on win32 git - fixes + [#5525](https://github.com/npm/npm/issues/5525) ([@bmeck](https://github.com/bmeck)) +* `npmconf@1.1.2` ([@isaacs](https://github.com/isaacs)) +* Consolidate color sniffing in config/log loading process + ([@isaacs](https://github.com/isaacs)) +* add verbose log when project config file is ignored + ([@isaacs](https://github.com/isaacs)) +* npmconf: Float patch to remove 'scope' from config defs + ([@isaacs](https://github.com/isaacs)) +* doc: npm-explore can't handle a version + ([@robertkowalski](https://github.com/robertkowalski)) +* Add user-friendly errors for ENOSPC and EROFS. + ([@voodootikigod](https://github.com/voodootikigod)) +* bump tar and fstream deps ([@isaacs](https://github.com/isaacs)) +* Run the npm-registry-couchapp tests along with npm tests + ([@isaacs](https://github.com/isaacs)) + +### v1.2.8000 (2014-06-17): + +* Same as v1.4.16, but with the spinner disabled, and a version number that + starts with v1.2. + +### v1.4.16 (2014-06-17): + +* `npm-registry-client@2.0.2` ([@isaacs](https://github.com/isaacs)) +* `fstream@0.1.27` ([@isaacs](https://github.com/isaacs)) +* `sha@1.2.4` ([@isaacs](https://github.com/isaacs)) +* `rimraf@2.2.8` ([@isaacs](https://github.com/isaacs)) +* `npmlog@1.0.1` ([@isaacs](https://github.com/isaacs)) +* `npm-registry-client@2.0.1` ([@isaacs](https://github.com/isaacs)) +* removed redundant dependency ([@othiym23](https://github.com/othiym23)) +* `npmconf@1.0.5` ([@isaacs](https://github.com/isaacs)) +* Properly handle errors that can occur in the config-loading process + ([@isaacs](https://github.com/isaacs)) + +### v1.4.15 (2014-06-10): + +* cache: atomic de-race-ified package.json writing + ([@isaacs](https://github.com/isaacs)) +* `fstream@0.1.26` ([@isaacs](https://github.com/isaacs)) +* `graceful-fs@3.0.2` ([@isaacs](https://github.com/isaacs)) +* `osenv@0.1.0` ([@isaacs](https://github.com/isaacs)) +* Only spin the spinner when we're fetching stuff + ([@isaacs](https://github.com/isaacs)) +* Update `osenv@0.1.0` which removes ~/tmp as possible tmp-folder + ([@robertkowalski](https://github.com/robertkowalski)) +* `ini@1.2.1` ([@isaacs](https://github.com/isaacs)) +* `graceful-fs@3` ([@isaacs](https://github.com/isaacs)) +* Update glob and things depending on glob + ([@isaacs](https://github.com/isaacs)) +* github-url-from-username-repo and read-package-json updates + ([@isaacs](https://github.com/isaacs)) +* `editor@0.1.0` ([@isaacs](https://github.com/isaacs)) +* `columnify@1.1.0` ([@isaacs](https://github.com/isaacs)) +* bump ansi and associated deps ([@isaacs](https://github.com/isaacs)) + +### v1.4.14 (2014-06-05): + +* char-spinner: update to not bork windows + ([@isaacs](https://github.com/isaacs)) + +### v1.4.13 (2014-05-23): + +* Fix `npm install` on a tarball. + ([`ed3abf1`](https://github.com/npm/npm/commit/ed3abf1aa10000f0f687330e976d78d1955557f6), + [#5330](https://github.com/npm/npm/issues/5330), + [@othiym23](https://github.com/othiym23)) +* Fix an issue with the spinner on Node 0.8. + ([`9f00306`](https://github.com/npm/npm/commit/9f003067909440390198c0b8f92560d84da37762), + [@isaacs](https://github.com/isaacs)) +* Re-add `npm.commands.cache.clean` and `npm.commands.cache.read` APIs, and + document `npm.commands.cache.*` as npm-cache(3). + ([`e06799e`](https://github.com/npm/npm/commit/e06799e77e60c1fc51869619083a25e074d368b3), + [@isaacs](https://github.com/isaacs)) + +### v1.4.12 (2014-05-23): + +* remove normalize-package-data from top level, de-^-ify inflight dep + ([@isaacs](https://github.com/isaacs)) +* Always sort saved bundleDependencies ([@isaacs](https://github.com/isaacs)) +* add inflight to bundledDependencies + ([@othiym23](https://github.com/othiym23)) + +### v1.4.11 (2014-05-22): + +* fix `npm ls` labeling issue +* `node-gyp@0.13.1` +* default repository to https:// instead of git:// +* addLocalTarball: Remove extraneous unpack + ([@isaacs](https://github.com/isaacs)) +* Massive cache folder refactor ([@othiym23](https://github.com/othiym23) and + [@isaacs](https://github.com/isaacs)) +* Busy Spinner, no http noise ([@isaacs](https://github.com/isaacs)) +* Per-project .npmrc file support ([@isaacs](https://github.com/isaacs)) +* `npmconf@1.0.0`, Refactor config/uid/prefix loading process + ([@isaacs](https://github.com/isaacs)) +* Allow once-disallowed characters in passwords + ([@isaacs](https://github.com/isaacs)) +* Send npm version as 'version' header ([@isaacs](https://github.com/isaacs)) +* fix cygwin encoding issue (Karsten Tinnefeld) +* Allow non-github repositories with `npm repo` + ([@evanlucas](https://github.com/evanlucas)) +* Allow peer deps to be satisfied by grandparent +* Stop optional deps moving into deps on `update --save` + ([@timoxley](https://github.com/timoxley)) +* Ensure only matching deps update with `update --save*` + ([@timoxley](https://github.com/timoxley)) +* Add support for `prerelease`, `preminor`, `prepatch` to `npm version` + +### v1.4.10 (2014-05-05): + +* Don't set referer if already set +* fetch: Send referer and npm-session headers +* `run-script`: Support `--parseable` and `--json` +* list runnable scripts ([@evanlucas](https://github.com/evanlucas)) +* Use marked instead of ronn for html docs + +### v1.4.9 (2014-05-01): + +* Send referer header (with any potentially private stuff redacted) +* Fix critical typo bug in previous npm release + +### v1.4.8 (2014-05-01): + +* Check SHA before using files from cache +* adduser: allow change of the saved password +* Make `npm install` respect `config.unicode` +* Fix lifecycle to pass `Infinity` for config env value +* Don't return 0 exit code on invalid command +* cache: Handle 404s and other HTTP errors as errors +* Resolve ~ in path configs to env.HOME +* Include npm version in default user-agent conf +* npm init: Use ISC as default license, use save-prefix for deps +* Many test and doc fixes + +### v1.4.7 (2014-04-15): + +* Add `--save-prefix` option that can be used to override the default of `^` + when using `npm install --save` and its counterparts. + ([`64eefdf`](https://github.com/npm/npm/commit/64eefdfe26bb27db8dc90e3ab5d27a5ef18a4470), + [@thlorenz](https://github.com/thlorenz)) +* Allow `--silent` to silence the echoing of commands that occurs with `npm + run`. + ([`c95cf08`](https://github.com/npm/npm/commit/c95cf086e5b97dbb48ff95a72517b203a8f29eab), + [@Raynos](https://github.com/Raynos)) +* Some speed improvements to the cache, which should improve install times. + ([`cb94310`](https://github.com/npm/npm/commit/cb94310a6adb18cb7b881eacb8d67171eda8b744), + [`3b0870f`](https://github.com/npm/npm/commit/3b0870fb2f40358b3051abdab6be4319d196b99d), + [`120f5a9`](https://github.com/npm/npm/commit/120f5a93437bbbea9249801574a2f33e44e81c33), + [@isaacs](https://github.com/isaacs)) +* Improve ability to retry registry requests when a subset of the registry + servers are down. + ([`4a5257d`](https://github.com/npm/npm/commit/4a5257de3870ac3dafa39667379f19f6dcd6093e), + https://github.com/npm/npm-registry-client/commit/7686d02cb0b844626d6a401e58c0755ef3bc8432, + [@isaacs](https://github.com/isaacs)) +* Fix marking of peer dependencies as extraneous. + ([`779b164`](https://github.com/npm/npm/commit/779b1649764607b062c031c7e5c972151b4a1754), + https://github.com/npm/read-installed/commit/6680ba6ef235b1ca3273a00b70869798ad662ddc, + [@isaacs](https://github.com/isaacs)) +* Fix npm crashing when doing `npm shrinkwrap` in the presence of a + `package.json` with no dependencies. + ([`a9d9fa5`](https://github.com/npm/npm/commit/a9d9fa5ad3b8c925a589422b7be28d2735f320b0), + [@kislyuk](https://github.com/kislyuk)) +* Fix error when using `npm view` on packages that have no versions or have + been unpublished. + ([`94df2f5`](https://github.com/npm/npm/commit/94df2f56d684b35d1df043660180fc321b743dc8), + [@juliangruber](https://github.com/juliangruber); + [`2241a09`](https://github.com/npm/npm/commit/2241a09c843669c70633c399ce698cec3add40b3), + [@isaacs](https://github.com/isaacs)) + +### v1.4.6 (2014-03-19): + +* Fix extraneous package detection to work in more cases. + ([`f671286`](https://github.com/npm/npm/commit/f671286), npm/read-installed#20, + [@LaurentVB](https://github.com/LaurentVB)) + +### v1.4.5 (2014-03-18): + +* Sort dependencies in `package.json` when doing `npm install --save` and all + its variants. + ([`6fd6ff7`](https://github.com/npm/npm/commit/6fd6ff7e536ea6acd33037b1878d4eca1f931985), + [@domenic](https://github.com/domenic)) +* Add `--save-exact` option, usable alongside `--save` and its variants, which + will write the exact version number into `package.json` instead of the + appropriate semver-compatibility range. + ([`17f07df`](https://github.com/npm/npm/commit/17f07df8ad8e594304c2445bf7489cb53346f2c5), + [@timoxley](https://github.com/timoxley)) +* Accept gzipped content from the registry to speed up downloads and save + bandwidth. + ([`a3762de`](https://github.com/npm/npm/commit/a3762de843b842be8fa0ab57cdcd6b164f145942), + npm/npm-registry-client#40, [@fengmk2](https://github.com/fengmk2)) +* Fix `npm ls`'s `--depth` and `--log` options. + ([`1d29b17`](https://github.com/npm/npm/commit/1d29b17f5193d52a5c4faa412a95313dcf41ed91), + npm/read-installed#13, [@zertosh](https://github.com/zertosh)) +* Fix "Adding a cache directory to the cache will make the world implode" in + certain cases. + ([`9a4b2c4`](https://github.com/npm/npm/commit/9a4b2c4667c2b1e0054e3d5611ab86acb1760834), + domenic/path-is-inside#1, [@pmarques](https://github.com/pmarques)) +* Fix readmes not being uploaded in certain rare cases. + ([`527b72c`](https://github.com/npm/npm/commit/527b72cca6c55762b51e592c48a9f28cc7e2ff8b), + [@isaacs](https://github.com/isaacs)) + +### v1.4.4 (2014-02-20): + +* Add `npm t` as an alias for `npm test` (which is itself an alias for `npm run + test`, or even `npm run-script test`). We like making running your tests + easy. ([`14e650b`](https://github.com/npm/npm/commit/14e650bce0bfebba10094c961ac104a61417a5de), [@isaacs](https://github.com/isaacs)) + +### v1.4.3 (2014-02-16): + +* Add back `npm prune --production`, which was removed in 1.3.24. + ([`acc4d02`](https://github.com/npm/npm/commit/acc4d023c57d07704b20a0955e4bf10ee91bdc83), + [@davglass](https://github.com/davglass)) +* Default `npm install --save` and its counterparts to use the `^` version + specifier, instead of `~`. + ([`0a3151c`](https://github.com/npm/npm/commit/0a3151c9cbeb50c1c65895685c2eabdc7e2608dc), + [@mikolalysenko](https://github.com/mikolalysenko)) +* Make `npm shrinkwrap` output dependencies in a sorted order, so that diffs + between shrinkwrap files should be saner now. + ([`059b2bf`](https://github.com/npm/npm/commit/059b2bfd06ae775205a37257dca80142596a0113), + [@Raynos](https://github.com/Raynos)) +* Fix `npm dedupe` not correctly respecting dependency constraints. + ([`86028e9`](https://github.com/npm/npm/commit/86028e9fd8524d5e520ce01ba2ebab5a030103fc), + [@rafeca](https://github.com/rafeca)) +* Fix `npm ls` giving spurious warnings when you used `"latest"` as a version + specifier. + (https://github.com/npm/read-installed/commit/d2956400e0386931c926e0f30c334840e0938f14, + [@bajtos](https://github.com/bajtos)) +* Fixed a bug where using `npm link` on packages without a `name` value could + cause npm to delete itself. + ([`401a642`](https://github.com/npm/npm/commit/401a64286aa6665a94d1d2f13604f7014c5fce87), + [@isaacs](https://github.com/isaacs)) +* Fixed `npm install ./pkg@1.2.3` to actually install the directory at + `pkg@1.2.3`; before it would try to find version `1.2.3` of the package + `./pkg` in the npm registry. + ([`46d8768`](https://github.com/npm/npm/commit/46d876821d1dd94c050d5ebc86444bed12c56739), + [@rlidwka](https://github.com/rlidwka); see also + [`f851b79`](https://github.com/npm/npm/commit/f851b79a71d9a5f5125aa85877c94faaf91bea5f)) +* Fix `npm outdated` to respect the `color` configuration option. + ([`d4f6f3f`](https://github.com/npm/npm/commit/d4f6f3ff83bd14fb60d3ac6392cb8eb6b1c55ce1), + [@timoxley](https://github.com/timoxley)) +* Fix `npm outdated --parseable`. + ([`9575a23`](https://github.com/npm/npm/commit/9575a23f955ce3e75b509c89504ef0bd707c8cf6), + [@yhpark](https://github.com/yhpark)) +* Fix a lockfile-related errors when using certain Git URLs. + ([`164b97e`](https://github.com/npm/npm/commit/164b97e6089f64e686db7a9a24016f245effc37f), + [@nigelzor](https://github.com/nigelzor)) + +### v1.4.2 (2014-02-13): + +* Fixed an issue related to mid-publish GET requests made against the registry. + (https://github.com/npm/npm-registry-client/commit/acbec48372bc1816c67c9e7cbf814cf50437ff93, + [@isaacs](https://github.com/isaacs)) + +### v1.4.1 (2014-02-13): + +* Fix `npm shrinkwrap` forgetting to shrinkwrap dependencies that were also + development dependencies. + ([`9c575c5`](https://github.com/npm/npm/commit/9c575c56efa9b0c8b0d4a17cb9c1de3833004bcd), + [@diwu1989](https://github.com/diwu1989)) +* Fixed publishing of pre-existing packages with uppercase characters in their + name. + (https://github.com/npm/npm-registry-client/commit/9345d3b6c3d8510dd5c4418f27ee1fce59acebad, + [@isaacs](https://github.com/isaacs)) + +### v1.4.0 (2014-02-12): + +* Remove `npm publish --force`. See + https://github.com/npm/npmjs.org/issues/148. + ([@isaacs](https://github.com/isaacs), + npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) +* Other changes to the registry client related to saved configs and couch + logins. ([@isaacs](https://github.com/isaacs); + npm/npm-registry-client@25e2b019a1588155e5f87d035c27e79963b75951, + npm/npm-registry-client@9e41e9101b68036e0f078398785f618575f3cdde, + npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) +* Show an error to the user when doing `npm update` and the `package.json` + specifies a version that does not exist. + ([@evanlucas](https://github.com/evanlucas), + [`027a33a`](https://github.com/npm/npm/commit/027a33a5c594124cc1d82ddec5aee2c18bc8dc32)) +* Fix some issues with cache ownership in certain installation configurations. + ([@outcoldman](https://github.com/outcoldman), + [`a132690`](https://github.com/npm/npm/commit/a132690a2876cda5dcd1e4ca751f21dfcb11cb9e)) +* Fix issues where GitHub shorthand dependencies `user/repo` were not always + treated the same as full Git URLs. + ([@robertkowalski](https://github.com/robertkowalski), + https://github.com/meryn/normalize-package-data/commit/005d0b637aec1895117fcb4e3b49185eebf9e240) + +### v1.3.26 (2014-02-02): + +* Fixes and updates to publishing code + ([`735427a`](https://github.com/npm/npm/commit/735427a69ba4fe92aafa2d88f202aaa42920a9e2) + and + [`c0ac832`](https://github.com/npm/npm/commit/c0ac83224d49aa62e55577f8f27d53bbfd640dc5), + [@isaacs](https://github.com/isaacs)) +* Fix `npm bugs` with no arguments. + ([`b99d465`](https://github.com/npm/npm/commit/b99d465221ac03bca30976cbf4d62ca80ab34091), + [@Hoops](https://github.com/Hoops)) + +### v1.3.25 (2014-01-25): + +* Remove gubblebum blocky font from documentation headers. + ([`6940c9a`](https://github.com/npm/npm/commit/6940c9a100160056dc6be8f54a7ad7fa8ceda7e2), + [@isaacs](https://github.com/isaacs)) + +### v1.3.24 (2014-01-19): + +* Make the search output prettier, with nice truncated columns, and a `--long` + option to create wrapping columns. + ([`20439b2`](https://github.com/npm/npm/commit/20439b2) and + [`3a6942d`](https://github.com/npm/npm/commit/3a6942d), + [@timoxley](https://github.com/timoxley)) +* Support multiple packagenames in `npm docs`. + ([`823010b`](https://github.com/npm/npm/commit/823010b), + [@timoxley](https://github.com/timoxley)) +* Fix the `npm adduser` bug regarding "Error: default value must be string or + number" again. ([`b9b4248`](https://github.com/npm/npm/commit/b9b4248), + [@isaacs](https://github.com/isaacs)) +* Fix `scripts` entries containing whitespaces on Windows. + ([`80282ed`](https://github.com/npm/npm/commit/80282ed), + [@robertkowalski](https://github.com/robertkowalski)) +* Fix `npm update` for Git URLs that have credentials in them + ([`93fc364`](https://github.com/npm/npm/commit/93fc364), + [@danielsantiago](https://github.com/danielsantiago)) +* Fix `npm install` overwriting `npm link`-ed dependencies when they are tagged + Git dependencies. ([`af9bbd9`](https://github.com/npm/npm/commit/af9bbd9), + [@evanlucas](https://github.com/evanlucas)) +* Remove `npm prune --production` since it buggily removed some dependencies + that were necessary for production; see + [#4509](https://github.com/npm/npm/issues/4509). Hopefully it can make its + triumphant return, one day. + ([`1101b6a`](https://github.com/npm/npm/commit/1101b6a), + [@isaacs](https://github.com/isaacs)) + +Dependency updates: +* [`909cccf`](https://github.com/npm/npm/commit/909cccf) `read-package-json@1.1.6` +* [`a3891b6`](https://github.com/npm/npm/commit/a3891b6) `rimraf@2.2.6` +* [`ac6efbc`](https://github.com/npm/npm/commit/ac6efbc) `sha@1.2.3` +* [`dd30038`](https://github.com/npm/npm/commit/dd30038) `node-gyp@0.12.2` +* [`c8c3ebe`](https://github.com/npm/npm/commit/c8c3ebe) `npm-registry-client@0.3.3` +* [`4315286`](https://github.com/npm/npm/commit/4315286) `npmconf@0.1.12` + +### v1.3.23 (2014-01-03): + +* Properly handle installations that contained a certain class of circular + dependencies. + ([`5dc93e8`](https://github.com/npm/npm/commit/5dc93e8c82604c45b6067b1acf1c768e0bfce754), + [@substack](https://github.com/substack)) + +### v1.3.22 (2013-12-25): + +* Fix a critical bug in `npm adduser` that would manifest in the error message + "Error: default value must be string or number." + ([`fba4bd2`](https://github.com/npm/npm/commit/fba4bd24bc2ab00ccfeda2043aa53af7d75ef7ce), + [@isaacs](https://github.com/isaacs)) +* Allow `npm bugs` in the current directory to open the current package's bugs + URL. + ([`d04cf64`](https://github.com/npm/npm/commit/d04cf6483932c693452f3f778c2fa90f6153a4af), + [@evanlucas](https://github.com/evanlucas)) +* Several fixes to various error messages to include more useful or updated + information. + ([`1e6f2a7`](https://github.com/npm/npm/commit/1e6f2a72ca058335f9f5e7ca22d01e1a8bb0f9f7), + [`ff46366`](https://github.com/npm/npm/commit/ff46366bd40ff0ef33c7bac8400bc912c56201d1), + [`8b4bb48`](https://github.com/npm/npm/commit/8b4bb4815d80a3612186dc5549d698e7b988eb03); + [@rlidwka](https://github.com/rlidwka), + [@evanlucas](https://github.com/evanlucas)) + +### v1.3.21 (2013-12-17): + +* Fix a critical bug that prevented publishing due to incorrect hash + calculation. + ([`4ca4a2c`](https://github.com/npm/npm-registry-client/commit/4ca4a2c6333144299428be6b572e2691aa59852e), + [@dominictarr](https://github.com/dominictarr)) + +### v1.3.20 (2013-12-17): + +* Fixes a critical bug in v1.3.19. Thankfully, due to that bug, no one could + install npm v1.3.19 :) + +### v1.3.19 (2013-12-16): + +* Adds atomic PUTs for publishing packages, which should result in far fewer + requests and less room for replication errors on the server-side. + +### v1.3.18 (2013-12-16): + +* Added an `--ignore-scripts` option, which will prevent `package.json` scripts + from being run. Most notably, this will work on `npm install`, so e.g. `npm + install --ignore-scripts` will not run preinstall and prepublish scripts. + ([`d7e67bf`](https://github.com/npm/npm/commit/d7e67bf0d94b085652ec1c87d595afa6f650a8f6), + [@sqs](https://github.com/sqs)) +* Fixed a bug introduced in 1.3.16 that would manifest with certain cache + configurations, by causing spurious errors saying "Adding a cache directory + to the cache will make the world implode." + ([`966373f`](https://github.com/npm/npm/commit/966373fad8d741637f9744882bde9f6e94000865), + [@domenic](https://github.com/domenic)) +* Re-fixed the multiple download of URL dependencies, whose fix was reverted in + 1.3.17. + ([`a362c3f`](https://github.com/npm/npm/commit/a362c3f1919987419ed8a37c8defa19d2e6697b0), + [@spmason](https://github.com/spmason)) + +### v1.3.17 (2013-12-11): + +* This release reverts + [`644c2ff`](https://github.com/npm/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), + which avoided re-downloading URL and shinkwrap dependencies when doing `npm + install`. You can see the in-depth reasoning in + [`d8c907e`](https://github.com/npm/npm/commit/d8c907edc2019b75cff0f53467e34e0ffd7e5fba); + the problem was, that the patch changed the behavior of `npm install -f` to + reinstall all dependencies. +* A new version of the no-re-downloading fix has been submitted as + [#4303](https://github.com/npm/npm/issues/4303) and will hopefully be + included in the next release. + +### v1.3.16 (2013-12-11): + +* Git URL dependencies are now updated on `npm install`, fixing a two-year old + bug + ([`5829ecf`](https://github.com/npm/npm/commit/5829ecf032b392d2133bd351f53d3c644961396b), + [@robertkowalski](https://github.com/robertkowalski)). Additional progress on + reducing the resulting Git-related I/O is tracked as + [#4191](https://github.com/npm/npm/issues/4191), but for now, this will be a + big improvement. +* Added a `--json` mode to `npm outdated` to give a parseable output. + ([`0b6c9b7`](https://github.com/npm/npm/commit/0b6c9b7c8c5579f4d7d37a0c24d9b7a12ccbe5fe), + [@yyx990803](https://github.com/yyx990803)) +* Made `npm outdated` much prettier and more useful. It now outputs a + color-coded and easy-to-read table. + ([`fd3017f`](https://github.com/npm/npm/commit/fd3017fc3e9d42acf6394a5285122edb4dc16106), + [@quimcalpe](https://github.com/quimcalpe)) +* Added the `--depth` option to `npm outdated`, so that e.g. you can do `npm + outdated --depth=0` to show only top-level outdated dependencies. + ([`1d184ef`](https://github.com/npm/npm/commit/1d184ef3f4b4bc309d38e9128732e3e6fb46d49c), + [@yyx990803](https://github.com/yyx990803)) +* Added a `--no-git-tag-version` option to `npm version`, for doing the usual + job of `npm version` minus the Git tagging. This could be useful if you need + to increase the version in other related files before actually adding the + tag. + ([`59ca984`](https://github.com/npm/npm/commit/59ca9841ba4f4b2f11b8e72533f385c77ae9f8bd), + [@evanlucas](https://github.com/evanlucas)) +* Made `npm repo` and `npm docs` work without any arguments, adding them to the + list of npm commands that work on the package in the current directory when + invoked without arguments. + ([`bf9048e`](https://github.com/npm/npm/commit/bf9048e2fa16d43fbc4b328d162b0a194ca484e8), + [@robertkowalski](https://github.com/robertkowalski); + [`07600d0`](https://github.com/npm/npm/commit/07600d006c652507cb04ac0dae9780e35073dd67), + [@wilmoore](https://github.com/wilmoore)). There are a few other commands we + still want to implement this for; see + [#4204](https://github.com/npm/npm/issues/4204). +* Pass through the `GIT_SSL_NO_VERIFY` environment variable to Git, if it is + set; we currently do this with a few other environment variables, but we + missed that one. + ([`c625de9`](https://github.com/npm/npm/commit/c625de91770df24c189c77d2e4bc821f2265efa8), + [@arikon](https://github.com/arikon)) +* Fixed `npm dedupe` on Windows due to incorrect path separators being used + ([`7677de4`](https://github.com/npm/npm/commit/7677de4583100bc39407093ecc6bc13715bf8161), + [@mcolyer](https://github.com/mcolyer)). +* Fixed the `npm help` command when multiple words were searched for; it + previously gave a `ReferenceError`. + ([`6a28dd1`](https://github.com/npm/npm/commit/6a28dd147c6957a93db12b1081c6e0da44fe5e3c), + [@dereckson](https://github.com/dereckson)) +* Stopped re-downloading URL and shrinkwrap dependencies, as demonstrated in + [#3463](https://github.com/npm/npm/issues/3463) + ([`644c2ff`](https://github.com/isaacs/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), + [@spmason](https://github.com/spmason)). You can use the `--force` option to + force re-download and installation of all dependencies. diff --git a/bin/nodejs5.12.0/node_modules/npm/changelogs/CHANGELOG-2.md b/bin/nodejs5.12.0/node_modules/npm/changelogs/CHANGELOG-2.md new file mode 100644 index 00000000..f998112a --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/changelogs/CHANGELOG-2.md @@ -0,0 +1,4665 @@ +### v2.15.2 (2016-03-24): + +It's always nice to see new contributors. 💚 + +This week sees another small release, but we're still chugging along on our +[Windows efforts](https://github.com/npm/npm/pull/11444). + +There's also some small process changes to our LTS process relatively recently +that you might wanna know about! 💁 + +For one, the `2.x` branch was removed in favor of just `lts`. If you're making +PRs exclusively against npm's LTS, please use that name from now on. `2.x` was +deleted. + +Also, [@othiym23](https://github.com/othiym23) put some time into [writing down +our LTS process and policy](https://github.com/npm/npm/wiki/LTS). Check it out +and ping us if you have questions or comments about it! + +In general, we're trying to make sure all our policy and such for our +contributors is written down, and we hope it makes it easier in general for +y'all. Forrest is also working on a shiny new Contributor's Guide right now, but +we'll link to that in the (near?) future, when it's ready to roll out. + +#### TESTS + +* [`1d0e468`](https://github.com/npm/npm/commit/1d0e468c06c7b8e2b95b7fe874a3399a16d9db74) + [#11931](https://github.com/npm/npm/pull/11931) + Removes a bunch of old, disabled tests that have just been sitting around, + doing nothing. + ([@othiym23](https://github.com/othiym23)) +* [`7ae8aa1`](https://github.com/npm/npm/commit/7ae8aa1d9dc47761024f6756114205db3fb2c80b) + [#11987](https://github.com/npm/npm/pull/11987) + There was a failure in the `outdated-symlink` test caused by using the default + registry instead of the mock registry tests. + ([@yodeyer](https://github.com/yodeyer)) + +#### DOCS + +* [`b2649fb`](https://github.com/npm/npm/commit/b2649fb360f239aadef1ab51a580cbf4fdf29722) + [#12006](https://github.com/npm/npm/pull/12006) + Access was Team and Team was Access, but someone from the community rolled + around and corrected it for us. Thanks a bunch! + ([@yaelz](https://github.com/yaelz)) + +### v2.15.1 (2016-03-17): + +#### SECURITY ADVISORY: BEARER TOKEN DISCLOSURE + +This release includes [the fix for a +vulnerability](https://github.com/npm/npm/commit/fea8cc92cee02c720b58f95f14d315507ccad401) +that could cause the unintentional leakage of bearer tokens. + +Here are details on this vulnerability and how it affects you. + +##### DETAILS + +Since 2014, npm’s registry has used HTTP bearer tokens to authenticate requests +from the npm’s command-line interface. A design flaw meant that the CLI was +sending these bearer tokens with _every_ request made by logged-in users, +regardless of the destination of their request. (The bearers only should have +been included for requests made against a registry or registries used for the +current install.) + +An attacker could exploit this flaw by setting up an HTTP server that could +collect authentication information, then use this authentication information to +impersonate the users whose tokens they collected. This impersonation would +allow them to do anything the compromised users could do, including publishing +new versions of packages. + +With the fixes we’ve released, the CLI will only send bearer tokens with +requests made against a registry. + +##### THINK YOU'RE AT RISK? REGENERATE YOUR TOKENS + +If you believe that your bearer token may have been leaked, [invalidate your +current npm bearer tokens](https://www.npmjs.com/settings/tokens) and rerun +`npm login` to generate new tokens. Keep in mind that this may cause continuous +integration builds in services like Travis to break, in which case you’ll need +to update the tokens in your CI server’s configuration. + +##### WILL THIS BREAK MY CURRENT SETUP? + +Maybe. + +npm’s CLI team believes that the fix won’t break any existing registry setups. +Due to the large number of registry software suites out in the wild, though, +it’s possible our change will be breaking in some cases. + +If so, please [file an issue](https://github.com/npm/npm/issues/new) describing +the software you’re using and how it broke. Our team will work with you to +mitigate the breakage. + +##### CREDIT & THANKS + +Thanks to Mitar, Will White & the team at Mapbox, Max Motovilov, and James +Taylor for reporting this vulnerability to npm. + +### BACK TO YOUR REGULARLY SCHEDULED PROGRAMMING + +Aside from that, it's another one of those releases again! Docs and tests, it +turns out, have a pretty easy time getting into LTS releases, and boring is +exactly how LTS should be. 💁 + +#### DOCS + +* [`981c89c`](https://github.com/npm/npm/commit/981c89c8e398ca22ab6bf466123b25728ef6f543) + [#11820](https://github.com/npm/npm/pull/11820) + The basic explanation for how `npm link` works was a bit confusing, and + somewhat incorrect. It should be clearer now. + ([@rhgb](https://github.com/rhgb)) +* [`35b2b45`](https://github.com/npm/npm/commit/35b2b45f181dcbfb297f53b577dc1f26efcf3aba) + [#11787](https://github.com/npm/npm/pull/11787) + The `verison` alias for `npm version` no longer shows up in the command list + when you do `npm -h`. + ([@doug-wade](https://github.com/doug-wade)) +* [`1c9d00f`](https://github.com/npm/npm/commit/1c9d00f788298a81a8a7293d7dcf430f01bdd7fd) + [#11786](https://github.com/npm/npm/pull/11786) + Add a comment to the `npm-scope.md` docs about `npm@>=2` being required in + order to use scoped packaged. + ([@doug-wade](https://github.com/doug-wade)) +* [`7d64fb1`](https://github.com/npm/npm/commit/7d64fb1452d360aa736f31c85d6776ce570b2365) + [#11762](https://github.com/npm/npm/pull/11762) + Roll back patch that previously advised people to use `--depth Infinity` + instead of `--depth 9999`. Just keep using `--depth 9999`. + ([@GriffinSchneider](https://github.com/GriffinSchneider)) + +#### TESTS + +* [`98a9ee4`](https://github.com/npm/npm/commit/98a9ee4773f83994b8eb63c0ff75a9283408ba1a) + [#11912](https://github.com/npm/npm/pull/11912) + Did you know npm can install itself? `npm install -g npm` is the way to + upgrade! Turns out that one of the tests that verified this functionality got + rewritten as part of our recent push for better tests, and in the process + omitted a detail about *how* the test ran. We're testing that corner case + again, now, by moving the install folder to `/tmp`, where the original legacy + test ran. + ([@iarna](https://github.com/iarna)) + +### v2.15.0 (2016-03-10): + +#### WHY IS THIS SEMVER-MINOR I THOUGHT THIS WAS LTS + +A brief note about LTS this week! + +npm, as you may know if you're using this `2.x` branch, has an LTS process for +releases. We also try and play nice with [Node.js' own LTS release +process](https://github.com/nodejs/LTS#lts-plan). That means we generally try to +avoid things like minor version bumps on our `2.x` branch (which is also tagged +`lts` in the `dist-tag`s). + +That said, we had a minor-bump update recently for `npm@3.8.0` which added a +`maxsockets` option to allow users to configure the number of concurrent sockets +that npm would keep open at a time -- a setting that has the potential to help a +bunch for people with fussy routers or internet connections that aren't very +happy with Node.js applications' usual concurrency storm. This change was done +to `npm-registry-client`, which we don't have a parallel LTS-tracking branch +for. + +After talking it over, we ended up deciding that this was a reasonable enough +addition to LTS, even though it's *technically* a `semver-minor` bump, taking +into account both its potential for bugfixing (specially on `2.x`!) and the +general hassle it would be to maintain another branch for `npm-registry-client`. + + +* [`6dd61e7`](https://github.com/npm/npm/commit/6dd61e781c145480dc255a3e6a748729868443fd) + Expose `maxsockets` config setting from new `npm-registry-client`. + ([@misterbyrne](https://github.com/misterbyrne)) +* [`8a021c3`](https://github.com/npm/npm/commit/8a021c35184e665bd1f3f70ae2f478af812ab614) + `npm-registry-client@7.1.0`: + Adds support for configuring the max number of concurrent sockets, defaulting + to `50`. + ([@iarna](https://github.com/iarna)) + +#### DOC PATCH IS HERE TOO + +* [`0ae9f74`](https://github.com/npm/npm/commit/0ae9f740001a1bdf5920bc464cf9e284d5d139f0) + [#11748](https://github.com/npm/npm/pull/11748) + Add command aliases as a separate section in documentation for npm + subcommands. + ([@watilde](https://github.com/watilde)) + +#### DEP UPDATES + +* [`bfc3888`](https://github.com/npm/npm/commit/bfc38887f832f701c16b7ee410c4e0220a90399f) + `strip-ansi@3.0.1` + ([@jbnicolai](https://github.com/jbnicolai)) +* [`d5f4d51`](https://github.com/npm/npm/commit/d5f4d51a1b7ea78d7431c7ed4fed30200b2622f8) + `node-gyp@3.3.1`: Fixes Android generator + ([@bnoordhuis](https://github.com/bnoordhuis)) +* [`4119df8`](https://github.com/npm/npm/commit/4119df8aecd2ae57b0492ad8c9a480d900833008) + `glob@7.0.3`: Some path-related fixes for Windows. + ([@isaacs](https://github.com/isaacs)) + +### v2.14.22 (2016-03-03): + +This week is all documentation improvements. In case you hadn't noticed, we +*love* doc patches. We love them so much, we give socks away if you submit +documentation PRs! + +These folks are all getting socks if they ask for them. The socks are +super-sweet. Do you have yours yet? 👣 + +* [`3f3c7d0`](https://github.com/npm/npm/commit/3f3c7d080f052a5db91ff6091f8b1b13f26b53d6) + [#11441](https://github.com/npm/npm/pull/11441) + Add a link to the [Contribution + Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines) to the + main npm docs. + ([@watilde](https://github.com/watilde)) +* [`9f87bb1`](https://github.com/npm/npm/commit/9f87bb1934acb33b678c17b7827165b17c071a82) + [#11441](https://github.com/npm/npm/pull/11441) + Remove Google Group email from npm docs about contributing. + ([@watilde](https://github.com/watilde)) +* [`93eaab3`](https://github.com/npm/npm/commit/93eaab3ee5ad16c7d90d1a4b38a95403fcf3f0f6) + [#11474](https://github.com/npm/npm/pull/11474) + Fix an invalid JSON error overlooked in + [#11196](https://github.com/npm/npm/pull/11196). + ([@robludwig](https://github.com/robludwig)) +* [`a407ca2`](https://github.com/npm/npm/commit/a407ca2bcf6a05117e55cf2ab69376e09094995e) + [#11483](https://github.com/npm/npm/pull/11483) + Add more details and an example to the documentation for bundledDependencies. + ([@gnerkus](https://github.com/gnerkus)) +* [`2c851a2`](https://github.com/npm/npm/commit/2c851a231afd874baa77c42ea5ba539c454ac79c) + [#11490](https://github.com/npm/npm/pull/11490) + Document the `--registry` flag for `npm search`. + ([@plumlee](https://github.com/plumlee)) + +### v2.14.21 (2016-02-25): + +Good news, everyone! There's a new LTS release with a few shinies here and there! + +#### USE THIS ONE INSTEAD + +We had some cases where the versions of npm and node used in some scripting situations were different than the ideal, or what folks actually expected. These should be particularly helpful to our Windows friends! <3 + +* [`02813c5`](https://github.com/npm/npm/commit/02813c55782a9def23f7f1e614edc38c6c88aed3) [#9253](https://github.com/npm/npm/issues/9253) Fix a bug where, when running lifecycle scripts, if the Node.js binary you ran `npm` with wasn't in your `PATH`, `npm` wouldn't use it to run your scripts. ([@segrey](https://github.com/segrey) and [@narqo](https://github.com/narqo)) +* [`a985dd5`](https://github.com/npm/npm/commit/a985dd50e06ee51ba5544577f977c7440c227ba2) [#11526](https://github.com/npm/npm/pull/11526) Prefer locally installed npm in Git Bash -- previous behavior was to use the global one. This was done previously for other shells, but not for Git Bash. ([@destroyerofbuilds](https://github.com/destroyerofbuilds)) + +#### SOCKS FOR THE SOCK GOD + +* [`f961092`](https://github.com/npm/npm/commit/f9610920079d8b88ae464b30007a92c594bd85a8) + [#11636.](https://github.com/npm/npm/issues/11636.) + Document the `--save-bundle` option for `npm install`. + ([@datyayu](https://github.com/datyayu)) +* [`7c908b6`](https://github.com/npm/npm/commit/7c908b618f7123f0a3b860c71eb779e33df35964) + [#11644](https://github.com/npm/npm/pull/11644) + Add documentation for the `test` directory for packages. + ([@lewiscowper](https://github.com/lewiscowper)) + +#### INTERNAL TEST IMPROVEMENTS + +The npm CLI team's time recently has been sunk into npm's many years of tech debt. Specifically, we've been working on improving the test suite. This isn't user visible, but in future should mean a more stable, easier to contribute to npm. Ordinarily we don't report these kinds of changes in the change log, but I thought I might share this week as this chunk is bigger than usual. + +These patches were previously released for `npm@3`, and then ported back to `npm@2` LTS. + +* [`437c537`](https://github.com/npm/npm/commit/437c537e2be5923c6d2c2753154564ba13db8fd9) [#11613](https://github.com/npm/npm/pull/11613) Fix up one of the tests after rebasing the legacy test rewrite to `npm@2`. ([@zkat](https://github.com/zkat)) +* [`55abd0c`](https://github.com/npm/npm/commit/55abd0cc20e87a144d33ce2d459f65e7506da576) [#11613](https://github.com/npm/npm/pull/11613) Test that the `package.json` `files` section and `.npmignore` do what they're supposed to. ([@zkat](https://github.com/zkat)) +* [`a2b99b6`](https://github.com/npm/npm/commit/a2b99b6273ada14b2121ebc0acb7933e630edd9d) [#11613](https://github.com/npm/npm/pull/11613) Test that npm's distribution binary is complete and can be installed and used. ([@iarna](https://github.com/iarna)) +* [`8a8c36c`](https://github.com/npm/npm/commit/8a8c36ce51166006022e5c5d4f8655bbc458d651) [#11613](https://github.com/npm/npm/pull/11613) Test that environment variables are properly passed into scripts. + ([@iarna](https://github.com/zkat)) +* [`a95b550`](https://github.com/npm/npm/commit/a95b5507616bd51e83d7eab5f2337b1aff6480b1) [#11613](https://github.com/npm/npm/pull/11613) Test that we don't leak auth info into the environment. ([@iarna](https://github.com/iarna)) +* [`a1c1c52`](https://github.com/npm/npm/commit/a1c1c52efeab24f6dba154d054f85d9efc833486) [#11613](https://github.com/npm/npm/pull/11613) Remove all the relatively cryptic legacy tests and creates new tap tests that check the same functionality. The *legacy* tests were tests that were originally a shell script that was ported to javascript early in `npm`'s history. ([@iarna](https:\\github.com/iarna) and [@zkat](https://github.com/zkat)) +* [`9d89581`](https://github.com/npm/npm/commit/9d895811d3ee70c2e672f3d8fa06574495b5b488) [#11613](https://github.com/npm/npm/pull/11613) `tacks@1.0.9`: Add a package that provides a tool to generate fixtures from folders and, relatedly, a module that an create and tear down filesystem fixtures easily. ([@iarna](https://github.com/iarna)) + +### v2.14.20 (2016-02-18): + +Hope y'all are having a nice week! As usual, it's a fairly limited release. The +most notable thing is some dependency updates that might help the Node.js CI +setup for Windows run a little better, even if we have some work to do on that +path length things, still. + +#### WHITTLING AWAY AT PATH LENGTHS + +So for all of you who don't know -- Node.js does, in fact, support long Windows +paths. Unfortunately, depending on the tool and the Windows version, a lot of +external tooling does not. This means, for example, that some (all?) versions of +Windows Explorer *can literally never delete npm from their system entirely +because of deeply-nested npm dependencies*. Which is pretty gnarly. + +Incidentally, if you run into that in particularly, you can use +[rimraf](npm.im/rimraf) to remove such files 💁. + +The latest victim of this issue was the Node.js CI setup for testing on Windows, +which uses some tooling or another that croaks on the usual path length limit +for that OS: 255 characters. + +This issue, of course, is largely not a problem as of `npm@3`, with its flat +trees, but it still occasionally and viciously bites LTS. + +We've taken another baby step towards alleviating this in this release by +updating a couple of dependencies that were preventing `npmlog` from deduping, +and then doing a dedupe on that and `gauge`. Hopefully it helps. + +* [`4199551`](https://github.com/npm/npm/commit/41995517e617674710748ab6d262670c96124393) + [#11528](https://github.com/npm/npm/pull/11528) + `npm-install-checks@1.0.7`: Just updates the version of npmlog so we can + dedupe it better. + ([@zkat](https://github.com/zkat)) +* [`14d72c7`](https://github.com/npm/npm/commit/14d72c756b89e2d167eb52c1849263dbddcb9f35) + [#11552](https://github.com/npm/npm/pull/11552) + [#11528](https://github.com/npm/npm/pull/11528) + `node-gyp@3.3.0`: AIX support, new `gyp`, update `npmlog` (for the dedupe), + adds `--cafile` command line option, and allows configuration of Node.js and + io.js mirrors. + ([@rvagg](https://github.com/rvagg)) +* [`0453cb9`](https://github.com/npm/npm/commit/0453cb94b33520eb723b7072cd2654b1d0142533) + [#11528](https://github.com/npm/npm/pull/11528) + Do a `dedupe` on `gauge` to flatten our dependencies a bit more. + ([@zkat](https://github.com/zkat)) + +#### OTHER DEP STUFF + +* [`686c0b3`](https://github.com/npm/npm/commit/686c0b37ec3a7b65f9b3849e1099805e5221c408) + `rimraf@2.5.2`: Just updates to glob@7. + ([@isaacs](https://github.com/isaacs)) + +#### @wyze, DOCUMENTATION HERO OF THE PEOPLE, GETS THEIR OWN HEADER + +* [`7232948`](https://github.com/npm/npm/commit/72329484c775376cb40d5b348f453eaaf2f0b821) + [#11416](https://github.com/npm/npm/pull/11416) + Logout docs were using a section copy-pasted from the adduser docs. + ([@wyze](https://github.com/wyze)) +* [`922b33a`](https://github.com/npm/npm/commit/922b33aba4362e1e90f42e9348f061a1cc73eafb) + [#11414](https://github.com/npm/npm/pull/11414) + Add colon for consistency. + ([@wyze](https://github.com/wyze)) + +### v2.14.19 (2016-02-11): + +Really tiny micro-release this week! The main thing to note is a dependency +update that means we no longer have `graceful-fs@3` in our dependency tree. This +has some implications for being able to run on future Node.js releases, so +better to get this out the door. 😁 + +#### DEPS + +* [`a556e0f`](https://github.com/npm/npm/commit/a556e0f9dcb5d7b44224ba9c16c9d0dc6c8d2532) + `cmd-shim@2.0.2`: Final straggler using `graceful-fs@<4`. + ([@ForbesLindesay](https://github.com/ForbesLindesay)) + +#### DOCS + +* [`69a2d59`](https://github.com/npm/npm/commit/69a2d599bf0cba674ee268483e9bd5c14333b89f) + [#11391](https://github.com/npm/npm/pull/11391) + Fixed versions of `shrinkwrap.json` in examples in documentation for `npm + shrinkwrap`, which did not quite match up. + ([@xcatliu](https://github.com/xcatliu)) + +### v2.14.18 (2016-02-04): + +Clearly our docs are perfect after all those wonderful PRs, 'cause this week's +gonna be all about dependency updates. Note: There is a small security-related +fix included here! + +#### SECURITY-RELATED DEPENDENCY UPDATE + +* [`5c095ef`](https://github.com/npm/npm/commit/5c095eff8dc006980d4d083f2007e4dacff23be3) + [#11341](https://github.com/npm/npm/pull/11341) + `request@2.69.0`: Includes security-related dependency updates involving + `hawk` and `is-my-json-valid` + ([@remy](https://github.com/remy) and [@simov](https://github.com/simov)) + +#### OTHER DEPENDENCY UPDATES + +* [`f9c2668`](https://github.com/npm/npm/commit/f9c2668ca3e6e2602d91250ce61280e5e12d0a00) + `which@1.2.4` + ([@isaacs](https://github.com/isaacs)) +* [`2907c43`](https://github.com/npm/npm/commit/2907c43ad4ef87e5f730c2576f680d6837fcbad0) + `spdx-license-ids@1.2.0` + ([@shinnn](https://github.com/shinnn)) +* [`7734069`](https://github.com/npm/npm/commit/773406960bf7f4a87b2ecb6ebf593c62d0e9f95d) + `rimraf@2.5.1` + ([@isaacs](https://github.com/isaacs)) +* [`f4b39a7`](https://github.com/npm/npm/commit/f4b39a7dd5e1335d92aa22c46d99abb33f271b8b) + `retry@0.9.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`ded1e7a`](https://github.com/npm/npm/commit/ded1e7a1c9c7bec29bb7c30a8f85546670e75b56) + Nest `retry@0.8.0` inside `npm-registry-client` to prevent invalid + dependency issue until the latter gets a dependency update. + ([@zkat](https://github.com/zkat)) +* [`ab9f867`](https://github.com/npm/npm/commit/ab9f8679f9687f91ad03adaab6211a897aeebbae) + `read-package-json@2.0.3` + ([@iarna](https://github.com/iarna)) +* [`b638c41`](https://github.com/npm/npm/commit/b638c41607bb936b9eaaceba2aeeda1d34e3a9b2) + `npmlog@2.0.2` + ([@iarna](https://github.com/iarna)) +* [`49f34af`](https://github.com/npm/npm/commit/49f34af463a674359269025d8438feb6a7c69960) + `init-package-json@1.9.3` + ([@iarna](https://github.com/iarna)) +* [`2305dab`](https://github.com/npm/npm/commit/2305dab4e7bff09bb7686cec653cf1e663dbf15d) + `graceful-fs@4.1.3`: Fixed `.close()` not being patched. + ([@isaacs](https://github.com/isaacs)) +* [`18496d9`](https://github.com/npm/npm/commit/18496d9a0fff94e3652655998e8333056aa52b15) + `fs-write-stream-atomic@1.0.8` + ([@iarna](https://github.com/iarna)) +* [`6637bc7`](https://github.com/npm/npm/commit/6637bc7a0e194d82554cd7c91e1794018fef5943) + `config-chain@1.1.10` + ([@dominictarr](https://github.com/dominictarr)) +* [`4222bad`](https://github.com/npm/npm/commit/4222badffed9e9edacea6a8a96a99a164d376158) + `columnify@1.5.4` + ([@timoxley](https://github.com/timoxley)) +* [`df9016f`](https://github.com/npm/npm/commit/df9016f327a2a9ce492ebc75b882b03069438e13) + `ansi@0.3.1`: Added a license file. + ([@TooTallNate](https://github.com/TooTallNate)) + +### v2.14.17 (2016-01-28): + +Another week, another small LTS release! + +#### BETTER ERROR REPORTING YAY + +So as it turns out, when stuff goes wrong, it's actually nice to give people a +better clue rather than just say "oh well 😏". + +* [`5b8ccb9`](https://github.com/npm/npm/commit/5b8ccb91cf11b4edb463609cd4ed1dee84ed4db0) + [#11289](https://github.com/npm/npm/pull/11289) + 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 previous just + make npm error out– this reduces that to a warning. + ([@evanlucas](https://github.com/evanlucas)) +* [`556e42a`](https://github.com/npm/npm/commit/556e42ac6bab078722ddc1dc6cce4428d001133b) + [#11300](https://github.com/npm/npm/pull/11300) + Report symlinked packages as 'linked' in the output for `npm outdated`. + ([@halhenke](https://github.com/halhenke)) +* [`3842317`](https://github.com/npm/npm/commit/3842317583e0ea2eca78e39aa03f5bc06ba21de7) + [#11290](https://github.com/npm/npm/pull/11290) + Suppress warnings about pre-release node versions. This should get node's CI + passing on non-Windows platforms without needing to modify the node version to + get rid of the pre-release suffix. + ([@iarna](https://github.com/iarna)) + +#### EVERYONE WANTS THOSE NPM SOCKS, GEEZE + +Did you know that you can get npm socks for contributing to our docs? I bet +these people do, and now so do you! + +* [`dcde451`](https://github.com/npm/npm/commit/dcde451cb85a6ca08acc6ef45782c652f1d8fc89) + [#11232](https://github.com/npm/npm/pull/11232) + Update automatically included/excluded packages in `package.json`. + ([@jscissr](https://github.com/jscissr)) +* [`e3f8d5b`](https://github.com/npm/npm/commit/e3f8d5be5ac5ec1d72db42f7abf50cc4a8c5935c) + [#11273](https://github.com/npm/npm/pull/11273) + Add an example for `npm view <pkg> versions`. + ([@vedatmahir](https://github.com/vedatmahir)) +* [`6a06ef2`](https://github.com/npm/npm/commit/6a06ef2252748089f0013de951f2d06160b90306) + [#11272](https://github.com/npm/npm/pull/11272) + Fix a typo in `npm-update.md`. + ([@jonathanp](https://github.com/jonathanp)) +* [`2515ff1`](https://github.com/npm/npm/commit/2515ff1de28f0b261fb25c79a66bd762a65961c4) + [#11215](https://github.com/npm/npm/pull/11215) + Correct small thinko in docs for SPDX expressions. + ([@kemitchell](https://github.com/kemitchell)) +* [`70f897b`](https://github.com/npm/npm/commit/70f897b03da9a5d5d4fd34614e9ee40e6f9e9653) + [#11196](https://github.com/npm/npm/pull/11196) + Make JSON snippets valid JSON in `npm update` docs. + ([@s100](https://github.com/s100)) + +### v2.14.16 (2016-01-21): + +Good to see you all again! It's been a while since we had an LTS release, and +the team continues to work hard to both get the issue tracker under control, and +get our test suite to be awesome and reliable. + +This is also the first LTS release of this year. + +We're gonna have an interesting time -- most of our focus this year will be +around stability and maintainability of the CLI, so you might actually end up +seeing a number of updates even over here, just for the sake of making sure +we're stable, that bugs get fixed, and tests have proper coverage. + +What better way to start this effort, then, than getting Travis tests green, fix +a few things here and there, and tweak a bunch of documentation? 😁 + +#### FIX ALL THE BUGS AND TWEAK ALL THE THINGS + +* [`24b13fb`](https://github.com/npm/npm/commit/24b13fbc57d34db1d5b0a37bcca122c00deba978) + [#11158](https://github.com/npm/npm/pull/11158) + Fix custom node-gyp env var quoting on Windows. + ([@orangemocha](https://github.com/orangemocha)) +* [`e2503f2`](https://github.com/npm/npm/commit/e2503f2be40157b05a9c500ec3b5d16090ffee50) + [#11142](https://github.com/npm/npm/pull/11142) + Fix race condition with `correctMkdir` in the cache directory. + ([@Jimbly](https://github.com/Jimbly)) + +* [`5c0e4c4`](https://github.com/npm/npm/commit/5c0e4c45a29d774ab729e86044377d4e5e424252) + [#10940](https://github.com/npm/npm/pull/10940) + Ignore failures replacing `package.json`. writeFileAtomic is not atomic in + Windows, it fails if the file is being accessed concurrently. + ([@orangemocha](https://github.com/orangemocha)) +* [`2c44d8d`](https://github.com/npm/npm/commit/2c44d8dc8c267d5e054d0175ce2f4750f0986463) + [#10903](https://github.com/npm/npm/pull/10903) + Add tests for `npm adduser --scope`. + ([@ekmartin](https://github.com/ekmartin)) +* [`4cb25d0`](https://github.com/npm/npm/commit/4cb25d0fed5c7792dfd1aec891380ecc1f8a5761) + [#10903](https://github.com/npm/npm/pull/10903) + Add a message informing users when they have been successfully logged in. + ([@ekmartin](https://github.com/ekmartin)) +* [`fe3ec6d`](https://github.com/npm/npm/commit/fe3ec6d6658262054c0c19c55373c21e84ab9f17) + [#10628](https://github.com/npm/npm/pull/10628) + Tell users how to open an issue with a package that has errored. + ([@trodrigues](https://github.com/trodrigues)) + +#### DOCS DOCS DOCS + +We got a TON of lovely documentation patches, too! Thanks all for submitting! + +* [`22482a1`](https://github.com/npm/npm/commit/22482a1f22079d72c3f8ca55c2f0c153bdd024c0) + [#11188](https://github.com/npm/npm/pull/11188) + Briefly explain what's included when you publish. + ([@beaugunderson](https://github.com/beaugunderson)) +* [`fa47724`](https://github.com/npm/npm/commit/fa4772438df0c66a19309dd1c1a3ce43cbee5461) + [#11150](https://github.com/npm/npm/pull/11150) + Advise use of `--depth Infinity` instead of `--depth 9999` in `npm update`. + ([@halhenke](https://github.com/halhenke)) +* [`248ddfe`](https://github.com/npm/npm/commit/248ddfe8f7ddd3318e14bf61de41cab4a638c8a3) + [#11130](https://github.com/npm/npm/pull/11130) + Nuke "using npm programmatically" section from README. The programmatic npm + API is unsupported, and is not guaranteed not to break in non-major versions. + Removing this section so newcomers aren't encouraged to discover or use it. + ([@ljharb](https://github.com/ljharb)) +* [`ae9c452`](https://github.com/npm/npm/commit/ae9c4521222d60ab4a69c19fee5e361c62f41fae) + [#11128](https://github.com/npm/npm/pull/11128) + Add link to local paths section indocs for `package.json`. + ([@orangejulius](https://github.com/orangejulius)) +* [`663a8c6`](https://github.com/npm/npm/commit/663a8c6b4b1647f9b86c15ef32e30023edc8c060) + [#11044](https://github.com/npm/npm/pull/11044) + Update default value documentation for the color option in npm's config. + ([@scottaddie](https://github.com/scottaddie)) +* [`5c1dda0`](https://github.com/npm/npm/commit/5c1dda0d3a18b2954872dba33fbc696ff0700ffe) + [#11037](https://github.com/npm/npm/pull/11037) + Correct the name property max length constraint verbiage. + ([@scottaddie](https://github.com/scottaddie)) +* [`8288365`](https://github.com/npm/npm/commit/8288365d08e97fa3a5b0d31703c015a8be49e07f) + [#10990](https://github.com/npm/npm/pull/10990) + Update folder docs to reflect that process.installPrefix was removed as of + 0.8.x. + ([@jeffmcmahan](https://github.com/jeffmcmahan)) +* [`61d63fa`](https://github.com/npm/npm/commit/61d63fa22c4f09742180c2de460a4ffb6c32738e) + [#10790](https://github.com/npm/npm/pull/10790) + Clarify that `npm install foo` is the same as `npm install foo@latest` now. + ([@cvrebert](https://github.com/cvrebert)) +* [`442c920`](https://github.com/npm/npm/commit/442c9207f375354c91d36df8711ba2d33e1c97f3) + [#10789](https://github.com/npm/npm/pull/10789) + Link over to `npm-dist-tag(1)` in `npm install` docs when they talk about the + `pkg@<tag>` syntax. + ([@cvrebert](https://github.com/cvrebert)) +* [`dca7a5e`](https://github.com/npm/npm/commit/dca7a5e2be3bfa306a870a123707d35c732406c0) + [#10788](https://github.com/npm/npm/pull/10788) + Link to tag docs in docs for `npm publish --tag`. + ([@cvrebert](https://github.com/cvrebert)) +* [`a72904e`](https://github.com/npm/npm/commit/a72904e8d4ab1d43ae8150fbe3f6468b0cbb1efd) + [#10787](https://github.com/npm/npm/pull/10787) + Explain why the `latest` tag matters. + ([@cvrebert](https://github.com/cvrebert)) +* [`9d0697a`](https://github.com/npm/npm/commit/9d0697a534046df7efda32170014041bbc1f4e7d) + [#10785](https://github.com/npm/npm/pull/10785) + Replace some quite marks in `npm dist-tag` docs for the sake of consistency. + ([@cvrebert](https://github.com/cvrebert)) + +#### I REALLY LIKE GREEN. CAN YOU TELL? + +So Travis is all green now on `npm@2`, thanks to the removal of nock and a few +other test suite tweaks. This is a fantastic step towards making sure we can all +have confidence in our test suite! 🎉 + +* [`64995be`](https://github.com/npm/npm/commit/64995be6d874356b15c136f9867302d805dfe1e9) [`75ab216`](https://github.com/npm/npm/commit/75ab2164cf79e28ac7f7ebe714f3c5aee99c6626) [`a9f6fe9`](https://github.com/npm/npm/commit/a9f6fe9dc558f17c4a7b9eb83329ac080f7df4b7) [`649c193`](https://github.com/npm/npm/commit/649c193adadf714c2819837f9372a29d724a5ec0) [`94cb05e`](https://github.com/npm/npm/commit/94cb05eaa9e5ad6675cf15c4ac0a44fbdde05900) [`6541690`](https://github.com/npm/npm/commit/65416907008061ac5a5f66b1630a57776803b526) [`255be6f`](https://github.com/npm/npm/commit/255be6f5bca9e3d216f3a5cbdf6714c6c9fcf132) [`9e84fa4`](https://github.com/npm/npm/commit/9e84fa43c49d04cf86ca1678e2a61412f5559cb9) [`8a587b0`](https://github.com/npm/npm/commit/8a587b0c1696ae7302891fa6355fc3e8670e00d3) [`bf812a5`](https://github.com/npm/npm/commit/bf812a54e497a573493346399798aa0b9373ac24) + [#10903](https://github.com/npm/npm/pull/10903) + Get rid of nock from tests, and get Travis green. + ([@zkat](https://github.com/zkat) and [@iarna](https://github.com/iarna)) +* [`70a5310`](https://github.com/npm/npm/commit/70a5310712c6666e753ca8f3bfff4a780ec6292d) + `npm-registry-couchapp@2.6.12`: + Better 0.8 compatibility, and ability to run in travis docker stuff. This + means the test suite should run a lot faster, too! + ([@iarna](https://github.com/iarna)) +* [`28fae39`](https://github.com/npm/npm/commit/28fae399212eda5554e6c0ffd8c9591144ab7b9d) + Get rid of sudo, for Travis! + ([@zkat](https://github.com/zkat)) + +### v2.14.15 (2015-12-10): + +Did you know that Bob Ross reached the rank of master sergeant in the US Air +Force before becoming perhaps the most soothing painter of all time? + +#### TWO HAPPY LITTLE BUG FIXES + +* [`f482664`](https://github.com/npm/npm/commit/f4826645dc6b5c0f05c5f9187efb28c1a293554f) + [#10505](https://github.com/npm/npm/issues/10505) `npm ls --json --depth=0` + now respects the depth parameter, when it is zero and when it is not zero. + ([@MarkReeder](https://github.com/MarkReeder)) +* [`529fa1f`](https://github.com/npm/npm/commit/529fa1ff2c6432a773af99a1c5209c0865f7a19c) + [#9099](https://github.com/npm/npm/issues/9099) I had always thought you + could run `npm version` from subdirectories in your project, which is great, + because now you can. I guess I was just ahead of my time. + ([@ekmartin](https://github.com/ekmartin)) + +#### NOW PAINT IN SOME NICE DOCS CHANGES + +* [`1fc7f2b`](https://github.com/npm/npm/commit/1fc7f2b523ea760e08adb9b861b28e3ba450e565) + [#10546](https://github.com/npm/npm/issues/10546) Goodbye, FAQ! You were + cheeky and fun until you weren't! Don't worry: npm still loves everyone, + especially you! ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`7fe6950`](https://github.com/npm/npm/commit/7fe6950b44d241bb4d90857a44d89d750af1e2b3) + [#10570](https://github.com/npm/npm/issues/10570) Update documentation URLs + to be HTTPS everywhere sensible. No HTTP shall be spared! + ([@rsp](https://github.com/rsp)) +* [`96ebb90`](https://github.com/npm/npm/commit/96ebb902439e4f6f37f8beffb589769146fecf24) + [#10650](https://github.com/npm/npm/issues/10650) Correctly note that there + are two lifecycle scripts run by an install phase in an example, instead of + three. ([@eymengunay](https://github.com/eymengunay)) +* [`5196893`](https://github.com/npm/npm/commit/5196893a7496f68a514b83641ff6b72f14d664dd) + [#10687](https://github.com/npm/npm/issues/10687) `npm outdated`'s output can + be a little puzzling sometimes. I've attempted to make it clearer, with some + examples, of what's going on with "wanted" and "latest" in more cases. + ([@othiym23](https://github.com/othiym23)) +* [`8e6712d`](https://github.com/npm/npm/commit/8e6712d4ee128858cab36c77723e35bddbb977ba) + [#10700](https://github.com/npm/npm/issues/10700) Hey, do you remember when + `search.npmjs.org` was a thing? I think I do? The last time I used it was in + like 2012, and it's gone now, so remove it from the docs. + ([@gagern](https://github.com/gagern)) +* [`27d2612`](https://github.com/npm/npm/commit/27d2612b3f5aa88b12c943d04e162ce4c3a350ae) + `semver@5.1.0`: Include BNF for SemVer expression grammar (which is also now + included in `npm help semver`). ([@isaacs](https://github.com/isaacs)) + +#### LAND YOUR DEPENDENCY UPGRADES IN PAIRS SO EVERYONE HAS A FRIEND + +* [`fc6c3c5`](https://github.com/npm/npm/commit/fc6c3c53a31e9e11c2616fcd378202e5b80bf286) + `request@2.67.0` ([@simov](https://github.com/simov)) +* [`07013fd`](https://github.com/npm/npm/commit/07013fd0fd55a2eb31fb9334631ee5d0dd5c41bb) + [isaacs/rimraf#89](https://github.com/isaacs/rimraf/pull/89) `rimraf@2.4.4` + ([@zerok](https://github.com/zerok)) +* [`bc149be`](https://github.com/npm/npm/commit/bc149bef871f0f00639509898cece531af3aa8b3) + [isaacs/once#7](https://github.com/isaacs/once/pull/7) `once@1.3.3` + ([@floatdrop](https://github.com/floatdrop)) +* [`ac598d3`](https://github.com/npm/npm/commit/ac598d36e1ad207bc0d8a7eadfd84b26146aec1f) + `lru-cache@3.2.0` ([@isaacs](https://github.com/isaacs)) +* [`1b915ce`](https://github.com/npm/npm/commit/1b915ce1e0787ccb6d8aa235d002d66565f2175d) + `npm-registry-client@7.0.9` ([@othiym23](https://github.com/othiym23)) +* [`df7dd78`](https://github.com/npm/npm/commit/df7dd78b8fe3cc58202996fa6c994fc55419bfa5) + `tap@2.3.1` ([@isaacs](https://github.com/isaacs)) + +### v2.14.14 (2015-12-03): + +#### FIX URL IN LICENSE + +The license incorrectly identified the registry URL as `registry.npmjs.com` and +this has been corrected to `registry.npmjs.org`. + +* [`6051a69`](https://github.com/npm/npm/commit/6051a69b1adc80f5f200077067e831643f655bd4) + [#10685](https://github.com/npm/npm/pull/10685) + Fix npm public registry URL in notices. + ([@kemitchell](https://github.com/kemitchell)) + +#### NO MORE MD5 + +We updated modules that had been using MD5 for non-security purposes. While +this is perfectly safe, if you compile Node in FIPS-compliance mode it will +explode if you try to use MD5. We've replaced MD5 with Murmur, which conveys +our intent better and is faster to boot. + +* [`30b5994`](https://github.com/npm/npm/commit/30b599496a9762482e1cef945a378e3a534fd366) + [#10629](https://github.com/npm/npm/issues/10629) + `write-file-atomic@1.1.4` + ([@othiym23](https://github.com/othiym23)) +* [`68c63ff`](https://github.com/npm/npm/commit/68c63ff1279d3d5ea7b2c970ab5562a8e0536f27) + [#10629](https://github.com/npm/npm/issues/10629) + `fs-write-stream-atomic@1.0.5` + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`e48e5a9`](https://github.com/npm/npm/commit/e48e5a90b4dcf76124b7e9ea3b295c1383e7f0c8) + [nodejs/node-gyp#831](https://github.com/nodejs/node-gyp/pull/831) + `node-gyp@3.2.1`: Improved \*BSD support. + ([@bnoordhuis](https://github.com/bnoordhuis)) + +### v2.14.13 (2015-11-25): + +#### THE npm CLI !== THE npm REGISTRY !== npm, INC. + +npm-the-CLI is licensed under the terms of the [Artistic License +2.0](https://github.com/npm/npm/blob/8d79c1a39dae908f27eaa37ff6b23515d505ef29/LICENSE), +which is a liberal open-source license that allows you to take this code and do +pretty much whatever you like with it (that is, of course, not legal language, +and if you're doing anything with npm that leaves you in doubt about your legal +rights, please seek the review of qualified counsel, which is to say, not +members of the CLI team, none of whom have passed the bar, to my knowledge). At +the same time the primary registry the CLI uses when looking up and downloading +packages is a commercial service run by npm, Inc., and it has its own [Terms of +Use](https://www.npmjs.com/policies/terms). + +Aside from clarifying the terms of use (and trying to make sure they're more +widely known), the only recent changes to npm's licenses have been making the +split between the CLI and registry clearer. You are still free to do whatever +you like with the CLI's source, and you are free to view, download, and publish +packages to and from `registry.npmjs.org`, but now the existing terms under +which you can do so are more clearly documented. Aside from the two commits +below, see also [the release notes for +`npm@2.14.11`](https://github.com/npm/npm/releases/tag/v2.14.11), which is where +the split between the CLI's code and the terms of use for the registry was +first made more clear. + +* [`1f3e936`](https://github.com/npm/npm/commit/1f3e936aab6840667948ef281e0c3621df365131) + [#10532](https://github.com/npm/npm/issues/10532) Clarify that + `registry.npmjs.org` is the default, but that you're free to use the npm CLI + with whatever registry you wish. ([@kemitchell](https://github.com/kemitchell)) +* [`6733539`](https://github.com/npm/npm/commit/6733539eeb9b32a5f2d1a6aa797987e2252fa760) + [#10532](https://github.com/npm/npm/issues/10532) Having semi-duplicate + release information in `README.md` was confusing and potentially inaccurate, + so remove it. ([@kemitchell](https://github.com/kemitchell)) + +#### EASE UP ON WINDOWS BASH USERS + +It turns out that a fair number of us use bash on Windows (through MINGW or +bundled with Git, plz – Cygwin is still a bridge too far, for both npm and +Node.js). [@jakub-g](https://github.com/jakub-g) did us all a favor and relaxed +the check for npm completion to support MINGW bash. Thanks, Jakub! + +* [`460cc09`](https://github.com/npm/npm/commit/460cc0950fd6a005c4e5c4f85af807814209b2bb) + [#10156](https://github.com/npm/npm/issues/10156) completion: enable on + Windows in git bash ([@jakub-g](https://github.com/jakub-g)) + +#### MAKE NODE-GYP A LITTLE BLUER + +* [`333e118`](https://github.com/npm/npm/commit/333e1181082842c21edc62f0ce515928424dff1f) + `node-gyp@3.2.0`: Support AIX, use `which` to find Python, updated to a newer + version of `gyp`, and more! ([@bnoordhuis](https://github.com/bnoordhuis)) + +#### WE LIKE SPDX AND ALL BUT IT'S NOT ACTUALLY A DIRECT DEP, SORRY + +* [`1f4b4bb`](https://github.com/npm/npm/commit/1f4b4bbdf8758281beecb7eaf75d05a6c4a77c15) + Removed `spdx` as a direct npm dependency, since we don't actually need it at + that level, and updated subdeps for `validate-npm-package-license` + ([@othiym23](https://github.com/othiym23)) + +#### A BOUNTEOUS THANKSGIVING CORNUCOPIA OF DOC TWEAKS + +These are great! Keep them coming! Sorry for letting them pile up so deep, +everybody. Also, a belated Thanksgiving to our Canadian friends, and a happy +Thanksgiving to all our friends in the USA. + +* [`6101f44`](https://github.com/npm/npm/commit/6101f44737645d9379c3396fae81bbc4d94e1f7e) + [#10250](https://github.com/npm/npm/issues/10250) Correct order of `org:team` + in `npm team` documentation. ([@louislarry](https://github.com/louislarry)) +* [`e8769f9`](https://github.com/npm/npm/commit/e8769f9807b91582c15ef130733e2e72b6c7bda4) + [#10371](https://github.com/npm/npm/issues/10371) Remove broken / duplicate + link to tag. ([@WickyNilliams](https://github.com/WickyNilliams)) +* [`1ae2dbe`](https://github.com/npm/npm/commit/1ae2dbe759feb80d8634569221ec6ee2c6d1d1ff) + [#10419](https://github.com/npm/npm/issues/10419) Remove references to + nonexistent `npm-rm(1)` documentation. ([@KenanY](https://github.com/KenanY)) +* [`777a271`](https://github.com/npm/npm/commit/777a271830a42d4ee62540a89f764a6e7d62de19) + [#10474](https://github.com/npm/npm/issues/10474) Clarify that install finds + dependencies in `package.json`. ([@sleekweasel](https://github.com/sleekweasel)) +* [`dcf4b5c`](https://github.com/npm/npm/commit/dcf4b5cbece1b0ef55ab7665d9acacc0b6b7cd6e) + [#10497](https://github.com/npm/npm/issues/10497) Clarify what a package is + slightly. ([@aredridel](https://github.com/aredridel)) +* [`447b3d6`](https://github.com/npm/npm/commit/447b3d669b2b6c483b8203754ac0a002c67bf015) + [#10539](https://github.com/npm/npm/issues/10539) Remove an extra, spuriously + capitalized letter. ([@alexlukin-softgrad](https://github.com/alexlukin-softgrad)) + +### v2.14.12 (2015-11-19): + +#### TEEN ORCS AT THE GATES + +This week heralds the general release of the primary npm registry's [new +support for private packages for +organizations](http://blog.npmjs.org/post/133542170540/private-packages-for-organizations). +For many potential users, it's the missing piece needed to make it easy for you +to move your organization's private work onto npm. And now it's here! The +functionality to support it has been in place in the CLI for a while now, +thanks to [@zkat](https://github.com/zkat)'s hard work. + +During our final testing before the release, our ace support team member +[@snopeks](https://github.com/snopeks) noticed that there had been some drift +between the CLI team's implementation and what npm was actually preparing to +ship. In the interests of everyone having a smooth experience with this +_extremely useful_ new feature, we quickly made a few changes to square up the +CLI and the web site experiences. + +* [`0e8b15e`](https://github.com/npm/npm/commit/0e8b15e9fbc89e31bd00e573b648846beddfb835) + [#9327](https://github.com/npm/npm/issues/9327) `npm access` no longer has + problems when run in a directory that doesn't contain a `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`c4e939c`](https://github.com/npm/npm/commit/c4e939c1d493601d25dcb88e6ffcca73076fd3fd) + [npm/npm-registry-client#126](https://github.com/npm/npm-registry-client/issues/126) + `npm-registry-client@7.0.8`: Allow the CLI to grant, revoke, and list + permissions on unscoped (public) packages on the primary registry. + ([@othiym23](https://github.com/othiym23)) + +#### A BRIEF NOTE ON NPM'S BACKWARDS COMPATIBILITY + +We don't often have much to say about the changes we make to our internal +testing and tooling, but I'm going to take this opportunity to reiterate that +npm tries hard to maintain compatibility with a wide variety of Node versions. +As this change shows, we want to ensure that npm works the same across: + +* Node.js 0.8 +* Node.js 0.10 +* Node.js 0.12 +* the latest io.js release +* Node.js 4 LTS +* Node.js 5 + +Contributors who send us pull requests often notice that it's very rare that +our tests pass across all of those versions (ironically, almost entirely due to +the packages we use for testing instead of any issues within npm itself). We're +currently beginning an effort, lasting the rest of 2015, to clean up our test +suite, and not only get it passing on all of the above versions of Node.js, but +working solidly on Windows as well. This is a compounding form of technical +debt that we're finally paying down, and our hope is that cleaning up the tests +will produce a more robust CLI that's a lot easier to write patches for. + +* [`d743620`](https://github.com/npm/npm/commit/d743620a0005213a65d25de771661b4d48a09717) + [#10233](https://github.com/npm/npm/issues/10233) Update Node.js versions + that Travis uses to test npm. ([@iarna](https://github.com/iarna)) + +#### TYPOS IN THE LICENSE, OH MY + +* [`58ac241`](https://github.com/npm/npm/commit/58ac241f556b2c202a8ee33321965e2540361ca7) + [#10478](https://github.com/npm/npm/issues/10478) Correct two typos in npm's + LICENSE. ([@jorrit](https://github.com/jorrit)) + +### v2.14.11 (2015-11-12): + +#### ASK FOR NOTHING, GET LATEST + +When you run `npm install foo`, you probably expect that you'll get the +`latest` version of `foo`, whatever that is. And good news! That's what this +change makes it do. + +We _think_ this is what everyone wants, but if this causes problems for you, we +want to know! If it proves problematic for people we will consider reverting it +(preferrably before this becomes `npm@latest`). + +Previously, when you ran `npm install foo` we would act as if you typed `npm +install foo@*`. Now, like any range-type specifier, in addition to matching the +range, it would also have to be `<=` the value of the `latest` dist-tag. +Further, it would exclude prerelease versions from the list of versions +considered for a match. + +This worked as expected most of the time, unless your `latest` was a prerelease +version, in which case that version wouldn't be used, to everyone's surprise. + +* [`6f0a646`](https://github.com/npm/npm/commit/6f0a646cd865b24fe3ff25365bf5421780e63e01) + [#10189](https://github.com/npm/npm/issues/10189) `npm-package-arg@4.1.0`: + Change the default version from `*` to `latest`. + ([@zkat](https://github.com/zkat)) + +#### LICENSE CLARIFICATION + +* [`54a9046`](https://github.com/npm/npm/commit/54a90461f068ea89baa5d70248cdf1581897936d) + [#10326](https://github.com/npm/npm/issues/10326) Clarify what-all is covered + by npm's license and point to the registry's terms of use. + ([@kemitchell](https://github.com/kemitchell)) + +#### CLOSER TO GREEN TRAVIS + +* [`28efd3d`](https://github.com/npm/npm/commit/28efd3d7dfb2fa3755076ae706ea4d38c6ee6900) + [#10232](https://github.com/npm/npm/issues/10232) `nock@1.9.0`: Downgrade + nock to a version that doesn't depend on streams2 in core so that more of our + tests can pass in 0.8. ([@iarna](https://github.com/iarna)) + +#### A BUG FIX + +* [`eacac8f`](https://github.com/npm/npm/commit/eacac8f05014d15217c3d8264d0b00a72eafe2d2) + [#9965](https://github.com/npm/npm/issues/9965) Fix a corrupt `package.json` + file introduced by a merge conflict in + [`022691a`](https://github.com/npm/npm/commit/022691a). + ([@waynebloss](https://github.com/waynebloss)) + +#### A DEPENDENCY UPGRADE + +* [`ea7d8e0`](https://github.com/npm/npm/commit/ea7d8e00a67a3d5877ed72c9728909c848468a9b) + [npm/nopt#51](https://github.com/npm/nopt/pull/51) `nopt@3.0.6`: Allow + types checked to be validated by passed-in name in addition to the JS name of + the type / class. ([@wbecker](https://github.com/wbecker)) + +### v2.14.10 (2015-11-05): + +There's nothing in here that that isn't in the `npm@3.4.0` release notes, but +all of the commit shasums have been adjusted to be correct. Enjoy! + +#### BUG FIXES VIA DEPENDENCY UPDATES + +* [`204c558`](https://github.com/npm/npm/commit/204c558c06637a753c0b41d0cf19f564a1ac3715) + [#8640](https://github.com/npm/npm/issues/8640) + [npm/normalize-package-data#69](https://github.com/npm/normalize-package-data/pull/69) + `normalize-package-data@2.3.5`: Fix a bug where if you didn't specify the + name of a scoped module's binary, it would install it such that it was + impossible to call it. ([@iarna](https://github.com/iarna)) +* [`bbdf4ee`](https://github.com/npm/npm/commit/bbdf4ee0a3cd12be6a2ace255b67d573a72f1f8f) + [npm/fstream-npm#14](https://github.com/npm/fstream-npm/pull/14) + `fstream-npm@1.0.7`: Only filter `config.gypi` when it's in the build + directory. ([@mscdex](https://github.com/mscdex)) +* [`d82ff81`](https://github.com/npm/npm/commit/d82ff81403e906931fac701775723626dcb443b3) + [npm/fstream-npm#15](https://github.com/npm/fstream-npm/pull/15) + `fstream-npm@1.0.6`: Stop including directories that happened to have names + matching whitelisted npm files in npm module tarballs. The most common cause + was that if you had a README directory then everything in it would be + included if wanted it or not. ([@taion](https://github.com/taion)) + +#### DOCUMENTATION FIXES + +* [`16361d1`](https://github.com/npm/npm/commit/16361d122f2ff6d1a4729c66153b7c24c698fd19) + [#10036](https://github.com/npm/npm/pull/10036) Fix typo / over-abbreviation. + ([@ifdattic](https://github.com/ifdattic)) +* [`d1343dd`](https://github.com/npm/npm/commit/d1343dda42f113dc322f95687f5a8c7d71a97c35) + [#10176](https://github.com/npm/npm/pull/10176) Fix broken link, scopes => + scope. ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`110663d`](https://github.com/npm/npm/commit/110663d000a3908a4853393d9abae481700cf4dc) + [#9460](https://github.com/npm/npm/issue/9460) Specifying the default command + run by "npm start" and the fact that you can pass it arguments. + ([@JuanCaicedo](https://github.com/JuanCaicedo)) + +#### DEPENDENCY UPDATES FOR THEIR OWN SAKE + +* [`7476d2d`](https://github.com/npm/npm/commit/7476d2d31552a41671c425aa7fcc2844e0381008) + [npm/npmlog#19](https://github.com/npm/npmlog/pull/19) + `npmlog@2.0.0`: Make it possible to emit log messages with `error` as the + prefix. + ([@bengl](https://github.com/bengl)) +* [`6ca7888`](https://github.com/npm/npm/commit/6ca7888862cfe8bf802dc7c66632c102acd94cf5) + `read-package-json@2.0.2`: Minor cleanups. + ([@KenanY](https://github.com/KenanY)) + +### v2.14.9 (2015-10-29): + +There's still life in `npm@2`, but for now, enjoy these dependency upgrades! +Also, [@othiym23](https://github.com/othiym23) says hi! _waves_ +[@zkat](https://github.com/zkat) has her hands full, and +[@iarna](https://github.com/iarna)'s handling `npm@3`, so I'm dealing with +`npm@2` and the totally nonexistent weird bridge `npm@1.4` LTS release that may +or may not be happening this week. + +#### CAN'T STOP WON'T STOP UPDATING THOSE DEPENDENCIES + +* [`f52f0cb`](https://github.com/npm/npm/commit/f52f0cb51526314197e9d67619feebbd82a397b7) + [#10150](https://github.com/npm/npm/issues/10150) `chmodr@1.0.2`: Use + `fs.lstat()` to check if an entry is a directory, making `chmodr()` work + properly with NFS mounts on Windows. ([@sheerun](https://github.com/sheerun)) +* [`f7011d7`](https://github.com/npm/npm/commit/f7011d7b3b1d9148a6cd8f7b8359d6fe3269a912) + [#10150](https://github.com/npm/npm/issues/10150) `which@1.2.0`: Additional + command-line parameters, which is nice but not used by npm. + ([@isaacs](https://github.com/isaacs)) +* [`ebcc0d8`](https://github.com/npm/npm/commit/ebcc0d8629388da0b849bbbad590382cd7268f51) + [#10150](https://github.com/npm/npm/issues/10150) `minimatch@3.0.0`: Don't + package browser version. ([@isaacs](https://github.com/isaacs)) +* [`8c98dce`](https://github.com/npm/npm/commit/8c98dce5ffe242bafbe92b849e73e8de1803e256) + [#10150](https://github.com/npm/npm/issues/10150) `fstream-ignore@1.0.3`: + Upgrade to use `minimatch@3` (for deduping purposes). + ([@othiym23](https://github.com/othiym23)) +* [`db9ef33`](https://github.com/npm/npm/commit/db9ef337c253ecf21c921055bf8742e10d1cb3bb) + [#10150](https://github.com/npm/npm/issues/10150) `request@2.65.0`: + Dependency upgrades and a few bug fixes, mostly related to cookie handling. + ([@simov](https://github.com/simov)) + +#### DEVDEPENDENCIES TOO, I GUESS, IT'S COOL + +* [`dfbf621`](https://github.com/npm/npm/commit/dfbf621afa09c46991249b4f9a995d1823ea7ede) + [#10150](https://github.com/npm/npm/issues/10150) `tap@2.2.0`: Better + handling of test order handling (including some test fixes for npm). + ([@isaacs](https://github.com/isaacs)) +* [`cf5ad5a`](https://github.com/npm/npm/commit/cf5ad5a8c88bfd72e30ef8a8d1d3c5508e0b3c23) + [#10150](https://github.com/npm/npm/issues/10150) `nock@2.16.0`: More + expectations, documentation, and bug fixes. + ([@pgte](https://github.com/pgte)) + +### v2.14.8 (2015-10-08): + +#### SLOWLY RECOVERING FROM FEELINGS + +OS&F is definitely my favorite convention I've gone to. Y'all should check it +out next year! Rebecca and Kat are back, although Forrest is out at +[&yet conf](http://andyetconf.com/). + +This week sees another tiny LTS release with non-code-related patches -- just +CI/release things. + +Meanwhile, have you heard? `npm@3` is much faster now! Go upgrade with `npm +install -g npm@latest` and give it a whirl if you haven't already! + +#### IF YOU CHANGE CASING ON A FILE, YOU ARE NOT MY FRIEND + +Seriously. I love me some case-sensitive filesystems, but a lot of us have to +deal with `git` and its funky support for case normalizing systems. Have mercy +and just don't bother if all you're changing is casing, please? Otherwise, I +have to do this little dance to prevent horrible conflicts. + +* [`c3a7b61`](https://github.com/npm/npm/commit/c3a7b619786650a45653c8b55b8741fc7bb5cfda) + [#9804](https://github.com/npm/npm/pulls/9804) Remove the readme file with + weird casing. + ([@zkat](https://github.com/zkat)) +* [`f3f619e`](https://github.com/npm/npm/commit/f3f619e06e4be1378dbf286f897b50e9c69c9557) + [#9804](https://github.com/npm/npm/pulls/9804) Add the readme file back in, + with desired casing. + ([@zkat](https://github.com/zkat)) + +#### IDK. OUR CI DOESN'T EVEN FULLY WORK YET BUT SURE + +Either way, it's nice to make sure we're running stuff on the latest Node. `4.2` +is getting released very soon, though (this week?), and that'll be the first +official LTS release! + +* [`bd0b9ab`](https://github.com/npm/npm/commit/bd0b9ab6e60a31448794bbd88f94672572c3cb55) + [#9827](https://github.com/npm/npm/pulls/9827) Add node `4.0` and `4.1` to + TravisCI + ([@JaKXz](https://github.com/JaKXz)) + +### v2.14.7 (2015-10-01): + +#### MORE RELEASE STAGGERING?! + +Hi all, and greetings from [Open Source & Feelings](http://osfeels.com)! + +So we're switching gears a little with how we handle our weekly releases: from +now on, we're going to stagger release weeks between dependency bumps and +regular patches. So, this week, aside from a doc change, we'll be doing only +version bumps. Expect actual patches next week! + +#### TOTALLY FOLLOWING THE RULES ALREADY + +So I snuck this in, because it's our own [@snopeks](https://github.com/snopeks)' +first contribution to the main `npm` repo. She's been helping with building +support documents for Orgs, and contributed her general intro guide to the new +feature so you can read it with `npm help orgs` right in your terminal! + +* [`8324ea0`](https://github.com/npm/npm/commit/8324ea023ace4e08b6b8959ad199e2457af9f9cf) + [#9761](https://github.com/npm/npm/pull/9761) Added general user guide for + Orgs. + ([@snopeks](https://github.com/snopeks)) + +#### JUST. ONE. MORE. + +* [`9a502ca`](https://github.com/npm/npm/commit/9a502ca96e2d43ec75a8f684c9ca33af7e910f0a) + Use unique package name in tests to work around weird test-state-based + failures. + ([@iarna](https://github.com/iarna)) + +#### OKAY ACTUALLY THE THING I WAS SUPPOSED TO DO + +Anyway -- here's your version bump! :) + +* [`4aeb94c`](https://github.com/npm/npm/commit/4aeb94c9f0df3f41802cf2e0397a998f3b527c25) + `request@2.64.0`: No longer defaulting to `application/json` for `json` + requests. Also some minor doc and packaging patches. + ([@simov](https://github.com/simov)) + `minimatch@3.0.0`: No longer packaging browser modules. + ([@isaacs](https://github.com/isaacs)) +* [`a18b213`](https://github.com/npm/npm/commit/a18b213e6945a8f5faf882927829ac95f844e2aa) + `glob@5.0.15`: Upgraded `minimatch` dependency. + ([@isaacs](https://github.com/isaacs)) +* [`9eb64d4`](https://github.com/npm/npm/commit/9eb64e44509519ca9d788502edb2eba4cea5c86b) + `nock@2.13.0` + ([@pgte](https://github.com/pgte)) + +### v2.14.6 (2015-09-24): + +#### `¯\_(ツ)_/¯` + +Since `2.x` is LTS now, you can expect a slowdown in overall release sizes. On +top of that, we had our all-company-npm-internal-conf thing on Monday and +Tuesday so there wasn't really time to do much at all. + +Still, we're bringing you a couple of tiny little changes this week! + +* [`7b7da13`](https://github.com/npm/npm/commit/7b7da13c6cdf5eae53c20d5c69afc4c16e6f715d) + [#9471](https://github.com/npm/npm/pull/9471) When the port for a tarball is + different than the registry it's in, but the hostname is the same, the + protocol is now allowed to change, too. + ([@fastest963](https://github.com/fastest963)) +* [`6643ada`](https://github.com/npm/npm/commit/6643adaf9f37f08893e3ad28b797c55a36b2a152) + `request@2.63.0`: Use `application/json` as the default content type when + making `json` requests. + ([@simov](https://github.com/simov)) + +### v2.14.5 (2015-09-17): + +#### NPM IS DEAD. LONG LIVE NPM + +That's right folks. As of this week, `npm@next` is `npm@3`, which means it'll be +`npm@latest` next week! There's some really great shiny new things over there, +and you should really take a look. + +Many kudos to [@iarna](https://github.com/iarna) for her hard work on `npm@3`! + +Don't worry, we'll keep `2.x` around for a while (as LTS), but you won't see +many, if any, new features on this end. From now on, we're going to use +`latest-2` and `next-2` as the dist tags for the `npm@2` branch. + +#### OKAY THAT'S FINE CAN I DEPRECATE THINGS NOW? + +Yes! Specially if you're using scoped packages. Apparently, deprecating them +never worked, but that should be better now. :) + +* [`eca7b24`](https://github.com/npm/npm/commit/eca7b24de9a0090da02a93a69726f5e70ab80543) + [#9558](https://github.com/npm/npm/issues/9558) Add tests for npm deprecate. + ([@zkat](https://github.com/zkat)) +* [`648fe16`](https://github.com/npm/npm/commit/648fe16157ef0db22395ae056d1dd4b4c1605bf4) + [#9558](https://github.com/npm/npm/issues/9558) `npm-registry-client@7.0.7`: + Fixes `npm deprecate` so you can actually deprecate scoped modules now (it + never worked). + ([@zkat](https://github.com/zkat)) + +#### WTF IS `node-waf` + +idk. Some old thing. We don't talk about it anymore. + +* [`cf1b39f`](https://github.com/npm/npm/commit/cf1b39fc95a9ffad7fba4c2fee705c53b19d1d16) + [#9584](https://github.com/npm/npm/issues/9584) Fix ancient references to + `node-waf` in the docs to refer to the `node-gyp` version of things. + ([@KenanY](https://github.com/KenanY)) + +#### THE `graceful-fs` AND `node-gyp` SAGA CONTINUES + +Last week had some sweeping `graceful-fs` upgrades, and this takes care of one +of the stragglers, as well as bumping `node-gyp`. `node@4` users might be +excited about this, or even `node@<4` users who previously had to cherry-pick a +bunch of patches to get the latest npm working. + +* [`e07354f`](https://github.com/npm/npm/commit/e07354f3ff3a6be568fe950f1f825897f72912d8) + `sha@2.0.1`: Upgraded graceful-fs! + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`83cb6ee`](https://github.com/npm/npm/commit/83cb6ee4045b85e565e9678ca1878877e1dc75bd) + `node-gyp@3.0.3` + ([@rvagg](https://github.com/rvagg)) + +#### DEPS! DEPS! MORE DEPS! OK STOP DEPS + +* [`0d60888`](https://github.com/npm/npm/commit/0d608889615a1cb63f5f852337e955053f201aeb) + `normalize-package-data@2.3.4`: Use an external package to check for built-in + node modules. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`79b4dac`](https://github.com/npm/npm/commit/79b4dac11f1c2d8ad5489fc3104734e1c10d4793) + `retry@0.8.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`c164941`](https://github.com/npm/npm/commit/c164941d3c792904d5b126a4fd36eefbe0699f52) + `request@2.62.0`: node 4 added to build targets. Option initialization issues + fixed. + ([@simov](https://github.com/simov)) +* [`0fd878a`](https://github.com/npm/npm/commit/0fd878a44d5ae303325808d1f00df4dce7549d50) + `lru-cache@2.7.0`: Cache serialization support and fixes a cache length bug. + ([@isaacs](https://github.com/isaacs)) +* [`6a7a114`](https://github.com/npm/npm/commit/6a7a114a45b4699995d6e09164fdfd0fa1274591) + `nock@2.12.0` + ([@pgte](https://github.com/pgte)) +* [`6b25e6d`](https://github.com/npm/npm/commit/6b25e6d2235c11f4444104db4545cb42a0267666) + `semver@5.0.3`: Removed uglify-js dead code. + ([@isaacs](https://github.com/isaacs)) + +### v2.14.4 (2015-09-10): + +#### THE GREAT NODEv4 SAGA + +So [Node 4 is out now](https://nodejs.org/en/blog/release/v4.0.0/) and that's +going to involve a number of things over in npm land. Most importantly, it's the +last major release that will include the `2.x` branch of npm. That also means +that `2.x` is going to go into LTS mode in the coming weeks -- once `npm@3` +becomes our official `latest` release. You can most likely expect Node 5 to +include `npm@3` by default, whenever that happens. We'll go into more detail +about LTS at that point, as well, so keep your eyes peeled for announcements! + +#### NODE IS DEAD. LONG LIVE NODE! + +Node 4 being released means that a few things that used to be floating patches +are finally making it right into npm proper. This week, we've got two such +updates, both to dependencies: + +* [`505d9e4`](https://github.com/npm/npm/commit/505d9e40c13b8b0bb3f70ee9886f7b73ba569407) + `node-gyp@3.0.1`: Support for node nightlies and compilation for both node and + io.js without extra patching + ([@rvagg](https://github.com/rvagg)) + +[@thefourtheye](https://github.com/thefourtheye) was kind enough to submit a +*bunch* of PRs to npm's dependencies updating them to `graceful-fs@4.1.2`, which +mainly makes it so we're no longer monkey-patching `fs`. The following are all +updates related to this: + +* [`10cb189`](https://github.com/npm/npm/commit/10cb189c773fef804214018d57509cc7a943184b) + `write-file-atomic@1.1.3` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`edfb80b`](https://github.com/npm/npm/commit/edfb80b39f8cfce9a993f139eb98248001198e09) + `tar@2.2.1` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`aa6e1ee`](https://github.com/npm/npm/commit/aa6e1eede7d71fa69d7256afdfbaa3406bc39a5b) + `read-package-json@2.0.1` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`18971a3`](https://github.com/npm/npm/commit/18971a361635ed3958ecd39b63930ae1e56f8612) + `read-installed@4.0.3` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`a4cba71`](https://github.com/npm/npm/commit/a4cba71bd2532236fda7385bf55e8790cafd4f0a) + `fstream@1.0.8` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`70a38e2`](https://github.com/npm/npm/commit/70a38e29418951ac61ab6cf269d188074fe8ac3a) + `fs-write-stream-atomic@1.0.4` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`9cbd20f`](https://github.com/npm/npm/commit/9cbd20f691e37960e4ba12d401abd1069657cb47) + `fs-vacuum@1.2.7` + ([@thefourtheye](https://github.com/thefourtheye)) + +#### OTHER PATCHES + +* [`c4dd521`](https://github.com/npm/npm/commit/c4dd5213b2f3283ea0392845e5f78cac4573529e) + [#9506](https://github.com/npm/npm/issues/9506) Make `npm link` work on + Windows when using node pre-release/RC releases. + ([@jon-hall](https://github.com/jon-hall)) +* [`b6bc29c`](https://github.com/npm/npm/commit/b6bc29c1401b3d6b570c09cbef1866bdb0436b59) + [#9544](https://github.com/npm/npm/issues/9549) `process.binding` is being + deprecated, so our only direct usage has been removed. + ([@ChALkeR](https://github.com/ChALkeR)) + +#### MORE DEPENDENCIES! + +* [`d940594`](https://github.com/npm/npm/commit/d940594e479a7f012b6dd6952e8ef985ba2a6216) + `tap@1.4.1` + ([@isaacs](https://github.com/isaacs)) +* [`ee38486`](https://github.com/npm/npm/commit/ee3848669331fd98879a3175789d963543f67ce3) + `which@1.1.2`: Added tests for Windows-related dead code that was previously + helping a silent failure happen. Travis stuff, too. + ([@isaacs](https://github.com/isaacs)) + +#### DOC UPDATES + +* [`475daf5`](https://github.com/npm/npm/commit/475daf54ad07777938d1d7ee1a3e576961e84510) + [#9492](https://github.com/npm/npm/issues/9492) Clarify how `.npmignore` and + `.gitignore` are found and used by npm. + ([@addaleax](https://github.com/addaleax)) +* [`b2c391d`](https://github.com/npm/npm/commit/b2c391d7833249626a6d7650363a83bcc778717a) + `nopt@3.0.4`: Minor clarifications to docs about how array and errors work. + ([@zkat](https://github.com/zkat)) + +### v2.14.3 (2015-09-03): + +#### TEAMS AND ORGS STILL BETA. CLI CODE STILL SOLID. + +Our closed beta for Teens and Orcs is happening! The web team is hard at work +making sure everything looks pretty and usable and such. Once we fix things +stemming from that beta, you can expect the feature to be available publicly. +Some time after that, it'll even be available for free for FOSS orgs. It'll Be +Done When It's Done™. + +#### OH GOOD, I CAN ACTUALLY UPSTREAM NOW + +Looks like last week's release foiled our own test suite when trying to upstream +it to Node! Just a friendly reminder that no, `.npmrc` is no longer included +then you pack/release a package! [@othiym23](https://github.com/othiym23) and +[@isaacs](https://github.com/isaacs) managed to suss the really strange test +failures resulting from that, and we've patched it in this release. + +* [`01a3428`](https://github.com/npm/npm/commit/01a3428534b754dca89a56fd1e49f55cb22f6f25) + [#9476](https://github.com/npm/npm/issues/9476) test: Recreate missing + `.npmrc` files when missing so downstream packagers can run tests on packed + npm. + ([@othiym23](https://github.com/othiym23)) + +#### TALKING ABOUT THE CHANGELOG IN THE CHANGELOG IS LIKE, POMO OR SOMETHING + +* [`c1e7a83`](https://github.com/npm/npm/commit/c1e7a83c0ae7aadf01aecc57cf8a0ae2009d4da8) + [#9431](https://github.com/npm/npm/issues/9431) CHANGELOG: clarify + windows-related nature of patch + ([@saper](https://github.com/saper)) + +#### devDependencies UPDATED + +No actual dep updates this week, but we're bumping a couple of devDeps: + +* [`8454835`](https://github.com/npm/npm/commit/84548351bfd63e3e305d195abbcad24c6b7c3e8e) + `tap@1.4.0`: Add `t.contains()` as alias to `t.match()` + ([@isaacs](https://github.com/isaacs)) +* [`13d2216`](https://github.com/npm/npm/commit/13d22161bcdeb6e1ed095d5ba2f77e6abfffa5eb) + `deep-equal@1.0.1`: Make `null == undefined` in non-strict mode + ([@isaacs](https://github.com/isaacs)) + +### v2.14.2 (2015-08-27): + +#### GETTING THAT PESKY `preferGlobal` WARNING RIGHT + +So apparently the `preferGlobal` option hasn't quite been warning correctly for +some time. But now it should be all better! tl;dr: if you try and install a +dependency with `preferGlobal: true`, and it's _not already_ in your +`package.json`, you'll get a warning that the author would really rather you +install it with `--global`. This should prevent Windows PowerShell from thinking +npm has failed just because of a benign warning. + +* [`bbb25f3`](https://github.com/npm/npm/commit/bbb25f30d582f8979168c79233a9f8f840974f90) + [#8841](https://github.com/npm/npm/issues/8841) + [#9409](https://github.com/npm/npm/issues/9409) The `preferGlobal` + warning shouldn't happen if the dependency being installed is listed in + `devDependencies`. ([@saper](https://github.com/saper)) +* [`222fcec`](https://github.com/npm/npm/commit/222fcec85ccd30d35899e5037079fb14625af4e2) + [#9409](https://github.com/npm/npm/issues/9409) `preferGlobal` now prints a + warning when there are no dependencies for the current package. + ([@zkat](https://github.com/zkat)) +* [`5cfed6d`](https://github.com/npm/npm/commit/5cfed6d7a1a5f2731688cfc8293b5e43a6355393) + [#9409](https://github.com/npm/npm/issues/9409) Verify that + `preferGlobal` is warning as expected (when a `preferGlobal` dependency is + installed, but isn't listed in either `dependencies` or `devDependencies`). + ([@zkat](https://github.com/zkat)) + +#### BUMP +1 + +* [`eeafce2`](https://github.com/npm/npm/commit/eeafce2d06883c0f51bf403415b6bc5f2647eba3) + `validate-npm-package-license@3.0.1`: Include additional metadata in parsed license object, + useful for license checkers. ([@kemitchell](https://github.com/kemitchell)) +* [`1502a28`](https://github.com/npm/npm/commit/1502a285f84aa548806b3eafc8889e6288e810f3) + `normalise-package-data@2.3.2`: Updated to use `validate-npm-package-license@3.0.1`. + ([@othiym23](https://github.com/othiym23)) +* [`cbde823`](https://github.com/npm/npm/commit/cbde8233436bf0ea62a4740869b4990322c20659) + `init-package-json@1.9.1`: Add a `silent` option to suppress output on writing the + generated `package.json`. Also, updated to use `validate-npm-package-license@3.0.1`. + ([@zkat](https://github.com/zkat)) +* [`08fda46`](https://github.com/npm/npm/commit/08fda465452b4d77f1ced8050ee3a35a77fc30a5) + `tar@2.2.0`: Minor improvements. ([@othiym23](https://github.com/othiym23)) +* [`dc2f20b`](https://github.com/npm/npm/commit/dc2f20b53fff77203139c863b48da0e959df2ac9) + `rimraf@2.4.3`: `EPERM` now triggers a delay / retry loop (since Windows throws + this when things still hold a handle). ([@isaacs](https://github.com/isaacs)) +* [`e8acb27`](https://github.com/npm/npm/commit/e8acb273aa67ee0394d0431650e1b2a7d09c8554) + `read@1.0.7`: Fix licensing ambiguity. ([@isaacs](https://github.com/isaacs)) + +#### OTHER STUFF THAT'S RELEVANT + +* [`73a1ee0`](https://github.com/npm/npm/commit/73a1ee0be90fa1928521b63f28bef83b8ffab61d) + [#9386](https://github.com/npm/npm/issues/9386) Include additional unignorable files in + documentation. + ([@mjhasbach](https://github.com/mjhasbach)) +* [`0313e40`](https://github.com/npm/npm/commit/0313e40ee0f757fce8861be590ad668c23d7be53) + [#9396](https://github.com/npm/npm/issues/9396) Improve the `EISDIR` error + message returned by npm's error-handling code to give users a better hint of + what's most likely going on. Usually, error reports with this error code are + about people trying to install things without a `package.json`. + ([@KenanY](https://github.com/KenanY)) +* [`2677457`](https://github.com/npm/npm/commit/26774579c739c5951351e58263cf4d6ea3d66ec8) + [#9360](https://github.com/npm/npm/issues/9360) Make it easier to run + only _some_ of npm tests with lifecycle scripts via `npm tap test/tap/testname.js`. + ([@iarna](https://github.com/iarna)) + +### v2.14.1 (2015-08-20): + +#### SECURITY FIX + +There are patches for two information leaks of moderate severity in `npm@2.14.1`: + +1. In some cases, npm was leaking sensitive credential information into the + child environment when running package and lifecycle scripts. This could + lead to packages being published with files (most notably `config.gypi`, a + file created by `node-gyp` that is a cache of environmental information + regenerated on every run) containing the bearer tokens used to authenticate + users to the registry. Users with affected packages have been notified (and + the affected tokens invalidated), and now npm has been modified to not + upload files that could contain this information, as well as scrubbing the + sensitive information out of the environment passed to child scripts. +2. Per-package `.npmrc` files are used by some maintainers as a way to scope + those packages to a specific registry and its credentials. This is a + reasonable use case, but by default `.npmrc` was packed into packages, + leaking those credentials. npm will no longer include `.npmrc` when packing + tarballs. + +If you maintain packages and believe you may be affected by either +of the above scenarios (especially if you've received a security +notification from npm recently), please upgrade to `npm@2.14.1` as +soon as possible. If you believe you may have inadvertently leaked +your credentials, upgrade to `npm@2.14.1` on the affected machine, +and run `npm logout` and then `npm login`. Your access tokens will be +invalidated, which will eliminate any risk posed by tokens inadvertently +included in published packages. We apologize for the inconvenience this +causes, as well as the oversight that led to the existence of this issue +in the first place. + +Huge thanks to [@ChALkeR](https://github.com/ChALkeR) for bringing these +issues to our attention, and for helping us identify affected packages +and maintainers. Thanks also to the Node.js security working group for +their coördination with the team in our response to this issue. We +appreciate everybody's patience and understanding tremendously. + +* [`b9474a8`](https://github.com/npm/npm/commit/b9474a843ca55b7c5fac6da33989e8eb39aff8b1) + `fstream-npm@1.0.5`: Stop publishing build cruft (`config.gypi`) and per-project + `.npmrc` files to keep local configuration out of published packages. + ([@othiym23](https://github.com/othiym23)) +* [`13c286d`](https://github.com/npm/npm/commit/13c286dbdc3fa8fec4cb79fc4d1ee505c8a41b2e) + [#9348](https://github.com/npm/npm/issues/9348) Filter "private" + (underscore-prefixed, even when scoped to a registry) configuration values + out of child environments. ([@othiym23](https://github.com/othiym23)) + +#### BETTER WINDOWS INTEGRATION, ONE STEP AT A TIME + +* [`e40e71f`](https://github.com/npm/npm/commit/e40e71f2f838a8a42392f44e3eeec04e323ab743) + [#6412](https://github.com/npm/npm/issues/6412) Improve the search strategy + used by the npm shims for Windows to prioritize your own local npm installs. + npm has really needed this tweak for a long time, so hammer on it and let us + know if you run into issues, but with luck it will Just Work. + ([@joaocgreis](https://github.com/joaocgreis)) +* [`204ebbb`](https://github.com/npm/npm/commit/204ebbb3e0cab696a429a878ceeb4a7e78ec2b94) + [#8751](https://github.com/npm/npm/issues/8751) + [#7333](https://github.com/npm/npm/issues/7333) Keep [autorun + scripts](https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) from + interfering with npm package and lifecycle script execution on Windows by + adding `/d` and `/s` when invoking `cmd.exe`. + ([@saper](https://github.com/saper)) + +#### IT SEEMED LIKE AN IDEA AT THE TIME + +* [`286f3d9`](https://github.com/npm/npm/commit/286f3d97103812f0fd84b70352addbe899e258f9) + [#9201](https://github.com/npm/npm/pull/9201) For a while npm was building + HTML partials for use on [`docs.npmjs.com`](https://docs.npmjs.com), but we + weren't actually using them. Stop building them, which makes running the full + test suite and installation process around a third faster. + ([@isaacs](https://github.com/isaacs)) + +#### A SINGLE LONELY DEPENDENCY UPGRADE + +* [`b343b95`](https://github.com/npm/npm/commit/b343b956ef777e321e4251ddc96ec6d80827d9e2) + `request@2.61.0`: Bug fixes and keep-alive tweaks. + ([@simov](https://github.com/simov)) + +### v2.14.0 (2015-08-13): + +#### IT'S HERE! KINDA! + +This release adds support for teens and orcs (err, teams and organizations) to +the npm CLI! Note that the web site and registry-side features of this are +still not ready for public consumption. + +A beta should be starting in the next couple of weeks, and the features +themselves will become public once all that's done. Keep an eye out for more +news! + +All of these changes were done under [`#9011`](https://github.com/npm/npm/pull/9011): + +* [`6424170`](https://github.com/npm/npm/commit/6424170fc17c666a6efc090370ec691e0cab1792) + Added new `npm team` command and subcommands. + ([@zkat](https://github.com/zkat)) +* [`52220d1`](https://github.com/npm/npm/commit/52220d146d474ec29b683bd99c06f75cbd46a9f4) + Added documentation for new `npm team` command. + ([@zkat](https://github.com/zkat)) +* [`4e66830`](https://github.com/npm/npm/commit/4e668304850d02df8eb27a779fda76fe5de645e7) + Updated `npm access` to support teams and organizations. + ([@zkat](https://github.com/zkat)) +* [`ea3eb87`](https://github.com/npm/npm/commit/ea3eb8733d9fa09ce34106b1b19fb1a8f95844a5) + Gussied up docs for `npm access` with new commands. + ([@zkat](https://github.com/zkat)) +* [`6e0b431`](https://github.com/npm/npm/commit/6e0b431c1de5e329c86e57d097aa88ebfedea864) + Fix up `npm whoami` to make the underlying API usable elsewhere. + ([@zkat](https://github.com/zkat)) +* [`f29c931`](https://github.com/npm/npm/commit/f29c931012ce5ccd69c29d83548f27e443bf7e62) + `npm-registry-client@7.0.1`: Upgrade `npm-registry-client` API to support + `team` and `access` calls against the registry. + ([@zkat](https://github.com/zkat)) + +#### A FEW EXTRA VERSION BUMPS + +* [`c977e12`](https://github.com/npm/npm/commit/c977e12cbfa50c2f52fc807f5cc19ba1cc1b39bf) + `init-package-json@1.8.0`: Checks for some `npm@3` metadata. + ([@iarna](https://github.com/iarna)) +* [`5c8c9e5`](https://github.com/npm/npm/commit/5c8c9e5ae177ba7d0d298cfa42f3fc7f0271e4ec) + `columnify@1.5.2`: Updated some dependencies. + ([@timoxley](https://github.com/timoxley)) +* [`5d56742`](https://github.com/npm/npm/commit/5d567425768b75aeab402c817a53d8b2bc60d8de) + `chownr@1.0.1`: Tests, docs, and minor style nits. + ([@isaacs](https://github.com/isaacs)) + +#### ALSO A DOC FIX + +* [`846fcc7`](https://github.com/npm/npm/commit/846fcc79b86984b109a97366b0422f995a45f8bf) + [`#9200`](https://github.com/npm/npm/pull/9200) Remove single quotes + around semver range, thus making it valid semver. + ([@KenanY](https://github.com/KenanY)) + +### v2.13.5 (2015-08-07): + +This is another quiet week for the `npm@2` release. +[@zkat](https://github.com/zkat) has been working hard on polishing the CLI +bits of the registry's new feature to support direct management of teams and +organizations, and [@iarna](https://github.com/iarna) continues to work through +the list of issues blocking the general release of `npm@3`, which is looking +more and more solid all the time. + +[@othiym23](https://github.com/othiym23) and [@zkat](https://github.com/zkat) +have also been at this week's Node.js / io.js [collaborator +summit](https://github.com/nodejs/summit/tree/master), both as facilitators and +participants. This is a valuable opportunity to get some face time with other +contributors and to work through a bunch of important discussions, but it does +leave us feeling kind of sleepy. Running meetings is hard! + +What does that leave for this release? A few of the more tricky bug fixes that +have been sitting around for a little while now, and a couple dependency +upgrades. Nothing too fancy, but most of these were contributed by developers +like _you_, which we think is swell. Thanks! + +#### BUG FIXES + +* [`d7271b8`](https://github.com/npm/npm/commit/d7271b8226712479cdd339bf85faf7e394923e0d) + [#4530](https://github.com/npm/npm/issues/4530) The bash completion script + for npm no longer alters global completion behavior around word breaks. + ([@whitty](https://github.com/whitty)) +* [`c9ce294`](https://github.com/npm/npm/commit/c9ce29415a0a8fc610690b6e9d91b64d6e36cfcc) + [#7198](https://github.com/npm/npm/issues/7198) When setting up dependencies + to be shared via `npm link <package>`, only run the lifecycle scripts during + the original link, not when running `npm link <package>` or `npm install + --link` against them. ([@murgatroid99](https://github.com/murgatroid99)) +* [`422da66`](https://github.com/npm/npm/commit/422da664bd3ce71313da447f170507faf5aac46a) + [#9108](https://github.com/npm/npm/issues/9108) Clear up minor confusion + around wording in `bundledDependencies` section of `package.json` docs. + ([@derekpeterson](https://github.com/derekpeterson)) +* [`6b42d99`](https://github.com/npm/npm/commit/6b42d99460885e715772d3487b1c548d2bc8a738) + [#9146](https://github.com/npm/npm/issues/9146) Include scripts that run for + `preversion`, `version`, and `postversion` in the section for lifecycle + scripts rather than the generic `npm run-script` output. + ([@othiym23](https://github.com/othiym23)) + +#### NOPE, NOT DONE WITH DEPENDENCY UPDATES + +* [`91a48bb`](https://github.com/npm/npm/commit/91a48bb5ef5a990781c86f8b69b8a32cf4fac2d9) + `chmodr@1.0.1`: Ignore symbolic links when recursively changing mode, just + like the Unix command. ([@isaacs](https://github.com/isaacs)) +* [`4bbc86e`](https://github.com/npm/npm/commit/4bbc86e3825e2eee9a8758ba26bdea0cb6a2581e) + `nock@2.10.0` ([@pgte](https://github.com/pgte)) + +### v2.13.4 (2015-07-30): + +#### JULY ENDS ON A FAIRLY QUIET NOTE + +Hey everyone! I hope you've had a great week. We're having a fairly small +release this week while we wrap up Teams and Orgs (or, as we've taken to calling +it internally, _Teens and Orcs_). + +In other exciting news, a bunch of us are gonna be at the [Node.js Collaborator +Summit](https://github.com/nodejs/summit/issues/1), and you can also find us at +[wafflejs](https://wafflejs.com/) on Wednesday. Hopefully we'll be seeing some +of you there. :) + +#### THE PATCH!!! + +So here it is. The patch. Hope it helps. (Thanks, +[@ktarplee](https://github.com/ktarplee)!) + +* [`2e58c48`](https://github.com/npm/npm/commit/2e58c4819e3cafe4ae23ab7f4a520fe09258cfd7) + [#9033](https://github.com/npm/npm/pull/9033) `npm version` now works on git + submodules + ([@ktarplee](https://github.com/ktarplee)) + +#### OH AND THERE'S A DEV DEPENDENCIES UPDATE + +Hooray. + +* [`d204683`](https://github.com/npm/npm/commit/d2046839d471322e61e3ceb0f00e78e5c481f967) + `nock@2.9.1` + ([@pgte](https://github.com/pgte)) + +### v2.13.3 (2015-07-23): + +#### I'M SAVING THE GOOD JOKES FOR MORE INTERESTING RELEASES + +It's pretty hard to outdo last week's release buuuuut~ I promise I'll have a +treat when we release our shiny new **Teams and Organizations** feature! :D +(Coming Soon™). It'll be a real *gem*. + +That means it's a pretty low-key release this week. We got some nice +documentation tweaks, a few bugfixes, and other such things, though! + +Oh, and a _bunch of version bumps_. Thanks, `semver`! + +#### IT'S THE LITTLE THINGS THAT MATTER + +* [`2fac6ae`](https://github.com/npm/npm/commit/2fac6aeffefba2934c3db395b525d931599c34d8) + [#9012](https://github.com/npm/npm/issues/9012) A convenience for releases -- + using the globally-installed npm before now was causing minor annoyances, so + we just use the exact same npm we're releasing to build the new release. + ([@zkat](https://github.com/zkat)) + +#### WHAT DOES THIS BUTTON DO? + +There's a couple of doc updates! The last one might be interesting. + +* [`4cd3205`](https://github.com/npm/npm/commit/4cd32050c0f89b7f1ae486354fa2c35eea302ba5) + [#9002](https://github.com/npm/npm/issues/9002) Updated docs to list the + various files that npm automatically includes and excludes, regardless of + settings. + ([@SimenB](https://github.com/SimenB)) +* [`cf09e75`](https://github.com/npm/npm/commit/cf09e754931739af32647d667b671e72a4c79081) + [#9022](https://github.com/npm/npm/issues/9022) Document the `"access"` field + in `"publishConfig"`. Did you know you don't need to use `--access=public` + when publishing scoped packages?! Just put it in your `package.json`! + Go refresh yourself on scopes packages by [checking our docs](https://docs.npmjs.com/getting-started/scoped-packages) on them. + ([@boennemann](https://github.com/boennemann)) +* [`bfd73da`](https://github.com/npm/npm/commit/bfd73da33349cc2afb8278953b2ae16ea95023de) + [#9013](https://github.com/npm/npm/issues/9013) fixed typo in changelog + ([@radarhere](https://github.com/radarhere)) + +#### THE SEMVER MAJOR VERSION APOCALYPSE IS UPON US + +Basically, `semver` is up to `@5`, and that meant we needed to go in an update a +bunch of our dependencies manually. `node-gyp` is still pending update, since +it's not ours, though! + +* [`9232e58`](https://github.com/npm/npm/commit/9232e58d54c032c23716ef976023d36a42bfdcc9) + [#8972](https://github.com/npm/npm/issues/8972) `init-package-json@1.7.1` + ([@othiym23](https://github.com/othiym23)) +* [`ba44f6b`](https://github.com/npm/npm/commit/ba44f6b4201a4faee025341b123e372d8f45b6d9) + [#8972](https://github.com/npm/npm/issues/8972) `normalize-package-data@2.3.1` + ([@othiym23](https://github.com/othiym23)) +* [`3901d3c`](https://github.com/npm/npm/commit/3901d3cf191880bb4420b1d6b8aedbcd8fc26cdf) + [#8972](https://github.com/npm/npm/issues/8972) `npm-install-checks@1.0.6` + ([@othiym23](https://github.com/othiym23)) +* [`ffcc7dd`](https://github.com/npm/npm/commit/ffcc7dd12f8bb94ff0f64c465c57e460b3f24a24) + [#8972](https://github.com/npm/npm/issues/8972) `npm-package-arg@4.0.2` + ([@othiym23](https://github.com/othiym23)) +* [`7128f9e`](https://github.com/npm/npm/commit/7128f9ec10c0c8482087511b716dbddb54249626) + [#8972](https://github.com/npm/npm/issues/8972) `npm-registry-client@6.5.1` + ([@othiym23](https://github.com/othiym23)) +* [`af28911`](https://github.com/npm/npm/commit/af28911ecd54a844f848c6ae41887097d6aa2f3b) + [#8972](https://github.com/npm/npm/issues/8972) `read-installed@4.0.2` + ([@othiym23](https://github.com/othiym23)) +* [`3cc817a`](https://github.com/npm/npm/commit/3cc817a0f34f698b580ff6ff02308700efc54f7c) + [#8972](https://github.com/npm/npm/issues/8972) node-gyp needs its own version + of semver + ([@othiym23](https://github.com/othiym23)) +* [`f98eccc`](https://github.com/npm/npm/commit/f98eccc6e3a6699ca0aa9ecbad93a3b995583871) + [#8972](https://github.com/npm/npm/issues/8972) `semver@5.0.1`: Stop including + browser builds. + ([@isaacs](https://github.com/isaacs)) + +#### \*BUMP\* + +And some other version bumps for good measure. + +* [`254ecfb`](https://github.com/npm/npm/commit/254ecfb04f026c2fd16427db01a53600c1892c8b) + [#8990](https://github.com/npm/npm/issues/8990) `marked-man@0.1.5`: Fixes an + issue with documentation rendering where backticks in 2nd-level headers would + break rendering (?!?!) + ([@steveklabnik](https://github.com/steveklabnik)) +* [`79efd79`](https://github.com/npm/npm/commit/79efd79ac216da8cee8636fb2ed926b0196a4eb6) + `minimatch@2.0.10`: A pattern like `'*.!(x).!(y)'` should not match a name + like `'a.xyz.yab'`. + ([@isaacs](https://github.com/isaacs)) +* [`39c7dc9`](https://github.com/npm/npm/commit/39c7dc9a4e17cd35a5ed882ba671821c9a900f9e) + `request@2.60.0`: A few bug fixes and doc updates. + ([@simov](https://github.com/simov)) +* [`72d3c3a`](https://github.com/npm/npm/commit/72d3c3a9e1e461608aa21b14c01a650333330da9) + `rimraf@2.4.2`: Minor doc and dep updates + ([@isaacs](https://github.com/isaacs)) +* [`7513035`](https://github.com/npm/npm/commit/75130356a06f5f4fbec3786aac9f9f0b36dfe010) + `nock@2.9.1` + ([@pgte](https://github.com/pgte)) +* [`3d9aa82`](https://github.com/npm/npm/commit/3d9aa82260f0643a32c13d0c1ed16f644b6fd4ab) + Fixes this thing where Kat decided to save `nock` as a regular dependency ;) + ([@othiym23](https://github.com/othiym23)) + +### v2.13.2 (2015-07-16): + +#### HOLD ON TO YOUR TENTACLES... IT'S NPM RELEASE TIME! + +Kat: Hooray! Full team again, and we've got a pretty small patch release this +week, about everyone's favorite recurring issue: git URLs! + +Rebecca: No Way! Again? + +Kat: The ride never ends! In the meantime, there's some fun, exciting work in +the background to get orgs and teams out the door. Keep an eye out for news. :) + +Rebecca: And make sure to keep an eye out for patches for the super-fresh +`npm@3`! + +#### LET'S GIT INKY + +Rebecca: So what's this about another git URL issue? + +Kat: Welp, I apparently broke backwards-compatibility on what are actually +invalid `git+https` URLs! So I'm making it work, but we're gonna deprecate URLs +that look like `git+https://user@host:path/is/here`. + +Rebecca: What should we use instead?! + +Kat: Just do me a solid and use `git+ssh://user@host:path/here` or +`git+https://user@host/absolute/https/path` instead! + +* [`769f06e`](https://github.com/npm/npm/commit/769f06e5455d7a9fc738379de2e05868df0dab6f) + Updated tests for `getResolved` so the URLs are run through + `normalize-git-url`. + ([@zkat](https://github.com/zkat)) +* [`edbae68`](https://github.com/npm/npm/commit/edbae685bf48971e878ced373d6825fc1891ee47) + [#8881](https://github.com/npm/npm/issues/8881) Added tests to verify that `git+https:` URLs are handled compatibly. + ([@zkat](https://github.com/zkat)) + +#### NEWS FLASH! DOCUMENTATION IMPROVEMENTS! + +* [`bad4e014`](https://github.com/npm/npm/commit/bad4e0143cc95754a682f1da543b2b4e196e924b) + [#8924](https://github.com/npm/npm/pull/8924) Make sure documented default + values in `lib/cache.js` properly correspond to current code. + ([@watilde](https://github.com/watilde)) +* [`e7a11fd`](https://github.com/npm/npm/commit/e7a11fdf70e333cdfe3dac94a1a30907adb76d59) + [#8036](https://github.com/npm/npm/issues/8036) Clarify the documentation for + `.npmrc` to clarify that it's not read at the project level when doing global + installs. + ([@espadrine](https://github.com/espadrine)) + +#### STAY FRESH~ + +Kat: That's it for npm core changes! + +Rebecca: Great! Let's look at the fresh new dependencies, then! + +Kat: See you all next week! + +Both: Stay Freeesh~ + +(some cat form of Forrest can be seen snoring in the corner) + +* [`bfa1f45`](https://github.com/npm/npm/bfa1f45ee760d05039557d2245b7e3df9fda8def) + `normalize-git-url@3.0.1`: Fixes url normalization such that `git+https:` + accepts scp syntax, but get converted into absolute-path `https:` URLs. Also + fixes scp syntax so you can have absolute paths after the `:` + (`git@myhost.org:/some/absolute/place.git`) + ([@zkat](https://github.com/zkat)) +* [`6f757d2`](https://github.com/npm/npm/6f757d22b53f91da0bebec6b5d16c1f4dbe130b4) + `glob@5.0.15`: Better handling of ENOTSUP + ([@isaacs](https://github.com/isaacs)) +* [`0920819`](https://github.com/npm/npm/09208197fb8b0c6d5dbf6bd7f59970cf366de989) + `node-gyp@2.0.2`: Fixes an issue with long paths on Win32 + ([@TooTallNate](https://github.com/TooTallNate)) + +### v2.13.1 (2015-07-09): + +#### KAUAI WAS NICE. I MISS IT. + +But Forrest's still kinda on vacation, and not just mentally, because he's +hanging out with the fine meatbags at CascadiaFest. Enjoy this small bug +release. + +#### MAKE OURSELVES HAPPY + +* [`40981f2`](https://github.com/npm/npm/commit/40981f2e0c9c12bb003ccf188169afd1d201f5af) + [#8862](https://github.com/npm/npm/issues/8862) Make the lifecycle's safety + check work with scoped packages. ([@tcort](https://github.com/tcort)) +* [`5125856`](https://github.com/npm/npm/commit/512585622481dbbda9a0306932468d59efaff658) + [#8855](https://github.com/npm/npm/issues/8855) Make dependency versions of + `"*"` match `"latest"` when all versions are prerelease. + ([@iarna](https://github.com/iarna)) +* [`22fdc1d`](https://github.com/npm/npm/commit/22fdc1d52602ba7098af978c75fca8f7d1060141) + Visually emphasize the correct way to write lifecycle scripts. + ([@josh-egan](https://github.com/josh-egan)) + +#### MAKE TRAVIS HAPPY + +* [`413c3ac`](https://github.com/npm/npm/commit/413c3ac2ab2437f3011c6ca0d1630109ec14e604) + Use npm's `2.x` branch for testing its `2.x` branch. + ([@iarna](https://github.com/iarna)) +* [`7602f64`](https://github.com/npm/npm/commit/7602f64826f7a465d9f3a20bd87a376d992607e6) + Don't prompt for GnuPG passphrase in version lifecycle tests. + ([@othiym23](https://github.com/othiym23)) + +#### MAKE `npm outdated` HAPPY + +* [`d338668`](https://github.com/npm/npm/commit/d338668601d1ebe5247a26237106e80ea8cd7f48) + [#8796](https://github.com/npm/npm/issues/8796) `fstream-npm@1.0.4`: When packing the + package tarball, npm no longer crashes for packages with certain combinations of + `.npmignore` entries, `.gitignore` entries, and lifecycle scripts. + ([@iarna](https://github.com/iarna)) +* [`dbe7c9c`](https://github.com/npm/npm/commit/dbe7c9c74734be870d16dd61b9e7f746123011f6) + `nock@2.7.0`: Add matching based on query strings. + ([@othiym23](https://github.com/othiym23)) + +There are new versions of `strip-ansi` and `ansi-regex`, but npm only uses them +indirectly, so we pushed them down into their dependencies where they can get +updated at their own pace. + +* [`06b6ca5`](https://github.com/npm/npm/commit/06b6ca5b5333025f10c8d901628859bd4678e027) + undeduplicate `ansi-regex` ([@othiym23](https://github.com/othiym23)) +* [`b168e33`](https://github.com/npm/npm/commit/b168e33ad46faf47020a45f72ba8cec8c644bdb9) + undeduplicate `strip-ansi` ([@othiym23](https://github.com/othiym23)) + +### v2.13.0 (2015-07-02): + +#### FORREST IS OUT! LET'S SNEAK IN ALL THE THINGS! + +Well, not _everything_. Just a couple of goodies, like the new `npm ping` +command, and the ability to add files to the commits created by `npm version` +with the new version hooks. There's also a couple of bugfixes in `npm` itself +and some of its dependencies. Here we go! + +#### YES HELLO THIS IS NPM REGISTRY SORRY NO DOG HERE + +Yes, that's right! We now have a dedicated `npm ping` command. It's super simple +and super easy. You ping. We tell you whether you pinged right by saying hello +right back. This should help out folks dealing with things like proxy issues or +other registry-access debugging issues. Give it a shot! + +This addresses [#5750](https://github.com/npm/npm/issues/5750), and will help +with the `npm doctor` stuff described in +[#6756](https://github.com/npm/npm/issues/6756). + +* [`f1f7a85`](https://github.com/npm/npm/commit/f1f7a85) + Add ping command to CLI + ([@michaelnisi](https://github.com/michaelnisi)) +* [`8cec629`](https://github.com/npm/npm/commit/8cec629) + Add ping command to npm-registry-client + ([@michaelnisi](https://github.com/michaelnisi)) +* [`0c0c92d`](https://github.com/npm/npm/0c0c92d) + Fixed ping command issues (added docs, tests, fixed minor bugs, etc) + ([@zkat](https://github.com/zkat)) + +#### I'VE WANTED THIS FOR `version` SINCE LIKE LITERALLY FOREVER AND A DAY + +Seriously! This patch lets you add files to the `version` commit before it's +made, So you can add additional metadata files, more automated changes to +`package.json`, or even generate `CHANGELOG.md` automatically pre-commit if +you're into that sort of thing. I'm so happy this is there I can't even. Do you +have other fun usecases for this? Tell +[npmbot (@npmjs)](http://twitter.com/npmjs) about it! + +* [`582f170`](https://github.com/npm/npm/commit/582f170) + [#8620](https://github.com/npm/npm/issues/8620) version: Allow scripts to add + files to the commit. + ([@jamestalmage](https://github.com/jamestalmage)) + +#### ALL YOUR FILE DESCRIPTORS ARE BELONG TO US + +We've had problems in the past with things like `EMFILE` errors popping up when +trying to install packages with a bunch of dependencies. Isaac patched up +[`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to handle this case +better, so we should be seeing fewer of those. + +* [`022691a`](https://github.com/npm/npm/commit/022691a) + `graceful-fs@4.1.2`: Updated so we can monkey patch globally. + ([@isaacs](https://github.com/isaacs)) +* [`c9fb0fd`](https://github.com/npm/npm/commit/c9fb0fd) + Globally monkey-patch graceful-fs. This should fix some errors when installing + packages with lots of dependencies. + ([@isaacs](https://github.com/isaacs)) + +#### READ THE FINE DOCS. THEY'VE IMPROVED + +* [`5587d0d`](https://github.com/npm/npm/commit/5587d0d) + Nice clarification for `directories.bin` + ([@ujane](https://github.com/ujane)) +* [`20673c7`](https://github.com/npm/npm/commit/20673c7) + Hey, Windows folks! Check out + [`nvm-windows`](https://github.com/coreybutler/nvm-windows) + ([@ArtskydJ](https://github.com/ArtskydJ)) + +#### MORE NUMBERS! MORE VALUE! + +* [`5afa2d5`](https://github.com/npm/npm/commit/5afa2d5) + `validate-npm-package-name@2.2.2`: Documented package name rules in README + ([@zeusdeux](https://github.com/zeusdeux)) +* [`021f4d9`](https://github.com/npm/npm/commit/021f4d9) + `rimraf@2.4.1`: [#74](https://github.com/isaacs/rimraf/issues/74) Use async + function for bin (to better handle Window's `EBUSY`) + ([@isaacs](https://github.com/isaacs)) +* [`5223432`](https://github.com/npm/npm/commit/5223432) + `osenv@0.1.3`: Use `os.homedir()` polyfill for more reliable output. io.js + added the function and the polyfill does a better job than the prior solution. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`8ebbc90`](https://github.com/npm/npm/commit/8ebbc90) + `npm-cache-filename@1.0.2`: Make sure different git references get different + cache folders. This should prevent `foo/bar#v1.0` and `foo/bar#master` from + sharing the same cache folder. + ([@tomekwi](https://github.com/tomekwi)) +* [`367b854`](https://github.com/npm/npm/commit/367b854) + `lru-cache@2.6.5`: Minor test/typo changes + ([@isaacs](https://github.com/isaacs)) +* [`9fcae61`](https://github.com/npm/npm/commit/9fcae61) + `glob@5.0.13`: Tiny doc change + stop firing 'match' events for ignored items. + ([@isaacs](https://github.com/isaacs)) + +#### OH AND ONE MORE THING + +* [`7827249`](https://github.com/npm/npm/commit/7827249) + `PeerDependencies` errors now include the package version. + ([@NickHeiner](https://github.com/NickHeiner)) + +### v2.12.1 (2015-06-25): + +#### HEY WHERE DID EVERYBODY GO + +I keep [hearing some commotion](https://github.com/npm/npm/releases/tag/v3.0.0). +Is there something going on? Like, a party or something? Anyway, here's a small +release with at least two significant bug fixes, at least one of which some of +you have been waiting for for quite a while. + +#### REMEMBER WHEN I SAID "REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS?"? + +`npm@2.12.0` has a change that introduces a fix for a permissions problem +whereby the `_locks` directory in the cache directory can up being owned by +root. The fix in 2.12.0 takes care of that problem, but introduces a new +problem for Windows users where npm tries to call `process.getuid()`, which +doesn't exist on Windows. It was easy enough to fix (but more or less +impossible to test, thanks to all the external dependencies involved with +permissions and platforms and whatnot), but as a result, Windows users might +want to skip `npm@2.12.0` and go straight to `npm@2.12.1`. Sorry about that! + +* [`7e5da23`](https://github.com/npm/npm/commit/7e5da238ee869201fdb9027c27b79b0f76b440a8) + When using the new, "fixed" cache directory creator, be extra-careful to not + call `process.getuid()` on platforms that lack it. + ([@othiym23](https://github.com/othiym23)) + +#### WHEW! ALL DONE FIXING GIT FOREVER! + +New npm CLI team hero [@zkat](https://github.com/zkat) has finally (FINALLY) +fixed the regression somebody (hi!) introduced a couple months ago whereby git +URLs of the format `git+ssh://user@githost.com:org/repo.git` suddenly stopped +working, and also started being saved (and cached) incorrectly. I am 100% sure +there are absolutely no more bugs in the git caching code at all ever. Mm hm. +Yep. Pretty sure. Maybe. Hmm... I hope. + +*Sighs audibly.* + +[Let us know](http://github.com/npm/npm/issues/new) if we broke something else +with this fix. + +* [`94ca4a7`](https://github.com/npm/npm/commit/94ca4a711619ba8e40ce3d20bc42b13cdb7611b7) + [#8031](https://github.com/npm/npm/issues/8031) Even though + `git+ssh://user@githost.com:org/repo.git` isn't a URL, treat it like one for + the purposes of npm. ([@zkat](https://github.com/zkat)) +* [`e7f56e5`](https://github.com/npm/npm/commit/e7f56e5a97fcf1c52d5c5bee71303b0126129815) + [#8031](https://github.com/npm/npm/issues/8031) `normalize-git-url@2.0.0`: + Handle git URLs (and URL-like remote refs) in a manner consistent with npm's + docs. ([@zkat](https://github.com/zkat)) + +#### YEP, THERE ARE STILL DEPENDENCY UPGRADES + +* [`679bf47`](https://github.com/npm/npm/commit/679bf4745ac2cfbb01c9ce273e189807fd04fa33) + [#40](http://github.com/npm/read-installed/issues/40) `read-installed@4.0.1`: + Handle prerelease versions in top-level dependencies not in `package.json` + without marking those packages as invalid. + ([@benjamn](https://github.com/benjamn)) +* [`3a67410`](https://github.com/npm/npm/commit/3a6741068c9119174c920496778aeee870ebdac0) + `tap@1.3.1` ([@isaacs](https://github.com/isaacs)) +* [`151904a`](https://github.com/npm/npm/commit/151904af39dc24567f8c98529a2a64a4dbcc960a) + `nopt@3.0.3` ([@isaacs](https://github.com/isaacs)) + +### v2.12.0 (2015-06-18): + +#### REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS? + +About [a million people](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+EACCES+_locks) +have filed issues related to having a tough time using npm after they've run +npm once or twice with sudo. "Don't worry about it!" I said. "We've fixed all +those permissions problems ages ago! Use this one weird trick and you'll never +have to deal with this again!" + +Well, uh, if you run npm with root the first time you run npm on a machine, it +turns out that the directory npm uses to store lockfiles ends up being owned by +the wrong user (almost always root), and that can, well, it can cause problems +sometimes. By which I mean every time you run npm without being root it'll barf +with `EACCES` errors. Whoops! + +This is an obnoxious regression, and to prevent it from recurring, we've made +it so that the cache, cached git remotes, and the lockfile directories are all +created and maintained using the same utilty module, which not only creates the +relevant paths with the correct permissions, but will fix the permissions on +those directories (if it can) when it notices that they're broken. An `npm +install` run as root ought to be sufficient to fix things up (and if that +doesn't work, first tell us about it, and then run `sudo chown -R $(whoami) +$HOME/.npm`) + +Also, I apologize for inadvertently gaslighting any of you by claiming this bug +wasn't actually a bug. I do think we've got this permanently dealt with now, +but I'll be paying extra-close attention to permissions issues related to the +cache for a while. + +* [`85d1a53`](https://github.com/npm/npm/commit/85d1a53d7b5e0fc04823187e522ae3711ede61fa) + Set permissions on lock directory to the owner of the process. + ([@othiym23](https://github.com/othiym23)) + +#### I WENT TO NODECONF AND ALL I GOT WAS THIS LOUSY SPDX T-SHIRT + +That's not literally true. We spent very little time discussing SPDX, +[@kemitchell](https://github.com/kemitchell) is a champ, and I had a lot of fun +playing drum & bass to a mostly empty Boogie Barn and only ended up with one +moderately severe cold for my pains. Another winner of a NodeConf! (I would +probably wear a SPDX T-shirt if somebody gave me one, though.) + +A bunch of us did have a spirited discussion of the basics of open-source +intellectual property, and the convergence of me, +[@kemitchell](https://github.com/kemitchell), and +[@jandrieu](https://github.com/jandrieu) in one place allowed us to hammmer out +a small but significant issue that had been bedeviling early adopters of the +new SPDX expression syntax in `package.json` license fields: how to deal with +packages that are left without a license on purpose. + +Refer to [the docs](https://github.com/npm/npm/blob/16a3dd545b10f8a2464e2037506ce39124739b41/doc/files/package.json.md#license) +for the specifics, but the short version is that instead of using +`LicenseRef-LICENSE` for proprietary licenses, you can now use either +`UNLICENSED` if you want to make it clear that you don't _want_ your software +to be licensed (and want npm to stop warning you about this), or `SEE LICENSE +IN <filename>` if there's a license with custom text you want to use. At some +point in the near term, we'll be updating npm to verify that the mentioned +file actually exists, but for now you're all on the honor system. + +* [`4827fc7`](https://github.com/npm/npm/commit/4827fc784117c17f35dd9b51b21d1eff6094f661) + [#8557](https://github.com/npm/npm/issues/8557) + `normalize-package-data@2.2.1`: Allow `UNLICENSED` and `SEE LICENSE IN + <filename>` in "license" field of `package.json`. + ([@kemitchell](https://github.com/kemitchell)) +* [`16a3dd5`](https://github.com/npm/npm/commit/16a3dd545b10f8a2464e2037506ce39124739b41) + [#8557](https://github.com/npm/npm/issues/8557) Document the new accepted + values for the "license" field. + ([@kemitchell](https://github.com/kemitchell)) +* [`8155311`](https://github.com/npm/npm/commit/81553119350deaf199e79e38e35b52a5c8ad206c) + [#8557](https://github.com/npm/npm/issues/8557) `init-package-json@1.7.0`: + Support new "license" field values at init time. + ([@kemitchell](https://github.com/kemitchell)) + +#### SMALLISH BUG FIXES + +* [`9d8cac9`](https://github.com/npm/npm/commit/9d8cac94a258db648a2b1069b1c8c6529c79d013) + [#8548](https://github.com/npm/npm/issues/8548) Remove extraneous newline + from `npm view` output, making it easier to use in shell scripts. + ([@eush77](https://github.com/eush77)) +* [`765fd4b`](https://github.com/npm/npm/commit/765fd4bfca8ea3e2a4a399765b17eec40a3d893d) + [#8521](https://github.com/npm/npm/issues/8521) When checking for outdated + packages, or updating packages, raise an error when the registry is + unreachable instead of silently "succeeding". + ([@ryantemple](https://github.com/ryantemple)) + +#### SMALLERISH DOCUMENTATION TWEAKS + +* [`5018335`](https://github.com/npm/npm/commit/5018335ce1754a9f771954ecbc1a93acde9b8c0a) + [#8365](https://github.com/npm/npm/issues/8365) Add details about which git + environment variables are whitelisted by npm. + ([@nmalaguti](https://github.com/nmalaguti)) +* [`bed9edd`](https://github.com/npm/npm/commit/bed9edddfdcc6d22a80feab33b53e4ef9172ec72) + [#8554](https://github.com/npm/npm/issues/8554) Fix typo in version docs. + ([@rainyday](https://github.com/rainyday)) + +#### WELL, I GUESS THERE ARE MORE DEPENDENCY UPGRADES + +* [`7ce2f06`](https://github.com/npm/npm/commit/7ce2f06f6f34d469b1d2e248084d4f3fef10c05e) + `request@2.58.0`: Refactor tunneling logic, and use `extend` instead of + abusing `util._extend`. ([@simov](https://github.com/simov)) +* [`e6c6195`](https://github.com/npm/npm/commit/e6c61954aad42e20eec49745615c7640b2026a6c) + `nock@2.6.0`: Refined interception behavior. + ([@pgte](https://github.com/pgte)) +* [`9583cc3`](https://github.com/npm/npm/commit/9583cc3cb192c2fced006927cfba7cd37b588605) + `fstream-npm@1.0.3`: Ensure that `main` entry in `package.json` is always + included in the bundled package tarball. + ([@coderhaoxin](https://github.com/coderhaoxin)) +* [`df89493`](https://github.com/npm/npm/commit/df894930f2716adac28740b29b2e863170919990) + `fstream@1.0.7` ([@isaacs](https://github.com/isaacs)) +* [`9744049`](https://github.com/npm/npm/commit/974404934758124aa8ae5b54f7d5257c3bd6b588) + `dezalgo@1.0.3`: `dezalgo` should be usable in the browser, and can be now + that `asap` has been upgraded to be browserifiable. + ([@mvayngrib](https://github.com/mvayngrib)) + +### v2.11.3 (2015-06-11): + +This was a very quiet week. This release was done by +[@iarna](https://github.com/iarna), while the rest of the team hangs out at +NodeConf Adventure! + +#### TESTS IN 0.8 FAIL LESS + +* [`5b3b3c2`](https://github.com/npm/npm/commit/5b3b3c2) + [#8491](//github.com/npm/npm/pull/8491) + Updates a test to use only 0.8 compatible features + ([@watilde](https://github.com/watilde)) + +#### THE TREADMILL OF UPDATES NEVER CEASES + +* [`9f439da`](https://github.com/npm/npm/commit/9f439da) + `spdx@0.4.1`: License range updates + ([@kemitchell](https://github.com/kemitchell)) +* [`2dd055b`](https://github.com/npm/npm/commit/2dd055b) + `normalize-package-data@2.2.1`: Fixes a crashing bug when the package.json + `scripts` property is not an object. + ([@iarna](https://github.com/iarna)) +* [`e02e85d`](https://github.com/npm/npm/commit/e02e85d) + `osenv@0.1.2`: Switches to using the `os-tmpdir` module instead of + `os.tmpdir()` for greate consistency in behavior between node versions. + ([@iarna](https://github.com/iarna)) +* [`a6f0265`](https://github.com/npm/npm/commit/a6f0265) + `ini@1.3.4` ([@isaacs](https://github.com/isaacs)) +* [`7395977`](https://github.com/npm/npm/commit/7395977) + `rimraf@2.4.0` ([@isaacs](https://github.com/isaacs)) + +### v2.11.2 (2015-06-04): + +Another small release this week, brought to you by the latest addition to the +CLI team, [@zkat](https://github.com/zkat) (Hi, all!) + +Mostly small documentation tweaks and version updates. Oh! And `npm outdated` +is actually sorted now. Rejoice! + +It's gonna be a while before we get another palindromic version number. Enjoy it +while it lasts. :3 + +#### QUALITY OF LIFE HAS NEVER BEEN BETTER + +* [`31aada4`](https://github.com/npm/npm/commit/31aada4ccc369c0903ff7f233f464955d12c6fe2) + [#8401](https://github.com/npm/npm/issues/8401) `npm outdated` output is just + that much nicer to consume now, due to sorting by name. + ([@watilde](https://github.com/watilde)) +* [`458a919`](https://github.com/npm/npm/commit/458a91925d8b20c5e672ba71a86745aad654abaf) + [#8469](https://github.com/npm/npm/pull/8469) Explicitly set `cwd` for + `preversion`, `version`, and `postversion` scripts. This makes the scripts + findable relative to the root dir. + ([@alexkwolfe](https://github.com/alexkwolfe)) +* [`55d6d71`](https://github.com/npm/npm/commit/55d6d71562e979e745c9db88861cc39f99b9f3ec) + Ensure package name and version are included in display during `npm version` + lifecycle execution. Gets rid of those little `undefined`s in the console. + ([@othiym23](https://github.com/othiym23)) + +#### WORDS HAVE NEVER BEEN QUITE THIS READABLE + +* [`3901e49`](https://github.com/npm/npm/commit/3901e4974c800e7f9fba4a5b2ff88da1126d5ef8) + [#8462](https://github.com/npm/npm/pull/8462) English apparently requires + correspondence between indefinite articles and attached nouns. + ([@Enet4](https://github.com/Enet4)) +* [`5a744e4`](https://github.com/npm/npm/commit/5a744e4b143ef7b2f50c80a1d96fdae4204d452b) + [#8421](https://github.com/npm/npm/pull/8421) The effect of `npm prune`'s + `--production` flag and how to use it have been documented a bit better. + ([@foiseworth](https://github.com/foiseworth)) +* [`eada625`](https://github.com/npm/npm/commit/eada625993485f0a2c5324b06f02bfa0a95ce4bc) + We've updated our `.mailmap` and `AUTHORS` files to make sure credit is given + where credit is due. ([@othiym23](https://github.com/othiym23)) + +#### VERSION NUMBERS HAVE NEVER BEEN BIGGER + +* [`c929fd1`](https://github.com/npm/npm/commit/c929fd1d0604b5878ed05706447e078d3e41f5b3) + `readable-stream@1.1.13`: Manually deduped `v1.1.13` (streams3) to make + deduping more reliable on `npm@<3`. ([@othiym23](https://github.com/othiym23)) +* [`a9b4b78`](https://github.com/npm/npm/commit/a9b4b78dcc85571fd1cdd737903f7f37a5e6a755) + `request@2.57.0`: Replace dependency on IncomingMessage's `.client` with + `.socket` as the former was deprecated in io.js 2.2.0. + ([@othiym23](https://github.com/othiym23)) +* [`4b5e557`](https://github.com/npm/npm/commit/4b5e557a23cdefd521ad154111e3d4dcc81f1cdb) + `abbrev@1.0.7`: Better testing, with coverage. + ([@othiym23](https://github.com/othiym23)) +* [`561affe`](https://github.com/npm/npm/commit/561affee21df9bbea5a47298f2452f533be8f359) + `semver@4.3.6`: .npmignore added for less cruft, and better testing, with coverage. + ([@othiym23](https://github.com/othiym23)) +* [`60aef3c`](https://github.com/npm/npm/commit/60aef3cf5d84d757752db3eb8ede2cb385469e7b) + `graceful-fs@3.0.8`: io.js fixes. + ([@zkat](https://github.com/zkat)) +* [`f8bd453`](https://github.com/npm/npm/commit/f8bd453b1a1c46ba7666cb166595e8a011eae443) + `config-chain@1.1.9`: Added MIT license to package.json + ([@zkat](https://github.com/zkat)) + +### v2.11.1 (2015-05-28): + +This release brought to you from poolside at the Omni Amelia Island Resort and +JSConf 2015, which is why it's so tiny. + +#### CONFERENCE WIFI CAN'T STOP THESE BUG FIXES + +* [`cf109a6`](https://github.com/npm/npm/commit/cf109a682f38a059a994da953d5c1b4aaece5e2f) + [#8381](https://github.com/npm/npm/issues/8381) Documented a subtle gotcha + with `.npmrc`, which is that it needs to have its permissions set such that + only the owner can read or write the file. + ([@colakong](https://github.com/colakong)) +* [`180da67`](https://github.com/npm/npm/commit/180da67c9fa53103d625e2f031626c2453c7ebcd) + [#8365](https://github.com/npm/npm/issues/8365) Git 2.3 adds support for + `GIT_SSH_COMMAND`, which allows you to pass an explicit git command (with, + for example, a specific identity passed in on the command line). + ([@nmalaguti](https://github.com/nmalaguti)) + +#### MY (VIRGIN) PINA COLADA IS GETTING LOW, BETTER UPGRADE THESE DEPENDENCIES + +* [`b72de41`](https://github.com/npm/npm/commit/b72de41c5cc9f0c46d3fa8f062c75bd273641474) + `node-gyp@2.0.0`: Use a newer version of `gyp`, and generally improve support + for Visual Studios and Windows. + ([@TooTallNate](https://github.com/TooTallNate)) +* [`8edbe21`](https://github.com/npm/npm/commit/8edbe210af41e8f248f5bb92c72de92f54fda3b1) + `node-gyp@2.0.1`: Don't crash when Python's version doesn't parse as valid + semver. ([@TooTallNate](https://github.com/TooTallNate)) +* [`ba0e0a8`](https://github.com/npm/npm/commit/ba0e0a845a4f29717aba566b416a27d1a22f5d08) + `glob@5.0.10`: Add coverage to tests. ([@isaacs](https://github.com/isaacs)) +* [`7333701`](https://github.com/npm/npm/commit/7333701b5d4f01673f37d64992c63c4e15864d6d) + `request@2.56.0`: Bug fixes and dependency upgrades. + ([@simov](https://github.com/simov)) + +### v2.11.0 (2015-05-21): + +For the first time in a very long time, we've added new events to the life +cycle used by `npm run-script`. Since running `npm version (major|minor|patch)` +is typically the last thing many developers do before publishing their updated +packages, it makes sense to add life cycle hooks to run tests or otherwise +preflight the package before doing a full publish. Thanks, as always, to the +indefatigable [@watilde](https://github.com/watilde) for yet another great +usability improvement for npm! + +#### FEATURELETS + +* [`b07f7c7`](https://github.com/npm/npm/commit/b07f7c7c1e5021730b3c320f1b3a46e70f8a21ff) + [#7906](https://github.com/npm/npm/issues/7906) + Add new [`scripts`](https://github.com/npm/npm/blob/master/doc/misc/npm-scripts.md) to + allow you to run scripts before and after + the [`npm version`](https://github.com/npm/npm/blob/master/doc/cli/npm-version.md) + command has run. This makes it easy to, for instance, require that your + test suite passes before bumping the version by just adding `"preversion": + "npm test"` to the scripts section of your `package.json`. + ([@watilde](https://github.com/watilde)) +* [`8a46136`](https://github.com/npm/npm/commit/8a46136f42e416cbadb533bcf89d73d681ed421d) + [#8185](https://github.com/npm/npm/issues/8185) + When we get a "not found" error from the registry, we'll now check to see + if the package name you specified is invalid and if so, give you a better + error message. ([@thefourtheye](https://github.com/thefourtheye)) + +#### BUG FIXES + +* [`9bcf573`](https://github.com/npm/npm/commit/9bcf5730bd0316f210dafea898afe9103849cea9) + [#8324](https://github.com/npm/npm/pull/8324) On Windows, when you've configured a + custom `node-gyp`, run it with node itself instead of using the default open action (which + is almost never what you want). ([@bangbang93](https://github.com/bangbang93)) +* [`1da9b04`](https://github.com/npm/npm/commit/1da9b0411d3416c7fca17d08cbbcfca7ae86e92d) + [#7195](https://github.com/npm/npm/issues/7195) + [#7260](https://github.com/npm/npm/issues/7260) `npm-registry-client@6.4.0`: + (Re-)allow publication of existing mixed-case packages (part 1). + ([@smikes](https://github.com/smikes)) +* [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) + [#7195](https://github.com/npm/npm/issues/7195) + [#7260](https://github.com/npm/npm/issues/7260) + `normalize-package-data@2.2.0`: (Re-)allow publication of existing mixed-case + packages (part 2). ([@smikes](https://github.com/smikes)) + +#### DOCUMENTATION IMPROVEMENTS + +* [`f62ee05`](https://github.com/npm/npm/commit/f62ee05333b141539a8e851c620dd2e82ff06860) + [#8314](https://github.com/npm/npm/issues/8314) Update the README to warn + folks away from using the CLI's internal API. For the love of glob, just use a + child process to run the CLI! ([@claycarpenter](https://github.com/claycarpenter)) +* [`1093921`](https://github.com/npm/npm/commit/1093921c04db41ab46db24a170a634a4b2acd8d9) + [#8279](https://github.com/npm/npm/pull/8279) + Update the documentation to note that, yes, you can publish scoped packages to the + public registry now! ([@mantoni](https://github.com/mantoni)) +* [`f87cde5`](https://github.com/npm/npm/commit/f87cde5234a760d3e515ffdaacaed6f5b71dbf44) + [#8292](https://github.com/npm/npm/pull/8292) + Fix typo in an example and grammar in the description in + the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). + ([@vshih](https://github.com/vshih)) +* [`d3526ce`](https://github.com/npm/npm/commit/d3526ceb09a0c29fdb7d4124536ae09057d033e7) + Improve the formatting in + the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). + ([@othiym23](https://github.com/othiym23)) +* [`19fe6d2`](https://github.com/npm/npm/commit/19fe6d20883e28956ff916fe4dae42d73ee6195b) + [#8311](https://github.com/npm/npm/pull/8311) + Update [README.md](https://github.com/npm/npm#readme) to use syntax highlighting in + its code samples and bits of shell scripts. ([@SimenB](https://github.com/SimenB)) + +#### DEPENDENCY UPDATES! ALWAYS AND FOREVER! + +* [`fc52160`](https://github.com/npm/npm/commit/fc52160d0223226fffe4166f42fdfd3b899b3c1e) + [#4700](https://github.com/npm/npm/issues/4700) [#5044](https://github.com/npm/npm/issues/5044) + `init-package-json@1.6.0`: Make entering an invalid version while running `npm init` give + you an immediate error and prompt you to correct it. ([@watilde](https://github.com/watilde)) +* [`738853e`](https://github.com/npm/npm/commit/738853eb1f55636476a2a410c2c04732eec9d51e) + [#7763](https://github.com/npm/npm/issues/7763) `fs-write-stream-atomic@1.0.3`: Fix a bug + where errors would not propagate, making error messages unhelpful. + ([@iarna](https://github.com/iarna)) +* [`6d74a2d`](https://github.com/npm/npm/commit/6d74a2d2ac7f92750cf6a2cfafae1af23b569098) + `npm-package-arg@4.0.1`: Fix tests on windows ([@Bacra](https://github.com)) and with + more recent `hosted-git-info`. ([@iarna](https://github.com/iarna)) +* [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) + `hosted-git-info@2.1.4`: Correct spelling in its documentation. + ([@iarna](https://github.com/iarna)) +* [`d7956ca`](https://github.com/npm/npm/commit/d7956ca17c057d5383ff0d3fc5cf6ac2940b034d) + `glob@5.0.7`: Fix a bug where unusual error conditions could make + further use of the module fail. ([@isaacs](https://github.com/isaacs)) +* [`44f7d74`](https://github.com/npm/npm/commit/44f7d74c5d3181d37da7ea7949c86b344153f8d9) + `tap@1.1.0`: Update to the most recent tap to get a whole host of bug + fixes and integration with [coveralls](https://coveralls.io/). + ([@isaacs](https://github.com/isaacs)) +* [`c21e8a8`](https://github.com/npm/npm/commit/c21e8a8d94bcf0ad79dc583ddc53f8366d4813b3) + `nock@2.2.0` ([@othiym23](https://github.com/othiym23)) + +#### LICENSE FILES FOR THE LICENSE GOD + +* Add missing ISC license file to package ([@kasicka](https://github.com/kasicka)): + * [`aa9908c`](https://github.com/npm/npm/commit/aa9908c20017729673b9d410b77f9a16b7aae8a4) `realize-package-specifier@3.0.1` + * [`23a3b1a`](https://github.com/npm/npm/commit/23a3b1a726b9176c70ce0ccf3cd9d25c54429bdf) `fs-vacuum@1.2.6` + * [`8e04bba`](https://github.com/npm/npm/commit/8e04bba830d4353d84751d21803cd127c96153a7) `dezalgo@1.0.2` + * [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) `hosted-git-info@2.1.4` + * [`6a54917`](https://github.com/npm/npm/commit/6a54917fbd4df995495a95d4b548defd44b77c93) `write-file-atomic@1.1.2` + * [`971f92c`](https://github.com/npm/npm/commit/971f92c4a4e5514217d1e4db45d1ccf71a60ff19) `async-some@1.0.2` + * [`67b50b7`](https://github.com/npm/npm/commit/67b50b7667a42bb3340a660eb2e617e1a554d2d4) `normalize-git-url@1.0.1` + +#### SPDX LICENSE UPDATES + +* Switch license to + [BSD-2-Clause](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) from + plain "BSD" ([@isaacs](https://github.com/isaacs)): + * [`efdb733`](https://github.com/npm/npm/commit/efdb73332eeedcad4c609796929070b62abb37ab) `npm-user-validate@0.1.2` + * [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) `normalize-package-data@2.2.0` +* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from + [BSD](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) + ([@isaacs](https://github.com/isaacs)): + * [`c300956`](https://github.com/npm/npm/commit/c3009565a964f0ead4ac4ab234b1a458e2365f17) `block-stream@0.0.8` + * [`1de1253`](https://github.com/npm/npm/commit/1de125355765fecd31e682ed0ff9d2edbeac0bb0) `lockfile@1.0.1` + * [`0d5698a`](https://github.com/npm/npm/commit/0d5698ab132e376c7aec93ae357c274932116220) `osenv@0.1.1` + * [`2e84921`](https://github.com/npm/npm/commit/2e84921474e1ffb18de9fce4616e73171fa8046d) `abbrev@1.0.6` + * [`872fac9`](https://github.com/npm/npm/commit/872fac9d10c11607e4d0348c08a683b84e64d30b) `chmodr@0.1.1` + * [`01eb7f6`](https://github.com/npm/npm/commit/01eb7f60acba584346ad8aae846657899f3b6887) `chownr@0.0.2` + * [`294336f`](https://github.com/npm/npm/commit/294336f0f31c7b9fe31a50075ed750db6db134d1) `read@1.0.6` + * [`ebdf6a1`](https://github.com/npm/npm/commit/ebdf6a14d17962cdb7128402c53b452f91d44ca7) `graceful-fs@3.0.7` +* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from + [MIT](http://spdx.org/licenses/MIT.html#licenseText) + ([@isaacs](https://github.com/isaacs)): + * [`e5d237f`](https://github.com/npm/npm/commit/e5d237fc0f436dd2a89437ebf8a9632a2e35ccbe) `nopt@3.0.2` + * [`79fef14`](https://github.com/npm/npm/commit/79fef1421b78f044980f0d1bf0e97039b6992710) `rimraf@2.3.4` + * [`22527da`](https://github.com/npm/npm/commit/22527da4816e7c2746cdc0317c5fb4a85152d554) `minimatch@2.0.8` + * [`882ac87`](https://github.com/npm/npm/commit/882ac87a6c4123ca985d7ad4394ea5085e5b0ef5) `lru-cache@2.6.4` + * [`9d9d015`](https://github.com/npm/npm/commit/9d9d015a2e972f68664dda54fbb204db28b21ede) `npmlog@1.2.1` + +### v2.10.1 (2015-05-14): + +#### BUG FIXES & DOCUMENTATION TWEAKS + +* [`dc77520`](https://github.com/npm/npm/commit/dc7752013ffce13a3d3f13e518a0052c22fc1158) + When getting back a 404 from a request to a private registry that uses a + registry path that extends past the root + (`http://registry.enterprise.co/path/to/registry`), display the name of the + nonexistent package, rather than the first element in the registry API path. + Sorry, Artifactory users! ([@hayes](https://github.com/hayes)) +* [`f70dea9`](https://github.com/npm/npm/commit/f70dea9b4766f6eaa55012c3e8087e9cb04fd4ce) + Make clearer that `--registry` can be used on a per-publish basis to push a + package to a non-default registry. ([@mischkl](https://github.com/mischkl)) +* [`a3e26f5`](https://github.com/npm/npm/commit/a3e26f5b4465991a941a325468ab7725670d2a94) + Did you know that GitHub shortcuts can have commit-ishes included + (`org/repo#branch`)? They can! ([@iarna](https://github.com/iarna)) +* [`0e2c091`](https://github.com/npm/npm/commit/0e2c091a539b61fdc60423b6bbaaf30c24e4b1b8) + Some errors from `readPackage` were being swallowed, potentially leading to + invalid package trees on disk. ([@smikes](https://github.com/smikes)) + +#### DEPENDENCY UPDATES! STILL! MORE! AGAIN! + +* [`0b901ad`](https://github.com/npm/npm/commit/0b901ad0811d84dda6ca0755a9adc8d47825edd0) + `lru-cache@2.6.3`: Removed some cruft from the published package. + ([@isaacs](https://github.com/isaacs)) +* [`d713e0b`](https://github.com/npm/npm/commit/d713e0b14930c563e3fdb6ac6323bae2a8924652) + `mkdirp@0.5.1`: Made compliant with `standard`, dropped support for Node 0.6, + added (Travis) support for Node 0.12 and io.js. + ([@isaacs](https://github.com/isaacs)) +* [`a2d6578`](https://github.com/npm/npm/commit/a2d6578b6554c5c9d48fe2006751759f4da57520) + `glob@1.0.3`: Updated to use `tap@1`. ([@isaacs](https://github.com/isaacs)) +* [`64cd1a5`](https://github.com/npm/npm/commit/64cd1a570aaa5f24ccba190948ec9456297c97f5) + `fstream@ 1.0.6`: Made compliant with [`standard`](http://npm.im/standard) + (done by [@othiym23](https://github.com/othiym23), and then debugged and + fixed by [@iarna](https://github.com/iarna)), and license changed to ISC. + ([@othiym23](https://github.com/othiym23) / + [@iarna](https://github.com/iarna)) +* [`b527a7c`](https://github.com/npm/npm/commit/b527a7c2ba3c4002f443dd2c536ff4ff41a38b86) + `which@1.1.1`: Callers can pass in their own `PATH` instead of relying on + `process.env`. ([@isaacs](https://github.com/isaacs)) + +### v2.10.0 (2015-05-8): + +#### THE IMPLICATIONS ARE MORE PROFOUND THAN THEY APPEAR + +If you've done much development in The Enterprise®™, you know that keeping +track of software licenses is far more important than one might expect / hope / +fear. Tracking licenses is a hassle, and while many (if not most) of us have +(reluctantly) gotten around to setting a license to use by default with all our +new projects (even if it's just WTFPL), that's about as far as most of us think +about it. In big enterprise shops, ensuring that projects don't inadvertently +use software with unacceptably encumbered licenses is serious business, and +developers spend a surprising (and appalling) amount of time ensuring that +licensing is covered by writing automated checkers and other license auditing +tools. + +The Linux Foundation has been working on a machine-parseable syntax for license +expressions in the form of [SPDX](https://spdx.org/), an appropriately +enterprisey acronym. IP attorney and JavaScript culture hero [Kyle +Mitchell](http://kemitchell.com/) has put a considerable amount of effort into +bringing SPDX to JavaScript and Node. He's written +[`spdx.js`](https://github.com/kemitchell/spdx.js), a JavaScript SPDX +expression parser, and has integrated it into npm in a few different ways. + +For you as a user of npm, this means: + +* npm now has proper support for dual licensing in `package.json`, due to + SPDX's compound expression syntax. Run `npm help package.json` for details. +* npm will warn you if the `package.json` for your project is either missing a + `"license"` field, or if the value of that field isn't a valid SPDX + expression (pro tip: `"BSD"` becomes `"BSD-2-Clause"` in SPDX (unless you + really want one of its variants); `"MIT"` and `"ISC"` are fine as-is; the + [full list](https://github.com/shinnn/spdx-license-ids/blob/master/spdx-license-ids.json) + is its own package). +* `npm init` now demands that you use a valid SPDX expression when using it + interactively (pro tip: I mostly use `npm init -y`, having previously run + `npm config set init.license=MIT` / `npm config set init.author.email=foo` / + `npm config set init.author.name=me`). +* The documentation for `package.json` has been updated to tell you how to use + the `"license"` field properly with SPDX. + +In general, this shouldn't be a big deal for anybody other than people trying +to run their own automated license validators, but in the long run, if +everybody switches to this format, many people's lives will be made much +simpler. I think this is an important improvement for npm and am very thankful +to Kyle for taking the lead on this. Also, even if you think all of this is +completely stupid, just [choose a license](http://en.wikipedia.org/wiki/License-free_software) +anyway. Future you will thank past you someday, unless you are +[djb](http://cr.yp.to/), in which case you are djb, and more power to you. + +* [`8669f7d`](https://github.com/npm/npm/commit/8669f7d88c472ccdd60e140106ac43cca636a648) + [#8179](https://github.com/npm/npm/issues/8179) Document how to use SPDX in + `license` stanzas in `package.json`, including how to migrate from old busted + license declaration arrays to fancy new compound-license clauses. + ([@kemitchell](https://github.com/kemitchell)) +* [`98ad98c`](https://github.com/npm/npm/commit/98ad98cb11f3d3ba29a488ef1ab050b066d9c7f6) + [#8197](https://github.com/npm/npm/issues/8197) `init-package-json@1.5.0` + Ensure that packages bootstrapped with `npm init` use an SPDX-compliant + license expression. ([@kemitchell](https://github.com/kemitchell)) +* [`2ad3905`](https://github.com/npm/npm/commit/2ad3905e9139b0be2b22accf707b814469de813e) + [#8197](https://github.com/npm/npm/issues/8197) + `normalize-package-data@2.1.0`: Warn when a package is missing a license + declaration, or using a license expression that isn't valid SPDX. + ([@kemitchell](https://github.com/kemitchell)) +* [`127bb73`](https://github.com/npm/npm/commit/127bb73ccccc59a1267851c702d8ebd3f3a97e81) + [#8197](https://github.com/npm/npm/issues/8197) `tar@2.1.1`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`e9a933a`](https://github.com/npm/npm/commit/e9a933a9148180d9d799f99f4154f5110ff2cace) + [#8197](https://github.com/npm/npm/issues/8197) `once@1.3.2`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`412401f`](https://github.com/npm/npm/commit/412401fb6a19b18f3e02d97a24d4dafed650c186) + [#8197](https://github.com/npm/npm/issues/8197) `semver@4.3.4`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) + +As a corollary to the previous changes, I've put some work into making `npm +install` spew out fewer pointless warnings about missing values in transitive +dependencies. From now on, npm will only warn you about missing READMEs, +license fields, and the like for top-level projects (including packages you +directly install into your application, but we may relax that eventually). + +Practically _nobody_ liked having those warnings displayed for child +dependencies, for the simple reason that there was very little that anybody +could _do_ about those warnings, unless they happened to be the maintainers of +those dependencies themselves. Since many, many projects don't have +SPDX-compliant licenses, the number of warnings reached a level where they ran +the risk of turning into a block of visual noise that developers (read: me, and +probably you) would ignore forever. + +So I fixed it. If you still want to see the messages about child dependencies, +they're still there, but have been pushed down a logging level to `info`. You +can display them by running `npm install -d` or `npm install --loglevel=info`. + +* [`eb18245`](https://github.com/npm/npm/commit/eb18245f55fb4cd62a36867744bcd1b7be0a33e2) + Only warn on normalization errors for top-level dependencies. Transitive + dependency validation warnings are logged at `info` level. + ([@othiym23](https://github.com/othiym23)) + +#### BUG FIXES + +* [`e40e809`](https://github.com/npm/npm/commit/e40e8095d2bc9fa4eb8f01aa22067e0068fa8a54) + `tap@1.0.1`: TAP: The Next Generation. Fix up many tests to they work + properly with the new major version of `node-tap`. Look at all the colors! + ([@isaacs](https://github.com/isaacs)) +* [`f9314e9`](https://github.com/npm/npm/commit/f9314e97d26532c0ef2b03e98f3ed300b7cd5026) + `nock@1.9.0`: Minor tweaks and bug fixes. ([@pgte](https://github.com/pgte)) +* [`45c2b1a`](https://github.com/npm/npm/commit/45c2b1aaa051733fa352074994ae6e569fd51e8b) + [#8187](https://github.com/npm/npm/issues/8187) `npm ls` wasn't properly + recognizing dependencies installed from GitHub repositories as git + dependencies, and so wasn't displaying them as such. + ([@zornme](https://github.com/zornme)) +* [`1ab57c3`](https://github.com/npm/npm/commit/1ab57c38116c0403965c92bf60121f0f251433e4) + In some cases, `npm help` was using something that looked like a regular + expression where a glob pattern should be used, and vice versa. + ([@isaacs](https://github.com/isaacs)) + +### v2.9.1 (2015-04-30): + +#### WOW! MORE GIT FIXES! YOU LOVE THOSE! + +The first item below is actually a pretty big deal, as it fixes (with a +one-word change and a much, much longer test case (thanks again, +[@iarna](https://github.com/iarna))) a regression that's been around for months +now. If you're depending on multiple branches of a single git dependency in a +single project, you probably want to check out `npm@2.9.1` and verify that +things (again?) work correctly in your project. + +* [`178a6ad`](https://github.com/npm/npm/commit/178a6ad540215820d16217465a5f220d8c95a313) + [#7202](https://github.com/npm/npm/issues/7202) When caching git + dependencies, do so by the whole URL, including the branch name, so that if a + single application depends on multiple branches from the same repository (in + practice, multiple version tags), every install is of the correct version, + instead of reusing whichever branch the caching process happened to check out + first. ([@iarna](https://github.com/iarna)) +* [`63b79cc`](https://github.com/npm/npm/commit/63b79ccde092a9cb3b1f34abe43e1d2ba69c0dbf) + [#8084](https://github.com/npm/npm/issues/8084) Ensure that Bitbucket, + GitHub, and Gitlab dependencies are installed the same way as non-hosted git + dependencies, fixing `npm install --link`. + ([@laiso](https://github.com/laiso)) + +#### DOCUMENTATION FIXES AND TWEAKS + +These changes may seem simple and small (except Lin's fix to the package name +restrictions, which was more an egregious oversight on our part), but cleaner +documentation makes npm significantly more pleasant to use. I really appreciate +all the typo fixes, clarifications, and formatting tweaks people send us, and +am delighted that we get so many of these pull requests. Thanks, everybody! + +* [`ca478dc`](https://github.com/npm/npm/commit/ca478dcaa29b8f07cd6fe515a3c4518166819291) + [#8137](https://github.com/npm/npm/issues/8137) Somehow, we had failed to + clearly document the full restrictions on package names. + [@linclark](https://github.com/linclark) has now fixed that, although we will + take with us to our graves the reasons why the maximum package name length is 214 + characters (well, OK, it was that that was the longest name in the registry + when we decided to put a cap on the name length). + ([@linclark](https://github.com/linclark)) +* [`b574076`](https://github.com/npm/npm/commit/b5740767c320c1eff3576a8d63952534a0fbb936) + [#8079](https://github.com/npm/npm/issues/8079) Make the `npm shrinkwrap` + documentation use code formatting for examples consistently. It would be + great to do this for more commands HINT HINT. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`1ff636e`](https://github.com/npm/npm/commit/1ff636e2db3852a53e38c866fed7eafdacd307fc) + [#8105](https://github.com/npm/npm/issues/8105) Document that the global + `npmrc` goes in `$PREFIX/etc/npmrc`, instead of `$PREFIX/npmrc`. + ([@anttti](https://github.com/anttti)) +* [`c3f2f7c`](https://github.com/npm/npm/commit/c3f2f7c299342e1c1eccc55a976a63c607f51621) + [#8127](https://github.com/npm/npm/issues/8127) Document how to use `npm run + build` directly (hint: it's different from `npm build`!). + ([@mikemaccana](https://github.com/mikemaccana)) +* [`873e467`](https://github.com/npm/npm/commit/873e46757e1986761b15353f94580a071adcb383) + [#8069](https://github.com/npm/npm/issues/8069) Take the old, dead npm + mailing list address out of `package.json`. It seems that people don't have + much trouble figuring out how to report errors to npm. + ([@robertkowalski](https://github.com/robertkowalski)) + +#### ENROBUSTIFICATIONMENT + +* [`5abfc9c`](https://github.com/npm/npm/commit/5abfc9c9017da714e47a3aece750836b4f9af6a9) + [#7973](https://github.com/npm/npm/issues/7973) `npm run-script` completion + will only suggest run scripts, instead of including dependencies. If for some + reason you still wanted it to suggest dependencies, let us know. + ([@mantoni](https://github.com/mantoni)) +* [`4b564f0`](https://github.com/npm/npm/commit/4b564f0ce979dc74c09604f4d46fd25a2ee63804) + [#8081](https://github.com/npm/npm/issues/8081) Use `osenv` to parse the + environment's `PATH` in a platform-neutral way. + ([@watilde](https://github.com/watilde)) +* [`a4b6238`](https://github.com/npm/npm/commit/a4b62387b41848818973eeed056fd5c6570274f3) + [#8094](https://github.com/npm/npm/issues/8094) When we refactored the + configuration code to split out checking for IPv4 local addresses, we + inadvertently completely broke it by failing to return the values. In + addition, just the call to `os.getInterfaces()` could throw on systems where + querying the network configuration requires elevated privileges (e.g. Amazon + Lambda). Add the return, and trap errors so they don't cause npm to explode. + Thanks to [@mhart](https://github.com/mhart) for bringing this to our + attention! ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES WAIT FOR NO SOPHONT + +* [`000cd8b`](https://github.com/npm/npm/commit/000cd8b52104942ac3404f0ad0651d82f573da37) + `rimraf@2.3.3`: More informative assertions on argument validation failure. + ([@isaacs](https://github.com/isaacs)) +* [`530a2e3`](https://github.com/npm/npm/commit/530a2e369128270f3e098f0e9be061533003b0eb) + `lru-cache@2.6.2`: Revert to old key access-time behavior, as it was correct + all along. ([@isaacs](https://github.com/isaacs)) +* [`d88958c`](https://github.com/npm/npm/commit/d88958ca02ce81b027b9919aec539d0145875a59) + `minimatch@2.0.7`: Feature detection and test improvements. + ([@isaacs](https://github.com/isaacs)) +* [`3fa39e4`](https://github.com/npm/npm/commit/3fa39e4d492609d5d045033896dcd99f7b875329) + `nock@1.7.1` ([@pgte](https://github.com/pgte)) + +### v2.9.0 (2015-04-23): + +This week was kind of a breather to concentrate on fixing up the tests on the +`multi-stage` branch, and not mess with git issues for a little while. +Unfortunately, There are now enough severe git issues that we'll probably have +to spend another couple weeks tackling them. In the meantime, enjoy these two +small features. They're just enough to qualify for a semver-minor bump: + +#### NANOFEATURES + +* [`2799322`](https://github.com/npm/npm/commit/279932298ce5b589c5eea9439ac40b88b99c6a4a) + [#7426](https://github.com/npm/npm/issues/7426) Include local modules in `npm + outdated` and `npm update`. ([@ArnaudRinquin](https://github.com/ArnaudRinquin)) +* [`2114862`](https://github.com/npm/npm/commit/21148620fa03a582f4ec436bb16bd472664f2737) + [#8014](https://github.com/npm/npm/issues/8014) The prefix used before the + version on version tags is now configurable via `tag-version-prefix`. Be + careful with this one and read the docs before using it. + ([@kkragenbrink](https://github.com/kkragenbrink)) + +#### OTHER MINOR TWEAKS + +* [`18ce0ec`](https://github.com/npm/npm/commit/18ce0ecd2d94ad3af01e997f1396515892dd363c) + [#3032](https://github.com/npm/npm/issues/3032) `npm unpublish` will now use + the registry set in `package.json`, just like `npm publish`. This only + applies, for now, when unpublishing the entire package, as unpublishing a + single version requires the name be included on the command line and + therefore doesn't read from `package.json`. ([@watilde](https://github.com/watilde)) +* [`9ad2100`](https://github.com/npm/npm/commit/9ad210042242e51d52b2a8b633d8e59248f5faa4) + [#8008](https://github.com/npm/npm/issues/8008) Once again, when considering + what to install on `npm install`, include `devDependencies`. + ([@smikes](https://github.com/smikes)) +* [`5466260`](https://github.com/npm/npm/commit/546626059909dca1906454e820ca4e315c1795bd) + [#8003](https://github.com/npm/npm/issues/8003) Clarify the documentation + around scopes to make it easier to understand how they support private + packages. ([@smikes](https://github.com/smikes)) + +#### DEPENDENCIES WILL NOT STOP UNTIL YOU ARE VERY SLEEPY + +* [`faf65a7`](https://github.com/npm/npm/commit/faf65a7bbb2fad13216f64ed8f1243bafe743f97) + `init-package-json@1.4.2`: If there are multiple validation errors and + warnings, ensure they all get displayed (includes a rad new way of testing + `init-package-json` contributed by + [@michaelnisi](https://github.com/michaelnisi)). + ([@MisumiRize](https://github.com/MisumiRize)) +* [`7f10f38`](https://github.com/npm/npm/commit/7f10f38d29a8423d7cde8103fa7b64ac728da1e0) + `editor@1.0.0`: `1.0.0` is literally more than `0.1.0` (no change aside from + version number). ([@substack](https://github.com/substack)) +* [`4979af3`](https://github.com/npm/npm/commit/4979af3fcae5a3962383b7fdad3162381e62eefe) + [#6805](https://github.com/npm/npm/issues/6805) `npm-registry-client@6.3.3`: + Decode scoped package names sent by the registry so they look nicer. + ([@mmalecki](https://github.com/mmalecki)) + +### v2.8.4 (2015-04-16): + +This is the fourth release of npm this week, so it's mostly just landing a few +small outstanding PRs on dependencies and some tiny documentation tweaks. +`npm@2.8.3` is where the real action is. + +* [`ee2bd77`](https://github.com/npm/npm/commit/ee2bd77f3c64d38735d1d31028224a5c40422a9b) + [#7983](https://github.com/npm/npm/issues/7983) `tar@2.1.0`: Better error + reporting in corrupted tar files, and add support for the `fromBase` flag + (rescued from the dustbin of history by + [@deanmarano](https://github.com/deanmarano)). + ([@othiym23](https://github.com/othiym23)) +* [`d8eee6c`](https://github.com/npm/npm/commit/d8eee6cf9d2ff7aca68dfaed2de76824a3e0d9af) + `init-package-json@1.4.1`: Add support for a default author, and only add + scope to a package name once. ([@othiym23](https://github.com/othiym23)) +* [`4fc5d98`](https://github.com/npm/npm/commit/4fc5d98b785f601c60d4dc0a2c8674f0cccf6262) + `lru-cache@2.6.1`: Small tweaks to cache value aging and entry counting that + are irrelevant to npm. ([@isaacs](https://github.com/isaacs)) +* [`1fe5840`](https://github.com/npm/npm/commit/1fe584089f5bef133de5518aa26eaf6064be2bf7) + [#7946](https://github.com/npm/npm/issues/7946) Make `npm init` text + friendlier. ([@sandfox](https://github.com/sandfox)) + +### v2.8.3 (2015-04-15): + +#### TWO SMALL GIT TWEAKS + +This is the last of a set of releases intended to ensure npm's git support is +robust enough that we can stop working on it for a while. These fixes are +small, but prevent a common crasher and clear up one of the more confusing +error messages coming out of npm when working with repositories hosted on git. + +* [`387f889`](https://github.com/npm/npm/commit/387f889c0e8fb617d9cc9a42ed0a3ec49424ab5d) + [#7961](https://github.com/npm/npm/issues/7961) Ensure that hosted git SSH + URLs always have a valid protocol when stored in `resolved` fields in + `npm-shrinkwrap.json`. ([@othiym23](https://github.com/othiym23)) +* [`394c2f5`](https://github.com/npm/npm/commit/394c2f5a1227232c0baf42fbba1402aafe0d6ffb) + Switch the order in which hosted Git providers are checked to `git:`, + `git+https:`, then `git+ssh:` (from `git:`, `git+ssh:`, then `git+https:`) in + an effort to go from most to least likely to succeed, to make for less + confusing error message. ([@othiym23](https://github.com/othiym23)) + +### v2.8.2 (2015-04-14): + +#### PEACE IN OUR TIME + +npm has been having an issue with CouchDB's web server since the release +of io.js and Node.js 0.12.0 that has consumed a huge amount of my time +to little visible effect. Sam Mikes picked up the thread from me, and +after a [_lot_ of effort](https://github.com/npm/npm/issues/7699#issuecomment-93091111) +figured out that ultimately there are probably a couple problems with +the new HTTP Agent keep-alive handling in new versions of Node. In +addition, `npm-registry-client` was gratuitously sending a body along +with a GET request which was triggering the bugs. Sam removed about 10 bytes from +one file in `npm-registry-client`, and this problem, which has been bugging us for months, +completely went away. + +In conclusion, Sam Mikes is great, and anybody using a private registry +hosted on CouchDB should thank him for his hard work. Also, thanks to +the community at large for pitching in on this bug, which has been +around for months now. + +* [`431c3bf`](https://github.com/npm/npm/commit/431c3bf6cdec50f9f0c735f478cb2f3f337d3313) + [#7699](https://github.com/npm/npm/issues/7699) `npm-registry-client@6.3.2`: + Don't send body with HTTP GET requests when logging in. + ([@smikes](https://github.com/smikes)) + +### v2.8.1 (2015-04-12): + +#### CORRECTION: NPM'S GIT INTEGRATION IS DOING OKAY + +A [helpful bug report](https://github.com/npm/npm/issues/7872#issuecomment-91809553) +led to another round of changes to +[`hosted-git-info`](https://github.com/npm/hosted-git-info/commit/827163c74531b69985d1ede7abced4861e7b0cd4), +some additional test-writing, and a bunch of hands-on testing against actual +private repositories. While the complexity of npm's git dependency handling is +nearly fractal (because npm is very complex, and git is even more complex), +it's feeling way more solid than it has for a while. We think this is a +substantial improvement over what we had before, so give `npm@2.8.1` a shot if +you have particularly complex git use cases and +[let us know](https://github.com/npm/npm/issues/new) how it goes. + +(NOTE: These changes mostly affect cloning and saving references to packages +hosted in git repositories, and don't address some known issues with things +like lifecycle scripts not being run on npm dependencies. Work continues on +other issues that affect parity between git and npm registry packages.) + +* [`66377c6`](https://github.com/npm/npm/commit/66377c6ece2cf4d53d9a618b7d9824e1452bc293) + [#7872](https://github.com/npm/npm/issues/7872) `hosted-git-info@2.1.2`: Pass + through credentials embedded in SSH and HTTPs git URLs. + ([@othiym23](https://github.com/othiym23)) +* [`15efe12`](https://github.com/npm/npm/commit/15efe124753257728a0ddc64074fa5a4b9c2eb30) + [#7872](https://github.com/npm/npm/issues/7872) Use the new version of + `hosted-git-info` to pass along credentials embedded in git URLs. Test it. + Test it a lot. ([@othiym23](https://github.com/othiym23)) + +#### SCOPED DEPENDENCIES AND PEER DEPENDENCIES: NOT QUITE REESE'S + +Big thanks to [@ewie](https://github.com/ewie) for identifying an issue with +how npm was handling `peerDependencies` that were implicitly installed from the +`package.json` files of scoped dependencies. This +[will be a moot point](https://github.com/npm/npm/issues/6565#issuecomment-74971689) +with the release of `npm@3`, but until then, it's important that +`peerDependency` auto-installation work as expected. + +* [`b027319`](https://github.com/npm/npm/commit/b0273190c71eba14395ddfdd1d9f7ba625297523) + [#7920](https://github.com/npm/npm/issues/7920) Scoped packages with + `peerDependencies` were installing the `peerDependencies` into the wrong + directory. ([@ewie](https://github.com/ewie)) +* [`649e31a`](https://github.com/npm/npm/commit/649e31ae4fd02568bae5dc6b4ea783431ce3d63e) + [#7920](https://github.com/npm/npm/issues/7920) Test `peerDependency` + installs involving scoped packages using `npm-package-arg` instead of simple + path tests, for consistency. ([@othiym23](https://github.com/othiym23)) + +#### MAKING IT EASIER TO WRITE NPM TESTS, VERSION 0.0.1 + +[@iarna](https://github.com/iarna) and I +([@othiym23](https://github.com/othiym23)) have been discussing a +[candidate plan](https://github.com/npm/npm/wiki/rewriting-npm's-tests:-a-plan-maybe) +for improving npm's test suite, with the goal of making it easier for new +contributors to get involved with npm by reducing the learning curve +necessary to be able to write good tests for proposed changes. This is the +first substantial piece of that effort. Here's what the commit message for +[`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) +had to say about this work: + +> It's too difficult for npm contributors to figure out what the conventional +> style is for tests. Part of the problem is that the documentation in +> CONTRIBUTING.md is inadequate, but another important factor is that the tests +> themselves are written in a variety of styles. One of the most notable +> examples of this is the fact that many tests use fixture directories to store +> precooked test scenarios and package.json files. +> +> This had some negative consequences: +> +> * tests weren't idempotent +> * subtle dependencies between tests existed +> * new tests get written in this deprecated style because it's not +> obvious that the style is out of favor +> * it's hard to figure out why a lot of those directories existed, +> because they served a variety of purposes, so it was difficult to +> tell when it was safe to remove them +> +> All in all, the fixture directories were a major source of technical debt, and +> cleaning them up, while time-consuming, makes the whole test suite much more +> approachable, and makes it more likely that new tests written by outside +> contributors will follow a conventional style. To support that, all of the +> tests touched by this changed were cleaned up to pass the `standard` style +> checker. + +And here's a little extra context from a comment I left on [#7929](https://github.com/npm/npm/issues/7929): + +> One of the other things that encouraged me was looking at this +> [presentation on technical debt](http://www.slideshare.net/nnja/pycon-2015-technical-debt-the-monster-in-your-closet) +> from Pycon 2015, especially slide 53, which I interpreted in terms of +> difficulty getting new contributors to submit patches to an OSS project like +> npm. npm has a long ways to go, but I feel good about this change. + +* [`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) + [#7929](https://github.com/npm/npm/issues/7929) Eliminate fixture directories + from `test/tap`, leaving each test self-contained. + ([@othiym23](https://github.com/othiym23)) +* [`4928d30`](https://github.com/npm/npm/commit/4928d30140821c63e03fffed73f8d88ebdc43710) + [#7929](https://github.com/npm/npm/issues/7929) Move fixture files from + `test/tap/*` to `test/fixtures`. ([@othiym23](https://github.com/othiym23)) +* [`e925deb`](https://github.com/npm/npm/commit/e925debca91092a814c1a00933babc3a8cf975be) + [#7929](https://github.com/npm/npm/issues/7929) Tweak the run scripts to stop + slaughtering the CPU on doc rebuild. + ([@othiym23](https://github.com/othiym23)) +* [`65bf7cf`](https://github.com/npm/npm/commit/65bf7cffaf91c426b676c47529eee796f8b8b75c) + [#7923](https://github.com/npm/npm/issues/7923) Use an alias of scripts and + run-scripts in `npm run test-all` ([@watilde](https://github.com/watilde)) +* [`756a3fb`](https://github.com/npm/npm/commit/756a3fbb852a2469afe706635ed88d22c37743e5) + [#7923](https://github.com/npm/npm/issues/7923) Sync timeout time of `npm + run-script test-all` to be the same as `test` and `tap` scripts. + ([@watilde](https://github.com/watilde)) +* [`8299b5f`](https://github.com/npm/npm/commit/8299b5fb6373354a7fbaab6f333863758812ae90) + Set a timeout for tap tests for `npm run-script test-all`. + ([@othiym23](https://github.com/othiym23)) + +#### THE EVER-BEATING DRUM OF DEPENDENCY UPDATES + +* [`d90d0b9`](https://github.com/npm/npm/commit/d90d0b992acbf62fd5d68debf9d1dbd6cfa20804) + [#7924](https://github.com/npm/npm/issues/7924) Remove `child-process-close`, + as it was included for Node 0.6 compatibility, and npm no longer supports + 0.6. ([@robertkowalski](https://github.com/robertkowalski)) +* [`16427c1`](https://github.com/npm/npm/commit/16427c1f3ea3d71ee753c62eb4c2663c7b32b84f) + `lru-cache@2.5.2`: More accurate updating of expiry times when `maxAge` is + set. ([@isaacs](https://github.com/isaacs)) +* [`03cce83`](https://github.com/npm/npm/commit/03cce83b64344a9e0fe036dce214f4d68cfcc9e7) + `nock@1.6.0`: Mocked network error handling. + ([@pgte](https://github.com/pgte)) +* [`f93b1f0`](https://github.com/npm/npm/commit/f93b1f0b7eb5d1b8a7967e837bbd756db1091d00) + `glob@5.0.5`: Use `path-is-absolute` polyfill, allowing newer Node.js and + io.js versions to use `path.isAbsolute()`. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`a70d694`](https://github.com/npm/npm/commit/a70d69495a6e96997e64855d9e749d943ee6d64f) + `request@2.55.0`: Bug fixes and simplification. + ([@simov](https://github.com/simov)) +* [`2aecc6f`](https://github.com/npm/npm/commit/2aecc6f4083526feeb14615b4e5484edc66175b5) + `columnify@1.5.1`: Switch to using babel from 6to5. + ([@timoxley](https://github.com/timoxley)) + +### v2.8.0 (2015-04-09): + +#### WE WILL NEVER BE DONE FIXING NPM'S GIT SUPPORT + +If you look at [the last release's release +notes](https://github.com/npm/npm/blob/master/CHANGELOG.md#git-mean-git-tuff-git-all-the-way-away-from-my-stuff), +you will note that they confidently assert that it's perfectly OK to force all +GitHub URLs through the same `git:` -> `git+ssh:` fallback flow for cloning. It +turns out that many users depend on `git+https:` URLs in their build +environments because they use GitHub auth tokens instead of SSH keys. Also, in +some cases you just want to be able to explicitly say how a given dependency +should be cloned from GitHub. + +Because of the way we resolved the inconsistency in GitHub shorthand handling +[before](https://github.com/npm/npm/blob/master/CHANGELOG.md#bug-fixes-1), this +turned out to be difficult to work around. So instead of hacking around it, we +completely redid how git is handled within npm and its attendant packages. +Again. This time, we changed things so that `normalize-package-data` and +`read-package-json` leave more of the git logic to npm itself, which makes +handling shorthand syntax consistently much easier, and also allows users to +resume using explicit, fully-qualified git URLs without npm messing with them. + +Here's a summary of what's changed: + +* Instead of converting the GitHub shorthand syntax to a `git+ssh:`, `git:`, or + `git+https:` URL and saving that, save the shorthand itself to + `package.json`. +* If presented with shortcuts, try cloning via the git protocol, SSH, and HTTPS + (in that order). +* No longer prompt for credentials -- it didn't work right with the spinner, + and wasn't guaranteed to work anyway. We may experiment with doing this a + better way in the future. Users can override this by setting `GIT_ASKPASS` in + their environment if they want to experiment with interactive cloning, but + should also set `--no-spin` on the npm command line (or run `npm config set + spin=false`). +* **EXPERIMENTAL FEATURE**: Add support for `github:`, `gist:`, `bitbucket:`, + and `gitlab:` shorthand prefixes. GitHub shortcuts will continue to be + normalized to `org/repo` instead of being saved as `github:org/repo`, but + `gitlab:`, `gist:`, and `bitbucket:` prefixes will be used on the command + line and from `package.json`. BE CAREFUL WITH THIS. `package.json` files + published with the new shorthand syntax can _only_ be read by `npm@2.8.0` and + later, and this feature is mostly meant for playing around with it. If you + want to save git dependencies in a form that older versions of npm can read, + use `--save-exact`, which will save the git URL and resolved commit hash of + the head of the branch in a manner similar to the way that `--save-exact` + pins versions for registry dependencies. This is documented (so check `npm + help install` for details), but we're not going to make a lot of noise about + it until it has a chance to bake in a little more. + +It is [@othiym23](https://github.com/othiym23)'s sincere hope that this will +resolve all of the inconsistencies users were seeing with GitHub and git-hosted +packages, but given the level of change here, that may just be a fond wish. +Extra testing of this change is requested. + +* [`6b0f588`](https://github.com/npm/npm/commit/6b0f58877f37df9904490ffbaaad33862bd36dce) + [#7867](https://github.com/npm/npm/issues/7867) Use git shorthand and git + URLs as presented by user. Support new `hosted-git-info` shortcut syntax. + Save shorthand in `package.json`. Try cloning via `git:`, `git+ssh:`, and + `git+https:`, in that order, when supported by the underlying hosting + provider. ([@othiym23](https://github.com/othiym23)) +* [`75d4267`](https://github.com/npm/npm/commit/75d426787869d54ca7400408f562f971b34649ef) + [#7867](https://github.com/npm/npm/issues/7867) Document new GitHub, GitHub + gist, Bitbucket, and GitLab shorthand syntax. + ([@othiym23](https://github.com/othiym23)) +* [`7d92c75`](https://github.com/npm/npm/commit/7d92c7592998d90ec883fa989ca74f04ec1b93de) + [#7867](https://github.com/npm/npm/issues/7867) When `--save-exact` is used + with git shorthand or URLs, save the fully-resolved URL, with branch name + resolved to the exact hash for the commit checked out. + ([@othiym23](https://github.com/othiym23)) +* [`9220e59`](https://github.com/npm/npm/commit/9220e59f8def8c82c6d331a39ba29ad4c44e3a9b) + [#7867](https://github.com/npm/npm/issues/7867) Ensure that non-prefixed and + non-normalized GitHub shortcuts are saved to `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`dd398e9`](https://github.com/npm/npm/commit/dd398e98a8eba27eeba84378200da3d078fdf980) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.1`: + Ensure that `gist:` shorthand survives being round-tripped through + `package.json`. ([@othiym23](https://github.com/othiym23)) +* [`33d1420`](https://github.com/npm/npm/commit/33d1420bf2f629332fceb2ac7e174e63ac48f96a) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.0`: Add + support for auth embedded directly in git URLs. + ([@othiym23](https://github.com/othiym23)) +* [`23a1d5a`](https://github.com/npm/npm/commit/23a1d5a540e8db27f5cd0245de7c3694e2bddad1) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.0.2`: Make + it possible to determine in which form a hosted git URL was passed. + ([@iarna](https://github.com/iarna)) +* [`eaf75ac`](https://github.com/npm/npm/commit/eaf75acb718611ad5cfb360084ec86938d9c66c5) + [#7867](https://github.com/npm/npm/issues/7867) + `normalize-package-data@2.0.0`: Normalize GitHub specifiers so they pass + through shortcut syntax and preserve explicit URLs. + ([@iarna](https://github.com/iarna)) +* [`95e0535`](https://github.com/npm/npm/commit/95e0535e365e0aca49c634dd2061a0369b0475f1) + [#7867](https://github.com/npm/npm/issues/7867) `npm-package-arg@4.0.0`: Add + git URL and shortcut to hosted git spec and use `hosted-git-info@2.0.2`. + ([@iarna](https://github.com/iarna)) +* [`a808926`](https://github.com/npm/npm/commit/a8089268d5f3d57f42dbaba02ff6437da5121191) + [#7867](https://github.com/npm/npm/issues/7867) + `realize-package-specifier@3.0.0`: Use `npm-package-arg@4.0.0` and test + shortcut specifier behavior. ([@iarna](https://github.com/iarna)) +* [`6dd1e03`](https://github.com/npm/npm/commit/6dd1e039bddf8cf5383343f91d84bc5d78acd083) + [#7867](https://github.com/npm/npm/issues/7867) `init-package-json@1.4.0`: + Allow dependency on `read-package-json@2.0.0`. + ([@iarna](https://github.com/iarna)) +* [`63254bb`](https://github.com/npm/npm/commit/63254bb6358f66752aca6aa1a275271b3ae03f7c) + [#7867](https://github.com/npm/npm/issues/7867) `read-installed@4.0.0`: Use + `read-package-json@2.0.0`. ([@iarna](https://github.com/iarna)) +* [`254b887`](https://github.com/npm/npm/commit/254b8871f5a173bb464cc5b0ace460c7878b8097) + [#7867](https://github.com/npm/npm/issues/7867) `read-package-json@2.0.0`: + Use `normalize-package-data@2.0.0`. ([@iarna](https://github.com/iarna)) +* [`0b9f8be`](https://github.com/npm/npm/commit/0b9f8be62fe5252abe54d49e36a696f4816c2eca) + [#7867](https://github.com/npm/npm/issues/7867) `npm-registry-client@6.3.0`: + Mark compatibility with `normalize-package-data@2.0.0` and + `npm-package-arg@4.0.0`. ([@iarna](https://github.com/iarna)) +* [`f40ecaa`](https://github.com/npm/npm/commit/f40ecaad68f77abc50eb6f5b224e31dec3d250fc) + [#7867](https://github.com/npm/npm/issues/7867) Extract a common method to + use when cloning git repos for testing. + ([@othiym23](https://github.com/othiym23)) + +#### TEST FIXES FOR NODE 0.8 + +npm continues to [get closer](https://github.com/npm/npm/issues/7842) to being +completely green on Travis for Node 0.8. + +* [`26d36e9`](https://github.com/npm/npm/commit/26d36e9cf0eca69fe1863d2ea536c28555b9e8de) + [#7842](https://github.com/npm/npm/issues/7842) When spawning child + processes, map exit code 127 to ENOENT so Node 0.8 handles child process + failures the same as later versions. + ([@SonicHedgehog](https://github.com/SonicHedgehog)) +* [`54cd895`](https://github.com/npm/npm/commit/54cd8956ea783f96749e46597d8c2cb9397c5d5f) + [#7842](https://github.com/npm/npm/issues/7842) Node 0.8 requires -e with -p + when evaluating snippets; fix test. + ([@SonicHedgehog](https://github.com/SonicHedgehog)) + +#### SMALL FIX AND DOC TWEAK + +* [`20e9003`](https://github.com/npm/npm/commit/20e90031b847e9f7c7168f3dad8b1e526f9a2586) + `tar@2.0.1`: Fix regression where relative symbolic links within an + extraction root that pointed within an extraction root would get normalized + to absolute symbolic links. ([@isaacs](https://github.com/isaacs)) +* [`2ef8898`](https://github.com/npm/npm/commit/2ef88989c41bee1578570bb2172c90ede129dbd1) + [#7879](https://github.com/npm/npm/issues/7879) Better document that `npm + publish --tag=foo` will not set `latest` to that version. + ([@linclark](https://github.com/linclark)) + +### v2.7.6 (2015-04-02): + +#### GIT MEAN, GIT TUFF, GIT ALL THE WAY AWAY FROM MY STUFF + +Part of the reason that we're reluctant to take patches to how npm deals with +git dependencies is that every time we touch the git support, something breaks. +The last few releases are a case in point. `npm@2.7.4` completely broke +installing private modules from GitHub, and `npm@2.7.5` fixed them at the cost +of logging a misleading error message that caused many people to believe that +their dependencies hadn't been successfully installed when they actually had +been. + +This all started from a desire to ensure that GitHub shortcut syntax is being +handled correctly. The correct behavior is for npm to try to clone all +dependencies on GitHub (whether they're specified with the GitHub +`organization/repository` shortcut syntax or not) via the plain `git:` protocol +first, and to fall back to using `git+ssh:` if `git:` doesn't work. Previously, +sometimes npm would use `git:` and `git+ssh:` in some cases (most notably when +using GitHub shortcut syntax on the command line), and use `git+https:` in +others (when the GitHub shortcut syntax was present in `package.json`). This +led to subtle and hard-to-understand inconsistencies, and we're glad that as of +`npm@2.7.6`, we've finally gotten things to where they were before we started, +only slightly more consistent overall. + +We are now going to go back to our policy of being extremely reluctant to touch +the code that handles Git dependencies. + +* [`b747593`](https://github.com/npm/npm/commit/b7475936f473f029e6a027ba1b16277523747d0b) + [#7630](https://github.com/npm/npm/issues/7630) Don't automatically log all + git failures as errors. `maybeGithub` needs to be able to fail without + logging to support its fallback logic. + ([@othiym23](https://github.com/othiym23)) +* [`cd67a0d`](https://github.com/npm/npm/commit/cd67a0db07891d20871822696c26692c8a84866a) + [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote + URL, handle failures gracefully (without assuming standard output exists). + ([@othiym23](https://github.com/othiym23)) +* [`637c7d1`](https://github.com/npm/npm/commit/637c7d1411fe07f409cf91f2e65fd70685cb253c) + [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote + URL, handle failures gracefully (without assuming standard _error_ exists). + ([@othiym23](https://github.com/othiym23)) + +#### OTHER SIGNIFICANT FIXES + +* [`78005eb`](https://github.com/npm/npm/commit/78005ebb6f4103c20f077669c3929b7ea46a4c0d) + [#7743](https://github.com/npm/npm/issues/7743) Always quote arguments passed + to `npm run-script`. This allows build systems and the like to safely escape + glob patterns passed as arguments to `run-scripts` with `npm run-script + <script> -- <arguments>`. This is a tricky change to test, and may be + reverted or moved to `npm@3` if it turns out it breaks things for users. + ([@mantoni](https://github.com/mantoni)) +* [`da015ee`](https://github.com/npm/npm/commit/da015eee45f6daf384598151d06a9b57ffce136e) + [#7074](https://github.com/npm/npm/issues/7074) `read-package-json@1.3.3`: + `read-package-json` no longer caches `package.json` files, which trades a + very small performance loss for the elimination of a large class of really + annoying race conditions. See [#7074](https://github.com/npm/npm/issues/7074) + for the grisly details. ([@othiym23](https://github.com/othiym23)) +* [`dd20f57`](https://github.com/npm/npm/commit/dd20f5755291b9433f0d298ee0eead22cda6db36) + `init-package-json@1.3.2`: Only add the `@` to scoped package names if it's + not already there when reading from the filesystem + ([@watilde](https://github.com/watilde)), and support inline validation of + package names ([@michaelnisi](https://github.com/michaelnisi)). + +#### SMALL FIXES AND DEPENDENCY UPGRADES + +* [`1f380f6`](https://github.com/npm/npm/commit/1f380f66c1e944b8ffbf096fa94d09e931626e12) + [#7820](https://github.com/npm/npm/issues/7820) `are-we-there-yet@1.0.4`: Use + `readable-stream` instead of built-in `stream` module to better support + Node.js 0.8.x. ([@SonicHedgehog](https://github.com/SonicHedgehog)) +* [`d380188`](https://github.com/npm/npm/commit/d380188e161be31f5a4f53947de6bc28df4732d8) + `semver@4.3.3`: Don't throw on `semver.parse(null)`, and parse numeric + version strings more robustly. ([@isaacs](https://github.com/isaacs)) +* [`01d9964`](https://github.com/npm/npm/commit/01d99649265f921e1c61cf406613e7042bcea008) + `nock@1.4.0`: This change may need to be rolled back, or rolled forward, + because [nock depends on + `setImmediate`](https://github.com/npm/npm/issues/7842), which causes tests + to fail when run with Node.js 0.8. ([@othiym23](https://github.com/othiym23)) +* [`91f5cb1`](https://github.com/npm/npm/commit/91f5cb1fb91520fbe25a4da5b80848ed540b9ad3) + [#7791](https://github.com/npm/npm/issues/7791) Fix brackets in npmconf so + that `loaded` is set correctly. + ([@charmander](https://github.com/charmander)) +* [`1349e27`](https://github.com/npm/npm/commit/1349e27c936a8b0fc9f6440a6d6404ef3b19c587) + [#7818](https://github.com/npm/npm/issues/7818) Update `README.md` to point + out that the install script now lives on https://www.npmjs.com. + ([@weisjohn](https://github.com/weisjohn)) + +### v2.7.5 (2015-03-26): + +#### SECURITY FIXES + +* [`300834e`](https://github.com/npm/npm/commit/300834e91a4e2a95fb7fb59c309e7c3fc91d2312) + `tar@2.0.0`: Normalize symbolic links that point to targets outside the + extraction root. This prevents packages containing symbolic links from + overwriting targets outside the expected paths for a package. Thanks to [Tim + Cuthbertson](http://gfxmonk.net/) and the team at [Lift + Security](https://liftsecurity.io/) for working with the npm team to identify + this issue. ([@othiym23](https://github.com/othiym23)) +* [`0dc6875`](https://github.com/npm/npm/commit/0dc68757cffd5397c280bc71365d106523a5a052) + `semver@4.3.2`: Package versions can be no more than 256 characters long. + This prevents a situation in which parsing the version number can use + exponentially more time and memory to parse, leading to a potential denial of + service. Thanks to Adam Baldwin at Lift Security for bringing this to our + attention. ([@isaacs](https://github.com/isaacs)) + +#### BUG FIXES + +* [`5811468`](https://github.com/npm/npm/commit/5811468e104ccb6b26b8715dff390d68daa10066) + [#7713](https://github.com/npm/npm/issues/7713) Add a test for `npm link` and + `npm link <package>`. ([@watilde](https://github.com/watilde)) +* [`3cf3b0c`](https://github.com/npm/npm/commit/3cf3b0c8fddb6b66f969969feebea85fabd0360b) + [#7713](https://github.com/npm/npm/issues/7713) Only use absolute symbolic + links when `npm link`ing. ([@hokaccha](https://github.com/hokaccha)) +* [`f35aa93`](https://github.com/npm/npm/commit/f35aa933e136228a89e3fcfdebe8c7cc4f1e7c00) + [#7443](https://github.com/npm/npm/issues/7443) Keep relative URLs when + hitting search endpoint. ([@othiym23](https://github.com/othiym23)) +* [`eab6184`](https://github.com/npm/npm/commit/eab618425c51e3aa4416da28dcd8ca4ba63aec41) + [#7766](https://github.com/npm/npm/issues/7766) One last tweak to ensure that + GitHub shortcuts work with private repositories. + ([@iarna](https://github.com/iarna)) +* [`5d7f704`](https://github.com/npm/npm/commit/5d7f704823f5f92ddd7ff3e7dd2b8bcc66c73005) + [#7656](https://github.com/npm/npm/issues/7656) Don't try to load a deleted + CA file, allowing the `cafile` config to be changed. + ([@KenanY](https://github.com/KenanY)) +* [`a840a13`](https://github.com/npm/npm/commit/a840a13bbf0330157536381ea8e58d0bd93b4c05) + [#7746](https://github.com/npm/npm/issues/7746) Only fix up URL paths when + there are paths to fix up. ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`94df809`](https://github.com/npm/npm/commit/94df8095985bf5ba9d8db99dc445d05dac136aaf) + `request@2.54.0`: Fixes for Node.js 0.12 and io.js. + ([@simov](https://github.com/simov)) +* [`98a13ea`](https://github.com/npm/npm/commit/98a13eafdf098b53069ad15297008fcab9c61653) + `opener@1.4.1`: Deal with `start` on Windows more conventionally. + ([@domenic](https://github.com/domenic)) +* [`c2417c7`](https://github.com/npm/npm/commit/c2417c7702459a446f07d43ca3c4e99bde7fe9d6) + `require-inject@1.2.0`: Add installGlobally to bypass cleanups. + ([@iarna](https://github.com/iarna)) + +#### DOCUMENTATION FIXES + +* [`f87c728`](https://github.com/npm/npm/commit/f87c728f8732c9e977c0dc2060c0610649e79155) + [#7696](https://github.com/npm/npm/issues/7696) Months and minutes were + swapped in doc-build.sh ([@MeddahJ](https://github.com/MeddahJ)) +* [`4e216b2`](https://github.com/npm/npm/commit/4e216b29b30463f06afe6e3c645e205da5f50922) + [#7752](https://github.com/npm/npm/issues/7752) Update string examples to be + properly quoted. ([@snuggs](https://github.com/snuggs)) +* [`402f52a`](https://github.com/npm/npm/commit/402f52ab201efa348feb87cad753fc4b91e8a3fb) + [#7635](https://github.com/npm/npm/issues/7635) Clarify Windows installation + instructions. ([@msikma](https://github.com/msikma)) +* [`c910399`](https://github.com/npm/npm/commit/c910399ecfd8db49fe4496dd26887765a8aed20f) + small typo fix to `CHANGELOG.md` ([@e-jigsaw](https://github.com/e-jigsaw)) + +### v2.7.4 (2015-03-20): + +#### BUG FIXES + +* [`fe1bc38`](https://github.com/npm/npm/commit/fe1bc387a14475e373557de669e03d9d006d3173) + [#7672](https://github.com/npm/npm/issues/7672) `npm-registry-client@3.1.2`: + Fix client-side certificate handling by correcting property name. + ([@atamon](https://github.com/atamon)) +* [`3ce3cc2`](https://github.com/npm/npm/commit/3ce3cc242fc345bca6820185a4f5a013c5bc1944) + [#7635](https://github.com/npm/npm/issues/7635) `fstream-npm@1.0.2`: Raise a + more descriptive error when `bundledDependencies` isn't an array. + ([@KenanY](https://github.com/KenanY)) +* [`3a12723`](https://github.com/npm/npm/commit/3a127235076a1f00bc8befba56c024c6d0e7f477) + [#7661](https://github.com/npm/npm/issues/7661) Allow setting `--registry` on + the command line to trump the mapped registry for `--scope`. + ([@othiym23](https://github.com/othiym23)) +* [`89ce829`](https://github.com/npm/npm/commit/89ce829a00b526d0518f5cd855c323bffe182af0) + [#7630](https://github.com/npm/npm/issues/7630) `hosted-git-info@1.5.3`: Part + 3 of ensuring that GitHub shorthand is handled consistently. + ([@othiym23](https://github.com/othiym23)) +* [`63313eb`](https://github.com/npm/npm/commit/63313eb0c37891c355546fd1093010c8a0c3cd81) + [#7630](https://github.com/npm/npm/issues/7630) + `realize-package-specifier@2.2.0`: Part 2 of ensuring that GitHub shorthand + is handled consistently. ([@othiym23](https://github.com/othiym23)) +* [`3ed41bf`](https://github.com/npm/npm/commit/3ed41bf64a1bb752bb3155c74dd6ffbbd28c89c9) + [#7630](https://github.com/npm/npm/issues/7630) `npm-package-arg@3.1.1`: Part + 1 of ensuring that GitHub shorthand is handled consistently. + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`6a498c6`](https://github.com/npm/npm/commit/6a498c6aaa00611a0a1ea405255900c327103f8b) + `npm-registry-couchapp@2.6.7`: Ensure that npm continues to work with new + registry architecture. ([@bcoe](https://github.com/bcoe)) +* [`bd72c47`](https://github.com/npm/npm/commit/bd72c47ce8c58e287d496902c11845c8fea420d6) + `glob@5.0.3`: Updated to latest version. + ([@isaacs](https://github.com/isaacs)) +* [`4bfbaa2`](https://github.com/npm/npm/commit/4bfbaa2d8b9dc7067d999de8f55676db3a4f4196) + `npmlog@1.2.0`: Getting up to date with latest version (but not using any of + the new features). ([@othiym23](https://github.com/othiym23)) + +#### A NEW REGRESSION TEST + +* [`3703b0b`](https://github.com/npm/npm/commit/3703b0b87c127a64649bdbfc3bc697ebccc4aa24) + Add regression test for `npm version` to ensure `message` property in config + continues to be honored. ([@dannyfritz](https://github.com/dannyfritz)) + +### v2.7.3 (2015-03-16): + +#### HAHA WHOOPS LIL SHINKWRAP ISSUE THERE LOL + +* [`1549106`](https://github.com/npm/npm/commit/1549106f518000633915686f5f1ccc6afcf77f8f) + [#7641](https://github.com/npm/npm/issues/7641) Due to 448efd0, running `npm + shrinkwrap --dev` caused production dependencies to no longer be included in + `npm-shrinkwrap.json`. Whoopsie! ([@othiym23](https://github.com/othiym23)) + +### v2.7.2 (2015-03-12): + +#### NPM GASTROENTEROLOGY + +* [`fb0ac26`](https://github.com/npm/npm/commit/fb0ac26eecdd76f6eaa4a96a865b7c6f52ce5aa5) + [#7579](https://github.com/npm/npm/issues/7579) Only block removing files and + links when we're sure npm isn't responsible for them. This change is hard to + summarize, because if things are working correctly you should never see it, + but if you want more context, just [go read the commit + message](https://github.com/npm/npm/commit/fb0ac26eecdd76f6eaa4a96a865b7c6f52ce5aa5), + which lays it all out. ([@othiym23](https://github.com/othiym23)) +* [`051c473`](https://github.com/npm/npm/commit/051c4738486a826300f205b71590781ce7744f01) + [#7552](https://github.com/npm/npm/issues/7552) `bundledDependencies` are now + properly included in the installation context. This is another fantastically + hard-to-summarize bug, and once again, I encourage you to [read the commit + message](https://github.com/npm/npm/commit/051c4738486a826300f205b71590781ce7744f01) + if you're curious about the details. The snappy takeaway is that this + unbreaks many use cases for `ember-cli`. ([@othiym23](https://github.com/othiym23)) + +#### LESS DRAMATIC CHANGES + +* [`fcd9247`](https://github.com/npm/npm/commit/fcd92476f3a9092f6f8c83a19a24fe63b206edcd) + [#7597](https://github.com/npm/npm/issues/7597) Awk varies pretty + dramatically from platform to platform, so use Perl to generate the AUTHORS + list instead. ([@KenanY](https://github.com/KenanY)) +* [`721b17a`](https://github.com/npm/npm/commit/721b17a31690bec074eb8763d823d6de63406005) + [#7598](https://github.com/npm/npm/issues/7598) `npm install --save` really + isn't experimental anymore. ([@RichardLitt](https://github.com/RichardLitt)) + +#### DEPENDENCY REFRESH + +* [`a91f2c7`](https://github.com/npm/npm/commit/a91f2c7c9a5183d9cde7aae040ebd9ccdf104be7) + [#7559](https://github.com/npm/npm/issues/7559) `node-gyp@1.0.3` Switch + `node-gyp` to use `stdio` instead of `customFds` so it stops printing a + deprecation warning every time you build a native dependency. + ([@jeffbski](https://github.com/jeffbski)) +* [`0c85db7`](https://github.com/npm/npm/commit/0c85db7f0dde41762411e40a029153e6a65ef483) + `rimraf@2.3.2`: Globbing now deals with paths containing valid glob + metacharacters better. ([@isaacs](https://github.com/isaacs)) +* [`d14588e`](https://github.com/npm/npm/commit/d14588ed09b032c4c770e34b4c0f2436f5fccf6e) + `minimatch@2.0.4`: Bug fixes. ([@isaacs](https://github.com/isaacs)) +* [`aa9952e`](https://github.com/npm/npm/commit/aa9952e8270a6c1b7f97e579875dd6e3aa22abfd) + `graceful-fs@3.0.6`: Bug fixes. ([@isaacs](https://github.com/isaacs)) + +### v2.7.1 (2015-03-05): + +#### GITSANITY + +* [`6823807`](https://github.com/npm/npm/commit/6823807bba6c00228a724e1205ae90d67df0adad) + [#7121](https://github.com/npm/npm/issues/7121) `npm install --save` for Git + dependencies saves the URL passed in, instead of the temporary directory used + to clone the remote repo. Fixes using Git dependencies when shrinkwrapping. + In the process, rewrote the Git dependency caching code. Again. No more + single-letter variable names, and a much clearer workflow. + ([@othiym23](https://github.com/othiym23)) +* [`c8258f3`](https://github.com/npm/npm/commit/c8258f31365b045e5fcf15b865a363abbc3be616) + [#7486](https://github.com/npm/npm/issues/7486) When installing Git remotes, + the caching code was passing in the function `gitEnv` instead of the results + of invoking it. ([@functino](https://github.com/functino)) +* [`c618eed`](https://github.com/npm/npm/commit/c618eeda3e321fd454d77c476b53a0330f2344cc) + [#2556](https://github.com/npm/npm/issues/2556) Make it possible to install + Git dependencies when using `--link` by not linking just the Git + dependencies. ([@smikes](https://github.com/smikes)) + +#### WHY DID THIS TAKE SO LONG. + +* [`abdd040`](https://github.com/npm/npm/commit/abdd040da90932535472f593d5433a67ee074801) + `read-package-json@1.3.2`: Provide more helpful error messages when JSON + parse errors are encountered by using a more forgiving JSON parser than + JSON.parse. ([@smikes](https://github.com/smikes)) + +#### BUGS & TWEAKS + +* [`c56cfcd`](https://github.com/npm/npm/commit/c56cfcd79cd8ab4ccd06d2c03d7e04030d576683) + [#7525](https://github.com/npm/npm/issues/7525) `npm dedupe` handles scoped + packages. ([@KidkArolis](https://github.com/KidkArolis)) +* [`1b8ba74`](https://github.com/npm/npm/commit/1b8ba7426393cbae2c76ad2c35953782d4401871) + [#7531](https://github.com/npm/npm/issues/7531) `npm stars` and `npm whoami` + will no longer send the registry the error text saying you need to log in as + your username. ([@othiym23](https://github.com/othiym23)) +* [`6de1e91`](https://github.com/npm/npm/commit/6de1e91116a5105dfa75126532b9083d8672e034) + [#6441](https://github.com/npm/npm/issues/6441) Prevent needless reinstalls + by only updating packages when the current version isn't the same as the + version returned as `wanted` by `npm outdated`. + ([@othiym23](https://github.com/othiym23)) +* [`2abc3ee`](https://github.com/npm/npm/commit/2abc3ee08f0cabc4e7bfd7b973c0b59dc44715ff) + Add `npm upgrade` as an alias for `npm update`. + ([@othiym23](https://github.com/othiym23)) +* [`bcd4722`](https://github.com/npm/npm/commit/bcd47224e18884191a5d0057c2b2fff83ac8206e) + [#7508](https://github.com/npm/npm/issues/7508) FreeBSD uses `EAI_FAIL` + instead of `ENOTFOUND`. ([@othiym23](https://github.com/othiym23)) +* [`21c1ac4`](https://github.com/npm/npm/commit/21c1ac41280f0716a208cde14025a2ad5ef61fed) + [#7507](https://github.com/npm/npm/issues/7507) Update support URL in generic + error handler to `https:` from `http:`. + ([@watilde](https://github.com/watilde)) +* [`b6bd99a`](https://github.com/npm/npm/commit/b6bd99a73f575545fbbaef95c12237c47dd32561) + [#7492](https://github.com/npm/npm/issues/7492) On install, the + `package.json` `engineStrict` deprecation only warns for the current package. + ([@othiym23](https://github.com/othiym23)) +* [`4ef1412`](https://github.com/npm/npm/commit/4ef1412d0061239da2b1c4460ed6db37cc9ded27) + [#7075](https://github.com/npm/npm/issues/7075) If you try to tag a release + as a valid semver range, `npm publish` and `npm tag` will error early instead + of proceeding. ([@smikes](https://github.com/smikes)) +* [`ad53d0f`](https://github.com/npm/npm/commit/ad53d0f666125d9f50d661b54901c6e5bab4d603) + Use `rimraf` in npm build script because Windows doesn't know what rm is. + ([@othiym23](https://github.com/othiym23)) +* [`8885c4d`](https://github.com/npm/npm/commit/8885c4dfb618f2838930b5c5149abea300a762d6) + `rimraf@2.3.1`: Better Windows support. + ([@isaacs](https://github.com/isaacs)) +* [`8885c4d`](https://github.com/npm/npm/commit/8885c4dfb618f2838930b5c5149abea300a762d6) + `glob@4.4.2`: Handle bad symlinks properly. + ([@isaacs](https://github.com/isaacs)) + +###E TYPSO & CLARFIICATIONS + +dId yuo know that submiting fxies for doc tpyos is an exclelent way to get +strated contriburting to a new open-saurce porject? + +* [`42c605c`](https://github.com/npm/npm/commit/42c605c7b401f603c32ea70427e1a7666adeafd9) + Fix typo in `CHANGELOG.md` ([@adrianblynch](https://github.com/adrianblynch)) +* [`c9bd58d`](https://github.com/npm/npm/commit/c9bd58dd637b9c41441023584a13e3818d5db336) + Add note about `node_modules/.bin` being added to the path in `npm + run-script`. ([@quarterto](https://github.com/quarterto)) +* [`903bdd1`](https://github.com/npm/npm/commit/903bdd105b205d6e45d3a2ab83eea8e4071e9aeb) + Matt Ranney confused the world when he renamed `node-redis` to `redis`. "The + world" includes npm's documentation. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`dea9bb2`](https://github.com/npm/npm/commit/dea9bb2319183fe54bf4d173d8533d46d2c6611c) + Fix typo in contributor link. ([@watilde](https://github.com/watilde)) +* [`1226ca9`](https://github.com/npm/npm/commit/1226ca98d4d7650cc3ba16bf7ac62e44820f3bfa) + Properly close code block in npm-install.md. + ([@olizilla](https://github.com/olizilla)) + +### v2.7.0 (2015-02-26): + +#### SOMETIMES SEMVER MEANS "SUBJECTIVE-EMPATHETIC VERSIONING" + +For a very long time (maybe forever?), the documentation for `npm run-script` +has said that `npm restart` will only call `npm stop` and `npm start` when +there is no command defined as `npm restart` in `package.json`. The problem +with this documentation is that `npm run-script` was apparently never wired up +to actually work this way. + +Until now. + +If the patch below were landed on its own, free of context, it would be a +breaking change. But, since the "new" behavior is how the documentation claims +this feature has always worked, I'm classifying it as a patch-level bug fix. I +apologize in advance if this breaks anybody's deployment scripts, and if it +turns out to be a significant regression in practice, we can revert this change +and move it to `npm@3`, which is allowed to make breaking changes due to being +a new major version of semver. + +* [`2f6a1df`](https://github.com/npm/npm/commit/2f6a1df3e1e3e0a3bc4abb69e40f59a64204e7aa) + [#1999](https://github.com/npm/npm/issues/1999) Only run `stop` and `start` + scripts (plus their pre- and post- scripts) when there's no `restart` script + defined. This makes it easier to support graceful restarts of services + managed by npm. ([@watilde](https://github.com/watilde) / + [@scien](https://github.com/scien)) + +#### A SMALL FEATURE WITH BIG IMPLICATIONS + +* [`145af65`](https://github.com/npm/npm/commit/145af6587f45de135cc876be2027ed818ed4ca6a) + [#4887](https://github.com/npm/npm/issues/4887) Replace calls to the + `node-gyp` script bundled with npm by passing the + `--node-gyp=/path/to/node-gyp` option to npm. Swap in `pangyp` or a version + of `node-gyp` modified to work better with io.js without having to touch + npm's code! ([@ackalker](https://github.com/ackalker)) + +#### [@WATILDE'S](https://github.com/watilde) NPM USABILITY CORNER + +Following `npm@2.6.1`'s unexpected fix of many of the issues with `npm update +-g` simply by making `--depth=0` the default for `npm outdated`, friend of npm +[@watilde](https://github.com/watilde) has made several modest changes to npm's +behavior that together justify bumping npm's minor version, as well as making +npm significantly more pleasant to use: + +* [`448efd0`](https://github.com/npm/npm/commit/448efd0eaa6f97af0889bf47efc543a1ea2f8d7e) + [#2853](https://github.com/npm/npm/issues/2853) Add support for `--dev` and + `--prod` to `npm ls`, so that you can list only the trees of production or + development dependencies, as desired. + ([@watilde](https://github.com/watilde)) +* [`a0a8777`](https://github.com/npm/npm/commit/a0a87777af8bee180e4e9321699f050c29ed5ac4) + [#7463](https://github.com/npm/npm/issues/7463) Split the list printed by + `npm run-script` into lifecycle scripts and scripts directly invoked via `npm + run-script`. ([@watilde](https://github.com/watilde)) +* [`a5edc17`](https://github.com/npm/npm/commit/a5edc17d5ef1435b468a445156a4a109df80f92b) + [#6749](https://github.com/npm/npm/issues/6749) `init-package-json@1.3.1`: + Support for passing scopes to `npm init` so packages are initialized as part + of that scope / organization / team. ([@watilde](https://github.com/watilde)) + +#### SMALLER FEATURES AND FIXES + +It turns out that quite a few pull requests had piled up on npm's issue +tracker, and they included some nice small features and fixes: + +* [`f33e8b8`](https://github.com/npm/npm/commit/f33e8b8ff2de094071c5976be95e35110cf2ab1a) + [#7354](https://github.com/npm/npm/issues/7354) Add `--if-present` flag to + allow e.g. CI systems to call (semi-) standard build tasks defined in + `package.json`, but don't raise an error if no such script is defined. + ([@jussi-kalliokoski](https://github.com/jussi-kalliokoski)) +* [`7bf85cc`](https://github.com/npm/npm/commit/7bf85cc372ab5698593b01e139c383fa62c92516) + [#4005](https://github.com/npm/npm/issues/4005) + [#6248](https://github.com/npm/npm/issues/6248) Globally unlink a package + when `npm rm` / `npm unlink` is called with no arguments. + ([@isaacs](https://github.com/isaacs)) +* [`a2e04bd`](https://github.com/npm/npm/commit/a2e04bd921feab8f9e40a27e180ca9308eb709d7) + [#7294](https://github.com/npm/npm/issues/7294) Ensure that when depending on + `git+<proto>` URLs, npm doesn't keep tacking additional `git+` prefixes onto + the front. ([@twhid](https://github.com/twhid)) +* [`0f87f5e`](https://github.com/npm/npm/commit/0f87f5ed28960d962f34977953561d22983da4f9) + [#6422](https://github.com/npm/npm/issues/6422) When depending on GitHub + private repositories, make sure we construct the Git URLS correctly. + ([@othiym23](https://github.com/othiym23)) +* [`50f461d`](https://github.com/npm/npm/commit/50f461d248c4d22e881a9535dccc1d57d994dbc7) + [#4595](https://github.com/npm/npm/issues/4595) Support finding compressed + manpages. It's still up to the system to figure out how to display them, + though. ([@pshevtsov](https://github.com/pshevtsov)) +* [`44da664`](https://github.com/npm/npm/commit/44da66456b530c049ff50953f78368460df87461) + [#7465](https://github.com/npm/npm/issues/7465) When calling git, log the + **full** command, with all arguments, on error. + ([@thriqon](https://github.com/thriqon)) +* [`9748d5c`](https://github.com/npm/npm/commit/9748d5cd195d0269b32caf45129a93d29359a796) + Add parent to error on `ETARGET` error. + ([@davglass](https://github.com/davglass)) +* [`37038d7`](https://github.com/npm/npm/commit/37038d7db47a986001f77ac17b3e164000fc8ff3) + [#4663](https://github.com/npm/npm/issues/4663) Remove hackaround for Linux + tests, as it's evidently no longer necessary. + ([@mmalecki](https://github.com/mmalecki)) +* [`d7b7853`](https://github.com/npm/npm/commit/d7b785393dffce93bb70317fbc039a6428ca37c5) + [#2612](https://github.com/npm/npm/issues/2612) Add support for path + completion on `npm install`, which narrows completion to only directories + containing `package.json` files. ([@deestan](https://github.com/deestan)) +* [`628fcdb`](https://github.com/npm/npm/commit/628fcdb0be4e14c0312085a50dc2ae01dc713fa6) + Remove all command completion calls to `-/short`, because it's been removed + from the primary registry for quite some time, and is generally a poor idea + on any registry with more than a few hundred packages. + ([@othiym23](https://github.com/othiym23)) +* [`3f6061d`](https://github.com/npm/npm/commit/3f6061d75650441ee690472d1fa9c8dd7a7b1b28) + [#6659](https://github.com/npm/npm/issues/6659) Instead of removing zsh + completion global, make it a local instead. + ([@othiym23](https://github.com/othiym23)) + +#### DOCUMENTATION TWEAKS + +* [`5bc70e6`](https://github.com/npm/npm/commit/5bc70e6cfb3598da433806c6f447fc94c8e1d35d) + [#7417](https://github.com/npm/npm/issues/7417) Provide concrete examples of + how the new `npm update` defaults work in practice, tied to actual test + cases. Everyone interested in using `npm update -g` now that it's been fixed + should read these documents, as should anyone interested in writing + documentation for npm. ([@smikes](https://github.com/smikes)) +* [`8ac6f21`](https://github.com/npm/npm/commit/8ac6f2123a6af13dc9447fad96ec9cb583c45a71) + [#6543](https://github.com/npm/npm/issues/6543) Clarify `npm-scripts` + warnings to de-emphasize dangers of using `install` scripts. + ([@zeke](https://github.com/zeke)) +* [`ebe3b37`](https://github.com/npm/npm/commit/ebe3b37098efdada41dcc4c52a291e29296ea242) + [#6711](https://github.com/npm/npm/issues/6711) Note that git tagging of + versions can be disabled via `--no-git-tag-verson`. + ([@smikes](https://github.com/smikes)) +* [`2ef5771`](https://github.com/npm/npm/commit/2ef5771632006e6cee8cf17f836c0f98ab494bd1) + [#6711](https://github.com/npm/npm/issues/6711) Document `git-tag-version` + configuration option. ([@KenanY](https://github.com/KenanY)) +* [`95e59b2`](https://github.com/npm/npm/commit/95e59b287c9517780318e145371a859e8ebb2d20) + Document that `NODE_ENV=production` behaves analogously to `--production` on + `npm install`. ([@stefaneg](https://github.com/stefaneg)) +* [`687117a`](https://github.com/npm/npm/commit/687117a5bcd6a838cd1532ea7020ec6fcf0c33c0) + [#7463](https://github.com/npm/npm/issues/7463) Document the new script + grouping behavior in the man page for `npm run-script`. + ([@othiym23](https://github.com/othiym23)) +* [`536b2b6`](https://github.com/npm/npm/commit/536b2b6f55c349247b3e79b5d11b4c033ef5a3df) + Rescue one of the the disabled tests and make it work properly. + ([@smikes](https://github.com/smikes)) + +#### DEPENDENCY UPDATES + +* [`89fc6a4`](https://github.com/npm/npm/commit/89fc6a4e7ff8c524675fcc14493ca0a1e3a76d38) + `which@1.0.9`: Test for being run as root, as well as the current user. + ([@isaacs](https://github.com/isaacs)) +* [`5d0612f`](https://github.com/npm/npm/commit/5d0612f31e226cba32a05351c47b055c0ab6c557) + `glob@4.4.1`: Better error message to explain why calling sync glob with a + callback results in an error. ([@isaacs](https://github.com/isaacs)) +* [`64b07f6`](https://github.com/npm/npm/commit/64b07f6caf6cb07e4102f1e4e5f2ff2b944e452e) + `tap@0.7.1`: More accurate counts of pending & skipped tests. + ([@rmg](https://github.com/rmg)) +* [`8fda451`](https://github.com/npm/npm/commit/8fda45195dae1d6f792be556abe87f7763fab09b) + `semver@4.3.1`: Make official the fact that `node-semver` has moved from + [@isaacs](https://github.com/isaacs)'s organization to + [@npm](https://github.com/npm)'s. ([@isaacs](https://github.com/isaacs)) + +### v2.6.1 (2015-02-19): + +* [`8b98f0e`](https://github.com/npm/npm/commit/8b98f0e709d77a8616c944aebd48ab726f726f76) + [#4471](https://github.com/npm/npm/issues/4471) `npm outdated` (and only `npm + outdated`) now defaults to `--depth=0`. See the [docs for + `--depth`](https://github.com/npm/npm/blob/82f484672adb1a3caf526a8a48832789495bb43d/doc/misc/npm-config.md#depth) + for the mildly confusing details. ([@smikes](https://github.com/smikes)) +* [`aa79194`](https://github.com/npm/npm/commit/aa791942a9f3c8af6a650edec72a675deb7a7c6e) + [#6565](https://github.com/npm/npm/issues/6565) Tweak `peerDependency` + deprecation warning to include which peer dependency on which package is + going to need to change. ([@othiym23](https://github.com/othiym23)) +* [`5fa067f`](https://github.com/npm/npm/commit/5fa067fd47682ac3cdb12a2b009d8ca59b05f992) + [#7171](https://github.com/npm/npm/issues/7171) Tweak `engineStrict` + deprecation warning to include which `package.json` is using it. + ([@othiym23](https://github.com/othiym23)) +* [`0fe0caa`](https://github.com/npm/npm/commit/0fe0caa7eddb7acdacbe5ee81ceabaca27175c78) + `glob@4.4.0`: Glob patterns can now ignore matches. + ([@isaacs](https://github.com/isaacs)) + +### v2.6.0 (2015-02-12): + +#### A LONG-AWAITED GUEST + +* [`38c4825`](https://github.com/npm/npm/commit/38c48254d3d217b4babf5027cb39492be4052fc2) + [#5068](https://github.com/npm/npm/issues/5068) Add new logout command, and + make it do something useful on both bearer-based and basic-based authed + clients. ([@othiym23](https://github.com/othiym23)) +* [`4bf0f5d`](https://github.com/npm/npm/commit/4bf0f5d56c33649124b486e016ba4a620c105c1c) + `npm-registry-client@6.1.1`: Support new `logout` endpoint to invalidate + token for sessions. ([@othiym23](https://github.com/othiym23)) + +#### DEPRECATIONS + +* [`c8e08e6`](https://github.com/npm/npm/commit/c8e08e6d91f4016c80f572aac5a2080df0f78098) + [#6565](https://github.com/npm/npm/issues/6565) Warn that `peerDependency` + behavior is changing and add a note to the docs. + ([@othiym23](https://github.com/othiym23)) +* [`7c81a5f`](https://github.com/npm/npm/commit/7c81a5f5f058941f635a92f22641ea68e79b60db) + [#7171](https://github.com/npm/npm/issues/7171) Warn that `engineStrict` in + `package.json` will be going away in the next major version of npm (coming + soon!) ([@othiym23](https://github.com/othiym23)) + +#### BUG FIXES & TWEAKS + +* [`add5890`](https://github.com/npm/npm/commit/add5890ce447dabf120b907a85f715df1e065f44) + [#4668](https://github.com/npm/npm/issues/4668) `read-package-json@1.3.1`: + Warn when a `bin` symbolic link is a dangling reference. + ([@nicks](https://github.com/nicks)) +* [`4b42071`](https://github.com/npm/npm/commit/4b420714dfb84338d85def78c30bd665e32d72c1) + `semver@4.3.0`: Add functions to extract parts of the version triple, fix a + typo. ([@isaacs](https://github.com/isaacs)) +* [`a9aff38`](https://github.com/npm/npm/commit/a9aff38719918486fc381d67ad3371c475632ff7) + Use full path for man pages as the symbolic link source, instead of just the + file name. ([@bengl](https://github.com/bengl)) +* [`6fd0fbd`](https://github.com/npm/npm/commit/6fd0fbd8a0347fd47cb7ee0064e0902a2f8a087c) + [#7233](https://github.com/npm/npm/issues/7233) Ensure `globalconfig` path + exists before trying to edit it. ([@ljharb](https://github.com/ljharb)) +* [`a0a2620`](https://github.com/npm/npm/commit/a0a262047647d9e2690cebe5a89e6a0dd33202bb) + `ini@1.3.3`: Allow embedded, quoted equals signs in ini field names. + ([@isaacs](https://github.com/isaacs)) + +Also typos and other documentation issues were addressed by +[@rutsky](https://github.com/rutsky), [@imurchie](https://github.com/imurchie), +[@marcin-wosinek](https://github.com/marcin-wosinek), +[@marr](https://github.com/marr), [@amZotti](https://github.com/amZotti), and +[@karlhorky](https://github.com/karlhorky). Thank you, everyone! + +### v2.5.1 (2015-02-06): + +This release doesn't look like much, but considerable effort went into ensuring +that npm's tests will pass on io.js 1.1.0 and Node 0.11.16 / 0.12.0 on both OS +X and Linux. + +**NOTE:** there are no actual changes to npm's code in `npm@2.5.1`. Only test +code (and the upgrade of `request` to the latest version) has changed. + +#### `npm-registry-mock@1.0.0`: + +* [`0e8d473`](https://github.com/npm/npm/commit/0e8d4736a1cbdda41ae8eba8a02c7ff7ce80c2ff) + [#7281](https://github.com/npm/npm/issues/7281) `npm-registry-mock@1.0.0`: + Clean up API, set `connection: close`. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`4707bba`](https://github.com/npm/npm/commit/4707bba7d44dfab85cc45c2ecafa9c1601ba2e9a) + Further update tests to work with `npm-registry-mock@1.0.0`. + ([@othiym23](https://github.com/othiym23)) +* [`41a0f89`](https://github.com/npm/npm/commit/41a0f8959d4e02af9661588afa7d2b4543cc21b6) + Got rid of completely gratuitous global config manipulation in tests. + ([@othiym23](https://github.com/othiym23)) + +#### MINOR DEPENDENCY TWEAK + +* [`a4c7af9`](https://github.com/npm/npm/commit/a4c7af9c692f250c0fd017397ed9514fc263b752) + `request@2.53.0`: Tweaks to tunneling proxy behavior. + ([@nylen](https://github.com/nylen)) + +### v2.5.0 (2015-01-29): + +#### SMALL FEATURE I HAVE ALREADY USED TO MAINTAIN NPM ITSELF + +* [`9d61e96`](https://github.com/npm/npm/commit/9d61e96fb1f48687a85c211e4e0cd44c7f95a38e) + `npm outdated --long` now includes a column showing the type of dependency. + ([@watilde](https://github.com/watilde)) + +#### BUG FIXES & TWEAKS + +* [`fec4c96`](https://github.com/npm/npm/commit/fec4c967ee235030bf31393e8605e9e2811f4a39) + Allow `--no-proxy` to override `HTTP_PROXY` setting in environment. + ([@othiym23](https://github.com/othiym23)) +* [`589acb9`](https://github.com/npm/npm/commit/589acb9714f395c2ad0d98cb0ac4236f1842d2cc) + Only set `access` when publshing when it's explicitly set. + ([@othiym23](https://github.com/othiym23)) +* [`1027087`](https://github.com/npm/npm/commit/102708704c8c4f0ea99775d38f8d1efecf584940) + Add script and `Makefile` stanza to update AUTHORS. + ([@KenanY](https://github.com/KenanY)) +* [`eeff04d`](https://github.com/npm/npm/commit/eeff04da7979a0181becd36b8777d607e7aa1787) + Add `NPMOPTS` to top-level install in `Makefile` to override `userconfig`. + ([@aredridel](https://github.com/aredridel)) +* [`0d17328`](https://github.com/npm/npm/commit/0d173287336650606d4c91818bb7bcfb0c5d57a1) + `fstream@1.0.4`: Run chown only when necessary. + ([@silkentrance](https://github.com/silkentrance)) +* [`9aa4622`](https://github.com/npm/npm/commit/9aa46226ee63b9e183fd49fc72d9bdb0fae9605e) + `columnify@1.4.1`: ES6ified! ([@timoxley](https://github.com/timoxley)) +* [`51b2fd1`](https://github.com/npm/npm/commit/51b2fd1974e38b825ac5ca4a852ab3c4142624cc) + Update default version in `docs/npm-config.md`. + ([@lucthev](https://github.com/lucthev)) + +#### `npm-registry-client@6.0.7`: + +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + [#7226](https://github.com/npm/npm/issues/7226) Ensure that all request + settings are copied onto the agent. + ([@othiym23](https://github.com/othiym23)) +* [`e186f6e`](https://github.com/npm/npm/commit/e186f6e7cfeb4db9c94d7375638f0b2f0d472947) + Only set `access` on publish when it differs from the norm. + ([@othiym23](https://github.com/othiym23)) +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + Allow overriding request's environment-based proxy handling. + ([@othiym23](https://github.com/othiym23)) +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + Properly handle retry failures on fetch. + ([@othiym23](https://github.com/othiym23)) + +### v2.4.1 (2015-01-23): + +![bridge that doesn't meet in the middle](http://www.static-18.themodernnomad.com/wp-content/uploads/2011/08/bridge-fail.jpg) + +Let's accentuate the positive: the `dist-tag` endpoints for `npm dist-tag +{add,rm,ls}` are now live on the public npm registry. + +* [`f70272b`](https://github.com/npm/npm/commit/f70272bed7d77032d1e21553371dd5662fef32f2) + `npm-registry-client@6.0.3`: Properly escape JSON tag version strings and + filter `_etag` from CouchDB docs. ([@othiym23](https://github.com/othiym23)) + +### v2.4.0 (2015-01-22): + +#### REGISTRY 2: ACCESS AND DIST-TAGS + +NOTE: This week's registry-2 commands are leading the implementation on +registry.npmjs.org a little bit, so some of the following may not work for +another week or so. Also note that `npm access` has documentation and +subcommands that are not yet finished, because they depend on incompletely +specified registry API endpoints. Things are coming together very quickly, +though, so expect the missing pieces to be filled in the coming weeks. + +* [`c963eb2`](https://github.com/npm/npm/commit/c963eb295cf766921b1680f4a71fd0ed3e1bcad8) + [#7181](https://github.com/npm/npm/issues/7181) NEW `npm access public` and + `npm access restricted`: Toggle visibility of scoped packages. + ([@othiym23](https://github.com/othiym23)) +* [`dc51810`](https://github.com/npm/npm/commit/dc51810e08c0f104259146c9c035d255de4f7d1d) + [#6243](https://github.com/npm/npm/issues/6243) / + [#6854](https://github.com/npm/npm/issues/6854) NEW `npm dist-tags`: Directly + manage `dist-tags` on packages. Most notably, `dist-tags` can now be deleted. + ([@othiym23](https://github.com/othiym23)) +* [`4c7c132`](https://github.com/npm/npm/commit/4c7c132a6b8305dca2974943226c39c0cdc64ff9) + [#7181](https://github.com/npm/npm/issues/7181) / + [#6854](https://github.com/npm/npm/issues/6854) `npm-registry-client@6.0.1`: + Add new `access` and `dist-tags` endpoints + ([@othiym23](https://github.com/othiym23)) + +#### NOT EXACTLY SELF-DEPRECATING + +* [`10d5c77`](https://github.com/npm/npm/commit/10d5c77653487f15759ac7de262a97e9c655240c) + [#6274](https://github.com/npm/npm/issues/6274) Deprecate `npm tag` in favor + of `npm dist-tag`. ([@othiym23](https://github.com/othiym23)) + +#### BUG FIX AND TINY FEATURE + +* [`29a6ef3`](https://github.com/npm/npm/commit/29a6ef38ef86ac318c5d9ea4bee28ce614672fa6) + [#6850](https://github.com/npm/npm/issues/6850) Be smarter about determining + base of file deletion when unbuilding. ([@phated](https://github.com/phated)) +* [`4ad01ea`](https://github.com/npm/npm/commit/4ad01ea2930a7a1cf88be121cc5ce9eba40c6807) + `init-package-json@1.2.0`: Support `--save-exact` in `npm init`. + ([@gustavnikolaj](https://github.com/gustavnikolaj)) + +### v2.3.0 (2015-01-15): + +#### REGISTRY 2: OH MY STARS! WHO AM I? + +* [`e662a60`](https://github.com/npm/npm/commit/e662a60e2f9a542effd8e72279d4622fe514415e) + The new `whoami` endpoint might not return a value. + ([@othiym23](https://github.com/othiym23)) +* [`c2cccd4`](https://github.com/npm/npm/commit/c2cccd4bbc65885239ed646eb510155f7b8af13d) + `npm-registry-client@5.0.0`: Includes the following fine changes + ([@othiym23](https://github.com/othiym23)): + * [`ba6b73e`](https://github.com/npm/npm-registry-client/commit/ba6b73e351027246c228622014e4441412409bad) + [#92](https://github.com/npm/npm-registry-client/issues/92) BREAKING CHANGE: + Move `/whoami` endpoint out of the package namespace (to `/-/whoami`). + ([@othiym23](https://github.com/othiym23)) + * [`3b174b7`](https://github.com/npm/npm-registry-client/commit/3b174b75c0c9ea77e298e6bb664fb499824ecc7c) + [#93](https://github.com/npm/npm-registry-client/issues/93) Registries based + on token-based auth can now offer starring. + ([@bcoe](https://github.com/bcoe)) + * [`4701a29`](https://github.com/npm/npm-registry-client/commit/4701a29bcda41bc14aa91f361dd0d576e24677d7) + Fix HTTP[S] connection keep-alive on Node 0.11 / io.js 1.0. + ([@fengmk2](https://github.com/fengmk2)) + +#### BETTER REGISTRY METADATA CACHING + +* [`98e1e10`](https://github.com/npm/npm/commit/98e1e1080df1f2cab16ed68035603950ea3d2d48) + [#6791](https://github.com/npm/npm/issues/6791) Add caching based on + Last-Modified / If-Modified-Since headers. Includes this + `npm-registry-client@5.0.0` change ([@lxe](https://github.com/lxe)): + * [`07bc335`](https://github.com/npm/npm-registry-client/commit/07bc33502b93554cd7539bfcce37d6e2d5404cd0) + [#86](https://github.com/npm/npm-registry-client/issues/86) Add Last-Modified + / If-Modified-Since cache header handling. ([@lxe](https://github.com/lxe)) + +#### HOW MUCH IS THAT WINDOWS IN THE DOGGY? + +* [`706d49a`](https://github.com/npm/npm/commit/706d49ab45521360fce1a68779b8de899015d8c2) + [#7107](https://github.com/npm/npm/issues/7107) `getCacheStat` passes a stub + stat on Windows. ([@rmg](https://github.com/rmg)) +* [`5fce278`](https://github.com/npm/npm/commit/5fce278a688a1cb79183e012bde40b089c2e97a4) + [#5267](https://github.com/npm/npm/issues/5267) Use `%COMSPEC%` when set on + Windows. ([@edmorley](https://github.com/edmorley)) +* [`cc2e099`](https://github.com/npm/npm/commit/cc2e09912ce2f91567c485422e4e797c4deb9842) + [#7083](https://github.com/npm/npm/issues/7083) Ensure Git cache prefix + exists before repo clone on Windows. + ([@othiym23](https://github.com/othiym23)) + +#### THRILLING BUG FIXES + +* [`c6fb430`](https://github.com/npm/npm/commit/c6fb430e55672b3caf87d25cbd2aeeebc449e2f2) + [#4197](https://github.com/npm/npm/issues/4197) Report `umask` as a 0-padded + octal literal. ([@smikes](https://github.com/smikes)) +* [`209713e`](https://github.com/npm/npm/commit/209713ebd4b77da11ce27d90c3346f78d760ba52) + [#4197](https://github.com/npm/npm/issues/4197) `umask@1.1.0`: Properly + handle `umask`s (i.e. not decimal numbers). + ([@smikes](https://github.com/smikes)) +* [`9eac0a1`](https://github.com/npm/npm/commit/9eac0a14488c5979ebde4c17881c8cd74f395069) + Make the example for bin links non-destructive. + ([@KevinSheedy](https://github.com/KevinSheedy)) +* [`6338bcf`](https://github.com/npm/npm/commit/6338bcfcd9cd1b0cc48b051dae764dc436ab5332) + `glob@4.3.5`: " -> ', for some reason. ([@isaacs](https://github.com/isaacs)) + +### v2.2.0 (2015-01-08): + +* [`88c531d`](https://github.com/npm/npm/commit/88c531d1c0b3aced8f2a09632db01b5635e7226a) + [#7056](https://github.com/npm/npm/issues/7056) version doesn't need a + package.json. ([@othiym23](https://github.com/othiym23)) +* [`2656c19`](https://github.com/npm/npm/commit/2656c19f6b915c3173acc3b6f184cc321563da5f) + [#7095](https://github.com/npm/npm/issues/7095) Link to npm website instead + of registry. ([@konklone](https://github.com/konklone)) +* [`c76b801`](https://github.com/npm/npm/commit/c76b8013bf1758587565822626171b76cb465c9e) + [#7067](https://github.com/npm/npm/issues/7067) Obfuscate secrets, including + nerfed URLs. ([@smikes](https://github.com/smikes)) +* [`17f66ce`](https://github.com/npm/npm/commit/17f66ceb1bd421084e4ae82a6b66634a6e272929) + [#6849](https://github.com/npm/npm/issues/6849) Explain the tag workflow more + clearly. ([@smikes](https://github.com/smikes)) +* [`e309df6`](https://github.com/npm/npm/commit/e309df642de33d10d6dffadaa8a5d214a924d0dc) + [#7096](https://github.com/npm/npm/issues/7096) Really, `npm update -g` is + almost always a terrible idea. ([@smikes](https://github.com/smikes)) +* [`acf287d`](https://github.com/npm/npm/commit/acf287d2547c8a0a8871652c164019261b666d55) + [#6999](https://github.com/npm/npm/issues/6999) `npm run-script env`: add a + new default script that will print out environment values. + ([@gcb](https://github.com/gcb)) +* [`560c009`](https://github.com/npm/npm/commit/560c00945d4dec926cd29193e336f137c7f3f951) + [#6745](https://github.com/npm/npm/issues/6745) Document `npm update --dev`. + ([@smikes](https://github.com/smikes)) +* [`226a677`](https://github.com/npm/npm/commit/226a6776a1a9e28570485623b8adc2ec4b041335) + [#7046](https://github.com/npm/npm/issues/7046) We have never been the Node + package manager. ([@linclark](https://github.com/linclark)) +* [`38eef22`](https://github.com/npm/npm/commit/38eef2248f03bb8ab04cae1833e2a228fb887f3c) + `npm-install-checks@1.0.5`: Compatibility with npmlog@^1. + ([@iarna](https://github.com/iarna)) + +### v2.1.18 (2015-01-01): + +* [`bf8640b`](https://github.com/npm/npm/commit/bf8640b0395b5dff71260a0cede7efc699a7bcf5) + [#7044](https://github.com/npm/npm/issues/7044) Document `.npmignore` syntax. + ([@zeke](https://github.com/zeke)) + +### v2.1.17 (2014-12-25): + +merry npm xmas + +Working with [@phated](https://github.com/phated), I discovered that npm still +had some lingering race conditions around how it handles Git dependencies. The +following changes were intended to remedy to these issues. Thanks to +[@phated](https://github.com/phated) for all his help getting to the bottom of +these. + +* [`bdf1c84`](https://github.com/npm/npm/commit/bdf1c8483f5c4ad79b712db12d73276e15883923) + [#7006](https://github.com/npm/npm/issues/7006) Only `chown` template and + top-level Git cache directories. ([@othiym23](https://github.com/othiym23)) +* [`581a72d`](https://github.com/npm/npm/commit/581a72da18f35ec87edef6255adf4ef4714a478c) + [#7006](https://github.com/npm/npm/issues/7006) Map Git remote inflighting to + clone paths rather than Git URLs. ([@othiym23](https://github.com/othiym23)) +* [`1c48d08`](https://github.com/npm/npm/commit/1c48d08dea31a11ac11a285cac598a482481cade) + [#7009](https://github.com/npm/npm/issues/7009) `normalize-git-url@1.0.0`: + Normalize Git URLs while caching. ([@othiym23](https://github.com/othiym23)) +* [`5423cf0`](https://github.com/npm/npm/commit/5423cf0be8ff2b76bfff7c8e780e5f261235a86a) + [#7009](https://github.com/npm/npm/issues/7009) Pack tarballs to their final + locations atomically. ([@othiym23](https://github.com/othiym23)) +* [`7f6557f`](https://github.com/npm/npm/commit/7f6557ff317469ee4a87c542ff9a991e74ce9f38) + [#7009](https://github.com/npm/npm/issues/7009) Inflight local directory + packing, just to be safe. ([@othiym23](https://github.com/othiym23)) + +Other changes: + +* [`1c491e6`](https://github.com/npm/npm/commit/1c491e65d70af013e8d5ac008d6d9762d6d91793) + [#6991](https://github.com/npm/npm/issues/6991) `npm version`: fix regression + in dirty-checking behavior ([@rlidwka](https://github.com/rlidwka)) +* [`55ceb2b`](https://github.com/npm/npm/commit/55ceb2b08ff8a0f56b94cc972ca15d7862e8733c) + [#1991](https://github.com/npm/npm/issues/1991) modify docs to reflect actual + `npm restart` behavior ([@smikes](https://github.com/smikes)) +* [`fb8e31b`](https://github.com/npm/npm/commit/fb8e31b95476a50bda35a665a99eec8a5d25a4db) + [#6982](https://github.com/npm/npm/issues/6982) when doing registry + operations, ensure registry URL always ends with `/` + ([@othiym23](https://github.com/othiym23)) +* [`5bcba65`](https://github.com/npm/npm/commit/5bcba65bed2678ffe80fb596f72abe9871d131c8) + pull whitelisted Git environment variables out into a named constant + ([@othiym23](https://github.com/othiym23)) +* [`be04bbd`](https://github.com/npm/npm/commit/be04bbdc52ebfc820cd939df2f7d79fe87067747) + [#7000](https://github.com/npm/npm/issues/7000) No longer install badly-named + manpage files, and log an error when trying to uninstall them. + ([@othiym23](https://github.com/othiym23)) +* [`6b7c5ec`](https://github.com/npm/npm/commit/6b7c5eca6b65e1247d0e51f6400cf2637ac880ce) + [#7011](https://github.com/npm/npm/issues/7011) Send auth for tarball fetches + for packages in `npm-shrinkwrap.json` from private registries. + ([@othiym23](https://github.com/othiym23)) +* [`9b9de06`](https://github.com/npm/npm/commit/9b9de06a99893b40aa23f0335726dec6df7979db) + `glob@4.3.2`: Better handling of trailing slashes. + ([@isaacs](https://github.com/isaacs)) +* [`030f3c7`](https://github.com/npm/npm/commit/030f3c7450b8ce124a19073bfbae0948a0a1a02c) + `semver@4.2.0`: Diffing between version strings. + ([@isaacs](https://github.com/isaacs)) + +### v2.1.16 (2014-12-22): + +* [`a4e4e33`](https://github.com/npm/npm/commit/a4e4e33edb35c68813f04bf42bdf933a6f727bcd) + [#6987](https://github.com/npm/npm/issues/6987) `read-installed@3.1.5`: fixed + a regression where a new / empty package would cause read-installed to throw. + ([@othiym23](https://github.com/othiym23) / + [@pgilad](https://github.com/pgilad)) + +### v2.1.15 (2014-12-18): + +* [`e5a2dee`](https://github.com/npm/npm/commit/e5a2dee47c74f26c56fee5998545b97497e830c8) + [#6951](https://github.com/npm/npm/issues/6951) `fs-vacuum@1.2.5`: Use + `path-is-inside` for better Windows normalization. + ([@othiym23](https://github.com/othiym23)) +* [`ac6167c`](https://github.com/npm/npm/commit/ac6167c2b9432939c57296f7ddd11ad5f8f918b2) + [#6955](https://github.com/npm/npm/issues/6955) Call `path.normalize` in + `lib/utils/gently-rm.js` for better Windows normalization. + ([@ben-page](https://github.com/ben-page)) +* [`c625d71`](https://github.com/npm/npm/commit/c625d714795e3b5badd847945e2401adfad5a196) + [#6964](https://github.com/npm/npm/issues/6964) Clarify CA configuration + docs. ([@jeffjo](https://github.com/jeffjo)) +* [`58b8cb5`](https://github.com/npm/npm/commit/58b8cb5cdf26a854358b7c2ab636572dba9bac16) + [#6950](https://github.com/npm/npm/issues/6950) Fix documentation typos. + ([@martinvd](https://github.com/martinvd)) +* [`7c1299d`](https://github.com/npm/npm/commit/7c1299d00538ea998684a1903a4091eafc63b7f1) + [#6909](https://github.com/npm/npm/issues/6909) Remove confusing mention of + rubygems `~>` semver operator. ([@mjtko](https://github.com/mjtko)) +* [`7dfdcc6`](https://github.com/npm/npm/commit/7dfdcc6debd8ef1fc52a2b508997d15887aad824) + [#6909](https://github.com/npm/npm/issues/6909) `semver@4.1.1`: Synchronize + documentation with PR [#6909](https://github.com/npm/npm/issues/6909) + ([@othiym23](https://github.com/othiym23)) +* [`adfddf3`](https://github.com/npm/npm/commit/adfddf3b682e0ae08e4b59d87c1b380dd651c572) + [#6925](https://github.com/npm/npm/issues/6925) Correct typo in + `doc/api/npm-ls.md` ([@oddurs](https://github.com/oddurs)) +* [`f5c534b`](https://github.com/npm/npm/commit/f5c534b711ab173129baf366c4f08d68f6117333) + [#6920](https://github.com/npm/npm/issues/6920) Remove recommendation to run + as root from `README.md`. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`3ef4459`](https://github.com/npm/npm/commit/3ef445922cd39f25b992d91bd22c4d367882ea22) + [#6920](https://github.com/npm/npm/issues/6920) `npm-@googlegroups.com` has + gone the way of all things. That means it's gone. + ([@robertkowalski](https://github.com/robertkowalski)) + +### v2.1.14 (2014-12-13): + +* [`cf7aeae`](https://github.com/npm/npm/commit/cf7aeae3c3a24e48d3de4006fa082f0c6040922a) + [#6923](https://github.com/npm/npm/issues/6923) Overaggressive link update + for new website broke node-gyp. ([@othiym23](https://github.com/othiym23)) + +### v2.1.13 (2014-12-11): + +* [`cbb890e`](https://github.com/npm/npm/commit/cbb890eeacc0501ba1b8c6955f1c829c8af9f486) + [#6897](https://github.com/npm/npm/issues/6897) npm is a nice package manager + that runs server-side JavaScript. ([@othiym23](https://github.com/othiym23)) +* [`d9043c3`](https://github.com/npm/npm/commit/d9043c3b8d7450c3cb9ca795028c0e1c05377820) + [#6893](https://github.com/npm/npm/issues/6893) Remove erroneous docs about + preupdate / update / postupdate lifecycle scripts, which have never existed. + ([@devTristan](https://github.com/devTristan)) +* [`c5df4d0`](https://github.com/npm/npm/commit/c5df4d0d683cd3506808d1cd1acebff02a8b82db) + [#6884](https://github.com/npm/npm/issues/6884) Update npmjs.org to npmjs.com + in docs. ([@linclark](https://github.com/linclark)) +* [`cb6ff8d`](https://github.com/npm/npm/commit/cb6ff8dace1b439851701d4784d2d719c22ca7a7) + [#6879](https://github.com/npm/npm/issues/6879) npm version: Update + shrinkwrap post-check. ([@othiym23](https://github.com/othiym23)) +* [`2a340bd`](https://github.com/npm/npm/commit/2a340bdd548c6449468281e1444a032812bff677) + [#6868](https://github.com/npm/npm/issues/6868) Use magic numbers instead of + regexps to distinguish tarballs from other things. + ([@daxxog](https://github.com/daxxog)) +* [`f1c8bdb`](https://github.com/npm/npm/commit/f1c8bdb3f6b753d0600597e12346bdc3a34cb9c1) + [#6861](https://github.com/npm/npm/issues/6861) `npm-registry-client@4.0.5`: + Distinguish between error properties that are part of the response and error + strings that should be returned to the user. + ([@disrvptor](https://github.com/disrvptor)) +* [`d3a1b63`](https://github.com/npm/npm/commit/d3a1b6397fddef04b5198ca89d36d720aeb05eb6) + [#6762](https://github.com/npm/npm/issues/6762) Make `npm outdated` ignore + private packages. ([@KenanY](https://github.com/KenanY)) +* [`16d8542`](https://github.com/npm/npm/commit/16d854283ca5bcdb0cb2812fc5745d841652b952) + install.sh: Drop support for node < 0.8, remove engines bits. + ([@isaacs](https://github.com/isaacs)) +* [`b9c6046`](https://github.com/npm/npm/commit/b9c60466d5b713b1dc2947da14a5dfe42352e029) + `init-package-json@1.1.3`: ([@terinstock](https://github.com/terinstock)) + noticed that `init.license` configuration doesn't stick. Make sure that + dashed defaults don't trump dotted parameters. + ([@othiym23](https://github.com/othiym23)) +* [`b6d6acf`](https://github.com/npm/npm/commit/b6d6acfc02c8887f78067931babab8f7c5180fed) + `which@1.0.8`: No longer use graceful-fs for some reason. + ([@isaacs](https://github.com/isaacs)) +* [`d39f673`](https://github.com/npm/npm/commit/d39f673caf08a90fb2bb001d79c98062d2cd05f4) + `request@2.51.0`: Incorporate bug fixes. ([@nylen](https://github.com/nylen)) +* [`c7ad727`](https://github.com/npm/npm/commit/c7ad7279cc879930ec58ccc62fa642e621ecb65c) + `columnify@1.3.2`: Incorporate bug fixes. + ([@timoxley](https://github.com/timoxley)) + +### v2.1.12 (2014-12-04): + +* [`e5b1e44`](https://github.com/npm/npm/commit/e5b1e448bb4a9d6eae4ba0f67b1d3c2cea8ed383) + add alias verison=version ([@isaacs](https://github.com/isaacs)) +* [`5eed7bd`](https://github.com/npm/npm/commit/5eed7bddbd7bb92a44c4193c93e8529500c558e6) + `request@2.49.0` ([@nylen](https://github.com/nylen)) +* [`e72f81d`](https://github.com/npm/npm/commit/e72f81d8412540ae7d1e0edcc37c11bcb8169051) + `glob@4.3.1` / `minimatch@2.0.1` ([@isaacs](https://github.com/isaacs)) +* [`b8dcc36`](https://github.com/npm/npm/commit/b8dcc3637b5b71933b97162b7aff1b1a622c13e2) + `graceful-fs@3.0.5` ([@isaacs](https://github.com/isaacs)) + +### v2.1.11 (2014-11-27): + +* [`4861d28`](https://github.com/npm/npm/commit/4861d28ad0ebd959fe6bc15b9c9a50fcabe57f55) + `which@1.0.7`: License update. ([@isaacs](https://github.com/isaacs)) +* [`30a2ea8`](https://github.com/npm/npm/commit/30a2ea80c891d384b31a1cf28665bba4271915bd) + `ini@1.3.2`: License update. ([@isaacs](https://github.com/isaacs)) +* [`6a4ea05`](https://github.com/npm/npm/commit/6a4ea054f6ddf52fc58842ba2046564b04c5c0e2) + `fstream@1.0.3`: Propagate error events to downstream streams. + ([@gfxmonk](https://github.com/gfxmonk)) +* [`a558695`](https://github.com/npm/npm/commit/a5586954f1c18df7c96137e0a79f41a69e7a884e) + `tar@1.0.3`: Don't extract broken files, propagate `drain` event. + ([@gfxmonk](https://github.com/gfxmonk)) +* [`989624e`](https://github.com/npm/npm/commit/989624e8321f87734c1b1272fc2f646e7af1f81c) + [#6767](https://github.com/npm/npm/issues/6767) Actually pass parameters when + adding git repo to cach under Windows. + ([@othiym23](https://github.com/othiym23)) +* [`657af73`](https://github.com/npm/npm/commit/657af7308f7d6cd2f81389fcf0d762252acaf1ce) + [#6774](https://github.com/npm/npm/issues/6774) When verifying paths on + unbuild, resolve both source and target as symlinks. + ([@hokaccha](https://github.com/hokaccha)) +* [`fd19c40`](https://github.com/npm/npm/commit/fd19c4046414494f9647a6991c00f8406a939929) + [#6713](https://github.com/npm/npm/issues/6713) + `realize-package-specifier@1.3.0`: Make it so that `npm install foo@1` work + when a file named `1` exists. ([@iarna](https://github.com/iarna)) +* [`c8ac37a`](https://github.com/npm/npm/commit/c8ac37a470491b2ed28514536e2e198494638c79) + `npm-registry-client@4.0.4`: Fix regression in failed fetch retries. + ([@othiym23](https://github.com/othiym23)) + +### v2.1.10 (2014-11-20): + +* [`756f3d4`](https://github.com/npm/npm/commit/756f3d40fe18bc02bc93afe17016dfcc266c4b6b) + [#6735](https://github.com/npm/npm/issues/6735) Log "already built" messages + at info, not error. ([@smikes](https://github.com/smikes)) +* [`1b7330d`](https://github.com/npm/npm/commit/1b7330dafba3bbba171f74f1e58b261cb1b9301e) + [#6729](https://github.com/npm/npm/issues/6729) `npm-registry-client@4.0.3`: + GitHub won't redirect you through an HTML page to a compressed tarball if you + don't tell it you accept JSON responses. + ([@KenanY](https://github.com/KenanY)) +* [`d9c7857`](https://github.com/npm/npm/commit/d9c7857be02dacd274e55bf6d430d90d91509d53) + [#6506](https://github.com/npm/npm/issues/6506) + `readdir-scoped-modules@1.0.1`: Use `graceful-fs` so the whole dependency + tree gets read, even in case of `EMFILE`. + ([@sakana](https://github.com/sakana)) +* [`3a085be`](https://github.com/npm/npm/commit/3a085be158ace8f1e4395e69f8c102d3dea00c5f) + Grammar fix in docs. ([@icylace](https://github.com/icylace)) +* [`3f8e2ff`](https://github.com/npm/npm/commit/3f8e2ff8342d327d6f1375437ecf4bd945dc360f) + Did you know that npm has a Code of Conduct? Add a link to it to + CONTRIBUTING.md. ([@isaacs](https://github.com/isaacs)) +* [`319ccf6`](https://github.com/npm/npm/commit/319ccf633289e06e57a80d74c39706899348674c) + `glob@4.2.1`: Performance tuning. ([@isaacs](https://github.com/isaacs)) +* [`835f046`](https://github.com/npm/npm/commit/835f046e7568c33e81a0b48c84cff965024d8b8a) + `readable-stream@1.0.33`: Bug fixes. ([@rvagg](https://github.com/rvagg)) +* [`a34c38d`](https://github.com/npm/npm/commit/a34c38d0732fb246d11f2a776d2ad0d8db654338) + `request@2.48.0`: Bug fixes. ([@nylen](https://github.com/nylen)) + +### v2.1.9 (2014-11-13): + +* [`eed9f61`](https://github.com/npm/npm/commit/eed9f6101963364acffc59d7194fc1655180e80c) + [#6542](https://github.com/npm/npm/issues/6542) `npm owner add / remove` now + works properly with scoped packages + ([@othiym23](https://github.com/othiym23)) +* [`cd25973`](https://github.com/npm/npm/commit/cd25973825aa5315b7ebf26227bd32bd6be5533f) + [#6548](https://github.com/npm/npm/issues/6548) using sudo won't leave the + cache's git directories with bad permissions + ([@othiym23](https://github.com/othiym23)) +* [`56930ab`](https://github.com/npm/npm/commit/56930abcae6a6ea41f1b75e23765c61259cef2dd) + fixed irregular `npm cache ls` output (yes, that's a thing) + ([@othiym23](https://github.com/othiym23)) +* [`740f483`](https://github.com/npm/npm/commit/740f483db6ec872b453065842da080a646c3600a) + legacy tests no longer poison user's own cache + ([@othiym23](https://github.com/othiym23)) +* [`ce37f14`](https://github.com/npm/npm/commit/ce37f142a487023747a9086335618638ebca4372) + [#6169](https://github.com/npm/npm/issues/6169) add terse output similar to + `npm publish / unpublish` for `npm owner add / remove` + ([@KenanY](https://github.com/KenanY)) +* [`bf2b8a6`](https://github.com/npm/npm/commit/bf2b8a66d7188900bf1e957c052b893948b67e0e) + [#6680](https://github.com/npm/npm/issues/6680) pass auth credentials to + registry when downloading search index + ([@terinjokes](https://github.com/terinjokes)) +* [`00ecb61`](https://github.com/npm/npm/commit/00ecb6101422984696929f602e14da186f9f669c) + [#6400](https://github.com/npm/npm/issues/6400) `.npmignore` is respected for + git repos on cache / pack / publish + ([@othiym23](https://github.com/othiym23)) +* [`d1b3a9e`](https://github.com/npm/npm/commit/d1b3a9ec5e2b6d52765ba5da5afb08dba41c49c1) + [#6311](https://github.com/npm/npm/issues/6311) `npm ls -l --depth=0` no + longer prints phantom duplicate children + ([@othiym23](https://github.com/othiym23)) +* [`07c5f34`](https://github.com/npm/npm/commit/07c5f34e45c9b18c348ed53b5763b1c5d4325740) + [#6690](https://github.com/npm/npm/issues/6690) `uid-number@0.0.6`: clarify + confusing names in error-handling code ([@isaacs](https://github.com/isaacs)) +* [`1ac9be9`](https://github.com/npm/npm/commit/1ac9be9f3bab816211d72d13cb05b5587878a586) + [#6684](https://github.com/npm/npm/issues/6684) `npm init`: don't report + write if canceled ([@smikes](https://github.com/smikes)) +* [`7bb207d`](https://github.com/npm/npm/commit/7bb207d1d6592a9cffc986871e4b671575363c2f) + [#5754](https://github.com/npm/npm/issues/5754) never remove app directories + on failed install ([@othiym23](https://github.com/othiym23)) +* [`705ce60`](https://github.com/npm/npm/commit/705ce601e7b9c5428353e02ebb30cb76c1991fdd) + [#5754](https://github.com/npm/npm/issues/5754) `fs-vacuum@1.2.2`: don't + throw when another fs task writes to a directory being vacuumed + ([@othiym23](https://github.com/othiym23)) +* [`1b650f4`](https://github.com/npm/npm/commit/1b650f4f217c413a2ffb96e1701beb5aa67a0de2) + [#6255](https://github.com/npm/npm/issues/6255) ensure that order credentials + are used from `.npmrc` doesn't regress + ([@othiym23](https://github.com/othiym23)) +* [`9bb2c34`](https://github.com/npm/npm/commit/9bb2c3435cedef40b45d3e9bd7a8edfb8cbe7209) + [#6644](https://github.com/npm/npm/issues/6644) `warn` rather than `info` on + fetch failure ([@othiym23](https://github.com/othiym23)) +* [`e34a7b6`](https://github.com/npm/npm/commit/e34a7b6b7371b1893a062f627ae8e168546d7264) + [#6524](https://github.com/npm/npm/issues/6524) `npm-registry-client@4.0.2`: + proxy via `request` more transparently + ([@othiym23](https://github.com/othiym23)) +* [`40afd6a`](https://github.com/npm/npm/commit/40afd6aaf34c11a10e80ec87b115fb2bb907e3bd) + [#6524](https://github.com/npm/npm/issues/6524) push proxy settings into + `request` ([@tauren](https://github.com/tauren)) + +### v2.1.8 (2014-11-06): + +* [`063d843`](https://github.com/npm/npm/commit/063d843965f9f0bfa5732d7c2d6f5aa37a8260a2) + npm version now updates version in npm-shrinkwrap.json + ([@faiq](https://github.com/faiq)) +* [`3f53cd7`](https://github.com/npm/npm/commit/3f53cd795f8a600e904a97f215ba5b5a9989d9dd) + [#6559](https://github.com/npm/npm/issues/6559) save local dependencies in + npm-shrinkwrap.json ([@Torsph](https://github.com/Torsph)) +* [`e249262`](https://github.com/npm/npm/commit/e24926268b2d2220910bc81cce6d3b2e08d94eb1) + npm-faq.md: mention scoped pkgs in namespace Q + ([@smikes](https://github.com/smikes)) +* [`6b06ec4`](https://github.com/npm/npm/commit/6b06ec4ef5da490bdca1512fa7f12490245c192b) + [#6642](https://github.com/npm/npm/issues/6642) `init-package-json@1.1.2`: + Handle both `init-author-name` and `init.author.name`. + ([@othiym23](https://github.com/othiym23)) +* [`9cb334c`](https://github.com/npm/npm/commit/9cb334c8a895a55461aac18791babae779309a0e) + [#6409](https://github.com/npm/npm/issues/6409) document commit-ish with + GitHub URLs ([@smikes](https://github.com/smikes)) +* [`0aefae9`](https://github.com/npm/npm/commit/0aefae9bc2598a4b7a3ee7bb2306b42e3e12bb28) + [#2959](https://github.com/npm/npm/issues/2959) npm run no longer fails + silently ([@flipside](https://github.com/flipside)) +* [`e007a2c`](https://github.com/npm/npm/commit/e007a2c1e4fac1759fa61ac6e78c6b83b2417d11) + [#3908](https://github.com/npm/npm/issues/3908) include command in spawn + errors ([@smikes](https://github.com/smikes)) + +### v2.1.7 (2014-10-30): + +* [`6750b05`](https://github.com/npm/npm/commit/6750b05dcba20d8990a672957ec56c48f97e241a) + [#6398](https://github.com/npm/npm/issues/6398) `npm-registry-client@4.0.0`: + consistent API, handle relative registry paths, use auth more consistently + ([@othiym23](https://github.com/othiym23)) +* [`7719cfd`](https://github.com/npm/npm/commit/7719cfdd8b204dfeccc41289707ea58b4d608905) + [#6560](https://github.com/npm/npm/issues/6560) use new npm-registry-client + API ([@othiym23](https://github.com/othiym23)) +* [`ed61971`](https://github.com/npm/npm/commit/ed619714c93718b6c1922b8c286f4b6cd2b97c80) + move caching of search metadata from `npm-registry-client` to npm itself + ([@othiym23](https://github.com/othiym23)) +* [`3457041`](https://github.com/npm/npm/commit/34570414cd528debeb22943873440594d7f47abf) + handle caching of metadata independently from `npm-registry-client` + ([@othiym23](https://github.com/othiym23)) +* [`20a331c`](https://github.com/npm/npm/commit/20a331ced6a52faac6ec242e3ffdf28bcd447c40) + [#6538](https://github.com/npm/npm/issues/6538) map registry URLs to + credentials more safely ([@indexzero](https://github.com/indexzero)) +* [`4072e97`](https://github.com/npm/npm/commit/4072e97856bf1e7affb38333d080c172767eea27) + [#6589](https://github.com/npm/npm/issues/6589) `npm-registry-client@4.0.1`: + allow publishing of packages with names identical to built-in Node modules + ([@feross](https://github.com/feross)) +* [`254f0e4`](https://github.com/npm/npm/commit/254f0e4adaf2c56e9df25c7343c43b0b0804a3b5) + `tar@1.0.2`: better error-handling ([@runk](https://github.com/runk)) +* [`73ee2aa`](https://github.com/npm/npm/commit/73ee2aa4f1a47e43fe7cf4317a5446875f7521fa) + `request@2.47.0` ([@mikeal](https://github.com/mikeal)) + +### v2.1.6 (2014-10-23): + +* [`681b398`](https://github.com/npm/npm/commit/681b3987a18e7aba0aaf78c91a23c7cc0ab82ce8) + [#6523](https://github.com/npm/npm/issues/6523) fix default `logelevel` doc + ([@KenanY](https://github.com/KenanY)) +* [`80b368f`](https://github.com/npm/npm/commit/80b368ffd786d4d008734b56c4a6fe12d2cb2926) + [#6528](https://github.com/npm/npm/issues/6528) `npm version` should work in + a git directory without git ([@terinjokes](https://github.com/terinjokes)) +* [`5f5f9e4`](https://github.com/npm/npm/commit/5f5f9e4ddf544c2da6adf3f8c885238b0e745076) + [#6483](https://github.com/npm/npm/issues/6483) `init-package-json@1.1.1`: + Properly pick up default values from environment variables. + ([@othiym23](https://github.com/othiym23)) +* [`a114870`](https://github.com/npm/npm/commit/a1148702f53f82d49606b2e4dac7581261fff442) + perl 5.18.x doesn't like -pi without filenames + ([@othiym23](https://github.com/othiym23)) +* [`de5ba00`](https://github.com/npm/npm/commit/de5ba007a48db876eb5bfb6156435f3512d58977) + `request@2.46.0`: Tests and cleanup. + ([@othiym23](https://github.com/othiym23)) +* [`76933f1`](https://github.com/npm/npm/commit/76933f169f17b5273b32e924a7b392d5729931a7) + `fstream-npm@1.0.1`: Always include `LICENSE[.*]`, `LICENCE[.*]`, + `CHANGES[.*]`, `CHANGELOG[.*]`, and `HISTORY[.*]`. + ([@jonathanong](https://github.com/jonathanong)) + +### v2.1.5 (2014-10-16): + +* [`6a14b23`](https://github.com/npm/npm/commit/6a14b232a0e34158bd95bb25c607167be995c204) + [#6397](https://github.com/npm/npm/issues/6397) Defactor npmconf back into + npm. ([@othiym23](https://github.com/othiym23)) +* [`4000e33`](https://github.com/npm/npm/commit/4000e3333a76ca4844681efa8737cfac24b7c2c8) + [#6323](https://github.com/npm/npm/issues/6323) Install `peerDependencies` + from top. ([@othiym23](https://github.com/othiym23)) +* [`5d119ae`](https://github.com/npm/npm/commit/5d119ae246f27353b14ff063559d1ba8c616bb89) + [#6498](https://github.com/npm/npm/issues/6498) Better error messages on + malformed `.npmrc` properties. ([@nicks](https://github.com/nicks)) +* [`ae18efb`](https://github.com/npm/npm/commit/ae18efb65fed427b1ef18e4862885bf60b87b92e) + [#6093](https://github.com/npm/npm/issues/6093) Replace instances of 'hash' + with 'object' in documentation. ([@zeke](https://github.com/zeke)) +* [`53108b2`](https://github.com/npm/npm/commit/53108b276fec5f97a38250933a2768d58b6928da) + [#1558](https://github.com/npm/npm/issues/1558) Clarify how local paths + should be used. ([@KenanY](https://github.com/KenanY)) +* [`344fa1a`](https://github.com/npm/npm/commit/344fa1a219ac8867022df3dc58a47636dde8a242) + [#6488](https://github.com/npm/npm/issues/6488) Work around bug in marked. + ([@othiym23](https://github.com/othiym23)) + +OUTDATED DEPENDENCY CLEANUP JAMBOREE + +* [`60c2942`](https://github.com/npm/npm/commit/60c2942e13655d9ecdf6e0f1f97f10cb71a75255) + `realize-package-specifier@1.2.0`: Handle names and rawSpecs more + consistently. ([@iarna](https://github.com/iarna)) +* [`1b5c95f`](https://github.com/npm/npm/commit/1b5c95fbda77b87342bd48c5ecac5b1fd571ccfe) + `sha@1.3.0`: Change line endings? + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`d7dee3f`](https://github.com/npm/npm/commit/d7dee3f3f7d9e7c2061a4ecb4dd93e3e4bfe4f2e) + `request@2.45.0`: Dependency updates, better proxy support, better compressed + response handling, lots of 'use strict'. + ([@mikeal](https://github.com/mikeal)) +* [`3d75180`](https://github.com/npm/npm/commit/3d75180c2cc79fa3adfa0e4cb783a27192189a65) + `opener@1.4.0`: Added gratuitous return. + ([@Domenic](https://github.com/Domenic)) +* [`8e2703f`](https://github.com/npm/npm/commit/8e2703f78d280d1edeb749e257dda1f288bad6e3) + `retry@0.6.1` / `npm-registry-client@3.2.4`: Change of ownership. + ([@tim-kos](https://github.com/tim-kos)) +* [`c87b00f`](https://github.com/npm/npm/commit/c87b00f82f92434ee77831915012c77a6c244c39) + `once@1.3.1`: Wrap once with wrappy. ([@isaacs](https://github.com/isaacs)) +* [`01ec790`](https://github.com/npm/npm/commit/01ec790fd47def56eda6abb3b8d809093e8f493f) + `npm-user-validate@0.1.1`: Correct repository URL. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`389e52c`](https://github.com/npm/npm/commit/389e52c2d94c818ca8935ccdcf392994fec564a2) + `glob@4.0.6`: Now absolutely requires `graceful-fs`. + ([@isaacs](https://github.com/isaacs)) +* [`e15ab15`](https://github.com/npm/npm/commit/e15ab15a27a8f14cf0d9dc6f11dee452080378a0) + `ini@1.3.0`: Tighten up whitespace handling. + ([@isaacs](https://github.com/isaacs)) +* [`7610f3e`](https://github.com/npm/npm/commit/7610f3e62e699292ece081bfd33084d436e3246d) + `archy@1.0.0` ([@substack](https://github.com/substack)) +* [`9c13149`](https://github.com/npm/npm/commit/9c1314985e513e20ffa3ea0ca333ba2ab78299c9) + `semver@4.1.0`: Add support for prerelease identifiers. + ([@bromanko](https://github.com/bromanko)) +* [`f096c25`](https://github.com/npm/npm/commit/f096c250441b031d758f03afbe8d2321f94c7703) + `graceful-fs@3.0.4`: Add a bunch of additional tests, skip the unfortunate + complications of `graceful-fs@3.0.3`. ([@isaacs](https://github.com/isaacs)) + +### v2.1.4 (2014-10-09): + +* [`3aeb440`](https://github.com/npm/npm/commit/3aeb4401444fad83cc7a8d11bf2507658afa5248) + [#6442](https://github.com/npm/npm/issues/6442) proxying git needs `GIT_SSL_CAINFO` + ([@wmertens](https://github.com/wmertens)) +* [`a8da8d6`](https://github.com/npm/npm/commit/a8da8d6e0cd56d97728c0b76b51604ee06ef6264) + [#6413](https://github.com/npm/npm/issues/6413) write builtin config on any + global npm install ([@isaacs](https://github.com/isaacs)) +* [`9e4d632`](https://github.com/npm/npm/commit/9e4d632c0142ba55df07d624667738b8727336fc) + [#6343](https://github.com/npm/npm/issues/6343) don't pass run arguments to + pre & post scripts ([@TheLudd](https://github.com/TheLudd)) +* [`d831b1f`](https://github.com/npm/npm/commit/d831b1f7ca1a9921ea5b394e39b7130ecbc6d7b4) + [#6399](https://github.com/npm/npm/issues/6399) race condition: inflight + installs, prevent `peerDependency` problems + ([@othiym23](https://github.com/othiym23)) +* [`82b775d`](https://github.com/npm/npm/commit/82b775d6ff34c4beb6c70b2344d491a9f2026577) + [#6384](https://github.com/npm/npm/issues/6384) race condition: inflight + caching by URL rather than semver range + ([@othiym23](https://github.com/othiym23)) +* [`7bee042`](https://github.com/npm/npm/commit/7bee0429066fedcc9e6e962c043eb740b3792809) + `inflight@1.0.4`: callback can take arbitrary number of parameters + ([@othiym23](https://github.com/othiym23)) +* [`3bff494`](https://github.com/npm/npm/commit/3bff494f4abf17d6d7e0e4a3a76cf7421ecec35a) + [#5195](https://github.com/npm/npm/issues/5195) fixed regex color regression + for `npm search` ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`33ba2d5`](https://github.com/npm/npm/commit/33ba2d585160a0a2a322cb76c4cd989acadcc984) + [#6387](https://github.com/npm/npm/issues/6387) allow `npm view global` if + package is specified ([@evanlucas](https://github.com/evanlucas)) +* [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) + [#6388](https://github.com/npm/npm/issues/6388) npm-publish → + npm-developers(7) ([@kennydude](https://github.com/kennydude)) + +TEST CLEANUP EXTRAVAGANZA: + +* [`8d6bfcb`](https://github.com/npm/npm/commit/8d6bfcb88408f5885a2a67409854c43e5c3a23f6) + tap tests run with no system-wide side effects + ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`7a1472f`](https://github.com/npm/npm/commit/7a1472fbdbe99956ad19f629e7eb1cc07ba026ef) + added npm cache cleanup script + ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`0ce6a37`](https://github.com/npm/npm/commit/0ce6a3752fa9119298df15671254db6bc1d8e64c) + stripped out dead test code (othiym23) +* replace spawn with common.npm (@chrismeyersfsu): + * [`0dcd614`](https://github.com/npm/npm/commit/0dcd61446335eaf541bf5f2d5186ec1419f86a42) + test/tap/cache-shasum-fork.js + * [`97f861c`](https://github.com/npm/npm/commit/97f861c967606a7e51e3d5047cf805d9d1adea5a) + test/tap/false_name.js + * [`d01b3de`](https://github.com/npm/npm/commit/d01b3de6ce03f25bbf3db97bfcd3cc85830d6801) + test/tap/git-cache-locking.js + * [`7b63016`](https://github.com/npm/npm/commit/7b63016778124c6728d6bd89a045c841ae3900b6) + test/tap/pack-scoped.js + * [`c877553`](https://github.com/npm/npm/commit/c877553265c39673e03f0a97972f692af81a595d) + test/tap/scripts-whitespace-windows.js + * [`df98525`](https://github.com/npm/npm/commit/df98525331e964131299d457173c697cfb3d95b9) + test/tap/prepublish.js + * [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) + test/tap/prune.js + +### v2.1.3 (2014-10-02): + +BREAKING CHANGE FOR THE SQRT(i) PEOPLE ACTUALLY USING `npm submodule`: + +* [`1e64473`](https://github.com/npm/npm/commit/1e6447360207f45ad6188e5780fdf4517de6e23d) + `rm -rf npm submodule` command, which has been broken since the Carter + Administration ([@isaacs](https://github.com/isaacs)) + +BREAKING CHANGE IF YOU ARE FOR SOME REASON STILL USING NODE 0.6 AND YOU SHOULD +NOT BE DOING THAT CAN YOU NOT: + +* [`3e431f9`](https://github.com/npm/npm/commit/3e431f9d6884acb4cde8bcb8a0b122a76b33ee1d) + [joyent/node#8492](https://github.com/joyent/node/issues/8492) bye bye + customFds, hello stdio ([@othiym23](https://github.com/othiym23)) + +Other changes: + +* [`ea607a8`](https://github.com/npm/npm/commit/ea607a8a20e891ad38eed11b5ce2c3c0a65484b9) + [#6372](https://github.com/npm/npm/issues/6372) noisily error (without + aborting) on multi-{install,build} ([@othiym23](https://github.com/othiym23)) +* [`3ee2799`](https://github.com/npm/npm/commit/3ee2799b629fd079d2db21d7e8f25fa7fa1660d0) + [#6372](https://github.com/npm/npm/issues/6372) only make cache creation + requests in flight ([@othiym23](https://github.com/othiym23)) +* [`1a90ec2`](https://github.com/npm/npm/commit/1a90ec2f2cfbefc8becc6ef0c480e5edacc8a4cb) + [#6372](https://github.com/npm/npm/issues/6372) wait to put Git URLs in + flight until normalized ([@othiym23](https://github.com/othiym23)) +* [`664795b`](https://github.com/npm/npm/commit/664795bb7d8da7142417b3f4ef5986db3a394071) + [#6372](https://github.com/npm/npm/issues/6372) log what is and isn't in + flight ([@othiym23](https://github.com/othiym23)) +* [`00ef580`](https://github.com/npm/npm/commit/00ef58025a1f52dfabf2c4dc3898621d16a6e062) + `inflight@1.0.3`: fix largely theoretical race condition, because we really + really hate race conditions ([@isaacs](https://github.com/isaacs)) +* [`1cde465`](https://github.com/npm/npm/commit/1cde4658d897ae0f93ff1d65b258e1571b391182) + [#6363](https://github.com/npm/npm/issues/6363) + `realize-package-specifier@1.1.0`: handle local dependencies better + ([@iarna](https://github.com/iarna)) +* [`86f084c`](https://github.com/npm/npm/commit/86f084c6c6d7935cd85d72d9d94b8784c914d51e) + `realize-package-specifier@1.0.2`: dependency realization! in its own module! + ([@iarna](https://github.com/iarna)) +* [`553d830`](https://github.com/npm/npm/commit/553d830334552b83606b6bebefd821c9ea71e964) + `npm-package-arg@2.1.3`: simplified semver, better tests + ([@iarna](https://github.com/iarna)) +* [`bec9b61`](https://github.com/npm/npm/commit/bec9b61a316c19f5240657594f0905a92a474352) + `readable-stream@1.0.32`: for some reason + ([@rvagg](https://github.com/rvagg)) +* [`ff08ec5`](https://github.com/npm/npm/commit/ff08ec5f6d717bdbd559de0b2ede769306a9a763) + `dezalgo@1.0.1`: use wrappy for instrumentability + ([@isaacs](https://github.com/isaacs)) + +### v2.1.2 (2014-09-29): + +* [`a1aa20e`](https://github.com/npm/npm/commit/a1aa20e44bb8285c6be1e7fa63b9da920e3a70ed) + [#6282](https://github.com/npm/npm/issues/6282) + `normalize-package-data@1.0.3`: don't prune bundledDependencies + ([@isaacs](https://github.com/isaacs)) +* [`a1f5fe1`](https://github.com/npm/npm/commit/a1f5fe1005043ce20a06e8b17a3e201aa3215357) + move locks back into cache, now path-aware + ([@othiym23](https://github.com/othiym23)) +* [`a432c4b`](https://github.com/npm/npm/commit/a432c4b48c881294d6d79b5f41c2e1c16ad15a8a) + convert lib/utils/tar.js to use atomic streams + ([@othiym23](https://github.com/othiym23)) +* [`b8c3c74`](https://github.com/npm/npm/commit/b8c3c74a3c963564233204161cc263e0912c930b) + `fs-write-stream-atomic@1.0.2`: Now works with streams1 fs.WriteStreams. + ([@isaacs](https://github.com/isaacs)) +* [`c7ab76f`](https://github.com/npm/npm/commit/c7ab76f44cce5f42add5e3ba879bd10e7e00c3e6) + logging cleanup ([@othiym23](https://github.com/othiym23)) +* [`4b2d95d`](https://github.com/npm/npm/commit/4b2d95d0641435b09d047ae5cb2226f292bf38f0) + [#6329](https://github.com/npm/npm/issues/6329) efficiently validate tmp + tarballs safely ([@othiym23](https://github.com/othiym23)) + +### v2.1.1 (2014-09-26): + +* [`563225d`](https://github.com/npm/npm/commit/563225d813ea4c12f46d4f7821ac7f76ba8ee2d6) + [#6318](https://github.com/npm/npm/issues/6318) clean up locking; prefix + lockfile with "." ([@othiym23](https://github.com/othiym23)) +* [`c7f30e4`](https://github.com/npm/npm/commit/c7f30e4550fea882d31fcd4a55b681cd30713c44) + [#6318](https://github.com/npm/npm/issues/6318) remove locking code around + tarball packing and unpacking ([@othiym23](https://github.com/othiym23)) + +### v2.1.0 (2014-09-25): + +NEW FEATURE: + +* [`3635601`](https://github.com/npm/npm/commit/36356011b6f2e6a5a81490e85a0a44eb27199dd7) + [#5520](https://github.com/npm/npm/issues/5520) Add `'npm view .'`. + ([@evanlucas](https://github.com/evanlucas)) + +Other changes: + +* [`f24b552`](https://github.com/npm/npm/commit/f24b552b596d0627549cdd7c2d68fcf9006ea50a) + [#6294](https://github.com/npm/npm/issues/6294) Lock cache → lock cache + target. ([@othiym23](https://github.com/othiym23)) +* [`ad54450`](https://github.com/npm/npm/commit/ad54450104f94c82c501138b4eee488ce3a4555e) + [#6296](https://github.com/npm/npm/issues/6296) Ensure that npm-debug.log + file is created when rollbacks are done. + ([@isaacs](https://github.com/isaacs)) +* [`6810071`](https://github.com/npm/npm/commit/681007155a40ac9d165293bd6ec5d8a1423ccfca) + docs: Default loglevel "http" → "warn". + ([@othiym23](https://github.com/othiym23)) +* [`35ac89a`](https://github.com/npm/npm/commit/35ac89a940f23db875e882ce2888208395130336) + Skip installation of installed scoped packages. + ([@timoxley](https://github.com/timoxley)) +* [`e468527`](https://github.com/npm/npm/commit/e468527256ec599892b9b88d61205e061d1ab735) + Ensure cleanup executes for scripts-whitespace-windows test. + ([@timoxley](https://github.com/timoxley)) +* [`ef9101b`](https://github.com/npm/npm/commit/ef9101b7f346797749415086956a0394528a12c4) + Ensure cleanup executes for packed-scope test. + ([@timoxley](https://github.com/timoxley)) +* [`69b4d18`](https://github.com/npm/npm/commit/69b4d18cdbc2ae04c9afaffbd273b436a394f398) + `fs-write-stream-atomic@1.0.1`: Fix a race condition in our race-condition + fixer. ([@isaacs](https://github.com/isaacs)) +* [`26b17ff`](https://github.com/npm/npm/commit/26b17ff2e3b21ee26c6fdbecc8273520cff45718) + [#6272](https://github.com/npm/npm/issues/6272) `npmconf` decides what the + default prefix is. ([@othiym23](https://github.com/othiym23)) +* [`846faca`](https://github.com/npm/npm/commit/846facacc6427dafcf5756dcd36d9036539938de) + Fix development dependency is preferred over dependency. + ([@andersjanmyr](https://github.com/andersjanmyr)) +* [`9d1a9db`](https://github.com/npm/npm/commit/9d1a9db3af5adc48a7158a5a053eeb89ee41a0e7) + [#3265](https://github.com/npm/npm/issues/3265) Re-apply a71615a. Fixes + [#3265](https://github.com/npm/npm/issues/3265) again, with a test! + ([@glasser](https://github.com/glasser)) +* [`1d41db0`](https://github.com/npm/npm/commit/1d41db0b2744a7bd50971c35cc060ea0600fb4bf) + `marked-man@0.1.4`: Fixes formatting of synopsis blocks in man docs. + ([@kapouer](https://github.com/kapouer)) +* [`a623da0`](https://github.com/npm/npm/commit/a623da01bea1b2d3f3a18b9117cfd2d8e3cbdd77) + [#5867](https://github.com/npm/npm/issues/5867) Specify dummy git template + dir when cloning to prevent copying hooks. + ([@boneskull](https://github.com/boneskull)) + +### v2.0.2 (2014-09-19): + +* [`42c872b`](https://github.com/npm/npm/commit/42c872b32cadc0e555638fc78eab3a38a04401d8) + [#5920](https://github.com/npm/npm/issues/5920) + `fs-write-stream-atomic@1.0.0` ([@isaacs](https://github.com/isaacs)) +* [`6784767`](https://github.com/npm/npm/commit/6784767fe15e28b44c81a1d4bb1738c642a65d78) + [#5920](https://github.com/npm/npm/issues/5920) make all write streams atomic + ([@isaacs](https://github.com/isaacs)) +* [`f6fac00`](https://github.com/npm/npm/commit/f6fac000dd98ebdd5ea1d5921175735d463d328b) + [#5920](https://github.com/npm/npm/issues/5920) barf on 0-length cached + tarballs ([@isaacs](https://github.com/isaacs)) +* [`3b37592`](https://github.com/npm/npm/commit/3b37592a92ea98336505189ae8ca29248b0589f4) + `write-file-atomic@1.1.0`: use graceful-fs + ([@iarna](https://github.com/iarna)) + +### v2.0.1 (2014-09-18): + +* [`74c5ab0`](https://github.com/npm/npm/commit/74c5ab0a676793c6dc19a3fd5fe149f85fecb261) + [#6201](https://github.com/npm/npm/issues/6201) `npmconf@2.1.0`: scope + always-auth to registry URI ([@othiym23](https://github.com/othiym23)) +* [`774b127`](https://github.com/npm/npm/commit/774b127da1dd6fefe2f1299e73505d9146f00294) + [#6201](https://github.com/npm/npm/issues/6201) `npm-registry-client@3.2.2`: + use scoped always-auth settings ([@othiym23](https://github.com/othiym23)) +* [`f2d2190`](https://github.com/npm/npm/commit/f2d2190aa365d22378d03afab0da13f95614a583) + [#6201](https://github.com/npm/npm/issues/6201) support saving + `--always-auth` when logging in ([@othiym23](https://github.com/othiym23)) +* [`17c941a`](https://github.com/npm/npm/commit/17c941a2d583210fe97ed47e2968d94ce9f774ba) + [#6163](https://github.com/npm/npm/issues/6163) use `write-file-atomic` + instead of `fs.writeFile()` ([@fiws](https://github.com/fiws)) +* [`fb5724f`](https://github.com/npm/npm/commit/fb5724fd98e1509c939693568df83d11417ea337) + [#5925](https://github.com/npm/npm/issues/5925) `npm init -f`: allow `npm + init` to run without prompting + ([@michaelnisi](https://github.com/michaelnisi)) +* [`b706d63`](https://github.com/npm/npm/commit/b706d637d5965dbf8f7ce07dc5c4bc80887f30d8) + [#3059](https://github.com/npm/npm/issues/3059) disable prepublish when + running `npm install --production` + ([@jussi-kalliokoski](https://github.com/jussi-kalliokoski)) +* [`119f068`](https://github.com/npm/npm/commit/119f068eae2a36fa8b9c9ca557c70377792243a4) + attach the node version used when publishing a package to its registry + metadata ([@othiym23](https://github.com/othiym23)) +* [`8fe0081`](https://github.com/npm/npm/commit/8fe008181665519c2ac201ee432a3ece9798c31f) + seriously, don't use `npm -g update npm` + ([@thomblake](https://github.com/thomblake)) +* [`ea5b3d4`](https://github.com/npm/npm/commit/ea5b3d446b86dcabb0dbc6dba374d3039342ecb3) + `request@2.44.0` ([@othiym23](https://github.com/othiym23)) + +### v2.0.0 (2014-09-12): + +BREAKING CHANGES: + +* [`4378a17`](https://github.com/npm/npm/commit/4378a17db340404a725ffe2eb75c9936f1612670) + `semver@4.0.0`: prerelease versions no longer show up in ranges; `^0.x.y` + behaves the way it did in `semver@2` rather than `semver@3`; docs have been + reorganized for comprehensibility ([@isaacs](https://github.com/isaacs)) +* [`c6ddb64`](https://github.com/npm/npm/commit/c6ddb6462fe32bf3a27b2c4a62a032a92e982429) + npm now assumes that node is newer than 0.6 + ([@isaacs](https://github.com/isaacs)) + +Other changes: + +* [`ea515c3`](https://github.com/npm/npm/commit/ea515c3b858bf493a7b87fa4cdc2110a0d9cef7f) + [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all + callbacks have finished before proceeding + ([@othiym23](https://github.com/othiym23)) +* [`0b0a59d`](https://github.com/npm/npm/commit/0b0a59d504f20f424294b1590ace73a7464f0378) + [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just + before the CLI exits ([@isaacs](https://github.com/isaacs)) +* [`a11c88b`](https://github.com/npm/npm/commit/a11c88bdb1488b87d8dcac69df9a55a7a91184b6) + [#6175](https://github.com/npm/npm/issues/6175) pack scoped packages + correctly ([@othiym23](https://github.com/othiym23)) +* [`e4e48e0`](https://github.com/npm/npm/commit/e4e48e037d4e95fdb6acec80b04c5c6eaee59970) + [#6121](https://github.com/npm/npm/issues/6121) `read-installed@3.1.2`: don't + mark linked dev dependencies as extraneous + ([@isaacs](https://github.com/isaacs)) +* [`d673e41`](https://github.com/npm/npm/commit/d673e4185d43362c2b2a91acbca8c057e7303c7b) + `cmd-shim@2.0.1`: depend on `graceful-fs` directly + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`9d54d45`](https://github.com/npm/npm/commit/9d54d45e602d595bdab7eae09b9fa1dc46370147) + `npm-registry-couchapp@2.5.3`: make tests more reliable on Travis + ([@iarna](https://github.com/iarna)) +* [`673d738`](https://github.com/npm/npm/commit/673d738c6142c3d043dcee0b7aa02c9831a2e0ca) + ensure permissions are set correctly in cache when running as root + ([@isaacs](https://github.com/isaacs)) +* [`6e6a5fb`](https://github.com/npm/npm/commit/6e6a5fb74af10fd345411df4e121e554e2e3f33e) + prepare for upgrade to `node-semver@4.0.0` + ([@isaacs](https://github.com/isaacs)) +* [`ab8dd87`](https://github.com/npm/npm/commit/ab8dd87b943262f5996744e8d4cc30cc9358b7d7) + swap out `ronn` for `marked-man@0.1.3` ([@isaacs](https://github.com/isaacs)) +* [`803da54`](https://github.com/npm/npm/commit/803da5404d5a0b7c9defa3fe7fa0f2d16a2b19d3) + `npm-registry-client@3.2.0`: prepare for `node-semver@4.0.0` and include more + error information ([@isaacs](https://github.com/isaacs)) +* [`4af0e71`](https://github.com/npm/npm/commit/4af0e7134f5757c3d456d83e8349224a4ba12660) + make default error display less scary ([@isaacs](https://github.com/isaacs)) +* [`4fd9e79`](https://github.com/npm/npm/commit/4fd9e7901a15abff7a3dd478d99ce239b9580bca) + `npm-registry-client@3.2.1`: handle errors returned by the registry much, + much better ([@othiym23](https://github.com/othiym23)) +* [`ca791e2`](https://github.com/npm/npm/commit/ca791e27e97e51c1dd491bff6622ac90b54c3e23) + restore a long (always?) missing pass for deduping + ([@othiym23](https://github.com/othiym23)) +* [`ca0ef0e`](https://github.com/npm/npm/commit/ca0ef0e99bbdeccf28d550d0296baa4cb5e7ece2) + correctly interpret relative paths for local dependencies + ([@othiym23](https://github.com/othiym23)) +* [`5eb8db2`](https://github.com/npm/npm/commit/5eb8db2c370eeb4cd34f6e8dc6a935e4ea325621) + `npm-package-arg@2.1.2`: support git+file:// URLs for local bare repos + ([@othiym23](https://github.com/othiym23)) +* [`860a185`](https://github.com/npm/npm/commit/860a185c43646aca84cb93d1c05e2266045c316b) + tweak docs to no longer advocate checking in `node_modules` + ([@hunterloftis](https://github.com/hunterloftis)) +* [`80e9033`](https://github.com/npm/npm/commit/80e9033c40e373775e35c674faa6c1948661782b) + add links to nodejs.org downloads to docs + ([@meetar](https://github.com/meetar)) + +### v2.0.0-beta.3 (2014-09-04): + +* [`fa79413`](https://github.com/npm/npm/commit/fa794138bec8edb7b88639db25ee9c010d2f4c2b) + [#6119](https://github.com/npm/npm/issues/6119) fall back to registry installs + if package.json is missing in a local directory ([@iarna](https://github.com/iarna)) +* [`16073e2`](https://github.com/npm/npm/commit/16073e2d8ae035961c4c189b602d4aacc6d6b387) + `npm-package-arg@2.1.0`: support file URIs as local specs + ([@othiym23](https://github.com/othiym23)) +* [`9164acb`](https://github.com/npm/npm/commit/9164acbdee28956fa816ce5e473c559395ae4ec2) + `github-url-from-username-repo@1.0.2`: don't match strings that are already + URIs ([@othiym23](https://github.com/othiym23)) +* [`4067d6b`](https://github.com/npm/npm/commit/4067d6bf303a69be13f3af4b19cf4fee1b0d3e12) + [#5629](https://github.com/npm/npm/issues/5629) support saving of local packages + in `package.json` ([@dylang](https://github.com/dylang)) +* [`1b2ffdf`](https://github.com/npm/npm/commit/1b2ffdf359a8c897a78f91fc5a5d535c97aaec97) + [#6097](https://github.com/npm/npm/issues/6097) document scoped packages + ([@seldo](https://github.com/seldo)) +* [`0a67d53`](https://github.com/npm/npm/commit/0a67d536067c4808a594d81288d34c0f7e97e105) + [#6007](https://github.com/npm/npm/issues/6007) `request@2.42.0`: properly + set headers on proxy requests ([@isaacs](https://github.com/isaacs)) +* [`9bac6b8`](https://github.com/npm/npm/commit/9bac6b860b674d24251bb7b8ba412fdb26cbc836) + `npmconf@2.0.8`: disallow semver ranges in tag configuration + ([@isaacs](https://github.com/isaacs)) +* [`d2d4d7c`](https://github.com/npm/npm/commit/d2d4d7cd3c32f91a87ffa11fe464d524029011c3) + [#6082](https://github.com/npm/npm/issues/6082) don't allow tagging with a + semver range as the tag name ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-beta.2 (2014-08-29): + +SPECIAL LABOR DAY WEEKEND RELEASE PARTY WOOO + +* [`ed207e8`](https://github.com/npm/npm/commit/ed207e88019de3150037048df6267024566e1093) + `npm-registry-client@3.1.7`: Clean up auth logic and improve logging around + auth decisions. Also error on trying to change a user document without + writing to it. ([@othiym23](https://github.com/othiym23)) +* [`66c7423`](https://github.com/npm/npm/commit/66c7423b7fb07a326b83c83727879410d43c439f) + `npmconf@2.0.7`: support -C as an alias for --prefix + ([@isaacs](https://github.com/isaacs)) +* [`0dc6a07`](https://github.com/npm/npm/commit/0dc6a07c778071c94c2251429c7d107e88a45095) + [#6059](https://github.com/npm/npm/issues/6059) run commands in prefix, not + cwd ([@isaacs](https://github.com/isaacs)) +* [`65d2179`](https://github.com/npm/npm/commit/65d2179af96737eb9038eaa24a293a62184aaa13) + `github-url-from-username-repo@1.0.1`: part 3 handle slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`e8d75d0`](https://github.com/npm/npm/commit/e8d75d0d9f148ce2b3e8f7671fa281945bac363d) + [#6057](https://github.com/npm/npm/issues/6057) `read-installed@3.1.1`: + properly handle extraneous dev dependencies of required dependencies + ([@othiym23](https://github.com/othiym23)) +* [`0602f70`](https://github.com/npm/npm/commit/0602f708f070d524ad41573afd4c57171cab21ad) + [#6064](https://github.com/npm/npm/issues/6064) ls: do not show deps of + extraneous deps ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-beta.1 (2014-08-28): + +* [`78a1fc1`](https://github.com/npm/npm/commit/78a1fc12307a0cbdbc944775ed831b876ee65855) + `github-url-from-git@1.4.0`: add support for git+https and git+ssh + ([@stefanbuck](https://github.com/stefanbuck)) +* [`bf247ed`](https://github.com/npm/npm/commit/bf247edf5429c6b3ec4d4cb798fa0eb0a9c19fc1) + `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`4bbe682`](https://github.com/npm/npm/commit/4bbe682a6d4eabcd23f892932308c9f228bf4de3) + `cmd-shim@2.0.0`: upgrade to graceful-fs 3 + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`ae1d590`](https://github.com/npm/npm/commit/ae1d590bdfc2476a4ed446e760fea88686e3ae05) + `npm-package-arg@2.0.4`: accept slashes in branch names + ([@thealphanerd](https://github.com/thealphanerd)) +* [`b2f51ae`](https://github.com/npm/npm/commit/b2f51aecadf585711e145b6516f99e7c05f53614) + `semver@3.0.1`: semver.clean() is cleaner + ([@isaacs](https://github.com/isaacs)) +* [`1d041a8`](https://github.com/npm/npm/commit/1d041a8a5ebd5bf6cecafab2072d4ec07823adab) + `github-url-from-username-repo@1.0.0`: accept slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`02c85d5`](https://github.com/npm/npm/commit/02c85d592c4058e5d9eafb0be36b6743ae631998) + `async-some@1.0.1` ([@othiym23](https://github.com/othiym23)) +* [`5af493e`](https://github.com/npm/npm/commit/5af493efa8a463cd1acc4a9a394699e2c0793b9c) + ensure lifecycle spawn errors caught properly + ([@isaacs](https://github.com/isaacs)) +* [`60fe012`](https://github.com/npm/npm/commit/60fe012fac9570d6c72554cdf34a6fa95bf0f0a6) + `npmconf@2.0.6`: init.version defaults to 1.0.0 + ([@isaacs](https://github.com/isaacs)) +* [`b4c717b`](https://github.com/npm/npm/commit/b4c717bbf58fb6a0d64ad229036c79a184297ee2) + `npm-registry-client@3.1.4`: properly encode % in passwords + ([@isaacs](https://github.com/isaacs)) +* [`7b55f44`](https://github.com/npm/npm/commit/7b55f44420252baeb3f30da437d22956315c31c9) + doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-beta.0 (2014-08-21): + +* [`685f8be`](https://github.com/npm/npm/commit/685f8be1f2770cc75fd0e519a8d7aac72735a270) + `npm-registry-client@3.1.3`: Print the notification header returned by the + registry, and make sure status codes are printed without gratuitous quotes + around them. ([@isaacs](https://github.com/isaacs) / + [@othiym23](https://github.com/othiym23)) +* [`a8cb676`](https://github.com/npm/npm/commit/a8cb676aef0561eaf04487d2719672b097392c85) + [#5900](https://github.com/npm/npm/issues/5900) remove `npm` from its own + `engines` field in `package.json`. None of us remember why it was there. + ([@timoxley](https://github.com/timoxley)) +* [`6c47201`](https://github.com/npm/npm/commit/6c47201a7d071e8bf091b36933daf4199cc98e80) + [#5752](https://github.com/npm/npm/issues/5752), + [#6013](https://github.com/npm/npm/issues/6013) save git URLs correctly in + `_resolved` fields ([@isaacs](https://github.com/isaacs)) +* [`e4e1223`](https://github.com/npm/npm/commit/e4e1223a91c37688ba3378e1fc9d5ae045654d00) + [#5936](https://github.com/npm/npm/issues/5936) document the use of tags in + `package.json` ([@KenanY](https://github.com/KenanY)) +* [`c92b8d4`](https://github.com/npm/npm/commit/c92b8d4db7bde2a501da5b7d612684de1d629a42) + [#6004](https://github.com/npm/npm/issues/6004) manually installed scoped + packages are tracked correctly ([@dead](https://github.com/dead)-horse) +* [`21ca0aa`](https://github.com/npm/npm/commit/21ca0aaacbcfe2b89b0a439d914da0cae62de550) + [#5945](https://github.com/npm/npm/issues/5945) link scoped packages + correctly ([@dead](https://github.com/dead)-horse) +* [`16bead7`](https://github.com/npm/npm/commit/16bead7f2c82aec35b83ff0ec04df051ba456764) + [#5958](https://github.com/npm/npm/issues/5958) ensure that file streams work + in all versions of node ([@dead](https://github.com/dead)-horse) +* [`dbf0cab`](https://github.com/npm/npm/commit/dbf0cab29d0db43ac95e4b5a1fbdea1e0af75f10) + you can now pass quoted args to `npm run-script` + ([@bcoe](https://github.com/bcoe)) +* [`0583874`](https://github.com/npm/npm/commit/05838743f01ccb8d2432b3858d66847002fb62df) + `tar@1.0.1`: Add test for removing an extract target immediately after + unpacking. + ([@isaacs](https://github.com/isaacs)) +* [`cdf3b04`](https://github.com/npm/npm/commit/cdf3b0428bc0b0183fb41dcde9e34e8f42c5e3a7) + `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, and + `retries` options. Part 2 of race condition leading to `ENOENT` + ([@isaacs](https://github.com/isaacs)) + errors. +* [`22d72a8`](https://github.com/npm/npm/commit/22d72a87a9e1a9ab56d9585397f63551887d9125) + `fstream@1.0.2`: Fix a double-finish call which can result in excess FS + operations after the `close` event. Part 1 of race condition leading to + `ENOENT` errors. + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha.7 (2014-08-14): + +* [`f23f1d8`](https://github.com/npm/npm/commit/f23f1d8e8f86ec1b7ab8dad68250bccaa67d61b1) + doc: update version doc to include `pre-*` increment args + ([@isaacs](https://github.com/isaacs)) +* [`b6bb746`](https://github.com/npm/npm/commit/b6bb7461824d4dc1c0936f46bd7929b5cd597986) + build: add 'make tag' to tag current release as latest + ([@isaacs](https://github.com/isaacs)) +* [`27c4bb6`](https://github.com/npm/npm/commit/27c4bb606e46e5eaf604b19fe8477bc6567f8b2e) + build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) +* [`cff66c3`](https://github.com/npm/npm/commit/cff66c3bf2850880058ebe2a26655dafd002495e) + build: add script to output `v1.4-next` publish tag + ([@isaacs](https://github.com/isaacs)) +* [`22abec8`](https://github.com/npm/npm/commit/22abec8833474879ac49b9604c103bc845dad779) + build: remove outdated `docpublish` make target + ([@isaacs](https://github.com/isaacs)) +* [`1be4de5`](https://github.com/npm/npm/commit/1be4de51c3976db8564f72b00d50384c921f0917) + build: remove `unpublish` step from `make publish` + ([@isaacs](https://github.com/isaacs)) +* [`e429e20`](https://github.com/npm/npm/commit/e429e2011f4d78e398f2461bca3e5a9a146fbd0c) + doc: add new changelog ([@othiym23](https://github.com/othiym23)) +* [`9243d20`](https://github.com/npm/npm/commit/9243d207896ea307082256604c10817f7c318d68) + lifecycle: test lifecycle path modification + ([@isaacs](https://github.com/isaacs)) +* [`021770b`](https://github.com/npm/npm/commit/021770b9cb07451509f0a44afff6c106311d8cf6) + lifecycle: BREAKING CHANGE do not add the directory containing node executable + ([@chulkilee](https://github.com/chulkilee)) +* [`1d5c41d`](https://github.com/npm/npm/commit/1d5c41dd0d757bce8b87f10c4135f04ece55aeb9) + install: rename .gitignore when unpacking foreign tarballs + ([@isaacs](https://github.com/isaacs)) +* [`9aac267`](https://github.com/npm/npm/commit/9aac2670a73423544d92b27cc301990a16a9563b) + cache: detect non-gzipped tar files more reliably + ([@isaacs](https://github.com/isaacs)) +* [`3f24755`](https://github.com/npm/npm/commit/3f24755c8fce3c7ab11ed1dc632cc40d7ef42f62) + `readdir-scoped-modules@1.0.0` ([@isaacs](https://github.com/isaacs)) +* [`151cd2f`](https://github.com/npm/npm/commit/151cd2ff87b8ac2fc9ea366bc9b7f766dc5b9684) + `read-installed@3.1.0` ([@isaacs](https://github.com/isaacs)) +* [`f5a9434`](https://github.com/npm/npm/commit/f5a94343a8ebe4a8cd987320b55137aef53fb3fd) + test: fix Travis timeouts ([@dylang](https://github.com/dylang)) +* [`126cafc`](https://github.com/npm/npm/commit/126cafcc6706814c88af3042f2ffff408747bff4) + `npm-registry-couchapp@2.5.0` ([@othiym23](https://github.com/othiym23)) + +### v2.0.0-alpha.6 (2014-08-07): + +BREAKING CHANGE: + +* [`ea547e2`](https://github.com/npm/npm/commit/ea547e2) Bump semver to + version 3: `^0.x.y` is now functionally the same as `=0.x.y`. + ([@isaacs](https://github.com/isaacs)) + +Other changes: + +* [`d987707`](https://github.com/npm/npm/commit/d987707) move fetch into + npm-registry-client ([@othiym23](https://github.com/othiym23)) +* [`9b318e2`](https://github.com/npm/npm/commit/9b318e2) `read-installed@3.0.0` + ([@isaacs](https://github.com/isaacs)) +* [`9d73de7`](https://github.com/npm/npm/commit/9d73de7) remove unnecessary + mkdirps ([@isaacs](https://github.com/isaacs)) +* [`33ccd13`](https://github.com/npm/npm/commit/33ccd13) Don't squash execute + perms in `_git-remotes/` dir ([@adammeadows](https://github.com/adammeadows)) +* [`48fd233`](https://github.com/npm/npm/commit/48fd233) `npm-package-arg@2.0.1` + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha-5 (2014-07-22): + +This release bumps up to 2.0 because of this breaking change, which could +potentially affect how your package's scripts are run: + +* [`df4b0e7`](https://github.com/npm/npm/commit/df4b0e7fc1abd9a54f98db75ec9e4d03d37d125b) + [#5518](https://github.com/npm/npm/issues/5518) BREAKING CHANGE: support + passing arguments to `run` scripts ([@bcoe](https://github.com/bcoe)) + +Other changes: + +* [`cd422c9`](https://github.com/npm/npm/commit/cd422c9de510766797c65720d70f085000f50543) + [#5748](https://github.com/npm/npm/issues/5748) link binaries for scoped + packages ([@othiym23](https://github.com/othiym23)) +* [`4c3c778`](https://github.com/npm/npm/commit/4c3c77839920e830991e0c229c3c6a855c914d67) + [#5758](https://github.com/npm/npm/issues/5758) `npm link` includes scope + when linking scoped package ([@fengmk2](https://github.com/fengmk2)) +* [`f9f58dd`](https://github.com/npm/npm/commit/f9f58dd0f5b715d4efa6619f13901916d8f99c47) + [#5707](https://github.com/npm/npm/issues/5707) document generic pre- / + post-commands ([@sudodoki](https://github.com/sudodoki)) +* [`ac7a480`](https://github.com/npm/npm/commit/ac7a4801d80361b41dce4a18f22bcdf75e396000) + [#5406](https://github.com/npm/npm/issues/5406) `npm cache` displays usage + when called without arguments + ([@michaelnisi](https://github.com/michaelnisi)) +* [`f4554e9`](https://github.com/npm/npm/commit/f4554e99d34f77a8a02884493748f7d49a9a9d8b) + Test fixes for Windows ([@isaacs](https://github.com/isaacs)) +* update dependencies ([@othiym23](https://github.com/othiym23)) diff --git a/bin/nodejs5.12.0/node_modules/npm/cli.js b/bin/nodejs5.12.0/node_modules/npm/cli.js new file mode 100644 index 00000000..57c84e9e --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/cli.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./bin/npm-cli.js') diff --git a/bin/nodejs5.12.0/node_modules/npm/configure b/bin/nodejs5.12.0/node_modules/npm/configure new file mode 100644 index 00000000..32b8da57 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/configure @@ -0,0 +1,33 @@ +#!/bin/bash + +# set configurations that will be "sticky" on this system, +# surviving npm self-updates. + +CONFIGS=() +i=0 + +# get the location of this file. +unset CDPATH +CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc + +while [ $# -gt 0 ]; do + conf="$1" + case $conf in + --help) + echo "./configure --param=value ..." + exit 0 + ;; + --*) + CONFIGS[$i]="${conf:2}" + ;; + *) + CONFIGS[$i]="$conf" + ;; + esac + let i++ + shift +done + +for c in "${CONFIGS[@]}"; do + echo "$c" >> "$CONFFILE" +done diff --git a/bin/nodejs5.12.0/node_modules/npm/html/docfoot.html b/bin/nodejs5.12.0/node_modules/npm/html/docfoot.html new file mode 100644 index 00000000..0cf4145d --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/html/docfoot.html @@ -0,0 +1,13 @@ +</div> + +<table border=0 cellspacing=0 cellpadding=0 id=npmlogo> +<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18> </td></tr> +<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td colspan=6 style="width:60px;height:10px;background:#fff"> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td></tr> +<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2> </td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td></tr> +<tr><td style="width:10px;height:10px;background:#fff" rowspan=2> </td></tr> +<tr><td style="width:10px;height:10px;background:#fff"> </td></tr> +<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> +<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> +</table> +<p id="footer">@NAME@ — npm@@VERSION@</p> + diff --git a/bin/nodejs5.12.0/node_modules/npm/html/dochead.html b/bin/nodejs5.12.0/node_modules/npm/html/dochead.html new file mode 100644 index 00000000..4d52bb8d --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/html/dochead.html @@ -0,0 +1,11 @@ +<!doctype html> +<html> + <title>@NAME@ + + + + + + +

    + diff --git a/bin/nodejs5.12.0/node_modules/npm/html/favicon.ico b/bin/nodejs5.12.0/node_modules/npm/html/favicon.ico new file mode 100644 index 00000000..9e0d4eef Binary files /dev/null and b/bin/nodejs5.12.0/node_modules/npm/html/favicon.ico differ diff --git a/bin/nodejs5.12.0/node_modules/npm/html/index.html b/bin/nodejs5.12.0/node_modules/npm/html/index.html new file mode 100644 index 00000000..6dcacdc8 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/html/index.html @@ -0,0 +1,93 @@ + + + + + + npm - JavaScript Package Manager + +

    npm

    + +

    npm is a package manager for node. You can use it to install + and publish your node programs. It manages dependencies and does other cool stuff.

    + +

    Easy Zero Line Install

    + +

    Install Node.js
    +(npm comes with it.)

    + +

    Because a one-line install is one too many.

    + +

    Fancy Install

    + +
      +
    1. Get the code. +
    2. Do what the README + says to do. +
    + +

    There's a pretty thorough install script at +https://npmjs.org/install.sh

    + +

    For maximum security, make sure to thoroughly inspect every +program that you run on your computer!

    + +

    Other Cool Stuff

    + + + + + diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/access.js b/bin/nodejs5.12.0/node_modules/npm/lib/access.js new file mode 100644 index 00000000..e6398eb1 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/access.js @@ -0,0 +1,127 @@ +'use strict' + +var resolve = require('path').resolve + +var readPackageJson = require('read-package-json') +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm.js') + +var whoami = require('./whoami') + +module.exports = access + +access.usage = + 'npm access public []\n' + + 'npm access restricted []\n' + + 'npm access grant []\n' + + 'npm access revoke []\n' + + 'npm access ls-packages [||]\n' + + 'npm access ls-collaborators [ []]\n' + + 'npm access edit []' + +access.subcommands = ['public', 'restricted', 'grant', 'revoke', + 'ls-packages', 'ls-collaborators', 'edit'] + +access.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, access.subcommands) + } + + switch (argv[2]) { + case 'grant': + if (argv.length === 3) { + return cb(null, ['read-only', 'read-write']) + } else { + return cb(null, []) + } + break + case 'public': + case 'restricted': + case 'ls-packages': + case 'ls-collaborators': + case 'edit': + return cb(null, []) + case 'revoke': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function access (args, cb) { + var cmd = args.shift() + var params + return parseParams(cmd, args, function (err, p) { + if (err) { return cb(err) } + params = p + return mapToRegistry(params.package, npm.config, invokeCmd) + }) + + function invokeCmd (err, uri, auth, base) { + if (err) { return cb(err) } + params.auth = auth + try { + return npm.registry.access(cmd, uri, params, function (err, data) { + !err && data && console.log(JSON.stringify(data, undefined, 2)) + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + access.usage) + } + } +} + +function parseParams (cmd, args, cb) { + // mapToRegistry will complain if package is undefined, + // but it's not needed for ls-packages + var params = { 'package': '' } + if (cmd === 'grant') { + params.permissions = args.shift() + } + if (['grant', 'revoke', 'ls-packages'].indexOf(cmd) !== -1) { + var entity = (args.shift() || '').split(':') + params.scope = entity[0] + params.team = entity[1] + } + + if (cmd === 'ls-packages') { + if (!params.scope) { + whoami([], true, function (err, scope) { + params.scope = scope + cb(err, params) + }) + } else { + cb(null, params) + } + } else { + getPackage(args.shift(), function (err, pkg) { + if (err) return cb(err) + params.package = pkg + + if (cmd === 'ls-collaborators') params.user = args.shift() + cb(null, params) + }) + } +} + +function getPackage (name, cb) { + if (name && name.trim()) { + cb(null, name.trim()) + } else { + readPackageJson( + resolve(npm.prefix, 'package.json'), + function (err, data) { + if (err) { + if (err.code === 'ENOENT') { + cb(new Error('no package name passed to command and no package.json found')) + } else { + cb(err) + } + } else { + cb(null, data.name) + } + } + ) + } +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/adduser.js b/bin/nodejs5.12.0/node_modules/npm/lib/adduser.js new file mode 100644 index 00000000..9b942254 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/adduser.js @@ -0,0 +1,175 @@ +module.exports = adduser + +var log = require('npmlog') +var npm = require('./npm.js') +var read = require('read') +var userValidate = require('npm-user-validate') +var crypto + +try { + crypto = require('crypto') +} catch (ex) {} + +adduser.usage = 'npm adduser [--registry=url] [--scope=@orgname] [--always-auth]' + +function adduser (args, cb) { + if (!crypto) { + return cb(new Error( + 'You must compile node with ssl support to use the adduser feature' + )) + } + + var creds = npm.config.getCredentialsByURI(npm.config.get('registry')) + var c = { + u: creds.username || '', + p: creds.password || '', + e: creds.email || '' + } + var u = {} + var fns = [readUsername, readPassword, readEmail, save] + + loop() + function loop (er) { + if (er) return cb(er) + var fn = fns.shift() + if (fn) return fn(c, u, loop) + cb() + } +} + +function readUsername (c, u, cb) { + var v = userValidate.username + read({prompt: 'Username: ', default: c.u || ''}, function (er, un) { + if (er) { + return cb(er.message === 'cancelled' ? er.message : er) + } + + // make sure it's valid. we have to do this here, because + // couchdb will only ever say "bad password" with a 401 when + // you try to PUT a _users record that the validate_doc_update + // rejects for *any* reason. + + if (!un) { + return readUsername(c, u, cb) + } + + var error = v(un) + if (error) { + log.warn(error.message) + return readUsername(c, u, cb) + } + + c.changed = c.u !== un + u.u = un + cb(er) + }) +} + +function readPassword (c, u, cb) { + var v = userValidate.pw + + var prompt + if (c.p && !c.changed) { + prompt = 'Password: (or leave unchanged) ' + } else { + prompt = 'Password: ' + } + + read({prompt: prompt, silent: true}, function (er, pw) { + if (er) { + return cb(er.message === 'cancelled' ? er.message : er) + } + + if (!c.changed && pw === '') { + // when the username was not changed, + // empty response means "use the old value" + pw = c.p + } + + if (!pw) { + return readPassword(c, u, cb) + } + + var error = v(pw) + if (error) { + log.warn(error.message) + return readPassword(c, u, cb) + } + + c.changed = c.changed || c.p !== pw + u.p = pw + cb(er) + }) +} + +function readEmail (c, u, cb) { + var v = userValidate.email + var r = { prompt: 'Email: (this IS public) ', default: c.e || '' } + read(r, function (er, em) { + if (er) { + return cb(er.message === 'cancelled' ? er.message : er) + } + + if (!em) { + return readEmail(c, u, cb) + } + + var error = v(em) + if (error) { + log.warn(error.message) + return readEmail(c, u, cb) + } + + u.e = em + cb(er) + }) +} + +function save (c, u, cb) { + // save existing configs, but yank off for this PUT + var uri = npm.config.get('registry') + var scope = npm.config.get('scope') + + // there may be a saved scope and no --registry (for login) + if (scope) { + if (scope.charAt(0) !== '@') scope = '@' + scope + + var scopedRegistry = npm.config.get(scope + ':registry') + var cliRegistry = npm.config.get('registry', 'cli') + if (scopedRegistry && !cliRegistry) uri = scopedRegistry + } + + var params = { + auth: { + username: u.u, + password: u.p, + email: u.e + } + } + npm.registry.adduser(uri, params, function (er, doc) { + if (er) return cb(er) + + // don't want this polluting the configuration + npm.config.del('_token', 'user') + + if (scope) npm.config.set(scope + ':registry', uri, 'user') + + if (doc && doc.token) { + npm.config.setCredentialsByURI(uri, { + token: doc.token + }) + } else { + npm.config.setCredentialsByURI(uri, { + username: u.u, + password: u.p, + email: u.e, + alwaysAuth: npm.config.get('always-auth') + }) + } + + log.info('adduser', 'Authorized user %s', u.u) + var scopeMessage = scope ? ' to scope ' + scope : '' + console.log('Logged in as %s%s on %s.', u.u, scopeMessage, uri) + npm.config.save('user', cb) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/bin.js b/bin/nodejs5.12.0/node_modules/npm/lib/bin.js new file mode 100644 index 00000000..80543afb --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/bin.js @@ -0,0 +1,22 @@ +module.exports = bin + +var npm = require('./npm.js') +var osenv = require('osenv') + +bin.usage = 'npm bin [--global]' + +function bin (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + var b = npm.bin + var PATH = osenv.path() + + if (!silent) console.log(b) + process.nextTick(cb.bind(this, null, b)) + + if (npm.config.get('global') && PATH.indexOf(b) === -1) { + npm.config.get('logstream').write('(not in PATH env variable)\n') + } +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/bugs.js b/bin/nodejs5.12.0/node_modules/npm/lib/bugs.js new file mode 100644 index 00000000..7390abf8 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/bugs.js @@ -0,0 +1,28 @@ +module.exports = bugs + +bugs.usage = 'npm bugs []' + +var npm = require('./npm.js') +var log = require('npmlog') +var opener = require('opener') +var fetchPackageMetadata = require('./fetch-package-metadata.js') + +bugs.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function bugs (args, cb) { + var n = args.length ? args[0] : '.' + fetchPackageMetadata(n, '.', function (er, d) { + if (er) return cb(er) + + var url = d.bugs && ((typeof d.bugs === 'string') ? d.bugs : d.bugs.url) + if (!url) { + url = 'https://www.npmjs.org/package/' + d.name + } + log.silly('bugs', 'url', url) + opener(url, { command: npm.config.get('browser') }, cb) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/build.js b/bin/nodejs5.12.0/node_modules/npm/lib/build.js new file mode 100644 index 00000000..6205490c --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/build.js @@ -0,0 +1,268 @@ +// npm build command + +// everything about the installation after the creation of +// the .npm/{name}/{version}/package folder. +// linking the modules into the npm.root, +// resolving dependencies, etc. + +// This runs AFTER install or link are completed. + +var npm = require('./npm.js') +var log = require('npmlog') +var chain = require('slide').chain +var fs = require('graceful-fs') +var path = require('path') +var lifecycle = require('./utils/lifecycle.js') +var readJson = require('read-package-json') +var link = require('./utils/link.js') +var linkIfExists = link.ifExists +var cmdShim = require('cmd-shim') +var cmdShimIfExists = cmdShim.ifExists +var asyncMap = require('slide').asyncMap +var ini = require('ini') +var writeFile = require('write-file-atomic') +var packageId = require('./utils/package-id.js') + +module.exports = build +build.usage = 'npm build []' + +build._didBuild = {} +build._noLC = {} +function build (args, global, didPre, didRB, cb) { + if (typeof cb !== 'function') { + cb = didRB + didRB = false + } + if (typeof cb !== 'function') { + cb = didPre + didPre = false + } + if (typeof cb !== 'function') { + cb = global + global = npm.config.get('global') + } + + // it'd be nice to asyncMap these, but actually, doing them + // in parallel generally munges up the output from node-waf + var builder = build_(global, didPre, didRB) + chain(args.map(function (arg) { + return function (cb) { + builder(arg, cb) + } + }), cb) +} + +function build_ (global, didPre, didRB) { + return function (folder, cb) { + folder = path.resolve(folder) + if (build._didBuild[folder]) log.info('build', 'already built', folder) + build._didBuild[folder] = true + log.info('build', folder) + readJson(path.resolve(folder, 'package.json'), function (er, pkg) { + if (er) return cb(er) + chain([ + !didPre && [lifecycle, pkg, 'preinstall', folder], + [linkStuff, pkg, folder, global, didRB], + [writeBuiltinConf, pkg, folder], + didPre !== build._noLC && [lifecycle, pkg, 'install', folder], + didPre !== build._noLC && [lifecycle, pkg, 'postinstall', folder], + didPre !== build._noLC && npm.config.get('npat') && [lifecycle, pkg, 'test', folder] + ], + cb) + }) + } +} + +var writeBuiltinConf = build.writeBuiltinConf = function (pkg, folder, cb) { + // the builtin config is "sticky". Any time npm installs + // itself globally, it puts its builtin config file there + var parent = path.dirname(folder) + var dir = npm.globalDir + + if (pkg.name !== 'npm' || + !npm.config.get('global') || + !npm.config.usingBuiltin || + dir !== parent) { + return cb() + } + + var data = ini.stringify(npm.config.sources.builtin.data) + writeFile(path.resolve(folder, 'npmrc'), data, cb) +} + +var linkStuff = build.linkStuff = function (pkg, folder, global, didRB, cb) { + // allow to opt out of linking binaries. + if (npm.config.get('bin-links') === false) return 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 parent = pkg.name && pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder) + var gnm = global && npm.globalDir + var gtop = parent === gnm + + log.info('linkStuff', packageId(pkg)) + log.silly('linkStuff', packageId(pkg), 'has', parent, 'as its parent node_modules') + if (global) log.silly('linkStuff', packageId(pkg), 'is part of a global install') + if (gnm) log.silly('linkStuff', packageId(pkg), 'is installed into a global node_modules') + if (gtop) log.silly('linkStuff', packageId(pkg), 'is installed into the top-level global node_modules') + + shouldWarn(pkg, folder, global, function () { + asyncMap( + [linkBins, linkMans, !didRB && rebuildBundles], + function (fn, cb) { + if (!fn) return cb() + log.verbose(fn.name, packageId(pkg)) + fn(pkg, folder, parent, gtop, cb) + }, + cb + ) + }) +} + +function shouldWarn (pkg, folder, global, cb) { + var parent = path.dirname(folder) + var top = parent === npm.dir + var cwd = npm.localPrefix + + readJson(path.resolve(cwd, 'package.json'), function (er, topPkg) { + if (er) return cb(er) + + var linkedPkg = path.basename(cwd) + var currentPkg = path.basename(folder) + + // current searched package is the linked package on first call + if (linkedPkg !== currentPkg) { + // don't generate a warning if it's listed in dependencies + if (Object.keys(topPkg.dependencies || {}) + .concat(Object.keys(topPkg.devDependencies || {})) + .indexOf(currentPkg) === -1) { + if (top && pkg.preferGlobal && !global) { + log.warn('prefer global', packageId(pkg) + ' should be installed with -g') + } + } + } + + cb() + }) +} + +function rebuildBundles (pkg, folder, parent, gtop, cb) { + if (!npm.config.get('rebuild-bundle')) return cb() + + var deps = Object.keys(pkg.dependencies || {}) + .concat(Object.keys(pkg.devDependencies || {})) + var bundles = pkg.bundleDependencies || pkg.bundledDependencies || [] + + fs.readdir(path.resolve(folder, 'node_modules'), function (er, files) { + // error means no bundles + if (er) return cb() + + log.verbose('rebuildBundles', files) + // don't asyncMap these, because otherwise build script output + // gets interleaved and is impossible to read + chain(files.filter(function (file) { + // rebuild if: + // not a .folder, like .bin or .hooks + return !file.match(/^[\._-]/) && + // not some old 0.x style bundle + file.indexOf('@') === -1 && + // either not a dep, or explicitly bundled + (deps.indexOf(file) === -1 || bundles.indexOf(file) !== -1) + }).map(function (file) { + file = path.resolve(folder, 'node_modules', file) + return function (cb) { + if (build._didBuild[file]) return cb() + log.verbose('rebuild bundle', file) + // if file is not a package dir, then don't do it. + fs.lstat(path.resolve(file, 'package.json'), function (er) { + if (er) return cb() + build_(false)(file, cb) + }) + } + }), cb) + }) +} + +function linkBins (pkg, folder, parent, gtop, cb) { + if (!pkg.bin || !gtop && path.basename(parent) !== 'node_modules') { + return cb() + } + var binRoot = gtop ? npm.globalBin + : path.resolve(parent, '.bin') + log.verbose('link bins', [pkg.bin, binRoot, gtop]) + + asyncMap(Object.keys(pkg.bin), function (b, cb) { + linkBin( + path.resolve(folder, pkg.bin[b]), + path.resolve(binRoot, b), + gtop && folder, + function (er) { + if (er) return cb(er) + // bins should always be executable. + // XXX skip chmod on windows? + var src = path.resolve(folder, pkg.bin[b]) + fs.chmod(src, npm.modes.exec, function (er) { + if (er && er.code === 'ENOENT' && npm.config.get('ignore-scripts')) { + return cb() + } + if (er || !gtop) return cb(er) + var dest = path.resolve(binRoot, b) + var out = npm.config.get('parseable') + ? dest + '::' + src + ':BINFILE' + : dest + ' -> ' + src + log.clearProgress() + console.log(out) + log.showProgress() + cb() + }) + } + ) + }, cb) +} + +function linkBin (from, to, gently, cb) { + if (process.platform !== 'win32') { + return linkIfExists(from, to, gently, cb) + } else { + return cmdShimIfExists(from, to, cb) + } +} + +function linkMans (pkg, folder, parent, gtop, cb) { + if (!pkg.man || !gtop || process.platform === 'win32') return cb() + + var manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man') + log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot) + + // make sure that the mans are unique. + // otherwise, if there are dupes, it'll fail with EEXIST + var set = pkg.man.reduce(function (acc, man) { + acc[path.basename(man)] = man + return acc + }, {}) + pkg.man = pkg.man.filter(function (man) { + return set[path.basename(man)] === man + }) + + asyncMap(pkg.man, function (man, cb) { + if (typeof man !== 'string') return cb() + log.silly('linkMans', 'preparing to link', man) + var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) + if (!parseMan) { + return cb(new Error( + man + ' is not a valid name for a man file. ' + + 'Man files must end with a number, ' + + 'and optionally a .gz suffix if they are compressed.' + )) + } + + var stem = parseMan[1] + var sxn = parseMan[2] + var bn = path.basename(stem) + var manSrc = path.resolve(folder, man) + var manDest = path.join(manRoot, 'man' + sxn, bn) + + linkIfExists(manSrc, manDest, gtop && folder, cb) + }, cb) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/cache.js b/bin/nodejs5.12.0/node_modules/npm/lib/cache.js new file mode 100644 index 00000000..527e1543 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/cache.js @@ -0,0 +1,366 @@ +// XXX lib/utils/tar.js and this file need to be rewritten. + +// URL-to-cache folder mapping: +// : -> ! +// @ -> _ +// http://registry.npmjs.org/foo/version -> cache/http!/... +// + +/* +fetching a URL: +1. Check for URL in inflight URLs. If present, add cb, and return. +2. Acquire lock at {cache}/{sha(url)}.lock + retries = {cache-lock-retries, def=10} + stale = {cache-lock-stale, def=60000} + wait = {cache-lock-wait, def=10000} +3. if lock can't be acquired, then fail +4. fetch url, clear lock, call cbs + +cache folders: +1. urls: http!/server.com/path/to/thing +2. c:\path\to\thing: file!/c!/path/to/thing +3. /path/to/thing: file!/path/to/thing +4. git@ private: git_github.com!npm/npm +5. git://public: git!/github.com/npm/npm +6. git+blah:// git-blah!/server.com/foo/bar + +adding a folder: +1. tar into tmp/random/package.tgz +2. untar into tmp/random/contents/package, stripping one dir piece +3. tar tmp/random/contents/package to cache/n/v/package.tgz +4. untar cache/n/v/package.tgz into cache/n/v/package +5. rm tmp/random + +Adding a url: +1. fetch to tmp/random/package.tgz +2. goto folder(2) + +adding a name@version: +1. registry.get(name/version) +2. if response isn't 304, add url(dist.tarball) + +adding a name@range: +1. registry.get(name) +2. Find a version that satisfies +3. add name@version + +adding a local tarball: +1. untar to tmp/random/{blah} +2. goto folder(2) + +adding a namespaced package: +1. lookup registry for @namespace +2. namespace_registry.get('name') +3. add url(namespace/latest.tarball) +*/ + +exports = module.exports = cache + +cache.unpack = unpack +cache.clean = clean +cache.read = read + +var npm = require('./npm.js') +var fs = require('graceful-fs') +var writeFileAtomic = require('write-file-atomic') +var assert = require('assert') +var rm = require('./utils/gently-rm.js') +var readJson = require('read-package-json') +var log = require('npmlog') +var path = require('path') +var asyncMap = require('slide').asyncMap +var tar = require('./utils/tar.js') +var fileCompletion = require('./utils/completion/file-completion.js') +var deprCheck = require('./utils/depr-check.js') +var addNamed = require('./cache/add-named.js') +var addLocal = require('./cache/add-local.js') +var addRemoteTarball = require('./cache/add-remote-tarball.js') +var addRemoteGit = require('./cache/add-remote-git.js') +var inflight = require('inflight') +var realizePackageSpecifier = require('realize-package-specifier') +var npa = require('npm-package-arg') +var getStat = require('./cache/get-stat.js') +var cachedPackageRoot = require('./cache/cached-package-root.js') +var mapToRegistry = require('./utils/map-to-registry.js') + +cache.usage = 'npm cache add ' + + '\nnpm cache add ' + + '\nnpm cache add ' + + '\nnpm cache add ' + + '\nnpm cache add @' + + '\nnpm cache ls []' + + '\nnpm cache clean [[@]]' + +cache.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, ['add', 'ls', 'clean']) + } + + switch (argv[2]) { + case 'clean': + case 'ls': + // cache and ls are easy, because the completion is + // what ls_ returns anyway. + // just get the partial words, minus the last path part + var p = path.dirname(opts.partialWords.slice(3).join('/')) + if (p === '.') p = '' + return ls_(p, 2, cb) + case 'add': + // Same semantics as install and publish. + return npm.commands.install.completion(opts, cb) + } +} + +function cache (args, cb) { + var cmd = args.shift() + switch (cmd) { + case 'rm': case 'clear': case 'clean': return clean(args, cb) + case 'list': case 'sl': case 'ls': return ls(args, cb) + case 'add': return add(args, npm.prefix, cb) + default: return cb('Usage: ' + cache.usage) + } +} + +// if the pkg and ver are in the cache, then +// just do a readJson and return. +// if they're not, then fetch them from the registry. +function read (name, ver, forceBypass, cb) { + assert(typeof name === 'string', 'must include name of module to install') + assert(typeof cb === 'function', 'must include callback') + + if (forceBypass === undefined || forceBypass === null) forceBypass = true + + var root = cachedPackageRoot({name: name, version: ver}) + function c (er, data) { + if (er) log.verbose('cache', 'addNamed error for', name + '@' + ver, er) + if (data) deprCheck(data) + + return cb(er, data) + } + + if (forceBypass && npm.config.get('force')) { + log.verbose('using force', 'skipping cache') + return addNamed(name, ver, null, c) + } + + readJson(path.join(root, 'package', 'package.json'), function (er, data) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + + if (data) { + if (!data.name) return cb(new Error('No name provided')) + if (!data.version) return cb(new Error('No version provided')) + } + + if (er) return addNamed(name, ver, null, c) + else c(er, data) + }) +} + +function normalize (args) { + var normalized = '' + if (args.length > 0) { + var a = npa(args[0]) + if (a.name) normalized = a.name + if (a.rawSpec) normalized = [normalized, a.rawSpec].join('/') + if (args.length > 1) normalized = [normalized].concat(args.slice(1)).join('/') + } + + if (normalized.substr(-1) === '/') { + normalized = normalized.substr(0, normalized.length - 1) + } + normalized = path.normalize(normalized) + log.silly('ls', 'normalized', normalized) + + return normalized +} + +// npm cache ls [] +function ls (args, cb) { + var prefix = npm.config.get('cache') + if (prefix.indexOf(process.env.HOME) === 0) { + prefix = '~' + prefix.substr(process.env.HOME.length) + } + ls_(normalize(args), npm.config.get('depth'), function (er, files) { + console.log(files.map(function (f) { + return path.join(prefix, f) + }).join('\n').trim()) + cb(er, files) + }) +} + +// Calls cb with list of cached pkgs matching show. +function ls_ (req, depth, cb) { + return fileCompletion(npm.cache, req, depth, cb) +} + +// npm cache clean [] +function clean (args, cb) { + assert(typeof cb === 'function', 'must include callback') + + if (!args) args = [] + + var f = path.join(npm.cache, normalize(args)) + if (f === npm.cache) { + fs.readdir(npm.cache, function (er, files) { + if (er) return cb() + asyncMap( + files.filter(function (f) { + return npm.config.get('force') || f !== '-' + }).map(function (f) { + return path.join(npm.cache, f) + }), + rm, + cb + ) + }) + } else { + rm(f, cb) + } +} + +// npm cache add +// npm cache add +// npm cache add +// npm cache add +cache.add = function (pkg, ver, where, scrub, cb) { + assert(typeof pkg === 'string', 'must include name of package to install') + assert(typeof cb === 'function', 'must include callback') + + if (scrub) { + return clean([], function (er) { + if (er) return cb(er) + add([pkg, ver], where, cb) + }) + } + return add([pkg, ver], where, cb) +} + +var adding = 0 +function add (args, where, cb) { + // this is hot code. almost everything passes through here. + // the args can be any of: + // ['url'] + // ['pkg', 'version'] + // ['pkg@version'] + // ['pkg', 'url'] + // This is tricky, because urls can contain @ + // Also, in some cases we get [name, null] rather + // that just a single argument. + + var usage = 'Usage:\n' + + ' npm cache add \n' + + ' npm cache add @\n' + + ' npm cache add \n' + + ' npm cache add \n' + var spec + + log.silly('cache add', 'args', args) + + if (args[1] === undefined) args[1] = null + + // at this point the args length must ==2 + if (args[1] !== null) { + spec = args[0] + '@' + args[1] + } else if (args.length === 2) { + spec = args[0] + } + + log.verbose('cache add', 'spec', spec) + + if (!spec) return cb(usage) + + adding++ + cb = afterAdd(cb) + + realizePackageSpecifier(spec, where, function (err, p) { + if (err) return cb(err) + + log.silly('cache add', 'parsed spec', p) + + switch (p.type) { + case 'local': + case 'directory': + addLocal(p, null, cb) + break + case 'remote': + // get auth, if possible + mapToRegistry(p.raw, npm.config, function (err, uri, auth) { + if (err) return cb(err) + + addRemoteTarball(p.spec, { name: p.name }, null, auth, cb) + }) + break + case 'git': + case 'hosted': + addRemoteGit(p.rawSpec, cb) + break + default: + if (p.name) return addNamed(p.name, p.spec, null, cb) + + cb(new Error("couldn't figure out how to install " + spec)) + } + }) +} + +function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) { + if (typeof cb !== 'function') { + cb = gid + gid = null + } + if (typeof cb !== 'function') { + cb = uid + uid = null + } + if (typeof cb !== 'function') { + cb = fMode + fMode = null + } + if (typeof cb !== 'function') { + cb = dMode + dMode = null + } + + read(pkg, ver, false, function (er) { + if (er) { + log.error('unpack', 'Could not read data for %s', pkg + '@' + ver) + return cb(er) + } + npm.commands.unbuild([unpackTarget], true, function (er) { + if (er) return cb(er) + tar.unpack( + path.join(cachedPackageRoot({ name: pkg, version: ver }), 'package.tgz'), + unpackTarget, + dMode, fMode, + uid, gid, + cb + ) + }) + }) +} + +function afterAdd (cb) { + return function (er, data) { + adding-- + + if (er || !data || !data.name || !data.version) return cb(er, data) + log.silly('cache', 'afterAdd', data.name + '@' + data.version) + + // Save the resolved, shasum, etc. into the data so that the next + // time we load from this cached data, we have all the same info. + // Ignore if it fails. + var pj = path.join(cachedPackageRoot(data), 'package', 'package.json') + + var done = inflight(pj, cb) + if (!done) return log.verbose('afterAdd', pj, 'already in flight; not writing') + log.verbose('afterAdd', pj, 'not in flight; writing') + + getStat(function (er, cs) { + if (er) return done(er) + writeFileAtomic(pj, JSON.stringify(data), { chown: cs }, function (er) { + if (!er) log.verbose('afterAdd', pj, 'written') + return done(null, data) + }) + }) + } +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/completion.js b/bin/nodejs5.12.0/node_modules/npm/lib/completion.js new file mode 100644 index 00000000..56a8f5ee --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/completion.js @@ -0,0 +1,247 @@ + +module.exports = completion + +completion.usage = 'source <(npm completion)' + +var npm = require('./npm.js') +var npmconf = require('./config/core.js') +var configDefs = npmconf.defs +var configTypes = configDefs.types +var shorthands = configDefs.shorthands +var nopt = require('nopt') +var configNames = Object.keys(configTypes) + .filter(function (e) { return e.charAt(0) !== '_' }) +var shorthandNames = Object.keys(shorthands) +var allConfs = configNames.concat(shorthandNames) +var once = require('once') + +completion.completion = function (opts, cb) { + if (opts.w > 3) return cb() + + var fs = require('graceful-fs') + var path = require('path') + var bashExists = null + var zshExists = null + fs.stat(path.resolve(process.env.HOME, '.bashrc'), function (er) { + bashExists = !er + next() + }) + fs.stat(path.resolve(process.env.HOME, '.zshrc'), function (er) { + zshExists = !er + next() + }) + function next () { + if (zshExists === null || bashExists === null) return + var out = [] + if (zshExists) out.push('~/.zshrc') + if (bashExists) out.push('~/.bashrc') + if (opts.w === 2) { + out = out.map(function (m) { + return ['>>', m] + }) + } + cb(null, out) + } +} + +function completion (args, cb) { + if (process.platform === 'win32' && !(/^MINGW(32|64)$/.test(process.env.MSYSTEM))) { + var e = new Error('npm completion supported only in MINGW / Git bash on Windows') + e.code = 'ENOTSUP' + e.errno = require('constants').ENOTSUP + return cb(e) + } + + // if the COMP_* isn't in the env, then just dump the script. + if (process.env.COMP_CWORD === undefined || + process.env.COMP_LINE === undefined || + process.env.COMP_POINT === undefined) { + return dumpScript(cb) + } + + console.error(process.env.COMP_CWORD) + console.error(process.env.COMP_LINE) + console.error(process.env.COMP_POINT) + + // get the partial line and partial word, + // if the point isn't at the end. + // ie, tabbing at: npm foo b|ar + var w = +process.env.COMP_CWORD + var words = args.map(unescape) + var word = words[w] + var line = process.env.COMP_LINE + var point = +process.env.COMP_POINT + var partialLine = line.substr(0, point) + var partialWords = words.slice(0, w) + + // figure out where in that last word the point is. + var partialWord = args[w] + var i = partialWord.length + while (partialWord.substr(0, i) !== partialLine.substr(-1 * i) && i > 0) { + i-- + } + partialWord = unescape(partialWord.substr(0, i)) + partialWords.push(partialWord) + + var opts = { + words: words, + w: w, + word: word, + line: line, + lineLength: line.length, + point: point, + partialLine: partialLine, + partialWords: partialWords, + partialWord: partialWord, + raw: args + } + + cb = wrapCb(cb, opts) + + console.error(opts) + + if (partialWords.slice(0, -1).indexOf('--') === -1) { + if (word.charAt(0) === '-') return configCompl(opts, cb) + if (words[w - 1] && + words[w - 1].charAt(0) === '-' && + !isFlag(words[w - 1])) { + // awaiting a value for a non-bool config. + // don't even try to do this for now + console.error('configValueCompl') + return configValueCompl(opts, cb) + } + } + + // try to find the npm command. + // it's the first thing after all the configs. + // take a little shortcut and use npm's arg parsing logic. + // don't have to worry about the last arg being implicitly + // boolean'ed, since the last block will catch that. + var parsed = opts.conf = + nopt(configTypes, shorthands, partialWords.slice(0, -1), 0) + // check if there's a command already. + console.error(parsed) + var cmd = parsed.argv.remain[1] + if (!cmd) return cmdCompl(opts, cb) + + Object.keys(parsed).forEach(function (k) { + npm.config.set(k, parsed[k]) + }) + + // at this point, if words[1] is some kind of npm command, + // then complete on it. + // otherwise, do nothing + cmd = npm.commands[cmd] + if (cmd && cmd.completion) return cmd.completion(opts, cb) + + // nothing to do. + cb() +} + +function dumpScript (cb) { + var fs = require('graceful-fs') + var path = require('path') + var p = path.resolve(__dirname, 'utils/completion.sh') + + // The Darwin patch below results in callbacks first for the write and then + // for the error handler, so make sure we only call our callback once. + cb = once(cb) + + fs.readFile(p, 'utf8', function (er, d) { + if (er) return cb(er) + d = d.replace(/^\#\!.*?\n/, '') + + process.stdout.write(d, function () { cb() }) + process.stdout.on('error', function (er) { + // Darwin is a real dick sometimes. + // + // This is necessary because the "source" or "." program in + // bash on OS X closes its file argument before reading + // from it, meaning that you get exactly 1 write, which will + // work most of the time, and will always raise an EPIPE. + // + // Really, one should not be tossing away EPIPE errors, or any + // errors, so casually. But, without this, `. <(npm completion)` + // can never ever work on OS X. + if (er.errno === 'EPIPE') er = null + cb(er) + }) + }) +} + +function unescape (w) { + if (w.charAt(0) === '\'') return w.replace(/^'|'$/g, '') + else return w.replace(/\\ /g, ' ') +} + +function escape (w) { + if (!w.match(/\s+/)) return w + return '\'' + w + '\'' +} + +// The command should respond with an array. Loop over that, +// wrapping quotes around any that have spaces, and writing +// them to stdout. Use console.log, not the outfd config. +// If any of the items are arrays, then join them with a space. +// Ie, returning ['a', 'b c', ['d', 'e']] would allow it to expand +// to: 'a', 'b c', or 'd' 'e' +function wrapCb (cb, opts) { + return function (er, compls) { + if (!Array.isArray(compls)) compls = compls ? [compls] : [] + compls = compls.map(function (c) { + if (Array.isArray(c)) c = c.map(escape).join(' ') + else c = escape(c) + return c + }) + + if (opts.partialWord) { + compls = compls.filter(function (c) { + return c.indexOf(opts.partialWord) === 0 + }) + } + + console.error([er && er.stack, compls, opts.partialWord]) + if (er || compls.length === 0) return cb(er) + + console.log(compls.join('\n')) + cb() + } +} + +// the current word has a dash. Return the config names, +// with the same number of dashes as the current word has. +function configCompl (opts, cb) { + var word = opts.word + var split = word.match(/^(-+)((?:no-)*)(.*)$/) + var dashes = split[1] + var no = split[2] + var flags = configNames.filter(isFlag) + console.error(flags) + + return cb(null, allConfs.map(function (c) { + return dashes + c + }).concat(flags.map(function (f) { + return dashes + (no || 'no-') + f + }))) +} + +// expand with the valid values of various config values. +// not yet implemented. +function configValueCompl (opts, cb) { + console.error('configValue', opts) + return cb(null, []) +} + +// check if the thing is a flag or not. +function isFlag (word) { + // shorthands never take args. + var split = word.match(/^(-*)((?:no-)+)?(.*)$/) + var no = split[2] + var conf = split[3] + return no || configTypes[conf] === Boolean || shorthands[conf] +} + +// complete against the npm commands +function cmdCompl (opts, cb) { + return cb(null, npm.fullList) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/config.js b/bin/nodejs5.12.0/node_modules/npm/lib/config.js new file mode 100644 index 00000000..5d74adb7 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/config.js @@ -0,0 +1,301 @@ + +module.exports = config + +config.usage = 'npm config set ' + + '\nnpm config get []' + + '\nnpm config delete ' + + '\nnpm config list' + + '\nnpm config edit' + + '\nnpm set ' + + '\nnpm get []' + +var log = require('npmlog') +var npm = require('./npm.js') +var npmconf = require('./config/core.js') +var fs = require('graceful-fs') +var writeFileAtomic = require('write-file-atomic') +var types = npmconf.defs.types +var ini = require('ini') +var editor = require('editor') +var os = require('os') +var umask = require('./utils/umask') + +config.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv[1] !== 'config') argv.unshift('config') + if (argv.length === 2) { + var cmds = ['get', 'set', 'delete', 'ls', 'rm', 'edit'] + if (opts.partialWord !== 'l') cmds.push('list') + return cb(null, cmds) + } + + var action = argv[2] + switch (action) { + case 'set': + // todo: complete with valid values, if possible. + if (argv.length > 3) return cb(null, []) + // fallthrough + /*eslint no-fallthrough:0*/ + case 'get': + case 'delete': + case 'rm': + return cb(null, Object.keys(types)) + case 'edit': + case 'list': case 'ls': + return cb(null, []) + default: return cb(null, []) + } +} + +// npm config set key value +// npm config get key +// npm config list +function config (args, cb) { + var action = args.shift() + switch (action) { + case 'set': return set(args[0], args[1], cb) + case 'get': return get(args[0], cb) + case 'delete': case 'rm': case 'del': return del(args[0], cb) + case 'list': case 'ls': return list(cb) + case 'edit': return edit(cb) + default: return unknown(action, cb) + } +} + +function edit (cb) { + var e = npm.config.get('editor') + var which = npm.config.get('global') ? 'global' : 'user' + var f = npm.config.get(which + 'config') + if (!e) return cb(new Error('No EDITOR config or environ set.')) + npm.config.save(which, function (er) { + if (er) return cb(er) + fs.readFile(f, 'utf8', function (er, data) { + if (er) data = '' + data = [ + ';;;;', + '; npm ' + (npm.config.get('global') + ? 'globalconfig' : 'userconfig') + ' file', + '; this is a simple ini-formatted file', + '; lines that start with semi-colons are comments.', + '; read `npm help config` for help on the various options', + ';;;;', + '', + data + ].concat([ + ';;;;', + '; all options with default values', + ';;;;' + ]).concat(Object.keys(npmconf.defaults).reduce(function (arr, key) { + var obj = {} + obj[key] = npmconf.defaults[key] + if (key === 'logstream') return arr + return arr.concat( + ini.stringify(obj) + .replace(/\n$/m, '') + .replace(/^/g, '; ') + .replace(/\n/g, '\n; ') + .split('\n')) + }, [])) + .concat(['']) + .join(os.EOL) + writeFileAtomic( + f, + data, + function (er) { + if (er) return cb(er) + editor(f, { editor: e }, cb) + } + ) + }) + }) +} + +function del (key, cb) { + if (!key) return cb(new Error('no key provided')) + var where = npm.config.get('global') ? 'global' : 'user' + npm.config.del(key, where) + npm.config.save(where, cb) +} + +function set (key, val, cb) { + if (key === undefined) { + return unknown('', cb) + } + if (val === undefined) { + if (key.indexOf('=') !== -1) { + var k = key.split('=') + key = k.shift() + val = k.join('=') + } else { + val = '' + } + } + key = key.trim() + val = val.trim() + log.info('config', 'set %j %j', key, val) + var where = npm.config.get('global') ? 'global' : 'user' + if (key.match(/umask/)) val = umask.fromString(val) + npm.config.set(key, val, where) + npm.config.save(where, cb) +} + +function get (key, cb) { + if (!key) return list(cb) + if (!publicVar(key)) { + return cb(new Error('---sekretz---')) + } + var val = npm.config.get(key) + if (key.match(/umask/)) val = umask.toString(val) + console.log(val) + cb() +} + +function sort (a, b) { + return a > b ? 1 : -1 +} + +function publicVar (k) { + return !(k.charAt(0) === '_' || + k.indexOf(':_') !== -1 || + types[k] !== types[k]) +} + +function getKeys (data) { + return Object.keys(data).filter(publicVar).sort(sort) +} + +function list (cb) { + var msg = '' + var long = npm.config.get('long') + + var cli = npm.config.sources.cli.data + var cliKeys = getKeys(cli) + if (cliKeys.length) { + msg += '; cli configs\n' + cliKeys.forEach(function (k) { + if (cli[k] && typeof cli[k] === 'object') return + if (k === 'argv') return + msg += k + ' = ' + JSON.stringify(cli[k]) + '\n' + }) + msg += '\n' + } + + // env configs + var env = npm.config.sources.env.data + var envKeys = getKeys(env) + if (envKeys.length) { + msg += '; environment configs\n' + envKeys.forEach(function (k) { + if (env[k] !== npm.config.get(k)) { + if (!long) return + msg += '; ' + k + ' = ' + + JSON.stringify(env[k]) + ' (overridden)\n' + } else msg += k + ' = ' + JSON.stringify(env[k]) + '\n' + }) + msg += '\n' + } + + // project config file + var project = npm.config.sources.project + var pconf = project.data + var ppath = project.path + var pconfKeys = getKeys(pconf) + if (pconfKeys.length) { + msg += '; project config ' + ppath + '\n' + pconfKeys.forEach(function (k) { + var val = (k.charAt(0) === '_') + ? '---sekretz---' + : JSON.stringify(pconf[k]) + if (pconf[k] !== npm.config.get(k)) { + if (!long) return + msg += '; ' + k + ' = ' + val + ' (overridden)\n' + } else msg += k + ' = ' + val + '\n' + }) + msg += '\n' + } + + // user config file + var uconf = npm.config.sources.user.data + var uconfKeys = getKeys(uconf) + if (uconfKeys.length) { + msg += '; userconfig ' + npm.config.get('userconfig') + '\n' + uconfKeys.forEach(function (k) { + var val = (k.charAt(0) === '_') + ? '---sekretz---' + : JSON.stringify(uconf[k]) + if (uconf[k] !== npm.config.get(k)) { + if (!long) return + msg += '; ' + k + ' = ' + val + ' (overridden)\n' + } else msg += k + ' = ' + val + '\n' + }) + msg += '\n' + } + + // global config file + var gconf = npm.config.sources.global.data + var gconfKeys = getKeys(gconf) + if (gconfKeys.length) { + msg += '; globalconfig ' + npm.config.get('globalconfig') + '\n' + gconfKeys.forEach(function (k) { + var val = (k.charAt(0) === '_') + ? '---sekretz---' + : JSON.stringify(gconf[k]) + if (gconf[k] !== npm.config.get(k)) { + if (!long) return + msg += '; ' + k + ' = ' + val + ' (overridden)\n' + } else msg += k + ' = ' + val + '\n' + }) + msg += '\n' + } + + // builtin config file + var builtin = npm.config.sources.builtin || {} + if (builtin && builtin.data) { + var bconf = builtin.data + var bpath = builtin.path + var bconfKeys = getKeys(bconf) + if (bconfKeys.length) { + msg += '; builtin config ' + bpath + '\n' + bconfKeys.forEach(function (k) { + var val = (k.charAt(0) === '_') + ? '---sekretz---' + : JSON.stringify(bconf[k]) + if (bconf[k] !== npm.config.get(k)) { + if (!long) return + msg += '; ' + k + ' = ' + val + ' (overridden)\n' + } else msg += k + ' = ' + val + '\n' + }) + msg += '\n' + } + } + + // only show defaults if --long + if (!long) { + msg += '; node bin location = ' + process.execPath + '\n' + + '; cwd = ' + process.cwd() + '\n' + + '; HOME = ' + process.env.HOME + '\n' + + '; "npm config ls -l" to show all defaults.\n' + + console.log(msg) + return cb() + } + + var defaults = npmconf.defaults + var defKeys = getKeys(defaults) + msg += '; default values\n' + defKeys.forEach(function (k) { + if (defaults[k] && typeof defaults[k] === 'object') return + var val = JSON.stringify(defaults[k]) + if (defaults[k] !== npm.config.get(k)) { + msg += '; ' + k + ' = ' + val + ' (overridden)\n' + } else msg += k + ' = ' + val + '\n' + }) + msg += '\n' + + console.log(msg) + return cb() +} + +function unknown (action, cb) { + cb('Usage:\n' + config.usage) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/dedupe.js b/bin/nodejs5.12.0/node_modules/npm/lib/dedupe.js new file mode 100644 index 00000000..ec182260 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/dedupe.js @@ -0,0 +1,163 @@ +var util = require('util') +var path = require('path') +var validate = require('aproba') +var without = require('lodash.without') +var asyncMap = require('slide').asyncMap +var chain = require('slide').chain +var npa = require('npm-package-arg') +var log = require('npmlog') +var npm = require('./npm.js') +var Installer = require('./install.js').Installer +var findRequirement = require('./install/deps.js').findRequirement +var earliestInstallable = require('./install/deps.js').earliestInstallable +var checkPermissions = require('./install/check-permissions.js') +var decomposeActions = require('./install/decompose-actions.js') +var loadExtraneous = require('./install/deps.js').loadExtraneous +var filterInvalidActions = require('./install/filter-invalid-actions.js') +var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var sortActions = require('./install/diff-trees.js').sortActions +var moduleName = require('./utils/module-name.js') +var packageId = require('./utils/package-id.js') +var childPath = require('./utils/child-path.js') + +module.exports = dedupe +module.exports.Deduper = Deduper + +dedupe.usage = 'npm dedupe' + +function dedupe (args, cb) { + validate('AF', arguments) + // the /path/to/node_modules/.. + var where = path.resolve(npm.dir, '..') + var dryrun = false + if (npm.command.match(/^find/)) dryrun = true + if (npm.config.get('dry-run')) dryrun = true + + new Deduper(where, dryrun).run(cb) +} + +function Deduper (where, dryrun) { + validate('SB', arguments) + Installer.call(this, where, dryrun, []) + this.noPackageJsonOk = true + this.topLevelLifecycles = false +} +util.inherits(Deduper, Installer) + +Deduper.prototype.normalizeTree = function (log, cb) { + validate('OF', arguments) + log.silly('dedupe', 'normalizeTree') + // If we're looking globally only look at the one package we're operating on + if (npm.config.get('global')) { + var args = this.args + this.currentTree.children = this.currentTree.children.filter(function (child) { + return args.filter(function (arg) { return arg === moduleName(child) }).length + }) + } + Installer.prototype.normalizeTree.call(this, log, cb) +} + +Deduper.prototype.loadIdealTree = function (cb) { + validate('F', arguments) + log.silly('install', 'loadIdealTree') + + var self = this + chain([ + [this.newTracker(this.progress.loadIdealTree, 'cloneCurrentTree')], + [this, this.cloneCurrentTreeToIdealTree], + [this, this.finishTracker, 'cloneCurrentTree'], + + [this.newTracker(this.progress.loadIdealTree, 'loadAllDepsIntoIdealTree', 10)], + [ function (next) { + loadExtraneous(self.idealTree, self.progress.loadAllDepsIntoIdealTree, next) + } ], + [this, this.finishTracker, 'loadAllDepsIntoIdealTree'], + + [this, function (next) { recalculateMetadata(this.idealTree, log, next) }] + ], cb) +} + +Deduper.prototype.generateActionsToTake = function (cb) { + validate('F', arguments) + log.silly('dedupe', 'generateActionsToTake') + chain([ + [this.newTracker(log, 'hoist', 1)], + [hoistChildren, this.idealTree, this.differences], + [this, this.finishTracker, 'hoist'], + [this.newTracker(log, 'sort-actions', 1)], + [this, function (next) { + this.differences = sortActions(this.differences) + next() + }], + [this, this.finishTracker, 'sort-actions'], + [filterInvalidActions, this.where, this.differences], + [checkPermissions, this.differences], + [decomposeActions, this.differences, this.todo] + ], cb) +} + +function move (node, hoistTo, diff) { + node.parent.children = without(node.parent.children, node) + hoistTo.children.push(node) + node.fromPath = node.path + node.path = childPath(hoistTo.path, node) + node.parent = hoistTo + if (!diff.filter(function (action) { return action[0] === 'move' && action[1] === node }).length) { + diff.push(['move', node]) + } +} + +function moveRemainingChildren (node, diff) { + node.children.forEach(function (child) { + move(child, node, diff) + moveRemainingChildren(child, diff) + }) +} + +function remove (child, diff, done) { + remove_(child, diff, {}, done) +} + +function remove_ (child, diff, seen, done) { + if (seen[child.path]) return done() + seen[child.path] = true + diff.push(['remove', child]) + child.parent.children = without(child.parent.children, child) + asyncMap(child.children, function (child, next) { + remove_(child, diff, seen, next) + }, done) +} + +function hoistChildren (tree, diff, next) { + hoistChildren_(tree, diff, {}, next) +} + +function hoistChildren_ (tree, diff, seen, next) { + validate('OAOF', arguments) + if (seen[tree.path]) return next() + seen[tree.path] = true + asyncMap(tree.children, function (child, done) { + if (!tree.parent) return hoistChildren_(child, diff, seen, done) + var better = findRequirement(tree.parent, moduleName(child), child.package._requested || npa(packageId(child))) + if (better) { + return chain([ + [remove, child, diff], + [recalculateMetadata, tree, log] + ], done) + } + var hoistTo = earliestInstallable(tree, tree.parent, child.package) + if (hoistTo) { + move(child, hoistTo, diff) + chain([ + [recalculateMetadata, hoistTo, log], + [hoistChildren_, child, diff, seen], + [ function (next) { + moveRemainingChildren(child, diff) + next() + } ] + ], done) + } else { + done() + } + }, next) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/deprecate.js b/bin/nodejs5.12.0/node_modules/npm/lib/deprecate.js new file mode 100644 index 00000000..33d226ac --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/deprecate.js @@ -0,0 +1,54 @@ +var npm = require('./npm.js') +var mapToRegistry = require('./utils/map-to-registry.js') +var npa = require('npm-package-arg') + +module.exports = deprecate + +deprecate.usage = 'npm deprecate [@] ' + +deprecate.completion = function (opts, cb) { + // first, get a list of remote packages this user owns. + // once we have a user account, then don't complete anything. + if (opts.conf.argv.remain.length > 2) return cb() + // get the list of packages by user + var path = '/-/by-user/' + mapToRegistry(path, npm.config, function (er, uri, c) { + if (er) return cb(er) + + if (!(c && c.username)) return cb() + + var params = { + timeout: 60000, + auth: c + } + npm.registry.get(uri + c.username, params, function (er, list) { + if (er) return cb() + console.error(list) + return cb(null, list[c.username]) + }) + }) +} + +function deprecate (args, cb) { + var pkg = args[0] + var msg = args[1] + if (msg === undefined) return cb('Usage: ' + deprecate.usage) + + // fetch the data and make sure it exists. + var p = npa(pkg) + + // npa makes the default spec "latest", but for deprecation + // "*" is the appropriate default. + if (p.rawSpec === '') p.spec = '*' + + mapToRegistry(p.name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version: p.spec, + message: msg, + auth: auth + } + npm.registry.deprecate(uri, params, cb) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/dist-tag.js b/bin/nodejs5.12.0/node_modules/npm/lib/dist-tag.js new file mode 100644 index 00000000..11070cb6 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/dist-tag.js @@ -0,0 +1,153 @@ +module.exports = distTag + +var log = require('npmlog') +var npa = require('npm-package-arg') +var semver = require('semver') + +var npm = require('./npm.js') +var mapToRegistry = require('./utils/map-to-registry.js') +var readLocalPkg = require('./utils/read-local-package.js') + +distTag.usage = 'npm dist-tag add @ []' + + '\nnpm dist-tag rm ' + + '\nnpm dist-tag ls []' + +distTag.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, ['add', 'rm', 'ls']) + } + + switch (argv[2]) { + default: + return cb() + } +} + +function distTag (args, cb) { + var cmd = args.shift() + switch (cmd) { + case 'add': case 'a': case 'set': case 's': + return add(args[0], args[1], cb) + case 'rm': case 'r': case 'del': case 'd': case 'remove': + return remove(args[1], args[0], cb) + case 'ls': case 'l': case 'sl': case 'list': + return list(args[0], cb) + default: + return cb('Usage:\n' + distTag.usage) + } +} + +function add (spec, tag, cb) { + var thing = npa(spec || '') + var pkg = thing.name + var version = thing.rawSpec + var t = (tag || npm.config.get('tag')).trim() + + log.verbose('dist-tag add', t, 'to', pkg + '@' + version) + + if (!pkg || !version || !t) return cb('Usage:\n' + distTag.usage) + + if (semver.validRange(t)) { + var er = new Error('Tag name must not be a valid SemVer range: ' + t) + return cb(er) + } + + fetchTags(pkg, function (er, tags) { + if (er) return cb(er) + + if (tags[t] === version) { + log.warn('dist-tag add', t, 'is already set to version', version) + return cb() + } + tags[t] = version + + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + var params = { + 'package': pkg, + distTag: t, + version: version, + auth: auth + } + + npm.registry.distTags.add(base, params, function (er) { + if (er) return cb(er) + + console.log('+' + t + ': ' + pkg + '@' + version) + cb() + }) + }) + }) +} + +function remove (tag, pkg, cb) { + log.verbose('dist-tag del', tag, 'from', pkg) + + fetchTags(pkg, function (er, tags) { + if (er) return cb(er) + + if (!tags[tag]) { + log.info('dist-tag del', tag, 'is not a dist-tag on', pkg) + return cb(new Error(tag + ' is not a dist-tag on ' + pkg)) + } + + var version = tags[tag] + delete tags[tag] + + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + var params = { + 'package': pkg, + distTag: tag, + auth: auth + } + + npm.registry.distTags.rm(base, params, function (er) { + if (er) return cb(er) + + console.log('-' + tag + ': ' + pkg + '@' + version) + cb() + }) + }) + }) +} + +function list (pkg, cb) { + if (!pkg) { + return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(distTag.usage) + list(pkg, cb) + }) + } + + fetchTags(pkg, function (er, tags) { + if (er) { + log.error('dist-tag ls', "Couldn't get dist-tag data for", pkg) + return cb(er) + } + var msg = Object.keys(tags).map(function (k) { + return k + ': ' + tags[k] + }).sort().join('\n') + console.log(msg) + cb(er, tags) + }) +} + +function fetchTags (pkg, cb) { + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + if (er) return cb(er) + + var params = { + 'package': pkg, + auth: auth + } + npm.registry.distTags.fetch(base, params, function (er, tags) { + if (er) return cb(er) + if (!tags || !Object.keys(tags).length) { + return cb(new Error('No dist-tags found for ' + pkg)) + } + + cb(null, tags) + }) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/docs.js b/bin/nodejs5.12.0/node_modules/npm/lib/docs.js new file mode 100644 index 00000000..2d2c802d --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/docs.js @@ -0,0 +1,39 @@ +module.exports = docs + +docs.usage = 'npm docs ' + + '\nnpm docs .' + +var npm = require('./npm.js') +var opener = require('opener') +var log = require('npmlog') +var fetchPackageMetadata = require('./fetch-package-metadata.js') + +docs.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function docs (args, cb) { + if (!args || !args.length) args = ['.'] + var pending = args.length + log.silly('docs', args) + args.forEach(function (proj) { + getDoc(proj, function (err) { + if (err) { + return cb(err) + } + --pending || cb() + }) + }) +} + +function getDoc (project, cb) { + log.silly('getDoc', project) + fetchPackageMetadata(project, '.', function (er, d) { + if (er) return cb(er) + var url = d.homepage + if (!url) url = 'https://www.npmjs.org/package/' + d.name + return opener(url, {command: npm.config.get('browser')}, cb) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/edit.js b/bin/nodejs5.12.0/node_modules/npm/lib/edit.js new file mode 100644 index 00000000..40968b2d --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/edit.js @@ -0,0 +1,34 @@ +// npm edit +// open the package folder in the $EDITOR + +module.exports = edit +edit.usage = 'npm edit [@]' + +edit.completion = require('./utils/completion/installed-shallow.js') + +var npm = require('./npm.js') +var path = require('path') +var fs = require('graceful-fs') +var editor = require('editor') + +function edit (args, cb) { + var p = args[0] + if (args.length !== 1 || !p) return cb(edit.usage) + var e = npm.config.get('editor') + if (!e) { + return cb(new Error( + "No editor set. Set the 'editor' config, or $EDITOR environ." + )) + } + p = p.split('/') + .join('/node_modules/') + .replace(/(\/node_modules)+/, '/node_modules') + var f = path.resolve(npm.dir, p) + fs.lstat(f, function (er) { + if (er) return cb(er) + editor(f, { editor: e }, function (er) { + if (er) return cb(er) + npm.commands.rebuild(args, cb) + }) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/explore.js b/bin/nodejs5.12.0/node_modules/npm/lib/explore.js new file mode 100644 index 00000000..ed50d80b --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/explore.js @@ -0,0 +1,43 @@ +// npm explore [@] +// open a subshell to the package folder. + +module.exports = explore +explore.usage = 'npm explore [ -- ]' +explore.completion = require('./utils/completion/installed-shallow.js') + +var npm = require('./npm.js') +var spawn = require('./utils/spawn') +var path = require('path') +var fs = require('graceful-fs') + +function explore (args, cb) { + if (args.length < 1 || !args[0]) return cb(explore.usage) + var p = args.shift() + args = args.join(' ').trim() + if (args) args = ['-c', args] + else args = [] + + var cwd = path.resolve(npm.dir, p) + var sh = npm.config.get('shell') + fs.stat(cwd, function (er, s) { + if (er || !s.isDirectory()) { + return cb(new Error( + "It doesn't look like " + p + ' is installed.' + )) + } + + if (!args.length) { + console.log( + '\nExploring ' + cwd + '\n' + + "Type 'exit' or ^D when finished\n" + ) + } + + var shell = spawn(sh, args, { cwd: cwd, stdio: 'inherit' }) + shell.on('close', function (er) { + // only fail if non-interactive. + if (!args.length) return cb() + cb(er) + }) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/fetch-package-metadata.js b/bin/nodejs5.12.0/node_modules/npm/lib/fetch-package-metadata.js new file mode 100644 index 00000000..bacda3b9 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/fetch-package-metadata.js @@ -0,0 +1,341 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') +var zlib = require('zlib') + +var log = require('npmlog') +var realizePackageSpecifier = require('realize-package-specifier') +var tar = require('tar') +var once = require('once') +var semver = require('semver') +var readPackageTree = require('read-package-tree') +var readPackageJson = require('read-package-json') +var iferr = require('iferr') +var rimraf = require('rimraf') +var clone = require('lodash.clonedeep') +var validate = require('aproba') +var unpipe = require('unpipe') +var normalizePackageData = require('normalize-package-data') + +var npm = require('./npm.js') +var mapToRegistry = require('./utils/map-to-registry.js') +var cache = require('./cache.js') +var cachedPackageRoot = require('./cache/cached-package-root.js') +var tempFilename = require('./utils/temp-filename.js') +var getCacheStat = require('./cache/get-stat.js') +var unpack = require('./utils/tar.js').unpack +var pulseTillDone = require('./utils/pulse-till-done.js') +var parseJSON = require('./utils/parse-json.js') + +function andLogAndFinish (spec, tracker, done) { + validate('SF', [spec, done]) + return function (er, pkg) { + if (er) { + log.silly('fetchPackageMetaData', 'error for ' + spec, er) + if (tracker) tracker.finish() + } + return done(er, pkg) + } +} + +module.exports = function fetchPackageMetadata (spec, where, tracker, done) { + if (!done) { + done = tracker || where + tracker = null + if (done === where) where = null + } + if (typeof spec === 'object') { + var dep = spec + spec = dep.raw + } + var logAndFinish = andLogAndFinish(spec, tracker, done) + if (!dep) { + log.silly('fetchPackageMetaData', spec) + return realizePackageSpecifier(spec, where, iferr(logAndFinish, function (dep) { + fetchPackageMetadata(dep, where, tracker, done) + })) + } + if (dep.type === 'version' || dep.type === 'range' || dep.type === 'tag') { + fetchNamedPackageData(dep, addRequestedAndFinish) + } else if (dep.type === 'directory') { + fetchDirectoryPackageData(dep, where, addRequestedAndFinish) + } else { + fetchOtherPackageData(spec, dep, where, addRequestedAndFinish) + } + function addRequestedAndFinish (er, pkg) { + if (pkg) { + pkg._requested = dep + pkg._spec = spec + pkg._where = where + if (!pkg._args) pkg._args = [] + pkg._args.push([pkg._spec, pkg._where]) + // non-npm registries can and will return unnormalized data, plus + // even the npm registry may have package data normalized with older + // normalization rules. This ensures we get package data in a consistent, + // stable format. + try { + normalizePackageData(pkg) + } catch (ex) { + // don't care + } + } + logAndFinish(er, pkg) + } +} + +function fetchOtherPackageData (spec, dep, where, next) { + validate('SOSF', arguments) + log.silly('fetchOtherPackageData', spec) + cache.add(spec, null, where, false, iferr(next, function (pkg) { + var result = clone(pkg) + result._inCache = true + next(null, result) + })) +} + +function fetchDirectoryPackageData (dep, where, next) { + validate('OSF', arguments) + log.silly('fetchDirectoryPackageData', dep.name || dep.rawSpec) + readPackageJson(path.join(dep.spec, 'package.json'), false, next) +} + +var regCache = {} + +function fetchNamedPackageData (dep, next) { + validate('OF', arguments) + log.silly('fetchNamedPackageData', dep.name || dep.rawSpec) + mapToRegistry(dep.name || dep.rawSpec, npm.config, iferr(next, function (url, auth) { + if (regCache[url]) { + pickVersionFromRegistryDocument(clone(regCache[url])) + } else { + npm.registry.get(url, {auth: auth}, pulseTillDone('fetchMetadata', iferr(next, pickVersionFromRegistryDocument))) + } + function returnAndAddMetadata (pkg) { + delete pkg._from + delete pkg._resolved + delete pkg._shasum + next(null, pkg) + } + function pickVersionFromRegistryDocument (pkg) { + if (!regCache[url]) regCache[url] = pkg + var versions = Object.keys(pkg.versions).sort(semver.rcompare) + + if (dep.type === 'tag') { + var tagVersion = pkg['dist-tags'][dep.spec] + if (pkg.versions[tagVersion]) return returnAndAddMetadata(pkg.versions[tagVersion]) + } else { + var latestVersion = pkg['dist-tags'][npm.config.get('tag')] || versions[0] + + // Find the the most recent version less than or equal + // to latestVersion that satisfies our spec + for (var ii = 0; ii < versions.length; ++ii) { + if (semver.gt(versions[ii], latestVersion)) continue + if (semver.satisfies(versions[ii], dep.spec)) { + return returnAndAddMetadata(pkg.versions[versions[ii]]) + } + } + + // Failing that, try finding the most recent version that matches + // our spec + for (var jj = 0; jj < versions.length; ++jj) { + if (semver.satisfies(versions[jj], dep.spec)) { + return returnAndAddMetadata(pkg.versions[versions[jj]]) + } + } + + // Failing THAT, if the range was '*' uses latestVersion + if (dep.spec === '*') { + return returnAndAddMetadata(pkg.versions[latestVersion]) + } + } + + // And failing that, we error out + var targets = versions.length + ? 'Valid install targets:\n' + versions.join(', ') + '\n' + : 'No valid targets found.' + var er = new Error('No compatible version found: ' + + dep.raw + '\n' + targets) + return next(er) + } + })) +} + +function retryWithCached (pkg, asserter, next) { + if (!pkg._inCache) { + cache.add(pkg._spec, null, pkg._where, false, iferr(next, function (newpkg) { + Object.keys(newpkg).forEach(function (key) { + if (key[0] !== '_') return + pkg[key] = newpkg[key] + }) + pkg._inCache = true + return asserter(pkg, next) + })) + } + return !pkg._inCache +} + +module.exports.addShrinkwrap = function addShrinkwrap (pkg, next) { + validate('OF', arguments) + if (pkg._shrinkwrap !== undefined) return next(null, pkg) + if (retryWithCached(pkg, addShrinkwrap, next)) return + pkg._shrinkwrap = null + // FIXME: cache the shrinkwrap directly + var pkgname = pkg.name + var ver = pkg.version + var tarball = path.join(cachedPackageRoot({name: pkgname, version: ver}), 'package.tgz') + untarStream(tarball, function (er, untar) { + if (er) { + if (er.code === 'ENOTTARBALL') { + pkg._shrinkwrap = null + return next() + } else { + return next(er) + } + } + if (er) return next(er) + var foundShrinkwrap = false + untar.on('entry', function (entry) { + if (!/^(?:[^\/]+[\/])npm-shrinkwrap.json$/.test(entry.path)) return + log.silly('addShrinkwrap', 'Found shrinkwrap in ' + pkgname + ' ' + entry.path) + foundShrinkwrap = true + var shrinkwrap = '' + entry.on('data', function (chunk) { + shrinkwrap += chunk + }) + entry.on('end', function () { + untar.close() + log.silly('addShrinkwrap', 'Completed reading shrinkwrap in ' + pkgname) + try { + pkg._shrinkwrap = parseJSON(shrinkwrap) + } catch (ex) { + var er = new Error('Error parsing ' + pkgname + '@' + ver + "'s npm-shrinkwrap.json: " + ex.message) + er.type = 'ESHRINKWRAP' + return next(er) + } + next(null, pkg) + }) + entry.resume() + }) + untar.on('end', function () { + if (!foundShrinkwrap) { + pkg._shrinkwrap = null + next(null, pkg) + } + }) + }) +} + +module.exports.addBundled = function addBundled (pkg, next) { + validate('OF', arguments) + if (pkg._bundled !== undefined) return next(null, pkg) + if (!pkg.bundleDependencies) return next(null, pkg) + if (retryWithCached(pkg, addBundled, next)) return + pkg._bundled = null + var pkgname = pkg.name + var ver = pkg.version + var tarball = path.join(cachedPackageRoot({name: pkgname, version: ver}), 'package.tgz') + var target = tempFilename('unpack') + getCacheStat(iferr(next, function (cs) { + log.verbose('addBundled', 'extract', tarball) + unpack(tarball, target, null, null, cs.uid, cs.gid, iferr(next, function () { + log.silly('addBundled', 'read tarball') + readPackageTree(target, function (er, tree) { + log.silly('cleanup', 'remove extracted module') + rimraf(target, function () { + if (tree) { + pkg._bundled = tree.children + } + next(null, pkg) + }) + }) + })) + })) +} + +// FIXME: hasGzipHeader / hasTarHeader / untarStream duplicate a lot +// of code from lib/utils/tar.js– these should be brought together. + +function hasGzipHeader (c) { + return c[0] === 0x1F && c[1] === 0x8B && c[2] === 0x08 +} + +function hasTarHeader (c) { + return c[257] === 0x75 && // tar archives have 7573746172 at position + c[258] === 0x73 && // 257 and 003030 or 202000 at position 262 + c[259] === 0x74 && + c[260] === 0x61 && + c[261] === 0x72 && + + ((c[262] === 0x00 && + c[263] === 0x30 && + c[264] === 0x30) || + + (c[262] === 0x20 && + c[263] === 0x20 && + c[264] === 0x00)) +} + +function untarStream (tarball, cb) { + validate('SF', arguments) + cb = once(cb) + + var stream + var file = stream = fs.createReadStream(tarball) + var tounpipe = [file] + file.on('error', function (er) { + er = new Error('Error extracting ' + tarball + ' archive: ' + er.message) + er.code = 'EREADFILE' + cb(er) + }) + file.on('data', function OD (c) { + if (hasGzipHeader(c)) { + doGunzip() + } else if (hasTarHeader(c)) { + doUntar() + } else { + if (file.close) file.close() + if (file.destroy) file.destroy() + var er = new Error('Non-gzip/tarball ' + tarball) + er.code = 'ENOTTARBALL' + return cb(er) + } + file.removeListener('data', OD) + file.emit('data', c) + cb(null, stream) + }) + + function doGunzip () { + var gunzip = stream.pipe(zlib.createGunzip()) + gunzip.on('error', function (er) { + er = new Error('Error extracting ' + tarball + ' archive: ' + er.message) + er.code = 'EGUNZIP' + cb(er) + }) + tounpipe.push(gunzip) + stream = gunzip + doUntar() + } + + function doUntar () { + var untar = stream.pipe(tar.Parse()) + untar.on('error', function (er) { + er = new Error('Error extracting ' + tarball + ' archive: ' + er.message) + er.code = 'EUNTAR' + cb(er) + }) + tounpipe.push(untar) + stream = untar + addClose() + } + + function addClose () { + stream.close = function () { + tounpipe.forEach(function (stream) { + unpipe(stream) + }) + + if (file.close) file.close() + if (file.destroy) file.destroy() + } + } +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/fetch-package-metadata.md b/bin/nodejs5.12.0/node_modules/npm/lib/fetch-package-metadata.md new file mode 100644 index 00000000..a9f2c385 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/fetch-package-metadata.md @@ -0,0 +1,37 @@ +fetch-package-metadata +---------------------- + + var fetchPackageMetadata = require("npm/lib/fetch-package-metadata") + fetchPackageMetadata(spec, contextdir, callback) + +This will get package metadata (and if possible, ONLY package metadata) for +a specifer as passed to `npm install` et al, eg `npm@next` or `npm@^2.0.3` + +## fetchPackageMetadata(*spec*, *contextdir*, *tracker*, *callback*) + +* *spec* **string** | **object** -- The package specifier, can be anything npm can + understand (see [realize-package-specifier]), or it can be the result from + realize-package-specifier or npm-package-arg (for non-local deps). + +* *contextdir* **string** -- The directory from which relative paths to + local packages should be resolved. + +* *tracker* **object** -- **(optional)** An are-we-there-yet tracker group as + provided by `npm.log.newGroup()`. + +* *callback* **function (er, package)** -- Called when the package information + has been loaded. `package` is the object for of the `package.json` + matching the requested spec. In the case of named packages, it comes from + the registry and thus may not exactly match what's found in the associated + tarball. + +[realize-package-specifier]: (https://github.com/npm/realize-package-specifier) + +In the case of tarballs and git repos, it will use the cache to download +them in order to get the package metadata. For named packages, only the +metadata is downloaded (eg http://registry.npmjs.org/package). For local +directories, the package.json is read directly. For local tarballs, the +tarball is streamed in memory and just the package.json is extracted from +it. (Due to the nature of tars, having the package.json early in the file +will result in it being loaded faster– the extractor short-circuits the +uncompress/untar streams as best as it can.) diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/get.js b/bin/nodejs5.12.0/node_modules/npm/lib/get.js new file mode 100644 index 00000000..e1980dbb --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/get.js @@ -0,0 +1,12 @@ + +module.exports = get + +get.usage = 'npm get (See `npm config`)' + +var npm = require('./npm.js') + +get.completion = npm.commands.config.completion + +function get (args, cb) { + npm.commands.config(['get'].concat(args), cb) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/help-search.js b/bin/nodejs5.12.0/node_modules/npm/lib/help-search.js new file mode 100644 index 00000000..798759d7 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/help-search.js @@ -0,0 +1,211 @@ + +module.exports = helpSearch + +var fs = require('graceful-fs') +var path = require('path') +var asyncMap = require('slide').asyncMap +var npm = require('./npm.js') +var glob = require('glob') +var color = require('ansicolors') + +helpSearch.usage = 'npm help-search ' + +function helpSearch (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + if (!args.length) return cb(helpSearch.usage) + + var docPath = path.resolve(__dirname, '..', 'doc') + return glob(docPath + '/*/*.md', function (er, files) { + if (er) return cb(er) + readFiles(files, function (er, data) { + if (er) return cb(er) + searchFiles(args, data, function (er, results) { + if (er) return cb(er) + formatResults(args, results, cb) + }) + }) + }) +} + +function readFiles (files, cb) { + var res = {} + asyncMap(files, function (file, cb) { + fs.readFile(file, 'utf8', function (er, data) { + res[file] = data + return cb(er) + }) + }, function (er) { + return cb(er, res) + }) +} + +function searchFiles (args, files, cb) { + var results = [] + Object.keys(files).forEach(function (file) { + var data = files[file] + + // skip if no matches at all + var match + for (var a = 0, l = args.length; a < l && !match; a++) { + match = data.toLowerCase().indexOf(args[a].toLowerCase()) !== -1 + } + if (!match) return + + var lines = data.split(/\n+/) + + // if a line has a search term, then skip it and the next line. + // if the next line has a search term, then skip all 3 + // otherwise, set the line to null. then remove the nulls. + l = lines.length + for (var i = 0; i < l; i++) { + var line = lines[i] + var nextLine = lines[i + 1] + var ll + + match = false + if (nextLine) { + for (a = 0, ll = args.length; a < ll && !match; a++) { + match = nextLine.toLowerCase() + .indexOf(args[a].toLowerCase()) !== -1 + } + if (match) { + // skip over the next line, and the line after it. + i += 2 + continue + } + } + + match = false + for (a = 0, ll = args.length; a < ll && !match; a++) { + match = line.toLowerCase().indexOf(args[a].toLowerCase()) !== -1 + } + if (match) { + // skip over the next line + i++ + continue + } + + lines[i] = null + } + + // now squish any string of nulls into a single null + lines = lines.reduce(function (l, r) { + if (!(r === null && l[l.length - 1] === null)) l.push(r) + return l + }, []) + + if (lines[lines.length - 1] === null) lines.pop() + if (lines[0] === null) lines.shift() + + // now see how many args were found at all. + var found = {} + var totalHits = 0 + lines.forEach(function (line) { + args.forEach(function (arg) { + var hit = (line || '').toLowerCase() + .split(arg.toLowerCase()).length - 1 + if (hit > 0) { + found[arg] = (found[arg] || 0) + hit + totalHits += hit + } + }) + }) + + var cmd = 'npm help ' + if (path.basename(path.dirname(file)) === 'api') { + cmd = 'npm apihelp ' + } + cmd += path.basename(file, '.md').replace(/^npm-/, '') + results.push({ + file: file, + cmd: cmd, + lines: lines, + found: Object.keys(found), + hits: found, + totalHits: totalHits + }) + }) + + // if only one result, then just show that help section. + if (results.length === 1) { + return npm.commands.help([results[0].file.replace(/\.md$/, '')], cb) + } + + if (results.length === 0) { + console.log('No results for ' + args.map(JSON.stringify).join(' ')) + return cb() + } + + // sort results by number of results found, then by number of hits + // then by number of matching lines + results = results.sort(function (a, b) { + return a.found.length > b.found.length ? -1 + : a.found.length < b.found.length ? 1 + : a.totalHits > b.totalHits ? -1 + : a.totalHits < b.totalHits ? 1 + : a.lines.length > b.lines.length ? -1 + : a.lines.length < b.lines.length ? 1 + : 0 + }) + + cb(null, results) +} + +function formatResults (args, results, cb) { + if (!results) return cb(null) + + var cols = Math.min(process.stdout.columns || Infinity, 80) + 1 + + var out = results.map(function (res) { + var out = res.cmd + var r = Object.keys(res.hits) + .map(function (k) { + return k + ':' + res.hits[k] + }).sort(function (a, b) { + return a > b ? 1 : -1 + }).join(' ') + + out += ((new Array(Math.max(1, cols - out.length - r.length))) + .join(' ')) + r + + if (!npm.config.get('long')) return out + + out = '\n\n' + out + '\n' + + (new Array(cols)).join('—') + '\n' + + res.lines.map(function (line, i) { + if (line === null || i > 3) return '' + for (var out = line, a = 0, l = args.length; a < l; a++) { + var finder = out.toLowerCase().split(args[a].toLowerCase()) + var newOut = '' + var p = 0 + + finder.forEach(function (f) { + newOut += out.substr(p, f.length) + + var hilit = out.substr(p + f.length, args[a].length) + if (npm.color) hilit = color.bgBlack(color.red(hilit)) + newOut += hilit + + p += f.length + args[a].length + }) + } + + return newOut + }).join('\n').trim() + return out + }).join('\n') + + if (results.length && !npm.config.get('long')) { + out = 'Top hits for ' + (args.map(JSON.stringify).join(' ')) + '\n' + + (new Array(cols)).join('—') + '\n' + + out + '\n' + + (new Array(cols)).join('—') + '\n' + + '(run with -l or --long to see more context)' + } + + console.log(out.trim()) + cb(null, results) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/help.js b/bin/nodejs5.12.0/node_modules/npm/lib/help.js new file mode 100644 index 00000000..7e04d92f --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/help.js @@ -0,0 +1,240 @@ + +module.exports = help + +help.completion = function (opts, cb) { + if (opts.conf.argv.remain.length > 2) return cb(null, []) + getSections(cb) +} + +var path = require('path') +var spawn = require('./utils/spawn') +var npm = require('./npm.js') +var log = require('npmlog') +var opener = require('opener') +var glob = require('glob') +var cmdList = require('./config/cmd-list').cmdList +var shorthands = require('./config/cmd-list').shorthands +var commands = cmdList.concat(Object.keys(shorthands)) + +function help (args, cb) { + var argv = npm.config.get('argv').cooked + + var argnum = 0 + if (args.length === 2 && ~~args[0]) { + argnum = ~~args.shift() + } + + // npm help foo bar baz: search topics + if (args.length > 1 && args[0]) { + return npm.commands['help-search'](args, argnum, cb) + } + + var section = npm.deref(args[0]) || args[0] + + // npm help : show basic usage + if (!section) { + var valid = argv[0] === 'help' ? 0 : 1 + return npmUsage(valid, cb) + } + + // npm -h: show command usage + if (npm.config.get('usage') && + npm.commands[section] && + npm.commands[section].usage) { + npm.config.set('loglevel', 'silent') + log.level = 'silent' + console.log(npm.commands[section].usage) + return cb() + } + + // npm apihelp
    : Prefer section 3 over section 1 + var apihelp = argv.length && argv[0].indexOf('api') !== -1 + var pref = apihelp ? [3, 1, 5, 7] : [1, 3, 5, 7] + if (argnum) { + pref = [ argnum ].concat(pref.filter(function (n) { + return n !== argnum + })) + } + + // npm help
    : Try to find the path + var manroot = path.resolve(__dirname, '..', 'man') + + // legacy + if (section === 'global') section = 'folders' + else if (section === 'json') section = 'package.json' + + // find either /section.n or /npm-section.n + // The glob is used in the glob. The regexp is used much + // further down. Globs and regexps are different + var compextglob = '.+(gz|bz2|lzma|[FYzZ]|xz)' + var compextre = '\\.(gz|bz2|lzma|[FYzZ]|xz)$' + var f = '+(npm-' + section + '|' + section + ').[0-9]?(' + compextglob + ')' + return glob(manroot + '/*/' + f, function (er, mans) { + if (er) return cb(er) + + if (!mans.length) return npm.commands['help-search'](args, cb) + + mans = mans.map(function (man) { + var ext = path.extname(man) + if (man.match(new RegExp(compextre))) man = path.basename(man, ext) + + return man + }) + + viewMan(pickMan(mans, pref), cb) + }) +} + +function pickMan (mans, pref_) { + var nre = /([0-9]+)$/ + var pref = {} + pref_.forEach(function (sect, i) { + pref[sect] = i + }) + mans = mans.sort(function (a, b) { + var an = a.match(nre)[1] + var bn = b.match(nre)[1] + return an === bn ? (a > b ? -1 : 1) + : pref[an] < pref[bn] ? -1 + : 1 + }) + return mans[0] +} + +function viewMan (man, cb) { + var nre = /([0-9]+)$/ + var num = man.match(nre)[1] + var section = path.basename(man, '.' + num) + + // at this point, we know that the specified man page exists + var manpath = path.join(__dirname, '..', 'man') + var env = {} + Object.keys(process.env).forEach(function (i) { + env[i] = process.env[i] + }) + env.MANPATH = manpath + var viewer = npm.config.get('viewer') + + var conf + switch (viewer) { + case 'woman': + var a = ['-e', '(woman-find-file \'' + man + '\')'] + conf = { env: env, stdio: 'inherit' } + var woman = spawn('emacsclient', a, conf) + woman.on('close', cb) + break + + case 'browser': + opener(htmlMan(man), { command: npm.config.get('browser') }, cb) + break + + default: + conf = { env: env, stdio: 'inherit' } + var manProcess = spawn('man', [num, section], conf) + manProcess.on('close', cb) + break + } +} + +function htmlMan (man) { + var sect = +man.match(/([0-9]+)$/)[1] + var f = path.basename(man).replace(/([0-9]+)$/, 'html') + switch (sect) { + case 1: + sect = 'cli' + break + case 3: + sect = 'api' + break + case 5: + sect = 'files' + break + case 7: + sect = 'misc' + break + default: + throw new Error('invalid man section: ' + sect) + } + return path.resolve(__dirname, '..', 'html', 'doc', sect, f) +} + +function npmUsage (valid, cb) { + npm.config.set('loglevel', 'silent') + log.level = 'silent' + console.log([ + '\nUsage: npm ', + '', + 'where is one of:', + npm.config.get('long') ? usages() + : ' ' + wrap(commands), + '', + 'npm -h quick help on ', + 'npm -l display full usage info', + 'npm help search for help on ', + 'npm help npm involved overview', + '', + 'Specify configs in the ini-formatted file:', + ' ' + npm.config.get('userconfig'), + 'or on the command line via: npm --key value', + 'Config info can be viewed via: npm help config', + '', + 'npm@' + npm.version + ' ' + path.dirname(__dirname) + ].join('\n')) + cb(valid) +} + +function usages () { + // return a string of : + var maxLen = 0 + return Object.keys(npm.commands).filter(function (c) { + return c === npm.deref(c) + }).reduce(function (set, c) { + set.push([c, npm.commands[c].usage || '']) + maxLen = Math.max(maxLen, c.length) + return set + }, []).map(function (item) { + var c = item[0] + var usage = item[1] + return '\n ' + + c + (new Array(maxLen - c.length + 2).join(' ')) + + (usage.split('\n').join('\n' + (new Array(maxLen + 6).join(' ')))) + }).join('\n') +} + +function wrap (arr) { + var out = [''] + var l = 0 + var line + + line = process.stdout.columns + if (!line) { + line = 60 + } else { + line = Math.min(60, Math.max(line - 16, 24)) + } + + arr.sort(function (a, b) { return a < b ? -1 : 1 }) + .forEach(function (c) { + if (out[l].length + c.length + 2 < line) { + out[l] += ', ' + c + } else { + out[l++] += ',' + out[l] = c + } + }) + return out.join('\n ').substr(2) +} + +function getSections (cb) { + var g = path.resolve(__dirname, '../man/man[0-9]/*.[0-9]') + glob(g, function (er, files) { + if (er) return cb(er) + + cb(null, Object.keys(files.reduce(function (acc, file) { + file = path.basename(file).replace(/\.[0-9]+$/, '') + file = file.replace(/^npm-/, '') + acc[file] = true + return acc + }, { help: true }))) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/init.js b/bin/nodejs5.12.0/node_modules/npm/lib/init.js new file mode 100644 index 00000000..381d5f7c --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/init.js @@ -0,0 +1,39 @@ +// initialize a package.json file + +module.exports = init + +var log = require('npmlog') +var npm = require('./npm.js') +var initJson = require('init-package-json') + +init.usage = 'npm init [--force|-f|--yes|-y]' + +function init (args, cb) { + var dir = process.cwd() + log.pause() + var initFile = npm.config.get('init-module') + if (!initJson.yes(npm.config)) { + console.log([ + 'This utility will walk you through creating a package.json file.', + 'It only covers the most common items, and tries to guess sensible defaults.', + '', + 'See `npm help json` for definitive documentation on these fields', + 'and exactly what they do.', + '', + 'Use `npm install --save` afterwards to install a package and', + 'save it as a dependency in the package.json file.', + '', + 'Press ^C at any time to quit.' + ].join('\n')) + } + initJson(dir, initFile, npm.config, function (er, data) { + log.resume() + log.silly('package data', data) + if (er && er.message === 'canceled') { + log.warn('init', 'canceled') + return cb(null, data) + } + log.info('init', 'written successfully') + cb(er, data) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/install-test.js b/bin/nodejs5.12.0/node_modules/npm/lib/install-test.js new file mode 100644 index 00000000..7d341946 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/install-test.js @@ -0,0 +1,23 @@ +'use strict' + +// npm install-test +// Runs `npm install` and then runs `npm test` + +module.exports = installTest +var install = require('./install.js') +var test = require('./test.js') + +installTest.usage = '\nnpm install-test [args]' + + '\nSame args as `npm install`' + + '\n\nalias: npm it' + +installTest.completion = install.completion + +function installTest (args, cb) { + install(args, function (er) { + if (er) { + return cb(er) + } + test([], cb) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/install.js b/bin/nodejs5.12.0/node_modules/npm/lib/install.js new file mode 100644 index 00000000..1769e4da --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/install.js @@ -0,0 +1,728 @@ +'use strict' +// npm install +// +// See doc/install.md for more description + +// Managing contexts... +// there's a lot of state associated with an "install" operation, including +// packages that are already installed, parent packages, current shrinkwrap, and +// so on. We maintain this state in a "context" object that gets passed around. +// every time we dive into a deeper node_modules folder, the "family" list that +// gets passed along uses the previous "family" list as its __proto__. Any +// "resolved precise dependency" things that aren't already on this object get +// added, and then that's passed to the next generation of installation. + +module.exports = install +module.exports.Installer = Installer + +install.usage = '\nnpm install (with no args, in package dir)' + + '\nnpm install [<@scope>/]' + + '\nnpm install [<@scope>/]@' + + '\nnpm install [<@scope>/]@' + + '\nnpm install [<@scope>/]@' + + '\nnpm install ' + + '\nnpm install ' + + '\nnpm install ' + + '\nnpm install ' + + '\nnpm install /' + + '\n\nalias: npm i' + + '\ncommon options: [--save|--save-dev|--save-optional] [--save-exact]' + +install.completion = function (opts, cb) { + validate('OF', arguments) + // install can complete to a folder with a package.json, or any package. + // if it has a slash, then it's gotta be a folder + // if it starts with https?://, then just give up, because it's a url + if (/^https?:\/\//.test(opts.partialWord)) { + // do not complete to URLs + return cb(null, []) + } + + if (/\//.test(opts.partialWord)) { + // Complete fully to folder if there is exactly one match and it + // is a folder containing a package.json file. If that is not the + // case we return 0 matches, which will trigger the default bash + // complete. + var lastSlashIdx = opts.partialWord.lastIndexOf('/') + var partialName = opts.partialWord.slice(lastSlashIdx + 1) + var partialPath = opts.partialWord.slice(0, lastSlashIdx) + if (partialPath === '') partialPath = '/' + + var annotatePackageDirMatch = function (sibling, cb) { + var fullPath = path.join(partialPath, sibling) + if (sibling.slice(0, partialName.length) !== partialName) { + return cb(null, null) // not name match + } + fs.readdir(fullPath, function (err, contents) { + if (err) return cb(null, { isPackage: false }) + + cb( + null, + { + fullPath: fullPath, + isPackage: contents.indexOf('package.json') !== -1 + } + ) + }) + } + + return fs.readdir(partialPath, function (err, siblings) { + if (err) return cb(null, []) // invalid dir: no matching + + asyncMap(siblings, annotatePackageDirMatch, function (err, matches) { + if (err) return cb(err) + + var cleaned = matches.filter(function (x) { return x !== null }) + if (cleaned.length !== 1) return cb(null, []) + if (!cleaned[0].isPackage) return cb(null, []) + + // Success - only one match and it is a package dir + return cb(null, [cleaned[0].fullPath]) + }) + }) + } + + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +// system packages +var fs = require('fs') +var path = require('path') + +// dependencies +var log = require('npmlog') +var readPackageTree = require('read-package-tree') +var chain = require('slide').chain +var asyncMap = require('slide').asyncMap +var archy = require('archy') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var iferr = require('iferr') +var validate = require('aproba') + +// npm internal utils +var npm = require('./npm.js') +var locker = require('./utils/locker.js') +var lock = locker.lock +var unlock = locker.unlock +var ls = require('./ls.js') +var parseJSON = require('./utils/parse-json.js') + +// install specific libraries +var copyTree = require('./install/copy-tree.js') +var readShrinkwrap = require('./install/read-shrinkwrap.js') +var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var loadDeps = require('./install/deps.js').loadDeps +var loadDevDeps = require('./install/deps.js').loadDevDeps +var getAllMetadata = require('./install/deps.js').getAllMetadata +var loadRequestedDeps = require('./install/deps.js').loadRequestedDeps +var loadExtraneous = require('./install/deps.js').loadExtraneous +var pruneTree = require('./install/prune-tree.js') +var diffTrees = require('./install/diff-trees.js') +var checkPermissions = require('./install/check-permissions.js') +var decomposeActions = require('./install/decompose-actions.js') +var filterInvalidActions = require('./install/filter-invalid-actions.js') +var validateTree = require('./install/validate-tree.js') +var validateArgs = require('./install/validate-args.js') +var saveRequested = require('./install/save.js').saveRequested +var getSaveType = require('./install/save.js').getSaveType +var doSerialActions = require('./install/actions.js').doSerial +var doReverseSerialActions = require('./install/actions.js').doReverseSerial +var doParallelActions = require('./install/actions.js').doParallel +var doOneAction = require('./install/actions.js').doOne +var packageId = require('./utils/package-id.js') +var moduleName = require('./utils/module-name.js') +var errorMessage = require('./utils/error-message.js') + +function unlockCB (lockPath, name, cb) { + validate('SSF', arguments) + return function (installEr) { + var args = arguments + try { + unlock(lockPath, name, reportErrorAndReturn) + } catch (unlockEx) { + process.nextTick(function () { + reportErrorAndReturn(unlockEx) + }) + } + function reportErrorAndReturn (unlockEr) { + if (installEr) { + if (unlockEr && unlockEr.code !== 'ENOTLOCKED') { + log.warn('unlock' + name, unlockEr) + } + return cb.apply(null, args) + } + if (unlockEr) return cb(unlockEr) + return cb.apply(null, args) + } + } +} + +function install (where, args, cb) { + if (!cb) { + cb = args + args = where + where = null + } + var globalTop = path.resolve(npm.globalDir, '..') + if (!where) { + where = npm.config.get('global') + ? globalTop + : npm.prefix + } + validate('SAF', [where, args, cb]) + // the /path/to/node_modules/.. + var dryrun = !!npm.config.get('dry-run') + + if (npm.config.get('dev')) { + log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--only=dev` instead.') + } + + if (where === globalTop && !args.length) { + args = ['.'] + } + args = args.filter(function (a) { + return path.resolve(a) !== npm.prefix + }) + + new Installer(where, dryrun, args).run(cb) +} + +function Installer (where, dryrun, args) { + validate('SBA', arguments) + this.where = where + this.dryrun = dryrun + this.args = args + this.currentTree = null + this.idealTree = null + this.differences = [] + this.todo = [] + this.progress = {} + this.noPackageJsonOk = !!args.length + this.topLevelLifecycles = !args.length + this.npat = npm.config.get('npat') + this.dev = npm.config.get('dev') || (!/^prod(uction)?$/.test(npm.config.get('only')) && !npm.config.get('production')) || /^dev(elopment)?$/.test(npm.config.get('only')) + this.prod = !/^dev(elopment)?$/.test(npm.config.get('only')) + this.rollback = npm.config.get('rollback') + this.link = npm.config.get('link') + this.global = this.where === path.resolve(npm.globalDir, '..') +} +Installer.prototype = {} + +Installer.prototype.run = function (cb) { + validate('F', arguments) + + // FIXME: This is bad and I should feel bad. + // lib/install needs to have some way of sharing _limited_ + // state with the things it calls. Passing the object is too + // much. The global config is WAY too much. =( =( + // But not having this is gonna break linked modules in + // subtle stupid ways, and refactoring all this code isn't + // the right thing to do just yet. + if (this.global) { + var prevGlobal = npm.config.get('global') + npm.config.set('global', true) + var next = cb + cb = function () { + npm.config.set('global', prevGlobal) + next.apply(null, arguments) + } + } + + var installSteps = [] + var postInstallSteps = [] + installSteps.push( + [this.newTracker(log, 'loadCurrentTree', 4)], + [this, this.loadCurrentTree], + [this, this.finishTracker, 'loadCurrentTree'], + + [this.newTracker(log, 'loadIdealTree', 12)], + [this, this.loadIdealTree], + [this, this.finishTracker, 'loadIdealTree'], + + [this, this.debugTree, 'currentTree', 'currentTree'], + [this, this.debugTree, 'idealTree', 'idealTree'], + + [this.newTracker(log, 'generateActionsToTake')], + [this, this.generateActionsToTake], + [this, this.finishTracker, 'generateActionsToTake'], + + [this, this.debugActions, 'diffTrees', 'differences'], + [this, this.debugActions, 'decomposeActions', 'todo']) + if (!this.dryrun) { + installSteps.push( + [this.newTracker(log, 'executeActions', 8)], + [this, this.executeActions], + [this, this.finishTracker, 'executeActions']) + var node_modules = path.resolve(this.where, 'node_modules') + var staging = path.resolve(node_modules, '.staging') + postInstallSteps.push( + [this.newTracker(log, 'rollbackFailedOptional', 1)], + [this, this.rollbackFailedOptional, staging, this.todo], + [this, this.finishTracker, 'rollbackFailedOptional'], + [this, this.commit, staging, this.todo], + [this.newTracker(log, 'runTopLevelLifecycles', 2)], + [this, this.runTopLevelLifecycles], + [this, this.finishTracker, 'runTopLevelLifecycles']) + + if (getSaveType(this.args)) { + postInstallSteps.push( + [this, this.saveToDependencies]) + } + } + postInstallSteps.push( + [this, this.printInstalled]) + + var self = this + chain(installSteps, function (installEr) { + if (installEr) self.failing = true + chain(postInstallSteps, function (postInstallEr) { + if (self.idealTree) { + self.idealTree.warnings.forEach(function (warning) { + if (warning.code === 'EPACKAGEJSON' && self.global) return + if (warning.code === 'ENOTDIR') return + errorMessage(warning).summary.forEach(function (logline) { + log.warn.apply(log, logline) + }) + }) + } + if (installEr && postInstallEr) { + var msg = errorMessage(postInstallEr) + msg.summary.forEach(function (logline) { + log.warn.apply(log, logline) + }) + msg.detail.forEach(function (logline) { + log.verbose.apply(log, logline) + }) + } + cb(installEr || postInstallEr, self.getInstalledModules(), self.idealTree) + }) + }) +} + +Installer.prototype.loadArgMetadata = function (next) { + var self = this + getAllMetadata(this.args, this.currentTree, iferr(next, function (args) { + self.args = args + next() + })) +} + +Installer.prototype.newTracker = function (tracker, name, size) { + validate('OS', [tracker, name]) + if (size) validate('N', [size]) + this.progress[name] = tracker.newGroup(name, size) + var self = this + return function (next) { + self.progress[name].silly(name, 'Starting') + next() + } +} + +Installer.prototype.finishTracker = function (name, cb) { + validate('SF', arguments) + this.progress[name].silly(name, 'Finishing') + this.progress[name].finish() + cb() +} + +Installer.prototype.loadCurrentTree = function (cb) { + validate('F', arguments) + log.silly('install', 'loadCurrentTree') + var todo = [] + if (this.global) { + todo.push([this, this.readGlobalPackageData]) + } else { + todo.push([this, this.readLocalPackageData]) + } + todo.push( + [this, this.normalizeTree, log.newGroup('normalizeTree')]) + chain(todo, cb) +} + +Installer.prototype.loadIdealTree = function (cb) { + validate('F', arguments) + log.silly('install', 'loadIdealTree') + + chain([ + [this.newTracker(this.progress.loadIdealTree, 'cloneCurrentTree')], + [this, this.cloneCurrentTreeToIdealTree], + [this, this.finishTracker, 'cloneCurrentTree'], + + [this.newTracker(this.progress.loadIdealTree, 'loadShrinkwrap')], + [this, this.loadShrinkwrap], + [this, this.finishTracker, 'loadShrinkwrap'], + + [this.newTracker(this.progress.loadIdealTree, 'loadAllDepsIntoIdealTree', 10)], + [this, this.loadAllDepsIntoIdealTree], + [this, this.finishTracker, 'loadAllDepsIntoIdealTree'], + + [this, function (next) { recalculateMetadata(this.idealTree, log, next) }], + [this, this.debugTree, 'idealTree:prePrune', 'idealTree'], + [this, function (next) { next(pruneTree(this.idealTree)) }] + ], cb) +} + +Installer.prototype.loadAllDepsIntoIdealTree = function (cb) { + validate('F', arguments) + log.silly('install', 'loadAllDepsIntoIdealTree') + var saveDeps = getSaveType(this.args) + + var cg = this.progress.loadAllDepsIntoIdealTree + var installNewModules = !!this.args.length + var steps = [] + + if (installNewModules) { + steps.push([validateArgs, this.idealTree, this.args]) + steps.push([loadRequestedDeps, this.args, this.idealTree, saveDeps, cg.newGroup('loadRequestedDeps')]) + } else { + if (this.prod) { + steps.push( + [loadDeps, this.idealTree, cg.newGroup('loadDeps')]) + } + if (this.dev) { + steps.push( + [loadDevDeps, this.idealTree, cg.newGroup('loadDevDeps')]) + } + } + steps.push( + [loadExtraneous.andResolveDeps, this.idealTree, cg.newGroup('loadExtraneous')]) + chain(steps, cb) +} + +Installer.prototype.generateActionsToTake = function (cb) { + validate('F', arguments) + log.silly('install', 'generateActionsToTake') + var cg = this.progress.generateActionsToTake + chain([ + [validateTree, this.idealTree, cg.newGroup('validateTree')], + [diffTrees, this.currentTree, this.idealTree, this.differences, cg.newGroup('diffTrees')], + [this, this.computeLinked], + [filterInvalidActions, this.where, this.differences], + [checkPermissions, this.differences], + [decomposeActions, this.differences, this.todo] + ], cb) +} + +Installer.prototype.computeLinked = function (cb) { + validate('F', arguments) + if (!this.link || this.global) return cb() + var linkTodoList = [] + var self = this + asyncMap(this.differences, function (action, next) { + var cmd = action[0] + var pkg = action[1] + if (cmd !== 'add' && cmd !== 'update') return next() + var isReqByTop = pkg.package._requiredBy.filter(function (name) { return name === '/' }).length + var isReqByUser = pkg.package._requiredBy.filter(function (name) { return name === '#USER' }).length + var isExtraneous = pkg.package._requiredBy.length === 0 + if (!isReqByTop && !isReqByUser && !isExtraneous) return next() + isLinkable(pkg, function (install, link) { + if (install) linkTodoList.push(['global-install', pkg]) + if (link) linkTodoList.push(['global-link', pkg]) + if (install || link) { + pkg.parent.children = pkg.parent.children.filter(function (child) { return child !== pkg }) + } + next() + }) + }, function () { + if (linkTodoList.length === 0) return cb() + pruneTree(self.idealTree) + self.differences.length = 0 + Array.prototype.push.apply(self.differences, linkTodoList) + diffTrees(self.currentTree, self.idealTree, self.differences, log.newGroup('d2'), cb) + }) +} + +function isLinkable (pkg, cb) { + var globalPackage = path.resolve(npm.globalPrefix, 'lib', 'node_modules', moduleName(pkg)) + var globalPackageJson = path.resolve(globalPackage, 'package.json') + fs.stat(globalPackage, function (er) { + if (er) return cb(true, true) + fs.readFile(globalPackageJson, function (er, data) { + var json = parseJSON.noExceptions(data) + cb(false, json && json.version === pkg.package.version) + }) + }) +} + +Installer.prototype.executeActions = function (cb) { + validate('F', arguments) + log.silly('install', 'executeActions') + var todo = this.todo + var cg = this.progress.executeActions + + var node_modules = path.resolve(this.where, 'node_modules') + var staging = path.resolve(node_modules, '.staging') + var steps = [] + var trackLifecycle = cg.newGroup('lifecycle') + + cb = unlockCB(node_modules, '.staging', cb) + + steps.push( + [doSerialActions, 'global-install', staging, todo, trackLifecycle.newGroup('global-install')], + [doParallelActions, 'fetch', staging, todo, cg.newGroup('fetch', 10)], + [lock, node_modules, '.staging'], + [rimraf, staging], + [mkdirp, staging], + [doParallelActions, 'extract', staging, todo, cg.newGroup('extract', 10)], + [doParallelActions, 'preinstall', staging, todo, trackLifecycle.newGroup('preinstall')], + [doReverseSerialActions, 'remove', staging, todo, cg.newGroup('remove')], + [doSerialActions, 'move', staging, todo, cg.newGroup('move')], + [doSerialActions, 'finalize', staging, todo, cg.newGroup('finalize')], + [doSerialActions, 'build', staging, todo, trackLifecycle.newGroup('build')], + [doSerialActions, 'global-link', staging, todo, trackLifecycle.newGroup('global-link')], + [doParallelActions, 'update-linked', staging, todo, trackLifecycle.newGroup('update-linked')], + [doSerialActions, 'install', staging, todo, trackLifecycle.newGroup('install')], + [doSerialActions, 'postinstall', staging, todo, trackLifecycle.newGroup('postinstall')]) + if (this.npat) { + steps.push( + [doParallelActions, 'test', staging, todo, trackLifecycle.newGroup('npat')]) + } + + var self = this + chain(steps, function (er) { + if (!er || self.rollback) { + rimraf(staging, function () { cb(er) }) + } else { + cb(er) + } + }) +} + +Installer.prototype.rollbackFailedOptional = function (staging, actionsToRun, cb) { + if (!this.rollback) return cb() + var failed = actionsToRun.map(function (action) { + return action[1] + }).filter(function (pkg) { + return pkg.failed && pkg.rollback + }) + asyncMap(failed, function (pkg, next) { + asyncMap(pkg.rollback, function (rollback, done) { + rollback(staging, pkg, done) + }, next) + }, cb) +} + +Installer.prototype.commit = function (staging, actionsToRun, cb) { + var toCommit = actionsToRun.map(function (action) { return action[1] }).filter(function (pkg) { return !pkg.failed && pkg.commit }) + asyncMap(toCommit, function (pkg, next) { + asyncMap(pkg.commit, function (commit, done) { + commit(staging, pkg, done) + }, function () { + pkg.commit = [] + next.apply(null, arguments) + }) + }, cb) +} + +Installer.prototype.runTopLevelLifecycles = function (cb) { + validate('F', arguments) + if (this.failing) return cb() + log.silly('install', 'runTopLevelLifecycles') + var steps = [] + var trackLifecycle = this.progress.runTopLevelLifecycles + if (!this.topLevelLifecycles) { + trackLifecycle.finish() + return cb() + } + + steps.push( + [doOneAction, 'preinstall', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('preinstall:.')], + [doOneAction, 'build', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('build:.')], + [doOneAction, 'install', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('install:.')], + [doOneAction, 'postinstall', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('postinstall:.')]) + if (this.npat) { + steps.push( + [doOneAction, 'test', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('npat:.')]) + } + if (this.dev) { + steps.push( + [doOneAction, 'prepublish', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('prepublish')]) + } + chain(steps, cb) +} + +Installer.prototype.saveToDependencies = function (cb) { + validate('F', arguments) + if (this.failing) return cb() + log.silly('install', 'saveToDependencies') + saveRequested(this.args, this.idealTree, cb) +} + +Installer.prototype.readGlobalPackageData = function (cb) { + validate('F', arguments) + log.silly('install', 'readGlobalPackageData') + var self = this + this.loadArgMetadata(iferr(cb, function () { + mkdirp(self.where, iferr(cb, function () { + var pkgs = {} + self.args.forEach(function (pkg) { + pkgs[pkg.name] = true + }) + readPackageTree(self.where, function (ctx, kid) { return ctx.parent || pkgs[kid] }, iferr(cb, function (currentTree) { + self.currentTree = currentTree + return cb() + })) + })) + })) +} + +Installer.prototype.readLocalPackageData = function (cb) { + validate('F', arguments) + log.silly('install', 'readLocalPackageData') + var self = this + mkdirp(this.where, iferr(cb, function () { + readPackageTree(self.where, iferr(cb, function (currentTree) { + self.currentTree = currentTree + self.currentTree.warnings = [] + if (!self.noPackageJsonOk && !currentTree.package) { + log.error('install', "Couldn't read dependencies") + var er = new Error("ENOENT, open '" + path.join(self.where, 'package.json') + "'") + er.code = 'ENOPACKAGEJSON' + er.errno = 34 + return cb(er) + } + if (!currentTree.package) currentTree.package = {} + self.loadArgMetadata(iferr(cb, function () { + if (currentTree.package._shrinkwrap) return cb() + fs.readFile(path.join(self.where, 'npm-shrinkwrap.json'), function (er, data) { + if (er) return cb() + try { + currentTree.package._shrinkwrap = parseJSON(data) + } catch (ex) { + return cb(ex) + } + return cb() + }) + })) + })) + })) +} + +Installer.prototype.cloneCurrentTreeToIdealTree = function (cb) { + validate('F', arguments) + log.silly('install', 'cloneCurrentTreeToIdealTree') + this.idealTree = copyTree(this.currentTree) + this.idealTree.warnings = [] + cb() +} + +Installer.prototype.loadShrinkwrap = function (cb) { + validate('F', arguments) + log.silly('install', 'loadShrinkwrap') + var installNewModules = !!this.args.length + if (installNewModules) { + readShrinkwrap(this.idealTree, cb) + } else { + readShrinkwrap.andInflate(this.idealTree, cb) + } +} + +Installer.prototype.normalizeTree = function (log, cb) { + validate('OF', arguments) + log.silly('install', 'normalizeTree') + recalculateMetadata(this.currentTree, log, iferr(cb, function (tree) { + tree.children.forEach(function (child) { + if (child.package._requiredBy.length === 0) { + child.package._requiredBy.push('#EXISTING') + } + }) + cb(null, tree) + })) +} + +Installer.prototype.getInstalledModules = function () { + return this.differences.filter(function (action) { + var mutation = action[0] + return (mutation === 'add' || mutation === 'update') + }).map(function (action) { + var child = action[1] + return [child.package._id, child.path] + }) +} + +Installer.prototype.printInstalled = function (cb) { + validate('F', arguments) + log.silly('install', 'printInstalled') + var self = this + log.clearProgress() + this.differences.forEach(function (action) { + var mutation = action[0] + var child = action[1] + var name = packageId(child) + var where = path.relative(self.where, child.path) + if (mutation === 'remove') { + console.log('- ' + name + ' ' + where) + } else if (mutation === 'move') { + var oldWhere = path.relative(self.where, child.fromPath) + console.log(name + ' ' + oldWhere + ' -> ' + where) + } + }) + var addedOrMoved = this.differences.filter(function (action) { + var mutation = action[0] + var child = action[1] + return !child.failed && (mutation === 'add' || mutation === 'update') + }).map(function (action) { + var child = action[1] + return child.path + }) + log.showProgress() + if (!addedOrMoved.length) return cb() + recalculateMetadata(this.idealTree, log, iferr(cb, function (tree) { + log.clearProgress() + // These options control both how installs happen AND how `ls` shows output. + // Something like `npm install --production` only installs production deps. + // By contrast `npm install --production foo` installs `foo` and the + // `production` option is ignored. But when it comes time for `ls` to show + // its output, it excludes the thing we just installed because that flag. + // The summary output we get should be unfiltered, showing everything + // installed, so we clear these options before calling `ls`. + npm.config.set('production', false) + npm.config.set('dev', false) + npm.config.set('only', '') + npm.config.set('also', '') + ls.fromTree(self.where, tree, addedOrMoved, false, function () { + log.showProgress() + cb() + }) + })) +} + +Installer.prototype.debugActions = function (name, actionListName, cb) { + validate('SSF', arguments) + var actionsToLog = this[actionListName] + log.silly(name, 'action count', actionsToLog.length) + actionsToLog.forEach(function (action) { + log.silly(name, action.map(function (value) { + return (value && value.package) ? packageId(value) : value + }).join(' ')) + }) + cb() +} + +// This takes an object and a property name instead of a value to allow us +// to define the arguments for use by chain before the property exists yet. +Installer.prototype.debugTree = function (name, treeName, cb) { + validate('SSF', arguments) + log.silly(name, this.prettify(this[treeName]).trim()) + cb() +} + +Installer.prototype.prettify = function (tree) { + validate('O', arguments) + var seen = {} + function byName (aa, bb) { + return packageId(aa).localeCompare(packageId(bb)) + } + function expandTree (tree) { + seen[tree.path] = true + return { + label: packageId(tree), + nodes: tree.children.filter(function (tree) { return !seen[tree.path] }).sort(byName).map(expandTree) + } + } + return archy(expandTree(tree), '', { unicode: npm.config.get('unicode') }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/link.js b/bin/nodejs5.12.0/node_modules/npm/lib/link.js new file mode 100644 index 00000000..d54525d8 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/link.js @@ -0,0 +1,197 @@ +// link with no args: symlink the folder to the global location +// link with package arg: symlink the global to the local + +var npm = require('./npm.js') +var symlink = require('./utils/link.js') +var fs = require('graceful-fs') +var log = require('npmlog') +var asyncMap = require('slide').asyncMap +var chain = require('slide').chain +var path = require('path') +var build = require('./build.js') +var npa = require('npm-package-arg') + +module.exports = link + +link.usage = 'npm link (in package dir)' + + '\nnpm link [<@scope>/][@]' + + '\n\nalias: npm ln' + +link.completion = function (opts, cb) { + var dir = npm.globalDir + fs.readdir(dir, function (er, files) { + cb(er, files.filter(function (f) { + return !f.match(/^[\._-]/) + })) + }) +} + +function link (args, cb) { + if (process.platform === 'win32') { + var semver = require('semver') + if (!semver.gte(process.version, '0.7.9')) { + var msg = 'npm link not supported on windows prior to node 0.7.9' + var e = new Error(msg) + e.code = 'ENOTSUP' + e.errno = require('constants').ENOTSUP + return cb(e) + } + } + + if (npm.config.get('global')) { + return cb(new Error( + 'link should never be --global.\n' + + 'Please re-run this command with --local' + )) + } + + if (args.length === 1 && args[0] === '.') args = [] + if (args.length) return linkInstall(args, cb) + linkPkg(npm.prefix, cb) +} + +function parentFolder (id, folder) { + if (id[0] === '@') { + return path.resolve(folder, '..', '..') + } else { + return path.resolve(folder, '..') + } +} + +function linkInstall (pkgs, cb) { + asyncMap(pkgs, function (pkg, cb) { + var t = path.resolve(npm.globalDir, '..') + var pp = path.resolve(npm.globalDir, pkg) + var rp = null + var target = path.resolve(npm.dir, pkg) + + function n (er, data) { + if (er) return cb(er, data) + // we want the ONE thing that was installed into the global dir + var installed = data.filter(function (info) { + var id = info[0] + var folder = info[1] + return parentFolder(id, folder) === npm.globalDir + }) + var id = installed[0][0] + pp = installed[0][1] + var what = npa(id) + pkg = what.name + target = path.resolve(npm.dir, pkg) + next() + } + + // if it's a folder, a random not-installed thing, or not a scoped package, + // then link or install it first + if (pkg[0] !== '@' && (pkg.indexOf('/') !== -1 || pkg.indexOf('\\') !== -1)) { + return fs.lstat(path.resolve(pkg), function (er, st) { + if (er || !st.isDirectory()) { + npm.commands.install(t, pkg, n) + } else { + rp = path.resolve(pkg) + linkPkg(rp, n) + } + }) + } + + fs.lstat(pp, function (er, st) { + if (er) { + rp = pp + return npm.commands.install(t, [pkg], n) + } else if (!st.isSymbolicLink()) { + rp = pp + next() + } else { + return fs.realpath(pp, function (er, real) { + if (er) log.warn('invalid symbolic link', pkg) + else rp = real + next() + }) + } + }) + + function next () { + if (npm.config.get('dry-run')) return resultPrinter(pkg, pp, target, rp, cb) + chain( + [ + [ function (cb) { + log.verbose('link', 'symlinking %s to %s', pp, target) + cb() + } ], + [symlink, pp, target], + // do not run any scripts + rp && [build, [target], npm.config.get('global'), build._noLC, true], + [resultPrinter, pkg, pp, target, rp] + ], + cb + ) + } + }, cb) +} + +function linkPkg (folder, cb_) { + var me = folder || npm.prefix + var readJson = require('read-package-json') + + log.verbose('linkPkg', folder) + + readJson(path.resolve(me, 'package.json'), function (er, d) { + function cb (er) { + return cb_(er, [[d && d._id, target, null, null]]) + } + if (er) return cb(er) + if (!d.name) { + er = new Error('Package must have a name field to be linked') + return cb(er) + } + if (npm.config.get('dry-run')) return resultPrinter(path.basename(me), me, target, cb) + var target = path.resolve(npm.globalDir, d.name) + symlink(me, target, false, true, function (er) { + if (er) return cb(er) + log.verbose('link', 'build target', target) + // also install missing dependencies. + npm.commands.install(me, [], function (er) { + if (er) return cb(er) + // build the global stuff. Don't run *any* scripts, because + // install command already will have done that. + build([target], true, build._noLC, true, function (er) { + if (er) return cb(er) + resultPrinter(path.basename(me), me, target, cb) + }) + }) + }) + }) +} + +function resultPrinter (pkg, src, dest, rp, cb) { + if (typeof cb !== 'function') { + cb = rp + rp = null + } + var where = dest + rp = (rp || '').trim() + src = (src || '').trim() + // XXX If --json is set, then look up the data from the package.json + if (npm.config.get('parseable')) { + return parseableOutput(dest, rp || src, cb) + } + if (rp === src) rp = null + log.clearProgress() + console.log(where + ' -> ' + src + (rp ? ' -> ' + rp : '')) + log.showProgress() + cb() +} + +function parseableOutput (dest, rp, cb) { + // XXX this should match ls --parseable and install --parseable + // look up the data from package.json, format it the same way. + // + // link is always effectively 'long', since it doesn't help much to + // *just* print the target folder. + // However, we don't actually ever read the version number, so + // the second field is always blank. + log.clearProgress() + console.log(dest + '::' + rp) + log.showProgress() + cb() +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/logout.js b/bin/nodejs5.12.0/node_modules/npm/lib/logout.js new file mode 100644 index 00000000..ae46c9aa --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/logout.js @@ -0,0 +1,43 @@ +module.exports = logout + +var dezalgo = require('dezalgo') +var log = require('npmlog') + +var npm = require('./npm.js') +var mapToRegistry = require('./utils/map-to-registry.js') + +logout.usage = 'npm logout [--registry=] [--scope=<@scope>]' + +function afterLogout (normalized, cb) { + var scope = npm.config.get('scope') + + if (scope) npm.config.del(scope + ':registry') + + npm.config.clearCredentialsByURI(normalized) + npm.config.save('user', cb) +} + +function logout (args, cb) { + cb = dezalgo(cb) + + mapToRegistry('/', npm.config, function (err, uri, auth, normalized) { + if (err) return cb(err) + + if (auth.token) { + log.verbose('logout', 'clearing session token for', normalized) + npm.registry.logout(normalized, { auth: auth }, function (err) { + if (err) return cb(err) + + afterLogout(normalized, cb) + }) + } else if (auth.username || auth.password) { + log.verbose('logout', 'clearing user credentials for', normalized) + + afterLogout(normalized, cb) + } else { + cb(new Error( + 'Not logged in to', normalized + ',', "so can't log out." + )) + } + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/ls.js b/bin/nodejs5.12.0/node_modules/npm/lib/ls.js new file mode 100644 index 00000000..7ef99bc4 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/ls.js @@ -0,0 +1,478 @@ +// show the installed versions of packages +// +// --parseable creates output like this: +// ::: +// Flags are a :-separated list of zero or more indicators + +module.exports = exports = ls + +var path = require('path') +var url = require('url') +var readPackageTree = require('read-package-tree') +var log = require('npmlog') +var archy = require('archy') +var semver = require('semver') +var color = require('ansicolors') +var npa = require('npm-package-arg') +var iferr = require('iferr') +var npm = require('./npm.js') +var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js') +var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var packageId = require('./utils/package-id.js') + +ls.usage = 'npm ls [[<@scope>/] ...]' + + '\n\naliases: list, la, ll' + +ls.completion = require('./utils/completion/installed-deep.js') + +function ls (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + var dir = path.resolve(npm.dir, '..') + readPackageTree(dir, andRecalculateMetadata(iferr(cb, function (physicalTree) { + lsFromTree(dir, physicalTree, args, silent, cb) + }))) +} + +function andRecalculateMetadata (next) { + return function (er, tree) { + recalculateMetadata(tree || {}, log, next) + } +} + +function inList (list, value) { + return list.indexOf(value) !== -1 +} + +var lsFromTree = ls.fromTree = function (dir, physicalTree, args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + // npm ls 'foo@~1.3' bar 'baz@<2' + if (!args) { + args = [] + } else { + args = args.map(function (a) { + var p = npa(a) + var name = p.name + var ver = semver.validRange(p.rawSpec) || '' + return [ name, ver, a ] + }) + } + + var data = mutateIntoLogicalTree.asReadInstalled(physicalTree) + + pruneNestedExtraneous(data) + filterByEnv(data) + var bfs = filterFound(bfsify(data), args) + var lite = getLite(bfs) + + if (silent) return cb(null, data, lite) + + var long = npm.config.get('long') + var json = npm.config.get('json') + var out + if (json) { + var seen = [] + var d = long ? bfs : lite + // the raw data can be circular + out = JSON.stringify(d, function (k, o) { + if (typeof o === 'object') { + if (inList(seen, o)) return '[Circular]' + seen.push(o) + } + return o + }, 2) + } else if (npm.config.get('parseable')) { + out = makeParseable(bfs, long, dir) + } else if (data) { + out = makeArchy(bfs, long, dir) + } + console.log(out) + + if (args.length && !data._found) process.exitCode = 1 + + var er + // if any errors were found, then complain and exit status 1 + if (lite.problems && lite.problems.length) { + er = lite.problems.join('\n') + } + cb(er, data, lite) +} + +function pruneNestedExtraneous (data, visited) { + visited = visited || [] + visited.push(data) + for (var i in data.dependencies) { + if (data.dependencies[i].extraneous) { + data.dependencies[i].dependencies = {} + } else if (visited.indexOf(data.dependencies[i]) === -1) { + pruneNestedExtraneous(data.dependencies[i], visited) + } + } +} + +function filterByEnv (data) { + var dev = npm.config.get('dev') || /^dev(elopment)?$/.test(npm.config.get('only')) + var production = npm.config.get('production') || /^prod(uction)?$/.test(npm.config.get('only')) + var dependencies = {} + var devKeys = Object.keys(data.devDependencies || []) + var prodKeys = Object.keys(data._dependencies || []) + Object.keys(data.dependencies).forEach(function (name) { + if (!dev && inList(devKeys, name) && data.dependencies[name].missing) { + return + } + + if ((dev && inList(devKeys, name)) || // only --dev + (production && inList(prodKeys, name)) || // only --production + (!dev && !production)) { // no --production|--dev|--only=xxx + dependencies[name] = data.dependencies[name] + } + }) + data.dependencies = dependencies +} + +function alphasort (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return a > b ? 1 + : a < b ? -1 : 0 +} + +function isCruft (data) { + return data.extraneous && data.error && data.error.code === 'ENOTDIR' +} + +function getLite (data, noname, depth) { + var lite = {} + + if (isCruft(data)) return lite + + var maxDepth = npm.config.get('depth') + + if (typeof depth === 'undefined') depth = 0 + if (!noname && data.name) lite.name = data.name + if (data.version) lite.version = data.version + if (data.extraneous) { + lite.extraneous = true + lite.problems = lite.problems || [] + lite.problems.push('extraneous: ' + packageId(data) + ' ' + (data.path || '')) + } + + if (data.error && data.path !== path.resolve(npm.globalDir, '..') && + (data.error.code !== 'ENOENT' || noname)) { + lite.invalid = true + lite.problems = lite.problems || [] + var message = data.error.message + lite.problems.push('error in ' + data.path + ': ' + message) + } + + if (data._from) { + lite.from = data._from + } + + if (data._resolved) { + lite.resolved = data._resolved + } + + if (data.invalid) { + lite.invalid = true + lite.problems = lite.problems || [] + lite.problems.push('invalid: ' + + packageId(data) + + ' ' + (data.path || '')) + } + + if (data.peerInvalid) { + lite.peerInvalid = true + lite.problems = lite.problems || [] + lite.problems.push('peer dep not met: ' + + packageId(data) + + ' ' + (data.path || '')) + } + + var deps = (data.dependencies && Object.keys(data.dependencies)) || [] + if (deps.length) { + lite.dependencies = deps.map(function (d) { + var dep = data.dependencies[d] + if (dep.missing && !dep.optional) { + lite.problems = lite.problems || [] + var p + if (data.depth > maxDepth) { + p = 'max depth reached: ' + } else { + p = 'missing: ' + } + p += d + '@' + dep.requiredBy + + ', required by ' + + packageId(data) + lite.problems.push(p) + return [d, { required: dep.requiredBy, missing: true }] + } else if (dep.peerMissing) { + lite.problems = lite.problems || [] + dep.peerMissing.forEach(function (missing) { + var pdm = 'peer dep missing: ' + + missing.requires + + ', required by ' + + missing.requiredBy + lite.problems.push(pdm) + }) + return [d, { required: dep, peerMissing: true }] + } else if (npm.config.get('json')) { + if (depth === maxDepth) delete dep.dependencies + return [d, getLite(dep, true, depth + 1)] + } + return [d, getLite(dep, true)] + }).reduce(function (deps, d) { + if (d[1].problems) { + lite.problems = lite.problems || [] + lite.problems.push.apply(lite.problems, d[1].problems) + } + deps[d[0]] = d[1] + return deps + }, {}) + } + return lite +} + +function bfsify (root) { + // walk over the data, and turn it from this: + // +-- a + // | `-- b + // | `-- a (truncated) + // `--b (truncated) + // into this: + // +-- a + // `-- b + // which looks nicer + var queue = [root] + var seen = [root] + + while (queue.length) { + var current = queue.shift() + var deps = current.dependencies = current.dependencies || {} + Object.keys(deps).forEach(function (d) { + var dep = deps[d] + if (dep.missing) return + if (inList(seen, dep)) { + if (npm.config.get('parseable') || !npm.config.get('long')) { + delete deps[d] + return + } else { + dep = deps[d] = Object.create(dep) + dep.dependencies = {} + } + } + queue.push(dep) + seen.push(dep) + }) + } + + return root +} + +function filterFound (root, args) { + if (!args.length) return root + var deps = root.dependencies + if (deps) { + Object.keys(deps).forEach(function (depName) { + var dep = filterFound(deps[depName], args) + if (dep.peerMissing) return + + // see if this one itself matches + var found = false + for (var ii = 0; !found && ii < args.length; ii++) { + var argName = args[ii][0] + var argVersion = args[ii][1] + var argRaw = args[ii][2] + if (depName === argName) { + found = semver.satisfies(dep.version, argVersion, true) + } else if (dep.path === argRaw) { + found = true + } + } + // included explicitly + if (found) dep._found = true + // included because a child was included + if (dep._found && !root._found) root._found = 1 + // not included + if (!dep._found) delete deps[depName] + }) + } + if (!root._found) root._found = false + return root +} + +function makeArchy (data, long, dir) { + var out = makeArchy_(data, long, dir, 0) + return archy(out, '', { unicode: npm.config.get('unicode') }) +} + +function makeArchy_ (data, long, dir, depth, parent, d) { + if (data.missing) { + if (depth - 1 <= npm.config.get('depth')) { + // just missing + var unmet = 'UNMET ' + (data.optional ? 'OPTIONAL ' : '') + 'DEPENDENCY' + if (npm.color) { + if (data.optional) { + unmet = color.bgBlack(color.yellow(unmet)) + } else { + unmet = color.bgBlack(color.red(unmet)) + } + } + data = unmet + ' ' + d + '@' + data.requiredBy + } else { + data = d + '@' + data.requiredBy + } + return data + } + + var out = {} + // the top level is a bit special. + out.label = data._id || '' + if (data._found === true && data._id) { + if (npm.color) { + out.label = color.bgBlack(color.yellow(out.label.trim())) + ' ' + } else { + out.label = out.label.trim() + ' ' + } + } + if (data.link) out.label += ' -> ' + data.link + + if (data.invalid) { + if (data.realName !== data.name) out.label += ' (' + data.realName + ')' + var invalid = 'invalid' + if (npm.color) invalid = color.bgBlack(color.red(invalid)) + out.label += ' ' + invalid + } + + if (data.peerInvalid) { + var peerInvalid = 'peer invalid' + if (npm.color) peerInvalid = color.bgBlack(color.red(peerInvalid)) + out.label += ' ' + peerInvalid + } + + if (data.peerMissing) { + var peerMissing = 'UNMET PEER DEPENDENCY' + if (npm.color) peerMissing = color.bgBlack(color.red(peerMissing)) + out.label = peerMissing + ' ' + out.label + } + + if (data.extraneous && data.path !== dir) { + var extraneous = 'extraneous' + if (npm.color) extraneous = color.bgBlack(color.green(extraneous)) + out.label += ' ' + extraneous + } + + if (data.error && depth) { + var message = data.error.message + if (message.indexOf('\n')) message = message.slice(0, message.indexOf('\n')) + var error = 'error: ' + message + if (npm.color) error = color.bgRed(color.brightWhite(error)) + out.label += ' ' + error + } + + // add giturl to name@version + if (data._resolved) { + try { + var type = npa(data._resolved).type + var isGit = type === 'git' || type === 'hosted' + if (isGit) { + out.label += ' (' + data._resolved + ')' + } + } catch (ex) { + // npa threw an exception then it ain't git so whatev + } + } + + if (long) { + if (dir === data.path) out.label += '\n' + dir + out.label += '\n' + getExtras(data, dir) + } else if (dir === data.path) { + if (out.label) out.label += ' ' + out.label += dir + } + + // now all the children. + out.nodes = [] + if (depth <= npm.config.get('depth')) { + out.nodes = Object.keys(data.dependencies || {}) + .sort(alphasort).filter(function (d) { + return !isCruft(data.dependencies[d]) + }).map(function (d) { + return makeArchy_(data.dependencies[d], long, dir, depth + 1, data, d) + }) + } + + if (out.nodes.length === 0 && data.path === dir) { + out.nodes = ['(empty)'] + } + + return out +} + +function getExtras (data) { + var extras = [] + + if (data.description) extras.push(data.description) + if (data.repository) extras.push(data.repository.url) + if (data.homepage) extras.push(data.homepage) + if (data._from) { + var from = data._from + if (from.indexOf(data.name + '@') === 0) { + from = from.substr(data.name.length + 1) + } + var u = url.parse(from) + if (u.protocol) extras.push(from) + } + return extras.join('\n') +} + +function makeParseable (data, long, dir, depth, parent, d) { + depth = depth || 0 + if (depth > npm.config.get('depth')) return [ makeParseable_(data, long, dir, depth, parent, d) ] + return [ makeParseable_(data, long, dir, depth, parent, d) ] + .concat(Object.keys(data.dependencies || {}) + .sort(alphasort).map(function (d) { + return makeParseable(data.dependencies[d], long, dir, depth + 1, data, d) + })) + .filter(function (x) { return x }) + .join('\n') +} + +function makeParseable_ (data, long, dir, depth, parent, d) { + if (data.hasOwnProperty('_found') && data._found !== true) return '' + + if (data.missing) { + if (depth < npm.config.get('depth')) { + data = npm.config.get('long') + ? path.resolve(parent.path, 'node_modules', d) + + ':' + d + '@' + JSON.stringify(data.requiredBy) + ':INVALID:MISSING' + : '' + } else { + data = path.resolve(dir || '', 'node_modules', d || '') + + (npm.config.get('long') + ? ':' + d + '@' + JSON.stringify(data.requiredBy) + + ':' + // no realpath resolved + ':MAXDEPTH' + : '') + } + + return data + } + + if (!npm.config.get('long')) return data.path + + return data.path + + ':' + (data._id || '') + + ':' + (data.realPath !== data.path ? data.realPath : '') + + (data.extraneous ? ':EXTRANEOUS' : '') + + (data.error && data.path !== path.resolve(npm.globalDir, '..') ? ':ERROR' : '') + + (data.invalid ? ':INVALID' : '') + + (data.peerInvalid ? ':PEERINVALID' : '') + + (data.peerMissing ? ':PEERINVALID:MISSING' : '') +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/npm.js b/bin/nodejs5.12.0/node_modules/npm/lib/npm.js new file mode 100644 index 00000000..744089f7 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/npm.js @@ -0,0 +1,394 @@ +;(function () { + // windows: running 'npm blah' in this folder will invoke WSH, not node. + /*globals WScript*/ + if (typeof WScript !== 'undefined') { + WScript.echo( + 'npm does not work when run\n' + + 'with the Windows Scripting Host\n\n' + + '"cd" to a different directory,\n' + + 'or type "npm.cmd ",\n' + + 'or type "node npm ".' + ) + WScript.quit(1) + return + } + + var gfs = require('graceful-fs') + // Patch the global fs module here at the app level + var fs = gfs.gracefulify(require('fs')) + + var EventEmitter = require('events').EventEmitter + var npm = module.exports = new EventEmitter() + var npmconf = require('./config/core.js') + var log = require('npmlog') + + var path = require('path') + var abbrev = require('abbrev') + var which = require('which') + var CachingRegClient = require('./cache/caching-client.js') + var parseJSON = require('./utils/parse-json.js') + var aliases = require('./config/cmd-list').aliases + var cmdList = require('./config/cmd-list').cmdList + var plumbing = require('./config/cmd-list').plumbing + + npm.config = { + loaded: false, + get: function () { + throw new Error('npm.load() required') + }, + set: function () { + throw new Error('npm.load() required') + } + } + + npm.commands = {} + + npm.rollbacks = [] + + try { + // startup, ok to do this synchronously + var j = parseJSON(fs.readFileSync( + path.join(__dirname, '../package.json')) + '') + npm.version = j.version + } catch (ex) { + try { + log.info('error reading version', ex) + } catch (er) {} + npm.version = ex + } + + var commandCache = {} + var aliasNames = Object.keys(aliases) + + var littleGuys = [ 'isntall', 'verison' ] + var fullList = cmdList.concat(aliasNames).filter(function (c) { + return plumbing.indexOf(c) === -1 + }) + var abbrevs = abbrev(fullList) + + // we have our reasons + fullList = npm.fullList = fullList.filter(function (c) { + return littleGuys.indexOf(c) === -1 + }) + + Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) { + Object.defineProperty(npm.commands, c, { get: function () { + if (!loaded) { + throw new Error( + 'Call npm.load(config, cb) before using this command.\n' + + 'See the README.md or cli.js for example usage.' + ) + } + var a = npm.deref(c) + if (c === 'la' || c === 'll') { + npm.config.set('long', true) + } + + npm.command = c + if (commandCache[a]) return commandCache[a] + + var cmd = require(__dirname + '/' + a + '.js') + + commandCache[a] = function () { + var args = Array.prototype.slice.call(arguments, 0) + if (typeof args[args.length - 1] !== 'function') { + args.push(defaultCb) + } + if (args.length === 1) args.unshift([]) + + npm.registry.version = npm.version + if (!npm.registry.refer) { + npm.registry.refer = [a].concat(args[0]).map(function (arg) { + // exclude anything that might be a URL, path, or private module + // Those things will always have a slash in them somewhere + if (arg && arg.match && arg.match(/\/|\\/)) { + return '[REDACTED]' + } else { + return arg + } + }).filter(function (arg) { + return arg && arg.match + }).join(' ') + } + + cmd.apply(npm, args) + } + + Object.keys(cmd).forEach(function (k) { + commandCache[a][k] = cmd[k] + }) + + return commandCache[a] + }, enumerable: fullList.indexOf(c) !== -1, configurable: true }) + + // make css-case commands callable via camelCase as well + if (c.match(/\-([a-z])/)) { + addCommand(c.replace(/\-([a-z])/g, function (a, b) { + return b.toUpperCase() + })) + } + }) + + function defaultCb (er, data) { + log.disableProgress() + if (er) console.error(er.stack || er.message) + else console.log(data) + } + + npm.deref = function (c) { + if (!c) return '' + if (c.match(/[A-Z]/)) { + c = c.replace(/([A-Z])/g, function (m) { + return '-' + m.toLowerCase() + }) + } + if (plumbing.indexOf(c) !== -1) return c + var a = abbrevs[c] + if (aliases[a]) a = aliases[a] + return a + } + + var loaded = false + var loading = false + var loadErr = null + var loadListeners = [] + + function loadCb (er) { + loadListeners.forEach(function (cb) { + process.nextTick(cb.bind(npm, er, npm)) + }) + loadListeners.length = 0 + } + + npm.load = function (cli, cb_) { + if (!cb_ && typeof cli === 'function') { + cb_ = cli + cli = {} + } + if (!cb_) cb_ = function () {} + if (!cli) cli = {} + loadListeners.push(cb_) + if (loaded || loadErr) return cb(loadErr) + if (loading) return + loading = true + var onload = true + + function cb (er) { + if (loadErr) return + loadErr = er + if (er) return cb_(er) + if (npm.config.get('force')) { + log.warn('using --force', 'I sure hope you know what you are doing.') + } + npm.config.loaded = true + loaded = true + loadCb(loadErr = er) + onload = onload && npm.config.get('onload-script') + if (onload) { + try { + require(onload) + } catch (err) { + log.warn('onload-script', 'failed to require onload script', onload) + log.warn('onload-script', err) + } + onload = false + } + } + + log.pause() + + load(npm, cli, cb) + } + + function load (npm, cli, cb) { + which(process.argv[0], function (er, node) { + if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) { + log.verbose('node symlink', node) + process.execPath = node + process.installPrefix = path.resolve(node, '..', '..') + } + + // look up configs + var builtin = path.resolve(__dirname, '..', 'npmrc') + npmconf.load(cli, builtin, function (er, config) { + if (er === config) er = null + + npm.config = config + if (er) return cb(er) + + // if the 'project' config is not a filename, and we're + // not in global mode, then that means that it collided + // with either the default or effective userland config + if (!config.get('global') && + config.sources.project && + config.sources.project.type !== 'ini') { + log.verbose( + 'config', + 'Skipping project config: %s. (matches userconfig)', + config.localPrefix + '/.npmrc' + ) + } + + // Include npm-version and node-version in user-agent + var ua = config.get('user-agent') || '' + ua = ua.replace(/\{node-version\}/gi, process.version) + ua = ua.replace(/\{npm-version\}/gi, npm.version) + ua = ua.replace(/\{platform\}/gi, process.platform) + ua = ua.replace(/\{arch\}/gi, process.arch) + config.set('user-agent', ua) + + var color = config.get('color') + + log.level = config.get('loglevel') + log.heading = config.get('heading') || 'npm' + log.stream = config.get('logstream') + + switch (color) { + case 'always': + log.enableColor() + npm.color = true + break + case false: + log.disableColor() + npm.color = false + break + default: + var tty = require('tty') + if (process.stdout.isTTY) npm.color = true + else if (!tty.isatty) npm.color = true + else if (tty.isatty(1)) npm.color = true + else npm.color = false + break + } + + log.resume() + + if (config.get('progress')) { + log.enableProgress() + } else { + log.disableProgress() + } + + if (config.get('unicode')) { + log.enableUnicode() + } else { + log.disableUnicode() + } + + // at this point the configs are all set. + // go ahead and spin up the registry client. + npm.registry = new CachingRegClient(npm.config) + + var umask = npm.config.get('umask') + npm.modes = { + exec: parseInt('0777', 8) & (~umask), + file: parseInt('0666', 8) & (~umask), + umask: umask + } + + var gp = Object.getOwnPropertyDescriptor(config, 'globalPrefix') + Object.defineProperty(npm, 'globalPrefix', gp) + + var lp = Object.getOwnPropertyDescriptor(config, 'localPrefix') + Object.defineProperty(npm, 'localPrefix', lp) + + return cb(null, npm) + }) + }) + } + + Object.defineProperty(npm, 'prefix', + { + get: function () { + return npm.config.get('global') ? npm.globalPrefix : npm.localPrefix + }, + set: function (r) { + var k = npm.config.get('global') ? 'globalPrefix' : 'localPrefix' + npm[k] = r + return r + }, + enumerable: true + }) + + Object.defineProperty(npm, 'bin', + { + get: function () { + if (npm.config.get('global')) return npm.globalBin + return path.resolve(npm.root, '.bin') + }, + enumerable: true + }) + + Object.defineProperty(npm, 'globalBin', + { + get: function () { + var b = npm.globalPrefix + if (process.platform !== 'win32') b = path.resolve(b, 'bin') + return b + } + }) + + Object.defineProperty(npm, 'dir', + { + get: function () { + if (npm.config.get('global')) return npm.globalDir + return path.resolve(npm.prefix, 'node_modules') + }, + enumerable: true + }) + + Object.defineProperty(npm, 'globalDir', + { + get: function () { + return (process.platform !== 'win32') + ? path.resolve(npm.globalPrefix, 'lib', 'node_modules') + : path.resolve(npm.globalPrefix, 'node_modules') + }, + enumerable: true + }) + + Object.defineProperty(npm, 'root', + { get: function () { return npm.dir } }) + + Object.defineProperty(npm, 'cache', + { get: function () { return npm.config.get('cache') }, + set: function (r) { return npm.config.set('cache', r) }, + enumerable: true + }) + + var tmpFolder + var rand = require('crypto').randomBytes(4).toString('hex') + Object.defineProperty(npm, 'tmp', + { + get: function () { + if (!tmpFolder) tmpFolder = 'npm-' + process.pid + '-' + rand + return path.resolve(npm.config.get('tmp'), tmpFolder) + }, + enumerable: true + }) + + // the better to repl you with + Object.getOwnPropertyNames(npm.commands).forEach(function (n) { + if (npm.hasOwnProperty(n) || n === 'config') return + + Object.defineProperty(npm, n, { get: function () { + return function () { + var args = Array.prototype.slice.call(arguments, 0) + var cb = defaultCb + + if (args.length === 1 && Array.isArray(args[0])) { + args = args[0] + } + + if (typeof args[args.length - 1] === 'function') { + cb = args.pop() + } + npm.commands[n](args, cb) + } + }, enumerable: false, configurable: true }) + }) + + if (require.main === module) { + require('../bin/npm-cli.js') + } +})() diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/outdated.js b/bin/nodejs5.12.0/node_modules/npm/lib/outdated.js new file mode 100644 index 00000000..a60512da --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/outdated.js @@ -0,0 +1,429 @@ +/* + +npm outdated [pkg] + +Does the following: + +1. check for a new version of pkg + +If no packages are specified, then run for all installed +packages. + +--parseable creates output like this: +::: + +*/ + +module.exports = outdated + +outdated.usage = 'npm outdated [[<@scope>/] ...]' + +outdated.completion = require('./utils/completion/installed-deep.js') + +var os = require('os') +var url = require('url') +var path = require('path') +var log = require('npmlog') +var readPackageTree = require('read-package-tree') +var readJson = require('read-package-json') +var asyncMap = require('slide').asyncMap +var color = require('ansicolors') +var styles = require('ansistyles') +var table = require('text-table') +var semver = require('semver') +var npa = require('npm-package-arg') +var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js') +var cache = require('./cache.js') +var npm = require('./npm.js') +var long = npm.config.get('long') +var mapToRegistry = require('./utils/map-to-registry.js') +var isExtraneous = require('./install/is-extraneous.js') +var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var moduleName = require('./utils/module-name.js') + +function uniqName (item) { + return item[0].path + '|' + item[1] + '|' + item[7] +} + +function uniq (list) { + var uniqed = [] + var seen = {} + list.forEach(function (item) { + var name = uniqName(item) + if (seen[name]) return + seen[name] = true + uniqed.push(item) + }) + return uniqed +} + +function andRecalculateMetadata (next) { + return function (er, tree) { + if (er) return next(er) + recalculateMetadata(tree, log, next) + } +} + +function outdated (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + var dir = path.resolve(npm.dir, '..') + + // default depth for `outdated` is 0 (cf. `ls`) + if (npm.config.get('depth') === Infinity) npm.config.set('depth', 0) + + readPackageTree(dir, andRecalculateMetadata(function (er, tree) { + mutateIntoLogicalTree(tree) + outdated_(args, '', tree, {}, 0, function (er, list) { + list = uniq(list || []).sort(function (aa, bb) { + return aa[0].path.localeCompare(bb[0].path) || + aa[1].localeCompare(bb[1]) + }) + if (er || silent || list.length === 0) return cb(er, list) + log.disableProgress() + if (npm.config.get('json')) { + console.log(makeJSON(list)) + } else if (npm.config.get('parseable')) { + console.log(makeParseable(list)) + } else { + var outList = list.map(makePretty) + var outHead = [ 'Package', + 'Current', + 'Wanted', + 'Latest', + 'Location' + ] + if (long) outHead.push('Package Type') + var outTable = [outHead].concat(outList) + + if (npm.color) { + outTable[0] = outTable[0].map(function (heading) { + return styles.underline(heading) + }) + } + + var tableOpts = { + align: ['l', 'r', 'r', 'r', 'l'], + stringLength: function (s) { return ansiTrim(s).length } + } + console.log(table(outTable, tableOpts)) + } + cb(null, list.map(function (item) { return [item[0].parent.path].concat(item.slice(1, 7)) })) + }) + })) +} + +// [[ dir, dep, has, want, latest, type ]] +function makePretty (p) { + var dep = p[0] + var depname = p[1] + var dir = dep.path + var has = p[2] + var want = p[3] + var latest = p[4] + var type = p[6] + var deppath = p[7] + + if (!npm.config.get('global')) { + dir = path.relative(process.cwd(), dir) + } + + var columns = [ depname, + has || 'MISSING', + want, + latest, + deppath + ] + if (long) columns[5] = type + + if (npm.color) { + columns[0] = color[has === want || want === 'linked' ? 'yellow' : 'red'](columns[0]) // dep + columns[2] = color.green(columns[2]) // want + columns[3] = color.magenta(columns[3]) // latest + columns[4] = color.brightBlack(columns[4]) // dir + if (long) columns[5] = color.brightBlack(columns[5]) // type + } + + return columns +} + +function ansiTrim (str) { + var r = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' + + '\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g') + return str.replace(r, '') +} + +function makeParseable (list) { + return list.map(function (p) { + var dep = p[0] + var depname = p[1] + var dir = dep.path + var has = p[2] + var want = p[3] + var latest = p[4] + var type = p[6] + + var out = [ + dir, + depname + '@' + want, + (has ? (depname + '@' + has) : 'MISSING'), + depname + '@' + latest + ] + if (long) out.push(type) + + return out.join(':') + }).join(os.EOL) +} + +function makeJSON (list) { + var out = {} + list.forEach(function (p) { + var dep = p[0] + var depname = p[1] + var dir = dep.path + var has = p[2] + var want = p[3] + var latest = p[4] + var type = p[6] + if (!npm.config.get('global')) { + dir = path.relative(process.cwd(), dir) + } + out[depname] = { current: has, + wanted: want, + latest: latest, + location: dir + } + if (long) out[depname].type = type + }) + return JSON.stringify(out, null, 2) +} + +function outdated_ (args, path, tree, parentHas, depth, cb) { + if (!tree.package) tree.package = {} + if (path && tree.package.name) path += ' > ' + tree.package.name + if (!path && tree.package.name) path = tree.package.name + if (depth > npm.config.get('depth')) { + return cb(null, []) + } + var types = {} + var pkg = tree.package + + var deps = tree.children.filter(function (child) { return !isExtraneous(child) }) || [] + + deps.forEach(function (dep) { + types[moduleName(dep)] = 'dependencies' + }) + + Object.keys(tree.missingDeps).forEach(function (name) { + deps.push({ + package: { name: name }, + path: tree.path, + parent: tree, + isMissing: true + }) + types[name] = 'dependencies' + }) + + // If we explicitly asked for dev deps OR we didn't ask for production deps + // AND we asked to save dev-deps OR we didn't ask to save anything that's NOT + // dev deps then… + // (All the save checking here is because this gets called from npm-update currently + // and that requires this logic around dev deps.) + // FIXME: Refactor npm update to not be in terms of outdated. + var dev = npm.config.get('dev') || /^dev(elopment)?$/.test(npm.config.get('also')) + var prod = npm.config.get('production') || /^prod(uction)?$/.test(npm.config.get('only')) + if ((dev || !prod) && + (npm.config.get('save-dev') || ( + !npm.config.get('save') && !npm.config.get('save-optional')))) { + Object.keys(tree.missingDevDeps).forEach(function (name) { + deps.push({ + package: { name: name }, + path: tree.path, + parent: tree, + isMissing: true + }) + if (!types[name]) { + types[name] = 'devDependencies' + } + }) + } + + if (npm.config.get('save-dev')) { + deps = deps.filter(function (dep) { return pkg.devDependencies[moduleName(dep)] }) + deps.forEach(function (dep) { + types[moduleName(dep)] = 'devDependencies' + }) + } else if (npm.config.get('save')) { + // remove optional dependencies from dependencies during --save. + deps = deps.filter(function (dep) { return !pkg.optionalDependencies[moduleName(dep)] }) + } else if (npm.config.get('save-optional')) { + deps = deps.filter(function (dep) { return pkg.optionalDependencies[moduleName(dep)] }) + deps.forEach(function (dep) { + types[moduleName(dep)] = 'optionalDependencies' + }) + } + var doUpdate = dev || ( + !prod && + !Object.keys(parentHas).length && + !npm.config.get('global') + ) + if (doUpdate) { + Object.keys(pkg.devDependencies).forEach(function (k) { + if (!(k in parentHas)) { + deps[k] = pkg.devDependencies[k] + types[k] = 'devDependencies' + } + }) + } + + var has = Object.create(parentHas) + tree.children.forEach(function (child) { + if (child.package.name && child.package.private) { + deps = deps.filter(function (dep) { return dep !== child }) + } + has[child.package.name] = { + version: child.package.version, + from: child.package._from + } + }) + + // now get what we should have, based on the dep. + // if has[dep] !== shouldHave[dep], then cb with the data + // otherwise dive into the folder + asyncMap(deps, function (dep, cb) { + var name = moduleName(dep) + var required = (tree.package.dependencies)[name] || + (tree.package.optionalDependencies)[name] || + (tree.package.devDependencies)[name] || + dep.package._requested && dep.package._requested.spec || + '*' + if (!long) return shouldUpdate(args, dep, name, has, required, depth, path, cb) + + shouldUpdate(args, dep, name, has, required, depth, path, cb, types[name]) + }, cb) +} + +function shouldUpdate (args, tree, dep, has, req, depth, pkgpath, cb, type) { + // look up the most recent version. + // if that's what we already have, or if it's not on the args list, + // then dive into it. Otherwise, cb() with the data. + + // { version: , from: } + var curr = has[dep] + + function skip (er) { + // show user that no viable version can be found + if (er) return cb(er) + outdated_(args, + pkgpath, + tree, + has, + depth + 1, + cb) + } + + function doIt (wanted, latest) { + if (!long) { + return cb(null, [[tree, dep, curr && curr.version, wanted, latest, req, null, pkgpath]]) + } + cb(null, [[tree, dep, curr && curr.version, wanted, latest, req, type, pkgpath]]) + } + + if (args.length && args.indexOf(dep) === -1) return skip() + var parsed = npa(dep + '@' + req) + if (tree.isLink && (tree.parent !== null && tree.parent.parent === null)) { + return doIt('linked', 'linked') + } + if (parsed.type === 'git' || parsed.type === 'hosted') { + return doIt('git', 'git') + } + + // search for the latest package + mapToRegistry(dep, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, updateDeps) + }) + + function updateLocalDeps (latestRegistryVersion) { + readJson(path.resolve(parsed.spec, 'package.json'), function (er, localDependency) { + if (er) return cb() + + var wanted = localDependency.version + var latest = localDependency.version + + if (latestRegistryVersion) { + latest = latestRegistryVersion + if (semver.lt(wanted, latestRegistryVersion)) { + wanted = latestRegistryVersion + req = dep + '@' + latest + } + } + + if (curr.version !== wanted) { + doIt(wanted, latest) + } else { + skip() + } + }) + } + + function updateDeps (er, d) { + if (er) { + if (parsed.type !== 'local') return cb(er) + return updateLocalDeps() + } + + if (!d || !d['dist-tags'] || !d.versions) return cb() + var l = d.versions[d['dist-tags'].latest] + if (!l) return cb() + + var r = req + if (d['dist-tags'][req]) { + r = d['dist-tags'][req] + } + + if (semver.validRange(r, true)) { + // some kind of semver range. + // see if it's in the doc. + var vers = Object.keys(d.versions) + var v = semver.maxSatisfying(vers, r, true) + if (v) { + return onCacheAdd(null, d.versions[v]) + } + } + + // We didn't find the version in the doc. See if cache can find it. + cache.add(dep, req, null, false, onCacheAdd) + + function onCacheAdd (er, d) { + // if this fails, then it means we can't update this thing. + // it's probably a thing that isn't published. + if (er) { + if (er.code && er.code === 'ETARGET') { + // no viable version found + return skip(er) + } + return skip() + } + + // check that the url origin hasn't changed (#1727) and that + // there is no newer version available + var dFromUrl = d._from && url.parse(d._from).protocol + var cFromUrl = curr && curr.from && url.parse(curr.from).protocol + + if (!curr || + dFromUrl && cFromUrl && d._from !== curr.from || + d.version !== curr.version || + d.version !== l.version) { + if (parsed.type === 'local') return updateLocalDeps(l.version) + + doIt(d.version, l.version) + } else { + skip() + } + } + } +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/owner.js b/bin/nodejs5.12.0/node_modules/npm/lib/owner.js new file mode 100644 index 00000000..f5ba2b4d --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/owner.js @@ -0,0 +1,273 @@ +module.exports = owner + +owner.usage = 'npm owner add [<@scope>/]' + + '\nnpm owner rm [<@scope>/]' + + '\nnpm owner ls [<@scope>/]' + +var npm = require('./npm.js') +var log = require('npmlog') +var mapToRegistry = require('./utils/map-to-registry.js') +var readLocalPkg = require('./utils/read-local-package.js') + +owner.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length > 4) return cb() + if (argv.length <= 2) { + var subs = ['add', 'rm'] + if (opts.partialWord === 'l') subs.push('ls') + else subs.push('ls', 'list') + return cb(null, subs) + } + + npm.commands.whoami([], true, function (er, username) { + if (er) return cb() + + var un = encodeURIComponent(username) + var byUser, theUser + switch (argv[2]) { + case 'ls': + // FIXME: there used to be registry completion here, but it stopped + // making sense somewhere around 50,000 packages on the registry + return cb() + + case 'rm': + if (argv.length > 3) { + theUser = encodeURIComponent(argv[3]) + byUser = '-/by-user/' + theUser + '|' + un + return mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + console.error(uri) + npm.registry.get(uri, { auth: auth }, function (er, d) { + if (er) return cb(er) + // return the intersection + return cb(null, d[theUser].filter(function (p) { + // kludge for server adminery. + return un === 'isaacs' || d[un].indexOf(p) === -1 + })) + }) + }) + } + // else fallthrough + /*eslint no-fallthrough:0*/ + case 'add': + if (argv.length > 3) { + theUser = encodeURIComponent(argv[3]) + byUser = '-/by-user/' + theUser + '|' + un + return mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + console.error(uri) + npm.registry.get(uri, { auth: auth }, function (er, d) { + console.error(uri, er || d) + // return mine that they're not already on. + if (er) return cb(er) + var mine = d[un] || [] + var theirs = d[theUser] || [] + return cb(null, mine.filter(function (p) { + return theirs.indexOf(p) === -1 + })) + }) + }) + } + // just list all users who aren't me. + return mapToRegistry('-/users', npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, list) { + if (er) return cb() + return cb(null, Object.keys(list).filter(function (n) { + return n !== un + })) + }) + }) + + default: + return cb() + } + }) +} + +function owner (args, cb) { + var action = args.shift() + switch (action) { + case 'ls': case 'list': return ls(args[0], cb) + case 'add': return add(args[0], args[1], cb) + case 'rm': case 'remove': return rm(args[0], args[1], cb) + default: return unknown(action, cb) + } +} + +function ls (pkg, cb) { + if (!pkg) { + return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(owner.usage) + ls(pkg, cb) + }) + } + + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, data) { + var msg = '' + if (er) { + log.error('owner ls', "Couldn't get owner data", pkg) + return cb(er) + } + var owners = data.maintainers + if (!owners || !owners.length) { + msg = 'admin party!' + } else { + msg = owners.map(function (o) { + return o.name + ' <' + o.email + '>' + }).join('\n') + } + console.log(msg) + cb(er, owners) + }) + }) +} + +function add (user, pkg, cb) { + if (!user) return cb(owner.usage) + if (!pkg) { + return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(new Error(owner.usage)) + add(user, pkg, cb) + }) + } + + log.verbose('owner add', '%s to %s', user, pkg) + mutate(pkg, user, function (u, owners) { + if (!owners) owners = [] + for (var i = 0, l = owners.length; i < l; i++) { + var o = owners[i] + if (o.name === u.name) { + log.info( + 'owner add', + 'Already a package owner: ' + o.name + ' <' + o.email + '>' + ) + return false + } + } + owners.push(u) + return owners + }, cb) +} + +function rm (user, pkg, cb) { + if (!pkg) { + return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(new Error(owner.usage)) + rm(user, pkg, cb) + }) + } + + log.verbose('owner rm', '%s from %s', user, pkg) + mutate(pkg, user, function (u, owners) { + var found = false + var m = owners.filter(function (o) { + var match = (o.name === user) + found = found || match + return !match + }) + + if (!found) { + log.info('owner rm', 'Not a package owner: ' + user) + return false + } + + if (!m.length) { + return new Error( + 'Cannot remove all owners of a package. Add someone else first.' + ) + } + + return m + }, cb) +} + +function mutate (pkg, user, mutation, cb) { + if (user) { + var byUser = '-/user/org.couchdb.user:' + user + mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, mutate_) + }) + } else { + mutate_(null, null) + } + + function mutate_ (er, u) { + if (!er && user && (!u || u.error)) { + er = new Error( + "Couldn't get user data for " + user + ': ' + JSON.stringify(u) + ) + } + + if (er) { + log.error('owner mutate', 'Error getting user data for %s', user) + return cb(er) + } + + if (u) u = { name: u.name, email: u.email } + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, data) { + if (er) { + log.error('owner mutate', 'Error getting package data for %s', pkg) + return cb(er) + } + + // save the number of maintainers before mutation so that we can figure + // out if maintainers were added or removed + var beforeMutation = data.maintainers.length + + var m = mutation(u, data.maintainers) + if (!m) return cb() // handled + if (m instanceof Error) return cb(m) // error + + data = { + _id: data._id, + _rev: data._rev, + maintainers: m + } + var dataPath = pkg.replace('/', '%2f') + '/-rev/' + data._rev + mapToRegistry(dataPath, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + method: 'PUT', + body: data, + auth: auth + } + npm.registry.request(uri, params, function (er, data) { + if (!er && data.error) { + er = new Error('Failed to update package metadata: ' + JSON.stringify(data)) + } + + if (er) { + log.error('owner mutate', 'Failed to update package metadata') + } else if (m.length > beforeMutation) { + console.log('+ %s (%s)', user, pkg) + } else if (m.length < beforeMutation) { + console.log('- %s (%s)', user, pkg) + } + + cb(er, data) + }) + }) + }) + }) + } +} + +function unknown (action, cb) { + cb('Usage: \n' + owner.usage) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/pack.js b/bin/nodejs5.12.0/node_modules/npm/lib/pack.js new file mode 100644 index 00000000..3dc50cf0 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/pack.js @@ -0,0 +1,72 @@ +// npm pack +// Packs the specified package into a .tgz file, which can then +// be installed. + +module.exports = pack + +var install = require('./install.js') +var cache = require('./cache.js') +var fs = require('graceful-fs') +var chain = require('slide').chain +var path = require('path') +var cwd = process.cwd() +var writeStreamAtomic = require('fs-write-stream-atomic') +var cachedPackageRoot = require('./cache/cached-package-root.js') + +pack.usage = 'npm pack [[<@scope>/]...]' + +// if it can be installed, it can be packed. +pack.completion = install.completion + +function pack (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + if (args.length === 0) args = ['.'] + + chain( + args.map(function (arg) { return function (cb) { pack_(arg, cb) } }), + function (er, files) { + if (er || silent) return cb(er, files) + printFiles(files, cb) + } + ) +} + +function printFiles (files, cb) { + files = files.map(function (file) { + return path.relative(cwd, file) + }) + console.log(files.join('\n')) + cb() +} + +// add to cache, then cp to the cwd +function pack_ (pkg, cb) { + cache.add(pkg, null, null, false, function (er, data) { + if (er) return cb(er) + + // scoped packages get special treatment + var name = data.name + if (name[0] === '@') name = name.substr(1).replace(/\//g, '-') + var fname = name + '-' + data.version + '.tgz' + + var cached = path.join(cachedPackageRoot(data), 'package.tgz') + var from = fs.createReadStream(cached) + var to = writeStreamAtomic(fname) + var errState = null + + from.on('error', cb_) + to.on('error', cb_) + to.on('close', cb_) + from.pipe(to) + + function cb_ (er) { + if (errState) return + if (er) return cb(errState = er) + cb(null, fname) + } + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/ping.js b/bin/nodejs5.12.0/node_modules/npm/lib/ping.js new file mode 100644 index 00000000..90639598 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/ping.js @@ -0,0 +1,20 @@ +var npm = require('./npm.js') + +module.exports = ping + +ping.usage = 'npm ping\nping registry' + +function ping (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + var registry = npm.config.get('registry') + if (!registry) return cb(new Error('no default registry set')) + var auth = npm.config.getCredentialsByURI(registry) + + npm.registry.ping(registry, {auth: auth}, function (er, pong) { + if (!silent) console.log(JSON.stringify(pong)) + cb(er, er ? null : pong) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/prefix.js b/bin/nodejs5.12.0/node_modules/npm/lib/prefix.js new file mode 100644 index 00000000..5d6103f9 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/prefix.js @@ -0,0 +1,14 @@ +module.exports = prefix + +var npm = require('./npm.js') + +prefix.usage = 'npm prefix [-g]' + +function prefix (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + if (!silent) console.log(npm.prefix) + process.nextTick(cb.bind(this, null, npm.prefix)) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/prune.js b/bin/nodejs5.12.0/node_modules/npm/lib/prune.js new file mode 100644 index 00000000..f74aab82 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/prune.js @@ -0,0 +1,54 @@ +// prune extraneous packages. + +module.exports = prune + +prune.usage = 'npm prune [[<@scope>/]...] [--production]' + +var readInstalled = require('read-installed') +var npm = require('./npm.js') +var path = require('path') +var readJson = require('read-package-json') +var log = require('npmlog') + +prune.completion = require('./utils/completion/installed-deep.js') + +function prune (args, cb) { + // check if is a valid package.json file + var jsonFile = path.resolve(npm.dir, '..', 'package.json') + readJson(jsonFile, log.warn, function (er) { + if (er) return cb(er) + next() + }) + + function next () { + var opt = { + depth: npm.config.get('depth'), + dev: !npm.config.get('production') || npm.config.get('dev') + } + readInstalled(npm.prefix, opt, function (er, data) { + if (er) return cb(er) + prune_(args, data, cb) + }) + } +} + +function prune_ (args, data, cb) { + npm.commands.unbuild(prunables(args, data, []), cb) +} + +function prunables (args, data, seen) { + var deps = data.dependencies || {} + return Object.keys(deps).map(function (d) { + if (typeof deps[d] !== 'object' || seen.indexOf(deps[d]) !== -1) return null + seen.push(deps[d]) + if (deps[d].extraneous && (args.length === 0 || args.indexOf(d) !== -1)) { + var extra = deps[d] + delete deps[d] + return extra.path + } + return prunables(args, deps[d], seen) + }).filter(function (d) { return d !== null }) + .reduce(function FLAT (l, r) { + return l.concat(Array.isArray(r) ? r.reduce(FLAT, []) : r) + }, []) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/publish.js b/bin/nodejs5.12.0/node_modules/npm/lib/publish.js new file mode 100644 index 00000000..ebf2080c --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/publish.js @@ -0,0 +1,155 @@ + +module.exports = publish + +var npm = require('./npm.js') +var log = require('npmlog') +var path = require('path') +var readJson = require('read-package-json') +var lifecycle = require('./utils/lifecycle.js') +var chain = require('slide').chain +var mapToRegistry = require('./utils/map-to-registry.js') +var cachedPackageRoot = require('./cache/cached-package-root.js') +var createReadStream = require('graceful-fs').createReadStream +var npa = require('npm-package-arg') +var semver = require('semver') +var getPublishConfig = require('./utils/get-publish-config.js') + +publish.usage = 'npm publish [|] [--tag ] [--access ]' + + "\n\nPublishes '.' if no argument supplied" + + '\n\nSets tag `latest` if no --tag specified' + +publish.completion = function (opts, cb) { + // publish can complete to a folder with a package.json + // or a tarball, or a tarball url. + // for now, not yet implemented. + return cb() +} + +function publish (args, isRetry, cb) { + if (typeof cb !== 'function') { + cb = isRetry + isRetry = false + } + if (args.length === 0) args = ['.'] + if (args.length !== 1) return cb(publish.usage) + + log.verbose('publish', args) + + var t = npm.config.get('tag').trim() + if (semver.validRange(t)) { + var er = new Error('Tag name must not be a valid SemVer range: ' + t) + return cb(er) + } + + var arg = args[0] + // if it's a local folder, then run the prepublish there, first. + readJson(path.resolve(arg, 'package.json'), function (er, data) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + + if (data) { + if (!data.name) return cb(new Error('No name provided')) + if (!data.version) return cb(new Error('No version provided')) + } + + // Error is OK. Could be publishing a URL or tarball, however, that means + // that we will not have automatically run the prepublish script, since + // that gets run when adding a folder to the cache. + if (er) return cacheAddPublish(arg, false, isRetry, cb) + else cacheAddPublish(arg, true, isRetry, cb) + }) +} + +// didPre in this case means that we already ran the prepublish script, +// and that the 'dir' is an actual directory, and not something silly +// like a tarball or name@version thing. +// That means that we can run publish/postpublish in the dir, rather than +// in the cache dir. +function cacheAddPublish (dir, didPre, isRetry, cb) { + npm.commands.cache.add(dir, null, null, false, function (er, data) { + if (er) return cb(er) + log.silly('publish', data) + var cachedir = path.resolve(cachedPackageRoot(data), 'package') + chain( + [ + !didPre && [lifecycle, data, 'prepublish', cachedir], + [publish_, dir, data, isRetry, cachedir], + [lifecycle, data, 'publish', didPre ? dir : cachedir], + [lifecycle, data, 'postpublish', didPre ? dir : cachedir] + ], + cb + ) + }) +} + +function publish_ (arg, data, isRetry, cachedir, cb) { + if (!data) return cb(new Error('no package.json file found')) + + var mappedConfig = getPublishConfig( + data.publishConfig, + npm.config, + npm.registry + ) + var config = mappedConfig.config + var registry = mappedConfig.client + + data._npmVersion = npm.version + data._nodeVersion = process.versions.node + + delete data.modules + if (data.private) { + return cb(new Error( + 'This package has been marked as private\n' + + "Remove the 'private' field from the package.json to publish it." + )) + } + + mapToRegistry(data.name, config, function (er, registryURI, auth, registryBase) { + if (er) return cb(er) + + var tarballPath = cachedir + '.tgz' + + // we just want the base registry URL in this case + log.verbose('publish', 'registryBase', registryBase) + log.silly('publish', 'uploading', tarballPath) + + data._npmUser = { + name: auth.username, + email: auth.email + } + + var params = { + metadata: data, + body: createReadStream(tarballPath), + auth: auth + } + + // registry-frontdoor cares about the access level, which is only + // configurable for scoped packages + if (config.get('access')) { + if (!npa(data.name).scope && config.get('access') === 'restricted') { + return cb(new Error("Can't restrict access to unscoped packages.")) + } + + params.access = config.get('access') + } + + log.showProgress('publish:' + data._id) + registry.publish(registryBase, params, function (er) { + if (er && er.code === 'EPUBLISHCONFLICT' && + npm.config.get('force') && !isRetry) { + log.warn('publish', 'Forced publish over ' + data._id) + return npm.commands.unpublish([data._id], function (er) { + // ignore errors. Use the force. Reach out with your feelings. + // but if it fails again, then report the first error. + publish([arg], er || true, cb) + }) + } + // report the unpublish error if this was a retry and unpublish failed + if (er && isRetry && isRetry !== true) return cb(isRetry) + if (er) return cb(er) + log.clearProgress() + console.log('+ ' + data._id) + cb() + }) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/rebuild.js b/bin/nodejs5.12.0/node_modules/npm/lib/rebuild.js new file mode 100644 index 00000000..7be1b428 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/rebuild.js @@ -0,0 +1,75 @@ + +module.exports = rebuild + +var readInstalled = require('read-installed') +var semver = require('semver') +var log = require('npmlog') +var npm = require('./npm.js') +var npa = require('npm-package-arg') + +rebuild.usage = 'npm rebuild [[<@scope>/]...]' + +rebuild.completion = require('./utils/completion/installed-deep.js') + +function rebuild (args, cb) { + var opt = { depth: npm.config.get('depth'), dev: true } + readInstalled(npm.prefix, opt, function (er, data) { + log.info('readInstalled', typeof data) + if (er) return cb(er) + var set = filter(data, args) + var folders = Object.keys(set).filter(function (f) { + return f !== npm.prefix + }) + if (!folders.length) return cb() + log.silly('rebuild set', folders) + cleanBuild(folders, set, cb) + }) +} + +function cleanBuild (folders, set, cb) { + npm.commands.build(folders, function (er) { + if (er) return cb(er) + log.clearProgress() + console.log(folders.map(function (f) { + return set[f] + ' ' + f + }).join('\n')) + log.showProgress() + cb() + }) +} + +function filter (data, args, set, seen) { + if (!set) set = {} + if (!seen) seen = {} + if (set.hasOwnProperty(data.path)) return set + if (seen.hasOwnProperty(data.path)) return set + seen[data.path] = true + var pass + if (!args.length) pass = true // rebuild everything + else if (data.name && data._id) { + for (var i = 0, l = args.length; i < l; i++) { + var arg = args[i] + var nv = npa(arg) + var n = nv.name + var v = nv.rawSpec + if (n !== data.name) continue + if (!semver.satisfies(data.version, v, true)) continue + pass = true + break + } + } + if (pass && data._id) { + log.verbose('rebuild', 'path, id', [data.path, data._id]) + set[data.path] = data._id + } + // need to also dive through kids, always. + // since this isn't an install these won't get auto-built unless + // they're not dependencies. + Object.keys(data.dependencies || {}).forEach(function (d) { + // return + var dep = data.dependencies[d] + if (typeof dep === 'string') return + filter(dep, args, set, seen) + }) + return set +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/repo.js b/bin/nodejs5.12.0/node_modules/npm/lib/repo.js new file mode 100644 index 00000000..f5590ed3 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/repo.js @@ -0,0 +1,51 @@ +module.exports = repo + +repo.usage = 'npm repo []' + +var npm = require('./npm.js') +var opener = require('opener') +var hostedGitInfo = require('hosted-git-info') +var url_ = require('url') +var fetchPackageMetadata = require('./fetch-package-metadata.js') + +repo.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function repo (args, cb) { + var n = args.length ? args[0] : '.' + fetchPackageMetadata(n, '.', function (er, d) { + if (er) return cb(er) + getUrlAndOpen(d, cb) + }) +} + +function getUrlAndOpen (d, cb) { + var r = d.repository + if (!r) return cb(new Error('no repository')) + // XXX remove this when npm@v1.3.10 from node 0.10 is deprecated + // from https://github.com/npm/npm-www/issues/418 + var info = hostedGitInfo.fromUrl(r.url) + var url = info ? info.browse() : unknownHostedUrl(r.url) + + if (!url) return cb(new Error('no repository: could not get url')) + + opener(url, { command: npm.config.get('browser') }, cb) +} + +function unknownHostedUrl (url) { + try { + var idx = url.indexOf('@') + if (idx !== -1) { + url = url.slice(idx + 1).replace(/:([^\d]+)/, '/$1') + } + url = url_.parse(url) + var protocol = url.protocol === 'https:' + ? 'https:' + : 'http:' + return protocol + '//' + (url.host || '') + + url.path.replace(/\.git$/, '') + } catch (e) {} +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/restart.js b/bin/nodejs5.12.0/node_modules/npm/lib/restart.js new file mode 100644 index 00000000..576551e5 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/restart.js @@ -0,0 +1 @@ +module.exports = require('./utils/lifecycle.js').cmd('restart') diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/root.js b/bin/nodejs5.12.0/node_modules/npm/lib/root.js new file mode 100644 index 00000000..c92b5621 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/root.js @@ -0,0 +1,14 @@ +module.exports = root + +var npm = require('./npm.js') + +root.usage = 'npm root [-g]' + +function root (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + if (!silent) console.log(npm.dir) + process.nextTick(cb.bind(this, null, npm.dir)) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/run-script.js b/bin/nodejs5.12.0/node_modules/npm/lib/run-script.js new file mode 100644 index 00000000..f795681a --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/run-script.js @@ -0,0 +1,177 @@ +module.exports = runScript + +var lifecycle = require('./utils/lifecycle.js') +var npm = require('./npm.js') +var path = require('path') +var readJson = require('read-package-json') +var log = require('npmlog') +var chain = require('slide').chain + +runScript.usage = 'npm run-script [-- ...]' + + '\n\nalias: npm run' + +runScript.completion = function (opts, cb) { + // see if there's already a package specified. + var argv = opts.conf.argv.remain + + if (argv.length >= 4) return cb() + + if (argv.length === 3) { + // either specified a script locally, in which case, done, + // or a package, in which case, complete against its scripts + var json = path.join(npm.localPrefix, 'package.json') + return readJson(json, function (er, d) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (er) d = {} + var scripts = Object.keys(d.scripts || {}) + console.error('local scripts', scripts) + if (scripts.indexOf(argv[2]) !== -1) return cb() + // ok, try to find out which package it was, then + var pref = npm.config.get('global') ? npm.config.get('prefix') + : npm.localPrefix + var pkgDir = path.resolve(pref, 'node_modules', argv[2], 'package.json') + readJson(pkgDir, function (er, d) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (er) d = {} + var scripts = Object.keys(d.scripts || {}) + return cb(null, scripts) + }) + }) + } + + readJson(path.join(npm.localPrefix, 'package.json'), function (er, d) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + d = d || {} + cb(null, Object.keys(d.scripts || {})) + }) +} + +function runScript (args, cb) { + if (!args.length) return list(cb) + + var pkgdir = npm.localPrefix + var cmd = args.shift() + + readJson(path.resolve(pkgdir, 'package.json'), function (er, d) { + if (er) return cb(er) + run(d, pkgdir, cmd, args, cb) + }) +} + +function list (cb) { + var json = path.join(npm.localPrefix, 'package.json') + var cmdList = [ + 'publish', + 'install', + 'uninstall', + 'test', + 'stop', + 'start', + 'restart', + 'version' + ].reduce(function (l, p) { + return l.concat(['pre' + p, p, 'post' + p]) + }, []) + return readJson(json, function (er, d) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (er) d = {} + var allScripts = Object.keys(d.scripts || {}) + var scripts = [] + var runScripts = [] + allScripts.forEach(function (script) { + if (cmdList.indexOf(script) !== -1) scripts.push(script) + else runScripts.push(script) + }) + + if (log.level === 'silent') { + return cb(null, allScripts) + } + + if (npm.config.get('json')) { + console.log(JSON.stringify(d.scripts || {}, null, 2)) + return cb(null, allScripts) + } + + if (npm.config.get('parseable')) { + allScripts.forEach(function (script) { + console.log(script + ':' + d.scripts[script]) + }) + return cb(null, allScripts) + } + + var s = '\n ' + var prefix = ' ' + if (scripts.length) { + console.log('Lifecycle scripts included in %s:', d.name) + } + scripts.forEach(function (script) { + console.log(prefix + script + s + d.scripts[script]) + }) + if (!scripts.length && runScripts.length) { + console.log('Scripts available in %s via `npm run-script`:', d.name) + } else if (runScripts.length) { + console.log('\navailable via `npm run-script`:') + } + runScripts.forEach(function (script) { + console.log(prefix + script + s + d.scripts[script]) + }) + return cb(null, allScripts) + }) +} + +function run (pkg, wd, cmd, args, cb) { + if (!pkg.scripts) pkg.scripts = {} + + var cmds + if (cmd === 'restart' && !pkg.scripts.restart) { + cmds = [ + 'prestop', 'stop', 'poststop', + 'restart', + 'prestart', 'start', 'poststart' + ] + } else { + if (!pkg.scripts[cmd]) { + if (cmd === 'test') { + pkg.scripts.test = 'echo \'Error: no test specified\'' + } else if (cmd === 'env') { + if (process.platform === 'win32') { + log.verbose('run-script using default platform env: SET (Windows)') + pkg.scripts[cmd] = 'SET' + } else { + log.verbose('run-script using default platform env: env (Unix)') + pkg.scripts[cmd] = 'env' + } + } else if (npm.config.get('if-present')) { + return cb(null) + } else { + return cb(new Error('missing script: ' + cmd)) + } + } + cmds = [cmd] + } + + if (!cmd.match(/^(pre|post)/)) { + cmds = ['pre' + cmd].concat(cmds).concat('post' + cmd) + } + + log.verbose('run-script', cmds) + chain(cmds.map(function (c) { + // pass cli arguments after -- to script. + if (pkg.scripts[c] && c === cmd) { + pkg.scripts[c] = pkg.scripts[c] + joinArgs(args) + } + + // when running scripts explicitly, assume that they're trusted. + return [lifecycle, pkg, c, wd, true] + }), cb) +} + +// join arguments after '--' and pass them to script, +// handle special characters such as ', ", ' '. +function joinArgs (args) { + var joinedArgs = '' + args.forEach(function (arg) { + joinedArgs += ' "' + arg.replace(/"/g, '\\"') + '"' + }) + return joinedArgs +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/search.js b/bin/nodejs5.12.0/node_modules/npm/lib/search.js new file mode 100644 index 00000000..707b2221 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/search.js @@ -0,0 +1,284 @@ + +module.exports = exports = search + +var npm = require('./npm.js') +var columnify = require('columnify') +var updateIndex = require('./cache/update-index.js') + +search.usage = 'npm search [--long] [search terms ...]' + + '\n\naliases: s, se' + +search.completion = function (opts, cb) { + var compl = {} + var partial = opts.partialWord + var ipartial = partial.toLowerCase() + var plen = partial.length + + // get the batch of data that matches so far. + // this is an example of using npm.commands.search programmatically + // to fetch data that has been filtered by a set of arguments. + search(opts.conf.argv.remain.slice(2), true, function (er, data) { + if (er) return cb(er) + Object.keys(data).forEach(function (name) { + data[name].words.split(' ').forEach(function (w) { + if (w.toLowerCase().indexOf(ipartial) === 0) { + compl[partial + w.substr(plen)] = true + } + }) + }) + cb(null, Object.keys(compl)) + }) +} + +function search (args, silent, staleness, cb) { + if (typeof cb !== 'function') { + cb = staleness + staleness = 600 + } + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + var searchopts = npm.config.get('searchopts') + var searchexclude = npm.config.get('searchexclude') + + if (typeof searchopts !== 'string') searchopts = '' + searchopts = searchopts.split(/\s+/) + var opts = searchopts.concat(args).map(function (s) { + return s.toLowerCase() + }).filter(function (s) { return s }) + + if (opts.length === 0) { + return cb(new Error('search must be called with arguments')) + } + + if (typeof searchexclude === 'string') { + searchexclude = searchexclude.split(/\s+/) + } else { + searchexclude = [] + } + searchexclude = searchexclude.map(function (s) { + return s.toLowerCase() + }) + + getFilteredData(staleness, opts, searchexclude, function (er, data) { + // now data is the list of data that we want to show. + // prettify and print it, and then provide the raw + // data to the cb. + if (er || silent) return cb(er, data) + console.log(prettify(data, args)) + cb(null, data) + }) +} + +function getFilteredData (staleness, args, notArgs, cb) { + updateIndex(staleness, function (er, data) { + if (er) return cb(er) + return cb(null, filter(data, args, notArgs)) + }) +} + +function filter (data, args, notArgs) { + // data={:{package data}} + return Object.keys(data).map(function (d) { + return data[d] + }).filter(function (d) { + return typeof d === 'object' + }).map(stripData).map(getWords).filter(function (data) { + return filterWords(data, args, notArgs) + }).reduce(function (l, r) { + l[r.name] = r + return l + }, {}) +} + +function stripData (data) { + return { + name: data.name, + description: npm.config.get('description') ? data.description : '', + maintainers: (data.maintainers || []).map(function (m) { + return '=' + m.name + }), + url: !Object.keys(data.versions || {}).length ? data.url : null, + keywords: data.keywords || [], + version: Object.keys(data.versions || {})[0] || [], + time: data.time && + data.time.modified && + (new Date(data.time.modified).toISOString() // remove time + .split('T').join(' ') + .replace(/:[0-9]{2}\.[0-9]{3}Z$/, '')) + .slice(0, -5) || + 'prehistoric' + } +} + +function getWords (data) { + data.words = [ data.name ] + .concat(data.description) + .concat(data.maintainers) + .concat(data.url && ('<' + data.url + '>')) + .concat(data.keywords) + .map(function (f) { return f && f.trim && f.trim() }) + .filter(function (f) { return f }) + .join(' ') + .toLowerCase() + return data +} + +function filterWords (data, args, notArgs) { + var words = data.words + for (var i = 0, l = args.length; i < l; i++) { + if (!match(words, args[i])) return false + } + for (i = 0, l = notArgs.length; i < l; i++) { + if (match(words, notArgs[i])) return false + } + return true +} + +function match (words, arg) { + if (arg.charAt(0) === '/') { + arg = arg.replace(/\/$/, '') + arg = new RegExp(arg.substr(1, arg.length - 1)) + return words.match(arg) + } + return words.indexOf(arg) !== -1 +} + +function prettify (data, args) { + var searchsort = (npm.config.get('searchsort') || 'NAME').toLowerCase() + var sortField = searchsort.replace(/^\-+/, '') + var searchRev = searchsort.charAt(0) === '-' + var truncate = !npm.config.get('long') + + if (Object.keys(data).length === 0) { + return 'No match found for ' + (args.map(JSON.stringify).join(' ')) + } + + var lines = Object.keys(data).map(function (d) { + // strip keyname + return data[d] + }).map(function (dat) { + dat.author = dat.maintainers + delete dat.maintainers + dat.date = dat.time + delete dat.time + return dat + }).map(function (dat) { + // split keywords on whitespace or , + if (typeof dat.keywords === 'string') { + dat.keywords = dat.keywords.split(/[,\s]+/) + } + if (Array.isArray(dat.keywords)) { + dat.keywords = dat.keywords.join(' ') + } + + // split author on whitespace or , + if (typeof dat.author === 'string') { + dat.author = dat.author.split(/[,\s]+/) + } + if (Array.isArray(dat.author)) { + dat.author = dat.author.join(' ') + } + return dat + }) + + lines.sort(function (a, b) { + var aa = a[sortField].toLowerCase() + var bb = b[sortField].toLowerCase() + return aa === bb ? 0 + : aa < bb ? -1 : 1 + }) + + if (searchRev) lines.reverse() + + var columns = npm.config.get('description') + ? ['name', 'description', 'author', 'date', 'version', 'keywords'] + : ['name', 'author', 'date', 'version', 'keywords'] + + var output = columnify( + lines, + { + include: columns, + truncate: truncate, + config: { + name: { maxWidth: 40, truncate: false, truncateMarker: '' }, + description: { maxWidth: 60 }, + author: { maxWidth: 20 }, + date: { maxWidth: 11 }, + version: { maxWidth: 11 }, + keywords: { maxWidth: Infinity } + } + } + ) + output = trimToMaxWidth(output) + output = highlightSearchTerms(output, args) + + return output +} + +var colors = [31, 33, 32, 36, 34, 35] +var cl = colors.length + +function addColorMarker (str, arg, i) { + var m = i % cl + 1 + var markStart = String.fromCharCode(m) + var markEnd = String.fromCharCode(0) + + if (arg.charAt(0) === '/') { + return str.replace( + new RegExp(arg.substr(1, arg.length - 2), 'gi'), + function (bit) { return markStart + bit + markEnd } + ) + } + + // just a normal string, do the split/map thing + var pieces = str.toLowerCase().split(arg.toLowerCase()) + var p = 0 + + return pieces.map(function (piece) { + piece = str.substr(p, piece.length) + var mark = markStart + + str.substr(p + piece.length, arg.length) + + markEnd + p += piece.length + arg.length + return piece + mark + }).join('') +} + +function colorize (line) { + for (var i = 0; i < cl; i++) { + var m = i + 1 + var color = npm.color ? '\u001B[' + colors[i] + 'm' : '' + line = line.split(String.fromCharCode(m)).join(color) + } + var uncolor = npm.color ? '\u001B[0m' : '' + return line.split('\u0000').join(uncolor) +} + +function getMaxWidth () { + var cols + try { + var tty = require('tty') + var stdout = process.stdout + cols = !tty.isatty(stdout.fd) ? Infinity : process.stdout.getWindowSize()[0] + cols = (cols === 0) ? Infinity : cols + } catch (ex) { cols = Infinity } + return cols +} + +function trimToMaxWidth (str) { + var maxWidth = getMaxWidth() + return str.split('\n').map(function (line) { + return line.slice(0, maxWidth) + }).join('\n') +} + +function highlightSearchTerms (str, terms) { + terms.forEach(function (arg, i) { + str = addColorMarker(str, arg, i) + }) + + return colorize(str).trim() +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/set.js b/bin/nodejs5.12.0/node_modules/npm/lib/set.js new file mode 100644 index 00000000..ccd63c71 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/set.js @@ -0,0 +1,13 @@ + +module.exports = set + +set.usage = 'npm set (See `npm config`)' + +var npm = require('./npm.js') + +set.completion = npm.commands.config.completion + +function set (args, cb) { + if (!args.length) return cb(set.usage) + npm.commands.config(['set'].concat(args), cb) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/shrinkwrap.js b/bin/nodejs5.12.0/node_modules/npm/lib/shrinkwrap.js new file mode 100644 index 00000000..eedacd86 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/shrinkwrap.js @@ -0,0 +1,130 @@ +// emit JSON describing versions of all packages currently installed (for later +// use with shrinkwrap install) + +module.exports = exports = shrinkwrap + +var path = require('path') +var log = require('npmlog') +var writeFileAtomic = require('write-file-atomic') +var iferr = require('iferr') +var readPackageTree = require('read-package-tree') +var validate = require('aproba') +var npm = require('./npm.js') +var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var validatePeerDeps = require('./install/deps.js').validatePeerDeps +var isExtraneous = require('./install/is-extraneous.js') +var isOnlyDev = require('./install/is-dev.js').isOnlyDev +var packageId = require('./utils/package-id.js') +var moduleName = require('./utils/module-name.js') + +shrinkwrap.usage = 'npm shrinkwrap' + +function shrinkwrap (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + if (args.length) { + log.warn('shrinkwrap', "doesn't take positional args") + } + + var dir = path.resolve(npm.dir, '..') + npm.config.set('production', true) + readPackageTree(dir, andRecalculateMetadata(iferr(cb, function (tree) { + var pkginfo = treeToShrinkwrap(tree, !!npm.config.get('dev') || /^dev(elopment)?$/.test(npm.config.get('also'))) + shrinkwrap_(pkginfo, silent, cb) + }))) +} + +function andRecalculateMetadata (next) { + validate('F', arguments) + return function (er, tree) { + validate('EO', arguments) + if (er) return next(er) + recalculateMetadata(tree, log, next) + } +} + +function treeToShrinkwrap (tree, dev) { + validate('OB', arguments) + var pkginfo = {} + if (tree.package.name) pkginfo.name = tree.package.name + if (tree.package.version) pkginfo.version = tree.package.version + var problems = [] + if (tree.children.length) { + shrinkwrapDeps(dev, problems, pkginfo.dependencies = {}, tree) + } + if (problems.length) pkginfo.problems = problems + return pkginfo +} + +function shrinkwrapDeps (dev, problems, deps, tree, seen) { + validate('BAOO', [dev, problems, deps, tree]) + if (!seen) seen = {} + if (seen[tree.path]) return + seen[tree.path] = true + Object.keys(tree.missingDeps).forEach(function (name) { + var invalid = tree.children.filter(function (dep) { return moduleName(dep) === name })[0] + if (invalid) { + problems.push('invalid: have ' + invalid.package._id + ' (expected: ' + tree.missingDeps[name] + ') ' + invalid.path) + } else if (!tree.package.optionalDependencies || !tree.package.optionalDependencies[name]) { + var topname = packageId(tree) + problems.push('missing: ' + name + '@' + tree.package.dependencies[name] + + (topname ? ', required by ' + topname : '')) + } + }) + tree.children.sort(function (aa, bb) { return moduleName(aa).localeCompare(moduleName(bb)) }).forEach(function (child) { + if (!dev && isOnlyDev(child)) { + log.warn('shrinkwrap', 'Excluding devDependency: %s', packageId(child), child.parent.package.dependencies) + return + } + var pkginfo = deps[moduleName(child)] = {} + pkginfo.version = child.package.version + pkginfo.from = child.package._from + pkginfo.resolved = child.package._resolved + if (isExtraneous(child)) { + problems.push('extraneous: ' + child.package._id + ' ' + child.path) + } + validatePeerDeps(child, function (tree, pkgname, version) { + problems.push('peer invalid: ' + pkgname + '@' + version + + ', required by ' + child.package._id) + }) + if (child.children.length) { + shrinkwrapDeps(dev, problems, pkginfo.dependencies = {}, child, seen) + } + }) +} + +function shrinkwrap_ (pkginfo, silent, cb) { + if (pkginfo.problems) { + return cb(new Error('Problems were encountered\n' + + 'Please correct and try again.\n' + + pkginfo.problems.join('\n'))) + } + + save(pkginfo, silent, cb) +} + +function save (pkginfo, silent, cb) { + // copy the keys over in a well defined order + // because javascript objects serialize arbitrarily + var swdata + try { + swdata = JSON.stringify(pkginfo, null, 2) + '\n' + } catch (er) { + log.error('shrinkwrap', 'Error converting package info to json') + return cb(er) + } + + var file = path.resolve(npm.prefix, 'npm-shrinkwrap.json') + + writeFileAtomic(file, swdata, function (er) { + if (er) return cb(er) + if (silent) return cb(null, pkginfo) + log.clearProgress() + console.log('wrote npm-shrinkwrap.json') + log.showProgress() + cb(null, pkginfo) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/star.js b/bin/nodejs5.12.0/node_modules/npm/lib/star.js new file mode 100644 index 00000000..9ff55abe --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/star.js @@ -0,0 +1,40 @@ +module.exports = star + +var npm = require('./npm.js') +var log = require('npmlog') +var asyncMap = require('slide').asyncMap +var mapToRegistry = require('./utils/map-to-registry.js') + +star.usage = 'npm star [...]\n' + + 'npm unstar [...]' + +star.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function star (args, cb) { + if (!args.length) return cb(star.usage) + var s = npm.config.get('unicode') ? '\u2605 ' : '(*)' + var u = npm.config.get('unicode') ? '\u2606 ' : '( )' + var using = !(npm.command.match(/^un/)) + if (!using) s = u + asyncMap(args, function (pkg, cb) { + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + starred: using, + auth: auth + } + npm.registry.star(uri, params, function (er, data, raw, req) { + if (!er) { + console.log(s + ' ' + pkg) + log.verbose('star', data) + } + cb(er, data, raw, req) + }) + }) + }, cb) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/stars.js b/bin/nodejs5.12.0/node_modules/npm/lib/stars.js new file mode 100644 index 00000000..292dae28 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/stars.js @@ -0,0 +1,46 @@ +module.exports = stars + +stars.usage = 'npm stars []' + +var npm = require('./npm.js') +var log = require('npmlog') +var mapToRegistry = require('./utils/map-to-registry.js') + +function stars (args, cb) { + npm.commands.whoami([], true, function (er, username) { + var name = args.length === 1 ? args[0] : username + + if (er) { + if (er.code === 'ENEEDAUTH' && !name) { + var needAuth = new Error("'npm stars' on your own user account requires auth") + needAuth.code = 'ENEEDAUTH' + return cb(needAuth) + } + + if (er.code !== 'ENEEDAUTH') return cb(er) + } + + mapToRegistry('', npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + username: name, + auth: auth + } + npm.registry.stars(uri, params, showstars) + }) + }) + + function showstars (er, data) { + if (er) return cb(er) + + if (data.rows.length === 0) { + log.warn('stars', 'user has not starred any packages.') + } else { + data.rows.forEach(function (a) { + console.log(a.value) + }) + } + cb() + } +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/start.js b/bin/nodejs5.12.0/node_modules/npm/lib/start.js new file mode 100644 index 00000000..67e015ee --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/start.js @@ -0,0 +1 @@ +module.exports = require('./utils/lifecycle.js').cmd('start') diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/stop.js b/bin/nodejs5.12.0/node_modules/npm/lib/stop.js new file mode 100644 index 00000000..65d77be3 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/stop.js @@ -0,0 +1 @@ +module.exports = require('./utils/lifecycle.js').cmd('stop') diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/substack.js b/bin/nodejs5.12.0/node_modules/npm/lib/substack.js new file mode 100644 index 00000000..dd356bde --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/substack.js @@ -0,0 +1,21 @@ +module.exports = substack +var npm = require('./npm.js') + +var isms = [ + '\u001b[32mbeep \u001b[35mboop\u001b[m', + 'Replace your configs with services', + 'SEPARATE ALL THE CONCERNS!', + 'MODULE ALL THE THINGS!', + '\\o/', + 'but first, burritos', + 'full time mad scientist here', + 'c/,,\\' +] + +function substack (args, cb) { + var i = Math.floor(Math.random() * isms.length) + console.log(isms[i]) + var c = args.shift() + if (c) npm.commands[c](args, cb) + else cb() +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/tag.js b/bin/nodejs5.12.0/node_modules/npm/lib/tag.js new file mode 100644 index 00000000..332ece86 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/tag.js @@ -0,0 +1,42 @@ +// turns out tagging isn't very complicated +// all the smarts are in the couch. +module.exports = tag +tag.usage = '[DEPRECATED] npm tag @ []' + + '\nSee `dist-tag`' + +tag.completion = require('./unpublish.js').completion + +var npm = require('./npm.js') +var mapToRegistry = require('./utils/map-to-registry.js') +var npa = require('npm-package-arg') +var semver = require('semver') +var log = require('npmlog') + +function tag (args, cb) { + var thing = npa(args.shift() || '') + var project = thing.name + var version = thing.rawSpec + var t = args.shift() || npm.config.get('tag') + + t = t.trim() + + if (!project || !version || !t) return cb('Usage:\n' + tag.usage) + + if (semver.validRange(t)) { + var er = new Error('Tag name must not be a valid SemVer range: ' + t) + return cb(er) + } + + log.warn('tag', 'This command is deprecated. Use `npm dist-tag` instead.') + + mapToRegistry(project, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version: version, + tag: t, + auth: auth + } + npm.registry.tag(uri, params, cb) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/team.js b/bin/nodejs5.12.0/node_modules/npm/lib/team.js new file mode 100644 index 00000000..221e01bf --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/team.js @@ -0,0 +1,54 @@ +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm') + +module.exports = team + +team.subcommands = ['create', 'destroy', 'add', 'rm', 'ls', 'edit'] + +team.usage = + 'npm team create \n' + + 'npm team destroy \n' + + 'npm team add \n' + + 'npm team rm \n' + + 'npm team ls |\n' + + 'npm team edit ' + +team.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, team.subcommands) + } + switch (argv[2]) { + case 'ls': + case 'create': + case 'destroy': + case 'add': + case 'rm': + case 'edit': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function team (args, cb) { + // Entities are in the format : + var cmd = args.shift() + var entity = (args.shift() || '').split(':') + return mapToRegistry('/', npm.config, function (err, uri, auth) { + if (err) { return cb(err) } + try { + return npm.registry.team(cmd, uri, { + auth: auth, + scope: entity[0], + team: entity[1], + user: args.shift() + }, function (err, data) { + !err && data && console.log(JSON.stringify(data, undefined, 2)) + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + team.usage) + } + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/test.js b/bin/nodejs5.12.0/node_modules/npm/lib/test.js new file mode 100644 index 00000000..fbbebd88 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/test.js @@ -0,0 +1,13 @@ +module.exports = test + +var testCmd = require('./utils/lifecycle.js').cmd('test') + +function test (args, cb) { + testCmd(args, function (er) { + if (!er) return cb() + if (er.code === 'ELIFECYCLE') { + return cb('Test failed. See above for more details.') + } + return cb(er) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/unbuild.js b/bin/nodejs5.12.0/node_modules/npm/lib/unbuild.js new file mode 100644 index 00000000..936d8f9a --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/unbuild.js @@ -0,0 +1,131 @@ +module.exports = unbuild +module.exports.rmStuff = rmStuff +unbuild.usage = 'npm unbuild \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') + +// args is a list of folders. +// remove any bins/etc, and then delete the folder. +function unbuild (args, silent, cb) { + if (typeof silent === 'function') { + cb = silent + silent = false + } + asyncMap(args, unbuild_(silent), cb) +} + +function unbuild_ (silent) { + return function (folder, cb_) { + function cb (er) { + cb_(er, path.relative(npm.root, folder)) + } + folder = path.resolve(folder) + var 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) { + // if no json, then just trash it, but no scripts or whatever. + if (er) return gentlyRm(folder, false, base, cb) + chain( + [ + [lifecycle, pkg, 'preuninstall', folder, false, true], + [lifecycle, pkg, 'uninstall', folder, false, true], + !silent && function (cb) { + log.clearProgress() + console.log('unbuild ' + pkg._id) + log.showProgress() + cb() + }, + [rmStuff, pkg, folder], + [lifecycle, pkg, 'postuninstall', folder, false, true], + [gentlyRm, folder, false, base] + ], + cb + ) + }) + } +} + +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 parent = path.dirname(folder) + var gnm = npm.dir + var top = gnm === parent + + log.verbose('unbuild rmStuff', pkg._id, 'from', gnm) + if (!top) log.verbose('unbuild rmStuff', 'in', parent) + asyncMap([rmBins, rmMans], function (fn, cb) { + fn(pkg, folder, parent, top, cb) + }, cb) +} + +function rmBins (pkg, folder, parent, top, cb) { + if (!pkg.bin) return cb() + var 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], + [gentlyRm, path.resolve(binRoot, b), true, folder] ], cb) + } else { + gentlyRm(path.resolve(binRoot, b), true, folder, cb) + } + }, gentlyRmBinRoot) + + function gentlyRmBinRoot (err) { + if (err || top) return cb(err) + return gentlyRm(binRoot, true, parent, cb) + } +} + +function rmMans (pkg, folder, parent, top, cb) { + if (!pkg.man || + !top || + process.platform === 'win32' || + !npm.config.get('global')) { + return cb() + } + var 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)) { + man.forEach(rmMan) + } else { + rmMan(man) + } + + function rmMan (man) { + log.silly('rmMan', 'preparing to remove', man) + var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) + if (!parseMan) { + log.error( + 'rmMan', man, 'is not a valid name for a man file.', + 'Man files must end with a number, ' + + 'and optionally a .gz suffix if they are compressed.' + ) + return cb() + } + + var stem = parseMan[1] + var sxn = parseMan[2] + var gz = parseMan[3] || '' + var bn = path.basename(stem) + var manDest = path.join( + manRoot, + 'man' + sxn, + (bn.indexOf(pkg.name) === 0 ? bn : pkg.name + '-' + bn) + '.' + sxn + gz + ) + gentlyRm(manDest, true, cb) + } + }, cb) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/uninstall.js b/bin/nodejs5.12.0/node_modules/npm/lib/uninstall.js new file mode 100644 index 00000000..eb893f25 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/uninstall.js @@ -0,0 +1,73 @@ +'use strict' +// remove a package. + +module.exports = uninstall +module.exports.Uninstaller = Uninstaller + +uninstall.usage = 'npm uninstall [<@scope>/][@]... [--save|--save-dev|--save-optional]' + + '\n\naliases: remove, rm, r, un, unlink' + +var util = require('util') +var path = require('path') +var validate = require('aproba') +var chain = require('slide').chain +var readJson = require('read-package-json') +var npm = require('./npm.js') +var Installer = require('./install.js').Installer +var getSaveType = require('./install/save.js').getSaveType +var removeDeps = require('./install/deps.js').removeDeps +var loadExtraneous = require('./install/deps.js').loadExtraneous +var log = require('npmlog') + +uninstall.completion = require('./utils/completion/installed-shallow.js') + +function uninstall (args, cb) { + validate('AF', arguments) + // the /path/to/node_modules/.. + var dryrun = !!npm.config.get('dry-run') + + if (args.length === 1 && args[0] === '.') args = [] + args = args.filter(function (a) { + return path.resolve(a) !== where + }) + + var where = npm.config.get('global') || !args.length + ? path.resolve(npm.globalDir, '..') + : npm.prefix + + if (args.length) { + new Uninstaller(where, dryrun, args).run(cb) + } else { + // remove this package from the global space, if it's installed there + readJson(path.resolve(npm.localPrefix, 'package.json'), function (er, pkg) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (er) return cb(uninstall.usage) + new Uninstaller(where, dryrun, [pkg.name]).run(cb) + }) + } +} + +function Uninstaller (where, dryrun, args) { + validate('SBA', arguments) + Installer.call(this, where, dryrun, args) +} +util.inherits(Uninstaller, Installer) + +Uninstaller.prototype.loadArgMetadata = function (next) { + this.args = this.args.map(function (arg) { return {name: arg} }) + next() +} + +Uninstaller.prototype.loadAllDepsIntoIdealTree = function (cb) { + validate('F', arguments) + log.silly('uninstall', 'loadAllDepsIntoIdealtree') + var saveDeps = getSaveType(this.args) + + var cg = this.progress.loadAllDepsIntoIdealTree + var steps = [] + + steps.push( + [removeDeps, this.args, this.idealTree, saveDeps, cg.newGroup('removeDeps')], + [loadExtraneous, this.idealTree, cg.newGroup('loadExtraneous')]) + chain(steps, cb) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/unpublish.js b/bin/nodejs5.12.0/node_modules/npm/lib/unpublish.js new file mode 100644 index 00000000..f8f812b6 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/unpublish.js @@ -0,0 +1,117 @@ + +module.exports = unpublish + +var log = require('npmlog') +var npm = require('./npm.js') +var readJson = require('read-package-json') +var path = require('path') +var mapToRegistry = require('./utils/map-to-registry.js') +var npa = require('npm-package-arg') +var getPublishConfig = require('./utils/get-publish-config.js') + +unpublish.usage = 'npm unpublish [<@scope>/][@]' + +unpublish.completion = function (opts, cb) { + if (opts.conf.argv.remain.length >= 3) return cb() + npm.commands.whoami([], true, function (er, username) { + if (er) return cb() + + var un = encodeURIComponent(username) + if (!un) return cb() + var byUser = '-/by-user/' + un + mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, pkgs) { + // do a bit of filtering at this point, so that we don't need + // to fetch versions for more than one thing, but also don't + // accidentally a whole project. + pkgs = pkgs[un] + if (!pkgs || !pkgs.length) return cb() + var pp = npa(opts.partialWord).name + pkgs = pkgs.filter(function (p) { + return p.indexOf(pp) === 0 + }) + if (pkgs.length > 1) return cb(null, pkgs) + mapToRegistry(pkgs[0], npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, d) { + if (er) return cb(er) + var vers = Object.keys(d.versions) + if (!vers.length) return cb(null, pkgs) + return cb(null, vers.map(function (v) { + return pkgs[0] + '@' + v + })) + }) + }) + }) + }) + }) +} + +function unpublish (args, cb) { + if (args.length > 1) return cb(unpublish.usage) + + var thing = args.length ? npa(args[0]) : {} + var project = thing.name + var version = thing.rawSpec + + log.silly('unpublish', 'args[0]', args[0]) + log.silly('unpublish', 'thing', thing) + if (!version && !npm.config.get('force')) { + return cb( + 'Refusing to delete entire project.\n' + + 'Run with --force to do this.\n' + + unpublish.usage + ) + } + + if (!project || path.resolve(project) === npm.localPrefix) { + // if there's a package.json in the current folder, then + // read the package name and version out of that. + var cwdJson = path.join(npm.localPrefix, 'package.json') + return readJson(cwdJson, function (er, data) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (er) return cb('Usage:\n' + unpublish.usage) + log.verbose('unpublish', data) + gotProject(data.name, data.version, data.publishConfig, cb) + }) + } + return gotProject(project, version, cb) +} + +function gotProject (project, version, publishConfig, cb_) { + if (typeof cb_ !== 'function') { + cb_ = publishConfig + publishConfig = null + } + + function cb (er) { + if (er) return cb_(er) + console.log('- ' + project + (version ? '@' + version : '')) + cb_() + } + + var mappedConfig = getPublishConfig(publishConfig, npm.config, npm.registry) + var config = mappedConfig.config + var registry = mappedConfig.client + + // remove from the cache first + npm.commands.cache(['clean', project, version], function (er) { + if (er) { + log.error('unpublish', 'Failed to clean cache') + return cb(er) + } + + mapToRegistry(project, config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version: version, + auth: auth + } + registry.unpublish(uri, params, cb) + }) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/update.js b/bin/nodejs5.12.0/node_modules/npm/lib/update.js new file mode 100644 index 00000000..7bbb7122 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/update.js @@ -0,0 +1,60 @@ +module.exports = update + +update.usage = 'npm update [-g] [...]' + +var url = require('url') +var log = require('npmlog') +var chain = require('slide').chain +var npm = require('./npm.js') +var Installer = require('./install.js').Installer + +update.completion = npm.commands.outdated.completion + +function update (args, cb) { + var dryrun = false + if (npm.config.get('dry-run')) dryrun = true + + npm.commands.outdated(args, true, function (er, rawOutdated) { + if (er) return cb(er) + var outdated = rawOutdated.map(function (ww) { + return { + dep: ww[0], + depname: ww[1], + current: ww[2], + wanted: ww[3], + latest: ww[4], + req: ww[5], + what: ww[1] + '@' + ww[3] + } + }) + + var wanted = outdated.filter(function (ww) { + if (ww.current === ww.wanted && ww.wanted !== ww.latest) { + log.verbose( + 'outdated', + 'not updating', ww.depname, + "because it's currently at the maximum version that matches its specified semver range" + ) + } + return ww.current !== ww.wanted && ww.latest !== 'linked' + }) + if (wanted.length === 0) return cb() + + log.info('outdated', 'updating', wanted) + var toInstall = {} + wanted.forEach(function (ww) { + // use the initial installation method (repo, tar, git) for updating + if (url.parse(ww.req).protocol) ww.what = ww.req + + var where = ww.dep.parent && ww.dep.parent.path || ww.dep.path + if (toInstall[where]) { + toInstall[where].push(ww.what) + } else { + toInstall[where] = [ww.what] + } + }) + chain(Object.keys(toInstall).map(function (where) { + return [new Installer(where, dryrun, toInstall[where]), 'run'] + }), cb) + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/version.js b/bin/nodejs5.12.0/node_modules/npm/lib/version.js new file mode 100644 index 00000000..63644236 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/version.js @@ -0,0 +1,288 @@ +// npm version + +module.exports = version + +var semver = require('semver') +var path = require('path') +var fs = require('graceful-fs') +var writeFileAtomic = require('write-file-atomic') +var chain = require('slide').chain +var log = require('npmlog') +var npm = require('./npm.js') +var git = require('./utils/git.js') +var assert = require('assert') +var lifecycle = require('./utils/lifecycle.js') +var parseJSON = require('./utils/parse-json.js') + +version.usage = 'npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]' + + '\n(run in package dir)\n' + + "'npm -v' or 'npm --version' to print npm version " + + '(' + npm.version + ')\n' + + "'npm view version' to view a package's " + + 'published version\n' + + "'npm ls' to inspect current package/dependency versions" + +function version (args, silent, cb_) { + if (typeof cb_ !== 'function') { + cb_ = silent + silent = false + } + if (args.length > 1) return cb_(version.usage) + + readPackage(function (er, data) { + if (!args.length) return dump(data, cb_) + + if (er) { + log.error('version', 'No valid package.json found') + return cb_(er) + } + + if (args[0] === 'from-git') { + retrieveTagVersion(silent, data, cb_) + } else { + var newVersion = semver.valid(args[0]) + if (!newVersion) newVersion = semver.inc(data.version, args[0]) + if (!newVersion) return cb_(version.usage) + persistVersion(newVersion, silent, data, cb_) + } + }) +} + +function retrieveTagVersion (silent, data, cb_) { + chain([ + verifyGit, + parseLastGitTag + ], function (er, results) { + if (er) return cb_(er) + var localData = { + hasGit: true, + existingTag: true + } + + var version = results[results.length - 1] + persistVersion(version, silent, data, localData, cb_) + }) +} + +function parseLastGitTag (cb) { + var options = { env: process.env } + git.whichAndExec(['describe', '--abbrev=0'], options, function (er, stdout) { + if (er) { + if (er.message.indexOf('No names found') !== -1) return cb(new Error('No tags found')) + return cb(er) + } + + var tag = stdout.trim() + var prefix = npm.config.get('tag-version-prefix') + // Strip the prefix from the start of the tag: + if (tag.indexOf(prefix) === 0) tag = tag.slice(prefix.length) + var version = semver.valid(tag) + if (!version) return cb(new Error(tag + ' is not a valid version')) + cb(null, version) + }) +} + +function persistVersion (newVersion, silent, data, localData, cb_) { + if (typeof localData === 'function') { + cb_ = localData + localData = {} + } + + if (data.version === newVersion) return cb_(new Error('Version not changed')) + data.version = newVersion + var lifecycleData = Object.create(data) + lifecycleData._id = data.name + '@' + newVersion + + var where = npm.prefix + chain([ + !localData.hasGit && [checkGit, localData], + [lifecycle, lifecycleData, 'preversion', where], + [updatePackage, newVersion, silent], + [lifecycle, lifecycleData, 'version', where], + [commit, localData, newVersion], + [lifecycle, lifecycleData, 'postversion', where] + ], cb_) +} + +function readPackage (cb) { + var packagePath = path.join(npm.localPrefix, 'package.json') + fs.readFile(packagePath, function (er, data) { + if (er) return cb(new Error(er)) + if (data) data = data.toString() + try { + data = JSON.parse(data) + } catch (e) { + er = e + data = null + } + cb(er, data) + }) +} + +function updatePackage (newVersion, silent, cb_) { + function cb (er) { + if (!er && !silent) console.log('v' + newVersion) + cb_(er) + } + + readPackage(function (er, data) { + if (er) return cb(new Error(er)) + data.version = newVersion + write(data, 'package.json', cb) + }) +} + +function commit (localData, newVersion, cb) { + updateShrinkwrap(newVersion, function (er, hasShrinkwrap) { + if (er || !localData.hasGit) return cb(er) + localData.hasShrinkwrap = hasShrinkwrap + _commit(newVersion, localData, cb) + }) +} + +function updateShrinkwrap (newVersion, cb) { + fs.readFile(path.join(npm.localPrefix, 'npm-shrinkwrap.json'), function (er, data) { + if (er && er.code === 'ENOENT') return cb(null, false) + + try { + data = data.toString() + data = parseJSON(data) + } catch (er) { + log.error('version', 'Bad npm-shrinkwrap.json data') + return cb(er) + } + + data.version = newVersion + write(data, 'npm-shrinkwrap.json', function (er) { + if (er) { + log.error('version', 'Bad npm-shrinkwrap.json data') + return cb(er) + } + cb(null, true) + }) + }) +} + +function dump (data, cb) { + var v = {} + + if (data && data.name && data.version) v[data.name] = data.version + v.npm = npm.version + Object.keys(process.versions).sort().forEach(function (k) { + v[k] = process.versions[k] + }) + + if (npm.config.get('json')) v = JSON.stringify(v, null, 2) + + console.log(v) + cb() +} + +function statGitFolder (cb) { + fs.stat(path.join(npm.localPrefix, '.git'), cb) +} + +function callGitStatus (cb) { + git.whichAndExec( + [ 'status', '--porcelain' ], + { env: process.env }, + cb + ) +} + +function cleanStatusLines (stdout) { + var lines = stdout.trim().split('\n').filter(function (line) { + return line.trim() && !line.match(/^\?\? /) + }).map(function (line) { + return line.trim() + }) + + return lines +} + +function verifyGit (cb) { + function checkStatus (er) { + if (er) return cb(er) + callGitStatus(checkStdout) + } + + function checkStdout (er, stdout) { + if (er) return cb(er) + var lines = cleanStatusLines(stdout) + if (lines.length > 0) { + return cb(new Error( + 'Git working directory not clean.\n' + lines.join('\n') + )) + } + + cb() + } + + statGitFolder(checkStatus) +} + +function checkGit (localData, cb) { + statGitFolder(function (er) { + var doGit = !er && npm.config.get('git-tag-version') + if (!doGit) { + if (er) log.verbose('version', 'error checking for .git', er) + log.verbose('version', 'not tagging in git') + return cb(null, false) + } + + // check for git + callGitStatus(function (er, stdout) { + if (er && er.code === 'ENOGIT') { + log.warn( + 'version', + 'This is a Git checkout, but the git command was not found.', + 'npm could not create a Git tag for this release!' + ) + return cb(null, false) + } + + var lines = cleanStatusLines(stdout) + if (lines.length && !npm.config.get('force')) { + return cb(new Error( + 'Git working directory not clean.\n' + lines.join('\n') + )) + } + localData.hasGit = true + cb(null, true) + }) + }) +} + +function _commit (version, localData, cb) { + var packagePath = path.join(npm.localPrefix, 'package.json') + var options = { env: process.env } + var message = npm.config.get('message').replace(/%s/g, version) + var sign = npm.config.get('sign-git-tag') + var flag = sign ? '-sm' : '-am' + chain( + [ + git.chainableExec([ 'add', packagePath ], options), + localData.hasShrinkwrap && git.chainableExec([ 'add', 'npm-shrinkwrap.json' ], options), + git.chainableExec([ 'commit', '-m', message ], options), + !localData.existingTag && git.chainableExec([ + 'tag', + npm.config.get('tag-version-prefix') + version, + flag, + message + ], options) + ], + cb + ) +} + +function write (data, file, cb) { + assert(data && typeof data === 'object', 'must pass data to version write') + assert(typeof file === 'string', 'must pass filename to write to version write') + + log.verbose('version.write', 'data', data, 'to', file) + writeFileAtomic( + path.join(npm.localPrefix, file), + new Buffer(JSON.stringify(data, null, 2) + '\n'), + cb + ) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/view.js b/bin/nodejs5.12.0/node_modules/npm/lib/view.js new file mode 100644 index 00000000..2eb84e5c --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/view.js @@ -0,0 +1,325 @@ +// npm view [pkg [pkg ...]] + +module.exports = view +view.usage = 'npm view [<@scope>/][@] [[.subfield]...]' + + '\n\naliases: info, show, v' + +var npm = require('./npm.js') +var readJson = require('read-package-json') +var log = require('npmlog') +var util = require('util') +var semver = require('semver') +var mapToRegistry = require('./utils/map-to-registry.js') +var npa = require('npm-package-arg') +var path = require('path') + +view.completion = function (opts, cb) { + if (opts.conf.argv.remain.length <= 2) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + return cb() + } + // have the package, get the fields. + var tag = npm.config.get('tag') + mapToRegistry(opts.conf.argv.remain[2], npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, d) { + if (er) return cb(er) + var dv = d.versions[d['dist-tags'][tag]] + var fields = [] + d.versions = Object.keys(d.versions).sort(semver.compareLoose) + fields = getFields(d).concat(getFields(dv)) + cb(null, fields) + }) + }) + + function getFields (d, f, pref) { + f = f || [] + if (!d) return f + pref = pref || [] + Object.keys(d).forEach(function (k) { + if (k.charAt(0) === '_' || k.indexOf('.') !== -1) return + var p = pref.concat(k).join('.') + f.push(p) + if (Array.isArray(d[k])) { + d[k].forEach(function (val, i) { + var pi = p + '[' + i + ']' + if (val && typeof val === 'object') getFields(val, f, [p]) + else f.push(pi) + }) + return + } + if (typeof d[k] === 'object') getFields(d[k], f, [p]) + }) + return f + } +} + +function view (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + if (!args.length) args = ['.'] + + var pkg = args.shift() + var nv = npa(pkg) + var name = nv.name + var local = (name === '.' || !name) + + if (npm.config.get('global') && local) { + return cb(new Error('Cannot use view command in global mode.')) + } + + if (local) { + var dir = npm.prefix + readJson(path.resolve(dir, 'package.json'), function (er, d) { + d = d || {} + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (!d.name) return cb(new Error('Invalid package.json')) + + var p = d.name + nv = npa(p) + if (pkg && ~pkg.indexOf('@')) { + nv.rawSpec = pkg.split('@')[pkg.indexOf('@')] + } + + fetchAndRead(nv, args, silent, cb) + }) + } else { + fetchAndRead(nv, args, silent, cb) + } +} + +function fetchAndRead (nv, args, silent, cb) { + // get the data about this package + var name = nv.name + var version = nv.rawSpec || npm.config.get('tag') + + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, data) { + if (er) return cb(er) + if (data['dist-tags'] && data['dist-tags'].hasOwnProperty(version)) { + version = data['dist-tags'][version] + } + + if (data.time && data.time.unpublished) { + var u = data.time.unpublished + er = new Error('Unpublished by ' + u.name + ' on ' + u.time) + er.statusCode = 404 + er.code = 'E404' + er.pkgid = data._id + return cb(er, data) + } + + var results = [] + var error = null + var versions = data.versions || {} + data.versions = Object.keys(versions).sort(semver.compareLoose) + if (!args.length) args = [''] + + // remove readme unless we asked for it + if (args.indexOf('readme') === -1) { + delete data.readme + } + + Object.keys(versions).forEach(function (v) { + if (semver.satisfies(v, version, true)) { + args.forEach(function (args) { + // remove readme unless we asked for it + if (args.indexOf('readme') !== -1) { + delete versions[v].readme + } + results.push(showFields(data, versions[v], args)) + }) + } + }) + results = results.reduce(reducer, {}) + var retval = results + + if (args.length === 1 && args[0] === '') { + retval = cleanBlanks(retval) + log.silly('cleanup', retval) + } + + if (error || silent) cb(error, retval) + else printData(results, data._id, cb.bind(null, error, retval)) + }) + }) +} + +function cleanBlanks (obj) { + var clean = {} + Object.keys(obj).forEach(function (version) { + clean[version] = obj[version][''] + }) + return clean +} + +function reducer (l, r) { + if (r) { + Object.keys(r).forEach(function (v) { + l[v] = l[v] || {} + Object.keys(r[v]).forEach(function (t) { + l[v][t] = r[v][t] + }) + }) + } + + return l +} + +// return whatever was printed +function showFields (data, version, fields) { + var o = {} + ;[data, version].forEach(function (s) { + Object.keys(s).forEach(function (k) { + o[k] = s[k] + }) + }) + return search(o, fields.split('.'), version.version, fields) +} + +function search (data, fields, version, title) { + var field + var tail = fields + while (!field && fields.length) field = tail.shift() + fields = [field].concat(tail) + var o + if (!field && !tail.length) { + o = {} + o[version] = {} + o[version][title] = data + return o + } + var index = field.match(/(.+)\[([^\]]+)\]$/) + if (index) { + field = index[1] + index = index[2] + if (data.field && data.field.hasOwnProperty(index)) { + return search(data[field][index], tail, version, title) + } else { + field = field + '[' + index + ']' + } + } + if (Array.isArray(data)) { + if (data.length === 1) { + return search(data[0], fields, version, title) + } + var results = [] + data.forEach(function (data, i) { + var tl = title.length + var newt = title.substr(0, tl - fields.join('.').length - 1) + + '[' + i + ']' + [''].concat(fields).join('.') + results.push(search(data, fields.slice(), version, newt)) + }) + results = results.reduce(reducer, {}) + return results + } + if (!data.hasOwnProperty(field)) return undefined + data = data[field] + if (tail.length) { + if (typeof data === 'object') { + // there are more fields to deal with. + return search(data, tail, version, title) + } else { + return new Error('Not an object: ' + data) + } + } + o = {} + o[version] = {} + o[version][title] = data + return o +} + +function printData (data, name, cb) { + var versions = Object.keys(data) + var msg = '' + var msgJson = [] + var includeVersions = versions.length > 1 + var includeFields + + versions.forEach(function (v) { + var fields = Object.keys(data[v]) + includeFields = includeFields || (fields.length > 1) + msgJson.push({}) + fields.forEach(function (f) { + var d = cleanup(data[v][f]) + if (fields.length === 1 && npm.config.get('json')) { + msgJson[msgJson.length - 1][f] = d + } + if (includeVersions || includeFields || typeof d !== 'string') { + if (npm.config.get('json')) { + msgJson[msgJson.length - 1][f] = d + } else { + d = util.inspect(d, false, 5, npm.color) + } + } else if (typeof d === 'string' && npm.config.get('json')) { + d = JSON.stringify(d) + } + if (!npm.config.get('json')) { + if (f && includeFields) f += ' = ' + if (d.indexOf('\n') !== -1) d = ' \n' + d + msg += (includeVersions ? name + '@' + v + ' ' : '') + + (includeFields ? f : '') + d + '\n' + } + }) + }) + + if (msgJson.length && Object.keys(msgJson[0]).length === 1) { + var k = Object.keys(msgJson[0])[0] + msgJson = msgJson.map(function (m) { return m[k] }) + } + + if (!msg) { + msg = JSON.stringify(msgJson[0], null, 2) + '\n' + } else if (msgJson.length > 1) { + msg = JSON.stringify(msgJson, null, 2) + '\n' + } + + // preserve output symmetry by adding a whitespace-only line at the end if + // there's one at the beginning + if (/^\s*\n/.test(msg)) msg += '\n' + + // print directly to stdout to not unnecessarily add blank lines + process.stdout.write(msg) + + cb(null, data) +} +function cleanup (data) { + if (Array.isArray(data)) { + return data.map(cleanup) + } + if (!data || typeof data !== 'object') return data + + if (typeof data.versions === 'object' && + data.versions && + !Array.isArray(data.versions)) { + data.versions = Object.keys(data.versions || {}) + } + + var keys = Object.keys(data) + keys.forEach(function (d) { + if (d.charAt(0) === '_') delete data[d] + else if (typeof data[d] === 'object') data[d] = cleanup(data[d]) + }) + keys = Object.keys(data) + if (keys.length <= 3 && + data.name && + (keys.length === 1 || + keys.length === 3 && data.email && data.url || + keys.length === 2 && (data.email || data.url))) { + data = unparsePerson(data) + } + return data +} +function unparsePerson (d) { + if (typeof d === 'string') return d + return d.name + + (d.email ? ' <' + d.email + '>' : '') + + (d.url ? ' (' + d.url + ')' : '') +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/visnup.js b/bin/nodejs5.12.0/node_modules/npm/lib/visnup.js new file mode 100644 index 00000000..c1f9430a --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/visnup.js @@ -0,0 +1,42 @@ +module.exports = visnup +var npm = require('./npm.js') + +var handsomeFace = [ + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 237, 236, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 235, 236, 235, 233, 237, 235, 233, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 235, 233, 232, 235, 235, 234, 233, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 237, 235, 232, 232, 234, 233, 233, 232, 232, 233, 232, 232, 235, 232, 233, 234, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 232, 232, 232, 239, 238, 235, 233, 232, 232, 232, 232, 232, 232, 232, 233, 235, 232, 233, 233, 232, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 234, 234, 232, 233, 234, 233, 234, 235, 233, 235, 60, 238, 238, 234, 234, 233, 234, 233, 238, 251, 246, 233, 233, 232, 0, 0, 0, 0, 0, 0], + [0, 0, 233, 233, 233, 232, 232, 239, 249, 251, 252, 231, 231, 188, 250, 254, 59, 60, 255, 231, 231, 231, 252, 235, 239, 235, 232, 233, 0, 0, 0, 0, 0, 0], + [0, 0, 232, 233, 232, 232, 232, 248, 231, 231, 231, 231, 231, 231, 231, 254, 238, 254, 231, 231, 231, 231, 231, 252, 233, 235, 237, 233, 234, 0, 0, 0, 0, 0], + [0, 0, 233, 232, 232, 232, 248, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 251, 233, 233, 233, 236, 233, 0, 0, 0, 0], + [232, 233, 233, 232, 232, 246, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 249, 233, 234, 234, 0, 0, 0, 0], + [232, 232, 232, 232, 233, 249, 231, 255, 255, 255, 255, 254, 109, 60, 239, 237, 238, 237, 235, 235, 235, 235, 236, 235, 235, 235, 234, 232, 232, 232, 232, 232, 233, 0], + [0, 232, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, 235, 236, 238, 238, 235, 188, 254, 254, 145, 236, 252, 254, 254, 254, 254, 249, 236, 235, 232, 232, 233, 0], + [0, 0, 233, 237, 249, 239, 233, 252, 231, 231, 231, 231, 231, 231, 254, 235, 235, 254, 231, 231, 251, 235, 237, 231, 231, 231, 231, 7, 237, 235, 232, 233, 233, 0], + [0, 0, 0, 0, 233, 248, 239, 233, 231, 231, 231, 231, 254, 233, 233, 235, 254, 255, 231, 254, 237, 236, 254, 239, 235, 235, 233, 233, 232, 232, 233, 232, 0, 0], + [0, 0, 0, 232, 233, 246, 255, 255, 236, 236, 236, 236, 236, 255, 231, 231, 231, 231, 231, 231, 252, 234, 248, 231, 231, 231, 231, 248, 232, 232, 232, 0, 0, 0], + [0, 0, 0, 0, 235, 237, 7, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 255, 238, 235, 7, 231, 231, 231, 246, 232, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 235, 103, 188, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 252, 232, 238, 231, 231, 255, 244, 232, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 235, 236, 103, 146, 253, 255, 231, 231, 231, 231, 231, 253, 251, 250, 250, 250, 246, 232, 235, 152, 255, 146, 66, 233, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 233, 103, 146, 146, 146, 146, 254, 231, 231, 231, 109, 103, 146, 255, 188, 239, 240, 103, 255, 253, 103, 238, 234, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 232, 235, 109, 146, 146, 146, 146, 146, 252, 152, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 103, 235, 233, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 235, 235, 103, 146, 146, 146, 146, 146, 146, 188, 188, 188, 188, 188, 188, 152, 146, 146, 146, 66, 235, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 233, 235, 66, 146, 146, 146, 146, 152, 255, 146, 240, 239, 241, 109, 146, 146, 146, 103, 233, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 237, 109, 146, 146, 146, 146, 146, 254, 231, 231, 188, 146, 146, 146, 103, 233, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 237, 60, 103, 146, 146, 146, 146, 146, 103, 66, 60, 235, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 233, 233, 236, 235, 237, 235, 237, 237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +] + +function visnup (args, cb) { + handsomeFace.forEach(function (line) { + console.log(line.map(function (ch) { + return '\u001b[' + (ch ? '48;5;' + ch : ch) + 'm' + }).join(' ')) + }) + + var c = args.shift() + if (c) npm.commands[c](args, cb) + else cb() +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/whoami.js b/bin/nodejs5.12.0/node_modules/npm/lib/whoami.js new file mode 100644 index 00000000..56f6a9f6 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/whoami.js @@ -0,0 +1,46 @@ +var npm = require('./npm.js') + +module.exports = whoami + +whoami.usage = 'npm whoami [--registry ]\n(just prints username according to given registry)' + +function whoami (args, silent, cb) { + // FIXME: need tighter checking on this, but is a breaking change + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + var registry = npm.config.get('registry') + if (!registry) return cb(new Error('no default registry set')) + + var auth = npm.config.getCredentialsByURI(registry) + if (auth) { + if (auth.username) { + if (!silent) console.log(auth.username) + return process.nextTick(cb.bind(this, null, auth.username)) + } else if (auth.token) { + return npm.registry.whoami(registry, { auth: auth }, function (er, username) { + if (er) return cb(er) + if (!username) { + var needNewSession = new Error( + 'Your auth token is no longer valid. Please log in again.' + ) + needNewSession.code = 'ENEEDAUTH' + return cb(needNewSession) + } + + if (!silent) console.log(username) + cb(null, username) + }) + } + } + + // At this point, if they have a credentials object, it doesn't have a token + // or auth in it. Probably just the default registry. + var needAuth = new Error( + 'this command requires you to be logged in.' + ) + needAuth.code = 'ENEEDAUTH' + process.nextTick(cb.bind(this, needAuth)) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/lib/xmas.js b/bin/nodejs5.12.0/node_modules/npm/lib/xmas.js new file mode 100644 index 00000000..2c64010e --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/lib/xmas.js @@ -0,0 +1,59 @@ +// happy xmas +var log = require('npmlog') + +module.exports = function (args, cb) { + var s = process.platform === 'win32' ? ' *' : ' \u2605' + var f = '\uFF0F' + var b = '\uFF3C' + var x = process.platform === 'win32' ? ' ' : '' + var o = [ + '\u0069', '\u0020', '\u0020', '\u0020', '\u0020', '\u0020', + '\u0020', '\u0020', '\u0020', '\u0020', '\u0020', '\u0020', + '\u0020', '\u2E1B', '\u2042', '\u2E2E', '&', '@', '\uFF61' + ] + var oc = [21, 33, 34, 35, 36, 37] + var l = '\u005e' + + function w (s) { process.stderr.write(s) } + + w('\n') + ;(function T (H) { + for (var i = 0; i < H; i++) w(' ') + w(x + '\u001b[33m' + s + '\n') + var M = H * 2 - 1 + for (var L = 1; L <= H; L++) { + var O = L * 2 - 2 + var S = (M - O) / 2 + for (i = 0; i < S; i++) w(' ') + w(x + '\u001b[32m' + f) + for (i = 0; i < O; i++) { + w( + '\u001b[' + oc[Math.floor(Math.random() * oc.length)] + 'm' + + o[Math.floor(Math.random() * o.length)] + ) + } + w(x + '\u001b[32m' + b + '\n') + } + w(' ') + for (i = 1; i < H; i++) w('\u001b[32m' + l) + w('| ' + x + ' |') + for (i = 1; i < H; i++) w('\u001b[32m' + l) + if (H > 10) { + w('\n ') + for (i = 1; i < H; i++) w(' ') + w('| ' + x + ' |') + for (i = 1; i < H; i++) w(' ') + } + })(20) + w('\n\n') + log.heading = '' + log.addLevel('npm', 100000, log.headingStyle) + log.npm('loves you', 'Happy Xmas, Noders!') + cb() +} +var dg = false +Object.defineProperty(module.exports, 'usage', {get: function () { + if (dg) module.exports([], function () {}) + dg = true + return ' ' +}}) diff --git a/bin/nodejs5.12.0/node_modules/npm/make.bat b/bin/nodejs5.12.0/node_modules/npm/make.bat new file mode 100644 index 00000000..e4e15e72 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/make.bat @@ -0,0 +1,3 @@ +:: The tests run "make doc" in the prepublish script, +:: so this file gives windows something that'll exit +:: successfully, without having to install make. diff --git a/bin/nodejs5.12.0/node_modules/npm/npmrc b/bin/nodejs5.12.0/node_modules/npm/npmrc new file mode 100644 index 00000000..9de991a7 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/npmrc @@ -0,0 +1 @@ +prefix = ~NEARD_WIN_PATH~\bin\nodejs\nodejs5.12.0\ diff --git a/bin/nodejs5.12.0/node_modules/npm/npmrc.nrd b/bin/nodejs5.12.0/node_modules/npm/npmrc.nrd new file mode 100644 index 00000000..9de991a7 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/npmrc.nrd @@ -0,0 +1 @@ +prefix = ~NEARD_WIN_PATH~\bin\nodejs\nodejs5.12.0\ diff --git a/bin/nodejs5.12.0/node_modules/npm/package.json b/bin/nodejs5.12.0/node_modules/npm/package.json new file mode 100644 index 00000000..eab7214a --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/package.json @@ -0,0 +1,213 @@ +{ + "version": "3.8.6", + "name": "npm", + "description": "a package manager for JavaScript", + "keywords": [ + "install", + "modules", + "package manager", + "package.json" + ], + "preferGlobal": true, + "config": { + "publishtest": false + }, + "homepage": "https://docs.npmjs.com/", + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "repository": { + "type": "git", + "url": "https://github.com/npm/npm" + }, + "bugs": { + "url": "https://github.com/npm/npm/issues" + }, + "directories": { + "bin": "./bin", + "doc": "./doc", + "lib": "./lib", + "man": "./man" + }, + "main": "./lib/npm.js", + "bin": "./bin/npm-cli.js", + "dependencies": { + "abbrev": "~1.0.7", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "aproba": "~1.0.1", + "archy": "~1.0.0", + "chownr": "~1.0.1", + "cmd-shim": "~2.0.2", + "columnify": "~1.5.4", + "config-chain": "~1.1.10", + "dezalgo": "~1.0.3", + "editor": "~1.0.0", + "fs-vacuum": "~1.2.7", + "fs-write-stream-atomic": "~1.0.8", + "fstream": "~1.0.8", + "fstream-npm": "~1.0.7", + "glob": "~7.0.3", + "graceful-fs": "~4.1.3", + "has-unicode": "~2.0.0", + "hosted-git-info": "~2.1.4", + "iferr": "~0.1.5", + "inflight": "~1.0.4", + "inherits": "~2.0.1", + "ini": "~1.3.4", + "init-package-json": "~1.9.3", + "lockfile": "~1.0.1", + "lodash._baseuniq": "~4.5.1", + "lodash.clonedeep": "~4.3.2", + "lodash.isarray": "~4.0.0", + "lodash.keys": "~4.0.5", + "lodash.union": "~4.2.1", + "lodash.uniq": "~4.2.1", + "lodash.without": "~4.1.2", + "mkdirp": "~0.5.1", + "node-gyp": "~3.3.1", + "nopt": "~3.0.6", + "normalize-git-url": "~3.0.1", + "normalize-package-data": "~2.3.5", + "npm-cache-filename": "~1.0.2", + "npm-install-checks": "~3.0.0", + "npm-package-arg": "~4.1.0", + "npm-registry-client": "~7.1.0", + "npm-user-validate": "~0.1.2", + "npmlog": "~2.0.3", + "once": "~1.3.3", + "opener": "~1.4.1", + "osenv": "~0.1.3", + "path-is-inside": "~1.0.1", + "read": "~1.0.7", + "read-cmd-shim": "~1.0.1", + "read-installed": "~4.0.3", + "read-package-json": "~2.0.3", + "read-package-tree": "~5.1.2", + "readable-stream": "~2.0.6", + "realize-package-specifier": "~3.0.1", + "request": "~2.69.0", + "retry": "~0.9.0", + "rimraf": "~2.5.2", + "semver": "~5.1.0", + "sha": "~2.0.1", + "slide": "~1.1.6", + "sorted-object": "~2.0.0", + "strip-ansi": "~3.0.1", + "tar": "~2.2.1", + "text-table": "~0.2.0", + "uid-number": "0.0.6", + "umask": "~1.1.0", + "unique-filename": "~1.1.0", + "unpipe": "~1.0.0", + "validate-npm-package-name": "~2.2.2", + "which": "~1.2.4", + "wrappy": "~1.0.1", + "write-file-atomic": "~1.1.4" + }, + "bundleDependencies": [ + "abbrev", + "ansi-regex", + "ansicolors", + "ansistyles", + "aproba", + "archy", + "chownr", + "cmd-shim", + "columnify", + "config-chain", + "debuglog", + "dezalgo", + "editor", + "fs-vacuum", + "fs-write-stream-atomic", + "fstream", + "fstream-npm", + "glob", + "graceful-fs", + "has-unicode", + "hosted-git-info", + "iferr", + "imurmurhash", + "inflight", + "inherits", + "ini", + "init-package-json", + "lockfile", + "lodash._baseindexof", + "lodash._baseuniq", + "lodash._bindcallback", + "lodash._cacheindexof", + "lodash._createcache", + "lodash._getnative", + "lodash.clonedeep", + "lodash.isarray", + "lodash.keys", + "lodash.restparam", + "lodash.union", + "lodash.uniq", + "lodash.without", + "mkdirp", + "node-gyp", + "nopt", + "normalize-git-url", + "normalize-package-data", + "npm-cache-filename", + "npm-install-checks", + "npm-package-arg", + "npm-registry-client", + "npm-user-validate", + "npmlog", + "once", + "opener", + "osenv", + "path-is-inside", + "read", + "read-cmd-shim", + "read-installed", + "read-package-json", + "read-package-tree", + "readable-stream", + "readdir-scoped-modules", + "realize-package-specifier", + "request", + "retry", + "rimraf", + "semver", + "sha", + "slide", + "sorted-object", + "strip-ansi", + "tar", + "text-table", + "uid-number", + "umask", + "unique-filename", + "unpipe", + "validate-npm-package-license", + "validate-npm-package-name", + "which", + "wrappy", + "write-file-atomic" + ], + "devDependencies": { + "deep-equal": "~1.0.1", + "marked": "~0.3.5", + "marked-man": "~0.1.5", + "npm-registry-couchapp": "~2.6.12", + "npm-registry-mock": "~1.0.1", + "require-inject": "~1.3.1", + "sprintf-js": "~1.0.3", + "standard": "~5.4.1", + "tacks": "~1.0.9", + "tap": "~5.7.0" + }, + "scripts": { + "dumpconf": "env | grep npm | sort | uniq", + "prepublish": "node bin/npm-cli.js prune --prefix=. --no-global && rimraf test/*/*/node_modules && make doc-clean && make -j4 doc", + "preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true", + "tap": "tap --timeout 240", + "test": "standard && npm run test-tap", + "test-tap": "npm run tap -- \"test/tap/*.js\"", + "test-node": "\"$NODE\" \"node_modules/.bin/tap\" --timeout 240 \"test/tap/*.js\"" + }, + "license": "Artistic-2.0" +} diff --git a/bin/nodejs5.12.0/node_modules/npm/scripts/changelog.js b/bin/nodejs5.12.0/node_modules/npm/scripts/changelog.js new file mode 100644 index 00000000..a9a67b13 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/scripts/changelog.js @@ -0,0 +1,95 @@ +'use strict' +/* +Usage: + +node scripts/changelog.js [comittish] + +Generates changelog entries in our format as best as its able based on +commits starting at comittish, or if that's not passed, master. + +Ordinarily this is run via the gen-changelog shell script, which appends +the result to the changelog. + +*/ +const execSync = require('child_process').execSync +const branch = process.argv[2] || 'master' +const log = execSync(`git log --pretty='format:%h %H%d %s (%aN)%n%b%n---%n' ${branch}...`).toString().split(/\n/) +const authormap = { + 'Rebecca Turner': 'iarna', + 'Forrest L Norvell': 'othiym23', + 'Kyle Mitchell': 'kemitchell', + 'Chris Rebert': 'cvrebert', + 'Kat Marchán': 'zkat' +} + +main() + +function print_commit (c) { + let m + console.log(`* [\`${c.shortid}\`](https://github.com/npm/npm/commit/${c.fullid})`) + if (c.fixes) { + console.log(` [#${c.fixes}](https://github.com/npm/npm/issues/${c.fixes})`) + } else if (c.prurl && (m = c.prurl.match(/https:\/\/github.com\/([^/]+\/[^/]+)\/pull\/(\d+)/))) { + let repo = m[1] + let prid = m[2] + if (repo !== 'npm/npm') { + console.log(` [${repo}#${prid}](${c.prurl})`) + } else { + console.log(` [#${prid}](${c.prurl})`) + } + } else if (c.prurl) { + console.log(` [#](${c.prurl})`) + } + let msg = c.message + .replace(/^\s+/mg, '') + .replace(/^[-a-z]+: /, '') + .replace(/^/mg, ' ') + .replace(/\n$/, '') + // backtickify package@version + .replace(/^(\s*[^@\s]+@\d+[.]\d+[.]\d+)(\s*\S)/g, '$1:$2') + .replace(/\b([^@\s]+@\d+[.]\d+[.]\d+)\b/g, '`$1`') + // linkify commitids + .replace(/\b([a-f0-9]{7,8})\b/g, '[`$1`](https://github.com/npm/npm/commit/$1)') + .replace(/\b#(\d+)\b/g, '[#$1](https://github.com/npm/npm/issues/$1)') + console.log(msg) + if (c.credit) { + c.credit.forEach(function (credit) { + console.log(` ([@${credit}](https://github.com/${credit}))`) + }) + } else { + console.log(` ([@${c.author}](https://github.com/${c.author}))`) + } +} + +function main () { + let commit + log.forEach(function (line) { + let m + /*eslint no-cond-assign:0*/ + if (/^---$/.test(line)) { + print_commit(commit) + } else if (m = line.match(/^([a-f0-9]{7}) ([a-f0-9]+) (?:[(]([^)]+)[)] )?(.*?) [(](.*?)[)]/)) { + commit = { + shortid: m[1], + fullid: m[2], + branch: m[3], + message: m[4], + author: authormap[m[5]] || m[5], + prurl: null, + fixes: null, + credit: null + } + } else if (m = line.match(/^PR-URL: (.*)/)) { + commit.prurl = m[1] + } else if (m = line.match(/^Credit: @(.*)/)) { + if (!commit.credit) commit.credit = [] + commit.credit.push(m[1]) + } else if (m = line.match(/^Fixes: #(.*)/)) { + commit.fixes = m[1] + } else if (m = line.match(/^Reviewed-By: @(.*)/)) { + commit.reviewed = m[1] + } else if (/\S/.test(line)) { + commit.message += `\n${line}` + } + }) +} diff --git a/bin/nodejs5.12.0/node_modules/npm/scripts/clean-old.sh b/bin/nodejs5.12.0/node_modules/npm/scripts/clean-old.sh new file mode 100644 index 00000000..6c20d78a --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/scripts/clean-old.sh @@ -0,0 +1,165 @@ +#!/bin/bash + +# look for old 0.x cruft, and get rid of it. +# Should already be sitting in the npm folder. + +# This doesn't have to be quite as cross-platform as install.sh. +# There are some bash-isms, because maintaining *two* +# fully-portable posix/bourne sh scripts is too much for +# one project with a sane maintainer. + +# If readlink isn't available, then this is just too tricky. +# However, greadlink is fine, so Solaris can join the party, too. +readlink="readlink" +which $readlink >/dev/null 2>/dev/null +if [ $? -ne 0 ]; then + readlink="greadlink" + which $readlink >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + echo "Can't find the readlink or greadlink command. Aborting." + exit 1 + fi +fi + +if [ "x$npm_config_prefix" != "x" ]; then + PREFIXES=$npm_config_prefix +else + node="$NODE" + if [ "x$node" = "x" ]; then + node=`which node` + fi + if [ "x$node" = "x" ]; then + echo "Can't find node to determine prefix. Aborting." + exit 1 + fi + + + PREFIX=`dirname $node` + PREFIX=`dirname $PREFIX` + echo "cleanup prefix=$PREFIX" + PREFIXES=$PREFIX + + altprefix=`"$node" -e process.installPrefix` + if [ "x$altprefix" != "x" ] && [ "x$altprefix" != "x$PREFIX" ]; then + echo "altprefix=$altprefix" + PREFIXES="$PREFIX $altprefix" + fi +fi + +# now prefix is where npm would be rooted by default +# go hunting. + +packages= +for prefix in $PREFIXES; do + packages="$packages + "`ls "$prefix"/lib/node/.npm 2>/dev/null | grep -v .cache` +done + +packages=`echo $packages` + +filelist=() +fid=0 + +for prefix in $PREFIXES; do + # remove any links into the .npm dir, or links to + # version-named shims/symlinks. + for folder in share/man bin lib/node; do + find $prefix/$folder -type l | while read file; do + target=`$readlink $file | grep '/\.npm/'` + if [ "x$target" != "x" ]; then + # found one! + filelist[$fid]="$file" + let 'fid++' + # also remove any symlinks to this file. + base=`basename "$file"` + base=`echo "$base" | awk -F@ '{print $1}'` + if [ "x$base" != "x" ]; then + find "`dirname $file`" -type l -name "$base"'*' \ + | while read l; do + target=`$readlink "$l" | grep "$base"` + if [ "x$target" != "x" ]; then + filelist[$fid]="$1" + let 'fid++' + fi + done + fi + fi + done + + # Scour for shim files. These are relics of 0.2 npm installs. + # note: grep -r is not portable. + find $prefix/$folder -type f \ + | xargs grep -sl '// generated by npm' \ + | while read file; do + filelist[$fid]="$file" + let 'fid++' + done + done + + # now remove the package modules, and the .npm folder itself. + if [ "x$packages" != "x" ]; then + for pkg in $packages; do + filelist[$fid]="$prefix/lib/node/$pkg" + let 'fid++' + for i in $prefix/lib/node/$pkg\@*; do + filelist[$fid]="$i" + let 'fid++' + done + done + fi + + for folder in lib/node/.npm lib/npm share/npm; do + if [ -d $prefix/$folder ]; then + filelist[$fid]="$prefix/$folder" + let 'fid++' + fi + done +done + +# now actually clean, but only if there's anything TO clean +if [ "${#filelist[@]}" -gt 0 ]; then + echo "" + echo "This script will find and eliminate any shims, symbolic" + echo "links, and other cruft that was installed by npm 0.x." + echo "" + + if [ "x$packages" != "x" ]; then + echo "The following packages appear to have been installed with" + echo "an old version of npm, and will be removed forcibly:" + for pkg in $packages; do + echo " $pkg" + done + echo "Make a note of these. You may want to install them" + echo "with npm 1.0 when this process is completed." + echo "" + fi + + OK= + if [ "x$1" = "x-y" ]; then + OK="yes" + fi + + while [ "$OK" != "y" ] && [ "$OK" != "yes" ] && [ "$OK" != "no" ]; do + echo "Is this OK?" + echo " enter 'yes' or 'no'" + echo " or 'show' to see a list of files " + read OK + if [ "x$OK" = "xshow" ] || [ "x$OK" = "xs" ]; then + for i in "${filelist[@]}"; do + echo "$i" + done + fi + done + if [ "$OK" = "no" ]; then + echo "Aborting" + exit 1 + fi + for i in "${filelist[@]}"; do + rm -rf "$i" + done +fi + +echo "" +echo 'All clean!' + +exit 0 diff --git a/bin/nodejs5.12.0/node_modules/npm/scripts/doc-build.sh b/bin/nodejs5.12.0/node_modules/npm/scripts/doc-build.sh new file mode 100644 index 00000000..d83a7f0e --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/scripts/doc-build.sh @@ -0,0 +1,119 @@ +#!/usr/bin/env bash + +if [[ $DEBUG != "" ]]; then + set -x +fi +set -o errexit +set -o pipefail + +if ! [ -x node_modules/.bin/marked-man ]; then + ps=0 + if [ -f .building_marked-man ]; then + pid=$(cat .building_marked-man) + ps=$(ps -p $pid | grep $pid | wc -l) || true + fi + + if [ -f .building_marked-man ] && [ $ps != 0 ]; then + while [ -f .building_marked-man ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install marked-man + echo $$ > .building_marked-man + sleep 1 + if [ $(cat .building_marked-man) == $$ ]; then + make node_modules/.bin/marked-man + rm .building_marked-man + else + while [ -f .building_marked-man ]; do + sleep 1 + done + fi + fi +fi + +if ! [ -x node_modules/.bin/marked ]; then + ps=0 + if [ -f .building_marked ]; then + pid=$(cat .building_marked) + ps=$(ps -p $pid | grep $pid | wc -l) || true + fi + + if [ -f .building_marked ] && [ $ps != 0 ]; then + while [ -f .building_marked ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install marked + echo $$ > .building_marked + sleep 1 + if [ $(cat .building_marked) == $$ ]; then + make node_modules/.bin/marked + rm .building_marked + else + while [ -f .building_marked ]; do + sleep 1 + done + fi + fi +fi + +src=$1 +dest=$2 +name=$(basename ${src%.*}) +date=$(date -u +'%Y-%m-%d %H:%M:%S') +version=$(node cli.js -v) + +mkdir -p $(dirname $dest) + +html_replace_tokens () { + local url=$1 + sed "s|@NAME@|$name|g" \ + | sed "s|@DATE@|$date|g" \ + | sed "s|@URL@|$url|g" \ + | sed "s|@VERSION@|$version|g" \ + | perl -p -e 's/]*)>([^\(]*\([0-9]\)) -- (.*?)<\/h1>/

    \2<\/h1>

    \3<\/p>/g' \ + | perl -p -e 's/npm-npm/npm/g' \ + | perl -p -e 's/([^"-])(npm-)?README(?!\.html)(\(1\))?/\1README<\/a>/g' \ + | perl -p -e 's/<a href="[^"]+README.html">README<\/a><\/title>/<title>README<\/title>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(1\))/\1<a href="..\/cli\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(3\))/\1<a href="..\/api\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(5\))/\1<a href="..\/files\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(7\))/\1<a href="..\/misc\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/\([1357]\)<\/a><\/h1>/<\/a><\/h1>/g' \ + | (if [ $(basename $(dirname $dest)) == "doc" ]; then + perl -p -e 's/ href="\.\.\// href="/g' + else + cat + fi) +} + +man_replace_tokens () { + sed "s|@VERSION@|$version|g" \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(1\)/npm help \2/g' \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(([57])\)/npm help \3 \2/g' \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(3\)/npm apihelp \2/g' \ + | perl -p -e 's/npm\(1\)/npm help npm/g' \ + | perl -p -e 's/npm\(3\)/npm apihelp npm/g' +} + +case $dest in + *.[1357]) + ./node_modules/.bin/marked-man --roff $src \ + | man_replace_tokens > $dest + exit $? + ;; + *.html) + url=${dest/html\//} + (cat html/dochead.html && \ + cat $src | ./node_modules/.bin/marked && + cat html/docfoot.html)\ + | html_replace_tokens $url \ + > $dest + exit $? + ;; + *) + echo "Invalid destination type: $dest" >&2 + exit 1 + ;; +esac diff --git a/bin/nodejs5.12.0/node_modules/npm/scripts/gen-changelog b/bin/nodejs5.12.0/node_modules/npm/scripts/gen-changelog new file mode 100644 index 00000000..02c47f85 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/scripts/gen-changelog @@ -0,0 +1,7 @@ +#!/bin/sh +# Usage: gen-changelog [comittish] +# Reads all the commits since comittish and produces changelog entries in +# our style as best as it can, appendning them to CHANGELOG.md. If it +# encounters a git error it won't modify CHANGELOG.md +# @iarna uses this as the first step in producing changelogs for a release. +(node $(npm prefix)/scripts/changelog.js "$@"; cat CHANGELOG.md) > new.md && mv new.md CHANGELOG.md diff --git a/bin/nodejs5.12.0/node_modules/npm/scripts/index-build.js b/bin/nodejs5.12.0/node_modules/npm/scripts/index-build.js new file mode 100644 index 00000000..e505f0c1 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/scripts/index-build.js @@ -0,0 +1,58 @@ +#!/usr/bin/env node +var fs = require('fs') +var path = require('path') +var root = path.resolve(__dirname, '..') +var glob = require('glob') +var conversion = { 'cli': 1, 'api': 3, 'files': 5, 'misc': 7 } + +glob(root + '/{README.md,doc/*/*.md}', function (er, files) { + if (er) throw er + + output(files.map(function (f) { + var b = path.basename(f) + if (b === 'README.md') return [0, b] + if (b === 'index.md') return null + var s = conversion[path.basename(path.dirname(f))] + return [s, f] + }).filter(function (f) { + return f + }).sort(function (a, b) { + return (a[0] === b[0]) + ? (path.basename(a[1]) === 'npm.md' ? -1 + : path.basename(b[1]) === 'npm.md' ? 1 + : a[1] > b[1] ? 1 : -1) + : a[0] - b[0] + })) +}) + +function output (files) { + console.log( + 'npm-index(7) -- Index of all npm documentation\n' + + '==============================================\n') + + writeLines(files, 0) + writeLines(files, 1, 'Command Line Documentation', 'Using npm on the command line') + writeLines(files, 3, 'API Documentation', 'Using npm in your Node programs') + writeLines(files, 5, 'Files', 'File system structures npm uses') + writeLines(files, 7, 'Misc', 'Various other bits and bobs') +} + +function writeLines (files, sxn, heading, desc) { + if (heading) { + console.log('## %s\n\n%s\n', heading, desc) + } + files.filter(function (f) { + return f[0] === sxn + }).forEach(writeLine) +} + +function writeLine (sd) { + var sxn = sd[0] || 1 + var doc = sd[1] + var d = path.basename(doc, '.md') + + var content = fs.readFileSync(doc, 'utf8').split('\n')[0].split('-- ')[1] + + console.log('### %s(%d)\n', d, sxn) + console.log(content + '\n') +} diff --git a/bin/nodejs5.12.0/node_modules/npm/scripts/install.sh b/bin/nodejs5.12.0/node_modules/npm/scripts/install.sh new file mode 100644 index 00000000..108e6158 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/scripts/install.sh @@ -0,0 +1,270 @@ +#!/bin/sh + +# A word about this shell script: +# +# It must work everywhere, including on systems that lack +# a /bin/bash, map 'sh' to ksh, ksh97, bash, ash, or zsh, +# and potentially have either a posix shell or bourne +# shell living at /bin/sh. +# +# See this helpful document on writing portable shell scripts: +# http://www.gnu.org/s/hello/manual/autoconf/Portable-Shell.html +# +# The only shell it won't ever work on is cmd.exe. + +if [ "x$0" = "xsh" ]; then + # run as curl | sh + # on some systems, you can just do cat>npm-install.sh + # which is a bit cuter. But on others, &1 is already closed, + # so catting to another script file won't do anything. + # Follow Location: headers, and fail on errors + curl -f -L -s https://www.npmjs.org/install.sh > npm-install-$$.sh + ret=$? + if [ $ret -eq 0 ]; then + (exit 0) + else + rm npm-install-$$.sh + echo "Failed to download script" >&2 + exit $ret + fi + sh npm-install-$$.sh + ret=$? + rm npm-install-$$.sh + exit $ret +fi + +# See what "npm_config_*" things there are in the env, +# and make them permanent. +# If this fails, it's not such a big deal. +configures="`env | grep 'npm_config_' | sed -e 's|^npm_config_||g'`" + +npm_config_loglevel="error" +if [ "x$npm_debug" = "x" ]; then + (exit 0) +else + echo "Running in debug mode." + echo "Note that this requires bash or zsh." + set -o xtrace + set -o pipefail + npm_config_loglevel="verbose" +fi +export npm_config_loglevel + +# make sure that node exists +node=`which node 2>&1` +ret=$? +if [ $ret -eq 0 ] && [ -x "$node" ]; then + (exit 0) +else + echo "npm cannot be installed without node.js." >&2 + echo "Install node first, and then try again." >&2 + echo "" >&2 + echo "Maybe node is installed, but not in the PATH?" >&2 + echo "Note that running as sudo can change envs." >&2 + echo "" + echo "PATH=$PATH" >&2 + exit $ret +fi + +# set the temp dir +TMP="${TMPDIR}" +if [ "x$TMP" = "x" ]; then + TMP="/tmp" +fi +TMP="${TMP}/npm.$$" +rm -rf "$TMP" || true +mkdir "$TMP" +if [ $? -ne 0 ]; then + echo "failed to mkdir $TMP" >&2 + exit 1 +fi + +BACK="$PWD" + +ret=0 +tar="${TAR}" +if [ -z "$tar" ]; then + tar="${npm_config_tar}" +fi +if [ -z "$tar" ]; then + tar=`which tar 2>&1` + ret=$? +fi + +if [ $ret -eq 0 ] && [ -x "$tar" ]; then + echo "tar=$tar" + echo "version:" + $tar --version + ret=$? +fi + +if [ $ret -eq 0 ]; then + (exit 0) +else + echo "No suitable tar program found." + exit 1 +fi + + + +# Try to find a suitable make +# If the MAKE environment var is set, use that. +# otherwise, try to find gmake, and then make. +# If no make is found, then just execute the necessary commands. + +# XXX For some reason, make is building all the docs every time. This +# is an annoying source of bugs. Figure out why this happens. +MAKE=NOMAKE + +if [ "x$MAKE" = "x" ]; then + make=`which gmake 2>&1` + if [ $? -eq 0 ] && [ -x "$make" ]; then + (exit 0) + else + make=`which make 2>&1` + if [ $? -eq 0 ] && [ -x "$make" ]; then + (exit 0) + else + make=NOMAKE + fi + fi +else + make="$MAKE" +fi + +if [ -x "$make" ]; then + (exit 0) +else + # echo "Installing without make. This may fail." >&2 + make=NOMAKE +fi + +# If there's no bash, then don't even try to clean +if [ -x "/bin/bash" ]; then + (exit 0) +else + clean="no" +fi + +node_version=`"$node" --version 2>&1` +ret=$? +if [ $ret -ne 0 ]; then + echo "You need node to run this program." >&2 + echo "node --version reports: $node_version" >&2 + echo "with exit code = $ret" >&2 + echo "Please install node before continuing." >&2 + exit $ret +fi + +t="${npm_install}" +if [ -z "$t" ]; then + # switch based on node version. + # note that we can only use strict sh-compatible patterns here. + case $node_version in + 0.[01234567].* | v0.[01234567].*) + echo "You are using an outdated and unsupported version of" >&2 + echo "node ($node_version). Please update node and try again." >&2 + exit 99 + ;; + *) + echo "install npm@latest" + t="latest" + ;; + esac +fi + +# need to echo "" after, because Posix sed doesn't treat EOF +# as an implied end of line. +url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \ + | sed -e 's/^.*tarball":"//' \ + | sed -e 's/".*$//'` + +ret=$? +if [ "x$url" = "x" ]; then + ret=125 + # try without the -e arg to sed. + url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \ + | sed 's/^.*tarball":"//' \ + | sed 's/".*$//'` + ret=$? + if [ "x$url" = "x" ]; then + ret=125 + fi +fi +if [ $ret -ne 0 ]; then + echo "Failed to get tarball url for npm/$t" >&2 + exit $ret +fi + + +echo "fetching: $url" >&2 + +cd "$TMP" \ + && curl -SsL "$url" \ + | $tar -xzf - \ + && cd "$TMP"/* \ + && (ver=`"$node" bin/read-package-json.js package.json version` + isnpm10=0 + if [ $ret -eq 0 ]; then + if [ -d node_modules ]; then + if "$node" node_modules/semver/bin/semver -v "$ver" -r "1" + then + isnpm10=1 + fi + else + if "$node" bin/semver -v "$ver" -r ">=1.0"; then + isnpm10=1 + fi + fi + fi + + ret=0 + if [ $isnpm10 -eq 1 ] && [ -f "scripts/clean-old.sh" ]; then + if [ "x$skipclean" = "x" ]; then + (exit 0) + else + clean=no + fi + if [ "x$clean" = "xno" ] \ + || [ "x$clean" = "xn" ]; then + echo "Skipping 0.x cruft clean" >&2 + ret=0 + elif [ "x$clean" = "xy" ] || [ "x$clean" = "xyes" ]; then + NODE="$node" /bin/bash "scripts/clean-old.sh" "-y" + ret=$? + else + NODE="$node" /bin/bash "scripts/clean-old.sh" </dev/tty + ret=$? + fi + fi + + if [ $ret -ne 0 ]; then + echo "Aborted 0.x cleanup. Exiting." >&2 + exit $ret + fi) \ + && (if [ "x$configures" = "x" ]; then + (exit 0) + else + echo "./configure $configures" + echo "$configures" > npmrc + fi) \ + && (if [ "$make" = "NOMAKE" ]; then + (exit 0) + elif "$make" uninstall install; then + (exit 0) + else + make="NOMAKE" + fi + if [ "$make" = "NOMAKE" ]; then + "$node" cli.js rm npm -gf + "$node" cli.js install -gf + fi) \ + && cd "$BACK" \ + && rm -rf "$TMP" \ + && echo "It worked" + +ret=$? +if [ $ret -ne 0 ]; then + echo "It failed" >&2 +fi +exit $ret diff --git a/bin/nodejs5.12.0/node_modules/npm/scripts/publish-tag.js b/bin/nodejs5.12.0/node_modules/npm/scripts/publish-tag.js new file mode 100644 index 00000000..2ebfa00a --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/scripts/publish-tag.js @@ -0,0 +1,3 @@ +var semver = require('semver') +var version = semver.parse(require('../package.json').version) +console.log('v%s.%s-next', version.major, version.minor) diff --git a/bin/nodejs5.12.0/node_modules/npm/scripts/release.sh b/bin/nodejs5.12.0/node_modules/npm/scripts/release.sh new file mode 100644 index 00000000..60a686fe --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/scripts/release.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# script for creating a zip and tarball for inclusion in node + +unset CDPATH + +set -e + +rm -rf release *.tgz || true +mkdir release +node ./cli.js pack --loglevel error >/dev/null +mv *.tgz release +cd release +tar xzf *.tgz + +mkdir node_modules +mv package node_modules/npm + +# make the zip for windows users +cp node_modules/npm/bin/*.cmd . +zipname=npm-$(node ../cli.js -v).zip +zip -q -9 -r -X "$zipname" *.cmd node_modules + +# make the tar for node's deps +cd node_modules +tarname=npm-$(node ../../cli.js -v).tgz +tar czf "$tarname" npm + +cd .. +mv "node_modules/$tarname" . + +rm -rf *.cmd +rm -rf node_modules + +echo "release/$tarname" +echo "release/$zipname" diff --git a/bin/nodejs5.12.0/node_modules/npm/scripts/relocate.sh b/bin/nodejs5.12.0/node_modules/npm/scripts/relocate.sh new file mode 100644 index 00000000..aa30f3df --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/scripts/relocate.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Change the cli shebang to point at the specified node +# Useful for when the program is moved around after install. +# Also used by the default 'make install' in node to point +# npm at the newly installed node, rather than the first one +# in the PATH, which would be the default otherwise. + +# bash /path/to/npm/scripts/relocate.sh $nodepath +# If $nodepath is blank, then it'll use /usr/bin/env + +dir="$(dirname "$(dirname "$0")")" +cli="$dir"/bin/npm-cli.js +tmp="$cli".tmp + +node="$1" +if [ "x$node" = "x" ]; then + node="/usr/bin/env node" +fi +node="#!$node" + +sed -e 1d "$cli" > "$tmp" +echo "$node" > "$cli" +cat "$tmp" >> "$cli" +rm "$tmp" +chmod ogu+x $cli diff --git a/bin/nodejs5.12.0/node_modules/npm/scripts/update-authors.sh b/bin/nodejs5.12.0/node_modules/npm/scripts/update-authors.sh new file mode 100644 index 00000000..c9b613c7 --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/scripts/update-authors.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +git log --reverse --format='%aN <%aE>' | perl -wnE ' +BEGIN { + say "# Authors sorted by whether or not they\x27re me"; +} + +print $seen{$_} = $_ unless $seen{$_} +' > AUTHORS diff --git a/bin/nodejs5.12.0/node_modules/npm/test/common-tap.js b/bin/nodejs5.12.0/node_modules/npm/test/common-tap.js new file mode 100644 index 00000000..5817664b --- /dev/null +++ b/bin/nodejs5.12.0/node_modules/npm/test/common-tap.js @@ -0,0 +1,90 @@ +// cheesy hackaround for test deps (read: nock) that rely on setImmediate +if (!global.setImmediate || !require('timers').setImmediate) { + require('timers').setImmediate = global.setImmediate = function () { + var args = [arguments[0], 0].concat([].slice.call(arguments, 1)) + setTimeout.apply(this, args) + } +} + +var spawn = require('child_process').spawn +var path = require('path') + +var port = exports.port = 1337 +exports.registry = 'http://localhost:' + port +process.env.npm_config_loglevel = 'error' +process.env.npm_config_progress = 'false' + +var npm_config_cache = path.resolve(__dirname, 'npm_cache') +process.env.npm_config_cache = exports.npm_config_cache = npm_config_cache +process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') +process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') +process.env.npm_config_global_style = 'false' +process.env.npm_config_legacy_bundling = 'false' +process.env.random_env_var = 'foo' +// suppress warnings about using a prerelease version of node +process.env.npm_config_node_version = process.version.replace(/-.*$/, '') + +var bin = exports.bin = require.resolve('../bin/npm-cli.js') +var chain = require('slide').chain +var once = require('once') + +exports.npm = function (cmd, opts, cb) { + cb = once(cb) + cmd = [bin].concat(cmd) + opts = opts || {} + + opts.env = opts.env || process.env + if (!opts.env.npm_config_cache) { + opts.env.npm_config_cache = npm_config_cache + } + + var stdout = '' + var stderr = '' + var node = process.execPath + var child = spawn(node, cmd, opts) + + if (child.stderr) { + child.stderr.on('data', function (chunk) { + stderr += chunk + }) + } + + if (child.stdout) { + child.stdout.on('data', function (chunk) { + stdout += chunk + }) + } + + child.on('error', cb) + + child.on('close', function (code) { + cb(null, code, stdout, stderr) + }) + return child +} + +exports.makeGitRepo = function (params, cb) { + // git must be called after npm.load because it uses config + var git = require('../lib/utils/git.js') + + var root = params.path || process.cwd() + var user = params.user || 'PhantomFaker' + var email = params.email || 'nope@not.real' + var added = params.added || ['package.json'] + var message = params.message || 'stub repo' + + var opts = { cwd: root, env: { PATH: process.env.PATH } } + var commands = [ + git.chainableExec(['init'], opts), + git.chainableExec(['config', 'user.name', user], opts), + git.chainableExec(['config', 'user.email', email], opts), + git.chainableExec(['add'].concat(added), opts), + git.chainableExec(['commit', '-m', message], opts) + ] + + if (Array.isArray(params.commands)) { + commands = commands.concat(params.commands) + } + + chain(commands, cb) +} diff --git a/bin/nodejs5.12.0/node_perfctr_provider.man b/bin/nodejs5.12.0/node_perfctr_provider.man new file mode 100644 index 00000000..f82a79fa --- /dev/null +++ b/bin/nodejs5.12.0/node_perfctr_provider.man @@ -0,0 +1,107 @@ +<instrumentationManifest + xmlns="http://schemas.microsoft.com/win/2004/08/events" + xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <instrumentation> + <counters xmlns="http://schemas.microsoft.com/win/2005/12/counters" + schemaVersion="1.1"> + <provider symbol="NodeCounterProvider" + applicationIdentity="node.exe" + providerType="userMode" + providerGuid="{793C9B44-3D6B-4F57-B5D7-4FF80ADCF9A2}"> + <counterSet symbol="NodeCounterSet" + guid="{3A22A8EC-297C-48AC-AB15-33EC93033FD8}" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet" + name="Node.js" + description="Node.js performance counters" + instances="multipleAggregate"> + + <counter id="1" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvreq" + name="HTTP server requests" + description="Number of HTTP server requests" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="2" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvrsp" + name="HTTP server responses" + description="Number of HTTP server responses" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="3" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclireq" + name="HTTP client requests" + description="Number of HTTP client requests" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="4" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclirsp" + name="HTTP client responses" + description="Number of HTTP client responses" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="5" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netsrvconn" + name="Active server connections" + description="Number of server connections" + type="perf_counter_rawcount" + detailLevel="standard" + aggregate="sum" /> + + <counter id="6" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbytesent" + name="Network bytes sent" + description="Number of bytes sent using TCP" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="7" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbyterecv" + name="Network bytes received" + description="Number of bytes received using TCP" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="8" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.gctime" + name="%Time in GC" + description="Percent of time for last GC" + type="perf_counter_rawcount" + detailLevel="standard" + aggregate="avg" /> + + <counter id="9" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebytesent" + name="Pipe bytes sent" + description="Number of bytes sent using pipe" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="10" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebyterecv" + name="Pipe bytes received" + description="Number of bytes received using pipe" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + </counterSet> + </provider> + </counters> + </instrumentation> +</instrumentationManifest> diff --git a/bin/nodejs5.12.0/nodevars.bat b/bin/nodejs5.12.0/nodevars.bat new file mode 100644 index 00000000..cbe2d9a5 --- /dev/null +++ b/bin/nodejs5.12.0/nodevars.bat @@ -0,0 +1,24 @@ +@echo off + +rem Ensure this Node.js and npm are first in the PATH +set "PATH=%APPDATA%\npm;%~dp0;%PATH%" + +setlocal enabledelayedexpansion +pushd "%~dp0" + +rem Figure out the Node.js version. +set print_version=.\node.exe -p -e "process.versions.node + ' (' + process.arch + ')'" +for /F "usebackq delims=" %%v in (`%print_version%`) do set version=%%v + +rem Print message. +if exist npm.cmd ( + echo Your environment has been set up for using Node.js !version! and npm. +) else ( + echo Your environment has been set up for using Node.js !version!. +) + +popd +endlocal + +rem If we're in the Node.js directory, change to the user's home dir. +if "%CD%\"=="%~dp0" cd /d "%HOMEDRIVE%%HOMEPATH%" diff --git a/bin/nodejs5.12.0/npm b/bin/nodejs5.12.0/npm new file mode 100644 index 00000000..1226afbc --- /dev/null +++ b/bin/nodejs5.12.0/npm @@ -0,0 +1,34 @@ +#!/bin/sh +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node +fi + +NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" + +case `uname` in + *MINGW*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; + *CYGWIN*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; +esac + +"$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/bin/nodejs5.12.0/npm.cmd b/bin/nodejs5.12.0/npm.cmd new file mode 100644 index 00000000..f111c59d --- /dev/null +++ b/bin/nodejs5.12.0/npm.cmd @@ -0,0 +1,19 @@ +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/bin/nodejs6.7.0/etc/.npmignore b/bin/nodejs6.7.0/etc/.npmignore new file mode 100644 index 00000000..d3f5a12f --- /dev/null +++ b/bin/nodejs6.7.0/etc/.npmignore @@ -0,0 +1 @@ + diff --git a/bin/nodejs6.7.0/etc/npmrc b/bin/nodejs6.7.0/etc/npmrc new file mode 100644 index 00000000..09d64323 --- /dev/null +++ b/bin/nodejs6.7.0/etc/npmrc @@ -0,0 +1,5 @@ +cache = ~NEARD_WIN_PATH~\tmp\npm-cache +globalconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs6.7.0\etc\npmrc +globalignorefile = ~NEARD_WIN_PATH~\bin\nodejs\nodejs6.7.0\etc\.npmignore +init-module = ~NEARD_WIN_PATH~\bin\nodejs\nodejs6.7.0\etc\.npm-init.js +userconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs6.7.0\etc\npmrc diff --git a/bin/nodejs6.7.0/etc/npmrc.nrd b/bin/nodejs6.7.0/etc/npmrc.nrd new file mode 100644 index 00000000..09d64323 --- /dev/null +++ b/bin/nodejs6.7.0/etc/npmrc.nrd @@ -0,0 +1,5 @@ +cache = ~NEARD_WIN_PATH~\tmp\npm-cache +globalconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs6.7.0\etc\npmrc +globalignorefile = ~NEARD_WIN_PATH~\bin\nodejs\nodejs6.7.0\etc\.npmignore +init-module = ~NEARD_WIN_PATH~\bin\nodejs\nodejs6.7.0\etc\.npm-init.js +userconfig = ~NEARD_WIN_PATH~\bin\nodejs\nodejs6.7.0\etc\npmrc diff --git a/bin/nodejs6.7.0/launch.bat b/bin/nodejs6.7.0/launch.bat new file mode 100644 index 00000000..62238ad6 --- /dev/null +++ b/bin/nodejs6.7.0/launch.bat @@ -0,0 +1,12 @@ +@ECHO OFF +SETLOCAL EnableDelayedExpansion + +SET NEARD_NODEJS_PATH=%~dp0 +SET NEARD_NODEJS_PATH=!NEARD_NODEJS_PATH:~0,-1! +SET NEARD_NODEJS_NPM_PATH=%NEARD_NODEJS_PATH%\node_modules\npm +SET NEARD_NODEJS_CONFIG_PATH=%NEARD_NODEJS_NPM_PATH%\npmrc +ECHO prefix = %NEARD_NODEJS_PATH%>%NEARD_NODEJS_CONFIG_PATH% + +"%NEARD_NODEJS_PATH%\nodevars.bat" & "%NEARD_NODEJS_PATH%\npm" config set globalconfig "%NEARD_NODEJS_CONFIG_PATH%" --global + +ENDLOCAL \ No newline at end of file diff --git a/bin/nodejs6.7.0/neard.conf b/bin/nodejs6.7.0/neard.conf new file mode 100644 index 00000000..d480944f --- /dev/null +++ b/bin/nodejs6.7.0/neard.conf @@ -0,0 +1,8 @@ +nodejsVersion = "6.7.0" +nodejsExe = "node.exe" +nodejsVars = "nodevars.bat" +nodejsNpm = "npm.cmd" +nodejsLaunch = "launch.bat" +nodejsConf = "node_modules/npm/npmrc" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/nodejs6.7.0/node.exe b/bin/nodejs6.7.0/node.exe new file mode 100644 index 00000000..9b9fe0c4 Binary files /dev/null and b/bin/nodejs6.7.0/node.exe differ diff --git a/bin/nodejs6.7.0/node_etw_provider.man b/bin/nodejs6.7.0/node_etw_provider.man new file mode 100644 index 00000000..8fda75aa --- /dev/null +++ b/bin/nodejs6.7.0/node_etw_provider.man @@ -0,0 +1,185 @@ +<instrumentationManifest + xmlns="http://schemas.microsoft.com/win/2004/08/events" + xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <instrumentation> + <events> + <provider name="NodeJS-ETW-provider" + guid="{77754E9B-264B-4D8D-B981-E4135C1ECB0C}" + symbol="NODE_ETW_PROVIDER" + message="$(string.NodeJS-ETW-provider.name)" + resourceFileName="node.exe" + messageFileName="node.exe"> + + <tasks> + <task name="MethodRuntime" value="1" + symbol="JSCRIPT_METHOD_RUNTIME_TASK"> + <opcodes> + <opcode name="MethodLoad" value="10" + symbol="JSCRIPT_METHOD_METHODLOAD_OPCODE"/> + </opcodes> + </task> + </tasks> + + <opcodes> + <opcode name="NODE_HTTP_SERVER_REQUEST" value="10"/> + <opcode name="NODE_HTTP_SERVER_RESPONSE" value="11"/> + <opcode name="NODE_HTTP_CLIENT_REQUEST" value="12"/> + <opcode name="NODE_HTTP_CLIENT_RESPONSE" value="13"/> + <opcode name="NODE_NET_SERVER_CONNECTION" value="14"/> + <opcode name="NODE_NET_STREAM_END" value="15"/> + <opcode name="NODE_GC_START" value="16"/> + <opcode name="NODE_GC_DONE" value="17"/> + <opcode name="NODE_V8SYMBOL_REMOVE" value="21"/> + <opcode name="NODE_V8SYMBOL_MOVE" value="22"/> + <opcode name="NODE_V8SYMBOL_RESET" value="23"/> + </opcodes> + + <templates> + <template tid="node_connection"> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_http_client_request"> + <data name="url" inType="win:AnsiString" /> + <data name="method" inType="win:AnsiString" /> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_http_server_request"> + <data name="url" inType="win:AnsiString" /> + <data name="method" inType="win:AnsiString" /> + <data name="forwardedFor" inType="win:AnsiString" /> + <data name="fd" inType="win:UInt32" /> + <data name="port" inType="win:UInt32" /> + <data name="remote" inType="win:AnsiString" /> + <data name="buffered" inType="win:UInt32" /> + </template> + + <template tid="node_gc"> + <data name="gctype" inType="win:UInt32" /> + <data name="gccallbackflags" inType="win:UInt32" /> + </template> + + <template tid="V8AddressChange"> + <data name="addr1" inType="win:Pointer" outType="win:HexInt64"/> + <data name="addr2" inType="win:Pointer" outType="win:HexInt64"/> + </template> + + <template tid="MethodLoadUnload"> + <data name="ScriptContextID" inType="win:Pointer" outType="win:HexInt64"/> + <data name="MethodStartAddress" inType="win:Pointer" outType="win:HexInt64" /> + <data name="MethodSize" inType="win:UInt64" /> + <data name="MethodID" inType="win:UInt32" /> + <data name="MethodFlags" inType="win:UInt16" /> + <data name="MethodAddressRangeID" inType="win:UInt16" /> + <data name="SourceID" inType="win:UInt64" /> + <data name="Line" inType="win:UInt32" outType="xs:unsignedInt" /> + <data name="Column" inType="win:UInt32" outType="xs:unsignedInt" /> + <data name="MethodName" inType="win:UnicodeString" outType="xs:string" /> + </template> + </templates> + + <events> + <event value="1" + opcode="NODE_HTTP_SERVER_REQUEST" + template="node_http_server_request" + symbol="NODE_HTTP_SERVER_REQUEST_EVENT" + message="$(string.NodeJS-ETW-provider.event.1.message)" + level="win:Informational"/> + <event value="2" + opcode="NODE_HTTP_SERVER_RESPONSE" + template="node_connection" + symbol="NODE_HTTP_SERVER_RESPONSE_EVENT" + message="$(string.NodeJS-ETW-provider.event.2.message)" + level="win:Informational"/> + <event value="3" + opcode="NODE_HTTP_CLIENT_REQUEST" + template="node_http_client_request" + symbol="NODE_HTTP_CLIENT_REQUEST_EVENT" + message="$(string.NodeJS-ETW-provider.event.3.message)" + level="win:Informational"/> + <event value="4" + opcode="NODE_HTTP_CLIENT_RESPONSE" + template="node_connection" + symbol="NODE_HTTP_CLIENT_RESPONSE_EVENT" + message="$(string.NodeJS-ETW-provider.event.4.message)" + level="win:Informational"/> + <event value="5" + opcode="NODE_NET_SERVER_CONNECTION" + template="node_connection" + symbol="NODE_NET_SERVER_CONNECTION_EVENT" + message="$(string.NodeJS-ETW-provider.event.5.message)" + level="win:Informational"/> + <event value="6" + opcode="NODE_NET_STREAM_END" + template="node_connection" + symbol="NODE_NET_STREAM_END_EVENT" + message="$(string.NodeJS-ETW-provider.event.6.message)" + level="win:Informational"/> + <event value="7" + opcode="NODE_GC_START" + template="node_gc" + symbol="NODE_GC_START_EVENT" + message="$(string.NodeJS-ETW-provider.event.7.message)" + level="win:Informational"/> + <event value="8" + opcode="NODE_GC_DONE" + template="node_gc" + symbol="NODE_GC_DONE_EVENT" + message="$(string.NodeJS-ETW-provider.event.8.message)" + level="win:Informational"/> + <event value="9" + level="win:Informational" + opcode="MethodLoad" + symbol="MethodLoad" + message="$(string.NodeJS-ETW-provider.event.9.message)" + task="MethodRuntime" + template="MethodLoadUnload"/> + <event value="21" + opcode="NODE_V8SYMBOL_REMOVE" + template="V8AddressChange" + symbol="NODE_V8SYMBOL_REMOVE_EVENT" + message="$(string.NodeJS-ETW-provider.event.21.message)" + level="win:Informational" /> + <event value="22" + opcode="NODE_V8SYMBOL_MOVE" + template="V8AddressChange" + symbol="NODE_V8SYMBOL_MOVE_EVENT" + message="$(string.NodeJS-ETW-provider.event.22.message)" + level="win:Informational" /> + <event value="23" + opcode="NODE_V8SYMBOL_RESET" + symbol="NODE_V8SYMBOL_RESET_EVENT" + message="$(string.NodeJS-ETW-provider.event.23.message)" + level="win:Informational" /> + </events> + </provider> + </events> + </instrumentation> + <localization> + <resources culture="en-US"> + <stringTable> + <string id="NodeJS-ETW-provider.name" value="Node.js ETW Provider"/> + <string id="NodeJS-ETW-provider.event.1.message" value="Node.js HTTP Server Request%nMethod: %2%nRemote: %6%nPort: %5%nURL: %1"/> + <string id="NodeJS-ETW-provider.event.2.message" value="Node.js HTTP Server Response%nRemote: %3%nPort: %2"/> + <string id="NodeJS-ETW-provider.event.3.message" value="Node.js HTTP Client Request%nMethod: %2%nRemote: %5%nPort: %4%nURL: %1"/> + <string id="NodeJS-ETW-provider.event.4.message" value="Node.js HTTP Client Response%nRemote: %3%nPort: %2"/> + <string id="NodeJS-ETW-provider.event.5.message" value="Node.js Net Server Connection%nRemote: %3%nPort: %2"/> + <string id="NodeJS-ETW-provider.event.6.message" value="Node.js Net Stream End%nRemote: %3%nPort: %2"/> + <string id="NodeJS-ETW-provider.event.7.message" value="Node.js Garbage Collection Start"/> + <string id="NodeJS-ETW-provider.event.8.message" value="Node.js Garbage Collection Done"/> + <string id="NodeJS-ETW-provider.event.9.message" value="Node.js Function Compiled: %10"/> + <string id="NodeJS-ETW-provider.event.21.message" value="Node.js V8 Symbol Remove"/> + <string id="NodeJS-ETW-provider.event.22.message" value="Node.js V8 Symbol Move"/> + <string id="NodeJS-ETW-provider.event.23.message" value="Node.js V8 Symbol Reset"/> + </stringTable> + </resources> + </localization> +</instrumentationManifest> diff --git a/bin/nodejs6.7.0/node_modules/npm/.mailmap b/bin/nodejs6.7.0/node_modules/npm/.mailmap new file mode 100644 index 00000000..082245ae --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/.mailmap @@ -0,0 +1,63 @@ +Alex K. Wolfe <alexkwolfe@gmail.com> +Andrew Bradley <cspotcode@gmail.com> +Andrew Lunny <alunny@gmail.com> +Arlo Breault <arlolra@gmail.com> +Ashley Williams <ashley@npmjs.com> <ashley@bocoup.com> +Ashley Williams <ashley@npmjs.com> <ashley666ashley@gmail.com> +Benjamin Coe <bencoe@gmail.com> +Benjamin Coe <bencoe@gmail.com> <ben@npmjs.com> +Brian White <mscdex@mscdex.net> <mscdex@gmail.com> +Cedric Nelson <cedric.nelson@gmail.com> +Charlie Robbins <charlie.robbins@gmail.com> +Dalmais Maxence <root@ip-10-195-202-5.ec2.internal> +Danila Gerasimov <danila.gerasimov@gmail.com> +Dave Galbraith <dave@jut.io> +David Beitey <david@davidjb.com> +Domenic Denicola <domenic@domenicdenicola.com> +Einar Otto Stangvik <einaros@gmail.com> +Erik Wienhold <git@ewie.name> +Evan Lucas <evan@btc.com> <evan.lucas@hattiesburgclinic.com> +Evan Lucas <evan@btc.com> <evanlucas@me.com> +Faiq Raza <faiqrazarizvi@gmail.com> +Forbes Lindesay <forbes@lindesay.co.uk> +Forrest L Norvell <ogd@aoaioxxysz.net> <forrest@npmjs.com> +Gabriel Barros <descartavel1@gmail.com> +Geoff Flarity <geoff.flarity@gmail.com> <gflarity@raptvm-x02.(none)> +Ifeanyi Oraelosi <ifeanyioraelosi@gmail.com> +Isaac Z. Schlueter <i@izs.me> <i@foohack.com> +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> +Jason Smith <jhs@iriscouch.com> +Jonas Weber <github@jonasw.de> +Julien Meddah <julien.meddah@deveryware.com> +Kevin Lorenz <mail@kevinlorenz.com> +Kris Windham <kriswindham@gmail.com> +Lin Clark <lin.w.clark@gmail.com> +Luke Arduini <luke.arduini@gmail.com> <luke.arduini@me.com> +Maciej Małecki <me@mmalecki.com> <maciej.malecki@notimplemented.org> +Martin Ek <mail@ekmartin.com> +Max Goodman <c@chromakode.com> +Maxim Bogushevich <boga1@mail.ru> +Maximilian Antoni <mail@maxantoni.de> <maximilian.antoni@juliusbaer.com> +Michael Hayes <michael@hayes.io> <mhayes@newrelic.com> +Nicolas Morel <marsup@gmail.com> +Olivier Melcher <olivier.melcher@gmail.com> +Ra'Shaun Stovall <rashaunstovall@gmail.com> +Rebecca Turner <me@re-becca.org> <turner@mikomi.org> +Rebecca Turner <me@re-becca.org> <rebecca@npmjs.com> +Ryan Emery <seebees@gmail.com> +Sam Mikes <smikes@cubane.com> +Stephanie Snopek <stephaniesnopek@gmail.com> +Takaya Kobayashi <jigsaw@live.jp> +Thomas Reggi <thomas@reggi.com> +Timo Weiß <timoweiss@Timo-MBP.local> +Tony <zearin@gonk.net> +Trent Mick <trentm@gmail.com> <trent.mick@joyent.com> +Visnu Pitiyanuvath <visnupx@gmail.com> +Will Elwood <w.elwood08@gmail.com> +Wout Mertens <Wout.Mertens@gmail.com> +Yeonghoon Park <sola92@gmail.com> +Zeke Sikelianos <zeke@sikelianos.com> +Zoujie Wzj <zoujie.wzj@alibaba-inc.com> diff --git a/bin/nodejs6.7.0/node_modules/npm/.npmignore b/bin/nodejs6.7.0/node_modules/npm/.npmignore new file mode 100644 index 00000000..825d694e --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/.npmignore @@ -0,0 +1,32 @@ +*.swp +.*.swp +npm-debug.log +/test/bin +/test/output.log +/test/packages/*/node_modules +/test/packages/npm-test-depends-on-spark/which-spark.log +/test/packages/test-package/random-data.txt +/test/root +/test/npm_cache +node_modules/marked +node_modules/ronn +node_modules/tap +node_modules/.bin +node_modules/npm-registry-mock +/npmrc +/release/ + +# don't need these in the npm package. +html/*.png + +# don't ignore .npmignore files +# these are used in some tests. +!.npmignore + +/npm-*.tgz + +*.pyc + +/test/tap/builtin-config + +.nyc_output diff --git a/bin/nodejs6.7.0/node_modules/npm/.travis.yml b/bin/nodejs6.7.0/node_modules/npm/.travis.yml new file mode 100644 index 00000000..2424fa4f --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/.travis.yml @@ -0,0 +1,23 @@ +language: node_js +node_js: + # LTS is our most important target + - "4" + # next LTS and master is next most important + - "6" + # still in LTS maintenance until fall 2016 + # (also still in wide use) + - "0.10" + # will be unsupported as soon as 6 becomes LTS and 7 released + - "5" + # technically in LTS / distros, unbeloved + - "0.12" +env: + - DEPLOY_VERSION=testing +before_install: + - "npm config set spin false" + - "node . install -g ." + - "mkdir -p /var/run/couchdb" +sudo: false +script: "npm test" +notifications: + slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/bin/nodejs6.7.0/node_modules/npm/AUTHORS b/bin/nodejs6.7.0/node_modules/npm/AUTHORS new file mode 100644 index 00000000..ff7f6a6d --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/AUTHORS @@ -0,0 +1,410 @@ +# Authors sorted by whether or not they're me +Isaac Z. Schlueter <i@izs.me> +Steve Steiner <ssteinerX@gmail.com> +Mikeal Rogers <mikeal.rogers@gmail.com> +Aaron Blohowiak <aaron.blohowiak@gmail.com> +Martyn Smith <martyn@dollyfish.net.nz> +Charlie Robbins <charlie.robbins@gmail.com> +Francisco Treacy <francisco.treacy@gmail.com> +Cliffano Subagio <cliffano@gmail.com> +Christian Eager <christian.eager@nokia.com> +Dav Glass <davglass@gmail.com> +Alex K. Wolfe <alexkwolfe@gmail.com> +James Sanders <jimmyjazz14@gmail.com> +Reid Burke <me@reidburke.com> +Arlo Breault <arlolra@gmail.com> +Timo Derstappen <teemow@gmail.com> +Bart Teeuwisse <bart.teeuwisse@thecodemill.biz> +Ben Noordhuis <info@bnoordhuis.nl> +Tor Valamo <tor.valamo@gmail.com> +Whyme.Lyu <5longluna@gmail.com> +Olivier Melcher <olivier.melcher@gmail.com> +Tomaž Muraus <kami@k5-storitve.net> +Evan Meagher <evan.meagher@gmail.com> +Orlando Vazquez <ovazquez@gmail.com> +Kai Chen <kaichenxyz@gmail.com> +George Miroshnykov <gmiroshnykov@lohika.com> +Geoff Flarity <geoff.flarity@gmail.com> +Max Goodman <c@chromakode.com> +Pete Kruckenberg <pete@kruckenberg.com> +Laurie Harper <laurie@holoweb.net> +Chris Wong <chris@chriswongstudio.com> +Scott Bronson <brons_github@rinspin.com> +Federico Romero <federomero@gmail.com> +Visnu Pitiyanuvath <visnupx@gmail.com> +Irakli Gozalishvili <rfobic@gmail.com> +Mark Cahill <mark@tiemonster.info> +Tony <zearin@gonk.net> +Iain Sproat <iainsproat@gmail.com> +Trent Mick <trentm@gmail.com> +Felix Geisendörfer <felix@debuggable.com> +Jameson Little <t.jameson.little@gmail.com> +Conny Brunnkvist <conny@fuchsia.se> +Will Elwood <w.elwood08@gmail.com> +Dean Landolt <dean@deanlandolt.com> +Oleg Efimov <efimovov@gmail.com> +Martin Cooper <mfncooper@gmail.com> +Jann Horn <jannhorn@googlemail.com> +Andrew Bradley <cspotcode@gmail.com> +Maciej Małecki <me@mmalecki.com> +Stephen Sugden <glurgle@gmail.com> +Michael Budde <mbudde@gmail.com> +Jason Smith <jhs@iriscouch.com> +Gautham Pai <buzypi@gmail.com> +David Trejo <david.daniel.trejo@gmail.com> +Paul Vorbach <paul@vorb.de> +George Ornbo <george@shapeshed.com> +Tim Oxley <secoif@gmail.com> +Tyler Green <tyler.green2@gmail.com> +Dave Pacheco <dap@joyent.com> +Danila Gerasimov <danila.gerasimov@gmail.com> +Rod Vagg <rod@vagg.org> +Christian Howe <coderarity@gmail.com> +Andrew Lunny <alunny@gmail.com> +Henrik Hodne <dvyjones@binaryhex.com> +Adam Blackburn <regality@gmail.com> +Kris Windham <kriswindham@gmail.com> +Jens Grunert <jens.grunert@gmail.com> +Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl> +Dalmais Maxence <root@ip-10-195-202-5.ec2.internal> +Marcus Ekwall <marcus.ekwall@gmail.com> +Aaron Stacy <aaron.r.stacy@gmail.com> +Phillip Howell <phowell@cothm.org> +Domenic Denicola <domenic@domenicdenicola.com> +James Halliday <mail@substack.net> +Jeremy Cantrell <jmcantrell@gmail.com> +Ribettes <patlogan29@gmail.com> +Don Park <donpark@docuverse.com> +Einar Otto Stangvik <einaros@gmail.com> +Kei Son <heyacct@gmail.com> +Nicolas Morel <marsup@gmail.com> +Mark Dube <markisdee@gmail.com> +Nathan Rajlich <nathan@tootallnate.net> +Maxim Bogushevich <boga1@mail.ru> +Meaglin <Meaglin.wasabi@gmail.com> +Ben Evans <ben@bensbit.co.uk> +Nathan Zadoks <nathan@nathan7.eu> +Brian White <mscdex@mscdex.net> +Jed Schmidt <tr@nslator.jp> +Ian Livingstone <ianl@cs.dal.ca> +Patrick Pfeiffer <patrick@buzzle.at> +Paul Miller <paul@paulmillr.com> +Ryan Emery <seebees@gmail.com> +Carl Lange <carl@flax.ie> +Jan Lehnardt <jan@apache.org> +Stuart P. Bentley <stuart@testtrack4.com> +Johan Sköld <johan@skold.cc> +Stuart Knightley <stuart@stuartk.com> +Niggler <nirk.niggler@gmail.com> +Paolo Fragomeni <paolo@async.ly> +Jaakko Manninen <jaakko@rocketpack.fi> +Luke Arduini <luke.arduini@gmail.com> +Larz Conwell <larz@larz-laptop.(none)> +Marcel Klehr <mklehr@gmx.net> +Robert Kowalski <rok@kowalski.gd> +Forbes Lindesay <forbes@lindesay.co.uk> +Vaz Allen <vaz@tryptid.com> +Jake Verbaten <raynos2@gmail.com> +Schabse Laks <Dev@SLaks.net> +Florian Margaine <florian@margaine.com> +Johan Nordberg <its@johan-nordberg.com> +Ian Babrou <ibobrik@gmail.com> +Di Wu <dwu@palantir.com> +Mathias Bynens <mathias@qiwi.be> +Matt McClure <matt.mcclure@mapmyfitness.com> +Matt Lunn <matt@mattlunn.me.uk> +Alexey Kreschuk <akrsch@gmail.com> +elisee <elisee@sparklin.org> +Robert Gieseke <robert.gieseke@gmail.com> +François Frisch <francoisfrisch@gmail.com> +Trevor Burnham <tburnham@hubspot.com> +Alan Shaw <alan@freestyle-developments.co.uk> +TJ Holowaychuk <tj@vision-media.ca> +Nicholas Kinsey <pyro@feisty.io> +Paulo Cesar <pauloc062@gmail.com> +Elan Shanker <elan.shanker@gmail.com> +Jon Spencer <jon@jonspencer.ca> +Jason Diamond <jason@diamond.name> +Maximilian Antoni <mail@maxantoni.de> +Thom Blake <tblake@brightroll.com> +Jess Martin <jessmartin@gmail.com> +Spain Train <michael.spainhower@opower.com> +Alex Rodionov <p0deje@gmail.com> +Matt Colyer <matt@colyer.name> +Evan You <yyx990803@gmail.com> +bitspill <bitspill+github@bitspill.net> +Gabriel Falkenberg <gabriel.falkenberg@gmail.com> +Alexej Yaroshevich <alex@qfox.ru> +Quim Calpe <quim@kalpe.com> +Steve Mason <stevem@brandwatch.com> +Wil Moore III <wil.moore@wilmoore.com> +Sergey Belov <peimei@ya.ru> +Tom Huang <hzlhu.dargon@gmail.com> +CamilleM <camille.moulin@alterway.fr> +Sébastien Santoro <dereckson@espace-win.org> +Evan Lucas <evan@btc.com> +Quinn Slack <qslack@qslack.com> +Alex Kocharin <alex@kocharin.ru> +Daniel Santiago <daniel.santiago@highlevelwebs.com> +Denis Gladkikh <outcoldman@gmail.com> +Andrew Horton <andrew.j.horton@gmail.com> +Zeke Sikelianos <zeke@sikelianos.com> +Dylan Greene <dylang@gmail.com> +Franck Cuny <franck.cuny@gmail.com> +Yeonghoon Park <sola92@gmail.com> +Rafael de Oleza <rafa@spotify.com> +Mikola Lysenko <mikolalysenko@gmail.com> +Yazhong Liu <yorkiefixer@gmail.com> +Neil Gentleman <ngentleman@gmail.com> +Kris Kowal <kris.kowal@cixar.com> +Alex Gorbatchev <alex.gorbatchev@gmail.com> +Shawn Wildermuth <shawn@wildermuth.com> +Wesley de Souza <wesleywex@gmail.com> +yoyoyogi <yogesh.k@gmail.com> +J. Tangelder <j.tangelder@gmail.com> +Jean Lauliac <jean@lauliac.com> +Andrey Kislyuk <kislyuk@gmail.com> +Thorsten Lorenz <thlorenz@gmx.de> +Julian Gruber <julian@juliangruber.com> +Benjamin Coe <bencoe@gmail.com> +Alex Ford <Alex.Ford@CodeTunnel.com> +Matt Hickford <matt.hickford@gmail.com> +Sean McGivern <sean.mcgivern@rightscale.com> +C J Silverio <ceejceej@gmail.com> +Robin Tweedie <robin@songkick.com> +Miroslav Bajtoš <miroslav@strongloop.com> +David Glasser <glasser@davidglasser.net> +Gianluca Casati <casati_gianluca@yahoo.it> +Forrest L Norvell <ogd@aoaioxxysz.net> +Karsten Tinnefeld <k.tinnefeld@googlemail.com> +Bryan Burgers <bryan@burgers.io> +David Beitey <david@davidjb.com> +Evan You <yyou@google.com> +Zach Pomerantz <zmp@umich.edu> +Chris Williams <cwilliams88@gmail.com> +sudodoki <smd.deluzion@gmail.com> +Mick Thompson <dthompson@gmail.com> +Felix Rabe <felix@rabe.io> +Michael Hayes <michael@hayes.io> +Chris Dickinson <christopher.s.dickinson@gmail.com> +Bradley Meck <bradley.meck@gmail.com> +GeJ <geraud@gcu.info> +Andrew Terris <atterris@gmail.com> +Michael Nisi <michael.nisi@gmail.com> +fengmk2 <fengmk2@gmail.com> +Adam Meadows <adam.meadows@gmail.com> +Chulki Lee <chulki.lee@gmail.com> +不四 <busi.hyy@taobao.com> +dead_horse <dead_horse@qq.com> +Kenan Yildirim <kenan@kenany.me> +Laurie Voss <git@seldo.com> +Rebecca Turner <me@re-becca.org> +Hunter Loftis <hunter@hunterloftis.com> +Peter Richardson <github@zoomy.net> +Jussi Kalliokoski <jussi.kalliokoski@gmail.com> +Filip Weiss <me@fiws.net> +Timo Weiß <timoweiss@Timo-MBP.local> +Christopher Hiller <chiller@badwing.com> +Jérémy Lal <kapouer@melix.org> +Anders Janmyr <anders@janmyr.com> +Chris Meyers <chris.meyers.fsu@gmail.com> +Ludwig Magnusson <ludwig@mediatool.com> +Wout Mertens <Wout.Mertens@gmail.com> +Nick Santos <nick@medium.com> +Terin Stock <terinjokes@gmail.com> +Faiq Raza <faiqrazarizvi@gmail.com> +Thomas Torp <thomas@erupt.no> +Sam Mikes <smikes@cubane.com> +Mat Tyndall <mat.tyndall@gmail.com> +Tauren Mills <tauren@sportzing.com> +Ron Martinez <ramartin.net@gmail.com> +Kazuhito Hokamura <k.hokamura@gmail.com> +Tristan Davies <github@tristan.io> +David Volm <david@volminator.com> +Lin Clark <lin.w.clark@gmail.com> +Ben Page <bpage@dewalch.com> +Jeff Jo <jeffjo@squareup.com> +martinvd <martinvdpub@gmail.com> +Mark J. Titorenko <nospam-github.com@titorenko.net> +Oddur Sigurdsson <oddurs@gmail.com> +Eric Mill <eric@konklone.com> +Gabriel Barros <descartavel1@gmail.com> +KevinSheedy <kevinsheedy@gmail.com> +Aleksey Smolenchuk <aleksey@uber.com> +Ed Morley <emorley@mozilla.com> +Blaine Bublitz <blaine@iceddev.com> +Andrey Fedorov <anfedorov@gmail.com> +Daijiro Wachi <daijiro.wachi@gmail.com> +Luc Thevenard <lucthevenard@gmail.com> +Aria Stewart <aredridel@nbtsc.org> +Charlie Rudolph <charles.w.rudolph@gmail.com> +Vladimir Rutsky <rutsky@users.noreply.github.com> +Isaac Murchie <isaac@saucelabs.com> +Marcin Wosinek <marcin.wosinek@gmail.com> +David Marr <davemarr@gmail.com> +Bryan English <bryan@bryanenglish.com> +Anthony Zotti <amZotti@users.noreply.github.com> +Karl Horky <karl.horky@gmail.com> +Jordan Harband <ljharb@gmail.com> +Guðlaugur Stefán Egilsson <gulli@kolibri.is> +Helge Skogly Holm <helge.holm@gmail.com> +Peter A. Shevtsov <petr.shevtsov@gmail.com> +Alain Kalker <a.c.kalker@gmail.com> +Bryant Williams <b.n.williams@gmail.com> +Jonas Weber <github@jonasw.de> +Tim Whidden <twhid@twhid.com> +Andreas <functino@users.noreply.github.com> +Karolis Narkevicius <karolis.n@gmail.com> +Adrian Lynch <adi_ady_ade@hotmail.com> +Richard Littauer <richard.littauer@gmail.com> +Oli Evans <oli@zilla.org.uk> +Matt Brennan <mattyb1000@gmail.com> +Jeff Barczewski <jeff.barczewski@gmail.com> +Danny Fritz <dannyfritz@gmail.com> +Takaya Kobayashi <jigsaw@live.jp> +Ra'Shaun Stovall <rashaunstovall@gmail.com> +Julien Meddah <julien.meddah@deveryware.com> +Michiel Sikma <michiel@wedemandhtml.com> +Jakob Krigovsky <jakob.krigovsky@gmail.com> +Charmander <~@charmander.me> +Erik Wienhold <git@ewie.name> +James Butler <james.butler@sandfox.co.uk> +Kevin Kragenbrink <kevin@gaikai.com> +Arnaud Rinquin <rinquin.arnaud@gmail.com> +Mike MacCana <mike.maccana@gmail.com> +Antti Mattila <anttti@fastmail.fm> +laiso <laiso@lai.so> +Matt Zorn <zornme@gmail.com> +Kyle Mitchell <kyle@kemitchell.com> +Jeremiah Senkpiel <fishrock123@rocketmail.com> +Michael Klein <mischkl@users.noreply.github.com> +Simen Bekkhus <sbekkhus91@gmail.com> +Victor <victor.shih@gmail.com> +thefourtheye <thechargingvolcano@gmail.com> +Clay Carpenter <claycarpenter@gmail.com> +bangbang93 <bangbang93@163.com> +Nick Malaguti <nmalaguti@palantir.com> +Cedric Nelson <cedric.nelson@gmail.com> +Kat Marchán <kzm@sykosomatic.org> +Andrew <talktome@aboutandrew.co.uk> +Eduardo Pinho <enet4mikeenet@gmail.com> +Rachel Hutchison <rhutchix@intel.com> +Ryan Temple <ryantemple145@gmail.com> +Eugene Sharygin <eush77@gmail.com> +James Talmage <james@talmage.io> +jane arc <jane@uber.com> +Joseph Dykstra <josephdykstra@gmail.com> +Andrew Crites <ajcrites@gmail.com> +Joshua Egan <josh-egan@users.noreply.github.com> +Carlos Alberto <euprogramador@gmail.com> +Thomas Cort <thomasc@ssimicro.com> +Thaddee Tyl <thaddee.tyl@gmail.com> +Steve Klabnik <steve@steveklabnik.com> +Andrew Murray <radarhere@gmail.com> +Stephan Bönnemann <stephan@excellenteasy.com> +Kyle M. Tarplee <kyle.tarplee@numerica.us> +Derek Peterson <derekpetey@gmail.com> +Greg Whiteley <greg.whiteley@atomos.com> +murgatroid99 <mlumish@google.com> +Marcin Cieslak <saper@saper.info> +João Reis <reis@janeasystems.com> +Matthew Hasbach <hasbach.git@gmail.com> +Jon Hall <jon_hall@outlook.com> +Anna Henningsen <sqrt@entless.org> +James Treworgy <jamietre@gmail.com> +James Hartig <james@levenlabs.com> +Stephanie Snopek <stephaniesnopek@gmail.com> +Kent C. Dodds <kent@doddsfamily.us> +Aaron Krause <aaronjkrause@gmail.com> +Daniel K O'Leary <daniel@dko.io> +fscherwi <fscherwi@users.noreply.github.com> +Thomas Reggi <thomas@reggi.com> +Thomas Michael McTiernan <thomasmctiernan@gmail.com> +Jason Kurian <JaKXz@users.noreply.github.com> +Sebastiaan Deckers <seb@ninja.sg> +lady3bean <lady3bean@users.noreply.github.com> +Tomi Carr <TaMe3971@users.noreply.github.com> +Juan Caicedo <retiredcanadianpoet@gmail.com> +Ashley Williams <ashley@npmjs.com> +Andrew Marcinkevičius <andrew.web@ifdattic.com> +Jorrit Schippers <jorrit@ncode.nl> +Alex Lukin <alex.lukin@softgrad.com> +Aria Stewart <aredridel@dinhe.net> +Tiago Rodrigues <tmcrodrigues@gmail.com> +Tim <tim-github@baverstock.org.uk> +Nick Williams <WickyNilliams@users.noreply.github.com> +Louis Larry <louis.larry@gmail.com> +Ben Gotow <bengotow@gmail.com> +Jakub Gieryluk <jakub.g.opensource@gmail.com> +Kevin Lorenz <mail@kevinlorenz.com> +Martin von Gagern <Martin.vGagern@gmx.net> +Eymen Gunay <eymen@egunay.com> +Martin Ek <mail@ekmartin.com> +Rafał Pocztarski <r.pocztarski@gmail.com> +Mark Reeder <mreeder@uber.com> +Chris Rebert <github@chrisrebert.com> +Scott Addie <tobias.addie@gmail.com> +Jeff McMahan <jeffrey.lee.mcmahan@gmail.com> +Tim Krins <timkrins@gmail.com> +Hal Henke <halhenke@gmail.com> +Julian Simioni <julian@simioni.org> +Jimb Esser <jimb@yahoo-inc.com> +Alexis Campailla <alexis@janeasystems.com> +Chris Chua <chris.sirhc@gmail.com> +Beau Gunderson <beau@beaugunderson.com> +Dave Galbraith <dave@jut.io> +s100 <shughes1@uk.ibm.com> +Sergey Simonchik <sergey.simonchik@jetbrains.com> +Vanja Radovanović <elvanja@gmail.com> +Jonathan Persson <persson.jonathan@gmail.com> +Vedat Mahir YILMAZ <mahir@vedatmahir.com> +Samuel Reed <samuel.trace.reed@gmail.com> +Rafał Legiędź <rafal.legiedz@gmail.com> +Jan Schär <jscissr@gmail.com> +Xcat Liu <xcatliu@gmail.com> +harryh <Aourin@users.noreply.github.com> +Prayag Verma <prayag.verma@gmail.com> +Neil Kistner <neil.kistner@gmail.com> +Zoujie Wzj <zoujie.wzj@alibaba-inc.com> +Ryan Hendrickson <ryan.hendrickson@alum.mit.edu> +Arturo Coronel <aoitsu3@gmail.com> +Hutson Betts <hbetts@factset.com> +Lewis Cowper <lewis.cowper@googlemail.com> +Adam Byrne <misterbyrne@gmail.com> +Ifeanyi Oraelosi <ifeanyioraelosi@gmail.com> +Robert Ludwig <rob.ludwig@rideamigos.com> +Chris Warren <chris@ixalon.net> +Scott Plumlee <scott@plumlee.org> +Daniel Pedersen <daniel@scandinav.se> +rhgb <kaiserdaemon@gmail.com> +doug.wade <doug.wade@redfin.com> +Zac <zdoege@gm.slc.edu> +GriffinSchneider <griffinschneider@gmail.com> +Andres Kalle <mjomble@gmail.com> +thefourtheye <thefourtheye@users.noreply.github.com> +Yael <yaelz@users.noreply.github.com> +Yann Odeyer <yann@odeyer.com> +James Monger <jameskmonger@hotmail.co.uk> +Thomas Hallock <thomas@1stdibs.com> +Paul Irish <paul.irish@gmail.com> +Paul O'Leary McCann <polm@dampfkraft.com> +Francis Gulotta <wizard@roborooter.com> +Felix Rieseberg <felix@felixrieseberg.com> +Glen Mailer <glenjamin@gmail.com> +Federico Brigante <bfred-it@users.noreply.github.com> +Steve Mao <maochenyan@gmail.com> +Anna Henningsen <anna@addaleax.net> +Rachel Evans <git@rve.org.uk> +Sam Minnee <sam@silverstripe.com> +Zirak <zirakertan@gmail.com> +Daniel Lupu <lupu.daniel.f@gmail.com> +Gianluca Casati <fibo@users.noreply.github.com> +André Herculano <andresilveirah@gmail.com> +Wyatt Preul <wpreul@gmail.com> +Myles Borins <mborins@us.ibm.com> +Elliot Lee <github.public@intelliot.com> +Dmitry Kirilyuk <gk.joker@gmail.com> +Aaron Tribou <aaron.tribou@gmail.com> +Tapani Moilanen <moilanen.tapani@gmail.com> +Han Seoul-Oh <laughinghan@gmail.com> +Aleksey Shvayka <shvaikalesh@gmail.com> diff --git a/bin/nodejs6.7.0/node_modules/npm/CHANGELOG.md b/bin/nodejs6.7.0/node_modules/npm/CHANGELOG.md new file mode 100644 index 00000000..e7e680de --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/CHANGELOG.md @@ -0,0 +1,4474 @@ +### v3.10.3 (2016-06-23) + +Given that we had not one, but two updates to our RC this past week, it +should come as no surprise that this week's full release is a bit +lighter. We have some documentation patches and a couple of bug fixes via +dependency updates. + +If you haven't yet checked out last week's release, +[v3.10.0](https://github.com/npm/npm/releases/tag/v3.10.0) +and the two follow up releases +[v3.10.1](https://github.com/npm/npm/releases/tag/v3.10.1) +and +[v3.10.2](https://github.com/npm/npm/releases/tag/v3.10.2), +you really should do so. They're the most important releases we've had in +quite a while, fixing a bunch of critical bugs (including an issue +impacting publishing with Node.js 6.x) and of course, bringing in the new +and improved progress bar. + +#### BUM SYMLINKS BURN NO MORE + +There's been a bug lurking where broken symlinks in your `node_modules` +folder could cause all manner of mischief, from crashes to empty `npm ls` +results. The intrepid [@watilde](https://github.com/watilde) tracked this +down for us. + +This addresses the root cause of the outdated crasher we protected +against earlier this week in +[#13115](https://github.com/npm/npm/issues/13115). + +This also fixes [#9564](https://github.com/npm/npm/issues/9564), the +problem where a bad symlink in your global modules would result in an +empty result when you ran `npm ls -g`. + +This ALSO likely fixes numerous "Missing argument #1" errors. (But surely +not all of them as that's actually just a generic arity and +type-validation failure.) + +* [`ca92ac4`](https://github.com/npm/npm/commit/ca92ac455b841a708dd89262ff88d503b125d717) + [npm/read-package-tree#6](https://github.com/npm/read-package-tree/pull/6) + `read-package-tree@5.1.5`: + Make bad symlinks be non-fatal errors when reading the tree off disk. + ([@watilde](https://github.com/watilde)) + +#### BETTER UNICODE DETECTION + +* [`6c3f7f0`](https://github.com/npm/npm/commit/6c3f7f043f09fc2aa19ffd3f956787635fa6f4d0) + `has-unicode@2.0.1`: + Fix unicode detection on a number of Linux distributions. + ([@Darkhogg](https://github.com/Darkhogg)) ([@gagern](https://github.com/gagern)) + + +#### DOCUMENTATION FIXES + +* [`b9243ee`](https://github.com/npm/npm/commit/b9243ee60a3d60505c2502dc8633811b42c8aaea) + [#13127](https://github.com/npm/npm/pull/13127) + Remove extra backtick from `npm ls` documentation. + ([@shvaikalesh](https://github.com/shvaikalesh)) +* [`e05c0c2`](https://github.com/npm/npm/commit/e05c0c243cc702f9c392c001f668a90b57eaeb0e) + [iarna/has-unicode#3](https://github.com/iarna/has-unicode/pull/3) + [iarna/has-unicode#4](https://github.com/iarna/has-unicode/pull/4) + [#13084](https://github.com/npm/npm/pull/13084) + Correct changelog entry for shrinkwrap lifecycle order. + ([@SimenB](https://github.com/SimenB)) +* [`823994f`](https://github.com/npm/npm/commit/823994f100a0e59e1dd109e312811f971968ec75) + [#13080](https://github.com/npm/npm/pull/13080) + Describe using `npm pack` to see a dry run of publication results in + the `npm publish` documentation. + ([@laughinghan](https://github.com/laughinghan)) + +#### DEPENDENCY UPDATES + +* [`e44d2db`](https://github.com/npm/npm/commit/e44d2db1ad0d860ca08e99c81135bd399fb733b1) + `aproba@1.0.4`: Documentation updates and minor refactoring. + ([@iarna](https://github.com/iarna)) + +### v3.10.2 (2016-06-17): + +This is a quick hotfix release with two small bug fixes. First, there was +an issue where the new progress bar would overwrite interactive prompts, +that is, those found in `npm login` and `npm init`. Second, if the +directory you were running `npm outdated` on was a bad link or otherwise had +unrecoverable errors then npm would crash instead of printing the error. + +* [`fbefb86`](https://github.com/npm/npm/commit/fbefb8675b26320b295f481b4872ce99f0180807) + [`7779e9f`](https://github.com/npm/npm/commit/7779e9fb9430f6547532c67f2471864d62bbd5bc) + [#13105](https://github.com/npm/npm/issues/13105) + Disable progress bar in `adduser` and `init`. +* [`6a33b2c`](https://github.com/npm/npm/commit/6a33b2c13f637a41e25cd0339925bc430b50358a) + [#13115](https://github.com/npm/npm/issues/13115) + Ensure that errors reading the package tree for `outdated` does not result + in crashs. + ([@iarna](https://github.com/iarna)) + +### v3.10.1 (2016-06-17): + +There are two very important bug fixes and one long-awaited (and signifcant!) +deprecation in this hotfix release. [Hold on.](http://butt.holdings/) + +#### *WHOA* + +When Node.js 6.0.0 was released, the CLI team noticed an alarming upsurge in +bugs related to important files (like `README.md`) not being included in +published packages. The new bugs looked much like +[#5082](https://github.com/npm/npm/issues/5082), which had been around in one +form or another since April, 2014. #5082 used to be a very rare (and obnoxious) +bug that the CLI team hadn't had much luck reproducing, and we'd basically +marked it down as a race condition that arose on machines using slow and / or +rotating-media-based hard drives. + +Under 6.0.0, the behavior was reliable enough to be nearly deterministic, and +made it very difficult for publishers using `.npmignore` files in combination +with `"files"` stanzas in `package.json` to get their packages onto the +registry without one or more files missing from the packed tarball. The entire +saga is contained within [the issue](https://github.com/npm/npm/issues/5082), +but the summary is that an improvement to the performance of +[`fs.realpath()`](https://nodejs.org/api/fs.html#fs_fs_realpath_path_options_callback) +made it much more likely that the packing code would lose the race. + +Fixing this has proven to be very difficult, in part because the code used by +npm to produce package tarballs is more complicated than, strictly speaking, it +needs to be. [**@evanlucas**](https://github.com/evanlucas) contributed [a +patch](https://github.com/npm/fstream/pull/50) that passed the tests in a +[special test suite](https://github.com/othiym23/eliminate-5082) that I +([**@othiym23**](https://github.com/othiym23)) created (with help from +[**@addaleax**](https://github.com/addaleax)), but only _after_ we'd released +the fixed version of that package did we learn that it actually made the +problem _worse_ in other situations in npm proper. Eventually, +[**@rvagg**](https://github.com/rvagg) put together a more durable fix that +appears to completely address the errant behavior under Node.js 6.0.0. That's +the patch included in this release. Everybody should chip in for redback +insurance for Rod and his family; he's done the community a huge favor. + +Does this mean the long (2+ year) saga of #5082 is now over? At this point, I'm +going to quote from my latest summary on the issue: + +> The CLI team (mostly me, with input from the rest of the team) has decided that +> the overall complexity of the interaction between `fstream`, `fstream-ignore`, +> `fstream-npm`, and `node-tar` has grown more convoluted than the team is +> comfortable (maybe even capable of) supporting. +> +> - While I believe that @rvagg's (very targeted) fix addresses _this_ issue, I +> would be shocked if there aren't other race conditions in npm's packing +> logic. I've already identified a couple other places in the code that are +> most likely race conditions, even if they're harder to trigger than the +> current one. +> - The way that dependency bundling is integrated leads to a situation in +> which a bunch of logic is duplicated between `fstream-npm` and +> `lib/utils/tar.js` in npm itself, and the way `fstream`'s extension +> mechanism works makes this difficult to clean up. This caused a nasty +> regression ([#13088](https://github.com/npm/fstream/pull/50), see below) as +> of ~`npm@3.8.7` where the dependencies of `bundledDependencies` were no +> longer being included in the built package tarballs. +> - The interaction between `.npmignore`, `.gitignore`, and `files` is hopelessly +> complicated, scattered in many places throughout the code. We've been +> discussing [making the ignores and includes logic clearer and more +> predictable](https://github.com/npm/npm/wiki/Files-and-Ignores), and the +> current code fights our efforts to clean that up. +> +> So, our intention is still to replace `fstream`, `fstream-ignore`, and +> `fstream-npm` with something much simpler and purpose-built. There's no real +> reason to have a stream abstraction here when a simple recursive-descent +> filesystem visitor and a synchronous function that can answer whether a given +> path should be included in the packed tarball would do the job adequately. +> +> What's not yet clear is whether we'll need to replace `node-tar` in the +> process. `node-tar` is a very robust implementation of tar (it handles, like, +> everything), and it also includes some very important tweaks to prevent several +> classes of security exploits involving maliciously crafted packages. However, +> its packing API involves passing in an `fstream` instance, so we'd either need +> to produce something that follows enough of `fstream`'s contract for `node-tar` +> to keep working, or swap `node-tar` out for something like `tar-stream` (and +> then ensuring that our use of `tar-stream` is secure, which could involve +> security patches for either npm or `tar-stream`). + +The testing and review of `fstream@1.0.10` that the team has done leads us to +believe that this bug is fixed, but I'm feeling more than a little paranoid +about fstream now, so it's important that people keep a close eye on their +publishes for a while and let us know immediately if they notice any +irregularities. + +* [`8802f6c`](https://github.com/npm/npm/commit/8802f6c152ea35cb9e5269c077c3a2f9df411afc) + [#5082](https://github.com/npm/npm/issues/5082) `fstream@1.0.10`: Ensure that + entries are collected after a paused stream resumes. + ([@rvagg](https://github.com/rvagg)) +* [`c189723`](https://github.com/npm/npm/commit/c189723110497a17dac3b0596f2916deeed93ee7) + [#5082](https://github.com/npm/npm/issues/5082) Remove the warning introduced + in `npm@3.10.0`, because it should no longer be necessary. + ([@othiym23](https://github.com/othiym23)) + +#### *ERK* + +Because the interaction between `fstream`, `fstream-ignore`, `fsream-npm`, and +`node-tar` is so complex, it's proven difficult to add support for npm features +like `bundledDependencies` without duplicating some logic within npm's code +base. While [fixing a completely unrelated +bug](https://github.com/npm/npm/issues/9642), we "cleaned up" some of this +seemingly duplicated code, and in the process removed the code that ensured +that the dependencies of `bundledDependencies` are themselves bundled. We've +brought that code back into the code base (without reopening #9642), and added +a test to ensure that this regression can't recur. + +* [`1b6ceca`](https://github.com/npm/npm/commit/1b6ceca32fc81ca7cc7ac2eb7d11f687e6f87f26) + [#13088](https://github.com/npm/npm/issues/13088) Partially restore npm's own + version of the `fstream-npm` function `applyIgnores` to ensure that the + dependencies of `bundledDependencies` are included in published packages. + ([@iarna](https://github.com/iarna)) + +#### GOODBYE, FAITHFUL FRIEND + +At NodeConf Adventure 2016 (RIP in peace, Mikeal Rogers's NodeConf!), the CLI +team had an opportunity to talk to representatives from some of the larger +companies that we knew were still using Node.js 0.8 in production. After asking +them whether they were still using 0.8, we got back blank stares and questions +like, "0.8? You mean, from four years ago?" After establishing that being able +to run npm in their legacy environments was no longer necessary, the CLI team +made the decision to drop support for 0.8. (Faithful observers of our [team +meetings](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+npm+cli+team+meeting+) +will have known this was the plan for NodeConf since the beginning of 2016.) + +In practice, this means only what's in the commit below: we've removed 0.8 from +our continuous integration test matrix below, and will no longer be habitually +testing changes under Node 0.8. We may also give ourselves permission to use +`setImmediate()` in test code. However, since the project still supports +Node.js 0.10 and 0.12, it's unlikely that patches that rely on ES 2015 +functionality will land anytime soon. + +Looking forward, the team's current plan is to drop support for Node.js 0.10 +when its LTS maintenace window expires in October, 2016, and 0.12 when its +maintenance / LTS window ends at the end of 2016. We will also drop support for +Node.js 5.x when Node.js 6 becomes LTS and Node.js 7 is released, also in the +October-December 2016 timeframe. + +(Confused about Node.js's LTS policy? [Don't +be!](https://github.com/nodejs/LTS) If you look at [this +diagram](https://github.com/nodejs/LTS/blob/ce364a94b0e0619eba570cd57be396573e1ef889/schedule.png), +it should make all of the preceding clear.) + +If, in practice, this doesn't work with distribution packagers or other +community stakeholders responsible for packaging and distributing Node.js and +npm, please reach out to us. Aligning the npm CLI's LTS policy with Node's +helps everybody minimize the amount of work they need to do, and since all of +our teams are small and very busy, this is somewhere between a necessity and +non-negotiable. + +* [`d6afd5f`](https://github.com/npm/npm/commit/d6afd5ffb1b19e5d94aeee666afcb8adaced58db) + Remove 0.8 from the Node.js testing matrix, and reorder to match real-world + priority, with comments. ([@othiym23](https://github.com/othiym23)) + +### v3.10.0 (2016-06-16): + +Do we have a release for you! We have our first new lifecycle since +`version`, a new progress bar and a bunch of bug fixes. +[I'm](https://github.com/iarna) really excited about this release, let me +tell you!! + +#### DANGER: PUBLISHING ON NODE 6.0.0 + +Publishing and packing are buggy under Node versions greater than 6.0.0. +Please use Node.js LTS (4.4.x) to publish packages. See +[#5082](https://github.com/npm/npm/issues/5082) for details and current +status. + +* [`4e52cef`](https://github.com/npm/npm/commit/4e52cef3d4170c8abab98149666ec599f8363233) + [#13077](https://github.com/npm/npm/pull/13077) + Warn when using Node 6+. + ([@othiym23](https://github.com/othiym23)) + +#### NEW LIFECYCLE SCRIPT: `shrinkwrap` + +* [`e8c80f2`](https://github.com/npm/npm/commit/e8c80f20bfd5d1618e85dbab41660d6f3e5ce405) + [#10744](https://github.com/npm/npm/issues/10744) + You can now add `preshrinkwrap`, `shrinkwrap` and `postshrinkwrap` to your `package.json` + scripts section. They are run when you run `npm shrinkwrap` or `npm install --save` with + an `npm-shrinkwrap.json` present in your module directory. + + `preshrinkwrap` and `shrinkwrap` is run prior to generating the new `npm-shrinkwrap.json` + and `postshrinkwrap` is run after. + ([@SimenB](https://github.com/SimenB)) + +#### NEW PROGRESS BAR + +![Install with new progress bar](http://shared.by.re-becca.org/misc-images/new-gauge-color.gif) + +We have a new progress bar and a bunch of related improvements! + +##### BLOCKING BLOCKING + +**!!WARNING!!** As a part of this change we now explicitly set +`process.stdout` and `process.stderr` to be _blocking_ if they are ttys, +using [set-blocking](https://www.npmjs.com/package/set-blocking). This is +necessary to ensure that we can fully erase the progress bar before we start +writing other things out to the console. + +Prior to Node.js 6.0.0, they were already blocking on Windows, and MacOS. +Meanwhile, on Linux they were always non-blocking but had large (64kb) +buffers, which largely made this a non-issue there. Starting with Node.js +6.0.0 they became non-blocking on MacOS and that caused some unexpected +issues (see [nodejs/node#6456](https://github.com/nodejs/node/issues/6456)). + +If you are a Linux user, it's plausible that this might have a performance +impact if your terminal can't keep up with output rate. If you experience +this, we want to know! Please [file an +issue](https://github.com/npm/npm/issues/new) at our issue tracker. + +##### BETTER LAYOUT + +Let's start by talking about what goes into the new progress bar: + +``` +⸨░░░░░░░░░░⠂⠂⠂⠂⠂⠂⠂⠂⸩ ⠹ loadExtraneous: verb afterAdd /Users/rebecca/.npm/null/0.0.0/package/package.json written + ↑‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ ↑ ‾‾‾‾‾‾‾‾‾↑‾‾‾‾ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾↑‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + percent complete spinner current thing we're doing most recent log line +``` + +The _spinner_ is intended as an activity indicator–it moves whenever +npm sends something to its logs. It also spins at a constant speed while +waiting on the network. + +The _current thing we're doing_ relates to how we track how much work has +been done. It's the name of the unit of work we most recently started or +completed some of. Sometimes these names are more obvious than others and +that's something we'll look at improving over time. + +And finally, the _most recent log line_ is exactly that, it's the most +recent line that you would have seen if you were running with +`--loglevel=silly` or were watching the `npm-debug.log`. These are written +to be useful to the npm developers above all else, so they may sometimes be +a little cryptic. + +* [`6789978`](https://github.com/npm/npm/commit/6789978ab0713f67928177a9109fed43953ccbda) + [#13075](https://github.com/npm/npm/pull/13075) + `npmlog@3.1.2`: Update to the latest npmlog, which includes the new and + improved progress bar layout. + ([@iarna](https://github.com/iarna)) + +##### MORE PERFORMANT + +The underlying code for the progress bar was rewritten, in part with +performance in mind. Previously whenever you updated the progress bar it +would check an internal variable for how long it had been since the last +update and if it had been long enough, it would print out what you gave it. +With the new progress bar we do updates at a fixed interval (with +`setInterval`) and "updating" the progress bar just updates some variables +that will be used when the next tick of the progress bar happens. Currently +progress bar updates happen every 50ms, although that's open to tuning. + +##### WIDE(R) COMPATIBILITY + +I spent a lot of time working our Unicode support. There were a few issues +that plagued us: + +Previously one of the characters we used was _ambiguous width_ which means +that it was possible to configure your terminal to display it as _full +width_. If you did this, the output would be broken because we assumed it +was a _half width_ character. We no longer use any of these characters. + +Previously, we defaulted to using Unicode on Windows. This isn't a safe +assumption, however, as folks in non-US locales often use other code pages +for their terminals. Windows doesn't provide* any facility available to +Node.js for determining the current code page, so we no longer try to use +Unicode on Windows. + +_\* The facilities it does provide are a command line tool and a windows +system call. The former isn't satisfactory for speed reasons and the latter +can't be accessed from a JS-only Node.js program._ + +##### FOR THE FUTURE: THEMES + +The new version of the progress bar library supports plugable themes. Adding +support to npm shouldn't be too difficult. The built in themes are: + +* `ASCII` – The fallback theme which is always available. +* `colorASCII` – Inverts the color of the completed portion of the progress + bar. The default on Windows and usually on Linux. (Color support is + determined by looking at the `TERM` environment variable.) +* `brailleSpinner` – A braille based spinner and other unicode enhancements. MacOS only. +* `colorBrailleSpinner` – The default on MacOS, a combination of the above two. + +##### LESS GARBLED OUTPUT + +As a part of landing this I've also taken the opportunity to more +systematically disable the progress bar prior to printing to `stdout` or +running external commands (in particular: git). This should ensure that the +progress bar doesn't get left on screen after something else prints +something. We also are now much more zealous about erasing the progress bar +on exit, so if you `Ctrl-C` out of an install we'll still cleanup the +progress bar. + +* [`63f153c`](https://github.com/npm/npm/commit/63f153c743f9354376bfb9dad42bd028a320fd1f) + [#13075](https://github.com/npm/npm/pull/13075) + Consistently make sure that the progress bar is hidden before we try to + write to stdout. + ([@iarna](https://github.com/iarna)) +* [`8da79fa`](https://github.com/npm/npm/commit/8da79fa60de4972dca406887623d4e430d1609a1) + [#13075](https://github.com/npm/npm/pull/13075) + Be more methodical about disabling progress bars before running external + commands. + ([@iarna](https://github.com/iarna)) + +#### REPLACE `process.nextTick` WITH `asap` ASAP + +* [`5873b56`](https://github.com/npm/npm/commit/5873b56cb315437dfe97e747811c0b9c297bfd38) + [`254ad7e`](https://github.com/npm/npm/commit/254ad7e38f978b81046d242297fe8b122bfb5852) + [#12754](https://github.com/npm/npm/issues/12754) + Use `asap` in preference over `process.nextTick` to avoid recursion warnings. + Under the hood `asap` uses `setImmediate` when available and falls back to + `process.nextTick` when it's not. Versions of node that don't support + `setImmediate` have a version of `process.nextTick` that actually behaves + like the current `setImmediate`. + ([@lxe](https://github.com/lxe)) + +#### FIXES AND REFACTORING + +Sometimes the installer would get it into its head that it could move or +remove things that it really shouldn't have. While the reproducers for this were +often a bit complicated (the core reproducer involved five symlinks(!)), it turns +out this is an easy scenario to end up in if your project has a bunch of small +modules and you're linking them while developing them. + +Fixing this ended up involving doing an important and overdue rewrite of how +the installer keeps track of (and interrogates) the relationships between +modules. This likely fixes other related bugs, and in the coming weeks +we'll verify and close them as we find them. There are a whole slew of +commits related to this rewrite, and if you'd like to learn more check +out the PR where I describe what I did in detail: [#12775](https://github.com/npm/npm/pull/12775) + +* [`8f3e111`](https://github.com/npm/npm/commit/8f3e111fdd2ce7824864f77b04e5206bdaf961a1) + [`c0b0ed1`](https://github.com/npm/npm/commit/c0b0ed1e9945c01b2e68bf22af3fe4005aa4bcd4) + [#10800](https://github.com/npm/npm/issues/10800) + Remove install pruning stage–this was obsoleted by making the installer keep + itself up to date as it goes along. This is NOT related to `npm prune`. + ([@iarna](https://github.com/iarna)) + +#### MAKE OUTDATED MORE WIDELY LEGIBLE + +* [`21c60e9`](https://github.com/npm/npm/commit/21c60e9bb56d47da17b79681f2142b3dcf4c804b) + [#12843](https://github.com/npm/npm/pull/12843) + In `npm outdated, stop coloring the _Location_ and _Package Type_ columns. + Previously they were colored dark gray, which was hard to read for some + users. + ([@tribou](https://github.com/tribou)) + +#### DOCUMENTATION UPDATE + +* [`eb0a72e`](https://github.com/npm/npm/commit/eb0a72eb95862c1d0d41a259d138ab601d538793) + [#12983](https://github.com/npm/npm/pull/12983) + Describe how to run the lifecycle scripts of dependencies. How you do + this changed with `npm` v2. + ([@Tapppi](https://github.com/Tapppi)) + +### DEPENDENCY UPDATES + +* [`da743dc`](https://github.com/npm/npm/commit/da743dc2153fed8baca3dada611b188f53ab5931) + `which@1.2.10`: + Fix bug where unnecessary special case path handling for Windows could + produce unexpected results on Unix systems. + ([@isaacs](https://github.com/isaacs)) +* [`4533bd5`](https://github.com/npm/npm/commit/4533bd501d54aeedfec3884f4fd54e8c2edd6020) + `npm-user-validate@0.1.4`: + Validate the length of usernames. + ([@aredridel](https://github.com/aredridel)) +* [`4a18922`](https://github.com/npm/npm/commit/4a18922e56f9dc902fbb4daa8f5fafa4a1b89376) + `glob@7.0.4`: + Fixes issues with Node 6 and "long or excessively symlink-looping paths". + ([@isaacs](https://github.com/isaacs)) +* [`257fe11`](https://github.com/npm/npm/commit/257fe11052987e5cfec2abdf52392dd95a6c6ef3) + `npm-package-arg@4.2.0`: + Add `escapedName` to the result. It is suitable for passing through to a + registry without further processing. + ([@nexdrew](https://github.com/nexdrew)) +* [`dda3ca7`](https://github.com/npm/npm/commit/dda3ca70f74879106589ef29e167c8b91ef5aa4c) + `wrappy@1.0.2` + ([@zkat](https://github.com/zkat)) +* [`25f1db5`](https://github.com/npm/npm/commit/25f1db504d0fd8c97211835f0027027fe95e0ef3) + `readable-stream@2.1.4` + ([@calvinmetcalf](https://github.com/calvinmetcalf)) +* [`9d64fe6`](https://github.com/npm/npm/commit/9d64fe676ebc6949c687ffb85bd93eca3137fc0d) + `abbrev@1.0.9` + ([@isaacs](https://github.com/isaacs)) + +### v3.9.6 (2016-06-02): + +#### SMALL OUTPUT TWEAK + +* [`0bdc9d1`](https://github.com/npm/npm/commit/0bdc9d13b73df07e63a58470ea001fda490e5869) + [#12879](https://github.com/npm/npm/pull/12879) + The usage output for npm commands was somehow under the impression that + the singular form of `aliases` is `aliase`. This has been corrected to show + `alias` instead. + ([@intelliot](https://github.com/intelliot)) + +#### DOC UPDATES + +* [`f771b49`](https://github.com/npm/npm/commit/f771b49f5d65bbef540c231fbfcca71cacdce4db) + [#12933](https://github.com/npm/npm/pull/12933) + Add `config.gypi` to list of files that are always ignored in the + `package.json` manpage. + ([@Jokero](https://github.com/Jokero)) + +#### DEPENDENCY UPDATES + +* [`61c1d9c`](https://github.com/npm/npm/commit/61c1d9cd4b2296bd41d55a5c58e35ca5f028b9bc) + [#12926](https://github.com/npm/npm/pull/12926) + Removed unused dependency `lodash.isarray`. + ([@mmalecki](https://github.com/mmalecki)) +* [`168ed28`](https://github.com/npm/npm/commit/168ed2834b2c6db8bb39f81baadc0bf275807328) + [#12926](https://github.com/npm/npm/pull/12926) + Removed unused dependency `lodash.keys`. + ([@mmalecki](https://github.com/mmalecki)) + +### v3.9.5 (2016-05-27): + +Just a quick point release. We had an issue where I (Kat) included the +`.nyc_output/` directory in `npm@3.9.3` and `npm@3.9.4`. The issue got reported +right after that second release +([`#12873`](https://github.com/npm/npm/issues/12873)), and now there's this +small point release that's there to fix the issue sooner. + +* [`f96aea0`](https://github.com/npm/npm/commit/f96aea085be981cdb59bd09f16da40717426f981) + [#12878](https://github.com/npm/npm/pull/12878) + Ignore `.nyc_output` to avoid an accidental publish or commit filled with + code coverage data. + ([@TheAlphaNerd](https://github.com/TheAlphaNerd)) + +### v3.9.4 (2016-05-26): + +Hey all! It's that time again! + +This week continues our current `big-bug` squashing push, although there's none +that are ready to release quite yet -- we're working on it! + +It's also worth noting that we're entering the main part of conference season, +so you can probably expect a bit of a dev slowdown as a lot of us wombats attend +or speak at the various conferences. Remember [npm.camp](npm.camp) is happening +in 2 months and the lineup is looking pretty great! Tickets are still on sale. +Come hang out with us! WOO FUN! 🎉😸 + +#### BUGFIX + +* [`cac0038`](https://github.com/npm/npm/commit/cac0038868b18295f9f299e762e20034f32a3e11) + [#12845](https://github.com/npm/npm/pull/12845) + Progress bar during tarball packing now prints `pack:packagename` instead of + `pack:[object Object]`. + ([@iarna](https://github.com/iarna)) + +#### DOC UPDATES + +* [`0b81622`](https://github.com/npm/npm/commit/0b816225c743c9203db5d92fb4dd3a9293833298) + [#12840](https://github.com/npm/npm/pull/12840) + Remove sexualized language from comment in code. + ([@geek](https://github.com/geek)) +* [`d6dff24`](https://github.com/npm/npm/commit/d6dff2481cb587c392f22afb893ac3136371a64c) + [#12802](https://github.com/npm/npm/pull/12802) + Small grammar fix in `cli/npm.md`. + ([@andresilveira](https://github.com/andresilveira)) +* [`cb38e0f`](https://github.com/npm/npm/commit/cb38e0fff82a6c1c110026b95b07a8c32e27ec01) + [#12782](https://github.com/npm/npm/pull/12782) + Documents that `NOTICE` files started getting included after + [npm/fstream-npm#17](https://github.com/npm/fstream-npm/pull/17). + ([@SimenB](https://github.com/SimenB)) +* [`70a3ae4`](https://github.com/npm/npm/commit/70a3ae4d4ec76b3ec51f00bf5261f1147829f9fe) + [#12776](https://github.com/npm/npm/pull/12776) + `npm run-script` used to have a `<pkg>` argument that allowed you to target + specific packages' scripts. This was removed as one of the breaking changes + for `npm@2`. + This patch removes a mention of that argument, which really doesn't exist + anymore. + ([@fibo](https://github.com/fibo)) + +#### DEP UPDATES + +* [`4a4470d`](https://github.com/npm/npm/commit/4a4470ddd1d9b0b62cb94f3bff5ab6b8e6db527a) + `aproba@1.0.3` + ([@iarna](https://github.com/iarna)) + +#### TEST IMPROVEMENTS + +So it turns out, `t.comment` in `tap` is actually pretty nice! +There's also a couple other test improvements by Rebecca landing here. + +* [`9fd04dd`](https://github.com/npm/npm/commit/9fd04dd6be493465d7ac5f14dd9328e66069c1bf) + [#12851](https://github.com/npm/npm/pull/12851) + Rewrite `shrinkwrap-prod-dependency-also` test to use `common.npm` + ([@iarna](https://github.com/iarna)) +* [`3bc4a8e`](https://github.com/npm/npm/commit/3bc4a8ee58cb0e0adc84b4f135330f2b1e20d992) + [#12851](https://github.com/npm/npm/pull/12851) + Clean up `rm-linked` test. + ([@iarna](https://github.com/iarna)) +* [`bf7f7f2`](https://github.com/npm/npm/commit/bf7f7f273a794f7573bbbc84b1c216fdcd9e0ef9) + [#12851](https://github.com/npm/npm/pull/12851) + Clean up `outdated-symlink` test. + ([@iarna](https://github.com/iarna)) +* [`ca0baa4`](https://github.com/npm/npm/commit/ca0baa4dac85b1df4e26ef0c73d39314ca6858ca) + [#12851](https://github.com/npm/npm/pull/12851) + Improve diagnostics for `shrinkwrap-scoped-auth` test. + ([@iarna](https://github.com/iarna)) +* [`fbec9fd`](https://github.com/npm/npm/commit/fbec9fd5bb0abce589120d14c1f2b03b58cecce1) + [#12851](https://github.com/npm/npm/pull/12851) + Rewrite `shrinkwrap-dev-dependency` test to use `common.npm`. + ([@iarna](https://github.com/iarna)) + +### v3.9.3 (2016-05-19): + +This week continues our `big-bug` squashing adventure! Things are churning along +nicely, and we've gotten a lot of fantastic contributions from the community. +Please keep it up! + +A quick note on last week's release: We had a small `npm shrinkwrap`-related +crasher in `npm@3.9.1`, so once this release goes out, `v3.9.2` is going to be +`npm@latest`. Please update if you ended up in with that previous version! + +Remember we have a weekly team meeting, and you can [suggest agenda items in the +GitHub issue](https://github.com/npm/npm/issues/12761). Keep an eye out for the +`#npmweekly` tag on Twitter, too, and join the conversation! We'll do our best +to address questions y'all send us. ✌ + +#### FIXES + +* [`42d71be`](https://github.com/npm/npm/commit/42d71be2cec674dd9e860ad414f53184f667620d) + [#12685](https://github.com/npm/npm/pull/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`. This patch fixes it so `npm ls` does a simple name + match unless you use the `npm ls <pkg>@<version>` format. + ([@zkat](https://github.com/zkat)) +* [`c698ae6`](https://github.com/npm/npm/commit/c698ae666afc92fbc0fcba3c082cfa9b34a4420d) + [#12685](https://github.com/npm/npm/pull/12685) + Added some tests for more basic `npm ls` functionality. + ([@zkat](https://github.com/zkat)) + +### NOTABLE DEPENDENCY UPDATES + +* [`3a6fe23`](https://github.com/npm/npm/commit/3a6fe2373c45e80a1f28aaf176d552f6f97cf131) + [npm/fstream-npm#17](https://github.com/npm/fstream-npm/pull/17) + `fstream-npm@1.1.0`: + `fstream-npm` always includes NOTICE files now. + ([@kemitchell](https://github.com/kemitchell)) +* [`df04e05`](https://github.com/npm/npm/commit/df04e05af1f257a1903372e1baf334c0969fbdbd) + [#10013](https://github.com/npm/npm/issues/10013) + `read-package-tree@5.1.4`: + Fixes an issue where `npm install` would fail if your `node_modules` was + symlinked. + ([@iarna](https://github.com/iarna)) +* [`584676f`](https://github.com/npm/npm/commit/584676f85eaebcb9d6c4d70d2ad320be8a8d6a74) + [npm/init-package-json#62](https://github.com/npm/init-package-json/pull/62) + `init-package-json@1.9.4`: + Stop using `package` for a variable, which defeats some bundlers and linters. + ([@adius](https://github.com/adius)) +* [`935a7e3`](https://github.com/npm/npm/commit/935a7e359535e13924934811b77924cbad82619a) + `readable-stream@2.1.3`: + Node 6 build and buffer-related updates. + ([@calvinmetcalf](https://github.com/calvinmetcalf)) + +#### OTHER DEPENDENCY UPDATES + +* [`4c4609e`](https://github.com/npm/npm/commit/4c4609ea49e77303f9d72af6757620e6b3a9a6a9) + `inflight@1.0.5` + ([@zkat](https://github.com/zkat)) +* [`7a3030d`](https://github.com/npm/npm/commit/7a3030d3d44ea2136425f72950ba22e6efd441d9) + `hosted-git-info@2.1.5` + ([@zkat](https://github.com/zkat)) +* [`5ed4b58`](https://github.com/npm/npm/commit/5ed4b58409eeb134bca1c96252682fd7600d9906) + `which@1.2.9` + ([@isaacs](https://github.com/isaacs)) + +### v3.9.2 (2016-05-17) + +This is a quick patch release. The previous release, 3.9.1, introduced a +bug where npm would crash given a combination of specific package tree on +disk and a shrinkwrap. + +* [`cde367f`](https://github.com/npm/npm/commit/cde367fbb6eebc5db68a44b12a5c7bea158d70db) + [#12724](https://github.com/npm/npm/issues/12724) + Fix crasher when inflating shrinkwraps with packages on disk that were + installed by older npm versions. + ([@iarna](https://github.com/iarna)) + +### v3.9.1 (2016-05-12) + +HI all! We have bug fixes to a couple of the hairy corners of `npm`, in the +form of shrinkwraps and bundled dependencies. Plus some documentation improvements +and our lodash deps bot a bump. + +This is our first week really focused on getting the +[big bugs](https://github.com/npm/npm/issues?q=is%3Aopen+is%3Aissue+label:big-bug) +list down. Our work from this week will be landing next week, and I can't +wait to tell you about that! (It's about symlinks!) + +#### SHRINKWRAP FIX + +* [`b894413`](https://github.com/npm/npm/commit/b8944139a935680c4a267468bb2d3c3082b5609f) + [#12372](https://github.com/npm/npm/issues/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)) + +#### BUNDLED DEPENDENCIES FIX + +* [`d0c6d19`](https://github.com/npm/npm/commit/d0c6d194471be8ce3e7b41b744b24f63dd1a3f6f) + [#12476](https://github.com/npm/npm/pull/12476) + Protects against a crasher when a bundled dep is missing a package.json. + ([@dflupu](https://github.com/dflupu)) + +#### DOCS IMPROVEMENTS + +* [`6699aa5`](https://github.com/npm/npm/commit/6699aa53c0a729cfc921ac1d8107c320e5a5ac95) + [#12585](https://github.com/npm/npm/pull/12585) + Document that engineStrict is quite gone. Not "deprecated" so much as "extirpated". + ([@othiym23](https://github.com/othiym23)) +* [`7a41a84`](https://github.com/npm/npm/commit/7a41a84b655be3204d2e80848278a510e42c80e7) + [#12636](https://github.com/npm/npm/pull/12636) + Improve `npm-scripts` documentation regarding when `node-gyp` is used. + ([@reconbot](https://github.com/reconbot)) +* [`4c4b4ba`](https://github.com/npm/npm/commit/4c4b4badf09b9b50cdca85314429a0111bb35cb1) + [#12586](https://github.com/npm/npm/pull/12586) + Correct `package.json` documentation as to when `node-gyp rebuild` called. + This now matches https://docs.npmjs.com/misc/scripts#default-values + ([@reconbot](https://github.com/reconbot)) + +#### DEPENDENCY UPDATES + +* [`cfa797f`](https://github.com/npm/npm/commit/cfa797fedd34696d45b61e3ae0398407afece880) + `lodash._baseuniq@4.6.0` + ([@jdalton](https://github.com/jdalton)) +* [`ab6f180`](https://github.com/npm/npm/commit/ab6f1801971b513f9294b4b8902034ab402af02d) + `lodash.keys@4.0.7` + ([@jdalton](https://github.com/jdalton)) +* [`4b8d8b6`](https://github.com/npm/npm/commit/4b8d8b63e760a8aa03e8bffa974495dfafbfcb06) + `lodash.union@4.4.0` + ([@jdalton](https://github.com/jdalton)) +* [`46099d3`](https://github.com/npm/npm/commit/46099d34542760098e5d13c7468a405a724ca407) + `lodash.uniq@4.3.0` + ([@jdalton](https://github.com/jdalton)) +* [`fff89c6`](https://github.com/npm/npm/commit/fff89c6826c86e9e789adcc9c398385539306042) + `lodash.without@4.2.0` + ([@jdalton](https://github.com/jdalton)) + +### v3.9.0 (2016-05-05) + +Wow! This is a big release week! We've completed the fixes that let the +test suite pass on Windows, plus more general bug fixes we found while +fixing things on Windows. Plus a warning to help folks work around a common +footgun. PLUS an improvement to how npm works with long cache timeouts. + +#### INFINITE CACHE A LITTLE BETTER + +* [`111ae3e`](https://github.com/npm/npm/commit/111ae3ec366ece7ebcf5988f5bc2a7cd70737dfe) + [#8581](https://github.com/npm/npm/issues/8581) + When a package is fetched from the cache which cannot satisfy the version + requirements, an attempt to fetch it from the network is made. This is + helpful for folks using high values for `--cache-min` who are willing to + accept possibly not-the-most-recent modules in return for less network + traffic. + ([@Zirak](https://github.com/Zirak)) + +#### WARNING: FOOTGUN + +* [`60b9a05`](https://github.com/npm/npm/commit/60b9a051aa46b8892fe63b3681839a6fd6642bfd) + [#12475](https://github.com/npm/npm/pull/12475) + Options can only start with ASCII dashes. Ordinarily this isn't a problem + but many web documentation tools "helpfully" convert `--` into an emdash + (–), or `-` into an endash (–). If you copy and paste from this documentation + your commands won't work the way you expect. This adds a warning that tries + to be a little more descriptive about why your command is failing. + ([@iarna](https://github.com/iarna)) + +#### WINDOWS CI + +We have [Windows CI](https://ci.appveyor.com/project/npm/npm) setup now! We still have to +tweak it a little bit around paths to the git binaries, but it's otherwise ready! + +* [`bb5d6cb`](https://github.com/npm/npm/commit/bb5d6cbf46b2609243d3b384caadd196e665a797) + [#11444](https://github.com/npm/npm/pull/11444) + Add AppVeyor to CI matrix. + ([@othiym23](https://github.com/othiym23)) + +#### COVERAGE DATA + +Not only do our tests produce coverage reports after they run now, we also +automatically [update Coveralls](https://coveralls.io/github/npm/npm) with +results from [Travis CI](travis-ci.org/npm/npm) runs. + +* [`044cbab`](https://github.com/npm/npm/commit/044cbab0d49adeeb0d9310c64fee6c9759cc7428) + [#11444](https://github.com/npm/npm/pull/11444) + Enable coverage reporting for every test run. + ([@othiym23](https://github.com/othiym23)) + +#### EVERYONE BUGS + +* [`37c6a51`](https://github.com/npm/npm/commit/37c6a51c71b0feec8f639b3199a8a9172e58deec) + [#12150](https://github.com/npm/npm/pull/12150) + Ensure that 'npm cache ls' outputs real filenames. Previously it would + sometimes double up the package name in the path it printed. + ([@isaacs](https://github.com/isaacs)) +* [`d3ce0b2`](https://github.com/npm/npm/commit/d3ce0b253eb519375071aee29db4ee129dbcdf5c) + [#11444](https://github.com/npm/npm/pull/11444) + Fix unbuilding bins for scoped modules. + ([@iarna](https://github.com/iarna)) +* [`e928a30`](https://github.com/npm/npm/commit/e928a30947477a09245f54e9381f46b97bee32d5) + [#11444](https://github.com/npm/npm/pull/11444) + Make handling of local modules (eg `npm install /path/to/my/module`) more + consistent when saved to a `package.json`. There were bugs previously where + it wouldn't consistently resolve relative paths in the same way. + ([@iarna](https://github.com/iarna)) +* [`b820ed4`](https://github.com/npm/npm/commit/b820ed4fc04e21577fa66f7c9482b5ab002e7985) + [#11444](https://github.com/npm/npm/pull/11444) + Under certain circumstances the paths produced for linking, either + relative or absolute, would end up basing off the wrong virtual cwd. + This resulted in failures for `npm link` in this situations. + ([@iarna](https://github.com/iarna)) + +#### WINDOWS BUGS + +* [`7380425`](https://github.com/npm/npm/commit/7380425d810fb8bfc69405a9cbbdec19978a7bee) + [#11444](https://github.com/npm/npm/pull/11444) + Scoped module names were not being correctly inferred from the path on Windows. + ([@zkat](https://github.com/zkat)) +* [`91fc24f`](https://github.com/npm/npm/commit/91fc24f2763c2e0591093099ffc866c735f27fde) + [#11444](https://github.com/npm/npm/pull/11444) + Explore with a command to run didn't work properly in Windows– it would pop open a new + cmd window and leave it there. + ([@iarna](https://github.com/iarna)) + +#### WINDOWS REFACTORING + +* [`f07e643`](https://github.com/npm/npm/commit/f07e6430d4ca02f811138f6140a8bad927607a1f) + [#11444](https://github.com/npm/npm/pull/11444) + Move exec path escaping out to its own function. This turns out to be + tricky to get right because how you escape commands to run on Windows via + cmd is different then how you escape them at other times. Specifically, + you HAVE to quote each directory segment that has a quote in it, that is: + `C:\"Program Files"\MyApp\MyApp.exe` By contrast, if that were an argument + to a command being run, you CAN'T DO quote it that way, instead you have + to wrap the entire path in quotes, like so: `"C:\Program + Files\MyApp\MyApp.exe"`. + ([@iarna](https://github.com/iarna)) +* [`2e01d29`](https://github.com/npm/npm/commit/2e01d299f8244134b1aa040cab1b59c72c9df4da) + [#11444](https://github.com/npm/npm/pull/11444) + Create a single function for detecting if we're running on Windows (and + using a Windows shell like cmd) and use this instead of doing it one-off + all over the place. + ([@iarna](https://github.com/iarna)) + +#### FIX WINDOWS TESTS + +As I said before, our tests are passing on Windows! 🎉 + +* [`ef0dd74`](https://github.com/npm/npm/commit/ef0dd74583be25c72343ed07d1127e4d0cc02df9) + [#11444](https://github.com/npm/npm/pull/11444) + The fruits of many weeks of labor, fix our tests to pass on Windows. + ([@zkat](https://github.com/zkat)) + ([@iarna](https://github.com/iarna)) + +#### DEPENDENCY UPDATES + +* [`8fccda8`](https://github.com/npm/npm/commit/8fccda8587209659c469ab55c608b0e2d7533530) + [#11444](https://github.com/npm/npm/pull/11444) + `normalize-git-url@3.0.2`: + Fix file URLs on Windows. + ([@zkat](https://github.com/zkat)) +* [`f53a154`](https://github.com/npm/npm/commit/f53a154df8e0696623e6a71f33e0a7c11a7555aa) + `readable-stream@2.1.2`: + When readable-stream is disabled, reuse result of `require('stream')` + instead of calling it every time. + ([@calvinmetcalf](https://github.com/calvinmetcalf)) +* [`02841cf`](https://github.com/npm/npm/commit/02841cfb81d6ba86f691ab43d9bbdac29aec27e7) + [#11444](https://github.com/npm/npm/pull/11444) + `realize-package-specifier@3.0.2`: + Resolve local package paths relative to package root, not cwd. + ([@zkat](https://github.com/zkat)) + ([@iarna](https://github.com/iarna)) +* [`247c1c5`](https://github.com/npm/npm/commit/247c1c5ae08c882c9232ca605731039168bae6ed) + [#11444](https://github.com/npm/npm/pull/11444) + `npm-package-arg@4.1.1`: + Fix Windows file URIs with leading slashes. + ([@zkat](https://github.com/zkat)) +* [`365c72b`](https://github.com/npm/npm/commit/365c72bc3ecd9e45f9649725dd635d5625219d8c) + `which@1.2.8` + ([@isaacs](https://github.com/isaacs)) +* [`e568caa`](https://github.com/npm/npm/commit/e568caabb8390a924ce1cfa51fc914ee6c1637a2) + `graceful-fs@4.1.4` + ([@isaacs](https://github.com/isaacs)) +* [`304b974`](https://github.com/npm/npm/commit/304b97434959a58f84383bcccc0357c51a4eb39a) + [#11444](https://github.com/npm/npm/pull/11444) + `standard@6.0.8` + ([@feross](https://github.com/feross)) + +### v3.8.9 (2016-04-28) + +Our biggest news this week is that we got the +[Windows test suite passing](https://github.com/npm/npm/pull/11444)! +It'll take a little longer to get it passing in our +[Windows CI](https://ci.appveyor.com/project/npm/npm/) but that's coming +soon too. + +That means we'll be shifting gears away from tests to fixing +[Big Bugs™](https://github.com/npm/npm/issues?q=is%3Aopen+is%3Aissue+label%3Abig-bug) again. +Join us at our [team meeting](https://github.com/npm/npm/issues/12517) next +Tuesday to learn more about that. + +#### BUG FIXES AND REFACTORING + +* [`60da618`](https://github.com/npm/npm/commit/60da61862885fa904afba7d121860b4282a5b0df) + [#12347](https://github.com/npm/npm/issues/12347) + Fix a bug that could result in shrinkwraps missing the `resolved` field, which is + necessary in producing a fully reproducible build. + ([@sminnee](https://github.com/sminnee)) +* [`8597ba4`](https://github.com/npm/npm/commit/8597ba432e91245a1000953b612eb01308178bad) + [#12009](https://github.com/npm/npm/issues/12009) + Fix a bug in `npm view <packagename> versions` that resulted in bad output if you + didn't also pass in `--json`. + ([@watilde](https://github.com/watilde)) +* [`20125f1`](https://github.com/npm/npm/commit/20125f19b96fd05af63f8c0bd243ffb25780279a) + [`a53feac`](https://github.com/npm/npm/commit/a53feac2647f7dc4245f1700dfbdd1aba8745672) + [`6cfbae4`](https://github.com/npm/npm/commit/6cfbae403abc3cf690565b09569f71cdd41a8372) + [#12485](https://github.com/npm/npm/pull/12485) + Refactor how the help summaries for commands are produced, such that we only have + one list of command aliases. + ([@watilde](https://github.com/watilde)) +* [`2ae210c`](https://github.com/npm/npm/commit/2ae210c76ab6fd15fcf15dc1808b01ca0b94fc9e) + `read-package-json@2.0.4`: + Fix a crash we discovered while fixing up the Windows test suite where if + you had a file in your `node_modules` it would cause a crash on Windows + (but not MacOS/Linux). + + This makes the error code you get on Windows match that from MacOS/Linux + if you try to read a `package.json` from a path that includes a file, not + a folder. + ([@zkat](https://github.com/zkat)) + +### v3.8.8 (2016-04-21) + +Hi all! Long time no see! We've been heads-down working through getting +[our test suite passing on Windows](https://github.com/npm/npm/pull/11444). +Did you know that we have +[Windows CI](https://ci.appveyor.com/project/npm/npm) now running over at +Appveyor? In the meantime, we've got a bunch of dependency updates, some +nice documentation improvements and error messages when your `package.json` +contains invalid JSON. (Yeah, I thought we did that last one before too!) + +#### BAD JSON IS BAD + +* [`769e620`](https://github.com/npm/npm/commit/769e6200722d8060b6769e47354032c51cfa85a1) + [#12406](https://github.com/npm/npm/pull/12406) + Failing to parse the top level `package.json` should be an error. + ([@watilde](https://github.com/watilde)) + +#### DOCUMENTATION + +* [`7d64301`](https://github.com/npm/npm/commit/7d643018af5051c920cc73f17bfe32b7ff86e108) + [#12415](https://github.com/npm/npm/pull/12415) + Clarify that when configuring client-side certificates for authenticating + to non-npm registries that `cert` and `key` are not filesystem paths and should + actually include the certificate and key data. + ([@rvedotrc](https://github.com/rvedotrc)) +* [`f8539b8`](https://github.com/npm/npm/commit/f8539b8c986e81771ccc8ced7e716718423d3187) + [#12324](https://github.com/npm/npm/pull/12324) + Describe how `npm run` sets `NODE` and `PATH` in more detail. + Note that `npm run` changes `PATH` to include the current node + interpreter’s directory. + ([@addaleax](https://github.com/addaleax)) +* [`2b57606`](https://github.com/npm/npm/commit/2b57606852a2c2a03e4c4b7dcda85b807619c2cf) + [#11461](https://github.com/npm/npm/pull/11461) + Clarify the documentation for the package.json homepage field. + ([@stevemao](https://github.com/stevemao)) + +#### TESTS + +* [`b5a0fbb`](https://github.com/npm/npm/commit/b5a0fbb9e1a2c4fb003dd748264571aa6e3c9e70) + [#12329](https://github.com/npm/npm/pull/12329) + Fix progress config testing to ignore local user configs. + Previously, _any_ local setting would cause the tests to fail as + they were trying to test what the default values for the progress + bar would be in different environments and any explicit setting + overrides those defaults. + ([@iarna](https://github.com/iarna)) +* [`3d195bc`](https://github.com/npm/npm/commit/3d195bc0a72b40df02a5c56e4f3be44152e8222b) + The lifecycle-signal test could crash on v0.8 due to its use of `Number.parseInt`, which + isn't available in that version of node. Fortunately `global.parseInt` _is_, so + we just use that instead. + ([@iarna](https://github.com/iarna)) + +#### DEPENDENCY UPDATES + +* [`05a28e3`](https://github.com/npm/npm/commit/05a28e38586082ac4bbf26ee6f863cc8d07054d6) + `npm-package-arg@4.1.1`: + Under some circumstances `file://` URLs on Windows were not handled correctly. + + Also, stop converting local module/tarballs into full paths in this + module. We do already do that in `realize-package-specifier`, which is + more appropriate as it knows what package we're installing relative to. + ([@zkat](https://github.com/zkat)) +* [`ada2e93`](https://github.com/npm/npm/commit/ada2e93e8b276000150a9aa93fff69ec366e03d6) + `realize-package-specifier@3.0.3`: + Require the new `npm-package-arg`, plus fix a case where specifiers that were + maybe a tag, maybe a local filename were resolved differently than those that were + definitely a local filename. + ([@zkat](https://github.com/zkat)) ([@iarna](https://github.com/iarna)) +* [`adc515b`](https://github.com/npm/npm/commit/adc515b22775871386cd62390079fb4bf8e1714a) + `fs-vacuum@1.2.9`: + A fix for AIX where a non-empty directory can cause `fs.rmDir` to fail with `EEXIST` instead of `ENOTEMPTY` + and three new tests + ([@richardlau](https://github.com/richardlau)) + + Code cleanup, CI & dependency updates. + ([@othiym23](https://github.com/othiym23)) +* [`ef53a46`](https://github.com/npm/npm/commit/ef53a46906ce872a4541b605dd42a563cc26e614) + `tap@5.7.1` + ([@isaacs](https://github.com/isaacs)) +* [`df1f2e4`](https://github.com/npm/npm/commit/df1f2e4838b4d7ea2ea2321a95ae868c0ec0a520) + `request@2.72.0`: + Fix crashes when response headers indicate gzipped content but the body is + empty. + Add support for the deflate content encoding. + ([@simov](https://github.com/simov)) +* [`776c599`](https://github.com/npm/npm/commit/776c599b204632aca9d29fd92ea5c4f099fdea9f) + `readable-stream@2.1.0`: + Adds READABLE_STREAM env var that, if set to `disable`, will make + `readable-stream` use the local native node streams instead. + ([@calvinmetcalf](https://github.com/calvinmetcalf)) +* [`10d6d55`](https://github.com/npm/npm/commit/10d6d5547354fcf50e930c7932ba4d63c0b6009c) + `normalize-git-url@3.0.2`: + Add support `git+file://` type URLs. + ([@zkat](https://github.com/zkat)) +* [`75017ae`](https://github.com/npm/npm/commit/75017aeecec69a1efd546df908aa5befc4467f36) + `lodash.union@4.3.0` + ([@jdalton](https://github.com/jdalton)) + +### v3.8.7 (2016-04-07) + +#### IMPROVED DIAGNOSTICS + +* [`38cf79f`](https://github.com/npm/npm/commit/38cf79ffa564ef5cb6677b476e06d0e45351592a) + [#12083](https://github.com/npm/npm/pull/12083) + If you `ignore-scripts` to disable lifecycles, this makes npm report when it skips running + a script. + ([@bfred-it](https://github.com/bfred-it)) + +#### IMPROVE AUTO-INCLUDES + +* [`c615182`](https://github.com/npm/npm/commit/c615182c8b47e418338eb1317b99bb66987cda54) + [#11995](https://github.com/npm/npm/pull/11995) + There were bugs where modules whose names matched the special files that npm always + includes would be included, for example, the `history` package was always included. + + With `npm@3` such extraneously bundled modules would not be ordinarily + used, as things in `node_modules` in packages are ignored entirely if the + package isn't marked as bundling modules. + + Because of this `npm@3` behavior, the `files-and-ignores` test failed to catch this as + it was testing _install output_ not what got packed. That has also been fixed. + ([@glenjamin](https://github.com/glenjamin)) + +#### DOCUMENTATION UPDATES + +* [`823d9df`](https://github.com/npm/npm/commit/823d9dfa91d7086a26620f007aee4e3cd77b6153) + [#12107](https://github.com/npm/npm/pull/12107) + In the command summary for `adduser` mention that `login` is an alias. + ([@gnerkus](https://github.com/gnerkus)) +* [`7aaf47e`](https://github.com/npm/npm/commit/7aaf47e124c45dde72c961638b770ee535fb2776) + [#12244](https://github.com/npm/npm/pull/12244) + Update the README to suggest npm@3 for Windows users. Also add a reference to + [Microsoft's npm upgrade tool](https://github.com/felixrieseberg/npm-windows-upgrade). + ([@felixrieseberg](https://github.com/felixrieseberg)) + +#### DEPENDENCY UPDATES + +* [`486bbc0`](https://github.com/npm/npm/commit/486bbc0e1b101f847e890e6f1925dc8cb253cf3e) + `request@2.70.0` + ([@simov](https://github.com/simov)) +* [`b1aff34`](https://github.com/npm/npm/commit/b1aff346fc41f13e3306b437e1831942aacf2f54) + `lodash.keys@4.0.6` + ([@jdalton](https://github.com/jdalton)) + +### v3.8.6 (2016-03-31) + +Heeeeeey y'all. + +Kat here! Rebecca's been schmoozing with folks at [Microsoft +Build](https://build.microsoft.com/), so I'm doing the `npm@3` release this +week. + +Speaking of Build, it looks like Microsoft is doing some bash thing. This might +be really good news for our Windows users once it rolls around. We're keeping an +eye out and feeling hopeful. 🙆 + +As far as the release goes: We're really happy to be getting more and more +community contributions! Keep it up! We really appreciate folks trying to help +us, and we'll do our best to help point you in the right direction. Even things +like documentation are a huge help. And remember -- you get socks for it, too! + +#### FIXES + +* [`f8fb4d8`](https://github.com/npm/npm/commit/f8fb4d83923810eb78d075bd200a9376c64c3e3a) + [#12079](https://github.com/npm/npm/pull/12079) + Back in `npm@3.2.2` we included [a patch that made it so `npm install pkg` was + basically `npm install pkg@latest` instead of + `pkg@*`](https://github.com/npm/npm/pull/9170) + This is probably what most users expected, but it also ended up [breaking `npm + deprecate`](https://github.com/npm/npm/pull/9170) when no version was provided + for a package. In that case, we were using `*` to mean "deprecate all + versions" and relying on the `pkg` -> `pkg@*` conversion. + This patch fixes `npm deprecate pkg` to work as it used to by special casing + that particular command's behavior. + ([@polm](https://github.com/polm)) +* [`458f773`](https://github.com/npm/npm/commit/458f7734f3376aba0b6ff16d34a25892f7717e40) + [#12146](https://github.com/npm/npm/pull/12146) + Adds `make doc-clean` to `prepublish` script, to clear out previously built + docs before publishing a new npm version + ([@watilde](https://github.com/watilde)) +* [`f0d1521`](https://github.com/npm/npm/commit/f0d1521038e956b2197673f36c464684293ce99d) + [#12146](https://github.com/npm/npm/pull/12146) + Adds `doc-clean` phony target to `make publish`. + ([@watilde](https://github.com/watilde)) + +#### DOC UPDATES + +* [`ea92ffc`](https://github.com/npm/npm/commit/ea92ffc9dd2a063896353fc52c104e85ec061360) + [#12147](https://github.com/npm/npm/pull/12147) + Document that the current behavior of `engines` is just to warn if the node + platform is incompatible. + ([@reconbot](https://github.com/reconbot)) +* [`cd1ba44`](https://github.com/npm/npm/commit/cd1ba4423b3ca889c741141b95b0d9472b9f71ea) + [#12143](https://github.com/npm/npm/pull/12143) + Remove `npm faq` command, since the [FAQ was + removed](https://github.com/npm/npm/pull/10547). + ([@watilde](https://github.com/watilde)) +* [`50a12cb`](https://github.com/npm/npm/commit/50a12cb1f5f158af78d6962ad20ff0a98bc18f18) + [#12143](https://github.com/npm/npm/pull/12143) + Remove references to the FAQ from the docs, since [it was + removed](https://github.com/npm/npm/pull/10547). + ([@watilde](https://github.com/watilde)) +* [`60051c2`](https://github.com/npm/npm/commit/60051c25e2ab80c667137dfcd04b242eea25980e) + [#12093](https://github.com/npm/npm/pull/12093) + Update `bugs` url in `package.json` to use the `https` URL for Github. + ([@watilde](https://github.com/watilde)) +* [`af30c37`](https://github.com/npm/npm/commit/af30c374ef22ed1a1c71b14fced7c4b8350e4e82) + [#12075](https://github.com/npm/npm/pull/12075) + Add the `--ignore-scripts` flag to the `npm install` docs. + ([@paulirish](https://github.com/paulirish)) +* [`632b214`](https://github.com/npm/npm/commit/632b214b2f2450e844410792e5947e46844612ff) + [#12063](https://github.com/npm/npm/pull/12063) + Various minor fixes to the html docs homepage. + ([@watilde](https://github.com/watilde)) + +#### DEP BUMPS + +* [`3da0171`](https://github.com/npm/npm/commit/3da01716a0e41d6b5adee2b4fc70fcaf08c0eb24) + `lodash.without@4.1.2` + ([@jdalton](https://github.com/jdalton)) +* [`69ccf6d`](https://github.com/npm/npm/commit/69ccf6dd4caf95cd0628054307487cae1885acd0) + `lodash.uniq@4.2.1` + ([@jdalton](https://github.com/jdalton)) +* [`b50c41a`](https://github.com/npm/npm/commit/b50c41a9930dc5353a23c5ae2ff87bb99e11d482) + `lodash.union@4.2.1` + ([@jdalton](https://github.com/jdalton)) +* [`59c1ad7`](https://github.com/npm/npm/commit/59c1ad7b6f243d07618ed5703bd11d787732fc57) + `lodash.clonedeep@4.3.2` + ([@jdalton](https://github.com/jdalton)) +* [`2b4f797`](https://github.com/npm/npm/commit/2b4f797dba8e7a1376c8335b7223e82d02cd8243) + `lodash._baseuniq@4.5.1` + ([@jdalton](https://github.com/jdalton)) + +### v3.8.5 (2016-03-24) + +Like my esteemed colleague [@zkat](https://github.com/zkat) said in this +week's [LTS release notes](https://github.com/npm/npm/releases/tag/v2.15.2), +this week is another small release but we are continuing to work on our +[Windows efforts](https://github.com/npm/npm/pull/11444). + +You may also be interested in reading the [LTS process and +policy](https://github.com/npm/npm/wiki/LTS) that +[@othiym23](https://github.com/othiym23) put together recently. If you have any +feedback, we would love to hear. + +#### DOCTOR IT HURTS WHEN LINK TO MY LINK + +Well then, don't do that. + +* [`0d4a0b1`](https://github.com/npm/npm/commit/0d4a0b1) + [#11442](https://github.com/npm/npm/pull/11442) + Fail if the user asks us to make a link from a module back on to itself. + ([@antialias](https://github.com/antialias)) + +#### ERR MODULE LIST TOO LONG + +* [`b271ed2`](https://github.com/npm/npm/commit/b271ed2) + [#11983](https://github.com/npm/npm/issues/11983) + Exit early if no arguments were provided to search instead of trying to display all the modules, + running out of memory, and then crashing. + ([@SimenB](https://github.com/SimenB)) + +#### ELIMINATE UNUSED MODULE + +* [`b8c7cd7`](https://github.com/npm/npm/commit/b8c7cd7) + [#12000](https://github.com/npm/npm/pull/12000) + Stop depending on [`async-some`](https://npmjs.com/package/async-some) as it's no + longer used in npm. + ([@watilde](https://github.com/watilde)) + +#### DOCUMENTATION IMPROVEMENTS + +* [`fdd6b28`](https://github.com/npm/npm/commit/fdd6b28) + [#11884](https://github.com/npm/npm/pull/11884) + Include `node_modules` in the list of files and directories that npm won't + include in packages ordinarily. (Modules listed in `bundledDependencies` and things + that those modules rely on, ARE included of course.) + ([@Jameskmonger](https://github.com/Jameskmonger)) +* [`aac15eb`](https://github.com/npm/npm/commit/aac15eb) + [#12006](https://github.com/npm/npm/pull/12006) + Fix typo in npm-orgs documentation, where teams docs went to access docs and vice versa. + ([@yaelz](https://github.com/yaelz)) + +#### FEWER NETWORK TESTS + +* [`3e41360`](https://github.com/npm/npm/commit/3e41360) + [#11987](https://github.com/npm/npm/pull/11987) + Fix test that was inappropriately hitting the network + ([@yodeyer](https://github.com/yodeyer)) + +### v3.8.4 (2016-03-24) + +Was erroneously released with just a changelog typo correction and was +otherwise the same as 3.8.3. + +### v3.8.3 (2016-03-17): + +#### SECURITY ADVISORY: BEARER TOKEN DISCLOSURE + +This release includes [the fix for a +vulnerability](https://github.com/npm/npm/commit/f67ecad59e99a03e5aad8e93cd1a086ae087cb29) +that could cause the unintentional leakage of bearer tokens. + +Here are details on this vulnerability and how it affects you. + +##### DETAILS + +Since 2014, npm’s registry has used HTTP bearer tokens to authenticate requests +from the npm’s command-line interface. A design flaw meant that the CLI was +sending these bearer tokens with _every_ request made by logged-in users, +regardless of the destination of their request. (The bearers only should have +been included for requests made against a registry or registries used for the +current install.) + +An attacker could exploit this flaw by setting up an HTTP server that could +collect authentication information, then use this authentication information to +impersonate the users whose tokens they collected. This impersonation would +allow them to do anything the compromised users could do, including publishing +new versions of packages. + +With the fixes we’ve released, the CLI will only send bearer tokens with +requests made against a registry. + +##### THINK YOU'RE AT RISK? REGENERATE YOUR TOKENS + +If you believe that your bearer token may have been leaked, [invalidate your +current npm bearer tokens](https://www.npmjs.com/settings/tokens) and rerun +`npm login` to generate new tokens. Keep in mind that this may cause continuous +integration builds in services like Travis to break, in which case you’ll need +to update the tokens in your CI server’s configuration. + +##### WILL THIS BREAK MY CURRENT SETUP? + +Maybe. + +npm’s CLI team believes that the fix won’t break any existing registry setups. +Due to the large number of registry software suites out in the wild, though, +it’s possible our change will be breaking in some cases. + +If so, please [file an issue](https://github.com/npm/npm/issues/new) describing +the software you’re using and how it broke. Our team will work with you to +mitigate the breakage. + +##### CREDIT & THANKS + +Thanks to Mitar, Will White & the team at Mapbox, Max Motovilov, and James +Taylor for reporting this vulnerability to npm. + +#### PERFORMANCE IMPROVEMENTS + +The updated [`are-we-there-yet`](https://npmjs.com/package/are-we-there-yet) +changes how it tracks how complete things are to be much more efficient. +The summary is that `are-we-there-yet` was refactored to remove an expensive +tree walk. + +The result for you should be faster installs when working with very large trees. + +Previously `are-we-there-yet` computed this when you asked by passing the request down +its tree of progress indicators, totaling up the results. In doing so, it had to walk the +entire tree of progress indicators. + +By contrast, `are-we-there-yet` now updates a running total when a change +is made, bubbling that up the tree from whatever branch made progress. This +bubbling was already going on so there was nearly no cost associated with taking advantage of it. + +* [`32f2bd0`](https://github.com/npm/npm/commit/32f2bd0e26116db253e619d67c4feae1de3ad2c2) + `npmlog@2.0.3`: + Bring in substantial performance improvements from `are-we-there-yet`. + ([@iarna](https://github.com/iarna)) + +#### DUCT TAPE FOR BUGS + +* [`473d324`](https://github.com/npm/npm/commit/473d3244a8ddfd6b260d0aa0d395b119d595bf97) + [#11947](https://github.com/npm/npm/pull/11947) + Guard against bugs that could cause the installer to crash with errors like: + + ``` + TypeError: Cannot read property 'target' of null + ``` + + This doesn't fix the bugs, but it does at least make the installer less + likely to explode. + ([@thefourtheye](https://github.com/thefourtheye)) + +#### DOC FIXES + +* [`ffa428a`](https://github.com/npm/npm/commit/ffa428a4eee482aa620819bc8df994a76fad7b0c) + [#11880](https://github.com/npm/npm/pull/11880) + Fix typo in `npm install` documentation. + ([@watilde](https://github.com/watilde)) + +#### DEPENDENCY UPDATES + +* [`7537fe1`](https://github.com/npm/npm/commit/7537fe1748c27e6f1144b279b256cd3376d5c41c) + `sorted-object@2.0.0`: + Create objects with `{}` instead of `Object.create(null)` to make the results + strictly equal to what, say, parsed JSON would provide. + ([@domenic](https://github.com/domenic)) +* [`8defb0f`](https://github.com/npm/npm/commit/8defb0f7b3ebdbe15c9ef5036052c10eda7e3161) + `readable-stream@2.0.6`: + Fix sync write issue on 0.10. + ([@calvinmetcalf](https://github.com/calvinmetcalf)) + +#### TEST FIXES FOR THE SELF TESTS + +* [`c3edeab`](https://github.com/npm/npm/commit/c3edeabece4400308264e7cf4bc4448bd2729f55) + [#11912](https://github.com/npm/npm/pull/11912) + Change the self installation test to do its work in `/tmp`. + Previously this was installing into a temp subdir in `test/tap`, which + wouldn't catch the case where a module was installed in the local + `node_modules` folder but not in dependencies, as node would look up + the tree and use the copy from the version of npm being tested. + ([@iarna](https://github.com/iarna)) + +### v3.8.2 (2016-03-10): + +#### HAVING TROUBLE INSTALLING C MODULES ON ANDROID? + +This release includes an updated `node-gyp` with fixes for Android. + +* [`634ecba`](https://github.com/npm/npm/commit/634ecba320fb5a3287e8b7debfd8b931827b9e19) + `node-gyp@3.3.1`: + Fix bug in builds for Android. + ([@bnoordhuis](https://github.com/bnoordhuis)) + +#### NPM LOGOUT CLEANS UP BETTER + +* [`460ed21`](https://github.com/npm/npm/commit/460ed217876ac78d21477c288f1c06563fb770b4) + [#10529](https://github.com/npm/npm/issues/10529) + If you ran `npm logout` with a scope, while we did invalidate your auth + token, we weren't removing the auth token from your config file. This patch causes + the auth token to be removed. + ([@wyze](https://github.com/wyze)) + +#### HELP MORE HELPFUL + +* [`d1d0233`](https://github.com/npm/npm/commit/d1d02335d297da2734b538de44d8967bdcd354cf) + [#11003](https://github.com/npm/npm/issues/11003) + Update help to only show command names and their shortcuts. Previously + some typo corrections were shown, along with various alternate + spellings. + ([@watilde](https://github.com/watilde)) +* [`47928cd`](https://github.com/npm/npm/commit/47928cd6264e1d6d0ef67435b71c66d01bea664a) + [#11003](https://github.com/npm/npm/issues/11003) + Remove "verison" typo from the help listing. + ([@doug-wade](https://github.com/doug-wade)) + +#### MORE COMPLETE CONFIG LISTINGS + +* [`cf5fd40`](https://github.com/npm/npm/commit/cf5fd401494d96325d74a8bb8c326aa0045a714c) + [#11472](https://github.com/npm/npm/issues/11472) + Make `npm config list` include the per-project `.npmrc` in the output. + ([@mjomble](https://github.com/mjomble)) + +#### DEPTH LIMITED PARSEABLE DEP LISTINGS + +* [`611070f`](https://github.com/npm/npm/commit/611070f0f7a1e185c75cadae46179194084b398f) + [#11495](https://github.com/npm/npm/issues/11495) + Made `npm ls --parseable` honor the `--depth=#` option. + ([@zacdoe](https://github.com/zacdoe)) + +#### PROGRESS FOR THE (NON) UNICODE REVOLUTION + +* [`ff90382`](https://github.com/npm/npm/commit/ff9038227a1976b5e936442716d9877f43c6c9b4) + [#11781](https://github.com/npm/npm/issues/11781) + Make the progress bars honor the unicode option. + ([@watilde](https://github.com/watilde)) + +#### `npm view --json`, NOW ACTUALLY JSON + +* [`24ab70a`](https://github.com/npm/npm/commit/24ab70a4ccfeaa005b80252da313bb589510668e) + [#11808](https://github.com/npm/npm/issues/11808) + Make `npm view` produce valid JSON when requested with `--json`. + Previously `npm view` produced some sort of weird hybrid output, with multiple + JSON docs. + ([@doug-wade](https://github.com/doug-wade)) + +#### DOCUMENTATION CHANGES + +* [`6fb0499`](https://github.com/npm/npm/commit/6fb0499bea868fdc637656d210c94f051481ecd4) + [#11726](https://github.com/npm/npm/issues/11726) + Previously we patched the `npm update` docs to suggest using `--depth + Infinity` instead of `--depth 9999`, but that was a mistake. We forgot + that `npm outdated` (on which `npm update` is built) has a special + case where it treats `Infinity` as `0`. This reverts that patch. + ([@GriffinSchneider](https://github.com/GriffinSchneider)) +* [`f0bf684`](https://github.com/npm/npm/commit/f0bf684a87ea5eea03432a17f38678fed4960d43) + [#11748](https://github.com/npm/npm/pull/11748) + Document all of the various aliases for commands in the documentation + for those commands. + ([@watilde](https://github.com/watilde)) +* [`fe04443`](https://github.com/npm/npm/commit/fe04443d8988e2e41bd4047078e06a26d05d380d) + [#10968](https://github.com/npm/npm/issues/10968) + The `npm-scope` document notes that scopes have been available on the + public registry for a while. This adds that you'll need `npm@2` or later + to use them. + ([@doug-wade](https://github.com/doug-wade)) +* [`3db37a5`](https://github.com/npm/npm/commit/3db37a52b2b2e3193ef250ad2cf96dfd2def2777) + [#11820](https://github.com/npm/npm/pull/11820) + The command `npm link` should be linking package from local folder to + global, and `npm link package-name` should be from global to local. The + description in the documentation was reversed and this fixes that. + ([@rhgb](https://github.com/rhgb)) + +#### GLOB FOR THE GLOB THRONE + +* [`be55882`](https://github.com/npm/npm/commit/be55882dc4ee5ce0777b4badc9141dab5bf5be4d) + `glob@7.0.3`: + Fix a race condition and some windows edge cases. + ([@isaacs](https://github.com/isaacs)) + +### v3.8.1 (2016-03-03): + +This week the install summary got better, killing your npm process now +also kills the scripts it was running and a rarely used search flag got +documented. + +Our improvements on the test suite on Windows are beginning to pick up +steam, you can follow along by +[watching the PR](https://github.com/npm/npm/pull/11444). + +#### BETTER INSTALL SUMMARIES + +* [`e40d457`](https://github.com/npm/npm/commit/e40d4572cc98db06757df5b8bb6b7dbd0546d3d7) + [#11699](https://github.com/npm/npm/issues/11699) + Ensure that flags like `--production` passed to install don't result in + the summary at the end being incorrectly filtered. That summary is + produced by the same code as `npm ls` and therefore responds to flags + the same way it does. This is undesirable when it's an install summary, + however, as we don't want it to filter anything. + + This fixes an issue where `npm install --production <module>` would + result in npm exiting with an error code. The `--production` flag would + make `npm ls` filter out `<module>` as it wasn't saved to the + `package.json` and thus wasn't a production dependency. The install + report is limited to show just the modules installed, so with that + filtered out nothing is available. With nothing available `npm ls` + would set `npm` to exit with an error code. + ([@ixalon](https://github.com/ixalon)) +* [`99337b4`](https://github.com/npm/npm/commit/99337b469163a4b211b9c6ff1aa9712ae0d601d2) + [#11600](https://github.com/npm/npm/pull/11600) + Make the report of installed modules really only show those modules + that were installed. Previously it selected which modules from your + tree to display based on `name@version` which worked great when your + tree was deduped but would list things it hadn't touched when there + were duplicates. + ([@iarna](https://github.com/iarna)) + +#### SCRIPTS BETTER FOLLOW THE LEADER + +* [`5454347`](https://github.com/npm/npm/commit/545434766eb3681d3f40b745f9f3187ed63f310a) + [#10868](https://github.com/npm/npm/pull/10868) + When running a lifecycle script, say through `npm start`, killing npm + wouldn't forward that on to the children. It does now. + ([@daniel-pedersen](https://github.com/daniel-pedersen)) + +#### SEARCHING SPECIFIC REGISTRIES + +* [`6020447`](https://github.com/npm/npm/commit/60204479f76458a9864aa530cda2b3333f95c2b0) + [#11490](https://github.com/npm/npm/pull/11490) + Add docs for using the `--registry` flag with search. + ([@plumlee](https://github.com/plumlee)) + +#### LODASH UPDATES + +* [`bb14204`](https://github.com/npm/npm/commit/bb14204183dad620a6650452a26cdc64111f8136) + `lodash.without@4.1.1` + ([@jdalton](https://github.com/jdalton)) +* [`0089059`](https://github.com/npm/npm/commit/0089059c562aee9ad0398e55d2c12c68a6150e79) + `lodash.keys@4.0.5` + ([@jdalton](https://github.com/jdalton)) +* [`6ee1de4`](https://github.com/npm/npm/commit/6ee1de4474d9683a1f7023067d440780eeb10311) + `lodash.clonedeep@4.3.1` + ([@jdalton](https://github.com/jdalton)) + +### v3.8.0 (2016-02-25): + +This week brings a quality of life improvement for some Windows users, and +an important knob to be tuned for folks experiencing network problems. + +#### LIMIT CONCURRENT REQUESTS + +We've long known that `npm`'s tendency to try to request all your +dependencies simultaneously upset some network hardware (particular, +consumer grade routers & proxies of all sorts). One of the reasons that we're +planning to write our own npm specific version of `request` is to be able to +more easily control this sort of thing. + +But fortunately, you don't have to wait for that. +[@misterbyrne](https://github.com/misterbyrne) took a look at our existing +code and realized it could be added painlessly TODAY. The new default +maximum is `50`, instead of `Infinity`. If you're having network issues you +can try setting that value down to something lower (if you do, please let us +know... the default is subject to tuning). + +* [`910f9ac`](https://github.com/npm/npm/commit/910f9accf398466b8497952bee9f566ab50ade8c) + [`f7be667`](https://github.com/npm/npm/commit/f7be667548a132ec190ac9d60a31885a7b4fe2b3) + Add a new config option, `maxsockets` and `npm-registry-client@7.1.0` to + take advantage of it. + ([@misterbyrne](https://github.com/misterbyrne)) + +#### WINDOWS GIT BASH + +We think it's pretty keen too, we were making it really hard to actually +upgrade if you were using it. NO MORE! + +* [`d60351c`](https://github.com/npm/npm/commit/d60351ccae87d71a5f5eac73e3085c6290b52a69) + [#11524](https://github.com/npm/npm/issues/11524) + Prefer locally installed npm in Git Bash -- previous behavior was to use + the global one. This was done previously for other shells, but not for Git + Bash. + ([@destroyerofbuilds](https://github.com/destroyerofbuilds)) + +#### DOCUMENTATION IMPROVEMENTS + +* [`b63de3c`](https://github.com/npm/npm/commit/b63de3c97c4c27078944249a4d5bbe1c502c23bc) + [#11636](https://github.com/npm/npm/issues/11636) + Document `--save-bundle` option in main install page. + ([@datyayu](https://github.com/datyayu)) +* [`3d26453`](https://github.com/npm/npm/commit/3d264532d6d9df60420e985334aebb53c668d32b) + [#11644](https://github.com/npm/npm/pull/11644) + Add `directories.test` to the `package.json` documentation. + ([@lewiscowper](https://github.com/lewiscowper)) +* [`b64d124`](https://github.com/npm/npm/commit/b64d12432fdad344199b678d700306340d3607eb) + [#11441](https://github.com/npm/npm/pull/11441) + Add a link in documentation to the contribution guidelines. + ([@watilde](https://github.com/watilde)) +* [`82fc548`](https://github.com/npm/npm/commit/82fc548b0e2abbdc4f7968c20b118c30cca79a24) + [#11441](https://github.com/npm/npm/pull/11441/commits) + Remove mentions of the long defunct Google group. + ([@watilde](https://github.com/watilde)) +* [`c6ad091`](https://github.com/npm/npm/commit/c6ad09131af2e2766d6034257a8fcaa294184121) + [#11474](https://github.com/npm/npm/pull/11474) + Correct invalid JSON in npm-update docs. + ([@robludwig](https://github.com/robludwig)) +* [`4906c90`](https://github.com/npm/npm/commit/4906c90ed2668adf59ebee759c7ebb811aa46e57) + Expand on the documentation for `bundlededDependencies`, explaining what they are + and when you might want to use them. + ([@gnerkus](https://github.com/gnerkus)) + +#### DEPENDENCY UPDATES + +* [`93cdc25`](https://github.com/npm/npm/commit/93cdc25432b71cbc9c25c54ae316770e18f4b01e) + `strip-ansi@3.0.1`: + Non-user visible tests & maintainer doc updates. + ([@jbnicolai](https://github.com/jbnicolai)) +* [`3b2ccef`](https://github.com/npm/npm/commit/3b2ccef30dc2038b99ba93cd1404a1d01dac8790) + `lodash.keys@4.0.4` + ([@jdalton](https://github.com/jdalton)) +* [`30e9eb9`](https://github.com/npm/npm/commit/30e9eb97397a8f85081d328ea9aa54c2a7852613) + `lodash._baseuniq@4.5.0` + ([@jdalton](https://github.com/jdalton)) + + +### v3.7.5 (2016-02-22): + +A quick fixup release because when I updated glob, I missed the subdep copies of itself +that it installed deeper in the tree. =/ + +This only effected people trying to update to `3.7.4` from `npm@2` or `npm@1`. Updates from +`npm@3` worked fine (as it fixes up the missing subdeps during installation). + +#### OH MY GLOB + +* [`63fa704`](https://github.com/npm/npm/commit/63fa7044569127e6e29510dc499a865189806076) + [#11633](https://github.com/npm/npm/issues/11633) + When updating the top level `npm` to `glob@7`, the subdeps that + still depended on `glob@6` got new versions installed but they + weren't added to the commit. This adds them back in. + ([@iarna](https://github.com/iarna)) + +### v3.7.4 (2016-02-18): + +I'm ([@iarna](https://github.com/iarna)) back from vacation in the frozen +wastes of Maine! This release sees a couple of bug fixes, some +documentation updates, a bunch of dependency updates and improvements to our +test suite. + +#### FIXES FOR `update`, FIXES FOR `ls` + +* [`53cdb96`](https://github.com/npm/npm/commit/53cdb96634fc329378b4ea4e767ba9987986a76e) + [#11362](https://github.com/npm/npm/issues/11362) + Make `npm update` stop trying to update linked packages. + ([@rhendric](https://github.com/rhendric)) +* [`8d90d25`](https://github.com/npm/npm/commit/8d90d25b3da086843ce43911329c9572bd109078) + [#11559](https://github.com/npm/npm/issues/11559) + Only list runtime dependencies when doing `npm ls --production`. + ([@yibn2008](https://github.com/yibn2008)) + +#### @wyze, DOCUMENTATION HERO OF THE PEOPLE, GETS THEIR OWN HEADER + +* [`b78b301`](https://github.com/npm/npm/commit/b78b30171038ab737eff0b070281277e35af25b4) + [#11416](https://github.com/npm/npm/pull/11416) + Logout docs were using a section copy-pasted from the adduser docs. + ([@wyze](https://github.com/wyze)) +* [`649e28f`](https://github.com/npm/npm/commit/649e28f50aa323e75202eeedb824434535a0a4a0) + [#11414](https://github.com/npm/npm/pull/11414) + Add colon for consistency. + ([@wyze](https://github.com/wyze)) + +#### WHITTLING AWAY AT PATH LENGTHS + +So for all of you who don't know -- Node.js does, in fact, support long Windows +paths. Unfortunately, depending on the tool and the Windows version, a lot of +external tooling does not. This means, for example, that some (all?) versions of +Windows Explorer *can literally never delete npm from their system entirely +because of deeply-nested npm dependencies*. Which is pretty gnarly. + +Incidentally, if you run into that in particularly, you can use +[rimraf](npm.im/rimraf) to remove such files 💁. + +The latest victim of this issue was the Node.js CI setup for testing on Windows, +which uses some tooling or another that croaks on the usual path length limit +for that OS: 255 characters. + +This isn't ordinarily an issue with `npm@3` as it produces mostly flat +trees, but you may be surprised to learn that `npm`'s own distribution isn't +flat, due to needing to be compatible with `npm@1.2`, which ships with +`node@0.8`! + +We've taken another baby step towards alleviating this in this release by +updating a couple of dependencies that were preventing `npmlog` from deduping, +and then doing a dedupe on that and `gauge`. Hopefully it helps. + +* [`f3c32bc`](https://github.com/npm/npm/commit/f3c32bc3127301741d2fa3a26be6f5f127a35908) + [#11528](https://github.com/npm/npm/pull/11528) + `node-gyp@3.3.0`: + Update to a more recent version that uses a version of npmlog compatible + with npm itself. Also adds: AIX support, new `gyp`, `--cafile` command + line option, and allows configuration of Node.js and io.js mirrors. + ([@rvagg](https://github.com/rvagg)) + +#### INTERNAL TEST IMPROVEMENTS + +The `npm` core team's time recently has been sunk into `npm`'s many years of +tech debt. Specifically, we've been working on improving the test suite. +This isn't user visible, but in future should mean a more stable, easier to +contribute to `npm`. Ordinarily we don't report these kinds of changes in +the change log, but I thought I might share this week as this chunk is +bigger than usual. + +* [`07f020a`](https://github.com/npm/npm/commit/07f020a09e94ae393c67526985444e128ef6f83c) + [#11292](https://github.com/npm/npm/pull/11292) + `tacks@1.0.9`: + Add a package that provides a tool to generate fixtures from folders and, relatedly, + a module that an create and tear down filesystem fixtures easily. + ([@iarna](https://github.com/iarna)) +* [`0837346`](https://github.com/npm/npm/commit/083734631f9b11b17c08bca8ba8cb736a7b1e3fb) + [#11292](https://github.com/npm/npm/pull/11292) + Remove all the relatively cryptic legacy tests and creates new tap tests + that check the same functionality. The *legacy* tests were tests that + were originally a shell script that was ported to javascript early in + `npm`'s history. + ([@iarna](https://github.com/iarna)) + ([@zkat](https://github.com/zkat)) +* [`5a701e7`](https://github.com/npm/npm/commit/5a701e71a0130787fb98450f9de92117b4ef88e1) + [#11292](https://github.com/npm/npm/pull/11292) + Test that we don't leak auth info into the environment. + ([@zkat](https://github.com/zkat)) +* [`502d7d0`](https://github.com/npm/npm/commit/502d7d0628f08b09d8d13538ebccc63de8b3edf5) + [#11292](https://github.com/npm/npm/pull/11292) + Test that env vars properly passed into scripts. + ([@zkat](https://github.com/zkat)) +* [`420f267`](https://github.com/npm/npm/commit/420f2672ee8c909f18bee10b1fc7d4ad91cf328b) + [#11292](https://github.com/npm/npm/pull/11292) + Test that npm's distribution binary is complete and can be installed and used. + ([@iarna](https://github.com/iarna)) +* [`b7e99be`](https://github.com/npm/npm/commit/b7e99be1b1086f2d6098c653c1e20791269c9177) + [#11292](https://github.com/npm/npm/pull/11292) + Test that the `package.json` `files` section and `.npmignore` do what + they're supposed to. + ([@zkat](https://github.com/zkat)) + +#### DEPENDENCY UPDATES + +* [`4611098`](https://github.com/npm/npm/commit/4611098fd8c65d61a0645deb05bf38c81300ffca) + `rimraf@2.5.2`: + Use `glob@7.0.0`. + ([@isaacs](https://github.com/isaacs)) +* [`41b2772`](https://github.com/npm/npm/commit/41b2772cb83627f3b5b926cf81e150e7148cb124) + `glob@7.0.0`: + Raise error if `options.cwd` is specified, and not a directory. + ([@isaacs](https://github.com/isaacs)) +* [`c14e74a`](https://github.com/npm/npm/commit/c14e74ab5d17c764f3aa37123a9632fa965f8760) + `gauge@1.2.7`: Update to newer lodash versions, for a smaller tree. + ([@iarna](https://github.com/iarna)) +* [`d629363`](https://github.com/npm/npm/commit/d6293630ddc25bfa26d19b6be4fd2685976d7358) + `lodash.without@4.1.0` + ([@jdalton](https://github.com/jdalton)) +* [`3ea4c80`](https://github.com/npm/npm/commit/3ea4c8049ca8df9f64426b1db8a29b9579950134) + `lodash.uniq@4.2.0` + ([@jdalton](https://github.com/jdalton)) +* [`8ddcc8d`](https://github.com/npm/npm/commit/8ddcc8deb554660a3f7f474fae9758c967d94552) + `lodash.union@4.2.0` + ([@jdalton](https://github.com/jdalton)) +* [`2b656a6`](https://github.com/npm/npm/commit/2b656a672d351f32ee2af24dcee528356dcd64f4) + `lodash.keys@4.0.3` + ([@jdalton](https://github.com/jdalton)) +* [`ac171f8`](https://github.com/npm/npm/commit/ac171f8f0318a7dd3c515f3b83502dfa9e87adb8) + `lodash.isarguments@3.0.7` + ([@jdalton](https://github.com/jdalton)) +* [`bcccd90`](https://github.com/npm/npm/commit/bcccd9057b75d800c799ab15f00924f700415d3e) + `lodash.clonedeep@4.3.0` + ([@jdalton](https://github.com/jdalton)) +* [`8165bca`](https://github.com/npm/npm/commit/8165bca537d86305a3d08f080f86223a26615aa8) + `lodash._baseuniq@4.4.0` + ([@jdalton](https://github.com/jdalton)) + +### v3.7.3 (2016-02-11): + +Hey all! We've got a pretty small release this week -- just documentation +updates and a couple of dependencies. This release also includes a particular +dependency upgrade that makes it so we're exclusively using the latest version +of `graceful-fs`, which'll make it so things keep working with future Node.js +releases. + +A certain internal Node.js API was deprecated and slated for future removal from +Node Core. This API was critical for versions of `graceful-fs@<4`, before a +different approach was used to achieve similar ends. By upgrading this library, +and making sure all our dependencies are also updated, we've ensured npm will +continue to work once the API is finally removed. Older versions of npm, on the +other hand, will simply not work on future versions of Node.js. + +#### DEPENDENCY UPGRADES + +* [`29536f4`](https://github.com/npm/npm/commit/29536f42da6c06091c9acbc8952f72daa8a9412c) + `cmd-shim@2.0.2`: + Final straggler using `graceful-fs@<4`. + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`5f59e74`](https://github.com/npm/npm/commit/5f59e748ef4c066756bb204a452cecd0543c7a2f) + `lodash.uniq@4.1.0` + ([@jdalton](https://github.com/jdalton)) +* [`987cabe`](https://github.com/npm/npm/commit/987cabe8a18abcb5a685685958bf74c7258a979c) + `lodash.union@4.1.0` + ([@jdalton](https://github.com/jdalton)) +* [`5c641f0`](https://github.com/npm/npm/commit/5c641f05fdc153c6bb06a89c46fe2a345ce413db) + `lodash.clonedeep@4.1.0` + ([@jdalton](https://github.com/jdalton)) + +#### EVERYONE GETTING SOCKS LIKE IT'S OPRAH'S SHOW + +* [`9ea5658`](https://github.com/npm/npm/commit/9ea56582ca4d0991dbed44f992c88f08a643cb4b) + [#11410](https://github.com/npm/npm/pull/11410) + Fixed a small spelling error in `npm-config.md`. + ([@pra85](https://github.com/pra85)) +* [`2a11e56`](https://github.com/npm/npm/commit/2a11e562a14bce18b6ddca6c20d17f97b6a8ec2f) + [#11403](https://github.com/npm/npm/pull/11403) + Removes `--depth Infinity` warning from documentation -- this operation should + actually be totally safe as of `npm@3`. (The warning remains for `npm@2`.) + ([@Aourin](https://github.com/Aourin)) +* [`42a4727`](https://github.com/npm/npm/commit/42a4727bfb1e21c890b8e2babda55e06ac2bda29) + [#11391](https://github.com/npm/npm/pull/11391) + Fixed versions of `shrinkwrap.json` in examples in documentation for `npm + shrinkwrap`, which did not quite match up. + ([@xcatliu](https://github.com/xcatliu)) + +### v3.7.2 (2016-02-04): + +This week, the CLI team has been busy working on rewriting tests to support +getting coverage reports going and running all of our tests on Windows. +Meanwhile, we've got a bunch of dependency updates and one or two other +things. + +#### TESTS WENT INTO HIDING + +Last week we took a patch from [@substack](https://github.com/substack) to +stop the installer from reordering arrays in an installed module's +`package.json`... but somehow I dropped the test when I was rebasing. + +* [`21b9271`](https://github.com/npm/npm/commit/21b927182514a0ff6d9f34480bfc39f72e3e9f8c) + [#10063](https://github.com/npm/npm/issues/10063) + Restore test that verifies that we don't re-order arrays in a module's + `package.json` on install. + ([@substack](https://github.com/substack)) + +#### DOCUMENTATION FIXES + +* [`c67521d`](https://github.com/npm/npm/commit/c67521dc6c1e41d39d02c74105e41442851d23bb) + [#11348](https://github.com/npm/npm/pull/11348) + Improve the documentation around which files are ALWAYS included in published packages + and which are ALWAYS excluded. + ([@jscissr](https://github.com/jscissr)) +* [`7ef6793`](https://github.com/npm/npm/commit/7ef6793cd191cc8d88340f7e1ce9c9e3d6f0b2f4) + [#11348](https://github.com/npm/npm/pull/11348) + The release date on the 3.7.0 changelog entry was wrong. I honestly don't + know how I keep doing this. =D + ([@rafek](https://github.com/rafek)) + +#### DEPENDENCY UPDATES + +* [`8a3c80c`](https://github.com/npm/npm/commit/8a3c80c4fd3d82fe937f30bc7cbd3dee51a8a893) + `graceful-fs@4.1.3`: + Fix a bug where close wasn't getting made graceful. + ([@isaacs](https://github.com/isaacs)) + +`lodash` saw updates across most of its modules this week with browser +campatibility fixes that don't really impact us. + +* [`2df342b`](https://github.com/npm/npm/commit/2df342bf30efa99b98016acc8a5dc03e00b58b9c) + `lodash.without@4.0.2` + ([@jdalton](https://github.com/jdalton)) +* [`86aa91d`](https://github.com/npm/npm/commit/86aa91dce60f6b6a92bb3ba2bf6e6be1f6afc750) + `lodash.uniq@4.0.2` + ([@jdalton](https://github.com/jdalton)) +* [`0a94bf6`](https://github.com/npm/npm/commit/0a94bf6af0ebd38d080f92257e0cd9bae40b31ff) + `lodash.union@4.0.2` + ([@jdalton](https://github.com/jdalton)) +* [`b4c9582`](https://github.com/npm/npm/commit/b4c9582b4ef5991f3d155e0c6142ed1c631860af) + `lodash.isarguments@3.0.6` + ([@jdalton](https://github.com/jdalton)) +* [`efe766c`](https://github.com/npm/npm/commit/efe766c63c0948a4ae4c0d12f2b834629ab86e92) + `lodash.keys@4.0.2`: Minor code cleanup and the above. + ([@jdalton](https://github.com/jdalton)) +* [`36abb24`](https://github.com/npm/npm/commit/36abb24ef31017adbf325e7f833d5d4b0f03f5d4) + `lodash.clonedeep@4.0.4`: + Add support for cloning prototype objects and the above. + ([@jdalton](https://github.com/jdalton)) + +### v3.7.1 (2016-02-01): + +Super quick Monday patch on last week's release. + +If you ever wondered why we release things to the `npm@next` tag for a week +before promoting them to `npm@latest`, this is it! + +#### RELEASE TRAIN VINDICATED (again) + +* [`adcaf04`](adcaf047811dcc475ab1984fc93fe34540fc03d7) + [#11349](https://github.com/npm/npm/issues/11349) + Revert last weeks change to use JSON clone instead of `lodash.cloneDeep`. + ([@iarna](https://github.com/iarna)) + +### v3.7.0 (2016-01-29): + +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](https://github.com/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 + +* [`c680fa9`](https://github.com/npm/npm/commit/c680fa9f8135759eb5512f4b86e47fa265733f79) + `npmlog@2.0.2`: New `are-we-there-yet` with performance patches from + [@STRML](https://github.com/STRML). New `gauge` with timer churn + performance patch. + ([@iarna](https://github.com/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. + +* [`1d1ea7e`](https://github.com/npm/npm/commit/1d1ea7eeb958034878eb6573149aeecc686888d3) + [#11306](https://github.com/npm/npm/pull/11306) + Use JSON clone instead of `lodash.cloneDeep`. + ([@STRML](https://github.com/STRML)) + +#### NEW FEATURE: GIT SUBMODULE SUPPORT + +Long, long requested– the referenced issue is from 2011– we're finally +getting rudimentary git submodule support. + +* [`39dea9c`](https://github.com/npm/npm/commit/39dea9ca4216c6ea628f5ca47d2b34a4b251a1ed) + [#1876](https://github.com/npm/npm/issues/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 `.gitmodules` file. + ([@gagern](https://github.com/gagern)) + +#### ROBUSTNESS + +* [`5dec02a`](https://github.com/npm/npm/commit/5dec02a3d0e82202c021e27aff9d006283fdc25a) + [#10347](https://github.com/npm/npm/issues/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 make `npm` error out– this reduces that to a warning. + ([@evanlucas](https://github.com/evanlucas)) + +#### BUG FIXES + +* [`9ab8b8d`](https://github.com/npm/npm/commit/9ab8b8d047792612ae7f9a6079745d51d5283a53) + [#10820](https://github.com/npm/npm/issues/10820) + Fix a bug with `npm ls` where if you asked for ONLY production dependencies in output + it would exclude dependencies that were BOTH production AND development dependencies. + ([@davidvgalbraith](https://github.com/davidvgalbraith)) +* [`6803fed`](https://github.com/npm/npm/commit/6803fedadb8f9b36cd85f7338ecf75d1d183c833) + [#8982](https://github.com/npm/npm/issues/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, `npm` + would incorrectly refuse to run lifecycle scripts. + ([@elvanja](https://github.com/elvanja)) +* [`3eae40b`](https://github.com/npm/npm/commit/3eae40b7a681aa067dfe4fea8c9a76da5b508b48) + [#9253](https://github.com/npm/npm/issues/9253) + Fix a bug where, when running lifecycle scripts, if the Node.js binary you ran + `npm` with wasn't in your `PATH`, `npm` wouldn't use it to run your scripts. + ([@segrey](https://github.com/segrey)) +* [`61daa6a`](https://github.com/npm/npm/commit/61daa6ae8cbc041d3a0d8a6f8f268b47dd8176eb) + [#11014](https://github.com/npm/npm/issues/11014) + Fix a bug where running `rimraf node_modules/<package>` followed by `npm + rm --save <package>` would fail. `npm` now correctly removes the module + from your `package.json` even though it doesn't exist on disk. + ([@davidvgalbraith](https://github.com/davidvgalbraith)) +* [`a605586`](https://github.com/npm/npm/commit/a605586df134ee97c95f89c4b4bd6bc73f7aa439) + [#9679](https://github.com/npm/npm/issues/9679) + Fix a bug where `npm install --save git+https://…` would save a `https://` + url to your `package.json` which was a problem because `npm` wouldn't then + know that it was a git repo. + ([@gagern](https://github.com/gagern)) +* [`bbdc700`](https://github.com/npm/npm/commit/bbdc70024467c365cc4e06b8410947c04b6f145b) + [#10063](https://github.com/npm/npm/issues/10063) + Fix a bug where `npm` would change the order of array properties in the + `package.json` files of dependencies. `npm` adds a bunch of stuff to + `package.json` files in your `node_modules` folder 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 that `npm` itself maintains, but _is_ a problem for properties + used by other packages. + ([@substack](https://github.com/substack)) + +#### DOCS IMPROVEMENTS + +* [`2609a29`](https://github.com/npm/npm/commit/2609a2950704f577ac888668e81ba514568fab44) + [#11273](https://github.com/npm/npm/pull/11273) + Include an example of viewing package version history in the `npm view` documentation. + ([@vedatmahir](https://github.com/vedatmahir)) +* [`719ea9c`](https://github.com/npm/npm/commit/719ea9c45a5c3233f3afde043b89824aad2df0a7) + [#11272](https://github.com/npm/npm/pull/11272) + Fix typographical issue in `npm update` documentation. + ([@jonathanp](https://github.com/jonathanp)) +* [`cb9df5a`](https://github.com/npm/npm/commit/cb9df5a37091e06071d8704b629e7ebaa41c37fe) + [#11215](https://github.com/npm/npm/pull/11215) + Do not call `SEE LICENSE IN <filename>` an _SPDX expression_, as it's not. + ([@kemitchell](https://github.com/kemitchell)) +* [`f427934`](https://github.com/npm/npm/commit/f4279346c368da4bca09385f773e8eed1d389e5e) + [#11196](https://github.com/npm/npm/pull/11196) + Correct the `package.json` examples in the `npm update` documentation to actually be + valid JSON and not just JavaScript object literals. + ([@s100](https://github.com/s100)) + +#### DEPENDENCY UPDATES + +* [`a7b2407`](https://github.com/npm/npm/commit/a7b24074cb59a1ab17c0d8eff1498047e6a123e5) + `retry@0.9.0`: New features and interface agnostic refactoring. + ([@tim-kos](https://github.com/tim-kos)) +* [`220fc77`](https://github.com/npm/npm/commit/220fc7702ae3e5d601dfefd3e95c14e9b32327de) + `request@2.69.0`: + A bunch of small bug fixes and module updates. + ([@simov](https://github.com/simov)) +* [`9e5c84f`](https://github.com/npm/npm/commit/9e5c84f1903748897e54f8ff099729ff744eab0f) + `which@1.2.4`: + Update `isexe` and fix bug in `pathExt`, in which files without extensions + would sometimes be preferred to files with extensions on Windows, even though + those without extensions aren't executable. + `pathExt` is a list of extensions that are considered executable (exe, cmd, + bat, com on Windows). + ([@isaacs](https://github.com/isaacs)) +* [`375b9c4`](https://github.com/npm/npm/commit/375b9c42fe0c6de47ac2f92527354b2ea79b7968) + `rimraf@2.5.1`: Minor doc formatting fixes. + ([@isaacs](https://github.com/isaacs)) +* [`ef1971e`](https://github.com/npm/npm/commit/ef1971e6270c2bc72e6392b51a8b84f52708f7e7) + `lodash.clonedeep@4.0.2`: + Misc minor code cleanup. No functional changes. + ([@jdalton](https://github.com/jdalton)) + +### v3.6.0 (2016-01-20): + +Hi all! This is a bigger release, in part 'cause we didn't have one last +week. The most important thing you need to know is that when `npm@3.6.0` replaces +`npm@3.5.4` as `next`, `npm@3.5.4` WILL NOT be moved on to `latest`. This is due to +a packaging error that tickles bugs in some earlier releases and makes upgrades to it +from those versions break the install. + +#### NEW FEATURES‼ + +* [`ff504d4`](https://github.com/npm/npm/commit/ff504d449ea1fa996cbb02c8078964643c51e5f6) + [#8752](https://github.com/npm/npm/issues/8752) + In `npm outdated`, report symlinked packages as having a wanted & latest + version of `linked`. + ([@halhenke](https://github.com/halhenke)) +* [`f44d8c9`](https://github.com/npm/npm/commit/f44d8c9a3940f7041f8136f8754a54b13f1f9d60) + [#10775](https://github.com/npm/npm/issues/10775) + Add a success message to `adduser` / `login`. + ([@ekmartin](https://github.com/ekmartin)) +* [`3109303`](https://github.com/npm/npm/commit/310930395c9bf1577cf085b9742210bfc71bb019) + [#10043](https://github.com/npm/npm/pull/10043) + Warn if you try to use `npm run x` if you don't have a `node_modules` folder, since + whatever you're trying to do _probably_ won't work. + ([@timkrins](https://github.com/timkrins)) + +* [`9ed2849`](https://github.com/npm/npm/commit/9ed2849cd7e8cc97111dca42a940905284afe55d) + [`e9f1ad8`](https://github.com/npm/npm/commit/e9f1ad88ce58ecd111811e11afa52ac19fc8696e) + [`f10d300`](https://github.com/npm/npm/commit/f10d300e5effa7a5756c8d461eef284c283a41d1) + [`8b593d8`](https://github.com/npm/npm/commit/8b593d8d187d6ac85d2a59cbe647afb5516c1b94) + [#10717](https://github.com/npm/npm/pull/10717) + `npm version` can now take a `from-git` argument, which instructs `npm` to read the + version from git and update your `package.json` to what it finds. This is in contrast + to its normal use where `npm` _tells_ git about your new version. + ([@ekmartin](https://github.com/ekmartin)) + +#### 3.5.4 WAS NOT SO GREAT + +The `npm@3.5.4` package was missing some dependencies. Specifically, `glob` +and `has-unicode` had major release updates which meant that subdeps that +relied on older major versions couldn't use the npm supplied versions any +more, and so they needed their own copies. + +This went undetected because the actions necessary to run the tests (which +check for this sort of thing) resolved the missing modules. + +Further, it didn't have symptoms when upgrading from _most_ versions of npm. +Unfortunately, some versions had bugs that were tickled by this and resulted +in broken upgrades, most notably, `npm@3.3.12`, the version that's been in +Node.js 5. + +* [`1d3325c`](https://github.com/npm/npm/commit/1d3325c040621a4792db80fb232f4994b9d5c5f2) + [`02611c6`](https://github.com/npm/npm/commit/02611c673a4d2bbe8fcef8d48407768da31c90d2) + [`39d5fea`](https://github.com/npm/npm/commit/39d5feadefdde38d75a18f23343bc6ec37153638) + [`7d0e830`](https://github.com/npm/npm/commit/7d0e830f26c73b9d9277b29949227ba9cca27fd9) + [#11129](https://github.com/npm/npm/pull/11129) + Update the underlying dependencies to allow use for the new versions of + `glob` and `has-unicode`. + ([@iarna](https://github.com/iarna)) + +#### WHEN MISSING PATHS ARE OK + +* [`bb638fa`](https://github.com/npm/npm/commit/bb638fa4f48d24d2c9935861d5d751c5621eea49) + [#11212](https://github.com/npm/npm/pull/11212) + When trying to determine if a file was controlled by npm before going to + remove it, we check to see if it is inside any of a list of paths that npm + considers to be under its control. Not all of those paths always exist + (and that's ok!) Previously we were calling it a failure to match if ANY + of them didn't exist. We now only do so if NONE of them exist. If some + do, then we do our usual checks on them. + + This showed up as an error where you would see something like: + ``` + npm warn gentlyRm not removing /path/to/thing as it wasn't installed by /path/to/other/thing + ``` + But it totally was installed by it. + ([@iarna](https://github.com/iarna)) + +#### BETTER NODE PRE-RELEASE SUPPORT + +Historically, if you used a pre-release version of Node.js, you would get +dozens and dozens of warnings when EVERY engine check failed across all of +your modules, because `>= 0.10.0` doesn't match prereleases. + +You might find this stream of redundent warnings undesirable. I do. + +We've moved this into a SINGLE warning you'll get about using a pre-release +version of Node.js and now suppress those other warnings. + +* [`6952f79`](https://github.com/npm/npm/commit/6952f7981e451a2d599a4f513573af208bdfe103) + [#11212](https://github.com/npm/npm/pull/11212) + Engine check warnings are now issued along with any other warnings about + your tree, instead of emitting in the middle of your install (and then + disappearing behind the giant tree of stuff installed). + ([@iarna](https://github.com/iarna)) +* [`ee2ebe9`](https://github.com/npm/npm/commit/ee2ebe96fb3d105787835b72085bbd2eee66a629) + [#11212](https://github.com/npm/npm/pull/11212) + Suppress engine verification warnings about pre-release versions of Node.js. + ([@iarna](https://github.com/iarna)) +* [`135b7e0`](https://github.com/npm/npm/commit/135b7e078311e8b4e2c8e2b662eed9ba6c2e2537) + [#11212](https://github.com/npm/npm/pull/11212) + Explicitly warn, in only one place, if you are using a pre-release version + of Node.js. + ([@iarna](https://github.com/iarna)) + +#### BUG FIXES + +* [`ea331c8`](https://github.com/npm/npm/commit/ea331c82157c65f7643cd4b49fd24031c84bf601) + [#10938](https://github.com/npm/npm/issues/10938) + When removing a package, sometimes the `node_modules/.bin` wouldn't be + cleaned up entirely. This would result in package folders that contained + only a `node_modules/.bin` directory. In turn, this would result in `npm + ls` and other tools complaining about these broken directories. + To fix this, the `unbuild` step now explicitly deletes the + `node_modules/.bin` folder as its final step. + ([@chrisirhc](https://github.com/chrisirhc)) +* [`00720db`](https://github.com/npm/npm/commit/00720db2c326cf8f968c662444a4575ae8c3020a) + [#11158](https://github.com/npm/npm/pull/11158) + On Windows, the `node-gyp` wrapper would fail if your path to `node-gyp` + contained spaces. This fixes that problem by quoting use of that path. + ([@orangemocha](https://github.com/orangemocha)) +* [`69ac933`](https://github.com/npm/npm/commit/69ac9333506752bf2e5af70b3b3e03c6181de3e7) + [#11142](https://github.com/npm/npm/pull/11142) + Fix a race condition when making directories in the cache, which could + lead to `ENOENT` failures. + ([@Jimbly](https://github.com/Jimbly)) +* [`e982858`](https://github.com/npm/npm/commit/e982858d9bed65cede9cbb12df9216a4bb9e6fc9) + [#9696](https://github.com/npm/npm/issues/9696) + When replacing the `package.json` in the cache you sometimes see `EPERM` errors on + Windows that you wouldn't on Unix-like operating systems. This ignores those errors + and allows Windows to continue. Longer term, we'll be adding something to retry + these errors, but ultimately fail if there really is an ongoing permissions issue. + ([@orangemocha](https://github.com/orangemocha)) + +#### DOC CHANGES + +* [`3666081`](https://github.com/npm/npm/commit/3666081abd02184ba97a7cdb6ae238085d640b4b) + [#11188](https://github.com/npm/npm/pull/11188) + Add brief description to publish documentation of what's included in + published tarballs. + ([@beaugunderson](https://github.com/beaugunderson)) +* [`b463e34`](https://github.com/npm/npm/commit/b463e3424b296cfc4bd384fc8bfe0e2329649164) + [#11150](https://github.com/npm/npm/pull/11150) + In npm update docs, advise use of `--depth Infinity` instead of `--depth + 9999`. + ([@halhenke](https://github.com/halhenke)) +* [`382e71a`](https://github.com/npm/npm/commit/382e71a7ee5d1ca3dba55c1e753d529eb8ae6895) + [#11128](https://github.com/npm/npm/pull/11128) + In the `package.json` docs, make the reference to the "Local Paths" section + a link to it as well. + ([@orangejulius](https://github.com/orangejulius)) +* [`5277e7f`](https://github.com/npm/npm/commit/5277e7f236e8cb40d7f4a1054506f2d3d159716e) + [#11090](https://github.com/npm/npm/pull/11090) + Fix the 3.5.4 release date in CHANGELOG.md. + ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`e6d238a`](https://github.com/npm/npm/commit/e6d238a3d90beeb0af23fa75a9b5e50671d6e4c5) + [#11130](https://github.com/npm/npm/pull/11130) + Eliminate the "using npm programmatically" section from the README. The + documentation for this was removed a while ago and is unsupported. + ([@ljharb](https://github.com/ljharb)) + +#### DEPENDENCY UPDATES + +* [`b0dde5c`](https://github.com/npm/npm/commit/b0dde5c3407b58d78969d3da01af2629fcba1c73) + `config-chain@1.1.10`: Update tests for most recent version of `ini`. + ([@dominictarr](https://github.com/dominictarr)) +* [`c62f414`](https://github.com/npm/npm/commit/c62f414534971761a48ce3cbc3e25214fb09e494) + `glob@6.0.4`: Eliminated use of `util._extend`. + ([@isaacs](https://github.com/isaacs)) +* [`98a6779`](https://github.com/npm/npm/commit/98a67797978ed7ce534e16b705d3a2a9ca0e6cc1) + `lodash.clonedeep@4.0.1`: Bug fixes, including the non-linear performance + that was biting npm a while back. + ([@jdalton](https://github.com/jdalton)) +* [`0e8c4ce`](https://github.com/npm/npm/commit/0e8c4cebddaefbf5eca0abaad512db266c6722c9) + `lodash.without@4.0.1` + ([@jdalton](https://github.com/jdalton)) +* [`1fd19f5`](https://github.com/npm/npm/commit/1fd19f57a3551d7d30a6b8a9ce967ef50e0ff0ba) + `lodash.uniq@4.0.1` + ([@jdalton](https://github.com/jdalton)) +* [`b7486c5`](https://github.com/npm/npm/commit/b7486c550f3391f733d1e1907652be95fddf4368) + `lodash.union@4.0.1` + ([@jdalton](https://github.com/jdalton)) +* [`54bb591`](https://github.com/npm/npm/commit/54bb5911e18f8fb86eb94159f34b13f0c0aa2e30) + `lodash.keys@4.0.0` + ([@jdalton](https://github.com/jdalton)) +* [`26f7a7a`](https://github.com/npm/npm/commit/26f7a7aaae0575a85deba2241ee69b433dd1ba98) + `lodash.isarray@4.0.0` + ([@jdalton](https://github.com/jdalton)) +* [`ed38bd3`](https://github.com/npm/npm/commit/ed38bd3baf544dfc0630fd321d279f137700bd4d) + `lodash.isarguments@3.0.5` + ([@jdalton](https://github.com/jdalton)) + +### v3.5.4 (2016-01-07): + +I hope you all had fantastic winter holidays, if it's winter where you are +and if there are holidays‼ We went a few weeks without releases because +staff was taking time away from work here and there. A new year has come +and we're back now, and refreshed and ready to dig in! + +This week brings us a bunch of documentation improvements and some module +updates. The core team's focus continues to be on improving tests, +particularly with Windows, so there's not too much to call out here. + +#### DOCUMENTATION IMPROVEMENTS + +* [`6b0031e`](https://github.com/npm/npm/commit/6b0031e28c0b10fb2622fdadde41f5cd294348e8) + [#11044](https://github.com/npm/npm/pull/11044) + Correct documentation regarding the defaults for the `color` config option. + ([@scottaddie](https://github.com/scottaddie)) +* [`c6ce69e`](https://github.com/npm/npm/commit/c6ce69eaed7f17b5f1876ac13ecfae3d14a72f24) + [#10990](https://github.com/npm/npm/pull/10990) + Drop mentions in documentation of `process.installPrefix`, as it hasn't + been a thing since Node.js 0.6 and we don't support that. + ([@jeffmcmahan](https://github.com/jeffmcmahan)) +* [`dee92d1`](https://github.com/npm/npm/commit/dee92d1f78608a10becf57aae86d5d495f2272bd) + [#11037](https://github.com/npm/npm/pull/11037) + Clarify the documentation on the max length of the `name` property in + `package.json` files. + ([@scottaddie](https://github.com/scottaddie)) +* [`4b9d7bb`](https://github.com/npm/npm/commit/4b9d7bb1a4fc3f1edcf563379abfd2273af10881) + [#10787](https://github.com/npm/npm/pull/10787) + Make the formatting in the documentation for `npm dist-tag` more + consistent with other docs. + ([@cvrebert](https://github.com/cvrebert)) +* [`7f77a80`](https://github.com/npm/npm/commit/7f77a80d561ee4b2b8c0aba1226fe89dfe339bcd) + [#10787](https://github.com/npm/npm/pull/10787) + Add documentation to the `npm dist-tag` docs that explains in greater + detail how `latest` is different than other tags. Further, improve the + documentation with better examples. Add a discussion of common practice + for using dist tags to manage alpha's and beta's. + ([@cvrebert](https://github.com/cvrebert)) +* [`6db58dd`](https://github.com/npm/npm/commit/6db58dd0d7719c4675a239d43164edc066842b14) + [`2ee6371`](https://github.com/npm/npm/commit/2ee6371911bd3a4d566c5d7bc8734facc60cb27c) + [#10788](https://github.com/npm/npm/pull/10788) + [#10789](https://github.com/npm/npm/pull/10789) + Improve documentation cross referencing. + ([@cvrebert](https://github.com/cvrebert)) +* [`7ba629a`](https://github.com/npm/npm/commit/7ba629a2ad3eaf736529e053b533cabe3a0d7123) + [#10790](https://github.com/npm/npm/pull/10790) + Document more clearly that `npm install foo` means `npm install + foo@latest`. + ([@cvrebert](https://github.com/cvrebert)) + +#### A FEW MODULE UPDATES + +* [`fc2e8d5`](https://github.com/npm/npm/commit/fc2e8d58a91728cb06936eea686efaa4fdec3f06) + `glob@6.0.3`: Remove deprecated features and fix a bunch of bugs. + ([@isaacs](https://github.com/isaacs)) +* [`5b820c4`](https://github.com/npm/npm/commit/5b820c4e17c907fa8c23771c0cd8e74dd5fdaa51) + `has-unicode@2.0.0`: Change the default on Windows to be false, as + international Windows installs often install to non-unicode codepages and + there's no way to detect this short of a system call or a call to a + command line program. + ([@iarna](https://github.com/iarna)) +* [`238fe84`](https://github.com/npm/npm/commit/238fe84ac61297f1d71701d80368afaa40463305) + `which@1.2.1`: Fixed bugs with uid/gid checks and with quoted Windows PATH + parts. + ([@isaacs](https://github.com/isaacs)) +* [`5e510e1`](https://github.com/npm/npm/commit/5e510e13d022a22d58742b126482d3b38a14cc83) + `rimraf@2.5.0`: Add ability to disable glob support / pass in options. + ([@isaacs](https://github.com/isaacs)) +* [`7558215`](https://github.com/npm/npm/commit/755821569466b7be0883f4b0573eeb83c24109eb) + `readable-stream@2.0.5`: Minor performance improvements. + ([@calvinmetcalf](https://github.com/calvinmetcalf)) +* [`64e8499`](https://github.com/npm/npm/commit/64e84992c812a73d590be443c09a6977d0ae9040) + `fs-write-stream-atomic@1.0.8`: Rewrite to use modern streams even on 0.8 + plus a bunch of tests. + ([@iarna](https://github.com/iarna)) +* [`74d92a0`](https://github.com/npm/npm/commit/74d92a08d72ce3603244de4bb3e3706d2b928cef) + `columnify@1.5.4`: Some bug fixes around large inputs. + ([@timoxley](https://github.com/timoxley)) + +#### FIX NPM'S TESTS ON 0.8 + +This doesn't impact you as a user of npm, and ordinarily that means we +wouldn't call it out here, but if you've ever wanted to contribute, having +that green travis badge makes it a lot easier to do so with confidence! + +* [`b14cdbb`](https://github.com/npm/npm/commit/b14cdbb6002b04bfbefaff70cc45810c20d5a366) + [#10872](https://github.com/npm/npm/pull/10872) + Rewrite tests using nock to use other alternatives. + ([@zkat](https://github.com/zkat)) +* [`59ed01a`](https://github.com/npm/npm/commit/59ed01a8ea7960b1467aed52164fc36a03c77770) + [#10872](https://github.com/npm/npm/pull/10872) + Work around Node.js 0.8 http back-pressure bug. + + 0.8 http streams have a bug, where if they're paused with data in their + buffers when the socket closes, they call `end` before emptying those + buffers, which results in the entire pipeline ending and thus the point + that applied backpressure never being able to trigger a `resume`. + + We work around this by piping into a pass through stream that has + unlimited buffering. The pass through stream is from readable-stream and + is thus a current streams3 implementation that is free of these bugs even + on 0.8. + ([@iarna](https://github.com/iarna)) + +### v3.5.3 (2015-12-10): + +Did you know that Bob Ross reached the rank of master sergeant in the US Air +Force before becoming perhaps the most soothing painter of all time? + +#### TWO HAPPY LITTLE BUG FIXES + +* [`71c9590`](https://github.com/npm/npm/commit/71c9590be61b6a7b7fa8b6dc19baa588cda26a27) + [#10505](https://github.com/npm/npm/issues/10505) `npm ls --json --depth=0` + now respects the depth parameter, when it is zero and when it is not zero. + ([@MarkReeder](https://github.com/MarkReeder)) +* [`954fa67`](https://github.com/npm/npm/commit/954fa67f1ca3739992abd244e217a0aaf8465660) + [#9099](https://github.com/npm/npm/issues/9099) I had always thought you + could run `npm version` from subdirectories in your project, which is great, + because now you can. I guess I was just ahead of my time. + ([@ekmartin](https://github.com/ekmartin)) + +#### NOW PAINT IN SOME NICE DOCS CHANGES + +* [`b88c37c`](https://github.com/npm/npm/commit/b88c37c1cced40e9e41402cc54a5efc3c33cd13e) + [#10546](https://github.com/npm/npm/issues/10546) Goodbye, FAQ! You were + cheeky and fun until you weren't! Don't worry: npm still loves everyone, + especially you! ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`2d3afe9`](https://github.com/npm/npm/commit/2d3afe9644ba69681a36721e79c45d27def71939) + [#10570](https://github.com/npm/npm/issues/10570) Update documentation URLs + to be HTTPS everywhere sensible. No HTTP shall be spared! + ([@rsp](https://github.com/rsp)) +* [`6abd0e0`](https://github.com/npm/npm/commit/6abd0e0626d0f642ce0dae0e128ced80433f15a1) + [#10650](https://github.com/npm/npm/issues/10650) Correctly note that there + are two lifecycle scripts run by an install phase in an example, instead of + three. ([@eymengunay](https://github.com/eymengunay)) +* [`a5e8df5`](https://github.com/npm/npm/commit/a5e8df53b8d6d75398cb6a55a44dcf374b0f1661) + [#10687](https://github.com/npm/npm/issues/10687) `npm outdated`'s output can + be a little puzzling sometimes. I've attempted to make it clearer, with some + examples, of what's going on with "wanted" and "latest" in more cases. + ([@othiym23](https://github.com/othiym23)) +* [`8f52833`](https://github.com/npm/npm/commit/8f52833f5d15c4f94467234607d40e75198af1aa) + [#10700](https://github.com/npm/npm/issues/10700) Hey, do you remember when + `search.npmjs.org` was a thing? I think I do? The last time I used it was in + like 2012, and it's gone now, so remove it from the docs. + ([@gagern](https://github.com/gagern)) +* [`b6a53b8`](https://github.com/npm/npm/commit/b6a53b889c948053dcbf6d7aab9ad1cd4226dc32) + [npm/docs#477](https://github.com/npm/docs/issues/477) Continue to airbrush + the CLI API docs out of history. ([@verpixelt](https://github.com/verpixelt)) +* [`b835b72`](https://github.com/npm/npm/commit/b835b72d1dd23b0a17321a85d8d395322d18005d) + `semver@5.1.0`: Include BNF for SemVer expression grammar (which is also now + included in `npm help semver`). ([@isaacs](https://github.com/isaacs)) + +#### LAND YOUR DEPENDENCY UPGRADES IN PAIRS SO EVERYONE HAS A FRIEND + +* [`95e99fa`](https://github.com/npm/npm/commit/95e99faadcdc85a16210dd79c0e7d83add1b9f3e) + `request@2.67.0` ([@simov](https://github.com/simov)) +* [`b49199a`](https://github.com/npm/npm/commit/b49199ac96dfb1afe5719286621a318576dd69ae) + [isaacs/rimraf#89](https://github.com/isaacs/rimraf/pull/89) `rimraf@2.4.4` + ([@zerok](https://github.com/zerok)) +* [`6632418`](https://github.com/npm/npm/commit/66324189a734a1665e1b78a06ba44089d9c3a11c) + [npm/nopt#51](https://github.com/npm/nopt/pull/51) `nopt@3.0.6` + ([@wbecker](https://github.com/wbecker)) +* [`f0a3b3e`](https://github.com/npm/npm/commit/f0a3b3e0dbbdaf11ec55dccd59cc21bfa05f9240) + [isaacs/once#7](https://github.com/isaacs/once/pull/7) `once@1.3.3` + ([@floatdrop](https://github.com/floatdrop)) + +### v3.5.2 (2015-12-03): + +Weeeelcome to another npm release! The short version is that we fixed +some `ENOENT` and some modules that resulted in modules going missing. We +also eliminated the use of MD5 in our code base to help folks using +Node.js in FIPS mode. And we fixed a bad URL in our license file. + +#### FIX URL IN LICENSE + +The license incorrectly identified the registry URL as +`registry.npmjs.com` and this has been corrected to `registry.npmjs.org`. + +* [`cb6d81b`](https://github.com/npm/npm/commit/cb6d81bd611f68c6126a90127a9dfe5604d46c8c) + [#10685](https://github.com/npm/npm/pull/10685) + Fix npm public registry URL in notices. + ([@kemitchell](https://github.com/kemitchell)) + +#### ENOENT? MORE LIKE ENOMOREBUGS + +The headliner this week was uncovered by the fixes to bundled dependency +handling over the past few releases. What had been a frustratingly +intermittent and hard to reproduce bug became something that happened +every time in Travis. This fixes another whole bunch of errors where you +would, while running an install have it crash with an `ENOENT` on +`rename`, or the install would finish but some modules would be +mysteriously missing and you'd have to install a second time. + +What's going on was a bit involved, so bear with me: + +`npm@3` generates a list of actions to take against the tree on disk. +With the exception of lifecycle scripts, it expects these all to be able +to act independently without interfering with each other. + +This means, for instance, that one should be able to upgrade `b` in +`a→b→c` without having npm reinstall `c`. + +That works fine by the way. + +But it also means that the move action should be able to move `b` in +`a→b→c@1.0.1` to `a→d→b→c@1.0.2` without moving or removing `c@1.0.1` and +while leaving `c@1.0.2` in place if it was already installed. + +That is, the `move` action moves an individual node, replacing itself +with an empty spot if it had children. This is not, as it might first +appear, something where you move an entire branch to another location on +the tree. + +When moving `b` we already took care to leave `c@1.0.1` in place so that +other moves (or removes) could handle it, but we were stomping on the +destination and so `c@1.0.2` was being removed. + +* [`f4385d8`](https://github.com/npm/npm/commit/f4385d8e7678349e75c80fae8a1f8f366f197937) + [#10655](https://github.com/npm/npm/pull/10655) + Preserve destination `node_modules` when moving. + ([@iarna](https://github.com/iarna)) + +There was also a bug with `remove` where it was pruning the entire tree +at the remove point, prior to running moves and adds. + +This was fine most of the time, but if we were moving one of the deps out +from inside it, kaboom. + +* [`19c626d`](https://github.com/npm/npm/commit/19c626d69888f0cdc6e960254b3fdf523ec4b52c) + [#10655](https://github.com/npm/npm/pull/10655) + Get rid of the remove commit phase– we could have it prune _just_ the + module being removed, but that isn't gaining us anything. + ([@iarna](https://github.com/iarna)) + +After all that, we shouldn't be upgrading the `add` of a bundled package +to a `move`. Moves save us from having to extract the package, but with a +bundled dependency it's included in another package already so that +doesn't gain us anything. + +* [`641a93b`](https://github.com/npm/npm/commit/641a93bd66a6aa4edf2d6167344b50d1a2afb593) + [#10655](https://github.com/npm/npm/pull/10655) + Don't convert adds to moves with bundled deps. + ([@iarna](https://github.com/iarna)) + +While I was in there, I also took some time to improve diagnostics to +make this sort of thing easier to track down in the future: + +* [`a04ec04`](https://github.com/npm/npm/commit/a04ec04804e562b511cd31afe89c8ba94aa37ff2) + [#10655](https://github.com/npm/ npm/pull/10655) + Wrap rename so errors have stack traces. + ([@iarna](https://github.com/iarna)) +* [`8ea142f`](https://github.com/npm/npm/commit/8ea142f896a2764290ca5472442b27b047ab7a1a) + [#10655](https://github.com/npm/npm/pull/10655) + Add silly logging so function is debuggable + ([@iarna](https://github.com/iarna)) + +#### NO MORE MD5 + +We updated modules that had been using MD5 for non-security purposes. +While this is perfectly safe, if you compile Node in FIPS-compliance mode +it will explode if you try to use MD5. We've replaced MD5 with Murmur, +which conveys our intent better and is faster to boot. + +* [`f068b26`](https://github.com/npm/npm/commit/f068b2661a8d0269c184867e003cd08cb6c56cf2) + [#10629](https://github.com/npm/npm/issues/10629) + `unique-filename@1.1.0` + ([@iarna](https://github.com/iarna)) +* [`dba1b24`](https://github.com/npm/npm/commit/dba1b2402aaa2beceec798d3bd22d00650e01069) + [#10629](https://github.com/npm/npm/issues/10629) + `write-file-atomic@1.1.4` + ([@othiym23](https://github.com/othiym23)) +* [`8347a30`](https://github.com/npm/npm/commit/8347a308ef0d2cf0f58f96bba3635af642ec611f) + [#10629](https://github.com/npm/npm/issues/10629) + `fs-write-stream-atomic@1.0.5` + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`9e2a2bb`](https://github.com/npm/npm/commit/9e2a2bb5bc71a0ab3b3637e8eec212aa22d5c99f) + [nodejs/node-gyp#831](https://github.com/nodejs/node-gyp/pull/831) + `node-gyp@3.2.1`: + Improved \*BSD support. + ([@bnoordhuis](https://github.com/bnoordhuis)) + +### v3.5.1 (2015-11-25): + +#### THE npm CLI !== THE npm REGISTRY !== npm, INC. + +npm-the-CLI is licensed under the terms of the [Artistic License +2.0](https://github.com/npm/npm/blob/8d79c1a39dae908f27eaa37ff6b23515d505ef29/LICENSE), +which is a liberal open-source license that allows you to take this code and do +pretty much whatever you like with it (that is, of course, not legal language, +and if you're doing anything with npm that leaves you in doubt about your legal +rights, please seek the review of qualified counsel, which is to say, not +members of the CLI team, none of whom have passed the bar, to my knowledge). At +the same time the primary registry the CLI uses when looking up and downloading +packages is a commercial service run by npm, Inc., and it has its own [Terms of +Use](https://www.npmjs.com/policies/terms). + +Aside from clarifying the terms of use (and trying to make sure they're more +widely known), the only recent changes to npm's licenses have been making the +split between the CLI and registry clearer. You are still free to do whatever +you like with the CLI's source, and you are free to view, download, and publish +packages to and from `registry.npmjs.org`, but now the existing terms under +which you can do so are more clearly documented. Aside from the two commits +below, see also [the release notes for +`npm@3.4.1`](https://github.com/npm/npm/releases/tag/v3.4.1), which is where +the split between the CLI's code and the terms of use for the registry was +first made more clear. + +* [`35a5dd5`](https://github.com/npm/npm/commit/35a5dd5abbfeec4f98a2b4534ec4ef5d16760581) + [#10532](https://github.com/npm/npm/issues/10532) Clarify that + `registry.npmjs.org` is the default, but that you're free to use the npm CLI + with whatever registry you wish. ([@kemitchell](https://github.com/kemitchell)) +* [`fa6b013`](https://github.com/npm/npm/commit/fa6b0136a0e4a19d8979b2013622e5ff3f0446f8) + [#10532](https://github.com/npm/npm/issues/10532) Having semi-duplicate + release information in `README.md` was confusing and potentially inaccurate, + so remove it. ([@kemitchell](https://github.com/kemitchell)) + +#### EASE UP ON WINDOWS BASH USERS + +It turns out that a fair number of us use bash on Windows (through MINGW or +bundled with Git, plz – Cygwin is still a bridge too far, for both npm and +Node.js). [@jakub-g](https://github.com/jakub-g) did us all a favor and relaxed +the check for npm completion to support MINGW bash. Thanks, Jakub! + +* [`09498e4`](https://github.com/npm/npm/commit/09498e45c5c9e683f092ab1372670f81db4762b6) + [#10156](https://github.com/npm/npm/issues/10156) completion: enable on + Windows in git bash ([@jakub-g](https://github.com/jakub-g)) + +#### THE ONGOING SAGA OF BUNDLED DEPENDENCIES + +`npm@3.5.0` fixed up a serious issue with how `npm@3.4.1` (and potentially +`npm@3.4.0` and `npm@3.3.12`) handled the case in which dependencies bundled +into a package tarball are handled improperly when one or more of their own +dependencies are older than what's latest on the registry. Unfortunately, in +fixing that (quite severe) regression (see [`npm@3.5.0`'s release notes' for +details](https://github.com/npm/npm/releases/tag/v3.5.0)), we introduced a new +(small, and fortunately cosmetic) issue where npm superfluously warns you about +bundled dependencies being stale. We have now fixed that, and hope that we +haven't introduced any _other_ regressions in the process. :D + +* [`20824a7`](https://github.com/npm/npm/commit/20824a75bf7639fb0951a588e3c017a370ae6ec2) + [#10501](https://github.com/npm/npm/issues/10501) Only warn about replacing + bundled dependencies when actually doing so. ([@iarna](https://github.com/iarna)) + +#### MAKE NODE-GYP A LITTLE BLUER + +* [`1d14d88`](https://github.com/npm/npm/commit/1d14d882c3b5af0a7fee46e8e0e343d07e4c38cb) + `node-gyp@3.2.0`: Support AIX, use `which` to find Python, updated to a newer + version of `gyp`, and more! ([@bnoordhuis](https://github.com/bnoordhuis)) + +#### A BOUNTEOUS THANKSGIVING CORNUCOPIA OF DOC TWEAKS + +These are great! Keep them coming! Sorry for letting them pile up so deep, +everybody. Also, a belated Thanksgiving to our Canadian friends, and a happy +Thanksgiving to all our friends in the USA. + +* [`4659f1c`](https://github.com/npm/npm/commit/4659f1c5ad617c46a5e89b48abf0b1c4e6f04307) + [#10244](https://github.com/npm/npm/issues/10244) In `npm@3`, `npm dedupe` + doesn't take any arguments, so update documentation to reflect that. + ([@bengotow](https://github.com/bengotow)) +* [`625a7ee`](https://github.com/npm/npm/commit/625a7ee6b4391e90cb28a95f20a73fd794e1eebe) + [#10250](https://github.com/npm/npm/issues/10250) Correct order of `org:team` + in `npm team` documentation. ([@louislarry](https://github.com/louislarry)) +* [`bea7f87`](https://github.com/npm/npm/commit/bea7f87399d784e3a6d3393afcca658a61a40d77) + [#10371](https://github.com/npm/npm/issues/10371) Remove broken / duplicate + link to tag. ([@WickyNilliams](https://github.com/WickyNilliams)) +* [`0a25e29`](https://github.com/npm/npm/commit/0a25e2956e9ddd4065d6bd929559321afc512fde) + [#10419](https://github.com/npm/npm/issues/10419) Remove references to + nonexistent `npm-rm(1)` documentation. ([@KenanY](https://github.com/KenanY)) +* [`19b94e1`](https://github.com/npm/npm/commit/19b94e1e6781fe2f98ada0a3f49a1bda25e3e32d) + [#10474](https://github.com/npm/npm/issues/10474) Clarify that install finds + dependencies in `package.json`. ([@sleekweasel](https://github.com/sleekweasel)) +* [`b25efc8`](https://github.com/npm/npm/commit/b25efc88067c843ffdda86ea0f50f95d136a638e) + [#9948](https://github.com/npm/npm/issues/9948) Encourage users to file an + issue, rather than emailing authors. ([@trodrigues](https://github.com/trodrigues)) +* [`24f4ced`](https://github.com/npm/npm/commit/24f4cedc83b10061f26362bf2f005ab935e0cbfe) + [#10497](https://github.com/npm/npm/issues/10497) Clarify what a package is + slightly. ([@aredridel](https://github.com/aredridel)) +* [`e8168d4`](https://github.com/npm/npm/commit/e8168d40caae00b2914ea09dbe4bd1b09ba3dcd5) + [#10539](https://github.com/npm/npm/issues/10539) Remove an extra, spuriously + capitalized letter. ([@alexlukin-softgrad](https://github.com/alexlukin-softgrad)) + +### v3.5.0 (2015-11-19): + +#### TEEN ORCS AT THE GATES + +This week heralds the general release of the primary npm registry's [new +support for private packages for +organizations](http://blog.npmjs.org/post/133542170540/private-packages-for-organizations). +For many potential users, it's the missing piece needed to make it easy for you +to move your organization's private work onto npm. And now it's here! The +functionality to support it has been in place in the CLI for a while now, +thanks to [@zkat](https://github.com/zkat)'s hard work. + +During our final testing before the release, our ace support team member +[@snopeks](https://github.com/snopeks) noticed that there had been some drift +between the CLI team's implementation and what npm was actually preparing to +ship. In the interests of everyone having a smooth experience with this +_extremely useful_ new feature, we quickly made a few changes to square up the +CLI and the web site experiences. + +* [`d7fb92d`](https://github.com/npm/npm/commit/d7fb92d1c53ba5196ad6dd2101a06792a4c0412b) + [#9327](https://github.com/npm/npm/issues/9327) `npm access` no longer has + problems when run in a directory that doesn't contain a `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`17df3b5`](https://github.com/npm/npm/commit/17df3b5d5dffb2e9c223b9cfa2d5fd78c39492a4) + [npm/npm-registry-client#126](https://github.com/npm/npm-registry-client/issues/126) + `npm-registry-client@7.0.8`: Allow the CLI to grant, revoke, and list + permissions on unscoped (public) packages on the primary registry. + ([@othiym23](https://github.com/othiym23)) + +#### NON-OPTIONAL INSTALLS, DEFINITELY NON-OPTIONAL + +* [`180263b`](https://github.com/npm/npm/commit/180263b) + [#10465](https://github.com/npm/npm/pull/10465) + When a non-optional dep fails, we check to see if it's only required by + ONLY optional dependencies. If it is, we make it fail all the deps in + that chain (and roll them back). If it isn't then we give an error. + + We do this by walking up through all of our ancestors until we either hit an + optional dependency or the top of the tree. If we hit the top, we know to + give the error. + + If you installed a module by hand but didn't `--save` it, your module + won't have the top of the tree as an anscestor and so this code was + failing to abort the install with an error + + This updates the logic so that hitting the top OR a module that was + requested by the user will trigger the error message. + ([@iarna](https://github.com/iarna)) + +* [`b726a0e`](https://github.com/npm/npm/commit/b726a0e) + [#9204](https://github.com/npm/npm/issues/9204) + Ideally we would like warnings about your install to come AFTER the + output from your compile steps or the giant tree of installed modules. + + To that end, we've moved warnings about failed optional deps to the show + after your install completes. + ([@iarna](https://github.com/iarna)) + +#### OVERRIDING BUNDLING + +* [`aed71fb`](https://github.com/npm/npm/commit/aed71fb) + [#10482](https://github.com/npm/npm/issues/10482) + We've been in our bundled modules code a lot lately, and our last go at + this introduced a new bug, where if you had a module `a` that bundled + a module `b`, which in turn required `c`, and the version of `c` that + got bundled wasn't compatible with `b`'s `package.json`, we would then + install a compatible version of `c`, but also erase `b` at the same time. + + This fixes that. It also reworks our bundled module support to be much + closer to being in line with how we handle non-bundled modules and we're + hopeful this will reduce any future errors around them. The new structure + is hopefully much easier to reason about anyway. + ([@iarna](https://github.com/iarna)) + +#### A BRIEF NOTE ON NPM'S BACKWARDS COMPATIBILITY + +We don't often have much to say about the changes we make to our internal +testing and tooling, but I'm going to take this opportunity to reiterate that +npm tries hard to maintain compatibility with a wide variety of Node versions. +As this change shows, we want to ensure that npm works the same across: + +* Node.js 0.8 +* Node.js 0.10 +* Node.js 0.12 +* the latest io.js release +* Node.js 4 LTS +* Node.js 5 + +Contributors who send us pull requests often notice that it's very rare that +our tests pass across all of those versions (ironically, almost entirely due to +the packages we use for testing instead of any issues within npm itself). We're +currently beginning an effort, lasting the rest of 2015, to clean up our test +suite, and not only get it passing on all of the above versions of Node.js, but +working solidly on Windows as well. This is a compounding form of technical +debt that we're finally paying down, and our hope is that cleaning up the tests +will produce a more robust CLI that's a lot easier to write patches for. + +* [`791ec6b`](https://github.com/npm/npm/commit/791ec6b1bac0d1df59f5ebb4ccd16a29a5dc73f0) + [#10233](https://github.com/npm/npm/issues/10233) Update Node.js versions + that Travis uses to test npm. ([@iarna](https://github.com/iarna)) + +#### 0.8 + npm <1.4 COMPATIBLE? SURE WHY NOT + +Hey, you found the feature we added! + +* [`231c58a`](https://github.com/npm/npm/commit/231c58a) + [#10337](https://github.com/npm/npm/pull/10337) + Add two new flags, first `--legacy-bundling` which installs your + dependencies such that if you bundle those dependencies, npm versions + prior to `1.4` can still install them. This eliminates all automatic + deduping. + + Second, `--global-style` which will install modules in your `node_modules` + folder with the same layout as global modules. Only your direct + dependencies will show in `node_modules` and everything they depend on + will be flattened in their `node_modules` folders. This obviously will + elminate some deduping. + ([@iarna](https://github.com/iarna)) + +#### TYPOS IN THE LICENSE, OH MY + +* [`8d79c1a`](https://github.com/npm/npm/commit/8d79c1a39dae908f27eaa37ff6b23515d505ef29) + [#10478](https://github.com/npm/npm/issues/10478) Correct two typos in npm's + LICENSE. ([@jorrit](https://github.com/jorrit)) + +### v3.4.1 (2015-11-12): + +#### ASK FOR NOTHING, GET LATEST + +When you run `npm install foo`, you probably expect that you'll get the +`latest` version of `foo`, whatever that is. And good news! That's what +this change makes it do. + +We _think_ this is what everyone wants, but if this causes problems for +you, we want to know! If it proves problematic for people we will consider +reverting it (preferrably before this becomes `npm@latest`). + +Previously, when you ran `npm install foo` we would act as if you typed +`npm install foo@*`. Now, like any range-type specifier, in addition to +matching the range, it would also have to be `<=` the value of the +`latest` dist-tag. Further, it would exclude prerelease versions from the +list of versions considered for a match. + +This worked as expected most of the time, unless your `latest` was a +prerelease version, in which case that version wouldn't be used, to +everyone's surprise. Worse, if all your versions were prerelease versions +it would just refuse to install anything. (We fixed that in +[`npm@3.2.2`](https://github.com/npm/npm/releases/tag/v3.2.2) with +[`e4a38080`](https://github.com/npm/npm/commit/e4a38080).) + +* [`1e834c2`](https://github.com/npm/npm/commit/1e834c2) + [#10189](https://github.com/npm/npm/issues/10189) + `npm-package-arg@4.1.0` Change the default version from `*` to `latest`. + ([@zkat](https://github.com/zkat)) + +#### BUGS + +* [`bec4a84`](https://github.com/npm/npm/commit/bec4a84) + [#10338](https://github.com/npm/npm/pull/10338) + Failed installs could result in more rollback (removal of just installed + packages) than we intended. This bug was first introduced by + [`83975520`](https://github.com/npm/npm/commit/83975520). + ([@iarna](https://github.com/iarna)) +* [`06c732f`](https://github.com/npm/npm/commit/06c732f) + [#10338](https://github.com/npm/npm/pull/10338) + Updating a module could result in the module stealing some of its + dependencies from the top level, potentially breaking other modules or + resulting in many redundent installations. This bug was first introduced + by [`971fd47a`](https://github.com/npm/npm/commit/971fd47a). + ([@iarna](https://github.com/iarna)) +* [`5653366`](https://github.com/npm/npm/commit/5653366) + [#9980](https://github.com/npm/npm/issues/9980) + npm, when removing a module, would refuse to remove the symlinked + binaries if the module itself was symlinked as well. npm goes to some + effort to ensure that it doesn't remove things that aren't is, and this + code was being too conservative. This code has been rewritten to be + easier to follow and to be unit-testable. + ([@iarna](https://github.com/iarna)) + +#### LICENSE CLARIFICATION + +* [`80acf20`](https://github.com/npm/npm/commit/80acf20) + [#10326](https://github.com/npm/npm/pull/10326) + Update npm's licensing to more completely cover all of the various + things that are npm. + ([@kemitchell](https://github.com/kemitchell)) + +#### CLOSER TO GREEN TRAVIS + +* [`fc12da9`](https://github.com/npm/npm/commit/fc12da9) + [#10232](https://github.com/npm/npm/pull/10232) + `nock@1.9.0` + Downgrade nock to a version that doesn't depend on streams2 in core so + that more of our tests can pass in 0.8. + ([@iarna](https://github.com/iarna)) + +### v3.4.0 (2015-11-05): + +#### A NEW FEATURE + +This was a group effort, with [@isaacs](https://github.com/isaacs) +dropping the implementation in back in August. Then, a few days ago, +[@ashleygwilliams](https://github.com/ashleygwilliams) wrote up docs and +just today [@othiym23](https://github.com/othiym23) wrote a test. + +It's a handy shortcut to update a dependency and then make sure tests +still pass. + +This new command: + +``` +npm install-test x +``` + +is the equivalent of running: + +``` +npm install x && npm test +``` + +* [`1ac3e08`](https://github.com/npm/npm/commit/1ac3e08) + [`bcb04f6`](https://github.com/npm/npm/commit/bcb04f6) + [`b6c17dd`](https://github.com/npm/npm/commit/b6c17dd) + [#9443](https://github.com/npm/npm/pull/9443) + Add `npm install-test` command, alias `npm it`. + ([@isaacs](https://github.com/isaacs), + [@ashleygwilliams](https://github.com/ashleygwilliams), + [@othiym23](https://github.com/othiym23)) + +#### BUG FIXES VIA DEPENDENCY UPDATES + +* [`31c0080`](https://github.com/npm/npm/commit/31c0080) + [#8640](https://github.com/npm/npm/issues/8640) + [npm/normalize-package-data#69](https://github.com/npm/normalize-package-data/pull/69) + `normalize-package-data@2.3.5`: + Fix a bug where if you didn't specify the name of a scoped module's + binary, it would install it such that it was impossible to call it. + ([@iarna](https://github.com/iarna)) +* [`02b37bc`](https://github.com/npm/npm/commit/02b37bc) + [npm/fstream-npm#14](https://github.com/npm/fstream-npm/pull/14) + `fstream-npm@1.0.7`: + Only filter `config.gypi` when it's in the build directory. + ([@mscdex](https://github.com/mscdex)) +* [`accb9d2`](https://github.com/npm/npm/commit/accb9d2) + [npm/fstream-npm#15](https://github.com/npm/fstream-npm/pull/15) + `fstream-npm@1.0.6`: + Stop including directories that happened to have names matching whitelisted + npm files in npm module tarballs. The most common cause was that if you had + a README directory then everything in it would be included if wanted it + or not. + ([@taion](https://github.com/taion)) + +#### DOCUMENTATION FIXES + +* [`7cf6366`](https://github.com/npm/npm/commit/7cf6366) + [#10036](https://github.com/npm/npm/pull/10036) + Fix typo / over-abbreviation. + ([@ifdattic](https://github.com/ifdattic)) +* [`d0ad8f4`](https://github.com/npm/npm/commit/d0ad8f4) + [#10176](https://github.com/npm/npm/pull/10176) + Fix broken link, scopes => scope. + ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`d623783`](https://github.com/npm/npm/commit/d623783) + [#9460](https://github.com/npm/npm/issue/9460) + Specifying the default command run by "npm start" and the + fact that you can pass it arguments. + ([@JuanCaicedo](https://github.com/JuanCaicedo)) + +#### DEPENDENCY UPDATES FOR THEIR OWN SAKE + +* [`0a4c29e`](https://github.com/npm/npm/commit/0a4c29e) + [npm/npmlog#19](https://github.com/npm/npmlog/pull/19) + `npmlog@2.0.0`: Make it possible to emit log messages with `error` as the + prefix. + ([@bengl](https://github.com/bengl)) +* [`9463ce9`](https://github.com/npm/npm/commit/9463ce9) + `read-package-json@2.0.2`: + Minor cleanups. + ([@KenanY](https://github.com/KenanY)) + +### v3.3.12 (2015-11-02): + +Hi, a little hot-fix release for a bug introduced in 3.3.11. The ENOENT fix +last week ([`f0e2088`](https://github.com/npm/npm/commit/f0e2088)) broke +upgrades of modules that have bundled dependencies (like `npm`, augh!) + +* [`aedf7cf`](https://github.com/npm/npm/commit/aedf7cf) + [#10192](//github.com/npm/npm/pull/10192) + If a bundled module is going to be replacing a module that's currently on + disk (for instance, when you upgrade a module that includes bundled + dependencies) we want to select the version from the bundle in preference + over the one that was there previously. + ([@iarna](https://github.com/iarna)) + +### v3.3.11 (2015-10-29): + +This is a dependency update week, so that means no PRs from our lovely +users. Look for those next week. As it happens, the dependencies updated +were just devdeps, so nothing for you all to worry about. + +But the bug fixes, oh geez, I tracked down some really long standing stuff +this week!! The headliner is those intermittent `ENOENT` errors that no one +could reproduce consistently? I think they're nailed! But also pretty +important, the bug where `hapi` would install w/ a dep missing? Squashed! + +#### EEEEEEENOENT + +* [`f0e2088`](https://github.com/npm/npm/commit/f0e2088) + [#10026](https://github.com/npm/npm/issues/10026) + Eliminate some, if not many, of the `ENOENT` errors `npm@3` has seen over + the past few months. This was happening when npm would, in its own mind, + correct a bundled dependency, due to a `package.json` specifying an + incompatible version. Then, when npm extracted the bundled version, what + was on disk didn't match its mind and… well, when it tried to act on what + was in its mind, we got an `ENOENT` because it didn't actually exist on + disk. + ([@iarna](https://github.com/iarna)) + +#### PARTIAL SHRINKWRAPS, NO LONGER A BAD DAY + +* [`712fd9c`](https://github.com/npm/npm/commit/712fd9c) + [#10153](https://github.com/npm/npm/pull/10153) + Imagine that you have a module, let's call it `fun-time`, and it depends + on two dependencies, `need-fun@1` and `need-time`. Further, `need-time` + requires `need-fun@2`. So after install the logical tree will look like + this: + + ``` + fun-time + ├── need-fun@1 + └── need-time + └── need-fun@2 + ``` + + Now, the `fun-time` author also distributes a shrinkwrap, but it only includes + the `need-fun@1` in it. + + Resolving dependencies would look something like this: + + 1. Require `need-fun@1`: Use version from shrinkwrap (ignoring version) + 2. Require `need-time`: User version in package.json + 1. Require `need-fun@2`: Use version from shrinkwrap, which oh hey, is + already installed at the top level, so no further action is needed. + + Which results in this tree: + + ``` + fun-time + ├── need-fun@1 + └── need-time + ``` + + We're ignoring the version check on things specified in the shrinkwrap + so that you can override the version that will be installed. This is + because you may want to use a different version than is specified + by your dependencies' dependencies' `package.json` files. + + To fix this, we now only allow overrides of a dependency version when + that dependency is a child (in the tree) of the thing that requires it. + This means that when we're looking for `need-fun@2` we'll see `need-fun@1` + and reject it because, although it's from a shrinkwrap, it's parent is + `fun-time` and the package doing the requiring is `need-time`. + + ([@iarna](https://github.com/iarna)) + +#### STRING `package.bin` AND NON-NPMJS REGISTRIES + +* [`3de1463`](https://github.com/npm/npm/commit/3de1463) + [#9187](https://github.com/npm/npm/issues/9187) + If you were using a module with the `bin` field in your `package.json` set + to a string on a non-npmjs registry then npm would crash, due to the our + expectation that the `bin` field would be an object. We now pass all + `package.json` data through a routine that normalizes the format, + including the `bin` field. (This is the same routine that your + `package.json` is passed through when read off of disk or sent to the + registry for publication.) Doing this also ensures that older modules on + npm's own registry will be treated exactly the same as new ones. (In the + past we weren't always super careful about scrubbing `package.json` data + on publish. And even when we were, those rules have subtly changed over + time.) + ([@iarna](https://github.com/iarna)) + +### v3.3.10 (2015-10-22): + +Hey you all! Welcome to a busy bug fix and PR week. We've got changes +to how `npm install` replaces dependencies during updates, improvements +to shrinkwrap behavior, and all sorts of doc updates. + +In other news, `npm@3` landed in node master in preparation for `node@5` +with [`41923c0`](https://github.com/nodejs/node/commit/41923c0). + +#### UPDATED DEPS NOW MAKE MORE SENSE + +* [`971fd47`](https://github.com/npm/npm/commit/971fd47) + [#9929](https://github.com/npm/npm/pull/9929) + Make the tree more consistent by doing updates in place. This means + that trees after a dependency version update will more often look + the same as after a fresh install. + ([@iarna](https://github.com/iarna)) + +#### SHRINKWRAP + DEV DEPS NOW RESPECTED + +* [`eb28a8c`](https://github.com/npm/npm/commit/eb28a8c) + [#9647](https://github.com/npm/npm/issues/9647) + If a shrinkwrap already has dev deps, don't throw them away when + someone later runs `npm install --save`. + ([@iarna](https://github.com/iarna)) + +#### FANTASTIC DOCUMENTATION UPDATES + +* [`291162c`](https://github.com/npm/npm/commit/291162c) + [#10021](https://github.com/npm/npm/pull/10021) + Improve wording in the FAQ to be more empathetic and less jokey. + ([@TaMe3971](https://github.com/TaMe3971)) +* [`9a28c54`](https://github.com/npm/npm/commit/9a28c54) + [#10020](https://github.com/npm/npm/pull/10020) + Document the command to see the list of config defaults in the section + on config defaults. + ([@lady3bean](https://github.com/lady3bean)) +* [`8770b0a`](https://github.com/npm/npm/commit/8770b0a) + [#7600](https://github.com/npm/npm/issues/7600) + Add shortcuts to all command documentation. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`e9b7d0d`](https://github.com/npm/npm/commit/e9b7d0d) + [#9950](https://github.com/npm/npm/pull/9950) + On errors that can be caused by outdated node & npm, suggest updating + as a part of the error message. + ([@ForbesLindesay](https://github.com/ForbesLindesay)) + +#### NEW STANDARD HAS ALWAYS BEEN STANDARD + +* [`40c1b0f`](https://github.com/npm/npm/commit/40c1b0f) + [#9954](https://github.com/npm/npm/pull/9954) + Update to `standard@5` and reformat the source to work with it. + ([@cbas](https://github.com/cbas)) + +### v3.3.9 (2015-10-15): + +This week sees a few small changes ready to land: + +#### TRAVIS NODE 0.8 BUILDS REJOICE + +* [`25a234b`](https://github.com/npm/npm/commit/25a234b) + [#9668](https://github.com/npm/npm/issues/9668) + Install `npm@3`'s bundled dependencies with `npm@2`, so that the ancient npm + that ships with node 0.8 can install `npm@3` directly. + ([@othiym23](https://github.com/othiym23)) + +#### SMALL ERROR MESSAGE IMPROVEMENT + +* [`a332f61`](https://github.com/npm/npm/commit/a332f61) + [#9927](https://github.com/npm/npm/pull/9927) + Update error messages where we report a list of versions that you could + have installed to show this as a comma separated list instead of as JSON. + ([@iarna](https://github.com/iarna)) + +#### DEPENDENCY UPDATES + +* [`4cd74b0`](https://github.com/npm/npm/commit/4cd74b0) + `nock@2.15.0` + ([@pgte](https://github.com/pgte)) +* [`9360976`](https://github.com/npm/npm/commit/9360976) + `tap@2.1.1` + ([@isaacs](https://github.com/isaacs)) +* [`1ead0a4`](https://github.com/npm/npm/commit/1ead0a4) + `which@1.2.0` + ([@isaacs](https://github.com/isaacs)) +* [`759f88a`](https://github.com/npm/npm/commit/759f88a) + `has-unicode@1.0.1` + ([@iarna](https://github.com/iarna)) + +### v3.3.8 (2015-10-12): + +This is a small update release, we're reverting +[`22a3af0`](https://github.com/npm/npm/commit/22a3af0) from last week's +release, as it is resulting in crashes. We'll revisit this PR during this +week. + +* [`ddde1d5`](https://github.com/npm/npm/commit/ddde1d5) + Revert "lifecycle: Swap out custom logic with add-to-path module" + ([@iarna](https://github.com/iarna)) + +### v3.3.7 (2015-10-08): + +So, as Kat mentioned in last week's 2.x release, we're now swapping weeks +between accepting PRs and doing dependency updates, in an effort to keep +release management work from taking over our lives. This week is a PR week, +so we've got a bunch of goodies for you. + +Relatedly, this week means 3.3.6 is now `latest` and it is WAY faster than +previous 3.x releases. Give it or this a look! + +#### OPTIONAL DEPS, MORE OPTIONAL + +* [`2289234`](https://github.com/npm/npm/commit/2289234) + [#9643](https://github.com/npm/npm/issues/9643) + [#9664](https://github.com/npm/npm/issues/9664) + `npm@3` was triggering `npm@2`'s build mechanics when it was linking bin files + into the tree. This was originally intended to trigger rebuilds of + bundled modules, but `npm@3`'s flat module structure confused it. This + caused two seemingly unrelated issues. First, failing optional + dependencies could under some circumstances (if they were built during + this phase) trigger a full build failure. And second, rebuilds were being + triggered of already installed modules, again, in some circumstances. + Both of these are fixed by disabling the `npm@2` mechanics and adding a + special rebuild phase for the initial installation of bundled modules. + ([@iarna](https://github.com/iarna)) + +#### BAD NAME, NO CRASH + +* [`b78fec9`](https://github.com/npm/npm/commit/b78fec9) + [#9766](https://github.com/npm/npm/issues/9766) + Refactor all attempts to read the module name or package name to go via a + single function, with appropriate guards unusual circumstances where they + aren't where we expect them. This ultimately will ensure we don't see any + more recurrences of the `localeCompare` error and related crashers. + ([@iarna](https://github.com/iarna)) + +#### MISCELLANEOUS BUG FIXES + +* [`22a3af0`](https://github.com/npm/npm/commit/22a3af0) + [#9553](https://github.com/npm/npm/pull/9553) + Factor the lifecycle code to manage paths out into its own module and use that. + ([@kentcdodds](https://github.com/kentcdodds)) +* [`6a29fe3`](https://github.com/npm/npm/commit/6a29fe3) + [#9677](https://github.com/npm/npm/pull/9677) + Start testing our stuff in node 4 on travis + ([@fscherwi](https://github.com/fscherwi)) +* [`508c6a4`](https://github.com/npm/npm/commit/508c6a4) + [#9669](https://github.com/npm/npm/issues/9669) + Make `recalculateMetadata` more resilient to unexpectedly bogus dependency specifiers. + ([@tmct](https://github.com/tmct)) +* [`3c44763`](https://github.com/npm/npm/commit/3c44763) + [#9643](https://github.com/npm/npm/issues/9463) + Update `install --only` to ignore the `NODE_ENV` var and _just_ use the only + value, if specified. + ([@watilde](https://github.com/watilde)) +* [`87336c3`](https://github.com/npm/npm/commit/87336c3) + [#9879](https://github.com/npm/npm/pull/9879) + `npm@3`'s shrinkwrap was refusing to shrinkwrap if an optional dependency + was missing– patch it to allow this. + ([@mantoni](https://github.com/mantoni)) + +#### DOCUMENTATION UPDATES + +* [`82659fd`](https://github.com/npm/npm/commit/82659fd) + [#9208](https://github.com/npm/npm/issues/9208) + Correct the npm style guide around quote usage + ([@aaroncrows](https://github.com/aaroncrows)) +* [`a69c83a`](https://github.com/npm/npm/commit/a69c83a) + [#9645](https://github.com/npm/npm/pull/9645) + Fix spelling error in README + ([@dkoleary88](https://github.com/dkoleary88)) +* [`f2cf054`](https://github.com/npm/npm/commit/f2cf054) + [#9714](https://github.com/npm/npm/pull/9714) + Fix typos in our documentation + ([@reggi](https://github.com/reggi)) +* [`7224bef`](https://github.com/npm/npm/commit/7224bef) + [#9759](https://github.com/npm/npm/pull/9759) + Fix typo in npm-team docs + ([@zkat](https://github.com/zkat)) +* [`7e6e007`](https://github.com/npm/npm/commit/7e6e007) + [#9820](https://github.com/npm/npm/pull/9820) + Correct documentation as to `binding.gyp` + ([@KenanY](https://github.com/KenanY)) + +### v3.3.6 (2015-09-30): + +I have the most exciting news for you this week. YOU HAVE NO IDEA. Well, +ok, maybe you do if you follow my twitter. + +Performance just got 5 bazillion times better (under some circumstances, +ymmv, etc). So– my test scenario is our very own website. In `npm@2`, on my +macbook running `npm ls` takes about 5 seconds. Personally it's more than +I'd like, but it's entire workable. In `npm@3` it has been taking _50_ seconds, +which is appalling. But after doing some work on Monday isolating the performance +issues I've been able to reduce `npm@3`'s run time back down to 5 seconds. + +Other scenarios were even worse, there was one that until now in `npm@3` that +took almost 6 minutes, and has been reduced to 14 seconds. + +* [`7bc0d4c`](https://github.com/npm/npm/commit/7bc0d4c) + [`cf42217`](https://github.com/npm/npm/commit/cf42217) + [#8826](https://github.com/npm/npm/issues/8826) + Stop using deepclone on super big datastructures. Avoid cloning + all-together even when that means mutating things, when possible. + Otherwise use a custom written tree-copying function that understands + the underlying datastructure well enough to only copy what we absolutely + need to. + ([@iarna](https://github.com/iarna)) + +In other news, look for us this Friday and Saturday at the amazing +[Open Source and Feelings](https://osfeels.com) conference, where something like a +third of the company will be attending. + +#### And finally a dependency update + +* [`a6a4437`](https://github.com/npm/npm/commit/a6a4437) + `glob@5.0.15` + ([@isaacs](https://github.com/isaacs)) + +#### And some subdep updates + +* [`cc5e6a0`](https://github.com/npm/npm/commit/cc5e6a0) + `hoek@2.16.3` + ([@nlf](https://github.com/nlf)) +* [`912a516`](https://github.com/npm/npm/commit/912a516) + `boom@2.9.0` + ([@arb](https://github.com/arb)) +* [`63944e9`](https://github.com/npm/npm/commit/63944e9) + `bluebird@2.10.1` + ([@petkaantonov](https://github.com/petkaantonov)) +* [`ef16003`](https://github.com/npm/npm/commit/ef16003) + `mime-types@2.1.7` & `mime-db@1.19.0` + ([@dougwilson](https://github.com/dougwilson)) +* [`2b8c0dd`](https://github.com/npm/npm/commit/2b8c0dd) + `request@2.64.0` + ([@simov](https://github.com/simov)) +* [`8139124`](https://github.com/npm/npm/commit/8139124) + `brace-expansion@1.1.1` + ([@juliangruber](https://github.com/juliangruber)) + +### v3.3.5 (2015-09-24): + +Some of you all may not be aware, but npm is ALSO a company. I tell you this +'cause npm-the-company had an all-staff get together this week, flying in +our remote folks from around the world. That was great, but it also +basically eliminated normal work on Monday and Tuesday. + +Still, we've got a couple of really important bug fixes this week. Plus a +lil bit from the [now LTS 2.x branch](https://github.com/npm/npm/releases/tag/v2.14.6). + +#### ATTENTION WINDOWS USERS + +If you previously updated to npm 3 and you try to update again, you may get +an error messaging telling you that npm won't install npm into itself. Until you +are at 3.3.5 or greater, you can get around this with `npm install -f -g npm`. + +* [`bef06f5`](https://github.com/npm/npm/commit/bef06f5) + [#9741](https://github.com/npm/npm/pull/9741) Uh... so... er... it + seems that since `npm@3.2.0` on Windows with a default configuration, it's + been impossible to update npm. Well, that's not actually true, there's a + work around (see above), but it shouldn't be complaining in the first + place. + ([@iarna](https://github.com/iarna)) + +#### STACK OVERFLOWS ON PUBLISH + +* [`330b496`](https://github.com/npm/npm/commit/330b496) + [#9667](https://github.com/npm/npm/pull/9667) + We were keeping track of metadata about your project while packing the + tree in a way that resulted in this data being written to packed tar files + headers. When this metadata included cycles, it resulted in the the tar + file entering an infinite recursive loop and eventually crashing with a + stack overflow. + + I've patched this by keeping track of your metadata by closing over the + variables in question instead, and I've further restricted gathering and + tracking the metadata to times when it's actually needed. (Which is only + if you need bundled modules.) + ([@iarna](https://github.com/iarna)) + +#### LESS CRASHY ERROR MESSAGES ON BAD PACKAGES + +* [`829921f`](https://github.com/npm/npm/commit/829921f) + [#9741](https://github.com/npm/npm/pull/9741) + Packages with invalid names or versions were crashing the installer. These + are now captured and warned as was originally intended. + ([@iarna](https://github.com/iarna)) + +#### ONE DEPENDENCY UPDATE + +* [`963295c`](https://github.com/npm/npm/commit/963295c) + `npm-install-checks@2.0.1` + ([@iarna](https://github.com/iarna)) + +#### AND ONE SUBDEPENDENCY + +* [`448737d`](https://github.com/npm/npm/commit/448737d) + `request@2.63.0` + ([@simov](https://github.com/simov)) + +### v3.3.4 (2015-09-17): + +This is a relatively quiet release, bringing a few bug fixes and +some module updates, plus via the +[2.14.5 release](https://github.com/npm/npm/releases/tag/v2.14.5) +some forward compatibility fixes with versions of Node that +aren't yet released. + +#### NO BETA NOTICE THIS TIME!! + +But, EXCITING NEWS FRIENDS, this week marks the exit of `npm@3` +from beta. This means that the week of this release, +[v3.3.3](https://github.com/npm/npm/releases/tag/v3.3.3) will +become `latest` and this version (v3.3.4) will become `next`!! + +#### CRUFT FOR THE CRUFT GODS + +What I call "cruft", by which I mean, files sitting around in +your `node_modules` folder, will no longer produce warnings in +`npm ls` nor during `npm install`. This brings `npm@3`'s behavior +in line with `npm@2`. + +* [`a127801`](https://github.com/npm/npm/commit/a127801) + [#9285](https://github.com/npm/npm/pull/9586) + Stop warning about cruft in module directories. + ([@iarna](https://github.com/iarna)) + +#### BETTER ERROR MESSAGE + +* [`95ee92c`](https://github.com/npm/npm/commit/95ee92c) + [#9433](https://github.com/npm/npm/issues/9433) + Give better error messages for invalid URLs in the dependecy + list. + ([@jamietre](https://github.com/jamietre)) + +#### MODULE UPDATES + +* [`ebb92ca`](https://github.com/npm/npm/commit/ebb92ca) + `retry@0.8.0` ([@tim-kos](https://github.com/tim-kos)) +* [`55f1285`](https://github.com/npm/npm/commit/55f1285) + `normalize-package-data@2.3.4` ([@zkat](https://github.com/zkat)) +* [`6d4ebff`](https://github.com/npm/npm/commit/6d4ebff) + `sha@2.0.1` ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`09a9c7a`](https://github.com/npm/npm/commit/09a9c7a) + `semver@5.0.3` ([@isaacs](https://github.com/isaacs)) +* [`745000f`](https://github.com/npm/npm/commit/745000f) + `node-gyp@3.0.3` ([@rvagg](https://github.com/rvagg)) + +#### SUB DEP MODULE UPDATES + +* [`578ca25`](https://github.com/npm/npm/commit/578ca25) + `request@2.62.0` ([@simov](https://github.com/simov)) +* [`1d8996e`](https://github.com/npm/npm/commit/1d8996e) + `jju@1.2.1` ([@rlidwka](https://github.com/rlidwka)) +* [`6da1ba4`](https://github.com/npm/npm/commit/6da1ba4) + `hoek@2.16.2` ([@nlf](https://github.com/nlf)) + +### v3.3.3 (2015-09-10): + +This short week brought us brings us a few small bug fixes, a +doc change and a whole lotta dependency updates. + +Plus, as usual, this includes a forward port of everything in +[`npm@2.14.4`](https://github.com/npm/npm/releases/tag/v2.14.4). + +#### BETA BUT NOT FOREVER + +**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until +we're confident that it's stable and have assessed the effect of +the breaking changes on the community. During that time we will +still be doing `npm@2` releases, with `npm@2` tagged as `latest` +and `next`. We'll _also_ be publishing new releases of `npm@3` +as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. +We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant +bugs remaining. So do us a solid and deploy it in non-critical +CI environments and for day-to-day use, but maybe don't use it +for production maintenance or frontline continuous deployment +just yet. + +#### REMOVE INSTALLED BINARIES ON WINDOWS + +So waaaay back at the start of August, I fixed a bug with +[#9198](https://github.com/npm/npm/pull/9198). That fix made it +so that if you had two modules installed that both installed the +same binary (eg `gulp` & `gulp-cli`), that removing one wouldn't +remove the binary if it was owned by the other. + +It did this by doing some hocus-pocus that, turns out, was +Unix-specific, so on Windows it just threw up its hands and +stopped removing installed binaries at all. Not great. + +So today we're fixing that– it let us maintain the same safety +that we added in #9198, but ALSO works with Windows. + +* [`25fbaed`](https://github.com/npm/npm/commit/25fbaed) + [#9394](https://github.com/npm/npm/issues/9394) + Treat cmd-shims the same way we treat symlinks + ([@iarna](https://github.com/iarna)) + +#### API DOCUMENTATION HAS BEEN SACRIFICED THE API GOD + +The documentation of the internal APIs of npm is going away, +because it would lead people into thinking they should integrate +with npm by using it. Please don't do that! In the future, we'd +like to give you a suite of stand alone modules that provide +better, more stand alone APIs for your applications to build on. +But for now, call the npm binary with `process.exec` or +`process.spawn` instead. + +* [`2fb60bf`](https://github.com/npm/npm/commit/2fb60bf) + Remove misleading API documentation + ([@othiym23](https://github.com/othiym23)) + +#### ALLOW `npm link` ON WINDOWS W/ PRERELEASE VERSIONS OF NODE + +We never meant to have this be a restriction in the first place +and it was only just discovered with the recent node 4.0.0 +release candidate. + +* [`6665e54`](https://github.com/npm/npm/commit/6665e54) + [#9505](https://github.com/npm/npm/pull/9505) + Allow npm link to run on Windows with prerelease versions of + node + ([@jon-hall](https://github.com/jon-hall)) + +#### graceful-fs update + +We're updating all of npm's deps to use the most recent +`graceful-fs`. This turns out to be important for future not yet +released versions of node, because older versions monkey-patch +`fs` in ways that will break in the future. Plus it ALSO makes +use of `process.binding` which is an internal API that npm +definitely shouldn't have been using. We're not done yet, but +this is the bulk of them. + +* [`e7bc98e`](https://github.com/npm/npm/commit/e7bc98e) + `write-file-atomic@1.1.3` + ([@iarna](https://github.com/iarna)) +* [`7417600`](https://github.com/npm/npm/commit/7417600) + `tar@2.2.1` + ([@zkat](https://github.com/zkat)) +* [`e4e9d40`](https://github.com/npm/npm/commit/e4e9d40) + `read-package-json@2.0.1` + ([@zkat](https://github.com/zkat)) +* [`481611d`](https://github.com/npm/npm/commit/481611d) + `read-installed@4.0.3` + ([@zkat](https://github.com/zkat)) +* [`0dabbda`](https://github.com/npm/npm/commit/0dabbda) + `npm-registry-client@7.0.4` + ([@zkat](https://github.com/zkat)) +* [`c075a91`](https://github.com/npm/npm/commit/c075a91) + `fstream@1.0.8` + ([@zkat](https://github.com/zkat)) +* [`2e4341a`](https://github.com/npm/npm/commit/2e4341a) + `fs-write-stream-atomic@1.0.4` + ([@zkat](https://github.com/zkat)) +* [`18ad16e`](https://github.com/npm/npm/commit/18ad16e) + `fs-vacuum@1.2.7` + ([@zkat](https://github.com/zkat)) + +#### DEPENDENCY UPDATES + +* [`9d6666b`](https://github.com/npm/npm/commit/9d6666b) + `node-gyp@3.0.1` + ([@rvagg](https://github.com/rvagg)) +* [`349c4df`](https://github.com/npm/npm/commit/349c4df) + `retry@0.7.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`f507551`](https://github.com/npm/npm/commit/f507551) + `which@1.1.2` + ([@isaacs](https://github.com/isaacs)) +* [`e5b6743`](https://github.com/npm/npm/commit/e5b6743) + `nopt@3.0.4` + ([@zkat](https://github.com/zkat)) + +#### THE DEPENDENCIES OF OUR DEPENDENCIES ARE OUR DEPENDENCIES UPDATES + +* [`316382d`](https://github.com/npm/npm/commit/316382d) + `mime-types@2.1.6` & `mime-db@1.18.0` +* [`64b741e`](https://github.com/npm/npm/commit/64b741e) + `spdx-correct@1.0.1` +* [`fff62ac`](https://github.com/npm/npm/commit/fff62ac) + `process-nextick-args@1.0.3` +* [`9d6488c`](https://github.com/npm/npm/commit/9d6488c) + `cryptiles@2.0.5` +* [`1912012`](https://github.com/npm/npm/commit/1912012) + `bluebird@2.10.0` +* [`4d09402`](https://github.com/npm/npm/commit/4d09402) + `readdir-scoped-modules@1.0.2` + +### v3.3.2 (2015-09-04): + +#### PLEASE HOLD FOR THE NEXT AVAILABLE MAINTAINER + +This is a tiny little maintenance release, both to update dependencies and to +keep `npm@3` up to date with changes made to `npm@2`. +[@othiym23](https://github.com/othiym23) is putting out this release (again) as +his esteemed colleague [@iarna](https://github.com/iarna) finishes relocating +herself, her family, and her sizable anime collection all the way across North +America. It contains [all the goodies in +`npm@2.14.3`](https://github.com/npm/npm/releases/tag/v2.14.3) and one other +dependency update. + +#### BETA WARNINGS FOR FUN AND PROFIT + +**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're +confident that it's stable and have assessed the effect of the breaking +changes on the community. During that time we will still be doing `npm@2` +releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be +publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` +alongside those versions until we're ready to switch everyone over to +`npm@3`. We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant bugs +remaining. So do us a solid and deploy it in non-critical CI environments +and for day-to-day use, but maybe don't use it for production maintenance or +frontline continuous deployment just yet. + +That said, it's getting there! It will be leaving beta very soon! + +#### ONE OTHER DEPENDENCY UPDATE + +* [`bb5de34`](https://github.com/npm/npm/commit/bb5de3493531228df0bd3f0742d5493c826be6dd) + `is-my-json-valid@2.12.2`: Upgrade to a new, modernized version of + `json-pointer`. ([@mafintosh](https://github.com/mafintosh)) + +### v3.3.1 (2015-08-27): + +Hi all, this `npm@3` update brings you another round of bug fixes. The +headliner here is that `npm update` works again. We're running down the +clock on blocker 3.x issues! Shortly after that hits zero we'll be +promoting 3.x to latest!! + +And of course, we have changes that were brought forward from 2.x. Check out +the release notes for +[2.14.1](https://github.com/npm/npm/releases/tag/v2.14.1) and +[2.14.2](https://github.com/npm/npm/releases/tag/v2.14.2). + +#### BETA WARNINGS FOR FUN AND PROFIT + +**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're +confident that it's stable and have assessed the effect of the breaking +changes on the community. During that time we will still be doing `npm@2` +releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be +publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` +alongside those versions until we're ready to switch everyone over to +`npm@3`. We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant bugs +remaining. So do us a solid and deploy it in non-critical CI environments +and for day-to-day use, but maybe don't use it for production maintenance or +frontline continuous deployment just yet. + +#### NPM UPDATE, NOW AGAIN YOUR FRIEND + +* [`f130a00`](https://github.com/npm/npm/commit/f130a00) + [#9095](https://github.com/npm/npm/issues/9095) + `npm update` once again works! Previously, after selecting packages + to update, it would then pick the wrong location to run the install + from. ([@iarna](https://github.com/iarna)) + +#### MORE VERBOSING FOR YOUR VERBOSE LIFECYCLES + +* [`d088b7d`](https://github.com/npm/npm/commit/d088b7d) + [#9227](https://github.com/npm/npm/pull/9227) + Add some additional logging at the verbose and silly levels + when running lifecycle scripts. Hopefully this will make + debugging issues with them a bit easier! + ([@saper](https://github.com/saper)) + +#### AND SOME OTHER BUG FIXES… + +* [`f4a5784`](https://github.com/npm/npm/commit/f4a5784) + [#9308](https://github.com/npm/npm/issues/9308) + Make fetching metadata for local modules faster! This ALSO means + that doing things like running `npm repo` won't build your + module and maybe run `prepublish`. + ([@iarna](https://github.com/iarna)) + +* [`4468c92`](https://github.com/npm/npm/commit/4468c92) + [#9205](https://github.com/npm/npm/issues/9205) + Fix a bug where local modules would sometimes not resolve relative + links using the correct base path. + ([@iarna](https://github.com/iarna)) + +* [`d395a6b`](https://github.com/npm/npm/commit/d395a6b) + [#8995](https://github.com/npm/npm/issues/8995) + Certain combinations of packages could result in different install orders for their + initial installation than for reinstalls run on the same folder. + ([@iarna](https://github.com/iarna)) + +* [`d119ea6`](https://github.com/npm/npm/commit/d119ea6) + [#9113](https://github.com/npm/npm/issues/9113) + Make extraneous packages _always_ up in `npm ls`. Previously, if an + extraneous package had a dependency that depended back on the original + package this would result in the package not showing up in `ls`. + ([@iarna](https://github.com/iarna)) + +* [`02420dc`](https://github.com/npm/npm/commit/02420dc) + [#9113](https://github.com/npm/npm/issues/9113) + Stop warning about missing top level package.json files. Errors in said + files will still be reported. + ([@iarna](https://github.com/iarna)) + +#### SOME DEP UPDATES + +* [`1ed1364`](https://github.com/npm/npm/commit/1ed1364) `rimraf@2.4.3` + ([@isaacs](https://github.com/isaacs)) Added EPERM to delay/retry loop +* [`e7b8315`](https://github.com/npm/npm/commit/e7b8315) `read@1.0.7` + Smaller distribution package, better metadata + ([@isaacs](https://github.com/isaacs)) + +#### SOME DEPS OF DEPS UPDATES + +* [`b273bcc`](https://github.com/npm/npm/commit/b273bcc) `mime-types@2.1.5` +* [`df6e225`](https://github.com/npm/npm/commit/df6e225) `mime-db@1.17.0` +* [`785f2ad`](https://github.com/npm/npm/commit/785f2ad) `is-my-json-valid@2.12.1` +* [`88170dd`](https://github.com/npm/npm/commit/88170dd) `form-data@1.0.0-rc3` +* [`af5357b`](https://github.com/npm/npm/commit/af5357b) `request@2.61.0` +* [`337f96a`](https://github.com/npm/npm/commit/337f96a) `chalk@1.1.1` +* [`3dfd74d`](https://github.com/npm/npm/commit/3dfd74d) `async@1.4.2` + +### v3.3.0 (2015-08-13): + +This is a pretty EXCITING week. But I may be a little excitable– or +possibly sleep deprived, it's sometimes hard to tell them apart. =D So +[Kat](https://github.com/zkat) really went the extra mile this week and got +the client side support for teams and orgs out in this week's 2.x release. +You can't use that just yet, 'cause we have to turn on some server side +stuff too, but this way it'll be there for you all the moment we do! Check +out the details over in the [2.14.0 release +notes](https://github.com/npm/npm/releases/tag/v2.14.0)! + +But we over here in 3.x ALSO got a new feature this week, check out the new +`--only` and `--also` flags for better control over when dev and production +dependencies are used by various npm commands. + +That, and some important bug fixes round out this week. Enjoy everyone! + +#### NEVER SHALL NOT BETA THE BETA + +**_THIS IS BETA SOFTWARE_**. EXCITING NEW BETA WARNING!!! Ok, I fibbed, +EXACTLY THE SAME BETA WARNINGS: `npm@3` will remain in beta until we're +confident that it's stable and have assessed the effect of the breaking +changes on the community. During that time we will still be doing `npm@2` +releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be +publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` +alongside those versions until we're ready to switch everyone over to +`npm@3`. We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant bugs +remaining. So do us a solid and deploy it in non-critical CI environments +and for day-to-day use, but maybe don't use it for production maintenance or +frontline continuous deployment just yet. + +#### ONLY ALSO DEV + +Hey we've got a SUPER cool new feature for you all, thanks to the fantastic +work of [@davglass](https://github.com/davglass) and +[@bengl](https://github.com/bengl) we have `--only=prod`, +`--only=dev`, `--also=prod` and `--also=dev` options. These apply in +various ways to: `npm install`, `npm ls`, `npm outdated` and `npm update`. + +So for instance: + +``` +npm install --only=dev +``` + +Only installs dev dependencies. By contrast: + +``` +npm install --only=prod +``` + +Will only install prod dependencies and is very similar to `--production` +but differs in that it doesn't set the environment variables that +`--production` does. + +The related new flag, `--also` is most useful with things like: + +``` +npm shrinkwrap --also=dev +``` + +As shrinkwraps don't include dev deps by default. This replaces passing in +`--dev` in that scenario. + +And that leads into the fact that this deprecates `--dev` as its semantics +across commands were inconsistent and confusing. + +* [`3ab1eea`](https://github.com/npm/npm/commit/3ab1eea) + [#9024](https://github.com/npm/npm/pull/9024) + Add support for `--only`, `--also` and deprecate `--dev` + ([@bengl](https://github.com/bengl)) + +#### DON'T TOUCH! THAT'S NOT YOUR BIN + +* [`b31812e`](https://github.com/npm/npm/commit/b31812e) + [#8996](https://github.com/npm/npm/pull/8996) + When removing a module that has bin files, if one that we're going to + remove is a symlink to a DIFFERENT module, leave it alone. This only happens + when you have two modules that try to provide the same bin. + ([@iarna](https://github.com/iarna)) + +#### THERE'S AN END IN SIGHT + +* [`d2178a9`](https://github.com/npm/npm/commit/d2178a9) + [#9223](https://github.com/npm/npm/pull/9223) + Close a bunch of infinite loops that could show up with symlink cycles in your dependencies. + ([@iarna](https://github.com/iarna)) + +#### OOPS DIDN'T MEAN TO FIX THAT + +Well, not _just_ yet. This was scheduled for next week, but it snuck into +2.x this week. + +* [`139dd92`](https://github.com/npm/npm/commit/139dd92) + [#8716](https://github.com/npm/npm/pull/8716) + `npm init` will now only pick up the modules you install, not everything + else that got flattened with them. + ([@iarna](https://github.com/iarna)) + +### v3.2.2 (2015-08-08): + +Lot's of lovely bug fixes for `npm@3`. I'm also suuuuper excited that I +think we have a handle on stack explosions that effect a small portion of +our users. We also have some tantalizing clues as to where some low hanging +fruit may be for performance issues. + +And of course, in addition to the `npm@3` specific bug fixes, there are some +great one's coming in from `npm@2`! [@othiym23](https://github.com/othiym23) +put together that release this week– check out its +[release notes](https://github.com/npm/npm/releases/tag/v2.13.4) for the deets. + +#### AS ALWAYS STILL BETA + +**_THIS IS BETA SOFTWARE_**. Just like the airline safety announcements, +we're not taking this plane off till we finish telling you: `npm@3` will +remain in beta until we're confident that it's stable and have assessed the +effect of the breaking changes on the community. During that time we will +still be doing `npm@2` releases, with `npm@2` tagged as `latest` and `next`. +We'll _also_ be publishing new releases of `npm@3` as `npm@v3.x-next` and +`npm@v3.x-latest` alongside those versions until we're ready to switch +everyone over to `npm@3`. We need your help to find and fix its remaining +bugs. It's a significant rewrite, so we are _sure_ there still significant +bugs remaining. So do us a solid and deploy it in non-critical CI +environments and for day-to-day use, but maybe don't use it for production +maintenance or frontline continuous deployment just yet. + +#### BUG FIXES + +* [`a8c8a13`](https://github.com/npm/npm/commit/a8c8a13) + [#9050](https://github.com/npm/npm/issues/9050) + Resolve peer deps relative to the parent of the requirer + ([@iarna](http://github.com/iarna)) +* [`05f0226`](https://github.com/npm/npm/commit/05f0226) + [#9077](https://github.com/npm/npm/issues/9077) + Fix crash when saving `git+ssh` urls + ([@iarna](http://github.com/iarna)) +* [`e4a3808`](https://github.com/npm/npm/commit/e4a3808) + [#8951](https://github.com/npm/npm/issues/8951) + Extend our patch to allow `*` to match something when a package only has + prerelease versions to everything and not just the cache. + ([@iarna](http://github.com/iarna)) +* [`d135abf`](https://github.com/npm/npm/commit/d135abf) + [#8871](https://github.com/npm/npm/issues/8871) + Don't warn about a missing `package.json` or missing fields in the global + install directory. + ([@iarna](http://github.com/iarna)) + +#### DEP VERSION BUMPS + +* [`990ee4f`](https://github.com/npm/npm/commit/990ee4f) + `path-is-inside@1.0.1` ([@domenic](https://github.com/domenic)) +* [`1f71ec0`](https://github.com/npm/npm/commit/1f71ec0) + `lodash.clonedeep@3.0.2` ([@jdalton](https://github.com/jdalton)) +* [`a091354`](https://github.com/npm/npm/commit/a091354) + `marked@0.3.5` ([@chjj](https://github.com/chjj)) +* [`fc51f28`](https://github.com/npm/npm/commit/fc51f28) + `tap@1.3.2` ([@isaacs](https://github.com/isaacs)) +* [`3569ec0`](https://github.com/npm/npm/commit/3569ec0) + `nock@2.10.0` ([@pgte](https://github.com/pgte)) +* [`ad5f6fd`](https://github.com/npm/npm/commit/ad5f6fd) + `npm-registry-mock@1.0.1` ([@isaacs](https://github.com/isaacs)) + +### v3.2.1 (2015-07-31): + +#### AN EXTRA QUIET RELEASE + +A bunch of stuff got deferred for various reasons, which just means more +branches to land next week! + +Don't forget to check out [Kat's 2.x release](https://github.com/npm/npm/releases/tag/v2.13.4) for other quiet goodies. + +#### AS ALWAYS STILL BETA + +**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, +you can't be excused. `npm@3` will remain in beta until we're confident +that it's stable and have assessed the effect of the breaking changes on the +community. During that time we will still be doing `npm@2` releases, with +`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new +releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. We need your +help to find and fix its remaining bugs. It's a significant rewrite, so we +are _sure_ there still significant bugs remaining. So do us a solid and +deploy it in non-critical CI environments and for day-to-day use, but maybe +don't use it for production maintenance or frontline continuous deployment +just yet. + + +#### MAKING OUR TESTS TEST THE THING THEY TEST + +* [`6e53c3d`](https://github.com/npm/npm/commit/6e53c3d) + [#8985](https://github.com/npm/npm/pull/8985) + Many thanks to @bengl for noticing that one of our tests wasn't testing + what it claimed it was testing! ([@bengl](https://github.com/bengl)) + +#### MY PACKAGE.JSON WAS ALREADY IN THE RIGHT ORDER + +* [`eb2c7aa`](https://github.com/npm/npm/commit/d00d0f) + [#9068](https://github.com/npm/npm/pull/9079) + Stop sorting keys in the `package.json` that we haven't edited. Many + thanks to [@Qix-](https://github.com/Qix-) for bringing this up and + providing a first pass at a patch for this. + ([@iarna](https://github.com/iarna)) + +#### DEV DEP UPDATE + +* [`555f60c`](https://github.com/npm/npm/commit/555f60c) `marked@0.3.4` + +### v3.2.0 (2015-07-24): + +#### MORE CONFIG, BETTER WINDOWS AND A BUG FIX + +This is a smallish release with a new config option and some bug fixes. And +lots of module updates. + +#### BETA BETAS ON + +**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, +you can't be excused. `npm@3` will remain in beta until we're confident +that it's stable and have assessed the effect of the breaking changes on the +community. During that time we will still be doing `npm@2` releases, with +`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new +releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. We need your +help to find and fix its remaining bugs. It's a significant rewrite, so we +are _sure_ there still significant bugs remaining. So do us a solid and +deploy it in non-critical CI environments and for day-to-day use, but maybe +don't use it for production maintenance or frontline continuous deployment +just yet. + + +#### NEW CONFIGS, LESS PROGRESS + +* [`423d8f7`](https://github.com/npm/npm/commit/423d8f7) + [#8704](https://github.com/npm/npm/issues/8704) + Add the ability to disable the new progress bar with `--no-progress` + ([@iarna](https://github.com/iarna)) + +#### AND BUG FIXES + +* [`b3ee452`](https://github.com/npm/npm/commit/b3ee452) + [#9038](https://github.com/npm/npm/pull/9038) + We previously disabled the use of the new `fs.access` API on Windows, but + the bug we were seeing is fixed in `io.js@1.5.0` so we now use `fs.access` + if you're using that version or greater. + ([@iarna](https://github.com/iarna)) + +* [`b181fa3`](https://github.com/npm/npm/commit/b181fa3) + [#8921](https://github.com/npm/npm/issues/8921) + [#8637](https://github.com/npm/npm/issues/8637) + Rejigger how we validate modules for install. This allow is to fix + a problem where arch/os checking wasn't being done at all. + It also made it easy to add back in a check that declines to + install a module in itself unless you force it. + ([@iarna](https://github.com/iarna)) + +#### AND A WHOLE BUNCH OF SUBDEP VERSIONS + +These are all development dependencies and semver-compatible subdep +upgrades, so they should not have visible impact on users. + +* [`6b3f6d9`](https://github.com/npm/npm/commit/6b3f6d9) `standard@4.3.3` +* [`f4e22e5`](https://github.com/npm/npm/commit/f4e22e5) `readable-stream@2.0.2` (inside concat-stream) +* [`f130bfc`](https://github.com/npm/npm/commit/f130bfc) `minimatch@2.0.10` (inside node-gyp's copy of glob) +* [`36c6a0d`](https://github.com/npm/npm/commit/36c6a0d) `caseless@0.11.0` +* [`80df59c`](https://github.com/npm/npm/commit/80df59c) `chalk@1.1.0` +* [`ea935d9`](https://github.com/npm/npm/commit/ea935d9) `bluebird@2.9.34` +* [`3588a0c`](https://github.com/npm/npm/commit/3588a0c) `extend@3.0.0` +* [`c6a8450`](https://github.com/npm/npm/commit/c6a8450) `form-data@1.0.0-rc2` +* [`a04925b`](https://github.com/npm/npm/commit/a04925b) `har-validator@1.8.0` +* [`ee7c095`](https://github.com/npm/npm/commit/ee7c095) `has-ansi@2.0.0` +* [`944fc34`](https://github.com/npm/npm/commit/944fc34) `hawk@3.1.0` +* [`783dc7b`](https://github.com/npm/npm/commit/783dc7b) `lodash._basecallback@3.3.1` +* [`acef0fe`](https://github.com/npm/npm/commit/acef0fe) `lodash._baseclone@3.3.0` +* [`dfe959a`](https://github.com/npm/npm/commit/dfe959a) `lodash._basedifference@3.0.3` +* [`a03bc76`](https://github.com/npm/npm/commit/a03bc76) `lodash._baseflatten@3.1.4` +* [`8a07d50`](https://github.com/npm/npm/commit/8a07d50) `lodash._basetostring@3.0.1` +* [`7785e3f`](https://github.com/npm/npm/commit/7785e3f) `lodash._baseuniq@3.0.3` +* [`826fb35`](https://github.com/npm/npm/commit/826fb35) `lodash._createcache@3.1.2` +* [`76030b3`](https://github.com/npm/npm/commit/76030b3) `lodash._createpadding@3.6.1` +* [`1a49ec6`](https://github.com/npm/npm/commit/1a49ec6) `lodash._getnative@3.9.1` +* [`eebe47f`](https://github.com/npm/npm/commit/eebe47f) `lodash.isarguments@3.0.4` +* [`09994d4`](https://github.com/npm/npm/commit/09994d4) `lodash.isarray@3.0.4` +* [`b6f8dbf`](https://github.com/npm/npm/commit/b6f8dbf) `lodash.keys@3.1.2` +* [`c67dd6b`](https://github.com/npm/npm/commit/c67dd6b) `lodash.pad@3.1.1` +* [`4add042`](https://github.com/npm/npm/commit/4add042) `lodash.repeat@3.0.1` +* [`e04993c`](https://github.com/npm/npm/commit/e04993c) `lru-cache@2.6.5` +* [`2ed7da4`](https://github.com/npm/npm/commit/2ed7da4) `mime-db@1.15.0` +* [`ae08244`](https://github.com/npm/npm/commit/ae08244) `mime-types@2.1.3` +* [`e71410e`](https://github.com/npm/npm/commit/e71410e) `os-homedir@1.0.1` +* [`67c13e0`](https://github.com/npm/npm/commit/67c13e0) `process-nextick-args@1.0.2` +* [`12ee041`](https://github.com/npm/npm/commit/12ee041) `qs@4.0.0` +* [`15564a6`](https://github.com/npm/npm/commit/15564a6) `spdx-license-ids@1.0.2` +* [`8733bff`](https://github.com/npm/npm/commit/8733bff) `supports-color@2.0.0` +* [`230943c`](https://github.com/npm/npm/commit/230943c) `tunnel-agent@0.4.1` +* [`26a4653`](https://github.com/npm/npm/commit/26a4653) `ansi-styles@2.1.0` +* [`3d27081`](https://github.com/npm/npm/commit/3d27081) `bl@1.0.0` +* [`9efa110`](https://github.com/npm/npm/commit/9efa110) `async@1.4.0` + +#### MERGED FORWARD + +* As usual, we've ported all the `npm@2` goodies in this week's + [v2.13.3](https://github.com/npm/npm/releases/tag/v2.13.3) + release. + +### v3.1.3 (2015-07-17): + +Rebecca: So Kat, I hear this week's other release uses a dialog between us to +explain what changed? + +Kat: Well, you could say that… + +Rebecca: I would! This week I fixed more `npm@3` bugs! + +Kat: That sounds familiar. + +Rebecca: Eheheheh, well, before we look at those, a word from our sponsor… + +#### BETA IS AS BETA DOES + +**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, +you can't be excused. `npm@3` will remain in beta until we're confident +that it's stable and have assessed the effect of the breaking changes on the +community. During that time we will still be doing `npm@2` releases, with +`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new +releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. We need your +help to find and fix its remaining bugs. It's a significant rewrite, so we +are _sure_ there still significant bugs remaining. So do us a solid and +deploy it in non-critical CI environments and for day-to-day use, but maybe +don't use it for production maintenance or frontline continuous deployment +just yet. + +Rebecca: Ok, enough of the dialoguing, that's Kat's schtick. But do remember +kids, betas hide in dark hallways waiting to break your stuff, stuff like… + +#### SO MANY LINKS YOU COULD MAKE A CHAIN + +* [`6d69ec9`](https://github.com/npm/npm/6d69ec9) + [#8967](https://github.com/npm/npm/issues/8967) + Removing a module linked into your globals would result in having + all of its subdeps removed. Since the npm release process does + exactly this, it burned me -every- -single- -week-. =D + While we're here, we also removed extraneous warns that used to + spill out when you'd remove a symlink. + ([@iarna](https://github.com/iarna)) + +* [`fdb360f`](https://github.com/npm/npm/fdb360f) + [#8874](https://github.com/npm/npm/issues/8874) + Linking scoped modules was failing outright, but this fixes that + and updates our tests so we don't do it again. + ([@iarna](https://github.com/iarna)) + +#### WE'LL TRY NOT TO CRACK YOUR WINDOWS + +* [`9fafb18`](https://github.com/npm/npm/9fafb18) + [#8701](https://github.com/npm/npm/issues/8701) + `npm@3` introduced permissions checks that run before it actually tries to + do something. This saves you from having an install fail half way + through. We did this using the shiny new `fs.access` function available + in `node 0.12` and `io.js`, with fallback options for older nodes. Unfortunately + the way we implemented the fallback caused racey problems for Windows systems. + This fixes that by ensuring we only ever run any one check on a directory once. + BUT it turns out there are bugs in `fs.access` on Windows. So this ALSO just disables + the use of `fs.access` on Windows entirely until that settles out. + ([@iarna](https://github.com/iarna)) + +#### ZOOM ZOOM, DEP UPDATES + +* [`5656baa`](https://github.com/npm/npm/5656baa) + `gauge@1.2.2`: Better handle terminal resizes while printing the progress bar + ([@iarna](https://github.com/iarna)) + +#### MERGED FORWARD + +* Check out Kat's [super-fresh release notes for v2.13.2](https://github.com/npm/npm/releases/tag/v2.13.2) + and see all the changes we ported from `npm@2`. + +### v3.1.2 + +#### SO VERY BETA RELEASE + +So, `v3.1.1` managed to actually break installing local modules. And then +immediately after I drove to an island for the weekend. 😁 So let's get +this fixed outside the usual release train! + +Fortunately it didn't break installing _global_ modules and so you could +swap it out for another version at least. + +#### DISCLAIMER MEANS WHAT IT SAYS + +**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, +you can't be excused. `npm@3` will remain in beta until we're confident +that it's stable and have assessed the effect of the breaking changes on the +community. During that time we will still be doing `npm@2` releases, with +`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new +releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. We need your +help to find and fix its remaining bugs. It's a significant rewrite, so we +are _sure_ there still significant bugs remaining. So do us a solid and +deploy it in non-critical CI environments and for day-to-day use, but maybe +don't use it for production maintenance or frontline continuous deployment +just yet. + +#### THIS IS IT, THE REASON + +* [`f5e19df`](https://github.com/npm/npm/commit/f5e19df) + [#8893](https://github.com/npm/npm/issues/8893) + Fix crash when installing local modules introduced by the fix for + [#8608](https://github.com/npm/npm/issues/8608) + ([@iarna](https://github.com/iarna) + +### v3.1.1 + +#### RED EYE RELEASE + +Rebecca's up too late writing tests, so you can have `npm@3` bug fixes! Lots +of great new issues from you all! ❤️️ Keep it up! + +#### YUP STILL BETA, PLEASE PAY ATTENTION + +**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, +you can't be excused. `npm@3` will remain in beta until we're confident +that it's stable and have assessed the effect of the breaking changes on the +community. During that time we will still be doing `npm@2` releases, with +`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new +releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those +versions until we're ready to switch everyone over to `npm@3`. We need your +help to find and fix its remaining bugs. It's a significant rewrite, so we +are _sure_ there still significant bugs remaining. So do us a solid and +deploy it in non-critical CI environments and for day-to-day use, but maybe +don't use it for production maintenance or frontline continuous deployment +just yet. + +#### BOOGS + +* [`9badfd6`](https://github.com/npm/npm/commit/9babfd63f19f2d80b2d2624e0963b0bdb0d76ef4) + [#8608](https://github.com/npm/npm/issues/8608) + Make global installs and uninstalls MUCH faster by only reading the directories of + modules referred to by arguments. + ([@iarna](https://github.com/iarna) +* [`075a5f0`](https://github.com/npm/npm/commit/075a5f046ab6837f489b08d44cb601e9fdb369b7) + [#8660](https://github.com/npm/npm/issues/8660) + Failed optional deps would still result in the optional deps own + dependencies being installed. We now find them and fail them out of the + tree. + ([@iarna](https://github.com/iarna) +* [`c9fbbb5`](https://github.com/npm/npm/commit/c9fbbb540083396ea58fd179d81131d959d8e049) + [#8863](https://github.com/npm/npm/issues/8863) + The "no compatible version found" error message was including only the + version requested, not the name of the package we wanted. Ooops! + ([@iarna](https://github.com/iarna) +* [`32e6bbd`](https://github.com/npm/npm/commit/32e6bbd21744dcbe8c0720ab53f60caa7f2a0588) + [#8806](https://github.com/npm/npm/issues/8806) + The "uninstall" lifecycle was being run after all of a module's dependencies has been + removed. This reverses that order-- this means "uninstall" lifecycles can make use + of the package's dependencies. + ([@iarna](https://github.com/iarna) + +#### MERGED FORWARD + +* Check out the [v2.13.1 release notes](https://github.com/npm/npm/releases/tag/v2.13.1) + and see all the changes we ported from `npm@2`. + +### v3.1.0 (2015-07-02): + +This has been a brief week of bug fixes, plus some fun stuff merged forward +from this weeks 2.x release. See the +[2.13.0 release notes](https://github.com/npm/npm/releases/tag/v2.13.0) +for details on that. + +You all have been AWESOME with +[all](https://github.com/npm/npm/milestones/3.x) +[the](https://github.com/npm/npm/milestones/3.2.0) +`npm@3` bug reports! Thank you and keep up the great work! + +#### NEW PLACE, SAME CODE + +Remember how last week we said `npm@3` would go to `3.0-next` and latest +tags? Yeaaah, no, please use `npm@v3.x-next` and `npm@v3.x-latest` going forward. + +I dunno why we said "suuure, we'll never do a feature release till we're out +of beta" when we're still forward porting `npm@2.x` features. `¯\_(ツ)_/¯` + +If you do accidentally use the old tag names, I'll be maintaining them +for a few releases, but they won't be around forever. + +#### YUP STILL BETA, PLEASE PAY ATTENTION + +**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're +confident that it's stable and have assessed the effect of the breaking +changes on the community. During that time we will still be doing `npm@2` +releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be +publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` +alongside those versions until we're ready to switch everyone over to +`npm@3`. We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant bugs +remaining. So do us a solid and deploy it in non-critical CI environments +and for day-to-day use, but maybe don't use it for production maintenance +or frontline continuous deployment just yet. + +#### BUGS ON THE WINDOWS + + * [`0030ade`](https://github.com/npm/npm/commit/0030ade) + [#8685](https://github.com/npm/npm/issues/8685) + Windows would hang when trying to clone git repos + ([@euprogramador](https://github.com/npm/npm/pull/8777)) + * [`b259bcc`](https://github.com/npm/npm/commit/b259bcc) + [#8786](https://github.com/npm/npm/pull/8786) + Windows permissions checks would cause installations to fail under some + circumstances. We're disabling the checks entirely for this release. + I'm hoping to check back with this next week to get a Windows friendly + fix in. + ([@iarna](https://github.com/iarna)) + +#### SO MANY BUGS SQUASHED, JUST CALL US RAID + + * [`0848698`](https://github.com/npm/npm/commit/0848698) + [#8686](https://github.com/npm/npm/pull/8686) + Stop leaving progress bar cruft on the screen during publication + ([@ajcrites](https://github.com/ajcrites)) + * [`57c3cea`](https://github.com/npm/npm/commit/57c3cea) + [#8695](https://github.com/npm/npm/pull/8695) + Remote packages with shrinkwraps made npm cause node + iojs to explode + and catch fire. NO MORE. + ([@iarna](https://github.com/iarna)) + * [`2875ba3`](https://github.com/npm/npm/commit/2875ba3) + [#8723](https://github.com/npm/npm/pull/8723) + I uh, told you that engineStrict checking had gone away last week. + TURNS OUT I LIED. So this is making that actually be true. + ([@iarna](https://github.com/iarna)) + * [`28064e5`](https://github.com/npm/npm/commit/28064e5) + [#3358](https://github.com/npm/npm/issues/3358) + Consistently allow Unicode BOMs at the start of package.json files. + Previously this was allowed some of time, like when you were installing + modules, but not others, like running npm version or installing w/ + `--save`. + ([@iarna](https://github.com/iarna)) + * [`3cb6ad2`](https://github.com/npm/npm/commit/3cb6ad2) + [#8736](https://github.com/npm/npm/issues/8766) + `npm@3` wasn't running the "install" lifecycle in your current (toplevel) + module. This broke modules that relied on C compilation. BOO. + ([@iarna](https://github.com/iarna)) + * [`68da583`](https://github.com/npm/npm/commit/68da583) + [#8766](https://github.com/npm/npm/issues/8766) + To my great shame, `npm link package` wasn't working AT ALL if you + didn't have `package` already installed. + ([@iarna](https://github.com/iarna)) + * [`edd7448`](https://github.com/npm/npm/commit/edd7448) + `read-package-tree@5.0.0`: This update makes read-package-tree not explode + when there's bad data in your node_modules folder. `npm@2` silently + ignores this sort of thing. + ([@iarna](https://github.com/iarna)) + * [`0bb08c8`](https://github.com/npm/npm/commit/0bb08c8) + [#8778](https://github.com/npm/npm/pull/8778) + RELATEDLY, we now show any errors from your node_modules folder after + your installation completes as warnings. We're also reporting these in + `npm ls` now. + ([@iarna](https://github.com/iarna)) + * [`6c248ff`](https://github.com/npm/npm/commit/6c248ff) + [#8779](https://github.com/npm/npm/pull/8779) + Hey, you know how we used to complain if your `package.json` was + missing stuff? Well guess what, we are again. I know, I know, you can + thank me later. + ([@iarna](https://github.com/iarna)) + * [`d6f7c98`](https://github.com/npm/npm/commit/d6f7c98) + So, when we were rolling back after errors we had untested code that + tried to undo moves. Being untested it turns out it was very broken. + I've removed it until we have time to do this right. + ([@iarna](https://github.com/iarna)) + +#### NEW VERSION + +Just the one. Others came in via the 2.x release. Do check out its +changelog, immediately following this message. + + * [`4e602c5`](https://github.com/npm/npm/commit/4e602c5) `lodash@3.2.2` + +### v3.0.0 (2015-06-25): + +Wow, it's finally here! This has been a long time coming. We are all +delighted and proud to be getting this out into the world, and are looking +forward to working with the npm user community to get it production-ready +as quickly as possible. + +`npm@3` constitutes a nearly complete rewrite of npm's installer to be +easier to maintain, and to bring a bunch of valuable new features and +design improvements to you all. + +[@othiym23](https://github.com/othiym23) and +[@isaacs](https://github.com/isaacs) have been +[talking about the changes](http://blog.npmjs.org/post/91303926460/npm-cli-roadmap-a-periodic-update) +in this release for well over a year, and it's been the primary focus of +[@iarna](https://github.com/iarna) since she joined the team. + +Given that this is a near-total rewrite, all changes listed here are +[@iarna](https://github.com/iarna)'s work unless otherwise specified. + +#### NO, REALLY, READ THIS PARAGRAPH. IT'S THE IMPORTANT ONE. + +**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're +confident that it's stable and have assessed the effect of the breaking +changes on the community. During that time we will still be doing `npm@2` +releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be +publishing new releases of `npm@3` as `npm@3.0-next` and `npm@3.0-latest` +alongside those versions until we're ready to switch everyone over to +`npm@3`. We need your help to find and fix its remaining bugs. It's a +significant rewrite, so we are _sure_ there still significant bugs +remaining. So do us a solid and deploy it in non-critical CI environments +and for day-to-day use, but maybe don't use it for production maintenance +or frontline continuous deployment just yet. + +#### BREAKING CHANGES + +##### `peerDependencies` + +`grunt`, `gulp`, and `broccoli` plugin maintainers take note! You will be +affected by this change! + +* [#6930](https://github.com/npm/npm/issues/6930) + ([#6565](https://github.com/npm/npm/issues/6565)) + `peerDependencies` no longer cause _anything_ to be implicitly installed. + Instead, npm will now warn if a packages `peerDependencies` are missing, + but it's up to the consumer of the module (i.e. you) to ensure the peers + get installed / are included in `package.json` as direct `dependencies` + or `devDependencies` of your package. +* [#3803](https://github.com/npm/npm/issues/3803) + npm also no longer checks `peerDependencies` until after it has fully + resolved the tree. + +This shifts the responsibility for fulfilling peer dependencies from library +/ framework / plugin maintainers to application authors, and is intended to +get users out of the dependency hell caused by conflicting `peerDependency` +constraints. npm's job is to keep you _out_ of dependency hell, not put you +in it. + +##### `engineStrict` + +* [#6931](https://github.com/npm/npm/issues/6931) The rarely-used + `package.json` option `engineStrict` has been deprecated for several + months, producing warnings when it was used. Starting with `npm@3`, the + value of the field is ignored, and engine violations will only produce + warnings. If you, as a user, want strict `engines` field enforcement, + just run `npm config set engine-strict true`. + +As with the peer dependencies change, this is about shifting control from +module authors to application authors. It turns out `engineStrict` was very +difficult to understand even harder to use correctly, and more often than +not just made modules using it difficult to deploy. + +##### `npm view` + +* [`77f1aec`](https://github.com/npm/npm/commit/77f1aec) With `npm view` (aka + `npm info`), always return arrays for versions, maintainers, etc. Previously + npm would return a plain value if there was only one, and multiple values if + there were more. ([@KenanY](https://github.com/KenanY)) + +#### KNOWN BUGS + +Again, this is a _**BETA RELEASE**_, so not everything is working just yet. +Here are the issues that we already know about. If you run into something +that isn't on this list, +[let us know](https://github.com/npm/npm/issues/new)! + +* [#8575](https://github.com/npm/npm/issues/8575) + Circular deps will never be removed by the prune-on-uninstall code. +* [#8588](https://github.com/npm/npm/issues/8588) + Local deps where the dep name and the name in the package.json differ + don't result in an error. +* [#8637](https://github.com/npm/npm/issues/8637) + Modules can install themselves as direct dependencies. `npm@2` declined to + do this. +* [#8660](https://github.com/npm/npm/issues/8660) + Dependencies of failed optional dependencies aren't rolled back when the + optional dependency is, and then are reported as extraneous thereafter. + +#### NEW FEATURES + +##### The multi-stage installer! + +* [#5919](https://github.com/npm/npm/issues/5919) + Previously the installer had a set of steps it executed for each package + and it would immediately start executing them as soon as it decided to + act on a package. + + But now it executes each of those steps at the same time for all + packages, waiting for all of one stage to complete before moving on. This + eliminates many race conditions and makes the code easier to reason + about. + +This fixes, for instance: + +* [#6926](https://github.com/npm/npm/issues/6926) + ([#5001](https://github.com/npm/npm/issues/5001), + [#6170](https://github.com/npm/npm/issues/6170)) + `install` and `postinstall` lifecycle scripts now only execute `after` + all the module with the script's dependencies are installed. + +##### Install: it looks different! + +You'll now get a tree much like the one produced by `npm ls` that +highlights in orange the packages that were installed. Similarly, any +removed packages will have their names prefixed by a `-`. + +Also, `npm outdated` used to include the name of the module in the +`Location` field: + +``` +Package Current Wanted Latest Location +deep-equal MISSING 1.0.0 1.0.0 deep-equal +glob 4.5.3 4.5.3 5.0.10 rimraf > glob +``` + +Now it shows the module that required it as the final point in the +`Location` field: + +``` +Package Current Wanted Latest Location +deep-equal MISSING 1.0.0 1.0.0 npm +glob 4.5.3 4.5.3 5.0.10 npm > rimraf +``` + +Previously the `Location` field was telling you where the module was on +disk. Now it tells you what requires the module. When more than one thing +requires the module you'll see it listed once for each thing requiring it. + +##### Install: it works different! + +* [#6928](https://github.com/npm/npm/issues/6928) + ([#2931](https://github.com/npm/npm/issues/2931) + [#2950](https://github.com/npm/npm/issues/2950)) + `npm install` when you have an `npm-shrinkwrap.json` will ensure you have + the modules specified in it are installed in exactly the shape specified + no matter what you had when you started. +* [#6913](https://github.com/npm/npm/issues/6913) + ([#1341](https://github.com/npm/npm/issues/1341) + [#3124](https://github.com/npm/npm/issues/3124) + [#4956](https://github.com/npm/npm/issues/4956) + [#6349](https://github.com/npm/npm/issues/6349) + [#5465](https://github.com/npm/npm/issues/5465)) + `npm install` when some of your dependencies are missing sub-dependencies + will result in those sub-dependencies being installed. That is, `npm + install` now knows how to fix broken installs, most of the time. +* [#5465](https://github.com/npm/npm/issues/5465) + If you directly `npm install` a module that's already a subdep of + something else and your new version is incompatible, it will now install + the previous version nested in the things that need it. +* [`a2b50cf`](https://github.com/npm/npm/commit/a2b50cf) + [#5693](https://github.com/npm/npm/issues/5693) + When installing a new module, if it's mentioned in your + `npm-shrinkwrap.json` or your `package.json` use the version specifier + from there if you didn't specify one yourself. + +##### Flat, flat, flat! + +Your dependencies will now be installed *maximally flat*. Insofar as is +possible, all of your dependencies, and their dependencies, and THEIR +dependencies will be installed in your project's `node_modules` folder with no +nesting. You'll only see modules nested underneath one another when two (or +more) modules have conflicting dependencies. + +* [#3697](https://github.com/npm/npm/issues/3697) + This will hopefully eliminate most cases where Windows users ended up + with paths that were too long for Explorer and other standard tools to + deal with. +* [#6912](https://github.com/npm/npm/issues/6912) + ([#4761](https://github.com/npm/npm/issues/4761) + [#4037](https://github.com/npm/npm/issues/4037)) + This also means that your installs will be deduped from the start. +* [#5827](https://github.com/npm/npm/issues/5827) + This deduping even extends to git deps. +* [#6936](https://github.com/npm/npm/issues/6936) + ([#5698](https://github.com/npm/npm/issues/5698)) + Various commands are dedupe aware now. + +This has some implications for the behavior of other commands: + +* `npm uninstall` removes any dependencies of the module that you specified + that aren't required by any other module. Previously, it would only + remove those that happened to be installed under it, resulting in left + over cruft if you'd ever deduped. +* `npm ls` now shows you your dependency tree organized around what + requires what, rather than where those modules are on disk. +* [#6937](https://github.com/npm/npm/issues/6937) + `npm dedupe` now flattens the tree in addition to deduping. + +And bundling of dependencies when packing or publishing changes too: + +* [#2442](https://github.com/npm/npm/issues/2442) + bundledDependencies no longer requires that you specify deduped sub deps. + npm can now see that a dependency is required by something bundled and + automatically include it. To put that another way, bundledDependencies + should ONLY include things that you included in dependencies, + optionalDependencies or devDependencies. +* [#5437](https://github.com/npm/npm/issues/5437) + When bundling a dependency that's both a `devDependency` and the child of + a regular `dependency`, npm bundles the child dependency. + +As a demonstration of our confidence in our own work, npm's own +dependencies are now flattened, deduped, and bundled in the `npm@3` style. +This means that `npm@3` can't be packed or published by `npm@2`, which is +something to be aware of if you're hacking on npm. + +##### Shrinkwraps: they are a-changin'! + +First of all, they should be idempotent now +([#5779](https://github.com/npm/npm/issues/5779)). No more differences +because the first time you install (without `npm-shrinkwrap.json`) and the +second time (with `npm-shrinkwrap.json`). + +* [#6781](https://github.com/npm/npm/issues/6781) + Second, if you save your changes to `package.json` and you have + `npm-shrinkwrap.json`, then it will be updated as well. This applies to + all of the commands that update your tree: + * `npm install --save` + * `npm update --save` + * `npm dedupe --save` ([#6410](https://github.com/npm/npm/issues/6410)) + * `npm uninstall --save` +* [#4944](https://github.com/npm/npm/issues/4944) + ([#5161](https://github.com/npm/npm/issues/5161) + [#5448](https://github.com/npm/npm/issues/5448)) + Third, because `node_modules` folders are now deduped and flat, + shrinkwrap has to also be smart enough to handle this. + +And finally, enjoy this shrinkwrap bug fix: + +* [#3675](https://github.com/npm/npm/issues/3675) + When shrinkwrapping a dependency that's both a `devDependency` and the + child of a regular `dependency`, npm now correctly includes the child. + +##### The Age of Progress (Bars)! + +* [#6911](https://github.com/npm/npm/issues/6911) + ([#1257](https://github.com/npm/npm/issues/1257) + [#5340](https://github.com/npm/npm/issues/5340) + [#6420](https://github.com/npm/npm/issues/6420)) + The spinner is gone (yay? boo? will you miss it?), and in its place npm + has _progress bars_, so you actually have some sense of how long installs + will take. It's provided in Unicode and non-Unicode variants, and Unicode + support is automatically detected from your environment. + +#### TINY JEWELS + +The bottom is where we usually hide the less interesting bits of each +release, but each of these are small but incredibly useful bits of this +release, and very much worth checking out: + +* [`9ebe312`](https://github.com/npm/npm/commit/9ebe312) + Build system maintainers, rejoice: npm does a better job of cleaning up + after itself in your temporary folder. +* [#6942](https://github.com/npm/npm/issues/6942) + Check for permissions issues prior to actually trying to install + anything. +* Emit warnings at the end of the installation when possible, so that + they'll be on your screen when npm stops. +* [#3505](https://github.com/npm/npm/issues/3505) + `npm --dry-run`: You can now ask that npm only report what it _would have + done_ with the new `--dry-run` flag. This can be passed to any of the + commands that change your `node_modules` folder: `install`, `uninstall`, + `update` and `dedupe`. +* [`81b46fb`](https://github.com/npm/npm/commit/81b46fb) + npm now knows the correct URLs for `npm bugs` and `npm repo` for + repositories hosted on Bitbucket and GitLab, just like it does for GitHub + (and GitHub support now extends to projects hosted as gists as well as + traditional repositories). +* [`5be4008a`](https://github.com/npm/npm/commit/5be4008a09730cfa3891d9f145e4ec7f2accd144) + npm has been cleaned up to pass the [`standard`](http://npm.im/standard) + style checker. Forrest and Rebecca both feel this makes it easier to read + and understand the code, and should also make it easier for new + contributors to put merge-ready patches. + ([@othiym23](https://github.com/othiym23)) + +#### ZARRO BOOGS + +* [`6401643`](https://github.com/npm/npm/commit/6401643) + Make sure the global install directory exists before installing to it. + ([@thefourtheye](https://github.com/thefourtheye)) +* [#6158](https://github.com/npm/npm/issues/6158) + When we remove modules we do so inside-out running unbuild for each one. +* [`960a765`](https://github.com/npm/npm/commit/960a765) + The short usage information for each subcommand has been brought in sync + with the documentation. ([@smikes](https://github.com/smikes)) diff --git a/bin/nodejs6.7.0/node_modules/npm/CONTRIBUTING.md b/bin/nodejs6.7.0/node_modules/npm/CONTRIBUTING.md new file mode 100644 index 00000000..65a91001 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/CONTRIBUTING.md @@ -0,0 +1,12 @@ +## Before you submit a new issue + +* Check if there's a simple solution in the + [Troubleshooting](https://github.com/npm/npm/wiki/Troubleshooting) + wiki. +* [Search for similar + issues](https://github.com/npm/npm/search?q=Similar%20issues&type=Issues). +* Ensure your new issue conforms to the [Contributing + Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines). + +Participation in this open source project is subject to the [npm Code +of Conduct](http://www.npmjs.com/policies/conduct). diff --git a/bin/nodejs6.7.0/node_modules/npm/LICENSE b/bin/nodejs6.7.0/node_modules/npm/LICENSE new file mode 100644 index 00000000..cd9b6bd9 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/LICENSE @@ -0,0 +1,235 @@ +The npm application +Copyright (c) npm, Inc. and Contributors +Licensed on the terms of The Artistic License 2.0 + +Node package dependencies of the npm application +Copyright (c) their respective copyright owners +Licensed on their respective license terms + +The npm public registry at https://registry.npmjs.org +and the npm website at https://www.npmjs.com +Operated by npm, Inc. +Use governed by terms published on https://www.npmjs.com + +"Node.js" +Trademark Joyent, Inc., https://joyent.com +Neither npm nor npm, Inc. are affiliated with Joyent, Inc. + +The Node.js application +Project of Node Foundation, https://nodejs.org + +The npm Logo +Copyright (c) Mathias Pettersson and Brian Hammond + +"Gubblebum Blocky" typeface +Copyright (c) Tjarda Koster, https://jelloween.deviantart.com +Used with permission + + +-------- + + +The Artistic License 2.0 + +Copyright (c) 2000-2006, The Perl Foundation. + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +This license establishes the terms under which a given free software +Package may be copied, modified, distributed, and/or redistributed. +The intent is that the Copyright Holder maintains some artistic +control over the development of that Package while still keeping the +Package available as open source and free software. + +You are always permitted to make arrangements wholly outside of this +license directly with the Copyright Holder of a given Package. If the +terms of this license do not permit the full use that you propose to +make of the Package, you should contact the Copyright Holder and seek +a different licensing arrangement. + +Definitions + + "Copyright Holder" means the individual(s) or organization(s) + named in the copyright notice for the entire Package. + + "Contributor" means any party that has contributed code or other + material to the Package, in accordance with the Copyright Holder's + procedures. + + "You" and "your" means any person who would like to copy, + distribute, or modify the Package. + + "Package" means the collection of files distributed by the + Copyright Holder, and derivatives of that collection and/or of + those files. A given Package may consist of either the Standard + Version, or a Modified Version. + + "Distribute" means providing a copy of the Package or making it + accessible to anyone else, or in the case of a company or + organization, to others outside of your company or organization. + + "Distributor Fee" means any fee that you charge for Distributing + this Package or providing support for this Package to another + party. It does not mean licensing fees. + + "Standard Version" refers to the Package if it has not been + modified, or has been modified only in ways explicitly requested + by the Copyright Holder. + + "Modified Version" means the Package, if it has been changed, and + such changes were not explicitly requested by the Copyright + Holder. + + "Original License" means this Artistic License as Distributed with + the Standard Version of the Package, in its current version or as + it may be modified by The Perl Foundation in the future. + + "Source" form means the source code, documentation source, and + configuration files for the Package. + + "Compiled" form means the compiled bytecode, object code, binary, + or any other form resulting from mechanical transformation or + translation of the Source form. + + +Permission for Use and Modification Without Distribution + +(1) You are permitted to use the Standard Version and create and use +Modified Versions for any purpose without restriction, provided that +you do not Distribute the Modified Version. + + +Permissions for Redistribution of the Standard Version + +(2) You may Distribute verbatim copies of the Source form of the +Standard Version of this Package in any medium without restriction, +either gratis or for a Distributor Fee, provided that you duplicate +all of the original copyright notices and associated disclaimers. At +your discretion, such verbatim copies may or may not include a +Compiled form of the Package. + +(3) You may apply any bug fixes, portability changes, and other +modifications made available from the Copyright Holder. The resulting +Package will still be considered the Standard Version, and as such +will be subject to the Original License. + + +Distribution of Modified Versions of the Package as Source + +(4) You may Distribute your Modified Version as Source (either gratis +or for a Distributor Fee, and with or without a Compiled form of the +Modified Version) provided that you clearly document how it differs +from the Standard Version, including, but not limited to, documenting +any non-standard features, executables, or modules, and provided that +you do at least ONE of the following: + + (a) make the Modified Version available to the Copyright Holder + of the Standard Version, under the Original License, so that the + Copyright Holder may include your modifications in the Standard + Version. + + (b) ensure that installation of your Modified Version does not + prevent the user installing or running the Standard Version. In + addition, the Modified Version must bear a name that is different + from the name of the Standard Version. + + (c) allow anyone who receives a copy of the Modified Version to + make the Source form of the Modified Version available to others + under + + (i) the Original License or + + (ii) a license that permits the licensee to freely copy, + modify and redistribute the Modified Version using the same + licensing terms that apply to the copy that the licensee + received, and requires that the Source form of the Modified + Version, and of any works derived from it, be made freely + available in that license fees are prohibited but Distributor + Fees are allowed. + + +Distribution of Compiled Forms of the Standard Version +or Modified Versions without the Source + +(5) You may Distribute Compiled forms of the Standard Version without +the Source, provided that you include complete instructions on how to +get the Source of the Standard Version. Such instructions must be +valid at the time of your distribution. If these instructions, at any +time while you are carrying out such distribution, become invalid, you +must provide new instructions on demand or cease further distribution. +If you provide valid instructions or cease distribution within thirty +days after you become aware that the instructions are invalid, then +you do not forfeit any of your rights under this license. + +(6) You may Distribute a Modified Version in Compiled form without +the Source, provided that you comply with Section 4 with respect to +the Source of the Modified Version. + + +Aggregating or Linking the Package + +(7) You may aggregate the Package (either the Standard Version or +Modified Version) with other packages and Distribute the resulting +aggregation provided that you do not charge a licensing fee for the +Package. Distributor Fees are permitted, and licensing fees for other +components in the aggregation are permitted. The terms of this license +apply to the use and Distribution of the Standard or Modified Versions +as included in the aggregation. + +(8) You are permitted to link Modified and Standard Versions with +other works, to embed the Package in a larger work of your own, or to +build stand-alone binary or bytecode versions of applications that +include the Package, and Distribute the result without restriction, +provided the result does not expose a direct interface to the Package. + + +Items That are Not Considered Part of a Modified Version + +(9) Works (including, but not limited to, modules and scripts) that +merely extend or make use of the Package, do not, by themselves, cause +the Package to be a Modified Version. In addition, such works are not +considered parts of the Package itself, and are not subject to the +terms of this license. + + +General Provisions + +(10) Any use, modification, and distribution of the Standard or +Modified Versions is governed by this Artistic License. By using, +modifying or distributing the Package, you accept this license. Do not +use, modify, or distribute the Package, if you do not accept this +license. + +(11) If your Modified Version has been derived from a Modified +Version made by someone other than you, you are nevertheless required +to ensure that your Modified Version complies with the requirements of +this license. + +(12) This license does not grant you the right to use any trademark, +service mark, tradename, or logo of the Copyright Holder. + +(13) This license includes the non-exclusive, worldwide, +free-of-charge patent license to make, have made, use, offer to sell, +sell, import and otherwise transfer the Package with respect to any +patent claims licensable by the Copyright Holder that are necessarily +infringed by the Package. If you institute patent litigation +(including a cross-claim or counterclaim) against any party alleging +that the Package constitutes direct or contributory patent +infringement, then this Artistic License to you shall terminate on the +date that such litigation is filed. + +(14) Disclaimer of Warranty: +THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS +IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL +LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------- diff --git a/bin/nodejs6.7.0/node_modules/npm/Makefile b/bin/nodejs6.7.0/node_modules/npm/Makefile new file mode 100644 index 00000000..55292941 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/Makefile @@ -0,0 +1,182 @@ +# vim: set softtabstop=2 shiftwidth=2: +SHELL = bash + +PUBLISHTAG = $(shell node scripts/publish-tag.js) +BRANCH = $(shell git rev-parse --abbrev-ref HEAD) + +markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md + +html_docdeps = html/dochead.html \ + html/docfoot.html \ + scripts/doc-build.sh \ + package.json + +cli_mandocs = $(shell find doc/cli -name '*.md' \ + |sed 's|.md|.1|g' \ + |sed 's|doc/cli/|man/man1/|g' ) \ + man/man1/npm-README.1 + +files_mandocs = $(shell find doc/files -name '*.md' \ + |sed 's|.md|.5|g' \ + |sed 's|doc/files/|man/man5/|g' ) \ + man/man5/npm-json.5 \ + man/man5/npm-global.5 + +misc_mandocs = $(shell find doc/misc -name '*.md' \ + |sed 's|.md|.7|g' \ + |sed 's|doc/misc/|man/man7/|g' ) \ + man/man7/npm-index.7 + +cli_htmldocs = $(shell find doc/cli -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/cli/|html/doc/cli/|g' ) \ + html/doc/README.html + +files_htmldocs = $(shell find doc/files -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/files/|html/doc/files/|g' ) \ + html/doc/files/npm-json.html \ + html/doc/files/npm-global.html + +misc_htmldocs = $(shell find doc/misc -name '*.md' \ + |sed 's|.md|.html|g' \ + |sed 's|doc/misc/|html/doc/misc/|g' ) \ + html/doc/index.html + +mandocs = $(cli_mandocs) $(files_mandocs) $(misc_mandocs) + +htmldocs = $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs) + +all: doc + +latest: + @echo "Installing latest published npm" + @echo "Use 'make install' or 'make link' to install the code" + @echo "in this folder that you're looking at right now." + node cli.js install -g -f npm ${NPMOPTS} + +install: all + node cli.js install -g -f ${NPMOPTS} + +# backwards compat +dev: install + +link: uninstall + node cli.js link -f + +clean: markedclean marked-manclean doc-clean uninstall + rm -rf npmrc + node cli.js cache clean + +uninstall: + node cli.js rm npm -g -f + +doc: $(mandocs) $(htmldocs) + +markedclean: + rm -rf node_modules/marked node_modules/.bin/marked .building_marked + +marked-manclean: + rm -rf node_modules/marked-man node_modules/.bin/marked-man .building_marked-man + +docclean: doc-clean +doc-clean: + rm -rf \ + .building_marked \ + .building_marked-man \ + html/doc \ + man + +# use `npm install marked-man` for this to work. +man/man1/npm-README.1: README.md scripts/doc-build.sh package.json + @[ -d man/man1 ] || mkdir -p man/man1 + scripts/doc-build.sh $< $@ + +man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json + @[ -d man/man1 ] || mkdir -p man/man1 + scripts/doc-build.sh $< $@ + +man/man5/npm-json.5: man/man5/package.json.5 + cp $< $@ + +man/man5/npm-global.5: man/man5/npm-folders.5 + cp $< $@ + +man/man5/%.5: doc/files/%.md scripts/doc-build.sh package.json + @[ -d man/man5 ] || mkdir -p man/man5 + scripts/doc-build.sh $< $@ + +doc/misc/npm-index.md: scripts/index-build.js package.json + node scripts/index-build.js > $@ + +html/doc/index.html: doc/misc/npm-index.md $(html_docdeps) + @[ -d html/doc ] || mkdir -p html/doc + scripts/doc-build.sh $< $@ + +man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json + @[ -d man/man7 ] || mkdir -p man/man7 + scripts/doc-build.sh $< $@ + +html/doc/README.html: README.md $(html_docdeps) + @[ -d html/doc ] || mkdir -p html/doc + scripts/doc-build.sh $< $@ + +html/doc/cli/%.html: doc/cli/%.md $(html_docdeps) + @[ -d html/doc/cli ] || mkdir -p html/doc/cli + scripts/doc-build.sh $< $@ + +html/doc/files/npm-json.html: html/doc/files/package.json.html + cp $< $@ + +html/doc/files/npm-global.html: html/doc/files/npm-folders.html + cp $< $@ + +html/doc/files/%.html: doc/files/%.md $(html_docdeps) + @[ -d html/doc/files ] || mkdir -p html/doc/files + scripts/doc-build.sh $< $@ + +html/doc/misc/%.html: doc/misc/%.md $(html_docdeps) + @[ -d html/doc/misc ] || mkdir -p html/doc/misc + scripts/doc-build.sh $< $@ + + +marked: node_modules/.bin/marked + +node_modules/.bin/marked: + node cli.js install marked --no-global + +marked-man: node_modules/.bin/marked-man + +node_modules/.bin/marked-man: + node cli.js install marked-man --no-global + +doc: man + +man: $(cli_docs) + +test: doc + node cli.js test + +tag: + npm tag npm@$(PUBLISHTAG) latest + +ls-ok: + node . ls >/dev/null + +gitclean: + git clean -fd + +publish: gitclean ls-ok link doc-clean doc + @git push origin :v$(shell npm -v) 2>&1 || true + git push origin $(BRANCH) &&\ + git push origin --tags &&\ + npm publish --tag=$(PUBLISHTAG) + +release: gitclean ls-ok markedclean marked-manclean doc-clean doc + node cli.js prune --production + @bash scripts/release.sh + +sandwich: + @[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || (echo "make it yourself" && exit 13) + +.PHONY: all latest install dev link doc clean uninstall test man doc-clean docclean release ls-ok realclean diff --git a/bin/nodejs6.7.0/node_modules/npm/README.md b/bin/nodejs6.7.0/node_modules/npm/README.md new file mode 100644 index 00000000..4b674a4b --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/README.md @@ -0,0 +1,166 @@ +npm(1) -- a JavaScript package manager +============================== +[![Build Status](https://img.shields.io/travis/npm/npm/master.svg)](https://travis-ci.org/npm/npm) +## SYNOPSIS + +This is just enough info to get you up and running. + +Much more info available via `npm help` once it's installed. + +## IMPORTANT + +**You need node v0.8 or higher to run this program.** + +To install an old **and unsupported** version of npm that works on node 0.3 +and prior, clone the git repo and dig through the old tags and branches. + +**npm is configured to use npm, Inc.'s public package registry at +<https://registry.npmjs.org> by default.** + +You can configure npm to use any compatible registry you +like, and even run your own registry. Check out the [doc on +registries](https://docs.npmjs.com/misc/registry). + +Use of someone else's registry may be governed by terms of use. The +terms of use for the default public registry are available at +<https://www.npmjs.com>. + +## Super Easy Install + +npm is bundled with [node](http://nodejs.org/download/). + +### Windows Computers + +[Get the MSI](http://nodejs.org/download/). npm is in it. + +### Apple Macintosh Computers + +[Get the pkg](http://nodejs.org/download/). npm is in it. + +### Other Sorts of Unices + +Run `make install`. npm will be installed with node. + +If you want a more fancy pants install (a different version, customized +paths, etc.) then read on. + +## Fancy Install (Unix) + +There's a pretty robust install script at +<https://www.npmjs.com/install.sh>. You can download that and run it. + +Here's an example using curl: + +```sh +curl -L https://www.npmjs.com/install.sh | sh +``` + +### Slightly Fancier + +You can set any npm configuration params with that script: + +```sh +npm_config_prefix=/some/path sh install.sh +``` + +Or, you can run it in uber-debuggery mode: + +```sh +npm_debug=1 sh install.sh +``` + +### Even Fancier + +Get the code with git. Use `make` to build the docs and do other stuff. +If you plan on hacking on npm, `make link` is your friend. + +If you've got the npm source code, you can also semi-permanently set +arbitrary config keys using the `./configure --key=val ...`, and then +run npm commands by doing `node cli.js <cmd> <args>`. (This is helpful +for testing, or running stuff without actually installing npm itself.) + +## Windows Install or Upgrade + +Many improvements for Windows users have been made in npm 3 - you will have a better +experience if you run a recent version of npm. To upgrade, either use [Microsoft's +upgrade tool](https://github.com/felixrieseberg/npm-windows-upgrade), +[download a new version of Node](http://nodejs.org/download/), +or follow the Windows upgrade instructions in the +[npm Troubleshooting Guide](https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows). + +If that's not fancy enough for you, then you can fetch the code with +git, and mess with it directly. + +## Installing on Cygwin + +No. + +## Uninstalling + +So sad to see you go. + +```sh +sudo npm uninstall npm -g +``` +Or, if that fails, + +```sh +sudo make uninstall +``` + +## More Severe Uninstalling + +Usually, the above instructions are sufficient. That will remove +npm, but leave behind anything you've installed. + +If you would like to remove all the packages that you have installed, +then you can use the `npm ls` command to find them, and then `npm rm` to +remove them. + +To remove cruft left behind by npm 0.x, you can use the included +`clean-old.sh` script file. You can run it conveniently like this: + +```sh +npm explore npm -g -- sh scripts/clean-old.sh +``` + +npm uses two configuration files, one for per-user configs, and another +for global (every-user) configs. You can view them by doing: + +```sh +npm config get userconfig # defaults to ~/.npmrc +npm config get globalconfig # defaults to /usr/local/etc/npmrc +``` + +Uninstalling npm does not remove configuration files by default. You +must remove them yourself manually if you want them gone. Note that +this means that future npm installs will not remember the settings that +you have chosen. + +## More Docs + +Check out the [docs](https://docs.npmjs.com/), + +You can use the `npm help` command to read any of them. + +If you're a developer, and you want to use npm to publish your program, +you should [read this](https://docs.npmjs.com/misc/developers) + +## BUGS + +When you find issues, please report them: + +* web: + <https://github.com/npm/npm/issues> + +Be sure to include *all* of the output from the npm command that didn't work +as expected. The `npm-debug.log` file is also helpful to provide. + +You can also look for isaacs in #node.js on irc://irc.freenode.net. He +will no doubt tell you to put the output in a gist or email. + +## SEE ALSO + +* npm(1) +* npm-help(1) +* npm-index(7) diff --git a/bin/nodejs6.7.0/node_modules/npm/appveyor.yml b/bin/nodejs6.7.0/node_modules/npm/appveyor.yml new file mode 100644 index 00000000..9ab88c30 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/appveyor.yml @@ -0,0 +1,38 @@ +environment: + matrix: + # LTS is our most important target + - nodejs_version: "4" + # next LTS and master is next most important + - nodejs_version: "6" + # still in LTS maintenance until fall 2016 + # (also still in wide use) + - nodejs_version: "0.10" + # will be unsupported as soon as 6 becomes LTS and 7 released + - nodejs_version: "5" + # technically in LTS / distros, unbeloved + - nodejs_version: "0.12" + COVERALLS_REPO_TOKEN: + secure: XdC0aySefK0HLh1GNk6aKrzZPbCfPQLyA4mYtFGEp4DrTuZA/iuCUS0LDqFYO8JQ +platform: + - x86 + - x64 +install: + - ps: Install-Product node $env:nodejs_version $env:platform + - npm config set spin false + - npm rebuild + - node . install -g . + - set "PATH=%APPDATA%\npm;C:\Program Files\Git\mingw64\libexec;%PATH%" + - npm install --loglevel=http +test_script: + - node --version + - npm --version + - npm test +notifications: +- provider: Slack + incoming_webhook: + secure: vXiG5AgpqxJsXZ0N0CTYDuVrX6RMjBybZKtOx6IbRxCyjgd+DAx6Z9/0XgYQjuof7QFJY3M/U6HxaREQVYbNVHA+C5N5dNALRbKzAC8QNbA= +# GO_FAST +matrix: + fast_finish: true +# we don't need the builds, we just need tests +build: off diff --git a/bin/nodejs6.7.0/node_modules/npm/bin/npm b/bin/nodejs6.7.0/node_modules/npm/bin/npm new file mode 100644 index 00000000..1226afbc --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/bin/npm @@ -0,0 +1,34 @@ +#!/bin/sh +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node +fi + +NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" + +case `uname` in + *MINGW*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; + *CYGWIN*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; +esac + +"$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/bin/nodejs6.7.0/node_modules/npm/bin/npm-cli.js b/bin/nodejs6.7.0/node_modules/npm/bin/npm-cli.js new file mode 100644 index 00000000..479772e9 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/bin/npm-cli.js @@ -0,0 +1,75 @@ +#!/usr/bin/env node +;(function () { // wrapper in case we're in module_context mode + // windows: running "npm blah" in this folder will invoke WSH, not node. + /*global WScript*/ + if (typeof WScript !== 'undefined') { + WScript.echo( + 'npm does not work when run\n' + + 'with the Windows Scripting Host\n\n' + + "'cd' to a different directory,\n" + + "or type 'npm.cmd <args>',\n" + + "or type 'node npm <args>'." + ) + WScript.quit(1) + return + } + + process.title = 'npm' + + var log = require('npmlog') + log.pause() // will be unpaused when config is loaded. + + log.info('it worked if it ends with', 'ok') + + var path = require('path') + var npm = require('../lib/npm.js') + var npmconf = require('../lib/config/core.js') + var errorHandler = require('../lib/utils/error-handler.js') + + var configDefs = npmconf.defs + var shorthands = configDefs.shorthands + var types = configDefs.types + var nopt = require('nopt') + + // if npm is called as "npmg" or "npm_g", then + // run in global mode. + if (path.basename(process.argv[1]).slice(-1) === 'g') { + process.argv.splice(1, 1, 'npm', '-g') + } + + log.verbose('cli', process.argv) + + var conf = nopt(types, shorthands) + npm.argv = conf.argv.remain + if (npm.deref(npm.argv[0])) npm.command = npm.argv.shift() + else conf.usage = true + + if (conf.version) { + console.log(npm.version) + return + } + + if (conf.versions) { + npm.command = 'version' + conf.usage = false + npm.argv = [] + } + + log.info('using', 'npm@%s', npm.version) + log.info('using', 'node@%s', process.version) + + process.on('uncaughtException', errorHandler) + + if (conf.usage && npm.command !== 'help') { + npm.argv.unshift(npm.command) + npm.command = 'help' + } + + // now actually fire up npm and run the command. + // this is how to use npm programmatically: + conf._exit = true + npm.load(conf, function (er) { + if (er) return errorHandler(er) + npm.commands[npm.command](npm.argv, errorHandler) + }) +})() diff --git a/bin/nodejs6.7.0/node_modules/npm/bin/npm.cmd b/bin/nodejs6.7.0/node_modules/npm/bin/npm.cmd new file mode 100644 index 00000000..f111c59d --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/bin/npm.cmd @@ -0,0 +1,19 @@ +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/bin/nodejs6.7.0/node_modules/npm/bin/read-package-json.js b/bin/nodejs6.7.0/node_modules/npm/bin/read-package-json.js new file mode 100644 index 00000000..9f32701c --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/bin/read-package-json.js @@ -0,0 +1,24 @@ +var argv = process.argv +if (argv.length < 3) { + console.error('Usage: read-package.json <file> [<fields> ...]') + process.exit(1) +} + +var file = argv[2] +var readJson = require('read-package-json') + +readJson(file, function (er, data) { + if (er) throw er + if (argv.length === 3) { + console.log(data) + } else { + argv.slice(3).forEach(function (field) { + field = field.split('.') + var val = data + field.forEach(function (f) { + val = val[f] + }) + console.log(val) + }) + } +}) diff --git a/bin/nodejs6.7.0/node_modules/npm/changelogs/CHANGELOG-1.md b/bin/nodejs6.7.0/node_modules/npm/changelogs/CHANGELOG-1.md new file mode 100644 index 00000000..0adaed7d --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/changelogs/CHANGELOG-1.md @@ -0,0 +1,743 @@ +### v1.4.29 (2015-10-29): + +#### THINGS ARE HAPPENING IN LTS LAND + +In a special one-off release as part of the [strategy to get a version of npm +into Node LTS that works with the current +registry](https://github.com/nodejs/LTS/issues/37), modify npm to print out +this deprecation banner literally every time npm is invoked to do anything: + +``` +npm WARN deprecated This version of npm lacks support for important features, +npm WARN deprecated such as scoped packages, offered by the primary npm +npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the +npm WARN deprecated latest stable version. To upgrade to npm@2, run: +npm WARN deprecated +npm WARN deprecated npm -g install npm@latest-2 +npm WARN deprecated +npm WARN deprecated To upgrade to the latest stable version, run: +npm WARN deprecated +npm WARN deprecated npm -g install npm@latest +npm WARN deprecated +npm WARN deprecated (Depending on how Node.js was installed on your system, you +npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if +npm WARN deprecated on Windows, run them from an Administrator prompt.) +npm WARN deprecated +npm WARN deprecated If you're running the version of npm bundled with +npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS +npm WARN deprecated will be bundled with a version of npm@2, which has some small +npm WARN deprecated backwards-incompatible changes made to `npm run-script` and +npm WARN deprecated semver behavior. +``` + +The message basically tells the tale: Node 0.10 will finally be getting +`npm@2`, so those of you who haven't upgraded your build systems to deal with +its (relatively small) breaking changes should do so now. + +Also, this version doesn't even pretend that it can deal with scoped packages, +which, given the confusing behavior of older versions of `npm@1.4`, where it +would sometimes try to install packages from GitHub, is a distinct improvement. + +There is no good reason for you as an end user to upgrade to this version of +npm yourself. + +* [`709e9b4`](https://github.com/npm/npm/commit/709e9b44f5df9817a1c4babfbf26a2329bd265fb) + Print 20-line deprecation banner on all command invocations. + ([@othiym23](https://github.com/othiym23)) +* [`0c29d09`](https://github.com/npm/npm/commit/0c29d0906608e8e174bd30a7a245e19795326051) + Crash out immediately with an exhortation to upgrade on attempts to use + scoped packages. ([@othiym23](https://github.com/othiym23)) + +### v1.5.0-alpha-4 (2014-07-18): + +* fall back to `_auth` config as default auth when using default registry + ([@isaacs](https://github.com/isaacs)) +* support for 'init.version' for those who don't want to deal with semver 0.0.x + oddities ([@rvagg](https://github.com/rvagg)) +* [`be06213`](https://github.com/npm/npm/commit/be06213415f2d51a50d2c792b4cd0d3412a9a7b1) + remove residual support for `win` log level + ([@aterris](https://github.com/aterris)) + +### v1.5.0-alpha-3 (2014-07-17): + +* [`a3a85dd`](https://github.com/npm/npm/commit/a3a85dd004c9245a71ad2f0213bd1a9a90d64cd6) + `--save` scoped packages correctly ([@othiym23](https://github.com/othiym23)) +* [`18a3385`](https://github.com/npm/npm/commit/18a3385bcf8bfb8312239216afbffb7eec759150) + `npm-registry-client@3.0.2` ([@othiym23](https://github.com/othiym23)) +* [`375988b`](https://github.com/npm/npm/commit/375988b9bf5aa5170f06a790d624d31b1eb32c6d) + invalid package names are an early error for optional deps + ([@othiym23](https://github.com/othiym23)) +* consistently use `node-package-arg` instead of arbitrary package spec + splitting ([@othiym23](https://github.com/othiym23)) + +### v1.5.0-alpha-2 (2014-07-01): + +* [`54cf625`](https://github.com/npm/npm/commit/54cf62534e3331e3f454e609e44f0b944e819283) + fix handling for 301s in `npm-registry-client@3.0.1` + ([@Raynos](https://github.com/Raynos)) +* [`e410861`](https://github.com/npm/npm/commit/e410861c69a3799c1874614cb5b87af8124ff98d) + don't crash if no username set on `whoami` + ([@isaacs](https://github.com/isaacs)) +* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) + respect `--json` for output ([@isaacs](https://github.com/isaacs)) +* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) + outdated: Don't show headings if there's nothing to output + ([@isaacs](https://github.com/isaacs)) +* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) + outdated: Default to `latest` rather than `*` for unspecified deps + ([@isaacs](https://github.com/isaacs)) + +### v1.5.0-alpha-1 (2014-07-01): + +* [`eef4884`](https://github.com/npm/npm/commit/eef4884d6487ee029813e60a5f9c54e67925d9fa) + use the correct piece of the spec for GitHub shortcuts + ([@othiym23](https://github.com/othiym23)) + +### v1.5.0-alpha-0 (2014-07-01): + +* [`7f55057`](https://github.com/npm/npm/commit/7f55057807cfdd9ceaf6331968e666424f48116c) + install scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) + ([@othiym23](https://github.com/othiym23)) +* [`0df7e16`](https://github.com/npm/npm/commit/0df7e16c0232d8f4d036ebf4ec3563215517caac) + publish scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) + ([@othiym23](https://github.com/othiym23)) +* [`0689ba2`](https://github.com/npm/npm/commit/0689ba249b92b4c6279a26804c96af6f92b3a501) + support (and save) --scope=@s config + ([@othiym23](https://github.com/othiym23)) +* [`f34878f`](https://github.com/npm/npm/commit/f34878fc4cee29901e4daf7bace94be01e25cad7) + scope credentials to registry ([@othiym23](https://github.com/othiym23)) +* [`0ac7ca2`](https://github.com/npm/npm/commit/0ac7ca233f7a69751fe4386af6c4daa3ee9fc0da) + capture and store bearer tokens when sent by registry + ([@othiym23](https://github.com/othiym23)) +* [`63c3277`](https://github.com/npm/npm/commit/63c3277f089b2c4417e922826bdc313ac854cad6) + only delete files that are created by npm + ([@othiym23](https://github.com/othiym23)) +* [`4f54043`](https://github.com/npm/npm/commit/4f540437091d1cbca3915cd20c2da83c2a88bb8e) + `npm-package-arg@2.0.0` ([@othiym23](https://github.com/othiym23)) +* [`9e1460e`](https://github.com/npm/npm/commit/9e1460e6ac9433019758481ec031358f4af4cd44) + `read-package-json@1.2.3` ([@othiym23](https://github.com/othiym23)) +* [`719d8ad`](https://github.com/npm/npm/commit/719d8adb9082401f905ff4207ede494661f8a554) + `fs-vacuum@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`9ef8fe4`](https://github.com/npm/npm/commit/9ef8fe4d6ead3acb3e88c712000e2d3a9480ebec) + `async-some@1.0.0` ([@othiym23](https://github.com/othiym23)) +* [`a964f65`](https://github.com/npm/npm/commit/a964f65ab662107b62a4ca58535ce817e8cca331) + `npmconf@2.0.1` ([@othiym23](https://github.com/othiym23)) +* [`113765b`](https://github.com/npm/npm/commit/113765bfb7d3801917c1d9f124b8b3d942bec89a) + `npm-registry-client@3.0.0` ([@othiym23](https://github.com/othiym23)) + +### v1.4.28 (2014-09-12): + +* [`f4540b6`](https://github.com/npm/npm/commit/f4540b6537a87e653d7495a9ddcf72949fdd4d14) + [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just + before the CLI exits ([@isaacs](https://github.com/isaacs)) +* [`1eabfd5`](https://github.com/npm/npm/commit/1eabfd5c03f33c2bd28823714ff02059eeee3899) + [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all + callbacks have finished before proceeding + ([@othiym23](https://github.com/othiym23)) + +### v1.4.27 (2014-09-04): + +* [`4cf3c8f`](https://github.com/npm/npm/commit/4cf3c8fd78c9e2693a5f899f50c28f4823c88e2e) + [#6007](https://github.com/npm/npm/issues/6007) request@2.42.0: properly set + headers on proxy requests ([@isaacs](https://github.com/isaacs)) +* [`403cb52`](https://github.com/npm/npm/commit/403cb526be1472bb7545fa8e62d4976382cdbbe5) + [#6055](https://github.com/npm/npm/issues/6055) npmconf@1.1.8: restore + case-insensitivity of environmental config + ([@iarna](https://github.com/iarna)) + +### v1.4.26 (2014-08-28): + +* [`eceea95`](https://github.com/npm/npm/commit/eceea95c804fa15b18e91c52c0beb08d42a3e77d) + `github-url-from-git@1.4.0`: add support for git+https and git+ssh + ([@stefanbuck](https://github.com/stefanbuck)) +* [`e561758`](https://github.com/npm/npm/commit/e5617587e7d7ab686192391ce55357dbc7fed0a3) + `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`0c4fab3`](https://github.com/npm/npm/commit/0c4fab372ee76eab01dda83b6749429a8564902e) + `cmd-shim@2.0.0`: upgrade to graceful-fs 3 + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`2d69e4d`](https://github.com/npm/npm/commit/2d69e4d95777671958b5e08d3b2f5844109d73e4) + `github-url-from-username-repo@1.0.0`: accept slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`81f9b2b`](https://github.com/npm/npm/commit/81f9b2bac9d34c223ea093281ba3c495f23f10d1) + ensure lifecycle spawn errors caught properly + ([@isaacs](https://github.com/isaacs)) +* [`bfaab8c`](https://github.com/npm/npm/commit/bfaab8c6e0942382a96b250634ded22454c36b5a) + `npm-registry-client@2.0.7`: properly encode % in passwords + ([@isaacs](https://github.com/isaacs)) +* [`91cfb58`](https://github.com/npm/npm/commit/91cfb58dda851377ec604782263519f01fd96ad8) + doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) + +### v1.4.25 (2014-08-21): + +* [`64c0ec2`](https://github.com/npm/npm/commit/64c0ec241ef5d83761ca8de54acb3c41b079956e) + `npm-registry-client@2.0.6`: Print the notification header returned by the + registry, and make sure status codes are printed without gratuitous quotes + around them. + ([@othiym23](https://github.com/othiym23)) +* [`a8ed12b`](https://github.com/npm/npm/commit/a8ed12b) `tar@1.0.1`: + Add test for removing an extract target immediately after unpacking. + ([@isaacs](https://github.com/isaacs)) +* [`70fd11d`](https://github.com/npm/npm/commit/70fd11d) + `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, + and `retries` options. Part 2 of race condition leading to `ENOENT` + errors. + ([@isaacs](https://github.com/isaacs)) +* [`0072c4d`](https://github.com/npm/npm/commit/0072c4d) + `fstream@1.0.2`: Fix a double-finish call which can result in excess + FS operations after the `close` event. Part 2 of race condition + leading to `ENOENT` errors. + ([@isaacs](https://github.com/isaacs)) + +### v1.4.24 (2014-08-14): + +* [`9344bd9`](https://github.com/npm/npm/commit/9344bd9b2929b5c399a0e0e0b34d45bce7bc24bb) + doc: add new changelog ([@othiym23](https://github.com/othiym23)) +* [`4be76fd`](https://github.com/npm/npm/commit/4be76fd65e895883c337a99f275ccc8c801adda3) + doc: update version doc to include `pre-*` increment args + ([@isaacs](https://github.com/isaacs)) +* [`e4f2620`](https://github.com/npm/npm/commit/e4f262036080a282ad60e236a9aeebd39fde9fe4) + build: add `make tag` to tag current release as `latest` + ([@isaacs](https://github.com/isaacs)) +* [`ec2596a`](https://github.com/npm/npm/commit/ec2596a7cb626772780b25b0a94a7e547a812bd5) + build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) +* [`9ee55f8`](https://github.com/npm/npm/commit/9ee55f892b8b473032a43c59912c5684fd1b39e6) + build: add script to output `v1.4-next` publish tag + ([@isaacs](https://github.com/isaacs)) +* [`aecb56f`](https://github.com/npm/npm/commit/aecb56f95a84687ea46920a0b98aaa587fee1568) + build: remove outdated `docpublish` make target + ([@isaacs](https://github.com/isaacs)) +* [`b57a9b7`](https://github.com/npm/npm/commit/b57a9b7ccd13e6b38831ed63595c8ea5763da247) + build: remove unpublish step from `make publish` + ([@isaacs](https://github.com/isaacs)) +* [`2c6acb9`](https://github.com/npm/npm/commit/2c6acb96c71c16106965d5cd829b67195dd673c7) + install: rename `.gitignore` when unpacking foreign tarballs + ([@isaacs](https://github.com/isaacs)) +* [`22f3681`](https://github.com/npm/npm/commit/22f3681923e993a47fc1769ba735bfa3dd138082) + cache: detect non-gzipped tar files more reliably + ([@isaacs](https://github.com/isaacs)) + +### v1.4.23 (2014-07-31): + +* [`8dd11d1`](https://github.com/npm/npm/commit/8dd11d1) update several + dependencies to avoid using `semver`s starting with 0. + +### v1.4.22 (2014-07-31): + +* [`d9a9e84`](https://github.com/npm/npm/commit/d9a9e84) `read-package-json@1.2.4` + ([@isaacs](https://github.com/isaacs)) +* [`86f0340`](https://github.com/npm/npm/commit/86f0340) + `github-url-from-git@1.2.0` ([@isaacs](https://github.com/isaacs)) +* [`a94136a`](https://github.com/npm/npm/commit/a94136a) `fstream@0.1.29` + ([@isaacs](https://github.com/isaacs)) +* [`bb82d18`](https://github.com/npm/npm/commit/bb82d18) `glob@4.0.5` + ([@isaacs](https://github.com/isaacs)) +* [`5b6bcf4`](https://github.com/npm/npm/commit/5b6bcf4) `cmd-shim@1.1.2` + ([@isaacs](https://github.com/isaacs)) +* [`c2aa8b3`](https://github.com/npm/npm/commit/c2aa8b3) license: Cleaned up + legalese with actual lawyer ([@isaacs](https://github.com/isaacs)) +* [`63fe0ee`](https://github.com/npm/npm/commit/63fe0ee) `init-package-json@1.0.0` + ([@isaacs](https://github.com/isaacs)) + +### v1.4.21 (2014-07-14): + +* [`88f51aa`](https://github.com/npm/npm/commit/88f51aa27eb9a958d1fa7ec50fee5cfdedd05110) + fix handling for 301s in `npm-registry-client@2.0.3` + ([@Raynos](https://github.com/Raynos)) + +### v1.4.20 (2014-07-02): + +* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) + respect `--json` for output ([@isaacs](https://github.com/isaacs)) +* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) + outdated: Don't show headings if there's nothing to output + ([@isaacs](https://github.com/isaacs)) +* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) + outdated: Default to `latest` rather than `*` for unspecified deps + ([@isaacs](https://github.com/isaacs)) + +### v1.4.19 (2014-07-01): + +* [`f687433`](https://github.com/npm/npm/commit/f687433) relative URLS for + working non-root registry URLS ([@othiym23](https://github.com/othiym23)) +* [`bea190c`](https://github.com/npm/npm/commit/bea190c) + [#5591](https://github.com/npm/npm/issues/5591) bump nopt and npmconf + ([@isaacs](https://github.com/isaacs)) + +### v1.4.18 (2014-06-29): + +* Bump glob dependency from 4.0.2 to 4.0.3. It now uses graceful-fs when + available, increasing resilience to [various filesystem + errors](https://github.com/isaacs/node-graceful-fs#improvements-over-fs-module). + ([@isaacs](https://github.com/isaacs)) + +### v1.4.17 (2014-06-27): + +* replace escape codes with ansicolors + ([@othiym23](https://github.com/othiym23)) +* Allow to build all the docs OOTB. ([@GeJ](https://github.com/GeJ)) +* Use core.longpaths on win32 git - fixes + [#5525](https://github.com/npm/npm/issues/5525) ([@bmeck](https://github.com/bmeck)) +* `npmconf@1.1.2` ([@isaacs](https://github.com/isaacs)) +* Consolidate color sniffing in config/log loading process + ([@isaacs](https://github.com/isaacs)) +* add verbose log when project config file is ignored + ([@isaacs](https://github.com/isaacs)) +* npmconf: Float patch to remove 'scope' from config defs + ([@isaacs](https://github.com/isaacs)) +* doc: npm-explore can't handle a version + ([@robertkowalski](https://github.com/robertkowalski)) +* Add user-friendly errors for ENOSPC and EROFS. + ([@voodootikigod](https://github.com/voodootikigod)) +* bump tar and fstream deps ([@isaacs](https://github.com/isaacs)) +* Run the npm-registry-couchapp tests along with npm tests + ([@isaacs](https://github.com/isaacs)) + +### v1.2.8000 (2014-06-17): + +* Same as v1.4.16, but with the spinner disabled, and a version number that + starts with v1.2. + +### v1.4.16 (2014-06-17): + +* `npm-registry-client@2.0.2` ([@isaacs](https://github.com/isaacs)) +* `fstream@0.1.27` ([@isaacs](https://github.com/isaacs)) +* `sha@1.2.4` ([@isaacs](https://github.com/isaacs)) +* `rimraf@2.2.8` ([@isaacs](https://github.com/isaacs)) +* `npmlog@1.0.1` ([@isaacs](https://github.com/isaacs)) +* `npm-registry-client@2.0.1` ([@isaacs](https://github.com/isaacs)) +* removed redundant dependency ([@othiym23](https://github.com/othiym23)) +* `npmconf@1.0.5` ([@isaacs](https://github.com/isaacs)) +* Properly handle errors that can occur in the config-loading process + ([@isaacs](https://github.com/isaacs)) + +### v1.4.15 (2014-06-10): + +* cache: atomic de-race-ified package.json writing + ([@isaacs](https://github.com/isaacs)) +* `fstream@0.1.26` ([@isaacs](https://github.com/isaacs)) +* `graceful-fs@3.0.2` ([@isaacs](https://github.com/isaacs)) +* `osenv@0.1.0` ([@isaacs](https://github.com/isaacs)) +* Only spin the spinner when we're fetching stuff + ([@isaacs](https://github.com/isaacs)) +* Update `osenv@0.1.0` which removes ~/tmp as possible tmp-folder + ([@robertkowalski](https://github.com/robertkowalski)) +* `ini@1.2.1` ([@isaacs](https://github.com/isaacs)) +* `graceful-fs@3` ([@isaacs](https://github.com/isaacs)) +* Update glob and things depending on glob + ([@isaacs](https://github.com/isaacs)) +* github-url-from-username-repo and read-package-json updates + ([@isaacs](https://github.com/isaacs)) +* `editor@0.1.0` ([@isaacs](https://github.com/isaacs)) +* `columnify@1.1.0` ([@isaacs](https://github.com/isaacs)) +* bump ansi and associated deps ([@isaacs](https://github.com/isaacs)) + +### v1.4.14 (2014-06-05): + +* char-spinner: update to not bork windows + ([@isaacs](https://github.com/isaacs)) + +### v1.4.13 (2014-05-23): + +* Fix `npm install` on a tarball. + ([`ed3abf1`](https://github.com/npm/npm/commit/ed3abf1aa10000f0f687330e976d78d1955557f6), + [#5330](https://github.com/npm/npm/issues/5330), + [@othiym23](https://github.com/othiym23)) +* Fix an issue with the spinner on Node 0.8. + ([`9f00306`](https://github.com/npm/npm/commit/9f003067909440390198c0b8f92560d84da37762), + [@isaacs](https://github.com/isaacs)) +* Re-add `npm.commands.cache.clean` and `npm.commands.cache.read` APIs, and + document `npm.commands.cache.*` as npm-cache(3). + ([`e06799e`](https://github.com/npm/npm/commit/e06799e77e60c1fc51869619083a25e074d368b3), + [@isaacs](https://github.com/isaacs)) + +### v1.4.12 (2014-05-23): + +* remove normalize-package-data from top level, de-^-ify inflight dep + ([@isaacs](https://github.com/isaacs)) +* Always sort saved bundleDependencies ([@isaacs](https://github.com/isaacs)) +* add inflight to bundledDependencies + ([@othiym23](https://github.com/othiym23)) + +### v1.4.11 (2014-05-22): + +* fix `npm ls` labeling issue +* `node-gyp@0.13.1` +* default repository to https:// instead of git:// +* addLocalTarball: Remove extraneous unpack + ([@isaacs](https://github.com/isaacs)) +* Massive cache folder refactor ([@othiym23](https://github.com/othiym23) and + [@isaacs](https://github.com/isaacs)) +* Busy Spinner, no http noise ([@isaacs](https://github.com/isaacs)) +* Per-project .npmrc file support ([@isaacs](https://github.com/isaacs)) +* `npmconf@1.0.0`, Refactor config/uid/prefix loading process + ([@isaacs](https://github.com/isaacs)) +* Allow once-disallowed characters in passwords + ([@isaacs](https://github.com/isaacs)) +* Send npm version as 'version' header ([@isaacs](https://github.com/isaacs)) +* fix cygwin encoding issue (Karsten Tinnefeld) +* Allow non-github repositories with `npm repo` + ([@evanlucas](https://github.com/evanlucas)) +* Allow peer deps to be satisfied by grandparent +* Stop optional deps moving into deps on `update --save` + ([@timoxley](https://github.com/timoxley)) +* Ensure only matching deps update with `update --save*` + ([@timoxley](https://github.com/timoxley)) +* Add support for `prerelease`, `preminor`, `prepatch` to `npm version` + +### v1.4.10 (2014-05-05): + +* Don't set referer if already set +* fetch: Send referer and npm-session headers +* `run-script`: Support `--parseable` and `--json` +* list runnable scripts ([@evanlucas](https://github.com/evanlucas)) +* Use marked instead of ronn for html docs + +### v1.4.9 (2014-05-01): + +* Send referer header (with any potentially private stuff redacted) +* Fix critical typo bug in previous npm release + +### v1.4.8 (2014-05-01): + +* Check SHA before using files from cache +* adduser: allow change of the saved password +* Make `npm install` respect `config.unicode` +* Fix lifecycle to pass `Infinity` for config env value +* Don't return 0 exit code on invalid command +* cache: Handle 404s and other HTTP errors as errors +* Resolve ~ in path configs to env.HOME +* Include npm version in default user-agent conf +* npm init: Use ISC as default license, use save-prefix for deps +* Many test and doc fixes + +### v1.4.7 (2014-04-15): + +* Add `--save-prefix` option that can be used to override the default of `^` + when using `npm install --save` and its counterparts. + ([`64eefdf`](https://github.com/npm/npm/commit/64eefdfe26bb27db8dc90e3ab5d27a5ef18a4470), + [@thlorenz](https://github.com/thlorenz)) +* Allow `--silent` to silence the echoing of commands that occurs with `npm + run`. + ([`c95cf08`](https://github.com/npm/npm/commit/c95cf086e5b97dbb48ff95a72517b203a8f29eab), + [@Raynos](https://github.com/Raynos)) +* Some speed improvements to the cache, which should improve install times. + ([`cb94310`](https://github.com/npm/npm/commit/cb94310a6adb18cb7b881eacb8d67171eda8b744), + [`3b0870f`](https://github.com/npm/npm/commit/3b0870fb2f40358b3051abdab6be4319d196b99d), + [`120f5a9`](https://github.com/npm/npm/commit/120f5a93437bbbea9249801574a2f33e44e81c33), + [@isaacs](https://github.com/isaacs)) +* Improve ability to retry registry requests when a subset of the registry + servers are down. + ([`4a5257d`](https://github.com/npm/npm/commit/4a5257de3870ac3dafa39667379f19f6dcd6093e), + https://github.com/npm/npm-registry-client/commit/7686d02cb0b844626d6a401e58c0755ef3bc8432, + [@isaacs](https://github.com/isaacs)) +* Fix marking of peer dependencies as extraneous. + ([`779b164`](https://github.com/npm/npm/commit/779b1649764607b062c031c7e5c972151b4a1754), + https://github.com/npm/read-installed/commit/6680ba6ef235b1ca3273a00b70869798ad662ddc, + [@isaacs](https://github.com/isaacs)) +* Fix npm crashing when doing `npm shrinkwrap` in the presence of a + `package.json` with no dependencies. + ([`a9d9fa5`](https://github.com/npm/npm/commit/a9d9fa5ad3b8c925a589422b7be28d2735f320b0), + [@kislyuk](https://github.com/kislyuk)) +* Fix error when using `npm view` on packages that have no versions or have + been unpublished. + ([`94df2f5`](https://github.com/npm/npm/commit/94df2f56d684b35d1df043660180fc321b743dc8), + [@juliangruber](https://github.com/juliangruber); + [`2241a09`](https://github.com/npm/npm/commit/2241a09c843669c70633c399ce698cec3add40b3), + [@isaacs](https://github.com/isaacs)) + +### v1.4.6 (2014-03-19): + +* Fix extraneous package detection to work in more cases. + ([`f671286`](https://github.com/npm/npm/commit/f671286), npm/read-installed#20, + [@LaurentVB](https://github.com/LaurentVB)) + +### v1.4.5 (2014-03-18): + +* Sort dependencies in `package.json` when doing `npm install --save` and all + its variants. + ([`6fd6ff7`](https://github.com/npm/npm/commit/6fd6ff7e536ea6acd33037b1878d4eca1f931985), + [@domenic](https://github.com/domenic)) +* Add `--save-exact` option, usable alongside `--save` and its variants, which + will write the exact version number into `package.json` instead of the + appropriate semver-compatibility range. + ([`17f07df`](https://github.com/npm/npm/commit/17f07df8ad8e594304c2445bf7489cb53346f2c5), + [@timoxley](https://github.com/timoxley)) +* Accept gzipped content from the registry to speed up downloads and save + bandwidth. + ([`a3762de`](https://github.com/npm/npm/commit/a3762de843b842be8fa0ab57cdcd6b164f145942), + npm/npm-registry-client#40, [@fengmk2](https://github.com/fengmk2)) +* Fix `npm ls`'s `--depth` and `--log` options. + ([`1d29b17`](https://github.com/npm/npm/commit/1d29b17f5193d52a5c4faa412a95313dcf41ed91), + npm/read-installed#13, [@zertosh](https://github.com/zertosh)) +* Fix "Adding a cache directory to the cache will make the world implode" in + certain cases. + ([`9a4b2c4`](https://github.com/npm/npm/commit/9a4b2c4667c2b1e0054e3d5611ab86acb1760834), + domenic/path-is-inside#1, [@pmarques](https://github.com/pmarques)) +* Fix readmes not being uploaded in certain rare cases. + ([`527b72c`](https://github.com/npm/npm/commit/527b72cca6c55762b51e592c48a9f28cc7e2ff8b), + [@isaacs](https://github.com/isaacs)) + +### v1.4.4 (2014-02-20): + +* Add `npm t` as an alias for `npm test` (which is itself an alias for `npm run + test`, or even `npm run-script test`). We like making running your tests + easy. ([`14e650b`](https://github.com/npm/npm/commit/14e650bce0bfebba10094c961ac104a61417a5de), [@isaacs](https://github.com/isaacs)) + +### v1.4.3 (2014-02-16): + +* Add back `npm prune --production`, which was removed in 1.3.24. + ([`acc4d02`](https://github.com/npm/npm/commit/acc4d023c57d07704b20a0955e4bf10ee91bdc83), + [@davglass](https://github.com/davglass)) +* Default `npm install --save` and its counterparts to use the `^` version + specifier, instead of `~`. + ([`0a3151c`](https://github.com/npm/npm/commit/0a3151c9cbeb50c1c65895685c2eabdc7e2608dc), + [@mikolalysenko](https://github.com/mikolalysenko)) +* Make `npm shrinkwrap` output dependencies in a sorted order, so that diffs + between shrinkwrap files should be saner now. + ([`059b2bf`](https://github.com/npm/npm/commit/059b2bfd06ae775205a37257dca80142596a0113), + [@Raynos](https://github.com/Raynos)) +* Fix `npm dedupe` not correctly respecting dependency constraints. + ([`86028e9`](https://github.com/npm/npm/commit/86028e9fd8524d5e520ce01ba2ebab5a030103fc), + [@rafeca](https://github.com/rafeca)) +* Fix `npm ls` giving spurious warnings when you used `"latest"` as a version + specifier. + (https://github.com/npm/read-installed/commit/d2956400e0386931c926e0f30c334840e0938f14, + [@bajtos](https://github.com/bajtos)) +* Fixed a bug where using `npm link` on packages without a `name` value could + cause npm to delete itself. + ([`401a642`](https://github.com/npm/npm/commit/401a64286aa6665a94d1d2f13604f7014c5fce87), + [@isaacs](https://github.com/isaacs)) +* Fixed `npm install ./pkg@1.2.3` to actually install the directory at + `pkg@1.2.3`; before it would try to find version `1.2.3` of the package + `./pkg` in the npm registry. + ([`46d8768`](https://github.com/npm/npm/commit/46d876821d1dd94c050d5ebc86444bed12c56739), + [@rlidwka](https://github.com/rlidwka); see also + [`f851b79`](https://github.com/npm/npm/commit/f851b79a71d9a5f5125aa85877c94faaf91bea5f)) +* Fix `npm outdated` to respect the `color` configuration option. + ([`d4f6f3f`](https://github.com/npm/npm/commit/d4f6f3ff83bd14fb60d3ac6392cb8eb6b1c55ce1), + [@timoxley](https://github.com/timoxley)) +* Fix `npm outdated --parseable`. + ([`9575a23`](https://github.com/npm/npm/commit/9575a23f955ce3e75b509c89504ef0bd707c8cf6), + [@yhpark](https://github.com/yhpark)) +* Fix a lockfile-related errors when using certain Git URLs. + ([`164b97e`](https://github.com/npm/npm/commit/164b97e6089f64e686db7a9a24016f245effc37f), + [@nigelzor](https://github.com/nigelzor)) + +### v1.4.2 (2014-02-13): + +* Fixed an issue related to mid-publish GET requests made against the registry. + (https://github.com/npm/npm-registry-client/commit/acbec48372bc1816c67c9e7cbf814cf50437ff93, + [@isaacs](https://github.com/isaacs)) + +### v1.4.1 (2014-02-13): + +* Fix `npm shrinkwrap` forgetting to shrinkwrap dependencies that were also + development dependencies. + ([`9c575c5`](https://github.com/npm/npm/commit/9c575c56efa9b0c8b0d4a17cb9c1de3833004bcd), + [@diwu1989](https://github.com/diwu1989)) +* Fixed publishing of pre-existing packages with uppercase characters in their + name. + (https://github.com/npm/npm-registry-client/commit/9345d3b6c3d8510dd5c4418f27ee1fce59acebad, + [@isaacs](https://github.com/isaacs)) + +### v1.4.0 (2014-02-12): + +* Remove `npm publish --force`. See + https://github.com/npm/npmjs.org/issues/148. + ([@isaacs](https://github.com/isaacs), + npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) +* Other changes to the registry client related to saved configs and couch + logins. ([@isaacs](https://github.com/isaacs); + npm/npm-registry-client@25e2b019a1588155e5f87d035c27e79963b75951, + npm/npm-registry-client@9e41e9101b68036e0f078398785f618575f3cdde, + npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) +* Show an error to the user when doing `npm update` and the `package.json` + specifies a version that does not exist. + ([@evanlucas](https://github.com/evanlucas), + [`027a33a`](https://github.com/npm/npm/commit/027a33a5c594124cc1d82ddec5aee2c18bc8dc32)) +* Fix some issues with cache ownership in certain installation configurations. + ([@outcoldman](https://github.com/outcoldman), + [`a132690`](https://github.com/npm/npm/commit/a132690a2876cda5dcd1e4ca751f21dfcb11cb9e)) +* Fix issues where GitHub shorthand dependencies `user/repo` were not always + treated the same as full Git URLs. + ([@robertkowalski](https://github.com/robertkowalski), + https://github.com/meryn/normalize-package-data/commit/005d0b637aec1895117fcb4e3b49185eebf9e240) + +### v1.3.26 (2014-02-02): + +* Fixes and updates to publishing code + ([`735427a`](https://github.com/npm/npm/commit/735427a69ba4fe92aafa2d88f202aaa42920a9e2) + and + [`c0ac832`](https://github.com/npm/npm/commit/c0ac83224d49aa62e55577f8f27d53bbfd640dc5), + [@isaacs](https://github.com/isaacs)) +* Fix `npm bugs` with no arguments. + ([`b99d465`](https://github.com/npm/npm/commit/b99d465221ac03bca30976cbf4d62ca80ab34091), + [@Hoops](https://github.com/Hoops)) + +### v1.3.25 (2014-01-25): + +* Remove gubblebum blocky font from documentation headers. + ([`6940c9a`](https://github.com/npm/npm/commit/6940c9a100160056dc6be8f54a7ad7fa8ceda7e2), + [@isaacs](https://github.com/isaacs)) + +### v1.3.24 (2014-01-19): + +* Make the search output prettier, with nice truncated columns, and a `--long` + option to create wrapping columns. + ([`20439b2`](https://github.com/npm/npm/commit/20439b2) and + [`3a6942d`](https://github.com/npm/npm/commit/3a6942d), + [@timoxley](https://github.com/timoxley)) +* Support multiple packagenames in `npm docs`. + ([`823010b`](https://github.com/npm/npm/commit/823010b), + [@timoxley](https://github.com/timoxley)) +* Fix the `npm adduser` bug regarding "Error: default value must be string or + number" again. ([`b9b4248`](https://github.com/npm/npm/commit/b9b4248), + [@isaacs](https://github.com/isaacs)) +* Fix `scripts` entries containing whitespaces on Windows. + ([`80282ed`](https://github.com/npm/npm/commit/80282ed), + [@robertkowalski](https://github.com/robertkowalski)) +* Fix `npm update` for Git URLs that have credentials in them + ([`93fc364`](https://github.com/npm/npm/commit/93fc364), + [@danielsantiago](https://github.com/danielsantiago)) +* Fix `npm install` overwriting `npm link`-ed dependencies when they are tagged + Git dependencies. ([`af9bbd9`](https://github.com/npm/npm/commit/af9bbd9), + [@evanlucas](https://github.com/evanlucas)) +* Remove `npm prune --production` since it buggily removed some dependencies + that were necessary for production; see + [#4509](https://github.com/npm/npm/issues/4509). Hopefully it can make its + triumphant return, one day. + ([`1101b6a`](https://github.com/npm/npm/commit/1101b6a), + [@isaacs](https://github.com/isaacs)) + +Dependency updates: +* [`909cccf`](https://github.com/npm/npm/commit/909cccf) `read-package-json@1.1.6` +* [`a3891b6`](https://github.com/npm/npm/commit/a3891b6) `rimraf@2.2.6` +* [`ac6efbc`](https://github.com/npm/npm/commit/ac6efbc) `sha@1.2.3` +* [`dd30038`](https://github.com/npm/npm/commit/dd30038) `node-gyp@0.12.2` +* [`c8c3ebe`](https://github.com/npm/npm/commit/c8c3ebe) `npm-registry-client@0.3.3` +* [`4315286`](https://github.com/npm/npm/commit/4315286) `npmconf@0.1.12` + +### v1.3.23 (2014-01-03): + +* Properly handle installations that contained a certain class of circular + dependencies. + ([`5dc93e8`](https://github.com/npm/npm/commit/5dc93e8c82604c45b6067b1acf1c768e0bfce754), + [@substack](https://github.com/substack)) + +### v1.3.22 (2013-12-25): + +* Fix a critical bug in `npm adduser` that would manifest in the error message + "Error: default value must be string or number." + ([`fba4bd2`](https://github.com/npm/npm/commit/fba4bd24bc2ab00ccfeda2043aa53af7d75ef7ce), + [@isaacs](https://github.com/isaacs)) +* Allow `npm bugs` in the current directory to open the current package's bugs + URL. + ([`d04cf64`](https://github.com/npm/npm/commit/d04cf6483932c693452f3f778c2fa90f6153a4af), + [@evanlucas](https://github.com/evanlucas)) +* Several fixes to various error messages to include more useful or updated + information. + ([`1e6f2a7`](https://github.com/npm/npm/commit/1e6f2a72ca058335f9f5e7ca22d01e1a8bb0f9f7), + [`ff46366`](https://github.com/npm/npm/commit/ff46366bd40ff0ef33c7bac8400bc912c56201d1), + [`8b4bb48`](https://github.com/npm/npm/commit/8b4bb4815d80a3612186dc5549d698e7b988eb03); + [@rlidwka](https://github.com/rlidwka), + [@evanlucas](https://github.com/evanlucas)) + +### v1.3.21 (2013-12-17): + +* Fix a critical bug that prevented publishing due to incorrect hash + calculation. + ([`4ca4a2c`](https://github.com/npm/npm-registry-client/commit/4ca4a2c6333144299428be6b572e2691aa59852e), + [@dominictarr](https://github.com/dominictarr)) + +### v1.3.20 (2013-12-17): + +* Fixes a critical bug in v1.3.19. Thankfully, due to that bug, no one could + install npm v1.3.19 :) + +### v1.3.19 (2013-12-16): + +* Adds atomic PUTs for publishing packages, which should result in far fewer + requests and less room for replication errors on the server-side. + +### v1.3.18 (2013-12-16): + +* Added an `--ignore-scripts` option, which will prevent `package.json` scripts + from being run. Most notably, this will work on `npm install`, so e.g. `npm + install --ignore-scripts` will not run preinstall and prepublish scripts. + ([`d7e67bf`](https://github.com/npm/npm/commit/d7e67bf0d94b085652ec1c87d595afa6f650a8f6), + [@sqs](https://github.com/sqs)) +* Fixed a bug introduced in 1.3.16 that would manifest with certain cache + configurations, by causing spurious errors saying "Adding a cache directory + to the cache will make the world implode." + ([`966373f`](https://github.com/npm/npm/commit/966373fad8d741637f9744882bde9f6e94000865), + [@domenic](https://github.com/domenic)) +* Re-fixed the multiple download of URL dependencies, whose fix was reverted in + 1.3.17. + ([`a362c3f`](https://github.com/npm/npm/commit/a362c3f1919987419ed8a37c8defa19d2e6697b0), + [@spmason](https://github.com/spmason)) + +### v1.3.17 (2013-12-11): + +* This release reverts + [`644c2ff`](https://github.com/npm/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), + which avoided re-downloading URL and shinkwrap dependencies when doing `npm + install`. You can see the in-depth reasoning in + [`d8c907e`](https://github.com/npm/npm/commit/d8c907edc2019b75cff0f53467e34e0ffd7e5fba); + the problem was, that the patch changed the behavior of `npm install -f` to + reinstall all dependencies. +* A new version of the no-re-downloading fix has been submitted as + [#4303](https://github.com/npm/npm/issues/4303) and will hopefully be + included in the next release. + +### v1.3.16 (2013-12-11): + +* Git URL dependencies are now updated on `npm install`, fixing a two-year old + bug + ([`5829ecf`](https://github.com/npm/npm/commit/5829ecf032b392d2133bd351f53d3c644961396b), + [@robertkowalski](https://github.com/robertkowalski)). Additional progress on + reducing the resulting Git-related I/O is tracked as + [#4191](https://github.com/npm/npm/issues/4191), but for now, this will be a + big improvement. +* Added a `--json` mode to `npm outdated` to give a parseable output. + ([`0b6c9b7`](https://github.com/npm/npm/commit/0b6c9b7c8c5579f4d7d37a0c24d9b7a12ccbe5fe), + [@yyx990803](https://github.com/yyx990803)) +* Made `npm outdated` much prettier and more useful. It now outputs a + color-coded and easy-to-read table. + ([`fd3017f`](https://github.com/npm/npm/commit/fd3017fc3e9d42acf6394a5285122edb4dc16106), + [@quimcalpe](https://github.com/quimcalpe)) +* Added the `--depth` option to `npm outdated`, so that e.g. you can do `npm + outdated --depth=0` to show only top-level outdated dependencies. + ([`1d184ef`](https://github.com/npm/npm/commit/1d184ef3f4b4bc309d38e9128732e3e6fb46d49c), + [@yyx990803](https://github.com/yyx990803)) +* Added a `--no-git-tag-version` option to `npm version`, for doing the usual + job of `npm version` minus the Git tagging. This could be useful if you need + to increase the version in other related files before actually adding the + tag. + ([`59ca984`](https://github.com/npm/npm/commit/59ca9841ba4f4b2f11b8e72533f385c77ae9f8bd), + [@evanlucas](https://github.com/evanlucas)) +* Made `npm repo` and `npm docs` work without any arguments, adding them to the + list of npm commands that work on the package in the current directory when + invoked without arguments. + ([`bf9048e`](https://github.com/npm/npm/commit/bf9048e2fa16d43fbc4b328d162b0a194ca484e8), + [@robertkowalski](https://github.com/robertkowalski); + [`07600d0`](https://github.com/npm/npm/commit/07600d006c652507cb04ac0dae9780e35073dd67), + [@wilmoore](https://github.com/wilmoore)). There are a few other commands we + still want to implement this for; see + [#4204](https://github.com/npm/npm/issues/4204). +* Pass through the `GIT_SSL_NO_VERIFY` environment variable to Git, if it is + set; we currently do this with a few other environment variables, but we + missed that one. + ([`c625de9`](https://github.com/npm/npm/commit/c625de91770df24c189c77d2e4bc821f2265efa8), + [@arikon](https://github.com/arikon)) +* Fixed `npm dedupe` on Windows due to incorrect path separators being used + ([`7677de4`](https://github.com/npm/npm/commit/7677de4583100bc39407093ecc6bc13715bf8161), + [@mcolyer](https://github.com/mcolyer)). +* Fixed the `npm help` command when multiple words were searched for; it + previously gave a `ReferenceError`. + ([`6a28dd1`](https://github.com/npm/npm/commit/6a28dd147c6957a93db12b1081c6e0da44fe5e3c), + [@dereckson](https://github.com/dereckson)) +* Stopped re-downloading URL and shrinkwrap dependencies, as demonstrated in + [#3463](https://github.com/npm/npm/issues/3463) + ([`644c2ff`](https://github.com/isaacs/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), + [@spmason](https://github.com/spmason)). You can use the `--force` option to + force re-download and installation of all dependencies. diff --git a/bin/nodejs6.7.0/node_modules/npm/changelogs/CHANGELOG-2.md b/bin/nodejs6.7.0/node_modules/npm/changelogs/CHANGELOG-2.md new file mode 100644 index 00000000..f998112a --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/changelogs/CHANGELOG-2.md @@ -0,0 +1,4665 @@ +### v2.15.2 (2016-03-24): + +It's always nice to see new contributors. 💚 + +This week sees another small release, but we're still chugging along on our +[Windows efforts](https://github.com/npm/npm/pull/11444). + +There's also some small process changes to our LTS process relatively recently +that you might wanna know about! 💁 + +For one, the `2.x` branch was removed in favor of just `lts`. If you're making +PRs exclusively against npm's LTS, please use that name from now on. `2.x` was +deleted. + +Also, [@othiym23](https://github.com/othiym23) put some time into [writing down +our LTS process and policy](https://github.com/npm/npm/wiki/LTS). Check it out +and ping us if you have questions or comments about it! + +In general, we're trying to make sure all our policy and such for our +contributors is written down, and we hope it makes it easier in general for +y'all. Forrest is also working on a shiny new Contributor's Guide right now, but +we'll link to that in the (near?) future, when it's ready to roll out. + +#### TESTS + +* [`1d0e468`](https://github.com/npm/npm/commit/1d0e468c06c7b8e2b95b7fe874a3399a16d9db74) + [#11931](https://github.com/npm/npm/pull/11931) + Removes a bunch of old, disabled tests that have just been sitting around, + doing nothing. + ([@othiym23](https://github.com/othiym23)) +* [`7ae8aa1`](https://github.com/npm/npm/commit/7ae8aa1d9dc47761024f6756114205db3fb2c80b) + [#11987](https://github.com/npm/npm/pull/11987) + There was a failure in the `outdated-symlink` test caused by using the default + registry instead of the mock registry tests. + ([@yodeyer](https://github.com/yodeyer)) + +#### DOCS + +* [`b2649fb`](https://github.com/npm/npm/commit/b2649fb360f239aadef1ab51a580cbf4fdf29722) + [#12006](https://github.com/npm/npm/pull/12006) + Access was Team and Team was Access, but someone from the community rolled + around and corrected it for us. Thanks a bunch! + ([@yaelz](https://github.com/yaelz)) + +### v2.15.1 (2016-03-17): + +#### SECURITY ADVISORY: BEARER TOKEN DISCLOSURE + +This release includes [the fix for a +vulnerability](https://github.com/npm/npm/commit/fea8cc92cee02c720b58f95f14d315507ccad401) +that could cause the unintentional leakage of bearer tokens. + +Here are details on this vulnerability and how it affects you. + +##### DETAILS + +Since 2014, npm’s registry has used HTTP bearer tokens to authenticate requests +from the npm’s command-line interface. A design flaw meant that the CLI was +sending these bearer tokens with _every_ request made by logged-in users, +regardless of the destination of their request. (The bearers only should have +been included for requests made against a registry or registries used for the +current install.) + +An attacker could exploit this flaw by setting up an HTTP server that could +collect authentication information, then use this authentication information to +impersonate the users whose tokens they collected. This impersonation would +allow them to do anything the compromised users could do, including publishing +new versions of packages. + +With the fixes we’ve released, the CLI will only send bearer tokens with +requests made against a registry. + +##### THINK YOU'RE AT RISK? REGENERATE YOUR TOKENS + +If you believe that your bearer token may have been leaked, [invalidate your +current npm bearer tokens](https://www.npmjs.com/settings/tokens) and rerun +`npm login` to generate new tokens. Keep in mind that this may cause continuous +integration builds in services like Travis to break, in which case you’ll need +to update the tokens in your CI server’s configuration. + +##### WILL THIS BREAK MY CURRENT SETUP? + +Maybe. + +npm’s CLI team believes that the fix won’t break any existing registry setups. +Due to the large number of registry software suites out in the wild, though, +it’s possible our change will be breaking in some cases. + +If so, please [file an issue](https://github.com/npm/npm/issues/new) describing +the software you’re using and how it broke. Our team will work with you to +mitigate the breakage. + +##### CREDIT & THANKS + +Thanks to Mitar, Will White & the team at Mapbox, Max Motovilov, and James +Taylor for reporting this vulnerability to npm. + +### BACK TO YOUR REGULARLY SCHEDULED PROGRAMMING + +Aside from that, it's another one of those releases again! Docs and tests, it +turns out, have a pretty easy time getting into LTS releases, and boring is +exactly how LTS should be. 💁 + +#### DOCS + +* [`981c89c`](https://github.com/npm/npm/commit/981c89c8e398ca22ab6bf466123b25728ef6f543) + [#11820](https://github.com/npm/npm/pull/11820) + The basic explanation for how `npm link` works was a bit confusing, and + somewhat incorrect. It should be clearer now. + ([@rhgb](https://github.com/rhgb)) +* [`35b2b45`](https://github.com/npm/npm/commit/35b2b45f181dcbfb297f53b577dc1f26efcf3aba) + [#11787](https://github.com/npm/npm/pull/11787) + The `verison` alias for `npm version` no longer shows up in the command list + when you do `npm -h`. + ([@doug-wade](https://github.com/doug-wade)) +* [`1c9d00f`](https://github.com/npm/npm/commit/1c9d00f788298a81a8a7293d7dcf430f01bdd7fd) + [#11786](https://github.com/npm/npm/pull/11786) + Add a comment to the `npm-scope.md` docs about `npm@>=2` being required in + order to use scoped packaged. + ([@doug-wade](https://github.com/doug-wade)) +* [`7d64fb1`](https://github.com/npm/npm/commit/7d64fb1452d360aa736f31c85d6776ce570b2365) + [#11762](https://github.com/npm/npm/pull/11762) + Roll back patch that previously advised people to use `--depth Infinity` + instead of `--depth 9999`. Just keep using `--depth 9999`. + ([@GriffinSchneider](https://github.com/GriffinSchneider)) + +#### TESTS + +* [`98a9ee4`](https://github.com/npm/npm/commit/98a9ee4773f83994b8eb63c0ff75a9283408ba1a) + [#11912](https://github.com/npm/npm/pull/11912) + Did you know npm can install itself? `npm install -g npm` is the way to + upgrade! Turns out that one of the tests that verified this functionality got + rewritten as part of our recent push for better tests, and in the process + omitted a detail about *how* the test ran. We're testing that corner case + again, now, by moving the install folder to `/tmp`, where the original legacy + test ran. + ([@iarna](https://github.com/iarna)) + +### v2.15.0 (2016-03-10): + +#### WHY IS THIS SEMVER-MINOR I THOUGHT THIS WAS LTS + +A brief note about LTS this week! + +npm, as you may know if you're using this `2.x` branch, has an LTS process for +releases. We also try and play nice with [Node.js' own LTS release +process](https://github.com/nodejs/LTS#lts-plan). That means we generally try to +avoid things like minor version bumps on our `2.x` branch (which is also tagged +`lts` in the `dist-tag`s). + +That said, we had a minor-bump update recently for `npm@3.8.0` which added a +`maxsockets` option to allow users to configure the number of concurrent sockets +that npm would keep open at a time -- a setting that has the potential to help a +bunch for people with fussy routers or internet connections that aren't very +happy with Node.js applications' usual concurrency storm. This change was done +to `npm-registry-client`, which we don't have a parallel LTS-tracking branch +for. + +After talking it over, we ended up deciding that this was a reasonable enough +addition to LTS, even though it's *technically* a `semver-minor` bump, taking +into account both its potential for bugfixing (specially on `2.x`!) and the +general hassle it would be to maintain another branch for `npm-registry-client`. + + +* [`6dd61e7`](https://github.com/npm/npm/commit/6dd61e781c145480dc255a3e6a748729868443fd) + Expose `maxsockets` config setting from new `npm-registry-client`. + ([@misterbyrne](https://github.com/misterbyrne)) +* [`8a021c3`](https://github.com/npm/npm/commit/8a021c35184e665bd1f3f70ae2f478af812ab614) + `npm-registry-client@7.1.0`: + Adds support for configuring the max number of concurrent sockets, defaulting + to `50`. + ([@iarna](https://github.com/iarna)) + +#### DOC PATCH IS HERE TOO + +* [`0ae9f74`](https://github.com/npm/npm/commit/0ae9f740001a1bdf5920bc464cf9e284d5d139f0) + [#11748](https://github.com/npm/npm/pull/11748) + Add command aliases as a separate section in documentation for npm + subcommands. + ([@watilde](https://github.com/watilde)) + +#### DEP UPDATES + +* [`bfc3888`](https://github.com/npm/npm/commit/bfc38887f832f701c16b7ee410c4e0220a90399f) + `strip-ansi@3.0.1` + ([@jbnicolai](https://github.com/jbnicolai)) +* [`d5f4d51`](https://github.com/npm/npm/commit/d5f4d51a1b7ea78d7431c7ed4fed30200b2622f8) + `node-gyp@3.3.1`: Fixes Android generator + ([@bnoordhuis](https://github.com/bnoordhuis)) +* [`4119df8`](https://github.com/npm/npm/commit/4119df8aecd2ae57b0492ad8c9a480d900833008) + `glob@7.0.3`: Some path-related fixes for Windows. + ([@isaacs](https://github.com/isaacs)) + +### v2.14.22 (2016-03-03): + +This week is all documentation improvements. In case you hadn't noticed, we +*love* doc patches. We love them so much, we give socks away if you submit +documentation PRs! + +These folks are all getting socks if they ask for them. The socks are +super-sweet. Do you have yours yet? 👣 + +* [`3f3c7d0`](https://github.com/npm/npm/commit/3f3c7d080f052a5db91ff6091f8b1b13f26b53d6) + [#11441](https://github.com/npm/npm/pull/11441) + Add a link to the [Contribution + Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines) to the + main npm docs. + ([@watilde](https://github.com/watilde)) +* [`9f87bb1`](https://github.com/npm/npm/commit/9f87bb1934acb33b678c17b7827165b17c071a82) + [#11441](https://github.com/npm/npm/pull/11441) + Remove Google Group email from npm docs about contributing. + ([@watilde](https://github.com/watilde)) +* [`93eaab3`](https://github.com/npm/npm/commit/93eaab3ee5ad16c7d90d1a4b38a95403fcf3f0f6) + [#11474](https://github.com/npm/npm/pull/11474) + Fix an invalid JSON error overlooked in + [#11196](https://github.com/npm/npm/pull/11196). + ([@robludwig](https://github.com/robludwig)) +* [`a407ca2`](https://github.com/npm/npm/commit/a407ca2bcf6a05117e55cf2ab69376e09094995e) + [#11483](https://github.com/npm/npm/pull/11483) + Add more details and an example to the documentation for bundledDependencies. + ([@gnerkus](https://github.com/gnerkus)) +* [`2c851a2`](https://github.com/npm/npm/commit/2c851a231afd874baa77c42ea5ba539c454ac79c) + [#11490](https://github.com/npm/npm/pull/11490) + Document the `--registry` flag for `npm search`. + ([@plumlee](https://github.com/plumlee)) + +### v2.14.21 (2016-02-25): + +Good news, everyone! There's a new LTS release with a few shinies here and there! + +#### USE THIS ONE INSTEAD + +We had some cases where the versions of npm and node used in some scripting situations were different than the ideal, or what folks actually expected. These should be particularly helpful to our Windows friends! <3 + +* [`02813c5`](https://github.com/npm/npm/commit/02813c55782a9def23f7f1e614edc38c6c88aed3) [#9253](https://github.com/npm/npm/issues/9253) Fix a bug where, when running lifecycle scripts, if the Node.js binary you ran `npm` with wasn't in your `PATH`, `npm` wouldn't use it to run your scripts. ([@segrey](https://github.com/segrey) and [@narqo](https://github.com/narqo)) +* [`a985dd5`](https://github.com/npm/npm/commit/a985dd50e06ee51ba5544577f977c7440c227ba2) [#11526](https://github.com/npm/npm/pull/11526) Prefer locally installed npm in Git Bash -- previous behavior was to use the global one. This was done previously for other shells, but not for Git Bash. ([@destroyerofbuilds](https://github.com/destroyerofbuilds)) + +#### SOCKS FOR THE SOCK GOD + +* [`f961092`](https://github.com/npm/npm/commit/f9610920079d8b88ae464b30007a92c594bd85a8) + [#11636.](https://github.com/npm/npm/issues/11636.) + Document the `--save-bundle` option for `npm install`. + ([@datyayu](https://github.com/datyayu)) +* [`7c908b6`](https://github.com/npm/npm/commit/7c908b618f7123f0a3b860c71eb779e33df35964) + [#11644](https://github.com/npm/npm/pull/11644) + Add documentation for the `test` directory for packages. + ([@lewiscowper](https://github.com/lewiscowper)) + +#### INTERNAL TEST IMPROVEMENTS + +The npm CLI team's time recently has been sunk into npm's many years of tech debt. Specifically, we've been working on improving the test suite. This isn't user visible, but in future should mean a more stable, easier to contribute to npm. Ordinarily we don't report these kinds of changes in the change log, but I thought I might share this week as this chunk is bigger than usual. + +These patches were previously released for `npm@3`, and then ported back to `npm@2` LTS. + +* [`437c537`](https://github.com/npm/npm/commit/437c537e2be5923c6d2c2753154564ba13db8fd9) [#11613](https://github.com/npm/npm/pull/11613) Fix up one of the tests after rebasing the legacy test rewrite to `npm@2`. ([@zkat](https://github.com/zkat)) +* [`55abd0c`](https://github.com/npm/npm/commit/55abd0cc20e87a144d33ce2d459f65e7506da576) [#11613](https://github.com/npm/npm/pull/11613) Test that the `package.json` `files` section and `.npmignore` do what they're supposed to. ([@zkat](https://github.com/zkat)) +* [`a2b99b6`](https://github.com/npm/npm/commit/a2b99b6273ada14b2121ebc0acb7933e630edd9d) [#11613](https://github.com/npm/npm/pull/11613) Test that npm's distribution binary is complete and can be installed and used. ([@iarna](https://github.com/iarna)) +* [`8a8c36c`](https://github.com/npm/npm/commit/8a8c36ce51166006022e5c5d4f8655bbc458d651) [#11613](https://github.com/npm/npm/pull/11613) Test that environment variables are properly passed into scripts. + ([@iarna](https://github.com/zkat)) +* [`a95b550`](https://github.com/npm/npm/commit/a95b5507616bd51e83d7eab5f2337b1aff6480b1) [#11613](https://github.com/npm/npm/pull/11613) Test that we don't leak auth info into the environment. ([@iarna](https://github.com/iarna)) +* [`a1c1c52`](https://github.com/npm/npm/commit/a1c1c52efeab24f6dba154d054f85d9efc833486) [#11613](https://github.com/npm/npm/pull/11613) Remove all the relatively cryptic legacy tests and creates new tap tests that check the same functionality. The *legacy* tests were tests that were originally a shell script that was ported to javascript early in `npm`'s history. ([@iarna](https:\\github.com/iarna) and [@zkat](https://github.com/zkat)) +* [`9d89581`](https://github.com/npm/npm/commit/9d895811d3ee70c2e672f3d8fa06574495b5b488) [#11613](https://github.com/npm/npm/pull/11613) `tacks@1.0.9`: Add a package that provides a tool to generate fixtures from folders and, relatedly, a module that an create and tear down filesystem fixtures easily. ([@iarna](https://github.com/iarna)) + +### v2.14.20 (2016-02-18): + +Hope y'all are having a nice week! As usual, it's a fairly limited release. The +most notable thing is some dependency updates that might help the Node.js CI +setup for Windows run a little better, even if we have some work to do on that +path length things, still. + +#### WHITTLING AWAY AT PATH LENGTHS + +So for all of you who don't know -- Node.js does, in fact, support long Windows +paths. Unfortunately, depending on the tool and the Windows version, a lot of +external tooling does not. This means, for example, that some (all?) versions of +Windows Explorer *can literally never delete npm from their system entirely +because of deeply-nested npm dependencies*. Which is pretty gnarly. + +Incidentally, if you run into that in particularly, you can use +[rimraf](npm.im/rimraf) to remove such files 💁. + +The latest victim of this issue was the Node.js CI setup for testing on Windows, +which uses some tooling or another that croaks on the usual path length limit +for that OS: 255 characters. + +This issue, of course, is largely not a problem as of `npm@3`, with its flat +trees, but it still occasionally and viciously bites LTS. + +We've taken another baby step towards alleviating this in this release by +updating a couple of dependencies that were preventing `npmlog` from deduping, +and then doing a dedupe on that and `gauge`. Hopefully it helps. + +* [`4199551`](https://github.com/npm/npm/commit/41995517e617674710748ab6d262670c96124393) + [#11528](https://github.com/npm/npm/pull/11528) + `npm-install-checks@1.0.7`: Just updates the version of npmlog so we can + dedupe it better. + ([@zkat](https://github.com/zkat)) +* [`14d72c7`](https://github.com/npm/npm/commit/14d72c756b89e2d167eb52c1849263dbddcb9f35) + [#11552](https://github.com/npm/npm/pull/11552) + [#11528](https://github.com/npm/npm/pull/11528) + `node-gyp@3.3.0`: AIX support, new `gyp`, update `npmlog` (for the dedupe), + adds `--cafile` command line option, and allows configuration of Node.js and + io.js mirrors. + ([@rvagg](https://github.com/rvagg)) +* [`0453cb9`](https://github.com/npm/npm/commit/0453cb94b33520eb723b7072cd2654b1d0142533) + [#11528](https://github.com/npm/npm/pull/11528) + Do a `dedupe` on `gauge` to flatten our dependencies a bit more. + ([@zkat](https://github.com/zkat)) + +#### OTHER DEP STUFF + +* [`686c0b3`](https://github.com/npm/npm/commit/686c0b37ec3a7b65f9b3849e1099805e5221c408) + `rimraf@2.5.2`: Just updates to glob@7. + ([@isaacs](https://github.com/isaacs)) + +#### @wyze, DOCUMENTATION HERO OF THE PEOPLE, GETS THEIR OWN HEADER + +* [`7232948`](https://github.com/npm/npm/commit/72329484c775376cb40d5b348f453eaaf2f0b821) + [#11416](https://github.com/npm/npm/pull/11416) + Logout docs were using a section copy-pasted from the adduser docs. + ([@wyze](https://github.com/wyze)) +* [`922b33a`](https://github.com/npm/npm/commit/922b33aba4362e1e90f42e9348f061a1cc73eafb) + [#11414](https://github.com/npm/npm/pull/11414) + Add colon for consistency. + ([@wyze](https://github.com/wyze)) + +### v2.14.19 (2016-02-11): + +Really tiny micro-release this week! The main thing to note is a dependency +update that means we no longer have `graceful-fs@3` in our dependency tree. This +has some implications for being able to run on future Node.js releases, so +better to get this out the door. 😁 + +#### DEPS + +* [`a556e0f`](https://github.com/npm/npm/commit/a556e0f9dcb5d7b44224ba9c16c9d0dc6c8d2532) + `cmd-shim@2.0.2`: Final straggler using `graceful-fs@<4`. + ([@ForbesLindesay](https://github.com/ForbesLindesay)) + +#### DOCS + +* [`69a2d59`](https://github.com/npm/npm/commit/69a2d599bf0cba674ee268483e9bd5c14333b89f) + [#11391](https://github.com/npm/npm/pull/11391) + Fixed versions of `shrinkwrap.json` in examples in documentation for `npm + shrinkwrap`, which did not quite match up. + ([@xcatliu](https://github.com/xcatliu)) + +### v2.14.18 (2016-02-04): + +Clearly our docs are perfect after all those wonderful PRs, 'cause this week's +gonna be all about dependency updates. Note: There is a small security-related +fix included here! + +#### SECURITY-RELATED DEPENDENCY UPDATE + +* [`5c095ef`](https://github.com/npm/npm/commit/5c095eff8dc006980d4d083f2007e4dacff23be3) + [#11341](https://github.com/npm/npm/pull/11341) + `request@2.69.0`: Includes security-related dependency updates involving + `hawk` and `is-my-json-valid` + ([@remy](https://github.com/remy) and [@simov](https://github.com/simov)) + +#### OTHER DEPENDENCY UPDATES + +* [`f9c2668`](https://github.com/npm/npm/commit/f9c2668ca3e6e2602d91250ce61280e5e12d0a00) + `which@1.2.4` + ([@isaacs](https://github.com/isaacs)) +* [`2907c43`](https://github.com/npm/npm/commit/2907c43ad4ef87e5f730c2576f680d6837fcbad0) + `spdx-license-ids@1.2.0` + ([@shinnn](https://github.com/shinnn)) +* [`7734069`](https://github.com/npm/npm/commit/773406960bf7f4a87b2ecb6ebf593c62d0e9f95d) + `rimraf@2.5.1` + ([@isaacs](https://github.com/isaacs)) +* [`f4b39a7`](https://github.com/npm/npm/commit/f4b39a7dd5e1335d92aa22c46d99abb33f271b8b) + `retry@0.9.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`ded1e7a`](https://github.com/npm/npm/commit/ded1e7a1c9c7bec29bb7c30a8f85546670e75b56) + Nest `retry@0.8.0` inside `npm-registry-client` to prevent invalid + dependency issue until the latter gets a dependency update. + ([@zkat](https://github.com/zkat)) +* [`ab9f867`](https://github.com/npm/npm/commit/ab9f8679f9687f91ad03adaab6211a897aeebbae) + `read-package-json@2.0.3` + ([@iarna](https://github.com/iarna)) +* [`b638c41`](https://github.com/npm/npm/commit/b638c41607bb936b9eaaceba2aeeda1d34e3a9b2) + `npmlog@2.0.2` + ([@iarna](https://github.com/iarna)) +* [`49f34af`](https://github.com/npm/npm/commit/49f34af463a674359269025d8438feb6a7c69960) + `init-package-json@1.9.3` + ([@iarna](https://github.com/iarna)) +* [`2305dab`](https://github.com/npm/npm/commit/2305dab4e7bff09bb7686cec653cf1e663dbf15d) + `graceful-fs@4.1.3`: Fixed `.close()` not being patched. + ([@isaacs](https://github.com/isaacs)) +* [`18496d9`](https://github.com/npm/npm/commit/18496d9a0fff94e3652655998e8333056aa52b15) + `fs-write-stream-atomic@1.0.8` + ([@iarna](https://github.com/iarna)) +* [`6637bc7`](https://github.com/npm/npm/commit/6637bc7a0e194d82554cd7c91e1794018fef5943) + `config-chain@1.1.10` + ([@dominictarr](https://github.com/dominictarr)) +* [`4222bad`](https://github.com/npm/npm/commit/4222badffed9e9edacea6a8a96a99a164d376158) + `columnify@1.5.4` + ([@timoxley](https://github.com/timoxley)) +* [`df9016f`](https://github.com/npm/npm/commit/df9016f327a2a9ce492ebc75b882b03069438e13) + `ansi@0.3.1`: Added a license file. + ([@TooTallNate](https://github.com/TooTallNate)) + +### v2.14.17 (2016-01-28): + +Another week, another small LTS release! + +#### BETTER ERROR REPORTING YAY + +So as it turns out, when stuff goes wrong, it's actually nice to give people a +better clue rather than just say "oh well 😏". + +* [`5b8ccb9`](https://github.com/npm/npm/commit/5b8ccb91cf11b4edb463609cd4ed1dee84ed4db0) + [#11289](https://github.com/npm/npm/pull/11289) + 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 previous just + make npm error out– this reduces that to a warning. + ([@evanlucas](https://github.com/evanlucas)) +* [`556e42a`](https://github.com/npm/npm/commit/556e42ac6bab078722ddc1dc6cce4428d001133b) + [#11300](https://github.com/npm/npm/pull/11300) + Report symlinked packages as 'linked' in the output for `npm outdated`. + ([@halhenke](https://github.com/halhenke)) +* [`3842317`](https://github.com/npm/npm/commit/3842317583e0ea2eca78e39aa03f5bc06ba21de7) + [#11290](https://github.com/npm/npm/pull/11290) + Suppress warnings about pre-release node versions. This should get node's CI + passing on non-Windows platforms without needing to modify the node version to + get rid of the pre-release suffix. + ([@iarna](https://github.com/iarna)) + +#### EVERYONE WANTS THOSE NPM SOCKS, GEEZE + +Did you know that you can get npm socks for contributing to our docs? I bet +these people do, and now so do you! + +* [`dcde451`](https://github.com/npm/npm/commit/dcde451cb85a6ca08acc6ef45782c652f1d8fc89) + [#11232](https://github.com/npm/npm/pull/11232) + Update automatically included/excluded packages in `package.json`. + ([@jscissr](https://github.com/jscissr)) +* [`e3f8d5b`](https://github.com/npm/npm/commit/e3f8d5be5ac5ec1d72db42f7abf50cc4a8c5935c) + [#11273](https://github.com/npm/npm/pull/11273) + Add an example for `npm view <pkg> versions`. + ([@vedatmahir](https://github.com/vedatmahir)) +* [`6a06ef2`](https://github.com/npm/npm/commit/6a06ef2252748089f0013de951f2d06160b90306) + [#11272](https://github.com/npm/npm/pull/11272) + Fix a typo in `npm-update.md`. + ([@jonathanp](https://github.com/jonathanp)) +* [`2515ff1`](https://github.com/npm/npm/commit/2515ff1de28f0b261fb25c79a66bd762a65961c4) + [#11215](https://github.com/npm/npm/pull/11215) + Correct small thinko in docs for SPDX expressions. + ([@kemitchell](https://github.com/kemitchell)) +* [`70f897b`](https://github.com/npm/npm/commit/70f897b03da9a5d5d4fd34614e9ee40e6f9e9653) + [#11196](https://github.com/npm/npm/pull/11196) + Make JSON snippets valid JSON in `npm update` docs. + ([@s100](https://github.com/s100)) + +### v2.14.16 (2016-01-21): + +Good to see you all again! It's been a while since we had an LTS release, and +the team continues to work hard to both get the issue tracker under control, and +get our test suite to be awesome and reliable. + +This is also the first LTS release of this year. + +We're gonna have an interesting time -- most of our focus this year will be +around stability and maintainability of the CLI, so you might actually end up +seeing a number of updates even over here, just for the sake of making sure +we're stable, that bugs get fixed, and tests have proper coverage. + +What better way to start this effort, then, than getting Travis tests green, fix +a few things here and there, and tweak a bunch of documentation? 😁 + +#### FIX ALL THE BUGS AND TWEAK ALL THE THINGS + +* [`24b13fb`](https://github.com/npm/npm/commit/24b13fbc57d34db1d5b0a37bcca122c00deba978) + [#11158](https://github.com/npm/npm/pull/11158) + Fix custom node-gyp env var quoting on Windows. + ([@orangemocha](https://github.com/orangemocha)) +* [`e2503f2`](https://github.com/npm/npm/commit/e2503f2be40157b05a9c500ec3b5d16090ffee50) + [#11142](https://github.com/npm/npm/pull/11142) + Fix race condition with `correctMkdir` in the cache directory. + ([@Jimbly](https://github.com/Jimbly)) + +* [`5c0e4c4`](https://github.com/npm/npm/commit/5c0e4c45a29d774ab729e86044377d4e5e424252) + [#10940](https://github.com/npm/npm/pull/10940) + Ignore failures replacing `package.json`. writeFileAtomic is not atomic in + Windows, it fails if the file is being accessed concurrently. + ([@orangemocha](https://github.com/orangemocha)) +* [`2c44d8d`](https://github.com/npm/npm/commit/2c44d8dc8c267d5e054d0175ce2f4750f0986463) + [#10903](https://github.com/npm/npm/pull/10903) + Add tests for `npm adduser --scope`. + ([@ekmartin](https://github.com/ekmartin)) +* [`4cb25d0`](https://github.com/npm/npm/commit/4cb25d0fed5c7792dfd1aec891380ecc1f8a5761) + [#10903](https://github.com/npm/npm/pull/10903) + Add a message informing users when they have been successfully logged in. + ([@ekmartin](https://github.com/ekmartin)) +* [`fe3ec6d`](https://github.com/npm/npm/commit/fe3ec6d6658262054c0c19c55373c21e84ab9f17) + [#10628](https://github.com/npm/npm/pull/10628) + Tell users how to open an issue with a package that has errored. + ([@trodrigues](https://github.com/trodrigues)) + +#### DOCS DOCS DOCS + +We got a TON of lovely documentation patches, too! Thanks all for submitting! + +* [`22482a1`](https://github.com/npm/npm/commit/22482a1f22079d72c3f8ca55c2f0c153bdd024c0) + [#11188](https://github.com/npm/npm/pull/11188) + Briefly explain what's included when you publish. + ([@beaugunderson](https://github.com/beaugunderson)) +* [`fa47724`](https://github.com/npm/npm/commit/fa4772438df0c66a19309dd1c1a3ce43cbee5461) + [#11150](https://github.com/npm/npm/pull/11150) + Advise use of `--depth Infinity` instead of `--depth 9999` in `npm update`. + ([@halhenke](https://github.com/halhenke)) +* [`248ddfe`](https://github.com/npm/npm/commit/248ddfe8f7ddd3318e14bf61de41cab4a638c8a3) + [#11130](https://github.com/npm/npm/pull/11130) + Nuke "using npm programmatically" section from README. The programmatic npm + API is unsupported, and is not guaranteed not to break in non-major versions. + Removing this section so newcomers aren't encouraged to discover or use it. + ([@ljharb](https://github.com/ljharb)) +* [`ae9c452`](https://github.com/npm/npm/commit/ae9c4521222d60ab4a69c19fee5e361c62f41fae) + [#11128](https://github.com/npm/npm/pull/11128) + Add link to local paths section indocs for `package.json`. + ([@orangejulius](https://github.com/orangejulius)) +* [`663a8c6`](https://github.com/npm/npm/commit/663a8c6b4b1647f9b86c15ef32e30023edc8c060) + [#11044](https://github.com/npm/npm/pull/11044) + Update default value documentation for the color option in npm's config. + ([@scottaddie](https://github.com/scottaddie)) +* [`5c1dda0`](https://github.com/npm/npm/commit/5c1dda0d3a18b2954872dba33fbc696ff0700ffe) + [#11037](https://github.com/npm/npm/pull/11037) + Correct the name property max length constraint verbiage. + ([@scottaddie](https://github.com/scottaddie)) +* [`8288365`](https://github.com/npm/npm/commit/8288365d08e97fa3a5b0d31703c015a8be49e07f) + [#10990](https://github.com/npm/npm/pull/10990) + Update folder docs to reflect that process.installPrefix was removed as of + 0.8.x. + ([@jeffmcmahan](https://github.com/jeffmcmahan)) +* [`61d63fa`](https://github.com/npm/npm/commit/61d63fa22c4f09742180c2de460a4ffb6c32738e) + [#10790](https://github.com/npm/npm/pull/10790) + Clarify that `npm install foo` is the same as `npm install foo@latest` now. + ([@cvrebert](https://github.com/cvrebert)) +* [`442c920`](https://github.com/npm/npm/commit/442c9207f375354c91d36df8711ba2d33e1c97f3) + [#10789](https://github.com/npm/npm/pull/10789) + Link over to `npm-dist-tag(1)` in `npm install` docs when they talk about the + `pkg@<tag>` syntax. + ([@cvrebert](https://github.com/cvrebert)) +* [`dca7a5e`](https://github.com/npm/npm/commit/dca7a5e2be3bfa306a870a123707d35c732406c0) + [#10788](https://github.com/npm/npm/pull/10788) + Link to tag docs in docs for `npm publish --tag`. + ([@cvrebert](https://github.com/cvrebert)) +* [`a72904e`](https://github.com/npm/npm/commit/a72904e8d4ab1d43ae8150fbe3f6468b0cbb1efd) + [#10787](https://github.com/npm/npm/pull/10787) + Explain why the `latest` tag matters. + ([@cvrebert](https://github.com/cvrebert)) +* [`9d0697a`](https://github.com/npm/npm/commit/9d0697a534046df7efda32170014041bbc1f4e7d) + [#10785](https://github.com/npm/npm/pull/10785) + Replace some quite marks in `npm dist-tag` docs for the sake of consistency. + ([@cvrebert](https://github.com/cvrebert)) + +#### I REALLY LIKE GREEN. CAN YOU TELL? + +So Travis is all green now on `npm@2`, thanks to the removal of nock and a few +other test suite tweaks. This is a fantastic step towards making sure we can all +have confidence in our test suite! 🎉 + +* [`64995be`](https://github.com/npm/npm/commit/64995be6d874356b15c136f9867302d805dfe1e9) [`75ab216`](https://github.com/npm/npm/commit/75ab2164cf79e28ac7f7ebe714f3c5aee99c6626) [`a9f6fe9`](https://github.com/npm/npm/commit/a9f6fe9dc558f17c4a7b9eb83329ac080f7df4b7) [`649c193`](https://github.com/npm/npm/commit/649c193adadf714c2819837f9372a29d724a5ec0) [`94cb05e`](https://github.com/npm/npm/commit/94cb05eaa9e5ad6675cf15c4ac0a44fbdde05900) [`6541690`](https://github.com/npm/npm/commit/65416907008061ac5a5f66b1630a57776803b526) [`255be6f`](https://github.com/npm/npm/commit/255be6f5bca9e3d216f3a5cbdf6714c6c9fcf132) [`9e84fa4`](https://github.com/npm/npm/commit/9e84fa43c49d04cf86ca1678e2a61412f5559cb9) [`8a587b0`](https://github.com/npm/npm/commit/8a587b0c1696ae7302891fa6355fc3e8670e00d3) [`bf812a5`](https://github.com/npm/npm/commit/bf812a54e497a573493346399798aa0b9373ac24) + [#10903](https://github.com/npm/npm/pull/10903) + Get rid of nock from tests, and get Travis green. + ([@zkat](https://github.com/zkat) and [@iarna](https://github.com/iarna)) +* [`70a5310`](https://github.com/npm/npm/commit/70a5310712c6666e753ca8f3bfff4a780ec6292d) + `npm-registry-couchapp@2.6.12`: + Better 0.8 compatibility, and ability to run in travis docker stuff. This + means the test suite should run a lot faster, too! + ([@iarna](https://github.com/iarna)) +* [`28fae39`](https://github.com/npm/npm/commit/28fae399212eda5554e6c0ffd8c9591144ab7b9d) + Get rid of sudo, for Travis! + ([@zkat](https://github.com/zkat)) + +### v2.14.15 (2015-12-10): + +Did you know that Bob Ross reached the rank of master sergeant in the US Air +Force before becoming perhaps the most soothing painter of all time? + +#### TWO HAPPY LITTLE BUG FIXES + +* [`f482664`](https://github.com/npm/npm/commit/f4826645dc6b5c0f05c5f9187efb28c1a293554f) + [#10505](https://github.com/npm/npm/issues/10505) `npm ls --json --depth=0` + now respects the depth parameter, when it is zero and when it is not zero. + ([@MarkReeder](https://github.com/MarkReeder)) +* [`529fa1f`](https://github.com/npm/npm/commit/529fa1ff2c6432a773af99a1c5209c0865f7a19c) + [#9099](https://github.com/npm/npm/issues/9099) I had always thought you + could run `npm version` from subdirectories in your project, which is great, + because now you can. I guess I was just ahead of my time. + ([@ekmartin](https://github.com/ekmartin)) + +#### NOW PAINT IN SOME NICE DOCS CHANGES + +* [`1fc7f2b`](https://github.com/npm/npm/commit/1fc7f2b523ea760e08adb9b861b28e3ba450e565) + [#10546](https://github.com/npm/npm/issues/10546) Goodbye, FAQ! You were + cheeky and fun until you weren't! Don't worry: npm still loves everyone, + especially you! ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`7fe6950`](https://github.com/npm/npm/commit/7fe6950b44d241bb4d90857a44d89d750af1e2b3) + [#10570](https://github.com/npm/npm/issues/10570) Update documentation URLs + to be HTTPS everywhere sensible. No HTTP shall be spared! + ([@rsp](https://github.com/rsp)) +* [`96ebb90`](https://github.com/npm/npm/commit/96ebb902439e4f6f37f8beffb589769146fecf24) + [#10650](https://github.com/npm/npm/issues/10650) Correctly note that there + are two lifecycle scripts run by an install phase in an example, instead of + three. ([@eymengunay](https://github.com/eymengunay)) +* [`5196893`](https://github.com/npm/npm/commit/5196893a7496f68a514b83641ff6b72f14d664dd) + [#10687](https://github.com/npm/npm/issues/10687) `npm outdated`'s output can + be a little puzzling sometimes. I've attempted to make it clearer, with some + examples, of what's going on with "wanted" and "latest" in more cases. + ([@othiym23](https://github.com/othiym23)) +* [`8e6712d`](https://github.com/npm/npm/commit/8e6712d4ee128858cab36c77723e35bddbb977ba) + [#10700](https://github.com/npm/npm/issues/10700) Hey, do you remember when + `search.npmjs.org` was a thing? I think I do? The last time I used it was in + like 2012, and it's gone now, so remove it from the docs. + ([@gagern](https://github.com/gagern)) +* [`27d2612`](https://github.com/npm/npm/commit/27d2612b3f5aa88b12c943d04e162ce4c3a350ae) + `semver@5.1.0`: Include BNF for SemVer expression grammar (which is also now + included in `npm help semver`). ([@isaacs](https://github.com/isaacs)) + +#### LAND YOUR DEPENDENCY UPGRADES IN PAIRS SO EVERYONE HAS A FRIEND + +* [`fc6c3c5`](https://github.com/npm/npm/commit/fc6c3c53a31e9e11c2616fcd378202e5b80bf286) + `request@2.67.0` ([@simov](https://github.com/simov)) +* [`07013fd`](https://github.com/npm/npm/commit/07013fd0fd55a2eb31fb9334631ee5d0dd5c41bb) + [isaacs/rimraf#89](https://github.com/isaacs/rimraf/pull/89) `rimraf@2.4.4` + ([@zerok](https://github.com/zerok)) +* [`bc149be`](https://github.com/npm/npm/commit/bc149bef871f0f00639509898cece531af3aa8b3) + [isaacs/once#7](https://github.com/isaacs/once/pull/7) `once@1.3.3` + ([@floatdrop](https://github.com/floatdrop)) +* [`ac598d3`](https://github.com/npm/npm/commit/ac598d36e1ad207bc0d8a7eadfd84b26146aec1f) + `lru-cache@3.2.0` ([@isaacs](https://github.com/isaacs)) +* [`1b915ce`](https://github.com/npm/npm/commit/1b915ce1e0787ccb6d8aa235d002d66565f2175d) + `npm-registry-client@7.0.9` ([@othiym23](https://github.com/othiym23)) +* [`df7dd78`](https://github.com/npm/npm/commit/df7dd78b8fe3cc58202996fa6c994fc55419bfa5) + `tap@2.3.1` ([@isaacs](https://github.com/isaacs)) + +### v2.14.14 (2015-12-03): + +#### FIX URL IN LICENSE + +The license incorrectly identified the registry URL as `registry.npmjs.com` and +this has been corrected to `registry.npmjs.org`. + +* [`6051a69`](https://github.com/npm/npm/commit/6051a69b1adc80f5f200077067e831643f655bd4) + [#10685](https://github.com/npm/npm/pull/10685) + Fix npm public registry URL in notices. + ([@kemitchell](https://github.com/kemitchell)) + +#### NO MORE MD5 + +We updated modules that had been using MD5 for non-security purposes. While +this is perfectly safe, if you compile Node in FIPS-compliance mode it will +explode if you try to use MD5. We've replaced MD5 with Murmur, which conveys +our intent better and is faster to boot. + +* [`30b5994`](https://github.com/npm/npm/commit/30b599496a9762482e1cef945a378e3a534fd366) + [#10629](https://github.com/npm/npm/issues/10629) + `write-file-atomic@1.1.4` + ([@othiym23](https://github.com/othiym23)) +* [`68c63ff`](https://github.com/npm/npm/commit/68c63ff1279d3d5ea7b2c970ab5562a8e0536f27) + [#10629](https://github.com/npm/npm/issues/10629) + `fs-write-stream-atomic@1.0.5` + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`e48e5a9`](https://github.com/npm/npm/commit/e48e5a90b4dcf76124b7e9ea3b295c1383e7f0c8) + [nodejs/node-gyp#831](https://github.com/nodejs/node-gyp/pull/831) + `node-gyp@3.2.1`: Improved \*BSD support. + ([@bnoordhuis](https://github.com/bnoordhuis)) + +### v2.14.13 (2015-11-25): + +#### THE npm CLI !== THE npm REGISTRY !== npm, INC. + +npm-the-CLI is licensed under the terms of the [Artistic License +2.0](https://github.com/npm/npm/blob/8d79c1a39dae908f27eaa37ff6b23515d505ef29/LICENSE), +which is a liberal open-source license that allows you to take this code and do +pretty much whatever you like with it (that is, of course, not legal language, +and if you're doing anything with npm that leaves you in doubt about your legal +rights, please seek the review of qualified counsel, which is to say, not +members of the CLI team, none of whom have passed the bar, to my knowledge). At +the same time the primary registry the CLI uses when looking up and downloading +packages is a commercial service run by npm, Inc., and it has its own [Terms of +Use](https://www.npmjs.com/policies/terms). + +Aside from clarifying the terms of use (and trying to make sure they're more +widely known), the only recent changes to npm's licenses have been making the +split between the CLI and registry clearer. You are still free to do whatever +you like with the CLI's source, and you are free to view, download, and publish +packages to and from `registry.npmjs.org`, but now the existing terms under +which you can do so are more clearly documented. Aside from the two commits +below, see also [the release notes for +`npm@2.14.11`](https://github.com/npm/npm/releases/tag/v2.14.11), which is where +the split between the CLI's code and the terms of use for the registry was +first made more clear. + +* [`1f3e936`](https://github.com/npm/npm/commit/1f3e936aab6840667948ef281e0c3621df365131) + [#10532](https://github.com/npm/npm/issues/10532) Clarify that + `registry.npmjs.org` is the default, but that you're free to use the npm CLI + with whatever registry you wish. ([@kemitchell](https://github.com/kemitchell)) +* [`6733539`](https://github.com/npm/npm/commit/6733539eeb9b32a5f2d1a6aa797987e2252fa760) + [#10532](https://github.com/npm/npm/issues/10532) Having semi-duplicate + release information in `README.md` was confusing and potentially inaccurate, + so remove it. ([@kemitchell](https://github.com/kemitchell)) + +#### EASE UP ON WINDOWS BASH USERS + +It turns out that a fair number of us use bash on Windows (through MINGW or +bundled with Git, plz – Cygwin is still a bridge too far, for both npm and +Node.js). [@jakub-g](https://github.com/jakub-g) did us all a favor and relaxed +the check for npm completion to support MINGW bash. Thanks, Jakub! + +* [`460cc09`](https://github.com/npm/npm/commit/460cc0950fd6a005c4e5c4f85af807814209b2bb) + [#10156](https://github.com/npm/npm/issues/10156) completion: enable on + Windows in git bash ([@jakub-g](https://github.com/jakub-g)) + +#### MAKE NODE-GYP A LITTLE BLUER + +* [`333e118`](https://github.com/npm/npm/commit/333e1181082842c21edc62f0ce515928424dff1f) + `node-gyp@3.2.0`: Support AIX, use `which` to find Python, updated to a newer + version of `gyp`, and more! ([@bnoordhuis](https://github.com/bnoordhuis)) + +#### WE LIKE SPDX AND ALL BUT IT'S NOT ACTUALLY A DIRECT DEP, SORRY + +* [`1f4b4bb`](https://github.com/npm/npm/commit/1f4b4bbdf8758281beecb7eaf75d05a6c4a77c15) + Removed `spdx` as a direct npm dependency, since we don't actually need it at + that level, and updated subdeps for `validate-npm-package-license` + ([@othiym23](https://github.com/othiym23)) + +#### A BOUNTEOUS THANKSGIVING CORNUCOPIA OF DOC TWEAKS + +These are great! Keep them coming! Sorry for letting them pile up so deep, +everybody. Also, a belated Thanksgiving to our Canadian friends, and a happy +Thanksgiving to all our friends in the USA. + +* [`6101f44`](https://github.com/npm/npm/commit/6101f44737645d9379c3396fae81bbc4d94e1f7e) + [#10250](https://github.com/npm/npm/issues/10250) Correct order of `org:team` + in `npm team` documentation. ([@louislarry](https://github.com/louislarry)) +* [`e8769f9`](https://github.com/npm/npm/commit/e8769f9807b91582c15ef130733e2e72b6c7bda4) + [#10371](https://github.com/npm/npm/issues/10371) Remove broken / duplicate + link to tag. ([@WickyNilliams](https://github.com/WickyNilliams)) +* [`1ae2dbe`](https://github.com/npm/npm/commit/1ae2dbe759feb80d8634569221ec6ee2c6d1d1ff) + [#10419](https://github.com/npm/npm/issues/10419) Remove references to + nonexistent `npm-rm(1)` documentation. ([@KenanY](https://github.com/KenanY)) +* [`777a271`](https://github.com/npm/npm/commit/777a271830a42d4ee62540a89f764a6e7d62de19) + [#10474](https://github.com/npm/npm/issues/10474) Clarify that install finds + dependencies in `package.json`. ([@sleekweasel](https://github.com/sleekweasel)) +* [`dcf4b5c`](https://github.com/npm/npm/commit/dcf4b5cbece1b0ef55ab7665d9acacc0b6b7cd6e) + [#10497](https://github.com/npm/npm/issues/10497) Clarify what a package is + slightly. ([@aredridel](https://github.com/aredridel)) +* [`447b3d6`](https://github.com/npm/npm/commit/447b3d669b2b6c483b8203754ac0a002c67bf015) + [#10539](https://github.com/npm/npm/issues/10539) Remove an extra, spuriously + capitalized letter. ([@alexlukin-softgrad](https://github.com/alexlukin-softgrad)) + +### v2.14.12 (2015-11-19): + +#### TEEN ORCS AT THE GATES + +This week heralds the general release of the primary npm registry's [new +support for private packages for +organizations](http://blog.npmjs.org/post/133542170540/private-packages-for-organizations). +For many potential users, it's the missing piece needed to make it easy for you +to move your organization's private work onto npm. And now it's here! The +functionality to support it has been in place in the CLI for a while now, +thanks to [@zkat](https://github.com/zkat)'s hard work. + +During our final testing before the release, our ace support team member +[@snopeks](https://github.com/snopeks) noticed that there had been some drift +between the CLI team's implementation and what npm was actually preparing to +ship. In the interests of everyone having a smooth experience with this +_extremely useful_ new feature, we quickly made a few changes to square up the +CLI and the web site experiences. + +* [`0e8b15e`](https://github.com/npm/npm/commit/0e8b15e9fbc89e31bd00e573b648846beddfb835) + [#9327](https://github.com/npm/npm/issues/9327) `npm access` no longer has + problems when run in a directory that doesn't contain a `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`c4e939c`](https://github.com/npm/npm/commit/c4e939c1d493601d25dcb88e6ffcca73076fd3fd) + [npm/npm-registry-client#126](https://github.com/npm/npm-registry-client/issues/126) + `npm-registry-client@7.0.8`: Allow the CLI to grant, revoke, and list + permissions on unscoped (public) packages on the primary registry. + ([@othiym23](https://github.com/othiym23)) + +#### A BRIEF NOTE ON NPM'S BACKWARDS COMPATIBILITY + +We don't often have much to say about the changes we make to our internal +testing and tooling, but I'm going to take this opportunity to reiterate that +npm tries hard to maintain compatibility with a wide variety of Node versions. +As this change shows, we want to ensure that npm works the same across: + +* Node.js 0.8 +* Node.js 0.10 +* Node.js 0.12 +* the latest io.js release +* Node.js 4 LTS +* Node.js 5 + +Contributors who send us pull requests often notice that it's very rare that +our tests pass across all of those versions (ironically, almost entirely due to +the packages we use for testing instead of any issues within npm itself). We're +currently beginning an effort, lasting the rest of 2015, to clean up our test +suite, and not only get it passing on all of the above versions of Node.js, but +working solidly on Windows as well. This is a compounding form of technical +debt that we're finally paying down, and our hope is that cleaning up the tests +will produce a more robust CLI that's a lot easier to write patches for. + +* [`d743620`](https://github.com/npm/npm/commit/d743620a0005213a65d25de771661b4d48a09717) + [#10233](https://github.com/npm/npm/issues/10233) Update Node.js versions + that Travis uses to test npm. ([@iarna](https://github.com/iarna)) + +#### TYPOS IN THE LICENSE, OH MY + +* [`58ac241`](https://github.com/npm/npm/commit/58ac241f556b2c202a8ee33321965e2540361ca7) + [#10478](https://github.com/npm/npm/issues/10478) Correct two typos in npm's + LICENSE. ([@jorrit](https://github.com/jorrit)) + +### v2.14.11 (2015-11-12): + +#### ASK FOR NOTHING, GET LATEST + +When you run `npm install foo`, you probably expect that you'll get the +`latest` version of `foo`, whatever that is. And good news! That's what this +change makes it do. + +We _think_ this is what everyone wants, but if this causes problems for you, we +want to know! If it proves problematic for people we will consider reverting it +(preferrably before this becomes `npm@latest`). + +Previously, when you ran `npm install foo` we would act as if you typed `npm +install foo@*`. Now, like any range-type specifier, in addition to matching the +range, it would also have to be `<=` the value of the `latest` dist-tag. +Further, it would exclude prerelease versions from the list of versions +considered for a match. + +This worked as expected most of the time, unless your `latest` was a prerelease +version, in which case that version wouldn't be used, to everyone's surprise. + +* [`6f0a646`](https://github.com/npm/npm/commit/6f0a646cd865b24fe3ff25365bf5421780e63e01) + [#10189](https://github.com/npm/npm/issues/10189) `npm-package-arg@4.1.0`: + Change the default version from `*` to `latest`. + ([@zkat](https://github.com/zkat)) + +#### LICENSE CLARIFICATION + +* [`54a9046`](https://github.com/npm/npm/commit/54a90461f068ea89baa5d70248cdf1581897936d) + [#10326](https://github.com/npm/npm/issues/10326) Clarify what-all is covered + by npm's license and point to the registry's terms of use. + ([@kemitchell](https://github.com/kemitchell)) + +#### CLOSER TO GREEN TRAVIS + +* [`28efd3d`](https://github.com/npm/npm/commit/28efd3d7dfb2fa3755076ae706ea4d38c6ee6900) + [#10232](https://github.com/npm/npm/issues/10232) `nock@1.9.0`: Downgrade + nock to a version that doesn't depend on streams2 in core so that more of our + tests can pass in 0.8. ([@iarna](https://github.com/iarna)) + +#### A BUG FIX + +* [`eacac8f`](https://github.com/npm/npm/commit/eacac8f05014d15217c3d8264d0b00a72eafe2d2) + [#9965](https://github.com/npm/npm/issues/9965) Fix a corrupt `package.json` + file introduced by a merge conflict in + [`022691a`](https://github.com/npm/npm/commit/022691a). + ([@waynebloss](https://github.com/waynebloss)) + +#### A DEPENDENCY UPGRADE + +* [`ea7d8e0`](https://github.com/npm/npm/commit/ea7d8e00a67a3d5877ed72c9728909c848468a9b) + [npm/nopt#51](https://github.com/npm/nopt/pull/51) `nopt@3.0.6`: Allow + types checked to be validated by passed-in name in addition to the JS name of + the type / class. ([@wbecker](https://github.com/wbecker)) + +### v2.14.10 (2015-11-05): + +There's nothing in here that that isn't in the `npm@3.4.0` release notes, but +all of the commit shasums have been adjusted to be correct. Enjoy! + +#### BUG FIXES VIA DEPENDENCY UPDATES + +* [`204c558`](https://github.com/npm/npm/commit/204c558c06637a753c0b41d0cf19f564a1ac3715) + [#8640](https://github.com/npm/npm/issues/8640) + [npm/normalize-package-data#69](https://github.com/npm/normalize-package-data/pull/69) + `normalize-package-data@2.3.5`: Fix a bug where if you didn't specify the + name of a scoped module's binary, it would install it such that it was + impossible to call it. ([@iarna](https://github.com/iarna)) +* [`bbdf4ee`](https://github.com/npm/npm/commit/bbdf4ee0a3cd12be6a2ace255b67d573a72f1f8f) + [npm/fstream-npm#14](https://github.com/npm/fstream-npm/pull/14) + `fstream-npm@1.0.7`: Only filter `config.gypi` when it's in the build + directory. ([@mscdex](https://github.com/mscdex)) +* [`d82ff81`](https://github.com/npm/npm/commit/d82ff81403e906931fac701775723626dcb443b3) + [npm/fstream-npm#15](https://github.com/npm/fstream-npm/pull/15) + `fstream-npm@1.0.6`: Stop including directories that happened to have names + matching whitelisted npm files in npm module tarballs. The most common cause + was that if you had a README directory then everything in it would be + included if wanted it or not. ([@taion](https://github.com/taion)) + +#### DOCUMENTATION FIXES + +* [`16361d1`](https://github.com/npm/npm/commit/16361d122f2ff6d1a4729c66153b7c24c698fd19) + [#10036](https://github.com/npm/npm/pull/10036) Fix typo / over-abbreviation. + ([@ifdattic](https://github.com/ifdattic)) +* [`d1343dd`](https://github.com/npm/npm/commit/d1343dda42f113dc322f95687f5a8c7d71a97c35) + [#10176](https://github.com/npm/npm/pull/10176) Fix broken link, scopes => + scope. ([@ashleygwilliams](https://github.com/ashleygwilliams)) +* [`110663d`](https://github.com/npm/npm/commit/110663d000a3908a4853393d9abae481700cf4dc) + [#9460](https://github.com/npm/npm/issue/9460) Specifying the default command + run by "npm start" and the fact that you can pass it arguments. + ([@JuanCaicedo](https://github.com/JuanCaicedo)) + +#### DEPENDENCY UPDATES FOR THEIR OWN SAKE + +* [`7476d2d`](https://github.com/npm/npm/commit/7476d2d31552a41671c425aa7fcc2844e0381008) + [npm/npmlog#19](https://github.com/npm/npmlog/pull/19) + `npmlog@2.0.0`: Make it possible to emit log messages with `error` as the + prefix. + ([@bengl](https://github.com/bengl)) +* [`6ca7888`](https://github.com/npm/npm/commit/6ca7888862cfe8bf802dc7c66632c102acd94cf5) + `read-package-json@2.0.2`: Minor cleanups. + ([@KenanY](https://github.com/KenanY)) + +### v2.14.9 (2015-10-29): + +There's still life in `npm@2`, but for now, enjoy these dependency upgrades! +Also, [@othiym23](https://github.com/othiym23) says hi! _waves_ +[@zkat](https://github.com/zkat) has her hands full, and +[@iarna](https://github.com/iarna)'s handling `npm@3`, so I'm dealing with +`npm@2` and the totally nonexistent weird bridge `npm@1.4` LTS release that may +or may not be happening this week. + +#### CAN'T STOP WON'T STOP UPDATING THOSE DEPENDENCIES + +* [`f52f0cb`](https://github.com/npm/npm/commit/f52f0cb51526314197e9d67619feebbd82a397b7) + [#10150](https://github.com/npm/npm/issues/10150) `chmodr@1.0.2`: Use + `fs.lstat()` to check if an entry is a directory, making `chmodr()` work + properly with NFS mounts on Windows. ([@sheerun](https://github.com/sheerun)) +* [`f7011d7`](https://github.com/npm/npm/commit/f7011d7b3b1d9148a6cd8f7b8359d6fe3269a912) + [#10150](https://github.com/npm/npm/issues/10150) `which@1.2.0`: Additional + command-line parameters, which is nice but not used by npm. + ([@isaacs](https://github.com/isaacs)) +* [`ebcc0d8`](https://github.com/npm/npm/commit/ebcc0d8629388da0b849bbbad590382cd7268f51) + [#10150](https://github.com/npm/npm/issues/10150) `minimatch@3.0.0`: Don't + package browser version. ([@isaacs](https://github.com/isaacs)) +* [`8c98dce`](https://github.com/npm/npm/commit/8c98dce5ffe242bafbe92b849e73e8de1803e256) + [#10150](https://github.com/npm/npm/issues/10150) `fstream-ignore@1.0.3`: + Upgrade to use `minimatch@3` (for deduping purposes). + ([@othiym23](https://github.com/othiym23)) +* [`db9ef33`](https://github.com/npm/npm/commit/db9ef337c253ecf21c921055bf8742e10d1cb3bb) + [#10150](https://github.com/npm/npm/issues/10150) `request@2.65.0`: + Dependency upgrades and a few bug fixes, mostly related to cookie handling. + ([@simov](https://github.com/simov)) + +#### DEVDEPENDENCIES TOO, I GUESS, IT'S COOL + +* [`dfbf621`](https://github.com/npm/npm/commit/dfbf621afa09c46991249b4f9a995d1823ea7ede) + [#10150](https://github.com/npm/npm/issues/10150) `tap@2.2.0`: Better + handling of test order handling (including some test fixes for npm). + ([@isaacs](https://github.com/isaacs)) +* [`cf5ad5a`](https://github.com/npm/npm/commit/cf5ad5a8c88bfd72e30ef8a8d1d3c5508e0b3c23) + [#10150](https://github.com/npm/npm/issues/10150) `nock@2.16.0`: More + expectations, documentation, and bug fixes. + ([@pgte](https://github.com/pgte)) + +### v2.14.8 (2015-10-08): + +#### SLOWLY RECOVERING FROM FEELINGS + +OS&F is definitely my favorite convention I've gone to. Y'all should check it +out next year! Rebecca and Kat are back, although Forrest is out at +[&yet conf](http://andyetconf.com/). + +This week sees another tiny LTS release with non-code-related patches -- just +CI/release things. + +Meanwhile, have you heard? `npm@3` is much faster now! Go upgrade with `npm +install -g npm@latest` and give it a whirl if you haven't already! + +#### IF YOU CHANGE CASING ON A FILE, YOU ARE NOT MY FRIEND + +Seriously. I love me some case-sensitive filesystems, but a lot of us have to +deal with `git` and its funky support for case normalizing systems. Have mercy +and just don't bother if all you're changing is casing, please? Otherwise, I +have to do this little dance to prevent horrible conflicts. + +* [`c3a7b61`](https://github.com/npm/npm/commit/c3a7b619786650a45653c8b55b8741fc7bb5cfda) + [#9804](https://github.com/npm/npm/pulls/9804) Remove the readme file with + weird casing. + ([@zkat](https://github.com/zkat)) +* [`f3f619e`](https://github.com/npm/npm/commit/f3f619e06e4be1378dbf286f897b50e9c69c9557) + [#9804](https://github.com/npm/npm/pulls/9804) Add the readme file back in, + with desired casing. + ([@zkat](https://github.com/zkat)) + +#### IDK. OUR CI DOESN'T EVEN FULLY WORK YET BUT SURE + +Either way, it's nice to make sure we're running stuff on the latest Node. `4.2` +is getting released very soon, though (this week?), and that'll be the first +official LTS release! + +* [`bd0b9ab`](https://github.com/npm/npm/commit/bd0b9ab6e60a31448794bbd88f94672572c3cb55) + [#9827](https://github.com/npm/npm/pulls/9827) Add node `4.0` and `4.1` to + TravisCI + ([@JaKXz](https://github.com/JaKXz)) + +### v2.14.7 (2015-10-01): + +#### MORE RELEASE STAGGERING?! + +Hi all, and greetings from [Open Source & Feelings](http://osfeels.com)! + +So we're switching gears a little with how we handle our weekly releases: from +now on, we're going to stagger release weeks between dependency bumps and +regular patches. So, this week, aside from a doc change, we'll be doing only +version bumps. Expect actual patches next week! + +#### TOTALLY FOLLOWING THE RULES ALREADY + +So I snuck this in, because it's our own [@snopeks](https://github.com/snopeks)' +first contribution to the main `npm` repo. She's been helping with building +support documents for Orgs, and contributed her general intro guide to the new +feature so you can read it with `npm help orgs` right in your terminal! + +* [`8324ea0`](https://github.com/npm/npm/commit/8324ea023ace4e08b6b8959ad199e2457af9f9cf) + [#9761](https://github.com/npm/npm/pull/9761) Added general user guide for + Orgs. + ([@snopeks](https://github.com/snopeks)) + +#### JUST. ONE. MORE. + +* [`9a502ca`](https://github.com/npm/npm/commit/9a502ca96e2d43ec75a8f684c9ca33af7e910f0a) + Use unique package name in tests to work around weird test-state-based + failures. + ([@iarna](https://github.com/iarna)) + +#### OKAY ACTUALLY THE THING I WAS SUPPOSED TO DO + +Anyway -- here's your version bump! :) + +* [`4aeb94c`](https://github.com/npm/npm/commit/4aeb94c9f0df3f41802cf2e0397a998f3b527c25) + `request@2.64.0`: No longer defaulting to `application/json` for `json` + requests. Also some minor doc and packaging patches. + ([@simov](https://github.com/simov)) + `minimatch@3.0.0`: No longer packaging browser modules. + ([@isaacs](https://github.com/isaacs)) +* [`a18b213`](https://github.com/npm/npm/commit/a18b213e6945a8f5faf882927829ac95f844e2aa) + `glob@5.0.15`: Upgraded `minimatch` dependency. + ([@isaacs](https://github.com/isaacs)) +* [`9eb64d4`](https://github.com/npm/npm/commit/9eb64e44509519ca9d788502edb2eba4cea5c86b) + `nock@2.13.0` + ([@pgte](https://github.com/pgte)) + +### v2.14.6 (2015-09-24): + +#### `¯\_(ツ)_/¯` + +Since `2.x` is LTS now, you can expect a slowdown in overall release sizes. On +top of that, we had our all-company-npm-internal-conf thing on Monday and +Tuesday so there wasn't really time to do much at all. + +Still, we're bringing you a couple of tiny little changes this week! + +* [`7b7da13`](https://github.com/npm/npm/commit/7b7da13c6cdf5eae53c20d5c69afc4c16e6f715d) + [#9471](https://github.com/npm/npm/pull/9471) When the port for a tarball is + different than the registry it's in, but the hostname is the same, the + protocol is now allowed to change, too. + ([@fastest963](https://github.com/fastest963)) +* [`6643ada`](https://github.com/npm/npm/commit/6643adaf9f37f08893e3ad28b797c55a36b2a152) + `request@2.63.0`: Use `application/json` as the default content type when + making `json` requests. + ([@simov](https://github.com/simov)) + +### v2.14.5 (2015-09-17): + +#### NPM IS DEAD. LONG LIVE NPM + +That's right folks. As of this week, `npm@next` is `npm@3`, which means it'll be +`npm@latest` next week! There's some really great shiny new things over there, +and you should really take a look. + +Many kudos to [@iarna](https://github.com/iarna) for her hard work on `npm@3`! + +Don't worry, we'll keep `2.x` around for a while (as LTS), but you won't see +many, if any, new features on this end. From now on, we're going to use +`latest-2` and `next-2` as the dist tags for the `npm@2` branch. + +#### OKAY THAT'S FINE CAN I DEPRECATE THINGS NOW? + +Yes! Specially if you're using scoped packages. Apparently, deprecating them +never worked, but that should be better now. :) + +* [`eca7b24`](https://github.com/npm/npm/commit/eca7b24de9a0090da02a93a69726f5e70ab80543) + [#9558](https://github.com/npm/npm/issues/9558) Add tests for npm deprecate. + ([@zkat](https://github.com/zkat)) +* [`648fe16`](https://github.com/npm/npm/commit/648fe16157ef0db22395ae056d1dd4b4c1605bf4) + [#9558](https://github.com/npm/npm/issues/9558) `npm-registry-client@7.0.7`: + Fixes `npm deprecate` so you can actually deprecate scoped modules now (it + never worked). + ([@zkat](https://github.com/zkat)) + +#### WTF IS `node-waf` + +idk. Some old thing. We don't talk about it anymore. + +* [`cf1b39f`](https://github.com/npm/npm/commit/cf1b39fc95a9ffad7fba4c2fee705c53b19d1d16) + [#9584](https://github.com/npm/npm/issues/9584) Fix ancient references to + `node-waf` in the docs to refer to the `node-gyp` version of things. + ([@KenanY](https://github.com/KenanY)) + +#### THE `graceful-fs` AND `node-gyp` SAGA CONTINUES + +Last week had some sweeping `graceful-fs` upgrades, and this takes care of one +of the stragglers, as well as bumping `node-gyp`. `node@4` users might be +excited about this, or even `node@<4` users who previously had to cherry-pick a +bunch of patches to get the latest npm working. + +* [`e07354f`](https://github.com/npm/npm/commit/e07354f3ff3a6be568fe950f1f825897f72912d8) + `sha@2.0.1`: Upgraded graceful-fs! + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`83cb6ee`](https://github.com/npm/npm/commit/83cb6ee4045b85e565e9678ca1878877e1dc75bd) + `node-gyp@3.0.3` + ([@rvagg](https://github.com/rvagg)) + +#### DEPS! DEPS! MORE DEPS! OK STOP DEPS + +* [`0d60888`](https://github.com/npm/npm/commit/0d608889615a1cb63f5f852337e955053f201aeb) + `normalize-package-data@2.3.4`: Use an external package to check for built-in + node modules. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`79b4dac`](https://github.com/npm/npm/commit/79b4dac11f1c2d8ad5489fc3104734e1c10d4793) + `retry@0.8.0` + ([@tim-kos](https://github.com/tim-kos)) +* [`c164941`](https://github.com/npm/npm/commit/c164941d3c792904d5b126a4fd36eefbe0699f52) + `request@2.62.0`: node 4 added to build targets. Option initialization issues + fixed. + ([@simov](https://github.com/simov)) +* [`0fd878a`](https://github.com/npm/npm/commit/0fd878a44d5ae303325808d1f00df4dce7549d50) + `lru-cache@2.7.0`: Cache serialization support and fixes a cache length bug. + ([@isaacs](https://github.com/isaacs)) +* [`6a7a114`](https://github.com/npm/npm/commit/6a7a114a45b4699995d6e09164fdfd0fa1274591) + `nock@2.12.0` + ([@pgte](https://github.com/pgte)) +* [`6b25e6d`](https://github.com/npm/npm/commit/6b25e6d2235c11f4444104db4545cb42a0267666) + `semver@5.0.3`: Removed uglify-js dead code. + ([@isaacs](https://github.com/isaacs)) + +### v2.14.4 (2015-09-10): + +#### THE GREAT NODEv4 SAGA + +So [Node 4 is out now](https://nodejs.org/en/blog/release/v4.0.0/) and that's +going to involve a number of things over in npm land. Most importantly, it's the +last major release that will include the `2.x` branch of npm. That also means +that `2.x` is going to go into LTS mode in the coming weeks -- once `npm@3` +becomes our official `latest` release. You can most likely expect Node 5 to +include `npm@3` by default, whenever that happens. We'll go into more detail +about LTS at that point, as well, so keep your eyes peeled for announcements! + +#### NODE IS DEAD. LONG LIVE NODE! + +Node 4 being released means that a few things that used to be floating patches +are finally making it right into npm proper. This week, we've got two such +updates, both to dependencies: + +* [`505d9e4`](https://github.com/npm/npm/commit/505d9e40c13b8b0bb3f70ee9886f7b73ba569407) + `node-gyp@3.0.1`: Support for node nightlies and compilation for both node and + io.js without extra patching + ([@rvagg](https://github.com/rvagg)) + +[@thefourtheye](https://github.com/thefourtheye) was kind enough to submit a +*bunch* of PRs to npm's dependencies updating them to `graceful-fs@4.1.2`, which +mainly makes it so we're no longer monkey-patching `fs`. The following are all +updates related to this: + +* [`10cb189`](https://github.com/npm/npm/commit/10cb189c773fef804214018d57509cc7a943184b) + `write-file-atomic@1.1.3` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`edfb80b`](https://github.com/npm/npm/commit/edfb80b39f8cfce9a993f139eb98248001198e09) + `tar@2.2.1` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`aa6e1ee`](https://github.com/npm/npm/commit/aa6e1eede7d71fa69d7256afdfbaa3406bc39a5b) + `read-package-json@2.0.1` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`18971a3`](https://github.com/npm/npm/commit/18971a361635ed3958ecd39b63930ae1e56f8612) + `read-installed@4.0.3` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`a4cba71`](https://github.com/npm/npm/commit/a4cba71bd2532236fda7385bf55e8790cafd4f0a) + `fstream@1.0.8` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`70a38e2`](https://github.com/npm/npm/commit/70a38e29418951ac61ab6cf269d188074fe8ac3a) + `fs-write-stream-atomic@1.0.4` + ([@thefourtheye](https://github.com/thefourtheye)) +* [`9cbd20f`](https://github.com/npm/npm/commit/9cbd20f691e37960e4ba12d401abd1069657cb47) + `fs-vacuum@1.2.7` + ([@thefourtheye](https://github.com/thefourtheye)) + +#### OTHER PATCHES + +* [`c4dd521`](https://github.com/npm/npm/commit/c4dd5213b2f3283ea0392845e5f78cac4573529e) + [#9506](https://github.com/npm/npm/issues/9506) Make `npm link` work on + Windows when using node pre-release/RC releases. + ([@jon-hall](https://github.com/jon-hall)) +* [`b6bc29c`](https://github.com/npm/npm/commit/b6bc29c1401b3d6b570c09cbef1866bdb0436b59) + [#9544](https://github.com/npm/npm/issues/9549) `process.binding` is being + deprecated, so our only direct usage has been removed. + ([@ChALkeR](https://github.com/ChALkeR)) + +#### MORE DEPENDENCIES! + +* [`d940594`](https://github.com/npm/npm/commit/d940594e479a7f012b6dd6952e8ef985ba2a6216) + `tap@1.4.1` + ([@isaacs](https://github.com/isaacs)) +* [`ee38486`](https://github.com/npm/npm/commit/ee3848669331fd98879a3175789d963543f67ce3) + `which@1.1.2`: Added tests for Windows-related dead code that was previously + helping a silent failure happen. Travis stuff, too. + ([@isaacs](https://github.com/isaacs)) + +#### DOC UPDATES + +* [`475daf5`](https://github.com/npm/npm/commit/475daf54ad07777938d1d7ee1a3e576961e84510) + [#9492](https://github.com/npm/npm/issues/9492) Clarify how `.npmignore` and + `.gitignore` are found and used by npm. + ([@addaleax](https://github.com/addaleax)) +* [`b2c391d`](https://github.com/npm/npm/commit/b2c391d7833249626a6d7650363a83bcc778717a) + `nopt@3.0.4`: Minor clarifications to docs about how array and errors work. + ([@zkat](https://github.com/zkat)) + +### v2.14.3 (2015-09-03): + +#### TEAMS AND ORGS STILL BETA. CLI CODE STILL SOLID. + +Our closed beta for Teens and Orcs is happening! The web team is hard at work +making sure everything looks pretty and usable and such. Once we fix things +stemming from that beta, you can expect the feature to be available publicly. +Some time after that, it'll even be available for free for FOSS orgs. It'll Be +Done When It's Done™. + +#### OH GOOD, I CAN ACTUALLY UPSTREAM NOW + +Looks like last week's release foiled our own test suite when trying to upstream +it to Node! Just a friendly reminder that no, `.npmrc` is no longer included +then you pack/release a package! [@othiym23](https://github.com/othiym23) and +[@isaacs](https://github.com/isaacs) managed to suss the really strange test +failures resulting from that, and we've patched it in this release. + +* [`01a3428`](https://github.com/npm/npm/commit/01a3428534b754dca89a56fd1e49f55cb22f6f25) + [#9476](https://github.com/npm/npm/issues/9476) test: Recreate missing + `.npmrc` files when missing so downstream packagers can run tests on packed + npm. + ([@othiym23](https://github.com/othiym23)) + +#### TALKING ABOUT THE CHANGELOG IN THE CHANGELOG IS LIKE, POMO OR SOMETHING + +* [`c1e7a83`](https://github.com/npm/npm/commit/c1e7a83c0ae7aadf01aecc57cf8a0ae2009d4da8) + [#9431](https://github.com/npm/npm/issues/9431) CHANGELOG: clarify + windows-related nature of patch + ([@saper](https://github.com/saper)) + +#### devDependencies UPDATED + +No actual dep updates this week, but we're bumping a couple of devDeps: + +* [`8454835`](https://github.com/npm/npm/commit/84548351bfd63e3e305d195abbcad24c6b7c3e8e) + `tap@1.4.0`: Add `t.contains()` as alias to `t.match()` + ([@isaacs](https://github.com/isaacs)) +* [`13d2216`](https://github.com/npm/npm/commit/13d22161bcdeb6e1ed095d5ba2f77e6abfffa5eb) + `deep-equal@1.0.1`: Make `null == undefined` in non-strict mode + ([@isaacs](https://github.com/isaacs)) + +### v2.14.2 (2015-08-27): + +#### GETTING THAT PESKY `preferGlobal` WARNING RIGHT + +So apparently the `preferGlobal` option hasn't quite been warning correctly for +some time. But now it should be all better! tl;dr: if you try and install a +dependency with `preferGlobal: true`, and it's _not already_ in your +`package.json`, you'll get a warning that the author would really rather you +install it with `--global`. This should prevent Windows PowerShell from thinking +npm has failed just because of a benign warning. + +* [`bbb25f3`](https://github.com/npm/npm/commit/bbb25f30d582f8979168c79233a9f8f840974f90) + [#8841](https://github.com/npm/npm/issues/8841) + [#9409](https://github.com/npm/npm/issues/9409) The `preferGlobal` + warning shouldn't happen if the dependency being installed is listed in + `devDependencies`. ([@saper](https://github.com/saper)) +* [`222fcec`](https://github.com/npm/npm/commit/222fcec85ccd30d35899e5037079fb14625af4e2) + [#9409](https://github.com/npm/npm/issues/9409) `preferGlobal` now prints a + warning when there are no dependencies for the current package. + ([@zkat](https://github.com/zkat)) +* [`5cfed6d`](https://github.com/npm/npm/commit/5cfed6d7a1a5f2731688cfc8293b5e43a6355393) + [#9409](https://github.com/npm/npm/issues/9409) Verify that + `preferGlobal` is warning as expected (when a `preferGlobal` dependency is + installed, but isn't listed in either `dependencies` or `devDependencies`). + ([@zkat](https://github.com/zkat)) + +#### BUMP +1 + +* [`eeafce2`](https://github.com/npm/npm/commit/eeafce2d06883c0f51bf403415b6bc5f2647eba3) + `validate-npm-package-license@3.0.1`: Include additional metadata in parsed license object, + useful for license checkers. ([@kemitchell](https://github.com/kemitchell)) +* [`1502a28`](https://github.com/npm/npm/commit/1502a285f84aa548806b3eafc8889e6288e810f3) + `normalise-package-data@2.3.2`: Updated to use `validate-npm-package-license@3.0.1`. + ([@othiym23](https://github.com/othiym23)) +* [`cbde823`](https://github.com/npm/npm/commit/cbde8233436bf0ea62a4740869b4990322c20659) + `init-package-json@1.9.1`: Add a `silent` option to suppress output on writing the + generated `package.json`. Also, updated to use `validate-npm-package-license@3.0.1`. + ([@zkat](https://github.com/zkat)) +* [`08fda46`](https://github.com/npm/npm/commit/08fda465452b4d77f1ced8050ee3a35a77fc30a5) + `tar@2.2.0`: Minor improvements. ([@othiym23](https://github.com/othiym23)) +* [`dc2f20b`](https://github.com/npm/npm/commit/dc2f20b53fff77203139c863b48da0e959df2ac9) + `rimraf@2.4.3`: `EPERM` now triggers a delay / retry loop (since Windows throws + this when things still hold a handle). ([@isaacs](https://github.com/isaacs)) +* [`e8acb27`](https://github.com/npm/npm/commit/e8acb273aa67ee0394d0431650e1b2a7d09c8554) + `read@1.0.7`: Fix licensing ambiguity. ([@isaacs](https://github.com/isaacs)) + +#### OTHER STUFF THAT'S RELEVANT + +* [`73a1ee0`](https://github.com/npm/npm/commit/73a1ee0be90fa1928521b63f28bef83b8ffab61d) + [#9386](https://github.com/npm/npm/issues/9386) Include additional unignorable files in + documentation. + ([@mjhasbach](https://github.com/mjhasbach)) +* [`0313e40`](https://github.com/npm/npm/commit/0313e40ee0f757fce8861be590ad668c23d7be53) + [#9396](https://github.com/npm/npm/issues/9396) Improve the `EISDIR` error + message returned by npm's error-handling code to give users a better hint of + what's most likely going on. Usually, error reports with this error code are + about people trying to install things without a `package.json`. + ([@KenanY](https://github.com/KenanY)) +* [`2677457`](https://github.com/npm/npm/commit/26774579c739c5951351e58263cf4d6ea3d66ec8) + [#9360](https://github.com/npm/npm/issues/9360) Make it easier to run + only _some_ of npm tests with lifecycle scripts via `npm tap test/tap/testname.js`. + ([@iarna](https://github.com/iarna)) + +### v2.14.1 (2015-08-20): + +#### SECURITY FIX + +There are patches for two information leaks of moderate severity in `npm@2.14.1`: + +1. In some cases, npm was leaking sensitive credential information into the + child environment when running package and lifecycle scripts. This could + lead to packages being published with files (most notably `config.gypi`, a + file created by `node-gyp` that is a cache of environmental information + regenerated on every run) containing the bearer tokens used to authenticate + users to the registry. Users with affected packages have been notified (and + the affected tokens invalidated), and now npm has been modified to not + upload files that could contain this information, as well as scrubbing the + sensitive information out of the environment passed to child scripts. +2. Per-package `.npmrc` files are used by some maintainers as a way to scope + those packages to a specific registry and its credentials. This is a + reasonable use case, but by default `.npmrc` was packed into packages, + leaking those credentials. npm will no longer include `.npmrc` when packing + tarballs. + +If you maintain packages and believe you may be affected by either +of the above scenarios (especially if you've received a security +notification from npm recently), please upgrade to `npm@2.14.1` as +soon as possible. If you believe you may have inadvertently leaked +your credentials, upgrade to `npm@2.14.1` on the affected machine, +and run `npm logout` and then `npm login`. Your access tokens will be +invalidated, which will eliminate any risk posed by tokens inadvertently +included in published packages. We apologize for the inconvenience this +causes, as well as the oversight that led to the existence of this issue +in the first place. + +Huge thanks to [@ChALkeR](https://github.com/ChALkeR) for bringing these +issues to our attention, and for helping us identify affected packages +and maintainers. Thanks also to the Node.js security working group for +their coördination with the team in our response to this issue. We +appreciate everybody's patience and understanding tremendously. + +* [`b9474a8`](https://github.com/npm/npm/commit/b9474a843ca55b7c5fac6da33989e8eb39aff8b1) + `fstream-npm@1.0.5`: Stop publishing build cruft (`config.gypi`) and per-project + `.npmrc` files to keep local configuration out of published packages. + ([@othiym23](https://github.com/othiym23)) +* [`13c286d`](https://github.com/npm/npm/commit/13c286dbdc3fa8fec4cb79fc4d1ee505c8a41b2e) + [#9348](https://github.com/npm/npm/issues/9348) Filter "private" + (underscore-prefixed, even when scoped to a registry) configuration values + out of child environments. ([@othiym23](https://github.com/othiym23)) + +#### BETTER WINDOWS INTEGRATION, ONE STEP AT A TIME + +* [`e40e71f`](https://github.com/npm/npm/commit/e40e71f2f838a8a42392f44e3eeec04e323ab743) + [#6412](https://github.com/npm/npm/issues/6412) Improve the search strategy + used by the npm shims for Windows to prioritize your own local npm installs. + npm has really needed this tweak for a long time, so hammer on it and let us + know if you run into issues, but with luck it will Just Work. + ([@joaocgreis](https://github.com/joaocgreis)) +* [`204ebbb`](https://github.com/npm/npm/commit/204ebbb3e0cab696a429a878ceeb4a7e78ec2b94) + [#8751](https://github.com/npm/npm/issues/8751) + [#7333](https://github.com/npm/npm/issues/7333) Keep [autorun + scripts](https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) from + interfering with npm package and lifecycle script execution on Windows by + adding `/d` and `/s` when invoking `cmd.exe`. + ([@saper](https://github.com/saper)) + +#### IT SEEMED LIKE AN IDEA AT THE TIME + +* [`286f3d9`](https://github.com/npm/npm/commit/286f3d97103812f0fd84b70352addbe899e258f9) + [#9201](https://github.com/npm/npm/pull/9201) For a while npm was building + HTML partials for use on [`docs.npmjs.com`](https://docs.npmjs.com), but we + weren't actually using them. Stop building them, which makes running the full + test suite and installation process around a third faster. + ([@isaacs](https://github.com/isaacs)) + +#### A SINGLE LONELY DEPENDENCY UPGRADE + +* [`b343b95`](https://github.com/npm/npm/commit/b343b956ef777e321e4251ddc96ec6d80827d9e2) + `request@2.61.0`: Bug fixes and keep-alive tweaks. + ([@simov](https://github.com/simov)) + +### v2.14.0 (2015-08-13): + +#### IT'S HERE! KINDA! + +This release adds support for teens and orcs (err, teams and organizations) to +the npm CLI! Note that the web site and registry-side features of this are +still not ready for public consumption. + +A beta should be starting in the next couple of weeks, and the features +themselves will become public once all that's done. Keep an eye out for more +news! + +All of these changes were done under [`#9011`](https://github.com/npm/npm/pull/9011): + +* [`6424170`](https://github.com/npm/npm/commit/6424170fc17c666a6efc090370ec691e0cab1792) + Added new `npm team` command and subcommands. + ([@zkat](https://github.com/zkat)) +* [`52220d1`](https://github.com/npm/npm/commit/52220d146d474ec29b683bd99c06f75cbd46a9f4) + Added documentation for new `npm team` command. + ([@zkat](https://github.com/zkat)) +* [`4e66830`](https://github.com/npm/npm/commit/4e668304850d02df8eb27a779fda76fe5de645e7) + Updated `npm access` to support teams and organizations. + ([@zkat](https://github.com/zkat)) +* [`ea3eb87`](https://github.com/npm/npm/commit/ea3eb8733d9fa09ce34106b1b19fb1a8f95844a5) + Gussied up docs for `npm access` with new commands. + ([@zkat](https://github.com/zkat)) +* [`6e0b431`](https://github.com/npm/npm/commit/6e0b431c1de5e329c86e57d097aa88ebfedea864) + Fix up `npm whoami` to make the underlying API usable elsewhere. + ([@zkat](https://github.com/zkat)) +* [`f29c931`](https://github.com/npm/npm/commit/f29c931012ce5ccd69c29d83548f27e443bf7e62) + `npm-registry-client@7.0.1`: Upgrade `npm-registry-client` API to support + `team` and `access` calls against the registry. + ([@zkat](https://github.com/zkat)) + +#### A FEW EXTRA VERSION BUMPS + +* [`c977e12`](https://github.com/npm/npm/commit/c977e12cbfa50c2f52fc807f5cc19ba1cc1b39bf) + `init-package-json@1.8.0`: Checks for some `npm@3` metadata. + ([@iarna](https://github.com/iarna)) +* [`5c8c9e5`](https://github.com/npm/npm/commit/5c8c9e5ae177ba7d0d298cfa42f3fc7f0271e4ec) + `columnify@1.5.2`: Updated some dependencies. + ([@timoxley](https://github.com/timoxley)) +* [`5d56742`](https://github.com/npm/npm/commit/5d567425768b75aeab402c817a53d8b2bc60d8de) + `chownr@1.0.1`: Tests, docs, and minor style nits. + ([@isaacs](https://github.com/isaacs)) + +#### ALSO A DOC FIX + +* [`846fcc7`](https://github.com/npm/npm/commit/846fcc79b86984b109a97366b0422f995a45f8bf) + [`#9200`](https://github.com/npm/npm/pull/9200) Remove single quotes + around semver range, thus making it valid semver. + ([@KenanY](https://github.com/KenanY)) + +### v2.13.5 (2015-08-07): + +This is another quiet week for the `npm@2` release. +[@zkat](https://github.com/zkat) has been working hard on polishing the CLI +bits of the registry's new feature to support direct management of teams and +organizations, and [@iarna](https://github.com/iarna) continues to work through +the list of issues blocking the general release of `npm@3`, which is looking +more and more solid all the time. + +[@othiym23](https://github.com/othiym23) and [@zkat](https://github.com/zkat) +have also been at this week's Node.js / io.js [collaborator +summit](https://github.com/nodejs/summit/tree/master), both as facilitators and +participants. This is a valuable opportunity to get some face time with other +contributors and to work through a bunch of important discussions, but it does +leave us feeling kind of sleepy. Running meetings is hard! + +What does that leave for this release? A few of the more tricky bug fixes that +have been sitting around for a little while now, and a couple dependency +upgrades. Nothing too fancy, but most of these were contributed by developers +like _you_, which we think is swell. Thanks! + +#### BUG FIXES + +* [`d7271b8`](https://github.com/npm/npm/commit/d7271b8226712479cdd339bf85faf7e394923e0d) + [#4530](https://github.com/npm/npm/issues/4530) The bash completion script + for npm no longer alters global completion behavior around word breaks. + ([@whitty](https://github.com/whitty)) +* [`c9ce294`](https://github.com/npm/npm/commit/c9ce29415a0a8fc610690b6e9d91b64d6e36cfcc) + [#7198](https://github.com/npm/npm/issues/7198) When setting up dependencies + to be shared via `npm link <package>`, only run the lifecycle scripts during + the original link, not when running `npm link <package>` or `npm install + --link` against them. ([@murgatroid99](https://github.com/murgatroid99)) +* [`422da66`](https://github.com/npm/npm/commit/422da664bd3ce71313da447f170507faf5aac46a) + [#9108](https://github.com/npm/npm/issues/9108) Clear up minor confusion + around wording in `bundledDependencies` section of `package.json` docs. + ([@derekpeterson](https://github.com/derekpeterson)) +* [`6b42d99`](https://github.com/npm/npm/commit/6b42d99460885e715772d3487b1c548d2bc8a738) + [#9146](https://github.com/npm/npm/issues/9146) Include scripts that run for + `preversion`, `version`, and `postversion` in the section for lifecycle + scripts rather than the generic `npm run-script` output. + ([@othiym23](https://github.com/othiym23)) + +#### NOPE, NOT DONE WITH DEPENDENCY UPDATES + +* [`91a48bb`](https://github.com/npm/npm/commit/91a48bb5ef5a990781c86f8b69b8a32cf4fac2d9) + `chmodr@1.0.1`: Ignore symbolic links when recursively changing mode, just + like the Unix command. ([@isaacs](https://github.com/isaacs)) +* [`4bbc86e`](https://github.com/npm/npm/commit/4bbc86e3825e2eee9a8758ba26bdea0cb6a2581e) + `nock@2.10.0` ([@pgte](https://github.com/pgte)) + +### v2.13.4 (2015-07-30): + +#### JULY ENDS ON A FAIRLY QUIET NOTE + +Hey everyone! I hope you've had a great week. We're having a fairly small +release this week while we wrap up Teams and Orgs (or, as we've taken to calling +it internally, _Teens and Orcs_). + +In other exciting news, a bunch of us are gonna be at the [Node.js Collaborator +Summit](https://github.com/nodejs/summit/issues/1), and you can also find us at +[wafflejs](https://wafflejs.com/) on Wednesday. Hopefully we'll be seeing some +of you there. :) + +#### THE PATCH!!! + +So here it is. The patch. Hope it helps. (Thanks, +[@ktarplee](https://github.com/ktarplee)!) + +* [`2e58c48`](https://github.com/npm/npm/commit/2e58c4819e3cafe4ae23ab7f4a520fe09258cfd7) + [#9033](https://github.com/npm/npm/pull/9033) `npm version` now works on git + submodules + ([@ktarplee](https://github.com/ktarplee)) + +#### OH AND THERE'S A DEV DEPENDENCIES UPDATE + +Hooray. + +* [`d204683`](https://github.com/npm/npm/commit/d2046839d471322e61e3ceb0f00e78e5c481f967) + `nock@2.9.1` + ([@pgte](https://github.com/pgte)) + +### v2.13.3 (2015-07-23): + +#### I'M SAVING THE GOOD JOKES FOR MORE INTERESTING RELEASES + +It's pretty hard to outdo last week's release buuuuut~ I promise I'll have a +treat when we release our shiny new **Teams and Organizations** feature! :D +(Coming Soon™). It'll be a real *gem*. + +That means it's a pretty low-key release this week. We got some nice +documentation tweaks, a few bugfixes, and other such things, though! + +Oh, and a _bunch of version bumps_. Thanks, `semver`! + +#### IT'S THE LITTLE THINGS THAT MATTER + +* [`2fac6ae`](https://github.com/npm/npm/commit/2fac6aeffefba2934c3db395b525d931599c34d8) + [#9012](https://github.com/npm/npm/issues/9012) A convenience for releases -- + using the globally-installed npm before now was causing minor annoyances, so + we just use the exact same npm we're releasing to build the new release. + ([@zkat](https://github.com/zkat)) + +#### WHAT DOES THIS BUTTON DO? + +There's a couple of doc updates! The last one might be interesting. + +* [`4cd3205`](https://github.com/npm/npm/commit/4cd32050c0f89b7f1ae486354fa2c35eea302ba5) + [#9002](https://github.com/npm/npm/issues/9002) Updated docs to list the + various files that npm automatically includes and excludes, regardless of + settings. + ([@SimenB](https://github.com/SimenB)) +* [`cf09e75`](https://github.com/npm/npm/commit/cf09e754931739af32647d667b671e72a4c79081) + [#9022](https://github.com/npm/npm/issues/9022) Document the `"access"` field + in `"publishConfig"`. Did you know you don't need to use `--access=public` + when publishing scoped packages?! Just put it in your `package.json`! + Go refresh yourself on scopes packages by [checking our docs](https://docs.npmjs.com/getting-started/scoped-packages) on them. + ([@boennemann](https://github.com/boennemann)) +* [`bfd73da`](https://github.com/npm/npm/commit/bfd73da33349cc2afb8278953b2ae16ea95023de) + [#9013](https://github.com/npm/npm/issues/9013) fixed typo in changelog + ([@radarhere](https://github.com/radarhere)) + +#### THE SEMVER MAJOR VERSION APOCALYPSE IS UPON US + +Basically, `semver` is up to `@5`, and that meant we needed to go in an update a +bunch of our dependencies manually. `node-gyp` is still pending update, since +it's not ours, though! + +* [`9232e58`](https://github.com/npm/npm/commit/9232e58d54c032c23716ef976023d36a42bfdcc9) + [#8972](https://github.com/npm/npm/issues/8972) `init-package-json@1.7.1` + ([@othiym23](https://github.com/othiym23)) +* [`ba44f6b`](https://github.com/npm/npm/commit/ba44f6b4201a4faee025341b123e372d8f45b6d9) + [#8972](https://github.com/npm/npm/issues/8972) `normalize-package-data@2.3.1` + ([@othiym23](https://github.com/othiym23)) +* [`3901d3c`](https://github.com/npm/npm/commit/3901d3cf191880bb4420b1d6b8aedbcd8fc26cdf) + [#8972](https://github.com/npm/npm/issues/8972) `npm-install-checks@1.0.6` + ([@othiym23](https://github.com/othiym23)) +* [`ffcc7dd`](https://github.com/npm/npm/commit/ffcc7dd12f8bb94ff0f64c465c57e460b3f24a24) + [#8972](https://github.com/npm/npm/issues/8972) `npm-package-arg@4.0.2` + ([@othiym23](https://github.com/othiym23)) +* [`7128f9e`](https://github.com/npm/npm/commit/7128f9ec10c0c8482087511b716dbddb54249626) + [#8972](https://github.com/npm/npm/issues/8972) `npm-registry-client@6.5.1` + ([@othiym23](https://github.com/othiym23)) +* [`af28911`](https://github.com/npm/npm/commit/af28911ecd54a844f848c6ae41887097d6aa2f3b) + [#8972](https://github.com/npm/npm/issues/8972) `read-installed@4.0.2` + ([@othiym23](https://github.com/othiym23)) +* [`3cc817a`](https://github.com/npm/npm/commit/3cc817a0f34f698b580ff6ff02308700efc54f7c) + [#8972](https://github.com/npm/npm/issues/8972) node-gyp needs its own version + of semver + ([@othiym23](https://github.com/othiym23)) +* [`f98eccc`](https://github.com/npm/npm/commit/f98eccc6e3a6699ca0aa9ecbad93a3b995583871) + [#8972](https://github.com/npm/npm/issues/8972) `semver@5.0.1`: Stop including + browser builds. + ([@isaacs](https://github.com/isaacs)) + +#### \*BUMP\* + +And some other version bumps for good measure. + +* [`254ecfb`](https://github.com/npm/npm/commit/254ecfb04f026c2fd16427db01a53600c1892c8b) + [#8990](https://github.com/npm/npm/issues/8990) `marked-man@0.1.5`: Fixes an + issue with documentation rendering where backticks in 2nd-level headers would + break rendering (?!?!) + ([@steveklabnik](https://github.com/steveklabnik)) +* [`79efd79`](https://github.com/npm/npm/commit/79efd79ac216da8cee8636fb2ed926b0196a4eb6) + `minimatch@2.0.10`: A pattern like `'*.!(x).!(y)'` should not match a name + like `'a.xyz.yab'`. + ([@isaacs](https://github.com/isaacs)) +* [`39c7dc9`](https://github.com/npm/npm/commit/39c7dc9a4e17cd35a5ed882ba671821c9a900f9e) + `request@2.60.0`: A few bug fixes and doc updates. + ([@simov](https://github.com/simov)) +* [`72d3c3a`](https://github.com/npm/npm/commit/72d3c3a9e1e461608aa21b14c01a650333330da9) + `rimraf@2.4.2`: Minor doc and dep updates + ([@isaacs](https://github.com/isaacs)) +* [`7513035`](https://github.com/npm/npm/commit/75130356a06f5f4fbec3786aac9f9f0b36dfe010) + `nock@2.9.1` + ([@pgte](https://github.com/pgte)) +* [`3d9aa82`](https://github.com/npm/npm/commit/3d9aa82260f0643a32c13d0c1ed16f644b6fd4ab) + Fixes this thing where Kat decided to save `nock` as a regular dependency ;) + ([@othiym23](https://github.com/othiym23)) + +### v2.13.2 (2015-07-16): + +#### HOLD ON TO YOUR TENTACLES... IT'S NPM RELEASE TIME! + +Kat: Hooray! Full team again, and we've got a pretty small patch release this +week, about everyone's favorite recurring issue: git URLs! + +Rebecca: No Way! Again? + +Kat: The ride never ends! In the meantime, there's some fun, exciting work in +the background to get orgs and teams out the door. Keep an eye out for news. :) + +Rebecca: And make sure to keep an eye out for patches for the super-fresh +`npm@3`! + +#### LET'S GIT INKY + +Rebecca: So what's this about another git URL issue? + +Kat: Welp, I apparently broke backwards-compatibility on what are actually +invalid `git+https` URLs! So I'm making it work, but we're gonna deprecate URLs +that look like `git+https://user@host:path/is/here`. + +Rebecca: What should we use instead?! + +Kat: Just do me a solid and use `git+ssh://user@host:path/here` or +`git+https://user@host/absolute/https/path` instead! + +* [`769f06e`](https://github.com/npm/npm/commit/769f06e5455d7a9fc738379de2e05868df0dab6f) + Updated tests for `getResolved` so the URLs are run through + `normalize-git-url`. + ([@zkat](https://github.com/zkat)) +* [`edbae68`](https://github.com/npm/npm/commit/edbae685bf48971e878ced373d6825fc1891ee47) + [#8881](https://github.com/npm/npm/issues/8881) Added tests to verify that `git+https:` URLs are handled compatibly. + ([@zkat](https://github.com/zkat)) + +#### NEWS FLASH! DOCUMENTATION IMPROVEMENTS! + +* [`bad4e014`](https://github.com/npm/npm/commit/bad4e0143cc95754a682f1da543b2b4e196e924b) + [#8924](https://github.com/npm/npm/pull/8924) Make sure documented default + values in `lib/cache.js` properly correspond to current code. + ([@watilde](https://github.com/watilde)) +* [`e7a11fd`](https://github.com/npm/npm/commit/e7a11fdf70e333cdfe3dac94a1a30907adb76d59) + [#8036](https://github.com/npm/npm/issues/8036) Clarify the documentation for + `.npmrc` to clarify that it's not read at the project level when doing global + installs. + ([@espadrine](https://github.com/espadrine)) + +#### STAY FRESH~ + +Kat: That's it for npm core changes! + +Rebecca: Great! Let's look at the fresh new dependencies, then! + +Kat: See you all next week! + +Both: Stay Freeesh~ + +(some cat form of Forrest can be seen snoring in the corner) + +* [`bfa1f45`](https://github.com/npm/npm/bfa1f45ee760d05039557d2245b7e3df9fda8def) + `normalize-git-url@3.0.1`: Fixes url normalization such that `git+https:` + accepts scp syntax, but get converted into absolute-path `https:` URLs. Also + fixes scp syntax so you can have absolute paths after the `:` + (`git@myhost.org:/some/absolute/place.git`) + ([@zkat](https://github.com/zkat)) +* [`6f757d2`](https://github.com/npm/npm/6f757d22b53f91da0bebec6b5d16c1f4dbe130b4) + `glob@5.0.15`: Better handling of ENOTSUP + ([@isaacs](https://github.com/isaacs)) +* [`0920819`](https://github.com/npm/npm/09208197fb8b0c6d5dbf6bd7f59970cf366de989) + `node-gyp@2.0.2`: Fixes an issue with long paths on Win32 + ([@TooTallNate](https://github.com/TooTallNate)) + +### v2.13.1 (2015-07-09): + +#### KAUAI WAS NICE. I MISS IT. + +But Forrest's still kinda on vacation, and not just mentally, because he's +hanging out with the fine meatbags at CascadiaFest. Enjoy this small bug +release. + +#### MAKE OURSELVES HAPPY + +* [`40981f2`](https://github.com/npm/npm/commit/40981f2e0c9c12bb003ccf188169afd1d201f5af) + [#8862](https://github.com/npm/npm/issues/8862) Make the lifecycle's safety + check work with scoped packages. ([@tcort](https://github.com/tcort)) +* [`5125856`](https://github.com/npm/npm/commit/512585622481dbbda9a0306932468d59efaff658) + [#8855](https://github.com/npm/npm/issues/8855) Make dependency versions of + `"*"` match `"latest"` when all versions are prerelease. + ([@iarna](https://github.com/iarna)) +* [`22fdc1d`](https://github.com/npm/npm/commit/22fdc1d52602ba7098af978c75fca8f7d1060141) + Visually emphasize the correct way to write lifecycle scripts. + ([@josh-egan](https://github.com/josh-egan)) + +#### MAKE TRAVIS HAPPY + +* [`413c3ac`](https://github.com/npm/npm/commit/413c3ac2ab2437f3011c6ca0d1630109ec14e604) + Use npm's `2.x` branch for testing its `2.x` branch. + ([@iarna](https://github.com/iarna)) +* [`7602f64`](https://github.com/npm/npm/commit/7602f64826f7a465d9f3a20bd87a376d992607e6) + Don't prompt for GnuPG passphrase in version lifecycle tests. + ([@othiym23](https://github.com/othiym23)) + +#### MAKE `npm outdated` HAPPY + +* [`d338668`](https://github.com/npm/npm/commit/d338668601d1ebe5247a26237106e80ea8cd7f48) + [#8796](https://github.com/npm/npm/issues/8796) `fstream-npm@1.0.4`: When packing the + package tarball, npm no longer crashes for packages with certain combinations of + `.npmignore` entries, `.gitignore` entries, and lifecycle scripts. + ([@iarna](https://github.com/iarna)) +* [`dbe7c9c`](https://github.com/npm/npm/commit/dbe7c9c74734be870d16dd61b9e7f746123011f6) + `nock@2.7.0`: Add matching based on query strings. + ([@othiym23](https://github.com/othiym23)) + +There are new versions of `strip-ansi` and `ansi-regex`, but npm only uses them +indirectly, so we pushed them down into their dependencies where they can get +updated at their own pace. + +* [`06b6ca5`](https://github.com/npm/npm/commit/06b6ca5b5333025f10c8d901628859bd4678e027) + undeduplicate `ansi-regex` ([@othiym23](https://github.com/othiym23)) +* [`b168e33`](https://github.com/npm/npm/commit/b168e33ad46faf47020a45f72ba8cec8c644bdb9) + undeduplicate `strip-ansi` ([@othiym23](https://github.com/othiym23)) + +### v2.13.0 (2015-07-02): + +#### FORREST IS OUT! LET'S SNEAK IN ALL THE THINGS! + +Well, not _everything_. Just a couple of goodies, like the new `npm ping` +command, and the ability to add files to the commits created by `npm version` +with the new version hooks. There's also a couple of bugfixes in `npm` itself +and some of its dependencies. Here we go! + +#### YES HELLO THIS IS NPM REGISTRY SORRY NO DOG HERE + +Yes, that's right! We now have a dedicated `npm ping` command. It's super simple +and super easy. You ping. We tell you whether you pinged right by saying hello +right back. This should help out folks dealing with things like proxy issues or +other registry-access debugging issues. Give it a shot! + +This addresses [#5750](https://github.com/npm/npm/issues/5750), and will help +with the `npm doctor` stuff described in +[#6756](https://github.com/npm/npm/issues/6756). + +* [`f1f7a85`](https://github.com/npm/npm/commit/f1f7a85) + Add ping command to CLI + ([@michaelnisi](https://github.com/michaelnisi)) +* [`8cec629`](https://github.com/npm/npm/commit/8cec629) + Add ping command to npm-registry-client + ([@michaelnisi](https://github.com/michaelnisi)) +* [`0c0c92d`](https://github.com/npm/npm/0c0c92d) + Fixed ping command issues (added docs, tests, fixed minor bugs, etc) + ([@zkat](https://github.com/zkat)) + +#### I'VE WANTED THIS FOR `version` SINCE LIKE LITERALLY FOREVER AND A DAY + +Seriously! This patch lets you add files to the `version` commit before it's +made, So you can add additional metadata files, more automated changes to +`package.json`, or even generate `CHANGELOG.md` automatically pre-commit if +you're into that sort of thing. I'm so happy this is there I can't even. Do you +have other fun usecases for this? Tell +[npmbot (@npmjs)](http://twitter.com/npmjs) about it! + +* [`582f170`](https://github.com/npm/npm/commit/582f170) + [#8620](https://github.com/npm/npm/issues/8620) version: Allow scripts to add + files to the commit. + ([@jamestalmage](https://github.com/jamestalmage)) + +#### ALL YOUR FILE DESCRIPTORS ARE BELONG TO US + +We've had problems in the past with things like `EMFILE` errors popping up when +trying to install packages with a bunch of dependencies. Isaac patched up +[`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to handle this case +better, so we should be seeing fewer of those. + +* [`022691a`](https://github.com/npm/npm/commit/022691a) + `graceful-fs@4.1.2`: Updated so we can monkey patch globally. + ([@isaacs](https://github.com/isaacs)) +* [`c9fb0fd`](https://github.com/npm/npm/commit/c9fb0fd) + Globally monkey-patch graceful-fs. This should fix some errors when installing + packages with lots of dependencies. + ([@isaacs](https://github.com/isaacs)) + +#### READ THE FINE DOCS. THEY'VE IMPROVED + +* [`5587d0d`](https://github.com/npm/npm/commit/5587d0d) + Nice clarification for `directories.bin` + ([@ujane](https://github.com/ujane)) +* [`20673c7`](https://github.com/npm/npm/commit/20673c7) + Hey, Windows folks! Check out + [`nvm-windows`](https://github.com/coreybutler/nvm-windows) + ([@ArtskydJ](https://github.com/ArtskydJ)) + +#### MORE NUMBERS! MORE VALUE! + +* [`5afa2d5`](https://github.com/npm/npm/commit/5afa2d5) + `validate-npm-package-name@2.2.2`: Documented package name rules in README + ([@zeusdeux](https://github.com/zeusdeux)) +* [`021f4d9`](https://github.com/npm/npm/commit/021f4d9) + `rimraf@2.4.1`: [#74](https://github.com/isaacs/rimraf/issues/74) Use async + function for bin (to better handle Window's `EBUSY`) + ([@isaacs](https://github.com/isaacs)) +* [`5223432`](https://github.com/npm/npm/commit/5223432) + `osenv@0.1.3`: Use `os.homedir()` polyfill for more reliable output. io.js + added the function and the polyfill does a better job than the prior solution. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`8ebbc90`](https://github.com/npm/npm/commit/8ebbc90) + `npm-cache-filename@1.0.2`: Make sure different git references get different + cache folders. This should prevent `foo/bar#v1.0` and `foo/bar#master` from + sharing the same cache folder. + ([@tomekwi](https://github.com/tomekwi)) +* [`367b854`](https://github.com/npm/npm/commit/367b854) + `lru-cache@2.6.5`: Minor test/typo changes + ([@isaacs](https://github.com/isaacs)) +* [`9fcae61`](https://github.com/npm/npm/commit/9fcae61) + `glob@5.0.13`: Tiny doc change + stop firing 'match' events for ignored items. + ([@isaacs](https://github.com/isaacs)) + +#### OH AND ONE MORE THING + +* [`7827249`](https://github.com/npm/npm/commit/7827249) + `PeerDependencies` errors now include the package version. + ([@NickHeiner](https://github.com/NickHeiner)) + +### v2.12.1 (2015-06-25): + +#### HEY WHERE DID EVERYBODY GO + +I keep [hearing some commotion](https://github.com/npm/npm/releases/tag/v3.0.0). +Is there something going on? Like, a party or something? Anyway, here's a small +release with at least two significant bug fixes, at least one of which some of +you have been waiting for for quite a while. + +#### REMEMBER WHEN I SAID "REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS?"? + +`npm@2.12.0` has a change that introduces a fix for a permissions problem +whereby the `_locks` directory in the cache directory can up being owned by +root. The fix in 2.12.0 takes care of that problem, but introduces a new +problem for Windows users where npm tries to call `process.getuid()`, which +doesn't exist on Windows. It was easy enough to fix (but more or less +impossible to test, thanks to all the external dependencies involved with +permissions and platforms and whatnot), but as a result, Windows users might +want to skip `npm@2.12.0` and go straight to `npm@2.12.1`. Sorry about that! + +* [`7e5da23`](https://github.com/npm/npm/commit/7e5da238ee869201fdb9027c27b79b0f76b440a8) + When using the new, "fixed" cache directory creator, be extra-careful to not + call `process.getuid()` on platforms that lack it. + ([@othiym23](https://github.com/othiym23)) + +#### WHEW! ALL DONE FIXING GIT FOREVER! + +New npm CLI team hero [@zkat](https://github.com/zkat) has finally (FINALLY) +fixed the regression somebody (hi!) introduced a couple months ago whereby git +URLs of the format `git+ssh://user@githost.com:org/repo.git` suddenly stopped +working, and also started being saved (and cached) incorrectly. I am 100% sure +there are absolutely no more bugs in the git caching code at all ever. Mm hm. +Yep. Pretty sure. Maybe. Hmm... I hope. + +*Sighs audibly.* + +[Let us know](http://github.com/npm/npm/issues/new) if we broke something else +with this fix. + +* [`94ca4a7`](https://github.com/npm/npm/commit/94ca4a711619ba8e40ce3d20bc42b13cdb7611b7) + [#8031](https://github.com/npm/npm/issues/8031) Even though + `git+ssh://user@githost.com:org/repo.git` isn't a URL, treat it like one for + the purposes of npm. ([@zkat](https://github.com/zkat)) +* [`e7f56e5`](https://github.com/npm/npm/commit/e7f56e5a97fcf1c52d5c5bee71303b0126129815) + [#8031](https://github.com/npm/npm/issues/8031) `normalize-git-url@2.0.0`: + Handle git URLs (and URL-like remote refs) in a manner consistent with npm's + docs. ([@zkat](https://github.com/zkat)) + +#### YEP, THERE ARE STILL DEPENDENCY UPGRADES + +* [`679bf47`](https://github.com/npm/npm/commit/679bf4745ac2cfbb01c9ce273e189807fd04fa33) + [#40](http://github.com/npm/read-installed/issues/40) `read-installed@4.0.1`: + Handle prerelease versions in top-level dependencies not in `package.json` + without marking those packages as invalid. + ([@benjamn](https://github.com/benjamn)) +* [`3a67410`](https://github.com/npm/npm/commit/3a6741068c9119174c920496778aeee870ebdac0) + `tap@1.3.1` ([@isaacs](https://github.com/isaacs)) +* [`151904a`](https://github.com/npm/npm/commit/151904af39dc24567f8c98529a2a64a4dbcc960a) + `nopt@3.0.3` ([@isaacs](https://github.com/isaacs)) + +### v2.12.0 (2015-06-18): + +#### REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS? + +About [a million people](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+EACCES+_locks) +have filed issues related to having a tough time using npm after they've run +npm once or twice with sudo. "Don't worry about it!" I said. "We've fixed all +those permissions problems ages ago! Use this one weird trick and you'll never +have to deal with this again!" + +Well, uh, if you run npm with root the first time you run npm on a machine, it +turns out that the directory npm uses to store lockfiles ends up being owned by +the wrong user (almost always root), and that can, well, it can cause problems +sometimes. By which I mean every time you run npm without being root it'll barf +with `EACCES` errors. Whoops! + +This is an obnoxious regression, and to prevent it from recurring, we've made +it so that the cache, cached git remotes, and the lockfile directories are all +created and maintained using the same utilty module, which not only creates the +relevant paths with the correct permissions, but will fix the permissions on +those directories (if it can) when it notices that they're broken. An `npm +install` run as root ought to be sufficient to fix things up (and if that +doesn't work, first tell us about it, and then run `sudo chown -R $(whoami) +$HOME/.npm`) + +Also, I apologize for inadvertently gaslighting any of you by claiming this bug +wasn't actually a bug. I do think we've got this permanently dealt with now, +but I'll be paying extra-close attention to permissions issues related to the +cache for a while. + +* [`85d1a53`](https://github.com/npm/npm/commit/85d1a53d7b5e0fc04823187e522ae3711ede61fa) + Set permissions on lock directory to the owner of the process. + ([@othiym23](https://github.com/othiym23)) + +#### I WENT TO NODECONF AND ALL I GOT WAS THIS LOUSY SPDX T-SHIRT + +That's not literally true. We spent very little time discussing SPDX, +[@kemitchell](https://github.com/kemitchell) is a champ, and I had a lot of fun +playing drum & bass to a mostly empty Boogie Barn and only ended up with one +moderately severe cold for my pains. Another winner of a NodeConf! (I would +probably wear a SPDX T-shirt if somebody gave me one, though.) + +A bunch of us did have a spirited discussion of the basics of open-source +intellectual property, and the convergence of me, +[@kemitchell](https://github.com/kemitchell), and +[@jandrieu](https://github.com/jandrieu) in one place allowed us to hammmer out +a small but significant issue that had been bedeviling early adopters of the +new SPDX expression syntax in `package.json` license fields: how to deal with +packages that are left without a license on purpose. + +Refer to [the docs](https://github.com/npm/npm/blob/16a3dd545b10f8a2464e2037506ce39124739b41/doc/files/package.json.md#license) +for the specifics, but the short version is that instead of using +`LicenseRef-LICENSE` for proprietary licenses, you can now use either +`UNLICENSED` if you want to make it clear that you don't _want_ your software +to be licensed (and want npm to stop warning you about this), or `SEE LICENSE +IN <filename>` if there's a license with custom text you want to use. At some +point in the near term, we'll be updating npm to verify that the mentioned +file actually exists, but for now you're all on the honor system. + +* [`4827fc7`](https://github.com/npm/npm/commit/4827fc784117c17f35dd9b51b21d1eff6094f661) + [#8557](https://github.com/npm/npm/issues/8557) + `normalize-package-data@2.2.1`: Allow `UNLICENSED` and `SEE LICENSE IN + <filename>` in "license" field of `package.json`. + ([@kemitchell](https://github.com/kemitchell)) +* [`16a3dd5`](https://github.com/npm/npm/commit/16a3dd545b10f8a2464e2037506ce39124739b41) + [#8557](https://github.com/npm/npm/issues/8557) Document the new accepted + values for the "license" field. + ([@kemitchell](https://github.com/kemitchell)) +* [`8155311`](https://github.com/npm/npm/commit/81553119350deaf199e79e38e35b52a5c8ad206c) + [#8557](https://github.com/npm/npm/issues/8557) `init-package-json@1.7.0`: + Support new "license" field values at init time. + ([@kemitchell](https://github.com/kemitchell)) + +#### SMALLISH BUG FIXES + +* [`9d8cac9`](https://github.com/npm/npm/commit/9d8cac94a258db648a2b1069b1c8c6529c79d013) + [#8548](https://github.com/npm/npm/issues/8548) Remove extraneous newline + from `npm view` output, making it easier to use in shell scripts. + ([@eush77](https://github.com/eush77)) +* [`765fd4b`](https://github.com/npm/npm/commit/765fd4bfca8ea3e2a4a399765b17eec40a3d893d) + [#8521](https://github.com/npm/npm/issues/8521) When checking for outdated + packages, or updating packages, raise an error when the registry is + unreachable instead of silently "succeeding". + ([@ryantemple](https://github.com/ryantemple)) + +#### SMALLERISH DOCUMENTATION TWEAKS + +* [`5018335`](https://github.com/npm/npm/commit/5018335ce1754a9f771954ecbc1a93acde9b8c0a) + [#8365](https://github.com/npm/npm/issues/8365) Add details about which git + environment variables are whitelisted by npm. + ([@nmalaguti](https://github.com/nmalaguti)) +* [`bed9edd`](https://github.com/npm/npm/commit/bed9edddfdcc6d22a80feab33b53e4ef9172ec72) + [#8554](https://github.com/npm/npm/issues/8554) Fix typo in version docs. + ([@rainyday](https://github.com/rainyday)) + +#### WELL, I GUESS THERE ARE MORE DEPENDENCY UPGRADES + +* [`7ce2f06`](https://github.com/npm/npm/commit/7ce2f06f6f34d469b1d2e248084d4f3fef10c05e) + `request@2.58.0`: Refactor tunneling logic, and use `extend` instead of + abusing `util._extend`. ([@simov](https://github.com/simov)) +* [`e6c6195`](https://github.com/npm/npm/commit/e6c61954aad42e20eec49745615c7640b2026a6c) + `nock@2.6.0`: Refined interception behavior. + ([@pgte](https://github.com/pgte)) +* [`9583cc3`](https://github.com/npm/npm/commit/9583cc3cb192c2fced006927cfba7cd37b588605) + `fstream-npm@1.0.3`: Ensure that `main` entry in `package.json` is always + included in the bundled package tarball. + ([@coderhaoxin](https://github.com/coderhaoxin)) +* [`df89493`](https://github.com/npm/npm/commit/df894930f2716adac28740b29b2e863170919990) + `fstream@1.0.7` ([@isaacs](https://github.com/isaacs)) +* [`9744049`](https://github.com/npm/npm/commit/974404934758124aa8ae5b54f7d5257c3bd6b588) + `dezalgo@1.0.3`: `dezalgo` should be usable in the browser, and can be now + that `asap` has been upgraded to be browserifiable. + ([@mvayngrib](https://github.com/mvayngrib)) + +### v2.11.3 (2015-06-11): + +This was a very quiet week. This release was done by +[@iarna](https://github.com/iarna), while the rest of the team hangs out at +NodeConf Adventure! + +#### TESTS IN 0.8 FAIL LESS + +* [`5b3b3c2`](https://github.com/npm/npm/commit/5b3b3c2) + [#8491](//github.com/npm/npm/pull/8491) + Updates a test to use only 0.8 compatible features + ([@watilde](https://github.com/watilde)) + +#### THE TREADMILL OF UPDATES NEVER CEASES + +* [`9f439da`](https://github.com/npm/npm/commit/9f439da) + `spdx@0.4.1`: License range updates + ([@kemitchell](https://github.com/kemitchell)) +* [`2dd055b`](https://github.com/npm/npm/commit/2dd055b) + `normalize-package-data@2.2.1`: Fixes a crashing bug when the package.json + `scripts` property is not an object. + ([@iarna](https://github.com/iarna)) +* [`e02e85d`](https://github.com/npm/npm/commit/e02e85d) + `osenv@0.1.2`: Switches to using the `os-tmpdir` module instead of + `os.tmpdir()` for greate consistency in behavior between node versions. + ([@iarna](https://github.com/iarna)) +* [`a6f0265`](https://github.com/npm/npm/commit/a6f0265) + `ini@1.3.4` ([@isaacs](https://github.com/isaacs)) +* [`7395977`](https://github.com/npm/npm/commit/7395977) + `rimraf@2.4.0` ([@isaacs](https://github.com/isaacs)) + +### v2.11.2 (2015-06-04): + +Another small release this week, brought to you by the latest addition to the +CLI team, [@zkat](https://github.com/zkat) (Hi, all!) + +Mostly small documentation tweaks and version updates. Oh! And `npm outdated` +is actually sorted now. Rejoice! + +It's gonna be a while before we get another palindromic version number. Enjoy it +while it lasts. :3 + +#### QUALITY OF LIFE HAS NEVER BEEN BETTER + +* [`31aada4`](https://github.com/npm/npm/commit/31aada4ccc369c0903ff7f233f464955d12c6fe2) + [#8401](https://github.com/npm/npm/issues/8401) `npm outdated` output is just + that much nicer to consume now, due to sorting by name. + ([@watilde](https://github.com/watilde)) +* [`458a919`](https://github.com/npm/npm/commit/458a91925d8b20c5e672ba71a86745aad654abaf) + [#8469](https://github.com/npm/npm/pull/8469) Explicitly set `cwd` for + `preversion`, `version`, and `postversion` scripts. This makes the scripts + findable relative to the root dir. + ([@alexkwolfe](https://github.com/alexkwolfe)) +* [`55d6d71`](https://github.com/npm/npm/commit/55d6d71562e979e745c9db88861cc39f99b9f3ec) + Ensure package name and version are included in display during `npm version` + lifecycle execution. Gets rid of those little `undefined`s in the console. + ([@othiym23](https://github.com/othiym23)) + +#### WORDS HAVE NEVER BEEN QUITE THIS READABLE + +* [`3901e49`](https://github.com/npm/npm/commit/3901e4974c800e7f9fba4a5b2ff88da1126d5ef8) + [#8462](https://github.com/npm/npm/pull/8462) English apparently requires + correspondence between indefinite articles and attached nouns. + ([@Enet4](https://github.com/Enet4)) +* [`5a744e4`](https://github.com/npm/npm/commit/5a744e4b143ef7b2f50c80a1d96fdae4204d452b) + [#8421](https://github.com/npm/npm/pull/8421) The effect of `npm prune`'s + `--production` flag and how to use it have been documented a bit better. + ([@foiseworth](https://github.com/foiseworth)) +* [`eada625`](https://github.com/npm/npm/commit/eada625993485f0a2c5324b06f02bfa0a95ce4bc) + We've updated our `.mailmap` and `AUTHORS` files to make sure credit is given + where credit is due. ([@othiym23](https://github.com/othiym23)) + +#### VERSION NUMBERS HAVE NEVER BEEN BIGGER + +* [`c929fd1`](https://github.com/npm/npm/commit/c929fd1d0604b5878ed05706447e078d3e41f5b3) + `readable-stream@1.1.13`: Manually deduped `v1.1.13` (streams3) to make + deduping more reliable on `npm@<3`. ([@othiym23](https://github.com/othiym23)) +* [`a9b4b78`](https://github.com/npm/npm/commit/a9b4b78dcc85571fd1cdd737903f7f37a5e6a755) + `request@2.57.0`: Replace dependency on IncomingMessage's `.client` with + `.socket` as the former was deprecated in io.js 2.2.0. + ([@othiym23](https://github.com/othiym23)) +* [`4b5e557`](https://github.com/npm/npm/commit/4b5e557a23cdefd521ad154111e3d4dcc81f1cdb) + `abbrev@1.0.7`: Better testing, with coverage. + ([@othiym23](https://github.com/othiym23)) +* [`561affe`](https://github.com/npm/npm/commit/561affee21df9bbea5a47298f2452f533be8f359) + `semver@4.3.6`: .npmignore added for less cruft, and better testing, with coverage. + ([@othiym23](https://github.com/othiym23)) +* [`60aef3c`](https://github.com/npm/npm/commit/60aef3cf5d84d757752db3eb8ede2cb385469e7b) + `graceful-fs@3.0.8`: io.js fixes. + ([@zkat](https://github.com/zkat)) +* [`f8bd453`](https://github.com/npm/npm/commit/f8bd453b1a1c46ba7666cb166595e8a011eae443) + `config-chain@1.1.9`: Added MIT license to package.json + ([@zkat](https://github.com/zkat)) + +### v2.11.1 (2015-05-28): + +This release brought to you from poolside at the Omni Amelia Island Resort and +JSConf 2015, which is why it's so tiny. + +#### CONFERENCE WIFI CAN'T STOP THESE BUG FIXES + +* [`cf109a6`](https://github.com/npm/npm/commit/cf109a682f38a059a994da953d5c1b4aaece5e2f) + [#8381](https://github.com/npm/npm/issues/8381) Documented a subtle gotcha + with `.npmrc`, which is that it needs to have its permissions set such that + only the owner can read or write the file. + ([@colakong](https://github.com/colakong)) +* [`180da67`](https://github.com/npm/npm/commit/180da67c9fa53103d625e2f031626c2453c7ebcd) + [#8365](https://github.com/npm/npm/issues/8365) Git 2.3 adds support for + `GIT_SSH_COMMAND`, which allows you to pass an explicit git command (with, + for example, a specific identity passed in on the command line). + ([@nmalaguti](https://github.com/nmalaguti)) + +#### MY (VIRGIN) PINA COLADA IS GETTING LOW, BETTER UPGRADE THESE DEPENDENCIES + +* [`b72de41`](https://github.com/npm/npm/commit/b72de41c5cc9f0c46d3fa8f062c75bd273641474) + `node-gyp@2.0.0`: Use a newer version of `gyp`, and generally improve support + for Visual Studios and Windows. + ([@TooTallNate](https://github.com/TooTallNate)) +* [`8edbe21`](https://github.com/npm/npm/commit/8edbe210af41e8f248f5bb92c72de92f54fda3b1) + `node-gyp@2.0.1`: Don't crash when Python's version doesn't parse as valid + semver. ([@TooTallNate](https://github.com/TooTallNate)) +* [`ba0e0a8`](https://github.com/npm/npm/commit/ba0e0a845a4f29717aba566b416a27d1a22f5d08) + `glob@5.0.10`: Add coverage to tests. ([@isaacs](https://github.com/isaacs)) +* [`7333701`](https://github.com/npm/npm/commit/7333701b5d4f01673f37d64992c63c4e15864d6d) + `request@2.56.0`: Bug fixes and dependency upgrades. + ([@simov](https://github.com/simov)) + +### v2.11.0 (2015-05-21): + +For the first time in a very long time, we've added new events to the life +cycle used by `npm run-script`. Since running `npm version (major|minor|patch)` +is typically the last thing many developers do before publishing their updated +packages, it makes sense to add life cycle hooks to run tests or otherwise +preflight the package before doing a full publish. Thanks, as always, to the +indefatigable [@watilde](https://github.com/watilde) for yet another great +usability improvement for npm! + +#### FEATURELETS + +* [`b07f7c7`](https://github.com/npm/npm/commit/b07f7c7c1e5021730b3c320f1b3a46e70f8a21ff) + [#7906](https://github.com/npm/npm/issues/7906) + Add new [`scripts`](https://github.com/npm/npm/blob/master/doc/misc/npm-scripts.md) to + allow you to run scripts before and after + the [`npm version`](https://github.com/npm/npm/blob/master/doc/cli/npm-version.md) + command has run. This makes it easy to, for instance, require that your + test suite passes before bumping the version by just adding `"preversion": + "npm test"` to the scripts section of your `package.json`. + ([@watilde](https://github.com/watilde)) +* [`8a46136`](https://github.com/npm/npm/commit/8a46136f42e416cbadb533bcf89d73d681ed421d) + [#8185](https://github.com/npm/npm/issues/8185) + When we get a "not found" error from the registry, we'll now check to see + if the package name you specified is invalid and if so, give you a better + error message. ([@thefourtheye](https://github.com/thefourtheye)) + +#### BUG FIXES + +* [`9bcf573`](https://github.com/npm/npm/commit/9bcf5730bd0316f210dafea898afe9103849cea9) + [#8324](https://github.com/npm/npm/pull/8324) On Windows, when you've configured a + custom `node-gyp`, run it with node itself instead of using the default open action (which + is almost never what you want). ([@bangbang93](https://github.com/bangbang93)) +* [`1da9b04`](https://github.com/npm/npm/commit/1da9b0411d3416c7fca17d08cbbcfca7ae86e92d) + [#7195](https://github.com/npm/npm/issues/7195) + [#7260](https://github.com/npm/npm/issues/7260) `npm-registry-client@6.4.0`: + (Re-)allow publication of existing mixed-case packages (part 1). + ([@smikes](https://github.com/smikes)) +* [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) + [#7195](https://github.com/npm/npm/issues/7195) + [#7260](https://github.com/npm/npm/issues/7260) + `normalize-package-data@2.2.0`: (Re-)allow publication of existing mixed-case + packages (part 2). ([@smikes](https://github.com/smikes)) + +#### DOCUMENTATION IMPROVEMENTS + +* [`f62ee05`](https://github.com/npm/npm/commit/f62ee05333b141539a8e851c620dd2e82ff06860) + [#8314](https://github.com/npm/npm/issues/8314) Update the README to warn + folks away from using the CLI's internal API. For the love of glob, just use a + child process to run the CLI! ([@claycarpenter](https://github.com/claycarpenter)) +* [`1093921`](https://github.com/npm/npm/commit/1093921c04db41ab46db24a170a634a4b2acd8d9) + [#8279](https://github.com/npm/npm/pull/8279) + Update the documentation to note that, yes, you can publish scoped packages to the + public registry now! ([@mantoni](https://github.com/mantoni)) +* [`f87cde5`](https://github.com/npm/npm/commit/f87cde5234a760d3e515ffdaacaed6f5b71dbf44) + [#8292](https://github.com/npm/npm/pull/8292) + Fix typo in an example and grammar in the description in + the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). + ([@vshih](https://github.com/vshih)) +* [`d3526ce`](https://github.com/npm/npm/commit/d3526ceb09a0c29fdb7d4124536ae09057d033e7) + Improve the formatting in + the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). + ([@othiym23](https://github.com/othiym23)) +* [`19fe6d2`](https://github.com/npm/npm/commit/19fe6d20883e28956ff916fe4dae42d73ee6195b) + [#8311](https://github.com/npm/npm/pull/8311) + Update [README.md](https://github.com/npm/npm#readme) to use syntax highlighting in + its code samples and bits of shell scripts. ([@SimenB](https://github.com/SimenB)) + +#### DEPENDENCY UPDATES! ALWAYS AND FOREVER! + +* [`fc52160`](https://github.com/npm/npm/commit/fc52160d0223226fffe4166f42fdfd3b899b3c1e) + [#4700](https://github.com/npm/npm/issues/4700) [#5044](https://github.com/npm/npm/issues/5044) + `init-package-json@1.6.0`: Make entering an invalid version while running `npm init` give + you an immediate error and prompt you to correct it. ([@watilde](https://github.com/watilde)) +* [`738853e`](https://github.com/npm/npm/commit/738853eb1f55636476a2a410c2c04732eec9d51e) + [#7763](https://github.com/npm/npm/issues/7763) `fs-write-stream-atomic@1.0.3`: Fix a bug + where errors would not propagate, making error messages unhelpful. + ([@iarna](https://github.com/iarna)) +* [`6d74a2d`](https://github.com/npm/npm/commit/6d74a2d2ac7f92750cf6a2cfafae1af23b569098) + `npm-package-arg@4.0.1`: Fix tests on windows ([@Bacra](https://github.com)) and with + more recent `hosted-git-info`. ([@iarna](https://github.com/iarna)) +* [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) + `hosted-git-info@2.1.4`: Correct spelling in its documentation. + ([@iarna](https://github.com/iarna)) +* [`d7956ca`](https://github.com/npm/npm/commit/d7956ca17c057d5383ff0d3fc5cf6ac2940b034d) + `glob@5.0.7`: Fix a bug where unusual error conditions could make + further use of the module fail. ([@isaacs](https://github.com/isaacs)) +* [`44f7d74`](https://github.com/npm/npm/commit/44f7d74c5d3181d37da7ea7949c86b344153f8d9) + `tap@1.1.0`: Update to the most recent tap to get a whole host of bug + fixes and integration with [coveralls](https://coveralls.io/). + ([@isaacs](https://github.com/isaacs)) +* [`c21e8a8`](https://github.com/npm/npm/commit/c21e8a8d94bcf0ad79dc583ddc53f8366d4813b3) + `nock@2.2.0` ([@othiym23](https://github.com/othiym23)) + +#### LICENSE FILES FOR THE LICENSE GOD + +* Add missing ISC license file to package ([@kasicka](https://github.com/kasicka)): + * [`aa9908c`](https://github.com/npm/npm/commit/aa9908c20017729673b9d410b77f9a16b7aae8a4) `realize-package-specifier@3.0.1` + * [`23a3b1a`](https://github.com/npm/npm/commit/23a3b1a726b9176c70ce0ccf3cd9d25c54429bdf) `fs-vacuum@1.2.6` + * [`8e04bba`](https://github.com/npm/npm/commit/8e04bba830d4353d84751d21803cd127c96153a7) `dezalgo@1.0.2` + * [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) `hosted-git-info@2.1.4` + * [`6a54917`](https://github.com/npm/npm/commit/6a54917fbd4df995495a95d4b548defd44b77c93) `write-file-atomic@1.1.2` + * [`971f92c`](https://github.com/npm/npm/commit/971f92c4a4e5514217d1e4db45d1ccf71a60ff19) `async-some@1.0.2` + * [`67b50b7`](https://github.com/npm/npm/commit/67b50b7667a42bb3340a660eb2e617e1a554d2d4) `normalize-git-url@1.0.1` + +#### SPDX LICENSE UPDATES + +* Switch license to + [BSD-2-Clause](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) from + plain "BSD" ([@isaacs](https://github.com/isaacs)): + * [`efdb733`](https://github.com/npm/npm/commit/efdb73332eeedcad4c609796929070b62abb37ab) `npm-user-validate@0.1.2` + * [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) `normalize-package-data@2.2.0` +* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from + [BSD](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) + ([@isaacs](https://github.com/isaacs)): + * [`c300956`](https://github.com/npm/npm/commit/c3009565a964f0ead4ac4ab234b1a458e2365f17) `block-stream@0.0.8` + * [`1de1253`](https://github.com/npm/npm/commit/1de125355765fecd31e682ed0ff9d2edbeac0bb0) `lockfile@1.0.1` + * [`0d5698a`](https://github.com/npm/npm/commit/0d5698ab132e376c7aec93ae357c274932116220) `osenv@0.1.1` + * [`2e84921`](https://github.com/npm/npm/commit/2e84921474e1ffb18de9fce4616e73171fa8046d) `abbrev@1.0.6` + * [`872fac9`](https://github.com/npm/npm/commit/872fac9d10c11607e4d0348c08a683b84e64d30b) `chmodr@0.1.1` + * [`01eb7f6`](https://github.com/npm/npm/commit/01eb7f60acba584346ad8aae846657899f3b6887) `chownr@0.0.2` + * [`294336f`](https://github.com/npm/npm/commit/294336f0f31c7b9fe31a50075ed750db6db134d1) `read@1.0.6` + * [`ebdf6a1`](https://github.com/npm/npm/commit/ebdf6a14d17962cdb7128402c53b452f91d44ca7) `graceful-fs@3.0.7` +* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from + [MIT](http://spdx.org/licenses/MIT.html#licenseText) + ([@isaacs](https://github.com/isaacs)): + * [`e5d237f`](https://github.com/npm/npm/commit/e5d237fc0f436dd2a89437ebf8a9632a2e35ccbe) `nopt@3.0.2` + * [`79fef14`](https://github.com/npm/npm/commit/79fef1421b78f044980f0d1bf0e97039b6992710) `rimraf@2.3.4` + * [`22527da`](https://github.com/npm/npm/commit/22527da4816e7c2746cdc0317c5fb4a85152d554) `minimatch@2.0.8` + * [`882ac87`](https://github.com/npm/npm/commit/882ac87a6c4123ca985d7ad4394ea5085e5b0ef5) `lru-cache@2.6.4` + * [`9d9d015`](https://github.com/npm/npm/commit/9d9d015a2e972f68664dda54fbb204db28b21ede) `npmlog@1.2.1` + +### v2.10.1 (2015-05-14): + +#### BUG FIXES & DOCUMENTATION TWEAKS + +* [`dc77520`](https://github.com/npm/npm/commit/dc7752013ffce13a3d3f13e518a0052c22fc1158) + When getting back a 404 from a request to a private registry that uses a + registry path that extends past the root + (`http://registry.enterprise.co/path/to/registry`), display the name of the + nonexistent package, rather than the first element in the registry API path. + Sorry, Artifactory users! ([@hayes](https://github.com/hayes)) +* [`f70dea9`](https://github.com/npm/npm/commit/f70dea9b4766f6eaa55012c3e8087e9cb04fd4ce) + Make clearer that `--registry` can be used on a per-publish basis to push a + package to a non-default registry. ([@mischkl](https://github.com/mischkl)) +* [`a3e26f5`](https://github.com/npm/npm/commit/a3e26f5b4465991a941a325468ab7725670d2a94) + Did you know that GitHub shortcuts can have commit-ishes included + (`org/repo#branch`)? They can! ([@iarna](https://github.com/iarna)) +* [`0e2c091`](https://github.com/npm/npm/commit/0e2c091a539b61fdc60423b6bbaaf30c24e4b1b8) + Some errors from `readPackage` were being swallowed, potentially leading to + invalid package trees on disk. ([@smikes](https://github.com/smikes)) + +#### DEPENDENCY UPDATES! STILL! MORE! AGAIN! + +* [`0b901ad`](https://github.com/npm/npm/commit/0b901ad0811d84dda6ca0755a9adc8d47825edd0) + `lru-cache@2.6.3`: Removed some cruft from the published package. + ([@isaacs](https://github.com/isaacs)) +* [`d713e0b`](https://github.com/npm/npm/commit/d713e0b14930c563e3fdb6ac6323bae2a8924652) + `mkdirp@0.5.1`: Made compliant with `standard`, dropped support for Node 0.6, + added (Travis) support for Node 0.12 and io.js. + ([@isaacs](https://github.com/isaacs)) +* [`a2d6578`](https://github.com/npm/npm/commit/a2d6578b6554c5c9d48fe2006751759f4da57520) + `glob@1.0.3`: Updated to use `tap@1`. ([@isaacs](https://github.com/isaacs)) +* [`64cd1a5`](https://github.com/npm/npm/commit/64cd1a570aaa5f24ccba190948ec9456297c97f5) + `fstream@ 1.0.6`: Made compliant with [`standard`](http://npm.im/standard) + (done by [@othiym23](https://github.com/othiym23), and then debugged and + fixed by [@iarna](https://github.com/iarna)), and license changed to ISC. + ([@othiym23](https://github.com/othiym23) / + [@iarna](https://github.com/iarna)) +* [`b527a7c`](https://github.com/npm/npm/commit/b527a7c2ba3c4002f443dd2c536ff4ff41a38b86) + `which@1.1.1`: Callers can pass in their own `PATH` instead of relying on + `process.env`. ([@isaacs](https://github.com/isaacs)) + +### v2.10.0 (2015-05-8): + +#### THE IMPLICATIONS ARE MORE PROFOUND THAN THEY APPEAR + +If you've done much development in The Enterprise®™, you know that keeping +track of software licenses is far more important than one might expect / hope / +fear. Tracking licenses is a hassle, and while many (if not most) of us have +(reluctantly) gotten around to setting a license to use by default with all our +new projects (even if it's just WTFPL), that's about as far as most of us think +about it. In big enterprise shops, ensuring that projects don't inadvertently +use software with unacceptably encumbered licenses is serious business, and +developers spend a surprising (and appalling) amount of time ensuring that +licensing is covered by writing automated checkers and other license auditing +tools. + +The Linux Foundation has been working on a machine-parseable syntax for license +expressions in the form of [SPDX](https://spdx.org/), an appropriately +enterprisey acronym. IP attorney and JavaScript culture hero [Kyle +Mitchell](http://kemitchell.com/) has put a considerable amount of effort into +bringing SPDX to JavaScript and Node. He's written +[`spdx.js`](https://github.com/kemitchell/spdx.js), a JavaScript SPDX +expression parser, and has integrated it into npm in a few different ways. + +For you as a user of npm, this means: + +* npm now has proper support for dual licensing in `package.json`, due to + SPDX's compound expression syntax. Run `npm help package.json` for details. +* npm will warn you if the `package.json` for your project is either missing a + `"license"` field, or if the value of that field isn't a valid SPDX + expression (pro tip: `"BSD"` becomes `"BSD-2-Clause"` in SPDX (unless you + really want one of its variants); `"MIT"` and `"ISC"` are fine as-is; the + [full list](https://github.com/shinnn/spdx-license-ids/blob/master/spdx-license-ids.json) + is its own package). +* `npm init` now demands that you use a valid SPDX expression when using it + interactively (pro tip: I mostly use `npm init -y`, having previously run + `npm config set init.license=MIT` / `npm config set init.author.email=foo` / + `npm config set init.author.name=me`). +* The documentation for `package.json` has been updated to tell you how to use + the `"license"` field properly with SPDX. + +In general, this shouldn't be a big deal for anybody other than people trying +to run their own automated license validators, but in the long run, if +everybody switches to this format, many people's lives will be made much +simpler. I think this is an important improvement for npm and am very thankful +to Kyle for taking the lead on this. Also, even if you think all of this is +completely stupid, just [choose a license](http://en.wikipedia.org/wiki/License-free_software) +anyway. Future you will thank past you someday, unless you are +[djb](http://cr.yp.to/), in which case you are djb, and more power to you. + +* [`8669f7d`](https://github.com/npm/npm/commit/8669f7d88c472ccdd60e140106ac43cca636a648) + [#8179](https://github.com/npm/npm/issues/8179) Document how to use SPDX in + `license` stanzas in `package.json`, including how to migrate from old busted + license declaration arrays to fancy new compound-license clauses. + ([@kemitchell](https://github.com/kemitchell)) +* [`98ad98c`](https://github.com/npm/npm/commit/98ad98cb11f3d3ba29a488ef1ab050b066d9c7f6) + [#8197](https://github.com/npm/npm/issues/8197) `init-package-json@1.5.0` + Ensure that packages bootstrapped with `npm init` use an SPDX-compliant + license expression. ([@kemitchell](https://github.com/kemitchell)) +* [`2ad3905`](https://github.com/npm/npm/commit/2ad3905e9139b0be2b22accf707b814469de813e) + [#8197](https://github.com/npm/npm/issues/8197) + `normalize-package-data@2.1.0`: Warn when a package is missing a license + declaration, or using a license expression that isn't valid SPDX. + ([@kemitchell](https://github.com/kemitchell)) +* [`127bb73`](https://github.com/npm/npm/commit/127bb73ccccc59a1267851c702d8ebd3f3a97e81) + [#8197](https://github.com/npm/npm/issues/8197) `tar@2.1.1`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`e9a933a`](https://github.com/npm/npm/commit/e9a933a9148180d9d799f99f4154f5110ff2cace) + [#8197](https://github.com/npm/npm/issues/8197) `once@1.3.2`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) +* [`412401f`](https://github.com/npm/npm/commit/412401fb6a19b18f3e02d97a24d4dafed650c186) + [#8197](https://github.com/npm/npm/issues/8197) `semver@4.3.4`: Switch from + `BSD` to `ISC` for license, where the latter is valid SPDX. + ([@othiym23](https://github.com/othiym23)) + +As a corollary to the previous changes, I've put some work into making `npm +install` spew out fewer pointless warnings about missing values in transitive +dependencies. From now on, npm will only warn you about missing READMEs, +license fields, and the like for top-level projects (including packages you +directly install into your application, but we may relax that eventually). + +Practically _nobody_ liked having those warnings displayed for child +dependencies, for the simple reason that there was very little that anybody +could _do_ about those warnings, unless they happened to be the maintainers of +those dependencies themselves. Since many, many projects don't have +SPDX-compliant licenses, the number of warnings reached a level where they ran +the risk of turning into a block of visual noise that developers (read: me, and +probably you) would ignore forever. + +So I fixed it. If you still want to see the messages about child dependencies, +they're still there, but have been pushed down a logging level to `info`. You +can display them by running `npm install -d` or `npm install --loglevel=info`. + +* [`eb18245`](https://github.com/npm/npm/commit/eb18245f55fb4cd62a36867744bcd1b7be0a33e2) + Only warn on normalization errors for top-level dependencies. Transitive + dependency validation warnings are logged at `info` level. + ([@othiym23](https://github.com/othiym23)) + +#### BUG FIXES + +* [`e40e809`](https://github.com/npm/npm/commit/e40e8095d2bc9fa4eb8f01aa22067e0068fa8a54) + `tap@1.0.1`: TAP: The Next Generation. Fix up many tests to they work + properly with the new major version of `node-tap`. Look at all the colors! + ([@isaacs](https://github.com/isaacs)) +* [`f9314e9`](https://github.com/npm/npm/commit/f9314e97d26532c0ef2b03e98f3ed300b7cd5026) + `nock@1.9.0`: Minor tweaks and bug fixes. ([@pgte](https://github.com/pgte)) +* [`45c2b1a`](https://github.com/npm/npm/commit/45c2b1aaa051733fa352074994ae6e569fd51e8b) + [#8187](https://github.com/npm/npm/issues/8187) `npm ls` wasn't properly + recognizing dependencies installed from GitHub repositories as git + dependencies, and so wasn't displaying them as such. + ([@zornme](https://github.com/zornme)) +* [`1ab57c3`](https://github.com/npm/npm/commit/1ab57c38116c0403965c92bf60121f0f251433e4) + In some cases, `npm help` was using something that looked like a regular + expression where a glob pattern should be used, and vice versa. + ([@isaacs](https://github.com/isaacs)) + +### v2.9.1 (2015-04-30): + +#### WOW! MORE GIT FIXES! YOU LOVE THOSE! + +The first item below is actually a pretty big deal, as it fixes (with a +one-word change and a much, much longer test case (thanks again, +[@iarna](https://github.com/iarna))) a regression that's been around for months +now. If you're depending on multiple branches of a single git dependency in a +single project, you probably want to check out `npm@2.9.1` and verify that +things (again?) work correctly in your project. + +* [`178a6ad`](https://github.com/npm/npm/commit/178a6ad540215820d16217465a5f220d8c95a313) + [#7202](https://github.com/npm/npm/issues/7202) When caching git + dependencies, do so by the whole URL, including the branch name, so that if a + single application depends on multiple branches from the same repository (in + practice, multiple version tags), every install is of the correct version, + instead of reusing whichever branch the caching process happened to check out + first. ([@iarna](https://github.com/iarna)) +* [`63b79cc`](https://github.com/npm/npm/commit/63b79ccde092a9cb3b1f34abe43e1d2ba69c0dbf) + [#8084](https://github.com/npm/npm/issues/8084) Ensure that Bitbucket, + GitHub, and Gitlab dependencies are installed the same way as non-hosted git + dependencies, fixing `npm install --link`. + ([@laiso](https://github.com/laiso)) + +#### DOCUMENTATION FIXES AND TWEAKS + +These changes may seem simple and small (except Lin's fix to the package name +restrictions, which was more an egregious oversight on our part), but cleaner +documentation makes npm significantly more pleasant to use. I really appreciate +all the typo fixes, clarifications, and formatting tweaks people send us, and +am delighted that we get so many of these pull requests. Thanks, everybody! + +* [`ca478dc`](https://github.com/npm/npm/commit/ca478dcaa29b8f07cd6fe515a3c4518166819291) + [#8137](https://github.com/npm/npm/issues/8137) Somehow, we had failed to + clearly document the full restrictions on package names. + [@linclark](https://github.com/linclark) has now fixed that, although we will + take with us to our graves the reasons why the maximum package name length is 214 + characters (well, OK, it was that that was the longest name in the registry + when we decided to put a cap on the name length). + ([@linclark](https://github.com/linclark)) +* [`b574076`](https://github.com/npm/npm/commit/b5740767c320c1eff3576a8d63952534a0fbb936) + [#8079](https://github.com/npm/npm/issues/8079) Make the `npm shrinkwrap` + documentation use code formatting for examples consistently. It would be + great to do this for more commands HINT HINT. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`1ff636e`](https://github.com/npm/npm/commit/1ff636e2db3852a53e38c866fed7eafdacd307fc) + [#8105](https://github.com/npm/npm/issues/8105) Document that the global + `npmrc` goes in `$PREFIX/etc/npmrc`, instead of `$PREFIX/npmrc`. + ([@anttti](https://github.com/anttti)) +* [`c3f2f7c`](https://github.com/npm/npm/commit/c3f2f7c299342e1c1eccc55a976a63c607f51621) + [#8127](https://github.com/npm/npm/issues/8127) Document how to use `npm run + build` directly (hint: it's different from `npm build`!). + ([@mikemaccana](https://github.com/mikemaccana)) +* [`873e467`](https://github.com/npm/npm/commit/873e46757e1986761b15353f94580a071adcb383) + [#8069](https://github.com/npm/npm/issues/8069) Take the old, dead npm + mailing list address out of `package.json`. It seems that people don't have + much trouble figuring out how to report errors to npm. + ([@robertkowalski](https://github.com/robertkowalski)) + +#### ENROBUSTIFICATIONMENT + +* [`5abfc9c`](https://github.com/npm/npm/commit/5abfc9c9017da714e47a3aece750836b4f9af6a9) + [#7973](https://github.com/npm/npm/issues/7973) `npm run-script` completion + will only suggest run scripts, instead of including dependencies. If for some + reason you still wanted it to suggest dependencies, let us know. + ([@mantoni](https://github.com/mantoni)) +* [`4b564f0`](https://github.com/npm/npm/commit/4b564f0ce979dc74c09604f4d46fd25a2ee63804) + [#8081](https://github.com/npm/npm/issues/8081) Use `osenv` to parse the + environment's `PATH` in a platform-neutral way. + ([@watilde](https://github.com/watilde)) +* [`a4b6238`](https://github.com/npm/npm/commit/a4b62387b41848818973eeed056fd5c6570274f3) + [#8094](https://github.com/npm/npm/issues/8094) When we refactored the + configuration code to split out checking for IPv4 local addresses, we + inadvertently completely broke it by failing to return the values. In + addition, just the call to `os.getInterfaces()` could throw on systems where + querying the network configuration requires elevated privileges (e.g. Amazon + Lambda). Add the return, and trap errors so they don't cause npm to explode. + Thanks to [@mhart](https://github.com/mhart) for bringing this to our + attention! ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES WAIT FOR NO SOPHONT + +* [`000cd8b`](https://github.com/npm/npm/commit/000cd8b52104942ac3404f0ad0651d82f573da37) + `rimraf@2.3.3`: More informative assertions on argument validation failure. + ([@isaacs](https://github.com/isaacs)) +* [`530a2e3`](https://github.com/npm/npm/commit/530a2e369128270f3e098f0e9be061533003b0eb) + `lru-cache@2.6.2`: Revert to old key access-time behavior, as it was correct + all along. ([@isaacs](https://github.com/isaacs)) +* [`d88958c`](https://github.com/npm/npm/commit/d88958ca02ce81b027b9919aec539d0145875a59) + `minimatch@2.0.7`: Feature detection and test improvements. + ([@isaacs](https://github.com/isaacs)) +* [`3fa39e4`](https://github.com/npm/npm/commit/3fa39e4d492609d5d045033896dcd99f7b875329) + `nock@1.7.1` ([@pgte](https://github.com/pgte)) + +### v2.9.0 (2015-04-23): + +This week was kind of a breather to concentrate on fixing up the tests on the +`multi-stage` branch, and not mess with git issues for a little while. +Unfortunately, There are now enough severe git issues that we'll probably have +to spend another couple weeks tackling them. In the meantime, enjoy these two +small features. They're just enough to qualify for a semver-minor bump: + +#### NANOFEATURES + +* [`2799322`](https://github.com/npm/npm/commit/279932298ce5b589c5eea9439ac40b88b99c6a4a) + [#7426](https://github.com/npm/npm/issues/7426) Include local modules in `npm + outdated` and `npm update`. ([@ArnaudRinquin](https://github.com/ArnaudRinquin)) +* [`2114862`](https://github.com/npm/npm/commit/21148620fa03a582f4ec436bb16bd472664f2737) + [#8014](https://github.com/npm/npm/issues/8014) The prefix used before the + version on version tags is now configurable via `tag-version-prefix`. Be + careful with this one and read the docs before using it. + ([@kkragenbrink](https://github.com/kkragenbrink)) + +#### OTHER MINOR TWEAKS + +* [`18ce0ec`](https://github.com/npm/npm/commit/18ce0ecd2d94ad3af01e997f1396515892dd363c) + [#3032](https://github.com/npm/npm/issues/3032) `npm unpublish` will now use + the registry set in `package.json`, just like `npm publish`. This only + applies, for now, when unpublishing the entire package, as unpublishing a + single version requires the name be included on the command line and + therefore doesn't read from `package.json`. ([@watilde](https://github.com/watilde)) +* [`9ad2100`](https://github.com/npm/npm/commit/9ad210042242e51d52b2a8b633d8e59248f5faa4) + [#8008](https://github.com/npm/npm/issues/8008) Once again, when considering + what to install on `npm install`, include `devDependencies`. + ([@smikes](https://github.com/smikes)) +* [`5466260`](https://github.com/npm/npm/commit/546626059909dca1906454e820ca4e315c1795bd) + [#8003](https://github.com/npm/npm/issues/8003) Clarify the documentation + around scopes to make it easier to understand how they support private + packages. ([@smikes](https://github.com/smikes)) + +#### DEPENDENCIES WILL NOT STOP UNTIL YOU ARE VERY SLEEPY + +* [`faf65a7`](https://github.com/npm/npm/commit/faf65a7bbb2fad13216f64ed8f1243bafe743f97) + `init-package-json@1.4.2`: If there are multiple validation errors and + warnings, ensure they all get displayed (includes a rad new way of testing + `init-package-json` contributed by + [@michaelnisi](https://github.com/michaelnisi)). + ([@MisumiRize](https://github.com/MisumiRize)) +* [`7f10f38`](https://github.com/npm/npm/commit/7f10f38d29a8423d7cde8103fa7b64ac728da1e0) + `editor@1.0.0`: `1.0.0` is literally more than `0.1.0` (no change aside from + version number). ([@substack](https://github.com/substack)) +* [`4979af3`](https://github.com/npm/npm/commit/4979af3fcae5a3962383b7fdad3162381e62eefe) + [#6805](https://github.com/npm/npm/issues/6805) `npm-registry-client@6.3.3`: + Decode scoped package names sent by the registry so they look nicer. + ([@mmalecki](https://github.com/mmalecki)) + +### v2.8.4 (2015-04-16): + +This is the fourth release of npm this week, so it's mostly just landing a few +small outstanding PRs on dependencies and some tiny documentation tweaks. +`npm@2.8.3` is where the real action is. + +* [`ee2bd77`](https://github.com/npm/npm/commit/ee2bd77f3c64d38735d1d31028224a5c40422a9b) + [#7983](https://github.com/npm/npm/issues/7983) `tar@2.1.0`: Better error + reporting in corrupted tar files, and add support for the `fromBase` flag + (rescued from the dustbin of history by + [@deanmarano](https://github.com/deanmarano)). + ([@othiym23](https://github.com/othiym23)) +* [`d8eee6c`](https://github.com/npm/npm/commit/d8eee6cf9d2ff7aca68dfaed2de76824a3e0d9af) + `init-package-json@1.4.1`: Add support for a default author, and only add + scope to a package name once. ([@othiym23](https://github.com/othiym23)) +* [`4fc5d98`](https://github.com/npm/npm/commit/4fc5d98b785f601c60d4dc0a2c8674f0cccf6262) + `lru-cache@2.6.1`: Small tweaks to cache value aging and entry counting that + are irrelevant to npm. ([@isaacs](https://github.com/isaacs)) +* [`1fe5840`](https://github.com/npm/npm/commit/1fe584089f5bef133de5518aa26eaf6064be2bf7) + [#7946](https://github.com/npm/npm/issues/7946) Make `npm init` text + friendlier. ([@sandfox](https://github.com/sandfox)) + +### v2.8.3 (2015-04-15): + +#### TWO SMALL GIT TWEAKS + +This is the last of a set of releases intended to ensure npm's git support is +robust enough that we can stop working on it for a while. These fixes are +small, but prevent a common crasher and clear up one of the more confusing +error messages coming out of npm when working with repositories hosted on git. + +* [`387f889`](https://github.com/npm/npm/commit/387f889c0e8fb617d9cc9a42ed0a3ec49424ab5d) + [#7961](https://github.com/npm/npm/issues/7961) Ensure that hosted git SSH + URLs always have a valid protocol when stored in `resolved` fields in + `npm-shrinkwrap.json`. ([@othiym23](https://github.com/othiym23)) +* [`394c2f5`](https://github.com/npm/npm/commit/394c2f5a1227232c0baf42fbba1402aafe0d6ffb) + Switch the order in which hosted Git providers are checked to `git:`, + `git+https:`, then `git+ssh:` (from `git:`, `git+ssh:`, then `git+https:`) in + an effort to go from most to least likely to succeed, to make for less + confusing error message. ([@othiym23](https://github.com/othiym23)) + +### v2.8.2 (2015-04-14): + +#### PEACE IN OUR TIME + +npm has been having an issue with CouchDB's web server since the release +of io.js and Node.js 0.12.0 that has consumed a huge amount of my time +to little visible effect. Sam Mikes picked up the thread from me, and +after a [_lot_ of effort](https://github.com/npm/npm/issues/7699#issuecomment-93091111) +figured out that ultimately there are probably a couple problems with +the new HTTP Agent keep-alive handling in new versions of Node. In +addition, `npm-registry-client` was gratuitously sending a body along +with a GET request which was triggering the bugs. Sam removed about 10 bytes from +one file in `npm-registry-client`, and this problem, which has been bugging us for months, +completely went away. + +In conclusion, Sam Mikes is great, and anybody using a private registry +hosted on CouchDB should thank him for his hard work. Also, thanks to +the community at large for pitching in on this bug, which has been +around for months now. + +* [`431c3bf`](https://github.com/npm/npm/commit/431c3bf6cdec50f9f0c735f478cb2f3f337d3313) + [#7699](https://github.com/npm/npm/issues/7699) `npm-registry-client@6.3.2`: + Don't send body with HTTP GET requests when logging in. + ([@smikes](https://github.com/smikes)) + +### v2.8.1 (2015-04-12): + +#### CORRECTION: NPM'S GIT INTEGRATION IS DOING OKAY + +A [helpful bug report](https://github.com/npm/npm/issues/7872#issuecomment-91809553) +led to another round of changes to +[`hosted-git-info`](https://github.com/npm/hosted-git-info/commit/827163c74531b69985d1ede7abced4861e7b0cd4), +some additional test-writing, and a bunch of hands-on testing against actual +private repositories. While the complexity of npm's git dependency handling is +nearly fractal (because npm is very complex, and git is even more complex), +it's feeling way more solid than it has for a while. We think this is a +substantial improvement over what we had before, so give `npm@2.8.1` a shot if +you have particularly complex git use cases and +[let us know](https://github.com/npm/npm/issues/new) how it goes. + +(NOTE: These changes mostly affect cloning and saving references to packages +hosted in git repositories, and don't address some known issues with things +like lifecycle scripts not being run on npm dependencies. Work continues on +other issues that affect parity between git and npm registry packages.) + +* [`66377c6`](https://github.com/npm/npm/commit/66377c6ece2cf4d53d9a618b7d9824e1452bc293) + [#7872](https://github.com/npm/npm/issues/7872) `hosted-git-info@2.1.2`: Pass + through credentials embedded in SSH and HTTPs git URLs. + ([@othiym23](https://github.com/othiym23)) +* [`15efe12`](https://github.com/npm/npm/commit/15efe124753257728a0ddc64074fa5a4b9c2eb30) + [#7872](https://github.com/npm/npm/issues/7872) Use the new version of + `hosted-git-info` to pass along credentials embedded in git URLs. Test it. + Test it a lot. ([@othiym23](https://github.com/othiym23)) + +#### SCOPED DEPENDENCIES AND PEER DEPENDENCIES: NOT QUITE REESE'S + +Big thanks to [@ewie](https://github.com/ewie) for identifying an issue with +how npm was handling `peerDependencies` that were implicitly installed from the +`package.json` files of scoped dependencies. This +[will be a moot point](https://github.com/npm/npm/issues/6565#issuecomment-74971689) +with the release of `npm@3`, but until then, it's important that +`peerDependency` auto-installation work as expected. + +* [`b027319`](https://github.com/npm/npm/commit/b0273190c71eba14395ddfdd1d9f7ba625297523) + [#7920](https://github.com/npm/npm/issues/7920) Scoped packages with + `peerDependencies` were installing the `peerDependencies` into the wrong + directory. ([@ewie](https://github.com/ewie)) +* [`649e31a`](https://github.com/npm/npm/commit/649e31ae4fd02568bae5dc6b4ea783431ce3d63e) + [#7920](https://github.com/npm/npm/issues/7920) Test `peerDependency` + installs involving scoped packages using `npm-package-arg` instead of simple + path tests, for consistency. ([@othiym23](https://github.com/othiym23)) + +#### MAKING IT EASIER TO WRITE NPM TESTS, VERSION 0.0.1 + +[@iarna](https://github.com/iarna) and I +([@othiym23](https://github.com/othiym23)) have been discussing a +[candidate plan](https://github.com/npm/npm/wiki/rewriting-npm's-tests:-a-plan-maybe) +for improving npm's test suite, with the goal of making it easier for new +contributors to get involved with npm by reducing the learning curve +necessary to be able to write good tests for proposed changes. This is the +first substantial piece of that effort. Here's what the commit message for +[`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) +had to say about this work: + +> It's too difficult for npm contributors to figure out what the conventional +> style is for tests. Part of the problem is that the documentation in +> CONTRIBUTING.md is inadequate, but another important factor is that the tests +> themselves are written in a variety of styles. One of the most notable +> examples of this is the fact that many tests use fixture directories to store +> precooked test scenarios and package.json files. +> +> This had some negative consequences: +> +> * tests weren't idempotent +> * subtle dependencies between tests existed +> * new tests get written in this deprecated style because it's not +> obvious that the style is out of favor +> * it's hard to figure out why a lot of those directories existed, +> because they served a variety of purposes, so it was difficult to +> tell when it was safe to remove them +> +> All in all, the fixture directories were a major source of technical debt, and +> cleaning them up, while time-consuming, makes the whole test suite much more +> approachable, and makes it more likely that new tests written by outside +> contributors will follow a conventional style. To support that, all of the +> tests touched by this changed were cleaned up to pass the `standard` style +> checker. + +And here's a little extra context from a comment I left on [#7929](https://github.com/npm/npm/issues/7929): + +> One of the other things that encouraged me was looking at this +> [presentation on technical debt](http://www.slideshare.net/nnja/pycon-2015-technical-debt-the-monster-in-your-closet) +> from Pycon 2015, especially slide 53, which I interpreted in terms of +> difficulty getting new contributors to submit patches to an OSS project like +> npm. npm has a long ways to go, but I feel good about this change. + +* [`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) + [#7929](https://github.com/npm/npm/issues/7929) Eliminate fixture directories + from `test/tap`, leaving each test self-contained. + ([@othiym23](https://github.com/othiym23)) +* [`4928d30`](https://github.com/npm/npm/commit/4928d30140821c63e03fffed73f8d88ebdc43710) + [#7929](https://github.com/npm/npm/issues/7929) Move fixture files from + `test/tap/*` to `test/fixtures`. ([@othiym23](https://github.com/othiym23)) +* [`e925deb`](https://github.com/npm/npm/commit/e925debca91092a814c1a00933babc3a8cf975be) + [#7929](https://github.com/npm/npm/issues/7929) Tweak the run scripts to stop + slaughtering the CPU on doc rebuild. + ([@othiym23](https://github.com/othiym23)) +* [`65bf7cf`](https://github.com/npm/npm/commit/65bf7cffaf91c426b676c47529eee796f8b8b75c) + [#7923](https://github.com/npm/npm/issues/7923) Use an alias of scripts and + run-scripts in `npm run test-all` ([@watilde](https://github.com/watilde)) +* [`756a3fb`](https://github.com/npm/npm/commit/756a3fbb852a2469afe706635ed88d22c37743e5) + [#7923](https://github.com/npm/npm/issues/7923) Sync timeout time of `npm + run-script test-all` to be the same as `test` and `tap` scripts. + ([@watilde](https://github.com/watilde)) +* [`8299b5f`](https://github.com/npm/npm/commit/8299b5fb6373354a7fbaab6f333863758812ae90) + Set a timeout for tap tests for `npm run-script test-all`. + ([@othiym23](https://github.com/othiym23)) + +#### THE EVER-BEATING DRUM OF DEPENDENCY UPDATES + +* [`d90d0b9`](https://github.com/npm/npm/commit/d90d0b992acbf62fd5d68debf9d1dbd6cfa20804) + [#7924](https://github.com/npm/npm/issues/7924) Remove `child-process-close`, + as it was included for Node 0.6 compatibility, and npm no longer supports + 0.6. ([@robertkowalski](https://github.com/robertkowalski)) +* [`16427c1`](https://github.com/npm/npm/commit/16427c1f3ea3d71ee753c62eb4c2663c7b32b84f) + `lru-cache@2.5.2`: More accurate updating of expiry times when `maxAge` is + set. ([@isaacs](https://github.com/isaacs)) +* [`03cce83`](https://github.com/npm/npm/commit/03cce83b64344a9e0fe036dce214f4d68cfcc9e7) + `nock@1.6.0`: Mocked network error handling. + ([@pgte](https://github.com/pgte)) +* [`f93b1f0`](https://github.com/npm/npm/commit/f93b1f0b7eb5d1b8a7967e837bbd756db1091d00) + `glob@5.0.5`: Use `path-is-absolute` polyfill, allowing newer Node.js and + io.js versions to use `path.isAbsolute()`. + ([@sindresorhus](https://github.com/sindresorhus)) +* [`a70d694`](https://github.com/npm/npm/commit/a70d69495a6e96997e64855d9e749d943ee6d64f) + `request@2.55.0`: Bug fixes and simplification. + ([@simov](https://github.com/simov)) +* [`2aecc6f`](https://github.com/npm/npm/commit/2aecc6f4083526feeb14615b4e5484edc66175b5) + `columnify@1.5.1`: Switch to using babel from 6to5. + ([@timoxley](https://github.com/timoxley)) + +### v2.8.0 (2015-04-09): + +#### WE WILL NEVER BE DONE FIXING NPM'S GIT SUPPORT + +If you look at [the last release's release +notes](https://github.com/npm/npm/blob/master/CHANGELOG.md#git-mean-git-tuff-git-all-the-way-away-from-my-stuff), +you will note that they confidently assert that it's perfectly OK to force all +GitHub URLs through the same `git:` -> `git+ssh:` fallback flow for cloning. It +turns out that many users depend on `git+https:` URLs in their build +environments because they use GitHub auth tokens instead of SSH keys. Also, in +some cases you just want to be able to explicitly say how a given dependency +should be cloned from GitHub. + +Because of the way we resolved the inconsistency in GitHub shorthand handling +[before](https://github.com/npm/npm/blob/master/CHANGELOG.md#bug-fixes-1), this +turned out to be difficult to work around. So instead of hacking around it, we +completely redid how git is handled within npm and its attendant packages. +Again. This time, we changed things so that `normalize-package-data` and +`read-package-json` leave more of the git logic to npm itself, which makes +handling shorthand syntax consistently much easier, and also allows users to +resume using explicit, fully-qualified git URLs without npm messing with them. + +Here's a summary of what's changed: + +* Instead of converting the GitHub shorthand syntax to a `git+ssh:`, `git:`, or + `git+https:` URL and saving that, save the shorthand itself to + `package.json`. +* If presented with shortcuts, try cloning via the git protocol, SSH, and HTTPS + (in that order). +* No longer prompt for credentials -- it didn't work right with the spinner, + and wasn't guaranteed to work anyway. We may experiment with doing this a + better way in the future. Users can override this by setting `GIT_ASKPASS` in + their environment if they want to experiment with interactive cloning, but + should also set `--no-spin` on the npm command line (or run `npm config set + spin=false`). +* **EXPERIMENTAL FEATURE**: Add support for `github:`, `gist:`, `bitbucket:`, + and `gitlab:` shorthand prefixes. GitHub shortcuts will continue to be + normalized to `org/repo` instead of being saved as `github:org/repo`, but + `gitlab:`, `gist:`, and `bitbucket:` prefixes will be used on the command + line and from `package.json`. BE CAREFUL WITH THIS. `package.json` files + published with the new shorthand syntax can _only_ be read by `npm@2.8.0` and + later, and this feature is mostly meant for playing around with it. If you + want to save git dependencies in a form that older versions of npm can read, + use `--save-exact`, which will save the git URL and resolved commit hash of + the head of the branch in a manner similar to the way that `--save-exact` + pins versions for registry dependencies. This is documented (so check `npm + help install` for details), but we're not going to make a lot of noise about + it until it has a chance to bake in a little more. + +It is [@othiym23](https://github.com/othiym23)'s sincere hope that this will +resolve all of the inconsistencies users were seeing with GitHub and git-hosted +packages, but given the level of change here, that may just be a fond wish. +Extra testing of this change is requested. + +* [`6b0f588`](https://github.com/npm/npm/commit/6b0f58877f37df9904490ffbaaad33862bd36dce) + [#7867](https://github.com/npm/npm/issues/7867) Use git shorthand and git + URLs as presented by user. Support new `hosted-git-info` shortcut syntax. + Save shorthand in `package.json`. Try cloning via `git:`, `git+ssh:`, and + `git+https:`, in that order, when supported by the underlying hosting + provider. ([@othiym23](https://github.com/othiym23)) +* [`75d4267`](https://github.com/npm/npm/commit/75d426787869d54ca7400408f562f971b34649ef) + [#7867](https://github.com/npm/npm/issues/7867) Document new GitHub, GitHub + gist, Bitbucket, and GitLab shorthand syntax. + ([@othiym23](https://github.com/othiym23)) +* [`7d92c75`](https://github.com/npm/npm/commit/7d92c7592998d90ec883fa989ca74f04ec1b93de) + [#7867](https://github.com/npm/npm/issues/7867) When `--save-exact` is used + with git shorthand or URLs, save the fully-resolved URL, with branch name + resolved to the exact hash for the commit checked out. + ([@othiym23](https://github.com/othiym23)) +* [`9220e59`](https://github.com/npm/npm/commit/9220e59f8def8c82c6d331a39ba29ad4c44e3a9b) + [#7867](https://github.com/npm/npm/issues/7867) Ensure that non-prefixed and + non-normalized GitHub shortcuts are saved to `package.json`. + ([@othiym23](https://github.com/othiym23)) +* [`dd398e9`](https://github.com/npm/npm/commit/dd398e98a8eba27eeba84378200da3d078fdf980) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.1`: + Ensure that `gist:` shorthand survives being round-tripped through + `package.json`. ([@othiym23](https://github.com/othiym23)) +* [`33d1420`](https://github.com/npm/npm/commit/33d1420bf2f629332fceb2ac7e174e63ac48f96a) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.0`: Add + support for auth embedded directly in git URLs. + ([@othiym23](https://github.com/othiym23)) +* [`23a1d5a`](https://github.com/npm/npm/commit/23a1d5a540e8db27f5cd0245de7c3694e2bddad1) + [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.0.2`: Make + it possible to determine in which form a hosted git URL was passed. + ([@iarna](https://github.com/iarna)) +* [`eaf75ac`](https://github.com/npm/npm/commit/eaf75acb718611ad5cfb360084ec86938d9c66c5) + [#7867](https://github.com/npm/npm/issues/7867) + `normalize-package-data@2.0.0`: Normalize GitHub specifiers so they pass + through shortcut syntax and preserve explicit URLs. + ([@iarna](https://github.com/iarna)) +* [`95e0535`](https://github.com/npm/npm/commit/95e0535e365e0aca49c634dd2061a0369b0475f1) + [#7867](https://github.com/npm/npm/issues/7867) `npm-package-arg@4.0.0`: Add + git URL and shortcut to hosted git spec and use `hosted-git-info@2.0.2`. + ([@iarna](https://github.com/iarna)) +* [`a808926`](https://github.com/npm/npm/commit/a8089268d5f3d57f42dbaba02ff6437da5121191) + [#7867](https://github.com/npm/npm/issues/7867) + `realize-package-specifier@3.0.0`: Use `npm-package-arg@4.0.0` and test + shortcut specifier behavior. ([@iarna](https://github.com/iarna)) +* [`6dd1e03`](https://github.com/npm/npm/commit/6dd1e039bddf8cf5383343f91d84bc5d78acd083) + [#7867](https://github.com/npm/npm/issues/7867) `init-package-json@1.4.0`: + Allow dependency on `read-package-json@2.0.0`. + ([@iarna](https://github.com/iarna)) +* [`63254bb`](https://github.com/npm/npm/commit/63254bb6358f66752aca6aa1a275271b3ae03f7c) + [#7867](https://github.com/npm/npm/issues/7867) `read-installed@4.0.0`: Use + `read-package-json@2.0.0`. ([@iarna](https://github.com/iarna)) +* [`254b887`](https://github.com/npm/npm/commit/254b8871f5a173bb464cc5b0ace460c7878b8097) + [#7867](https://github.com/npm/npm/issues/7867) `read-package-json@2.0.0`: + Use `normalize-package-data@2.0.0`. ([@iarna](https://github.com/iarna)) +* [`0b9f8be`](https://github.com/npm/npm/commit/0b9f8be62fe5252abe54d49e36a696f4816c2eca) + [#7867](https://github.com/npm/npm/issues/7867) `npm-registry-client@6.3.0`: + Mark compatibility with `normalize-package-data@2.0.0` and + `npm-package-arg@4.0.0`. ([@iarna](https://github.com/iarna)) +* [`f40ecaa`](https://github.com/npm/npm/commit/f40ecaad68f77abc50eb6f5b224e31dec3d250fc) + [#7867](https://github.com/npm/npm/issues/7867) Extract a common method to + use when cloning git repos for testing. + ([@othiym23](https://github.com/othiym23)) + +#### TEST FIXES FOR NODE 0.8 + +npm continues to [get closer](https://github.com/npm/npm/issues/7842) to being +completely green on Travis for Node 0.8. + +* [`26d36e9`](https://github.com/npm/npm/commit/26d36e9cf0eca69fe1863d2ea536c28555b9e8de) + [#7842](https://github.com/npm/npm/issues/7842) When spawning child + processes, map exit code 127 to ENOENT so Node 0.8 handles child process + failures the same as later versions. + ([@SonicHedgehog](https://github.com/SonicHedgehog)) +* [`54cd895`](https://github.com/npm/npm/commit/54cd8956ea783f96749e46597d8c2cb9397c5d5f) + [#7842](https://github.com/npm/npm/issues/7842) Node 0.8 requires -e with -p + when evaluating snippets; fix test. + ([@SonicHedgehog](https://github.com/SonicHedgehog)) + +#### SMALL FIX AND DOC TWEAK + +* [`20e9003`](https://github.com/npm/npm/commit/20e90031b847e9f7c7168f3dad8b1e526f9a2586) + `tar@2.0.1`: Fix regression where relative symbolic links within an + extraction root that pointed within an extraction root would get normalized + to absolute symbolic links. ([@isaacs](https://github.com/isaacs)) +* [`2ef8898`](https://github.com/npm/npm/commit/2ef88989c41bee1578570bb2172c90ede129dbd1) + [#7879](https://github.com/npm/npm/issues/7879) Better document that `npm + publish --tag=foo` will not set `latest` to that version. + ([@linclark](https://github.com/linclark)) + +### v2.7.6 (2015-04-02): + +#### GIT MEAN, GIT TUFF, GIT ALL THE WAY AWAY FROM MY STUFF + +Part of the reason that we're reluctant to take patches to how npm deals with +git dependencies is that every time we touch the git support, something breaks. +The last few releases are a case in point. `npm@2.7.4` completely broke +installing private modules from GitHub, and `npm@2.7.5` fixed them at the cost +of logging a misleading error message that caused many people to believe that +their dependencies hadn't been successfully installed when they actually had +been. + +This all started from a desire to ensure that GitHub shortcut syntax is being +handled correctly. The correct behavior is for npm to try to clone all +dependencies on GitHub (whether they're specified with the GitHub +`organization/repository` shortcut syntax or not) via the plain `git:` protocol +first, and to fall back to using `git+ssh:` if `git:` doesn't work. Previously, +sometimes npm would use `git:` and `git+ssh:` in some cases (most notably when +using GitHub shortcut syntax on the command line), and use `git+https:` in +others (when the GitHub shortcut syntax was present in `package.json`). This +led to subtle and hard-to-understand inconsistencies, and we're glad that as of +`npm@2.7.6`, we've finally gotten things to where they were before we started, +only slightly more consistent overall. + +We are now going to go back to our policy of being extremely reluctant to touch +the code that handles Git dependencies. + +* [`b747593`](https://github.com/npm/npm/commit/b7475936f473f029e6a027ba1b16277523747d0b) + [#7630](https://github.com/npm/npm/issues/7630) Don't automatically log all + git failures as errors. `maybeGithub` needs to be able to fail without + logging to support its fallback logic. + ([@othiym23](https://github.com/othiym23)) +* [`cd67a0d`](https://github.com/npm/npm/commit/cd67a0db07891d20871822696c26692c8a84866a) + [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote + URL, handle failures gracefully (without assuming standard output exists). + ([@othiym23](https://github.com/othiym23)) +* [`637c7d1`](https://github.com/npm/npm/commit/637c7d1411fe07f409cf91f2e65fd70685cb253c) + [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote + URL, handle failures gracefully (without assuming standard _error_ exists). + ([@othiym23](https://github.com/othiym23)) + +#### OTHER SIGNIFICANT FIXES + +* [`78005eb`](https://github.com/npm/npm/commit/78005ebb6f4103c20f077669c3929b7ea46a4c0d) + [#7743](https://github.com/npm/npm/issues/7743) Always quote arguments passed + to `npm run-script`. This allows build systems and the like to safely escape + glob patterns passed as arguments to `run-scripts` with `npm run-script + <script> -- <arguments>`. This is a tricky change to test, and may be + reverted or moved to `npm@3` if it turns out it breaks things for users. + ([@mantoni](https://github.com/mantoni)) +* [`da015ee`](https://github.com/npm/npm/commit/da015eee45f6daf384598151d06a9b57ffce136e) + [#7074](https://github.com/npm/npm/issues/7074) `read-package-json@1.3.3`: + `read-package-json` no longer caches `package.json` files, which trades a + very small performance loss for the elimination of a large class of really + annoying race conditions. See [#7074](https://github.com/npm/npm/issues/7074) + for the grisly details. ([@othiym23](https://github.com/othiym23)) +* [`dd20f57`](https://github.com/npm/npm/commit/dd20f5755291b9433f0d298ee0eead22cda6db36) + `init-package-json@1.3.2`: Only add the `@` to scoped package names if it's + not already there when reading from the filesystem + ([@watilde](https://github.com/watilde)), and support inline validation of + package names ([@michaelnisi](https://github.com/michaelnisi)). + +#### SMALL FIXES AND DEPENDENCY UPGRADES + +* [`1f380f6`](https://github.com/npm/npm/commit/1f380f66c1e944b8ffbf096fa94d09e931626e12) + [#7820](https://github.com/npm/npm/issues/7820) `are-we-there-yet@1.0.4`: Use + `readable-stream` instead of built-in `stream` module to better support + Node.js 0.8.x. ([@SonicHedgehog](https://github.com/SonicHedgehog)) +* [`d380188`](https://github.com/npm/npm/commit/d380188e161be31f5a4f53947de6bc28df4732d8) + `semver@4.3.3`: Don't throw on `semver.parse(null)`, and parse numeric + version strings more robustly. ([@isaacs](https://github.com/isaacs)) +* [`01d9964`](https://github.com/npm/npm/commit/01d99649265f921e1c61cf406613e7042bcea008) + `nock@1.4.0`: This change may need to be rolled back, or rolled forward, + because [nock depends on + `setImmediate`](https://github.com/npm/npm/issues/7842), which causes tests + to fail when run with Node.js 0.8. ([@othiym23](https://github.com/othiym23)) +* [`91f5cb1`](https://github.com/npm/npm/commit/91f5cb1fb91520fbe25a4da5b80848ed540b9ad3) + [#7791](https://github.com/npm/npm/issues/7791) Fix brackets in npmconf so + that `loaded` is set correctly. + ([@charmander](https://github.com/charmander)) +* [`1349e27`](https://github.com/npm/npm/commit/1349e27c936a8b0fc9f6440a6d6404ef3b19c587) + [#7818](https://github.com/npm/npm/issues/7818) Update `README.md` to point + out that the install script now lives on https://www.npmjs.com. + ([@weisjohn](https://github.com/weisjohn)) + +### v2.7.5 (2015-03-26): + +#### SECURITY FIXES + +* [`300834e`](https://github.com/npm/npm/commit/300834e91a4e2a95fb7fb59c309e7c3fc91d2312) + `tar@2.0.0`: Normalize symbolic links that point to targets outside the + extraction root. This prevents packages containing symbolic links from + overwriting targets outside the expected paths for a package. Thanks to [Tim + Cuthbertson](http://gfxmonk.net/) and the team at [Lift + Security](https://liftsecurity.io/) for working with the npm team to identify + this issue. ([@othiym23](https://github.com/othiym23)) +* [`0dc6875`](https://github.com/npm/npm/commit/0dc68757cffd5397c280bc71365d106523a5a052) + `semver@4.3.2`: Package versions can be no more than 256 characters long. + This prevents a situation in which parsing the version number can use + exponentially more time and memory to parse, leading to a potential denial of + service. Thanks to Adam Baldwin at Lift Security for bringing this to our + attention. ([@isaacs](https://github.com/isaacs)) + +#### BUG FIXES + +* [`5811468`](https://github.com/npm/npm/commit/5811468e104ccb6b26b8715dff390d68daa10066) + [#7713](https://github.com/npm/npm/issues/7713) Add a test for `npm link` and + `npm link <package>`. ([@watilde](https://github.com/watilde)) +* [`3cf3b0c`](https://github.com/npm/npm/commit/3cf3b0c8fddb6b66f969969feebea85fabd0360b) + [#7713](https://github.com/npm/npm/issues/7713) Only use absolute symbolic + links when `npm link`ing. ([@hokaccha](https://github.com/hokaccha)) +* [`f35aa93`](https://github.com/npm/npm/commit/f35aa933e136228a89e3fcfdebe8c7cc4f1e7c00) + [#7443](https://github.com/npm/npm/issues/7443) Keep relative URLs when + hitting search endpoint. ([@othiym23](https://github.com/othiym23)) +* [`eab6184`](https://github.com/npm/npm/commit/eab618425c51e3aa4416da28dcd8ca4ba63aec41) + [#7766](https://github.com/npm/npm/issues/7766) One last tweak to ensure that + GitHub shortcuts work with private repositories. + ([@iarna](https://github.com/iarna)) +* [`5d7f704`](https://github.com/npm/npm/commit/5d7f704823f5f92ddd7ff3e7dd2b8bcc66c73005) + [#7656](https://github.com/npm/npm/issues/7656) Don't try to load a deleted + CA file, allowing the `cafile` config to be changed. + ([@KenanY](https://github.com/KenanY)) +* [`a840a13`](https://github.com/npm/npm/commit/a840a13bbf0330157536381ea8e58d0bd93b4c05) + [#7746](https://github.com/npm/npm/issues/7746) Only fix up URL paths when + there are paths to fix up. ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`94df809`](https://github.com/npm/npm/commit/94df8095985bf5ba9d8db99dc445d05dac136aaf) + `request@2.54.0`: Fixes for Node.js 0.12 and io.js. + ([@simov](https://github.com/simov)) +* [`98a13ea`](https://github.com/npm/npm/commit/98a13eafdf098b53069ad15297008fcab9c61653) + `opener@1.4.1`: Deal with `start` on Windows more conventionally. + ([@domenic](https://github.com/domenic)) +* [`c2417c7`](https://github.com/npm/npm/commit/c2417c7702459a446f07d43ca3c4e99bde7fe9d6) + `require-inject@1.2.0`: Add installGlobally to bypass cleanups. + ([@iarna](https://github.com/iarna)) + +#### DOCUMENTATION FIXES + +* [`f87c728`](https://github.com/npm/npm/commit/f87c728f8732c9e977c0dc2060c0610649e79155) + [#7696](https://github.com/npm/npm/issues/7696) Months and minutes were + swapped in doc-build.sh ([@MeddahJ](https://github.com/MeddahJ)) +* [`4e216b2`](https://github.com/npm/npm/commit/4e216b29b30463f06afe6e3c645e205da5f50922) + [#7752](https://github.com/npm/npm/issues/7752) Update string examples to be + properly quoted. ([@snuggs](https://github.com/snuggs)) +* [`402f52a`](https://github.com/npm/npm/commit/402f52ab201efa348feb87cad753fc4b91e8a3fb) + [#7635](https://github.com/npm/npm/issues/7635) Clarify Windows installation + instructions. ([@msikma](https://github.com/msikma)) +* [`c910399`](https://github.com/npm/npm/commit/c910399ecfd8db49fe4496dd26887765a8aed20f) + small typo fix to `CHANGELOG.md` ([@e-jigsaw](https://github.com/e-jigsaw)) + +### v2.7.4 (2015-03-20): + +#### BUG FIXES + +* [`fe1bc38`](https://github.com/npm/npm/commit/fe1bc387a14475e373557de669e03d9d006d3173) + [#7672](https://github.com/npm/npm/issues/7672) `npm-registry-client@3.1.2`: + Fix client-side certificate handling by correcting property name. + ([@atamon](https://github.com/atamon)) +* [`3ce3cc2`](https://github.com/npm/npm/commit/3ce3cc242fc345bca6820185a4f5a013c5bc1944) + [#7635](https://github.com/npm/npm/issues/7635) `fstream-npm@1.0.2`: Raise a + more descriptive error when `bundledDependencies` isn't an array. + ([@KenanY](https://github.com/KenanY)) +* [`3a12723`](https://github.com/npm/npm/commit/3a127235076a1f00bc8befba56c024c6d0e7f477) + [#7661](https://github.com/npm/npm/issues/7661) Allow setting `--registry` on + the command line to trump the mapped registry for `--scope`. + ([@othiym23](https://github.com/othiym23)) +* [`89ce829`](https://github.com/npm/npm/commit/89ce829a00b526d0518f5cd855c323bffe182af0) + [#7630](https://github.com/npm/npm/issues/7630) `hosted-git-info@1.5.3`: Part + 3 of ensuring that GitHub shorthand is handled consistently. + ([@othiym23](https://github.com/othiym23)) +* [`63313eb`](https://github.com/npm/npm/commit/63313eb0c37891c355546fd1093010c8a0c3cd81) + [#7630](https://github.com/npm/npm/issues/7630) + `realize-package-specifier@2.2.0`: Part 2 of ensuring that GitHub shorthand + is handled consistently. ([@othiym23](https://github.com/othiym23)) +* [`3ed41bf`](https://github.com/npm/npm/commit/3ed41bf64a1bb752bb3155c74dd6ffbbd28c89c9) + [#7630](https://github.com/npm/npm/issues/7630) `npm-package-arg@3.1.1`: Part + 1 of ensuring that GitHub shorthand is handled consistently. + ([@othiym23](https://github.com/othiym23)) + +#### DEPENDENCY UPDATES + +* [`6a498c6`](https://github.com/npm/npm/commit/6a498c6aaa00611a0a1ea405255900c327103f8b) + `npm-registry-couchapp@2.6.7`: Ensure that npm continues to work with new + registry architecture. ([@bcoe](https://github.com/bcoe)) +* [`bd72c47`](https://github.com/npm/npm/commit/bd72c47ce8c58e287d496902c11845c8fea420d6) + `glob@5.0.3`: Updated to latest version. + ([@isaacs](https://github.com/isaacs)) +* [`4bfbaa2`](https://github.com/npm/npm/commit/4bfbaa2d8b9dc7067d999de8f55676db3a4f4196) + `npmlog@1.2.0`: Getting up to date with latest version (but not using any of + the new features). ([@othiym23](https://github.com/othiym23)) + +#### A NEW REGRESSION TEST + +* [`3703b0b`](https://github.com/npm/npm/commit/3703b0b87c127a64649bdbfc3bc697ebccc4aa24) + Add regression test for `npm version` to ensure `message` property in config + continues to be honored. ([@dannyfritz](https://github.com/dannyfritz)) + +### v2.7.3 (2015-03-16): + +#### HAHA WHOOPS LIL SHINKWRAP ISSUE THERE LOL + +* [`1549106`](https://github.com/npm/npm/commit/1549106f518000633915686f5f1ccc6afcf77f8f) + [#7641](https://github.com/npm/npm/issues/7641) Due to 448efd0, running `npm + shrinkwrap --dev` caused production dependencies to no longer be included in + `npm-shrinkwrap.json`. Whoopsie! ([@othiym23](https://github.com/othiym23)) + +### v2.7.2 (2015-03-12): + +#### NPM GASTROENTEROLOGY + +* [`fb0ac26`](https://github.com/npm/npm/commit/fb0ac26eecdd76f6eaa4a96a865b7c6f52ce5aa5) + [#7579](https://github.com/npm/npm/issues/7579) Only block removing files and + links when we're sure npm isn't responsible for them. This change is hard to + summarize, because if things are working correctly you should never see it, + but if you want more context, just [go read the commit + message](https://github.com/npm/npm/commit/fb0ac26eecdd76f6eaa4a96a865b7c6f52ce5aa5), + which lays it all out. ([@othiym23](https://github.com/othiym23)) +* [`051c473`](https://github.com/npm/npm/commit/051c4738486a826300f205b71590781ce7744f01) + [#7552](https://github.com/npm/npm/issues/7552) `bundledDependencies` are now + properly included in the installation context. This is another fantastically + hard-to-summarize bug, and once again, I encourage you to [read the commit + message](https://github.com/npm/npm/commit/051c4738486a826300f205b71590781ce7744f01) + if you're curious about the details. The snappy takeaway is that this + unbreaks many use cases for `ember-cli`. ([@othiym23](https://github.com/othiym23)) + +#### LESS DRAMATIC CHANGES + +* [`fcd9247`](https://github.com/npm/npm/commit/fcd92476f3a9092f6f8c83a19a24fe63b206edcd) + [#7597](https://github.com/npm/npm/issues/7597) Awk varies pretty + dramatically from platform to platform, so use Perl to generate the AUTHORS + list instead. ([@KenanY](https://github.com/KenanY)) +* [`721b17a`](https://github.com/npm/npm/commit/721b17a31690bec074eb8763d823d6de63406005) + [#7598](https://github.com/npm/npm/issues/7598) `npm install --save` really + isn't experimental anymore. ([@RichardLitt](https://github.com/RichardLitt)) + +#### DEPENDENCY REFRESH + +* [`a91f2c7`](https://github.com/npm/npm/commit/a91f2c7c9a5183d9cde7aae040ebd9ccdf104be7) + [#7559](https://github.com/npm/npm/issues/7559) `node-gyp@1.0.3` Switch + `node-gyp` to use `stdio` instead of `customFds` so it stops printing a + deprecation warning every time you build a native dependency. + ([@jeffbski](https://github.com/jeffbski)) +* [`0c85db7`](https://github.com/npm/npm/commit/0c85db7f0dde41762411e40a029153e6a65ef483) + `rimraf@2.3.2`: Globbing now deals with paths containing valid glob + metacharacters better. ([@isaacs](https://github.com/isaacs)) +* [`d14588e`](https://github.com/npm/npm/commit/d14588ed09b032c4c770e34b4c0f2436f5fccf6e) + `minimatch@2.0.4`: Bug fixes. ([@isaacs](https://github.com/isaacs)) +* [`aa9952e`](https://github.com/npm/npm/commit/aa9952e8270a6c1b7f97e579875dd6e3aa22abfd) + `graceful-fs@3.0.6`: Bug fixes. ([@isaacs](https://github.com/isaacs)) + +### v2.7.1 (2015-03-05): + +#### GITSANITY + +* [`6823807`](https://github.com/npm/npm/commit/6823807bba6c00228a724e1205ae90d67df0adad) + [#7121](https://github.com/npm/npm/issues/7121) `npm install --save` for Git + dependencies saves the URL passed in, instead of the temporary directory used + to clone the remote repo. Fixes using Git dependencies when shrinkwrapping. + In the process, rewrote the Git dependency caching code. Again. No more + single-letter variable names, and a much clearer workflow. + ([@othiym23](https://github.com/othiym23)) +* [`c8258f3`](https://github.com/npm/npm/commit/c8258f31365b045e5fcf15b865a363abbc3be616) + [#7486](https://github.com/npm/npm/issues/7486) When installing Git remotes, + the caching code was passing in the function `gitEnv` instead of the results + of invoking it. ([@functino](https://github.com/functino)) +* [`c618eed`](https://github.com/npm/npm/commit/c618eeda3e321fd454d77c476b53a0330f2344cc) + [#2556](https://github.com/npm/npm/issues/2556) Make it possible to install + Git dependencies when using `--link` by not linking just the Git + dependencies. ([@smikes](https://github.com/smikes)) + +#### WHY DID THIS TAKE SO LONG. + +* [`abdd040`](https://github.com/npm/npm/commit/abdd040da90932535472f593d5433a67ee074801) + `read-package-json@1.3.2`: Provide more helpful error messages when JSON + parse errors are encountered by using a more forgiving JSON parser than + JSON.parse. ([@smikes](https://github.com/smikes)) + +#### BUGS & TWEAKS + +* [`c56cfcd`](https://github.com/npm/npm/commit/c56cfcd79cd8ab4ccd06d2c03d7e04030d576683) + [#7525](https://github.com/npm/npm/issues/7525) `npm dedupe` handles scoped + packages. ([@KidkArolis](https://github.com/KidkArolis)) +* [`1b8ba74`](https://github.com/npm/npm/commit/1b8ba7426393cbae2c76ad2c35953782d4401871) + [#7531](https://github.com/npm/npm/issues/7531) `npm stars` and `npm whoami` + will no longer send the registry the error text saying you need to log in as + your username. ([@othiym23](https://github.com/othiym23)) +* [`6de1e91`](https://github.com/npm/npm/commit/6de1e91116a5105dfa75126532b9083d8672e034) + [#6441](https://github.com/npm/npm/issues/6441) Prevent needless reinstalls + by only updating packages when the current version isn't the same as the + version returned as `wanted` by `npm outdated`. + ([@othiym23](https://github.com/othiym23)) +* [`2abc3ee`](https://github.com/npm/npm/commit/2abc3ee08f0cabc4e7bfd7b973c0b59dc44715ff) + Add `npm upgrade` as an alias for `npm update`. + ([@othiym23](https://github.com/othiym23)) +* [`bcd4722`](https://github.com/npm/npm/commit/bcd47224e18884191a5d0057c2b2fff83ac8206e) + [#7508](https://github.com/npm/npm/issues/7508) FreeBSD uses `EAI_FAIL` + instead of `ENOTFOUND`. ([@othiym23](https://github.com/othiym23)) +* [`21c1ac4`](https://github.com/npm/npm/commit/21c1ac41280f0716a208cde14025a2ad5ef61fed) + [#7507](https://github.com/npm/npm/issues/7507) Update support URL in generic + error handler to `https:` from `http:`. + ([@watilde](https://github.com/watilde)) +* [`b6bd99a`](https://github.com/npm/npm/commit/b6bd99a73f575545fbbaef95c12237c47dd32561) + [#7492](https://github.com/npm/npm/issues/7492) On install, the + `package.json` `engineStrict` deprecation only warns for the current package. + ([@othiym23](https://github.com/othiym23)) +* [`4ef1412`](https://github.com/npm/npm/commit/4ef1412d0061239da2b1c4460ed6db37cc9ded27) + [#7075](https://github.com/npm/npm/issues/7075) If you try to tag a release + as a valid semver range, `npm publish` and `npm tag` will error early instead + of proceeding. ([@smikes](https://github.com/smikes)) +* [`ad53d0f`](https://github.com/npm/npm/commit/ad53d0f666125d9f50d661b54901c6e5bab4d603) + Use `rimraf` in npm build script because Windows doesn't know what rm is. + ([@othiym23](https://github.com/othiym23)) +* [`8885c4d`](https://github.com/npm/npm/commit/8885c4dfb618f2838930b5c5149abea300a762d6) + `rimraf@2.3.1`: Better Windows support. + ([@isaacs](https://github.com/isaacs)) +* [`8885c4d`](https://github.com/npm/npm/commit/8885c4dfb618f2838930b5c5149abea300a762d6) + `glob@4.4.2`: Handle bad symlinks properly. + ([@isaacs](https://github.com/isaacs)) + +###E TYPSO & CLARFIICATIONS + +dId yuo know that submiting fxies for doc tpyos is an exclelent way to get +strated contriburting to a new open-saurce porject? + +* [`42c605c`](https://github.com/npm/npm/commit/42c605c7b401f603c32ea70427e1a7666adeafd9) + Fix typo in `CHANGELOG.md` ([@adrianblynch](https://github.com/adrianblynch)) +* [`c9bd58d`](https://github.com/npm/npm/commit/c9bd58dd637b9c41441023584a13e3818d5db336) + Add note about `node_modules/.bin` being added to the path in `npm + run-script`. ([@quarterto](https://github.com/quarterto)) +* [`903bdd1`](https://github.com/npm/npm/commit/903bdd105b205d6e45d3a2ab83eea8e4071e9aeb) + Matt Ranney confused the world when he renamed `node-redis` to `redis`. "The + world" includes npm's documentation. + ([@RichardLitt](https://github.com/RichardLitt)) +* [`dea9bb2`](https://github.com/npm/npm/commit/dea9bb2319183fe54bf4d173d8533d46d2c6611c) + Fix typo in contributor link. ([@watilde](https://github.com/watilde)) +* [`1226ca9`](https://github.com/npm/npm/commit/1226ca98d4d7650cc3ba16bf7ac62e44820f3bfa) + Properly close code block in npm-install.md. + ([@olizilla](https://github.com/olizilla)) + +### v2.7.0 (2015-02-26): + +#### SOMETIMES SEMVER MEANS "SUBJECTIVE-EMPATHETIC VERSIONING" + +For a very long time (maybe forever?), the documentation for `npm run-script` +has said that `npm restart` will only call `npm stop` and `npm start` when +there is no command defined as `npm restart` in `package.json`. The problem +with this documentation is that `npm run-script` was apparently never wired up +to actually work this way. + +Until now. + +If the patch below were landed on its own, free of context, it would be a +breaking change. But, since the "new" behavior is how the documentation claims +this feature has always worked, I'm classifying it as a patch-level bug fix. I +apologize in advance if this breaks anybody's deployment scripts, and if it +turns out to be a significant regression in practice, we can revert this change +and move it to `npm@3`, which is allowed to make breaking changes due to being +a new major version of semver. + +* [`2f6a1df`](https://github.com/npm/npm/commit/2f6a1df3e1e3e0a3bc4abb69e40f59a64204e7aa) + [#1999](https://github.com/npm/npm/issues/1999) Only run `stop` and `start` + scripts (plus their pre- and post- scripts) when there's no `restart` script + defined. This makes it easier to support graceful restarts of services + managed by npm. ([@watilde](https://github.com/watilde) / + [@scien](https://github.com/scien)) + +#### A SMALL FEATURE WITH BIG IMPLICATIONS + +* [`145af65`](https://github.com/npm/npm/commit/145af6587f45de135cc876be2027ed818ed4ca6a) + [#4887](https://github.com/npm/npm/issues/4887) Replace calls to the + `node-gyp` script bundled with npm by passing the + `--node-gyp=/path/to/node-gyp` option to npm. Swap in `pangyp` or a version + of `node-gyp` modified to work better with io.js without having to touch + npm's code! ([@ackalker](https://github.com/ackalker)) + +#### [@WATILDE'S](https://github.com/watilde) NPM USABILITY CORNER + +Following `npm@2.6.1`'s unexpected fix of many of the issues with `npm update +-g` simply by making `--depth=0` the default for `npm outdated`, friend of npm +[@watilde](https://github.com/watilde) has made several modest changes to npm's +behavior that together justify bumping npm's minor version, as well as making +npm significantly more pleasant to use: + +* [`448efd0`](https://github.com/npm/npm/commit/448efd0eaa6f97af0889bf47efc543a1ea2f8d7e) + [#2853](https://github.com/npm/npm/issues/2853) Add support for `--dev` and + `--prod` to `npm ls`, so that you can list only the trees of production or + development dependencies, as desired. + ([@watilde](https://github.com/watilde)) +* [`a0a8777`](https://github.com/npm/npm/commit/a0a87777af8bee180e4e9321699f050c29ed5ac4) + [#7463](https://github.com/npm/npm/issues/7463) Split the list printed by + `npm run-script` into lifecycle scripts and scripts directly invoked via `npm + run-script`. ([@watilde](https://github.com/watilde)) +* [`a5edc17`](https://github.com/npm/npm/commit/a5edc17d5ef1435b468a445156a4a109df80f92b) + [#6749](https://github.com/npm/npm/issues/6749) `init-package-json@1.3.1`: + Support for passing scopes to `npm init` so packages are initialized as part + of that scope / organization / team. ([@watilde](https://github.com/watilde)) + +#### SMALLER FEATURES AND FIXES + +It turns out that quite a few pull requests had piled up on npm's issue +tracker, and they included some nice small features and fixes: + +* [`f33e8b8`](https://github.com/npm/npm/commit/f33e8b8ff2de094071c5976be95e35110cf2ab1a) + [#7354](https://github.com/npm/npm/issues/7354) Add `--if-present` flag to + allow e.g. CI systems to call (semi-) standard build tasks defined in + `package.json`, but don't raise an error if no such script is defined. + ([@jussi-kalliokoski](https://github.com/jussi-kalliokoski)) +* [`7bf85cc`](https://github.com/npm/npm/commit/7bf85cc372ab5698593b01e139c383fa62c92516) + [#4005](https://github.com/npm/npm/issues/4005) + [#6248](https://github.com/npm/npm/issues/6248) Globally unlink a package + when `npm rm` / `npm unlink` is called with no arguments. + ([@isaacs](https://github.com/isaacs)) +* [`a2e04bd`](https://github.com/npm/npm/commit/a2e04bd921feab8f9e40a27e180ca9308eb709d7) + [#7294](https://github.com/npm/npm/issues/7294) Ensure that when depending on + `git+<proto>` URLs, npm doesn't keep tacking additional `git+` prefixes onto + the front. ([@twhid](https://github.com/twhid)) +* [`0f87f5e`](https://github.com/npm/npm/commit/0f87f5ed28960d962f34977953561d22983da4f9) + [#6422](https://github.com/npm/npm/issues/6422) When depending on GitHub + private repositories, make sure we construct the Git URLS correctly. + ([@othiym23](https://github.com/othiym23)) +* [`50f461d`](https://github.com/npm/npm/commit/50f461d248c4d22e881a9535dccc1d57d994dbc7) + [#4595](https://github.com/npm/npm/issues/4595) Support finding compressed + manpages. It's still up to the system to figure out how to display them, + though. ([@pshevtsov](https://github.com/pshevtsov)) +* [`44da664`](https://github.com/npm/npm/commit/44da66456b530c049ff50953f78368460df87461) + [#7465](https://github.com/npm/npm/issues/7465) When calling git, log the + **full** command, with all arguments, on error. + ([@thriqon](https://github.com/thriqon)) +* [`9748d5c`](https://github.com/npm/npm/commit/9748d5cd195d0269b32caf45129a93d29359a796) + Add parent to error on `ETARGET` error. + ([@davglass](https://github.com/davglass)) +* [`37038d7`](https://github.com/npm/npm/commit/37038d7db47a986001f77ac17b3e164000fc8ff3) + [#4663](https://github.com/npm/npm/issues/4663) Remove hackaround for Linux + tests, as it's evidently no longer necessary. + ([@mmalecki](https://github.com/mmalecki)) +* [`d7b7853`](https://github.com/npm/npm/commit/d7b785393dffce93bb70317fbc039a6428ca37c5) + [#2612](https://github.com/npm/npm/issues/2612) Add support for path + completion on `npm install`, which narrows completion to only directories + containing `package.json` files. ([@deestan](https://github.com/deestan)) +* [`628fcdb`](https://github.com/npm/npm/commit/628fcdb0be4e14c0312085a50dc2ae01dc713fa6) + Remove all command completion calls to `-/short`, because it's been removed + from the primary registry for quite some time, and is generally a poor idea + on any registry with more than a few hundred packages. + ([@othiym23](https://github.com/othiym23)) +* [`3f6061d`](https://github.com/npm/npm/commit/3f6061d75650441ee690472d1fa9c8dd7a7b1b28) + [#6659](https://github.com/npm/npm/issues/6659) Instead of removing zsh + completion global, make it a local instead. + ([@othiym23](https://github.com/othiym23)) + +#### DOCUMENTATION TWEAKS + +* [`5bc70e6`](https://github.com/npm/npm/commit/5bc70e6cfb3598da433806c6f447fc94c8e1d35d) + [#7417](https://github.com/npm/npm/issues/7417) Provide concrete examples of + how the new `npm update` defaults work in practice, tied to actual test + cases. Everyone interested in using `npm update -g` now that it's been fixed + should read these documents, as should anyone interested in writing + documentation for npm. ([@smikes](https://github.com/smikes)) +* [`8ac6f21`](https://github.com/npm/npm/commit/8ac6f2123a6af13dc9447fad96ec9cb583c45a71) + [#6543](https://github.com/npm/npm/issues/6543) Clarify `npm-scripts` + warnings to de-emphasize dangers of using `install` scripts. + ([@zeke](https://github.com/zeke)) +* [`ebe3b37`](https://github.com/npm/npm/commit/ebe3b37098efdada41dcc4c52a291e29296ea242) + [#6711](https://github.com/npm/npm/issues/6711) Note that git tagging of + versions can be disabled via `--no-git-tag-verson`. + ([@smikes](https://github.com/smikes)) +* [`2ef5771`](https://github.com/npm/npm/commit/2ef5771632006e6cee8cf17f836c0f98ab494bd1) + [#6711](https://github.com/npm/npm/issues/6711) Document `git-tag-version` + configuration option. ([@KenanY](https://github.com/KenanY)) +* [`95e59b2`](https://github.com/npm/npm/commit/95e59b287c9517780318e145371a859e8ebb2d20) + Document that `NODE_ENV=production` behaves analogously to `--production` on + `npm install`. ([@stefaneg](https://github.com/stefaneg)) +* [`687117a`](https://github.com/npm/npm/commit/687117a5bcd6a838cd1532ea7020ec6fcf0c33c0) + [#7463](https://github.com/npm/npm/issues/7463) Document the new script + grouping behavior in the man page for `npm run-script`. + ([@othiym23](https://github.com/othiym23)) +* [`536b2b6`](https://github.com/npm/npm/commit/536b2b6f55c349247b3e79b5d11b4c033ef5a3df) + Rescue one of the the disabled tests and make it work properly. + ([@smikes](https://github.com/smikes)) + +#### DEPENDENCY UPDATES + +* [`89fc6a4`](https://github.com/npm/npm/commit/89fc6a4e7ff8c524675fcc14493ca0a1e3a76d38) + `which@1.0.9`: Test for being run as root, as well as the current user. + ([@isaacs](https://github.com/isaacs)) +* [`5d0612f`](https://github.com/npm/npm/commit/5d0612f31e226cba32a05351c47b055c0ab6c557) + `glob@4.4.1`: Better error message to explain why calling sync glob with a + callback results in an error. ([@isaacs](https://github.com/isaacs)) +* [`64b07f6`](https://github.com/npm/npm/commit/64b07f6caf6cb07e4102f1e4e5f2ff2b944e452e) + `tap@0.7.1`: More accurate counts of pending & skipped tests. + ([@rmg](https://github.com/rmg)) +* [`8fda451`](https://github.com/npm/npm/commit/8fda45195dae1d6f792be556abe87f7763fab09b) + `semver@4.3.1`: Make official the fact that `node-semver` has moved from + [@isaacs](https://github.com/isaacs)'s organization to + [@npm](https://github.com/npm)'s. ([@isaacs](https://github.com/isaacs)) + +### v2.6.1 (2015-02-19): + +* [`8b98f0e`](https://github.com/npm/npm/commit/8b98f0e709d77a8616c944aebd48ab726f726f76) + [#4471](https://github.com/npm/npm/issues/4471) `npm outdated` (and only `npm + outdated`) now defaults to `--depth=0`. See the [docs for + `--depth`](https://github.com/npm/npm/blob/82f484672adb1a3caf526a8a48832789495bb43d/doc/misc/npm-config.md#depth) + for the mildly confusing details. ([@smikes](https://github.com/smikes)) +* [`aa79194`](https://github.com/npm/npm/commit/aa791942a9f3c8af6a650edec72a675deb7a7c6e) + [#6565](https://github.com/npm/npm/issues/6565) Tweak `peerDependency` + deprecation warning to include which peer dependency on which package is + going to need to change. ([@othiym23](https://github.com/othiym23)) +* [`5fa067f`](https://github.com/npm/npm/commit/5fa067fd47682ac3cdb12a2b009d8ca59b05f992) + [#7171](https://github.com/npm/npm/issues/7171) Tweak `engineStrict` + deprecation warning to include which `package.json` is using it. + ([@othiym23](https://github.com/othiym23)) +* [`0fe0caa`](https://github.com/npm/npm/commit/0fe0caa7eddb7acdacbe5ee81ceabaca27175c78) + `glob@4.4.0`: Glob patterns can now ignore matches. + ([@isaacs](https://github.com/isaacs)) + +### v2.6.0 (2015-02-12): + +#### A LONG-AWAITED GUEST + +* [`38c4825`](https://github.com/npm/npm/commit/38c48254d3d217b4babf5027cb39492be4052fc2) + [#5068](https://github.com/npm/npm/issues/5068) Add new logout command, and + make it do something useful on both bearer-based and basic-based authed + clients. ([@othiym23](https://github.com/othiym23)) +* [`4bf0f5d`](https://github.com/npm/npm/commit/4bf0f5d56c33649124b486e016ba4a620c105c1c) + `npm-registry-client@6.1.1`: Support new `logout` endpoint to invalidate + token for sessions. ([@othiym23](https://github.com/othiym23)) + +#### DEPRECATIONS + +* [`c8e08e6`](https://github.com/npm/npm/commit/c8e08e6d91f4016c80f572aac5a2080df0f78098) + [#6565](https://github.com/npm/npm/issues/6565) Warn that `peerDependency` + behavior is changing and add a note to the docs. + ([@othiym23](https://github.com/othiym23)) +* [`7c81a5f`](https://github.com/npm/npm/commit/7c81a5f5f058941f635a92f22641ea68e79b60db) + [#7171](https://github.com/npm/npm/issues/7171) Warn that `engineStrict` in + `package.json` will be going away in the next major version of npm (coming + soon!) ([@othiym23](https://github.com/othiym23)) + +#### BUG FIXES & TWEAKS + +* [`add5890`](https://github.com/npm/npm/commit/add5890ce447dabf120b907a85f715df1e065f44) + [#4668](https://github.com/npm/npm/issues/4668) `read-package-json@1.3.1`: + Warn when a `bin` symbolic link is a dangling reference. + ([@nicks](https://github.com/nicks)) +* [`4b42071`](https://github.com/npm/npm/commit/4b420714dfb84338d85def78c30bd665e32d72c1) + `semver@4.3.0`: Add functions to extract parts of the version triple, fix a + typo. ([@isaacs](https://github.com/isaacs)) +* [`a9aff38`](https://github.com/npm/npm/commit/a9aff38719918486fc381d67ad3371c475632ff7) + Use full path for man pages as the symbolic link source, instead of just the + file name. ([@bengl](https://github.com/bengl)) +* [`6fd0fbd`](https://github.com/npm/npm/commit/6fd0fbd8a0347fd47cb7ee0064e0902a2f8a087c) + [#7233](https://github.com/npm/npm/issues/7233) Ensure `globalconfig` path + exists before trying to edit it. ([@ljharb](https://github.com/ljharb)) +* [`a0a2620`](https://github.com/npm/npm/commit/a0a262047647d9e2690cebe5a89e6a0dd33202bb) + `ini@1.3.3`: Allow embedded, quoted equals signs in ini field names. + ([@isaacs](https://github.com/isaacs)) + +Also typos and other documentation issues were addressed by +[@rutsky](https://github.com/rutsky), [@imurchie](https://github.com/imurchie), +[@marcin-wosinek](https://github.com/marcin-wosinek), +[@marr](https://github.com/marr), [@amZotti](https://github.com/amZotti), and +[@karlhorky](https://github.com/karlhorky). Thank you, everyone! + +### v2.5.1 (2015-02-06): + +This release doesn't look like much, but considerable effort went into ensuring +that npm's tests will pass on io.js 1.1.0 and Node 0.11.16 / 0.12.0 on both OS +X and Linux. + +**NOTE:** there are no actual changes to npm's code in `npm@2.5.1`. Only test +code (and the upgrade of `request` to the latest version) has changed. + +#### `npm-registry-mock@1.0.0`: + +* [`0e8d473`](https://github.com/npm/npm/commit/0e8d4736a1cbdda41ae8eba8a02c7ff7ce80c2ff) + [#7281](https://github.com/npm/npm/issues/7281) `npm-registry-mock@1.0.0`: + Clean up API, set `connection: close`. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`4707bba`](https://github.com/npm/npm/commit/4707bba7d44dfab85cc45c2ecafa9c1601ba2e9a) + Further update tests to work with `npm-registry-mock@1.0.0`. + ([@othiym23](https://github.com/othiym23)) +* [`41a0f89`](https://github.com/npm/npm/commit/41a0f8959d4e02af9661588afa7d2b4543cc21b6) + Got rid of completely gratuitous global config manipulation in tests. + ([@othiym23](https://github.com/othiym23)) + +#### MINOR DEPENDENCY TWEAK + +* [`a4c7af9`](https://github.com/npm/npm/commit/a4c7af9c692f250c0fd017397ed9514fc263b752) + `request@2.53.0`: Tweaks to tunneling proxy behavior. + ([@nylen](https://github.com/nylen)) + +### v2.5.0 (2015-01-29): + +#### SMALL FEATURE I HAVE ALREADY USED TO MAINTAIN NPM ITSELF + +* [`9d61e96`](https://github.com/npm/npm/commit/9d61e96fb1f48687a85c211e4e0cd44c7f95a38e) + `npm outdated --long` now includes a column showing the type of dependency. + ([@watilde](https://github.com/watilde)) + +#### BUG FIXES & TWEAKS + +* [`fec4c96`](https://github.com/npm/npm/commit/fec4c967ee235030bf31393e8605e9e2811f4a39) + Allow `--no-proxy` to override `HTTP_PROXY` setting in environment. + ([@othiym23](https://github.com/othiym23)) +* [`589acb9`](https://github.com/npm/npm/commit/589acb9714f395c2ad0d98cb0ac4236f1842d2cc) + Only set `access` when publshing when it's explicitly set. + ([@othiym23](https://github.com/othiym23)) +* [`1027087`](https://github.com/npm/npm/commit/102708704c8c4f0ea99775d38f8d1efecf584940) + Add script and `Makefile` stanza to update AUTHORS. + ([@KenanY](https://github.com/KenanY)) +* [`eeff04d`](https://github.com/npm/npm/commit/eeff04da7979a0181becd36b8777d607e7aa1787) + Add `NPMOPTS` to top-level install in `Makefile` to override `userconfig`. + ([@aredridel](https://github.com/aredridel)) +* [`0d17328`](https://github.com/npm/npm/commit/0d173287336650606d4c91818bb7bcfb0c5d57a1) + `fstream@1.0.4`: Run chown only when necessary. + ([@silkentrance](https://github.com/silkentrance)) +* [`9aa4622`](https://github.com/npm/npm/commit/9aa46226ee63b9e183fd49fc72d9bdb0fae9605e) + `columnify@1.4.1`: ES6ified! ([@timoxley](https://github.com/timoxley)) +* [`51b2fd1`](https://github.com/npm/npm/commit/51b2fd1974e38b825ac5ca4a852ab3c4142624cc) + Update default version in `docs/npm-config.md`. + ([@lucthev](https://github.com/lucthev)) + +#### `npm-registry-client@6.0.7`: + +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + [#7226](https://github.com/npm/npm/issues/7226) Ensure that all request + settings are copied onto the agent. + ([@othiym23](https://github.com/othiym23)) +* [`e186f6e`](https://github.com/npm/npm/commit/e186f6e7cfeb4db9c94d7375638f0b2f0d472947) + Only set `access` on publish when it differs from the norm. + ([@othiym23](https://github.com/othiym23)) +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + Allow overriding request's environment-based proxy handling. + ([@othiym23](https://github.com/othiym23)) +* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) + Properly handle retry failures on fetch. + ([@othiym23](https://github.com/othiym23)) + +### v2.4.1 (2015-01-23): + +![bridge that doesn't meet in the middle](http://www.static-18.themodernnomad.com/wp-content/uploads/2011/08/bridge-fail.jpg) + +Let's accentuate the positive: the `dist-tag` endpoints for `npm dist-tag +{add,rm,ls}` are now live on the public npm registry. + +* [`f70272b`](https://github.com/npm/npm/commit/f70272bed7d77032d1e21553371dd5662fef32f2) + `npm-registry-client@6.0.3`: Properly escape JSON tag version strings and + filter `_etag` from CouchDB docs. ([@othiym23](https://github.com/othiym23)) + +### v2.4.0 (2015-01-22): + +#### REGISTRY 2: ACCESS AND DIST-TAGS + +NOTE: This week's registry-2 commands are leading the implementation on +registry.npmjs.org a little bit, so some of the following may not work for +another week or so. Also note that `npm access` has documentation and +subcommands that are not yet finished, because they depend on incompletely +specified registry API endpoints. Things are coming together very quickly, +though, so expect the missing pieces to be filled in the coming weeks. + +* [`c963eb2`](https://github.com/npm/npm/commit/c963eb295cf766921b1680f4a71fd0ed3e1bcad8) + [#7181](https://github.com/npm/npm/issues/7181) NEW `npm access public` and + `npm access restricted`: Toggle visibility of scoped packages. + ([@othiym23](https://github.com/othiym23)) +* [`dc51810`](https://github.com/npm/npm/commit/dc51810e08c0f104259146c9c035d255de4f7d1d) + [#6243](https://github.com/npm/npm/issues/6243) / + [#6854](https://github.com/npm/npm/issues/6854) NEW `npm dist-tags`: Directly + manage `dist-tags` on packages. Most notably, `dist-tags` can now be deleted. + ([@othiym23](https://github.com/othiym23)) +* [`4c7c132`](https://github.com/npm/npm/commit/4c7c132a6b8305dca2974943226c39c0cdc64ff9) + [#7181](https://github.com/npm/npm/issues/7181) / + [#6854](https://github.com/npm/npm/issues/6854) `npm-registry-client@6.0.1`: + Add new `access` and `dist-tags` endpoints + ([@othiym23](https://github.com/othiym23)) + +#### NOT EXACTLY SELF-DEPRECATING + +* [`10d5c77`](https://github.com/npm/npm/commit/10d5c77653487f15759ac7de262a97e9c655240c) + [#6274](https://github.com/npm/npm/issues/6274) Deprecate `npm tag` in favor + of `npm dist-tag`. ([@othiym23](https://github.com/othiym23)) + +#### BUG FIX AND TINY FEATURE + +* [`29a6ef3`](https://github.com/npm/npm/commit/29a6ef38ef86ac318c5d9ea4bee28ce614672fa6) + [#6850](https://github.com/npm/npm/issues/6850) Be smarter about determining + base of file deletion when unbuilding. ([@phated](https://github.com/phated)) +* [`4ad01ea`](https://github.com/npm/npm/commit/4ad01ea2930a7a1cf88be121cc5ce9eba40c6807) + `init-package-json@1.2.0`: Support `--save-exact` in `npm init`. + ([@gustavnikolaj](https://github.com/gustavnikolaj)) + +### v2.3.0 (2015-01-15): + +#### REGISTRY 2: OH MY STARS! WHO AM I? + +* [`e662a60`](https://github.com/npm/npm/commit/e662a60e2f9a542effd8e72279d4622fe514415e) + The new `whoami` endpoint might not return a value. + ([@othiym23](https://github.com/othiym23)) +* [`c2cccd4`](https://github.com/npm/npm/commit/c2cccd4bbc65885239ed646eb510155f7b8af13d) + `npm-registry-client@5.0.0`: Includes the following fine changes + ([@othiym23](https://github.com/othiym23)): + * [`ba6b73e`](https://github.com/npm/npm-registry-client/commit/ba6b73e351027246c228622014e4441412409bad) + [#92](https://github.com/npm/npm-registry-client/issues/92) BREAKING CHANGE: + Move `/whoami` endpoint out of the package namespace (to `/-/whoami`). + ([@othiym23](https://github.com/othiym23)) + * [`3b174b7`](https://github.com/npm/npm-registry-client/commit/3b174b75c0c9ea77e298e6bb664fb499824ecc7c) + [#93](https://github.com/npm/npm-registry-client/issues/93) Registries based + on token-based auth can now offer starring. + ([@bcoe](https://github.com/bcoe)) + * [`4701a29`](https://github.com/npm/npm-registry-client/commit/4701a29bcda41bc14aa91f361dd0d576e24677d7) + Fix HTTP[S] connection keep-alive on Node 0.11 / io.js 1.0. + ([@fengmk2](https://github.com/fengmk2)) + +#### BETTER REGISTRY METADATA CACHING + +* [`98e1e10`](https://github.com/npm/npm/commit/98e1e1080df1f2cab16ed68035603950ea3d2d48) + [#6791](https://github.com/npm/npm/issues/6791) Add caching based on + Last-Modified / If-Modified-Since headers. Includes this + `npm-registry-client@5.0.0` change ([@lxe](https://github.com/lxe)): + * [`07bc335`](https://github.com/npm/npm-registry-client/commit/07bc33502b93554cd7539bfcce37d6e2d5404cd0) + [#86](https://github.com/npm/npm-registry-client/issues/86) Add Last-Modified + / If-Modified-Since cache header handling. ([@lxe](https://github.com/lxe)) + +#### HOW MUCH IS THAT WINDOWS IN THE DOGGY? + +* [`706d49a`](https://github.com/npm/npm/commit/706d49ab45521360fce1a68779b8de899015d8c2) + [#7107](https://github.com/npm/npm/issues/7107) `getCacheStat` passes a stub + stat on Windows. ([@rmg](https://github.com/rmg)) +* [`5fce278`](https://github.com/npm/npm/commit/5fce278a688a1cb79183e012bde40b089c2e97a4) + [#5267](https://github.com/npm/npm/issues/5267) Use `%COMSPEC%` when set on + Windows. ([@edmorley](https://github.com/edmorley)) +* [`cc2e099`](https://github.com/npm/npm/commit/cc2e09912ce2f91567c485422e4e797c4deb9842) + [#7083](https://github.com/npm/npm/issues/7083) Ensure Git cache prefix + exists before repo clone on Windows. + ([@othiym23](https://github.com/othiym23)) + +#### THRILLING BUG FIXES + +* [`c6fb430`](https://github.com/npm/npm/commit/c6fb430e55672b3caf87d25cbd2aeeebc449e2f2) + [#4197](https://github.com/npm/npm/issues/4197) Report `umask` as a 0-padded + octal literal. ([@smikes](https://github.com/smikes)) +* [`209713e`](https://github.com/npm/npm/commit/209713ebd4b77da11ce27d90c3346f78d760ba52) + [#4197](https://github.com/npm/npm/issues/4197) `umask@1.1.0`: Properly + handle `umask`s (i.e. not decimal numbers). + ([@smikes](https://github.com/smikes)) +* [`9eac0a1`](https://github.com/npm/npm/commit/9eac0a14488c5979ebde4c17881c8cd74f395069) + Make the example for bin links non-destructive. + ([@KevinSheedy](https://github.com/KevinSheedy)) +* [`6338bcf`](https://github.com/npm/npm/commit/6338bcfcd9cd1b0cc48b051dae764dc436ab5332) + `glob@4.3.5`: " -> ', for some reason. ([@isaacs](https://github.com/isaacs)) + +### v2.2.0 (2015-01-08): + +* [`88c531d`](https://github.com/npm/npm/commit/88c531d1c0b3aced8f2a09632db01b5635e7226a) + [#7056](https://github.com/npm/npm/issues/7056) version doesn't need a + package.json. ([@othiym23](https://github.com/othiym23)) +* [`2656c19`](https://github.com/npm/npm/commit/2656c19f6b915c3173acc3b6f184cc321563da5f) + [#7095](https://github.com/npm/npm/issues/7095) Link to npm website instead + of registry. ([@konklone](https://github.com/konklone)) +* [`c76b801`](https://github.com/npm/npm/commit/c76b8013bf1758587565822626171b76cb465c9e) + [#7067](https://github.com/npm/npm/issues/7067) Obfuscate secrets, including + nerfed URLs. ([@smikes](https://github.com/smikes)) +* [`17f66ce`](https://github.com/npm/npm/commit/17f66ceb1bd421084e4ae82a6b66634a6e272929) + [#6849](https://github.com/npm/npm/issues/6849) Explain the tag workflow more + clearly. ([@smikes](https://github.com/smikes)) +* [`e309df6`](https://github.com/npm/npm/commit/e309df642de33d10d6dffadaa8a5d214a924d0dc) + [#7096](https://github.com/npm/npm/issues/7096) Really, `npm update -g` is + almost always a terrible idea. ([@smikes](https://github.com/smikes)) +* [`acf287d`](https://github.com/npm/npm/commit/acf287d2547c8a0a8871652c164019261b666d55) + [#6999](https://github.com/npm/npm/issues/6999) `npm run-script env`: add a + new default script that will print out environment values. + ([@gcb](https://github.com/gcb)) +* [`560c009`](https://github.com/npm/npm/commit/560c00945d4dec926cd29193e336f137c7f3f951) + [#6745](https://github.com/npm/npm/issues/6745) Document `npm update --dev`. + ([@smikes](https://github.com/smikes)) +* [`226a677`](https://github.com/npm/npm/commit/226a6776a1a9e28570485623b8adc2ec4b041335) + [#7046](https://github.com/npm/npm/issues/7046) We have never been the Node + package manager. ([@linclark](https://github.com/linclark)) +* [`38eef22`](https://github.com/npm/npm/commit/38eef2248f03bb8ab04cae1833e2a228fb887f3c) + `npm-install-checks@1.0.5`: Compatibility with npmlog@^1. + ([@iarna](https://github.com/iarna)) + +### v2.1.18 (2015-01-01): + +* [`bf8640b`](https://github.com/npm/npm/commit/bf8640b0395b5dff71260a0cede7efc699a7bcf5) + [#7044](https://github.com/npm/npm/issues/7044) Document `.npmignore` syntax. + ([@zeke](https://github.com/zeke)) + +### v2.1.17 (2014-12-25): + +merry npm xmas + +Working with [@phated](https://github.com/phated), I discovered that npm still +had some lingering race conditions around how it handles Git dependencies. The +following changes were intended to remedy to these issues. Thanks to +[@phated](https://github.com/phated) for all his help getting to the bottom of +these. + +* [`bdf1c84`](https://github.com/npm/npm/commit/bdf1c8483f5c4ad79b712db12d73276e15883923) + [#7006](https://github.com/npm/npm/issues/7006) Only `chown` template and + top-level Git cache directories. ([@othiym23](https://github.com/othiym23)) +* [`581a72d`](https://github.com/npm/npm/commit/581a72da18f35ec87edef6255adf4ef4714a478c) + [#7006](https://github.com/npm/npm/issues/7006) Map Git remote inflighting to + clone paths rather than Git URLs. ([@othiym23](https://github.com/othiym23)) +* [`1c48d08`](https://github.com/npm/npm/commit/1c48d08dea31a11ac11a285cac598a482481cade) + [#7009](https://github.com/npm/npm/issues/7009) `normalize-git-url@1.0.0`: + Normalize Git URLs while caching. ([@othiym23](https://github.com/othiym23)) +* [`5423cf0`](https://github.com/npm/npm/commit/5423cf0be8ff2b76bfff7c8e780e5f261235a86a) + [#7009](https://github.com/npm/npm/issues/7009) Pack tarballs to their final + locations atomically. ([@othiym23](https://github.com/othiym23)) +* [`7f6557f`](https://github.com/npm/npm/commit/7f6557ff317469ee4a87c542ff9a991e74ce9f38) + [#7009](https://github.com/npm/npm/issues/7009) Inflight local directory + packing, just to be safe. ([@othiym23](https://github.com/othiym23)) + +Other changes: + +* [`1c491e6`](https://github.com/npm/npm/commit/1c491e65d70af013e8d5ac008d6d9762d6d91793) + [#6991](https://github.com/npm/npm/issues/6991) `npm version`: fix regression + in dirty-checking behavior ([@rlidwka](https://github.com/rlidwka)) +* [`55ceb2b`](https://github.com/npm/npm/commit/55ceb2b08ff8a0f56b94cc972ca15d7862e8733c) + [#1991](https://github.com/npm/npm/issues/1991) modify docs to reflect actual + `npm restart` behavior ([@smikes](https://github.com/smikes)) +* [`fb8e31b`](https://github.com/npm/npm/commit/fb8e31b95476a50bda35a665a99eec8a5d25a4db) + [#6982](https://github.com/npm/npm/issues/6982) when doing registry + operations, ensure registry URL always ends with `/` + ([@othiym23](https://github.com/othiym23)) +* [`5bcba65`](https://github.com/npm/npm/commit/5bcba65bed2678ffe80fb596f72abe9871d131c8) + pull whitelisted Git environment variables out into a named constant + ([@othiym23](https://github.com/othiym23)) +* [`be04bbd`](https://github.com/npm/npm/commit/be04bbdc52ebfc820cd939df2f7d79fe87067747) + [#7000](https://github.com/npm/npm/issues/7000) No longer install badly-named + manpage files, and log an error when trying to uninstall them. + ([@othiym23](https://github.com/othiym23)) +* [`6b7c5ec`](https://github.com/npm/npm/commit/6b7c5eca6b65e1247d0e51f6400cf2637ac880ce) + [#7011](https://github.com/npm/npm/issues/7011) Send auth for tarball fetches + for packages in `npm-shrinkwrap.json` from private registries. + ([@othiym23](https://github.com/othiym23)) +* [`9b9de06`](https://github.com/npm/npm/commit/9b9de06a99893b40aa23f0335726dec6df7979db) + `glob@4.3.2`: Better handling of trailing slashes. + ([@isaacs](https://github.com/isaacs)) +* [`030f3c7`](https://github.com/npm/npm/commit/030f3c7450b8ce124a19073bfbae0948a0a1a02c) + `semver@4.2.0`: Diffing between version strings. + ([@isaacs](https://github.com/isaacs)) + +### v2.1.16 (2014-12-22): + +* [`a4e4e33`](https://github.com/npm/npm/commit/a4e4e33edb35c68813f04bf42bdf933a6f727bcd) + [#6987](https://github.com/npm/npm/issues/6987) `read-installed@3.1.5`: fixed + a regression where a new / empty package would cause read-installed to throw. + ([@othiym23](https://github.com/othiym23) / + [@pgilad](https://github.com/pgilad)) + +### v2.1.15 (2014-12-18): + +* [`e5a2dee`](https://github.com/npm/npm/commit/e5a2dee47c74f26c56fee5998545b97497e830c8) + [#6951](https://github.com/npm/npm/issues/6951) `fs-vacuum@1.2.5`: Use + `path-is-inside` for better Windows normalization. + ([@othiym23](https://github.com/othiym23)) +* [`ac6167c`](https://github.com/npm/npm/commit/ac6167c2b9432939c57296f7ddd11ad5f8f918b2) + [#6955](https://github.com/npm/npm/issues/6955) Call `path.normalize` in + `lib/utils/gently-rm.js` for better Windows normalization. + ([@ben-page](https://github.com/ben-page)) +* [`c625d71`](https://github.com/npm/npm/commit/c625d714795e3b5badd847945e2401adfad5a196) + [#6964](https://github.com/npm/npm/issues/6964) Clarify CA configuration + docs. ([@jeffjo](https://github.com/jeffjo)) +* [`58b8cb5`](https://github.com/npm/npm/commit/58b8cb5cdf26a854358b7c2ab636572dba9bac16) + [#6950](https://github.com/npm/npm/issues/6950) Fix documentation typos. + ([@martinvd](https://github.com/martinvd)) +* [`7c1299d`](https://github.com/npm/npm/commit/7c1299d00538ea998684a1903a4091eafc63b7f1) + [#6909](https://github.com/npm/npm/issues/6909) Remove confusing mention of + rubygems `~>` semver operator. ([@mjtko](https://github.com/mjtko)) +* [`7dfdcc6`](https://github.com/npm/npm/commit/7dfdcc6debd8ef1fc52a2b508997d15887aad824) + [#6909](https://github.com/npm/npm/issues/6909) `semver@4.1.1`: Synchronize + documentation with PR [#6909](https://github.com/npm/npm/issues/6909) + ([@othiym23](https://github.com/othiym23)) +* [`adfddf3`](https://github.com/npm/npm/commit/adfddf3b682e0ae08e4b59d87c1b380dd651c572) + [#6925](https://github.com/npm/npm/issues/6925) Correct typo in + `doc/api/npm-ls.md` ([@oddurs](https://github.com/oddurs)) +* [`f5c534b`](https://github.com/npm/npm/commit/f5c534b711ab173129baf366c4f08d68f6117333) + [#6920](https://github.com/npm/npm/issues/6920) Remove recommendation to run + as root from `README.md`. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`3ef4459`](https://github.com/npm/npm/commit/3ef445922cd39f25b992d91bd22c4d367882ea22) + [#6920](https://github.com/npm/npm/issues/6920) `npm-@googlegroups.com` has + gone the way of all things. That means it's gone. + ([@robertkowalski](https://github.com/robertkowalski)) + +### v2.1.14 (2014-12-13): + +* [`cf7aeae`](https://github.com/npm/npm/commit/cf7aeae3c3a24e48d3de4006fa082f0c6040922a) + [#6923](https://github.com/npm/npm/issues/6923) Overaggressive link update + for new website broke node-gyp. ([@othiym23](https://github.com/othiym23)) + +### v2.1.13 (2014-12-11): + +* [`cbb890e`](https://github.com/npm/npm/commit/cbb890eeacc0501ba1b8c6955f1c829c8af9f486) + [#6897](https://github.com/npm/npm/issues/6897) npm is a nice package manager + that runs server-side JavaScript. ([@othiym23](https://github.com/othiym23)) +* [`d9043c3`](https://github.com/npm/npm/commit/d9043c3b8d7450c3cb9ca795028c0e1c05377820) + [#6893](https://github.com/npm/npm/issues/6893) Remove erroneous docs about + preupdate / update / postupdate lifecycle scripts, which have never existed. + ([@devTristan](https://github.com/devTristan)) +* [`c5df4d0`](https://github.com/npm/npm/commit/c5df4d0d683cd3506808d1cd1acebff02a8b82db) + [#6884](https://github.com/npm/npm/issues/6884) Update npmjs.org to npmjs.com + in docs. ([@linclark](https://github.com/linclark)) +* [`cb6ff8d`](https://github.com/npm/npm/commit/cb6ff8dace1b439851701d4784d2d719c22ca7a7) + [#6879](https://github.com/npm/npm/issues/6879) npm version: Update + shrinkwrap post-check. ([@othiym23](https://github.com/othiym23)) +* [`2a340bd`](https://github.com/npm/npm/commit/2a340bdd548c6449468281e1444a032812bff677) + [#6868](https://github.com/npm/npm/issues/6868) Use magic numbers instead of + regexps to distinguish tarballs from other things. + ([@daxxog](https://github.com/daxxog)) +* [`f1c8bdb`](https://github.com/npm/npm/commit/f1c8bdb3f6b753d0600597e12346bdc3a34cb9c1) + [#6861](https://github.com/npm/npm/issues/6861) `npm-registry-client@4.0.5`: + Distinguish between error properties that are part of the response and error + strings that should be returned to the user. + ([@disrvptor](https://github.com/disrvptor)) +* [`d3a1b63`](https://github.com/npm/npm/commit/d3a1b6397fddef04b5198ca89d36d720aeb05eb6) + [#6762](https://github.com/npm/npm/issues/6762) Make `npm outdated` ignore + private packages. ([@KenanY](https://github.com/KenanY)) +* [`16d8542`](https://github.com/npm/npm/commit/16d854283ca5bcdb0cb2812fc5745d841652b952) + install.sh: Drop support for node < 0.8, remove engines bits. + ([@isaacs](https://github.com/isaacs)) +* [`b9c6046`](https://github.com/npm/npm/commit/b9c60466d5b713b1dc2947da14a5dfe42352e029) + `init-package-json@1.1.3`: ([@terinstock](https://github.com/terinstock)) + noticed that `init.license` configuration doesn't stick. Make sure that + dashed defaults don't trump dotted parameters. + ([@othiym23](https://github.com/othiym23)) +* [`b6d6acf`](https://github.com/npm/npm/commit/b6d6acfc02c8887f78067931babab8f7c5180fed) + `which@1.0.8`: No longer use graceful-fs for some reason. + ([@isaacs](https://github.com/isaacs)) +* [`d39f673`](https://github.com/npm/npm/commit/d39f673caf08a90fb2bb001d79c98062d2cd05f4) + `request@2.51.0`: Incorporate bug fixes. ([@nylen](https://github.com/nylen)) +* [`c7ad727`](https://github.com/npm/npm/commit/c7ad7279cc879930ec58ccc62fa642e621ecb65c) + `columnify@1.3.2`: Incorporate bug fixes. + ([@timoxley](https://github.com/timoxley)) + +### v2.1.12 (2014-12-04): + +* [`e5b1e44`](https://github.com/npm/npm/commit/e5b1e448bb4a9d6eae4ba0f67b1d3c2cea8ed383) + add alias verison=version ([@isaacs](https://github.com/isaacs)) +* [`5eed7bd`](https://github.com/npm/npm/commit/5eed7bddbd7bb92a44c4193c93e8529500c558e6) + `request@2.49.0` ([@nylen](https://github.com/nylen)) +* [`e72f81d`](https://github.com/npm/npm/commit/e72f81d8412540ae7d1e0edcc37c11bcb8169051) + `glob@4.3.1` / `minimatch@2.0.1` ([@isaacs](https://github.com/isaacs)) +* [`b8dcc36`](https://github.com/npm/npm/commit/b8dcc3637b5b71933b97162b7aff1b1a622c13e2) + `graceful-fs@3.0.5` ([@isaacs](https://github.com/isaacs)) + +### v2.1.11 (2014-11-27): + +* [`4861d28`](https://github.com/npm/npm/commit/4861d28ad0ebd959fe6bc15b9c9a50fcabe57f55) + `which@1.0.7`: License update. ([@isaacs](https://github.com/isaacs)) +* [`30a2ea8`](https://github.com/npm/npm/commit/30a2ea80c891d384b31a1cf28665bba4271915bd) + `ini@1.3.2`: License update. ([@isaacs](https://github.com/isaacs)) +* [`6a4ea05`](https://github.com/npm/npm/commit/6a4ea054f6ddf52fc58842ba2046564b04c5c0e2) + `fstream@1.0.3`: Propagate error events to downstream streams. + ([@gfxmonk](https://github.com/gfxmonk)) +* [`a558695`](https://github.com/npm/npm/commit/a5586954f1c18df7c96137e0a79f41a69e7a884e) + `tar@1.0.3`: Don't extract broken files, propagate `drain` event. + ([@gfxmonk](https://github.com/gfxmonk)) +* [`989624e`](https://github.com/npm/npm/commit/989624e8321f87734c1b1272fc2f646e7af1f81c) + [#6767](https://github.com/npm/npm/issues/6767) Actually pass parameters when + adding git repo to cach under Windows. + ([@othiym23](https://github.com/othiym23)) +* [`657af73`](https://github.com/npm/npm/commit/657af7308f7d6cd2f81389fcf0d762252acaf1ce) + [#6774](https://github.com/npm/npm/issues/6774) When verifying paths on + unbuild, resolve both source and target as symlinks. + ([@hokaccha](https://github.com/hokaccha)) +* [`fd19c40`](https://github.com/npm/npm/commit/fd19c4046414494f9647a6991c00f8406a939929) + [#6713](https://github.com/npm/npm/issues/6713) + `realize-package-specifier@1.3.0`: Make it so that `npm install foo@1` work + when a file named `1` exists. ([@iarna](https://github.com/iarna)) +* [`c8ac37a`](https://github.com/npm/npm/commit/c8ac37a470491b2ed28514536e2e198494638c79) + `npm-registry-client@4.0.4`: Fix regression in failed fetch retries. + ([@othiym23](https://github.com/othiym23)) + +### v2.1.10 (2014-11-20): + +* [`756f3d4`](https://github.com/npm/npm/commit/756f3d40fe18bc02bc93afe17016dfcc266c4b6b) + [#6735](https://github.com/npm/npm/issues/6735) Log "already built" messages + at info, not error. ([@smikes](https://github.com/smikes)) +* [`1b7330d`](https://github.com/npm/npm/commit/1b7330dafba3bbba171f74f1e58b261cb1b9301e) + [#6729](https://github.com/npm/npm/issues/6729) `npm-registry-client@4.0.3`: + GitHub won't redirect you through an HTML page to a compressed tarball if you + don't tell it you accept JSON responses. + ([@KenanY](https://github.com/KenanY)) +* [`d9c7857`](https://github.com/npm/npm/commit/d9c7857be02dacd274e55bf6d430d90d91509d53) + [#6506](https://github.com/npm/npm/issues/6506) + `readdir-scoped-modules@1.0.1`: Use `graceful-fs` so the whole dependency + tree gets read, even in case of `EMFILE`. + ([@sakana](https://github.com/sakana)) +* [`3a085be`](https://github.com/npm/npm/commit/3a085be158ace8f1e4395e69f8c102d3dea00c5f) + Grammar fix in docs. ([@icylace](https://github.com/icylace)) +* [`3f8e2ff`](https://github.com/npm/npm/commit/3f8e2ff8342d327d6f1375437ecf4bd945dc360f) + Did you know that npm has a Code of Conduct? Add a link to it to + CONTRIBUTING.md. ([@isaacs](https://github.com/isaacs)) +* [`319ccf6`](https://github.com/npm/npm/commit/319ccf633289e06e57a80d74c39706899348674c) + `glob@4.2.1`: Performance tuning. ([@isaacs](https://github.com/isaacs)) +* [`835f046`](https://github.com/npm/npm/commit/835f046e7568c33e81a0b48c84cff965024d8b8a) + `readable-stream@1.0.33`: Bug fixes. ([@rvagg](https://github.com/rvagg)) +* [`a34c38d`](https://github.com/npm/npm/commit/a34c38d0732fb246d11f2a776d2ad0d8db654338) + `request@2.48.0`: Bug fixes. ([@nylen](https://github.com/nylen)) + +### v2.1.9 (2014-11-13): + +* [`eed9f61`](https://github.com/npm/npm/commit/eed9f6101963364acffc59d7194fc1655180e80c) + [#6542](https://github.com/npm/npm/issues/6542) `npm owner add / remove` now + works properly with scoped packages + ([@othiym23](https://github.com/othiym23)) +* [`cd25973`](https://github.com/npm/npm/commit/cd25973825aa5315b7ebf26227bd32bd6be5533f) + [#6548](https://github.com/npm/npm/issues/6548) using sudo won't leave the + cache's git directories with bad permissions + ([@othiym23](https://github.com/othiym23)) +* [`56930ab`](https://github.com/npm/npm/commit/56930abcae6a6ea41f1b75e23765c61259cef2dd) + fixed irregular `npm cache ls` output (yes, that's a thing) + ([@othiym23](https://github.com/othiym23)) +* [`740f483`](https://github.com/npm/npm/commit/740f483db6ec872b453065842da080a646c3600a) + legacy tests no longer poison user's own cache + ([@othiym23](https://github.com/othiym23)) +* [`ce37f14`](https://github.com/npm/npm/commit/ce37f142a487023747a9086335618638ebca4372) + [#6169](https://github.com/npm/npm/issues/6169) add terse output similar to + `npm publish / unpublish` for `npm owner add / remove` + ([@KenanY](https://github.com/KenanY)) +* [`bf2b8a6`](https://github.com/npm/npm/commit/bf2b8a66d7188900bf1e957c052b893948b67e0e) + [#6680](https://github.com/npm/npm/issues/6680) pass auth credentials to + registry when downloading search index + ([@terinjokes](https://github.com/terinjokes)) +* [`00ecb61`](https://github.com/npm/npm/commit/00ecb6101422984696929f602e14da186f9f669c) + [#6400](https://github.com/npm/npm/issues/6400) `.npmignore` is respected for + git repos on cache / pack / publish + ([@othiym23](https://github.com/othiym23)) +* [`d1b3a9e`](https://github.com/npm/npm/commit/d1b3a9ec5e2b6d52765ba5da5afb08dba41c49c1) + [#6311](https://github.com/npm/npm/issues/6311) `npm ls -l --depth=0` no + longer prints phantom duplicate children + ([@othiym23](https://github.com/othiym23)) +* [`07c5f34`](https://github.com/npm/npm/commit/07c5f34e45c9b18c348ed53b5763b1c5d4325740) + [#6690](https://github.com/npm/npm/issues/6690) `uid-number@0.0.6`: clarify + confusing names in error-handling code ([@isaacs](https://github.com/isaacs)) +* [`1ac9be9`](https://github.com/npm/npm/commit/1ac9be9f3bab816211d72d13cb05b5587878a586) + [#6684](https://github.com/npm/npm/issues/6684) `npm init`: don't report + write if canceled ([@smikes](https://github.com/smikes)) +* [`7bb207d`](https://github.com/npm/npm/commit/7bb207d1d6592a9cffc986871e4b671575363c2f) + [#5754](https://github.com/npm/npm/issues/5754) never remove app directories + on failed install ([@othiym23](https://github.com/othiym23)) +* [`705ce60`](https://github.com/npm/npm/commit/705ce601e7b9c5428353e02ebb30cb76c1991fdd) + [#5754](https://github.com/npm/npm/issues/5754) `fs-vacuum@1.2.2`: don't + throw when another fs task writes to a directory being vacuumed + ([@othiym23](https://github.com/othiym23)) +* [`1b650f4`](https://github.com/npm/npm/commit/1b650f4f217c413a2ffb96e1701beb5aa67a0de2) + [#6255](https://github.com/npm/npm/issues/6255) ensure that order credentials + are used from `.npmrc` doesn't regress + ([@othiym23](https://github.com/othiym23)) +* [`9bb2c34`](https://github.com/npm/npm/commit/9bb2c3435cedef40b45d3e9bd7a8edfb8cbe7209) + [#6644](https://github.com/npm/npm/issues/6644) `warn` rather than `info` on + fetch failure ([@othiym23](https://github.com/othiym23)) +* [`e34a7b6`](https://github.com/npm/npm/commit/e34a7b6b7371b1893a062f627ae8e168546d7264) + [#6524](https://github.com/npm/npm/issues/6524) `npm-registry-client@4.0.2`: + proxy via `request` more transparently + ([@othiym23](https://github.com/othiym23)) +* [`40afd6a`](https://github.com/npm/npm/commit/40afd6aaf34c11a10e80ec87b115fb2bb907e3bd) + [#6524](https://github.com/npm/npm/issues/6524) push proxy settings into + `request` ([@tauren](https://github.com/tauren)) + +### v2.1.8 (2014-11-06): + +* [`063d843`](https://github.com/npm/npm/commit/063d843965f9f0bfa5732d7c2d6f5aa37a8260a2) + npm version now updates version in npm-shrinkwrap.json + ([@faiq](https://github.com/faiq)) +* [`3f53cd7`](https://github.com/npm/npm/commit/3f53cd795f8a600e904a97f215ba5b5a9989d9dd) + [#6559](https://github.com/npm/npm/issues/6559) save local dependencies in + npm-shrinkwrap.json ([@Torsph](https://github.com/Torsph)) +* [`e249262`](https://github.com/npm/npm/commit/e24926268b2d2220910bc81cce6d3b2e08d94eb1) + npm-faq.md: mention scoped pkgs in namespace Q + ([@smikes](https://github.com/smikes)) +* [`6b06ec4`](https://github.com/npm/npm/commit/6b06ec4ef5da490bdca1512fa7f12490245c192b) + [#6642](https://github.com/npm/npm/issues/6642) `init-package-json@1.1.2`: + Handle both `init-author-name` and `init.author.name`. + ([@othiym23](https://github.com/othiym23)) +* [`9cb334c`](https://github.com/npm/npm/commit/9cb334c8a895a55461aac18791babae779309a0e) + [#6409](https://github.com/npm/npm/issues/6409) document commit-ish with + GitHub URLs ([@smikes](https://github.com/smikes)) +* [`0aefae9`](https://github.com/npm/npm/commit/0aefae9bc2598a4b7a3ee7bb2306b42e3e12bb28) + [#2959](https://github.com/npm/npm/issues/2959) npm run no longer fails + silently ([@flipside](https://github.com/flipside)) +* [`e007a2c`](https://github.com/npm/npm/commit/e007a2c1e4fac1759fa61ac6e78c6b83b2417d11) + [#3908](https://github.com/npm/npm/issues/3908) include command in spawn + errors ([@smikes](https://github.com/smikes)) + +### v2.1.7 (2014-10-30): + +* [`6750b05`](https://github.com/npm/npm/commit/6750b05dcba20d8990a672957ec56c48f97e241a) + [#6398](https://github.com/npm/npm/issues/6398) `npm-registry-client@4.0.0`: + consistent API, handle relative registry paths, use auth more consistently + ([@othiym23](https://github.com/othiym23)) +* [`7719cfd`](https://github.com/npm/npm/commit/7719cfdd8b204dfeccc41289707ea58b4d608905) + [#6560](https://github.com/npm/npm/issues/6560) use new npm-registry-client + API ([@othiym23](https://github.com/othiym23)) +* [`ed61971`](https://github.com/npm/npm/commit/ed619714c93718b6c1922b8c286f4b6cd2b97c80) + move caching of search metadata from `npm-registry-client` to npm itself + ([@othiym23](https://github.com/othiym23)) +* [`3457041`](https://github.com/npm/npm/commit/34570414cd528debeb22943873440594d7f47abf) + handle caching of metadata independently from `npm-registry-client` + ([@othiym23](https://github.com/othiym23)) +* [`20a331c`](https://github.com/npm/npm/commit/20a331ced6a52faac6ec242e3ffdf28bcd447c40) + [#6538](https://github.com/npm/npm/issues/6538) map registry URLs to + credentials more safely ([@indexzero](https://github.com/indexzero)) +* [`4072e97`](https://github.com/npm/npm/commit/4072e97856bf1e7affb38333d080c172767eea27) + [#6589](https://github.com/npm/npm/issues/6589) `npm-registry-client@4.0.1`: + allow publishing of packages with names identical to built-in Node modules + ([@feross](https://github.com/feross)) +* [`254f0e4`](https://github.com/npm/npm/commit/254f0e4adaf2c56e9df25c7343c43b0b0804a3b5) + `tar@1.0.2`: better error-handling ([@runk](https://github.com/runk)) +* [`73ee2aa`](https://github.com/npm/npm/commit/73ee2aa4f1a47e43fe7cf4317a5446875f7521fa) + `request@2.47.0` ([@mikeal](https://github.com/mikeal)) + +### v2.1.6 (2014-10-23): + +* [`681b398`](https://github.com/npm/npm/commit/681b3987a18e7aba0aaf78c91a23c7cc0ab82ce8) + [#6523](https://github.com/npm/npm/issues/6523) fix default `logelevel` doc + ([@KenanY](https://github.com/KenanY)) +* [`80b368f`](https://github.com/npm/npm/commit/80b368ffd786d4d008734b56c4a6fe12d2cb2926) + [#6528](https://github.com/npm/npm/issues/6528) `npm version` should work in + a git directory without git ([@terinjokes](https://github.com/terinjokes)) +* [`5f5f9e4`](https://github.com/npm/npm/commit/5f5f9e4ddf544c2da6adf3f8c885238b0e745076) + [#6483](https://github.com/npm/npm/issues/6483) `init-package-json@1.1.1`: + Properly pick up default values from environment variables. + ([@othiym23](https://github.com/othiym23)) +* [`a114870`](https://github.com/npm/npm/commit/a1148702f53f82d49606b2e4dac7581261fff442) + perl 5.18.x doesn't like -pi without filenames + ([@othiym23](https://github.com/othiym23)) +* [`de5ba00`](https://github.com/npm/npm/commit/de5ba007a48db876eb5bfb6156435f3512d58977) + `request@2.46.0`: Tests and cleanup. + ([@othiym23](https://github.com/othiym23)) +* [`76933f1`](https://github.com/npm/npm/commit/76933f169f17b5273b32e924a7b392d5729931a7) + `fstream-npm@1.0.1`: Always include `LICENSE[.*]`, `LICENCE[.*]`, + `CHANGES[.*]`, `CHANGELOG[.*]`, and `HISTORY[.*]`. + ([@jonathanong](https://github.com/jonathanong)) + +### v2.1.5 (2014-10-16): + +* [`6a14b23`](https://github.com/npm/npm/commit/6a14b232a0e34158bd95bb25c607167be995c204) + [#6397](https://github.com/npm/npm/issues/6397) Defactor npmconf back into + npm. ([@othiym23](https://github.com/othiym23)) +* [`4000e33`](https://github.com/npm/npm/commit/4000e3333a76ca4844681efa8737cfac24b7c2c8) + [#6323](https://github.com/npm/npm/issues/6323) Install `peerDependencies` + from top. ([@othiym23](https://github.com/othiym23)) +* [`5d119ae`](https://github.com/npm/npm/commit/5d119ae246f27353b14ff063559d1ba8c616bb89) + [#6498](https://github.com/npm/npm/issues/6498) Better error messages on + malformed `.npmrc` properties. ([@nicks](https://github.com/nicks)) +* [`ae18efb`](https://github.com/npm/npm/commit/ae18efb65fed427b1ef18e4862885bf60b87b92e) + [#6093](https://github.com/npm/npm/issues/6093) Replace instances of 'hash' + with 'object' in documentation. ([@zeke](https://github.com/zeke)) +* [`53108b2`](https://github.com/npm/npm/commit/53108b276fec5f97a38250933a2768d58b6928da) + [#1558](https://github.com/npm/npm/issues/1558) Clarify how local paths + should be used. ([@KenanY](https://github.com/KenanY)) +* [`344fa1a`](https://github.com/npm/npm/commit/344fa1a219ac8867022df3dc58a47636dde8a242) + [#6488](https://github.com/npm/npm/issues/6488) Work around bug in marked. + ([@othiym23](https://github.com/othiym23)) + +OUTDATED DEPENDENCY CLEANUP JAMBOREE + +* [`60c2942`](https://github.com/npm/npm/commit/60c2942e13655d9ecdf6e0f1f97f10cb71a75255) + `realize-package-specifier@1.2.0`: Handle names and rawSpecs more + consistently. ([@iarna](https://github.com/iarna)) +* [`1b5c95f`](https://github.com/npm/npm/commit/1b5c95fbda77b87342bd48c5ecac5b1fd571ccfe) + `sha@1.3.0`: Change line endings? + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`d7dee3f`](https://github.com/npm/npm/commit/d7dee3f3f7d9e7c2061a4ecb4dd93e3e4bfe4f2e) + `request@2.45.0`: Dependency updates, better proxy support, better compressed + response handling, lots of 'use strict'. + ([@mikeal](https://github.com/mikeal)) +* [`3d75180`](https://github.com/npm/npm/commit/3d75180c2cc79fa3adfa0e4cb783a27192189a65) + `opener@1.4.0`: Added gratuitous return. + ([@Domenic](https://github.com/Domenic)) +* [`8e2703f`](https://github.com/npm/npm/commit/8e2703f78d280d1edeb749e257dda1f288bad6e3) + `retry@0.6.1` / `npm-registry-client@3.2.4`: Change of ownership. + ([@tim-kos](https://github.com/tim-kos)) +* [`c87b00f`](https://github.com/npm/npm/commit/c87b00f82f92434ee77831915012c77a6c244c39) + `once@1.3.1`: Wrap once with wrappy. ([@isaacs](https://github.com/isaacs)) +* [`01ec790`](https://github.com/npm/npm/commit/01ec790fd47def56eda6abb3b8d809093e8f493f) + `npm-user-validate@0.1.1`: Correct repository URL. + ([@robertkowalski](https://github.com/robertkowalski)) +* [`389e52c`](https://github.com/npm/npm/commit/389e52c2d94c818ca8935ccdcf392994fec564a2) + `glob@4.0.6`: Now absolutely requires `graceful-fs`. + ([@isaacs](https://github.com/isaacs)) +* [`e15ab15`](https://github.com/npm/npm/commit/e15ab15a27a8f14cf0d9dc6f11dee452080378a0) + `ini@1.3.0`: Tighten up whitespace handling. + ([@isaacs](https://github.com/isaacs)) +* [`7610f3e`](https://github.com/npm/npm/commit/7610f3e62e699292ece081bfd33084d436e3246d) + `archy@1.0.0` ([@substack](https://github.com/substack)) +* [`9c13149`](https://github.com/npm/npm/commit/9c1314985e513e20ffa3ea0ca333ba2ab78299c9) + `semver@4.1.0`: Add support for prerelease identifiers. + ([@bromanko](https://github.com/bromanko)) +* [`f096c25`](https://github.com/npm/npm/commit/f096c250441b031d758f03afbe8d2321f94c7703) + `graceful-fs@3.0.4`: Add a bunch of additional tests, skip the unfortunate + complications of `graceful-fs@3.0.3`. ([@isaacs](https://github.com/isaacs)) + +### v2.1.4 (2014-10-09): + +* [`3aeb440`](https://github.com/npm/npm/commit/3aeb4401444fad83cc7a8d11bf2507658afa5248) + [#6442](https://github.com/npm/npm/issues/6442) proxying git needs `GIT_SSL_CAINFO` + ([@wmertens](https://github.com/wmertens)) +* [`a8da8d6`](https://github.com/npm/npm/commit/a8da8d6e0cd56d97728c0b76b51604ee06ef6264) + [#6413](https://github.com/npm/npm/issues/6413) write builtin config on any + global npm install ([@isaacs](https://github.com/isaacs)) +* [`9e4d632`](https://github.com/npm/npm/commit/9e4d632c0142ba55df07d624667738b8727336fc) + [#6343](https://github.com/npm/npm/issues/6343) don't pass run arguments to + pre & post scripts ([@TheLudd](https://github.com/TheLudd)) +* [`d831b1f`](https://github.com/npm/npm/commit/d831b1f7ca1a9921ea5b394e39b7130ecbc6d7b4) + [#6399](https://github.com/npm/npm/issues/6399) race condition: inflight + installs, prevent `peerDependency` problems + ([@othiym23](https://github.com/othiym23)) +* [`82b775d`](https://github.com/npm/npm/commit/82b775d6ff34c4beb6c70b2344d491a9f2026577) + [#6384](https://github.com/npm/npm/issues/6384) race condition: inflight + caching by URL rather than semver range + ([@othiym23](https://github.com/othiym23)) +* [`7bee042`](https://github.com/npm/npm/commit/7bee0429066fedcc9e6e962c043eb740b3792809) + `inflight@1.0.4`: callback can take arbitrary number of parameters + ([@othiym23](https://github.com/othiym23)) +* [`3bff494`](https://github.com/npm/npm/commit/3bff494f4abf17d6d7e0e4a3a76cf7421ecec35a) + [#5195](https://github.com/npm/npm/issues/5195) fixed regex color regression + for `npm search` ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`33ba2d5`](https://github.com/npm/npm/commit/33ba2d585160a0a2a322cb76c4cd989acadcc984) + [#6387](https://github.com/npm/npm/issues/6387) allow `npm view global` if + package is specified ([@evanlucas](https://github.com/evanlucas)) +* [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) + [#6388](https://github.com/npm/npm/issues/6388) npm-publish → + npm-developers(7) ([@kennydude](https://github.com/kennydude)) + +TEST CLEANUP EXTRAVAGANZA: + +* [`8d6bfcb`](https://github.com/npm/npm/commit/8d6bfcb88408f5885a2a67409854c43e5c3a23f6) + tap tests run with no system-wide side effects + ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`7a1472f`](https://github.com/npm/npm/commit/7a1472fbdbe99956ad19f629e7eb1cc07ba026ef) + added npm cache cleanup script + ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) +* [`0ce6a37`](https://github.com/npm/npm/commit/0ce6a3752fa9119298df15671254db6bc1d8e64c) + stripped out dead test code (othiym23) +* replace spawn with common.npm (@chrismeyersfsu): + * [`0dcd614`](https://github.com/npm/npm/commit/0dcd61446335eaf541bf5f2d5186ec1419f86a42) + test/tap/cache-shasum-fork.js + * [`97f861c`](https://github.com/npm/npm/commit/97f861c967606a7e51e3d5047cf805d9d1adea5a) + test/tap/false_name.js + * [`d01b3de`](https://github.com/npm/npm/commit/d01b3de6ce03f25bbf3db97bfcd3cc85830d6801) + test/tap/git-cache-locking.js + * [`7b63016`](https://github.com/npm/npm/commit/7b63016778124c6728d6bd89a045c841ae3900b6) + test/tap/pack-scoped.js + * [`c877553`](https://github.com/npm/npm/commit/c877553265c39673e03f0a97972f692af81a595d) + test/tap/scripts-whitespace-windows.js + * [`df98525`](https://github.com/npm/npm/commit/df98525331e964131299d457173c697cfb3d95b9) + test/tap/prepublish.js + * [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) + test/tap/prune.js + +### v2.1.3 (2014-10-02): + +BREAKING CHANGE FOR THE SQRT(i) PEOPLE ACTUALLY USING `npm submodule`: + +* [`1e64473`](https://github.com/npm/npm/commit/1e6447360207f45ad6188e5780fdf4517de6e23d) + `rm -rf npm submodule` command, which has been broken since the Carter + Administration ([@isaacs](https://github.com/isaacs)) + +BREAKING CHANGE IF YOU ARE FOR SOME REASON STILL USING NODE 0.6 AND YOU SHOULD +NOT BE DOING THAT CAN YOU NOT: + +* [`3e431f9`](https://github.com/npm/npm/commit/3e431f9d6884acb4cde8bcb8a0b122a76b33ee1d) + [joyent/node#8492](https://github.com/joyent/node/issues/8492) bye bye + customFds, hello stdio ([@othiym23](https://github.com/othiym23)) + +Other changes: + +* [`ea607a8`](https://github.com/npm/npm/commit/ea607a8a20e891ad38eed11b5ce2c3c0a65484b9) + [#6372](https://github.com/npm/npm/issues/6372) noisily error (without + aborting) on multi-{install,build} ([@othiym23](https://github.com/othiym23)) +* [`3ee2799`](https://github.com/npm/npm/commit/3ee2799b629fd079d2db21d7e8f25fa7fa1660d0) + [#6372](https://github.com/npm/npm/issues/6372) only make cache creation + requests in flight ([@othiym23](https://github.com/othiym23)) +* [`1a90ec2`](https://github.com/npm/npm/commit/1a90ec2f2cfbefc8becc6ef0c480e5edacc8a4cb) + [#6372](https://github.com/npm/npm/issues/6372) wait to put Git URLs in + flight until normalized ([@othiym23](https://github.com/othiym23)) +* [`664795b`](https://github.com/npm/npm/commit/664795bb7d8da7142417b3f4ef5986db3a394071) + [#6372](https://github.com/npm/npm/issues/6372) log what is and isn't in + flight ([@othiym23](https://github.com/othiym23)) +* [`00ef580`](https://github.com/npm/npm/commit/00ef58025a1f52dfabf2c4dc3898621d16a6e062) + `inflight@1.0.3`: fix largely theoretical race condition, because we really + really hate race conditions ([@isaacs](https://github.com/isaacs)) +* [`1cde465`](https://github.com/npm/npm/commit/1cde4658d897ae0f93ff1d65b258e1571b391182) + [#6363](https://github.com/npm/npm/issues/6363) + `realize-package-specifier@1.1.0`: handle local dependencies better + ([@iarna](https://github.com/iarna)) +* [`86f084c`](https://github.com/npm/npm/commit/86f084c6c6d7935cd85d72d9d94b8784c914d51e) + `realize-package-specifier@1.0.2`: dependency realization! in its own module! + ([@iarna](https://github.com/iarna)) +* [`553d830`](https://github.com/npm/npm/commit/553d830334552b83606b6bebefd821c9ea71e964) + `npm-package-arg@2.1.3`: simplified semver, better tests + ([@iarna](https://github.com/iarna)) +* [`bec9b61`](https://github.com/npm/npm/commit/bec9b61a316c19f5240657594f0905a92a474352) + `readable-stream@1.0.32`: for some reason + ([@rvagg](https://github.com/rvagg)) +* [`ff08ec5`](https://github.com/npm/npm/commit/ff08ec5f6d717bdbd559de0b2ede769306a9a763) + `dezalgo@1.0.1`: use wrappy for instrumentability + ([@isaacs](https://github.com/isaacs)) + +### v2.1.2 (2014-09-29): + +* [`a1aa20e`](https://github.com/npm/npm/commit/a1aa20e44bb8285c6be1e7fa63b9da920e3a70ed) + [#6282](https://github.com/npm/npm/issues/6282) + `normalize-package-data@1.0.3`: don't prune bundledDependencies + ([@isaacs](https://github.com/isaacs)) +* [`a1f5fe1`](https://github.com/npm/npm/commit/a1f5fe1005043ce20a06e8b17a3e201aa3215357) + move locks back into cache, now path-aware + ([@othiym23](https://github.com/othiym23)) +* [`a432c4b`](https://github.com/npm/npm/commit/a432c4b48c881294d6d79b5f41c2e1c16ad15a8a) + convert lib/utils/tar.js to use atomic streams + ([@othiym23](https://github.com/othiym23)) +* [`b8c3c74`](https://github.com/npm/npm/commit/b8c3c74a3c963564233204161cc263e0912c930b) + `fs-write-stream-atomic@1.0.2`: Now works with streams1 fs.WriteStreams. + ([@isaacs](https://github.com/isaacs)) +* [`c7ab76f`](https://github.com/npm/npm/commit/c7ab76f44cce5f42add5e3ba879bd10e7e00c3e6) + logging cleanup ([@othiym23](https://github.com/othiym23)) +* [`4b2d95d`](https://github.com/npm/npm/commit/4b2d95d0641435b09d047ae5cb2226f292bf38f0) + [#6329](https://github.com/npm/npm/issues/6329) efficiently validate tmp + tarballs safely ([@othiym23](https://github.com/othiym23)) + +### v2.1.1 (2014-09-26): + +* [`563225d`](https://github.com/npm/npm/commit/563225d813ea4c12f46d4f7821ac7f76ba8ee2d6) + [#6318](https://github.com/npm/npm/issues/6318) clean up locking; prefix + lockfile with "." ([@othiym23](https://github.com/othiym23)) +* [`c7f30e4`](https://github.com/npm/npm/commit/c7f30e4550fea882d31fcd4a55b681cd30713c44) + [#6318](https://github.com/npm/npm/issues/6318) remove locking code around + tarball packing and unpacking ([@othiym23](https://github.com/othiym23)) + +### v2.1.0 (2014-09-25): + +NEW FEATURE: + +* [`3635601`](https://github.com/npm/npm/commit/36356011b6f2e6a5a81490e85a0a44eb27199dd7) + [#5520](https://github.com/npm/npm/issues/5520) Add `'npm view .'`. + ([@evanlucas](https://github.com/evanlucas)) + +Other changes: + +* [`f24b552`](https://github.com/npm/npm/commit/f24b552b596d0627549cdd7c2d68fcf9006ea50a) + [#6294](https://github.com/npm/npm/issues/6294) Lock cache → lock cache + target. ([@othiym23](https://github.com/othiym23)) +* [`ad54450`](https://github.com/npm/npm/commit/ad54450104f94c82c501138b4eee488ce3a4555e) + [#6296](https://github.com/npm/npm/issues/6296) Ensure that npm-debug.log + file is created when rollbacks are done. + ([@isaacs](https://github.com/isaacs)) +* [`6810071`](https://github.com/npm/npm/commit/681007155a40ac9d165293bd6ec5d8a1423ccfca) + docs: Default loglevel "http" → "warn". + ([@othiym23](https://github.com/othiym23)) +* [`35ac89a`](https://github.com/npm/npm/commit/35ac89a940f23db875e882ce2888208395130336) + Skip installation of installed scoped packages. + ([@timoxley](https://github.com/timoxley)) +* [`e468527`](https://github.com/npm/npm/commit/e468527256ec599892b9b88d61205e061d1ab735) + Ensure cleanup executes for scripts-whitespace-windows test. + ([@timoxley](https://github.com/timoxley)) +* [`ef9101b`](https://github.com/npm/npm/commit/ef9101b7f346797749415086956a0394528a12c4) + Ensure cleanup executes for packed-scope test. + ([@timoxley](https://github.com/timoxley)) +* [`69b4d18`](https://github.com/npm/npm/commit/69b4d18cdbc2ae04c9afaffbd273b436a394f398) + `fs-write-stream-atomic@1.0.1`: Fix a race condition in our race-condition + fixer. ([@isaacs](https://github.com/isaacs)) +* [`26b17ff`](https://github.com/npm/npm/commit/26b17ff2e3b21ee26c6fdbecc8273520cff45718) + [#6272](https://github.com/npm/npm/issues/6272) `npmconf` decides what the + default prefix is. ([@othiym23](https://github.com/othiym23)) +* [`846faca`](https://github.com/npm/npm/commit/846facacc6427dafcf5756dcd36d9036539938de) + Fix development dependency is preferred over dependency. + ([@andersjanmyr](https://github.com/andersjanmyr)) +* [`9d1a9db`](https://github.com/npm/npm/commit/9d1a9db3af5adc48a7158a5a053eeb89ee41a0e7) + [#3265](https://github.com/npm/npm/issues/3265) Re-apply a71615a. Fixes + [#3265](https://github.com/npm/npm/issues/3265) again, with a test! + ([@glasser](https://github.com/glasser)) +* [`1d41db0`](https://github.com/npm/npm/commit/1d41db0b2744a7bd50971c35cc060ea0600fb4bf) + `marked-man@0.1.4`: Fixes formatting of synopsis blocks in man docs. + ([@kapouer](https://github.com/kapouer)) +* [`a623da0`](https://github.com/npm/npm/commit/a623da01bea1b2d3f3a18b9117cfd2d8e3cbdd77) + [#5867](https://github.com/npm/npm/issues/5867) Specify dummy git template + dir when cloning to prevent copying hooks. + ([@boneskull](https://github.com/boneskull)) + +### v2.0.2 (2014-09-19): + +* [`42c872b`](https://github.com/npm/npm/commit/42c872b32cadc0e555638fc78eab3a38a04401d8) + [#5920](https://github.com/npm/npm/issues/5920) + `fs-write-stream-atomic@1.0.0` ([@isaacs](https://github.com/isaacs)) +* [`6784767`](https://github.com/npm/npm/commit/6784767fe15e28b44c81a1d4bb1738c642a65d78) + [#5920](https://github.com/npm/npm/issues/5920) make all write streams atomic + ([@isaacs](https://github.com/isaacs)) +* [`f6fac00`](https://github.com/npm/npm/commit/f6fac000dd98ebdd5ea1d5921175735d463d328b) + [#5920](https://github.com/npm/npm/issues/5920) barf on 0-length cached + tarballs ([@isaacs](https://github.com/isaacs)) +* [`3b37592`](https://github.com/npm/npm/commit/3b37592a92ea98336505189ae8ca29248b0589f4) + `write-file-atomic@1.1.0`: use graceful-fs + ([@iarna](https://github.com/iarna)) + +### v2.0.1 (2014-09-18): + +* [`74c5ab0`](https://github.com/npm/npm/commit/74c5ab0a676793c6dc19a3fd5fe149f85fecb261) + [#6201](https://github.com/npm/npm/issues/6201) `npmconf@2.1.0`: scope + always-auth to registry URI ([@othiym23](https://github.com/othiym23)) +* [`774b127`](https://github.com/npm/npm/commit/774b127da1dd6fefe2f1299e73505d9146f00294) + [#6201](https://github.com/npm/npm/issues/6201) `npm-registry-client@3.2.2`: + use scoped always-auth settings ([@othiym23](https://github.com/othiym23)) +* [`f2d2190`](https://github.com/npm/npm/commit/f2d2190aa365d22378d03afab0da13f95614a583) + [#6201](https://github.com/npm/npm/issues/6201) support saving + `--always-auth` when logging in ([@othiym23](https://github.com/othiym23)) +* [`17c941a`](https://github.com/npm/npm/commit/17c941a2d583210fe97ed47e2968d94ce9f774ba) + [#6163](https://github.com/npm/npm/issues/6163) use `write-file-atomic` + instead of `fs.writeFile()` ([@fiws](https://github.com/fiws)) +* [`fb5724f`](https://github.com/npm/npm/commit/fb5724fd98e1509c939693568df83d11417ea337) + [#5925](https://github.com/npm/npm/issues/5925) `npm init -f`: allow `npm + init` to run without prompting + ([@michaelnisi](https://github.com/michaelnisi)) +* [`b706d63`](https://github.com/npm/npm/commit/b706d637d5965dbf8f7ce07dc5c4bc80887f30d8) + [#3059](https://github.com/npm/npm/issues/3059) disable prepublish when + running `npm install --production` + ([@jussi-kalliokoski](https://github.com/jussi-kalliokoski)) +* [`119f068`](https://github.com/npm/npm/commit/119f068eae2a36fa8b9c9ca557c70377792243a4) + attach the node version used when publishing a package to its registry + metadata ([@othiym23](https://github.com/othiym23)) +* [`8fe0081`](https://github.com/npm/npm/commit/8fe008181665519c2ac201ee432a3ece9798c31f) + seriously, don't use `npm -g update npm` + ([@thomblake](https://github.com/thomblake)) +* [`ea5b3d4`](https://github.com/npm/npm/commit/ea5b3d446b86dcabb0dbc6dba374d3039342ecb3) + `request@2.44.0` ([@othiym23](https://github.com/othiym23)) + +### v2.0.0 (2014-09-12): + +BREAKING CHANGES: + +* [`4378a17`](https://github.com/npm/npm/commit/4378a17db340404a725ffe2eb75c9936f1612670) + `semver@4.0.0`: prerelease versions no longer show up in ranges; `^0.x.y` + behaves the way it did in `semver@2` rather than `semver@3`; docs have been + reorganized for comprehensibility ([@isaacs](https://github.com/isaacs)) +* [`c6ddb64`](https://github.com/npm/npm/commit/c6ddb6462fe32bf3a27b2c4a62a032a92e982429) + npm now assumes that node is newer than 0.6 + ([@isaacs](https://github.com/isaacs)) + +Other changes: + +* [`ea515c3`](https://github.com/npm/npm/commit/ea515c3b858bf493a7b87fa4cdc2110a0d9cef7f) + [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all + callbacks have finished before proceeding + ([@othiym23](https://github.com/othiym23)) +* [`0b0a59d`](https://github.com/npm/npm/commit/0b0a59d504f20f424294b1590ace73a7464f0378) + [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just + before the CLI exits ([@isaacs](https://github.com/isaacs)) +* [`a11c88b`](https://github.com/npm/npm/commit/a11c88bdb1488b87d8dcac69df9a55a7a91184b6) + [#6175](https://github.com/npm/npm/issues/6175) pack scoped packages + correctly ([@othiym23](https://github.com/othiym23)) +* [`e4e48e0`](https://github.com/npm/npm/commit/e4e48e037d4e95fdb6acec80b04c5c6eaee59970) + [#6121](https://github.com/npm/npm/issues/6121) `read-installed@3.1.2`: don't + mark linked dev dependencies as extraneous + ([@isaacs](https://github.com/isaacs)) +* [`d673e41`](https://github.com/npm/npm/commit/d673e4185d43362c2b2a91acbca8c057e7303c7b) + `cmd-shim@2.0.1`: depend on `graceful-fs` directly + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`9d54d45`](https://github.com/npm/npm/commit/9d54d45e602d595bdab7eae09b9fa1dc46370147) + `npm-registry-couchapp@2.5.3`: make tests more reliable on Travis + ([@iarna](https://github.com/iarna)) +* [`673d738`](https://github.com/npm/npm/commit/673d738c6142c3d043dcee0b7aa02c9831a2e0ca) + ensure permissions are set correctly in cache when running as root + ([@isaacs](https://github.com/isaacs)) +* [`6e6a5fb`](https://github.com/npm/npm/commit/6e6a5fb74af10fd345411df4e121e554e2e3f33e) + prepare for upgrade to `node-semver@4.0.0` + ([@isaacs](https://github.com/isaacs)) +* [`ab8dd87`](https://github.com/npm/npm/commit/ab8dd87b943262f5996744e8d4cc30cc9358b7d7) + swap out `ronn` for `marked-man@0.1.3` ([@isaacs](https://github.com/isaacs)) +* [`803da54`](https://github.com/npm/npm/commit/803da5404d5a0b7c9defa3fe7fa0f2d16a2b19d3) + `npm-registry-client@3.2.0`: prepare for `node-semver@4.0.0` and include more + error information ([@isaacs](https://github.com/isaacs)) +* [`4af0e71`](https://github.com/npm/npm/commit/4af0e7134f5757c3d456d83e8349224a4ba12660) + make default error display less scary ([@isaacs](https://github.com/isaacs)) +* [`4fd9e79`](https://github.com/npm/npm/commit/4fd9e7901a15abff7a3dd478d99ce239b9580bca) + `npm-registry-client@3.2.1`: handle errors returned by the registry much, + much better ([@othiym23](https://github.com/othiym23)) +* [`ca791e2`](https://github.com/npm/npm/commit/ca791e27e97e51c1dd491bff6622ac90b54c3e23) + restore a long (always?) missing pass for deduping + ([@othiym23](https://github.com/othiym23)) +* [`ca0ef0e`](https://github.com/npm/npm/commit/ca0ef0e99bbdeccf28d550d0296baa4cb5e7ece2) + correctly interpret relative paths for local dependencies + ([@othiym23](https://github.com/othiym23)) +* [`5eb8db2`](https://github.com/npm/npm/commit/5eb8db2c370eeb4cd34f6e8dc6a935e4ea325621) + `npm-package-arg@2.1.2`: support git+file:// URLs for local bare repos + ([@othiym23](https://github.com/othiym23)) +* [`860a185`](https://github.com/npm/npm/commit/860a185c43646aca84cb93d1c05e2266045c316b) + tweak docs to no longer advocate checking in `node_modules` + ([@hunterloftis](https://github.com/hunterloftis)) +* [`80e9033`](https://github.com/npm/npm/commit/80e9033c40e373775e35c674faa6c1948661782b) + add links to nodejs.org downloads to docs + ([@meetar](https://github.com/meetar)) + +### v2.0.0-beta.3 (2014-09-04): + +* [`fa79413`](https://github.com/npm/npm/commit/fa794138bec8edb7b88639db25ee9c010d2f4c2b) + [#6119](https://github.com/npm/npm/issues/6119) fall back to registry installs + if package.json is missing in a local directory ([@iarna](https://github.com/iarna)) +* [`16073e2`](https://github.com/npm/npm/commit/16073e2d8ae035961c4c189b602d4aacc6d6b387) + `npm-package-arg@2.1.0`: support file URIs as local specs + ([@othiym23](https://github.com/othiym23)) +* [`9164acb`](https://github.com/npm/npm/commit/9164acbdee28956fa816ce5e473c559395ae4ec2) + `github-url-from-username-repo@1.0.2`: don't match strings that are already + URIs ([@othiym23](https://github.com/othiym23)) +* [`4067d6b`](https://github.com/npm/npm/commit/4067d6bf303a69be13f3af4b19cf4fee1b0d3e12) + [#5629](https://github.com/npm/npm/issues/5629) support saving of local packages + in `package.json` ([@dylang](https://github.com/dylang)) +* [`1b2ffdf`](https://github.com/npm/npm/commit/1b2ffdf359a8c897a78f91fc5a5d535c97aaec97) + [#6097](https://github.com/npm/npm/issues/6097) document scoped packages + ([@seldo](https://github.com/seldo)) +* [`0a67d53`](https://github.com/npm/npm/commit/0a67d536067c4808a594d81288d34c0f7e97e105) + [#6007](https://github.com/npm/npm/issues/6007) `request@2.42.0`: properly + set headers on proxy requests ([@isaacs](https://github.com/isaacs)) +* [`9bac6b8`](https://github.com/npm/npm/commit/9bac6b860b674d24251bb7b8ba412fdb26cbc836) + `npmconf@2.0.8`: disallow semver ranges in tag configuration + ([@isaacs](https://github.com/isaacs)) +* [`d2d4d7c`](https://github.com/npm/npm/commit/d2d4d7cd3c32f91a87ffa11fe464d524029011c3) + [#6082](https://github.com/npm/npm/issues/6082) don't allow tagging with a + semver range as the tag name ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-beta.2 (2014-08-29): + +SPECIAL LABOR DAY WEEKEND RELEASE PARTY WOOO + +* [`ed207e8`](https://github.com/npm/npm/commit/ed207e88019de3150037048df6267024566e1093) + `npm-registry-client@3.1.7`: Clean up auth logic and improve logging around + auth decisions. Also error on trying to change a user document without + writing to it. ([@othiym23](https://github.com/othiym23)) +* [`66c7423`](https://github.com/npm/npm/commit/66c7423b7fb07a326b83c83727879410d43c439f) + `npmconf@2.0.7`: support -C as an alias for --prefix + ([@isaacs](https://github.com/isaacs)) +* [`0dc6a07`](https://github.com/npm/npm/commit/0dc6a07c778071c94c2251429c7d107e88a45095) + [#6059](https://github.com/npm/npm/issues/6059) run commands in prefix, not + cwd ([@isaacs](https://github.com/isaacs)) +* [`65d2179`](https://github.com/npm/npm/commit/65d2179af96737eb9038eaa24a293a62184aaa13) + `github-url-from-username-repo@1.0.1`: part 3 handle slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`e8d75d0`](https://github.com/npm/npm/commit/e8d75d0d9f148ce2b3e8f7671fa281945bac363d) + [#6057](https://github.com/npm/npm/issues/6057) `read-installed@3.1.1`: + properly handle extraneous dev dependencies of required dependencies + ([@othiym23](https://github.com/othiym23)) +* [`0602f70`](https://github.com/npm/npm/commit/0602f708f070d524ad41573afd4c57171cab21ad) + [#6064](https://github.com/npm/npm/issues/6064) ls: do not show deps of + extraneous deps ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-beta.1 (2014-08-28): + +* [`78a1fc1`](https://github.com/npm/npm/commit/78a1fc12307a0cbdbc944775ed831b876ee65855) + `github-url-from-git@1.4.0`: add support for git+https and git+ssh + ([@stefanbuck](https://github.com/stefanbuck)) +* [`bf247ed`](https://github.com/npm/npm/commit/bf247edf5429c6b3ec4d4cb798fa0eb0a9c19fc1) + `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`4bbe682`](https://github.com/npm/npm/commit/4bbe682a6d4eabcd23f892932308c9f228bf4de3) + `cmd-shim@2.0.0`: upgrade to graceful-fs 3 + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`ae1d590`](https://github.com/npm/npm/commit/ae1d590bdfc2476a4ed446e760fea88686e3ae05) + `npm-package-arg@2.0.4`: accept slashes in branch names + ([@thealphanerd](https://github.com/thealphanerd)) +* [`b2f51ae`](https://github.com/npm/npm/commit/b2f51aecadf585711e145b6516f99e7c05f53614) + `semver@3.0.1`: semver.clean() is cleaner + ([@isaacs](https://github.com/isaacs)) +* [`1d041a8`](https://github.com/npm/npm/commit/1d041a8a5ebd5bf6cecafab2072d4ec07823adab) + `github-url-from-username-repo@1.0.0`: accept slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`02c85d5`](https://github.com/npm/npm/commit/02c85d592c4058e5d9eafb0be36b6743ae631998) + `async-some@1.0.1` ([@othiym23](https://github.com/othiym23)) +* [`5af493e`](https://github.com/npm/npm/commit/5af493efa8a463cd1acc4a9a394699e2c0793b9c) + ensure lifecycle spawn errors caught properly + ([@isaacs](https://github.com/isaacs)) +* [`60fe012`](https://github.com/npm/npm/commit/60fe012fac9570d6c72554cdf34a6fa95bf0f0a6) + `npmconf@2.0.6`: init.version defaults to 1.0.0 + ([@isaacs](https://github.com/isaacs)) +* [`b4c717b`](https://github.com/npm/npm/commit/b4c717bbf58fb6a0d64ad229036c79a184297ee2) + `npm-registry-client@3.1.4`: properly encode % in passwords + ([@isaacs](https://github.com/isaacs)) +* [`7b55f44`](https://github.com/npm/npm/commit/7b55f44420252baeb3f30da437d22956315c31c9) + doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-beta.0 (2014-08-21): + +* [`685f8be`](https://github.com/npm/npm/commit/685f8be1f2770cc75fd0e519a8d7aac72735a270) + `npm-registry-client@3.1.3`: Print the notification header returned by the + registry, and make sure status codes are printed without gratuitous quotes + around them. ([@isaacs](https://github.com/isaacs) / + [@othiym23](https://github.com/othiym23)) +* [`a8cb676`](https://github.com/npm/npm/commit/a8cb676aef0561eaf04487d2719672b097392c85) + [#5900](https://github.com/npm/npm/issues/5900) remove `npm` from its own + `engines` field in `package.json`. None of us remember why it was there. + ([@timoxley](https://github.com/timoxley)) +* [`6c47201`](https://github.com/npm/npm/commit/6c47201a7d071e8bf091b36933daf4199cc98e80) + [#5752](https://github.com/npm/npm/issues/5752), + [#6013](https://github.com/npm/npm/issues/6013) save git URLs correctly in + `_resolved` fields ([@isaacs](https://github.com/isaacs)) +* [`e4e1223`](https://github.com/npm/npm/commit/e4e1223a91c37688ba3378e1fc9d5ae045654d00) + [#5936](https://github.com/npm/npm/issues/5936) document the use of tags in + `package.json` ([@KenanY](https://github.com/KenanY)) +* [`c92b8d4`](https://github.com/npm/npm/commit/c92b8d4db7bde2a501da5b7d612684de1d629a42) + [#6004](https://github.com/npm/npm/issues/6004) manually installed scoped + packages are tracked correctly ([@dead](https://github.com/dead)-horse) +* [`21ca0aa`](https://github.com/npm/npm/commit/21ca0aaacbcfe2b89b0a439d914da0cae62de550) + [#5945](https://github.com/npm/npm/issues/5945) link scoped packages + correctly ([@dead](https://github.com/dead)-horse) +* [`16bead7`](https://github.com/npm/npm/commit/16bead7f2c82aec35b83ff0ec04df051ba456764) + [#5958](https://github.com/npm/npm/issues/5958) ensure that file streams work + in all versions of node ([@dead](https://github.com/dead)-horse) +* [`dbf0cab`](https://github.com/npm/npm/commit/dbf0cab29d0db43ac95e4b5a1fbdea1e0af75f10) + you can now pass quoted args to `npm run-script` + ([@bcoe](https://github.com/bcoe)) +* [`0583874`](https://github.com/npm/npm/commit/05838743f01ccb8d2432b3858d66847002fb62df) + `tar@1.0.1`: Add test for removing an extract target immediately after + unpacking. + ([@isaacs](https://github.com/isaacs)) +* [`cdf3b04`](https://github.com/npm/npm/commit/cdf3b0428bc0b0183fb41dcde9e34e8f42c5e3a7) + `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, and + `retries` options. Part 2 of race condition leading to `ENOENT` + ([@isaacs](https://github.com/isaacs)) + errors. +* [`22d72a8`](https://github.com/npm/npm/commit/22d72a87a9e1a9ab56d9585397f63551887d9125) + `fstream@1.0.2`: Fix a double-finish call which can result in excess FS + operations after the `close` event. Part 1 of race condition leading to + `ENOENT` errors. + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha.7 (2014-08-14): + +* [`f23f1d8`](https://github.com/npm/npm/commit/f23f1d8e8f86ec1b7ab8dad68250bccaa67d61b1) + doc: update version doc to include `pre-*` increment args + ([@isaacs](https://github.com/isaacs)) +* [`b6bb746`](https://github.com/npm/npm/commit/b6bb7461824d4dc1c0936f46bd7929b5cd597986) + build: add 'make tag' to tag current release as latest + ([@isaacs](https://github.com/isaacs)) +* [`27c4bb6`](https://github.com/npm/npm/commit/27c4bb606e46e5eaf604b19fe8477bc6567f8b2e) + build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) +* [`cff66c3`](https://github.com/npm/npm/commit/cff66c3bf2850880058ebe2a26655dafd002495e) + build: add script to output `v1.4-next` publish tag + ([@isaacs](https://github.com/isaacs)) +* [`22abec8`](https://github.com/npm/npm/commit/22abec8833474879ac49b9604c103bc845dad779) + build: remove outdated `docpublish` make target + ([@isaacs](https://github.com/isaacs)) +* [`1be4de5`](https://github.com/npm/npm/commit/1be4de51c3976db8564f72b00d50384c921f0917) + build: remove `unpublish` step from `make publish` + ([@isaacs](https://github.com/isaacs)) +* [`e429e20`](https://github.com/npm/npm/commit/e429e2011f4d78e398f2461bca3e5a9a146fbd0c) + doc: add new changelog ([@othiym23](https://github.com/othiym23)) +* [`9243d20`](https://github.com/npm/npm/commit/9243d207896ea307082256604c10817f7c318d68) + lifecycle: test lifecycle path modification + ([@isaacs](https://github.com/isaacs)) +* [`021770b`](https://github.com/npm/npm/commit/021770b9cb07451509f0a44afff6c106311d8cf6) + lifecycle: BREAKING CHANGE do not add the directory containing node executable + ([@chulkilee](https://github.com/chulkilee)) +* [`1d5c41d`](https://github.com/npm/npm/commit/1d5c41dd0d757bce8b87f10c4135f04ece55aeb9) + install: rename .gitignore when unpacking foreign tarballs + ([@isaacs](https://github.com/isaacs)) +* [`9aac267`](https://github.com/npm/npm/commit/9aac2670a73423544d92b27cc301990a16a9563b) + cache: detect non-gzipped tar files more reliably + ([@isaacs](https://github.com/isaacs)) +* [`3f24755`](https://github.com/npm/npm/commit/3f24755c8fce3c7ab11ed1dc632cc40d7ef42f62) + `readdir-scoped-modules@1.0.0` ([@isaacs](https://github.com/isaacs)) +* [`151cd2f`](https://github.com/npm/npm/commit/151cd2ff87b8ac2fc9ea366bc9b7f766dc5b9684) + `read-installed@3.1.0` ([@isaacs](https://github.com/isaacs)) +* [`f5a9434`](https://github.com/npm/npm/commit/f5a94343a8ebe4a8cd987320b55137aef53fb3fd) + test: fix Travis timeouts ([@dylang](https://github.com/dylang)) +* [`126cafc`](https://github.com/npm/npm/commit/126cafcc6706814c88af3042f2ffff408747bff4) + `npm-registry-couchapp@2.5.0` ([@othiym23](https://github.com/othiym23)) + +### v2.0.0-alpha.6 (2014-08-07): + +BREAKING CHANGE: + +* [`ea547e2`](https://github.com/npm/npm/commit/ea547e2) Bump semver to + version 3: `^0.x.y` is now functionally the same as `=0.x.y`. + ([@isaacs](https://github.com/isaacs)) + +Other changes: + +* [`d987707`](https://github.com/npm/npm/commit/d987707) move fetch into + npm-registry-client ([@othiym23](https://github.com/othiym23)) +* [`9b318e2`](https://github.com/npm/npm/commit/9b318e2) `read-installed@3.0.0` + ([@isaacs](https://github.com/isaacs)) +* [`9d73de7`](https://github.com/npm/npm/commit/9d73de7) remove unnecessary + mkdirps ([@isaacs](https://github.com/isaacs)) +* [`33ccd13`](https://github.com/npm/npm/commit/33ccd13) Don't squash execute + perms in `_git-remotes/` dir ([@adammeadows](https://github.com/adammeadows)) +* [`48fd233`](https://github.com/npm/npm/commit/48fd233) `npm-package-arg@2.0.1` + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha-5 (2014-07-22): + +This release bumps up to 2.0 because of this breaking change, which could +potentially affect how your package's scripts are run: + +* [`df4b0e7`](https://github.com/npm/npm/commit/df4b0e7fc1abd9a54f98db75ec9e4d03d37d125b) + [#5518](https://github.com/npm/npm/issues/5518) BREAKING CHANGE: support + passing arguments to `run` scripts ([@bcoe](https://github.com/bcoe)) + +Other changes: + +* [`cd422c9`](https://github.com/npm/npm/commit/cd422c9de510766797c65720d70f085000f50543) + [#5748](https://github.com/npm/npm/issues/5748) link binaries for scoped + packages ([@othiym23](https://github.com/othiym23)) +* [`4c3c778`](https://github.com/npm/npm/commit/4c3c77839920e830991e0c229c3c6a855c914d67) + [#5758](https://github.com/npm/npm/issues/5758) `npm link` includes scope + when linking scoped package ([@fengmk2](https://github.com/fengmk2)) +* [`f9f58dd`](https://github.com/npm/npm/commit/f9f58dd0f5b715d4efa6619f13901916d8f99c47) + [#5707](https://github.com/npm/npm/issues/5707) document generic pre- / + post-commands ([@sudodoki](https://github.com/sudodoki)) +* [`ac7a480`](https://github.com/npm/npm/commit/ac7a4801d80361b41dce4a18f22bcdf75e396000) + [#5406](https://github.com/npm/npm/issues/5406) `npm cache` displays usage + when called without arguments + ([@michaelnisi](https://github.com/michaelnisi)) +* [`f4554e9`](https://github.com/npm/npm/commit/f4554e99d34f77a8a02884493748f7d49a9a9d8b) + Test fixes for Windows ([@isaacs](https://github.com/isaacs)) +* update dependencies ([@othiym23](https://github.com/othiym23)) diff --git a/bin/nodejs6.7.0/node_modules/npm/cli.js b/bin/nodejs6.7.0/node_modules/npm/cli.js new file mode 100644 index 00000000..57c84e9e --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/cli.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./bin/npm-cli.js') diff --git a/bin/nodejs6.7.0/node_modules/npm/configure b/bin/nodejs6.7.0/node_modules/npm/configure new file mode 100644 index 00000000..32b8da57 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/configure @@ -0,0 +1,33 @@ +#!/bin/bash + +# set configurations that will be "sticky" on this system, +# surviving npm self-updates. + +CONFIGS=() +i=0 + +# get the location of this file. +unset CDPATH +CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc + +while [ $# -gt 0 ]; do + conf="$1" + case $conf in + --help) + echo "./configure --param=value ..." + exit 0 + ;; + --*) + CONFIGS[$i]="${conf:2}" + ;; + *) + CONFIGS[$i]="$conf" + ;; + esac + let i++ + shift +done + +for c in "${CONFIGS[@]}"; do + echo "$c" >> "$CONFFILE" +done diff --git a/bin/nodejs6.7.0/node_modules/npm/html/docfoot.html b/bin/nodejs6.7.0/node_modules/npm/html/docfoot.html new file mode 100644 index 00000000..0cf4145d --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/html/docfoot.html @@ -0,0 +1,13 @@ +</div> + +<table border=0 cellspacing=0 cellpadding=0 id=npmlogo> +<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18> </td></tr> +<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td colspan=6 style="width:60px;height:10px;background:#fff"> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td></tr> +<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2> </td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td></tr> +<tr><td style="width:10px;height:10px;background:#fff" rowspan=2> </td></tr> +<tr><td style="width:10px;height:10px;background:#fff"> </td></tr> +<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr> +<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr> +</table> +<p id="footer">@NAME@ — npm@@VERSION@</p> + diff --git a/bin/nodejs6.7.0/node_modules/npm/html/dochead.html b/bin/nodejs6.7.0/node_modules/npm/html/dochead.html new file mode 100644 index 00000000..4d52bb8d --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/html/dochead.html @@ -0,0 +1,11 @@ +<!doctype html> +<html> + <title>@NAME@ + + + + + + +

    + diff --git a/bin/nodejs6.7.0/node_modules/npm/html/favicon.ico b/bin/nodejs6.7.0/node_modules/npm/html/favicon.ico new file mode 100644 index 00000000..9e0d4eef Binary files /dev/null and b/bin/nodejs6.7.0/node_modules/npm/html/favicon.ico differ diff --git a/bin/nodejs6.7.0/node_modules/npm/html/index.html b/bin/nodejs6.7.0/node_modules/npm/html/index.html new file mode 100644 index 00000000..6dcacdc8 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/html/index.html @@ -0,0 +1,93 @@ + + + + + + npm - JavaScript Package Manager + +

    npm

    + +

    npm is a package manager for node. You can use it to install + and publish your node programs. It manages dependencies and does other cool stuff.

    + +

    Easy Zero Line Install

    + +

    Install Node.js
    +(npm comes with it.)

    + +

    Because a one-line install is one too many.

    + +

    Fancy Install

    + +
      +
    1. Get the code. +
    2. Do what the README + says to do. +
    + +

    There's a pretty thorough install script at +https://npmjs.org/install.sh

    + +

    For maximum security, make sure to thoroughly inspect every +program that you run on your computer!

    + +

    Other Cool Stuff

    + + + + + diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/access.js b/bin/nodejs6.7.0/node_modules/npm/lib/access.js new file mode 100644 index 00000000..8c972938 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/access.js @@ -0,0 +1,129 @@ +'use strict' + +var resolve = require('path').resolve + +var readPackageJson = require('read-package-json') +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm.js') +var output = require('./utils/output.js') + +var whoami = require('./whoami') + +module.exports = access + +access.usage = + 'npm access public []\n' + + 'npm access restricted []\n' + + 'npm access grant []\n' + + 'npm access revoke []\n' + + 'npm access ls-packages [||]\n' + + 'npm access ls-collaborators [ []]\n' + + 'npm access edit []' + +access.subcommands = ['public', 'restricted', 'grant', 'revoke', + 'ls-packages', 'ls-collaborators', 'edit'] + +access.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, access.subcommands) + } + + switch (argv[2]) { + case 'grant': + if (argv.length === 3) { + return cb(null, ['read-only', 'read-write']) + } else { + return cb(null, []) + } + case 'public': + case 'restricted': + case 'ls-packages': + case 'ls-collaborators': + case 'edit': + return cb(null, []) + case 'revoke': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function access (args, cb) { + var cmd = args.shift() + var params + return parseParams(cmd, args, function (err, p) { + if (err) { return cb(err) } + params = p + return mapToRegistry(params.package, npm.config, invokeCmd) + }) + + function invokeCmd (err, uri, auth, base) { + if (err) { return cb(err) } + params.auth = auth + try { + return npm.registry.access(cmd, uri, params, function (err, data) { + if (!err && data) { + output(JSON.stringify(data, undefined, 2)) + } + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + access.usage) + } + } +} + +function parseParams (cmd, args, cb) { + // mapToRegistry will complain if package is undefined, + // but it's not needed for ls-packages + var params = { 'package': '' } + if (cmd === 'grant') { + params.permissions = args.shift() + } + if (['grant', 'revoke', 'ls-packages'].indexOf(cmd) !== -1) { + var entity = (args.shift() || '').split(':') + params.scope = entity[0] + params.team = entity[1] + } + + if (cmd === 'ls-packages') { + if (!params.scope) { + whoami([], true, function (err, scope) { + params.scope = scope + cb(err, params) + }) + } else { + cb(null, params) + } + } else { + getPackage(args.shift(), function (err, pkg) { + if (err) return cb(err) + params.package = pkg + + if (cmd === 'ls-collaborators') params.user = args.shift() + cb(null, params) + }) + } +} + +function getPackage (name, cb) { + if (name && name.trim()) { + cb(null, name.trim()) + } else { + readPackageJson( + resolve(npm.prefix, 'package.json'), + function (err, data) { + if (err) { + if (err.code === 'ENOENT') { + cb(new Error('no package name passed to command and no package.json found')) + } else { + cb(err) + } + } else { + cb(null, data.name) + } + } + ) + } +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/adduser.js b/bin/nodejs6.7.0/node_modules/npm/lib/adduser.js new file mode 100644 index 00000000..ce79c65b --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/adduser.js @@ -0,0 +1,180 @@ +module.exports = adduser + +var log = require('npmlog') +var npm = require('./npm.js') +var read = require('read') +var userValidate = require('npm-user-validate') +var output = require('./utils/output') +var usage = require('./utils/usage') +var chain = require('slide').chain +var crypto + +try { + crypto = require('crypto') +} catch (ex) {} + +adduser.usage = usage( + 'adduser', + 'npm adduser [--registry=url] [--scope=@orgname] [--always-auth]' +) + +function adduser (args, cb) { + if (!crypto) { + return cb(new Error( + 'You must compile node with ssl support to use the adduser feature' + )) + } + + var creds = npm.config.getCredentialsByURI(npm.config.get('registry')) + var c = { + u: creds.username || '', + p: creds.password || '', + e: creds.email || '' + } + var u = {} + + log.disableProgress() + chain([ + [readUsername, c, u], + [readPassword, c, u], + [readEmail, c, u], + [save, c, u] + ], cb) +} + +function readUsername (c, u, cb) { + var v = userValidate.username + read({prompt: 'Username: ', default: c.u || ''}, function (er, un) { + if (er) { + return cb(er.message === 'cancelled' ? er.message : er) + } + + // make sure it's valid. we have to do this here, because + // couchdb will only ever say "bad password" with a 401 when + // you try to PUT a _users record that the validate_doc_update + // rejects for *any* reason. + + if (!un) { + return readUsername(c, u, cb) + } + + var error = v(un) + if (error) { + log.warn(error.message) + return readUsername(c, u, cb) + } + + c.changed = c.u !== un + u.u = un + cb(er) + }) +} + +function readPassword (c, u, cb) { + var v = userValidate.pw + + var prompt + if (c.p && !c.changed) { + prompt = 'Password: (or leave unchanged) ' + } else { + prompt = 'Password: ' + } + + read({prompt: prompt, silent: true}, function (er, pw) { + if (er) { + return cb(er.message === 'cancelled' ? er.message : er) + } + + if (!c.changed && pw === '') { + // when the username was not changed, + // empty response means "use the old value" + pw = c.p + } + + if (!pw) { + return readPassword(c, u, cb) + } + + var error = v(pw) + if (error) { + log.warn(error.message) + return readPassword(c, u, cb) + } + + c.changed = c.changed || c.p !== pw + u.p = pw + cb(er) + }) +} + +function readEmail (c, u, cb) { + var v = userValidate.email + var r = { prompt: 'Email: (this IS public) ', default: c.e || '' } + read(r, function (er, em) { + if (er) { + return cb(er.message === 'cancelled' ? er.message : er) + } + + if (!em) { + return readEmail(c, u, cb) + } + + var error = v(em) + if (error) { + log.warn(error.message) + return readEmail(c, u, cb) + } + + u.e = em + cb(er) + }) +} + +function save (c, u, cb) { + // save existing configs, but yank off for this PUT + var uri = npm.config.get('registry') + var scope = npm.config.get('scope') + + // there may be a saved scope and no --registry (for login) + if (scope) { + if (scope.charAt(0) !== '@') scope = '@' + scope + + var scopedRegistry = npm.config.get(scope + ':registry') + var cliRegistry = npm.config.get('registry', 'cli') + if (scopedRegistry && !cliRegistry) uri = scopedRegistry + } + + var params = { + auth: { + username: u.u, + password: u.p, + email: u.e + } + } + npm.registry.adduser(uri, params, function (er, doc) { + if (er) return cb(er) + + // don't want this polluting the configuration + npm.config.del('_token', 'user') + + if (scope) npm.config.set(scope + ':registry', uri, 'user') + + if (doc && doc.token) { + npm.config.setCredentialsByURI(uri, { + token: doc.token + }) + } else { + npm.config.setCredentialsByURI(uri, { + username: u.u, + password: u.p, + email: u.e, + alwaysAuth: npm.config.get('always-auth') + }) + } + + log.info('adduser', 'Authorized user %s', u.u) + var scopeMessage = scope ? ' to scope ' + scope : '' + output('Logged in as %s%s on %s.', u.u, scopeMessage, uri) + npm.config.save('user', cb) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/bin.js b/bin/nodejs6.7.0/node_modules/npm/lib/bin.js new file mode 100644 index 00000000..4afa0c35 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/bin.js @@ -0,0 +1,23 @@ +module.exports = bin + +var npm = require('./npm.js') +var osenv = require('osenv') +var output = require('./utils/output.js') + +bin.usage = 'npm bin [--global]' + +function bin (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + var b = npm.bin + var PATH = osenv.path() + + if (!silent) output(b) + process.nextTick(cb.bind(this, null, b)) + + if (npm.config.get('global') && PATH.indexOf(b) === -1) { + npm.config.get('logstream').write('(not in PATH env variable)\n') + } +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/bugs.js b/bin/nodejs6.7.0/node_modules/npm/lib/bugs.js new file mode 100644 index 00000000..107085ea --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/bugs.js @@ -0,0 +1,32 @@ +module.exports = bugs + +var npm = require('./npm.js') +var log = require('npmlog') +var opener = require('opener') +var fetchPackageMetadata = require('./fetch-package-metadata.js') +var usage = require('./utils/usage') + +bugs.usage = usage( + 'bugs', + 'npm bugs []' +) + +bugs.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function bugs (args, cb) { + var n = args.length ? args[0] : '.' + fetchPackageMetadata(n, '.', function (er, d) { + if (er) return cb(er) + + var url = d.bugs && ((typeof d.bugs === 'string') ? d.bugs : d.bugs.url) + if (!url) { + url = 'https://www.npmjs.org/package/' + d.name + } + log.silly('bugs', 'url', url) + opener(url, { command: npm.config.get('browser') }, cb) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/build.js b/bin/nodejs6.7.0/node_modules/npm/lib/build.js new file mode 100644 index 00000000..823decf0 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/build.js @@ -0,0 +1,267 @@ +// npm build command + +// everything about the installation after the creation of +// the .npm/{name}/{version}/package folder. +// linking the modules into the npm.root, +// resolving dependencies, etc. + +// This runs AFTER install or link are completed. + +var npm = require('./npm.js') +var log = require('npmlog') +var chain = require('slide').chain +var fs = require('graceful-fs') +var path = require('path') +var lifecycle = require('./utils/lifecycle.js') +var readJson = require('read-package-json') +var link = require('./utils/link.js') +var linkIfExists = link.ifExists +var cmdShim = require('cmd-shim') +var cmdShimIfExists = cmdShim.ifExists +var asyncMap = require('slide').asyncMap +var ini = require('ini') +var writeFile = require('write-file-atomic') +var packageId = require('./utils/package-id.js') +var output = require('./utils/output.js') + +module.exports = build +build.usage = 'npm build []' + +build._didBuild = {} +build._noLC = {} +function build (args, global, didPre, didRB, cb) { + if (typeof cb !== 'function') { + cb = didRB + didRB = false + } + if (typeof cb !== 'function') { + cb = didPre + didPre = false + } + if (typeof cb !== 'function') { + cb = global + global = npm.config.get('global') + } + + // it'd be nice to asyncMap these, but actually, doing them + // in parallel generally munges up the output from node-waf + var builder = build_(global, didPre, didRB) + chain(args.map(function (arg) { + return function (cb) { + builder(arg, cb) + } + }), cb) +} + +function build_ (global, didPre, didRB) { + return function (folder, cb) { + folder = path.resolve(folder) + if (build._didBuild[folder]) log.info('build', 'already built', folder) + build._didBuild[folder] = true + log.info('build', folder) + readJson(path.resolve(folder, 'package.json'), function (er, pkg) { + if (er) return cb(er) + chain([ + !didPre && [lifecycle, pkg, 'preinstall', folder], + [linkStuff, pkg, folder, global, didRB], + [writeBuiltinConf, pkg, folder], + didPre !== build._noLC && [lifecycle, pkg, 'install', folder], + didPre !== build._noLC && [lifecycle, pkg, 'postinstall', folder], + didPre !== build._noLC && npm.config.get('npat') && [lifecycle, pkg, 'test', folder] + ], + cb) + }) + } +} + +var writeBuiltinConf = build.writeBuiltinConf = function (pkg, folder, cb) { + // the builtin config is "sticky". Any time npm installs + // itself globally, it puts its builtin config file there + var parent = path.dirname(folder) + var dir = npm.globalDir + + if (pkg.name !== 'npm' || + !npm.config.get('global') || + !npm.config.usingBuiltin || + dir !== parent) { + return cb() + } + + var data = ini.stringify(npm.config.sources.builtin.data) + writeFile(path.resolve(folder, 'npmrc'), data, cb) +} + +var linkStuff = build.linkStuff = function (pkg, folder, global, didRB, cb) { + // allow to opt out of linking binaries. + if (npm.config.get('bin-links') === false) return 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 parent = pkg.name && pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder) + var gnm = global && npm.globalDir + var gtop = parent === gnm + + log.info('linkStuff', packageId(pkg)) + log.silly('linkStuff', packageId(pkg), 'has', parent, 'as its parent node_modules') + if (global) log.silly('linkStuff', packageId(pkg), 'is part of a global install') + if (gnm) log.silly('linkStuff', packageId(pkg), 'is installed into a global node_modules') + if (gtop) log.silly('linkStuff', packageId(pkg), 'is installed into the top-level global node_modules') + + shouldWarn(pkg, folder, global, function () { + asyncMap( + [linkBins, linkMans, !didRB && rebuildBundles], + function (fn, cb) { + if (!fn) return cb() + log.verbose(fn.name, packageId(pkg)) + fn(pkg, folder, parent, gtop, cb) + }, + cb + ) + }) +} + +function shouldWarn (pkg, folder, global, cb) { + var parent = path.dirname(folder) + var top = parent === npm.dir + var cwd = npm.localPrefix + + readJson(path.resolve(cwd, 'package.json'), function (er, topPkg) { + if (er) return cb(er) + + var linkedPkg = path.basename(cwd) + var currentPkg = path.basename(folder) + + // current searched package is the linked package on first call + if (linkedPkg !== currentPkg) { + // don't generate a warning if it's listed in dependencies + if (Object.keys(topPkg.dependencies || {}) + .concat(Object.keys(topPkg.devDependencies || {})) + .indexOf(currentPkg) === -1) { + if (top && pkg.preferGlobal && !global) { + log.warn('prefer global', packageId(pkg) + ' should be installed with -g') + } + } + } + + cb() + }) +} + +function rebuildBundles (pkg, folder, parent, gtop, cb) { + if (!npm.config.get('rebuild-bundle')) return cb() + + var deps = Object.keys(pkg.dependencies || {}) + .concat(Object.keys(pkg.devDependencies || {})) + var bundles = pkg.bundleDependencies || pkg.bundledDependencies || [] + + fs.readdir(path.resolve(folder, 'node_modules'), function (er, files) { + // error means no bundles + if (er) return cb() + + log.verbose('rebuildBundles', files) + // don't asyncMap these, because otherwise build script output + // gets interleaved and is impossible to read + chain(files.filter(function (file) { + // rebuild if: + // not a .folder, like .bin or .hooks + return !file.match(/^[\._-]/) && + // not some old 0.x style bundle + file.indexOf('@') === -1 && + // either not a dep, or explicitly bundled + (deps.indexOf(file) === -1 || bundles.indexOf(file) !== -1) + }).map(function (file) { + file = path.resolve(folder, 'node_modules', file) + return function (cb) { + if (build._didBuild[file]) return cb() + log.verbose('rebuild bundle', file) + // if file is not a package dir, then don't do it. + fs.lstat(path.resolve(file, 'package.json'), function (er) { + if (er) return cb() + build_(false)(file, cb) + }) + } + }), cb) + }) +} + +function linkBins (pkg, folder, parent, gtop, cb) { + if (!pkg.bin || !gtop && path.basename(parent) !== 'node_modules') { + return cb() + } + var binRoot = gtop ? npm.globalBin + : path.resolve(parent, '.bin') + log.verbose('link bins', [pkg.bin, binRoot, gtop]) + + asyncMap(Object.keys(pkg.bin), function (b, cb) { + linkBin( + path.resolve(folder, pkg.bin[b]), + path.resolve(binRoot, b), + gtop && folder, + function (er) { + if (er) return cb(er) + // bins should always be executable. + // XXX skip chmod on windows? + var src = path.resolve(folder, pkg.bin[b]) + fs.chmod(src, npm.modes.exec, function (er) { + if (er && er.code === 'ENOENT' && npm.config.get('ignore-scripts')) { + return cb() + } + if (er || !gtop) return cb(er) + var dest = path.resolve(binRoot, b) + var out = npm.config.get('parseable') + ? dest + '::' + src + ':BINFILE' + : dest + ' -> ' + src + output(out) + cb() + }) + } + ) + }, cb) +} + +function linkBin (from, to, gently, cb) { + if (process.platform !== 'win32') { + return linkIfExists(from, to, gently, cb) + } else { + return cmdShimIfExists(from, to, cb) + } +} + +function linkMans (pkg, folder, parent, gtop, cb) { + if (!pkg.man || !gtop || process.platform === 'win32') return cb() + + var manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man') + log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot) + + // make sure that the mans are unique. + // otherwise, if there are dupes, it'll fail with EEXIST + var set = pkg.man.reduce(function (acc, man) { + acc[path.basename(man)] = man + return acc + }, {}) + pkg.man = pkg.man.filter(function (man) { + return set[path.basename(man)] === man + }) + + asyncMap(pkg.man, function (man, cb) { + if (typeof man !== 'string') return cb() + log.silly('linkMans', 'preparing to link', man) + var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) + if (!parseMan) { + return cb(new Error( + man + ' is not a valid name for a man file. ' + + 'Man files must end with a number, ' + + 'and optionally a .gz suffix if they are compressed.' + )) + } + + var stem = parseMan[1] + var sxn = parseMan[2] + var bn = path.basename(stem) + var manSrc = path.resolve(folder, man) + var manDest = path.join(manRoot, 'man' + sxn, bn) + + linkIfExists(manSrc, manDest, gtop && folder, cb) + }, cb) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/cache.js b/bin/nodejs6.7.0/node_modules/npm/lib/cache.js new file mode 100644 index 00000000..02c46e54 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/cache.js @@ -0,0 +1,367 @@ +// XXX lib/utils/tar.js and this file need to be rewritten. + +// URL-to-cache folder mapping: +// : -> ! +// @ -> _ +// http://registry.npmjs.org/foo/version -> cache/http!/... +// + +/* +fetching a URL: +1. Check for URL in inflight URLs. If present, add cb, and return. +2. Acquire lock at {cache}/{sha(url)}.lock + retries = {cache-lock-retries, def=10} + stale = {cache-lock-stale, def=60000} + wait = {cache-lock-wait, def=10000} +3. if lock can't be acquired, then fail +4. fetch url, clear lock, call cbs + +cache folders: +1. urls: http!/server.com/path/to/thing +2. c:\path\to\thing: file!/c!/path/to/thing +3. /path/to/thing: file!/path/to/thing +4. git@ private: git_github.com!npm/npm +5. git://public: git!/github.com/npm/npm +6. git+blah:// git-blah!/server.com/foo/bar + +adding a folder: +1. tar into tmp/random/package.tgz +2. untar into tmp/random/contents/package, stripping one dir piece +3. tar tmp/random/contents/package to cache/n/v/package.tgz +4. untar cache/n/v/package.tgz into cache/n/v/package +5. rm tmp/random + +Adding a url: +1. fetch to tmp/random/package.tgz +2. goto folder(2) + +adding a name@version: +1. registry.get(name/version) +2. if response isn't 304, add url(dist.tarball) + +adding a name@range: +1. registry.get(name) +2. Find a version that satisfies +3. add name@version + +adding a local tarball: +1. untar to tmp/random/{blah} +2. goto folder(2) + +adding a namespaced package: +1. lookup registry for @namespace +2. namespace_registry.get('name') +3. add url(namespace/latest.tarball) +*/ + +exports = module.exports = cache + +cache.unpack = unpack +cache.clean = clean +cache.read = read + +var npm = require('./npm.js') +var fs = require('graceful-fs') +var writeFileAtomic = require('write-file-atomic') +var assert = require('assert') +var rm = require('./utils/gently-rm.js') +var readJson = require('read-package-json') +var log = require('npmlog') +var path = require('path') +var asyncMap = require('slide').asyncMap +var tar = require('./utils/tar.js') +var fileCompletion = require('./utils/completion/file-completion.js') +var deprCheck = require('./utils/depr-check.js') +var addNamed = require('./cache/add-named.js') +var addLocal = require('./cache/add-local.js') +var addRemoteTarball = require('./cache/add-remote-tarball.js') +var addRemoteGit = require('./cache/add-remote-git.js') +var inflight = require('inflight') +var realizePackageSpecifier = require('realize-package-specifier') +var npa = require('npm-package-arg') +var getStat = require('./cache/get-stat.js') +var cachedPackageRoot = require('./cache/cached-package-root.js') +var mapToRegistry = require('./utils/map-to-registry.js') +var output = require('./utils/output.js') + +cache.usage = 'npm cache add ' + + '\nnpm cache add ' + + '\nnpm cache add ' + + '\nnpm cache add ' + + '\nnpm cache add @' + + '\nnpm cache ls []' + + '\nnpm cache clean [[@]]' + +cache.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, ['add', 'ls', 'clean']) + } + + switch (argv[2]) { + case 'clean': + case 'ls': + // cache and ls are easy, because the completion is + // what ls_ returns anyway. + // just get the partial words, minus the last path part + var p = path.dirname(opts.partialWords.slice(3).join('/')) + if (p === '.') p = '' + return ls_(p, 2, cb) + case 'add': + // Same semantics as install and publish. + return npm.commands.install.completion(opts, cb) + } +} + +function cache (args, cb) { + var cmd = args.shift() + switch (cmd) { + case 'rm': case 'clear': case 'clean': return clean(args, cb) + case 'list': case 'sl': case 'ls': return ls(args, cb) + case 'add': return add(args, npm.prefix, cb) + default: return cb('Usage: ' + cache.usage) + } +} + +// if the pkg and ver are in the cache, then +// just do a readJson and return. +// if they're not, then fetch them from the registry. +function read (name, ver, forceBypass, cb) { + assert(typeof name === 'string', 'must include name of module to install') + assert(typeof cb === 'function', 'must include callback') + + if (forceBypass === undefined || forceBypass === null) forceBypass = true + + var root = cachedPackageRoot({name: name, version: ver}) + function c (er, data) { + if (er) log.verbose('cache', 'addNamed error for', name + '@' + ver, er) + if (data) deprCheck(data) + + return cb(er, data) + } + + if (forceBypass && npm.config.get('force')) { + log.verbose('using force', 'skipping cache') + return addNamed(name, ver, null, c) + } + + readJson(path.join(root, 'package', 'package.json'), function (er, data) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + + if (data) { + if (!data.name) return cb(new Error('No name provided')) + if (!data.version) return cb(new Error('No version provided')) + } + + if (er) return addNamed(name, ver, null, c) + else c(er, data) + }) +} + +function normalize (args) { + var normalized = '' + if (args.length > 0) { + var a = npa(args[0]) + if (a.name) normalized = a.name + if (a.rawSpec) normalized = [normalized, a.rawSpec].join('/') + if (args.length > 1) normalized = [normalized].concat(args.slice(1)).join('/') + } + + if (normalized.substr(-1) === '/') { + normalized = normalized.substr(0, normalized.length - 1) + } + normalized = path.normalize(normalized) + log.silly('ls', 'normalized', normalized) + + return normalized +} + +// npm cache ls [] +function ls (args, cb) { + var prefix = npm.config.get('cache') + if (prefix.indexOf(process.env.HOME) === 0) { + prefix = '~' + prefix.substr(process.env.HOME.length) + } + ls_(normalize(args), npm.config.get('depth'), function (er, files) { + output(files.map(function (f) { + return path.join(prefix, f) + }).join('\n').trim()) + cb(er, files) + }) +} + +// Calls cb with list of cached pkgs matching show. +function ls_ (req, depth, cb) { + return fileCompletion(npm.cache, req, depth, cb) +} + +// npm cache clean [] +function clean (args, cb) { + assert(typeof cb === 'function', 'must include callback') + + if (!args) args = [] + + var f = path.join(npm.cache, normalize(args)) + if (f === npm.cache) { + fs.readdir(npm.cache, function (er, files) { + if (er) return cb() + asyncMap( + files.filter(function (f) { + return npm.config.get('force') || f !== '-' + }).map(function (f) { + return path.join(npm.cache, f) + }), + rm, + cb + ) + }) + } else { + rm(f, cb) + } +} + +// npm cache add +// npm cache add +// npm cache add +// npm cache add +cache.add = function (pkg, ver, where, scrub, cb) { + assert(typeof pkg === 'string', 'must include name of package to install') + assert(typeof cb === 'function', 'must include callback') + + if (scrub) { + return clean([], function (er) { + if (er) return cb(er) + add([pkg, ver], where, cb) + }) + } + return add([pkg, ver], where, cb) +} + +var adding = 0 +function add (args, where, cb) { + // this is hot code. almost everything passes through here. + // the args can be any of: + // ['url'] + // ['pkg', 'version'] + // ['pkg@version'] + // ['pkg', 'url'] + // This is tricky, because urls can contain @ + // Also, in some cases we get [name, null] rather + // that just a single argument. + + var usage = 'Usage:\n' + + ' npm cache add \n' + + ' npm cache add @\n' + + ' npm cache add \n' + + ' npm cache add \n' + var spec + + log.silly('cache add', 'args', args) + + if (args[1] === undefined) args[1] = null + + // at this point the args length must ==2 + if (args[1] !== null) { + spec = args[0] + '@' + args[1] + } else if (args.length === 2) { + spec = args[0] + } + + log.verbose('cache add', 'spec', spec) + + if (!spec) return cb(usage) + + adding++ + cb = afterAdd(cb) + + realizePackageSpecifier(spec, where, function (err, p) { + if (err) return cb(err) + + log.silly('cache add', 'parsed spec', p) + + switch (p.type) { + case 'local': + case 'directory': + addLocal(p, null, cb) + break + case 'remote': + // get auth, if possible + mapToRegistry(p.raw, npm.config, function (err, uri, auth) { + if (err) return cb(err) + + addRemoteTarball(p.spec, { name: p.name }, null, auth, cb) + }) + break + case 'git': + case 'hosted': + addRemoteGit(p.rawSpec, cb) + break + default: + if (p.name) return addNamed(p.name, p.spec, null, cb) + + cb(new Error("couldn't figure out how to install " + spec)) + } + }) +} + +function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb) { + if (typeof cb !== 'function') { + cb = gid + gid = null + } + if (typeof cb !== 'function') { + cb = uid + uid = null + } + if (typeof cb !== 'function') { + cb = fMode + fMode = null + } + if (typeof cb !== 'function') { + cb = dMode + dMode = null + } + + read(pkg, ver, false, function (er) { + if (er) { + log.error('unpack', 'Could not read data for %s', pkg + '@' + ver) + return cb(er) + } + npm.commands.unbuild([unpackTarget], true, function (er) { + if (er) return cb(er) + tar.unpack( + path.join(cachedPackageRoot({ name: pkg, version: ver }), 'package.tgz'), + unpackTarget, + dMode, fMode, + uid, gid, + cb + ) + }) + }) +} + +function afterAdd (cb) { + return function (er, data) { + adding-- + + if (er || !data || !data.name || !data.version) return cb(er, data) + log.silly('cache', 'afterAdd', data.name + '@' + data.version) + + // Save the resolved, shasum, etc. into the data so that the next + // time we load from this cached data, we have all the same info. + // Ignore if it fails. + var pj = path.join(cachedPackageRoot(data), 'package', 'package.json') + + var done = inflight(pj, cb) + if (!done) return log.verbose('afterAdd', pj, 'already in flight; not writing') + log.verbose('afterAdd', pj, 'not in flight; writing') + + getStat(function (er, cs) { + if (er) return done(er) + writeFileAtomic(pj, JSON.stringify(data), { chown: cs }, function (er) { + if (!er) log.verbose('afterAdd', pj, 'written') + return done(null, data) + }) + }) + } +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/completion.js b/bin/nodejs6.7.0/node_modules/npm/lib/completion.js new file mode 100644 index 00000000..ba209667 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/completion.js @@ -0,0 +1,248 @@ +module.exports = completion + +completion.usage = 'source <(npm completion)' + +var npm = require('./npm.js') +var npmconf = require('./config/core.js') +var configDefs = npmconf.defs +var configTypes = configDefs.types +var shorthands = configDefs.shorthands +var nopt = require('nopt') +var configNames = Object.keys(configTypes) + .filter(function (e) { return e.charAt(0) !== '_' }) +var shorthandNames = Object.keys(shorthands) +var allConfs = configNames.concat(shorthandNames) +var once = require('once') +var isWindowsShell = require('./utils/is-windows-shell.js') +var output = require('./utils/output.js') + +completion.completion = function (opts, cb) { + if (opts.w > 3) return cb() + + var fs = require('graceful-fs') + var path = require('path') + var bashExists = null + var zshExists = null + fs.stat(path.resolve(process.env.HOME, '.bashrc'), function (er) { + bashExists = !er + next() + }) + fs.stat(path.resolve(process.env.HOME, '.zshrc'), function (er) { + zshExists = !er + next() + }) + function next () { + if (zshExists === null || bashExists === null) return + var out = [] + if (zshExists) out.push('~/.zshrc') + if (bashExists) out.push('~/.bashrc') + if (opts.w === 2) { + out = out.map(function (m) { + return ['>>', m] + }) + } + cb(null, out) + } +} + +function completion (args, cb) { + if (isWindowsShell) { + var e = new Error('npm completion supported only in MINGW / Git bash on Windows') + e.code = 'ENOTSUP' + e.errno = require('constants').ENOTSUP + return cb(e) + } + + // if the COMP_* isn't in the env, then just dump the script. + if (process.env.COMP_CWORD === undefined || + process.env.COMP_LINE === undefined || + process.env.COMP_POINT === undefined) { + return dumpScript(cb) + } + + console.error(process.env.COMP_CWORD) + console.error(process.env.COMP_LINE) + console.error(process.env.COMP_POINT) + + // get the partial line and partial word, + // if the point isn't at the end. + // ie, tabbing at: npm foo b|ar + var w = +process.env.COMP_CWORD + var words = args.map(unescape) + var word = words[w] + var line = process.env.COMP_LINE + var point = +process.env.COMP_POINT + var partialLine = line.substr(0, point) + var partialWords = words.slice(0, w) + + // figure out where in that last word the point is. + var partialWord = args[w] + var i = partialWord.length + while (partialWord.substr(0, i) !== partialLine.substr(-1 * i) && i > 0) { + i-- + } + partialWord = unescape(partialWord.substr(0, i)) + partialWords.push(partialWord) + + var opts = { + words: words, + w: w, + word: word, + line: line, + lineLength: line.length, + point: point, + partialLine: partialLine, + partialWords: partialWords, + partialWord: partialWord, + raw: args + } + + cb = wrapCb(cb, opts) + + console.error(opts) + + if (partialWords.slice(0, -1).indexOf('--') === -1) { + if (word.charAt(0) === '-') return configCompl(opts, cb) + if (words[w - 1] && + words[w - 1].charAt(0) === '-' && + !isFlag(words[w - 1])) { + // awaiting a value for a non-bool config. + // don't even try to do this for now + console.error('configValueCompl') + return configValueCompl(opts, cb) + } + } + + // try to find the npm command. + // it's the first thing after all the configs. + // take a little shortcut and use npm's arg parsing logic. + // don't have to worry about the last arg being implicitly + // boolean'ed, since the last block will catch that. + var parsed = opts.conf = + nopt(configTypes, shorthands, partialWords.slice(0, -1), 0) + // check if there's a command already. + console.error(parsed) + var cmd = parsed.argv.remain[1] + if (!cmd) return cmdCompl(opts, cb) + + Object.keys(parsed).forEach(function (k) { + npm.config.set(k, parsed[k]) + }) + + // at this point, if words[1] is some kind of npm command, + // then complete on it. + // otherwise, do nothing + cmd = npm.commands[cmd] + if (cmd && cmd.completion) return cmd.completion(opts, cb) + + // nothing to do. + cb() +} + +function dumpScript (cb) { + var fs = require('graceful-fs') + var path = require('path') + var p = path.resolve(__dirname, 'utils/completion.sh') + + // The Darwin patch below results in callbacks first for the write and then + // for the error handler, so make sure we only call our callback once. + cb = once(cb) + + fs.readFile(p, 'utf8', function (er, d) { + if (er) return cb(er) + d = d.replace(/^\#\!.*?\n/, '') + + process.stdout.write(d, function () { cb() }) + process.stdout.on('error', function (er) { + // Darwin is a pain sometimes. + // + // This is necessary because the "source" or "." program in + // bash on OS X closes its file argument before reading + // from it, meaning that you get exactly 1 write, which will + // work most of the time, and will always raise an EPIPE. + // + // Really, one should not be tossing away EPIPE errors, or any + // errors, so casually. But, without this, `. <(npm completion)` + // can never ever work on OS X. + if (er.errno === 'EPIPE') er = null + cb(er) + }) + }) +} + +function unescape (w) { + if (w.charAt(0) === '\'') return w.replace(/^'|'$/g, '') + else return w.replace(/\\ /g, ' ') +} + +function escape (w) { + if (!w.match(/\s+/)) return w + return '\'' + w + '\'' +} + +// The command should respond with an array. Loop over that, +// wrapping quotes around any that have spaces, and writing +// them to stdout. Use console.log, not the outfd config. +// If any of the items are arrays, then join them with a space. +// Ie, returning ['a', 'b c', ['d', 'e']] would allow it to expand +// to: 'a', 'b c', or 'd' 'e' +function wrapCb (cb, opts) { + return function (er, compls) { + if (!Array.isArray(compls)) compls = compls ? [compls] : [] + compls = compls.map(function (c) { + if (Array.isArray(c)) c = c.map(escape).join(' ') + else c = escape(c) + return c + }) + + if (opts.partialWord) { + compls = compls.filter(function (c) { + return c.indexOf(opts.partialWord) === 0 + }) + } + + console.error([er && er.stack, compls, opts.partialWord]) + if (er || compls.length === 0) return cb(er) + + output(compls.join('\n')) + cb() + } +} + +// the current word has a dash. Return the config names, +// with the same number of dashes as the current word has. +function configCompl (opts, cb) { + var word = opts.word + var split = word.match(/^(-+)((?:no-)*)(.*)$/) + var dashes = split[1] + var no = split[2] + var flags = configNames.filter(isFlag) + console.error(flags) + + return cb(null, allConfs.map(function (c) { + return dashes + c + }).concat(flags.map(function (f) { + return dashes + (no || 'no-') + f + }))) +} + +// expand with the valid values of various config values. +// not yet implemented. +function configValueCompl (opts, cb) { + console.error('configValue', opts) + return cb(null, []) +} + +// check if the thing is a flag or not. +function isFlag (word) { + // shorthands never take args. + var split = word.match(/^(-*)((?:no-)+)?(.*)$/) + var no = split[2] + var conf = split[3] + return no || configTypes[conf] === Boolean || shorthands[conf] +} + +// complete against the npm commands +function cmdCompl (opts, cb) { + return cb(null, npm.fullList) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/config.js b/bin/nodejs6.7.0/node_modules/npm/lib/config.js new file mode 100644 index 00000000..85492307 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/config.js @@ -0,0 +1,304 @@ +module.exports = config + +var log = require('npmlog') +var npm = require('./npm.js') +var npmconf = require('./config/core.js') +var fs = require('graceful-fs') +var writeFileAtomic = require('write-file-atomic') +var types = npmconf.defs.types +var ini = require('ini') +var editor = require('editor') +var os = require('os') +var umask = require('./utils/umask') +var usage = require('./utils/usage') +var output = require('./utils/output') + +config.usage = usage( + 'config', + 'npm config set ' + + '\nnpm config get []' + + '\nnpm config delete ' + + '\nnpm config list' + + '\nnpm config edit' + + '\nnpm set ' + + '\nnpm get []' +) +config.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv[1] !== 'config') argv.unshift('config') + if (argv.length === 2) { + var cmds = ['get', 'set', 'delete', 'ls', 'rm', 'edit'] + if (opts.partialWord !== 'l') cmds.push('list') + return cb(null, cmds) + } + + var action = argv[2] + switch (action) { + case 'set': + // todo: complete with valid values, if possible. + if (argv.length > 3) return cb(null, []) + // fallthrough + /*eslint no-fallthrough:0*/ + case 'get': + case 'delete': + case 'rm': + return cb(null, Object.keys(types)) + case 'edit': + case 'list': case 'ls': + return cb(null, []) + default: return cb(null, []) + } +} + +// npm config set key value +// npm config get key +// npm config list +function config (args, cb) { + var action = args.shift() + switch (action) { + case 'set': return set(args[0], args[1], cb) + case 'get': return get(args[0], cb) + case 'delete': case 'rm': case 'del': return del(args[0], cb) + case 'list': case 'ls': return list(cb) + case 'edit': return edit(cb) + default: return unknown(action, cb) + } +} + +function edit (cb) { + var e = npm.config.get('editor') + var which = npm.config.get('global') ? 'global' : 'user' + var f = npm.config.get(which + 'config') + if (!e) return cb(new Error('No EDITOR config or environ set.')) + npm.config.save(which, function (er) { + if (er) return cb(er) + fs.readFile(f, 'utf8', function (er, data) { + if (er) data = '' + data = [ + ';;;;', + '; npm ' + (npm.config.get('global') + ? 'globalconfig' : 'userconfig') + ' file', + '; this is a simple ini-formatted file', + '; lines that start with semi-colons are comments.', + '; read `npm help config` for help on the various options', + ';;;;', + '', + data + ].concat([ + ';;;;', + '; all options with default values', + ';;;;' + ]).concat(Object.keys(npmconf.defaults).reduce(function (arr, key) { + var obj = {} + obj[key] = npmconf.defaults[key] + if (key === 'logstream') return arr + return arr.concat( + ini.stringify(obj) + .replace(/\n$/m, '') + .replace(/^/g, '; ') + .replace(/\n/g, '\n; ') + .split('\n')) + }, [])) + .concat(['']) + .join(os.EOL) + writeFileAtomic( + f, + data, + function (er) { + if (er) return cb(er) + editor(f, { editor: e }, cb) + } + ) + }) + }) +} + +function del (key, cb) { + if (!key) return cb(new Error('no key provided')) + var where = npm.config.get('global') ? 'global' : 'user' + npm.config.del(key, where) + npm.config.save(where, cb) +} + +function set (key, val, cb) { + if (key === undefined) { + return unknown('', cb) + } + if (val === undefined) { + if (key.indexOf('=') !== -1) { + var k = key.split('=') + key = k.shift() + val = k.join('=') + } else { + val = '' + } + } + key = key.trim() + val = val.trim() + log.info('config', 'set %j %j', key, val) + var where = npm.config.get('global') ? 'global' : 'user' + if (key.match(/umask/)) val = umask.fromString(val) + npm.config.set(key, val, where) + npm.config.save(where, cb) +} + +function get (key, cb) { + if (!key) return list(cb) + if (!publicVar(key)) { + return cb(new Error('---sekretz---')) + } + var val = npm.config.get(key) + if (key.match(/umask/)) val = umask.toString(val) + output(val) + cb() +} + +function sort (a, b) { + return a > b ? 1 : -1 +} + +function publicVar (k) { + return !(k.charAt(0) === '_' || + k.indexOf(':_') !== -1 || + types[k] !== types[k]) +} + +function getKeys (data) { + return Object.keys(data).filter(publicVar).sort(sort) +} + +function list (cb) { + var msg = '' + var long = npm.config.get('long') + + var cli = npm.config.sources.cli.data + var cliKeys = getKeys(cli) + if (cliKeys.length) { + msg += '; cli configs\n' + cliKeys.forEach(function (k) { + if (cli[k] && typeof cli[k] === 'object') return + if (k === 'argv') return + msg += k + ' = ' + JSON.stringify(cli[k]) + '\n' + }) + msg += '\n' + } + + // env configs + var env = npm.config.sources.env.data + var envKeys = getKeys(env) + if (envKeys.length) { + msg += '; environment configs\n' + envKeys.forEach(function (k) { + if (env[k] !== npm.config.get(k)) { + if (!long) return + msg += '; ' + k + ' = ' + + JSON.stringify(env[k]) + ' (overridden)\n' + } else msg += k + ' = ' + JSON.stringify(env[k]) + '\n' + }) + msg += '\n' + } + + // project config file + var project = npm.config.sources.project + var pconf = project.data + var ppath = project.path + var pconfKeys = getKeys(pconf) + if (pconfKeys.length) { + msg += '; project config ' + ppath + '\n' + pconfKeys.forEach(function (k) { + var val = (k.charAt(0) === '_') + ? '---sekretz---' + : JSON.stringify(pconf[k]) + if (pconf[k] !== npm.config.get(k)) { + if (!long) return + msg += '; ' + k + ' = ' + val + ' (overridden)\n' + } else msg += k + ' = ' + val + '\n' + }) + msg += '\n' + } + + // user config file + var uconf = npm.config.sources.user.data + var uconfKeys = getKeys(uconf) + if (uconfKeys.length) { + msg += '; userconfig ' + npm.config.get('userconfig') + '\n' + uconfKeys.forEach(function (k) { + var val = (k.charAt(0) === '_') + ? '---sekretz---' + : JSON.stringify(uconf[k]) + if (uconf[k] !== npm.config.get(k)) { + if (!long) return + msg += '; ' + k + ' = ' + val + ' (overridden)\n' + } else msg += k + ' = ' + val + '\n' + }) + msg += '\n' + } + + // global config file + var gconf = npm.config.sources.global.data + var gconfKeys = getKeys(gconf) + if (gconfKeys.length) { + msg += '; globalconfig ' + npm.config.get('globalconfig') + '\n' + gconfKeys.forEach(function (k) { + var val = (k.charAt(0) === '_') + ? '---sekretz---' + : JSON.stringify(gconf[k]) + if (gconf[k] !== npm.config.get(k)) { + if (!long) return + msg += '; ' + k + ' = ' + val + ' (overridden)\n' + } else msg += k + ' = ' + val + '\n' + }) + msg += '\n' + } + + // builtin config file + var builtin = npm.config.sources.builtin || {} + if (builtin && builtin.data) { + var bconf = builtin.data + var bpath = builtin.path + var bconfKeys = getKeys(bconf) + if (bconfKeys.length) { + msg += '; builtin config ' + bpath + '\n' + bconfKeys.forEach(function (k) { + var val = (k.charAt(0) === '_') + ? '---sekretz---' + : JSON.stringify(bconf[k]) + if (bconf[k] !== npm.config.get(k)) { + if (!long) return + msg += '; ' + k + ' = ' + val + ' (overridden)\n' + } else msg += k + ' = ' + val + '\n' + }) + msg += '\n' + } + } + + // only show defaults if --long + if (!long) { + msg += '; node bin location = ' + process.execPath + '\n' + + '; cwd = ' + process.cwd() + '\n' + + '; HOME = ' + process.env.HOME + '\n' + + '; "npm config ls -l" to show all defaults.\n' + + output(msg) + return cb() + } + + var defaults = npmconf.defaults + var defKeys = getKeys(defaults) + msg += '; default values\n' + defKeys.forEach(function (k) { + if (defaults[k] && typeof defaults[k] === 'object') return + var val = JSON.stringify(defaults[k]) + if (defaults[k] !== npm.config.get(k)) { + msg += '; ' + k + ' = ' + val + ' (overridden)\n' + } else msg += k + ' = ' + val + '\n' + }) + msg += '\n' + + output(msg) + return cb() +} + +function unknown (action, cb) { + cb('Usage:\n' + config.usage) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/dedupe.js b/bin/nodejs6.7.0/node_modules/npm/lib/dedupe.js new file mode 100644 index 00000000..3b741319 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/dedupe.js @@ -0,0 +1,167 @@ +var util = require('util') +var path = require('path') +var validate = require('aproba') +var without = require('lodash.without') +var asyncMap = require('slide').asyncMap +var chain = require('slide').chain +var npa = require('npm-package-arg') +var log = require('npmlog') +var npm = require('./npm.js') +var Installer = require('./install.js').Installer +var findRequirement = require('./install/deps.js').findRequirement +var earliestInstallable = require('./install/deps.js').earliestInstallable +var checkPermissions = require('./install/check-permissions.js') +var decomposeActions = require('./install/decompose-actions.js') +var loadExtraneous = require('./install/deps.js').loadExtraneous +var filterInvalidActions = require('./install/filter-invalid-actions.js') +var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var sortActions = require('./install/diff-trees.js').sortActions +var moduleName = require('./utils/module-name.js') +var packageId = require('./utils/package-id.js') +var childPath = require('./utils/child-path.js') +var usage = require('./utils/usage') + +module.exports = dedupe +module.exports.Deduper = Deduper + +dedupe.usage = usage( + 'dedupe', + 'npm dedupe' +) + +function dedupe (args, cb) { + validate('AF', arguments) + // the /path/to/node_modules/.. + var where = path.resolve(npm.dir, '..') + var dryrun = false + if (npm.command.match(/^find/)) dryrun = true + if (npm.config.get('dry-run')) dryrun = true + + new Deduper(where, dryrun).run(cb) +} + +function Deduper (where, dryrun) { + validate('SB', arguments) + Installer.call(this, where, dryrun, []) + this.noPackageJsonOk = true + this.topLevelLifecycles = false +} +util.inherits(Deduper, Installer) + +Deduper.prototype.normalizeTree = function (log, cb) { + validate('OF', arguments) + log.silly('dedupe', 'normalizeTree') + // If we're looking globally only look at the one package we're operating on + if (npm.config.get('global')) { + var args = this.args + this.currentTree.children = this.currentTree.children.filter(function (child) { + return args.filter(function (arg) { return arg === moduleName(child) }).length + }) + } + Installer.prototype.normalizeTree.call(this, log, cb) +} + +Deduper.prototype.loadIdealTree = function (cb) { + validate('F', arguments) + log.silly('install', 'loadIdealTree') + + var self = this + chain([ + [this.newTracker(this.progress.loadIdealTree, 'cloneCurrentTree')], + [this, this.cloneCurrentTreeToIdealTree], + [this, this.finishTracker, 'cloneCurrentTree'], + + [this.newTracker(this.progress.loadIdealTree, 'loadAllDepsIntoIdealTree', 10)], + [ function (next) { + loadExtraneous(self.idealTree, self.progress.loadAllDepsIntoIdealTree, next) + } ], + [this, this.finishTracker, 'loadAllDepsIntoIdealTree'], + + [this, function (next) { recalculateMetadata(this.idealTree, log, next) }] + ], cb) +} + +Deduper.prototype.generateActionsToTake = function (cb) { + validate('F', arguments) + log.silly('dedupe', 'generateActionsToTake') + chain([ + [this.newTracker(log, 'hoist', 1)], + [hoistChildren, this.idealTree, this.differences], + [this, this.finishTracker, 'hoist'], + [this.newTracker(log, 'sort-actions', 1)], + [this, function (next) { + this.differences = sortActions(this.differences) + next() + }], + [this, this.finishTracker, 'sort-actions'], + [filterInvalidActions, this.where, this.differences], + [checkPermissions, this.differences], + [decomposeActions, this.differences, this.todo] + ], cb) +} + +function move (node, hoistTo, diff) { + node.parent.children = without(node.parent.children, node) + hoistTo.children.push(node) + node.fromPath = node.path + node.path = childPath(hoistTo.path, node) + node.parent = hoistTo + if (!diff.filter(function (action) { return action[0] === 'move' && action[1] === node }).length) { + diff.push(['move', node]) + } +} + +function moveRemainingChildren (node, diff) { + node.children.forEach(function (child) { + move(child, node, diff) + moveRemainingChildren(child, diff) + }) +} + +function remove (child, diff, done) { + remove_(child, diff, {}, done) +} + +function remove_ (child, diff, seen, done) { + if (seen[child.path]) return done() + seen[child.path] = true + diff.push(['remove', child]) + child.parent.children = without(child.parent.children, child) + asyncMap(child.children, function (child, next) { + remove_(child, diff, seen, next) + }, done) +} + +function hoistChildren (tree, diff, next) { + hoistChildren_(tree, diff, {}, next) +} + +function hoistChildren_ (tree, diff, seen, next) { + validate('OAOF', arguments) + if (seen[tree.path]) return next() + seen[tree.path] = true + asyncMap(tree.children, function (child, done) { + if (!tree.parent) return hoistChildren_(child, diff, seen, done) + var better = findRequirement(tree.parent, moduleName(child), child.package._requested || npa(packageId(child))) + if (better) { + return chain([ + [remove, child, diff], + [recalculateMetadata, tree, log] + ], done) + } + var hoistTo = earliestInstallable(tree, tree.parent, child.package) + if (hoistTo) { + move(child, hoistTo, diff) + chain([ + [recalculateMetadata, hoistTo, log], + [hoistChildren_, child, diff, seen], + [ function (next) { + moveRemainingChildren(child, diff) + next() + } ] + ], done) + } else { + done() + } + }, next) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/deprecate.js b/bin/nodejs6.7.0/node_modules/npm/lib/deprecate.js new file mode 100644 index 00000000..33d226ac --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/deprecate.js @@ -0,0 +1,54 @@ +var npm = require('./npm.js') +var mapToRegistry = require('./utils/map-to-registry.js') +var npa = require('npm-package-arg') + +module.exports = deprecate + +deprecate.usage = 'npm deprecate [@] ' + +deprecate.completion = function (opts, cb) { + // first, get a list of remote packages this user owns. + // once we have a user account, then don't complete anything. + if (opts.conf.argv.remain.length > 2) return cb() + // get the list of packages by user + var path = '/-/by-user/' + mapToRegistry(path, npm.config, function (er, uri, c) { + if (er) return cb(er) + + if (!(c && c.username)) return cb() + + var params = { + timeout: 60000, + auth: c + } + npm.registry.get(uri + c.username, params, function (er, list) { + if (er) return cb() + console.error(list) + return cb(null, list[c.username]) + }) + }) +} + +function deprecate (args, cb) { + var pkg = args[0] + var msg = args[1] + if (msg === undefined) return cb('Usage: ' + deprecate.usage) + + // fetch the data and make sure it exists. + var p = npa(pkg) + + // npa makes the default spec "latest", but for deprecation + // "*" is the appropriate default. + if (p.rawSpec === '') p.spec = '*' + + mapToRegistry(p.name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version: p.spec, + message: msg, + auth: auth + } + npm.registry.deprecate(uri, params, cb) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/dist-tag.js b/bin/nodejs6.7.0/node_modules/npm/lib/dist-tag.js new file mode 100644 index 00000000..e1b5c67b --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/dist-tag.js @@ -0,0 +1,158 @@ +module.exports = distTag + +var log = require('npmlog') +var npa = require('npm-package-arg') +var semver = require('semver') + +var npm = require('./npm.js') +var mapToRegistry = require('./utils/map-to-registry.js') +var readLocalPkg = require('./utils/read-local-package.js') +var usage = require('./utils/usage') +var output = require('./utils/output.js') + +distTag.usage = usage( + 'dist-tag', + 'npm dist-tag add @ []' + + '\nnpm dist-tag rm ' + + '\nnpm dist-tag ls []' +) + +distTag.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, ['add', 'rm', 'ls']) + } + + switch (argv[2]) { + default: + return cb() + } +} + +function distTag (args, cb) { + var cmd = args.shift() + switch (cmd) { + case 'add': case 'a': case 'set': case 's': + return add(args[0], args[1], cb) + case 'rm': case 'r': case 'del': case 'd': case 'remove': + return remove(args[1], args[0], cb) + case 'ls': case 'l': case 'sl': case 'list': + return list(args[0], cb) + default: + return cb('Usage:\n' + distTag.usage) + } +} + +function add (spec, tag, cb) { + var thing = npa(spec || '') + var pkg = thing.name + var version = thing.rawSpec + var t = (tag || npm.config.get('tag')).trim() + + log.verbose('dist-tag add', t, 'to', pkg + '@' + version) + + if (!pkg || !version || !t) return cb('Usage:\n' + distTag.usage) + + if (semver.validRange(t)) { + var er = new Error('Tag name must not be a valid SemVer range: ' + t) + return cb(er) + } + + fetchTags(pkg, function (er, tags) { + if (er) return cb(er) + + if (tags[t] === version) { + log.warn('dist-tag add', t, 'is already set to version', version) + return cb() + } + tags[t] = version + + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + var params = { + 'package': pkg, + distTag: t, + version: version, + auth: auth + } + + npm.registry.distTags.add(base, params, function (er) { + if (er) return cb(er) + + output('+' + t + ': ' + pkg + '@' + version) + cb() + }) + }) + }) +} + +function remove (tag, pkg, cb) { + log.verbose('dist-tag del', tag, 'from', pkg) + + fetchTags(pkg, function (er, tags) { + if (er) return cb(er) + + if (!tags[tag]) { + log.info('dist-tag del', tag, 'is not a dist-tag on', pkg) + return cb(new Error(tag + ' is not a dist-tag on ' + pkg)) + } + + var version = tags[tag] + delete tags[tag] + + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + var params = { + 'package': pkg, + distTag: tag, + auth: auth + } + + npm.registry.distTags.rm(base, params, function (er) { + if (er) return cb(er) + + output('-' + tag + ': ' + pkg + '@' + version) + cb() + }) + }) + }) +} + +function list (pkg, cb) { + if (!pkg) { + return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(distTag.usage) + list(pkg, cb) + }) + } + + fetchTags(pkg, function (er, tags) { + if (er) { + log.error('dist-tag ls', "Couldn't get dist-tag data for", pkg) + return cb(er) + } + var msg = Object.keys(tags).map(function (k) { + return k + ': ' + tags[k] + }).sort().join('\n') + output(msg) + cb(er, tags) + }) +} + +function fetchTags (pkg, cb) { + mapToRegistry(pkg, npm.config, function (er, uri, auth, base) { + if (er) return cb(er) + + var params = { + 'package': pkg, + auth: auth + } + npm.registry.distTags.fetch(base, params, function (er, tags) { + if (er) return cb(er) + if (!tags || !Object.keys(tags).length) { + return cb(new Error('No dist-tags found for ' + pkg)) + } + + cb(null, tags) + }) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/docs.js b/bin/nodejs6.7.0/node_modules/npm/lib/docs.js new file mode 100644 index 00000000..ebb312dd --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/docs.js @@ -0,0 +1,42 @@ +module.exports = docs + +var npm = require('./npm.js') +var opener = require('opener') +var log = require('npmlog') +var fetchPackageMetadata = require('./fetch-package-metadata.js') +var usage = require('./utils/usage') + +docs.usage = usage( + 'docs', + 'npm docs ' + + '\nnpm docs .' +) +docs.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function docs (args, cb) { + if (!args || !args.length) args = ['.'] + var pending = args.length + log.silly('docs', args) + args.forEach(function (proj) { + getDoc(proj, function (err) { + if (err) { + return cb(err) + } + --pending || cb() + }) + }) +} + +function getDoc (project, cb) { + log.silly('getDoc', project) + fetchPackageMetadata(project, '.', function (er, d) { + if (er) return cb(er) + var url = d.homepage + if (!url) url = 'https://www.npmjs.org/package/' + d.name + return opener(url, {command: npm.config.get('browser')}, cb) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/edit.js b/bin/nodejs6.7.0/node_modules/npm/lib/edit.js new file mode 100644 index 00000000..40968b2d --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/edit.js @@ -0,0 +1,34 @@ +// npm edit +// open the package folder in the $EDITOR + +module.exports = edit +edit.usage = 'npm edit [@]' + +edit.completion = require('./utils/completion/installed-shallow.js') + +var npm = require('./npm.js') +var path = require('path') +var fs = require('graceful-fs') +var editor = require('editor') + +function edit (args, cb) { + var p = args[0] + if (args.length !== 1 || !p) return cb(edit.usage) + var e = npm.config.get('editor') + if (!e) { + return cb(new Error( + "No editor set. Set the 'editor' config, or $EDITOR environ." + )) + } + p = p.split('/') + .join('/node_modules/') + .replace(/(\/node_modules)+/, '/node_modules') + var f = path.resolve(npm.dir, p) + fs.lstat(f, function (er) { + if (er) return cb(er) + editor(f, { editor: e }, function (er) { + if (er) return cb(er) + npm.commands.rebuild(args, cb) + }) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/explore.js b/bin/nodejs6.7.0/node_modules/npm/lib/explore.js new file mode 100644 index 00000000..b8ae7163 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/explore.js @@ -0,0 +1,59 @@ +// npm explore [@] +// open a subshell to the package folder. + +module.exports = explore +explore.usage = 'npm explore [ -- ]' +explore.completion = require('./utils/completion/installed-shallow.js') + +var npm = require('./npm.js') +var spawn = require('./utils/spawn') +var path = require('path') +var fs = require('graceful-fs') +var isWindowsShell = require('./utils/is-windows-shell.js') +var escapeExecPath = require('./utils/escape-exec-path.js') +var escapeArg = require('./utils/escape-arg.js') +var output = require('./utils/output.js') + +function explore (args, cb) { + if (args.length < 1 || !args[0]) return cb(explore.usage) + var p = args.shift() + + var cwd = path.resolve(npm.dir, p) + var opts = {cwd: cwd, stdio: 'inherit'} + + var shellArgs = [] + if (args) { + if (isWindowsShell) { + var execCmd = escapeExecPath(args.shift()) + var execArgs = [execCmd].concat(args.map(escapeArg)) + opts.windowsVerbatimArguments = true + shellArgs = ['/d', '/s', '/c'].concat(execArgs) + } else { + shellArgs.unshift('-c') + shellArgs = ['-c', args.map(escapeArg).join(' ').trim()] + } + } + + var sh = npm.config.get('shell') + fs.stat(cwd, function (er, s) { + if (er || !s.isDirectory()) { + return cb(new Error( + "It doesn't look like " + p + ' is installed.' + )) + } + + if (!shellArgs.length) { + output( + '\nExploring ' + cwd + '\n' + + "Type 'exit' or ^D when finished\n" + ) + } + + var shell = spawn(sh, shellArgs, opts) + shell.on('close', function (er) { + // only fail if non-interactive. + if (!shellArgs.length) return cb() + cb(er) + }) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/fetch-package-metadata.js b/bin/nodejs6.7.0/node_modules/npm/lib/fetch-package-metadata.js new file mode 100644 index 00000000..e9ea4691 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/fetch-package-metadata.js @@ -0,0 +1,355 @@ +'use strict' +var fs = require('graceful-fs') +var path = require('path') +var zlib = require('zlib') + +var log = require('npmlog') +var realizePackageSpecifier = require('realize-package-specifier') +var tar = require('tar') +var once = require('once') +var semver = require('semver') +var readPackageTree = require('read-package-tree') +var readPackageJson = require('read-package-json') +var iferr = require('iferr') +var rimraf = require('rimraf') +var clone = require('lodash.clonedeep') +var validate = require('aproba') +var unpipe = require('unpipe') +var normalizePackageData = require('normalize-package-data') + +var npm = require('./npm.js') +var mapToRegistry = require('./utils/map-to-registry.js') +var cache = require('./cache.js') +var cachedPackageRoot = require('./cache/cached-package-root.js') +var tempFilename = require('./utils/temp-filename.js') +var getCacheStat = require('./cache/get-stat.js') +var unpack = require('./utils/tar.js').unpack +var pulseTillDone = require('./utils/pulse-till-done.js') +var parseJSON = require('./utils/parse-json.js') + +function andLogAndFinish (spec, tracker, done) { + validate('SF', [spec, done]) + return function (er, pkg) { + if (er) { + log.silly('fetchPackageMetaData', 'error for ' + spec, er) + if (tracker) tracker.finish() + } + return done(er, pkg) + } +} + +module.exports = function fetchPackageMetadata (spec, where, tracker, done) { + if (!done) { + done = tracker || where + tracker = null + if (done === where) where = null + } + if (typeof spec === 'object') { + var dep = spec + spec = dep.raw + } + var logAndFinish = andLogAndFinish(spec, tracker, done) + if (!dep) { + log.silly('fetchPackageMetaData', spec) + return realizePackageSpecifier(spec, where, iferr(logAndFinish, function (dep) { + fetchPackageMetadata(dep, where, tracker, done) + })) + } + if (dep.type === 'version' || dep.type === 'range' || dep.type === 'tag') { + fetchNamedPackageData(dep, addRequestedAndFinish) + } else if (dep.type === 'directory') { + fetchDirectoryPackageData(dep, where, addRequestedAndFinish) + } else { + fetchOtherPackageData(spec, dep, where, addRequestedAndFinish) + } + function addRequestedAndFinish (er, pkg) { + if (pkg) annotateMetadata(pkg, dep, spec, where) + logAndFinish(er, pkg) + } +} + +var annotateMetadata = module.exports.annotateMetadata = function (pkg, requested, spec, where) { + validate('OOSS', arguments) + pkg._requested = requested + pkg._spec = spec + pkg._where = where + if (!pkg._args) pkg._args = [] + pkg._args.push([requested, where]) + // non-npm registries can and will return unnormalized data, plus + // even the npm registry may have package data normalized with older + // normalization rules. This ensures we get package data in a consistent, + // stable format. + try { + normalizePackageData(pkg) + } catch (ex) { + // don't care + } +} + +function fetchOtherPackageData (spec, dep, where, next) { + validate('SOSF', arguments) + log.silly('fetchOtherPackageData', spec) + cache.add(spec, null, where, false, iferr(next, function (pkg) { + var result = clone(pkg) + result._inCache = true + next(null, result) + })) +} + +function fetchDirectoryPackageData (dep, where, next) { + validate('OSF', arguments) + log.silly('fetchDirectoryPackageData', dep.name || dep.rawSpec) + readPackageJson(path.join(dep.spec, 'package.json'), false, next) +} + +var regCache = {} + +function fetchNamedPackageData (dep, next) { + validate('OF', arguments) + log.silly('fetchNamedPackageData', dep.name || dep.rawSpec) + mapToRegistry(dep.name || dep.rawSpec, npm.config, iferr(next, function (url, auth) { + if (regCache[url]) { + pickVersionFromRegistryDocument(clone(regCache[url])) + } else { + npm.registry.get(url, {auth: auth}, pulseTillDone('fetchMetadata', iferr(next, pickVersionFromRegistryDocument))) + } + function returnAndAddMetadata (pkg) { + pkg._from = dep.raw + pkg._resolved = pkg.dist.tarball + pkg._shasum = pkg.dist.shasum + + next(null, pkg) + } + function pickVersionFromRegistryDocument (pkg) { + if (!regCache[url]) regCache[url] = pkg + var versions = Object.keys(pkg.versions).sort(semver.rcompare) + + if (dep.type === 'tag') { + var tagVersion = pkg['dist-tags'][dep.spec] + if (pkg.versions[tagVersion]) return returnAndAddMetadata(pkg.versions[tagVersion]) + } else { + var latestVersion = pkg['dist-tags'][npm.config.get('tag')] || versions[0] + + // Find the the most recent version less than or equal + // to latestVersion that satisfies our spec + for (var ii = 0; ii < versions.length; ++ii) { + if (semver.gt(versions[ii], latestVersion)) continue + if (semver.satisfies(versions[ii], dep.spec)) { + return returnAndAddMetadata(pkg.versions[versions[ii]]) + } + } + + // Failing that, try finding the most recent version that matches + // our spec + for (var jj = 0; jj < versions.length; ++jj) { + if (semver.satisfies(versions[jj], dep.spec)) { + return returnAndAddMetadata(pkg.versions[versions[jj]]) + } + } + + // Failing THAT, if the range was '*' uses latestVersion + if (dep.spec === '*') { + return returnAndAddMetadata(pkg.versions[latestVersion]) + } + } + + // We didn't manage to find a compatible version + // If this package was requested from cache, force hitting the network + if (pkg._cached) { + log.silly('fetchNamedPackageData', 'No valid target from cache, forcing network') + return npm.registry.get(url, { + auth: auth, + skipCache: true + }, pulseTillDone('fetchMetadata', iferr(next, pickVersionFromRegistryDocument))) + } + + // And failing that, we error out + var targets = versions.length + ? 'Valid install targets:\n' + versions.join(', ') + '\n' + : 'No valid targets found.' + var er = new Error('No compatible version found: ' + + dep.raw + '\n' + targets) + return next(er) + } + })) +} + +function retryWithCached (pkg, asserter, next) { + if (!pkg._inCache) { + cache.add(pkg._spec, null, pkg._where, false, iferr(next, function (newpkg) { + Object.keys(newpkg).forEach(function (key) { + if (key[0] !== '_') return + pkg[key] = newpkg[key] + }) + pkg._inCache = true + return asserter(pkg, next) + })) + } + return !pkg._inCache +} + +module.exports.addShrinkwrap = function addShrinkwrap (pkg, next) { + validate('OF', arguments) + if (pkg._shrinkwrap !== undefined) return next(null, pkg) + if (retryWithCached(pkg, addShrinkwrap, next)) return + pkg._shrinkwrap = null + // FIXME: cache the shrinkwrap directly + var pkgname = pkg.name + var ver = pkg.version + var tarball = path.join(cachedPackageRoot({name: pkgname, version: ver}), 'package.tgz') + untarStream(tarball, function (er, untar) { + if (er) { + if (er.code === 'ENOTTARBALL') { + pkg._shrinkwrap = null + return next() + } else { + return next(er) + } + } + if (er) return next(er) + var foundShrinkwrap = false + untar.on('entry', function (entry) { + if (!/^(?:[^\/]+[\/])npm-shrinkwrap.json$/.test(entry.path)) return + log.silly('addShrinkwrap', 'Found shrinkwrap in ' + pkgname + ' ' + entry.path) + foundShrinkwrap = true + var shrinkwrap = '' + entry.on('data', function (chunk) { + shrinkwrap += chunk + }) + entry.on('end', function () { + untar.close() + log.silly('addShrinkwrap', 'Completed reading shrinkwrap in ' + pkgname) + try { + pkg._shrinkwrap = parseJSON(shrinkwrap) + } catch (ex) { + var er = new Error('Error parsing ' + pkgname + '@' + ver + "'s npm-shrinkwrap.json: " + ex.message) + er.type = 'ESHRINKWRAP' + return next(er) + } + next(null, pkg) + }) + entry.resume() + }) + untar.on('end', function () { + if (!foundShrinkwrap) { + pkg._shrinkwrap = null + next(null, pkg) + } + }) + }) +} + +module.exports.addBundled = function addBundled (pkg, next) { + validate('OF', arguments) + if (pkg._bundled !== undefined) return next(null, pkg) + if (!pkg.bundleDependencies) return next(null, pkg) + if (retryWithCached(pkg, addBundled, next)) return + pkg._bundled = null + var pkgname = pkg.name + var ver = pkg.version + var tarball = path.join(cachedPackageRoot({name: pkgname, version: ver}), 'package.tgz') + var target = tempFilename('unpack') + getCacheStat(iferr(next, function (cs) { + log.verbose('addBundled', 'extract', tarball) + unpack(tarball, target, null, null, cs.uid, cs.gid, iferr(next, function () { + log.silly('addBundled', 'read tarball') + readPackageTree(target, function (er, tree) { + log.silly('cleanup', 'remove extracted module') + rimraf(target, function () { + if (tree) { + pkg._bundled = tree.children + } + next(null, pkg) + }) + }) + })) + })) +} + +// FIXME: hasGzipHeader / hasTarHeader / untarStream duplicate a lot +// of code from lib/utils/tar.js– these should be brought together. + +function hasGzipHeader (c) { + return c[0] === 0x1F && c[1] === 0x8B && c[2] === 0x08 +} + +function hasTarHeader (c) { + return c[257] === 0x75 && // tar archives have 7573746172 at position + c[258] === 0x73 && // 257 and 003030 or 202000 at position 262 + c[259] === 0x74 && + c[260] === 0x61 && + c[261] === 0x72 && + + ((c[262] === 0x00 && + c[263] === 0x30 && + c[264] === 0x30) || + + (c[262] === 0x20 && + c[263] === 0x20 && + c[264] === 0x00)) +} + +function untarStream (tarball, cb) { + validate('SF', arguments) + cb = once(cb) + + var stream + var file = stream = fs.createReadStream(tarball) + var tounpipe = [file] + file.on('error', function (er) { + er = new Error('Error extracting ' + tarball + ' archive: ' + er.message) + er.code = 'EREADFILE' + cb(er) + }) + file.on('data', function OD (c) { + if (hasGzipHeader(c)) { + doGunzip() + } else if (hasTarHeader(c)) { + doUntar() + } else { + if (file.close) file.close() + if (file.destroy) file.destroy() + var er = new Error('Non-gzip/tarball ' + tarball) + er.code = 'ENOTTARBALL' + return cb(er) + } + file.removeListener('data', OD) + file.emit('data', c) + cb(null, stream) + }) + + function doGunzip () { + var gunzip = stream.pipe(zlib.createGunzip()) + gunzip.on('error', function (er) { + er = new Error('Error extracting ' + tarball + ' archive: ' + er.message) + er.code = 'EGUNZIP' + cb(er) + }) + tounpipe.push(gunzip) + stream = gunzip + doUntar() + } + + function doUntar () { + var untar = stream.pipe(tar.Parse()) + untar.on('error', function (er) { + er = new Error('Error extracting ' + tarball + ' archive: ' + er.message) + er.code = 'EUNTAR' + cb(er) + }) + tounpipe.push(untar) + stream = untar + addClose() + } + + function addClose () { + stream.close = function () { + tounpipe.forEach(function (stream) { + unpipe(stream) + }) + + if (file.close) file.close() + if (file.destroy) file.destroy() + } + } +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/fetch-package-metadata.md b/bin/nodejs6.7.0/node_modules/npm/lib/fetch-package-metadata.md new file mode 100644 index 00000000..a9f2c385 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/fetch-package-metadata.md @@ -0,0 +1,37 @@ +fetch-package-metadata +---------------------- + + var fetchPackageMetadata = require("npm/lib/fetch-package-metadata") + fetchPackageMetadata(spec, contextdir, callback) + +This will get package metadata (and if possible, ONLY package metadata) for +a specifer as passed to `npm install` et al, eg `npm@next` or `npm@^2.0.3` + +## fetchPackageMetadata(*spec*, *contextdir*, *tracker*, *callback*) + +* *spec* **string** | **object** -- The package specifier, can be anything npm can + understand (see [realize-package-specifier]), or it can be the result from + realize-package-specifier or npm-package-arg (for non-local deps). + +* *contextdir* **string** -- The directory from which relative paths to + local packages should be resolved. + +* *tracker* **object** -- **(optional)** An are-we-there-yet tracker group as + provided by `npm.log.newGroup()`. + +* *callback* **function (er, package)** -- Called when the package information + has been loaded. `package` is the object for of the `package.json` + matching the requested spec. In the case of named packages, it comes from + the registry and thus may not exactly match what's found in the associated + tarball. + +[realize-package-specifier]: (https://github.com/npm/realize-package-specifier) + +In the case of tarballs and git repos, it will use the cache to download +them in order to get the package metadata. For named packages, only the +metadata is downloaded (eg http://registry.npmjs.org/package). For local +directories, the package.json is read directly. For local tarballs, the +tarball is streamed in memory and just the package.json is extracted from +it. (Due to the nature of tars, having the package.json early in the file +will result in it being loaded faster– the extractor short-circuits the +uncompress/untar streams as best as it can.) diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/get.js b/bin/nodejs6.7.0/node_modules/npm/lib/get.js new file mode 100644 index 00000000..e1980dbb --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/get.js @@ -0,0 +1,12 @@ + +module.exports = get + +get.usage = 'npm get (See `npm config`)' + +var npm = require('./npm.js') + +get.completion = npm.commands.config.completion + +function get (args, cb) { + npm.commands.config(['get'].concat(args), cb) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/help-search.js b/bin/nodejs6.7.0/node_modules/npm/lib/help-search.js new file mode 100644 index 00000000..8e0adcc4 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/help-search.js @@ -0,0 +1,212 @@ + +module.exports = helpSearch + +var fs = require('graceful-fs') +var path = require('path') +var asyncMap = require('slide').asyncMap +var npm = require('./npm.js') +var glob = require('glob') +var color = require('ansicolors') +var output = require('./utils/output.js') + +helpSearch.usage = 'npm help-search ' + +function helpSearch (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + if (!args.length) return cb(helpSearch.usage) + + var docPath = path.resolve(__dirname, '..', 'doc') + return glob(docPath + '/*/*.md', function (er, files) { + if (er) return cb(er) + readFiles(files, function (er, data) { + if (er) return cb(er) + searchFiles(args, data, function (er, results) { + if (er) return cb(er) + formatResults(args, results, cb) + }) + }) + }) +} + +function readFiles (files, cb) { + var res = {} + asyncMap(files, function (file, cb) { + fs.readFile(file, 'utf8', function (er, data) { + res[file] = data + return cb(er) + }) + }, function (er) { + return cb(er, res) + }) +} + +function searchFiles (args, files, cb) { + var results = [] + Object.keys(files).forEach(function (file) { + var data = files[file] + + // skip if no matches at all + var match + for (var a = 0, l = args.length; a < l && !match; a++) { + match = data.toLowerCase().indexOf(args[a].toLowerCase()) !== -1 + } + if (!match) return + + var lines = data.split(/\n+/) + + // if a line has a search term, then skip it and the next line. + // if the next line has a search term, then skip all 3 + // otherwise, set the line to null. then remove the nulls. + l = lines.length + for (var i = 0; i < l; i++) { + var line = lines[i] + var nextLine = lines[i + 1] + var ll + + match = false + if (nextLine) { + for (a = 0, ll = args.length; a < ll && !match; a++) { + match = nextLine.toLowerCase() + .indexOf(args[a].toLowerCase()) !== -1 + } + if (match) { + // skip over the next line, and the line after it. + i += 2 + continue + } + } + + match = false + for (a = 0, ll = args.length; a < ll && !match; a++) { + match = line.toLowerCase().indexOf(args[a].toLowerCase()) !== -1 + } + if (match) { + // skip over the next line + i++ + continue + } + + lines[i] = null + } + + // now squish any string of nulls into a single null + lines = lines.reduce(function (l, r) { + if (!(r === null && l[l.length - 1] === null)) l.push(r) + return l + }, []) + + if (lines[lines.length - 1] === null) lines.pop() + if (lines[0] === null) lines.shift() + + // now see how many args were found at all. + var found = {} + var totalHits = 0 + lines.forEach(function (line) { + args.forEach(function (arg) { + var hit = (line || '').toLowerCase() + .split(arg.toLowerCase()).length - 1 + if (hit > 0) { + found[arg] = (found[arg] || 0) + hit + totalHits += hit + } + }) + }) + + var cmd = 'npm help ' + if (path.basename(path.dirname(file)) === 'api') { + cmd = 'npm apihelp ' + } + cmd += path.basename(file, '.md').replace(/^npm-/, '') + results.push({ + file: file, + cmd: cmd, + lines: lines, + found: Object.keys(found), + hits: found, + totalHits: totalHits + }) + }) + + // if only one result, then just show that help section. + if (results.length === 1) { + return npm.commands.help([results[0].file.replace(/\.md$/, '')], cb) + } + + if (results.length === 0) { + output('No results for ' + args.map(JSON.stringify).join(' ')) + return cb() + } + + // sort results by number of results found, then by number of hits + // then by number of matching lines + results = results.sort(function (a, b) { + return a.found.length > b.found.length ? -1 + : a.found.length < b.found.length ? 1 + : a.totalHits > b.totalHits ? -1 + : a.totalHits < b.totalHits ? 1 + : a.lines.length > b.lines.length ? -1 + : a.lines.length < b.lines.length ? 1 + : 0 + }) + + cb(null, results) +} + +function formatResults (args, results, cb) { + if (!results) return cb(null) + + var cols = Math.min(process.stdout.columns || Infinity, 80) + 1 + + var out = results.map(function (res) { + var out = res.cmd + var r = Object.keys(res.hits) + .map(function (k) { + return k + ':' + res.hits[k] + }).sort(function (a, b) { + return a > b ? 1 : -1 + }).join(' ') + + out += ((new Array(Math.max(1, cols - out.length - r.length))) + .join(' ')) + r + + if (!npm.config.get('long')) return out + + out = '\n\n' + out + '\n' + + (new Array(cols)).join('—') + '\n' + + res.lines.map(function (line, i) { + if (line === null || i > 3) return '' + for (var out = line, a = 0, l = args.length; a < l; a++) { + var finder = out.toLowerCase().split(args[a].toLowerCase()) + var newOut = '' + var p = 0 + + finder.forEach(function (f) { + newOut += out.substr(p, f.length) + + var hilit = out.substr(p + f.length, args[a].length) + if (npm.color) hilit = color.bgBlack(color.red(hilit)) + newOut += hilit + + p += f.length + args[a].length + }) + } + + return newOut + }).join('\n').trim() + return out + }).join('\n') + + if (results.length && !npm.config.get('long')) { + out = 'Top hits for ' + (args.map(JSON.stringify).join(' ')) + '\n' + + (new Array(cols)).join('—') + '\n' + + out + '\n' + + (new Array(cols)).join('—') + '\n' + + '(run with -l or --long to see more context)' + } + + output(out.trim()) + cb(null, results) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/help.js b/bin/nodejs6.7.0/node_modules/npm/lib/help.js new file mode 100644 index 00000000..c80ecfc1 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/help.js @@ -0,0 +1,241 @@ + +module.exports = help + +help.completion = function (opts, cb) { + if (opts.conf.argv.remain.length > 2) return cb(null, []) + getSections(cb) +} + +var path = require('path') +var spawn = require('./utils/spawn') +var npm = require('./npm.js') +var log = require('npmlog') +var opener = require('opener') +var glob = require('glob') +var cmdList = require('./config/cmd-list').cmdList +var shorthands = require('./config/cmd-list').shorthands +var commands = cmdList.concat(Object.keys(shorthands)) +var output = require('./utils/output.js') + +function help (args, cb) { + var argv = npm.config.get('argv').cooked + + var argnum = 0 + if (args.length === 2 && ~~args[0]) { + argnum = ~~args.shift() + } + + // npm help foo bar baz: search topics + if (args.length > 1 && args[0]) { + return npm.commands['help-search'](args, argnum, cb) + } + + var section = npm.deref(args[0]) || args[0] + + // npm help : show basic usage + if (!section) { + var valid = argv[0] === 'help' ? 0 : 1 + return npmUsage(valid, cb) + } + + // npm -h: show command usage + if (npm.config.get('usage') && + npm.commands[section] && + npm.commands[section].usage) { + npm.config.set('loglevel', 'silent') + log.level = 'silent' + output(npm.commands[section].usage) + return cb() + } + + // npm apihelp
    : Prefer section 3 over section 1 + var apihelp = argv.length && argv[0].indexOf('api') !== -1 + var pref = apihelp ? [3, 1, 5, 7] : [1, 3, 5, 7] + if (argnum) { + pref = [ argnum ].concat(pref.filter(function (n) { + return n !== argnum + })) + } + + // npm help
    : Try to find the path + var manroot = path.resolve(__dirname, '..', 'man') + + // legacy + if (section === 'global') section = 'folders' + else if (section === 'json') section = 'package.json' + + // find either /section.n or /npm-section.n + // The glob is used in the glob. The regexp is used much + // further down. Globs and regexps are different + var compextglob = '.+(gz|bz2|lzma|[FYzZ]|xz)' + var compextre = '\\.(gz|bz2|lzma|[FYzZ]|xz)$' + var f = '+(npm-' + section + '|' + section + ').[0-9]?(' + compextglob + ')' + return glob(manroot + '/*/' + f, function (er, mans) { + if (er) return cb(er) + + if (!mans.length) return npm.commands['help-search'](args, cb) + + mans = mans.map(function (man) { + var ext = path.extname(man) + if (man.match(new RegExp(compextre))) man = path.basename(man, ext) + + return man + }) + + viewMan(pickMan(mans, pref), cb) + }) +} + +function pickMan (mans, pref_) { + var nre = /([0-9]+)$/ + var pref = {} + pref_.forEach(function (sect, i) { + pref[sect] = i + }) + mans = mans.sort(function (a, b) { + var an = a.match(nre)[1] + var bn = b.match(nre)[1] + return an === bn ? (a > b ? -1 : 1) + : pref[an] < pref[bn] ? -1 + : 1 + }) + return mans[0] +} + +function viewMan (man, cb) { + var nre = /([0-9]+)$/ + var num = man.match(nre)[1] + var section = path.basename(man, '.' + num) + + // at this point, we know that the specified man page exists + var manpath = path.join(__dirname, '..', 'man') + var env = {} + Object.keys(process.env).forEach(function (i) { + env[i] = process.env[i] + }) + env.MANPATH = manpath + var viewer = npm.config.get('viewer') + + var conf + switch (viewer) { + case 'woman': + var a = ['-e', '(woman-find-file \'' + man + '\')'] + conf = { env: env, stdio: 'inherit' } + var woman = spawn('emacsclient', a, conf) + woman.on('close', cb) + break + + case 'browser': + opener(htmlMan(man), { command: npm.config.get('browser') }, cb) + break + + default: + conf = { env: env, stdio: 'inherit' } + var manProcess = spawn('man', [num, section], conf) + manProcess.on('close', cb) + break + } +} + +function htmlMan (man) { + var sect = +man.match(/([0-9]+)$/)[1] + var f = path.basename(man).replace(/([0-9]+)$/, 'html') + switch (sect) { + case 1: + sect = 'cli' + break + case 3: + sect = 'api' + break + case 5: + sect = 'files' + break + case 7: + sect = 'misc' + break + default: + throw new Error('invalid man section: ' + sect) + } + return path.resolve(__dirname, '..', 'html', 'doc', sect, f) +} + +function npmUsage (valid, cb) { + npm.config.set('loglevel', 'silent') + log.level = 'silent' + output([ + '\nUsage: npm ', + '', + 'where is one of:', + npm.config.get('long') ? usages() + : ' ' + wrap(commands), + '', + 'npm -h quick help on ', + 'npm -l display full usage info', + 'npm help search for help on ', + 'npm help npm involved overview', + '', + 'Specify configs in the ini-formatted file:', + ' ' + npm.config.get('userconfig'), + 'or on the command line via: npm --key value', + 'Config info can be viewed via: npm help config', + '', + 'npm@' + npm.version + ' ' + path.dirname(__dirname) + ].join('\n')) + cb(valid) +} + +function usages () { + // return a string of : + var maxLen = 0 + return Object.keys(npm.commands).filter(function (c) { + return c === npm.deref(c) + }).reduce(function (set, c) { + set.push([c, npm.commands[c].usage || '']) + maxLen = Math.max(maxLen, c.length) + return set + }, []).map(function (item) { + var c = item[0] + var usage = item[1] + return '\n ' + + c + (new Array(maxLen - c.length + 2).join(' ')) + + (usage.split('\n').join('\n' + (new Array(maxLen + 6).join(' ')))) + }).join('\n') +} + +function wrap (arr) { + var out = [''] + var l = 0 + var line + + line = process.stdout.columns + if (!line) { + line = 60 + } else { + line = Math.min(60, Math.max(line - 16, 24)) + } + + arr.sort(function (a, b) { return a < b ? -1 : 1 }) + .forEach(function (c) { + if (out[l].length + c.length + 2 < line) { + out[l] += ', ' + c + } else { + out[l++] += ',' + out[l] = c + } + }) + return out.join('\n ').substr(2) +} + +function getSections (cb) { + var g = path.resolve(__dirname, '../man/man[0-9]/*.[0-9]') + glob(g, function (er, files) { + if (er) return cb(er) + + cb(null, Object.keys(files.reduce(function (acc, file) { + file = path.basename(file).replace(/\.[0-9]+$/, '') + file = file.replace(/^npm-/, '') + acc[file] = true + return acc + }, { help: true }))) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/init.js b/bin/nodejs6.7.0/node_modules/npm/lib/init.js new file mode 100644 index 00000000..eb773e68 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/init.js @@ -0,0 +1,41 @@ +// initialize a package.json file + +module.exports = init + +var log = require('npmlog') +var npm = require('./npm.js') +var initJson = require('init-package-json') +var output = require('./utils/output.js') + +init.usage = 'npm init [--force|-f|--yes|-y]' + +function init (args, cb) { + var dir = process.cwd() + log.pause() + log.disableProgress() + var initFile = npm.config.get('init-module') + if (!initJson.yes(npm.config)) { + output([ + 'This utility will walk you through creating a package.json file.', + 'It only covers the most common items, and tries to guess sensible defaults.', + '', + 'See `npm help json` for definitive documentation on these fields', + 'and exactly what they do.', + '', + 'Use `npm install --save` afterwards to install a package and', + 'save it as a dependency in the package.json file.', + '', + 'Press ^C at any time to quit.' + ].join('\n')) + } + initJson(dir, initFile, npm.config, function (er, data) { + log.resume() + log.silly('package data', data) + if (er && er.message === 'canceled') { + log.warn('init', 'canceled') + return cb(null, data) + } + log.info('init', 'written successfully') + cb(er, data) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/install-test.js b/bin/nodejs6.7.0/node_modules/npm/lib/install-test.js new file mode 100644 index 00000000..ca9703b1 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/install-test.js @@ -0,0 +1,26 @@ +'use strict' + +// npm install-test +// Runs `npm install` and then runs `npm test` + +module.exports = installTest +var install = require('./install.js') +var test = require('./test.js') +var usage = require('./utils/usage') + +installTest.usage = usage( + 'install-test', + '\nnpm install-test [args]' + + '\nSame args as `npm install`' +) + +installTest.completion = install.completion + +function installTest (args, cb) { + install(args, function (er) { + if (er) { + return cb(er) + } + test([], cb) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/install.js b/bin/nodejs6.7.0/node_modules/npm/lib/install.js new file mode 100644 index 00000000..85cae3db --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/install.js @@ -0,0 +1,728 @@ +'use strict' +// npm install +// +// See doc/install.md for more description + +// Managing contexts... +// there's a lot of state associated with an "install" operation, including +// packages that are already installed, parent packages, current shrinkwrap, and +// so on. We maintain this state in a "context" object that gets passed around. +// every time we dive into a deeper node_modules folder, the "family" list that +// gets passed along uses the previous "family" list as its __proto__. Any +// "resolved precise dependency" things that aren't already on this object get +// added, and then that's passed to the next generation of installation. + +module.exports = install +module.exports.Installer = Installer + +var usage = require('./utils/usage') + +install.usage = usage( + 'install', + '\nnpm install (with no args, in package dir)' + + '\nnpm install [<@scope>/]' + + '\nnpm install [<@scope>/]@' + + '\nnpm install [<@scope>/]@' + + '\nnpm install [<@scope>/]@' + + '\nnpm install ' + + '\nnpm install ' + + '\nnpm install ' + + '\nnpm install ' + + '\nnpm install /', + '[--save|--save-dev|--save-optional] [--save-exact]' +) + +install.completion = function (opts, cb) { + validate('OF', arguments) + // install can complete to a folder with a package.json, or any package. + // if it has a slash, then it's gotta be a folder + // if it starts with https?://, then just give up, because it's a url + if (/^https?:\/\//.test(opts.partialWord)) { + // do not complete to URLs + return cb(null, []) + } + + if (/\//.test(opts.partialWord)) { + // Complete fully to folder if there is exactly one match and it + // is a folder containing a package.json file. If that is not the + // case we return 0 matches, which will trigger the default bash + // complete. + var lastSlashIdx = opts.partialWord.lastIndexOf('/') + var partialName = opts.partialWord.slice(lastSlashIdx + 1) + var partialPath = opts.partialWord.slice(0, lastSlashIdx) + if (partialPath === '') partialPath = '/' + + var annotatePackageDirMatch = function (sibling, cb) { + var fullPath = path.join(partialPath, sibling) + if (sibling.slice(0, partialName.length) !== partialName) { + return cb(null, null) // not name match + } + fs.readdir(fullPath, function (err, contents) { + if (err) return cb(null, { isPackage: false }) + + cb( + null, + { + fullPath: fullPath, + isPackage: contents.indexOf('package.json') !== -1 + } + ) + }) + } + + return fs.readdir(partialPath, function (err, siblings) { + if (err) return cb(null, []) // invalid dir: no matching + + asyncMap(siblings, annotatePackageDirMatch, function (err, matches) { + if (err) return cb(err) + + var cleaned = matches.filter(function (x) { return x !== null }) + if (cleaned.length !== 1) return cb(null, []) + if (!cleaned[0].isPackage) return cb(null, []) + + // Success - only one match and it is a package dir + return cb(null, [cleaned[0].fullPath]) + }) + }) + } + + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +// system packages +var fs = require('fs') +var path = require('path') + +// dependencies +var log = require('npmlog') +var readPackageTree = require('read-package-tree') +var chain = require('slide').chain +var asyncMap = require('slide').asyncMap +var archy = require('archy') +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') +var iferr = require('iferr') +var validate = require('aproba') + +// npm internal utils +var npm = require('./npm.js') +var locker = require('./utils/locker.js') +var lock = locker.lock +var unlock = locker.unlock +var ls = require('./ls.js') +var parseJSON = require('./utils/parse-json.js') +var output = require('./utils/output.js') + +// install specific libraries +var copyTree = require('./install/copy-tree.js') +var readShrinkwrap = require('./install/read-shrinkwrap.js') +var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var loadDeps = require('./install/deps.js').loadDeps +var loadDevDeps = require('./install/deps.js').loadDevDeps +var getAllMetadata = require('./install/deps.js').getAllMetadata +var loadRequestedDeps = require('./install/deps.js').loadRequestedDeps +var loadExtraneous = require('./install/deps.js').loadExtraneous +var diffTrees = require('./install/diff-trees.js') +var checkPermissions = require('./install/check-permissions.js') +var decomposeActions = require('./install/decompose-actions.js') +var filterInvalidActions = require('./install/filter-invalid-actions.js') +var validateTree = require('./install/validate-tree.js') +var validateArgs = require('./install/validate-args.js') +var saveRequested = require('./install/save.js').saveRequested +var getSaveType = require('./install/save.js').getSaveType +var doSerialActions = require('./install/actions.js').doSerial +var doReverseSerialActions = require('./install/actions.js').doReverseSerial +var doParallelActions = require('./install/actions.js').doParallel +var doOneAction = require('./install/actions.js').doOne +var removeObsoleteDep = require('./install/deps.js').removeObsoleteDep +var packageId = require('./utils/package-id.js') +var moduleName = require('./utils/module-name.js') +var errorMessage = require('./utils/error-message.js') +var andIgnoreErrors = require('./install/and-ignore-errors.js') + +function unlockCB (lockPath, name, cb) { + validate('SSF', arguments) + return function (installEr) { + var args = arguments + try { + unlock(lockPath, name, reportErrorAndReturn) + } catch (unlockEx) { + process.nextTick(function () { + reportErrorAndReturn(unlockEx) + }) + } + function reportErrorAndReturn (unlockEr) { + if (installEr) { + if (unlockEr && unlockEr.code !== 'ENOTLOCKED') { + log.warn('unlock' + name, unlockEr) + } + return cb.apply(null, args) + } + if (unlockEr) return cb(unlockEr) + return cb.apply(null, args) + } + } +} + +function install (where, args, cb) { + if (!cb) { + cb = args + args = where + where = null + } + var globalTop = path.resolve(npm.globalDir, '..') + if (!where) { + where = npm.config.get('global') + ? globalTop + : npm.prefix + } + validate('SAF', [where, args, cb]) + // the /path/to/node_modules/.. + var dryrun = !!npm.config.get('dry-run') + + if (npm.config.get('dev')) { + log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--only=dev` instead.') + } + + if (where === globalTop && !args.length) { + args = ['.'] + } + args = args.filter(function (a) { + return path.resolve(a) !== npm.prefix + }) + + new Installer(where, dryrun, args).run(cb) +} + +function Installer (where, dryrun, args) { + validate('SBA', arguments) + this.where = where + this.dryrun = dryrun + this.args = args + this.currentTree = null + this.idealTree = null + this.differences = [] + this.todo = [] + this.progress = {} + this.noPackageJsonOk = !!args.length + this.topLevelLifecycles = !args.length + this.npat = npm.config.get('npat') + this.dev = npm.config.get('dev') || (!/^prod(uction)?$/.test(npm.config.get('only')) && !npm.config.get('production')) || /^dev(elopment)?$/.test(npm.config.get('only')) + this.prod = !/^dev(elopment)?$/.test(npm.config.get('only')) + this.rollback = npm.config.get('rollback') + this.link = npm.config.get('link') + this.global = this.where === path.resolve(npm.globalDir, '..') +} +Installer.prototype = {} + +Installer.prototype.run = function (cb) { + validate('F', arguments) + + // FIXME: This is bad and I should feel bad. + // lib/install needs to have some way of sharing _limited_ + // state with the things it calls. Passing the object is too + // much. The global config is WAY too much. =( =( + // But not having this is gonna break linked modules in + // subtle stupid ways, and refactoring all this code isn't + // the right thing to do just yet. + if (this.global) { + var prevGlobal = npm.config.get('global') + npm.config.set('global', true) + var next = cb + cb = function () { + npm.config.set('global', prevGlobal) + next.apply(null, arguments) + } + } + + var installSteps = [] + var postInstallSteps = [] + installSteps.push( + [this.newTracker(log, 'loadCurrentTree', 4)], + [this, this.loadCurrentTree], + [this, this.finishTracker, 'loadCurrentTree'], + + [this.newTracker(log, 'loadIdealTree', 12)], + [this, this.loadIdealTree], + [this, this.finishTracker, 'loadIdealTree'], + + [this, this.debugTree, 'currentTree', 'currentTree'], + [this, this.debugTree, 'idealTree', 'idealTree'], + + [this.newTracker(log, 'generateActionsToTake')], + [this, this.generateActionsToTake], + [this, this.finishTracker, 'generateActionsToTake'], + + [this, this.debugActions, 'diffTrees', 'differences'], + [this, this.debugActions, 'decomposeActions', 'todo']) + if (!this.dryrun) { + installSteps.push( + [this.newTracker(log, 'executeActions', 8)], + [this, this.executeActions], + [this, this.finishTracker, 'executeActions']) + var node_modules = path.resolve(this.where, 'node_modules') + var staging = path.resolve(node_modules, '.staging') + postInstallSteps.push( + [this.newTracker(log, 'rollbackFailedOptional', 1)], + [this, this.rollbackFailedOptional, staging, this.todo], + [this, this.finishTracker, 'rollbackFailedOptional'], + [this, this.commit, staging, this.todo], + [this.newTracker(log, 'runTopLevelLifecycles', 2)], + [this, this.runTopLevelLifecycles], + [this, this.finishTracker, 'runTopLevelLifecycles']) + + if (getSaveType(this.args)) { + postInstallSteps.push( + [this, this.saveToDependencies]) + } + } + postInstallSteps.push( + [this, this.printInstalled]) + + var self = this + chain(installSteps, function (installEr) { + if (installEr) self.failing = true + chain(postInstallSteps, function (postInstallEr) { + if (self.idealTree) { + self.idealTree.warnings.forEach(function (warning) { + if (warning.code === 'EPACKAGEJSON' && self.global) return + if (warning.code === 'ENOTDIR') return + errorMessage(warning).summary.forEach(function (logline) { + log.warn.apply(log, logline) + }) + }) + } + if (installEr && postInstallEr) { + var msg = errorMessage(postInstallEr) + msg.summary.forEach(function (logline) { + log.warn.apply(log, logline) + }) + msg.detail.forEach(function (logline) { + log.verbose.apply(log, logline) + }) + } + cb(installEr || postInstallEr, self.getInstalledModules(), self.idealTree) + }) + }) +} + +Installer.prototype.loadArgMetadata = function (next) { + var self = this + getAllMetadata(this.args, this.currentTree, iferr(next, function (args) { + self.args = args + next() + })) +} + +Installer.prototype.newTracker = function (tracker, name, size) { + validate('OS', [tracker, name]) + if (size) validate('N', [size]) + this.progress[name] = tracker.newGroup(name, size) + var self = this + return function (next) { + self.progress[name].silly(name, 'Starting') + next() + } +} + +Installer.prototype.finishTracker = function (name, cb) { + validate('SF', arguments) + this.progress[name].silly(name, 'Finishing') + this.progress[name].finish() + cb() +} + +Installer.prototype.loadCurrentTree = function (cb) { + validate('F', arguments) + log.silly('install', 'loadCurrentTree') + var todo = [] + if (this.global) { + todo.push([this, this.readGlobalPackageData]) + } else { + todo.push([this, this.readLocalPackageData]) + } + todo.push( + [this, this.normalizeTree, log.newGroup('normalizeTree')]) + chain(todo, cb) +} + +Installer.prototype.loadIdealTree = function (cb) { + validate('F', arguments) + log.silly('install', 'loadIdealTree') + + chain([ + [this.newTracker(this.progress.loadIdealTree, 'cloneCurrentTree')], + [this, this.cloneCurrentTreeToIdealTree], + [this, this.finishTracker, 'cloneCurrentTree'], + + [this.newTracker(this.progress.loadIdealTree, 'loadShrinkwrap')], + [this, this.loadShrinkwrap], + [this, this.finishTracker, 'loadShrinkwrap'], + + [this.newTracker(this.progress.loadIdealTree, 'loadAllDepsIntoIdealTree', 10)], + [this, this.loadAllDepsIntoIdealTree], + [this, this.finishTracker, 'loadAllDepsIntoIdealTree'], + + // TODO: Remove this (should no longer be necessary, instead counter productive) + [this, function (next) { recalculateMetadata(this.idealTree, log, next) }] + ], cb) +} + +Installer.prototype.loadAllDepsIntoIdealTree = function (cb) { + validate('F', arguments) + log.silly('install', 'loadAllDepsIntoIdealTree') + var saveDeps = getSaveType(this.args) + + var cg = this.progress.loadAllDepsIntoIdealTree + var installNewModules = !!this.args.length + var steps = [] + + if (installNewModules) { + steps.push([validateArgs, this.idealTree, this.args]) + steps.push([loadRequestedDeps, this.args, this.idealTree, saveDeps, cg.newGroup('loadRequestedDeps')]) + } else { + if (this.prod) { + steps.push( + [loadDeps, this.idealTree, cg.newGroup('loadDeps')]) + } + if (this.dev) { + steps.push( + [loadDevDeps, this.idealTree, cg.newGroup('loadDevDeps')]) + } + } + steps.push( + [loadExtraneous.andResolveDeps, this.idealTree, cg.newGroup('loadExtraneous')]) + chain(steps, cb) +} + +Installer.prototype.generateActionsToTake = function (cb) { + validate('F', arguments) + log.silly('install', 'generateActionsToTake') + var cg = this.progress.generateActionsToTake + chain([ + [validateTree, this.idealTree, cg.newGroup('validateTree')], + [diffTrees, this.currentTree, this.idealTree, this.differences, cg.newGroup('diffTrees')], + [this, this.computeLinked], + [filterInvalidActions, this.where, this.differences], + [checkPermissions, this.differences], + [decomposeActions, this.differences, this.todo] + ], cb) +} + +Installer.prototype.computeLinked = function (cb) { + validate('F', arguments) + if (!this.link || this.global) return cb() + var linkTodoList = [] + var self = this + asyncMap(this.differences, function (action, next) { + var cmd = action[0] + var pkg = action[1] + if (cmd !== 'add' && cmd !== 'update') return next() + var isReqByTop = pkg.requiredBy.filter(function (mod) { return mod.isTop }).length + var isReqByUser = pkg.userRequired + var isExtraneous = pkg.requiredBy.length === 0 + if (!isReqByTop && !isReqByUser && !isExtraneous) return next() + isLinkable(pkg, function (install, link) { + if (install) linkTodoList.push(['global-install', pkg]) + if (link) linkTodoList.push(['global-link', pkg]) + if (install || link) removeObsoleteDep(pkg) + next() + }) + }, function () { + if (linkTodoList.length === 0) return cb() + self.differences.length = 0 + Array.prototype.push.apply(self.differences, linkTodoList) + diffTrees(self.currentTree, self.idealTree, self.differences, log.newGroup('d2'), cb) + }) +} + +function isLinkable (pkg, cb) { + var globalPackage = path.resolve(npm.globalPrefix, 'lib', 'node_modules', moduleName(pkg)) + var globalPackageJson = path.resolve(globalPackage, 'package.json') + fs.stat(globalPackage, function (er) { + if (er) return cb(true, true) + fs.readFile(globalPackageJson, function (er, data) { + var json = parseJSON.noExceptions(data) + cb(false, json && json.version === pkg.package.version) + }) + }) +} + +Installer.prototype.executeActions = function (cb) { + validate('F', arguments) + log.silly('install', 'executeActions') + var todo = this.todo + var cg = this.progress.executeActions + + var node_modules = path.resolve(this.where, 'node_modules') + var staging = path.resolve(node_modules, '.staging') + var steps = [] + var trackLifecycle = cg.newGroup('lifecycle') + + cb = unlockCB(node_modules, '.staging', cb) + + steps.push( + [doSerialActions, 'global-install', staging, todo, trackLifecycle.newGroup('global-install')], + [doParallelActions, 'fetch', staging, todo, cg.newGroup('fetch', 10)], + [lock, node_modules, '.staging'], + [rimraf, staging], + [mkdirp, staging], + [doParallelActions, 'extract', staging, todo, cg.newGroup('extract', 10)], + [doParallelActions, 'preinstall', staging, todo, trackLifecycle.newGroup('preinstall')], + [doReverseSerialActions, 'remove', staging, todo, cg.newGroup('remove')], + [doSerialActions, 'move', staging, todo, cg.newGroup('move')], + [doSerialActions, 'finalize', staging, todo, cg.newGroup('finalize')], + [doSerialActions, 'build', staging, todo, trackLifecycle.newGroup('build')], + [doSerialActions, 'global-link', staging, todo, trackLifecycle.newGroup('global-link')], + [doParallelActions, 'update-linked', staging, todo, trackLifecycle.newGroup('update-linked')], + [doSerialActions, 'install', staging, todo, trackLifecycle.newGroup('install')], + [doSerialActions, 'postinstall', staging, todo, trackLifecycle.newGroup('postinstall')]) + if (this.npat) { + steps.push( + [doParallelActions, 'test', staging, todo, trackLifecycle.newGroup('npat')]) + } + + var self = this + chain(steps, function (er) { + if (!er || self.rollback) { + rimraf(staging, function () { cb(er) }) + } else { + cb(er) + } + }) +} + +Installer.prototype.rollbackFailedOptional = function (staging, actionsToRun, cb) { + if (!this.rollback) return cb() + var failed = actionsToRun.map(function (action) { + return action[1] + }).filter(function (pkg) { + return pkg.failed && pkg.rollback + }) + asyncMap(failed, function (pkg, next) { + asyncMap(pkg.rollback, function (rollback, done) { + rollback(staging, pkg, done) + }, next) + }, cb) +} + +Installer.prototype.commit = function (staging, actionsToRun, cb) { + var toCommit = actionsToRun.map(function (action) { return action[1] }).filter(function (pkg) { return !pkg.failed && pkg.commit }) + asyncMap(toCommit, function (pkg, next) { + asyncMap(pkg.commit, function (commit, done) { + commit(staging, pkg, done) + }, function () { + pkg.commit = [] + next.apply(null, arguments) + }) + }, cb) +} + +Installer.prototype.runTopLevelLifecycles = function (cb) { + validate('F', arguments) + if (this.failing) return cb() + log.silly('install', 'runTopLevelLifecycles') + var steps = [] + var trackLifecycle = this.progress.runTopLevelLifecycles + if (!this.topLevelLifecycles) { + trackLifecycle.finish() + return cb() + } + + steps.push( + [doOneAction, 'preinstall', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('preinstall:.')], + [doOneAction, 'build', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('build:.')], + [doOneAction, 'install', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('install:.')], + [doOneAction, 'postinstall', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('postinstall:.')]) + if (this.npat) { + steps.push( + [doOneAction, 'test', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('npat:.')]) + } + if (this.dev) { + steps.push( + [doOneAction, 'prepublish', this.idealTree.path, this.idealTree, trackLifecycle.newGroup('prepublish')]) + } + chain(steps, cb) +} + +Installer.prototype.saveToDependencies = function (cb) { + validate('F', arguments) + if (this.failing) return cb() + log.silly('install', 'saveToDependencies') + saveRequested(this.args, this.idealTree, cb) +} + +Installer.prototype.readGlobalPackageData = function (cb) { + validate('F', arguments) + log.silly('install', 'readGlobalPackageData') + var self = this + this.loadArgMetadata(iferr(cb, function () { + mkdirp(self.where, iferr(cb, function () { + var pkgs = {} + self.args.forEach(function (pkg) { + pkgs[pkg.name] = true + }) + readPackageTree(self.where, function (ctx, kid) { return ctx.parent || pkgs[kid] }, iferr(cb, function (currentTree) { + self.currentTree = currentTree + return cb() + })) + })) + })) +} + +Installer.prototype.readLocalPackageData = function (cb) { + validate('F', arguments) + log.silly('install', 'readLocalPackageData') + var self = this + mkdirp(this.where, iferr(cb, function () { + readPackageTree(self.where, iferr(cb, function (currentTree) { + self.currentTree = currentTree + self.currentTree.warnings = [] + if (currentTree.error && currentTree.error.code === 'EJSONPARSE') { + return cb(currentTree.error) + } + if (!self.noPackageJsonOk && !currentTree.package) { + log.error('install', "Couldn't read dependencies") + var er = new Error("ENOENT, open '" + path.join(self.where, 'package.json') + "'") + er.code = 'ENOPACKAGEJSON' + er.errno = 34 + return cb(er) + } + if (!currentTree.package) currentTree.package = {} + self.loadArgMetadata(iferr(cb, function () { + if (currentTree.package._shrinkwrap) return cb() + fs.readFile(path.join(self.where, 'npm-shrinkwrap.json'), function (er, data) { + if (er) return cb() + try { + currentTree.package._shrinkwrap = parseJSON(data) + } catch (ex) { + return cb(ex) + } + return cb() + }) + })) + })) + })) +} + +Installer.prototype.cloneCurrentTreeToIdealTree = function (cb) { + validate('F', arguments) + log.silly('install', 'cloneCurrentTreeToIdealTree') + this.idealTree = copyTree(this.currentTree) + this.idealTree.warnings = [] + cb() +} + +Installer.prototype.loadShrinkwrap = function (cb) { + validate('F', arguments) + log.silly('install', 'loadShrinkwrap') + var installNewModules = !!this.args.length + if (installNewModules) { + readShrinkwrap(this.idealTree, cb) + } else { + readShrinkwrap.andInflate(this.idealTree, cb) + } +} + +Installer.prototype.normalizeTree = function (log, cb) { + validate('OF', arguments) + log.silly('install', 'normalizeTree') + recalculateMetadata(this.currentTree, log, iferr(cb, function (tree) { + tree.children.forEach(function (child) { + if (child.requiredBy.length === 0) { + child.existing = true + } + }) + cb(null, tree) + })) +} + +Installer.prototype.getInstalledModules = function () { + return this.differences.filter(function (action) { + var mutation = action[0] + return (mutation === 'add' || mutation === 'update') + }).map(function (action) { + var child = action[1] + return [child.package._id, child.path] + }) +} + +Installer.prototype.printInstalled = function (cb) { + validate('F', arguments) + log.silly('install', 'printInstalled') + var self = this + this.differences.forEach(function (action) { + var mutation = action[0] + var child = action[1] + var name = packageId(child) + var where = path.relative(self.where, child.path) + if (mutation === 'remove') { + output('- ' + name + ' ' + where) + } else if (mutation === 'move') { + var oldWhere = path.relative(self.where, child.fromPath) + output(name + ' ' + oldWhere + ' -> ' + where) + } + }) + var addedOrMoved = this.differences.filter(function (action) { + var mutation = action[0] + var child = action[1] + return !child.failed && (mutation === 'add' || mutation === 'update') + }).map(function (action) { + var child = action[1] + return child.path + }) + if (!addedOrMoved.length) return cb() + // TODO: remove the recalculateMetadata, should not be needed + recalculateMetadata(this.idealTree, log, iferr(cb, function (tree) { + // These options control both how installs happen AND how `ls` shows output. + // Something like `npm install --production` only installs production deps. + // By contrast `npm install --production foo` installs `foo` and the + // `production` option is ignored. But when it comes time for `ls` to show + // its output, it excludes the thing we just installed because that flag. + // The summary output we get should be unfiltered, showing everything + // installed, so we clear these options before calling `ls`. + npm.config.set('production', false) + npm.config.set('dev', false) + npm.config.set('only', '') + npm.config.set('also', '') + ls.fromTree(self.where, tree, addedOrMoved, false, andIgnoreErrors(cb)) + })) +} + +Installer.prototype.debugActions = function (name, actionListName, cb) { + validate('SSF', arguments) + var actionsToLog = this[actionListName] + log.silly(name, 'action count', actionsToLog.length) + actionsToLog.forEach(function (action) { + log.silly(name, action.map(function (value) { + return (value && value.package) ? packageId(value) : value + }).join(' ')) + }) + cb() +} + +// This takes an object and a property name instead of a value to allow us +// to define the arguments for use by chain before the property exists yet. +Installer.prototype.debugTree = function (name, treeName, cb) { + validate('SSF', arguments) + log.silly(name, this.prettify(this[treeName]).trim()) + cb() +} + +Installer.prototype.prettify = function (tree) { + validate('O', arguments) + var seen = {} + function byName (aa, bb) { + return packageId(aa).localeCompare(packageId(bb)) + } + function expandTree (tree) { + seen[tree.path] = true + return { + label: packageId(tree), + nodes: tree.children.filter(function (tree) { return !seen[tree.path] }).sort(byName).map(expandTree) + } + } + return archy(expandTree(tree), '', { unicode: npm.config.get('unicode') }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/link.js b/bin/nodejs6.7.0/node_modules/npm/lib/link.js new file mode 100644 index 00000000..41e7515a --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/link.js @@ -0,0 +1,197 @@ +// link with no args: symlink the folder to the global location +// link with package arg: symlink the global to the local + +var npm = require('./npm.js') +var symlink = require('./utils/link.js') +var fs = require('graceful-fs') +var log = require('npmlog') +var asyncMap = require('slide').asyncMap +var chain = require('slide').chain +var path = require('path') +var build = require('./build.js') +var npa = require('npm-package-arg') +var usage = require('./utils/usage') +var output = require('./utils/output.js') + +module.exports = link + +link.usage = usage( + 'link', + 'npm link (in package dir)' + + '\nnpm link [<@scope>/][@]' +) + +link.completion = function (opts, cb) { + var dir = npm.globalDir + fs.readdir(dir, function (er, files) { + cb(er, files.filter(function (f) { + return !f.match(/^[\._-]/) + })) + }) +} + +function link (args, cb) { + if (process.platform === 'win32') { + var semver = require('semver') + if (!semver.gte(process.version, '0.7.9')) { + var msg = 'npm link not supported on windows prior to node 0.7.9' + var e = new Error(msg) + e.code = 'ENOTSUP' + e.errno = require('constants').ENOTSUP + return cb(e) + } + } + + if (npm.config.get('global')) { + return cb(new Error( + 'link should never be --global.\n' + + 'Please re-run this command with --local' + )) + } + + if (args.length === 1 && args[0] === '.') args = [] + if (args.length) return linkInstall(args, cb) + linkPkg(npm.prefix, cb) +} + +function parentFolder (id, folder) { + if (id[0] === '@') { + return path.resolve(folder, '..', '..') + } else { + return path.resolve(folder, '..') + } +} + +function linkInstall (pkgs, cb) { + asyncMap(pkgs, function (pkg, cb) { + var t = path.resolve(npm.globalDir, '..') + var pp = path.resolve(npm.globalDir, pkg) + var rp = null + var target = path.resolve(npm.dir, pkg) + + function n (er, data) { + if (er) return cb(er, data) + // we want the ONE thing that was installed into the global dir + var installed = data.filter(function (info) { + var id = info[0] + var folder = info[1] + return parentFolder(id, folder) === npm.globalDir + }) + var id = installed[0][0] + pp = installed[0][1] + var what = npa(id) + pkg = what.name + target = path.resolve(npm.dir, pkg) + next() + } + + // if it's a folder, a random not-installed thing, or not a scoped package, + // then link or install it first + if (pkg[0] !== '@' && (pkg.indexOf('/') !== -1 || pkg.indexOf('\\') !== -1)) { + return fs.lstat(path.resolve(pkg), function (er, st) { + if (er || !st.isDirectory()) { + npm.commands.install(t, pkg, n) + } else { + rp = path.resolve(pkg) + linkPkg(rp, n) + } + }) + } + + fs.lstat(pp, function (er, st) { + if (er) { + rp = pp + return npm.commands.install(t, [pkg], n) + } else if (!st.isSymbolicLink()) { + rp = pp + next() + } else { + return fs.realpath(pp, function (er, real) { + if (er) log.warn('invalid symbolic link', pkg) + else rp = real + next() + }) + } + }) + + function next () { + if (npm.config.get('dry-run')) return resultPrinter(pkg, pp, target, rp, cb) + chain( + [ + [ function (cb) { + log.verbose('link', 'symlinking %s to %s', pp, target) + cb() + } ], + [symlink, pp, target], + // do not run any scripts + rp && [build, [target], npm.config.get('global'), build._noLC, true], + [resultPrinter, pkg, pp, target, rp] + ], + cb + ) + } + }, cb) +} + +function linkPkg (folder, cb_) { + var me = folder || npm.prefix + var readJson = require('read-package-json') + + log.verbose('linkPkg', folder) + + readJson(path.resolve(me, 'package.json'), function (er, d) { + function cb (er) { + return cb_(er, [[d && d._id, target, null, null]]) + } + if (er) return cb(er) + if (!d.name) { + er = new Error('Package must have a name field to be linked') + return cb(er) + } + if (npm.config.get('dry-run')) return resultPrinter(path.basename(me), me, target, cb) + var target = path.resolve(npm.globalDir, d.name) + symlink(me, target, false, true, function (er) { + if (er) return cb(er) + log.verbose('link', 'build target', target) + // also install missing dependencies. + npm.commands.install(me, [], function (er) { + if (er) return cb(er) + // build the global stuff. Don't run *any* scripts, because + // install command already will have done that. + build([target], true, build._noLC, true, function (er) { + if (er) return cb(er) + resultPrinter(path.basename(me), me, target, cb) + }) + }) + }) + }) +} + +function resultPrinter (pkg, src, dest, rp, cb) { + if (typeof cb !== 'function') { + cb = rp + rp = null + } + var where = dest + rp = (rp || '').trim() + src = (src || '').trim() + // XXX If --json is set, then look up the data from the package.json + if (npm.config.get('parseable')) { + return parseableOutput(dest, rp || src, cb) + } + if (rp === src) rp = null + output(where + ' -> ' + src + (rp ? ' -> ' + rp : '')) + cb() +} + +function parseableOutput (dest, rp, cb) { + // XXX this should match ls --parseable and install --parseable + // look up the data from package.json, format it the same way. + // + // link is always effectively 'long', since it doesn't help much to + // *just* print the target folder. + // However, we don't actually ever read the version number, so + // the second field is always blank. + output(dest + '::' + rp) + cb() +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/logout.js b/bin/nodejs6.7.0/node_modules/npm/lib/logout.js new file mode 100644 index 00000000..ae46c9aa --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/logout.js @@ -0,0 +1,43 @@ +module.exports = logout + +var dezalgo = require('dezalgo') +var log = require('npmlog') + +var npm = require('./npm.js') +var mapToRegistry = require('./utils/map-to-registry.js') + +logout.usage = 'npm logout [--registry=] [--scope=<@scope>]' + +function afterLogout (normalized, cb) { + var scope = npm.config.get('scope') + + if (scope) npm.config.del(scope + ':registry') + + npm.config.clearCredentialsByURI(normalized) + npm.config.save('user', cb) +} + +function logout (args, cb) { + cb = dezalgo(cb) + + mapToRegistry('/', npm.config, function (err, uri, auth, normalized) { + if (err) return cb(err) + + if (auth.token) { + log.verbose('logout', 'clearing session token for', normalized) + npm.registry.logout(normalized, { auth: auth }, function (err) { + if (err) return cb(err) + + afterLogout(normalized, cb) + }) + } else if (auth.username || auth.password) { + log.verbose('logout', 'clearing user credentials for', normalized) + + afterLogout(normalized, cb) + } else { + cb(new Error( + 'Not logged in to', normalized + ',', "so can't log out." + )) + } + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/ls.js b/bin/nodejs6.7.0/node_modules/npm/lib/ls.js new file mode 100644 index 00000000..47c9664b --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/ls.js @@ -0,0 +1,489 @@ +// show the installed versions of packages +// +// --parseable creates output like this: +// ::: +// Flags are a :-separated list of zero or more indicators + +module.exports = exports = ls + +var path = require('path') +var url = require('url') +var readPackageTree = require('read-package-tree') +var log = require('npmlog') +var archy = require('archy') +var semver = require('semver') +var color = require('ansicolors') +var npa = require('npm-package-arg') +var iferr = require('iferr') +var npm = require('./npm.js') +var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js') +var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var packageId = require('./utils/package-id.js') +var usage = require('./utils/usage') +var output = require('./utils/output.js') + +ls.usage = usage( + 'ls', + 'npm ls [[<@scope>/] ...]' +) + +ls.completion = require('./utils/completion/installed-deep.js') + +function ls (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + var dir = path.resolve(npm.dir, '..') + readPackageTree(dir, andRecalculateMetadata(iferr(cb, function (physicalTree) { + lsFromTree(dir, physicalTree, args, silent, cb) + }))) +} + +function andRecalculateMetadata (next) { + return function (er, tree) { + recalculateMetadata(tree || {}, log, next) + } +} + +function inList (list, value) { + return list.indexOf(value) !== -1 +} + +var lsFromTree = ls.fromTree = function (dir, physicalTree, args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + // npm ls 'foo@~1.3' bar 'baz@<2' + if (!args) { + args = [] + } else { + args = args.map(function (a) { + var p = npa(a) + var name = p.name + // When version spec is missing, we'll skip using it when filtering. + // Otherwise, `semver.validRange` would return '*', which won't + // match prerelease versions. + var ver = (p.rawSpec && + (semver.validRange(p.rawSpec) || '')) + return [ name, ver, a ] + }) + } + + var data = mutateIntoLogicalTree.asReadInstalled(physicalTree) + + pruneNestedExtraneous(data) + filterByEnv(data) + var bfs = filterFound(bfsify(data), args) + var lite = getLite(bfs) + + if (silent) return cb(null, data, lite) + + var long = npm.config.get('long') + var json = npm.config.get('json') + var out + if (json) { + var seen = [] + var d = long ? bfs : lite + // the raw data can be circular + out = JSON.stringify(d, function (k, o) { + if (typeof o === 'object') { + if (inList(seen, o)) return '[Circular]' + seen.push(o) + } + return o + }, 2) + } else if (npm.config.get('parseable')) { + out = makeParseable(bfs, long, dir) + } else if (data) { + out = makeArchy(bfs, long, dir) + } + output(out) + + if (args.length && !data._found) process.exitCode = 1 + + var er + // if any errors were found, then complain and exit status 1 + if (lite.problems && lite.problems.length) { + er = lite.problems.join('\n') + } + cb(er, data, lite) +} + +function pruneNestedExtraneous (data, visited) { + visited = visited || [] + visited.push(data) + for (var i in data.dependencies) { + if (data.dependencies[i].extraneous) { + data.dependencies[i].dependencies = {} + } else if (visited.indexOf(data.dependencies[i]) === -1) { + pruneNestedExtraneous(data.dependencies[i], visited) + } + } +} + +function filterByEnv (data) { + var dev = npm.config.get('dev') || /^dev(elopment)?$/.test(npm.config.get('only')) + var production = npm.config.get('production') || /^prod(uction)?$/.test(npm.config.get('only')) + var dependencies = {} + var devKeys = Object.keys(data.devDependencies || []) + var prodKeys = Object.keys(data._dependencies || []) + Object.keys(data.dependencies).forEach(function (name) { + if (!dev && inList(devKeys, name) && data.dependencies[name].missing) { + return + } + + if ((dev && inList(devKeys, name)) || // only --dev + (production && inList(prodKeys, name)) || // only --production + (!dev && !production)) { // no --production|--dev|--only=xxx + dependencies[name] = data.dependencies[name] + } + }) + data.dependencies = dependencies +} + +function alphasort (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return a > b ? 1 + : a < b ? -1 : 0 +} + +function isCruft (data) { + return data.extraneous && data.error && data.error.code === 'ENOTDIR' +} + +function getLite (data, noname, depth) { + var lite = {} + + if (isCruft(data)) return lite + + var maxDepth = npm.config.get('depth') + + if (typeof depth === 'undefined') depth = 0 + if (!noname && data.name) lite.name = data.name + if (data.version) lite.version = data.version + if (data.extraneous) { + lite.extraneous = true + lite.problems = lite.problems || [] + lite.problems.push('extraneous: ' + packageId(data) + ' ' + (data.path || '')) + } + + if (data.error && data.path !== path.resolve(npm.globalDir, '..') && + (data.error.code !== 'ENOENT' || noname)) { + lite.invalid = true + lite.problems = lite.problems || [] + var message = data.error.message + lite.problems.push('error in ' + data.path + ': ' + message) + } + + if (data._from) { + lite.from = data._from + } + + if (data._resolved) { + lite.resolved = data._resolved + } + + if (data.invalid) { + lite.invalid = true + lite.problems = lite.problems || [] + lite.problems.push('invalid: ' + + packageId(data) + + ' ' + (data.path || '')) + } + + if (data.peerInvalid) { + lite.peerInvalid = true + lite.problems = lite.problems || [] + lite.problems.push('peer dep not met: ' + + packageId(data) + + ' ' + (data.path || '')) + } + + var deps = (data.dependencies && Object.keys(data.dependencies)) || [] + if (deps.length) { + lite.dependencies = deps.map(function (d) { + var dep = data.dependencies[d] + if (dep.missing && !dep.optional) { + lite.problems = lite.problems || [] + var p + if (data.depth > maxDepth) { + p = 'max depth reached: ' + } else { + p = 'missing: ' + } + p += d + '@' + dep.requiredBy + + ', required by ' + + packageId(data) + lite.problems.push(p) + return [d, { required: dep.requiredBy, missing: true }] + } else if (dep.peerMissing) { + lite.problems = lite.problems || [] + dep.peerMissing.forEach(function (missing) { + var pdm = 'peer dep missing: ' + + missing.requires + + ', required by ' + + missing.requiredBy + lite.problems.push(pdm) + }) + return [d, { required: dep, peerMissing: true }] + } else if (npm.config.get('json')) { + if (depth === maxDepth) delete dep.dependencies + return [d, getLite(dep, true, depth + 1)] + } + return [d, getLite(dep, true)] + }).reduce(function (deps, d) { + if (d[1].problems) { + lite.problems = lite.problems || [] + lite.problems.push.apply(lite.problems, d[1].problems) + } + deps[d[0]] = d[1] + return deps + }, {}) + } + return lite +} + +function bfsify (root) { + // walk over the data, and turn it from this: + // +-- a + // | `-- b + // | `-- a (truncated) + // `--b (truncated) + // into this: + // +-- a + // `-- b + // which looks nicer + var queue = [root] + var seen = [root] + + while (queue.length) { + var current = queue.shift() + var deps = current.dependencies = current.dependencies || {} + Object.keys(deps).forEach(function (d) { + var dep = deps[d] + if (dep.missing) return + if (inList(seen, dep)) { + if (npm.config.get('parseable') || !npm.config.get('long')) { + delete deps[d] + return + } else { + dep = deps[d] = Object.create(dep) + dep.dependencies = {} + } + } + queue.push(dep) + seen.push(dep) + }) + } + + return root +} + +function filterFound (root, args) { + if (!args.length) return root + var deps = root.dependencies + if (deps) { + Object.keys(deps).forEach(function (depName) { + var dep = filterFound(deps[depName], args) + if (dep.peerMissing) return + + // see if this one itself matches + var found = false + for (var ii = 0; !found && ii < args.length; ii++) { + var argName = args[ii][0] + var argVersion = args[ii][1] + var argRaw = args[ii][2] + if (depName === argName && argVersion) { + found = semver.satisfies(dep.version, argVersion, true) + } else if (depName === argName) { + // If version is missing from arg, just do a name match. + found = true + } else if (dep.path === argRaw) { + found = true + } + } + // included explicitly + if (found) dep._found = true + // included because a child was included + if (dep._found && !root._found) root._found = 1 + // not included + if (!dep._found) delete deps[depName] + }) + } + if (!root._found) root._found = false + return root +} + +function makeArchy (data, long, dir) { + var out = makeArchy_(data, long, dir, 0) + return archy(out, '', { unicode: npm.config.get('unicode') }) +} + +function makeArchy_ (data, long, dir, depth, parent, d) { + if (data.missing) { + if (depth - 1 <= npm.config.get('depth')) { + // just missing + var unmet = 'UNMET ' + (data.optional ? 'OPTIONAL ' : '') + 'DEPENDENCY' + if (npm.color) { + if (data.optional) { + unmet = color.bgBlack(color.yellow(unmet)) + } else { + unmet = color.bgBlack(color.red(unmet)) + } + } + data = unmet + ' ' + d + '@' + data.requiredBy + } else { + data = d + '@' + data.requiredBy + } + return data + } + + var out = {} + // the top level is a bit special. + out.label = data._id || '' + if (data._found === true && data._id) { + if (npm.color) { + out.label = color.bgBlack(color.yellow(out.label.trim())) + ' ' + } else { + out.label = out.label.trim() + ' ' + } + } + if (data.link) out.label += ' -> ' + data.link + + if (data.invalid) { + if (data.realName !== data.name) out.label += ' (' + data.realName + ')' + var invalid = 'invalid' + if (npm.color) invalid = color.bgBlack(color.red(invalid)) + out.label += ' ' + invalid + } + + if (data.peerInvalid) { + var peerInvalid = 'peer invalid' + if (npm.color) peerInvalid = color.bgBlack(color.red(peerInvalid)) + out.label += ' ' + peerInvalid + } + + if (data.peerMissing) { + var peerMissing = 'UNMET PEER DEPENDENCY' + if (npm.color) peerMissing = color.bgBlack(color.red(peerMissing)) + out.label = peerMissing + ' ' + out.label + } + + if (data.extraneous && data.path !== dir) { + var extraneous = 'extraneous' + if (npm.color) extraneous = color.bgBlack(color.green(extraneous)) + out.label += ' ' + extraneous + } + + if (data.error && depth) { + var message = data.error.message + if (message.indexOf('\n')) message = message.slice(0, message.indexOf('\n')) + var error = 'error: ' + message + if (npm.color) error = color.bgRed(color.brightWhite(error)) + out.label += ' ' + error + } + + // add giturl to name@version + if (data._resolved) { + try { + var type = npa(data._resolved).type + var isGit = type === 'git' || type === 'hosted' + if (isGit) { + out.label += ' (' + data._resolved + ')' + } + } catch (ex) { + // npa threw an exception then it ain't git so whatev + } + } + + if (long) { + if (dir === data.path) out.label += '\n' + dir + out.label += '\n' + getExtras(data, dir) + } else if (dir === data.path) { + if (out.label) out.label += ' ' + out.label += dir + } + + // now all the children. + out.nodes = [] + if (depth <= npm.config.get('depth')) { + out.nodes = Object.keys(data.dependencies || {}) + .sort(alphasort).filter(function (d) { + return !isCruft(data.dependencies[d]) + }).map(function (d) { + return makeArchy_(data.dependencies[d], long, dir, depth + 1, data, d) + }) + } + + if (out.nodes.length === 0 && data.path === dir) { + out.nodes = ['(empty)'] + } + + return out +} + +function getExtras (data) { + var extras = [] + + if (data.description) extras.push(data.description) + if (data.repository) extras.push(data.repository.url) + if (data.homepage) extras.push(data.homepage) + if (data._from) { + var from = data._from + if (from.indexOf(data.name + '@') === 0) { + from = from.substr(data.name.length + 1) + } + var u = url.parse(from) + if (u.protocol) extras.push(from) + } + return extras.join('\n') +} + +function makeParseable (data, long, dir, depth, parent, d) { + depth = depth || 0 + if (depth > npm.config.get('depth')) return [ makeParseable_(data, long, dir, depth, parent, d) ] + return [ makeParseable_(data, long, dir, depth, parent, d) ] + .concat(Object.keys(data.dependencies || {}) + .sort(alphasort).map(function (d) { + return makeParseable(data.dependencies[d], long, dir, depth + 1, data, d) + })) + .filter(function (x) { return x }) + .join('\n') +} + +function makeParseable_ (data, long, dir, depth, parent, d) { + if (data.hasOwnProperty('_found') && data._found !== true) return '' + + if (data.missing) { + if (depth < npm.config.get('depth')) { + data = npm.config.get('long') + ? path.resolve(parent.path, 'node_modules', d) + + ':' + d + '@' + JSON.stringify(data.requiredBy) + ':INVALID:MISSING' + : '' + } else { + data = path.resolve(dir || '', 'node_modules', d || '') + + (npm.config.get('long') + ? ':' + d + '@' + JSON.stringify(data.requiredBy) + + ':' + // no realpath resolved + ':MAXDEPTH' + : '') + } + + return data + } + + if (!npm.config.get('long')) return data.path + + return data.path + + ':' + (data._id || '') + + ':' + (data.realPath !== data.path ? data.realPath : '') + + (data.extraneous ? ':EXTRANEOUS' : '') + + (data.error && data.path !== path.resolve(npm.globalDir, '..') ? ':ERROR' : '') + + (data.invalid ? ':INVALID' : '') + + (data.peerInvalid ? ':PEERINVALID' : '') + + (data.peerMissing ? ':PEERINVALID:MISSING' : '') +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/npm.js b/bin/nodejs6.7.0/node_modules/npm/lib/npm.js new file mode 100644 index 00000000..1d56f8fe --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/npm.js @@ -0,0 +1,403 @@ +;(function () { + // windows: running 'npm blah' in this folder will invoke WSH, not node. + /*globals WScript*/ + if (typeof WScript !== 'undefined') { + WScript.echo( + 'npm does not work when run\n' + + 'with the Windows Scripting Host\n\n' + + '"cd" to a different directory,\n' + + 'or type "npm.cmd ",\n' + + 'or type "node npm ".' + ) + WScript.quit(1) + return + } + + var gfs = require('graceful-fs') + // Patch the global fs module here at the app level + var fs = gfs.gracefulify(require('fs')) + + var EventEmitter = require('events').EventEmitter + var npm = module.exports = new EventEmitter() + var npmconf = require('./config/core.js') + var log = require('npmlog') + + var tty = require('tty') + var path = require('path') + var abbrev = require('abbrev') + var which = require('which') + var CachingRegClient = require('./cache/caching-client.js') + var parseJSON = require('./utils/parse-json.js') + var aliases = require('./config/cmd-list').aliases + var cmdList = require('./config/cmd-list').cmdList + var plumbing = require('./config/cmd-list').plumbing + var output = require('./utils/output.js') + + npm.config = { + loaded: false, + get: function () { + throw new Error('npm.load() required') + }, + set: function () { + throw new Error('npm.load() required') + } + } + + npm.commands = {} + + npm.rollbacks = [] + + try { + // startup, ok to do this synchronously + var j = parseJSON(fs.readFileSync( + path.join(__dirname, '../package.json')) + '') + npm.version = j.version + } catch (ex) { + try { + log.info('error reading version', ex) + } catch (er) {} + npm.version = ex + } + + var commandCache = {} + var aliasNames = Object.keys(aliases) + + var littleGuys = [ 'isntall', 'verison' ] + var fullList = cmdList.concat(aliasNames).filter(function (c) { + return plumbing.indexOf(c) === -1 + }) + var abbrevs = abbrev(fullList) + + // we have our reasons + fullList = npm.fullList = fullList.filter(function (c) { + return littleGuys.indexOf(c) === -1 + }) + + Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) { + Object.defineProperty(npm.commands, c, { get: function () { + if (!loaded) { + throw new Error( + 'Call npm.load(config, cb) before using this command.\n' + + 'See the README.md or cli.js for example usage.' + ) + } + var a = npm.deref(c) + if (c === 'la' || c === 'll') { + npm.config.set('long', true) + } + + npm.command = c + if (commandCache[a]) return commandCache[a] + + var cmd = require(path.join(__dirname, a + '.js')) + + commandCache[a] = function () { + var args = Array.prototype.slice.call(arguments, 0) + if (typeof args[args.length - 1] !== 'function') { + args.push(defaultCb) + } + if (args.length === 1) args.unshift([]) + + // Options are prefixed by a hyphen-minus (-, \u2d). + // Other dash-type chars look similar but are invalid. + Array(args[0]).forEach(function (arg) { + if (/^[\u2010-\u2015\u2212\uFE58\uFE63\uFF0D]/.test(arg)) { + log.error('arg', 'Argument starts with non-ascii dash, this is probably invalid:', arg) + } + }) + + npm.registry.version = npm.version + if (!npm.registry.refer) { + npm.registry.refer = [a].concat(args[0]).map(function (arg) { + // exclude anything that might be a URL, path, or private module + // Those things will always have a slash in them somewhere + if (arg && arg.match && arg.match(/\/|\\/)) { + return '[REDACTED]' + } else { + return arg + } + }).filter(function (arg) { + return arg && arg.match + }).join(' ') + } + + cmd.apply(npm, args) + } + + Object.keys(cmd).forEach(function (k) { + commandCache[a][k] = cmd[k] + }) + + return commandCache[a] + }, enumerable: fullList.indexOf(c) !== -1, configurable: true }) + + // make css-case commands callable via camelCase as well + if (c.match(/\-([a-z])/)) { + addCommand(c.replace(/\-([a-z])/g, function (a, b) { + return b.toUpperCase() + })) + } + }) + + function defaultCb (er, data) { + log.disableProgress() + if (er) console.error(er.stack || er.message) + else output(data) + } + + npm.deref = function (c) { + if (!c) return '' + if (c.match(/[A-Z]/)) { + c = c.replace(/([A-Z])/g, function (m) { + return '-' + m.toLowerCase() + }) + } + if (plumbing.indexOf(c) !== -1) return c + var a = abbrevs[c] + if (aliases[a]) a = aliases[a] + return a + } + + var loaded = false + var loading = false + var loadErr = null + var loadListeners = [] + + function loadCb (er) { + loadListeners.forEach(function (cb) { + process.nextTick(cb.bind(npm, er, npm)) + }) + loadListeners.length = 0 + } + + npm.load = function (cli, cb_) { + if (!cb_ && typeof cli === 'function') { + cb_ = cli + cli = {} + } + if (!cb_) cb_ = function () {} + if (!cli) cli = {} + loadListeners.push(cb_) + if (loaded || loadErr) return cb(loadErr) + if (loading) return + loading = true + var onload = true + + function cb (er) { + if (loadErr) return + loadErr = er + if (er) return cb_(er) + if (npm.config.get('force')) { + log.warn('using --force', 'I sure hope you know what you are doing.') + } + npm.config.loaded = true + loaded = true + loadCb(loadErr = er) + onload = onload && npm.config.get('onload-script') + if (onload) { + try { + require(onload) + } catch (err) { + log.warn('onload-script', 'failed to require onload script', onload) + log.warn('onload-script', err) + } + onload = false + } + } + + log.pause() + + load(npm, cli, cb) + } + + function load (npm, cli, cb) { + which(process.argv[0], function (er, node) { + if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) { + log.verbose('node symlink', node) + process.execPath = node + process.installPrefix = path.resolve(node, '..', '..') + } + + // look up configs + var builtin = path.resolve(__dirname, '..', 'npmrc') + npmconf.load(cli, builtin, function (er, config) { + if (er === config) er = null + + npm.config = config + if (er) return cb(er) + + // if the 'project' config is not a filename, and we're + // not in global mode, then that means that it collided + // with either the default or effective userland config + if (!config.get('global') && + config.sources.project && + config.sources.project.type !== 'ini') { + log.verbose( + 'config', + 'Skipping project config: %s. (matches userconfig)', + config.localPrefix + '/.npmrc' + ) + } + + // Include npm-version and node-version in user-agent + var ua = config.get('user-agent') || '' + ua = ua.replace(/\{node-version\}/gi, process.version) + ua = ua.replace(/\{npm-version\}/gi, npm.version) + ua = ua.replace(/\{platform\}/gi, process.platform) + ua = ua.replace(/\{arch\}/gi, process.arch) + config.set('user-agent', ua) + + var color = config.get('color') + + log.level = config.get('loglevel') + log.heading = config.get('heading') || 'npm' + log.stream = config.get('logstream') + + switch (color) { + case 'always': + log.enableColor() + npm.color = true + break + case false: + log.disableColor() + npm.color = false + break + default: + if (process.stdout.isTTY) npm.color = true + else if (!tty.isatty) npm.color = true + else if (tty.isatty(1)) npm.color = true + else npm.color = false + break + } + + if (config.get('unicode')) { + log.enableUnicode() + } else { + log.disableUnicode() + } + + if (config.get('progress') && (process.stderr.isTTY || (tty.isatty && tty.isatty(2)))) { + log.enableProgress() + } else { + log.disableProgress() + } + + log.resume() + + // at this point the configs are all set. + // go ahead and spin up the registry client. + npm.registry = new CachingRegClient(npm.config) + + var umask = npm.config.get('umask') + npm.modes = { + exec: parseInt('0777', 8) & (~umask), + file: parseInt('0666', 8) & (~umask), + umask: umask + } + + var gp = Object.getOwnPropertyDescriptor(config, 'globalPrefix') + Object.defineProperty(npm, 'globalPrefix', gp) + + var lp = Object.getOwnPropertyDescriptor(config, 'localPrefix') + Object.defineProperty(npm, 'localPrefix', lp) + + return cb(null, npm) + }) + }) + } + + Object.defineProperty(npm, 'prefix', + { + get: function () { + return npm.config.get('global') ? npm.globalPrefix : npm.localPrefix + }, + set: function (r) { + var k = npm.config.get('global') ? 'globalPrefix' : 'localPrefix' + npm[k] = r + return r + }, + enumerable: true + }) + + Object.defineProperty(npm, 'bin', + { + get: function () { + if (npm.config.get('global')) return npm.globalBin + return path.resolve(npm.root, '.bin') + }, + enumerable: true + }) + + Object.defineProperty(npm, 'globalBin', + { + get: function () { + var b = npm.globalPrefix + if (process.platform !== 'win32') b = path.resolve(b, 'bin') + return b + } + }) + + Object.defineProperty(npm, 'dir', + { + get: function () { + if (npm.config.get('global')) return npm.globalDir + return path.resolve(npm.prefix, 'node_modules') + }, + enumerable: true + }) + + Object.defineProperty(npm, 'globalDir', + { + get: function () { + return (process.platform !== 'win32') + ? path.resolve(npm.globalPrefix, 'lib', 'node_modules') + : path.resolve(npm.globalPrefix, 'node_modules') + }, + enumerable: true + }) + + Object.defineProperty(npm, 'root', + { get: function () { return npm.dir } }) + + Object.defineProperty(npm, 'cache', + { get: function () { return npm.config.get('cache') }, + set: function (r) { return npm.config.set('cache', r) }, + enumerable: true + }) + + var tmpFolder + var rand = require('crypto').randomBytes(4).toString('hex') + Object.defineProperty(npm, 'tmp', + { + get: function () { + if (!tmpFolder) tmpFolder = 'npm-' + process.pid + '-' + rand + return path.resolve(npm.config.get('tmp'), tmpFolder) + }, + enumerable: true + }) + + // the better to repl you with + Object.getOwnPropertyNames(npm.commands).forEach(function (n) { + if (npm.hasOwnProperty(n) || n === 'config') return + + Object.defineProperty(npm, n, { get: function () { + return function () { + var args = Array.prototype.slice.call(arguments, 0) + var cb = defaultCb + + if (args.length === 1 && Array.isArray(args[0])) { + args = args[0] + } + + if (typeof args[args.length - 1] === 'function') { + cb = args.pop() + } + npm.commands[n](args, cb) + } + }, enumerable: false, configurable: true }) + }) + + if (require.main === module) { + require('../bin/npm-cli.js') + } +})() diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/outdated.js b/bin/nodejs6.7.0/node_modules/npm/lib/outdated.js new file mode 100644 index 00000000..9b41d39e --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/outdated.js @@ -0,0 +1,428 @@ +/* + +npm outdated [pkg] + +Does the following: + +1. check for a new version of pkg + +If no packages are specified, then run for all installed +packages. + +--parseable creates output like this: +::: + +*/ + +module.exports = outdated + +outdated.usage = 'npm outdated [[<@scope>/] ...]' + +outdated.completion = require('./utils/completion/installed-deep.js') + +var os = require('os') +var url = require('url') +var path = require('path') +var log = require('npmlog') +var readPackageTree = require('read-package-tree') +var readJson = require('read-package-json') +var asyncMap = require('slide').asyncMap +var color = require('ansicolors') +var styles = require('ansistyles') +var table = require('text-table') +var semver = require('semver') +var npa = require('npm-package-arg') +var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js') +var cache = require('./cache.js') +var npm = require('./npm.js') +var long = npm.config.get('long') +var mapToRegistry = require('./utils/map-to-registry.js') +var isExtraneous = require('./install/is-extraneous.js') +var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var moduleName = require('./utils/module-name.js') +var output = require('./utils/output.js') + +function uniqName (item) { + return item[0].path + '|' + item[1] + '|' + item[7] +} + +function uniq (list) { + var uniqed = [] + var seen = {} + list.forEach(function (item) { + var name = uniqName(item) + if (seen[name]) return + seen[name] = true + uniqed.push(item) + }) + return uniqed +} + +function andRecalculateMetadata (next) { + return function (er, tree) { + if (er) return next(er) + recalculateMetadata(tree, log, next) + } +} + +function outdated (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + var dir = path.resolve(npm.dir, '..') + + // default depth for `outdated` is 0 (cf. `ls`) + if (npm.config.get('depth') === Infinity) npm.config.set('depth', 0) + + readPackageTree(dir, andRecalculateMetadata(function (er, tree) { + if (!tree) return cb(er) + mutateIntoLogicalTree(tree) + outdated_(args, '', tree, {}, 0, function (er, list) { + list = uniq(list || []).sort(function (aa, bb) { + return aa[0].path.localeCompare(bb[0].path) || + aa[1].localeCompare(bb[1]) + }) + if (er || silent || list.length === 0) return cb(er, list) + if (npm.config.get('json')) { + output(makeJSON(list)) + } else if (npm.config.get('parseable')) { + output(makeParseable(list)) + } else { + var outList = list.map(makePretty) + var outHead = [ 'Package', + 'Current', + 'Wanted', + 'Latest', + 'Location' + ] + if (long) outHead.push('Package Type') + var outTable = [outHead].concat(outList) + + if (npm.color) { + outTable[0] = outTable[0].map(function (heading) { + return styles.underline(heading) + }) + } + + var tableOpts = { + align: ['l', 'r', 'r', 'r', 'l'], + stringLength: function (s) { return ansiTrim(s).length } + } + output(table(outTable, tableOpts)) + } + cb(null, list.map(function (item) { return [item[0].parent.path].concat(item.slice(1, 7)) })) + }) + })) +} + +// [[ dir, dep, has, want, latest, type ]] +function makePretty (p) { + var dep = p[0] + var depname = p[1] + var dir = dep.path + var has = p[2] + var want = p[3] + var latest = p[4] + var type = p[6] + var deppath = p[7] + + if (!npm.config.get('global')) { + dir = path.relative(process.cwd(), dir) + } + + var columns = [ depname, + has || 'MISSING', + want, + latest, + deppath + ] + if (long) columns[5] = type + + if (npm.color) { + columns[0] = color[has === want || want === 'linked' ? 'yellow' : 'red'](columns[0]) // dep + columns[2] = color.green(columns[2]) // want + columns[3] = color.magenta(columns[3]) // latest + } + + return columns +} + +function ansiTrim (str) { + var r = new RegExp('\x1b(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|' + + '\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)', 'g') + return str.replace(r, '') +} + +function makeParseable (list) { + return list.map(function (p) { + var dep = p[0] + var depname = p[1] + var dir = dep.path + var has = p[2] + var want = p[3] + var latest = p[4] + var type = p[6] + + var out = [ + dir, + depname + '@' + want, + (has ? (depname + '@' + has) : 'MISSING'), + depname + '@' + latest + ] + if (long) out.push(type) + + return out.join(':') + }).join(os.EOL) +} + +function makeJSON (list) { + var out = {} + list.forEach(function (p) { + var dep = p[0] + var depname = p[1] + var dir = dep.path + var has = p[2] + var want = p[3] + var latest = p[4] + var type = p[6] + if (!npm.config.get('global')) { + dir = path.relative(process.cwd(), dir) + } + out[depname] = { current: has, + wanted: want, + latest: latest, + location: dir + } + if (long) out[depname].type = type + }) + return JSON.stringify(out, null, 2) +} + +function outdated_ (args, path, tree, parentHas, depth, cb) { + if (!tree.package) tree.package = {} + if (path && tree.package.name) path += ' > ' + tree.package.name + if (!path && tree.package.name) path = tree.package.name + if (depth > npm.config.get('depth')) { + return cb(null, []) + } + var types = {} + var pkg = tree.package + + var deps = tree.children.filter(function (child) { return !isExtraneous(child) }) || [] + + deps.forEach(function (dep) { + types[moduleName(dep)] = 'dependencies' + }) + + Object.keys(tree.missingDeps).forEach(function (name) { + deps.push({ + package: { name: name }, + path: tree.path, + parent: tree, + isMissing: true + }) + types[name] = 'dependencies' + }) + + // If we explicitly asked for dev deps OR we didn't ask for production deps + // AND we asked to save dev-deps OR we didn't ask to save anything that's NOT + // dev deps then… + // (All the save checking here is because this gets called from npm-update currently + // and that requires this logic around dev deps.) + // FIXME: Refactor npm update to not be in terms of outdated. + var dev = npm.config.get('dev') || /^dev(elopment)?$/.test(npm.config.get('also')) + var prod = npm.config.get('production') || /^prod(uction)?$/.test(npm.config.get('only')) + if ((dev || !prod) && + (npm.config.get('save-dev') || ( + !npm.config.get('save') && !npm.config.get('save-optional')))) { + Object.keys(tree.missingDevDeps).forEach(function (name) { + deps.push({ + package: { name: name }, + path: tree.path, + parent: tree, + isMissing: true + }) + if (!types[name]) { + types[name] = 'devDependencies' + } + }) + } + + if (npm.config.get('save-dev')) { + deps = deps.filter(function (dep) { return pkg.devDependencies[moduleName(dep)] }) + deps.forEach(function (dep) { + types[moduleName(dep)] = 'devDependencies' + }) + } else if (npm.config.get('save')) { + // remove optional dependencies from dependencies during --save. + deps = deps.filter(function (dep) { return !pkg.optionalDependencies[moduleName(dep)] }) + } else if (npm.config.get('save-optional')) { + deps = deps.filter(function (dep) { return pkg.optionalDependencies[moduleName(dep)] }) + deps.forEach(function (dep) { + types[moduleName(dep)] = 'optionalDependencies' + }) + } + var doUpdate = dev || ( + !prod && + !Object.keys(parentHas).length && + !npm.config.get('global') + ) + if (doUpdate) { + Object.keys(pkg.devDependencies).forEach(function (k) { + if (!(k in parentHas)) { + deps[k] = pkg.devDependencies[k] + types[k] = 'devDependencies' + } + }) + } + + var has = Object.create(parentHas) + tree.children.forEach(function (child) { + if (child.package.name && child.package.private) { + deps = deps.filter(function (dep) { return dep !== child }) + } + has[child.package.name] = { + version: child.package.version, + from: child.package._from + } + }) + + // now get what we should have, based on the dep. + // if has[dep] !== shouldHave[dep], then cb with the data + // otherwise dive into the folder + asyncMap(deps, function (dep, cb) { + var name = moduleName(dep) + var required = (tree.package.dependencies)[name] || + (tree.package.optionalDependencies)[name] || + (tree.package.devDependencies)[name] || + dep.package._requested && dep.package._requested.spec || + '*' + if (!long) return shouldUpdate(args, dep, name, has, required, depth, path, cb) + + shouldUpdate(args, dep, name, has, required, depth, path, cb, types[name]) + }, cb) +} + +function shouldUpdate (args, tree, dep, has, req, depth, pkgpath, cb, type) { + // look up the most recent version. + // if that's what we already have, or if it's not on the args list, + // then dive into it. Otherwise, cb() with the data. + + // { version: , from: } + var curr = has[dep] + + function skip (er) { + // show user that no viable version can be found + if (er) return cb(er) + outdated_(args, + pkgpath, + tree, + has, + depth + 1, + cb) + } + + function doIt (wanted, latest) { + if (!long) { + return cb(null, [[tree, dep, curr && curr.version, wanted, latest, req, null, pkgpath]]) + } + cb(null, [[tree, dep, curr && curr.version, wanted, latest, req, type, pkgpath]]) + } + + if (args.length && args.indexOf(dep) === -1) return skip() + var parsed = npa(dep + '@' + req) + if (tree.isLink && tree.parent && tree.parent.isTop) { + return doIt('linked', 'linked') + } + if (parsed.type === 'git' || parsed.type === 'hosted') { + return doIt('git', 'git') + } + + // search for the latest package + mapToRegistry(dep, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, updateDeps) + }) + + function updateLocalDeps (latestRegistryVersion) { + readJson(path.resolve(parsed.spec, 'package.json'), function (er, localDependency) { + if (er) return cb() + + var wanted = localDependency.version + var latest = localDependency.version + + if (latestRegistryVersion) { + latest = latestRegistryVersion + if (semver.lt(wanted, latestRegistryVersion)) { + wanted = latestRegistryVersion + req = dep + '@' + latest + } + } + + if (curr.version !== wanted) { + doIt(wanted, latest) + } else { + skip() + } + }) + } + + function updateDeps (er, d) { + if (er) { + if (parsed.type !== 'local') return cb(er) + return updateLocalDeps() + } + + if (!d || !d['dist-tags'] || !d.versions) return cb() + var l = d.versions[d['dist-tags'].latest] + if (!l) return cb() + + var r = req + if (d['dist-tags'][req]) { + r = d['dist-tags'][req] + } + + if (semver.validRange(r, true)) { + // some kind of semver range. + // see if it's in the doc. + var vers = Object.keys(d.versions) + var v = semver.maxSatisfying(vers, r, true) + if (v) { + return onCacheAdd(null, d.versions[v]) + } + } + + // We didn't find the version in the doc. See if cache can find it. + cache.add(dep, req, null, false, onCacheAdd) + + function onCacheAdd (er, d) { + // if this fails, then it means we can't update this thing. + // it's probably a thing that isn't published. + if (er) { + if (er.code && er.code === 'ETARGET') { + // no viable version found + return skip(er) + } + return skip() + } + + // check that the url origin hasn't changed (#1727) and that + // there is no newer version available + var dFromUrl = d._from && url.parse(d._from).protocol + var cFromUrl = curr && curr.from && url.parse(curr.from).protocol + + if (!curr || + dFromUrl && cFromUrl && d._from !== curr.from || + d.version !== curr.version || + d.version !== l.version) { + if (parsed.type === 'local') return updateLocalDeps(l.version) + + doIt(d.version, l.version) + } else { + skip() + } + } + } +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/owner.js b/bin/nodejs6.7.0/node_modules/npm/lib/owner.js new file mode 100644 index 00000000..51aca537 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/owner.js @@ -0,0 +1,277 @@ +module.exports = owner + +var npm = require('./npm.js') +var log = require('npmlog') +var mapToRegistry = require('./utils/map-to-registry.js') +var readLocalPkg = require('./utils/read-local-package.js') +var usage = require('./utils/usage') +var output = require('./utils/output.js') + +owner.usage = usage( + 'owner', + 'npm owner add [<@scope>/]' + + '\nnpm owner rm [<@scope>/]' + + '\nnpm owner ls [<@scope>/]' +) +owner.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length > 4) return cb() + if (argv.length <= 2) { + var subs = ['add', 'rm'] + if (opts.partialWord === 'l') subs.push('ls') + else subs.push('ls', 'list') + return cb(null, subs) + } + + npm.commands.whoami([], true, function (er, username) { + if (er) return cb() + + var un = encodeURIComponent(username) + var byUser, theUser + switch (argv[2]) { + case 'ls': + // FIXME: there used to be registry completion here, but it stopped + // making sense somewhere around 50,000 packages on the registry + return cb() + + case 'rm': + if (argv.length > 3) { + theUser = encodeURIComponent(argv[3]) + byUser = '-/by-user/' + theUser + '|' + un + return mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + console.error(uri) + npm.registry.get(uri, { auth: auth }, function (er, d) { + if (er) return cb(er) + // return the intersection + return cb(null, d[theUser].filter(function (p) { + // kludge for server adminery. + return un === 'isaacs' || d[un].indexOf(p) === -1 + })) + }) + }) + } + // else fallthrough + /*eslint no-fallthrough:0*/ + case 'add': + if (argv.length > 3) { + theUser = encodeURIComponent(argv[3]) + byUser = '-/by-user/' + theUser + '|' + un + return mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + console.error(uri) + npm.registry.get(uri, { auth: auth }, function (er, d) { + console.error(uri, er || d) + // return mine that they're not already on. + if (er) return cb(er) + var mine = d[un] || [] + var theirs = d[theUser] || [] + return cb(null, mine.filter(function (p) { + return theirs.indexOf(p) === -1 + })) + }) + }) + } + // just list all users who aren't me. + return mapToRegistry('-/users', npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, list) { + if (er) return cb() + return cb(null, Object.keys(list).filter(function (n) { + return n !== un + })) + }) + }) + + default: + return cb() + } + }) +} + +function owner (args, cb) { + var action = args.shift() + switch (action) { + case 'ls': case 'list': return ls(args[0], cb) + case 'add': return add(args[0], args[1], cb) + case 'rm': case 'remove': return rm(args[0], args[1], cb) + default: return unknown(action, cb) + } +} + +function ls (pkg, cb) { + if (!pkg) { + return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(owner.usage) + ls(pkg, cb) + }) + } + + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, data) { + var msg = '' + if (er) { + log.error('owner ls', "Couldn't get owner data", pkg) + return cb(er) + } + var owners = data.maintainers + if (!owners || !owners.length) { + msg = 'admin party!' + } else { + msg = owners.map(function (o) { + return o.name + ' <' + o.email + '>' + }).join('\n') + } + output(msg) + cb(er, owners) + }) + }) +} + +function add (user, pkg, cb) { + if (!user) return cb(owner.usage) + if (!pkg) { + return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(new Error(owner.usage)) + add(user, pkg, cb) + }) + } + + log.verbose('owner add', '%s to %s', user, pkg) + mutate(pkg, user, function (u, owners) { + if (!owners) owners = [] + for (var i = 0, l = owners.length; i < l; i++) { + var o = owners[i] + if (o.name === u.name) { + log.info( + 'owner add', + 'Already a package owner: ' + o.name + ' <' + o.email + '>' + ) + return false + } + } + owners.push(u) + return owners + }, cb) +} + +function rm (user, pkg, cb) { + if (!pkg) { + return readLocalPkg(function (er, pkg) { + if (er) return cb(er) + if (!pkg) return cb(new Error(owner.usage)) + rm(user, pkg, cb) + }) + } + + log.verbose('owner rm', '%s from %s', user, pkg) + mutate(pkg, user, function (u, owners) { + var found = false + var m = owners.filter(function (o) { + var match = (o.name === user) + found = found || match + return !match + }) + + if (!found) { + log.info('owner rm', 'Not a package owner: ' + user) + return false + } + + if (!m.length) { + return new Error( + 'Cannot remove all owners of a package. Add someone else first.' + ) + } + + return m + }, cb) +} + +function mutate (pkg, user, mutation, cb) { + if (user) { + var byUser = '-/user/org.couchdb.user:' + user + mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, mutate_) + }) + } else { + mutate_(null, null) + } + + function mutate_ (er, u) { + if (!er && user && (!u || u.error)) { + er = new Error( + "Couldn't get user data for " + user + ': ' + JSON.stringify(u) + ) + } + + if (er) { + log.error('owner mutate', 'Error getting user data for %s', user) + return cb(er) + } + + if (u) u = { name: u.name, email: u.email } + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, data) { + if (er) { + log.error('owner mutate', 'Error getting package data for %s', pkg) + return cb(er) + } + + // save the number of maintainers before mutation so that we can figure + // out if maintainers were added or removed + var beforeMutation = data.maintainers.length + + var m = mutation(u, data.maintainers) + if (!m) return cb() // handled + if (m instanceof Error) return cb(m) // error + + data = { + _id: data._id, + _rev: data._rev, + maintainers: m + } + var dataPath = pkg.replace('/', '%2f') + '/-rev/' + data._rev + mapToRegistry(dataPath, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + method: 'PUT', + body: data, + auth: auth + } + npm.registry.request(uri, params, function (er, data) { + if (!er && data.error) { + er = new Error('Failed to update package metadata: ' + JSON.stringify(data)) + } + + if (er) { + log.error('owner mutate', 'Failed to update package metadata') + } else if (m.length > beforeMutation) { + output('+ %s (%s)', user, pkg) + } else if (m.length < beforeMutation) { + output('- %s (%s)', user, pkg) + } + + cb(er, data) + }) + }) + }) + }) + } +} + +function unknown (action, cb) { + cb('Usage: \n' + owner.usage) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/pack.js b/bin/nodejs6.7.0/node_modules/npm/lib/pack.js new file mode 100644 index 00000000..4ed8c4e6 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/pack.js @@ -0,0 +1,73 @@ +// npm pack +// Packs the specified package into a .tgz file, which can then +// be installed. + +module.exports = pack + +var install = require('./install.js') +var cache = require('./cache.js') +var fs = require('graceful-fs') +var chain = require('slide').chain +var path = require('path') +var cwd = process.cwd() +var writeStreamAtomic = require('fs-write-stream-atomic') +var cachedPackageRoot = require('./cache/cached-package-root.js') +var output = require('./utils/output.js') + +pack.usage = 'npm pack [[<@scope>/]...]' + +// if it can be installed, it can be packed. +pack.completion = install.completion + +function pack (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + if (args.length === 0) args = ['.'] + + chain( + args.map(function (arg) { return function (cb) { pack_(arg, cb) } }), + function (er, files) { + if (er || silent) return cb(er, files) + printFiles(files, cb) + } + ) +} + +function printFiles (files, cb) { + files = files.map(function (file) { + return path.relative(cwd, file) + }) + output(files.join('\n')) + cb() +} + +// add to cache, then cp to the cwd +function pack_ (pkg, cb) { + cache.add(pkg, null, null, false, function (er, data) { + if (er) return cb(er) + + // scoped packages get special treatment + var name = data.name + if (name[0] === '@') name = name.substr(1).replace(/\//g, '-') + var fname = name + '-' + data.version + '.tgz' + + var cached = path.join(cachedPackageRoot(data), 'package.tgz') + var from = fs.createReadStream(cached) + var to = writeStreamAtomic(fname) + var errState = null + + from.on('error', cb_) + to.on('error', cb_) + to.on('close', cb_) + from.pipe(to) + + function cb_ (er) { + if (errState) return + if (er) return cb(errState = er) + cb(null, fname) + } + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/ping.js b/bin/nodejs6.7.0/node_modules/npm/lib/ping.js new file mode 100644 index 00000000..d891dfff --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/ping.js @@ -0,0 +1,21 @@ +var npm = require('./npm.js') +var output = require('./utils/output.js') + +module.exports = ping + +ping.usage = 'npm ping\nping registry' + +function ping (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + var registry = npm.config.get('registry') + if (!registry) return cb(new Error('no default registry set')) + var auth = npm.config.getCredentialsByURI(registry) + + npm.registry.ping(registry, {auth: auth}, function (er, pong) { + if (!silent) output(JSON.stringify(pong)) + cb(er, er ? null : pong) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/prefix.js b/bin/nodejs6.7.0/node_modules/npm/lib/prefix.js new file mode 100644 index 00000000..c33ff4fe --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/prefix.js @@ -0,0 +1,15 @@ +module.exports = prefix + +var npm = require('./npm.js') +var output = require('./utils/output.js') + +prefix.usage = 'npm prefix [-g]' + +function prefix (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + if (!silent) output(npm.prefix) + process.nextTick(cb.bind(this, null, npm.prefix)) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/prune.js b/bin/nodejs6.7.0/node_modules/npm/lib/prune.js new file mode 100644 index 00000000..f74aab82 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/prune.js @@ -0,0 +1,54 @@ +// prune extraneous packages. + +module.exports = prune + +prune.usage = 'npm prune [[<@scope>/]...] [--production]' + +var readInstalled = require('read-installed') +var npm = require('./npm.js') +var path = require('path') +var readJson = require('read-package-json') +var log = require('npmlog') + +prune.completion = require('./utils/completion/installed-deep.js') + +function prune (args, cb) { + // check if is a valid package.json file + var jsonFile = path.resolve(npm.dir, '..', 'package.json') + readJson(jsonFile, log.warn, function (er) { + if (er) return cb(er) + next() + }) + + function next () { + var opt = { + depth: npm.config.get('depth'), + dev: !npm.config.get('production') || npm.config.get('dev') + } + readInstalled(npm.prefix, opt, function (er, data) { + if (er) return cb(er) + prune_(args, data, cb) + }) + } +} + +function prune_ (args, data, cb) { + npm.commands.unbuild(prunables(args, data, []), cb) +} + +function prunables (args, data, seen) { + var deps = data.dependencies || {} + return Object.keys(deps).map(function (d) { + if (typeof deps[d] !== 'object' || seen.indexOf(deps[d]) !== -1) return null + seen.push(deps[d]) + if (deps[d].extraneous && (args.length === 0 || args.indexOf(d) !== -1)) { + var extra = deps[d] + delete deps[d] + return extra.path + } + return prunables(args, deps[d], seen) + }).filter(function (d) { return d !== null }) + .reduce(function FLAT (l, r) { + return l.concat(Array.isArray(r) ? r.reduce(FLAT, []) : r) + }, []) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/publish.js b/bin/nodejs6.7.0/node_modules/npm/lib/publish.js new file mode 100644 index 00000000..9033c39c --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/publish.js @@ -0,0 +1,155 @@ + +module.exports = publish + +var npm = require('./npm.js') +var log = require('npmlog') +var path = require('path') +var readJson = require('read-package-json') +var lifecycle = require('./utils/lifecycle.js') +var chain = require('slide').chain +var mapToRegistry = require('./utils/map-to-registry.js') +var cachedPackageRoot = require('./cache/cached-package-root.js') +var createReadStream = require('graceful-fs').createReadStream +var npa = require('npm-package-arg') +var semver = require('semver') +var getPublishConfig = require('./utils/get-publish-config.js') +var output = require('./utils/output.js') + +publish.usage = 'npm publish [|] [--tag ] [--access ]' + + "\n\nPublishes '.' if no argument supplied" + + '\n\nSets tag `latest` if no --tag specified' + +publish.completion = function (opts, cb) { + // publish can complete to a folder with a package.json + // or a tarball, or a tarball url. + // for now, not yet implemented. + return cb() +} + +function publish (args, isRetry, cb) { + if (typeof cb !== 'function') { + cb = isRetry + isRetry = false + } + if (args.length === 0) args = ['.'] + if (args.length !== 1) return cb(publish.usage) + + log.verbose('publish', args) + + var t = npm.config.get('tag').trim() + if (semver.validRange(t)) { + var er = new Error('Tag name must not be a valid SemVer range: ' + t) + return cb(er) + } + + var arg = args[0] + // if it's a local folder, then run the prepublish there, first. + readJson(path.resolve(arg, 'package.json'), function (er, data) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + + if (data) { + if (!data.name) return cb(new Error('No name provided')) + if (!data.version) return cb(new Error('No version provided')) + } + + // Error is OK. Could be publishing a URL or tarball, however, that means + // that we will not have automatically run the prepublish script, since + // that gets run when adding a folder to the cache. + if (er) return cacheAddPublish(arg, false, isRetry, cb) + else cacheAddPublish(arg, true, isRetry, cb) + }) +} + +// didPre in this case means that we already ran the prepublish script, +// and that the 'dir' is an actual directory, and not something silly +// like a tarball or name@version thing. +// That means that we can run publish/postpublish in the dir, rather than +// in the cache dir. +function cacheAddPublish (dir, didPre, isRetry, cb) { + npm.commands.cache.add(dir, null, null, false, function (er, data) { + if (er) return cb(er) + log.silly('publish', data) + var cachedir = path.resolve(cachedPackageRoot(data), 'package') + chain( + [ + !didPre && [lifecycle, data, 'prepublish', cachedir], + [publish_, dir, data, isRetry, cachedir], + [lifecycle, data, 'publish', didPre ? dir : cachedir], + [lifecycle, data, 'postpublish', didPre ? dir : cachedir] + ], + cb + ) + }) +} + +function publish_ (arg, data, isRetry, cachedir, cb) { + if (!data) return cb(new Error('no package.json file found')) + + var mappedConfig = getPublishConfig( + data.publishConfig, + npm.config, + npm.registry + ) + var config = mappedConfig.config + var registry = mappedConfig.client + + data._npmVersion = npm.version + data._nodeVersion = process.versions.node + + delete data.modules + if (data.private) { + return cb(new Error( + 'This package has been marked as private\n' + + "Remove the 'private' field from the package.json to publish it." + )) + } + + mapToRegistry(data.name, config, function (er, registryURI, auth, registryBase) { + if (er) return cb(er) + + var tarballPath = cachedir + '.tgz' + + // we just want the base registry URL in this case + log.verbose('publish', 'registryBase', registryBase) + log.silly('publish', 'uploading', tarballPath) + + data._npmUser = { + name: auth.username, + email: auth.email + } + + var params = { + metadata: data, + body: createReadStream(tarballPath), + auth: auth + } + + // registry-frontdoor cares about the access level, which is only + // configurable for scoped packages + if (config.get('access')) { + if (!npa(data.name).scope && config.get('access') === 'restricted') { + return cb(new Error("Can't restrict access to unscoped packages.")) + } + + params.access = config.get('access') + } + + log.showProgress('publish:' + data._id) + registry.publish(registryBase, params, function (er) { + if (er && er.code === 'EPUBLISHCONFLICT' && + npm.config.get('force') && !isRetry) { + log.warn('publish', 'Forced publish over ' + data._id) + return npm.commands.unpublish([data._id], function (er) { + // ignore errors. Use the force. Reach out with your feelings. + // but if it fails again, then report the first error. + publish([arg], er || true, cb) + }) + } + // report the unpublish error if this was a retry and unpublish failed + if (er && isRetry && isRetry !== true) return cb(isRetry) + if (er) return cb(er) + output('+ ' + data._id) + cb() + }) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/rebuild.js b/bin/nodejs6.7.0/node_modules/npm/lib/rebuild.js new file mode 100644 index 00000000..f80ce5e0 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/rebuild.js @@ -0,0 +1,78 @@ + +module.exports = rebuild + +var readInstalled = require('read-installed') +var semver = require('semver') +var log = require('npmlog') +var npm = require('./npm.js') +var npa = require('npm-package-arg') +var usage = require('./utils/usage') +var output = require('./utils/output.js') + +rebuild.usage = usage( + 'rebuild', + 'npm rebuild [[<@scope>/]...]' +) + +rebuild.completion = require('./utils/completion/installed-deep.js') + +function rebuild (args, cb) { + var opt = { depth: npm.config.get('depth'), dev: true } + readInstalled(npm.prefix, opt, function (er, data) { + log.info('readInstalled', typeof data) + if (er) return cb(er) + var set = filter(data, args) + var folders = Object.keys(set).filter(function (f) { + return f !== npm.prefix + }) + if (!folders.length) return cb() + log.silly('rebuild set', folders) + cleanBuild(folders, set, cb) + }) +} + +function cleanBuild (folders, set, cb) { + npm.commands.build(folders, function (er) { + if (er) return cb(er) + output(folders.map(function (f) { + return set[f] + ' ' + f + }).join('\n')) + cb() + }) +} + +function filter (data, args, set, seen) { + if (!set) set = {} + if (!seen) seen = {} + if (set.hasOwnProperty(data.path)) return set + if (seen.hasOwnProperty(data.path)) return set + seen[data.path] = true + var pass + if (!args.length) pass = true // rebuild everything + else if (data.name && data._id) { + for (var i = 0, l = args.length; i < l; i++) { + var arg = args[i] + var nv = npa(arg) + var n = nv.name + var v = nv.rawSpec + if (n !== data.name) continue + if (!semver.satisfies(data.version, v, true)) continue + pass = true + break + } + } + if (pass && data._id) { + log.verbose('rebuild', 'path, id', [data.path, data._id]) + set[data.path] = data._id + } + // need to also dive through kids, always. + // since this isn't an install these won't get auto-built unless + // they're not dependencies. + Object.keys(data.dependencies || {}).forEach(function (d) { + // return + var dep = data.dependencies[d] + if (typeof dep === 'string') return + filter(dep, args, set, seen) + }) + return set +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/repo.js b/bin/nodejs6.7.0/node_modules/npm/lib/repo.js new file mode 100644 index 00000000..f5590ed3 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/repo.js @@ -0,0 +1,51 @@ +module.exports = repo + +repo.usage = 'npm repo []' + +var npm = require('./npm.js') +var opener = require('opener') +var hostedGitInfo = require('hosted-git-info') +var url_ = require('url') +var fetchPackageMetadata = require('./fetch-package-metadata.js') + +repo.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function repo (args, cb) { + var n = args.length ? args[0] : '.' + fetchPackageMetadata(n, '.', function (er, d) { + if (er) return cb(er) + getUrlAndOpen(d, cb) + }) +} + +function getUrlAndOpen (d, cb) { + var r = d.repository + if (!r) return cb(new Error('no repository')) + // XXX remove this when npm@v1.3.10 from node 0.10 is deprecated + // from https://github.com/npm/npm-www/issues/418 + var info = hostedGitInfo.fromUrl(r.url) + var url = info ? info.browse() : unknownHostedUrl(r.url) + + if (!url) return cb(new Error('no repository: could not get url')) + + opener(url, { command: npm.config.get('browser') }, cb) +} + +function unknownHostedUrl (url) { + try { + var idx = url.indexOf('@') + if (idx !== -1) { + url = url.slice(idx + 1).replace(/:([^\d]+)/, '/$1') + } + url = url_.parse(url) + var protocol = url.protocol === 'https:' + ? 'https:' + : 'http:' + return protocol + '//' + (url.host || '') + + url.path.replace(/\.git$/, '') + } catch (e) {} +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/restart.js b/bin/nodejs6.7.0/node_modules/npm/lib/restart.js new file mode 100644 index 00000000..576551e5 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/restart.js @@ -0,0 +1 @@ +module.exports = require('./utils/lifecycle.js').cmd('restart') diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/root.js b/bin/nodejs6.7.0/node_modules/npm/lib/root.js new file mode 100644 index 00000000..d93ffd01 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/root.js @@ -0,0 +1,15 @@ +module.exports = root + +var npm = require('./npm.js') +var output = require('./utils/output.js') + +root.usage = 'npm root [-g]' + +function root (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + if (!silent) output(npm.dir) + process.nextTick(cb.bind(this, null, npm.dir)) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/run-script.js b/bin/nodejs6.7.0/node_modules/npm/lib/run-script.js new file mode 100644 index 00000000..deb5a60b --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/run-script.js @@ -0,0 +1,181 @@ +module.exports = runScript + +var lifecycle = require('./utils/lifecycle.js') +var npm = require('./npm.js') +var path = require('path') +var readJson = require('read-package-json') +var log = require('npmlog') +var chain = require('slide').chain +var usage = require('./utils/usage') +var output = require('./utils/output.js') + +runScript.usage = usage( + 'run-script', + 'npm run-script [-- ...]' +) + +runScript.completion = function (opts, cb) { + // see if there's already a package specified. + var argv = opts.conf.argv.remain + + if (argv.length >= 4) return cb() + + if (argv.length === 3) { + // either specified a script locally, in which case, done, + // or a package, in which case, complete against its scripts + var json = path.join(npm.localPrefix, 'package.json') + return readJson(json, function (er, d) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (er) d = {} + var scripts = Object.keys(d.scripts || {}) + console.error('local scripts', scripts) + if (scripts.indexOf(argv[2]) !== -1) return cb() + // ok, try to find out which package it was, then + var pref = npm.config.get('global') ? npm.config.get('prefix') + : npm.localPrefix + var pkgDir = path.resolve(pref, 'node_modules', argv[2], 'package.json') + readJson(pkgDir, function (er, d) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (er) d = {} + var scripts = Object.keys(d.scripts || {}) + return cb(null, scripts) + }) + }) + } + + readJson(path.join(npm.localPrefix, 'package.json'), function (er, d) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + d = d || {} + cb(null, Object.keys(d.scripts || {})) + }) +} + +function runScript (args, cb) { + if (!args.length) return list(cb) + + var pkgdir = npm.localPrefix + var cmd = args.shift() + + readJson(path.resolve(pkgdir, 'package.json'), function (er, d) { + if (er) return cb(er) + run(d, pkgdir, cmd, args, cb) + }) +} + +function list (cb) { + var json = path.join(npm.localPrefix, 'package.json') + var cmdList = [ + 'publish', + 'install', + 'uninstall', + 'test', + 'stop', + 'start', + 'restart', + 'version' + ].reduce(function (l, p) { + return l.concat(['pre' + p, p, 'post' + p]) + }, []) + return readJson(json, function (er, d) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (er) d = {} + var allScripts = Object.keys(d.scripts || {}) + var scripts = [] + var runScripts = [] + allScripts.forEach(function (script) { + if (cmdList.indexOf(script) !== -1) scripts.push(script) + else runScripts.push(script) + }) + + if (log.level === 'silent') { + return cb(null, allScripts) + } + + if (npm.config.get('json')) { + output(JSON.stringify(d.scripts || {}, null, 2)) + return cb(null, allScripts) + } + + if (npm.config.get('parseable')) { + allScripts.forEach(function (script) { + output(script + ':' + d.scripts[script]) + }) + return cb(null, allScripts) + } + + var s = '\n ' + var prefix = ' ' + if (scripts.length) { + output('Lifecycle scripts included in %s:', d.name) + } + scripts.forEach(function (script) { + output(prefix + script + s + d.scripts[script]) + }) + if (!scripts.length && runScripts.length) { + output('Scripts available in %s via `npm run-script`:', d.name) + } else if (runScripts.length) { + output('\navailable via `npm run-script`:') + } + runScripts.forEach(function (script) { + output(prefix + script + s + d.scripts[script]) + }) + return cb(null, allScripts) + }) +} + +function run (pkg, wd, cmd, args, cb) { + if (!pkg.scripts) pkg.scripts = {} + + var cmds + if (cmd === 'restart' && !pkg.scripts.restart) { + cmds = [ + 'prestop', 'stop', 'poststop', + 'restart', + 'prestart', 'start', 'poststart' + ] + } else { + if (!pkg.scripts[cmd]) { + if (cmd === 'test') { + pkg.scripts.test = 'echo \'Error: no test specified\'' + } else if (cmd === 'env') { + if (process.platform === 'win32') { + log.verbose('run-script using default platform env: SET (Windows)') + pkg.scripts[cmd] = 'SET' + } else { + log.verbose('run-script using default platform env: env (Unix)') + pkg.scripts[cmd] = 'env' + } + } else if (npm.config.get('if-present')) { + return cb(null) + } else { + return cb(new Error('missing script: ' + cmd)) + } + } + cmds = [cmd] + } + + if (!cmd.match(/^(pre|post)/)) { + cmds = ['pre' + cmd].concat(cmds).concat('post' + cmd) + } + + log.verbose('run-script', cmds) + chain(cmds.map(function (c) { + // pass cli arguments after -- to script. + if (pkg.scripts[c] && c === cmd) { + pkg.scripts[c] = pkg.scripts[c] + joinArgs(args) + } + + // when running scripts explicitly, assume that they're trusted. + return [lifecycle, pkg, c, wd, true] + }), cb) +} + +// join arguments after '--' and pass them to script, +// handle special characters such as ', ", ' '. +function joinArgs (args) { + var joinedArgs = '' + args.forEach(function (arg) { + joinedArgs += ' "' + arg.replace(/"/g, '\\"') + '"' + }) + return joinedArgs +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/search.js b/bin/nodejs6.7.0/node_modules/npm/lib/search.js new file mode 100644 index 00000000..2b481b5f --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/search.js @@ -0,0 +1,288 @@ + +module.exports = exports = search + +var npm = require('./npm.js') +var columnify = require('columnify') +var updateIndex = require('./cache/update-index.js') +var usage = require('./utils/usage') +var output = require('./utils/output.js') + +search.usage = usage( + 'search', + 'npm search [--long] [search terms ...]' +) + +search.completion = function (opts, cb) { + var compl = {} + var partial = opts.partialWord + var ipartial = partial.toLowerCase() + var plen = partial.length + + // get the batch of data that matches so far. + // this is an example of using npm.commands.search programmatically + // to fetch data that has been filtered by a set of arguments. + search(opts.conf.argv.remain.slice(2), true, function (er, data) { + if (er) return cb(er) + Object.keys(data).forEach(function (name) { + data[name].words.split(' ').forEach(function (w) { + if (w.toLowerCase().indexOf(ipartial) === 0) { + compl[partial + w.substr(plen)] = true + } + }) + }) + cb(null, Object.keys(compl)) + }) +} + +function search (args, silent, staleness, cb) { + if (typeof cb !== 'function') { + cb = staleness + staleness = 600 + } + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + var searchopts = npm.config.get('searchopts') + var searchexclude = npm.config.get('searchexclude') + + if (typeof searchopts !== 'string') searchopts = '' + searchopts = searchopts.split(/\s+/) + var opts = searchopts.concat(args).map(function (s) { + return s.toLowerCase() + }).filter(function (s) { return s }) + + if (opts.length === 0) { + return cb(new Error('search must be called with arguments')) + } + + if (typeof searchexclude === 'string') { + searchexclude = searchexclude.split(/\s+/) + } else { + searchexclude = [] + } + searchexclude = searchexclude.map(function (s) { + return s.toLowerCase() + }) + + getFilteredData(staleness, opts, searchexclude, function (er, data) { + // now data is the list of data that we want to show. + // prettify and print it, and then provide the raw + // data to the cb. + if (er || silent) return cb(er, data) + output(prettify(data, args)) + cb(null, data) + }) +} + +function getFilteredData (staleness, args, notArgs, cb) { + updateIndex(staleness, function (er, data) { + if (er) return cb(er) + return cb(null, filter(data, args, notArgs)) + }) +} + +function filter (data, args, notArgs) { + // data={:{package data}} + return Object.keys(data).map(function (d) { + return data[d] + }).filter(function (d) { + return typeof d === 'object' + }).map(stripData).map(getWords).filter(function (data) { + return filterWords(data, args, notArgs) + }).reduce(function (l, r) { + l[r.name] = r + return l + }, {}) +} + +function stripData (data) { + return { + name: data.name, + description: npm.config.get('description') ? data.description : '', + maintainers: (data.maintainers || []).map(function (m) { + return '=' + m.name + }), + url: !Object.keys(data.versions || {}).length ? data.url : null, + keywords: data.keywords || [], + version: Object.keys(data.versions || {})[0] || [], + time: data.time && + data.time.modified && + (new Date(data.time.modified).toISOString() // remove time + .split('T').join(' ') + .replace(/:[0-9]{2}\.[0-9]{3}Z$/, '')) + .slice(0, -5) || + 'prehistoric' + } +} + +function getWords (data) { + data.words = [ data.name ] + .concat(data.description) + .concat(data.maintainers) + .concat(data.url && ('<' + data.url + '>')) + .concat(data.keywords) + .map(function (f) { return f && f.trim && f.trim() }) + .filter(function (f) { return f }) + .join(' ') + .toLowerCase() + return data +} + +function filterWords (data, args, notArgs) { + var words = data.words + for (var i = 0, l = args.length; i < l; i++) { + if (!match(words, args[i])) return false + } + for (i = 0, l = notArgs.length; i < l; i++) { + if (match(words, notArgs[i])) return false + } + return true +} + +function match (words, arg) { + if (arg.charAt(0) === '/') { + arg = arg.replace(/\/$/, '') + arg = new RegExp(arg.substr(1, arg.length - 1)) + return words.match(arg) + } + return words.indexOf(arg) !== -1 +} + +function prettify (data, args) { + var searchsort = (npm.config.get('searchsort') || 'NAME').toLowerCase() + var sortField = searchsort.replace(/^\-+/, '') + var searchRev = searchsort.charAt(0) === '-' + var truncate = !npm.config.get('long') + + if (Object.keys(data).length === 0) { + return 'No match found for ' + (args.map(JSON.stringify).join(' ')) + } + + var lines = Object.keys(data).map(function (d) { + // strip keyname + return data[d] + }).map(function (dat) { + dat.author = dat.maintainers + delete dat.maintainers + dat.date = dat.time + delete dat.time + return dat + }).map(function (dat) { + // split keywords on whitespace or , + if (typeof dat.keywords === 'string') { + dat.keywords = dat.keywords.split(/[,\s]+/) + } + if (Array.isArray(dat.keywords)) { + dat.keywords = dat.keywords.join(' ') + } + + // split author on whitespace or , + if (typeof dat.author === 'string') { + dat.author = dat.author.split(/[,\s]+/) + } + if (Array.isArray(dat.author)) { + dat.author = dat.author.join(' ') + } + return dat + }) + + lines.sort(function (a, b) { + var aa = a[sortField].toLowerCase() + var bb = b[sortField].toLowerCase() + return aa === bb ? 0 + : aa < bb ? -1 : 1 + }) + + if (searchRev) lines.reverse() + + var columns = npm.config.get('description') + ? ['name', 'description', 'author', 'date', 'version', 'keywords'] + : ['name', 'author', 'date', 'version', 'keywords'] + + var output = columnify( + lines, + { + include: columns, + truncate: truncate, + config: { + name: { maxWidth: 40, truncate: false, truncateMarker: '' }, + description: { maxWidth: 60 }, + author: { maxWidth: 20 }, + date: { maxWidth: 11 }, + version: { maxWidth: 11 }, + keywords: { maxWidth: Infinity } + } + } + ) + output = trimToMaxWidth(output) + output = highlightSearchTerms(output, args) + + return output +} + +var colors = [31, 33, 32, 36, 34, 35] +var cl = colors.length + +function addColorMarker (str, arg, i) { + var m = i % cl + 1 + var markStart = String.fromCharCode(m) + var markEnd = String.fromCharCode(0) + + if (arg.charAt(0) === '/') { + return str.replace( + new RegExp(arg.substr(1, arg.length - 2), 'gi'), + function (bit) { return markStart + bit + markEnd } + ) + } + + // just a normal string, do the split/map thing + var pieces = str.toLowerCase().split(arg.toLowerCase()) + var p = 0 + + return pieces.map(function (piece) { + piece = str.substr(p, piece.length) + var mark = markStart + + str.substr(p + piece.length, arg.length) + + markEnd + p += piece.length + arg.length + return piece + mark + }).join('') +} + +function colorize (line) { + for (var i = 0; i < cl; i++) { + var m = i + 1 + var color = npm.color ? '\u001B[' + colors[i] + 'm' : '' + line = line.split(String.fromCharCode(m)).join(color) + } + var uncolor = npm.color ? '\u001B[0m' : '' + return line.split('\u0000').join(uncolor) +} + +function getMaxWidth () { + var cols + try { + var tty = require('tty') + var stdout = process.stdout + cols = !tty.isatty(stdout.fd) ? Infinity : process.stdout.getWindowSize()[0] + cols = (cols === 0) ? Infinity : cols + } catch (ex) { cols = Infinity } + return cols +} + +function trimToMaxWidth (str) { + var maxWidth = getMaxWidth() + return str.split('\n').map(function (line) { + return line.slice(0, maxWidth) + }).join('\n') +} + +function highlightSearchTerms (str, terms) { + terms.forEach(function (arg, i) { + str = addColorMarker(str, arg, i) + }) + + return colorize(str).trim() +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/set.js b/bin/nodejs6.7.0/node_modules/npm/lib/set.js new file mode 100644 index 00000000..ccd63c71 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/set.js @@ -0,0 +1,13 @@ + +module.exports = set + +set.usage = 'npm set (See `npm config`)' + +var npm = require('./npm.js') + +set.completion = npm.commands.config.completion + +function set (args, cb) { + if (!args.length) return cb(set.usage) + npm.commands.config(['set'].concat(args), cb) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/shrinkwrap.js b/bin/nodejs6.7.0/node_modules/npm/lib/shrinkwrap.js new file mode 100644 index 00000000..1e89a35d --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/shrinkwrap.js @@ -0,0 +1,145 @@ +// emit JSON describing versions of all packages currently installed (for later +// use with shrinkwrap install) + +module.exports = exports = shrinkwrap + +var path = require('path') +var log = require('npmlog') +var writeFileAtomic = require('write-file-atomic') +var iferr = require('iferr') +var readPackageJson = require('read-package-json') +var readPackageTree = require('read-package-tree') +var validate = require('aproba') +var chain = require('slide').chain +var npm = require('./npm.js') +var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var validatePeerDeps = require('./install/deps.js').validatePeerDeps +var isExtraneous = require('./install/is-extraneous.js') +var isOnlyDev = require('./install/is-dev.js').isOnlyDev +var packageId = require('./utils/package-id.js') +var moduleName = require('./utils/module-name.js') +var output = require('./utils/output.js') +var lifecycle = require('./utils/lifecycle.js') + +shrinkwrap.usage = 'npm shrinkwrap' + +function shrinkwrap (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + if (args.length) { + log.warn('shrinkwrap', "doesn't take positional args") + } + + var dir = path.resolve(npm.dir, '..') + var packagePath = path.join(npm.localPrefix, 'package.json') + npm.config.set('production', true) + + readPackageJson(packagePath, iferr(cb, function (data) { + lifecycle(data, 'preshrinkwrap', function () { + readPackageTree(dir, andRecalculateMetadata(iferr(cb, function (tree) { + var pkginfo = treeToShrinkwrap(tree, !!npm.config.get('dev') || /^dev(elopment)?$/.test(npm.config.get('also'))) + + chain([ + [lifecycle, tree.package, 'shrinkwrap'], + [shrinkwrap_, pkginfo, silent], + [lifecycle, tree.package, 'postshrinkwrap'] + ], iferr(cb, function (data) { + cb(null, data[0]) + })) + }))) + }) + })) +} + +function andRecalculateMetadata (next) { + validate('F', arguments) + return function (er, tree) { + validate('EO', arguments) + if (er) return next(er) + recalculateMetadata(tree, log, next) + } +} + +function treeToShrinkwrap (tree, dev) { + validate('OB', arguments) + var pkginfo = {} + if (tree.package.name) pkginfo.name = tree.package.name + if (tree.package.version) pkginfo.version = tree.package.version + var problems = [] + if (tree.children.length) { + shrinkwrapDeps(dev, problems, pkginfo.dependencies = {}, tree) + } + if (problems.length) pkginfo.problems = problems + return pkginfo +} + +function shrinkwrapDeps (dev, problems, deps, tree, seen) { + validate('BAOO', [dev, problems, deps, tree]) + if (!seen) seen = {} + if (seen[tree.path]) return + seen[tree.path] = true + Object.keys(tree.missingDeps).forEach(function (name) { + var invalid = tree.children.filter(function (dep) { return moduleName(dep) === name })[0] + if (invalid) { + problems.push('invalid: have ' + invalid.package._id + ' (expected: ' + tree.missingDeps[name] + ') ' + invalid.path) + } else if (!tree.package.optionalDependencies || !tree.package.optionalDependencies[name]) { + var topname = packageId(tree) + problems.push('missing: ' + name + '@' + tree.package.dependencies[name] + + (topname ? ', required by ' + topname : '')) + } + }) + tree.children.sort(function (aa, bb) { return moduleName(aa).localeCompare(moduleName(bb)) }).forEach(function (child) { + if (!dev && isOnlyDev(child)) { + log.warn('shrinkwrap', 'Excluding devDependency: %s', packageId(child), child.parent.package.dependencies) + return + } + var pkginfo = deps[moduleName(child)] = {} + pkginfo.version = child.package.version + pkginfo.from = child.package._from + pkginfo.resolved = child.package._resolved + if (isExtraneous(child)) { + problems.push('extraneous: ' + child.package._id + ' ' + child.path) + } + validatePeerDeps(child, function (tree, pkgname, version) { + problems.push('peer invalid: ' + pkgname + '@' + version + + ', required by ' + child.package._id) + }) + if (child.children.length) { + shrinkwrapDeps(dev, problems, pkginfo.dependencies = {}, child, seen) + } + }) +} + +function shrinkwrap_ (pkginfo, silent, cb) { + if (pkginfo.problems) { + return cb(new Error('Problems were encountered\n' + + 'Please correct and try again.\n' + + pkginfo.problems.join('\n'))) + } + + save(pkginfo, silent, cb) +} + +function save (pkginfo, silent, cb) { + // copy the keys over in a well defined order + // because javascript objects serialize arbitrarily + var swdata + try { + swdata = JSON.stringify(pkginfo, null, 2) + '\n' + } catch (er) { + log.error('shrinkwrap', 'Error converting package info to json') + return cb(er) + } + + var file = path.resolve(npm.prefix, 'npm-shrinkwrap.json') + + writeFileAtomic(file, swdata, function (er) { + if (er) return cb(er) + if (silent) return cb(null, pkginfo) + output('wrote npm-shrinkwrap.json') + cb(null, pkginfo) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/star.js b/bin/nodejs6.7.0/node_modules/npm/lib/star.js new file mode 100644 index 00000000..80446f6b --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/star.js @@ -0,0 +1,45 @@ +module.exports = star + +var npm = require('./npm.js') +var log = require('npmlog') +var asyncMap = require('slide').asyncMap +var mapToRegistry = require('./utils/map-to-registry.js') +var usage = require('./utils/usage') +var output = require('./utils/output.js') + +star.usage = usage( + 'star', + 'npm star [...]\n' + + 'npm unstar [...]' +) + +star.completion = function (opts, cb) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + cb() +} + +function star (args, cb) { + if (!args.length) return cb(star.usage) + var s = npm.config.get('unicode') ? '\u2605 ' : '(*)' + var u = npm.config.get('unicode') ? '\u2606 ' : '( )' + var using = !(npm.command.match(/^un/)) + if (!using) s = u + asyncMap(args, function (pkg, cb) { + mapToRegistry(pkg, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + starred: using, + auth: auth + } + npm.registry.star(uri, params, function (er, data, raw, req) { + if (!er) { + output(s + ' ' + pkg) + log.verbose('star', data) + } + cb(er, data, raw, req) + }) + }) + }, cb) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/stars.js b/bin/nodejs6.7.0/node_modules/npm/lib/stars.js new file mode 100644 index 00000000..811828bd --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/stars.js @@ -0,0 +1,47 @@ +module.exports = stars + +stars.usage = 'npm stars []' + +var npm = require('./npm.js') +var log = require('npmlog') +var mapToRegistry = require('./utils/map-to-registry.js') +var output = require('./utils/output.js') + +function stars (args, cb) { + npm.commands.whoami([], true, function (er, username) { + var name = args.length === 1 ? args[0] : username + + if (er) { + if (er.code === 'ENEEDAUTH' && !name) { + var needAuth = new Error("'npm stars' on your own user account requires auth") + needAuth.code = 'ENEEDAUTH' + return cb(needAuth) + } + + if (er.code !== 'ENEEDAUTH') return cb(er) + } + + mapToRegistry('', npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + username: name, + auth: auth + } + npm.registry.stars(uri, params, showstars) + }) + }) + + function showstars (er, data) { + if (er) return cb(er) + + if (data.rows.length === 0) { + log.warn('stars', 'user has not starred any packages.') + } else { + data.rows.forEach(function (a) { + output(a.value) + }) + } + cb() + } +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/start.js b/bin/nodejs6.7.0/node_modules/npm/lib/start.js new file mode 100644 index 00000000..67e015ee --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/start.js @@ -0,0 +1 @@ +module.exports = require('./utils/lifecycle.js').cmd('start') diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/stop.js b/bin/nodejs6.7.0/node_modules/npm/lib/stop.js new file mode 100644 index 00000000..65d77be3 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/stop.js @@ -0,0 +1 @@ +module.exports = require('./utils/lifecycle.js').cmd('stop') diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/substack.js b/bin/nodejs6.7.0/node_modules/npm/lib/substack.js new file mode 100644 index 00000000..3128cc9e --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/substack.js @@ -0,0 +1,22 @@ +module.exports = substack +var npm = require('./npm.js') +var output = require('./utils/output.js') + +var isms = [ + '\u001b[32mbeep \u001b[35mboop\u001b[m', + 'Replace your configs with services', + 'SEPARATE ALL THE CONCERNS!', + 'MODULE ALL THE THINGS!', + '\\o/', + 'but first, burritos', + 'full time mad scientist here', + 'c/,,\\' +] + +function substack (args, cb) { + var i = Math.floor(Math.random() * isms.length) + output(isms[i]) + var c = args.shift() + if (c) npm.commands[c](args, cb) + else cb() +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/tag.js b/bin/nodejs6.7.0/node_modules/npm/lib/tag.js new file mode 100644 index 00000000..332ece86 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/tag.js @@ -0,0 +1,42 @@ +// turns out tagging isn't very complicated +// all the smarts are in the couch. +module.exports = tag +tag.usage = '[DEPRECATED] npm tag @ []' + + '\nSee `dist-tag`' + +tag.completion = require('./unpublish.js').completion + +var npm = require('./npm.js') +var mapToRegistry = require('./utils/map-to-registry.js') +var npa = require('npm-package-arg') +var semver = require('semver') +var log = require('npmlog') + +function tag (args, cb) { + var thing = npa(args.shift() || '') + var project = thing.name + var version = thing.rawSpec + var t = args.shift() || npm.config.get('tag') + + t = t.trim() + + if (!project || !version || !t) return cb('Usage:\n' + tag.usage) + + if (semver.validRange(t)) { + var er = new Error('Tag name must not be a valid SemVer range: ' + t) + return cb(er) + } + + log.warn('tag', 'This command is deprecated. Use `npm dist-tag` instead.') + + mapToRegistry(project, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version: version, + tag: t, + auth: auth + } + npm.registry.tag(uri, params, cb) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/team.js b/bin/nodejs6.7.0/node_modules/npm/lib/team.js new file mode 100644 index 00000000..2afed422 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/team.js @@ -0,0 +1,55 @@ +var mapToRegistry = require('./utils/map-to-registry.js') +var npm = require('./npm') +var output = require('./utils/output.js') + +module.exports = team + +team.subcommands = ['create', 'destroy', 'add', 'rm', 'ls', 'edit'] + +team.usage = + 'npm team create \n' + + 'npm team destroy \n' + + 'npm team add \n' + + 'npm team rm \n' + + 'npm team ls |\n' + + 'npm team edit ' + +team.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + if (argv.length === 2) { + return cb(null, team.subcommands) + } + switch (argv[2]) { + case 'ls': + case 'create': + case 'destroy': + case 'add': + case 'rm': + case 'edit': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function team (args, cb) { + // Entities are in the format : + var cmd = args.shift() + var entity = (args.shift() || '').split(':') + return mapToRegistry('/', npm.config, function (err, uri, auth) { + if (err) { return cb(err) } + try { + return npm.registry.team(cmd, uri, { + auth: auth, + scope: entity[0], + team: entity[1], + user: args.shift() + }, function (err, data) { + !err && data && output(JSON.stringify(data, undefined, 2)) + cb(err, data) + }) + } catch (e) { + cb(e.message + '\n\nUsage:\n' + team.usage) + } + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/test.js b/bin/nodejs6.7.0/node_modules/npm/lib/test.js new file mode 100644 index 00000000..fbbebd88 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/test.js @@ -0,0 +1,13 @@ +module.exports = test + +var testCmd = require('./utils/lifecycle.js').cmd('test') + +function test (args, cb) { + testCmd(args, function (er) { + if (!er) return cb() + if (er.code === 'ELIFECYCLE') { + return cb('Test failed. See above for more details.') + } + return cb(er) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/unbuild.js b/bin/nodejs6.7.0/node_modules/npm/lib/unbuild.js new file mode 100644 index 00000000..16baa05c --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/unbuild.js @@ -0,0 +1,130 @@ +module.exports = unbuild +module.exports.rmStuff = rmStuff +unbuild.usage = 'npm unbuild \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') + +// args is a list of folders. +// remove any bins/etc, and then delete the folder. +function unbuild (args, silent, cb) { + if (typeof silent === 'function') { + cb = silent + silent = false + } + asyncMap(args, unbuild_(silent), cb) +} + +function unbuild_ (silent) { + return function (folder, cb_) { + function cb (er) { + cb_(er, path.relative(npm.root, folder)) + } + folder = path.resolve(folder) + var 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) { + // if no json, then just trash it, but no scripts or whatever. + if (er) return gentlyRm(folder, false, base, cb) + chain( + [ + [lifecycle, pkg, 'preuninstall', folder, false, true], + [lifecycle, pkg, 'uninstall', folder, false, true], + !silent && function (cb) { + output('unbuild ' + pkg._id) + cb() + }, + [rmStuff, pkg, folder], + [lifecycle, pkg, 'postuninstall', folder, false, true], + [gentlyRm, folder, false, base] + ], + cb + ) + }) + } +} + +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 parent = pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder) + var gnm = npm.dir + var top = gnm === parent + + log.verbose('unbuild rmStuff', pkg._id, 'from', gnm) + if (!top) log.verbose('unbuild rmStuff', 'in', parent) + asyncMap([rmBins, rmMans], function (fn, cb) { + fn(pkg, folder, parent, top, cb) + }, cb) +} + +function rmBins (pkg, folder, parent, top, cb) { + if (!pkg.bin) return cb() + var 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], + [gentlyRm, path.resolve(binRoot, b), true, folder] ], cb) + } else { + gentlyRm(path.resolve(binRoot, b), true, folder, cb) + } + }, gentlyRmBinRoot) + + function gentlyRmBinRoot (err) { + if (err || top) return cb(err) + return gentlyRm(binRoot, true, parent, cb) + } +} + +function rmMans (pkg, folder, parent, top, cb) { + if (!pkg.man || + !top || + process.platform === 'win32' || + !npm.config.get('global')) { + return cb() + } + var 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)) { + man.forEach(rmMan) + } else { + rmMan(man) + } + + function rmMan (man) { + log.silly('rmMan', 'preparing to remove', man) + var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/) + if (!parseMan) { + log.error( + 'rmMan', man, 'is not a valid name for a man file.', + 'Man files must end with a number, ' + + 'and optionally a .gz suffix if they are compressed.' + ) + return cb() + } + + var stem = parseMan[1] + var sxn = parseMan[2] + var gz = parseMan[3] || '' + var bn = path.basename(stem) + var manDest = path.join( + manRoot, + 'man' + sxn, + (bn.indexOf(pkg.name) === 0 ? bn : pkg.name + '-' + bn) + '.' + sxn + gz + ) + gentlyRm(manDest, true, cb) + } + }, cb) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/uninstall.js b/bin/nodejs6.7.0/node_modules/npm/lib/uninstall.js new file mode 100644 index 00000000..3e9a0451 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/uninstall.js @@ -0,0 +1,76 @@ +'use strict' +// remove a package. + +module.exports = uninstall +module.exports.Uninstaller = Uninstaller + +var util = require('util') +var path = require('path') +var validate = require('aproba') +var chain = require('slide').chain +var readJson = require('read-package-json') +var npm = require('./npm.js') +var Installer = require('./install.js').Installer +var getSaveType = require('./install/save.js').getSaveType +var removeDeps = require('./install/deps.js').removeDeps +var loadExtraneous = require('./install/deps.js').loadExtraneous +var log = require('npmlog') +var usage = require('./utils/usage') + +uninstall.usage = usage( + 'uninstall', + 'npm uninstall [<@scope>/][@]... [--save|--save-dev|--save-optional]' +) + +uninstall.completion = require('./utils/completion/installed-shallow.js') + +function uninstall (args, cb) { + validate('AF', arguments) + // the /path/to/node_modules/.. + var dryrun = !!npm.config.get('dry-run') + + if (args.length === 1 && args[0] === '.') args = [] + args = args.filter(function (a) { + return path.resolve(a) !== where + }) + + var where = npm.config.get('global') || !args.length + ? path.resolve(npm.globalDir, '..') + : npm.prefix + + if (args.length) { + new Uninstaller(where, dryrun, args).run(cb) + } else { + // remove this package from the global space, if it's installed there + readJson(path.resolve(npm.localPrefix, 'package.json'), function (er, pkg) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (er) return cb(uninstall.usage) + new Uninstaller(where, dryrun, [pkg.name]).run(cb) + }) + } +} + +function Uninstaller (where, dryrun, args) { + validate('SBA', arguments) + Installer.call(this, where, dryrun, args) +} +util.inherits(Uninstaller, Installer) + +Uninstaller.prototype.loadArgMetadata = function (next) { + this.args = this.args.map(function (arg) { return {name: arg} }) + next() +} + +Uninstaller.prototype.loadAllDepsIntoIdealTree = function (cb) { + validate('F', arguments) + log.silly('uninstall', 'loadAllDepsIntoIdealtree') + var saveDeps = getSaveType(this.args) + + var cg = this.progress.loadAllDepsIntoIdealTree + var steps = [] + + steps.push( + [removeDeps, this.args, this.idealTree, saveDeps, cg.newGroup('removeDeps')], + [loadExtraneous, this.idealTree, cg.newGroup('loadExtraneous')]) + chain(steps, cb) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/unpublish.js b/bin/nodejs6.7.0/node_modules/npm/lib/unpublish.js new file mode 100644 index 00000000..16c1b7de --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/unpublish.js @@ -0,0 +1,118 @@ + +module.exports = unpublish + +var log = require('npmlog') +var npm = require('./npm.js') +var readJson = require('read-package-json') +var path = require('path') +var mapToRegistry = require('./utils/map-to-registry.js') +var npa = require('npm-package-arg') +var getPublishConfig = require('./utils/get-publish-config.js') +var output = require('./utils/output.js') + +unpublish.usage = 'npm unpublish [<@scope>/][@]' + +unpublish.completion = function (opts, cb) { + if (opts.conf.argv.remain.length >= 3) return cb() + npm.commands.whoami([], true, function (er, username) { + if (er) return cb() + + var un = encodeURIComponent(username) + if (!un) return cb() + var byUser = '-/by-user/' + un + mapToRegistry(byUser, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, pkgs) { + // do a bit of filtering at this point, so that we don't need + // to fetch versions for more than one thing, but also don't + // accidentally a whole project. + pkgs = pkgs[un] + if (!pkgs || !pkgs.length) return cb() + var pp = npa(opts.partialWord).name + pkgs = pkgs.filter(function (p) { + return p.indexOf(pp) === 0 + }) + if (pkgs.length > 1) return cb(null, pkgs) + mapToRegistry(pkgs[0], npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, d) { + if (er) return cb(er) + var vers = Object.keys(d.versions) + if (!vers.length) return cb(null, pkgs) + return cb(null, vers.map(function (v) { + return pkgs[0] + '@' + v + })) + }) + }) + }) + }) + }) +} + +function unpublish (args, cb) { + if (args.length > 1) return cb(unpublish.usage) + + var thing = args.length ? npa(args[0]) : {} + var project = thing.name + var version = thing.rawSpec + + log.silly('unpublish', 'args[0]', args[0]) + log.silly('unpublish', 'thing', thing) + if (!version && !npm.config.get('force')) { + return cb( + 'Refusing to delete entire project.\n' + + 'Run with --force to do this.\n' + + unpublish.usage + ) + } + + if (!project || path.resolve(project) === npm.localPrefix) { + // if there's a package.json in the current folder, then + // read the package name and version out of that. + var cwdJson = path.join(npm.localPrefix, 'package.json') + return readJson(cwdJson, function (er, data) { + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (er) return cb('Usage:\n' + unpublish.usage) + log.verbose('unpublish', data) + gotProject(data.name, data.version, data.publishConfig, cb) + }) + } + return gotProject(project, version, cb) +} + +function gotProject (project, version, publishConfig, cb_) { + if (typeof cb_ !== 'function') { + cb_ = publishConfig + publishConfig = null + } + + function cb (er) { + if (er) return cb_(er) + output('- ' + project + (version ? '@' + version : '')) + cb_() + } + + var mappedConfig = getPublishConfig(publishConfig, npm.config, npm.registry) + var config = mappedConfig.config + var registry = mappedConfig.client + + // remove from the cache first + npm.commands.cache(['clean', project, version], function (er) { + if (er) { + log.error('unpublish', 'Failed to clean cache') + return cb(er) + } + + mapToRegistry(project, config, function (er, uri, auth) { + if (er) return cb(er) + + var params = { + version: version, + auth: auth + } + registry.unpublish(uri, params, cb) + }) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/update.js b/bin/nodejs6.7.0/node_modules/npm/lib/update.js new file mode 100644 index 00000000..b77075b3 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/update.js @@ -0,0 +1,64 @@ +module.exports = update + +var url = require('url') +var log = require('npmlog') +var chain = require('slide').chain +var npm = require('./npm.js') +var Installer = require('./install.js').Installer +var usage = require('./utils/usage') + +update.usage = usage( + 'update', + 'npm update [-g] [...]' +) + +update.completion = npm.commands.outdated.completion + +function update (args, cb) { + var dryrun = false + if (npm.config.get('dry-run')) dryrun = true + + npm.commands.outdated(args, true, function (er, rawOutdated) { + if (er) return cb(er) + var outdated = rawOutdated.map(function (ww) { + return { + dep: ww[0], + depname: ww[1], + current: ww[2], + wanted: ww[3], + latest: ww[4], + req: ww[5], + what: ww[1] + '@' + ww[3] + } + }) + + var wanted = outdated.filter(function (ww) { + if (ww.current === ww.wanted && ww.wanted !== ww.latest) { + log.verbose( + 'outdated', + 'not updating', ww.depname, + "because it's currently at the maximum version that matches its specified semver range" + ) + } + return ww.current !== ww.wanted && ww.latest !== 'linked' + }) + if (wanted.length === 0) return cb() + + log.info('outdated', 'updating', wanted) + var toInstall = {} + wanted.forEach(function (ww) { + // use the initial installation method (repo, tar, git) for updating + if (url.parse(ww.req).protocol) ww.what = ww.req + + var where = ww.dep.parent && ww.dep.parent.path || ww.dep.path + if (toInstall[where]) { + toInstall[where].push(ww.what) + } else { + toInstall[where] = [ww.what] + } + }) + chain(Object.keys(toInstall).map(function (where) { + return [new Installer(where, dryrun, toInstall[where]), 'run'] + }), cb) + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/version.js b/bin/nodejs6.7.0/node_modules/npm/lib/version.js new file mode 100644 index 00000000..5bb79884 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/version.js @@ -0,0 +1,289 @@ +// npm version + +module.exports = version + +var semver = require('semver') +var path = require('path') +var fs = require('graceful-fs') +var writeFileAtomic = require('write-file-atomic') +var chain = require('slide').chain +var log = require('npmlog') +var npm = require('./npm.js') +var git = require('./utils/git.js') +var assert = require('assert') +var lifecycle = require('./utils/lifecycle.js') +var parseJSON = require('./utils/parse-json.js') +var output = require('./utils/output.js') + +version.usage = 'npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]' + + '\n(run in package dir)\n' + + "'npm -v' or 'npm --version' to print npm version " + + '(' + npm.version + ')\n' + + "'npm view version' to view a package's " + + 'published version\n' + + "'npm ls' to inspect current package/dependency versions" + +function version (args, silent, cb_) { + if (typeof cb_ !== 'function') { + cb_ = silent + silent = false + } + if (args.length > 1) return cb_(version.usage) + + readPackage(function (er, data) { + if (!args.length) return dump(data, cb_) + + if (er) { + log.error('version', 'No valid package.json found') + return cb_(er) + } + + if (args[0] === 'from-git') { + retrieveTagVersion(silent, data, cb_) + } else { + var newVersion = semver.valid(args[0]) + if (!newVersion) newVersion = semver.inc(data.version, args[0]) + if (!newVersion) return cb_(version.usage) + persistVersion(newVersion, silent, data, cb_) + } + }) +} + +function retrieveTagVersion (silent, data, cb_) { + chain([ + verifyGit, + parseLastGitTag + ], function (er, results) { + if (er) return cb_(er) + var localData = { + hasGit: true, + existingTag: true + } + + var version = results[results.length - 1] + persistVersion(version, silent, data, localData, cb_) + }) +} + +function parseLastGitTag (cb) { + var options = { env: process.env } + git.whichAndExec(['describe', '--abbrev=0'], options, function (er, stdout) { + if (er) { + if (er.message.indexOf('No names found') !== -1) return cb(new Error('No tags found')) + return cb(er) + } + + var tag = stdout.trim() + var prefix = npm.config.get('tag-version-prefix') + // Strip the prefix from the start of the tag: + if (tag.indexOf(prefix) === 0) tag = tag.slice(prefix.length) + var version = semver.valid(tag) + if (!version) return cb(new Error(tag + ' is not a valid version')) + cb(null, version) + }) +} + +function persistVersion (newVersion, silent, data, localData, cb_) { + if (typeof localData === 'function') { + cb_ = localData + localData = {} + } + + if (data.version === newVersion) return cb_(new Error('Version not changed')) + data.version = newVersion + var lifecycleData = Object.create(data) + lifecycleData._id = data.name + '@' + newVersion + + var where = npm.prefix + chain([ + !localData.hasGit && [checkGit, localData], + [lifecycle, lifecycleData, 'preversion', where], + [updatePackage, newVersion, silent], + [lifecycle, lifecycleData, 'version', where], + [commit, localData, newVersion], + [lifecycle, lifecycleData, 'postversion', where] + ], cb_) +} + +function readPackage (cb) { + var packagePath = path.join(npm.localPrefix, 'package.json') + fs.readFile(packagePath, function (er, data) { + if (er) return cb(new Error(er)) + if (data) data = data.toString() + try { + data = JSON.parse(data) + } catch (e) { + er = e + data = null + } + cb(er, data) + }) +} + +function updatePackage (newVersion, silent, cb_) { + function cb (er) { + if (!er && !silent) output('v' + newVersion) + cb_(er) + } + + readPackage(function (er, data) { + if (er) return cb(new Error(er)) + data.version = newVersion + write(data, 'package.json', cb) + }) +} + +function commit (localData, newVersion, cb) { + updateShrinkwrap(newVersion, function (er, hasShrinkwrap) { + if (er || !localData.hasGit) return cb(er) + localData.hasShrinkwrap = hasShrinkwrap + _commit(newVersion, localData, cb) + }) +} + +function updateShrinkwrap (newVersion, cb) { + fs.readFile(path.join(npm.localPrefix, 'npm-shrinkwrap.json'), function (er, data) { + if (er && er.code === 'ENOENT') return cb(null, false) + + try { + data = data.toString() + data = parseJSON(data) + } catch (er) { + log.error('version', 'Bad npm-shrinkwrap.json data') + return cb(er) + } + + data.version = newVersion + write(data, 'npm-shrinkwrap.json', function (er) { + if (er) { + log.error('version', 'Bad npm-shrinkwrap.json data') + return cb(er) + } + cb(null, true) + }) + }) +} + +function dump (data, cb) { + var v = {} + + if (data && data.name && data.version) v[data.name] = data.version + v.npm = npm.version + Object.keys(process.versions).sort().forEach(function (k) { + v[k] = process.versions[k] + }) + + if (npm.config.get('json')) v = JSON.stringify(v, null, 2) + + output(v) + cb() +} + +function statGitFolder (cb) { + fs.stat(path.join(npm.localPrefix, '.git'), cb) +} + +function callGitStatus (cb) { + git.whichAndExec( + [ 'status', '--porcelain' ], + { env: process.env }, + cb + ) +} + +function cleanStatusLines (stdout) { + var lines = stdout.trim().split('\n').filter(function (line) { + return line.trim() && !line.match(/^\?\? /) + }).map(function (line) { + return line.trim() + }) + + return lines +} + +function verifyGit (cb) { + function checkStatus (er) { + if (er) return cb(er) + callGitStatus(checkStdout) + } + + function checkStdout (er, stdout) { + if (er) return cb(er) + var lines = cleanStatusLines(stdout) + if (lines.length > 0) { + return cb(new Error( + 'Git working directory not clean.\n' + lines.join('\n') + )) + } + + cb() + } + + statGitFolder(checkStatus) +} + +function checkGit (localData, cb) { + statGitFolder(function (er) { + var doGit = !er && npm.config.get('git-tag-version') + if (!doGit) { + if (er) log.verbose('version', 'error checking for .git', er) + log.verbose('version', 'not tagging in git') + return cb(null, false) + } + + // check for git + callGitStatus(function (er, stdout) { + if (er && er.code === 'ENOGIT') { + log.warn( + 'version', + 'This is a Git checkout, but the git command was not found.', + 'npm could not create a Git tag for this release!' + ) + return cb(null, false) + } + + var lines = cleanStatusLines(stdout) + if (lines.length && !npm.config.get('force')) { + return cb(new Error( + 'Git working directory not clean.\n' + lines.join('\n') + )) + } + localData.hasGit = true + cb(null, true) + }) + }) +} + +function _commit (version, localData, cb) { + var packagePath = path.join(npm.localPrefix, 'package.json') + var options = { env: process.env } + var message = npm.config.get('message').replace(/%s/g, version) + var sign = npm.config.get('sign-git-tag') + var flag = sign ? '-sm' : '-am' + chain( + [ + git.chainableExec([ 'add', packagePath ], options), + localData.hasShrinkwrap && git.chainableExec([ 'add', 'npm-shrinkwrap.json' ], options), + git.chainableExec([ 'commit', '-m', message ], options), + !localData.existingTag && git.chainableExec([ + 'tag', + npm.config.get('tag-version-prefix') + version, + flag, + message + ], options) + ], + cb + ) +} + +function write (data, file, cb) { + assert(data && typeof data === 'object', 'must pass data to version write') + assert(typeof file === 'string', 'must pass filename to write to version write') + + log.verbose('version.write', 'data', data, 'to', file) + writeFileAtomic( + path.join(npm.localPrefix, file), + new Buffer(JSON.stringify(data, null, 2) + '\n'), + cb + ) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/view.js b/bin/nodejs6.7.0/node_modules/npm/lib/view.js new file mode 100644 index 00000000..e2b9609b --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/view.js @@ -0,0 +1,332 @@ +// npm view [pkg [pkg ...]] +module.exports = view + +var npm = require('./npm.js') +var readJson = require('read-package-json') +var log = require('npmlog') +var util = require('util') +var semver = require('semver') +var mapToRegistry = require('./utils/map-to-registry.js') +var npa = require('npm-package-arg') +var path = require('path') +var usage = require('./utils/usage') + +view.usage = usage( + 'view', + 'npm view [<@scope>/][@] [[.subfield]...]' +) + +view.completion = function (opts, cb) { + if (opts.conf.argv.remain.length <= 2) { + // FIXME: there used to be registry completion here, but it stopped making + // sense somewhere around 50,000 packages on the registry + return cb() + } + // have the package, get the fields. + var tag = npm.config.get('tag') + mapToRegistry(opts.conf.argv.remain[2], npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, d) { + if (er) return cb(er) + var dv = d.versions[d['dist-tags'][tag]] + var fields = [] + d.versions = Object.keys(d.versions).sort(semver.compareLoose) + fields = getFields(d).concat(getFields(dv)) + cb(null, fields) + }) + }) + + function getFields (d, f, pref) { + f = f || [] + if (!d) return f + pref = pref || [] + Object.keys(d).forEach(function (k) { + if (k.charAt(0) === '_' || k.indexOf('.') !== -1) return + var p = pref.concat(k).join('.') + f.push(p) + if (Array.isArray(d[k])) { + d[k].forEach(function (val, i) { + var pi = p + '[' + i + ']' + if (val && typeof val === 'object') getFields(val, f, [p]) + else f.push(pi) + }) + return + } + if (typeof d[k] === 'object') getFields(d[k], f, [p]) + }) + return f + } +} + +function view (args, silent, cb) { + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + if (!args.length) args = ['.'] + + var pkg = args.shift() + var nv = npa(pkg) + var name = nv.name + var local = (name === '.' || !name) + + if (npm.config.get('global') && local) { + return cb(new Error('Cannot use view command in global mode.')) + } + + if (local) { + var dir = npm.prefix + readJson(path.resolve(dir, 'package.json'), function (er, d) { + d = d || {} + if (er && er.code !== 'ENOENT' && er.code !== 'ENOTDIR') return cb(er) + if (!d.name) return cb(new Error('Invalid package.json')) + + var p = d.name + nv = npa(p) + if (pkg && ~pkg.indexOf('@')) { + nv.rawSpec = pkg.split('@')[pkg.indexOf('@')] + } + + fetchAndRead(nv, args, silent, cb) + }) + } else { + fetchAndRead(nv, args, silent, cb) + } +} + +function fetchAndRead (nv, args, silent, cb) { + // get the data about this package + var name = nv.name + var version = nv.rawSpec || npm.config.get('tag') + + mapToRegistry(name, npm.config, function (er, uri, auth) { + if (er) return cb(er) + + npm.registry.get(uri, { auth: auth }, function (er, data) { + if (er) return cb(er) + if (data['dist-tags'] && data['dist-tags'].hasOwnProperty(version)) { + version = data['dist-tags'][version] + } + + if (data.time && data.time.unpublished) { + var u = data.time.unpublished + er = new Error('Unpublished by ' + u.name + ' on ' + u.time) + er.statusCode = 404 + er.code = 'E404' + er.pkgid = data._id + return cb(er, data) + } + + var results = [] + var error = null + var versions = data.versions || {} + data.versions = Object.keys(versions).sort(semver.compareLoose) + if (!args.length) args = [''] + + // remove readme unless we asked for it + if (args.indexOf('readme') === -1) { + delete data.readme + } + + Object.keys(versions).forEach(function (v) { + if (semver.satisfies(v, version, true)) { + args.forEach(function (args) { + // remove readme unless we asked for it + if (args.indexOf('readme') !== -1) { + delete versions[v].readme + } + results.push(showFields(data, versions[v], args)) + }) + } + }) + results = results.reduce(reducer, {}) + var retval = results + + if (args.length === 1 && args[0] === '') { + retval = cleanBlanks(retval) + log.silly('cleanup', retval) + } + + if (error || silent) cb(error, retval) + else printData(results, data._id, cb.bind(null, error, retval)) + }) + }) +} + +function cleanBlanks (obj) { + var clean = {} + Object.keys(obj).forEach(function (version) { + clean[version] = obj[version][''] + }) + return clean +} + +function reducer (l, r) { + if (r) { + Object.keys(r).forEach(function (v) { + l[v] = l[v] || {} + Object.keys(r[v]).forEach(function (t) { + l[v][t] = r[v][t] + }) + }) + } + + return l +} + +// return whatever was printed +function showFields (data, version, fields) { + var o = {} + ;[data, version].forEach(function (s) { + Object.keys(s).forEach(function (k) { + o[k] = s[k] + }) + }) + return search(o, fields.split('.'), version.version, fields) +} + +function search (data, fields, version, title) { + var field + var tail = fields + while (!field && fields.length) field = tail.shift() + fields = [field].concat(tail) + var o + if (!field && !tail.length) { + o = {} + o[version] = {} + o[version][title] = data + return o + } + var index = field.match(/(.+)\[([^\]]+)\]$/) + if (index) { + field = index[1] + index = index[2] + if (data.field && data.field.hasOwnProperty(index)) { + return search(data[field][index], tail, version, title) + } else { + field = field + '[' + index + ']' + } + } + if (Array.isArray(data)) { + if (data.length === 1) { + return search(data[0], fields, version, title) + } + var results = [] + data.forEach(function (data, i) { + var tl = title.length + var newt = title.substr(0, tl - fields.join('.').length - 1) + + '[' + i + ']' + [''].concat(fields).join('.') + results.push(search(data, fields.slice(), version, newt)) + }) + results = results.reduce(reducer, {}) + return results + } + if (!data.hasOwnProperty(field)) return undefined + data = data[field] + if (tail.length) { + if (typeof data === 'object') { + // there are more fields to deal with. + return search(data, tail, version, title) + } else { + return new Error('Not an object: ' + data) + } + } + o = {} + o[version] = {} + o[version][title] = data + return o +} + +function printData (data, name, cb) { + var versions = Object.keys(data) + var msg = '' + var msgJson = [] + var includeVersions = versions.length > 1 + var includeFields + + versions.forEach(function (v) { + var fields = Object.keys(data[v]) + includeFields = includeFields || (fields.length > 1) + if (npm.config.get('json')) msgJson.push({}) + fields.forEach(function (f) { + var d = cleanup(data[v][f]) + if (fields.length === 1 && npm.config.get('json')) { + msgJson[msgJson.length - 1][f] = d + } + if (includeVersions || includeFields || typeof d !== 'string') { + if (npm.config.get('json')) { + msgJson[msgJson.length - 1][f] = d + } else { + d = util.inspect(d, false, 5, npm.color) + } + } else if (typeof d === 'string' && npm.config.get('json')) { + d = JSON.stringify(d) + } + if (!npm.config.get('json')) { + if (f && includeFields) f += ' = ' + if (d.indexOf('\n') !== -1) d = ' \n' + d + msg += (includeVersions ? name + '@' + v + ' ' : '') + + (includeFields ? f : '') + d + '\n' + } + }) + }) + + if (msgJson.length && Object.keys(msgJson[0]).length === 1) { + var k = Object.keys(msgJson[0])[0] + msgJson = msgJson.map(function (m) { return m[k] }) + } + + if (!msg) { + msg = JSON.stringify(msgJson[0], null, 2) + '\n' + } else if (msgJson.length > 1) { + msg = JSON.stringify(msgJson, null, 2) + '\n' + } + + // preserve output symmetry by adding a whitespace-only line at the end if + // there's one at the beginning + if (/^\s*\n/.test(msg)) msg += '\n' + + // disable the progress bar entirely, as we can't meaningfully update it if + // we may have partial lines printed. + log.disableProgress() + + // print directly to stdout to not unnecessarily add blank lines + process.stdout.write(msg) + + cb(null, data) +} +function cleanup (data) { + if (Array.isArray(data)) { + return data.map(cleanup) + } + if (!data || typeof data !== 'object') return data + + if (typeof data.versions === 'object' && + data.versions && + !Array.isArray(data.versions)) { + data.versions = Object.keys(data.versions || {}) + } + + var keys = Object.keys(data) + keys.forEach(function (d) { + if (d.charAt(0) === '_') delete data[d] + else if (typeof data[d] === 'object') data[d] = cleanup(data[d]) + }) + keys = Object.keys(data) + if (keys.length <= 3 && + data.name && + (keys.length === 1 || + keys.length === 3 && data.email && data.url || + keys.length === 2 && (data.email || data.url))) { + data = unparsePerson(data) + } + return data +} +function unparsePerson (d) { + if (typeof d === 'string') return d + return d.name + + (d.email ? ' <' + d.email + '>' : '') + + (d.url ? ' (' + d.url + ')' : '') +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/visnup.js b/bin/nodejs6.7.0/node_modules/npm/lib/visnup.js new file mode 100644 index 00000000..0207a75f --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/visnup.js @@ -0,0 +1,43 @@ +module.exports = visnup +var npm = require('./npm.js') +var output = require('./utils/output.js') + +var handsomeFace = [ + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 237, 236, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 235, 236, 235, 233, 237, 235, 233, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 235, 233, 232, 235, 235, 234, 233, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 237, 235, 232, 232, 234, 233, 233, 232, 232, 233, 232, 232, 235, 232, 233, 234, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 232, 232, 232, 239, 238, 235, 233, 232, 232, 232, 232, 232, 232, 232, 233, 235, 232, 233, 233, 232, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 234, 234, 232, 233, 234, 233, 234, 235, 233, 235, 60, 238, 238, 234, 234, 233, 234, 233, 238, 251, 246, 233, 233, 232, 0, 0, 0, 0, 0, 0], + [0, 0, 233, 233, 233, 232, 232, 239, 249, 251, 252, 231, 231, 188, 250, 254, 59, 60, 255, 231, 231, 231, 252, 235, 239, 235, 232, 233, 0, 0, 0, 0, 0, 0], + [0, 0, 232, 233, 232, 232, 232, 248, 231, 231, 231, 231, 231, 231, 231, 254, 238, 254, 231, 231, 231, 231, 231, 252, 233, 235, 237, 233, 234, 0, 0, 0, 0, 0], + [0, 0, 233, 232, 232, 232, 248, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 251, 233, 233, 233, 236, 233, 0, 0, 0, 0], + [232, 233, 233, 232, 232, 246, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 249, 233, 234, 234, 0, 0, 0, 0], + [232, 232, 232, 232, 233, 249, 231, 255, 255, 255, 255, 254, 109, 60, 239, 237, 238, 237, 235, 235, 235, 235, 236, 235, 235, 235, 234, 232, 232, 232, 232, 232, 233, 0], + [0, 232, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, 235, 236, 238, 238, 235, 188, 254, 254, 145, 236, 252, 254, 254, 254, 254, 249, 236, 235, 232, 232, 233, 0], + [0, 0, 233, 237, 249, 239, 233, 252, 231, 231, 231, 231, 231, 231, 254, 235, 235, 254, 231, 231, 251, 235, 237, 231, 231, 231, 231, 7, 237, 235, 232, 233, 233, 0], + [0, 0, 0, 0, 233, 248, 239, 233, 231, 231, 231, 231, 254, 233, 233, 235, 254, 255, 231, 254, 237, 236, 254, 239, 235, 235, 233, 233, 232, 232, 233, 232, 0, 0], + [0, 0, 0, 232, 233, 246, 255, 255, 236, 236, 236, 236, 236, 255, 231, 231, 231, 231, 231, 231, 252, 234, 248, 231, 231, 231, 231, 248, 232, 232, 232, 0, 0, 0], + [0, 0, 0, 0, 235, 237, 7, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 255, 238, 235, 7, 231, 231, 231, 246, 232, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 235, 103, 188, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 252, 232, 238, 231, 231, 255, 244, 232, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 235, 236, 103, 146, 253, 255, 231, 231, 231, 231, 231, 253, 251, 250, 250, 250, 246, 232, 235, 152, 255, 146, 66, 233, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 233, 103, 146, 146, 146, 146, 254, 231, 231, 231, 109, 103, 146, 255, 188, 239, 240, 103, 255, 253, 103, 238, 234, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 232, 235, 109, 146, 146, 146, 146, 146, 252, 152, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 103, 235, 233, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 235, 235, 103, 146, 146, 146, 146, 146, 146, 188, 188, 188, 188, 188, 188, 152, 146, 146, 146, 66, 235, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 233, 235, 66, 146, 146, 146, 146, 152, 255, 146, 240, 239, 241, 109, 146, 146, 146, 103, 233, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 237, 109, 146, 146, 146, 146, 146, 254, 231, 231, 188, 146, 146, 146, 103, 233, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 237, 60, 103, 146, 146, 146, 146, 146, 103, 66, 60, 235, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 233, 233, 236, 235, 237, 235, 237, 237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +] + +function visnup (args, cb) { + handsomeFace.forEach(function (line) { + output(line.map(function (ch) { + return '\u001b[' + (ch ? '48;5;' + ch : ch) + 'm' + }).join(' ')) + }) + + var c = args.shift() + if (c) npm.commands[c](args, cb) + else cb() +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/whoami.js b/bin/nodejs6.7.0/node_modules/npm/lib/whoami.js new file mode 100644 index 00000000..1514c7c6 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/whoami.js @@ -0,0 +1,47 @@ +var npm = require('./npm.js') +var output = require('./utils/output.js') + +module.exports = whoami + +whoami.usage = 'npm whoami [--registry ]\n(just prints username according to given registry)' + +function whoami (args, silent, cb) { + // FIXME: need tighter checking on this, but is a breaking change + if (typeof cb !== 'function') { + cb = silent + silent = false + } + + var registry = npm.config.get('registry') + if (!registry) return cb(new Error('no default registry set')) + + var auth = npm.config.getCredentialsByURI(registry) + if (auth) { + if (auth.username) { + if (!silent) output(auth.username) + return process.nextTick(cb.bind(this, null, auth.username)) + } else if (auth.token) { + return npm.registry.whoami(registry, { auth: auth }, function (er, username) { + if (er) return cb(er) + if (!username) { + var needNewSession = new Error( + 'Your auth token is no longer valid. Please log in again.' + ) + needNewSession.code = 'ENEEDAUTH' + return cb(needNewSession) + } + + if (!silent) output(username) + cb(null, username) + }) + } + } + + // At this point, if they have a credentials object, it doesn't have a token + // or auth in it. Probably just the default registry. + var needAuth = new Error( + 'this command requires you to be logged in.' + ) + needAuth.code = 'ENEEDAUTH' + process.nextTick(cb.bind(this, needAuth)) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/lib/xmas.js b/bin/nodejs6.7.0/node_modules/npm/lib/xmas.js new file mode 100644 index 00000000..2c64010e --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/lib/xmas.js @@ -0,0 +1,59 @@ +// happy xmas +var log = require('npmlog') + +module.exports = function (args, cb) { + var s = process.platform === 'win32' ? ' *' : ' \u2605' + var f = '\uFF0F' + var b = '\uFF3C' + var x = process.platform === 'win32' ? ' ' : '' + var o = [ + '\u0069', '\u0020', '\u0020', '\u0020', '\u0020', '\u0020', + '\u0020', '\u0020', '\u0020', '\u0020', '\u0020', '\u0020', + '\u0020', '\u2E1B', '\u2042', '\u2E2E', '&', '@', '\uFF61' + ] + var oc = [21, 33, 34, 35, 36, 37] + var l = '\u005e' + + function w (s) { process.stderr.write(s) } + + w('\n') + ;(function T (H) { + for (var i = 0; i < H; i++) w(' ') + w(x + '\u001b[33m' + s + '\n') + var M = H * 2 - 1 + for (var L = 1; L <= H; L++) { + var O = L * 2 - 2 + var S = (M - O) / 2 + for (i = 0; i < S; i++) w(' ') + w(x + '\u001b[32m' + f) + for (i = 0; i < O; i++) { + w( + '\u001b[' + oc[Math.floor(Math.random() * oc.length)] + 'm' + + o[Math.floor(Math.random() * o.length)] + ) + } + w(x + '\u001b[32m' + b + '\n') + } + w(' ') + for (i = 1; i < H; i++) w('\u001b[32m' + l) + w('| ' + x + ' |') + for (i = 1; i < H; i++) w('\u001b[32m' + l) + if (H > 10) { + w('\n ') + for (i = 1; i < H; i++) w(' ') + w('| ' + x + ' |') + for (i = 1; i < H; i++) w(' ') + } + })(20) + w('\n\n') + log.heading = '' + log.addLevel('npm', 100000, log.headingStyle) + log.npm('loves you', 'Happy Xmas, Noders!') + cb() +} +var dg = false +Object.defineProperty(module.exports, 'usage', {get: function () { + if (dg) module.exports([], function () {}) + dg = true + return ' ' +}}) diff --git a/bin/nodejs6.7.0/node_modules/npm/make.bat b/bin/nodejs6.7.0/node_modules/npm/make.bat new file mode 100644 index 00000000..e4e15e72 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/make.bat @@ -0,0 +1,3 @@ +:: The tests run "make doc" in the prepublish script, +:: so this file gives windows something that'll exit +:: successfully, without having to install make. diff --git a/bin/nodejs6.7.0/node_modules/npm/npmrc b/bin/nodejs6.7.0/node_modules/npm/npmrc new file mode 100644 index 00000000..2e690a1b --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/npmrc @@ -0,0 +1 @@ +prefix = ~NEARD_WIN_PATH~\bin\nodejs\nodejs6.7.0\ diff --git a/bin/nodejs6.7.0/node_modules/npm/npmrc.nrd b/bin/nodejs6.7.0/node_modules/npm/npmrc.nrd new file mode 100644 index 00000000..2e690a1b --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/npmrc.nrd @@ -0,0 +1 @@ +prefix = ~NEARD_WIN_PATH~\bin\nodejs\nodejs6.7.0\ diff --git a/bin/nodejs6.7.0/node_modules/npm/package.json b/bin/nodejs6.7.0/node_modules/npm/package.json new file mode 100644 index 00000000..a083c3c9 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/package.json @@ -0,0 +1,211 @@ +{ + "version": "3.10.3", + "name": "npm", + "description": "a package manager for JavaScript", + "keywords": [ + "install", + "modules", + "package manager", + "package.json" + ], + "preferGlobal": true, + "config": { + "publishtest": false + }, + "homepage": "https://docs.npmjs.com/", + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "repository": { + "type": "git", + "url": "https://github.com/npm/npm" + }, + "bugs": { + "url": "https://github.com/npm/npm/issues" + }, + "directories": { + "bin": "./bin", + "doc": "./doc", + "lib": "./lib", + "man": "./man" + }, + "main": "./lib/npm.js", + "bin": "./bin/npm-cli.js", + "dependencies": { + "abbrev": "~1.0.9", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "aproba": "~1.0.4", + "archy": "~1.0.0", + "asap": "~2.0.4", + "chownr": "~1.0.1", + "cmd-shim": "~2.0.2", + "columnify": "~1.5.4", + "config-chain": "~1.1.10", + "dezalgo": "~1.0.3", + "editor": "~1.0.0", + "fs-vacuum": "~1.2.9", + "fs-write-stream-atomic": "~1.0.8", + "fstream": "~1.0.10", + "fstream-npm": "~1.1.0", + "glob": "~7.0.4", + "graceful-fs": "~4.1.4", + "has-unicode": "~2.0.1", + "hosted-git-info": "~2.1.5", + "iferr": "~0.1.5", + "inflight": "~1.0.5", + "inherits": "~2.0.1", + "ini": "~1.3.4", + "init-package-json": "~1.9.4", + "lockfile": "~1.0.1", + "lodash._baseuniq": "~4.6.0", + "lodash.clonedeep": "~4.3.2", + "lodash.union": "~4.4.0", + "lodash.uniq": "~4.3.0", + "lodash.without": "~4.2.0", + "mkdirp": "~0.5.1", + "node-gyp": "~3.3.1", + "nopt": "~3.0.6", + "normalize-git-url": "~3.0.2", + "normalize-package-data": "~2.3.5", + "npm-cache-filename": "~1.0.2", + "npm-install-checks": "~3.0.0", + "npm-package-arg": "~4.2.0", + "npm-registry-client": "~7.1.2", + "npm-user-validate": "~0.1.4", + "npmlog": "~3.1.2", + "once": "~1.3.3", + "opener": "~1.4.1", + "osenv": "~0.1.3", + "path-is-inside": "~1.0.1", + "read": "~1.0.7", + "read-cmd-shim": "~1.0.1", + "read-installed": "~4.0.3", + "read-package-json": "~2.0.4", + "read-package-tree": "~5.1.5", + "readable-stream": "~2.1.4", + "realize-package-specifier": "~3.0.3", + "request": "~2.72.0", + "retry": "~0.9.0", + "rimraf": "~2.5.2", + "semver": "~5.1.0", + "sha": "~2.0.1", + "slide": "~1.1.6", + "sorted-object": "~2.0.0", + "strip-ansi": "~3.0.1", + "tar": "~2.2.1", + "text-table": "~0.2.0", + "uid-number": "0.0.6", + "umask": "~1.1.0", + "unique-filename": "~1.1.0", + "unpipe": "~1.0.0", + "validate-npm-package-name": "~2.2.2", + "which": "~1.2.10", + "wrappy": "~1.0.2", + "write-file-atomic": "~1.1.4" + }, + "bundleDependencies": [ + "abbrev", + "ansi-regex", + "ansicolors", + "ansistyles", + "aproba", + "archy", + "asap", + "chownr", + "cmd-shim", + "columnify", + "config-chain", + "debuglog", + "dezalgo", + "editor", + "fs-vacuum", + "fs-write-stream-atomic", + "fstream", + "fstream-npm", + "glob", + "graceful-fs", + "has-unicode", + "hosted-git-info", + "iferr", + "imurmurhash", + "inflight", + "inherits", + "ini", + "init-package-json", + "lockfile", + "lodash._baseindexof", + "lodash._baseuniq", + "lodash._bindcallback", + "lodash._cacheindexof", + "lodash._createcache", + "lodash._getnative", + "lodash.clonedeep", + "lodash.restparam", + "lodash.union", + "lodash.uniq", + "lodash.without", + "mkdirp", + "node-gyp", + "nopt", + "normalize-git-url", + "normalize-package-data", + "npm-cache-filename", + "npm-install-checks", + "npm-package-arg", + "npm-registry-client", + "npm-user-validate", + "npmlog", + "once", + "opener", + "osenv", + "path-is-inside", + "read", + "read-cmd-shim", + "read-installed", + "read-package-json", + "read-package-tree", + "readable-stream", + "readdir-scoped-modules", + "realize-package-specifier", + "request", + "retry", + "rimraf", + "semver", + "sha", + "slide", + "sorted-object", + "strip-ansi", + "tar", + "text-table", + "uid-number", + "umask", + "unique-filename", + "unpipe", + "validate-npm-package-license", + "validate-npm-package-name", + "which", + "wrappy", + "write-file-atomic" + ], + "devDependencies": { + "deep-equal": "~1.0.1", + "marked": "~0.3.5", + "marked-man": "~0.1.5", + "npm-registry-couchapp": "~2.6.12", + "npm-registry-mock": "~1.0.1", + "require-inject": "~1.4.0", + "sprintf-js": "~1.0.3", + "standard": "~6.0.8", + "tacks": "~1.2.1", + "tap": "~5.7.2" + }, + "scripts": { + "dumpconf": "env | grep npm | sort | uniq", + "prepublish": "node bin/npm-cli.js prune --prefix=. --no-global && rimraf test/*/*/node_modules && make doc-clean && make -j4 doc", + "preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true", + "tap": "tap --coverage --reporter=classic --timeout 300", + "test": "standard && npm run test-tap", + "test-tap": "npm run tap -- \"test/tap/*.js\"", + "test-node": "\"$NODE\" \"node_modules/.bin/tap\" --timeout 240 \"test/tap/*.js\"" + }, + "license": "Artistic-2.0" +} diff --git a/bin/nodejs6.7.0/node_modules/npm/scripts/changelog.js b/bin/nodejs6.7.0/node_modules/npm/scripts/changelog.js new file mode 100644 index 00000000..a9a67b13 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/scripts/changelog.js @@ -0,0 +1,95 @@ +'use strict' +/* +Usage: + +node scripts/changelog.js [comittish] + +Generates changelog entries in our format as best as its able based on +commits starting at comittish, or if that's not passed, master. + +Ordinarily this is run via the gen-changelog shell script, which appends +the result to the changelog. + +*/ +const execSync = require('child_process').execSync +const branch = process.argv[2] || 'master' +const log = execSync(`git log --pretty='format:%h %H%d %s (%aN)%n%b%n---%n' ${branch}...`).toString().split(/\n/) +const authormap = { + 'Rebecca Turner': 'iarna', + 'Forrest L Norvell': 'othiym23', + 'Kyle Mitchell': 'kemitchell', + 'Chris Rebert': 'cvrebert', + 'Kat Marchán': 'zkat' +} + +main() + +function print_commit (c) { + let m + console.log(`* [\`${c.shortid}\`](https://github.com/npm/npm/commit/${c.fullid})`) + if (c.fixes) { + console.log(` [#${c.fixes}](https://github.com/npm/npm/issues/${c.fixes})`) + } else if (c.prurl && (m = c.prurl.match(/https:\/\/github.com\/([^/]+\/[^/]+)\/pull\/(\d+)/))) { + let repo = m[1] + let prid = m[2] + if (repo !== 'npm/npm') { + console.log(` [${repo}#${prid}](${c.prurl})`) + } else { + console.log(` [#${prid}](${c.prurl})`) + } + } else if (c.prurl) { + console.log(` [#](${c.prurl})`) + } + let msg = c.message + .replace(/^\s+/mg, '') + .replace(/^[-a-z]+: /, '') + .replace(/^/mg, ' ') + .replace(/\n$/, '') + // backtickify package@version + .replace(/^(\s*[^@\s]+@\d+[.]\d+[.]\d+)(\s*\S)/g, '$1:$2') + .replace(/\b([^@\s]+@\d+[.]\d+[.]\d+)\b/g, '`$1`') + // linkify commitids + .replace(/\b([a-f0-9]{7,8})\b/g, '[`$1`](https://github.com/npm/npm/commit/$1)') + .replace(/\b#(\d+)\b/g, '[#$1](https://github.com/npm/npm/issues/$1)') + console.log(msg) + if (c.credit) { + c.credit.forEach(function (credit) { + console.log(` ([@${credit}](https://github.com/${credit}))`) + }) + } else { + console.log(` ([@${c.author}](https://github.com/${c.author}))`) + } +} + +function main () { + let commit + log.forEach(function (line) { + let m + /*eslint no-cond-assign:0*/ + if (/^---$/.test(line)) { + print_commit(commit) + } else if (m = line.match(/^([a-f0-9]{7}) ([a-f0-9]+) (?:[(]([^)]+)[)] )?(.*?) [(](.*?)[)]/)) { + commit = { + shortid: m[1], + fullid: m[2], + branch: m[3], + message: m[4], + author: authormap[m[5]] || m[5], + prurl: null, + fixes: null, + credit: null + } + } else if (m = line.match(/^PR-URL: (.*)/)) { + commit.prurl = m[1] + } else if (m = line.match(/^Credit: @(.*)/)) { + if (!commit.credit) commit.credit = [] + commit.credit.push(m[1]) + } else if (m = line.match(/^Fixes: #(.*)/)) { + commit.fixes = m[1] + } else if (m = line.match(/^Reviewed-By: @(.*)/)) { + commit.reviewed = m[1] + } else if (/\S/.test(line)) { + commit.message += `\n${line}` + } + }) +} diff --git a/bin/nodejs6.7.0/node_modules/npm/scripts/clean-old.sh b/bin/nodejs6.7.0/node_modules/npm/scripts/clean-old.sh new file mode 100644 index 00000000..6c20d78a --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/scripts/clean-old.sh @@ -0,0 +1,165 @@ +#!/bin/bash + +# look for old 0.x cruft, and get rid of it. +# Should already be sitting in the npm folder. + +# This doesn't have to be quite as cross-platform as install.sh. +# There are some bash-isms, because maintaining *two* +# fully-portable posix/bourne sh scripts is too much for +# one project with a sane maintainer. + +# If readlink isn't available, then this is just too tricky. +# However, greadlink is fine, so Solaris can join the party, too. +readlink="readlink" +which $readlink >/dev/null 2>/dev/null +if [ $? -ne 0 ]; then + readlink="greadlink" + which $readlink >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + echo "Can't find the readlink or greadlink command. Aborting." + exit 1 + fi +fi + +if [ "x$npm_config_prefix" != "x" ]; then + PREFIXES=$npm_config_prefix +else + node="$NODE" + if [ "x$node" = "x" ]; then + node=`which node` + fi + if [ "x$node" = "x" ]; then + echo "Can't find node to determine prefix. Aborting." + exit 1 + fi + + + PREFIX=`dirname $node` + PREFIX=`dirname $PREFIX` + echo "cleanup prefix=$PREFIX" + PREFIXES=$PREFIX + + altprefix=`"$node" -e process.installPrefix` + if [ "x$altprefix" != "x" ] && [ "x$altprefix" != "x$PREFIX" ]; then + echo "altprefix=$altprefix" + PREFIXES="$PREFIX $altprefix" + fi +fi + +# now prefix is where npm would be rooted by default +# go hunting. + +packages= +for prefix in $PREFIXES; do + packages="$packages + "`ls "$prefix"/lib/node/.npm 2>/dev/null | grep -v .cache` +done + +packages=`echo $packages` + +filelist=() +fid=0 + +for prefix in $PREFIXES; do + # remove any links into the .npm dir, or links to + # version-named shims/symlinks. + for folder in share/man bin lib/node; do + find $prefix/$folder -type l | while read file; do + target=`$readlink $file | grep '/\.npm/'` + if [ "x$target" != "x" ]; then + # found one! + filelist[$fid]="$file" + let 'fid++' + # also remove any symlinks to this file. + base=`basename "$file"` + base=`echo "$base" | awk -F@ '{print $1}'` + if [ "x$base" != "x" ]; then + find "`dirname $file`" -type l -name "$base"'*' \ + | while read l; do + target=`$readlink "$l" | grep "$base"` + if [ "x$target" != "x" ]; then + filelist[$fid]="$1" + let 'fid++' + fi + done + fi + fi + done + + # Scour for shim files. These are relics of 0.2 npm installs. + # note: grep -r is not portable. + find $prefix/$folder -type f \ + | xargs grep -sl '// generated by npm' \ + | while read file; do + filelist[$fid]="$file" + let 'fid++' + done + done + + # now remove the package modules, and the .npm folder itself. + if [ "x$packages" != "x" ]; then + for pkg in $packages; do + filelist[$fid]="$prefix/lib/node/$pkg" + let 'fid++' + for i in $prefix/lib/node/$pkg\@*; do + filelist[$fid]="$i" + let 'fid++' + done + done + fi + + for folder in lib/node/.npm lib/npm share/npm; do + if [ -d $prefix/$folder ]; then + filelist[$fid]="$prefix/$folder" + let 'fid++' + fi + done +done + +# now actually clean, but only if there's anything TO clean +if [ "${#filelist[@]}" -gt 0 ]; then + echo "" + echo "This script will find and eliminate any shims, symbolic" + echo "links, and other cruft that was installed by npm 0.x." + echo "" + + if [ "x$packages" != "x" ]; then + echo "The following packages appear to have been installed with" + echo "an old version of npm, and will be removed forcibly:" + for pkg in $packages; do + echo " $pkg" + done + echo "Make a note of these. You may want to install them" + echo "with npm 1.0 when this process is completed." + echo "" + fi + + OK= + if [ "x$1" = "x-y" ]; then + OK="yes" + fi + + while [ "$OK" != "y" ] && [ "$OK" != "yes" ] && [ "$OK" != "no" ]; do + echo "Is this OK?" + echo " enter 'yes' or 'no'" + echo " or 'show' to see a list of files " + read OK + if [ "x$OK" = "xshow" ] || [ "x$OK" = "xs" ]; then + for i in "${filelist[@]}"; do + echo "$i" + done + fi + done + if [ "$OK" = "no" ]; then + echo "Aborting" + exit 1 + fi + for i in "${filelist[@]}"; do + rm -rf "$i" + done +fi + +echo "" +echo 'All clean!' + +exit 0 diff --git a/bin/nodejs6.7.0/node_modules/npm/scripts/doc-build.sh b/bin/nodejs6.7.0/node_modules/npm/scripts/doc-build.sh new file mode 100644 index 00000000..d83a7f0e --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/scripts/doc-build.sh @@ -0,0 +1,119 @@ +#!/usr/bin/env bash + +if [[ $DEBUG != "" ]]; then + set -x +fi +set -o errexit +set -o pipefail + +if ! [ -x node_modules/.bin/marked-man ]; then + ps=0 + if [ -f .building_marked-man ]; then + pid=$(cat .building_marked-man) + ps=$(ps -p $pid | grep $pid | wc -l) || true + fi + + if [ -f .building_marked-man ] && [ $ps != 0 ]; then + while [ -f .building_marked-man ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install marked-man + echo $$ > .building_marked-man + sleep 1 + if [ $(cat .building_marked-man) == $$ ]; then + make node_modules/.bin/marked-man + rm .building_marked-man + else + while [ -f .building_marked-man ]; do + sleep 1 + done + fi + fi +fi + +if ! [ -x node_modules/.bin/marked ]; then + ps=0 + if [ -f .building_marked ]; then + pid=$(cat .building_marked) + ps=$(ps -p $pid | grep $pid | wc -l) || true + fi + + if [ -f .building_marked ] && [ $ps != 0 ]; then + while [ -f .building_marked ]; do + sleep 1 + done + else + # a race to see which make process will be the one to install marked + echo $$ > .building_marked + sleep 1 + if [ $(cat .building_marked) == $$ ]; then + make node_modules/.bin/marked + rm .building_marked + else + while [ -f .building_marked ]; do + sleep 1 + done + fi + fi +fi + +src=$1 +dest=$2 +name=$(basename ${src%.*}) +date=$(date -u +'%Y-%m-%d %H:%M:%S') +version=$(node cli.js -v) + +mkdir -p $(dirname $dest) + +html_replace_tokens () { + local url=$1 + sed "s|@NAME@|$name|g" \ + | sed "s|@DATE@|$date|g" \ + | sed "s|@URL@|$url|g" \ + | sed "s|@VERSION@|$version|g" \ + | perl -p -e 's/]*)>([^\(]*\([0-9]\)) -- (.*?)<\/h1>/

    \2<\/h1>

    \3<\/p>/g' \ + | perl -p -e 's/npm-npm/npm/g' \ + | perl -p -e 's/([^"-])(npm-)?README(?!\.html)(\(1\))?/\1README<\/a>/g' \ + | perl -p -e 's/<a href="[^"]+README.html">README<\/a><\/title>/<title>README<\/title>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(1\))/\1<a href="..\/cli\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(3\))/\1<a href="..\/api\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(5\))/\1<a href="..\/files\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/([^"-])([^\(> ]+)(\(7\))/\1<a href="..\/misc\/\2.html">\2\3<\/a>/g' \ + | perl -p -e 's/\([1357]\)<\/a><\/h1>/<\/a><\/h1>/g' \ + | (if [ $(basename $(dirname $dest)) == "doc" ]; then + perl -p -e 's/ href="\.\.\// href="/g' + else + cat + fi) +} + +man_replace_tokens () { + sed "s|@VERSION@|$version|g" \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(1\)/npm help \2/g' \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(([57])\)/npm help \3 \2/g' \ + | perl -p -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(3\)/npm apihelp \2/g' \ + | perl -p -e 's/npm\(1\)/npm help npm/g' \ + | perl -p -e 's/npm\(3\)/npm apihelp npm/g' +} + +case $dest in + *.[1357]) + ./node_modules/.bin/marked-man --roff $src \ + | man_replace_tokens > $dest + exit $? + ;; + *.html) + url=${dest/html\//} + (cat html/dochead.html && \ + cat $src | ./node_modules/.bin/marked && + cat html/docfoot.html)\ + | html_replace_tokens $url \ + > $dest + exit $? + ;; + *) + echo "Invalid destination type: $dest" >&2 + exit 1 + ;; +esac diff --git a/bin/nodejs6.7.0/node_modules/npm/scripts/gen-changelog b/bin/nodejs6.7.0/node_modules/npm/scripts/gen-changelog new file mode 100644 index 00000000..02c47f85 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/scripts/gen-changelog @@ -0,0 +1,7 @@ +#!/bin/sh +# Usage: gen-changelog [comittish] +# Reads all the commits since comittish and produces changelog entries in +# our style as best as it can, appendning them to CHANGELOG.md. If it +# encounters a git error it won't modify CHANGELOG.md +# @iarna uses this as the first step in producing changelogs for a release. +(node $(npm prefix)/scripts/changelog.js "$@"; cat CHANGELOG.md) > new.md && mv new.md CHANGELOG.md diff --git a/bin/nodejs6.7.0/node_modules/npm/scripts/index-build.js b/bin/nodejs6.7.0/node_modules/npm/scripts/index-build.js new file mode 100644 index 00000000..e505f0c1 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/scripts/index-build.js @@ -0,0 +1,58 @@ +#!/usr/bin/env node +var fs = require('fs') +var path = require('path') +var root = path.resolve(__dirname, '..') +var glob = require('glob') +var conversion = { 'cli': 1, 'api': 3, 'files': 5, 'misc': 7 } + +glob(root + '/{README.md,doc/*/*.md}', function (er, files) { + if (er) throw er + + output(files.map(function (f) { + var b = path.basename(f) + if (b === 'README.md') return [0, b] + if (b === 'index.md') return null + var s = conversion[path.basename(path.dirname(f))] + return [s, f] + }).filter(function (f) { + return f + }).sort(function (a, b) { + return (a[0] === b[0]) + ? (path.basename(a[1]) === 'npm.md' ? -1 + : path.basename(b[1]) === 'npm.md' ? 1 + : a[1] > b[1] ? 1 : -1) + : a[0] - b[0] + })) +}) + +function output (files) { + console.log( + 'npm-index(7) -- Index of all npm documentation\n' + + '==============================================\n') + + writeLines(files, 0) + writeLines(files, 1, 'Command Line Documentation', 'Using npm on the command line') + writeLines(files, 3, 'API Documentation', 'Using npm in your Node programs') + writeLines(files, 5, 'Files', 'File system structures npm uses') + writeLines(files, 7, 'Misc', 'Various other bits and bobs') +} + +function writeLines (files, sxn, heading, desc) { + if (heading) { + console.log('## %s\n\n%s\n', heading, desc) + } + files.filter(function (f) { + return f[0] === sxn + }).forEach(writeLine) +} + +function writeLine (sd) { + var sxn = sd[0] || 1 + var doc = sd[1] + var d = path.basename(doc, '.md') + + var content = fs.readFileSync(doc, 'utf8').split('\n')[0].split('-- ')[1] + + console.log('### %s(%d)\n', d, sxn) + console.log(content + '\n') +} diff --git a/bin/nodejs6.7.0/node_modules/npm/scripts/install.sh b/bin/nodejs6.7.0/node_modules/npm/scripts/install.sh new file mode 100644 index 00000000..108e6158 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/scripts/install.sh @@ -0,0 +1,270 @@ +#!/bin/sh + +# A word about this shell script: +# +# It must work everywhere, including on systems that lack +# a /bin/bash, map 'sh' to ksh, ksh97, bash, ash, or zsh, +# and potentially have either a posix shell or bourne +# shell living at /bin/sh. +# +# See this helpful document on writing portable shell scripts: +# http://www.gnu.org/s/hello/manual/autoconf/Portable-Shell.html +# +# The only shell it won't ever work on is cmd.exe. + +if [ "x$0" = "xsh" ]; then + # run as curl | sh + # on some systems, you can just do cat>npm-install.sh + # which is a bit cuter. But on others, &1 is already closed, + # so catting to another script file won't do anything. + # Follow Location: headers, and fail on errors + curl -f -L -s https://www.npmjs.org/install.sh > npm-install-$$.sh + ret=$? + if [ $ret -eq 0 ]; then + (exit 0) + else + rm npm-install-$$.sh + echo "Failed to download script" >&2 + exit $ret + fi + sh npm-install-$$.sh + ret=$? + rm npm-install-$$.sh + exit $ret +fi + +# See what "npm_config_*" things there are in the env, +# and make them permanent. +# If this fails, it's not such a big deal. +configures="`env | grep 'npm_config_' | sed -e 's|^npm_config_||g'`" + +npm_config_loglevel="error" +if [ "x$npm_debug" = "x" ]; then + (exit 0) +else + echo "Running in debug mode." + echo "Note that this requires bash or zsh." + set -o xtrace + set -o pipefail + npm_config_loglevel="verbose" +fi +export npm_config_loglevel + +# make sure that node exists +node=`which node 2>&1` +ret=$? +if [ $ret -eq 0 ] && [ -x "$node" ]; then + (exit 0) +else + echo "npm cannot be installed without node.js." >&2 + echo "Install node first, and then try again." >&2 + echo "" >&2 + echo "Maybe node is installed, but not in the PATH?" >&2 + echo "Note that running as sudo can change envs." >&2 + echo "" + echo "PATH=$PATH" >&2 + exit $ret +fi + +# set the temp dir +TMP="${TMPDIR}" +if [ "x$TMP" = "x" ]; then + TMP="/tmp" +fi +TMP="${TMP}/npm.$$" +rm -rf "$TMP" || true +mkdir "$TMP" +if [ $? -ne 0 ]; then + echo "failed to mkdir $TMP" >&2 + exit 1 +fi + +BACK="$PWD" + +ret=0 +tar="${TAR}" +if [ -z "$tar" ]; then + tar="${npm_config_tar}" +fi +if [ -z "$tar" ]; then + tar=`which tar 2>&1` + ret=$? +fi + +if [ $ret -eq 0 ] && [ -x "$tar" ]; then + echo "tar=$tar" + echo "version:" + $tar --version + ret=$? +fi + +if [ $ret -eq 0 ]; then + (exit 0) +else + echo "No suitable tar program found." + exit 1 +fi + + + +# Try to find a suitable make +# If the MAKE environment var is set, use that. +# otherwise, try to find gmake, and then make. +# If no make is found, then just execute the necessary commands. + +# XXX For some reason, make is building all the docs every time. This +# is an annoying source of bugs. Figure out why this happens. +MAKE=NOMAKE + +if [ "x$MAKE" = "x" ]; then + make=`which gmake 2>&1` + if [ $? -eq 0 ] && [ -x "$make" ]; then + (exit 0) + else + make=`which make 2>&1` + if [ $? -eq 0 ] && [ -x "$make" ]; then + (exit 0) + else + make=NOMAKE + fi + fi +else + make="$MAKE" +fi + +if [ -x "$make" ]; then + (exit 0) +else + # echo "Installing without make. This may fail." >&2 + make=NOMAKE +fi + +# If there's no bash, then don't even try to clean +if [ -x "/bin/bash" ]; then + (exit 0) +else + clean="no" +fi + +node_version=`"$node" --version 2>&1` +ret=$? +if [ $ret -ne 0 ]; then + echo "You need node to run this program." >&2 + echo "node --version reports: $node_version" >&2 + echo "with exit code = $ret" >&2 + echo "Please install node before continuing." >&2 + exit $ret +fi + +t="${npm_install}" +if [ -z "$t" ]; then + # switch based on node version. + # note that we can only use strict sh-compatible patterns here. + case $node_version in + 0.[01234567].* | v0.[01234567].*) + echo "You are using an outdated and unsupported version of" >&2 + echo "node ($node_version). Please update node and try again." >&2 + exit 99 + ;; + *) + echo "install npm@latest" + t="latest" + ;; + esac +fi + +# need to echo "" after, because Posix sed doesn't treat EOF +# as an implied end of line. +url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \ + | sed -e 's/^.*tarball":"//' \ + | sed -e 's/".*$//'` + +ret=$? +if [ "x$url" = "x" ]; then + ret=125 + # try without the -e arg to sed. + url=`(curl -SsL https://registry.npmjs.org/npm/$t; echo "") \ + | sed 's/^.*tarball":"//' \ + | sed 's/".*$//'` + ret=$? + if [ "x$url" = "x" ]; then + ret=125 + fi +fi +if [ $ret -ne 0 ]; then + echo "Failed to get tarball url for npm/$t" >&2 + exit $ret +fi + + +echo "fetching: $url" >&2 + +cd "$TMP" \ + && curl -SsL "$url" \ + | $tar -xzf - \ + && cd "$TMP"/* \ + && (ver=`"$node" bin/read-package-json.js package.json version` + isnpm10=0 + if [ $ret -eq 0 ]; then + if [ -d node_modules ]; then + if "$node" node_modules/semver/bin/semver -v "$ver" -r "1" + then + isnpm10=1 + fi + else + if "$node" bin/semver -v "$ver" -r ">=1.0"; then + isnpm10=1 + fi + fi + fi + + ret=0 + if [ $isnpm10 -eq 1 ] && [ -f "scripts/clean-old.sh" ]; then + if [ "x$skipclean" = "x" ]; then + (exit 0) + else + clean=no + fi + if [ "x$clean" = "xno" ] \ + || [ "x$clean" = "xn" ]; then + echo "Skipping 0.x cruft clean" >&2 + ret=0 + elif [ "x$clean" = "xy" ] || [ "x$clean" = "xyes" ]; then + NODE="$node" /bin/bash "scripts/clean-old.sh" "-y" + ret=$? + else + NODE="$node" /bin/bash "scripts/clean-old.sh" </dev/tty + ret=$? + fi + fi + + if [ $ret -ne 0 ]; then + echo "Aborted 0.x cleanup. Exiting." >&2 + exit $ret + fi) \ + && (if [ "x$configures" = "x" ]; then + (exit 0) + else + echo "./configure $configures" + echo "$configures" > npmrc + fi) \ + && (if [ "$make" = "NOMAKE" ]; then + (exit 0) + elif "$make" uninstall install; then + (exit 0) + else + make="NOMAKE" + fi + if [ "$make" = "NOMAKE" ]; then + "$node" cli.js rm npm -gf + "$node" cli.js install -gf + fi) \ + && cd "$BACK" \ + && rm -rf "$TMP" \ + && echo "It worked" + +ret=$? +if [ $ret -ne 0 ]; then + echo "It failed" >&2 +fi +exit $ret diff --git a/bin/nodejs6.7.0/node_modules/npm/scripts/publish-tag.js b/bin/nodejs6.7.0/node_modules/npm/scripts/publish-tag.js new file mode 100644 index 00000000..2ebfa00a --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/scripts/publish-tag.js @@ -0,0 +1,3 @@ +var semver = require('semver') +var version = semver.parse(require('../package.json').version) +console.log('v%s.%s-next', version.major, version.minor) diff --git a/bin/nodejs6.7.0/node_modules/npm/scripts/release.sh b/bin/nodejs6.7.0/node_modules/npm/scripts/release.sh new file mode 100644 index 00000000..60a686fe --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/scripts/release.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# script for creating a zip and tarball for inclusion in node + +unset CDPATH + +set -e + +rm -rf release *.tgz || true +mkdir release +node ./cli.js pack --loglevel error >/dev/null +mv *.tgz release +cd release +tar xzf *.tgz + +mkdir node_modules +mv package node_modules/npm + +# make the zip for windows users +cp node_modules/npm/bin/*.cmd . +zipname=npm-$(node ../cli.js -v).zip +zip -q -9 -r -X "$zipname" *.cmd node_modules + +# make the tar for node's deps +cd node_modules +tarname=npm-$(node ../../cli.js -v).tgz +tar czf "$tarname" npm + +cd .. +mv "node_modules/$tarname" . + +rm -rf *.cmd +rm -rf node_modules + +echo "release/$tarname" +echo "release/$zipname" diff --git a/bin/nodejs6.7.0/node_modules/npm/scripts/relocate.sh b/bin/nodejs6.7.0/node_modules/npm/scripts/relocate.sh new file mode 100644 index 00000000..aa30f3df --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/scripts/relocate.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Change the cli shebang to point at the specified node +# Useful for when the program is moved around after install. +# Also used by the default 'make install' in node to point +# npm at the newly installed node, rather than the first one +# in the PATH, which would be the default otherwise. + +# bash /path/to/npm/scripts/relocate.sh $nodepath +# If $nodepath is blank, then it'll use /usr/bin/env + +dir="$(dirname "$(dirname "$0")")" +cli="$dir"/bin/npm-cli.js +tmp="$cli".tmp + +node="$1" +if [ "x$node" = "x" ]; then + node="/usr/bin/env node" +fi +node="#!$node" + +sed -e 1d "$cli" > "$tmp" +echo "$node" > "$cli" +cat "$tmp" >> "$cli" +rm "$tmp" +chmod ogu+x $cli diff --git a/bin/nodejs6.7.0/node_modules/npm/scripts/update-authors.sh b/bin/nodejs6.7.0/node_modules/npm/scripts/update-authors.sh new file mode 100644 index 00000000..c9b613c7 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/scripts/update-authors.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +git log --reverse --format='%aN <%aE>' | perl -wnE ' +BEGIN { + say "# Authors sorted by whether or not they\x27re me"; +} + +print $seen{$_} = $_ unless $seen{$_} +' > AUTHORS diff --git a/bin/nodejs6.7.0/node_modules/npm/test/common-tap.js b/bin/nodejs6.7.0/node_modules/npm/test/common-tap.js new file mode 100644 index 00000000..2a0e3d65 --- /dev/null +++ b/bin/nodejs6.7.0/node_modules/npm/test/common-tap.js @@ -0,0 +1,121 @@ +'use strict' +var fs = require('graceful-fs') +var readCmdShim = require('read-cmd-shim') +var isWindows = require('../lib/utils/is-windows.js') + +// cheesy hackaround for test deps (read: nock) that rely on setImmediate +if (!global.setImmediate || !require('timers').setImmediate) { + require('timers').setImmediate = global.setImmediate = function () { + var args = [arguments[0], 0].concat([].slice.call(arguments, 1)) + setTimeout.apply(this, args) + } +} + +var spawn = require('child_process').spawn +var path = require('path') + +var port = exports.port = 1337 +exports.registry = 'http://localhost:' + port +process.env.npm_config_loglevel = 'error' +process.env.npm_config_progress = 'false' + +var npm_config_cache = path.resolve(__dirname, 'npm_cache') +process.env.npm_config_cache = exports.npm_config_cache = npm_config_cache +process.env.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') +process.env.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') +process.env.npm_config_global_style = 'false' +process.env.npm_config_legacy_bundling = 'false' +process.env.random_env_var = 'foo' +// suppress warnings about using a prerelease version of node +process.env.npm_config_node_version = process.version.replace(/-.*$/, '') + +var bin = exports.bin = require.resolve('../bin/npm-cli.js') + +var chain = require('slide').chain +var once = require('once') + +var nodeBin = exports.nodeBin = process.env.npm_node_execpath || process.env.NODE || process.execPath + +exports.npm = function (cmd, opts, cb) { + cb = once(cb) + cmd = [bin].concat(cmd) + opts = opts || {} + + opts.env = opts.env || process.env + if (!opts.env.npm_config_cache) { + opts.env.npm_config_cache = npm_config_cache + } + + var stdout = '' + var stderr = '' + var child = spawn(nodeBin, cmd, opts) + + if (child.stderr) { + child.stderr.on('data', function (chunk) { + stderr += chunk + }) + } + + if (child.stdout) { + child.stdout.on('data', function (chunk) { + stdout += chunk + }) + } + + child.on('error', cb) + + child.on('close', function (code) { + cb(null, code, stdout, stderr) + }) + return child +} + +exports.makeGitRepo = function (params, cb) { + // git must be called after npm.load because it uses config + var git = require('../lib/utils/git.js') + + var root = params.path || process.cwd() + var user = params.user || 'PhantomFaker' + var email = params.email || 'nope@not.real' + var added = params.added || ['package.json'] + var message = params.message || 'stub repo' + + var opts = { cwd: root, env: { PATH: process.env.PATH } } + var commands = [ + git.chainableExec(['init'], opts), + git.chainableExec(['config', 'user.name', user], opts), + git.chainableExec(['config', 'user.email', email], opts), + git.chainableExec(['add'].concat(added), opts), + git.chainableExec(['commit', '-m', message], opts) + ] + + if (Array.isArray(params.commands)) { + commands = commands.concat(params.commands) + } + + chain(commands, cb) +} + +exports.readBinLink = function (path) { + if (isWindows) { + return readCmdShim.sync(path) + } else { + return fs.readlinkSync(path) + } +} + +exports.skipIfWindows = function (why) { + if (!isWindows) return + console.log('1..1') + if (!why) why = 'this test not available on windows' + console.log('ok 1 # skip ' + why) + process.exit(0) +} + +exports.pendIfWindows = function (why) { + if (!isWindows) return + console.log('1..1') + if (!why) why = 'this test is pending further changes on windows' + console.log('not ok 1 # todo ' + why) + process.exit(0) +} diff --git a/bin/nodejs6.7.0/node_perfctr_provider.man b/bin/nodejs6.7.0/node_perfctr_provider.man new file mode 100644 index 00000000..f82a79fa --- /dev/null +++ b/bin/nodejs6.7.0/node_perfctr_provider.man @@ -0,0 +1,107 @@ +<instrumentationManifest + xmlns="http://schemas.microsoft.com/win/2004/08/events" + xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <instrumentation> + <counters xmlns="http://schemas.microsoft.com/win/2005/12/counters" + schemaVersion="1.1"> + <provider symbol="NodeCounterProvider" + applicationIdentity="node.exe" + providerType="userMode" + providerGuid="{793C9B44-3D6B-4F57-B5D7-4FF80ADCF9A2}"> + <counterSet symbol="NodeCounterSet" + guid="{3A22A8EC-297C-48AC-AB15-33EC93033FD8}" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet" + name="Node.js" + description="Node.js performance counters" + instances="multipleAggregate"> + + <counter id="1" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvreq" + name="HTTP server requests" + description="Number of HTTP server requests" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="2" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvrsp" + name="HTTP server responses" + description="Number of HTTP server responses" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="3" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclireq" + name="HTTP client requests" + description="Number of HTTP client requests" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="4" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclirsp" + name="HTTP client responses" + description="Number of HTTP client responses" + type="perf_counter_counter" + detailLevel="standard" + aggregate="sum" /> + + <counter id="5" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netsrvconn" + name="Active server connections" + description="Number of server connections" + type="perf_counter_rawcount" + detailLevel="standard" + aggregate="sum" /> + + <counter id="6" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbytesent" + name="Network bytes sent" + description="Number of bytes sent using TCP" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="7" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbyterecv" + name="Network bytes received" + description="Number of bytes received using TCP" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="8" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.gctime" + name="%Time in GC" + description="Percent of time for last GC" + type="perf_counter_rawcount" + detailLevel="standard" + aggregate="avg" /> + + <counter id="9" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebytesent" + name="Pipe bytes sent" + description="Number of bytes sent using pipe" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + <counter id="10" + uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebyterecv" + name="Pipe bytes received" + description="Number of bytes received using pipe" + type="perf_counter_bulk_count" + detailLevel="standard" + defaultScale="-3" + aggregate="sum" /> + + </counterSet> + </provider> + </counters> + </instrumentation> +</instrumentationManifest> diff --git a/bin/nodejs6.7.0/nodevars.bat b/bin/nodejs6.7.0/nodevars.bat new file mode 100644 index 00000000..cbe2d9a5 --- /dev/null +++ b/bin/nodejs6.7.0/nodevars.bat @@ -0,0 +1,24 @@ +@echo off + +rem Ensure this Node.js and npm are first in the PATH +set "PATH=%APPDATA%\npm;%~dp0;%PATH%" + +setlocal enabledelayedexpansion +pushd "%~dp0" + +rem Figure out the Node.js version. +set print_version=.\node.exe -p -e "process.versions.node + ' (' + process.arch + ')'" +for /F "usebackq delims=" %%v in (`%print_version%`) do set version=%%v + +rem Print message. +if exist npm.cmd ( + echo Your environment has been set up for using Node.js !version! and npm. +) else ( + echo Your environment has been set up for using Node.js !version!. +) + +popd +endlocal + +rem If we're in the Node.js directory, change to the user's home dir. +if "%CD%\"=="%~dp0" cd /d "%HOMEDRIVE%%HOMEPATH%" diff --git a/bin/nodejs6.7.0/npm b/bin/nodejs6.7.0/npm new file mode 100644 index 00000000..1226afbc --- /dev/null +++ b/bin/nodejs6.7.0/npm @@ -0,0 +1,34 @@ +#!/bin/sh +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix + +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +NODE_EXE="$basedir/node.exe" +if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node +fi + +NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" + +case `uname` in + *MINGW*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; + *CYGWIN*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` + NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi + ;; +esac + +"$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/bin/nodejs6.7.0/npm.cmd b/bin/nodejs6.7.0/npm.cmd new file mode 100644 index 00000000..f111c59d --- /dev/null +++ b/bin/nodejs6.7.0/npm.cmd @@ -0,0 +1,19 @@ +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/build.properties b/build.properties index c66fa130..dcb7cf55 100644 --- a/build.properties +++ b/build.properties @@ -1,5 +1,5 @@ bundle.name = nodejs -bundle.release = r5 +bundle.release = r6 bundle.type = bins bundle.format = 7z diff --git a/releases.properties b/releases.properties index 212afa04..ccd46759 100644 --- a/releases.properties +++ b/releases.properties @@ -2,20 +2,25 @@ 0.10.38 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r2/neard-nodejs-0.10.38-r2.zip 0.10.41 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r2/neard-nodejs-0.10.41-r2.zip 0.10.45 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r4/neard-nodejs-0.10.45-r4.7z +0.10.47 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r6/neard-nodejs-0.10.47-r6.7z 0.11.9 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r2/neard-nodejs-0.11.9-r2.zip 0.11.16 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r2/neard-nodejs-0.11.16-r2.zip 0.12.4 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r2/neard-nodejs-0.12.4-r2.zip 0.12.9 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r2/neard-nodejs-0.12.9-r2.zip 0.12.13 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r3/neard-nodejs-0.12.13-r3.7z 0.12.14 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r4/neard-nodejs-0.12.14-r4.7z +0.12.16 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r6/neard-nodejs-0.12.16-r6.7z 4.2.3 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r2/neard-nodejs-4.2.3-r2.zip 4.2.6 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r2/neard-nodejs-4.2.6-r2.zip 4.4.3 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r3/neard-nodejs-4.4.3-r3.7z 4.4.4 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r4/neard-nodejs-4.4.4-r4.7z 4.4.5 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r5/neard-nodejs-4.4.5-r5.7z +4.6.0 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r6/neard-nodejs-4.6.0-r6.7z 5.1.1 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r2/neard-nodejs-5.1.1-r2.zip 5.5.0 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r2/neard-nodejs-5.5.0-r2.zip 5.10.1 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r3/neard-nodejs-5.10.1-r3.7z 5.11.1 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r4/neard-nodejs-5.11.1-r4.7z +5.12.0 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r6/neard-nodejs-5.12.0-r6.7z 6.1.0 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r4/neard-nodejs-6.1.0-r4.7z 6.2.2 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r5/neard-nodejs-6.2.2-r5.7z +6.7.0 = https://github.com/crazy-max/neard-bin-nodejs/releases/download/r6/neard-nodejs-6.7.0-r5.7z