File tree Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 85
85
"eslint" : " ^9.23.0" ,
86
86
"lint-staged" : " ^15.5.0" ,
87
87
"npm-run-all2" : " ^7.0.2" ,
88
+ "p-limit" : " ^6.2.0" ,
88
89
"prettier" : " ^3.5.3" ,
89
90
"simple-git-hooks" : " ^2.12.1" ,
90
91
"size-limit" : " ^11.2.0" ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { exec } from '@actions/exec'
5
5
import type { Gitlab } from '@gitbeaker/core'
6
6
import type { Package } from '@manypkg/get-packages'
7
7
import { getPackages } from '@manypkg/get-packages'
8
+ import pLimit from 'p-limit'
8
9
import resolveFrom from 'resolve-from'
9
10
import semver from 'semver'
10
11
@@ -23,6 +24,8 @@ import {
23
24
sortTheThings ,
24
25
} from './utils.js'
25
26
27
+ const limit = pLimit ( 2 * 3 )
28
+
26
29
export const createRelease = async (
27
30
api : Gitlab ,
28
31
{ pkg, tagName } : { pkg : Package ; tagName : string } ,
@@ -155,12 +158,16 @@ export async function runPublish({
155
158
)
156
159
}
157
160
if ( createGitlabReleases ) {
158
- for ( const pkg of releasedPackages ) {
159
- await createRelease ( api , {
160
- pkg,
161
- tagName : `${ pkg . packageJson . name } @${ pkg . packageJson . version } ` ,
162
- } )
163
- }
161
+ await Promise . all (
162
+ releasedPackages . map ( pkg =>
163
+ limit ( ( ) =>
164
+ createRelease ( api , {
165
+ pkg,
166
+ tagName : `${ pkg . packageJson . name } @${ pkg . packageJson . version } ` ,
167
+ } ) ,
168
+ ) ,
169
+ ) ,
170
+ )
164
171
}
165
172
}
166
173
Original file line number Diff line number Diff line change @@ -5520,6 +5520,7 @@ __metadata:
5520
5520
mdast-util-to-string: "npm:^4.0.0"
5521
5521
micromatch: "npm:^4.0.8"
5522
5522
npm-run-all2: "npm:^7.0.2"
5523
+ p-limit: "npm:^6.2.0"
5523
5524
prettier: "npm:^3.5.3"
5524
5525
remark-parse: "npm:^11.0.0"
5525
5526
remark-stringify: "npm:^11.0.0"
@@ -11134,6 +11135,15 @@ __metadata:
11134
11135
languageName: node
11135
11136
linkType: hard
11136
11137
11138
+ "p-limit@npm:^6.2.0":
11139
+ version: 6.2.0
11140
+ resolution: "p-limit@npm:6.2.0"
11141
+ dependencies:
11142
+ yocto-queue: "npm:^1.1.1"
11143
+ checksum: 10c0/448bf55a1776ca1444594d53b3c731e68cdca00d44a6c8df06a2f6e506d5bbd540ebb57b05280f8c8bff992a630ed782a69612473f769a7473495d19e2270166
11144
+ languageName: node
11145
+ linkType: hard
11146
+
11137
11147
"p-locate@npm:^4.1.0":
11138
11148
version: 4.1.0
11139
11149
resolution: "p-locate@npm:4.1.0"
@@ -15095,7 +15105,7 @@ __metadata:
15095
15105
languageName: node
15096
15106
linkType: hard
15097
15107
15098
- "yocto-queue@npm:^1.0.0":
15108
+ "yocto-queue@npm:^1.0.0, yocto-queue@npm:^1.1.1 ":
15099
15109
version: 1.2.1
15100
15110
resolution: "yocto-queue@npm:1.2.1"
15101
15111
checksum: 10c0/5762caa3d0b421f4bdb7a1926b2ae2189fc6e4a14469258f183600028eb16db3e9e0306f46e8ebf5a52ff4b81a881f22637afefbef5399d6ad440824e9b27f9f
You can’t perform that action at this time.
0 commit comments