ci(scripts): true publish with pLimit
This commit is contained in:
@@ -17,7 +17,7 @@ import type { PackageDetails } from './lib/getPackageDetails.js'
|
|||||||
import { getPackageDetails } from './lib/getPackageDetails.js'
|
import { getPackageDetails } from './lib/getPackageDetails.js'
|
||||||
import { updateChangelog } from './utils/updateChangelog.js'
|
import { updateChangelog } from './utils/updateChangelog.js'
|
||||||
|
|
||||||
const npmPublishLimit = pLimit(10)
|
const npmPublishLimit = pLimit(5)
|
||||||
|
|
||||||
// Update this list with any packages to publish
|
// Update this list with any packages to publish
|
||||||
const packageWhitelist = [
|
const packageWhitelist = [
|
||||||
@@ -210,12 +210,9 @@ async function main() {
|
|||||||
packageDetails = packageDetails.filter((p) => p.name !== 'payload')
|
packageDetails = packageDetails.filter((p) => p.name !== 'payload')
|
||||||
runCmd(`pnpm publish -C packages/payload --no-git-checks --json --tag ${tag}`, execOpts)
|
runCmd(`pnpm publish -C packages/payload --no-git-checks --json --tag ${tag}`, execOpts)
|
||||||
|
|
||||||
const results: { name: string; success: boolean; details?: string }[] = []
|
const results = await Promise.all(
|
||||||
// Sequential publish
|
packageDetails.map((pkg) => publishPackageThrottled(pkg, { dryRun })),
|
||||||
for (const pkg of packageDetails) {
|
)
|
||||||
const result = await publishPackageThrottled(pkg, { dryRun })
|
|
||||||
results.push(result)
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(chalk.bold.green(`\n\nResults:\n`))
|
console.log(chalk.bold.green(`\n\nResults:\n`))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user