Skip to content

Commit d79f2ff

Browse files
committed
fix(plugin-npm): fix the value check for publishConfig.provenance
Signed-off-by: Sora Morimoto <sora@morimoto.io>
1 parent 666aa3a commit d79f2ff

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.yarn/versions/2369a91f.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
releases:
2+
"@yarnpkg/plugin-npm-cli": patch

packages/plugin-npm-cli/sources/commands/npm/publish.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default class NpmPublishCommand extends BaseCommand {
108108
const gitHead = await npmPublishUtils.getGitHead(workspace.cwd);
109109

110110
let provenance = false;
111-
if (workspace.manifest.publishConfig && `provenance` in workspace.manifest.publishConfig) {
111+
if (workspace.manifest.publishConfig?.provenance) {
112112
provenance = Boolean(workspace.manifest.publishConfig.provenance);
113113
if (provenance) {
114114
report.reportInfo(null, `Generating provenance statement because \`publishConfig.provenance\` field is set.`);

0 commit comments

Comments
 (0)