Skip to content

Commit

Permalink
chore(repo): increase maxBuffer on e2e scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry committed Sep 20, 2023
1 parent 10c7838 commit 9b753e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions e2e/utils/global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { existsSync, removeSync } from 'fs-extra';
import { Config } from '@jest/types';
import * as isCI from 'is-ci';

const LARGE_BUFFER = 1024 * 1000000;

export default async function (globalConfig: Config.ConfigGlobals) {
const isVerbose: boolean =
process.env.NX_VERBOSE_LOGGING === 'true' || !!globalConfig.verbose;
Expand All @@ -33,6 +35,7 @@ export default async function (globalConfig: Config.ConfigGlobals) {
await new Promise<void>((res, rej) => {
const publishProcess = exec(`pnpm nx-release --local ${publishVersion}`, {
env: process.env,
maxBuffer: LARGE_BUFFER,
});
let logs = Buffer.from('');
if (isVerbose) {
Expand Down
9 changes: 9 additions & 0 deletions scripts/nx-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { isRelativeVersionKeyword } from 'nx/src/command-line/release/utils/semv
import { ReleaseType, parse } from 'semver';
import * as yargs from 'yargs';

const LARGE_BUFFER = 1024 * 1000000;

(async () => {
const options = parseArgs();
// Perform minimal logging by default
Expand All @@ -24,11 +26,13 @@ import * as yargs from 'yargs';
console.log(`> ${buildCommand}`);
execSync(buildCommand, {
stdio: [0, 1, 2],
maxBuffer: LARGE_BUFFER,
});

// Ensure all the native-packages directories are available at the top level of the build directory, enabling consistent packageRoot structure
execSync(`pnpm nx copy-native-package-directories nx`, {
stdio: isVerboseLogging ? [0, 1, 2] : 'ignore',
maxBuffer: LARGE_BUFFER,
});

// Expected to run as part of the Github `publish` workflow
Expand All @@ -37,10 +41,12 @@ import * as yargs from 'yargs';
// Always run before the artifacts step because we still need the .node files for native-packages
execSync('find ./build -name "*.node" -delete', {
stdio: [0, 1, 2],
maxBuffer: LARGE_BUFFER,
});

execSync('pnpm nx run-many --target=artifacts', {
stdio: [0, 1, 2],
maxBuffer: LARGE_BUFFER,
});
}

Expand All @@ -54,6 +60,7 @@ import * as yargs from 'yargs';
console.log(`> ${versionCommand}`);
execSync(versionCommand, {
stdio: isVerboseLogging ? [0, 1, 2] : 'ignore',
maxBuffer: LARGE_BUFFER,
});
};

Expand Down Expand Up @@ -85,6 +92,7 @@ import * as yargs from 'yargs';
console.log(`> ${changelogCommand}`);
execSync(changelogCommand, {
stdio: isVerboseLogging ? [0, 1, 2] : 'ignore',
maxBuffer: LARGE_BUFFER,
});

console.log(
Expand Down Expand Up @@ -138,6 +146,7 @@ import * as yargs from 'yargs';
console.log(`\n> ${publishCommand}`);
execSync(publishCommand, {
stdio: [0, 1, 2],
maxBuffer: LARGE_BUFFER,
});
}

Expand Down

0 comments on commit 9b753e8

Please sign in to comment.