Skip to content

Commit

Permalink
chore: get all options
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Feb 15, 2024
1 parent d739bce commit 96705b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/release-it-pnpm/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ class ReleaseItPnpmPlugin extends Plugin {
return 'npm'
}

getInitialOptions(options) {
return options
}

async bump(newVersion) {
const cwd = process.cwd()
const pnpmWorkspaces = path.join(cwd, 'pnpm-workspace.yaml')
Expand Down Expand Up @@ -78,7 +82,7 @@ class ReleaseItPnpmPlugin extends Plugin {
pkg.version = newVersion
await this.step({
task: async () => {
if (this.options['dry-run']) {
if (!this.options['dry-run']) {
fs.writeFileSync(absPath, JSON.stringify(pkg, null, 2))
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/release-it-pnpm/src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Plugin from './index.js'
const namespace = 'release-it-pnpm'

describe('release-it-pnpm', () => {
const options = { [namespace]: {} }
const options = { [namespace]: {}, 'dry-run': true }
const plugin = factory(Plugin, {
namespace,
options,
Expand Down

0 comments on commit 96705b2

Please sign in to comment.