Skip to content

Commit 1e21691

Browse files
greenkeeper[bot]pvdlg
authored andcommitted
fix(package): update read-pkg to version 4.0.0
1 parent ba7663e commit 1e21691

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/get-pkg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = async pkgRoot => {
77
let pkg;
88

99
try {
10-
pkg = await readPkg(pkgRoot);
10+
pkg = await readPkg({cwd: pkgRoot ? String(pkgRoot) : process.cwd()});
1111

1212
if (!pkg.name) {
1313
errors.push(getError('ENOPKGNAME'));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"nerf-dart": "^1.0.0",
2727
"normalize-url": "^3.0.0",
2828
"parse-json": "^4.0.0",
29-
"read-pkg": "^3.0.0",
29+
"read-pkg": "^4.0.0",
3030
"registry-auth-token": "^3.3.1"
3131
},
3232
"devDependencies": {

test/integration.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ test.serial('Throw SemanticReleaseError Array if config option are not valid in
155155
t.is(errors[2].name, 'SemanticReleaseError');
156156
t.is(errors[2].code, 'EINVALIDPKGROOT');
157157
t.is(errors[3].name, 'SemanticReleaseError');
158-
t.is(errors[3].code, 'ENOPKGNAME');
158+
t.is(errors[3].code, 'ENOPKG');
159159
});
160160

161161
test.serial('Publish the package', async t => {
@@ -266,7 +266,7 @@ test.serial('Throw SemanticReleaseError Array if config option are not valid in
266266
t.is(errors[2].name, 'SemanticReleaseError');
267267
t.is(errors[2].code, 'EINVALIDPKGROOT');
268268
t.is(errors[3].name, 'SemanticReleaseError');
269-
t.is(errors[3].code, 'ENOPKGNAME');
269+
t.is(errors[3].code, 'ENOPKG');
270270
});
271271

272272
test.serial('Prepare the package', async t => {
@@ -331,7 +331,7 @@ test.serial('Throw SemanticReleaseError Array if config option are not valid in
331331
t.is(errors[2].name, 'SemanticReleaseError');
332332
t.is(errors[2].code, 'EINVALIDPKGROOT');
333333
t.is(errors[3].name, 'SemanticReleaseError');
334-
t.is(errors[3].code, 'ENOPKGNAME');
334+
t.is(errors[3].code, 'ENOPKG');
335335
});
336336

337337
test.serial('Verify token and set up auth only on the fist call, then prepare on prepare call only', async t => {

0 commit comments

Comments
 (0)