├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── cli ├── thaumaturgy ├── thaumaturgy-build ├── thaumaturgy-configure └── thaumaturgy-deploy ├── index.js ├── lib ├── npm2 │ ├── .mailmap │ ├── .npmignore │ ├── .tern-project │ ├── .travis.yml │ ├── AUTHORS │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── bin │ │ ├── node-gyp-bin │ │ │ ├── node-gyp │ │ │ └── node-gyp.cmd │ │ ├── npm │ │ ├── npm-cli.js │ │ ├── npm.cmd │ │ └── read-package-json.js │ ├── cli.js │ ├── configure │ ├── doc │ │ ├── api │ │ │ ├── npm-bin.md │ │ │ ├── npm-bugs.md │ │ │ ├── npm-cache.md │ │ │ ├── npm-commands.md │ │ │ ├── npm-config.md │ │ │ ├── npm-deprecate.md │ │ │ ├── npm-docs.md │ │ │ ├── npm-edit.md │ │ │ ├── npm-explore.md │ │ │ ├── npm-help-search.md │ │ │ ├── npm-init.md │ │ │ ├── npm-install.md │ │ │ ├── npm-link.md │ │ │ ├── npm-load.md │ │ │ ├── npm-ls.md │ │ │ ├── npm-outdated.md │ │ │ ├── npm-owner.md │ │ │ ├── npm-pack.md │ │ │ ├── npm-ping.md │ │ │ ├── npm-prefix.md │ │ │ ├── npm-prune.md │ │ │ ├── npm-publish.md │ │ │ ├── npm-rebuild.md │ │ │ ├── npm-repo.md │ │ │ ├── npm-restart.md │ │ │ ├── npm-root.md │ │ │ ├── npm-run-script.md │ │ │ ├── npm-search.md │ │ │ ├── npm-shrinkwrap.md │ │ │ ├── npm-start.md │ │ │ ├── npm-stop.md │ │ │ ├── npm-tag.md │ │ │ ├── npm-test.md │ │ │ ├── npm-uninstall.md │ │ │ ├── npm-unpublish.md │ │ │ ├── npm-update.md │ │ │ ├── npm-version.md │ │ │ ├── npm-view.md │ │ │ ├── npm-whoami.md │ │ │ └── npm.md │ │ ├── cli │ │ │ ├── npm-access.md │ │ │ ├── npm-adduser.md │ │ │ ├── npm-bin.md │ │ │ ├── npm-bugs.md │ │ │ ├── npm-build.md │ │ │ ├── npm-bundle.md │ │ │ ├── npm-cache.md │ │ │ ├── npm-completion.md │ │ │ ├── npm-config.md │ │ │ ├── npm-dedupe.md │ │ │ ├── npm-deprecate.md │ │ │ ├── npm-dist-tag.md │ │ │ ├── npm-docs.md │ │ │ ├── npm-edit.md │ │ │ ├── npm-explore.md │ │ │ ├── npm-help-search.md │ │ │ ├── npm-help.md │ │ │ ├── npm-init.md │ │ │ ├── npm-install.md │ │ │ ├── npm-link.md │ │ │ ├── npm-logout.md │ │ │ ├── npm-ls.md │ │ │ ├── npm-outdated.md │ │ │ ├── npm-owner.md │ │ │ ├── npm-pack.md │ │ │ ├── npm-ping.md │ │ │ ├── npm-prefix.md │ │ │ ├── npm-prune.md │ │ │ ├── npm-publish.md │ │ │ ├── npm-rebuild.md │ │ │ ├── npm-repo.md │ │ │ ├── npm-restart.md │ │ │ ├── npm-rm.md │ │ │ ├── npm-root.md │ │ │ ├── npm-run-script.md │ │ │ ├── npm-search.md │ │ │ ├── npm-shrinkwrap.md │ │ │ ├── npm-star.md │ │ │ ├── npm-stars.md │ │ │ ├── npm-start.md │ │ │ ├── npm-stop.md │ │ │ ├── npm-tag.md │ │ │ ├── npm-team.md │ │ │ ├── npm-test.md │ │ │ ├── npm-uninstall.md │ │ │ ├── npm-unpublish.md │ │ │ ├── npm-update.md │ │ │ ├── npm-version.md │ │ │ ├── npm-view.md │ │ │ ├── npm-whoami.md │ │ │ └── npm.md │ │ ├── files │ │ │ ├── npm-folders.md │ │ │ ├── npmrc.md │ │ │ └── package.json.md │ │ └── misc │ │ │ ├── npm-coding-style.md │ │ │ ├── npm-config.md │ │ │ ├── npm-developers.md │ │ │ ├── npm-disputes.md │ │ │ ├── npm-faq.md │ │ │ ├── npm-index.md │ │ │ ├── npm-registry.md │ │ │ ├── npm-scope.md │ │ │ ├── npm-scripts.md │ │ │ ├── removing-npm.md │ │ │ └── semver.md │ ├── html │ │ ├── doc │ │ │ ├── README.html │ │ │ ├── api │ │ │ │ ├── npm-bin.html │ │ │ │ ├── npm-bugs.html │ │ │ │ ├── npm-cache.html │ │ │ │ ├── npm-commands.html │ │ │ │ ├── npm-config.html │ │ │ │ ├── npm-deprecate.html │ │ │ │ ├── npm-docs.html │ │ │ │ ├── npm-edit.html │ │ │ │ ├── npm-explore.html │ │ │ │ ├── npm-help-search.html │ │ │ │ ├── npm-init.html │ │ │ │ ├── npm-install.html │ │ │ │ ├── npm-link.html │ │ │ │ ├── npm-load.html │ │ │ │ ├── npm-ls.html │ │ │ │ ├── npm-outdated.html │ │ │ │ ├── npm-owner.html │ │ │ │ ├── npm-pack.html │ │ │ │ ├── npm-ping.html │ │ │ │ ├── npm-prefix.html │ │ │ │ ├── npm-prune.html │ │ │ │ ├── npm-publish.html │ │ │ │ ├── npm-rebuild.html │ │ │ │ ├── npm-repo.html │ │ │ │ ├── npm-restart.html │ │ │ │ ├── npm-root.html │ │ │ │ ├── npm-run-script.html │ │ │ │ ├── npm-search.html │ │ │ │ ├── npm-shrinkwrap.html │ │ │ │ ├── npm-start.html │ │ │ │ ├── npm-stop.html │ │ │ │ ├── npm-tag.html │ │ │ │ ├── npm-test.html │ │ │ │ ├── npm-uninstall.html │ │ │ │ ├── npm-unpublish.html │ │ │ │ ├── npm-update.html │ │ │ │ ├── npm-version.html │ │ │ │ ├── npm-view.html │ │ │ │ ├── npm-whoami.html │ │ │ │ └── npm.html │ │ │ ├── cli │ │ │ │ ├── npm-access.html │ │ │ │ ├── npm-adduser.html │ │ │ │ ├── npm-bin.html │ │ │ │ ├── npm-bugs.html │ │ │ │ ├── npm-build.html │ │ │ │ ├── npm-bundle.html │ │ │ │ ├── npm-cache.html │ │ │ │ ├── npm-completion.html │ │ │ │ ├── npm-config.html │ │ │ │ ├── npm-dedupe.html │ │ │ │ ├── npm-deprecate.html │ │ │ │ ├── npm-dist-tag.html │ │ │ │ ├── npm-docs.html │ │ │ │ ├── npm-edit.html │ │ │ │ ├── npm-explore.html │ │ │ │ ├── npm-help-search.html │ │ │ │ ├── npm-help.html │ │ │ │ ├── npm-init.html │ │ │ │ ├── npm-install.html │ │ │ │ ├── npm-link.html │ │ │ │ ├── npm-logout.html │ │ │ │ ├── npm-ls.html │ │ │ │ ├── npm-outdated.html │ │ │ │ ├── npm-owner.html │ │ │ │ ├── npm-pack.html │ │ │ │ ├── npm-ping.html │ │ │ │ ├── npm-prefix.html │ │ │ │ ├── npm-prune.html │ │ │ │ ├── npm-publish.html │ │ │ │ ├── npm-rebuild.html │ │ │ │ ├── npm-repo.html │ │ │ │ ├── npm-restart.html │ │ │ │ ├── npm-rm.html │ │ │ │ ├── npm-root.html │ │ │ │ ├── npm-run-script.html │ │ │ │ ├── npm-search.html │ │ │ │ ├── npm-shrinkwrap.html │ │ │ │ ├── npm-star.html │ │ │ │ ├── npm-stars.html │ │ │ │ ├── npm-start.html │ │ │ │ ├── npm-stop.html │ │ │ │ ├── npm-tag.html │ │ │ │ ├── npm-team.html │ │ │ │ ├── npm-test.html │ │ │ │ ├── npm-uninstall.html │ │ │ │ ├── npm-unpublish.html │ │ │ │ ├── npm-update.html │ │ │ │ ├── npm-version.html │ │ │ │ ├── npm-view.html │ │ │ │ ├── npm-whoami.html │ │ │ │ └── npm.html │ │ │ ├── files │ │ │ │ ├── npm-folders.html │ │ │ │ ├── npm-global.html │ │ │ │ ├── npm-json.html │ │ │ │ ├── npmrc.html │ │ │ │ └── package.json.html │ │ │ ├── index.html │ │ │ └── misc │ │ │ │ ├── npm-coding-style.html │ │ │ │ ├── npm-config.html │ │ │ │ ├── npm-developers.html │ │ │ │ ├── npm-disputes.html │ │ │ │ ├── npm-faq.html │ │ │ │ ├── npm-index.html │ │ │ │ ├── npm-registry.html │ │ │ │ ├── npm-scope.html │ │ │ │ ├── npm-scripts.html │ │ │ │ ├── removing-npm.html │ │ │ │ └── semver.html │ │ ├── docfoot.html │ │ ├── dochead.html │ │ ├── favicon.ico │ │ ├── index.html │ │ └── static │ │ │ ├── style.css │ │ │ └── toc.js │ ├── lib │ │ ├── access.js │ │ ├── adduser.js │ │ ├── bin.js │ │ ├── bugs.js │ │ ├── build.js │ │ ├── cache.js │ │ ├── cache │ │ │ ├── add-local-tarball.js │ │ │ ├── add-local.js │ │ │ ├── add-named.js │ │ │ ├── add-remote-git.js │ │ │ ├── add-remote-tarball.js │ │ │ ├── cached-package-root.js │ │ │ ├── caching-client.js │ │ │ ├── get-stat.js │ │ │ └── update-index.js │ │ ├── completion.js │ │ ├── config.js │ │ ├── config │ │ │ ├── clear-credentials-by-uri.js │ │ │ ├── core.js │ │ │ ├── defaults.js │ │ │ ├── find-prefix.js │ │ │ ├── get-credentials-by-uri.js │ │ │ ├── load-cafile.js │ │ │ ├── load-prefix.js │ │ │ ├── load-uid.js │ │ │ ├── nerf-dart.js │ │ │ ├── set-credentials-by-uri.js │ │ │ └── set-user.js │ │ ├── dedupe.js │ │ ├── deprecate.js │ │ ├── dist-tag.js │ │ ├── docs.js │ │ ├── edit.js │ │ ├── explore.js │ │ ├── faq.js │ │ ├── get.js │ │ ├── help-search.js │ │ ├── help.js │ │ ├── init.js │ │ ├── install.js │ │ ├── link.js │ │ ├── logout.js │ │ ├── ls.js │ │ ├── npm.js │ │ ├── outdated.js │ │ ├── owner.js │ │ ├── pack.js │ │ ├── ping.js │ │ ├── prefix.js │ │ ├── prune.js │ │ ├── publish.js │ │ ├── rebuild.js │ │ ├── repo.js │ │ ├── restart.js │ │ ├── root.js │ │ ├── run-script.js │ │ ├── search.js │ │ ├── set.js │ │ ├── shrinkwrap.js │ │ ├── star.js │ │ ├── stars.js │ │ ├── start.js │ │ ├── stop.js │ │ ├── substack.js │ │ ├── tag.js │ │ ├── team.js │ │ ├── test.js │ │ ├── unbuild.js │ │ ├── uninstall.js │ │ ├── unpublish.js │ │ ├── update.js │ │ ├── utils │ │ │ ├── completion.sh │ │ │ ├── completion │ │ │ │ ├── file-completion.js │ │ │ │ ├── installed-deep.js │ │ │ │ └── installed-shallow.js │ │ │ ├── correct-mkdir.js │ │ │ ├── depr-check.js │ │ │ ├── error-handler.js │ │ │ ├── gently-rm.js │ │ │ ├── get-publish-config.js │ │ │ ├── git.js │ │ │ ├── lifecycle.js │ │ │ ├── link.js │ │ │ ├── locker.js │ │ │ ├── map-to-registry.js │ │ │ ├── read-local-package.js │ │ │ ├── spawn.js │ │ │ ├── tar.js │ │ │ ├── umask.js │ │ │ └── warn-deprecated.js │ │ ├── version.js │ │ ├── view.js │ │ ├── visnup.js │ │ ├── whoami.js │ │ └── xmas.js │ ├── make.bat │ ├── man │ │ ├── man1 │ │ │ ├── npm-README.1 │ │ │ ├── npm-access.1 │ │ │ ├── npm-adduser.1 │ │ │ ├── npm-bin.1 │ │ │ ├── npm-bugs.1 │ │ │ ├── npm-build.1 │ │ │ ├── npm-bundle.1 │ │ │ ├── npm-cache.1 │ │ │ ├── npm-completion.1 │ │ │ ├── npm-config.1 │ │ │ ├── npm-dedupe.1 │ │ │ ├── npm-deprecate.1 │ │ │ ├── npm-dist-tag.1 │ │ │ ├── npm-docs.1 │ │ │ ├── npm-edit.1 │ │ │ ├── npm-explore.1 │ │ │ ├── npm-help-search.1 │ │ │ ├── npm-help.1 │ │ │ ├── npm-init.1 │ │ │ ├── npm-install.1 │ │ │ ├── npm-link.1 │ │ │ ├── npm-logout.1 │ │ │ ├── npm-ls.1 │ │ │ ├── npm-outdated.1 │ │ │ ├── npm-owner.1 │ │ │ ├── npm-pack.1 │ │ │ ├── npm-ping.1 │ │ │ ├── npm-prefix.1 │ │ │ ├── npm-prune.1 │ │ │ ├── npm-publish.1 │ │ │ ├── npm-rebuild.1 │ │ │ ├── npm-repo.1 │ │ │ ├── npm-restart.1 │ │ │ ├── npm-rm.1 │ │ │ ├── npm-root.1 │ │ │ ├── npm-run-script.1 │ │ │ ├── npm-search.1 │ │ │ ├── npm-shrinkwrap.1 │ │ │ ├── npm-star.1 │ │ │ ├── npm-stars.1 │ │ │ ├── npm-start.1 │ │ │ ├── npm-stop.1 │ │ │ ├── npm-tag.1 │ │ │ ├── npm-team.1 │ │ │ ├── npm-test.1 │ │ │ ├── npm-uninstall.1 │ │ │ ├── npm-unpublish.1 │ │ │ ├── npm-update.1 │ │ │ ├── npm-version.1 │ │ │ ├── npm-view.1 │ │ │ ├── npm-whoami.1 │ │ │ └── npm.1 │ │ ├── man3 │ │ │ ├── npm-bin.3 │ │ │ ├── npm-bugs.3 │ │ │ ├── npm-cache.3 │ │ │ ├── npm-commands.3 │ │ │ ├── npm-config.3 │ │ │ ├── npm-deprecate.3 │ │ │ ├── npm-docs.3 │ │ │ ├── npm-edit.3 │ │ │ ├── npm-explore.3 │ │ │ ├── npm-help-search.3 │ │ │ ├── npm-init.3 │ │ │ ├── npm-install.3 │ │ │ ├── npm-link.3 │ │ │ ├── npm-load.3 │ │ │ ├── npm-ls.3 │ │ │ ├── npm-outdated.3 │ │ │ ├── npm-owner.3 │ │ │ ├── npm-pack.3 │ │ │ ├── npm-ping.3 │ │ │ ├── npm-prefix.3 │ │ │ ├── npm-prune.3 │ │ │ ├── npm-publish.3 │ │ │ ├── npm-rebuild.3 │ │ │ ├── npm-repo.3 │ │ │ ├── npm-restart.3 │ │ │ ├── npm-root.3 │ │ │ ├── npm-run-script.3 │ │ │ ├── npm-search.3 │ │ │ ├── npm-shrinkwrap.3 │ │ │ ├── npm-start.3 │ │ │ ├── npm-stop.3 │ │ │ ├── npm-tag.3 │ │ │ ├── npm-test.3 │ │ │ ├── npm-uninstall.3 │ │ │ ├── npm-unpublish.3 │ │ │ ├── npm-update.3 │ │ │ ├── npm-version.3 │ │ │ ├── npm-view.3 │ │ │ ├── npm-whoami.3 │ │ │ └── npm.3 │ │ ├── man5 │ │ │ ├── npm-folders.5 │ │ │ ├── npm-global.5 │ │ │ ├── npm-json.5 │ │ │ ├── npmrc.5 │ │ │ └── package.json.5 │ │ └── man7 │ │ │ ├── npm-coding-style.7 │ │ │ ├── npm-config.7 │ │ │ ├── npm-developers.7 │ │ │ ├── npm-disputes.7 │ │ │ ├── npm-faq.7 │ │ │ ├── npm-index.7 │ │ │ ├── npm-registry.7 │ │ │ ├── npm-scope.7 │ │ │ ├── npm-scripts.7 │ │ │ ├── removing-npm.7 │ │ │ └── semver.7 │ ├── package.json │ ├── scripts │ │ ├── clean-old.sh │ │ ├── doc-build.sh │ │ ├── index-build.js │ │ ├── install.sh │ │ ├── publish-tag.js │ │ ├── release.sh │ │ ├── relocate.sh │ │ └── update-authors.sh │ ├── test │ │ ├── common-tap.js │ │ ├── common.js │ │ ├── disabled │ │ │ ├── bundlerecurs │ │ │ │ └── package.json │ │ │ ├── change-bin-1 │ │ │ │ ├── bin │ │ │ │ │ └── foo │ │ │ │ └── package.json │ │ │ ├── change-bin-2 │ │ │ │ ├── bin │ │ │ │ │ └── bar │ │ │ │ └── package.json │ │ │ ├── failer │ │ │ │ └── package.json │ │ │ ├── fast │ │ │ │ └── package.json │ │ │ ├── package-bar │ │ │ │ └── package.json │ │ │ ├── package-config │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── package-foo │ │ │ │ └── package.json │ │ │ └── slow │ │ │ │ └── package.json │ │ ├── fixtures │ │ │ ├── config │ │ │ │ ├── builtin │ │ │ │ ├── globalconfig │ │ │ │ ├── malformed │ │ │ │ ├── multi-ca │ │ │ │ ├── package.json │ │ │ │ ├── userconfig │ │ │ │ └── userconfig-with-gc │ │ │ ├── forked-underscore-1.5.1.tgz │ │ │ ├── github-com-BryanDonovan-dummy-npm-bar.git.tar.gz │ │ │ ├── github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz │ │ │ ├── github-com-BryanDonovan-dummy-npm-foo.git.tar.gz │ │ │ ├── github-com-BryanDonovan-npm-git-test.git.tar.gz │ │ │ ├── gitignore-and-npmignore-2.tar │ │ │ ├── gitignore-and-npmignore.tar │ │ │ ├── gitignore-and-npmignore.tgz │ │ │ ├── gitignore.tgz │ │ │ ├── npmignore.tgz │ │ │ └── scoped-underscore-1.3.1.tgz │ │ ├── packages │ │ │ ├── npm-test-array-bin │ │ │ │ ├── README │ │ │ │ ├── bin │ │ │ │ │ └── array-bin │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── npm-test-blerg │ │ │ │ ├── README │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── npm-test-blerg3 │ │ │ │ ├── README │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── npm-test-bundled-git │ │ │ │ ├── README │ │ │ │ ├── minimatch-expected.json │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── npm-test-dir-bin │ │ │ │ ├── README │ │ │ │ ├── bin │ │ │ │ │ └── dir-bin │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── npm-test-env-reader │ │ │ │ ├── README │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── npm-test-files │ │ │ │ ├── .npmignore │ │ │ │ ├── include4 │ │ │ │ ├── package.json │ │ │ │ ├── sub │ │ │ │ │ ├── include │ │ │ │ │ ├── include2 │ │ │ │ │ └── include4 │ │ │ │ └── test.sh │ │ │ ├── npm-test-ignore-nested-nm │ │ │ │ ├── README │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── npm-test-ignore │ │ │ │ ├── .npmignore │ │ │ │ ├── README │ │ │ │ ├── include4 │ │ │ │ ├── package.json │ │ │ │ ├── sub │ │ │ │ │ ├── include │ │ │ │ │ ├── include2 │ │ │ │ │ └── include4 │ │ │ │ └── test.sh │ │ │ ├── npm-test-missing-bindir │ │ │ │ ├── README │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── npm-test-optional-deps │ │ │ │ ├── README │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── npm-test-platform-all │ │ │ │ ├── README │ │ │ │ └── package.json │ │ │ ├── npm-test-platform │ │ │ │ ├── README │ │ │ │ └── package.json │ │ │ ├── npm-test-private │ │ │ │ ├── README │ │ │ │ └── package.json │ │ │ ├── npm-test-shrinkwrap │ │ │ │ ├── README │ │ │ │ ├── npm-shrinkwrap.json │ │ │ │ ├── package.json │ │ │ │ └── test.js │ │ │ ├── npm-test-test-package │ │ │ │ ├── README │ │ │ │ └── package.json │ │ │ └── npm-test-url-dep │ │ │ │ ├── README │ │ │ │ └── package.json │ │ ├── run.js │ │ ├── tap │ │ │ ├── 00-check-mock-dep.js │ │ │ ├── 00-config-setup.js │ │ │ ├── 00-verify-bundle-deps.js │ │ │ ├── 00-verify-ls-ok.js │ │ │ ├── 404-parent.js │ │ │ ├── 404-private-registry-scoped.js │ │ │ ├── 404-private-registry.js │ │ │ ├── access.js │ │ │ ├── add-named-update-protocol-port.js │ │ │ ├── add-remote-git-fake-windows.js │ │ │ ├── add-remote-git-file.js │ │ │ ├── add-remote-git-get-resolved.js │ │ │ ├── add-remote-git-shrinkwrap.js │ │ │ ├── add-remote-git.js │ │ │ ├── adduser-always-auth.js │ │ │ ├── adduser-legacy-auth.js │ │ │ ├── bin.js │ │ │ ├── bitbucket-https-url-with-creds-package.js │ │ │ ├── bitbucket-https-url-with-creds.js │ │ │ ├── bitbucket-shortcut-package.js │ │ │ ├── bitbucket-shortcut.js │ │ │ ├── bugs.js │ │ │ ├── build-already-built.js │ │ │ ├── builtin-config.js │ │ │ ├── bundled-dependencies-nonarray.js │ │ │ ├── cache-add-localdir-fallback.js │ │ │ ├── cache-add-unpublished.js │ │ │ ├── cache-shasum-fork.js │ │ │ ├── cache-shasum.js │ │ │ ├── circular-dep.js │ │ │ ├── config-basic.js │ │ │ ├── config-builtin.js │ │ │ ├── config-certfile.js │ │ │ ├── config-credentials.js │ │ │ ├── config-edit.js │ │ │ ├── config-malformed.js │ │ │ ├── config-meta.js │ │ │ ├── config-new-cafile.js │ │ │ ├── config-private.js │ │ │ ├── config-project.js │ │ │ ├── config-save.js │ │ │ ├── dedupe-scoped.js │ │ │ ├── dedupe.js │ │ │ ├── deprecate.js │ │ │ ├── dist-tag.js │ │ │ ├── false-name.js │ │ │ ├── gently-rm-overeager.js │ │ │ ├── gently-rm-symlink.js │ │ │ ├── get.js │ │ │ ├── gist-short-shortcut-package.js │ │ │ ├── gist-short-shortcut.js │ │ │ ├── gist-shortcut-package.js │ │ │ ├── gist-shortcut.js │ │ │ ├── git-cache-locking.js │ │ │ ├── git-cache-no-hooks.js │ │ │ ├── git-dependency-install-link.js │ │ │ ├── git-npmignore.js │ │ │ ├── git-races.js │ │ │ ├── github-shortcut-package.js │ │ │ ├── github-shortcut.js │ │ │ ├── gitlab-shortcut-package.js │ │ │ ├── gitlab-shortcut.js │ │ │ ├── global-prefix-set-in-userconfig.js │ │ │ ├── graceful-restart.js │ │ │ ├── ignore-install-link.js │ │ │ ├── ignore-scripts.js │ │ │ ├── ignore-shrinkwrap.js │ │ │ ├── init-interrupt.js │ │ │ ├── install-at-locally.js │ │ │ ├── install-bad-man.js │ │ │ ├── install-cli-production.js │ │ │ ├── install-cli-unicode.js │ │ │ ├── install-from-local.js │ │ │ ├── install-link-scripts.js │ │ │ ├── install-man.js │ │ │ ├── install-noargs-dev.js │ │ │ ├── install-preferglobal-warnings.js │ │ │ ├── install-save-exact.js │ │ │ ├── install-save-local.js │ │ │ ├── install-save-prefix.js │ │ │ ├── install-scoped-already-installed.js │ │ │ ├── install-scoped-link.js │ │ │ ├── install-scoped-with-peer-dependency.js │ │ │ ├── install-with-dev-dep-duplicate.js │ │ │ ├── invalid-cmd-exit-code.js │ │ │ ├── lifecycle-path.js │ │ │ ├── lifecycle-signal.js │ │ │ ├── lifecycle.js │ │ │ ├── link.js │ │ │ ├── locker.js │ │ │ ├── logout.js │ │ │ ├── ls-depth-cli.js │ │ │ ├── ls-depth-unmet.js │ │ │ ├── ls-env.js │ │ │ ├── ls-l-depth-0.js │ │ │ ├── ls-no-results.js │ │ │ ├── map-to-registry.js │ │ │ ├── nerf-dart.js │ │ │ ├── nested-extraneous.js │ │ │ ├── noargs-install-config-save.js │ │ │ ├── npm-api-not-loaded-error.js │ │ │ ├── optional-metadep-rollback-collision.js │ │ │ ├── outdated-color.js │ │ │ ├── outdated-depth-deep.js │ │ │ ├── outdated-depth-integer.js │ │ │ ├── outdated-depth.js │ │ │ ├── outdated-git.js │ │ │ ├── outdated-include-devdependencies.js │ │ │ ├── outdated-json.js │ │ │ ├── outdated-local.js │ │ │ ├── outdated-long.js │ │ │ ├── outdated-new-versions.js │ │ │ ├── outdated-notarget.js │ │ │ ├── outdated-private.js │ │ │ ├── outdated.js │ │ │ ├── owner.js │ │ │ ├── pack-scoped.js │ │ │ ├── peer-deps-invalid.js │ │ │ ├── peer-deps-toplevel.js │ │ │ ├── peer-deps-without-package-json.js │ │ │ ├── peer-deps.js │ │ │ ├── ping.js │ │ │ ├── prepublish.js │ │ │ ├── prune.js │ │ │ ├── publish-access-scoped.js │ │ │ ├── publish-access-unscoped-restricted-fails.js │ │ │ ├── publish-access-unscoped.js │ │ │ ├── publish-config.js │ │ │ ├── publish-invalid-semver-tag.js │ │ │ ├── publish-scoped.js │ │ │ ├── pwd-prefix.js │ │ │ ├── referer.js │ │ │ ├── registry.js │ │ │ ├── repo.js │ │ │ ├── run-script-filter-private.js │ │ │ ├── run-script.js │ │ │ ├── scripts-whitespace-windows.js │ │ │ ├── search.js │ │ │ ├── semver-doc.js │ │ │ ├── semver-tag.js │ │ │ ├── shrinkwrap-dev-dependency.js │ │ │ ├── shrinkwrap-empty-deps.js │ │ │ ├── shrinkwrap-local-dependency.js │ │ │ ├── shrinkwrap-prod-dependency.js │ │ │ ├── shrinkwrap-scoped-auth.js │ │ │ ├── shrinkwrap-shared-dev-dependency.js │ │ │ ├── sorted-package-json.js │ │ │ ├── spawn-enoent-help.js │ │ │ ├── spawn-enoent.js │ │ │ ├── splat-with-only-prerelease-to-latest.js │ │ │ ├── startstop.js │ │ │ ├── tag-version-prefix.js │ │ │ ├── team.js │ │ │ ├── test-run-ls.js │ │ │ ├── umask-lifecycle.js │ │ │ ├── uninstall-package.js │ │ │ ├── unpack-foreign-tarball.js │ │ │ ├── unpublish-config.js │ │ │ ├── update-examples.js │ │ │ ├── update-index.js │ │ │ ├── update-save.js │ │ │ ├── url-dependencies.js │ │ │ ├── version-git-not-clean.js │ │ │ ├── version-lifecycle.js │ │ │ ├── version-message-config.js │ │ │ ├── version-no-git.js │ │ │ ├── version-no-package.js │ │ │ ├── version-no-tags.js │ │ │ ├── version-update-shrinkwrap.js │ │ │ ├── view.js │ │ │ ├── whoami.js │ │ │ └── zz-cleanup.js │ │ └── update-test.sh │ └── wercker.yml └── npm3 │ ├── .mailmap │ ├── .npmignore │ ├── .travis.yml │ ├── AUTHORS │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── bin │ ├── node-gyp-bin │ │ ├── node-gyp │ │ └── node-gyp.cmd │ ├── npm │ ├── npm-cli.js │ ├── npm.cmd │ └── read-package-json.js │ ├── cli.js │ ├── configure │ ├── doc │ ├── cli │ │ ├── npm-access.md │ │ ├── npm-adduser.md │ │ ├── npm-bin.md │ │ ├── npm-bugs.md │ │ ├── npm-build.md │ │ ├── npm-bundle.md │ │ ├── npm-cache.md │ │ ├── npm-completion.md │ │ ├── npm-config.md │ │ ├── npm-dedupe.md │ │ ├── npm-deprecate.md │ │ ├── npm-dist-tag.md │ │ ├── npm-docs.md │ │ ├── npm-edit.md │ │ ├── npm-explore.md │ │ ├── npm-help-search.md │ │ ├── npm-help.md │ │ ├── npm-init.md │ │ ├── npm-install.md │ │ ├── npm-link.md │ │ ├── npm-logout.md │ │ ├── npm-ls.md │ │ ├── npm-outdated.md │ │ ├── npm-owner.md │ │ ├── npm-pack.md │ │ ├── npm-ping.md │ │ ├── npm-prefix.md │ │ ├── npm-prune.md │ │ ├── npm-publish.md │ │ ├── npm-rebuild.md │ │ ├── npm-repo.md │ │ ├── npm-restart.md │ │ ├── npm-root.md │ │ ├── npm-run-script.md │ │ ├── npm-search.md │ │ ├── npm-shrinkwrap.md │ │ ├── npm-star.md │ │ ├── npm-stars.md │ │ ├── npm-start.md │ │ ├── npm-stop.md │ │ ├── npm-tag.md │ │ ├── npm-team.md │ │ ├── npm-test.md │ │ ├── npm-uninstall.md │ │ ├── npm-unpublish.md │ │ ├── npm-update.md │ │ ├── npm-version.md │ │ ├── npm-view.md │ │ ├── npm-whoami.md │ │ └── npm.md │ ├── files │ │ ├── npm-folders.md │ │ ├── npmrc.md │ │ └── package.json.md │ └── misc │ │ ├── npm-coding-style.md │ │ ├── npm-config.md │ │ ├── npm-developers.md │ │ ├── npm-disputes.md │ │ ├── npm-faq.md │ │ ├── npm-index.md │ │ ├── npm-registry.md │ │ ├── npm-scope.md │ │ ├── npm-scripts.md │ │ ├── removing-npm.md │ │ └── semver.md │ ├── html │ ├── doc │ │ ├── README.html │ │ ├── api │ │ │ ├── npm-bin.html │ │ │ ├── npm-bugs.html │ │ │ ├── npm-cache.html │ │ │ ├── npm-commands.html │ │ │ ├── npm-config.html │ │ │ ├── npm-deprecate.html │ │ │ ├── npm-docs.html │ │ │ ├── npm-edit.html │ │ │ ├── npm-explore.html │ │ │ ├── npm-help-search.html │ │ │ ├── npm-init.html │ │ │ ├── npm-install.html │ │ │ ├── npm-link.html │ │ │ ├── npm-load.html │ │ │ ├── npm-ls.html │ │ │ ├── npm-outdated.html │ │ │ ├── npm-owner.html │ │ │ ├── npm-pack.html │ │ │ ├── npm-ping.html │ │ │ ├── npm-prefix.html │ │ │ ├── npm-prune.html │ │ │ ├── npm-publish.html │ │ │ ├── npm-rebuild.html │ │ │ ├── npm-repo.html │ │ │ ├── npm-restart.html │ │ │ ├── npm-root.html │ │ │ ├── npm-run-script.html │ │ │ ├── npm-search.html │ │ │ ├── npm-shrinkwrap.html │ │ │ ├── npm-start.html │ │ │ ├── npm-stop.html │ │ │ ├── npm-tag.html │ │ │ ├── npm-test.html │ │ │ ├── npm-uninstall.html │ │ │ ├── npm-unpublish.html │ │ │ ├── npm-update.html │ │ │ ├── npm-version.html │ │ │ ├── npm-view.html │ │ │ ├── npm-whoami.html │ │ │ └── npm.html │ │ ├── cli │ │ │ ├── npm-access.html │ │ │ ├── npm-adduser.html │ │ │ ├── npm-bin.html │ │ │ ├── npm-bugs.html │ │ │ ├── npm-build.html │ │ │ ├── npm-bundle.html │ │ │ ├── npm-cache.html │ │ │ ├── npm-completion.html │ │ │ ├── npm-config.html │ │ │ ├── npm-dedupe.html │ │ │ ├── npm-deprecate.html │ │ │ ├── npm-dist-tag.html │ │ │ ├── npm-docs.html │ │ │ ├── npm-edit.html │ │ │ ├── npm-explore.html │ │ │ ├── npm-help-search.html │ │ │ ├── npm-help.html │ │ │ ├── npm-init.html │ │ │ ├── npm-install.html │ │ │ ├── npm-link.html │ │ │ ├── npm-logout.html │ │ │ ├── npm-ls.html │ │ │ ├── npm-outdated.html │ │ │ ├── npm-owner.html │ │ │ ├── npm-pack.html │ │ │ ├── npm-ping.html │ │ │ ├── npm-prefix.html │ │ │ ├── npm-prune.html │ │ │ ├── npm-publish.html │ │ │ ├── npm-rebuild.html │ │ │ ├── npm-repo.html │ │ │ ├── npm-restart.html │ │ │ ├── npm-root.html │ │ │ ├── npm-run-script.html │ │ │ ├── npm-search.html │ │ │ ├── npm-shrinkwrap.html │ │ │ ├── npm-star.html │ │ │ ├── npm-stars.html │ │ │ ├── npm-start.html │ │ │ ├── npm-stop.html │ │ │ ├── npm-tag.html │ │ │ ├── npm-team.html │ │ │ ├── npm-test.html │ │ │ ├── npm-uninstall.html │ │ │ ├── npm-unpublish.html │ │ │ ├── npm-update.html │ │ │ ├── npm-version.html │ │ │ ├── npm-view.html │ │ │ ├── npm-whoami.html │ │ │ └── npm.html │ │ ├── files │ │ │ ├── npm-folders.html │ │ │ ├── npm-global.html │ │ │ ├── npm-json.html │ │ │ ├── npmrc.html │ │ │ └── package.json.html │ │ ├── index.html │ │ └── misc │ │ │ ├── npm-coding-style.html │ │ │ ├── npm-config.html │ │ │ ├── npm-developers.html │ │ │ ├── npm-disputes.html │ │ │ ├── npm-faq.html │ │ │ ├── npm-index.html │ │ │ ├── npm-registry.html │ │ │ ├── npm-scope.html │ │ │ ├── npm-scripts.html │ │ │ ├── removing-npm.html │ │ │ └── semver.html │ ├── docfoot.html │ ├── dochead.html │ ├── favicon.ico │ ├── index.html │ └── static │ │ ├── style.css │ │ └── toc.js │ ├── lib │ ├── access.js │ ├── adduser.js │ ├── bin.js │ ├── bugs.js │ ├── build.js │ ├── cache.js │ ├── cache │ │ ├── add-local-tarball.js │ │ ├── add-local.js │ │ ├── add-named.js │ │ ├── add-remote-git.js │ │ ├── add-remote-tarball.js │ │ ├── cached-package-root.js │ │ ├── caching-client.js │ │ ├── get-stat.js │ │ └── update-index.js │ ├── completion.js │ ├── config.js │ ├── config │ │ ├── clear-credentials-by-uri.js │ │ ├── core.js │ │ ├── defaults.js │ │ ├── find-prefix.js │ │ ├── get-credentials-by-uri.js │ │ ├── load-cafile.js │ │ ├── load-prefix.js │ │ ├── load-uid.js │ │ ├── nerf-dart.js │ │ ├── set-credentials-by-uri.js │ │ └── set-user.js │ ├── dedupe.js │ ├── deprecate.js │ ├── dist-tag.js │ ├── docs.js │ ├── edit.js │ ├── explore.js │ ├── faq.js │ ├── fetch-package-metadata.js │ ├── fetch-package-metadata.md │ ├── get.js │ ├── help-search.js │ ├── help.js │ ├── init.js │ ├── install.js │ ├── install │ │ ├── access-error.js │ │ ├── action │ │ │ ├── build.js │ │ │ ├── extract.js │ │ │ ├── fetch.js │ │ │ ├── finalize.js │ │ │ ├── global-install.js │ │ │ ├── global-link.js │ │ │ ├── install.js │ │ │ ├── move.js │ │ │ ├── postinstall.js │ │ │ ├── preinstall.js │ │ │ ├── prepublish.js │ │ │ ├── remove.js │ │ │ ├── test.js │ │ │ └── update-linked.js │ │ ├── actions.js │ │ ├── and-add-parent-to-errors.js │ │ ├── and-finish-tracker.js │ │ ├── and-ignore-errors.js │ │ ├── check-permissions.js │ │ ├── decompose-actions.js │ │ ├── deps.js │ │ ├── diff-trees.js │ │ ├── exists.js │ │ ├── filter-invalid-actions.js │ │ ├── flatten-tree.js │ │ ├── get-package-id.js │ │ ├── inflate-bundled.js │ │ ├── inflate-shrinkwrap.js │ │ ├── is-dev.js │ │ ├── is-extraneous.js │ │ ├── is-fs-access-available.js │ │ ├── logical-tree.js │ │ ├── node.js │ │ ├── prune-tree.js │ │ ├── read-shrinkwrap.js │ │ ├── save.js │ │ ├── update-package-json.js │ │ ├── validate-args.js │ │ ├── validate-tree.js │ │ └── writable.js │ ├── link.js │ ├── logout.js │ ├── ls.js │ ├── npm.js │ ├── outdated.js │ ├── owner.js │ ├── pack.js │ ├── ping.js │ ├── prefix.js │ ├── prune.js │ ├── publish.js │ ├── rebuild.js │ ├── repo.js │ ├── restart.js │ ├── root.js │ ├── run-script.js │ ├── search.js │ ├── set.js │ ├── shrinkwrap.js │ ├── star.js │ ├── stars.js │ ├── start.js │ ├── stop.js │ ├── substack.js │ ├── tag.js │ ├── team.js │ ├── test.js │ ├── unbuild.js │ ├── uninstall.js │ ├── unpublish.js │ ├── update.js │ ├── utils │ │ ├── completion.sh │ │ ├── completion │ │ │ ├── file-completion.js │ │ │ ├── installed-deep.js │ │ │ └── installed-shallow.js │ │ ├── correct-mkdir.js │ │ ├── deep-sort-object.js │ │ ├── depr-check.js │ │ ├── error-handler.js │ │ ├── gently-rm.js │ │ ├── get-publish-config.js │ │ ├── git.js │ │ ├── lifecycle.js │ │ ├── link.js │ │ ├── locker.js │ │ ├── map-to-registry.js │ │ ├── parse-json.js │ │ ├── pulse-till-done.js │ │ ├── read-local-package.js │ │ ├── spawn.js │ │ ├── tar.js │ │ ├── temp-filename.js │ │ ├── umask.js │ │ └── warn-deprecated.js │ ├── version.js │ ├── view.js │ ├── visnup.js │ ├── whoami.js │ └── xmas.js │ ├── make.bat │ ├── man │ ├── man1 │ │ ├── npm-README.1 │ │ ├── npm-access.1 │ │ ├── npm-adduser.1 │ │ ├── npm-bin.1 │ │ ├── npm-bugs.1 │ │ ├── npm-build.1 │ │ ├── npm-bundle.1 │ │ ├── npm-cache.1 │ │ ├── npm-completion.1 │ │ ├── npm-config.1 │ │ ├── npm-dedupe.1 │ │ ├── npm-deprecate.1 │ │ ├── npm-dist-tag.1 │ │ ├── npm-docs.1 │ │ ├── npm-edit.1 │ │ ├── npm-explore.1 │ │ ├── npm-help-search.1 │ │ ├── npm-help.1 │ │ ├── npm-init.1 │ │ ├── npm-install.1 │ │ ├── npm-link.1 │ │ ├── npm-logout.1 │ │ ├── npm-ls.1 │ │ ├── npm-outdated.1 │ │ ├── npm-owner.1 │ │ ├── npm-pack.1 │ │ ├── npm-ping.1 │ │ ├── npm-prefix.1 │ │ ├── npm-prune.1 │ │ ├── npm-publish.1 │ │ ├── npm-rebuild.1 │ │ ├── npm-repo.1 │ │ ├── npm-restart.1 │ │ ├── npm-root.1 │ │ ├── npm-run-script.1 │ │ ├── npm-search.1 │ │ ├── npm-shrinkwrap.1 │ │ ├── npm-star.1 │ │ ├── npm-stars.1 │ │ ├── npm-start.1 │ │ ├── npm-stop.1 │ │ ├── npm-tag.1 │ │ ├── npm-team.1 │ │ ├── npm-test.1 │ │ ├── npm-uninstall.1 │ │ ├── npm-unpublish.1 │ │ ├── npm-update.1 │ │ ├── npm-version.1 │ │ ├── npm-view.1 │ │ ├── npm-whoami.1 │ │ └── npm.1 │ ├── man3 │ │ ├── npm-bin.3 │ │ ├── npm-bugs.3 │ │ ├── npm-cache.3 │ │ ├── npm-commands.3 │ │ ├── npm-config.3 │ │ ├── npm-deprecate.3 │ │ ├── npm-docs.3 │ │ ├── npm-edit.3 │ │ ├── npm-explore.3 │ │ ├── npm-help-search.3 │ │ ├── npm-init.3 │ │ ├── npm-install.3 │ │ ├── npm-link.3 │ │ ├── npm-load.3 │ │ ├── npm-ls.3 │ │ ├── npm-outdated.3 │ │ ├── npm-owner.3 │ │ ├── npm-pack.3 │ │ ├── npm-ping.3 │ │ ├── npm-prefix.3 │ │ ├── npm-prune.3 │ │ ├── npm-publish.3 │ │ ├── npm-rebuild.3 │ │ ├── npm-repo.3 │ │ ├── npm-restart.3 │ │ ├── npm-root.3 │ │ ├── npm-run-script.3 │ │ ├── npm-search.3 │ │ ├── npm-shrinkwrap.3 │ │ ├── npm-start.3 │ │ ├── npm-stop.3 │ │ ├── npm-tag.3 │ │ ├── npm-test.3 │ │ ├── npm-uninstall.3 │ │ ├── npm-unpublish.3 │ │ ├── npm-update.3 │ │ ├── npm-version.3 │ │ ├── npm-view.3 │ │ ├── npm-whoami.3 │ │ └── npm.3 │ ├── man5 │ │ ├── npm-folders.5 │ │ ├── npm-global.5 │ │ ├── npm-json.5 │ │ ├── npmrc.5 │ │ └── package.json.5 │ └── man7 │ │ ├── npm-coding-style.7 │ │ ├── npm-config.7 │ │ ├── npm-developers.7 │ │ ├── npm-disputes.7 │ │ ├── npm-faq.7 │ │ ├── npm-index.7 │ │ ├── npm-registry.7 │ │ ├── npm-scope.7 │ │ ├── npm-scripts.7 │ │ ├── removing-npm.7 │ │ └── semver.7 │ ├── package.json │ ├── scripts │ ├── clean-old.sh │ ├── doc-build.sh │ ├── index-build.js │ ├── install.sh │ ├── installable.sh │ ├── publish-tag.js │ ├── release.sh │ ├── relocate.sh │ └── update-authors.sh │ ├── test │ ├── common-tap.js │ ├── disabled │ │ ├── bundlerecurs │ │ │ └── package.json │ │ ├── change-bin-1 │ │ │ ├── bin │ │ │ │ └── foo │ │ │ └── package.json │ │ ├── change-bin-2 │ │ │ ├── bin │ │ │ │ └── bar │ │ │ └── package.json │ │ ├── failer │ │ │ └── package.json │ │ ├── fast │ │ │ └── package.json │ │ ├── package-bar │ │ │ └── package.json │ │ ├── package-config │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── package-foo │ │ │ └── package.json │ │ └── slow │ │ │ └── package.json │ ├── fixtures │ │ ├── config │ │ │ ├── builtin │ │ │ ├── globalconfig │ │ │ ├── malformed │ │ │ ├── multi-ca │ │ │ ├── package.json │ │ │ ├── userconfig │ │ │ └── userconfig-with-gc │ │ ├── forked-underscore-1.5.1.tgz │ │ ├── github-com-BryanDonovan-dummy-npm-bar.git.tar.gz │ │ ├── github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz │ │ ├── github-com-BryanDonovan-dummy-npm-foo.git.tar.gz │ │ ├── github-com-BryanDonovan-npm-git-test.git.tar.gz │ │ ├── gitignore-and-npmignore-2.tar │ │ ├── gitignore-and-npmignore.tar │ │ ├── gitignore-and-npmignore.tgz │ │ ├── gitignore.tgz │ │ ├── npmignore.tgz │ │ └── scoped-underscore-1.3.1.tgz │ ├── packages │ │ ├── npm-test-array-bin │ │ │ ├── README │ │ │ ├── bin │ │ │ │ └── array-bin │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── npm-test-blerg │ │ │ ├── README │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── npm-test-blerg3 │ │ │ ├── README │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── npm-test-bundled-git │ │ │ ├── README │ │ │ ├── minimatch-expected.json │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── npm-test-dir-bin │ │ │ ├── README │ │ │ ├── bin │ │ │ │ └── dir-bin │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── npm-test-env-reader │ │ │ ├── README │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── npm-test-files │ │ │ ├── .npmignore │ │ │ ├── include4 │ │ │ ├── package.json │ │ │ ├── sub │ │ │ │ ├── include │ │ │ │ ├── include2 │ │ │ │ └── include4 │ │ │ └── test.sh │ │ ├── npm-test-ignore-nested-nm │ │ │ ├── README │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── npm-test-ignore │ │ │ ├── .npmignore │ │ │ ├── README │ │ │ ├── include4 │ │ │ ├── package.json │ │ │ ├── sub │ │ │ │ ├── include │ │ │ │ ├── include2 │ │ │ │ └── include4 │ │ │ └── test.sh │ │ ├── npm-test-missing-bindir │ │ │ ├── README │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── npm-test-optional-deps │ │ │ ├── README │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── npm-test-platform-all │ │ │ ├── README │ │ │ └── package.json │ │ ├── npm-test-platform │ │ │ ├── README │ │ │ └── package.json │ │ ├── npm-test-private │ │ │ ├── README │ │ │ └── package.json │ │ ├── npm-test-shrinkwrap │ │ │ ├── README │ │ │ ├── npm-shrinkwrap.json │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── npm-test-test-package │ │ │ ├── README │ │ │ └── package.json │ │ └── npm-test-url-dep │ │ │ ├── README │ │ │ └── package.json │ ├── run.js │ ├── tap │ │ ├── 00-check-mock-dep.js │ │ ├── 00-config-setup.js │ │ ├── 00-verify-bundle-deps.js │ │ ├── 00-verify-ls-ok.js │ │ ├── 404-parent.js │ │ ├── 404-private-registry-scoped.js │ │ ├── 404-private-registry.js │ │ ├── access.js │ │ ├── add-remote-git-fake-windows.js │ │ ├── add-remote-git-file.js │ │ ├── add-remote-git-get-resolved.js │ │ ├── add-remote-git-shrinkwrap.js │ │ ├── add-remote-git.js │ │ ├── adduser-always-auth.js │ │ ├── adduser-legacy-auth.js │ │ ├── bin.js │ │ ├── bitbucket-https-url-with-creds-package.js │ │ ├── bitbucket-https-url-with-creds.js │ │ ├── bitbucket-shortcut-package.js │ │ ├── bitbucket-shortcut.js │ │ ├── bugs.js │ │ ├── build-already-built.js │ │ ├── builtin-config.js │ │ ├── bundled-dependencies-nonarray.js │ │ ├── cache-add-localdir-fallback.js │ │ ├── cache-add-unpublished.js │ │ ├── cache-shasum-fork.js │ │ ├── cache-shasum.js │ │ ├── check-cpu-reqs.js │ │ ├── check-engine-reqs.js │ │ ├── check-install-self.js │ │ ├── check-os-reqs.js │ │ ├── check-permissions.js │ │ ├── circular-dep.js │ │ ├── config-basic.js │ │ ├── config-builtin.js │ │ ├── config-certfile.js │ │ ├── config-credentials.js │ │ ├── config-edit.js │ │ ├── config-malformed.js │ │ ├── config-meta.js │ │ ├── config-new-cafile.js │ │ ├── config-private.js │ │ ├── config-project.js │ │ ├── config-save.js │ │ ├── cruft-test.js │ │ ├── dedupe-scoped.js │ │ ├── dedupe.js │ │ ├── deprecate.js │ │ ├── dist-tag.js │ │ ├── do-not-remove-other-bins.js │ │ ├── extraneous-dep-cycle-ls-ok.js │ │ ├── false-name.js │ │ ├── gently-rm-cmdshims.js │ │ ├── gently-rm-overeager.js │ │ ├── gently-rm-symlink.js │ │ ├── get.js │ │ ├── gist-short-shortcut-package.js │ │ ├── gist-short-shortcut.js │ │ ├── gist-shortcut-package.js │ │ ├── gist-shortcut.js │ │ ├── git-cache-locking.js │ │ ├── git-cache-no-hooks.js │ │ ├── git-dependency-install-link.js │ │ ├── git-npmignore.js │ │ ├── git-races.js │ │ ├── github-shortcut-package.js │ │ ├── github-shortcut.js │ │ ├── gitlab-shortcut-package.js │ │ ├── gitlab-shortcut.js │ │ ├── global-prefix-set-in-userconfig.js │ │ ├── graceful-restart.js │ │ ├── ignore-install-link.js │ │ ├── ignore-scripts.js │ │ ├── ignore-shrinkwrap.js │ │ ├── init-interrupt.js │ │ ├── install-actions.js │ │ ├── install-at-locally.js │ │ ├── install-bad-dep-format.js │ │ ├── install-bad-man.js │ │ ├── install-cli-only-development.js │ │ ├── install-cli-only-production.js │ │ ├── install-cli-production.js │ │ ├── install-cli-unicode.js │ │ ├── install-from-local.js │ │ ├── install-link-scripts.js │ │ ├── install-local-dep-cycle.js │ │ ├── install-man.js │ │ ├── install-noargs-dev.js │ │ ├── install-order.js │ │ ├── install-preferglobal-warnings.js │ │ ├── install-save-exact.js │ │ ├── install-save-local.js │ │ ├── install-save-prefix.js │ │ ├── install-scoped-already-installed.js │ │ ├── install-scoped-link.js │ │ ├── install-scoped-with-peer-dependency.js │ │ ├── install-with-dev-dep-duplicate.js │ │ ├── invalid-cmd-exit-code.js │ │ ├── is-fs-access-available.js │ │ ├── lifecycle-path.js │ │ ├── lifecycle-signal.js │ │ ├── lifecycle.js │ │ ├── link.js │ │ ├── locker.js │ │ ├── logout.js │ │ ├── ls-depth-cli.js │ │ ├── ls-depth-unmet.js │ │ ├── ls-env.js │ │ ├── ls-l-depth-0.js │ │ ├── ls-no-results.js │ │ ├── ls-top-errors.js │ │ ├── map-to-registry.js │ │ ├── nerf-dart.js │ │ ├── nested-extraneous.js │ │ ├── no-global-warns.js │ │ ├── no-scan-full-global-dir.js │ │ ├── noargs-install-config-save.js │ │ ├── npm-api-not-loaded-error.js │ │ ├── optional-metadep-rollback-collision.js │ │ ├── outdated-color.js │ │ ├── outdated-depth-deep.js │ │ ├── outdated-depth-integer.js │ │ ├── outdated-depth.js │ │ ├── outdated-git.js │ │ ├── outdated-include-devdependencies.js │ │ ├── outdated-json.js │ │ ├── outdated-local.js │ │ ├── outdated-long.js │ │ ├── outdated-new-versions.js │ │ ├── outdated-notarget.js │ │ ├── outdated-private.js │ │ ├── outdated.js │ │ ├── owner.js │ │ ├── pack-scoped.js │ │ ├── peer-deps-invalid.js │ │ ├── peer-deps-toplevel.js │ │ ├── peer-deps-without-package-json.js │ │ ├── peer-deps.js │ │ ├── ping.js │ │ ├── prepublish.js │ │ ├── progress-config.js │ │ ├── prune.js │ │ ├── publish-access-scoped.js │ │ ├── publish-access-unscoped-restricted-fails.js │ │ ├── publish-access-unscoped.js │ │ ├── publish-config.js │ │ ├── publish-invalid-semver-tag.js │ │ ├── publish-scoped.js │ │ ├── pwd-prefix.js │ │ ├── referer.js │ │ ├── registry.js │ │ ├── repo.js │ │ ├── rm-linked.js │ │ ├── run-script-filter-private.js │ │ ├── run-script.js │ │ ├── scripts-whitespace-windows.js │ │ ├── search.js │ │ ├── semver-doc.js │ │ ├── semver-tag.js │ │ ├── shrinkwrap-dev-dependency.js │ │ ├── shrinkwrap-empty-deps.js │ │ ├── shrinkwrap-local-dependency.js │ │ ├── shrinkwrap-prod-dependency-also.js │ │ ├── shrinkwrap-prod-dependency.js │ │ ├── shrinkwrap-scoped-auth.js │ │ ├── shrinkwrap-shared-dev-dependency.js │ │ ├── sorted-package-json.js │ │ ├── spawn-enoent-help.js │ │ ├── spawn-enoent.js │ │ ├── splat-with-only-prerelease-to-latest.js │ │ ├── startstop.js │ │ ├── symlink-cycle.js │ │ ├── tag-version-prefix.js │ │ ├── team.js │ │ ├── test-run-ls.js │ │ ├── umask-lifecycle.js │ │ ├── uninstall-in-reverse.js │ │ ├── uninstall-package.js │ │ ├── unpack-foreign-tarball.js │ │ ├── unpublish-config.js │ │ ├── update-examples.js │ │ ├── update-index.js │ │ ├── update-path.js │ │ ├── update-save.js │ │ ├── url-dependencies.js │ │ ├── verify-no-lifecycle-on-repo.js │ │ ├── version-git-not-clean.js │ │ ├── version-lifecycle.js │ │ ├── version-message-config.js │ │ ├── version-no-git.js │ │ ├── version-no-package.js │ │ ├── version-no-tags.js │ │ ├── version-update-shrinkwrap.js │ │ ├── view.js │ │ ├── whoami.js │ │ └── zz-cleanup.js │ └── update-test.sh │ └── wercker.yml └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 27 | node_modules 28 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. 3 | 4 | ##0.5.0 - 2015-09-30 5 | Inital commit. -------------------------------------------------------------------------------- /cli/thaumaturgy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var program = require('commander'); 4 | 5 | program 6 | .version('0.0.1') 7 | .description('Build a NPM package compatible with AWS Lambda using AWS Lambda.') 8 | .command('configure', 'Configure Thaumaturgy with your AWS Credentials.') 9 | .command('deploy', 'Deploy the Thaumaturgy builder lambda function to AWS Lambda.') 10 | .command('build ', "Build NPM packages using Thaumaturge in AWS Lambda. See 'thaumaturgy help build'.") 11 | .parse(process.argv); 12 | 13 | if (!process.argv.slice(2).length) { 14 | program.outputHelp(); 15 | } -------------------------------------------------------------------------------- /lib/npm2/.npmignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | .*.swp 3 | npm-debug.log 4 | /test/bin 5 | /test/output.log 6 | /test/packages/*/node_modules 7 | /test/packages/npm-test-depends-on-spark/which-spark.log 8 | /test/packages/test-package/random-data.txt 9 | /test/root 10 | node_modules/marked 11 | node_modules/ronn 12 | node_modules/tap 13 | node_modules/.bin 14 | node_modules/npm-registry-mock 15 | /npmrc 16 | /release/ 17 | 18 | # don't need these in the npm package. 19 | html/*.png 20 | 21 | # don't ignore .npmignore files 22 | # these are used in some tests. 23 | !.npmignore 24 | 25 | /npm-*.tgz 26 | 27 | *.pyc 28 | 29 | /test/tap/builtin-config 30 | -------------------------------------------------------------------------------- /lib/npm2/.tern-project: -------------------------------------------------------------------------------- 1 | { 2 | "libs": [ 3 | "ecma5" 4 | ], 5 | "plugins": { 6 | "complete_strings": {}, 7 | "node": {}, 8 | "lint": {}, 9 | "doc_comment": { 10 | "fullDocs": true 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/npm2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - iojs 4 | - "0.12" 5 | - "0.10" 6 | - "0.8" 7 | env: 8 | - DEPLOY_VERSION=testing 9 | before_install: 10 | - "npm config set spin false" 11 | - "npm install -g npm/npm#2.x" 12 | - "sudo mkdir -p /var/run/couchdb" 13 | script: "npm run-script test-all" 14 | notifications: 15 | slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 16 | -------------------------------------------------------------------------------- /lib/npm2/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Before you submit a new issue 2 | 3 | * Check if there's a simple solution in the 4 | [Troubleshooting](https://github.com/npm/npm/wiki/Troubleshooting) 5 | wiki. 6 | * [Search for similar 7 | issues](https://github.com/npm/npm/search?q=Similar%20issues&type=Issues). 8 | * Ensure your new issue conforms to the [Contributing 9 | Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines). 10 | 11 | Participation in this open source project is subject to the [npm Code 12 | of Conduct](http://www.npmjs.com/policies/conduct). 13 | -------------------------------------------------------------------------------- /lib/npm2/bin/node-gyp-bin/node-gyp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | if [ "x$npm_config_node_gyp" = "x" ]; then 3 | node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@" 4 | else 5 | "$npm_config_node_gyp" "$@" 6 | fi 7 | -------------------------------------------------------------------------------- /lib/npm2/bin/node-gyp-bin/node-gyp.cmd: -------------------------------------------------------------------------------- 1 | if not defined npm_config_node_gyp ( 2 | node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* 3 | ) else ( 4 | node %npm_config_node_gyp% %* 5 | ) 6 | -------------------------------------------------------------------------------- /lib/npm2/bin/npm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | (set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix 3 | 4 | basedir=`dirname "$0"` 5 | 6 | case `uname` in 7 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 8 | esac 9 | 10 | NODE_EXE="$basedir/node.exe" 11 | if ! [ -x "$NODE_EXE" ]; then 12 | NODE_EXE=node 13 | fi 14 | 15 | NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" 16 | 17 | case `uname` in 18 | *CYGWIN*) 19 | NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` 20 | NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" 21 | if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then 22 | NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" 23 | fi 24 | ;; 25 | esac 26 | 27 | "$NODE_EXE" "$NPM_CLI_JS" "$@" 28 | -------------------------------------------------------------------------------- /lib/npm2/bin/npm.cmd: -------------------------------------------------------------------------------- 1 | :: Created by npm, please don't edit manually. 2 | @ECHO OFF 3 | 4 | SETLOCAL 5 | 6 | SET "NODE_EXE=%~dp0\node.exe" 7 | IF NOT EXIST "%NODE_EXE%" ( 8 | SET "NODE_EXE=node" 9 | ) 10 | 11 | SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" 12 | FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( 13 | SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" 14 | ) 15 | IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( 16 | SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" 17 | ) 18 | 19 | "%NODE_EXE%" "%NPM_CLI_JS%" %* 20 | -------------------------------------------------------------------------------- /lib/npm2/bin/read-package-json.js: -------------------------------------------------------------------------------- 1 | var argv = process.argv 2 | if (argv.length < 3) { 3 | console.error("Usage: read-package.json [ ...]") 4 | process.exit(1) 5 | } 6 | 7 | var fs = require("fs") 8 | , file = argv[2] 9 | , readJson = require("read-package-json") 10 | 11 | readJson(file, function (er, data) { 12 | if (er) throw er 13 | if (argv.length === 3) console.log(data) 14 | else argv.slice(3).forEach(function (field) { 15 | field = field.split(".") 16 | var val = data 17 | field.forEach(function (f) { 18 | val = val[f] 19 | }) 20 | console.log(val) 21 | }) 22 | }) 23 | -------------------------------------------------------------------------------- /lib/npm2/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require("./bin/npm-cli.js") 3 | -------------------------------------------------------------------------------- /lib/npm2/configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # set configurations that will be "sticky" on this system, 4 | # surviving npm self-updates. 5 | 6 | CONFIGS=() 7 | i=0 8 | 9 | # get the location of this file. 10 | unset CDPATH 11 | CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc 12 | 13 | while [ $# -gt 0 ]; do 14 | conf="$1" 15 | case $conf in 16 | --help) 17 | echo "./configure --param=value ..." 18 | exit 0 19 | ;; 20 | --*) 21 | CONFIGS[$i]="${conf:2}" 22 | ;; 23 | *) 24 | CONFIGS[$i]="$conf" 25 | ;; 26 | esac 27 | let i++ 28 | shift 29 | done 30 | 31 | for c in "${CONFIGS[@]}"; do 32 | echo "$c" >> "$CONFFILE" 33 | done 34 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-bin.md: -------------------------------------------------------------------------------- 1 | npm-bin(3) -- Display npm bin folder 2 | ==================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.bin(args, cb) 7 | 8 | ## DESCRIPTION 9 | 10 | Print the folder where npm will install executables. 11 | 12 | This function should not be used programmatically. Instead, just refer 13 | to the `npm.bin` property. 14 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-bugs.md: -------------------------------------------------------------------------------- 1 | npm-bugs(3) -- Bugs for a package in a web browser maybe 2 | ======================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.bugs(package, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This command tries to guess at the likely location of a package's 11 | bug tracker URL, and then tries to open it using the `--browser` 12 | config param. 13 | 14 | Like other commands, the first parameter is an array. This command only 15 | uses the first element, which is expected to be a package name with an 16 | optional version number. 17 | 18 | This command will launch a browser, so this command may not be the most 19 | friendly for programmatic use. 20 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-commands.md: -------------------------------------------------------------------------------- 1 | npm-commands(3) -- npm commands 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands[](args, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | npm comes with a full set of commands, and each of the commands takes a 11 | similar set of arguments. 12 | 13 | In general, all commands on the command object take an **array** of positional 14 | argument **strings**. The last argument to any function is a callback. Some 15 | commands are special and take other optional arguments. 16 | 17 | All commands have their own man page. See `man npm-` for command-line 18 | usage, or `man 3 npm-` for programmatic usage. 19 | 20 | ## SEE ALSO 21 | 22 | * npm-index(7) 23 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-docs.md: -------------------------------------------------------------------------------- 1 | npm-docs(3) -- Docs for a package in a web browser maybe 2 | ======================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.docs(package, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This command tries to guess at the likely location of a package's 11 | documentation URL, and then tries to open it using the `--browser` 12 | config param. 13 | 14 | Like other commands, the first parameter is an array. This command only 15 | uses the first element, which is expected to be a package name with an 16 | optional version number. 17 | 18 | This command will launch a browser, so this command may not be the most 19 | friendly for programmatic use. 20 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-explore.md: -------------------------------------------------------------------------------- 1 | npm-explore(3) -- Browse an installed package 2 | ============================================= 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.explore(args, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | Spawn a subshell in the directory of the installed package specified. 11 | 12 | If a command is specified, then it is run in the subshell, which then 13 | immediately terminates. 14 | 15 | Note that the package is *not* automatically rebuilt afterwards, so be 16 | sure to use `npm rebuild ` if you make any changes. 17 | 18 | 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. 19 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-install.md: -------------------------------------------------------------------------------- 1 | npm-install(3) -- install a package programmatically 2 | ==================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.install([where,] packages, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This acts much the same ways as installing on the command-line. 11 | 12 | The 'where' parameter is optional and only used internally, and it specifies 13 | where the packages should be installed to. 14 | 15 | The 'packages' parameter is an array of strings. Each element in the array is 16 | the name of a package to be installed. 17 | 18 | Finally, 'callback' is a function that will be called when all packages have been 19 | installed or when an error has been encountered. 20 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-load.md: -------------------------------------------------------------------------------- 1 | npm-load(3) -- Load config settings 2 | =================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.load(conf, cb) 7 | 8 | ## DESCRIPTION 9 | 10 | npm.load() must be called before any other function call. Both parameters are 11 | optional, but the second is recommended. 12 | 13 | The first parameter is an object containing command-line config params, and the 14 | second parameter is a callback that will be called when npm is loaded and ready 15 | to serve. 16 | 17 | The first parameter should follow a similar structure as the package.json 18 | config object. 19 | 20 | For example, to emulate the --dev flag, pass an object that looks like this: 21 | 22 | { 23 | "dev": true 24 | } 25 | 26 | For a list of all the available command-line configs, see `npm help config` 27 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-outdated.md: -------------------------------------------------------------------------------- 1 | npm-outdated(3) -- Check for outdated packages 2 | ============================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.outdated([packages,] callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This command will check the registry to see if the specified packages are 11 | currently outdated. 12 | 13 | If the 'packages' parameter is left out, npm will check all packages. 14 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-pack.md: -------------------------------------------------------------------------------- 1 | npm-pack(3) -- Create a tarball from a package 2 | ============================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.pack([packages,] callback) 7 | 8 | ## DESCRIPTION 9 | 10 | For anything that's installable (that is, a package folder, tarball, 11 | tarball url, name@tag, name@version, or name), this command will fetch 12 | it to the cache, and then copy the tarball to the current working 13 | directory as `-.tgz`, and then write the filenames out to 14 | stdout. 15 | 16 | If the same package is specified multiple times, then the file will be 17 | overwritten the second time. 18 | 19 | If no arguments are supplied, then npm packs the current package folder. 20 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-ping.md: -------------------------------------------------------------------------------- 1 | npm-ping(3) -- Ping npm registry 2 | ================================ 3 | 4 | ## SYNOPSIS 5 | 6 | npm.registry.ping(registry, options, function (er, pong)) 7 | 8 | ## DESCRIPTION 9 | 10 | Attempts to connect to the given registry, returning a `pong` 11 | object with various metadata if it succeeds. 12 | 13 | This function is primarily useful for debugging connection issues 14 | to npm registries. 15 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-prefix.md: -------------------------------------------------------------------------------- 1 | npm-prefix(3) -- Display prefix 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.prefix(args, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | Print the prefix to standard out. 11 | 12 | 'args' is never used and callback is never called with data. 13 | 'args' must be present or things will break. 14 | 15 | This function is not useful programmatically 16 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-prune.md: -------------------------------------------------------------------------------- 1 | npm-prune(3) -- Remove extraneous packages 2 | ========================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.prune([packages,] callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This command removes "extraneous" packages. 11 | 12 | The first parameter is optional, and it specifies packages to be removed. 13 | 14 | No packages are specified, then all packages will be checked. 15 | 16 | Extraneous packages are packages that are not listed on the parent 17 | package's dependencies list. 18 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-rebuild.md: -------------------------------------------------------------------------------- 1 | npm-rebuild(3) -- Rebuild a package 2 | =================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.rebuild([packages,] callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This command runs the `npm build` command on each of the matched packages. This is useful 11 | when you install a new version of node, and must recompile all your C++ addons with 12 | the new binary. If no 'packages' parameter is specify, every package will be rebuilt. 13 | 14 | ## CONFIGURATION 15 | 16 | See `npm help build` 17 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-repo.md: -------------------------------------------------------------------------------- 1 | npm-repo(3) -- Open package repository page in the browser 2 | ======================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.repo(package, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This command tries to guess at the likely location of a package's 11 | repository URL, and then tries to open it using the `--browser` 12 | config param. 13 | 14 | Like other commands, the first parameter is an array. This command only 15 | uses the first element, which is expected to be a package name with an 16 | optional version number. 17 | 18 | This command will launch a browser, so this command may not be the most 19 | friendly for programmatic use. 20 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-root.md: -------------------------------------------------------------------------------- 1 | npm-root(3) -- Display npm root 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.root(args, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | Print the effective `node_modules` folder to standard out. 11 | 12 | 'args' is never used and callback is never called with data. 13 | 'args' must be present or things will break. 14 | 15 | This function is not useful programmatically. 16 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-shrinkwrap.md: -------------------------------------------------------------------------------- 1 | npm-shrinkwrap(3) -- programmatically generate package shrinkwrap file 2 | ==================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.shrinkwrap(args, [silent,] callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This acts much the same ways as shrinkwrapping on the command-line. 11 | 12 | This command does not take any arguments, but 'args' must be defined. 13 | Beyond that, if any arguments are passed in, npm will politely warn that it 14 | does not take positional arguments. 15 | 16 | If the 'silent' parameter is set to true, nothing will be output to the screen, 17 | but the shrinkwrap file will still be written. 18 | 19 | Finally, 'callback' is a function that will be called when the shrinkwrap has 20 | been saved. 21 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-start.md: -------------------------------------------------------------------------------- 1 | npm-start(3) -- Start a package 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.start(packages, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This runs a package's "start" script, if one was provided. 11 | 12 | npm can start multiple packages. Just specify multiple packages in the 13 | `packages` parameter. 14 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-stop.md: -------------------------------------------------------------------------------- 1 | npm-stop(3) -- Stop a package 2 | ============================= 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.stop(packages, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This runs a package's "stop" script, if one was provided. 11 | 12 | npm can run stop on multiple packages. Just specify multiple packages 13 | in the `packages` parameter. 14 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-test.md: -------------------------------------------------------------------------------- 1 | npm-test(3) -- Test a package 2 | ============================= 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.test(packages, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This runs a package's "test" script, if one was provided. 11 | 12 | To run tests as a condition of installation, set the `npat` config to 13 | true. 14 | 15 | npm can run tests on multiple packages. Just specify multiple packages 16 | in the `packages` parameter. 17 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-uninstall.md: -------------------------------------------------------------------------------- 1 | npm-uninstall(3) -- uninstall a package programmatically 2 | ======================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.uninstall(packages, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This acts much the same ways as uninstalling on the command-line. 11 | 12 | The 'packages' parameter is an array of strings. Each element in the array is 13 | the name of a package to be uninstalled. 14 | 15 | Finally, 'callback' is a function that will be called when all packages have been 16 | uninstalled or when an error has been encountered. 17 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-unpublish.md: -------------------------------------------------------------------------------- 1 | npm-unpublish(3) -- Remove a package from the registry 2 | ====================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.unpublish(package, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | This removes a package version from the registry, deleting its 11 | entry and removing the tarball. 12 | 13 | The package parameter must be defined. 14 | 15 | Only the first element in the package parameter is used. If there is no first 16 | element, then npm assumes that the package at the current working directory 17 | is what is meant. 18 | 19 | If no version is specified, or if all versions are removed then 20 | the root package entry is removed from the registry entirely. 21 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-update.md: -------------------------------------------------------------------------------- 1 | npm-update(3) -- Update a package 2 | ================================= 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.update(packages, callback) 7 | 8 | # DESCRIPTION 9 | 10 | Updates a package, upgrading it to the latest version. It also installs any 11 | missing packages. 12 | 13 | The `packages` argument is an array of packages to update. The `callback` 14 | parameter will be called when done or when an error occurs. 15 | 16 | ## SEE ALSO 17 | 18 | * npm-update(1) 19 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-version.md: -------------------------------------------------------------------------------- 1 | npm-version(3) -- Bump a package version 2 | ======================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.version(newversion, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | Run this in a package directory to bump the version and write the new 11 | data back to the package.json file. 12 | 13 | If run in a git repo, it will also create a version commit and tag, and 14 | fail if the repo is not clean. 15 | 16 | Like all other commands, this function takes a string array as its first 17 | parameter. The difference, however, is this function will fail if it does 18 | not have exactly one element. The only element should be a version number. 19 | -------------------------------------------------------------------------------- /lib/npm2/doc/api/npm-whoami.md: -------------------------------------------------------------------------------- 1 | npm-whoami(3) -- Display npm username 2 | ===================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm.commands.whoami(args, callback) 7 | 8 | ## DESCRIPTION 9 | 10 | Print the `username` config to standard output. 11 | 12 | 'args' is never used and callback is never called with data. 13 | 'args' must be present or things will break. 14 | 15 | This function is not useful programmatically 16 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-bin.md: -------------------------------------------------------------------------------- 1 | npm-bin(1) -- Display npm bin folder 2 | ==================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm bin 7 | 8 | ## DESCRIPTION 9 | 10 | Print the folder where npm will install executables. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-prefix(1) 15 | * npm-root(1) 16 | * npm-folders(5) 17 | * npm-config(1) 18 | * npm-config(7) 19 | * npmrc(5) 20 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-build.md: -------------------------------------------------------------------------------- 1 | npm-build(1) -- Build a package 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm build 7 | 8 | * ``: 9 | A folder containing a `package.json` file in its root. 10 | 11 | ## DESCRIPTION 12 | 13 | This is the plumbing command called by `npm link` and `npm install`. 14 | 15 | It should generally be called during installation, but if you need to run it 16 | directly, run: 17 | 18 | npm run-script build 19 | 20 | ## SEE ALSO 21 | 22 | * npm-install(1) 23 | * npm-link(1) 24 | * npm-scripts(7) 25 | * package.json(5) 26 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-bundle.md: -------------------------------------------------------------------------------- 1 | npm-bundle(1) -- REMOVED 2 | ======================== 3 | 4 | ## DESCRIPTION 5 | 6 | The `npm bundle` command has been removed in 1.0, for the simple reason 7 | that it is no longer necessary, as the default behavior is now to 8 | install packages into the local space. 9 | 10 | Just use `npm install` now to do what `npm bundle` used to do. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-install(1) 15 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-pack.md: -------------------------------------------------------------------------------- 1 | npm-pack(1) -- Create a tarball from a package 2 | ============================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm pack [ [ ...]] 7 | 8 | ## DESCRIPTION 9 | 10 | For anything that's installable (that is, a package folder, tarball, 11 | tarball url, name@tag, name@version, or name), this command will fetch 12 | it to the cache, and then copy the tarball to the current working 13 | directory as `-.tgz`, and then write the filenames out to 14 | stdout. 15 | 16 | If the same package is specified multiple times, then the file will be 17 | overwritten the second time. 18 | 19 | If no arguments are supplied, then npm packs the current package folder. 20 | 21 | ## SEE ALSO 22 | 23 | * npm-cache(1) 24 | * npm-publish(1) 25 | * npm-config(1) 26 | * npm-config(7) 27 | * npmrc(5) 28 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-ping.md: -------------------------------------------------------------------------------- 1 | npm-ping(1) -- Ping npm registry 2 | ================================ 3 | 4 | ## SYNOPSIS 5 | 6 | npm ping [--registry ] 7 | 8 | ## DESCRIPTION 9 | 10 | Ping the configured or given npm registry and verify authentication. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-config(1) 15 | * npm-config(7) 16 | * npmrc(5) 17 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-prefix.md: -------------------------------------------------------------------------------- 1 | npm-prefix(1) -- Display prefix 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm prefix [-g] 7 | 8 | ## DESCRIPTION 9 | 10 | Print the local prefix to standard out. This is the closest parent directory 11 | to contain a package.json file unless `-g` is also specified. 12 | 13 | If `-g` is specified, this will be the value of the global prefix. See 14 | `npm-config(7)` for more detail. 15 | 16 | ## SEE ALSO 17 | 18 | * npm-root(1) 19 | * npm-bin(1) 20 | * npm-folders(5) 21 | * npm-config(1) 22 | * npm-config(7) 23 | * npmrc(5) 24 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-rebuild.md: -------------------------------------------------------------------------------- 1 | npm-rebuild(1) -- Rebuild a package 2 | =================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm rebuild [ [ ...]] 7 | npm rb [ [ ...]] 8 | 9 | * ``: 10 | The package to rebuild 11 | 12 | ## DESCRIPTION 13 | 14 | This command runs the `npm build` command on the matched folders. This is useful 15 | when you install a new version of node, and must recompile all your C++ addons with 16 | the new binary. 17 | 18 | ## SEE ALSO 19 | 20 | * npm-build(1) 21 | * npm-install(1) 22 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-repo.md: -------------------------------------------------------------------------------- 1 | npm-repo(1) -- Open package repository page in the browser 2 | ======================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm repo 7 | npm repo (with no args in a package dir) 8 | 9 | ## DESCRIPTION 10 | 11 | This command tries to guess at the likely location of a package's 12 | repository URL, and then tries to open it using the `--browser` 13 | config param. If no package name is provided, it will search for 14 | a `package.json` in the current folder and use the `name` property. 15 | 16 | ## CONFIGURATION 17 | 18 | ### browser 19 | 20 | * Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` 21 | * Type: String 22 | 23 | The browser that is called by the `npm repo` command to open websites. 24 | 25 | ## SEE ALSO 26 | 27 | * npm-docs(1) 28 | * npm-config(1) 29 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-rm.md: -------------------------------------------------------------------------------- 1 | npm-rm(1) -- Remove a package 2 | ============================= 3 | 4 | ## SYNOPSIS 5 | 6 | npm rm 7 | npm r 8 | npm uninstall 9 | npm un 10 | 11 | ## DESCRIPTION 12 | 13 | This uninstalls a package, completely removing everything npm installed 14 | on its behalf. 15 | 16 | ## SEE ALSO 17 | 18 | * npm-prune(1) 19 | * npm-install(1) 20 | * npm-folders(5) 21 | * npm-config(1) 22 | * npm-config(7) 23 | * npmrc(5) 24 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-root.md: -------------------------------------------------------------------------------- 1 | npm-root(1) -- Display npm root 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm root 7 | 8 | ## DESCRIPTION 9 | 10 | Print the effective `node_modules` folder to standard out. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-prefix(1) 15 | * npm-bin(1) 16 | * npm-folders(5) 17 | * npm-config(1) 18 | * npm-config(7) 19 | * npmrc(5) 20 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-star.md: -------------------------------------------------------------------------------- 1 | npm-star(1) -- Mark your favorite packages 2 | ========================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm star [, ...] 7 | npm unstar [, ...] 8 | 9 | ## DESCRIPTION 10 | 11 | "Starring" a package means that you have some interest in it. It's 12 | a vaguely positive way to show that you care. 13 | 14 | "Unstarring" is the same thing, but in reverse. 15 | 16 | It's a boolean thing. Starring repeatedly has no additional effect. 17 | 18 | ## SEE ALSO 19 | 20 | * npm-view(1) 21 | * npm-whoami(1) 22 | * npm-adduser(1) 23 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-stars.md: -------------------------------------------------------------------------------- 1 | npm-stars(1) -- View packages marked as favorites 2 | ================================================= 3 | 4 | ## SYNOPSIS 5 | 6 | npm stars 7 | npm stars [username] 8 | 9 | ## DESCRIPTION 10 | 11 | If you have starred a lot of neat things and want to find them again 12 | quickly this command lets you do just that. 13 | 14 | You may also want to see your friend's favorite packages, in this case 15 | you will most certainly enjoy this command. 16 | 17 | ## SEE ALSO 18 | 19 | * npm-star(1) 20 | * npm-view(1) 21 | * npm-whoami(1) 22 | * npm-adduser(1) 23 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-start.md: -------------------------------------------------------------------------------- 1 | npm-start(1) -- Start a package 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm start [-- ] 7 | 8 | ## DESCRIPTION 9 | 10 | This runs a package's "start" script, if one was provided. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-run-script(1) 15 | * npm-scripts(7) 16 | * npm-test(1) 17 | * npm-restart(1) 18 | * npm-stop(1) 19 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-stop.md: -------------------------------------------------------------------------------- 1 | npm-stop(1) -- Stop a package 2 | ============================= 3 | 4 | ## SYNOPSIS 5 | 6 | npm stop [-- ] 7 | 8 | ## DESCRIPTION 9 | 10 | This runs a package's "stop" script, if one was provided. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-run-script(1) 15 | * npm-scripts(7) 16 | * npm-test(1) 17 | * npm-start(1) 18 | * npm-restart(1) 19 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-test.md: -------------------------------------------------------------------------------- 1 | npm-test(1) -- Test a package 2 | ============================= 3 | 4 | ## SYNOPSIS 5 | 6 | npm test [-- ] 7 | npm tst [-- ] 8 | 9 | ## DESCRIPTION 10 | 11 | This runs a package's "test" script, if one was provided. 12 | 13 | To run tests as a condition of installation, set the `npat` config to 14 | true. 15 | 16 | ## SEE ALSO 17 | 18 | * npm-run-script(1) 19 | * npm-scripts(7) 20 | * npm-start(1) 21 | * npm-restart(1) 22 | * npm-stop(1) 23 | -------------------------------------------------------------------------------- /lib/npm2/doc/cli/npm-whoami.md: -------------------------------------------------------------------------------- 1 | npm-whoami(1) -- Display npm username 2 | ===================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm whoami 7 | 8 | ## DESCRIPTION 9 | 10 | Print the `username` config to standard output. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-config(1) 15 | * npm-config(7) 16 | * npmrc(5) 17 | * npm-adduser(1) 18 | -------------------------------------------------------------------------------- /lib/npm2/html/dochead.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | @NAME@ 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | -------------------------------------------------------------------------------- /lib/npm2/html/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/html/favicon.ico -------------------------------------------------------------------------------- /lib/npm2/html/static/toc.js: -------------------------------------------------------------------------------- 1 | ;(function () { 2 | var wrapper = document.getElementById("wrapper") 3 | var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) 4 | .filter(function (el) { 5 | return el.parentNode === wrapper 6 | && el.tagName.match(/H[1-6]/) 7 | && el.id 8 | }) 9 | var l = 2 10 | , toc = document.createElement("ul") 11 | toc.innerHTML = els.map(function (el) { 12 | var i = el.tagName.charAt(1) 13 | , out = "" 14 | while (i > l) { 15 | out += "
    " 16 | l ++ 17 | } 18 | while (i < l) { 19 | out += "
