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
AgeCommit message (Collapse)Author
2021-04-29ls: do not warn on missing optional depsisaacs
There was code checking node[_type], but we didn't include that field on the object that is actually checked when we are looking for problems. Fix: #3137 PR-URL: https://github.com/npm/cli/pull/3140 Credit: @isaacs Close: #3140 Reviewed-by: @ruyadorno
2021-04-24Remove --always-auth config definitionisaacs
As of the recent updates to npm-registry-fetch and @npmcli/config, this config field is no longer used anywhere. Prior to those changes, it was used, but not in the manner documented.
2021-04-22feat: add init workspacesRuy Adorno
Add workspaces support to `npm init` - Fixes `npm exec` respecting `script-shell` option value - Refactored `lib/exec.js` into `libnpmexec` - Updates init-package-json@2.0.3 - Added ability to create a new workspace using the -w config PR-URL: https://github.com/npm/cli/pull/3095 Credit: @ruyadorno Close: #3095 Reviewed-by: @wraithgar
2021-04-22fix(ls): do not exit with error when all problems are extraneous depsnlf
PR-URL: https://github.com/npm/cli/pull/3086 Credit: @nlf Close: #3086 Reviewed-by: @wraithgar, @ruyadorno
2021-04-15feat(version): add workspace supportGar
PR-URL: https://github.com/npm/cli/pull/3055 Credit: @wraithgar Close: #3055 Reviewed-by: @darcyclarke
2021-04-14tap@15.0.2Gar
PR-URL: https://github.com/npm/cli/pull/3069 Credit: @isaacs Close: #3069 Reviewed-by: @ruyadorno, @nlf
2021-04-08feat(pack): add workspace supportGar
PR-URL: https://github.com/npm/cli/pull/3033 Credit: @wraithgar Close: #3033 Reviewed-by: @darcyclarke
2021-04-08feat(workspaces): implement workspace support for dist-tagnlf
PR-URL: https://github.com/npm/cli/pull/3032 Credit: @nlf Close: #3032 Reviewed-by: @wraithgar
2021-04-01Support reporting on ERESOLVE errors when current is missingisaacs
While it is somewhat helpful to get reports on this, since it indicates an underlying problem in Arborist, it's also very disruptive and unhelpful for users. As of 2.3.0, Arborist gives us the currentEdge if available, so we _can_ report on that at least. If there is no node _or_ edge, then we just don't say what the current state is, which isn't useful, but at least is less annoying than a 'property of null' exception. PR-URL: https://github.com/npm/cli/pull/3015 Credit: @isaacs Close: #3015 Reviewed-by: @wraithgar
2021-04-01fix(docs): add workspaces configurationGar
Adds workspaces configuration to `docs`, `repo`, and `set-script`. PR-URL: https://github.com/npm/cli/pull/3013 Credit: @wraithgar Close: #3013 Reviewed-by: @darcyclarke
2021-04-01usage: specify the key each time for multiplesisaacs
If a user runs 'npm install -w foo bar baz', that won't set 'bar' and 'baz' as workspace names. The correct incantation is 'npm install -w foo -w bar -w baz'. PR-URL: https://github.com/npm/cli/pull/3016 Credit: @isaacs Close: #3016 Reviewed-by: @wraithgar
2021-04-01Add a 'envExport' flag for config definitionsisaacs/add-env-export-false-flag-for-config-defsisaacs
It defaults to true, but setting it to any falsey value will tell `@npmcli/config` not to export it into the environment, and will also put a remark in the documentation that it is not exported. PR-URL: https://github.com/npm/cli/pull/3014 Credit: @isaacs Close: #3014 Reviewed-by: @nlf
2021-04-01fix(tests): update snapshotsGar
This got left out of the npm view workspaces PR
2021-04-01feat(view): add workspace supportGar
PR-URL: https://github.com/npm/cli/pull/3001 Credit: @wraithgar Close: #3001 Reviewed-by: @nlf
2021-04-01feat(set-script): implement workspacesnlf
Implements workspaces for set-script, also refactors tests to mock as little as possible. PR-URL: https://github.com/npm/cli/pull/2998 Credit: @nlf Close: #2998 Reviewed-by: @wraithgar
2021-03-31feat(workspaces): add repo and docsGar
This adds workspaces support to `npm repo` and `npm docs`. It also updates the usage output to support the -w and -ws parameters output, and cleans up some unneccessary functions in `run-script` and `exec`. PR-URL: https://github.com/npm/cli/pull/2972 Credit: @wraithgar Close: #2972 Reviewed-by: @nlf
2021-03-29chore: fix smoke-tests snapshotsRuy Adorno
2021-03-29change 'maxsockets' default value back to 15Andreas
The default value for 'maxsockets' was changed during the refactoring in #2878 from 50 to 'Inifinity', this PR changes it to the more accurate value of 15, which was the default used in: https://github.com/npm/make-fetch-happen/blob/785af652ec0c8f108a43004903afd2183af93904/agent.js#L15 Fixes #2978 PR-URL: https://github.com/npm/cli/pull/2979 Credit: @wallrat Close: #2979 Reviewed-by: @ruyadorno Co-authored-by: Gar <gar+gh@danger.computer>
2021-03-29fix: empty newline printed to stderrRuy Adorno
Starting in v7.7.0 running `npm` (no args) is printing an empty newline to stderr. This fixes that by correctly exiting via errorHandler and avoiding hitting the cb() never called error and adds a test to make sure we avoid that regression moving forward. Fixes: https://github.com/nodejs/node/pull/37678#issuecomment-808734374 Co-authored-by: Gar <gar+gh@danger.computer>
2021-03-26add smoke testsRuy Adorno
Lightweight smoke test suite that runs common commands so that we can also have a holistic check during CI. PR-URL: https://github.com/npm/cli/pull/2959 Credit: @ruyadorno Close: #2959 Reviewed-by: @nlf
2021-03-25fix(config): accept explicit production=falseGar
This allows for overriding the implicit omit value based on if NODE_ENV=production PR-URL: https://github.com/npm/cli/pull/2951 Credit: @wraithgar Close: #2951 Reviewed-by: @ruyadorno
2021-03-24fix(audit-level): add `info` audit levelGar
This is a valid level but wasn't configured to be allowed. Also added this param to the usage output for `npm audit` PR-URL: https://github.com/npm/cli/pull/2923 Credit: @wraithgar Close: #2923 Reviewed-by: @ruyadorno
2021-03-24config: Restore --dev flag, unify --omit flattenersisaacs
This consolidates all the various --include and --omit configuration flatteners into a single function, since they have to be interdependent in order to function properly. Fix: #2936 PR-URL: https://github.com/npm/cli/pull/2942 Credit: @isaacs Close: #2942 Reviewed-by: @wraithgar
2021-03-23pacote@11.3.1Ruy Adorno
2021-03-23fix: yes configRuy Adorno
`npm exec <pkg>` was failing for packages not available in the local or global scope due to the default value of the `yes` config having been changed to `false` during the latest config refactor. That caused `npm exec` to throw with a `canceled` error message since the current implementation expects the default value to be falsy but not `false`. This change reinstates the previous default config value for `yes` and changes the implementation to throw with a proper error object in order to get a stack trace when running with `--loglevel=verbose`.
2021-03-22fix(usage): tie usage to configGar
This starts us down the path of tying the params our commands accept to their config items. For now it is optional, and not every current config item would cleanly render if we added them today. The ones that are added here DO render nicely, and we can iterate from here. We can also at a later date do the same kind of appraoch with our positional args. PR-URL: https://github.com/npm/cli/pull/2908 Credit: @wraithgar Close: #2908 Reviewed-by: @nlf, @isaacs
2021-03-19feat: add run-script workspacesRuy Adorno
- Add workspaces-related configs: - workspace: list of workspaces names/dir to filter for - workspaces: boolean value to enable/disable workspaces awareness - adds the proposed note in the docs of each of the commands that are not affected by these configs. - Add workspaces support to `npm run-script` - add ability to serially run lifecycle scripts in workspaces - add ability to list scripts for all workspaces - add colors to `npm run` (no args) output Relates to: https://github.com/npm/rfcs/pull/117 Fixes: https://github.com/npm/statusboard/issues/276 Fixes: https://github.com/npm/statusboard/issues/283 Fixes: https://github.com/npm/statusboard/issues/284 Fixes: https://github.com/npm/statusboard/issues/285 Fixes: https://github.com/npm/statusboard/issues/286 PR-URL: https://github.com/npm/cli/pull/2864 Credit: @ruyadorno Close: #2864 Reviewed-by: @wraithgar
2021-03-18feat(help): refactor npm help/help-searchGar
Lots of dead code removed thanks to streamlining of logic. `npm help` `npm <command>` and `npm help-search` are all now separated concerns, handling their own use cases. `help` calls `help-search` as a last resort, but `npm <command>` no longer tries to wind its way through to `help-search` just to get the basic npm usage displayed. The `did you mean` output has been expanded. It now always suggests top level commands, scripts, and bins, and suggests them in the way they should be called. PR-URL: https://github.com/npm/cli/pull/2859 Credit: @wraithgar Close: #2859 Reviewed-by: @ruyadorno
2021-03-18Remove old config definitions and flattening logicisaacs/config-refactorisaacs
PR-URL: https://github.com/npm/cli/pull/2878 Credit: @isaacs Close: #2878 Reviewed-by: @isaacs
2021-03-18New consolidated config definitionsisaacs
This replaces the multiple separate sets of objects and documentation, some of which had defaults and/or types, some of which didn't, and cleans up a lot of configs that are no longer used. Deprecated configs are now marked, and the approach used to create these config definitions ensures that it is impossible to create a new config option that lacks the appropriate data for it.
2021-03-12usage: Correct "npm COMMAND help" to "npm help COMMAND"Edward Grech
PR-URL: https://github.com/npm/cli/pull/2855 Credit: @dwardu Close: #2855 Reviewed-by: @ruyadorno, @darcyclarke
2021-03-09fix(usage): clean up usage declarationsGar
Small refactor of commands to allow usage to be more programmatically generated, leading us in the direction of more tighly coupling each command to the params it accepts. PR-URL: https://github.com/npm/cli/pull/2821 Credit: @wraithgar Close: #2821 Reviewed-by: @isaacs
2021-03-09fix(npm.output): make output go through npm.outputGar
All output that anything wants to make now goes through `npm.output()`. This is an incremental change getting us closer to where we want to be with testing. PR-URL: https://github.com/npm/cli/pull/2795 Credit: @wraithgar Close: #2795 Reviewed-by: @ruyadorno, @isaacs
2021-03-05feat/explain: show when an edge is a bundled edgekumavis
PR-URL: https://github.com/npm/cli/pull/2807 Credit: @kumavis Close: #2807 Reviewed-by: @ruyadorno
2021-03-05fix(npm) pass npm context everywhereGar
Instead of files randomly requiring the npm singleton, we pass it where it needs to go so that tests don't need to do so much require mocking everywhere PR-URL: https://github.com/npm/cli/pull/2772 Credit: @wraithgar Close: #2772 Reviewed-by: @ruyadorno
2021-03-04Remove unused arguments on various function callsNathan Shively-Sanders
I checked cli's code with Typescript using the tsconfig below. The compiler found a few arguments that are not used, so I removed them. In the case of `npm whoami`, it is clearer that it ignores its `args` and instead relies on `npm.flatOptions`. ```json { "compilerOptions": { "moduleResolution": "node", "module": "commonjs", "resolveJsonModule": true, "target": "es2019", "noImplicitAny": false, "noImplicitThis": true, "strict": true, "maxNodeModuleJsDepth": 0, "noEmit": true, "allowJs": true, "checkJs": true, "types": ["node"], "lib": ["esnext"] }, "include": ["lib"] } ``` PR-URL: https://github.com/npm/cli/pull/2766 Credit: @sandersn Close: #2766 Reviewed-by: @nlf, @ruyadorno, @Matausi29
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-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-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-01test: do not depend on npm.version in usage testisaacs
2021-02-01test: Add test for npm-usage.js, and fix 'npm --long' outputisaacs
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-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-07add foreground-scripts optionisaacs/foreground-scriptsisaacs
PR-URL: https://github.com/npm/cli/pull/2456 Credit: @isaacs Close: #2456 Reviewed-by: @ruyadorno
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-18remove the metrics sendernlf/remove-metricsnlf
PR-URL: https://github.com/npm/cli/pull/2382 Credit: @nlf Close: #2382 Reviewed-by: @isaacs
2020-12-18(docs,test): assorted typo fixesXhmikosR
PR-URL: https://github.com/npm/cli/pull/2381 Credit: @XhmikosR Close: #2381 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-11fix: lib/team.js tweaks and testsRuy Adorno
- Removes unnecessary colon when listing 0 users/teams - Removes unimplemented `npm team edit` placeholder - Adds `test/lib/team.js` tests - Fixes: https://github.com/npm/statusboard/issues/176 PR-URL: https://github.com/npm/cli/pull/2314 Credit: @ruyadorno Close: #2314 Reviewed-by: @isaacs