mirror of
https://github.com/discordjs/discord.js.git
synced 2026-09-17 08:47:27 +00:00
chore: allow dev version publishing with pnpm 11 (#11618)
* chore: allow dev version publishing with pnpm 11 * chore: increase registry check timeout to 15 mins
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import process from 'node:process';
|
||||
import { info, warning } from '@actions/core';
|
||||
import type { PackageJSON, PackumentVersion } from '@npm/types';
|
||||
import { $, file, write } from 'bun';
|
||||
@@ -43,6 +44,10 @@ async function getReleaseEntries(dry: boolean, devTag?: string) {
|
||||
const commitHash = (await $`git rev-parse --short HEAD`.text()).trim();
|
||||
const timestamp = Math.round(Date.now() / 1_000);
|
||||
|
||||
// We intentionally pin workspace dependencies in package.json for dev releases below,
|
||||
// which causes pnpm's dependency validations to fail since the lockfile gets out of sync
|
||||
if (devTag && !dry) process.env.pnpm_config_verify_deps_before_run = 'false';
|
||||
|
||||
for (const pkg of packageList) {
|
||||
// Don't release private packages ever (npm will error anyways)
|
||||
if (pkg.private) continue;
|
||||
|
||||
@@ -4,6 +4,8 @@ import { getOctokit, context } from '@actions/github';
|
||||
import { $ } from 'bun';
|
||||
import type { ReleaseEntry } from './generateReleaseTree.js';
|
||||
|
||||
const REGISTRY_CHECK_TIMEOUT_MS = 15 * 60 * 1_000;
|
||||
|
||||
let octokit: ReturnType<typeof getOctokit> | undefined;
|
||||
|
||||
if (process.env.GITHUB_TOKEN) {
|
||||
@@ -69,7 +71,7 @@ export async function releasePackage(release: ReleaseEntry, dry: boolean, devTag
|
||||
return;
|
||||
}
|
||||
|
||||
if (performance.now() > before + 5 * 60 * 1_000) {
|
||||
if (performance.now() > before + REGISTRY_CHECK_TIMEOUT_MS) {
|
||||
clearInterval(interval);
|
||||
reject(new Error(`Release for ${release.name} failed.`));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user