Skip to content

Commit 2f470d7

Browse files
committed
build(ui-scripts): add prerelease as security release version type: pnpm run pump --releaseType="prerelease"
1 parent d5c1198 commit 2f470d7

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

packages/ui-scripts/lib/utils/addNewExportsEntiresToPackageJSONs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ import pkgUtils from './pkg-utils/index.js'
3535
* @param {string} version - Semver string (e.g. "11.9.0")
3636
*/
3737
export const addNewExportsEntiresToPackageJSONs = async (version) => {
38+
if (version.includes('SECURITY')) {
39+
return
40+
}
3841
const formattedVersion = `v${version.split('.').slice(0, 2).join('_')}`
3942
const packages = await pkgUtils.getDetailedPackageList()
4043

4144
const res = packages.map(({ data, path }) => {
4245
//if no exports field, do nothing
43-
if (!data.exports) {
46+
if (!data?.exports) {
4447
return
4548
}
4649
//if the currently releasing version is already exists, do nothing

packages/ui-scripts/lib/utils/npm.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export async function bumpPackages(packageName, requestedVersion) {
5959
let bumpVersion = requestedVersion
6060

6161
if (bumpVersion) {
62-
if (!['major', 'minor', 'patch'].includes(bumpVersion)) {
62+
if (!['major', 'minor', 'patch', 'prerelease'].includes(bumpVersion)) {
6363
bumpVersion = semver.valid(bumpVersion)
6464

6565
if (!bumpVersion) {
@@ -88,7 +88,8 @@ export async function bumpPackages(packageName, requestedVersion) {
8888
'--no-push', // do not execute `git push`
8989
'--no-git-tag-version', // do not add git tag or commit
9090
'--force-publish=*', // bump all packages even if they have no changes
91-
'--conventional-commits' // determines new version and updates Changelog
91+
'--conventional-commits', // determines new version and updates Changelog
92+
'--preid=SECURITY' // postfixes releases if type is prerelease
9293
])
9394

9495
releaseVersion = await syncRootPackageVersion(true)

0 commit comments

Comments
 (0)