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
2021-02-25chore(refactor): promisify completion scriptsGar
We also removed the "none" script because we handle a missing script just fine. There is no need to put an empty one in PR-URL: https://github.com/npm/cli/pull/2759 Credit: @wraithgar Close: #2759 Reviewed-by: @nlf
2021-02-25feat(explain): mark when dependency is bundledkumavis
When using `npm explain <package>` it's useful to see if the package has been bundled. This is especially useful when trying to understand the provenance of a package's content PR-URL: https://github.com/npm/cli/pull/2750 Credit: @kumavis Close: #2750 Reviewed-by: @nlf
2021-02-22Move implementation to separate packageisaacs/hide-easter-egg-betterisaacs
PR-URL: https://github.com/npm/cli/pull/2743 Credit: @isaacs Close: #2743 Reviewed-by: @nlf
2021-02-22chore(refactor): clean up lifecycle-cmdsGar
This is a small incremental step in removing some of the complexity surrounding the `npm` object in our code. It moves that object one level up the chain of code, with the end goal being that we will only require it once in the codebase, ultimately allowing us to improve our tests. I also changed the command that it calls to `run-script` because that is the base command. `run` was an alias, and that is one more layer of hoops a developer would have to jump through to find what file in `./lib` is even being referenced here. PR-URL: https://github.com/npm/cli/pull/2753 Credit: @wraithgar Close: #2753 Reviewed-by: @isaacs
2021-02-22Do not print error banner for shell proxy commandsisaacs
There are a few commands (exec, run-script, and the run-script proxies) where essentially npm is acting like a very fancy shell. It is peculiar and noisy for npm to print a verbose error banner at the end of these commands, since presumably the command itself already did whatever it had to do to report the error appropriately. For example, `npm test` runs a test script, usually outputting test results. Having npm then tell me that my tests failed with exit status 1 and print a debug log, is unnecessary and unwanted. When the error encountered for these commands does not have a non-zero numeric 'code', then we still print the standard npm error reporting messages, because presumably something went wrong OTHER than a process exiting with a non-zero status code. PR-URL: https://github.com/npm/cli/pull/2742 Credit: @isaacs Close: #2742 Reviewed-by: @nlf
2021-02-22fix(runScript): obey silent loglevelGar
If the user has specified a silent loglevel, we should pass that intention on when we call runScript Also a small cleanup in lib/run-script.js so that the reference to @npmcli/run-script is named the same as other files. PR-URL: https://github.com/npm/cli/pull/2719 Credit: @wraithgar Close: #2719 Reviewed-by: @nlf
2021-02-18throw an error when trying to dedupe in global modenlf/no-global-dedupenlf
PR-URL: https://github.com/npm/cli/pull/2716 Credit: @nlf Close: #2716 Reviewed-by: @ljharb, @wraithgar
2021-02-18restore the prefix on output from `npm version <inc>`nlf/restore-tag-prefix-on-versionnlf
PR-URL: https://github.com/npm/cli/pull/2718 Credit: @nlf Close: #2718 Reviewed-by: @wraithgar
2021-02-18fix: shrinkwrap in node v10.0Jordan Harband
See https://github.com/npm/cli/pull/2654#discussion_r575549441 PR-URL: https://github.com/npm/cli/pull/2688 Credit: @ljharb Close: #2688 Reviewed-by: @wraithgar
2021-02-12[fix] node v10.0 lacks `fs.promises`Jordan Harband
In this node version, fall back to `util.promisify` of the callback version. Maybe fixes https://github.com/npm/cli/issues/2623. Maybe fixes https://github.com/npm/cli/issues/2652. Maybe fixes https://github.com/npm/cli/issues/2625. PR-URL: https://github.com/npm/cli/pull/2654 Credit: @ljharb Close: #2654 Reviewed-by: @wraithgar, @ruyadorno
2021-02-11fix(env): Do not clobber defined 'env' scriptisaacs
If an env script is already defined, run that instead of the default. PR-URL: https://github.com/npm/cli/pull/2655 Credit: @isaacs Close: #2655 Reviewed-by: @ljharb
2021-02-08fix: prune optionalDeps ls compatRuy Adorno
Fixes a compatibility issue in `npm ls` due to the subtle internal change of optional dependencies being pruned from dependencies in `read-package-json-fast@2.0.0` update.
2021-02-05fix(publish): follow configs for registry authGar
The "do you have auth configured" only takes into consideration a hard-coded "registry" config, which means that if you don't have auth configured for the npm registry, but you do for the one you have tied to a scope elsewhere in your npmrc, we would erroneously tell you that to add a token. This uses the same method that the rest of the publish chain uses to determine which registry it would be publishing to, then sees if you have auth for THAT registry. Because that other function does a hard fallback to the npm registry, there is no more need for the exception we throw if you do not have one configured. Also, the npm cli already defaults that config item, so you can't even set it to a falsey value if you wanted
2021-02-05chore: utils cleanup and testsnlf
- remove spawn util, refactor help command - add tests for read-user-info, minor refactor - add tests for pulse-till-done util, refactor - add tests for otplease util - add tests for open-url util - remove unused no-progress-while-running util PR-URL: https://github.com/npm/cli/pull/2601 Credit: @nlf Close: #2601 Reviewed-by: @ruyadorno, @wraithgar
2021-02-02fix(lib/npm): do not clobber config.execPathGar
If we were not asked to clobber config.execPath, don't do it. Credit: @wraithgar Reviewed-by: @isaacs
2021-02-02fix(exec): use latest version when possibleGar
pull latest packument when getting info about package to run, also install newer version if one is available and user has not specified a version (i.e. is defaulting to @latest) PR-URL: https://github.com/npm/cli/pull/2592 Credit: @wraithgar Closes: #2395 Closes: #2329 Reviewed-by: @darcyclarke
2021-02-01Add test for ansi-trim moduleisaacs
2021-02-01test: Add test for npm-usage.js, and fix 'npm --long' outputisaacs
2021-02-01elaborate that npm help uses browserAlexander Riccio
As I mentioned in issue #2501 this is mildly annoying to me, and probably a few other people. I have added "(in a browser)" to the npm usage string at the npm help line. PR-URL: https://github.com/npm/cli/pull/2502 Credit: @ariccio Close: #2502 Reviewed-by: @isaacs
2021-02-01wrap a timer around the rimraf call in npm-ciisaacs/ci-rm-timerisaacs
Fix: https://github.com/npm/arborist/issues/207 PR-URL: https://github.com/npm/cli/pull/2573 Credit: @isaacs Close: #2573 Reviewed-by: @nlf
2021-02-01pass all settings through to pacote.packument, fixes #2060nlf/fix-proxy-outdatednlf
PR-URL: https://github.com/npm/cli/pull/2587 Credit: @nlf Close: #2587 Reviewed-by: @ruyadorno
2021-02-01ignore the sort in help-search more broadlyisaacs/broader-istanbul-ignore-in-help-searchisaacs
It turns out that the other stuff in those objects might also be in random order, so this is still triggering CI coverage failures, albeit more rarely than it used to. Just ignore the whole sort function. It's fine, we implicitly assert on the sortedness in the test, so we know that it is doing its job. PR-URL: https://github.com/npm/cli/pull/2574 Credit: @isaacs Close: #2574 Reviewed-by: @nlf
2021-02-01remove aproba as top-level depisaacs
2021-01-28feat: add npm diffruyadorno/npm-diffRuy Adorno
- As proposed in RFC: https://github.com/npm/rfcs/pull/144 PR-URL: https://github.com/npm/cli/pull/1319 Credit: @ruyadorno Close: #1319 Reviewed-by: @isaacs
2021-01-28chore(tests): skip coverage for results.sortGar
We finally know why this is happening, and it's because the array that it is sorting isn't deterministic. Explanation is in the comments above the function, line is ignored, no more random CI test failures. PR-URL: https://github.com/npm/cli/pull/2523 Credit: @wraithgar Close: #2523 Reviewed-by: @darcyclarke
2021-01-28fix: publish: delay registry & login check till publishConfig mergedr-js
2021-01-15fix: npm ls global testsRuy Adorno
2021-01-15fix(docs): clean up `npm search` docsMichael Garvin
In which the "note on caching" is finally populated after all these years PR-URL: https://github.com/npm/cli/pull/2487 Credit: @wraithgar Close: #2487 Reviewed-by: @darcyclarke
2021-01-15fix(link): already linked packages w/ global prefixnlf
correctly identify already linked packages when global prefix is a symlink PR-URL: https://github.com/npm/cli/pull/2486 Credit: @nlf Close: #2486 Reviewed-by: @wraithgar
2021-01-15fix(docs): clean up `npm token` docsMichael Garvin
grammar fixes, notes on authentication tokens, match usage output with readme PR-URL: https://github.com/npm/cli/pull/2482 Credit: @wraithgar Close: #2482 Reviewed-by: @darcyclarke
2021-01-15fix(docs): clean up `npm unpublish` docsMichael Garvin
Mostly grammar fixes, also adds not about needing to be logged in, as per comment in https://github.com/npm/cli/issues/1880 PR-URL: https://github.com/npm/cli/pull/2474 Credit: @wraithgar Close: #2474 Reviewed-by: @darcyclarke
2021-01-15fix(docs): re-add `-S`Michael Garvin
2021-01-15fix(docs): re-add `--save` and explanation of when it is usefulMichael Garvin
2021-01-15fix(uninstall): match usage w/ docsMichael Garvin
2021-01-07add foreground-scripts optionisaacs/foreground-scriptsisaacs
PR-URL: https://github.com/npm/cli/pull/2456 Credit: @isaacs Close: #2456 Reviewed-by: @ruyadorno
2021-01-07fix(ci): pay attention to --ignore-scriptsMichael Garvin
Added a test for install too for this specific condition PR-URL: https://github.com/npm/cli/pull/2455 Credit: @wraithgar Close: #2455 Reviewed-by: @isaacs
2021-01-07pass extra arguments directly to run-script as an arraynlf/fix-script-argsnlf
fixes #2425 PR-URL: https://github.com/npm/cli/pull/2448 Credit: @nlf Close: #2448 Reviewed-by: @isaacs, @wraithgar, @darcyclarke
2021-01-07Updated the url for RFC 19 so that it isn't a 404.Jeff Griffiths
PR-URL: https://github.com/npm/cli/pull/2440 Credit: @therealjeffg Close: #2440 Reviewed-by: @isaacs
2021-01-07fix: npm publish --dry-run should not check login statusfuhao.xu
PR-URL: https://github.com/npm/cli/pull/2422 Credit: @buyan302 Close: #2422 Reviewed-by: @isaacs
2021-01-07Remove process.umask() call from config defaultisaacs/remove-process-umaskisaacs
Since we now are using pacote/tar in a way that will rely on the default process umask setting, and we set file/directory modes explicitly anyway, there's no need to have a default umask setting that calls process.umask() As this method is not worker-thread safe, and is deprecated, it's best for us to stop using it. Fix: #1103 PR-URL: https://github.com/npm/cli/pull/2444 Credit: @isaacs Close: #2444 Reviewed-by: @nlf
2020-12-18tiny lint fixisaacs
2020-12-18remove the metrics sendernlf/remove-metricsnlf
PR-URL: https://github.com/npm/cli/pull/2382 Credit: @nlf Close: #2382 Reviewed-by: @isaacs
2020-12-18fix: npm profile refactorRuy Adorno
- Fixes using `--otp` config option in `npm profile enable-2fa` - Prevents trying to enable 2fa if no user is logged in - Setting email should not require password - Add `test/lib/profile.js` tests - Async/await `lib/profile.js` refactor and more - Fixes: https://github.com/npm/statusboard/issues/164 PR-URL: https://github.com/npm/cli/pull/2373 Credit: @ruyadorno Close: #2373 Reviewed-by: @isaacs
2020-12-18Include prerelease versions when deprecatingTieg Zaharia
PR-URL: https://github.com/npm/cli/pull/2366 Credit: @tiegz Close: #2366 Reviewed-by: @isaacs EDIT(@isaacs): updated to make _all_ deprecation ranges include prereleases. If `foo@*` would be expected to deprecate `foo@1.0.0-beta`, then presumably `foo@1.x` has the same expectation.
2020-12-18Support multiple set/get/deletes in npm configisaacs/config-set-multiisaacs
While digging into #2300, I realized it would be a lot easier if we could do this: npm config set email=me@example.com _auth=xxxx and avoid the whole issue of what gets set first. Also, why not let `npm config get foo bar baz` return just the keys specified? Also updates the docs, including the statement that `npm config set foo` with no value sets it to `true`, when as far as I can tell, that has never been the case. PR-URL: https://github.com/npm/cli/pull/2362 Credit: @isaacs Close: #2362 Reviewed-by: @nlf
2020-12-18Add max-len to lint rulesEdu93Jer
PR-URL: https://github.com/npm/cli/pull/2361 Credit: @Edu93Jer Close: #2361 Reviewed-by: @isaacs EDIT(@isaacs): amended to match some of the fixes to our current style conventions
2020-12-18raise an error early if publishing without login, registryisaacs/publish-fail-when-no-registry-no-loginisaacs
PR-URL: https://github.com/npm/cli/pull/2360 Credit: @isaacs Close: #2360 Reviewed-by: @nlf
2020-12-18Pass full set of options to login helper functionsisaacs
This fixes 'npm login --no-strict-ssl', as well as a host of other options that one might want to set while logging in. Reported by: @toddself
2020-12-15remove some unused modulesnlf
PR-URL: https://github.com/npm/cli/pull/2355 Credit: @nlf Close: #2355 Reviewed-by: @ruyadorno
2020-12-15add tests for org commandnlf
PR-URL: https://github.com/npm/cli/pull/2353 Credit: @nlf Close: #2353 Reviewed-by: @ruyadorno