Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2015-04-10git: --save-exact saves fully-resolved git URLForrest L Norvell
2015-04-10git: save non-normalized shorthand to package.jsonForrest L Norvell
Instead of checking if from is just a URL, use npm-package-arg to figure out what kind of URL or shorthand it might be, and save that to package.json.
2015-04-10git: use paths as presented by userForrest L Norvell
* Save the lightest-possibly normalized URL into `package.json` and package.json _from fields, because read-package-json, read-installed, and the cache all know how to handle them now. * Add support for github:, gist:, bitbucket:, and gitlab: shortcut syntax. GitHub shortcuts will continue to be normalized to org/repo instead of being saved with a github: prefix (for now). * If presented with shortcuts, try cloning via git, SSH, and HTTPS (in that order, skipping any methods that aren't supported by a given hosting provider). * No longer prompt for credentials -- it didn't work right with the spinner, and wasn't guaranteed to work anyway. We may experiment with doing this a better way in the future. Users can override this by setting GIT_ASKPASS in their environment if they want to experiment with interactive cloning, but should also set --no-spin on the npm command line (or run `npm config set spin=false`).
2015-04-08spawn: map exit code 127 to ENOENT for node@0.8Jakob Krigovsky
Node.js v0.8 will not emit a separate `error` event if the command could not be found. Exit code 127 is reserved for “command not found”, see http://tldp.org/LDP/abs/html/exitcodes.html.
2015-04-03run-script: always quote argsMaximilian Antoni
Fixes #7743.
2015-04-03npmconf: add braces missing from 5d7f704Charmander
2015-04-03install: better logging, no more readJSON cachingForrest L Norvell
A bunch of the tests are now getting more complete from / resolved information because the contents of rewritten package.json files on disk are no longer masked by `read-package-json` memoizing fs reads of package.json files. Part of fixing #7074.
2015-04-03read-package-json@1.3.3Forrest L Norvell
Eliminates caching of package.json files, which in turn eliminates a class of liveness problems / incomplete cache invalidation bugs / race conditions. Also took this opportunity to standardize the file. Closes #7074.
2015-04-02git: stderr can also potentially be null on errorForrest L Norvell
Another fix for #7829. Tip of the keyboard to @leopoldfreeman for pointing out the missing check.
2015-04-02git: don't assume stdout exists on errorForrest L Norvell
When checking the remote URL for a repo, if it errors out, stdout may not be set. Fixes #7829.
2015-04-02git: revert 44da66456b530c049ff50953f78368460df8Forrest L Norvell
It turns out that git commands do now log their output appropriately, and this change was causing misleading output when using `maybeGithub`, which was exposed by 89ce829a00b526d0518f5cd855c323bffe182af0, which fixed #7630. npm's git functionality is maybe a little overcomplicated at this point.
2015-03-27link: use absolute links when `npm link`ing.Kazuhito Hokamura
2015-03-27npmconf: don't open a deleted cafileKenan Yildirim
2015-03-27github: fix the ssh fallback for private github modulesRebecca Turner
This only impacts github modules installed via github shortcuts, eg npm install project/module When the module is marked as private.
2015-03-25cache: don't test missing strings (fixes #7746)Forrest L Norvell
2015-03-25search: request correct URLs (fixes #7443)Forrest L Norvell
2015-03-20outdated: remove incredibly noisy loggingForrest L Norvell
2015-03-20adduser: explicit registry on command line winsForrest L Norvell
It turns out that config-chain allows you to query a specific config source by type, which allows us to see whether specific config values were set explicitly on the command line. Who knew? (Aside from @isaacs and @dominictarr.) Anyway, doing this required a small, noninvasive change to test/tap/config-meta.js so that it didn't try to match the entire set of parameters passed to `config.get` when doing its metaprogramming thing. Fixes #7661.
2015-03-20hosted-git-info@1.5.3Forrest L Norvell
Use `hosted-git-info` directly to ensure that all GitHub URLs are being run through the same cloning strategy for caching. Fixes #7630.
2015-03-20realize-package-specifier@2.2.0Forrest L Norvell
Push the new npm-package-arg logic further into the caching logic. Doesn't quite handle GitHub URLs correctly yet. That will require depending on hosted-git-info directly.
2015-03-20npm-package-arg@3.1.1Forrest L Norvell
Do the minimal upgrade necessary to get tests passing with new hosted repo metadata. I anticipate the realize-package-specifier update will be a little more invasive.
2015-03-17shrinkwrap: npm shrinkwrap --dev means prod tooForrest L Norvell
Due to 448efd0eaa6f97af0889bf47efc543a1ea2f8d7e, running `npm shrinkwrap --dev` caused production dependencies to no longer be included in npm-shrinkwrap-.json. Whoopsie! Added a regression test to go with the fix. Fixes #7641.
2015-03-13install: track bundled dependencies in contextForrest L Norvell
Fixes #7552. The npm@<3 installer uses an elaborate data tree built in-memory as the install process runs to track which dependencies have already been seen in the tree. This allows the installer to determine whether a parent dependency satisfies the current semver requirement. However, if one version of a dependency is specified at one level of the tree, and then a child of that level includes that same dependency bundled at a different version, and one of *that dependency's* children depends on this same dependency at yet another version, it will end up matching against the version _above_ the bundled dependency. This can lead anyone trying to figure out what's going on into a phantasmagorical wonderland where nothing is real, and can also produce an inconsistent installed tree. The solution is to ensure that the bundled dependency versions are added to the tree, but in order to do this, we need to know exactly which version got bundled. This requires a call to readInstalled, because the version that was bundled isn't included anywhere in the package metadata. Since readInstalled is slow, installMany will only call it if it knows there are bundledDependencies for the current package.
2015-03-12install: removed obsolete commentRichard Littauer
This is obviously no longer experimental, and I'm not sure this comment belongs here anymore.
2015-03-12link: rm rmForrest L Norvell
`lib/utils/link.js` already removes the existing paths, so at the very least this was leading to some redundant logging.
2015-03-12gently-rm: more context on failureForrest L Norvell
The log messages are more useful than the generic error emitted by clobberFail, so make sure they're almost always visible to end users who might be otherwise confused. Also make them more consistent, and make the whole file comply with `standard`'s style rules.'
2015-03-12gently-rm: always resolve against a base directoryForrest L Norvell
The amount that resolve() is used is probably overly cautious as-is, but if we're going to use it, don't use it bare, or it will assume a base of `process.cwd()`, which is often incorrect.
2015-03-12gently-rm: swap checks & match target, not sourceForrest L Norvell
Fixes #7579. We want to know two things with gently-rm: 1. Is the parent directory under npm's control? (1a. Is the thing to be deleted under that parent directory if so?) 2. Is the thing to be deleted under npm's control? There are some additional complications, but that's the core of it, so to make clearer what was going on, I rearranged the code to prioritize answering those two questions, and added a bunch of comments explaining what's happening in an effort that that would make clearer *why* the code is written the way it is. When npm removes a file or directory, it verifies whether the thing being removed is under npm's control. This isn't something that can be ascertained directly, so gentlyRm checks to see if there's a plausible case that this file was something that was originally installed by npm. Mostly it just verifies whether either the deletion target or the parent directory (which could be passed in as the base, or could be the prefix otherwise) is under one of the paths that npm might have reason to mess with. It will also deal with a certain amount of symbolic link trickery, but symlink verification was overly aggressive before, and has been eased up some.
2015-03-11gently-rm: npm.globalRoot is not a thingForrest L Norvell
I also sorted the order of the npm-controlled directories to sort prefix and globalPrefix up to the top, because those are the two most likely candidates to match.
2015-03-06install: tweak install --link for gitForrest L Norvell
`_resolved` isn't guaranteed to be set on the package metadata by this point in the installation process, and we probably shouldn't automatically assume that `_from` is set, either.
2015-03-06install: don't try to --link git dependenciessmikes
test sets up git repo & mock registry -- fragile test of install --link=false test of install --link=true
2015-03-06update: a completely uncontroversial changeForrest L Norvell
2015-03-05install: engineStrict only warns for this packageForrest L Norvell
2015-03-05update: only update when current !== wantedForrest L Norvell
Fixes #6441.
2015-03-05dedupe: test/tap/dedupe-scoped.js uses find-dupesForrest L Norvell
Test is now self-contained as well.
2015-03-05dedupe: Handle scoped packagesKarolis Narkevicius
2015-03-05restore order to caching git remotesForrest L Norvell
Also, update code coments to be accurate, and extirpate single-letter variable names. And introduce a params object because those argument lists were completely ridiculous.
2015-03-04`npm stars` don't send bogus auth when not authedForrest L Norvell
Fixes #7531.
2015-03-04config: remove redundant validatorForrest L Norvell
2015-03-03publish, config: move tag-semver testsmikes
add usage info to publish move tag-semver check to publish test publish instead of config
2015-03-02error-handler: update support url to https from httpDaijiro Wachi
2015-03-02Adds function call to gitEnv in checkGitDirAndreas
In checkGitDir when executing `git config --get remote.origin.url` the gitEnv function is passed to git.whichAndExec instead of the result of that function.
2015-03-02error-handler: FreeBSD does EAI_FAIL,not ENOTFOUNDForrest L Norvell
2015-02-27error-handler: added er.parent to ETARGET errorDav Glass
2015-02-27rm: npm rm <noargs> globally removes (unlinks) '.'isaacs
Fixes #4005, #6248. What's interesting is that the comment in the code seems to indicate that this was *always* the intent. But somewhere along the line, that seems to have broken. This makes 'npm link' be un-done by running 'npm unlink'.
2015-02-27completion: make separator a localForrest L Norvell
2015-02-27cache: test add-remote-git's URL normalizationForrest L Norvell
2015-02-27cache: add-remote-git expects no 'git+' on URLsForrest L Norvell
2015-02-27cache: don't add 'git+' when it's already thereTim Whidden
Fixes #7294.
2015-02-27Added an --if-present flag for not erroring on unspecified scripts.Jussi Kalliokoski
Fixes #7354.