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:
Almeida
2026-09-04 16:46:25 +00:00
committed by GitHub
parent 183ade2424
commit 096177189f
2 changed files with 8 additions and 1 deletions
@@ -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.`));
}