fix(release): resolve packed-consumer transitive deps to local tarballs (#2396)

verifyPackedConsumer installs each package as a file: tarball, but each tarball pins its inter-@hyperframes deps to the exact release version. On a release bump that version is not on the npm registry yet, so bun resolves the transitive deps from the registry and fails. Add an overrides map forcing every @hyperframes/* to the sibling local tarball, making the check self-contained pre-publish. Exercised by the v0.7.57 release PR.
This commit is contained in:
Miguel Ángel
2026-07-13 23:51:17 -04:00
committed by GitHub
parent 58cfa0c655
commit 3dcc6e6a80
+14 -2
View File
@@ -310,15 +310,27 @@ function writeConsumerFixture(packDir, packedWorkspaces) {
const fixtureDir = join(packDir, "consumer");
mkdirSync(fixtureDir);
const rootPackage = JSON.parse(readFileSync(join(ROOT, "package.json"), "utf8"));
const dependencies = Object.fromEntries(
const workspaceFileDeps = Object.fromEntries(
packedWorkspaces.map(({ filename, packedPackage }) => [packedPackage.name, `file:${filename}`]),
);
const dependencies = { ...workspaceFileDeps };
dependencies.typescript = rootPackage.devDependencies.typescript;
dependencies["@types/node"] = rootPackage.devDependencies["@types/node"];
writeFileSync(
join(fixtureDir, "package.json"),
JSON.stringify(
{ name: "packed-consumer", private: true, type: "module", dependencies },
{
name: "packed-consumer",
private: true,
type: "module",
dependencies,
// Each packed tarball pins its inter-@hyperframes deps to the exact
// release version. On a release bump that version is not on the registry
// yet, so a plain install fails to resolve those transitive deps. Force
// every @hyperframes/* to the sibling local tarball so the check is
// self-contained pre-publish (matches how the packages install together).
overrides: { ...workspaceFileDeps },
},
null,
2,
),