2023-09-19 21:26:15 +00:00
|
|
|
import { consola } from 'consola'
|
2022-11-16 14:56:11 +00:00
|
|
|
import { loadWorkspace } from './_utils'
|
|
|
|
|
|
|
|
async function main () {
|
|
|
|
const workspace = await loadWorkspace(process.cwd())
|
|
|
|
|
|
|
|
const newVersion = process.argv[2]
|
|
|
|
if (!newVersion) {
|
|
|
|
throw new Error('Please provide version!')
|
|
|
|
}
|
|
|
|
|
|
|
|
for (const pkg of workspace.packages.filter(p => !p.data.private)) {
|
|
|
|
workspace.setVersion(pkg.data.name, newVersion!)
|
|
|
|
}
|
|
|
|
|
|
|
|
await workspace.save()
|
|
|
|
}
|
|
|
|
|
|
|
|
main().catch((err) => {
|
2023-09-19 21:26:15 +00:00
|
|
|
consola.error(err)
|
2022-11-16 14:56:11 +00:00
|
|
|
process.exit(1)
|
|
|
|
})
|