Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: parallel tests #199

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ npm-debug.log
.jshintrc
.eslintrc
.nyc_output
/test/npm_cache*
/node_modules/.cache
40 changes: 39 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
## v6.9.0 (2018-02-20):
## v6.9.1 (2019-03-20):

### BUGFIXES

* [`6b1a9da0e`](https://github.com/npm/cli/commit/6b1a9da0e0f5c295cdaf4dea4b73bd221d778611)
[#165](https://github.com/npm/cli/pull/165)
Update `knownBroken` version.
([@ljharb](https://github.com/ljharb))
* [`d07547154`](https://github.com/npm/cli/commit/d07547154eb8a88aa4fde8a37e128e1e3272adc1)
[npm.community#5929](https://npm.community/t/npm-outdated-throw-an-error-cannot-read-property-length-of-undefined/5929)
Fix `outdated` rendering for global dependencies.
([@zkat](https://github.com/zkat))
* [`e4a1f1745`](https://github.com/npm/cli/commit/e4a1f174514a57580fd5e0fa33eee0f42bba77fc)
[npm.community#6259](https://npm.community/t/npm-token-create-doesnt-work-in-6-6-0-6-9-0/6259)
Fix OTP for token create and remove.
([@zkat](https://github.com/zkat))

### DEPENDENCIES

* [`a163a9c35`](https://github.com/npm/cli/commit/a163a9c35f6f341de343562368056258bba5d7dc)
`sha@3.0.0`
([@aeschright](https://github.com/aeschright))
* [`47b08b3b9`](https://github.com/npm/cli/commit/47b08b3b9860438b416efb438e975a628ec2eed5)
`query-string@6.4.0`
([@aeschright](https://github.com/aeschright))
* [`d6a956cff`](https://github.com/npm/cli/commit/d6a956cff6357e6de431848e578c391768685a64)
`readable-stream@3.2.0`
([@aeschright](https://github.com/aeschright))
* [`10b8bed2b`](https://github.com/npm/cli/commit/10b8bed2bb0afac5451164e87f25924cc1ac6f2e)
`tacks@1.3.0`
([@aeschright](https://github.com/aeschright))
* [`e7483704d`](https://github.com/npm/cli/commit/e7483704dda1acffc8c6b8c165c14c8a7512f3c8)
`tap@12.6.0`
([@aeschright](https://github.com/aeschright))
* [`3242fe698`](https://github.com/npm/cli/commit/3242fe698ead46a9cda94e1a4d489cd84a85d7e3)
`tar-stream@2.0.1`
([@aeschright](https://github.com/aeschright))

## v6.9.0 (2019-02-20):

### FEATURES

Expand Down
2 changes: 1 addition & 1 deletion lib/outdated.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function makePretty (p, opts) {
has || 'MISSING',
want,
latest,
deppath
deppath || 'global'
]
if (long) {
columns[5] = type
Expand Down
23 changes: 7 additions & 16 deletions lib/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const npm = require('./npm.js')
const figgyPudding = require('figgy-pudding')
const npmConfig = require('./config/figgy-config.js')
const output = require('./utils/output.js')
const otplease = require('./utils/otplease.js')
const Table = require('cli-table3')
const Bluebird = require('bluebird')
const isCidrV4 = require('is-cidr').v4
Expand Down Expand Up @@ -80,6 +81,7 @@ function generateTokenIds (tokens, minLength) {
}

const TokenConfig = figgyPudding({
auth: {},
registry: {},
otp: {},
cidr: {},
Expand Down Expand Up @@ -185,13 +187,8 @@ function rm (args) {
}
})
return Bluebird.map(toRemove, (key) => {
return profile.removeToken(key, conf).catch((ex) => {
if (ex.code !== 'EOTP') throw ex
log.info('token', 'failed because revoking this token requires OTP')
return readUserInfo.otp().then((otp) => {
conf.auth.otp = otp
return profile.removeToken(key, conf)
})
return otplease(conf, conf => {
return profile.removeToken(key, conf)
})
})
})).then(() => {
Expand All @@ -213,15 +210,9 @@ function create (args) {
const validCIDR = validateCIDRList(cidr)
return readUserInfo.password().then((password) => {
log.info('token', 'creating')
return profile.createToken(password, readonly, validCIDR, conf).catch((ex) => {
if (ex.code !== 'EOTP') throw ex
log.info('token', 'failed because it requires OTP')
return readUserInfo.otp().then((otp) => {
conf.auth.otp = otp
log.info('token', 'creating with OTP')
return pulseTillDone.withPromise(profile.createToken(password, readonly, validCIDR, conf))
})
})
return pulseTillDone.withPromise(otplease(conf, conf => {
return profile.createToken(password, readonly, validCIDR, conf)
}))
}).then((result) => {
delete result.key
delete result.updated
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/unsupported.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var supportedNode = [
{ver: '11', min: '11.0.0'},
{ver: '12', min: '12.0.0'}
]
var knownBroken = '<4.7.0'
var knownBroken = '<6.0.0'

var checkVersion = exports.checkVersion = function (version) {
var versionNoPrerelease = version.replace(/-.*$/, '')
Expand Down
Binary file added node_modules/.cache/esm/.data.blob
Binary file not shown.
1 change: 1 addition & 0 deletions node_modules/.cache/esm/.data.json

Large diffs are not rendered by default.

Loading