Skip to content

Commit ecefcfe

Browse files
fix(core): Use access option for npm publish
1 parent bb1961d commit ecefcfe

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ const semanticRelease = (opts: PreOpts = {}) => {
7979
})
8080
.then(currentRelease => {
8181
return ctx.cli
82-
.exec(`npm publish --registry "${registry}"`)
82+
.exec(
83+
`npm publish --registry "${registry}" --access ${opts.access ||
84+
'restricted'}`
85+
)
8386
.then(() => currentRelease)
8487
})
8588
}

src/types.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export type CLI = {
4444
}
4545

4646
export type PreOpts = {
47+
access?: 'restricted' | 'public',
4748
registry?: string,
4849
versionHook?: string,
4950
cli?: CLI

0 commit comments

Comments
 (0)