Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/prepare-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const defaultRootDir = path.resolve(__dirname, '..');
const TEST_FILE_RE = /\.(test|spec)\.(d\.)?[mc]?[jt]s(\.map)?$/;
const DEFAULT_MAX_NPM_PACKAGE_UNPACKED_BYTES = 85 * 1024 * 1024;
const DEFAULT_MAX_NPM_PACKAGE_UNPACKED_BYTES = 96 * 1024 * 1024;
const PACKAGE_TEXT_FILE_RE =
/\.(?:[cm]?[jt]sx?|json|md|html|css|txt|ya?ml|sh|svg|map)$/i;
const PACKAGE_SCAN_FORBIDDEN_LITERALS = [
Expand Down
8 changes: 4 additions & 4 deletions scripts/tests/package-assets.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,12 @@ describe('package asset scripts', () => {
).toThrow(/Prepared package unpacked size \d+ bytes exceeds 50000 bytes/);
});

it('enforces an 85 MiB default unpacked size budget', () => {
it('enforces a 96 MiB default unpacked size budget', () => {
const rootDir = createFixtureRoot();
createBundleArtifacts(rootDir);
writeFile(rootDir, 'dist/chunks/large.bin', '');
const largeFile = path.join(rootDir, 'dist', 'chunks', 'large.bin');
truncateSync(largeFile, 84 * 1024 * 1024);
truncateSync(largeFile, 95 * 1024 * 1024);
stubConsole();

expect(() =>
Expand All @@ -340,15 +340,15 @@ describe('package asset scripts', () => {
}),
).not.toThrow();

truncateSync(largeFile, 85 * 1024 * 1024);
truncateSync(largeFile, 96 * 1024 * 1024);

expect(() =>
preparePackage({
rootDir,
requireNativeAudioCapture: false,
}),
).toThrow(
/Prepared package unpacked size \d+ bytes exceeds 89128960 bytes/,
/Prepared package unpacked size \d+ bytes exceeds 100663296 bytes/,
);
});

Expand Down
Loading