Skip to content

Commit 7fe2d6a

Browse files
Stabilize extension package checksums
1 parent c987a26 commit 7fe2d6a

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

extensions/official/icons-market/extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"installation": {
1212
"downloadUrl": "https://athas.dev/extensions/packages/icon-theme/market/athas.icon-theme.market.tar.gz",
1313
"size": 1161,
14-
"checksum": "063f10fe0faeb317c15f386c5440360f2803057070f9d3a4cda3b4c145a64d5e"
14+
"checksum": "9c18872033e9e3b181ebbaf3d995f7801f0e5c3af94ddc8bac943bb04df5c507"
1515
},
1616
"license": "MIT",
1717
"repository": {

extensions/official/theme-market/extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
"installation": {
148148
"downloadUrl": "https://athas.dev/extensions/packages/theme/market/athas.theme.market.tar.gz",
149149
"size": 1567,
150-
"checksum": "c82ff12c6bfaa3fb54a1fe3540ca9e454b8024828a71bebefba3624df4167a38"
150+
"checksum": "ccd1188f368ae0463618a25c330d09a496c11c3ec491fcad9c8db92a1573e173"
151151
},
152152
"license": "MIT",
153153
"repository": {

src/features/extensions/scripts/extension-workspace.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import { createGzip } from "node:zlib";
2-
import { createWriteStream } from "node:fs";
1+
import { gzipSync } from "node:zlib";
32
import { readdir, readFile, stat, writeFile } from "node:fs/promises";
43
import { basename, join, relative, resolve } from "node:path";
5-
import { Readable } from "node:stream";
6-
import { pipeline } from "node:stream/promises";
74

85
export type ExtensionManifestRecord = Record<string, unknown>;
96

@@ -212,7 +209,7 @@ export async function writeStableTarGz(root: string, packagePath: string) {
212209
}
213210

214211
chunks.push(Buffer.alloc(1024, 0));
215-
const output = createWriteStream(packagePath);
216-
const gzip = createGzip({ level: 9 });
217-
await pipeline(Readable.from(chunks), gzip, output);
212+
const gzipped = gzipSync(Buffer.concat(chunks), { level: 9 });
213+
gzipped[9] = 255;
214+
await writeFile(packagePath, gzipped);
218215
}

0 commit comments

Comments
 (0)