Skip to content

Commit

Permalink
chore: try dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Feb 15, 2024
1 parent 1e8d8d6 commit 09f2dec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/release-it-pnpm/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ class ReleaseItPnpmPlugin extends Plugin {
pkg.version = newVersion
await this.step({
task: async () => {
fs.writeFileSync(absPath, JSON.stringify(pkg, null, 2))
if (this.options['dry-run']) {
fs.writeFileSync(absPath, JSON.stringify(pkg, null, 2))
}
},
label: 'Bumping version',
prompt: 'bump',
Expand Down
3 changes: 3 additions & 0 deletions packages/release-it-pnpm/src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ describe('release-it-pnpm', () => {
warn: args => console.warn(args),
error: args => console.error(args),
},
shell: {
exec: () => {},
},
},
})
test('should not throw', () => {
Expand Down

0 comments on commit 09f2dec

Please sign in to comment.