" 20 | l -- 21 | } 22 | out += "
  • " + 23 | ( el.innerText || el.text || el.innerHTML) 24 | + "" 25 | return out 26 | }).join("\n") 27 | toc.id = "toc" 28 | document.body.appendChild(toc) 29 | })(); 30 | -------------------------------------------------------------------------------- /lib/npm2/lib/bin.js: -------------------------------------------------------------------------------- 1 | module.exports = bin 2 | 3 | var npm = require("./npm.js") 4 | var osenv = require("osenv") 5 | 6 | bin.usage = "npm bin\nnpm bin -g\n(just prints the bin folder)" 7 | 8 | function bin (args, silent, cb) { 9 | if (typeof cb !== "function") cb = silent, silent = false 10 | var b = npm.bin 11 | , PATH = osenv.path() 12 | 13 | if (!silent) console.log(b) 14 | process.nextTick(cb.bind(this, null, b)) 15 | 16 | if (npm.config.get("global") && PATH.indexOf(b) === -1) { 17 | npm.config.get("logstream").write("(not in PATH env variable)\n") 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/npm2/lib/cache/cached-package-root.js: -------------------------------------------------------------------------------- 1 | var assert = require("assert") 2 | var resolve = require("path").resolve 3 | 4 | var npm = require("../npm.js") 5 | 6 | module.exports = getCacheRoot 7 | 8 | function getCacheRoot (data) { 9 | assert(data, "must pass package metadata") 10 | assert(data.name, "package metadata must include name") 11 | assert(data.version, "package metadata must include version") 12 | 13 | return resolve(npm.cache, data.name, data.version) 14 | } 15 | -------------------------------------------------------------------------------- /lib/npm2/lib/cache/get-stat.js: -------------------------------------------------------------------------------- 1 | var npm = require('../npm.js') 2 | var correctMkdir = require('../utils/correct-mkdir.js') 3 | 4 | module.exports = function getCacheStat (cb) { 5 | correctMkdir(npm.cache, cb) 6 | } 7 | -------------------------------------------------------------------------------- /lib/npm2/lib/config/clear-credentials-by-uri.js: -------------------------------------------------------------------------------- 1 | var assert = require("assert") 2 | 3 | var toNerfDart = require("./nerf-dart.js") 4 | 5 | module.exports = clearCredentialsByURI 6 | 7 | function clearCredentialsByURI (uri) { 8 | assert(uri && typeof uri === "string", "registry URL is required") 9 | 10 | var nerfed = toNerfDart(uri) 11 | 12 | this.del(nerfed + ":_authToken", "user") 13 | this.del(nerfed + ":_password", "user") 14 | this.del(nerfed + ":username", "user") 15 | this.del(nerfed + ":email", "user") 16 | } 17 | -------------------------------------------------------------------------------- /lib/npm2/lib/config/load-uid.js: -------------------------------------------------------------------------------- 1 | module.exports = loadUid 2 | 3 | var getUid = require("uid-number") 4 | 5 | // Call in the context of a npmconf object 6 | 7 | function loadUid (cb) { 8 | // if we're not in unsafe-perm mode, then figure out who 9 | // to run stuff as. Do this first, to support `npm update npm -g` 10 | if (!this.get("unsafe-perm")) { 11 | getUid(this.get("user"), this.get("group"), cb) 12 | } else { 13 | process.nextTick(cb) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/npm2/lib/config/nerf-dart.js: -------------------------------------------------------------------------------- 1 | var url = require("url") 2 | 3 | module.exports = toNerfDart 4 | 5 | /** 6 | * Maps a URL to an identifier. 7 | * 8 | * Name courtesy schiffertronix media LLC, a New Jersey corporation 9 | * 10 | * @param {String} uri The URL to be nerfed. 11 | * 12 | * @returns {String} A nerfed URL. 13 | */ 14 | function toNerfDart(uri) { 15 | var parsed = url.parse(uri) 16 | delete parsed.protocol 17 | delete parsed.auth 18 | delete parsed.query 19 | delete parsed.search 20 | delete parsed.hash 21 | 22 | return url.resolve(url.format(parsed), ".") 23 | } 24 | -------------------------------------------------------------------------------- /lib/npm2/lib/faq.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = faq 3 | 4 | faq.usage = "npm faq" 5 | 6 | var npm = require("./npm.js") 7 | 8 | function faq (args, cb) { npm.commands.help(["faq"], cb) } 9 | -------------------------------------------------------------------------------- /lib/npm2/lib/get.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = get 3 | 4 | get.usage = "npm get (See `npm config`)" 5 | 6 | var npm = require("./npm.js") 7 | 8 | get.completion = npm.commands.config.completion 9 | 10 | function get (args, cb) { 11 | npm.commands.config(["get"].concat(args), cb) 12 | } 13 | -------------------------------------------------------------------------------- /lib/npm2/lib/ping.js: -------------------------------------------------------------------------------- 1 | var npm = require('./npm.js') 2 | 3 | module.exports = ping 4 | 5 | ping.usage = 'npm ping\nping registry' 6 | 7 | function ping (args, silent, cb) { 8 | if (typeof cb !== 'function') { 9 | cb = silent 10 | silent = false 11 | } 12 | var registry = npm.config.get('registry') 13 | if (!registry) return cb(new Error('no default registry set')) 14 | var auth = npm.config.getCredentialsByURI(registry) 15 | 16 | npm.registry.ping(registry, {auth: auth}, function (er, pong) { 17 | if (!silent) console.log(JSON.stringify(pong)) 18 | cb(er, er ? null : pong) 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /lib/npm2/lib/prefix.js: -------------------------------------------------------------------------------- 1 | module.exports = prefix 2 | 3 | var npm = require("./npm.js") 4 | 5 | prefix.usage = "npm prefix\nnpm prefix -g\n(just prints the prefix folder)" 6 | 7 | function prefix (args, silent, cb) { 8 | if (typeof cb !== "function") cb = silent, silent = false 9 | if (!silent) console.log(npm.prefix) 10 | process.nextTick(cb.bind(this, null, npm.prefix)) 11 | } 12 | -------------------------------------------------------------------------------- /lib/npm2/lib/restart.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./utils/lifecycle.js").cmd("restart") 2 | -------------------------------------------------------------------------------- /lib/npm2/lib/root.js: -------------------------------------------------------------------------------- 1 | module.exports = root 2 | 3 | var npm = require("./npm.js") 4 | 5 | root.usage = "npm root\nnpm root -g\n(just prints the root folder)" 6 | 7 | function root (args, silent, cb) { 8 | if (typeof cb !== "function") cb = silent, silent = false 9 | if (!silent) console.log(npm.dir) 10 | process.nextTick(cb.bind(this, null, npm.dir)) 11 | } 12 | -------------------------------------------------------------------------------- /lib/npm2/lib/set.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = set 3 | 4 | set.usage = "npm set (See `npm config`)" 5 | 6 | var npm = require("./npm.js") 7 | 8 | set.completion = npm.commands.config.completion 9 | 10 | function set (args, cb) { 11 | if (!args.length) return cb(set.usage) 12 | npm.commands.config(["set"].concat(args), cb) 13 | } 14 | -------------------------------------------------------------------------------- /lib/npm2/lib/start.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./utils/lifecycle.js").cmd("start") 2 | -------------------------------------------------------------------------------- /lib/npm2/lib/stop.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./utils/lifecycle.js").cmd("stop") 2 | -------------------------------------------------------------------------------- /lib/npm2/lib/substack.js: -------------------------------------------------------------------------------- 1 | module.exports = substack 2 | var npm = require("./npm.js") 3 | 4 | var isms = 5 | [ "\033[32mbeep \033[35mboop\033[m" 6 | , "Replace your configs with services" 7 | , "SEPARATE ALL THE CONCERNS!" 8 | , "MODULE ALL THE THINGS!" 9 | , "\\o/" 10 | , "but first, burritos" 11 | , "full time mad scientist here" 12 | , "c/,,\\" ] 13 | 14 | function substack (args, cb) { 15 | var i = Math.floor(Math.random() * isms.length) 16 | console.log(isms[i]) 17 | var c = args.shift() 18 | if (c) npm.commands[c](args, cb) 19 | else cb() 20 | } 21 | -------------------------------------------------------------------------------- /lib/npm2/lib/test.js: -------------------------------------------------------------------------------- 1 | module.exports = test 2 | 3 | var testCmd = require("./utils/lifecycle.js").cmd("test") 4 | 5 | function test (args, cb) { 6 | testCmd(args, function (er) { 7 | if (!er) return cb() 8 | if (er.code === "ELIFECYCLE") { 9 | return cb("Test failed. See above for more details.") 10 | } 11 | return cb(er) 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /lib/npm2/lib/utils/completion/file-completion.js: -------------------------------------------------------------------------------- 1 | module.exports = fileCompletion 2 | 3 | var mkdir = require("mkdirp") 4 | , path = require("path") 5 | , glob = require("glob") 6 | 7 | function fileCompletion (root, req, depth, cb) { 8 | if (typeof cb !== "function") cb = depth, depth = Infinity 9 | mkdir(root, function (er) { 10 | if (er) return cb(er) 11 | 12 | // can be either exactly the req, or a descendent 13 | var pattern = root + "/{" + req + "," + req + "/**/*}" 14 | , opts = { mark: true, dot: true, maxDepth: depth } 15 | glob(pattern, opts, function (er, files) { 16 | if (er) return cb(er) 17 | return cb(null, (files || []).map(function (f) { 18 | var tail = f.substr(root.length + 1).replace(/^\//, "") 19 | return path.join(req, tail) 20 | })) 21 | }) 22 | }) 23 | } 24 | -------------------------------------------------------------------------------- /lib/npm2/lib/utils/depr-check.js: -------------------------------------------------------------------------------- 1 | var log = require("npmlog") 2 | 3 | var deprecated = {} 4 | , deprWarned = {} 5 | module.exports = function deprCheck (data) { 6 | if (deprecated[data._id]) data.deprecated = deprecated[data._id] 7 | if (data.deprecated) deprecated[data._id] = data.deprecated 8 | else return 9 | if (!deprWarned[data._id]) { 10 | deprWarned[data._id] = true 11 | log.warn("deprecated", "%s: %s", data._id, data.deprecated) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/npm2/lib/utils/read-local-package.js: -------------------------------------------------------------------------------- 1 | exports = module.exports = readLocalPkg 2 | 3 | var npm = require("../npm.js") 4 | , readJson = require("read-package-json") 5 | 6 | function readLocalPkg (cb) { 7 | if (npm.config.get("global")) return cb() 8 | var path = require("path") 9 | readJson(path.resolve(npm.prefix, "package.json"), function (er, d) { 10 | return cb(er, d && d.name) 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /lib/npm2/lib/utils/umask.js: -------------------------------------------------------------------------------- 1 | var umask = require("umask") 2 | var npmlog = require("npmlog") 3 | var _fromString = umask.fromString 4 | 5 | module.exports = umask 6 | 7 | // fromString with logging callback 8 | umask.fromString = function (val) { 9 | _fromString(val, function (err, result) { 10 | if (err) { 11 | npmlog.warn("invalid umask", err.message) 12 | } 13 | val = result 14 | }) 15 | 16 | return val 17 | } 18 | -------------------------------------------------------------------------------- /lib/npm2/lib/utils/warn-deprecated.js: -------------------------------------------------------------------------------- 1 | module.exports = warnDeprecated 2 | 3 | var log = require("npmlog") 4 | 5 | var deprecations = {} 6 | 7 | function warnDeprecated (type) { 8 | return function warn (messages, instance) { 9 | if (!instance) { 10 | if (!deprecations[type]) { 11 | deprecations[type] = {} 12 | messages.forEach(function (m) { log.warn(type, m) }) 13 | } 14 | } 15 | else { 16 | if (!deprecations[type]) deprecations[type] = {} 17 | 18 | if (!deprecations[type][instance]) { 19 | deprecations[type][instance] = true 20 | messages.forEach(function (m) { log.warn(type, m) }) 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/npm2/make.bat: -------------------------------------------------------------------------------- 1 | :: The tests run "make doc" in the prepublish script, 2 | :: so this file gives windows something that'll exit 3 | :: successfully, without having to install make. 4 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-bin.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-BIN" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-bin\fR \- Display npm bin folder 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm bin 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the folder where npm will install executables\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help prefix 18 | .IP \(bu 2 19 | npm help root 20 | .IP \(bu 2 21 | npm help 5 folders 22 | .IP \(bu 2 23 | npm help config 24 | .IP \(bu 2 25 | npm help 7 config 26 | .IP \(bu 2 27 | npm help 5 npmrc 28 | 29 | .RE 30 | 31 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-build.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-BUILD" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-build\fR \- Build a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm build 9 | .fi 10 | .RE 11 | .RS 0 12 | .IP \(bu 2 13 | \fB\fP: 14 | A folder containing a \fBpackage\.json\fP file in its root\. 15 | 16 | .RE 17 | .SH DESCRIPTION 18 | .P 19 | This is the plumbing command called by \fBnpm link\fP and \fBnpm install\fP\|\. 20 | .P 21 | It should generally be called during installation, but if you need to run it 22 | directly, run: 23 | .P 24 | .RS 2 25 | .nf 26 | npm run\-script build 27 | .fi 28 | .RE 29 | .SH SEE ALSO 30 | .RS 0 31 | .IP \(bu 2 32 | npm help install 33 | .IP \(bu 2 34 | npm help link 35 | .IP \(bu 2 36 | npm help 7 scripts 37 | .IP \(bu 2 38 | npm help 5 package\.json 39 | 40 | .RE 41 | 42 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-bundle.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-BUNDLE" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-bundle\fR \- REMOVED 4 | .SH DESCRIPTION 5 | .P 6 | The \fBnpm bundle\fP command has been removed in 1\.0, for the simple reason 7 | that it is no longer necessary, as the default behavior is now to 8 | install packages into the local space\. 9 | .P 10 | Just use \fBnpm install\fP now to do what \fBnpm bundle\fP used to do\. 11 | .SH SEE ALSO 12 | .RS 0 13 | .IP \(bu 2 14 | npm help install 15 | 16 | .RE 17 | 18 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-ping.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PING" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-ping\fR \- Ping npm registry 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm ping [\-\-registry ] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Ping the configured or given npm registry and verify authentication\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help config 18 | .IP \(bu 2 19 | npm help 7 config 20 | .IP \(bu 2 21 | npm help 5 npmrc 22 | 23 | .RE 24 | 25 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-prefix.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PREFIX" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-prefix\fR \- Display prefix 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm prefix [\-g] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the local prefix to standard out\. This is the closest parent directory 14 | to contain a package\.json file unless \fB\-g\fP is also specified\. 15 | .P 16 | If \fB\-g\fP is specified, this will be the value of the global prefix\. See 17 | npm help 7 \fBnpm\-config\fP for more detail\. 18 | .SH SEE ALSO 19 | .RS 0 20 | .IP \(bu 2 21 | npm help root 22 | .IP \(bu 2 23 | npm help bin 24 | .IP \(bu 2 25 | npm help 5 folders 26 | .IP \(bu 2 27 | npm help config 28 | .IP \(bu 2 29 | npm help 7 config 30 | .IP \(bu 2 31 | npm help 5 npmrc 32 | 33 | .RE 34 | 35 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-rebuild.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-REBUILD" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-rebuild\fR \- Rebuild a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm rebuild [ [ \.\.\.]] 9 | npm rb [ [ \.\.\.]] 10 | .fi 11 | .RE 12 | .RS 0 13 | .IP \(bu 2 14 | \fB\fP: 15 | The package to rebuild 16 | 17 | .RE 18 | .SH DESCRIPTION 19 | .P 20 | This command runs the \fBnpm build\fP command on the matched folders\. This is useful 21 | when you install a new version of node, and must recompile all your C++ addons with 22 | the new binary\. 23 | .SH SEE ALSO 24 | .RS 0 25 | .IP \(bu 2 26 | npm help build 27 | .IP \(bu 2 28 | npm help install 29 | 30 | .RE 31 | 32 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-rm.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-RM" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-rm\fR \- Remove a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm rm 9 | npm r 10 | npm uninstall 11 | npm un 12 | .fi 13 | .RE 14 | .SH DESCRIPTION 15 | .P 16 | This uninstalls a package, completely removing everything npm installed 17 | on its behalf\. 18 | .SH SEE ALSO 19 | .RS 0 20 | .IP \(bu 2 21 | npm help prune 22 | .IP \(bu 2 23 | npm help install 24 | .IP \(bu 2 25 | npm help 5 folders 26 | .IP \(bu 2 27 | npm help config 28 | .IP \(bu 2 29 | npm help 7 config 30 | .IP \(bu 2 31 | npm help 5 npmrc 32 | 33 | .RE 34 | 35 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-root.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-ROOT" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-root\fR \- Display npm root 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm root 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the effective \fBnode_modules\fP folder to standard out\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help prefix 18 | .IP \(bu 2 19 | npm help bin 20 | .IP \(bu 2 21 | npm help 5 folders 22 | .IP \(bu 2 23 | npm help config 24 | .IP \(bu 2 25 | npm help 7 config 26 | .IP \(bu 2 27 | npm help 5 npmrc 28 | 29 | .RE 30 | 31 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-star.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-STAR" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-star\fR \- Mark your favorite packages 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm star [, \.\.\.] 9 | npm unstar [, \.\.\.] 10 | .fi 11 | .RE 12 | .SH DESCRIPTION 13 | .P 14 | "Starring" a package means that you have some interest in it\. It's 15 | a vaguely positive way to show that you care\. 16 | .P 17 | "Unstarring" is the same thing, but in reverse\. 18 | .P 19 | It's a boolean thing\. Starring repeatedly has no additional effect\. 20 | .SH SEE ALSO 21 | .RS 0 22 | .IP \(bu 2 23 | npm help view 24 | .IP \(bu 2 25 | npm help whoami 26 | .IP \(bu 2 27 | npm help adduser 28 | 29 | .RE 30 | 31 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-stars.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-STARS" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-stars\fR \- View packages marked as favorites 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm stars 9 | npm stars [username] 10 | .fi 11 | .RE 12 | .SH DESCRIPTION 13 | .P 14 | If you have starred a lot of neat things and want to find them again 15 | quickly this command lets you do just that\. 16 | .P 17 | You may also want to see your friend's favorite packages, in this case 18 | you will most certainly enjoy this command\. 19 | .SH SEE ALSO 20 | .RS 0 21 | .IP \(bu 2 22 | npm help star 23 | .IP \(bu 2 24 | npm help view 25 | .IP \(bu 2 26 | npm help whoami 27 | .IP \(bu 2 28 | npm help adduser 29 | 30 | .RE 31 | 32 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-start.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-START" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-start\fR \- Start a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm start [\-\- ] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This runs a package's "start" script, if one was provided\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help run\-script 18 | .IP \(bu 2 19 | npm help 7 scripts 20 | .IP \(bu 2 21 | npm help test 22 | .IP \(bu 2 23 | npm help restart 24 | .IP \(bu 2 25 | npm help stop 26 | 27 | .RE 28 | 29 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-stop.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-STOP" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-stop\fR \- Stop a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm stop [\-\- ] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This runs a package's "stop" script, if one was provided\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help run\-script 18 | .IP \(bu 2 19 | npm help 7 scripts 20 | .IP \(bu 2 21 | npm help test 22 | .IP \(bu 2 23 | npm help start 24 | .IP \(bu 2 25 | npm help restart 26 | 27 | .RE 28 | 29 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-test.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-TEST" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-test\fR \- Test a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm test [\-\- ] 9 | npm tst [\-\- ] 10 | .fi 11 | .RE 12 | .SH DESCRIPTION 13 | .P 14 | This runs a package's "test" script, if one was provided\. 15 | .P 16 | To run tests as a condition of installation, set the \fBnpat\fP config to 17 | true\. 18 | .SH SEE ALSO 19 | .RS 0 20 | .IP \(bu 2 21 | npm help run\-script 22 | .IP \(bu 2 23 | npm help 7 scripts 24 | .IP \(bu 2 25 | npm help start 26 | .IP \(bu 2 27 | npm help restart 28 | .IP \(bu 2 29 | npm help stop 30 | 31 | .RE 32 | 33 | -------------------------------------------------------------------------------- /lib/npm2/man/man1/npm-whoami.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-WHOAMI" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-whoami\fR \- Display npm username 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm whoami 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the \fBusername\fP config to standard output\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help config 18 | .IP \(bu 2 19 | npm help 7 config 20 | .IP \(bu 2 21 | npm help 5 npmrc 22 | .IP \(bu 2 23 | npm help adduser 24 | 25 | .RE 26 | 27 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-bin.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-BIN" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-bin\fR \- Display npm bin folder 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.bin(args, cb) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the folder where npm will install executables\. 14 | .P 15 | This function should not be used programmatically\. Instead, just refer 16 | to the \fBnpm\.bin\fP property\. 17 | 18 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-bugs.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-BUGS" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.bugs(package, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command tries to guess at the likely location of a package's 14 | bug tracker URL, and then tries to open it using the \fB\-\-browser\fP 15 | config param\. 16 | .P 17 | Like other commands, the first parameter is an array\. This command only 18 | uses the first element, which is expected to be a package name with an 19 | optional version number\. 20 | .P 21 | This command will launch a browser, so this command may not be the most 22 | friendly for programmatic use\. 23 | 24 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-docs.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-DOCS" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-docs\fR \- Docs for a package in a web browser maybe 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.docs(package, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command tries to guess at the likely location of a package's 14 | documentation URL, and then tries to open it using the \fB\-\-browser\fP 15 | config param\. 16 | .P 17 | Like other commands, the first parameter is an array\. This command only 18 | uses the first element, which is expected to be a package name with an 19 | optional version number\. 20 | .P 21 | This command will launch a browser, so this command may not be the most 22 | friendly for programmatic use\. 23 | 24 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-explore.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-EXPLORE" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-explore\fR \- Browse an installed package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.explore(args, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Spawn a subshell in the directory of the installed package specified\. 14 | .P 15 | If a command is specified, then it is run in the subshell, which then 16 | immediately terminates\. 17 | .P 18 | Note that the package is \fInot\fR automatically rebuilt afterwards, so be 19 | sure to use \fBnpm rebuild \fP if you make any changes\. 20 | .P 21 | 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\. 22 | 23 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-install.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-INSTALL" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-install\fR \- install a package programmatically 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.install([where,] packages, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This acts much the same ways as installing on the command\-line\. 14 | .P 15 | The 'where' parameter is optional and only used internally, and it specifies 16 | where the packages should be installed to\. 17 | .P 18 | The 'packages' parameter is an array of strings\. Each element in the array is 19 | the name of a package to be installed\. 20 | .P 21 | Finally, 'callback' is a function that will be called when all packages have been 22 | installed or when an error has been encountered\. 23 | 24 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-outdated.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-OUTDATED" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-outdated\fR \- Check for outdated packages 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.outdated([packages,] callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command will check the registry to see if the specified packages are 14 | currently outdated\. 15 | .P 16 | If the 'packages' parameter is left out, npm will check all packages\. 17 | 18 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-pack.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PACK" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-pack\fR \- Create a tarball from a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.pack([packages,] callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | For anything that's installable (that is, a package folder, tarball, 14 | tarball url, name@tag, name@version, or name), this command will fetch 15 | it to the cache, and then copy the tarball to the current working 16 | directory as \fB\-\.tgz\fP, and then write the filenames out to 17 | stdout\. 18 | .P 19 | If the same package is specified multiple times, then the file will be 20 | overwritten the second time\. 21 | .P 22 | If no arguments are supplied, then npm packs the current package folder\. 23 | 24 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-ping.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PING" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-ping\fR \- Ping npm registry 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.registry\.ping(registry, options, function (er, pong)) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Attempts to connect to the given registry, returning a \fBpong\fP 14 | object with various metadata if it succeeds\. 15 | .P 16 | This function is primarily useful for debugging connection issues 17 | to npm registries\. 18 | 19 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-prefix.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PREFIX" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-prefix\fR \- Display prefix 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.prefix(args, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the prefix to standard out\. 14 | .P 15 | \|'args' is never used and callback is never called with data\. 16 | \|'args' must be present or things will break\. 17 | .P 18 | This function is not useful programmatically 19 | 20 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-prune.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PRUNE" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-prune\fR \- Remove extraneous packages 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.prune([packages,] callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command removes "extraneous" packages\. 14 | .P 15 | The first parameter is optional, and it specifies packages to be removed\. 16 | .P 17 | No packages are specified, then all packages will be checked\. 18 | .P 19 | Extraneous packages are packages that are not listed on the parent 20 | package's dependencies list\. 21 | 22 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-rebuild.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-REBUILD" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-rebuild\fR \- Rebuild a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.rebuild([packages,] callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command runs the \fBnpm build\fP command on each of the matched packages\. This is useful 14 | when you install a new version of node, and must recompile all your C++ addons with 15 | the new binary\. If no 'packages' parameter is specify, every package will be rebuilt\. 16 | .SH CONFIGURATION 17 | .P 18 | See \fBnpm help build\fP 19 | 20 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-repo.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-REPO" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-repo\fR \- Open package repository page in the browser 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.repo(package, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command tries to guess at the likely location of a package's 14 | repository URL, and then tries to open it using the \fB\-\-browser\fP 15 | config param\. 16 | .P 17 | Like other commands, the first parameter is an array\. This command only 18 | uses the first element, which is expected to be a package name with an 19 | optional version number\. 20 | .P 21 | This command will launch a browser, so this command may not be the most 22 | friendly for programmatic use\. 23 | 24 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-root.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-ROOT" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-root\fR \- Display npm root 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.root(args, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the effective \fBnode_modules\fP folder to standard out\. 14 | .P 15 | \|'args' is never used and callback is never called with data\. 16 | \|'args' must be present or things will break\. 17 | .P 18 | This function is not useful programmatically\. 19 | 20 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-shrinkwrap.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-SHRINKWRAP" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-shrinkwrap\fR \- programmatically generate package shrinkwrap file 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.shrinkwrap(args, [silent,] callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This acts much the same ways as shrinkwrapping on the command\-line\. 14 | .P 15 | This command does not take any arguments, but 'args' must be defined\. 16 | Beyond that, if any arguments are passed in, npm will politely warn that it 17 | does not take positional arguments\. 18 | .P 19 | If the 'silent' parameter is set to true, nothing will be output to the screen, 20 | but the shrinkwrap file will still be written\. 21 | .P 22 | Finally, 'callback' is a function that will be called when the shrinkwrap has 23 | been saved\. 24 | 25 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-start.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-START" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-start\fR \- Start a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.start(packages, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This runs a package's "start" script, if one was provided\. 14 | .P 15 | npm can start multiple packages\. Just specify multiple packages in the 16 | \fBpackages\fP parameter\. 17 | 18 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-stop.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-STOP" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-stop\fR \- Stop a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.stop(packages, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This runs a package's "stop" script, if one was provided\. 14 | .P 15 | npm can run stop on multiple packages\. Just specify multiple packages 16 | in the \fBpackages\fP parameter\. 17 | 18 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-test.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-TEST" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-test\fR \- Test a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.test(packages, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This runs a package's "test" script, if one was provided\. 14 | .P 15 | To run tests as a condition of installation, set the \fBnpat\fP config to 16 | true\. 17 | .P 18 | npm can run tests on multiple packages\. Just specify multiple packages 19 | in the \fBpackages\fP parameter\. 20 | 21 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-uninstall.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-UNINSTALL" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-uninstall\fR \- uninstall a package programmatically 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.uninstall(packages, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This acts much the same ways as uninstalling on the command\-line\. 14 | .P 15 | The 'packages' parameter is an array of strings\. Each element in the array is 16 | the name of a package to be uninstalled\. 17 | .P 18 | Finally, 'callback' is a function that will be called when all packages have been 19 | uninstalled or when an error has been encountered\. 20 | 21 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-unpublish.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-UNPUBLISH" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-unpublish\fR \- Remove a package from the registry 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.unpublish(package, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This removes a package version from the registry, deleting its 14 | entry and removing the tarball\. 15 | .P 16 | The package parameter must be defined\. 17 | .P 18 | Only the first element in the package parameter is used\. If there is no first 19 | element, then npm assumes that the package at the current working directory 20 | is what is meant\. 21 | .P 22 | If no version is specified, or if all versions are removed then 23 | the root package entry is removed from the registry entirely\. 24 | 25 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-update.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-UPDATE" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-update\fR \- Update a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.update(packages, callback) 9 | .fi 10 | .RE 11 | .TH "DESCRIPTION" "" "September 2015" "" "" 12 | .SH "NAME" 13 | \fBDESCRIPTION\fR 14 | .P 15 | Updates a package, upgrading it to the latest version\. It also installs any 16 | missing packages\. 17 | .P 18 | The \fBpackages\fP argument is an array of packages to update\. The \fBcallback\fP 19 | parameter will be called when done or when an error occurs\. 20 | .SH SEE ALSO 21 | .RS 0 22 | .IP \(bu 2 23 | npm help update 24 | 25 | .RE 26 | 27 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-version.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-VERSION" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-version\fR \- Bump a package version 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.version(newversion, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Run this in a package directory to bump the version and write the new 14 | data back to the package\.json file\. 15 | .P 16 | If run in a git repo, it will also create a version commit and tag, and 17 | fail if the repo is not clean\. 18 | .P 19 | Like all other commands, this function takes a string array as its first 20 | parameter\. The difference, however, is this function will fail if it does 21 | not have exactly one element\. The only element should be a version number\. 22 | 23 | -------------------------------------------------------------------------------- /lib/npm2/man/man3/npm-whoami.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-WHOAMI" "3" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-whoami\fR \- Display npm username 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.whoami(args, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the \fBusername\fP config to standard output\. 14 | .P 15 | \|'args' is never used and callback is never called with data\. 16 | \|'args' must be present or things will break\. 17 | .P 18 | This function is not useful programmatically 19 | 20 | -------------------------------------------------------------------------------- /lib/npm2/scripts/publish-tag.js: -------------------------------------------------------------------------------- 1 | var semver = require("semver") 2 | var version = semver.parse(require("../package.json").version) 3 | console.log('v%s.%s-next', version.major, version.minor) 4 | -------------------------------------------------------------------------------- /lib/npm2/scripts/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # script for creating a zip and tarball for inclusion in node 4 | 5 | unset CDPATH 6 | 7 | set -e 8 | 9 | rm -rf release *.tgz || true 10 | mkdir release 11 | node ./cli.js pack --loglevel error >/dev/null 12 | mv *.tgz release 13 | cd release 14 | tar xzf *.tgz 15 | 16 | mkdir node_modules 17 | mv package node_modules/npm 18 | 19 | # make the zip for windows users 20 | cp node_modules/npm/bin/*.cmd . 21 | zipname=npm-$(node ../cli.js -v).zip 22 | zip -q -9 -r -X "$zipname" *.cmd node_modules 23 | 24 | # make the tar for node's deps 25 | cd node_modules 26 | tarname=npm-$(node ../../cli.js -v).tgz 27 | tar czf "$tarname" npm 28 | 29 | cd .. 30 | mv "node_modules/$tarname" . 31 | 32 | rm -rf *.cmd 33 | rm -rf node_modules 34 | 35 | echo "release/$tarname" 36 | echo "release/$zipname" 37 | -------------------------------------------------------------------------------- /lib/npm2/scripts/relocate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Change the cli shebang to point at the specified node 4 | # Useful for when the program is moved around after install. 5 | # Also used by the default 'make install' in node to point 6 | # npm at the newly installed node, rather than the first one 7 | # in the PATH, which would be the default otherwise. 8 | 9 | # bash /path/to/npm/scripts/relocate.sh $nodepath 10 | # If $nodepath is blank, then it'll use /usr/bin/env 11 | 12 | dir="$(dirname "$(dirname "$0")")" 13 | cli="$dir"/bin/npm-cli.js 14 | tmp="$cli".tmp 15 | 16 | node="$1" 17 | if [ "x$node" = "x" ]; then 18 | node="/usr/bin/env node" 19 | fi 20 | node="#!$node" 21 | 22 | sed -e 1d "$cli" > "$tmp" 23 | echo "$node" > "$cli" 24 | cat "$tmp" >> "$cli" 25 | rm "$tmp" 26 | chmod ogu+x $cli 27 | -------------------------------------------------------------------------------- /lib/npm2/scripts/update-authors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | git log --reverse --format='%aN <%aE>' | perl -wnE ' 4 | BEGIN { 5 | say "# Authors sorted by whether or not they\x27re me"; 6 | } 7 | 8 | print $seen{$_} = $_ unless $seen{$_} 9 | ' > AUTHORS 10 | -------------------------------------------------------------------------------- /lib/npm2/test/common.js: -------------------------------------------------------------------------------- 1 | 2 | // whatever, it's just tests. 3 | ;["util","assert"].forEach(function (thing) { 4 | thing = require("thing") 5 | for (var i in thing) global[i] = thing[i] 6 | } 7 | 8 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/bundlerecurs/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "bundletest" 2 | , "version" : "1.0.0" 3 | , "dependencies" : { "bundletest" : "*" } 4 | } 5 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/change-bin-1/bin/foo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "foo" 3 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/change-bin-1/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-change-bin" 2 | ,"version":"1.2.3" 3 | ,"directories":{"bin":"./bin"}} 4 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/change-bin-2/bin/bar: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "foo" 3 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/change-bin-2/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-change-bin" 2 | ,"version":"2.3.4" 3 | ,"directories":{"bin":"./bin"}} 4 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/failer/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "npm-test-failer" 2 | , "version" : "9999.999.99" 3 | , "dependencies" : { "base64" : "*" } 4 | , "scripts" : { "install" : "exit 1", "test": "echo 'This is where the test output would go'; echo 'more test output'; echo 'MOAR MOAR MoAR'; exit 1" } 5 | } 6 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/fast/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "fast" 2 | , "description" : "does nothing, and not very fast" 3 | , "version" : "1.2.3" 4 | , "scripts" : 5 | { "preinstall" : "sleep 1 && echo fast 1 $(date +%s) && echo fast 2" 6 | , "install" : "sleep 1 && echo fast 2 $(date +%s) && echo fast 3" 7 | , "postinstall" : "sleep 1 && echo fast 3 $(date +%s) && echo fast 4" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/package-bar/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-bar", 3 | "version": "0.5.0", 4 | "dependencies": { 5 | "package-foo": "*" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/package-config/package.json: -------------------------------------------------------------------------------- 1 | {"name":"package-config" 2 | ,"version":"1.2.3" 3 | ,"config":{"foo":"bar"} 4 | ,"scripts":{"test":"./test.js"}} 5 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/package-config/test.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var env = process.env 4 | , orig = require(process.env.npm_package_name+"/package.json").config 5 | , assert = require("assert") 6 | 7 | console.log("Before running this test, do:\n" 8 | +" npm config set package-config:foo boo\n" 9 | +"or else it's about to fail.") 10 | assert.equal(env.npm_package_config_foo, "boo", "foo != boo") 11 | assert.equal(orig.foo, "bar", "original foo != bar") 12 | assert.equal(env["npm_config_package-config:foo"], "boo", 13 | "package-config:foo != boo") 14 | console.log({ foo: env.npm_package_config_foo 15 | , orig_foo: orig.foo 16 | , "package-config:foo": env["npm_config_package-config:foo"] 17 | }) 18 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/package-foo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-foo", 3 | "version": "0.5.0" 4 | } 5 | -------------------------------------------------------------------------------- /lib/npm2/test/disabled/slow/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "slow" 2 | , "description" : "just like fast, but even slower" 3 | , "version" : "1.2.3" 4 | , "scripts" : 5 | { "preinstall" : "sleep 1 && echo slow 1 $(date +%s) && sleep 1 && echo slow 2 $(date +%s)" 6 | , "install" : "sleep 1 && echo slow 2 $(date +%s) && sleep 1 && echo slow 3 $(date +%s)" 7 | , "postinstall" : "sleep 1 && echo slow 3 $(date +%s) && sleep 1 && echo slow 4 $(date +%s)" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/config/builtin: -------------------------------------------------------------------------------- 1 | builtin-config = true 2 | -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/config/globalconfig: -------------------------------------------------------------------------------- 1 | package-config:foo = boo 2 | -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/config/malformed: -------------------------------------------------------------------------------- 1 | email = """ -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/config/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/fixtures/config/package.json -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/config/userconfig: -------------------------------------------------------------------------------- 1 | email = i@izs.me 2 | env-thing = ${random_env_var} 3 | init.author.name = Isaac Z. Schlueter 4 | init.author.email = i@izs.me 5 | init.author.url = http://blog.izs.me/ 6 | init.version = 1.2.3 7 | proprietary-attribs = false 8 | npm:publishtest = true 9 | _npmjs.org:couch = https://admin:password@localhost:5984/registry 10 | npm-www:nocache = 1 11 | nodedir = /Users/isaacs/dev/js/node-v0.8 12 | sign-git-tag = true 13 | message = v%s 14 | strict-ssl = false 15 | tmp = ~/.tmp 16 | _auth = dXNlcm5hbWU6cGFzc3dvcmQ= 17 | 18 | [_token] 19 | AuthSession = yabba-dabba-doodle 20 | version = 1 21 | expires = 1345001053415 22 | path = / 23 | httponly = true 24 | -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/config/userconfig-with-gc: -------------------------------------------------------------------------------- 1 | globalconfig=/Users/zkat/Documents/code/npm/test/fixtures/config/globalconfig 2 | email=i@izs.me 3 | env-thing=asdf 4 | init.author.name=Isaac Z. Schlueter 5 | init.author.email=i@izs.me 6 | init.author.url=http://blog.izs.me/ 7 | init.version=1.2.3 8 | proprietary-attribs=false 9 | npm:publishtest=true 10 | _npmjs.org:couch=https://admin:password@localhost:5984/registry 11 | npm-www:nocache=1 12 | sign-git-tag=false 13 | message=v%s 14 | strict-ssl=false 15 | _auth="dXNlcm5hbWU6cGFzc3dvcmQ=" 16 | 17 | [_token] 18 | AuthSession=yabba-dabba-doodle 19 | version=1 20 | expires=1345001053415 21 | path=/ 22 | httponly=true 23 | -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/forked-underscore-1.5.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/fixtures/forked-underscore-1.5.1.tgz -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/github-com-BryanDonovan-dummy-npm-bar.git.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/fixtures/github-com-BryanDonovan-dummy-npm-bar.git.tar.gz -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/fixtures/github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/github-com-BryanDonovan-dummy-npm-foo.git.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/fixtures/github-com-BryanDonovan-dummy-npm-foo.git.tar.gz -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/github-com-BryanDonovan-npm-git-test.git.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/fixtures/github-com-BryanDonovan-npm-git-test.git.tar.gz -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/gitignore-and-npmignore.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/fixtures/gitignore-and-npmignore.tgz -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/gitignore.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/fixtures/gitignore.tgz -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/npmignore.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/fixtures/npmignore.tgz -------------------------------------------------------------------------------- /lib/npm2/test/fixtures/scoped-underscore-1.3.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/fixtures/scoped-underscore-1.3.1.tgz -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-array-bin/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-array-bin/bin/array-bin: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.log('ok') 3 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-array-bin/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-array-bin" 2 | , "version":"1.2.5" 3 | , "bin": [ "bin/array-bin" ] 4 | , "scripts": { "test": "node test.js" } } 5 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-array-bin/test.js: -------------------------------------------------------------------------------- 1 | require('child_process').exec('array-bin', { env: process.env }, 2 | function (err) { 3 | if (err && err.code) throw new Error('exited badly with code = ' + err.code) 4 | }) 5 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-blerg/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-blerg/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-blerg" 2 | , "version" : "0.0.2" 3 | , "scripts" : { "test" : "node test.js" } 4 | , "publishConfig": {"tag": "foo"} 5 | } 6 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-blerg/test.js: -------------------------------------------------------------------------------- 1 | 2 | var assert = require("assert") 3 | assert.equal(undefined, process.env.npm_config__password, "password exposed!") 4 | assert.equal(undefined, process.env.npm_config__auth, "auth exposed!") 5 | assert.equal(undefined, process.env.npm_config__authCrypt, "authCrypt exposed!") 6 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-blerg3/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-blerg3/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-blerg3" 2 | , "homepage": "https://github.com/npm/npm/issues/2658" 3 | , "version" : "0.0.0" 4 | , "scripts" : { "test" : "node test.js" } 5 | } 6 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-blerg3/test.js: -------------------------------------------------------------------------------- 1 | 2 | var assert = require("assert") 3 | assert.equal(undefined, process.env.npm_config__password, "password exposed!") 4 | assert.equal(undefined, process.env.npm_config__auth, "auth exposed!") 5 | assert.equal(undefined, process.env.npm_config__authCrypt, "authCrypt exposed!") 6 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-bundled-git/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-bundled-git/minimatch-expected.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Isaac Z. Schlueter (http://blog.izs.me)", 3 | "name": "minimatch", 4 | "description": "a glob matcher in javascript", 5 | "version": "0.2.1", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/isaacs/minimatch.git" 9 | }, 10 | "main": "minimatch.js", 11 | "scripts": { 12 | "test": "tap test" 13 | }, 14 | "engines": { 15 | "node": "*" 16 | }, 17 | "dependencies": { 18 | "lru-cache": "~1.0.5" 19 | }, 20 | "devDependencies": { 21 | "tap": "~0.1.3" 22 | }, 23 | "licenses" : [ 24 | { 25 | "type" : "MIT", 26 | "url" : "http://github.com/isaacs/minimatch/raw/master/LICENSE" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-bundled-git/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-bundled-git" 2 | ,"scripts":{"test":"node test.js"} 3 | ,"version":"1.2.5" 4 | ,"dependencies":{"glob":"git://github.com/isaacs/node-glob.git#npm-test"} 5 | ,"bundledDependencies":["glob"]} 6 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-bundled-git/test.js: -------------------------------------------------------------------------------- 1 | var a = require("./node_modules/glob/node_modules/minimatch/package.json") 2 | var e = require("./minimatch-expected.json") 3 | var assert = require("assert") 4 | assert.deepEqual(a, e, "didn't get expected minimatch/package.json") 5 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-dir-bin/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-dir-bin/bin/dir-bin: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.log('ok') 3 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-dir-bin/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-dir-bin" 2 | , "version":"1.2.5" 3 | , "directories": { "bin": "./bin" } 4 | , "scripts": { "test": "node test.js" } } 5 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-dir-bin/test.js: -------------------------------------------------------------------------------- 1 | require('child_process').exec('dir-bin', { stdio: 'pipe', 2 | env: process.env }, function (err) { 3 | if (err && err.code) throw new Error('exited badly with code = ' + err.code) 4 | }) 5 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-env-reader/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-env-reader/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-env-reader" 2 | , "version" : "1.2.3" 3 | , "scripts" : 4 | { "install" : "node test.js" 5 | , "preinstall" : "node test.js" 6 | , "preuninstall" : "node test.js" 7 | , "postuninstall" : "node test.js" 8 | , "test" : "node test.js" 9 | , "stop" : "node test.js" 10 | , "start" : "node test.js" 11 | , "restart" : "node test.js" 12 | , "foo" : "node test.js" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-env-reader/test.js: -------------------------------------------------------------------------------- 1 | var envs = [] 2 | for (var e in process.env) { 3 | if (e.match(/npm|^path$/i)) envs.push(e + '=' + process.env[e]) 4 | } 5 | envs.sort(function (a, b) { 6 | return a === b ? 0 : a > b ? -1 : 1 7 | }).forEach(function (e) { 8 | console.log(e) 9 | }) 10 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-files/.npmignore: -------------------------------------------------------------------------------- 1 | /sub/ignore1 2 | ./sub/include2 3 | ignore3 4 | ./include4 5 | ignoredir1 6 | ignoredir2/ 7 | *.tgz 8 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-files/include4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/packages/npm-test-files/include4 -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-files/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-files" 2 | , "version":"1.2.5" 3 | , "files": 4 | [ "include4" 5 | , "sub/include" 6 | , "sub/include2" 7 | , "sub/include4" 8 | , "test.sh" 9 | , ".npmignore" ] 10 | , "scripts":{"test":"bash test.sh"}} 11 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-files/sub/include: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/packages/npm-test-files/sub/include -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-files/sub/include2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/packages/npm-test-files/sub/include2 -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-files/sub/include4: -------------------------------------------------------------------------------- 1 | This file should be in the package. 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-files/test.sh: -------------------------------------------------------------------------------- 1 | x=`find . | grep ignore | grep -v npmignore` 2 | if [ "$x" != "" ]; then 3 | echo "ignored files included: $x" 4 | exit 1 5 | fi 6 | 7 | x=`find . | grep -v ignore | sort` 8 | y=". 9 | ./include4 10 | ./package.json 11 | ./sub 12 | ./sub/include 13 | ./sub/include2 14 | ./sub/include4 15 | ./test.sh" 16 | if [ "$x" != "$y" ]; then 17 | echo "missing included files" 18 | echo "got:" 19 | echo "===" 20 | echo "$x" 21 | echo "===" 22 | echo "wanted:" 23 | echo "===" 24 | echo "$y" 25 | echo "===" 26 | exit 1 27 | fi 28 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-ignore-nested-nm/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-ignore-nested-nm/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-ignore-nested-nm" 2 | ,"version":"1.2.5" 3 | ,"scripts":{"test":"node test.js"}} 4 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-ignore-nested-nm/test.js: -------------------------------------------------------------------------------- 1 | fs = require('fs') 2 | fs.statSync(__dirname + '/lib/node_modules/foo') 3 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-ignore/.npmignore: -------------------------------------------------------------------------------- 1 | /sub/ignore1 2 | ./sub/include2 3 | ignore3 4 | ./include4 5 | ignoredir1 6 | ignoredir2/ 7 | *.tgz 8 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-ignore/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-ignore/include4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/packages/npm-test-ignore/include4 -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-ignore/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-ignore" 2 | , "version":"1.2.5" 3 | , "scripts":{"test":"bash test.sh"}} 4 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-ignore/sub/include: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/packages/npm-test-ignore/sub/include -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-ignore/sub/include2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm2/test/packages/npm-test-ignore/sub/include2 -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-ignore/sub/include4: -------------------------------------------------------------------------------- 1 | This file should be in the package. 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-ignore/test.sh: -------------------------------------------------------------------------------- 1 | x=`find . | grep ignore | grep -v npmignore` 2 | if [ "$x" != "" ]; then 3 | echo "ignored files included: $x" 4 | exit 1 5 | fi 6 | 7 | x=`find . | grep -v ignore | sort` 8 | y=". 9 | ./include4 10 | ./package.json 11 | ./README 12 | ./sub 13 | ./sub/include 14 | ./sub/include2 15 | ./sub/include4 16 | ./test.sh" 17 | y="`echo "$y" | sort`" 18 | if [ "$x" != "$y" ]; then 19 | echo "missing included files" 20 | echo "got:" 21 | echo "===" 22 | echo "$x" 23 | echo "===" 24 | echo "wanted:" 25 | echo "===" 26 | echo "$y" 27 | echo "===" 28 | exit 1 29 | fi 30 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-missing-bindir/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-missing-bindir/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-missing-bindir" 2 | , "version" : "0.0.0" 3 | , "scripts" : { "test" : "node test.js" } 4 | , "directories": { "bin" : "./not-found" } } 5 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-missing-bindir/test.js: -------------------------------------------------------------------------------- 1 | 2 | var assert = require("assert") 3 | assert.equal(undefined, process.env.npm_config__password, "password exposed!") 4 | assert.equal(undefined, process.env.npm_config__auth, "auth exposed!") 5 | assert.equal(undefined, process.env.npm_config__authCrypt, "authCrypt exposed!") 6 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-optional-deps/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-optional-deps/package.json: -------------------------------------------------------------------------------- 1 | { "name": "npm-test-optional-deps" 2 | , "version": "1.2.5" 3 | , "scripts": { "test": "node test.js" } 4 | , "optionalDependencies": 5 | { "npm-test-foobarzaaakakaka": "http://example.com/" 6 | , "dnode": "10.999.14234" 7 | , "sax": "0.3.5" 8 | , "glob": "some invalid version 99 #! $$ x y z" 9 | , "npm-test-failer":"*" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-optional-deps/test.js: -------------------------------------------------------------------------------- 1 | var fs = require("fs") 2 | var assert = require("assert") 3 | var path = require("path") 4 | 5 | // sax should be the only dep that ends up installed 6 | 7 | var dir = path.resolve(__dirname, "node_modules") 8 | assert.deepEqual(fs.readdirSync(dir), ["sax"]) 9 | assert.equal(require("sax/package.json").version, "0.3.5") 10 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-platform-all/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-platform-all/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-platform-all" 2 | ,"version":"9.9.9-9" 3 | ,"homepage":"http://www.zombo.com/" 4 | ,"os":["darwin","linux","win32","solaris","haiku","sunos","freebsd","openbsd","netbsd"] 5 | ,"cpu":["arm","mips","ia32","x64","sparc"]} 6 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-platform/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-platform/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-platform" 2 | ,"version":"9.9.9-9" 3 | ,"homepage":"http://www.youtube.com/watch?v=dQw4w9WgXcQ" 4 | ,"os":["!this_is_not_a_real_os", "!neither_is_this"] 5 | ,"cpu":["!this_is_not_a_real_cpu","!this_isnt_either"]} 6 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-private/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-private/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-private" 2 | ,"version":"9.9.9-9" 3 | ,"homepage":"http://www.youtube.com/watch?v=1MLry6Cn_D4" 4 | ,"private":"true"} 5 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-shrinkwrap/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-shrinkwrap/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 3 | "name": "npm-test-shrinkwrap", 4 | "version": "0.0.0", 5 | "dependencies": { 6 | "npm-test-single-file": "https://gist.github.com/isaacs/1837112/raw/9ef57a59fc22aeb1d1ca346b68826dcb638b8416/index.js", 7 | "glob": "git://github.com/isaacs/node-glob.git#npm-test", 8 | "minimatch": "~0.1.0" 9 | }, 10 | "scripts": { 11 | "test": "node test.js" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-test-package/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-test-package/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-test-package" 2 | , "author" : "Testy McMock" 3 | , "version" : "1.2.3-99-b" 4 | , "description" : "This is a test package used for debugging. It has some random data and that's all." 5 | } 6 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-url-dep/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm2/test/packages/npm-test-url-dep/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-url-dep" 2 | , "version" : "1.2.3" 3 | , "dependencies" : 4 | { "jsonify" : "https://github.com/substack/jsonify/tarball/master" 5 | , "sax": "isaacs/sax-js" 6 | , "canonical-host": "git://github.com/isaacs/canonical-host" 7 | } } 8 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/00-check-mock-dep.js: -------------------------------------------------------------------------------- 1 | console.log("TAP Version 13") 2 | 3 | process.on("uncaughtException", function (er) { 4 | if (er) { throw er } 5 | console.log("not ok - Failed checking mock registry dep. Expect much fail!") 6 | console.log("1..1") 7 | process.exit(1) 8 | }) 9 | 10 | var assert = require("assert") 11 | var semver = require("semver") 12 | var mock = require("npm-registry-mock/package.json").version 13 | var req = require("../../package.json").devDependencies["npm-registry-mock"] 14 | 15 | assert(semver.satisfies(mock, req)) 16 | console.log("ok") 17 | console.log("1..1") 18 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/00-verify-ls-ok.js: -------------------------------------------------------------------------------- 1 | var common = require("../common-tap") 2 | var test = require("tap").test 3 | var path = require("path") 4 | var cwd = path.resolve(__dirname, "..", "..") 5 | var fs = require("fs") 6 | 7 | test("npm ls in npm", function (t) { 8 | t.ok(fs.existsSync(cwd), "ensure that the path we are calling ls within exists") 9 | var files = fs.readdirSync(cwd) 10 | t.notEqual(files.length, 0, "ensure there are files in the directory we are to ls") 11 | 12 | var opt = { cwd: cwd, stdio: [ "ignore", "ignore", 2 ] } 13 | common.npm(["ls"], opt, function (err, code) { 14 | t.ifError(err, "error should not exist") 15 | t.equal(code, 0, "npm ls exited with code") 16 | t.end() 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/bin.js: -------------------------------------------------------------------------------- 1 | var path = require("path") 2 | var test = require("tap").test 3 | var common = require("../common-tap.js") 4 | var opts = { cwd: __dirname } 5 | var binDir = "../../node_modules/.bin" 6 | var fixture = path.resolve(__dirname, binDir) 7 | 8 | test('npm bin', function (t) { 9 | common.npm(["bin"], opts, function (err, code, stdout, stderr) { 10 | t.ifError(err, "bin ran without issue") 11 | t.notOk(stderr, "should have no stderr") 12 | t.equal(code, 0, "exit ok") 13 | var res = path.resolve(stdout) 14 | t.equal(res, fixture + "\n") 15 | t.end() 16 | }) 17 | }) 18 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/config-certfile.js: -------------------------------------------------------------------------------- 1 | require("./00-config-setup.js") 2 | 3 | var path = require("path") 4 | var fs = require("fs") 5 | var test = require("tap").test 6 | var npmconf = require("../../lib/config/core.js") 7 | 8 | test("cafile loads as ca", function (t) { 9 | var cafile = path.join(__dirname, "..", "fixtures", "config", "multi-ca") 10 | 11 | npmconf.load({cafile: cafile}, function (er, conf) { 12 | if (er) throw er 13 | 14 | t.same(conf.get("cafile"), cafile) 15 | t.same(conf.get("ca").join("\n"), fs.readFileSync(cafile, "utf8").trim()) 16 | t.end() 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/config-malformed.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | 3 | var npmconf = require("../../lib/config/core.js") 4 | var common = require("./00-config-setup.js") 5 | 6 | test('with malformed', function (t) { 7 | npmconf.load({}, common.malformed, function (er, conf) { 8 | t.ok(er, 'Expected parse error') 9 | if (!(er && /Failed parsing JSON config key email/.test(er.message))) { 10 | throw er 11 | } 12 | t.end() 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/invalid-cmd-exit-code.js: -------------------------------------------------------------------------------- 1 | var test = require("tap").test 2 | var common = require("../common-tap.js") 3 | 4 | var opts = { cwd: process.cwd() } 5 | 6 | test("npm asdf should return exit code 1", function (t) { 7 | common.npm(["asdf"], opts, function (er, c) { 8 | if (er) throw er 9 | t.ok(c, "exit code should not be zero") 10 | t.end() 11 | }) 12 | }) 13 | 14 | test("npm help should return exit code 0", function (t) { 15 | common.npm(["help"], opts, function (er, c) { 16 | if (er) throw er 17 | t.equal(c, 0, "exit code should be 0") 18 | t.end() 19 | }) 20 | }) 21 | 22 | test("npm help fadf should return exit code 0", function (t) { 23 | common.npm(["help", "fadf"], opts, function (er, c) { 24 | if (er) throw er 25 | t.equal(c, 0, "exit code should be 0") 26 | t.end() 27 | }) 28 | }) 29 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/lifecycle.js: -------------------------------------------------------------------------------- 1 | var test = require("tap").test 2 | var npm = require("../../") 3 | var lifecycle = require("../../lib/utils/lifecycle") 4 | 5 | test("lifecycle: make env correctly", function (t) { 6 | npm.load({enteente: Infinity}, function () { 7 | var env = lifecycle.makeEnv({}, null, process.env) 8 | 9 | t.equal("Infinity", env.npm_config_enteente) 10 | t.end() 11 | }) 12 | }) 13 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/ls-no-results.js: -------------------------------------------------------------------------------- 1 | var test = require("tap").test 2 | var spawn = require("child_process").spawn 3 | var node = process.execPath 4 | var npm = require.resolve("../../") 5 | var args = [ npm, "ls", "ceci n’est pas une package" ] 6 | test("ls exits non-zero when nothing found", function (t) { 7 | var child = spawn(node, args) 8 | child.on("exit", function (code) { 9 | t.notEqual(code, 0) 10 | t.end() 11 | }) 12 | }) 13 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/referer.js: -------------------------------------------------------------------------------- 1 | var common = require("../common-tap.js") 2 | var test = require("tap").test 3 | var http = require("http") 4 | 5 | test("should send referer http header", function (t) { 6 | http.createServer(function (q, s) { 7 | t.equal(q.headers.referer, "install foo") 8 | s.statusCode = 404 9 | s.end(JSON.stringify({error: "whatever"})) 10 | this.close() 11 | }).listen(common.port, function () { 12 | var reg = "http://localhost:" + common.port 13 | var args = [ "install", "foo", "--registry", reg ] 14 | common.npm(args, {}, function (er, code) { 15 | if (er) { 16 | throw er 17 | } 18 | // should not have ended nicely, since we returned an error 19 | t.ok(code) 20 | t.end() 21 | }) 22 | }) 23 | }) 24 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/semver-doc.js: -------------------------------------------------------------------------------- 1 | var test = require("tap").test 2 | 3 | test("semver doc is up to date", function (t) { 4 | var path = require("path") 5 | var moddoc = path.join(__dirname, "../../node_modules/semver/README.md") 6 | var mydoc = path.join(__dirname, "../../doc/misc/semver.md") 7 | var fs = require("fs") 8 | var mod = fs.readFileSync(moddoc, "utf8").replace(/semver\(1\)/, "semver(7)") 9 | var my = fs.readFileSync(mydoc, "utf8") 10 | t.equal(my, mod) 11 | t.end() 12 | }) 13 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/semver-tag.js: -------------------------------------------------------------------------------- 1 | // should not allow tagging with a valid semver range 2 | var common = require("../common-tap.js") 3 | var test = require("tap").test 4 | 5 | test("try to tag with semver range as tag name", function (t) { 6 | var cmd = ["tag", "zzzz@1.2.3", "v2.x", "--registry=http://localhost"] 7 | common.npm(cmd, { 8 | stdio: "pipe" 9 | }, function (er, code, so, se) { 10 | if (er) throw er 11 | t.similar(se, /Tag name must not be a valid SemVer range: v2.x\n/) 12 | t.equal(code, 1) 13 | t.end() 14 | }) 15 | }) 16 | -------------------------------------------------------------------------------- /lib/npm2/test/tap/zz-cleanup.js: -------------------------------------------------------------------------------- 1 | var common = require("../common-tap") 2 | var test = require("tap").test 3 | var rimraf = require("rimraf") 4 | 5 | test("cleanup", function (t) { 6 | rimraf.sync(common.npm_config_cache) 7 | t.end() 8 | }) 9 | -------------------------------------------------------------------------------- /lib/npm2/wercker.yml: -------------------------------------------------------------------------------- 1 | box: wercker/nodejs 2 | # Build definition 3 | build: 4 | # The steps that will be executed on build 5 | steps: 6 | # A step that executes `npm install` command 7 | - npm-install 8 | # A step that executes `npm test` command 9 | - npm-test 10 | 11 | # A custom script step, name value is used in the UI 12 | # and the code value contains the command that get executed 13 | - script: 14 | name: echo nodejs information 15 | code: | 16 | echo "node version $(node -v) running" 17 | echo "npm version $(npm -v) running" 18 | after-steps: 19 | - sherzberg/slack-notify: 20 | subdomain: npm-inc 21 | token: $SLACK_TOKEN 22 | channel: github-commits 23 | -------------------------------------------------------------------------------- /lib/npm3/.npmignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | .*.swp 3 | npm-debug.log 4 | /test/bin 5 | /test/output.log 6 | /test/packages/*/node_modules 7 | /test/packages/npm-test-depends-on-spark/which-spark.log 8 | /test/packages/test-package/random-data.txt 9 | /test/root 10 | node_modules/marked 11 | node_modules/ronn 12 | node_modules/tap 13 | node_modules/.bin 14 | node_modules/npm-registry-mock 15 | /npmrc 16 | /release/ 17 | 18 | # don't need these in the npm package. 19 | html/*.png 20 | 21 | # don't ignore .npmignore files 22 | # these are used in some tests. 23 | !.npmignore 24 | 25 | /npm-*.tgz 26 | 27 | *.pyc 28 | 29 | /test/tap/builtin-config 30 | -------------------------------------------------------------------------------- /lib/npm3/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - iojs 4 | - "0.12" 5 | - "0.10" 6 | - "0.8" 7 | env: 8 | - DEPLOY_VERSION=testing 9 | before_install: 10 | - "npm config set spin false" 11 | - "node . install -g ." 12 | - "sudo mkdir -p /var/run/couchdb" 13 | script: "npm run-script test-all" 14 | notifications: 15 | slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 16 | -------------------------------------------------------------------------------- /lib/npm3/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Before you submit a new issue 2 | 3 | * Check if there's a simple solution in the 4 | [Troubleshooting](https://github.com/npm/npm/wiki/Troubleshooting) 5 | wiki. 6 | * [Search for similar 7 | issues](https://github.com/npm/npm/search?q=Similar%20issues&type=Issues). 8 | * Ensure your new issue conforms to the [Contributing 9 | Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines). 10 | 11 | Participation in this open source project is subject to the [npm Code 12 | of Conduct](http://www.npmjs.com/policies/conduct). 13 | -------------------------------------------------------------------------------- /lib/npm3/bin/node-gyp-bin/node-gyp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | if [ "x$npm_config_node_gyp" = "x" ]; then 3 | node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@" 4 | else 5 | "$npm_config_node_gyp" "$@" 6 | fi 7 | -------------------------------------------------------------------------------- /lib/npm3/bin/node-gyp-bin/node-gyp.cmd: -------------------------------------------------------------------------------- 1 | if not defined npm_config_node_gyp ( 2 | node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* 3 | ) else ( 4 | node %npm_config_node_gyp% %* 5 | ) 6 | -------------------------------------------------------------------------------- /lib/npm3/bin/npm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | (set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix 3 | 4 | basedir=`dirname "$0"` 5 | 6 | case `uname` in 7 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 8 | esac 9 | 10 | NODE_EXE="$basedir/node.exe" 11 | if ! [ -x "$NODE_EXE" ]; then 12 | NODE_EXE=node 13 | fi 14 | 15 | NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" 16 | 17 | case `uname` in 18 | *CYGWIN*) 19 | NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` 20 | NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" 21 | if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then 22 | NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" 23 | fi 24 | ;; 25 | esac 26 | 27 | "$NODE_EXE" "$NPM_CLI_JS" "$@" 28 | -------------------------------------------------------------------------------- /lib/npm3/bin/npm.cmd: -------------------------------------------------------------------------------- 1 | :: Created by npm, please don't edit manually. 2 | @ECHO OFF 3 | 4 | SETLOCAL 5 | 6 | SET "NODE_EXE=%~dp0\node.exe" 7 | IF NOT EXIST "%NODE_EXE%" ( 8 | SET "NODE_EXE=node" 9 | ) 10 | 11 | SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" 12 | FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( 13 | SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" 14 | ) 15 | IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( 16 | SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" 17 | ) 18 | 19 | "%NODE_EXE%" "%NPM_CLI_JS%" %* 20 | -------------------------------------------------------------------------------- /lib/npm3/bin/read-package-json.js: -------------------------------------------------------------------------------- 1 | var argv = process.argv 2 | if (argv.length < 3) { 3 | console.error('Usage: read-package.json [ ...]') 4 | process.exit(1) 5 | } 6 | 7 | var file = argv[2] 8 | var readJson = require('read-package-json') 9 | 10 | readJson(file, function (er, data) { 11 | if (er) throw er 12 | if (argv.length === 3) { 13 | console.log(data) 14 | } else { 15 | argv.slice(3).forEach(function (field) { 16 | field = field.split('.') 17 | var val = data 18 | field.forEach(function (f) { 19 | val = val[f] 20 | }) 21 | console.log(val) 22 | }) 23 | } 24 | }) 25 | -------------------------------------------------------------------------------- /lib/npm3/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('./bin/npm-cli.js') 3 | -------------------------------------------------------------------------------- /lib/npm3/configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # set configurations that will be "sticky" on this system, 4 | # surviving npm self-updates. 5 | 6 | CONFIGS=() 7 | i=0 8 | 9 | # get the location of this file. 10 | unset CDPATH 11 | CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc 12 | 13 | while [ $# -gt 0 ]; do 14 | conf="$1" 15 | case $conf in 16 | --help) 17 | echo "./configure --param=value ..." 18 | exit 0 19 | ;; 20 | --*) 21 | CONFIGS[$i]="${conf:2}" 22 | ;; 23 | *) 24 | CONFIGS[$i]="$conf" 25 | ;; 26 | esac 27 | let i++ 28 | shift 29 | done 30 | 31 | for c in "${CONFIGS[@]}"; do 32 | echo "$c" >> "$CONFFILE" 33 | done 34 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-bin.md: -------------------------------------------------------------------------------- 1 | npm-bin(1) -- Display npm bin folder 2 | ==================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm bin [--global] 7 | 8 | ## DESCRIPTION 9 | 10 | Print the folder where npm will install executables. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-prefix(1) 15 | * npm-root(1) 16 | * npm-folders(5) 17 | * npm-config(1) 18 | * npm-config(7) 19 | * npmrc(5) 20 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-build.md: -------------------------------------------------------------------------------- 1 | npm-build(1) -- Build a package 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm build [] 7 | 8 | * ``: 9 | A folder containing a `package.json` file in its root. 10 | 11 | ## DESCRIPTION 12 | 13 | This is the plumbing command called by `npm link` and `npm install`. 14 | 15 | It should generally be called during installation, but if you need to run it 16 | directly, run: 17 | 18 | npm run-script build 19 | 20 | ## SEE ALSO 21 | 22 | * npm-install(1) 23 | * npm-link(1) 24 | * npm-scripts(7) 25 | * package.json(5) 26 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-bundle.md: -------------------------------------------------------------------------------- 1 | npm-bundle(1) -- REMOVED 2 | ======================== 3 | 4 | ## DESCRIPTION 5 | 6 | The `npm bundle` command has been removed in 1.0, for the simple reason 7 | that it is no longer necessary, as the default behavior is now to 8 | install packages into the local space. 9 | 10 | Just use `npm install` now to do what `npm bundle` used to do. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-install(1) 15 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-ping.md: -------------------------------------------------------------------------------- 1 | npm-ping(1) -- Ping npm registry 2 | ================================ 3 | 4 | ## SYNOPSIS 5 | 6 | npm ping [--registry ] 7 | 8 | ## DESCRIPTION 9 | 10 | Ping the configured or given npm registry and verify authentication. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-config(1) 15 | * npm-config(7) 16 | * npmrc(5) 17 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-prefix.md: -------------------------------------------------------------------------------- 1 | npm-prefix(1) -- Display prefix 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm prefix [-g] 7 | 8 | ## DESCRIPTION 9 | 10 | Print the local prefix to standard out. This is the closest parent directory 11 | to contain a package.json file unless `-g` is also specified. 12 | 13 | If `-g` is specified, this will be the value of the global prefix. See 14 | `npm-config(7)` for more detail. 15 | 16 | ## SEE ALSO 17 | 18 | * npm-root(1) 19 | * npm-bin(1) 20 | * npm-folders(5) 21 | * npm-config(1) 22 | * npm-config(7) 23 | * npmrc(5) 24 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-rebuild.md: -------------------------------------------------------------------------------- 1 | npm-rebuild(1) -- Rebuild a package 2 | =================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm rebuild [[<@scope>/]...] 7 | 8 | alias: npm rb 9 | 10 | ## DESCRIPTION 11 | 12 | This command runs the `npm build` command on the matched folders. This is useful 13 | when you install a new version of node, and must recompile all your C++ addons with 14 | the new binary. 15 | 16 | ## SEE ALSO 17 | 18 | * npm-build(1) 19 | * npm-install(1) 20 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-repo.md: -------------------------------------------------------------------------------- 1 | npm-repo(1) -- Open package repository page in the browser 2 | ======================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm repo [] 7 | 8 | ## DESCRIPTION 9 | 10 | This command tries to guess at the likely location of a package's 11 | repository URL, and then tries to open it using the `--browser` 12 | config param. If no package name is provided, it will search for 13 | a `package.json` in the current folder and use the `name` property. 14 | 15 | ## CONFIGURATION 16 | 17 | ### browser 18 | 19 | * Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` 20 | * Type: String 21 | 22 | The browser that is called by the `npm repo` command to open websites. 23 | 24 | ## SEE ALSO 25 | 26 | * npm-docs(1) 27 | * npm-config(1) 28 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-root.md: -------------------------------------------------------------------------------- 1 | npm-root(1) -- Display npm root 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm root [-g] 7 | 8 | ## DESCRIPTION 9 | 10 | Print the effective `node_modules` folder to standard out. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-prefix(1) 15 | * npm-bin(1) 16 | * npm-folders(5) 17 | * npm-config(1) 18 | * npm-config(7) 19 | * npmrc(5) 20 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-star.md: -------------------------------------------------------------------------------- 1 | npm-star(1) -- Mark your favorite packages 2 | ========================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm star [...] 7 | npm unstar [...] 8 | 9 | ## DESCRIPTION 10 | 11 | "Starring" a package means that you have some interest in it. It's 12 | a vaguely positive way to show that you care. 13 | 14 | "Unstarring" is the same thing, but in reverse. 15 | 16 | It's a boolean thing. Starring repeatedly has no additional effect. 17 | 18 | ## SEE ALSO 19 | 20 | * npm-view(1) 21 | * npm-whoami(1) 22 | * npm-adduser(1) 23 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-stars.md: -------------------------------------------------------------------------------- 1 | npm-stars(1) -- View packages marked as favorites 2 | ================================================= 3 | 4 | ## SYNOPSIS 5 | 6 | npm stars [] 7 | 8 | ## DESCRIPTION 9 | 10 | If you have starred a lot of neat things and want to find them again 11 | quickly this command lets you do just that. 12 | 13 | You may also want to see your friend's favorite packages, in this case 14 | you will most certainly enjoy this command. 15 | 16 | ## SEE ALSO 17 | 18 | * npm-star(1) 19 | * npm-view(1) 20 | * npm-whoami(1) 21 | * npm-adduser(1) 22 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-start.md: -------------------------------------------------------------------------------- 1 | npm-start(1) -- Start a package 2 | =============================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm start [-- ] 7 | 8 | ## DESCRIPTION 9 | 10 | This runs a package's "start" script, if one was provided. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-run-script(1) 15 | * npm-scripts(7) 16 | * npm-test(1) 17 | * npm-restart(1) 18 | * npm-stop(1) 19 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-stop.md: -------------------------------------------------------------------------------- 1 | npm-stop(1) -- Stop a package 2 | ============================= 3 | 4 | ## SYNOPSIS 5 | 6 | npm stop [-- ] 7 | 8 | ## DESCRIPTION 9 | 10 | This runs a package's "stop" script, if one was provided. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-run-script(1) 15 | * npm-scripts(7) 16 | * npm-test(1) 17 | * npm-start(1) 18 | * npm-restart(1) 19 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-test.md: -------------------------------------------------------------------------------- 1 | npm-test(1) -- Test a package 2 | ============================= 3 | 4 | ## SYNOPSIS 5 | 6 | npm test [-- ] 7 | npm tst [-- ] 8 | 9 | ## DESCRIPTION 10 | 11 | This runs a package's "test" script, if one was provided. 12 | 13 | To run tests as a condition of installation, set the `npat` config to 14 | true. 15 | 16 | ## SEE ALSO 17 | 18 | * npm-run-script(1) 19 | * npm-scripts(7) 20 | * npm-start(1) 21 | * npm-restart(1) 22 | * npm-stop(1) 23 | -------------------------------------------------------------------------------- /lib/npm3/doc/cli/npm-whoami.md: -------------------------------------------------------------------------------- 1 | npm-whoami(1) -- Display npm username 2 | ===================================== 3 | 4 | ## SYNOPSIS 5 | 6 | npm whoami [--registry ] 7 | 8 | ## DESCRIPTION 9 | 10 | Print the `username` config to standard output. 11 | 12 | ## SEE ALSO 13 | 14 | * npm-config(1) 15 | * npm-config(7) 16 | * npmrc(5) 17 | * npm-adduser(1) 18 | -------------------------------------------------------------------------------- /lib/npm3/html/dochead.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | @NAME@ 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 | 12 | -------------------------------------------------------------------------------- /lib/npm3/html/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/html/favicon.ico -------------------------------------------------------------------------------- /lib/npm3/lib/bin.js: -------------------------------------------------------------------------------- 1 | module.exports = bin 2 | 3 | var npm = require('./npm.js') 4 | var osenv = require('osenv') 5 | 6 | bin.usage = 'npm bin [--global]' 7 | 8 | function bin (args, silent, cb) { 9 | if (typeof cb !== 'function') { 10 | cb = silent 11 | silent = false 12 | } 13 | var b = npm.bin 14 | var PATH = osenv.path() 15 | 16 | if (!silent) console.log(b) 17 | process.nextTick(cb.bind(this, null, b)) 18 | 19 | if (npm.config.get('global') && PATH.indexOf(b) === -1) { 20 | npm.config.get('logstream').write('(not in PATH env variable)\n') 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/npm3/lib/cache/cached-package-root.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert') 2 | var resolve = require('path').resolve 3 | 4 | var npm = require('../npm.js') 5 | 6 | module.exports = getCacheRoot 7 | 8 | function getCacheRoot (data) { 9 | assert(data, 'must pass package metadata') 10 | assert(data.name, 'package metadata must include name') 11 | assert(data.version, 'package metadata must include version') 12 | 13 | return resolve(npm.cache, data.name, data.version) 14 | } 15 | -------------------------------------------------------------------------------- /lib/npm3/lib/cache/get-stat.js: -------------------------------------------------------------------------------- 1 | var npm = require('../npm.js') 2 | var correctMkdir = require('../utils/correct-mkdir.js') 3 | 4 | module.exports = function getCacheStat (cb) { 5 | correctMkdir(npm.cache, cb) 6 | } 7 | -------------------------------------------------------------------------------- /lib/npm3/lib/config/clear-credentials-by-uri.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert') 2 | 3 | var toNerfDart = require('./nerf-dart.js') 4 | 5 | module.exports = clearCredentialsByURI 6 | 7 | function clearCredentialsByURI (uri) { 8 | assert(uri && typeof uri === 'string', 'registry URL is required') 9 | 10 | var nerfed = toNerfDart(uri) 11 | 12 | this.del(nerfed + ':_authToken', 'user') 13 | this.del(nerfed + ':_password', 'user') 14 | this.del(nerfed + ':username', 'user') 15 | this.del(nerfed + ':email', 'user') 16 | } 17 | -------------------------------------------------------------------------------- /lib/npm3/lib/config/load-uid.js: -------------------------------------------------------------------------------- 1 | module.exports = loadUid 2 | 3 | var getUid = require('uid-number') 4 | 5 | // Call in the context of a npmconf object 6 | 7 | function loadUid (cb) { 8 | // if we're not in unsafe-perm mode, then figure out who 9 | // to run stuff as. Do this first, to support `npm update npm -g` 10 | if (!this.get('unsafe-perm')) { 11 | getUid(this.get('user'), this.get('group'), cb) 12 | } else { 13 | process.nextTick(cb) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/npm3/lib/config/nerf-dart.js: -------------------------------------------------------------------------------- 1 | var url = require('url') 2 | 3 | module.exports = toNerfDart 4 | 5 | /** 6 | * Maps a URL to an identifier. 7 | * 8 | * Name courtesy schiffertronix media LLC, a New Jersey corporation 9 | * 10 | * @param {String} uri The URL to be nerfed. 11 | * 12 | * @returns {String} A nerfed URL. 13 | */ 14 | function toNerfDart (uri) { 15 | var parsed = url.parse(uri) 16 | delete parsed.protocol 17 | delete parsed.auth 18 | delete parsed.query 19 | delete parsed.search 20 | delete parsed.hash 21 | 22 | return url.resolve(url.format(parsed), '.') 23 | } 24 | -------------------------------------------------------------------------------- /lib/npm3/lib/faq.js: -------------------------------------------------------------------------------- 1 | module.exports = faq 2 | 3 | faq.usage = 'npm faq' 4 | 5 | var npm = require('./npm.js') 6 | 7 | function faq (args, cb) { npm.commands.help(['faq'], cb) } 8 | -------------------------------------------------------------------------------- /lib/npm3/lib/get.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = get 3 | 4 | get.usage = 'npm get (See `npm config`)' 5 | 6 | var npm = require('./npm.js') 7 | 8 | get.completion = npm.commands.config.completion 9 | 10 | function get (args, cb) { 11 | npm.commands.config(['get'].concat(args), cb) 12 | } 13 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/access-error.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = function (dir, er) { 3 | if (!er) return 4 | var accessEr = new Error("EACCES, access '" + dir + "'", -13) 5 | accessEr.code = 'EACCES' 6 | accessEr.path = dir 7 | return accessEr 8 | } 9 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/action/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var chain = require('slide').chain 3 | var build = require('../../build.js') 4 | var npm = require('../../npm.js') 5 | 6 | module.exports = function (top, buildpath, pkg, log, next) { 7 | log.silly('build', pkg.package.name) 8 | chain([ 9 | [build.linkStuff, pkg.package, pkg.path, npm.config.get('global'), false], 10 | [build.writeBuiltinConf, pkg.package, pkg.path] 11 | ], next) 12 | } 13 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/action/extract.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var updatePackageJson = require('../update-package-json') 3 | var npm = require('../../npm.js') 4 | var cache = require('../../cache.js') 5 | 6 | module.exports = function (top, buildpath, pkg, log, next) { 7 | log.silly('extract', pkg.package.name) 8 | var up = npm.config.get('unsafe-perm') 9 | var user = up ? null : npm.config.get('user') 10 | var group = up ? null : npm.config.get('group') 11 | cache.unpack(pkg.package.name, pkg.package.version 12 | , buildpath 13 | , null, null, user, group, function (er) { 14 | if (er) return next(er) 15 | updatePackageJson(pkg, buildpath, next) 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/action/global-install.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var path = require('path') 3 | var npm = require('../../npm.js') 4 | var Installer = require('../../install.js').Installer 5 | 6 | module.exports = function (top, buildpath, pkg, log, next) { 7 | log.silly('global-install', pkg.package.name) 8 | var globalRoot = path.resolve(npm.globalDir, '..') 9 | npm.config.set('global', true) 10 | var install = new Installer(globalRoot, false, [pkg.package.name + '@' + pkg.package._requested.spec]) 11 | install.link = false 12 | install.run(function () { 13 | npm.config.set('global', false) 14 | next.apply(null, arguments) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/action/global-link.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var npm = require('../../npm.js') 3 | 4 | module.exports = function (top, buildpath, pkg, log, next) { 5 | log.silly('global-link', pkg.package.name) 6 | npm.link(pkg.package.name, next) 7 | } 8 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/action/install.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var lifecycle = require('../../utils/lifecycle.js') 3 | 4 | module.exports = function (top, buildpath, pkg, log, next) { 5 | log.silly('install', pkg.package.name, buildpath) 6 | lifecycle(pkg.package, 'install', pkg.path, false, false, next) 7 | } 8 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/action/postinstall.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var lifecycle = require('../../utils/lifecycle.js') 3 | 4 | module.exports = function (top, buildpath, pkg, log, next) { 5 | log.silly('postinstall', pkg.package.name, buildpath) 6 | lifecycle(pkg.package, 'postinstall', pkg.path, false, false, next) 7 | } 8 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/action/preinstall.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var lifecycle = require('../../utils/lifecycle.js') 3 | 4 | module.exports = function (top, buildpath, pkg, log, next) { 5 | log.silly('preinstall', pkg.package.name, buildpath) 6 | lifecycle(pkg.package, 'preinstall', buildpath, false, false, next) 7 | } 8 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/action/prepublish.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var lifecycle = require('../../utils/lifecycle.js') 3 | 4 | module.exports = function (top, buildpath, pkg, log, next) { 5 | log.silly('prepublish', pkg.package.name, buildpath) 6 | lifecycle(pkg.package, 'prepublish', buildpath, false, false, next) 7 | } 8 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/action/test.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var lifecycle = require('../../utils/lifecycle.js') 3 | 4 | module.exports = function (top, buildpath, pkg, log, next) { 5 | log.silly('test', pkg.package.name, buildpath) 6 | lifecycle(pkg.package, 'test', buildpath, false, false, next) 7 | } 8 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/action/update-linked.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var path = require('path') 3 | 4 | module.exports = function (top, buildpath, pkg, log, next) { 5 | log.warn('update-linked', path.relative(top, pkg.path), 'needs updating to', pkg.package.version, 6 | 'from', pkg.oldPkg.package.version, "but we can't, as it's a symlink") 7 | next() 8 | } 9 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/and-add-parent-to-errors.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var validate = require('aproba') 3 | 4 | module.exports = function (parent, cb) { 5 | validate('F', [cb]) 6 | return function (er) { 7 | if (!er) return cb.apply(null, arguments) 8 | if (er instanceof Error && parent && parent.package && parent.package.name) { 9 | er.parent = parent.package.name 10 | } 11 | cb(er) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/and-finish-tracker.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var validate = require('aproba') 3 | 4 | module.exports = function (tracker, cb) { 5 | validate('OF', [tracker, cb]) 6 | return function () { 7 | tracker.finish() 8 | cb.apply(null, arguments) 9 | } 10 | } 11 | 12 | module.exports.now = function (tracker, cb) { 13 | validate('OF', [tracker, cb]) 14 | tracker.finish() 15 | cb.apply(null, Array.prototype.slice.call(arguments, 2)) 16 | } 17 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/and-ignore-errors.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = function (cb) { 4 | return function () { 5 | var args = Array.prototype.slice.call(arguments, 1) 6 | if (args.length) args.unshift(null) 7 | return cb.apply(null, args) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/get-package-id.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = function (tree) { 3 | var pkg = tree.package || tree 4 | // FIXME: Excluding the '@' here is cleaning up after the mess that 5 | // read-package-json makes. =( 6 | if (pkg._id && pkg._id !== '@') return pkg._id 7 | if (pkg.name && pkg.version) { 8 | return pkg.name + '@' + pkg.version 9 | } else if (tree) { 10 | return tree.path 11 | } else if (pkg.name) { 12 | return pkg.name 13 | } else { 14 | return '' 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/inflate-bundled.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var path = require('path') 3 | var validate = require('aproba') 4 | 5 | module.exports = function inflateBundled (parent, children) { 6 | validate('OA', arguments) 7 | children.forEach(function (child) { 8 | child.fromBundle = true 9 | child.parent = parent 10 | child.path = path.join(parent.path, child.package.name) 11 | child.realpath = path.resolve(parent.realpath, child.package.name) 12 | child.isLink = child.isLink || parent.isLink || parent.target 13 | inflateBundled(child, child.children) 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/is-dev.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var isDev = exports.isDev = function (node) { 3 | return node.package._requiredBy.some(function (req) { return req === '#DEV:/' }) 4 | } 5 | exports.isOnlyDev = function (node) { 6 | return node.package._requiredBy.length === 1 && isDev(node) 7 | } 8 | -------------------------------------------------------------------------------- /lib/npm3/lib/install/is-extraneous.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var path = require('path') 3 | var isDev = require('./is-dev.js').isDev 4 | var npm = require('../npm.js') 5 | 6 | module.exports = function (tree) { 7 | var pkg = tree.package 8 | var requiredBy = pkg._requiredBy.filter(function (req) { return req[0] !== '#' }) 9 | var isTopLevel = tree.parent == null 10 | var isChildOfTop = !isTopLevel && tree.parent.parent == null 11 | var isTopGlobal = isChildOfTop && tree.parent.path === path.resolve(npm.globalDir, '..') 12 | var topHasNoPackageJson = isChildOfTop && tree.parent.error 13 | return !isTopLevel && (!isChildOfTop || !topHasNoPackageJson) && !isTopGlobal && requiredBy.length === 0 && !isDev(tree) 14 | } 15 | -------------------------------------------------------------------------------- /lib/npm3/lib/ping.js: -------------------------------------------------------------------------------- 1 | var npm = require('./npm.js') 2 | 3 | module.exports = ping 4 | 5 | ping.usage = 'npm ping\nping registry' 6 | 7 | function ping (args, silent, cb) { 8 | if (typeof cb !== 'function') { 9 | cb = silent 10 | silent = false 11 | } 12 | var registry = npm.config.get('registry') 13 | if (!registry) return cb(new Error('no default registry set')) 14 | var auth = npm.config.getCredentialsByURI(registry) 15 | 16 | npm.registry.ping(registry, {auth: auth}, function (er, pong) { 17 | if (!silent) console.log(JSON.stringify(pong)) 18 | cb(er, er ? null : pong) 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /lib/npm3/lib/prefix.js: -------------------------------------------------------------------------------- 1 | module.exports = prefix 2 | 3 | var npm = require('./npm.js') 4 | 5 | prefix.usage = 'npm prefix [-g]' 6 | 7 | function prefix (args, silent, cb) { 8 | if (typeof cb !== 'function') { 9 | cb = silent 10 | silent = false 11 | } 12 | if (!silent) console.log(npm.prefix) 13 | process.nextTick(cb.bind(this, null, npm.prefix)) 14 | } 15 | -------------------------------------------------------------------------------- /lib/npm3/lib/restart.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./utils/lifecycle.js').cmd('restart') 2 | -------------------------------------------------------------------------------- /lib/npm3/lib/root.js: -------------------------------------------------------------------------------- 1 | module.exports = root 2 | 3 | var npm = require('./npm.js') 4 | 5 | root.usage = 'npm root [-g]' 6 | 7 | function root (args, silent, cb) { 8 | if (typeof cb !== 'function') { 9 | cb = silent 10 | silent = false 11 | } 12 | if (!silent) console.log(npm.dir) 13 | process.nextTick(cb.bind(this, null, npm.dir)) 14 | } 15 | -------------------------------------------------------------------------------- /lib/npm3/lib/set.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = set 3 | 4 | set.usage = 'npm set (See `npm config`)' 5 | 6 | var npm = require('./npm.js') 7 | 8 | set.completion = npm.commands.config.completion 9 | 10 | function set (args, cb) { 11 | if (!args.length) return cb(set.usage) 12 | npm.commands.config(['set'].concat(args), cb) 13 | } 14 | -------------------------------------------------------------------------------- /lib/npm3/lib/start.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./utils/lifecycle.js').cmd('start') 2 | -------------------------------------------------------------------------------- /lib/npm3/lib/stop.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./utils/lifecycle.js').cmd('stop') 2 | -------------------------------------------------------------------------------- /lib/npm3/lib/substack.js: -------------------------------------------------------------------------------- 1 | module.exports = substack 2 | var npm = require('./npm.js') 3 | 4 | var isms = [ 5 | '\u001b[32mbeep \u001b[35mboop\u001b[m', 6 | 'Replace your configs with services', 7 | 'SEPARATE ALL THE CONCERNS!', 8 | 'MODULE ALL THE THINGS!', 9 | '\\o/', 10 | 'but first, burritos', 11 | 'full time mad scientist here', 12 | 'c/,,\\' 13 | ] 14 | 15 | function substack (args, cb) { 16 | var i = Math.floor(Math.random() * isms.length) 17 | console.log(isms[i]) 18 | var c = args.shift() 19 | if (c) npm.commands[c](args, cb) 20 | else cb() 21 | } 22 | -------------------------------------------------------------------------------- /lib/npm3/lib/test.js: -------------------------------------------------------------------------------- 1 | module.exports = test 2 | 3 | var testCmd = require('./utils/lifecycle.js').cmd('test') 4 | 5 | function test (args, cb) { 6 | testCmd(args, function (er) { 7 | if (!er) return cb() 8 | if (er.code === 'ELIFECYCLE') { 9 | return cb('Test failed. See above for more details.') 10 | } 11 | return cb(er) 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /lib/npm3/lib/utils/deep-sort-object.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var sortedObject = require('sorted-object') 3 | 4 | module.exports = function deepSortObject (obj, sortBy) { 5 | if (obj == null || typeof obj !== 'object') return obj 6 | if (obj instanceof Array) return obj.sort(sortBy) 7 | obj = sortedObject(obj) 8 | Object.keys(obj).forEach(function (key) { 9 | obj[key] = deepSortObject(obj[key], sortBy) 10 | }) 11 | return obj 12 | } 13 | 14 | -------------------------------------------------------------------------------- /lib/npm3/lib/utils/depr-check.js: -------------------------------------------------------------------------------- 1 | var log = require('npmlog') 2 | 3 | var deprecated = {} 4 | var deprWarned = {} 5 | module.exports = function deprCheck (data) { 6 | if (deprecated[data._id]) data.deprecated = deprecated[data._id] 7 | if (data.deprecated) deprecated[data._id] = data.deprecated 8 | else return 9 | if (!deprWarned[data._id]) { 10 | deprWarned[data._id] = true 11 | log.warn('deprecated', '%s: %s', data._id, data.deprecated) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/npm3/lib/utils/parse-json.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var parseJSON = module.exports = function (content) { 3 | return JSON.parse(stripBOM(content)) 4 | } 5 | 6 | parseJSON.noExceptions = function (content) { 7 | try { 8 | return parseJSON(content) 9 | } catch (ex) { 10 | return 11 | } 12 | } 13 | 14 | // from read-package-json 15 | function stripBOM (content) { 16 | content = content.toString() 17 | // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) 18 | // because the buffer-to-string conversion in `fs.readFileSync()` 19 | // translates it to FEFF, the UTF-16 BOM. 20 | if (content.charCodeAt(0) === 0xFEFF) { 21 | content = content.slice(1) 22 | } 23 | return content 24 | } 25 | -------------------------------------------------------------------------------- /lib/npm3/lib/utils/pulse-till-done.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var validate = require('aproba') 3 | var log = require('npmlog') 4 | 5 | var pulsers = 0 6 | var pulse 7 | 8 | module.exports = function (prefix, cb) { 9 | validate('SF', [prefix, cb]) 10 | if (!pulsers++) { 11 | pulse = setInterval(function () { 12 | log.gauge.pulse('network') 13 | }, 250) 14 | } 15 | return function () { 16 | if (!--pulsers) { 17 | clearInterval(pulse) 18 | } 19 | cb.apply(null, arguments) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/npm3/lib/utils/read-local-package.js: -------------------------------------------------------------------------------- 1 | exports = module.exports = readLocalPkg 2 | 3 | var npm = require('../npm.js') 4 | var readJson = require('read-package-json') 5 | 6 | function readLocalPkg (cb) { 7 | if (npm.config.get('global')) return cb() 8 | var path = require('path') 9 | readJson(path.resolve(npm.prefix, 'package.json'), function (er, d) { 10 | return cb(er, d && d.name) 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /lib/npm3/lib/utils/temp-filename.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var uniqueFilename = require('unique-filename') 3 | var npm = require('../npm.js') 4 | 5 | module.exports = function (prefix) { 6 | return uniqueFilename(npm.tmp, prefix) 7 | } 8 | -------------------------------------------------------------------------------- /lib/npm3/lib/utils/umask.js: -------------------------------------------------------------------------------- 1 | var umask = require('umask') 2 | var npmlog = require('npmlog') 3 | var _fromString = umask.fromString 4 | 5 | module.exports = umask 6 | 7 | // fromString with logging callback 8 | umask.fromString = function (val) { 9 | _fromString(val, function (err, result) { 10 | if (err) { 11 | npmlog.warn('invalid umask', err.message) 12 | } 13 | val = result 14 | }) 15 | 16 | return val 17 | } 18 | -------------------------------------------------------------------------------- /lib/npm3/lib/utils/warn-deprecated.js: -------------------------------------------------------------------------------- 1 | module.exports = warnDeprecated 2 | 3 | var log = require('npmlog') 4 | 5 | var deprecations = {} 6 | 7 | function warnDeprecated (type) { 8 | return function warn (messages, instance) { 9 | if (!instance) { 10 | if (!deprecations[type]) { 11 | deprecations[type] = {} 12 | messages.forEach(function (m) { log.warn(type, m) }) 13 | } 14 | } else { 15 | if (!deprecations[type]) deprecations[type] = {} 16 | 17 | if (!deprecations[type][instance]) { 18 | deprecations[type][instance] = true 19 | messages.forEach(function (m) { log.warn(type, m) }) 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/npm3/make.bat: -------------------------------------------------------------------------------- 1 | :: The tests run "make doc" in the prepublish script, 2 | :: so this file gives windows something that'll exit 3 | :: successfully, without having to install make. 4 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-bin.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-BIN" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-bin\fR \- Display npm bin folder 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm bin [\-\-global] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the folder where npm will install executables\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help prefix 18 | .IP \(bu 2 19 | npm help root 20 | .IP \(bu 2 21 | npm help 5 folders 22 | .IP \(bu 2 23 | npm help config 24 | .IP \(bu 2 25 | npm help 7 config 26 | .IP \(bu 2 27 | npm help 5 npmrc 28 | 29 | .RE 30 | 31 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-bundle.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-BUNDLE" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-bundle\fR \- REMOVED 4 | .SH DESCRIPTION 5 | .P 6 | The \fBnpm bundle\fP command has been removed in 1\.0, for the simple reason 7 | that it is no longer necessary, as the default behavior is now to 8 | install packages into the local space\. 9 | .P 10 | Just use \fBnpm install\fP now to do what \fBnpm bundle\fP used to do\. 11 | .SH SEE ALSO 12 | .RS 0 13 | .IP \(bu 2 14 | npm help install 15 | 16 | .RE 17 | 18 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-ping.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PING" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-ping\fR \- Ping npm registry 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm ping [\-\-registry ] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Ping the configured or given npm registry and verify authentication\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help config 18 | .IP \(bu 2 19 | npm help 7 config 20 | .IP \(bu 2 21 | npm help 5 npmrc 22 | 23 | .RE 24 | 25 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-prefix.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PREFIX" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-prefix\fR \- Display prefix 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm prefix [\-g] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the local prefix to standard out\. This is the closest parent directory 14 | to contain a package\.json file unless \fB\-g\fP is also specified\. 15 | .P 16 | If \fB\-g\fP is specified, this will be the value of the global prefix\. See 17 | npm help 7 \fBnpm\-config\fP for more detail\. 18 | .SH SEE ALSO 19 | .RS 0 20 | .IP \(bu 2 21 | npm help root 22 | .IP \(bu 2 23 | npm help bin 24 | .IP \(bu 2 25 | npm help 5 folders 26 | .IP \(bu 2 27 | npm help config 28 | .IP \(bu 2 29 | npm help 7 config 30 | .IP \(bu 2 31 | npm help 5 npmrc 32 | 33 | .RE 34 | 35 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-rebuild.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-REBUILD" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-rebuild\fR \- Rebuild a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm rebuild [[<@scope>/]\.\.\.] 9 | 10 | alias: npm rb 11 | .fi 12 | .RE 13 | .SH DESCRIPTION 14 | .P 15 | This command runs the \fBnpm build\fP command on the matched folders\. This is useful 16 | when you install a new version of node, and must recompile all your C++ addons with 17 | the new binary\. 18 | .SH SEE ALSO 19 | .RS 0 20 | .IP \(bu 2 21 | npm help build 22 | .IP \(bu 2 23 | npm help install 24 | 25 | .RE 26 | 27 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-root.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-ROOT" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-root\fR \- Display npm root 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm root [\-g] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the effective \fBnode_modules\fP folder to standard out\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help prefix 18 | .IP \(bu 2 19 | npm help bin 20 | .IP \(bu 2 21 | npm help 5 folders 22 | .IP \(bu 2 23 | npm help config 24 | .IP \(bu 2 25 | npm help 7 config 26 | .IP \(bu 2 27 | npm help 5 npmrc 28 | 29 | .RE 30 | 31 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-star.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-STAR" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-star\fR \- Mark your favorite packages 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm star [\.\.\.] 9 | npm unstar [\.\.\.] 10 | .fi 11 | .RE 12 | .SH DESCRIPTION 13 | .P 14 | "Starring" a package means that you have some interest in it\. It's 15 | a vaguely positive way to show that you care\. 16 | .P 17 | "Unstarring" is the same thing, but in reverse\. 18 | .P 19 | It's a boolean thing\. Starring repeatedly has no additional effect\. 20 | .SH SEE ALSO 21 | .RS 0 22 | .IP \(bu 2 23 | npm help view 24 | .IP \(bu 2 25 | npm help whoami 26 | .IP \(bu 2 27 | npm help adduser 28 | 29 | .RE 30 | 31 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-stars.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-STARS" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-stars\fR \- View packages marked as favorites 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm stars [] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | If you have starred a lot of neat things and want to find them again 14 | quickly this command lets you do just that\. 15 | .P 16 | You may also want to see your friend's favorite packages, in this case 17 | you will most certainly enjoy this command\. 18 | .SH SEE ALSO 19 | .RS 0 20 | .IP \(bu 2 21 | npm help star 22 | .IP \(bu 2 23 | npm help view 24 | .IP \(bu 2 25 | npm help whoami 26 | .IP \(bu 2 27 | npm help adduser 28 | 29 | .RE 30 | 31 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-start.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-START" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-start\fR \- Start a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm start [\-\- ] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This runs a package's "start" script, if one was provided\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help run\-script 18 | .IP \(bu 2 19 | npm help 7 scripts 20 | .IP \(bu 2 21 | npm help test 22 | .IP \(bu 2 23 | npm help restart 24 | .IP \(bu 2 25 | npm help stop 26 | 27 | .RE 28 | 29 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-stop.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-STOP" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-stop\fR \- Stop a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm stop [\-\- ] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This runs a package's "stop" script, if one was provided\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help run\-script 18 | .IP \(bu 2 19 | npm help 7 scripts 20 | .IP \(bu 2 21 | npm help test 22 | .IP \(bu 2 23 | npm help start 24 | .IP \(bu 2 25 | npm help restart 26 | 27 | .RE 28 | 29 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-test.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-TEST" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-test\fR \- Test a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm test [\-\- ] 9 | npm tst [\-\- ] 10 | .fi 11 | .RE 12 | .SH DESCRIPTION 13 | .P 14 | This runs a package's "test" script, if one was provided\. 15 | .P 16 | To run tests as a condition of installation, set the \fBnpat\fP config to 17 | true\. 18 | .SH SEE ALSO 19 | .RS 0 20 | .IP \(bu 2 21 | npm help run\-script 22 | .IP \(bu 2 23 | npm help 7 scripts 24 | .IP \(bu 2 25 | npm help start 26 | .IP \(bu 2 27 | npm help restart 28 | .IP \(bu 2 29 | npm help stop 30 | 31 | .RE 32 | 33 | -------------------------------------------------------------------------------- /lib/npm3/man/man1/npm-whoami.1: -------------------------------------------------------------------------------- 1 | .TH "NPM\-WHOAMI" "1" "September 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-whoami\fR \- Display npm username 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm whoami [\-\-registry ] 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the \fBusername\fP config to standard output\. 14 | .SH SEE ALSO 15 | .RS 0 16 | .IP \(bu 2 17 | npm help config 18 | .IP \(bu 2 19 | npm help 7 config 20 | .IP \(bu 2 21 | npm help 5 npmrc 22 | .IP \(bu 2 23 | npm help adduser 24 | 25 | .RE 26 | 27 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-bin.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-BIN" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-bin\fR \- Display npm bin folder 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.bin(args, cb) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the folder where npm will install executables\. 14 | .P 15 | This function should not be used programmatically\. Instead, just refer 16 | to the \fBnpm\.bin\fP property\. 17 | 18 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-bugs.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-BUGS" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.bugs(package, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command tries to guess at the likely location of a package's 14 | bug tracker URL, and then tries to open it using the \fB\-\-browser\fP 15 | config param\. 16 | .P 17 | Like other commands, the first parameter is an array\. This command only 18 | uses the first element, which is expected to be a package name with an 19 | optional version number\. 20 | .P 21 | This command will launch a browser, so this command may not be the most 22 | friendly for programmatic use\. 23 | 24 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-docs.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-DOCS" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-docs\fR \- Docs for a package in a web browser maybe 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.docs(package, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command tries to guess at the likely location of a package's 14 | documentation URL, and then tries to open it using the \fB\-\-browser\fP 15 | config param\. 16 | .P 17 | Like other commands, the first parameter is an array\. This command only 18 | uses the first element, which is expected to be a package name with an 19 | optional version number\. 20 | .P 21 | This command will launch a browser, so this command may not be the most 22 | friendly for programmatic use\. 23 | 24 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-explore.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-EXPLORE" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-explore\fR \- Browse an installed package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.explore(args, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Spawn a subshell in the directory of the installed package specified\. 14 | .P 15 | If a command is specified, then it is run in the subshell, which then 16 | immediately terminates\. 17 | .P 18 | Note that the package is \fInot\fR automatically rebuilt afterwards, so be 19 | sure to use \fBnpm rebuild \fP if you make any changes\. 20 | .P 21 | 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\. 22 | 23 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-install.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-INSTALL" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-install\fR \- install a package programmatically 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.install([where,] packages, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This acts much the same ways as installing on the command\-line\. 14 | .P 15 | The 'where' parameter is optional and only used internally, and it specifies 16 | where the packages should be installed to\. 17 | .P 18 | The 'packages' parameter is an array of strings\. Each element in the array is 19 | the name of a package to be installed\. 20 | .P 21 | Finally, 'callback' is a function that will be called when all packages have been 22 | installed or when an error has been encountered\. 23 | 24 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-outdated.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-OUTDATED" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-outdated\fR \- Check for outdated packages 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.outdated([packages,] callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command will check the registry to see if the specified packages are 14 | currently outdated\. 15 | .P 16 | If the 'packages' parameter is left out, npm will check all packages\. 17 | 18 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-pack.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PACK" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-pack\fR \- Create a tarball from a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.pack([packages,] callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | For anything that's installable (that is, a package folder, tarball, 14 | tarball url, name@tag, name@version, or name), this command will fetch 15 | it to the cache, and then copy the tarball to the current working 16 | directory as \fB\-\.tgz\fP, and then write the filenames out to 17 | stdout\. 18 | .P 19 | If the same package is specified multiple times, then the file will be 20 | overwritten the second time\. 21 | .P 22 | If no arguments are supplied, then npm packs the current package folder\. 23 | 24 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-ping.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PING" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-ping\fR \- Ping npm registry 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.registry\.ping(registry, options, function (er, pong)) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Attempts to connect to the given registry, returning a \fBpong\fP 14 | object with various metadata if it succeeds\. 15 | .P 16 | This function is primarily useful for debugging connection issues 17 | to npm registries\. 18 | 19 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-prefix.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PREFIX" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-prefix\fR \- Display prefix 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.prefix(args, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the prefix to standard out\. 14 | .P 15 | \|'args' is never used and callback is never called with data\. 16 | \|'args' must be present or things will break\. 17 | .P 18 | This function is not useful programmatically 19 | 20 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-prune.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-PRUNE" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-prune\fR \- Remove extraneous packages 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.prune([packages,] callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command removes "extraneous" packages\. 14 | .P 15 | The first parameter is optional, and it specifies packages to be removed\. 16 | .P 17 | No packages are specified, then all packages will be checked\. 18 | .P 19 | Extraneous packages are packages that are not listed on the parent 20 | package's dependencies list\. 21 | 22 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-rebuild.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-REBUILD" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-rebuild\fR \- Rebuild a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.rebuild([packages,] callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command runs the \fBnpm build\fP command on each of the matched packages\. This is useful 14 | when you install a new version of node, and must recompile all your C++ addons with 15 | the new binary\. If no 'packages' parameter is specify, every package will be rebuilt\. 16 | .SH CONFIGURATION 17 | .P 18 | See \fBnpm help build\fP 19 | 20 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-repo.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-REPO" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-repo\fR \- Open package repository page in the browser 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.repo(package, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This command tries to guess at the likely location of a package's 14 | repository URL, and then tries to open it using the \fB\-\-browser\fP 15 | config param\. 16 | .P 17 | Like other commands, the first parameter is an array\. This command only 18 | uses the first element, which is expected to be a package name with an 19 | optional version number\. 20 | .P 21 | This command will launch a browser, so this command may not be the most 22 | friendly for programmatic use\. 23 | 24 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-root.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-ROOT" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-root\fR \- Display npm root 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.root(args, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the effective \fBnode_modules\fP folder to standard out\. 14 | .P 15 | \|'args' is never used and callback is never called with data\. 16 | \|'args' must be present or things will break\. 17 | .P 18 | This function is not useful programmatically\. 19 | 20 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-start.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-START" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-start\fR \- Start a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.start(packages, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This runs a package's "start" script, if one was provided\. 14 | .P 15 | npm can start multiple packages\. Just specify multiple packages in the 16 | \fBpackages\fP parameter\. 17 | 18 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-stop.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-STOP" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-stop\fR \- Stop a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.stop(packages, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This runs a package's "stop" script, if one was provided\. 14 | .P 15 | npm can run stop on multiple packages\. Just specify multiple packages 16 | in the \fBpackages\fP parameter\. 17 | 18 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-test.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-TEST" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-test\fR \- Test a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.test(packages, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This runs a package's "test" script, if one was provided\. 14 | .P 15 | To run tests as a condition of installation, set the \fBnpat\fP config to 16 | true\. 17 | .P 18 | npm can run tests on multiple packages\. Just specify multiple packages 19 | in the \fBpackages\fP parameter\. 20 | 21 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-uninstall.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-UNINSTALL" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-uninstall\fR \- uninstall a package programmatically 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.uninstall(packages, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This acts much the same ways as uninstalling on the command\-line\. 14 | .P 15 | The 'packages' parameter is an array of strings\. Each element in the array is 16 | the name of a package to be uninstalled\. 17 | .P 18 | Finally, 'callback' is a function that will be called when all packages have been 19 | uninstalled or when an error has been encountered\. 20 | 21 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-unpublish.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-UNPUBLISH" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-unpublish\fR \- Remove a package from the registry 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.unpublish(package, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | This removes a package version from the registry, deleting its 14 | entry and removing the tarball\. 15 | .P 16 | The package parameter must be defined\. 17 | .P 18 | Only the first element in the package parameter is used\. If there is no first 19 | element, then npm assumes that the package at the current working directory 20 | is what is meant\. 21 | .P 22 | If no version is specified, or if all versions are removed then 23 | the root package entry is removed from the registry entirely\. 24 | 25 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-update.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-UPDATE" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-update\fR \- Update a package 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.update(packages, callback) 9 | .fi 10 | .RE 11 | .TH "DESCRIPTION" "" "August 2015" "" "" 12 | .SH "NAME" 13 | \fBDESCRIPTION\fR 14 | .P 15 | Updates a package, upgrading it to the latest version\. It also installs any 16 | missing packages\. 17 | .P 18 | The \fBpackages\fP argument is an array of packages to update\. The \fBcallback\fP 19 | parameter will be called when done or when an error occurs\. 20 | .SH SEE ALSO 21 | .RS 0 22 | .IP \(bu 2 23 | npm help update 24 | 25 | .RE 26 | 27 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-version.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-VERSION" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-version\fR \- Bump a package version 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.version(newversion, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Run this in a package directory to bump the version and write the new 14 | data back to the package\.json file\. 15 | .P 16 | If run in a git repo, it will also create a version commit and tag, and 17 | fail if the repo is not clean\. 18 | .P 19 | Like all other commands, this function takes a string array as its first 20 | parameter\. The difference, however, is this function will fail if it does 21 | not have exactly one element\. The only element should be a version number\. 22 | 23 | -------------------------------------------------------------------------------- /lib/npm3/man/man3/npm-whoami.3: -------------------------------------------------------------------------------- 1 | .TH "NPM\-WHOAMI" "3" "August 2015" "" "" 2 | .SH "NAME" 3 | \fBnpm-whoami\fR \- Display npm username 4 | .SH SYNOPSIS 5 | .P 6 | .RS 2 7 | .nf 8 | npm\.commands\.whoami(args, callback) 9 | .fi 10 | .RE 11 | .SH DESCRIPTION 12 | .P 13 | Print the \fBusername\fP config to standard output\. 14 | .P 15 | \|'args' is never used and callback is never called with data\. 16 | \|'args' must be present or things will break\. 17 | .P 18 | This function is not useful programmatically 19 | 20 | -------------------------------------------------------------------------------- /lib/npm3/scripts/installable.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | npmver=$(perl -E "say q{$npm_config_user_agent} =~ m{/(\S+)}") 3 | 4 | if semver -r ^3.0.0-0 $npmver > /dev/null; then 5 | echo "Packaging with $npmver" 6 | else 7 | echo "Packaging or installing npm@$npm_package_version with npm@$npmver is impossible." 1>&2 8 | echo "Please install npm@^3.0.0-0 from the registry and use that or run your command with" 1>&2 9 | echo "this version of npm with:" 1>&2 10 | npmargs=$(node -e "a=$npm_config_argv; console.log(a.original.join(' '))") 11 | echo " $npm_node_execpath $PWD $npmargs" 1>&2 12 | exit 1 13 | fi 14 | -------------------------------------------------------------------------------- /lib/npm3/scripts/publish-tag.js: -------------------------------------------------------------------------------- 1 | var semver = require('semver') 2 | var version = semver.parse(require('../package.json').version) 3 | console.log('v%s.%s-next', version.major, version.minor) 4 | -------------------------------------------------------------------------------- /lib/npm3/scripts/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # script for creating a zip and tarball for inclusion in node 4 | 5 | unset CDPATH 6 | 7 | set -e 8 | 9 | rm -rf release *.tgz || true 10 | mkdir release 11 | node ./cli.js pack --loglevel error >/dev/null 12 | mv *.tgz release 13 | cd release 14 | tar xzf *.tgz 15 | 16 | mkdir node_modules 17 | mv package node_modules/npm 18 | 19 | # make the zip for windows users 20 | cp node_modules/npm/bin/*.cmd . 21 | zipname=npm-$(node ../cli.js -v).zip 22 | zip -q -9 -r -X "$zipname" *.cmd node_modules 23 | 24 | # make the tar for node's deps 25 | cd node_modules 26 | tarname=npm-$(node ../../cli.js -v).tgz 27 | tar czf "$tarname" npm 28 | 29 | cd .. 30 | mv "node_modules/$tarname" . 31 | 32 | rm -rf *.cmd 33 | rm -rf node_modules 34 | 35 | echo "release/$tarname" 36 | echo "release/$zipname" 37 | -------------------------------------------------------------------------------- /lib/npm3/scripts/relocate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Change the cli shebang to point at the specified node 4 | # Useful for when the program is moved around after install. 5 | # Also used by the default 'make install' in node to point 6 | # npm at the newly installed node, rather than the first one 7 | # in the PATH, which would be the default otherwise. 8 | 9 | # bash /path/to/npm/scripts/relocate.sh $nodepath 10 | # If $nodepath is blank, then it'll use /usr/bin/env 11 | 12 | dir="$(dirname "$(dirname "$0")")" 13 | cli="$dir"/bin/npm-cli.js 14 | tmp="$cli".tmp 15 | 16 | node="$1" 17 | if [ "x$node" = "x" ]; then 18 | node="/usr/bin/env node" 19 | fi 20 | node="#!$node" 21 | 22 | sed -e 1d "$cli" > "$tmp" 23 | echo "$node" > "$cli" 24 | cat "$tmp" >> "$cli" 25 | rm "$tmp" 26 | chmod ogu+x $cli 27 | -------------------------------------------------------------------------------- /lib/npm3/scripts/update-authors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | git log --reverse --format='%aN <%aE>' | perl -wnE ' 4 | BEGIN { 5 | say "# Authors sorted by whether or not they\x27re me"; 6 | } 7 | 8 | print $seen{$_} = $_ unless $seen{$_} 9 | ' > AUTHORS 10 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/bundlerecurs/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "bundletest" 2 | , "version" : "1.0.0" 3 | , "dependencies" : { "bundletest" : "*" } 4 | } 5 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/change-bin-1/bin/foo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "foo" 3 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/change-bin-1/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-change-bin" 2 | ,"version":"1.2.3" 3 | ,"directories":{"bin":"./bin"}} 4 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/change-bin-2/bin/bar: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "foo" 3 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/change-bin-2/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-change-bin" 2 | ,"version":"2.3.4" 3 | ,"directories":{"bin":"./bin"}} 4 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/failer/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "npm-test-failer" 2 | , "version" : "9999.999.99" 3 | , "dependencies" : { "base64" : "*" } 4 | , "scripts" : { "install" : "exit 1", "test": "echo 'This is where the test output would go'; echo 'more test output'; echo 'MOAR MOAR MoAR'; exit 1" } 5 | } 6 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/fast/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "fast" 2 | , "description" : "does nothing, and not very fast" 3 | , "version" : "1.2.3" 4 | , "scripts" : 5 | { "preinstall" : "sleep 1 && echo fast 1 $(date +%s) && echo fast 2" 6 | , "install" : "sleep 1 && echo fast 2 $(date +%s) && echo fast 3" 7 | , "postinstall" : "sleep 1 && echo fast 3 $(date +%s) && echo fast 4" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/package-bar/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-bar", 3 | "version": "0.5.0", 4 | "dependencies": { 5 | "package-foo": "*" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/package-config/package.json: -------------------------------------------------------------------------------- 1 | {"name":"package-config" 2 | ,"version":"1.2.3" 3 | ,"config":{"foo":"bar"} 4 | ,"scripts":{"test":"./test.js"}} 5 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/package-config/test.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var env = process.env 4 | var orig = require(process.env.npm_package_name + '/package.json').config 5 | var assert = require('assert') 6 | 7 | console.log( 8 | 'Before running this test, do:\n' + 9 | ' npm config set package-config:foo boo\n' + 10 | "or else it's about to fail." 11 | ) 12 | assert.equal(env.npm_package_config_foo, 'boo', 'foo != boo') 13 | assert.equal(orig.foo, 'bar', 'original foo != bar') 14 | assert.equal(env['npm_config_package-config:foo'], 'boo', 15 | 'package-config:foo != boo') 16 | console.log({ 17 | foo: env.npm_package_config_foo, 18 | orig_foo: orig.foo, 19 | 'package-config:foo': env['npm_config_package-config:foo'] 20 | }) 21 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/package-foo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-foo", 3 | "version": "0.5.0" 4 | } 5 | -------------------------------------------------------------------------------- /lib/npm3/test/disabled/slow/package.json: -------------------------------------------------------------------------------- 1 | { "name" : "slow" 2 | , "description" : "just like fast, but even slower" 3 | , "version" : "1.2.3" 4 | , "scripts" : 5 | { "preinstall" : "sleep 1 && echo slow 1 $(date +%s) && sleep 1 && echo slow 2 $(date +%s)" 6 | , "install" : "sleep 1 && echo slow 2 $(date +%s) && sleep 1 && echo slow 3 $(date +%s)" 7 | , "postinstall" : "sleep 1 && echo slow 3 $(date +%s) && sleep 1 && echo slow 4 $(date +%s)" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/config/builtin: -------------------------------------------------------------------------------- 1 | builtin-config = true 2 | -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/config/globalconfig: -------------------------------------------------------------------------------- 1 | package-config:foo = boo 2 | -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/config/malformed: -------------------------------------------------------------------------------- 1 | email = """ -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/config/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/fixtures/config/package.json -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/config/userconfig: -------------------------------------------------------------------------------- 1 | email = i@izs.me 2 | env-thing = ${random_env_var} 3 | init.author.name = Isaac Z. Schlueter 4 | init.author.email = i@izs.me 5 | init.author.url = http://blog.izs.me/ 6 | init.version = 1.2.3 7 | proprietary-attribs = false 8 | npm:publishtest = true 9 | _npmjs.org:couch = https://admin:password@localhost:5984/registry 10 | npm-www:nocache = 1 11 | nodedir = /Users/isaacs/dev/js/node-v0.8 12 | sign-git-tag = true 13 | message = v%s 14 | strict-ssl = false 15 | tmp = ~/.tmp 16 | _auth = dXNlcm5hbWU6cGFzc3dvcmQ= 17 | 18 | [_token] 19 | AuthSession = yabba-dabba-doodle 20 | version = 1 21 | expires = 1345001053415 22 | path = / 23 | httponly = true 24 | -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/config/userconfig-with-gc: -------------------------------------------------------------------------------- 1 | globalconfig=/Users/rebecca/code/release/npm-3/test/fixtures/config/globalconfig 2 | email=i@izs.me 3 | env-thing=asdf 4 | init.author.name=Isaac Z. Schlueter 5 | init.author.email=i@izs.me 6 | init.author.url=http://blog.izs.me/ 7 | init.version=1.2.3 8 | proprietary-attribs=false 9 | npm:publishtest=true 10 | _npmjs.org:couch=https://admin:password@localhost:5984/registry 11 | npm-www:nocache=1 12 | sign-git-tag=false 13 | message=v%s 14 | strict-ssl=false 15 | _auth="dXNlcm5hbWU6cGFzc3dvcmQ=" 16 | 17 | [_token] 18 | AuthSession=yabba-dabba-doodle 19 | version=1 20 | expires=1345001053415 21 | path=/ 22 | httponly=true 23 | -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/forked-underscore-1.5.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/fixtures/forked-underscore-1.5.1.tgz -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/github-com-BryanDonovan-dummy-npm-bar.git.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/fixtures/github-com-BryanDonovan-dummy-npm-bar.git.tar.gz -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/fixtures/github-com-BryanDonovan-dummy-npm-buzz.git.tar.gz -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/github-com-BryanDonovan-dummy-npm-foo.git.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/fixtures/github-com-BryanDonovan-dummy-npm-foo.git.tar.gz -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/github-com-BryanDonovan-npm-git-test.git.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/fixtures/github-com-BryanDonovan-npm-git-test.git.tar.gz -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/gitignore-and-npmignore.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/fixtures/gitignore-and-npmignore.tgz -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/gitignore.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/fixtures/gitignore.tgz -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/npmignore.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/fixtures/npmignore.tgz -------------------------------------------------------------------------------- /lib/npm3/test/fixtures/scoped-underscore-1.3.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/fixtures/scoped-underscore-1.3.1.tgz -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-array-bin/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-array-bin/bin/array-bin: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.log('ok') 3 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-array-bin/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-array-bin" 2 | , "version":"1.2.5" 3 | , "bin": [ "bin/array-bin" ] 4 | , "scripts": { "test": "node test.js" } } 5 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-array-bin/test.js: -------------------------------------------------------------------------------- 1 | require('child_process').exec('array-bin', { env: process.env }, 2 | function (err) { 3 | if (err && err.code) throw new Error('exited badly with code = ' + err.code) 4 | }) 5 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-blerg/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-blerg/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-blerg" 2 | , "version" : "0.0.2" 3 | , "scripts" : { "test" : "node test.js" } 4 | , "publishConfig": {"tag": "foo"} 5 | } 6 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-blerg/test.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert') 2 | assert.equal(undefined, process.env.npm_config__password, 'password exposed!') 3 | assert.equal(undefined, process.env.npm_config__auth, 'auth exposed!') 4 | assert.equal(undefined, process.env.npm_config__authCrypt, 'authCrypt exposed!') 5 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-blerg3/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-blerg3/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-blerg3" 2 | , "homepage": "https://github.com/npm/npm/issues/2658" 3 | , "version" : "0.0.0" 4 | , "scripts" : { "test" : "node test.js" } 5 | } 6 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-blerg3/test.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert') 2 | assert.equal(undefined, process.env.npm_config__password, 'password exposed!') 3 | assert.equal(undefined, process.env.npm_config__auth, 'auth exposed!') 4 | assert.equal(undefined, process.env.npm_config__authCrypt, 'authCrypt exposed!') 5 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-bundled-git/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-bundled-git/minimatch-expected.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Isaac Z. Schlueter (http://blog.izs.me)", 3 | "name": "minimatch", 4 | "description": "a glob matcher in javascript", 5 | "version": "0.2.1", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/isaacs/minimatch.git" 9 | }, 10 | "main": "minimatch.js", 11 | "scripts": { 12 | "test": "tap test" 13 | }, 14 | "engines": { 15 | "node": "*" 16 | }, 17 | "dependencies": { 18 | "lru-cache": "~1.0.5" 19 | }, 20 | "devDependencies": { 21 | "tap": "~0.1.3" 22 | }, 23 | "licenses" : [ 24 | { 25 | "type" : "MIT", 26 | "url" : "http://github.com/isaacs/minimatch/raw/master/LICENSE" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-bundled-git/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-bundled-git" 2 | ,"scripts":{"test":"node test.js"} 3 | ,"version":"1.2.5" 4 | ,"dependencies":{"glob":"git://github.com/isaacs/node-glob.git#npm-test"} 5 | ,"bundledDependencies":["glob"]} 6 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-bundled-git/test.js: -------------------------------------------------------------------------------- 1 | var a = require('./node_modules/glob/node_modules/minimatch/package.json') 2 | var e = require('./minimatch-expected.json') 3 | var assert = require('assert') 4 | assert.deepEqual(a, e, "didn't get expected minimatch/package.json") 5 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-dir-bin/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-dir-bin/bin/dir-bin: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.log('ok') 3 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-dir-bin/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-dir-bin" 2 | , "version":"1.2.5" 3 | , "directories": { "bin": "./bin" } 4 | , "scripts": { "test": "node test.js" } } 5 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-dir-bin/test.js: -------------------------------------------------------------------------------- 1 | require('child_process').exec('dir-bin', { stdio: 'pipe', 2 | env: process.env }, function (err) { 3 | if (err && err.code) throw new Error('exited badly with code = ' + err.code) 4 | }) 5 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-env-reader/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-env-reader/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-env-reader" 2 | , "version" : "1.2.3" 3 | , "scripts" : 4 | { "install" : "node test.js" 5 | , "preinstall" : "node test.js" 6 | , "preuninstall" : "node test.js" 7 | , "postuninstall" : "node test.js" 8 | , "test" : "node test.js" 9 | , "stop" : "node test.js" 10 | , "start" : "node test.js" 11 | , "restart" : "node test.js" 12 | , "foo" : "node test.js" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-env-reader/test.js: -------------------------------------------------------------------------------- 1 | var envs = [] 2 | for (var e in process.env) { 3 | if (e.match(/npm|^path$/i)) envs.push(e + '=' + process.env[e]) 4 | } 5 | envs.sort(function (a, b) { 6 | return a === b ? 0 : a > b ? -1 : 1 7 | }).forEach(function (e) { 8 | console.log(e) 9 | }) 10 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-files/.npmignore: -------------------------------------------------------------------------------- 1 | /sub/ignore1 2 | ./sub/include2 3 | ignore3 4 | ./include4 5 | ignoredir1 6 | ignoredir2/ 7 | *.tgz 8 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-files/include4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/packages/npm-test-files/include4 -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-files/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-files" 2 | , "version":"1.2.5" 3 | , "files": 4 | [ "include4" 5 | , "sub/include" 6 | , "sub/include2" 7 | , "sub/include4" 8 | , "test.sh" 9 | , ".npmignore" ] 10 | , "scripts":{"test":"bash test.sh"}} 11 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-files/sub/include: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/packages/npm-test-files/sub/include -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-files/sub/include2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/packages/npm-test-files/sub/include2 -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-files/sub/include4: -------------------------------------------------------------------------------- 1 | This file should be in the package. 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-files/test.sh: -------------------------------------------------------------------------------- 1 | x=`find . | grep ignore | grep -v npmignore` 2 | if [ "$x" != "" ]; then 3 | echo "ignored files included: $x" 4 | exit 1 5 | fi 6 | 7 | x=`find . | grep -v ignore | sort` 8 | y=". 9 | ./include4 10 | ./package.json 11 | ./sub 12 | ./sub/include 13 | ./sub/include2 14 | ./sub/include4 15 | ./test.sh" 16 | if [ "$x" != "$y" ]; then 17 | echo "missing included files" 18 | echo "got:" 19 | echo "===" 20 | echo "$x" 21 | echo "===" 22 | echo "wanted:" 23 | echo "===" 24 | echo "$y" 25 | echo "===" 26 | exit 1 27 | fi 28 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-ignore-nested-nm/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-ignore-nested-nm/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-ignore-nested-nm" 2 | ,"version":"1.2.5" 3 | ,"scripts":{"test":"node test.js"}} 4 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-ignore-nested-nm/test.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | fs.statSync(__dirname + '/lib/node_modules/foo') 3 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-ignore/.npmignore: -------------------------------------------------------------------------------- 1 | /sub/ignore1 2 | ./sub/include2 3 | ignore3 4 | ./include4 5 | ignoredir1 6 | ignoredir2/ 7 | *.tgz 8 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-ignore/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-ignore/include4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/packages/npm-test-ignore/include4 -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-ignore/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-ignore" 2 | , "version":"1.2.5" 3 | , "scripts":{"test":"bash test.sh"}} 4 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-ignore/sub/include: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/packages/npm-test-ignore/sub/include -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-ignore/sub/include2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/node-hocus-pocus/thaumaturgy/b7874637a11dafcd6ea49f091669b7dc8167ca59/lib/npm3/test/packages/npm-test-ignore/sub/include2 -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-ignore/sub/include4: -------------------------------------------------------------------------------- 1 | This file should be in the package. 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-ignore/test.sh: -------------------------------------------------------------------------------- 1 | x=`find . | grep ignore | grep -v npmignore` 2 | if [ "$x" != "" ]; then 3 | echo "ignored files included: $x" 4 | exit 1 5 | fi 6 | 7 | x=`find . | grep -v ignore | sort` 8 | y=". 9 | ./include4 10 | ./package.json 11 | ./README 12 | ./sub 13 | ./sub/include 14 | ./sub/include2 15 | ./sub/include4 16 | ./test.sh" 17 | y="`echo "$y" | sort`" 18 | if [ "$x" != "$y" ]; then 19 | echo "missing included files" 20 | echo "got:" 21 | echo "===" 22 | echo "$x" 23 | echo "===" 24 | echo "wanted:" 25 | echo "===" 26 | echo "$y" 27 | echo "===" 28 | exit 1 29 | fi 30 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-missing-bindir/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-missing-bindir/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-missing-bindir" 2 | , "version" : "0.0.0" 3 | , "scripts" : { "test" : "node test.js" } 4 | , "directories": { "bin" : "./not-found" } } 5 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-missing-bindir/test.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert') 2 | assert.equal(undefined, process.env.npm_config__password, 'password exposed!') 3 | assert.equal(undefined, process.env.npm_config__auth, 'auth exposed!') 4 | assert.equal(undefined, process.env.npm_config__authCrypt, 'authCrypt exposed!') 5 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-optional-deps/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-optional-deps/package.json: -------------------------------------------------------------------------------- 1 | { "name": "npm-test-optional-deps" 2 | , "version": "1.2.5" 3 | , "scripts": { "test": "node test.js" } 4 | , "optionalDependencies": 5 | { "npm-test-foobarzaaakakaka": "http://example.com/" 6 | , "dnode": "10.999.14234" 7 | , "sax": "0.3.5" 8 | , "glob": "some invalid version 99 #! $$ x y z" 9 | , "npm-test-failer":"*" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-optional-deps/test.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var assert = require('assert') 3 | var path = require('path') 4 | 5 | // sax should be the only dep that ends up installed 6 | 7 | var dir = path.resolve(__dirname, 'node_modules') 8 | assert.deepEqual(fs.readdirSync(dir), ['sax']) 9 | assert.equal(require('sax/package.json').version, '0.3.5') 10 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-platform-all/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-platform-all/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-platform-all" 2 | ,"version":"9.9.9-9" 3 | ,"homepage":"http://www.zombo.com/" 4 | ,"os":["darwin","linux","win32","solaris","haiku","sunos","freebsd","openbsd","netbsd"] 5 | ,"cpu":["arm","mips","ia32","x64","sparc"]} 6 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-platform/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-platform/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-platform" 2 | ,"version":"9.9.9-9" 3 | ,"homepage":"http://www.youtube.com/watch?v=dQw4w9WgXcQ" 4 | ,"os":["!this_is_not_a_real_os", "!neither_is_this"] 5 | ,"cpu":["!this_is_not_a_real_cpu","!this_isnt_either"]} 6 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-private/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-private/package.json: -------------------------------------------------------------------------------- 1 | {"name":"npm-test-private" 2 | ,"version":"9.9.9-9" 3 | ,"homepage":"http://www.youtube.com/watch?v=1MLry6Cn_D4" 4 | ,"private":"true"} 5 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-shrinkwrap/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-shrinkwrap/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 3 | "name": "npm-test-shrinkwrap", 4 | "version": "0.0.0", 5 | "dependencies": { 6 | "npm-test-single-file": "https://gist.github.com/isaacs/1837112/raw/9ef57a59fc22aeb1d1ca346b68826dcb638b8416/index.js", 7 | "glob": "git://github.com/isaacs/node-glob.git#npm-test", 8 | "minimatch": "~0.1.0" 9 | }, 10 | "scripts": { 11 | "test": "node test.js" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-test-package/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-test-package/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-test-package" 2 | , "author" : "Testy McMock" 3 | , "version" : "1.2.3-99-b" 4 | , "description" : "This is a test package used for debugging. It has some random data and that's all." 5 | } 6 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-url-dep/README: -------------------------------------------------------------------------------- 1 | just an npm test 2 | -------------------------------------------------------------------------------- /lib/npm3/test/packages/npm-test-url-dep/package.json: -------------------------------------------------------------------------------- 1 | { "name":"npm-test-url-dep" 2 | , "version" : "1.2.3" 3 | , "dependencies" : 4 | { "jsonify" : "https://github.com/substack/jsonify/tarball/master" 5 | , "sax": "isaacs/sax-js" 6 | , "canonical-host": "git://github.com/isaacs/canonical-host" 7 | } } 8 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/00-check-mock-dep.js: -------------------------------------------------------------------------------- 1 | console.log('TAP Version 13') 2 | 3 | process.on('uncaughtException', function (er) { 4 | if (er) { throw er } 5 | console.log('not ok - Failed checking mock registry dep. Expect much fail!') 6 | console.log('1..1') 7 | process.exit(1) 8 | }) 9 | 10 | var assert = require('assert') 11 | var semver = require('semver') 12 | var mock = require('npm-registry-mock/package.json').version 13 | var req = require('../../package.json').devDependencies['npm-registry-mock'] 14 | 15 | assert(semver.satisfies(mock, req)) 16 | console.log('ok') 17 | console.log('1..1') 18 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/00-verify-bundle-deps.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | 3 | var manifest = require('../../package.json') 4 | var deps = Object.keys(manifest.dependencies) 5 | var bundled = manifest.bundleDependencies 6 | 7 | test('all deps are bundled deps or dev deps', function (t) { 8 | deps.forEach(function (name) { 9 | t.assert( 10 | bundled.indexOf(name) !== -1, 11 | name + ' is in bundledDependencies' 12 | ) 13 | }) 14 | 15 | t.end() 16 | }) 17 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/00-verify-ls-ok.js: -------------------------------------------------------------------------------- 1 | var common = require('../common-tap') 2 | var test = require('tap').test 3 | var path = require('path') 4 | var cwd = path.resolve(__dirname, '..', '..') 5 | var fs = require('fs') 6 | 7 | test('npm ls in npm', function (t) { 8 | t.ok(fs.existsSync(cwd), 'ensure that the path we are calling ls within exists') 9 | var files = fs.readdirSync(cwd) 10 | t.notEqual(files.length, 0, 'ensure there are files in the directory we are to ls') 11 | 12 | var opt = { cwd: cwd, stdio: [ 'ignore', 'ignore', 2 ] } 13 | common.npm(['ls'], opt, function (err, code) { 14 | t.ifError(err, 'error should not exist') 15 | t.equal(code, 0, 'npm ls exited with code') 16 | t.end() 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/bin.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var test = require('tap').test 3 | var rimraf = require('rimraf') 4 | var common = require('../common-tap.js') 5 | var opts = { cwd: __dirname } 6 | var binDir = '../../node_modules/.bin' 7 | var fixture = path.resolve(__dirname, binDir) 8 | 9 | test('setup', function (t) { 10 | rimraf.sync(path.join(__dirname, 'node_modules')) 11 | t.end() 12 | }) 13 | 14 | test('npm bin', function (t) { 15 | common.npm(['bin'], opts, function (err, code, stdout, stderr) { 16 | t.ifError(err, 'bin ran without issue') 17 | t.notOk(stderr, 'should have no stderr') 18 | t.equal(code, 0, 'exit ok') 19 | var res = path.resolve(stdout) 20 | t.equal(res, fixture + '\n') 21 | t.end() 22 | }) 23 | }) 24 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/config-certfile.js: -------------------------------------------------------------------------------- 1 | require('./00-config-setup.js') 2 | 3 | var path = require('path') 4 | var fs = require('fs') 5 | var test = require('tap').test 6 | var npmconf = require('../../lib/config/core.js') 7 | 8 | test('cafile loads as ca', function (t) { 9 | var cafile = path.join(__dirname, '..', 'fixtures', 'config', 'multi-ca') 10 | 11 | npmconf.load({cafile: cafile}, function (er, conf) { 12 | if (er) throw er 13 | 14 | t.same(conf.get('cafile'), cafile) 15 | t.same(conf.get('ca').join('\n'), fs.readFileSync(cafile, 'utf8').trim()) 16 | t.end() 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/config-malformed.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | 3 | var npmconf = require('../../lib/config/core.js') 4 | var common = require('./00-config-setup.js') 5 | 6 | test('with malformed', function (t) { 7 | npmconf.load({}, common.malformed, function (er, conf) { 8 | t.ok(er, 'Expected parse error') 9 | if (!(er && /Failed parsing JSON config key email/.test(er.message))) { 10 | throw er 11 | } 12 | t.end() 13 | }) 14 | }) 15 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/lifecycle.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | var npm = require('../../') 3 | var lifecycle = require('../../lib/utils/lifecycle') 4 | 5 | test('lifecycle: make env correctly', function (t) { 6 | npm.load({enteente: Infinity}, function () { 7 | var env = lifecycle.makeEnv({}, null, process.env) 8 | 9 | t.equal('Infinity', env.npm_config_enteente) 10 | t.end() 11 | }) 12 | }) 13 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/ls-no-results.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | var spawn = require('child_process').spawn 3 | var node = process.execPath 4 | var npm = require.resolve('../../') 5 | var args = [ npm, 'ls', 'ceci n’est pas une package' ] 6 | test('ls exits non-zero when nothing found', function (t) { 7 | var child = spawn(node, args) 8 | child.on('exit', function (code) { 9 | t.notEqual(code, 0) 10 | t.end() 11 | }) 12 | }) 13 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/referer.js: -------------------------------------------------------------------------------- 1 | var common = require('../common-tap.js') 2 | var test = require('tap').test 3 | var http = require('http') 4 | 5 | test('should send referer http header', function (t) { 6 | http.createServer(function (q, s) { 7 | t.equal(q.headers.referer, 'install foo') 8 | s.statusCode = 404 9 | s.end(JSON.stringify({error: 'whatever'})) 10 | this.close() 11 | }).listen(common.port, function () { 12 | var reg = 'http://localhost:' + common.port 13 | var args = [ 'install', 'foo', '--registry', reg ] 14 | common.npm(args, {}, function (er, code) { 15 | if (er) { 16 | throw er 17 | } 18 | // should not have ended nicely, since we returned an error 19 | t.ok(code) 20 | t.end() 21 | }) 22 | }) 23 | }) 24 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/semver-doc.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | 3 | test('semver doc is up to date', function (t) { 4 | var path = require('path') 5 | var moddoc = path.join(__dirname, '../../node_modules/semver/README.md') 6 | var mydoc = path.join(__dirname, '../../doc/misc/semver.md') 7 | var fs = require('fs') 8 | var mod = fs.readFileSync(moddoc, 'utf8').replace(/semver\(1\)/, 'semver(7)') 9 | var my = fs.readFileSync(mydoc, 'utf8') 10 | t.equal(my, mod) 11 | t.end() 12 | }) 13 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/semver-tag.js: -------------------------------------------------------------------------------- 1 | // should not allow tagging with a valid semver range 2 | var common = require('../common-tap.js') 3 | var test = require('tap').test 4 | 5 | test('try to tag with semver range as tag name', function (t) { 6 | var cmd = ['tag', 'zzzz@1.2.3', 'v2.x', '--registry=http://localhost'] 7 | common.npm(cmd, { 8 | stdio: 'pipe' 9 | }, function (er, code, so, se) { 10 | if (er) throw er 11 | t.similar(se, /Tag name must not be a valid SemVer range: v2.x\n/) 12 | t.equal(code, 1) 13 | t.end() 14 | }) 15 | }) 16 | -------------------------------------------------------------------------------- /lib/npm3/test/tap/zz-cleanup.js: -------------------------------------------------------------------------------- 1 | var common = require('../common-tap') 2 | var test = require('tap').test 3 | var rimraf = require('rimraf') 4 | 5 | test('cleanup', function (t) { 6 | rimraf.sync(common.npm_config_cache) 7 | t.end() 8 | }) 9 | -------------------------------------------------------------------------------- /lib/npm3/wercker.yml: -------------------------------------------------------------------------------- 1 | box: wercker/nodejs 2 | # Build definition 3 | build: 4 | # The steps that will be executed on build 5 | steps: 6 | # A step that executes `npm install` command 7 | - npm-install 8 | # A step that executes `npm test` command 9 | - npm-test 10 | 11 | # A custom script step, name value is used in the UI 12 | # and the code value contains the command that get executed 13 | - script: 14 | name: echo nodejs information 15 | code: | 16 | echo "node version $(node -v) running" 17 | echo "npm version $(npm -v) running" 18 | after-steps: 19 | - sherzberg/slack-notify: 20 | subdomain: npm-inc 21 | token: $SLACK_TOKEN 22 | channel: github-commits 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "thaumaturgy", 3 | "version": "0.5.0", 4 | "description": "Build Node.js packages in AWS Lambda using AWS Lambda.", 5 | "main": "index.js", 6 | "bin": { 7 | "thaumaturgy": "cli/thaumaturgy" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/node-hocus-pocus/thaumaturgy.git" 12 | }, 13 | "author": "John Titus", 14 | "license": "MIT", 15 | "dependencies": { 16 | "archiver": "^0.15.1", 17 | "aws-sdk": "^2.2.4", 18 | "bluebird": "^2.10.1", 19 | "commander": "^2.8.1", 20 | "install": "^0.1.8", 21 | "mkdirp": "^0.5.1", 22 | "nopt": "^3.0.4", 23 | "osenv": "^0.1.3", 24 | "prompt": "^0.2.14" 25 | } 26 | } 27 | --------------------------------------------------------------------------------