fix(release): allow larger npm plugin artifacts (#117745)

This commit is contained in:
Vincent Koc
2026-08-02 10:27:44 +08:00
committed by GitHub
parent 90a377470f
commit 10a390ed7f
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -39,7 +39,8 @@ const MAX_ARCHIVE_BYTES = 256 * 1024 * 1024;
const MAX_EXPANDED_BYTES = 512 * 1024 * 1024;
const MAX_MANIFEST_BYTES = 4 * 1024 * 1024;
const MAX_PLUGIN_MANIFEST_BYTES = 2 * 1024 * 1024;
const MAX_TAR_ENTRIES = 10_000;
// Bundled SDKs can exceed 10k files; byte, path, and expansion caps remain authoritative.
const MAX_TAR_ENTRIES = 20_000;
const MAX_TAR_PATH_BYTES = 4 * 1024 * 1024;
const MAX_TAR_TOTAL_FILE_BYTES = 512 * 1024 * 1024;
export const CLAWHUB_PUBLICATION_TAR_LIMITS = Object.freeze({
@@ -1158,14 +1158,14 @@ describe("plugin publication artifact", () => {
createTarball([
{ path: "package/", type: "5" },
{ content: metaPackageJson(markerPath), path: "package/package.json" },
...Array.from({ length: 10_000 }, (_, index) => ({
...Array.from({ length: 20_000 }, (_, index) => ({
path: `package/file-${index.toString().padStart(5, "0")}`,
})),
]),
);
expect(() => createPluginPublicationArtifact(publicationParams(artifactDir))).toThrow(
/exceeds the 10000 entry limit/u,
/exceeds the 20000 entry limit/u,
);
});