Age | Commit message (Collapse) | Author |
|
PR-URL: https://github.com/npm/cli/pull/2743
Credit: @isaacs
Close: #2743
Reviewed-by: @nlf
|
|
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
|
|
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
|
|
contructor -> constructor
PR-URL: https://github.com/npm/cli/pull/2729
Credit: @eltociear
Close: #2729
Reviewed-by: @wraithgar
|
|
Less mocking, more intentional testing of things
PR-URL: https://github.com/npm/cli/pull/2717
Credit: @wraithgar
Close: #2717
Reviewed-by: @nlf
|
|
PR-URL: https://github.com/npm/cli/pull/2716
Credit: @nlf
Close: #2716
Reviewed-by: @ljharb, @wraithgar
|
|
PR-URL: https://github.com/npm/cli/pull/2718
Credit: @nlf
Close: #2718
Reviewed-by: @wraithgar
|
|
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
|
|
This decouples our tests from depending on the node version being right, and
allows us to run in all of the environments we need to during CI.
PR-URL: https://github.com/npm/cli/pull/2681
Credit: @ljharb
Close: #2681
Reviewed-by: @wraithgar
|
|
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
|
|
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
|
|
- 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
|
|
|
|
|
|
|
|
Fix: https://github.com/npm/arborist/issues/207
PR-URL: https://github.com/npm/cli/pull/2573
Credit: @isaacs
Close: #2573
Reviewed-by: @nlf
|
|
- 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
|
|
PR-URL: https://github.com/npm/cli/pull/2445
Credit: @dr-js
Close: #2445
Reviewed-by: @ruyadorno
|
|
|
|
Adds a optionalDependencies to fixtures in order to cover missing LOC
|
|
|
|
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
|
|
|
|
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
|
|
fixes #2425
PR-URL: https://github.com/npm/cli/pull/2448
Credit: @nlf
Close: #2448
Reviewed-by: @isaacs, @wraithgar, @darcyclarke
|
|
PR-URL: https://github.com/npm/cli/pull/2422
Credit: @buyan302
Close: #2422
Reviewed-by: @isaacs
|
|
|
|
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
|
|
PR-URL: https://github.com/npm/cli/pull/2382
Credit: @nlf
Close: #2382
Reviewed-by: @isaacs
|
|
PR-URL: https://github.com/npm/cli/pull/2381
Credit: @XhmikosR
Close: #2381
Reviewed-by: @isaacs
|
|
- 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
|
|
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.
|
|
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
|
|
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
|
|
PR-URL: https://github.com/npm/cli/pull/2360
Credit: @isaacs
Close: #2360
Reviewed-by: @nlf
|
|
PR-URL: https://github.com/npm/cli/pull/2358
Credit: @nlf
Close: #2358
Reviewed-by: @ruyadorno
Reviewed-by: @mylesborins
|
|
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
|
|
PR-URL: https://github.com/npm/cli/pull/2354
Credit: @nlf
Close: #2354
Reviewed-by: @ruyadorno
|
|
PR-URL: https://github.com/npm/cli/pull/2353
Credit: @nlf
Close: #2353
Reviewed-by: @ruyadorno
|
|
PR-URL: https://github.com/npm/cli/pull/2349
Credit: @nlf
Close: #2349
Reviewed-by: @ruyadorno
|
|
PR-URL: https://github.com/npm/cli/pull/2348
Credit: @nlf
Close: #2348
Reviewed-by: @ruyadorno
|
|
PR-URL: https://github.com/npm/cli/pull/2347
Credit: @nlf
Close: #2347
Reviewed-by: @ruyadorno
|
|
|
|
|
|
|
|
PR-URL: https://github.com/npm/cli/pull/2342
Credit: @nlf
Close: #2342
Reviewed-by: @ruyadorno
|
|
We have a linter.
yolo
|
|
Fix: #2021
PR-URL: https://github.com/npm/cli/pull/2331
Credit: @isaacs
Close: #2331
Reviewed-by: @ruyadorno @darcyclarke
|
|
PR-URL: https://github.com/npm/cli/pull/2323
Credit: @nlf
Close: #2323
Reviewed-by: @isaacs
|
|
`npm ci` should run all the same preinstall/install/postinstall/prepare
scripts for the root project just like `npm install`.
Fixes: #1905
PR-URL: https://github.com/npm/cli/pull/2316
Credit: @isaacs
Close: #2316
Reviewed-by: @ruyadorno
|