Skip to content

Commit

Permalink
update version scripts to avoid an issue with workspaces and linked d…
Browse files Browse the repository at this point in the history
…ependencies (npm/cli#5687, npm/cli#4787)
  • Loading branch information
trusktr committed Oct 24, 2023
1 parent 132e7b4 commit 6572d17
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions bin/commands.js
Expand Up @@ -275,87 +275,87 @@ exports.releasePatch = releasePatch
async function releasePatch() {
if (opts.verbose) console.log(`===> Running the "releasePatch" command.\n`)
await releasePre()
await exec('npm version patch -m v%s')
await exec('npm version --no-workspaces patch -m v%s')
if (opts.verbose) console.log(`===> Done running the "releasePatch" command.\n`)
}

exports.releaseMinor = releaseMinor
async function releaseMinor() {
if (opts.verbose) console.log(`===> Running the "releaseMinor" command.\n`)
await releasePre()
await exec('npm version minor -m v%s')
await exec('npm version --no-workspaces minor -m v%s')
if (opts.verbose) console.log(`===> Done running the "releaseMinor" command.\n`)
}

exports.releaseMajor = releaseMajor
async function releaseMajor() {
if (opts.verbose) console.log(`===> Running the "releaseMajor" command.\n`)
await releasePre()
await exec('npm version major -m v%s')
await exec('npm version --no-workspaces major -m v%s')
if (opts.verbose) console.log(`===> Done running the "releaseMajor" command.\n`)
}

exports.releaseAlphaMajor = releaseAlphaMajor
async function releaseAlphaMajor() {
if (opts.verbose) console.log(`===> Running the "releaseAlphaMajor" command.\n`)
await releasePre()
await exec('npm version premajor --preid alpha -m v%s')
await exec('npm version --no-workspaces premajor --preid alpha -m v%s')
if (opts.verbose) console.log(`===> Done running the "releaseAlphaMajor" command.\n`)
}

exports.releaseAlphaMinor = releaseAlphaMinor
async function releaseAlphaMinor() {
if (opts.verbose) console.log(`===> Running the "releaseAlphaMinor" command.\n`)
await releasePre()
await exec('npm version preminor --preid alpha -m v%s')
await exec('npm version --no-workspaces preminor --preid alpha -m v%s')
if (opts.verbose) console.log(`===> Done running the "releaseAlphaMinor" command.\n`)
}

exports.releaseAlphaPatch = releaseAlphaPatch
async function releaseAlphaPatch() {
if (opts.verbose) console.log(`===> Running the "releaseAlphaPatch" command.\n`)
await releasePre()
await exec('npm version prepatch --preid alpha -m v%s')
await exec('npm version --no-workspaces prepatch --preid alpha -m v%s')
if (opts.verbose) console.log(`===> Done running the "releaseAlphaPatch" command.\n`)
}

exports.releaseBetaMajor = releaseBetaMajor
async function releaseBetaMajor() {
if (opts.verbose) console.log(`===> Running the "releaseBetaMajor" command.\n`)
await releasePre()
await exec('npm version premajor --preid beta -m v%s')
await exec('npm version --no-workspaces premajor --preid beta -m v%s')
if (opts.verbose) console.log(`===> Done running the "releaseBetaMajor" command.\n`)
}

exports.releaseBetaMinor = releaseBetaMinor
async function releaseBetaMinor() {
if (opts.verbose) console.log(`===> Running the "releaseBetaMinor" command.\n`)
await releasePre()
await exec('npm version preminor --preid beta -m v%s')
await exec('npm version --no-workspaces preminor --preid beta -m v%s')
if (opts.verbose) console.log(`===> Done running the "releaseBetaMinor" command.\n`)
}

exports.releaseBetaPatch = releaseBetaPatch
async function releaseBetaPatch() {
if (opts.verbose) console.log(`===> Running the "releaseBetaPatch" command.\n`)
await releasePre()
await exec('npm version prepatch --preid beta -m v%s')
await exec('npm version --no-workspaces prepatch --preid beta -m v%s')
if (opts.verbose) console.log(`===> Done running the "releaseBetaPatch" command.\n`)
}

exports.releaseAlpha = releaseAlpha
async function releaseAlpha() {
if (opts.verbose) console.log(`===> Running the "releaseAlpha" command.\n`)
await releasePre()
await exec('npm version prerelease --preid alpha -m v%s')
await exec('npm version --no-workspaces prerelease --preid alpha -m v%s')
if (opts.verbose) console.log(`===> Done running the "releaseAlpha" command.\n`)
}

exports.releaseBeta = releaseBeta
async function releaseBeta() {
if (opts.verbose) console.log(`===> Running the "releaseBeta" command.\n`)
await releasePre()
await exec('npm version prerelease --preid beta -m v%s')
await exec('npm version --no-workspaces prerelease --preid beta -m v%s')
if (opts.verbose) console.log(`===> Done running the "releaseBeta" command.\n`)
}

Expand Down

0 comments on commit 6572d17

Please sign in to comment.