Skip to content

Commit

Permalink
Merge branch 'master' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Oct 2, 2019
2 parents 4caf538 + 07247ca commit 4f932b4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/verify-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = async (pluginConfig, pkg, context) => {
if (normalizeUrl(registry) === normalizeUrl(DEFAULT_NPM_REGISTRY)) {
try {
await execa('npm', ['whoami', '--registry', registry], {cwd, env});
} catch (error) {
} catch (_) {
throw new AggregateError([getError('EINVALIDNPMTOKEN', {registry})]);
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"clear-module": "^4.0.0",
"codecov": "^3.0.0",
"delay": "^4.0.0",
"dockerode": "^2.5.3",
"dockerode": "^3.0.0",
"get-stream": "^5.0.0",
"got": "^9.0.0",
"nyc": "^14.0.0",
Expand All @@ -46,7 +46,7 @@
"sinon": "^7.1.1",
"stream-buffers": "^3.0.2",
"tempy": "^0.3.0",
"xo": "^0.24.0"
"xo": "^0.25.0"
},
"engines": {
"node": ">=8.15"
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/npm-registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function start() {
minTimeout: 1000,
factor: 2,
});
} catch (error) {
} catch (_) {
throw new Error(`Couldn't start npm-docker-couchdb after 2 min`);
}

Expand Down
10 changes: 5 additions & 5 deletions test/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ test.before(async () => {
await npmRegistry.start();
});

test.after.always(async () => {
// Stop the local NPM registry
await npmRegistry.stop();
});

test.beforeEach(t => {
// Clear npm cache to refresh the module state
clearModule('..');
Expand All @@ -36,11 +41,6 @@ test.beforeEach(t => {
t.context.logger = {log: t.context.log};
});

test.after.always(async () => {
// Stop the local NPM registry
await npmRegistry.stop();
});

test('Skip npm auth verification if "npmPublish" is false', async t => {
const cwd = tempy.directory();
const env = {NPM_TOKEN: 'wrong_token'};
Expand Down

0 comments on commit 4f932b4

Please sign in to comment.