Skip to content

Commit 7cd885a

Browse files
committed
ci(ui-scripts): update how lerna process is called (no 3rd party) + bump node version to 24 in release gh workflow
1 parent 66e68a5 commit 7cd885a

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

.github/workflows/manual-release-from-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fetch-depth: 0
1111
- uses: actions/setup-node@v4
1212
with:
13-
node-version: '22'
13+
node-version: '24'
1414
cache: 'npm'
1515
- name: Install packages
1616
run: npm ci

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
* SOFTWARE.
2424
*/
25+
import { spawn } from 'node:child_process'
2526
import fs from 'fs'
2627
import path from 'path'
2728
import semver from 'semver'
@@ -92,17 +93,25 @@ export async function bumpPackages(packageName, requestedVersion) {
9293
let releaseVersion
9394
console.log('\n\nDEBUG LOG 0.01: before info', args.join(' '))
9495
try {
95-
await runCommandAsync('lerna', [
96+
// native process run
97+
const cmdArgs = [
9698
'version',
9799
...args,
98-
'--exact', // exact versions, no ^ when bumping
99-
'--include-merged-tags', // Include tags from merged branches
100-
'--no-push', // do not execute `git push`
101-
'--no-git-tag-version', // do not add git tag or commit
102-
'--force-publish=*', // bump all packages even if they have no changes
103-
'--conventional-commits', // determines new version and updates Changelog
100+
'--exact',
101+
'--include-merged-tags',
102+
'--no-push',
103+
'--no-git-tag-version',
104+
'--force-publish=*',
105+
'--conventional-commits',
104106
'--loglevel=silly'
105-
])
107+
]
108+
await new Promise((resolve, reject) => {
109+
spawn('lerna', cmdArgs, { shell: true, stdio: 'inherit' })
110+
.on('close', (code) =>
111+
code === 0 ? resolve() : reject(new Error(`Exit code: ${code}`))
112+
)
113+
.on('error', reject)
114+
})
106115
// TODO REMOVE DEBUG LOG
107116
console.log('\n\nDEBUG LOG 0.1: before syncRootPackageVersion')
108117
releaseVersion = await syncRootPackageVersion(true)

0 commit comments

Comments
 (0)