Skip to content

Commit

Permalink
feat: support publish --provenance (#6436)
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Apr 24, 2023
1 parent edb3072 commit ad8e3b6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .changeset/modern-planes-cough.md
@@ -0,0 +1,6 @@
---
"@pnpm/plugin-commands-publishing": minor
"pnpm": minor
---

`pnpm publish` supports the `--provenance` CLI option [#6435](https://github.com/pnpm/pnpm/issues/6435).
17 changes: 7 additions & 10 deletions packages/mount-modules/test/__fixtures__/simple/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions releasing/plugin-commands-publishing/src/publish.ts
Expand Up @@ -22,6 +22,7 @@ export function rcOptionsTypes () {
'access',
'git-checks',
'ignore-scripts',
'provenance',
'npm-path',
'otp',
'publish-branch',
Expand Down
13 changes: 13 additions & 0 deletions releasing/plugin-commands-publishing/test/publish.ts
Expand Up @@ -726,3 +726,16 @@ test('publish: exit with non-zero code when publish tgz', async () => {
])
expect(result?.exitCode).not.toBe(0)
})

test('publish: provenance', async () => {
prepare({
name: 'test-publish-package.json',
version: '0.0.2',
})

await publish.handler({
...DEFAULT_OPTS,
argv: { original: ['publish', '--provenance'] },
dir: process.cwd(),
}, [])
})

0 comments on commit ad8e3b6

Please sign in to comment.