Skip to content

Commit e798120

Browse files
authored
fix(publish): Fix error when special target 'all' is used (#142)
Fixes #141, follow up to #137 where there was a forgotten negation causing this issue. Tests will follow in a separate PR.
1 parent 2fb243b commit e798120

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.13.4
4+
5+
- fix(publish): Fix error when special target 'all' is used (#142)
6+
37
## 0.13.3
48

59
- fix(publish): Only allow valid target ids for -t (#137)

src/commands/publish.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,14 +470,14 @@ export async function publishMain(argv: PublishOptions): Promise<any> {
470470

471471
let targetConfigList = config.targets || [];
472472

473-
if (targetList.has(SpecialTarget.All)) {
473+
if (!targetList.has(SpecialTarget.All)) {
474474
targetConfigList = targetConfigList.filter(targetConf =>
475475
targetList.has(getTargetId(targetConf))
476476
);
477477
}
478478

479479
if (!targetList.has(SpecialTarget.None)) {
480-
if (!targetConfigList.length) {
480+
if (targetConfigList.length === 0) {
481481
logger.warn('No valid targets detected! Exiting.');
482482
return undefined;
483483
}

0 commit comments

Comments
 (0)