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/utils
AgeCommit message (Collapse)Author
2022-11-01chore: update snapshot tests for new docsLuke Karrys
2022-09-02fix: Turn off progress bar when using web based authorization (#5438)Sandeep Meduru
2022-08-22fix: lintingGar
In preparation for @npmcli/eslint-config@3.1.0
2022-08-17fix(explain): display override informationnlf
2022-08-03fix: properly find locally/globally/npxCache packagesGar
Lots of bugfixes here, we properly parse ranges and versions, and we also now work with git repos and gists, and know when they are already installed.
2022-08-03feat: add --replace-registry-host=<npmjs|always|never> (#4860)Nathan Fritz
feat: add --replace-registry-host=<npmjs|always|never>|<hostname>
2022-08-02fix: gracefully exit login and publish commands on Ctrl+C (SIGINT) in the ↵Neel Dani
new webAuthn flow (#5243)
2022-08-01feat: add npm query cmd (#5000)Ruy Adorno
Co-authored-by: Gar <gar+gh@danger.computer>
2022-07-21fix: don't fail immediately if cache dir is not accessible (#5197)Luke Karrys
This also changes all the log messages about not being able to create initial directories and files to `log.verbose` since we know run those commands on init. There are a lot of valid reasons why those might fail, and we don't want to show a warning for them every time. Fixes: #4769 Fixes: #4838 Fixes: #4996
2022-07-20feat: Support pure web authentication for commandsJulian Møller Ellehauge
* feat: Add support for web auth, utilizing code from npm-profile Co-authored-by: Jordan Harband <ljharb@gmail.com> Co-authored-by: Hayden Faulds <fauldsh@gmail.com> Co-authored-by: Sandeep Meduru <sandeepmeduru@github.com>
2022-07-20feat: accept registry-scoped certfile and keyfile as credentials (#5160)Jon Jensen
Closes #4765 RFC: https://github.com/npm/rfcs/pull/591 While this doesn't directly allow top-level cert/key as credentials (per the original issue), it's a more targeted/secure approach that accomplishes the same end-result; the new options are scoped to a specific registry, and the actual cert/key contents are much less likely to be exposed. See the RFC for more context. Depends on: * https://github.com/npm/npm-registry-fetch/pull/125 * https://github.com/npm/config/pull/69
2022-07-12feat: Add `web` auth type (#5076)Julian Møller Ellehauge
2022-07-12feat: warn on config --auth-type=sso/saml/oauth, undeprecate --auth-typeNathan Fritz
2022-07-12feat: notify on adduser of upcoming cmds, login and registerNathan Fritz
2022-06-22feat: prompt before opening web-login URL when performing `login`/`adduser` ↵Julian Møller Ellehauge
(#4960) Prompt before opening web-login URL when performing login/adduser
2022-06-22docs: consolidate docs and help for package spec (#5048)Gar
Many of our commands parse their args via [npm-package-arg](https://npm.im/npm-package-arg), which is a good standard way of parsing a "package" argument. However the docs surrounding these args are not very consistent. This can lead to confusion in commands such as `npm publish` where the behavior is slightly different than in the past due to this. This adds a new help command `npm help package-spec` that describes what this argument is, and can be, and also updates all the commands that interpret their args this with to refer to them as `<package-spec>`. It also adds a link to the new help page on their docs pages.
2022-06-02fix: undeprecate and remove warnings for --global, -g, --local (#4982)Nathan Fritz
2022-06-02feat: Add `--auth-type=webauthn` flag (#4931)Julian Møller Ellehauge
* feat: Add --use-webauth flag * Add docs * Switch from a separate flag to a variation of auth-type * Update snapshot
2022-05-19fix: remove dead code from get-identityGar
2022-05-19feat: deprecated set-script, birthday, --global, and --localNathan Fritz
2022-05-10feat: add flag --omit-lockfile-registry-resolved (#4874)Nathan Fritz
* feat(arborist): added flag to omit lockfile resolved * feat: add flag --omit-lockfile-registry-resolved Co-authored-by: Caleb ツ Everett <calebev@amazon.com>
2022-05-09feat: add --iwr alias for --include-workspace-root (#4864)Nathan Fritz
2022-05-09fix: consolidate bugs, docs, repo command logic (#4857)Gar
All three of these commands do the same thing: open a manifest and find a url inside to open it. The finding of that manifest was not very consistent across these three commands. Some work with workspaces while others don't. Some work correctly with `--prefix` while others don't. This PR consolidates these commands so that they all are consistent in how they find the manifest being referenced. The specifics of which url they open are still left to each command. The util that only these three commands were using was consolidated into their base class.
2022-05-07fix: remove test coverage map (#4862)Gar
Turns out there were three files that still had no test coverage because of the combination of the mocks in tests and the coverage map. Removing the map altogether exposed them. This PR removes the coverage map and fixes test to cover all lines that were being missed. While adding coverage to the `npm search` codebase multiple unneeded guards and at least one bug was found (it was impossible to exclude searches based on username). These were fixed. The `npm view` tests were also refactored to use the real npm object. Finally, a small inlining of lib/utils/file-exists.js was done.
2022-05-04docs: remove incorrect v6 auto prune info (#4845)Gar
As of npm@7, extraneous modules are always auto pruned
2022-04-26fix: normalize win32 paths before globbingLuke Karrys
2022-04-21docs: explain that _auth only goes to npm registryGar
2022-04-20feat: add install-links config definitionnlf
2022-04-14fix: skip update notifier file if not requestedLuke Karrys
2022-04-05fix(run-script): don't cascade if-present config (#4678)Ruy Adorno
Do not pass the `if-present` env config value to spawned processes. Fixes: https://github.com/npm/cli/issues/3352 Close: https://github.com/npm/cli/pull/3589
2022-04-04fix: do not export npm_config_include_workspace_rootGar
2022-04-04fix: replace deprecated String.prototype.substr() (#4667)CommanderRoot
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-30fix: consolidate split-package-namesGar
It was only ever used by `npm edit` so it's inline now. Rewrote `npm edit` tests to be real
2022-03-30fix: return otplease fn resultsGar
2022-03-28fix: consolidate path delimiter logicGar
2022-03-28fix: consolidate node version support logicGar
2022-03-28fix: consolidate is-windows codeGar
2022-03-28fix: consolidate command alias codeGar
2022-03-28fix: move shellout logic into commandsGar
Each command now signals whether or not it is a shellout
2022-03-24fix: 100% coverage in tests (#4607)Gar
* fix: 100% coverage in tests * Removed dead code in `lib/utils/usage.js`. * Removed dead code in `lib/base-command.js`. * Removed "load-all" test, we currently have 100% coverage and new PRs without tests will be rejected if they don't add coverage for new files. * Removed `check-coverage` script as a separate command. * Removed separate coverage test in ci.yml. * Removed `coverage` flag from tap config, the default is already to enforce 100% coverage. Removed a tiny bit of dead code resulting from this * fix: clean up usage output Removed usage lib, rolled logic into base-command.js Cleaned up usage output to be less redundant
2022-03-24feat: add logs-dir config to set custom logging locationLuke Karrys
This also allows logs-max to be set to 0 to disable log file writing. Closes #4466 Closes #4206
2022-03-24feat(version): reify on workspace version change (#4588)Ruy Adorno
Adds a minimalistic reify step that updates the installed tree after a version change within one of the configured workspaces when using any of the workspaces config options. It's also possible to use the `--save` config option in order to auto update semver ranges of dependencies declarations accross dependent `package.json` files. Fixes: https://github.com/npm/cli/issues/3403 Relates to: https://github.com/npm/rfcs/issues/556 Relates to: https://github.com/npm/cli/issues/3757 Relates to: https://github.com/npm/cli/issues/4193
2022-03-17docs: fix unpublish docs to auto generate usage (#4584)Gar
Also add explanation of what `--force` does for unpublish
2022-03-17docs: explain that git-tag-version=false does not commit (#4574)Gar
2022-03-17fix: add isntall alias to install (#4573)Gar
Without this, the isntall-clean alias is matched and ran
2022-03-17fix: remove "bug the author" message from package 404Gar
2022-03-10fix: clean up owner command and otplease (#4528)Gar
2022-02-24chore(cli): remove log option from being passed anywhereLuke Karrys
2022-02-09fix(config): add pack-destination flattenernlf
2022-02-08docs: add --save-bundle to --save usage outputGar