Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit45890fd

Browse files
committed
fix: returnfalse if the npm publish is skipped
1 parentbd16cfb commit45890fd

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

‎lib/publish.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ module.exports = async ({npmPublish, pkgRoot}, pkg, context) => {
3232
logger.log(`Published${pkg.name}@${pkg.version} on${registry}`);
3333
returngetReleaseInfo(pkg,context,registry);
3434
}
35+
3536
logger.log(
3637
'Skip publishing to npm registry as %s is %s',
3738
...(npmPublish===false ?['npmPublish',false] :["package.json's private property",true])
3839
);
40+
41+
returnfalse;
3942
};

‎test/integration.test.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ test('Create the package and skip publish ("npmPublish" is false)', async t => {
329329
}
330330
);
331331

332-
t.falsy(result);
332+
t.false(result);
333333
t.is((awaitreadJson(path.resolve(cwd,'package.json'))).version,'1.0.0');
334334
t.true(awaitpathExists(path.resolve(cwd,`tarball/${pkg.name}-1.0.0.tgz`)));
335335
awaitt.throws(execa('npm',['view',pkg.name,'version'],{cwd,env:testEnv}));
@@ -354,7 +354,7 @@ test('Create the package and skip publish ("package.private" is true)', async t
354354
}
355355
);
356356

357-
t.falsy(result);
357+
t.false(result);
358358
t.is((awaitreadJson(path.resolve(cwd,'package.json'))).version,'1.0.0');
359359
t.true(awaitpathExists(path.resolve(cwd,`tarball/${pkg.name}-1.0.0.tgz`)));
360360
awaitt.throws(execa('npm',['view',pkg.name,'version'],{cwd,env:testEnv}));
@@ -379,7 +379,7 @@ test('Create the package and skip publish from a sub-directory ("npmPublish" is
379379
}
380380
);
381381

382-
t.falsy(result);
382+
t.false(result);
383383
t.is((awaitreadJson(path.resolve(cwd,'dist/package.json'))).version,'1.0.0');
384384
t.true(awaitpathExists(path.resolve(cwd,`tarball/${pkg.name}-1.0.0.tgz`)));
385385
awaitt.throws(execa('npm',['view',pkg.name,'version'],{cwd,env:testEnv}));
@@ -409,7 +409,7 @@ test('Create the package and skip publish from a sub-directory ("package.private
409409
}
410410
);
411411

412-
t.falsy(result);
412+
t.false(result);
413413
t.is((awaitreadJson(path.resolve(cwd,'dist/package.json'))).version,'1.0.0');
414414
t.true(awaitpathExists(path.resolve(cwd,`tarball/${pkg.name}-1.0.0.tgz`)));
415415
awaitt.throws(execa('npm',['view',pkg.name,'version'],{cwd,env:testEnv}));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp