Skip to content

Commit 521287a

Browse files
authored
chore: manually run prepack (#9241)
1 parent 159b7b0 commit 521287a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

release/core/publish/steps/generate-tarballs.ts

+6
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ export async function generatePackageTarballs(
3434
}
3535

3636
try {
37+
if (pkg.pkgData.scripts?.['prepack']) {
38+
await exec({ cwd: path.join(PROJECT_ROOT, path.dirname(pkg.filePath)), cmd: `bun run prepack` });
39+
}
3740
await amendFilesForTypesStrategy(pkg, pkgStrategy);
3841
} catch (e) {
3942
console.log(`🔴 ${chalk.redBright('failed to amend files to pack for')} ${chalk.yellow(pkg.pkgData.name)}`);
@@ -199,6 +202,9 @@ async function makeTypesStable(pkg: Package) {
199202
}
200203

201204
async function amendFilesForTypesStrategy(pkg: Package, strategy: APPLIED_STRATEGY) {
205+
if (pkg.pkgData.scripts?.['prepack']) {
206+
delete pkg.pkgData.scripts['prepack'];
207+
}
202208
switch (strategy.types) {
203209
case 'private':
204210
makeTypesPrivate(pkg);

0 commit comments

Comments
 (0)