Skip to content

Commit

Permalink
[tools] Fix publishing with node 20 (#28295)
Browse files Browse the repository at this point in the history
  • Loading branch information
wschurman committed Apr 18, 2024
1 parent 670a350 commit 8d74597
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions tools/src/Npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,13 @@ export async function downloadPackageTarballAsync(
* Creates a tarball from a package.
*/
export async function packToTarballAsync(packageDir: string): Promise<PackResult> {
const [result] = await spawnJSONCommandAsync<PackResult[]>('npm', ['pack', '--json'], {
cwd: packageDir,
});
const [result] = await spawnJSONCommandAsync<PackResult[]>(
'npm',
['pack', '--json', '--foreground-scripts=false'],
{
cwd: packageDir,
}
);
return result;
}

Expand Down
2 changes: 1 addition & 1 deletion tools/src/publish-packages/tasks/packPackageToTarball.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const packPackageToTarball = new Task<TaskArgs>(
return;
} catch (error) {
step.fail();
logger.error(error.stderr);
logger.error(error);
return Task.STOP;
}
},
Expand Down

0 comments on commit 8d74597

Please sign in to comment.