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/test
AgeCommit message (Collapse)Author
2022-04-20fix(exec): workspaces supportRuy Adorno
Fixes the proper path location to use when targetting specific workspaces. Fixes: https://github.com/npm/cli/issues/3520 Relates to: https://github.com/npm/statusboard/issues/403
2022-04-20fix: remove lib/utils/read-package-name.jsGar
This code wasn't doing anything special, just dereferencing `name` from a packument. There is no need for this to exist. Most of the tests were able to handle having this go away, except for `npm owner` which had to have its tests rewritten to be real, which of course surfaced bugs along the way of behavior that was incorrectly being tested. `npm owner` needs some love to clean up its UX, it throws or returns inconsistently. I did fix it so that if there is no package.json in cwd it errored as expected instead of throwing `ENOENT` which is what it did before.
2022-04-20fix(install): do not install invalid package nameRuy Adorno
Throws an usage error if finding an invalid argument in global install. Fixes: https://github.com/npm/cli/issues/3029
2022-04-20chore: add fallback audit to testsGar
2022-04-20fix: consolidate registryConfig application logicGar
It should happen whenever we read a manifest anyways. Tests were also rewritten to be real.
2022-04-20fix(libnpmexec): fix read mixed local/registry pkgRuy Adorno
Refactor / clean up of the logic around reading installed packages. Fixes reading packages from mixed sources (one being from the local installed tree and the other from the registry using pacote.manifest). Makes it so that libnpmexec is always reading from the Arborist actual tree instead of reading `node_modules` from the file system when retrieving local package data. Fixes: https://github.com/npm/cli/issues/3668 Relates to: https://github.com/npm/cli/pull/4643 Relates to: https://github.com/npm/cli/issues/4619 Relates to: https://github.com/npm/statusboard/issues/403
2022-04-15chore(test): fix config definitions test when run without tapLuke Karrys
2022-04-15fix: deprecate completionGar
Found a bug refactoring the tests. libnpmaccess mutates the response from the server, and the completion code was not looking for the right value.
2022-04-14fix(ls): make `--omit` filter `npm ls`Luke Karrys
This makes `npm ls` use the same logic as other commands (eg `outdated`) when parsing config items that filter the output based on package type. Previously `--development` and `--production` has special semantics when used with `npm ls` that were inconsistent with the rest of the CLI. To achieve the same behavior as these deprecated flags use: - in place of `--development` use `--omit peer --omit prod --omit optional` - in place of `--production` use `--omit dev --omit peer` Fixes #4739
2022-04-14deps: remove ansicolorsGar
2022-04-14deps: remove ansistylesGar
chalk is already in use elsewhere and does what we need
2022-04-14fix: mitigate doctor test race conditionGar
cacache appears to not write everything to the cache by the time doctor is checking permissions. This limits the permissions error to a single directory that we know exists by the time the checks run.
2022-04-14chore: fix adduser testsGar
They mock real registry calls now
2022-04-14feat(config): warn on deprecated configsLuke Karrys
2022-04-14fixup! fix: show more information during publish dry-runLuke Karrys
2022-04-14fix: show more information during publish dry-runLuke Karrys
Fixes #4317
2022-04-12chore: fix npm access tests (#4730)Gar
Tests the actual network calls now
2022-04-07deps: minimatch@5.0.1Gar
2022-04-04chore: remove mocks from completion testsGar
2022-04-04chore: remove mocks from npm audit testsGar
2022-04-04chore: remove get-idendity mock from whoami testsGar
2022-04-04fix: remove dedupe --saveGar
* Removed dedupe --save documentation and attempted implementation. * Remove some unneeded otplease mocks from test `npm dedupe --save` didn't work in a easy to understand way. It would only update a top level dependency that was duplicated in the tree. Found this out rewriting the dedupe tests to be real. This is not very intuitive and it's best if folks use update or install for saving to package.json.
2022-04-04chore: remove unneeded otplease mocksGar
2022-03-30fix: work better with system manpages (#4610)David Walker
In certain edge cases, the glob could find files that manNumberRegex wouldn't match. A possible solution would be to try to bring the two closer, but since globs and regexes are different syntaxes, the two will never be exactly the same. It's always asking for bugs; better to just handle the issue directly. In addition, when npm is installed globally in a system directory, the glob can find other manpages with similar names. For instance "install.1", "init.1", etc. Preferring low-numbered sections isn't enough in these cases; it's also necessary to prefer the pages prefixed with "npm-".
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: bump knownBroken to <12.5.0Gar
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: really load all commands in tests, add description to birthdayGar
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-24fix(unpublish): properly apply publishConfig (#4601)Gar
The tests for unpublish were mocked so heavily they weren't actually asserting anything. In rewriting them several bugs were found. - `write=true` was not being consistenly used when fetching packument data, it is now. - The decision on when to load the local package.json file was not working at all, that has been fixed. If the cwd contains a package.json whose name matches the package you are uninstalling, the local package.json will be read and its publishConfig applied to your request. - dead code inside the `npm unpublish` path was removed. There is no need to check if you are unpublishing the last version here, you're already unpublishing the entire project. - publishConfig is now being applied through the config flatten method, not a raw object assignment.
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-17fix: properly show `npm view ./directory` (#4576)Gar
2022-03-17fix: remove name from unpublished messageGar
It is no longer returned from the npm registry
2022-03-10fix(doctor): allow for missing local bin and node_modulesGar
2022-03-10fix(doctor): don't retry pingGar
2022-03-10chore: rewrite doctor testsGar
2022-03-10chore: mocknpm improvementsGar
make tests pass in prefixDir instead of testdir allow for cache and globalPrefix dirs
2022-03-02fix(ls): respect `--include-workspace-root` (#4481)Nathan Fritz
2022-03-02fix: ignore implict workspace for some commands (#4479)Nathan Fritz
Closes #4404 Special thanks to @mshima for submitting a similar PR #4439
2022-03-02fix: publish of tarballs includes README in packument (#4480)Nathan Fritz
2022-02-24chore(cli): remove log option from being passed anywhereLuke Karrys
2022-02-08fix(log): pass in logger to more external modulesGar
We missed two commands in the last PR. This should complete the task
2022-02-03fix(outdated): parse aliased modulesRuy Adorno
Fixes `npm outdated` to properly parse and display info on aliased packages. Fixes: https://github.com/npm/cli/issues/2800
2022-02-03fix(ci): should not use package-lock configRuy Adorno
`npm ci` should never be affected by the `package-lock` config. Fixes: https://github.com/npm/cli/issues/4185