Skip to content

Commit bc46ad0

Browse files
erickzhaoClaude
andcommitted
fix: replace extract-zip with @electron-internal/extract-zip
Swap the extract-zip dependency for the @electron-internal/extract-zip drop-in replacement, switch to its named { extract } export, update import specifiers, and allowlist the @electron-internal/* scope in the npm age gate. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 56a3c40 commit bc46ad0

4 files changed

Lines changed: 11 additions & 3 deletions

File tree

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ npmMinimalAgeGate: 10080
1010

1111
npmPreapprovedPackages:
1212
- '@electron/*'
13+
- '@electron-internal/*'
1314
- '@electron-forge/*'
1415
- 'electron'
1516
- update-electron-app

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@
4747
"@blueprintjs/core": "^3.36.0",
4848
"@blueprintjs/popover2": "^0.12.2",
4949
"@blueprintjs/select": "^3.15.0",
50+
"@electron-internal/extract-zip": "^1.0.1",
5051
"@electron/fiddle-core": "^2.2.0",
5152
"@octokit/rest": "^22.0.1",
5253
"@sentry/electron": "^7.12.0",
5354
"algoliasearch": "^4.12.0",
5455
"classnames": "^2.2.6",
5556
"electron-squirrel-startup": "^1.0.0",
56-
"extract-zip": "^2.0.1",
5757
"fs-extra": "^9.1.0",
5858
"mobx": "^6.5.0",
5959
"mobx-react": "^7.3.0",

src/main/content.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function prepareTemplate(branch: string): Promise<string> {
5252
// unzip it from the tempfile
5353
console.log(`Content: ${branch} unzipping template`);
5454
await fs.ensureDir(TEMPLATES_DIR);
55-
const { default: extract } = await import('extract-zip');
55+
const { extract } = await import('@electron-internal/extract-zip');
5656
await extract(tempfile, { dir: TEMPLATES_DIR });
5757

5858
// cleanup

yarn.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,13 @@ __metadata:
638638
languageName: node
639639
linkType: hard
640640

641+
"@electron-internal/extract-zip@npm:^1.0.1":
642+
version: 1.0.1
643+
resolution: "@electron-internal/extract-zip@npm:1.0.1"
644+
checksum: 10c0/4149cb1c99da41457802a11fac692701f58460dcd78341958c10c948876abd3747d45137cf6bfe0c99e7dea0bdb32bf072e9d420a18f55bd1e0087bd1a5c45ba
645+
languageName: node
646+
linkType: hard
647+
641648
"@electron/asar@npm:^3.2.1":
642649
version: 3.2.17
643650
resolution: "@electron/asar@npm:3.2.17"
@@ -5314,6 +5321,7 @@ __metadata:
53145321
"@electron-forge/plugin-fuses": "npm:8.0.0-alpha.9"
53155322
"@electron-forge/plugin-webpack": "npm:8.0.0-alpha.9"
53165323
"@electron-forge/publisher-github": "npm:8.0.0-alpha.9"
5324+
"@electron-internal/extract-zip": "npm:^1.0.1"
53175325
"@electron/devtron": "npm:^2.1.1"
53185326
"@electron/fiddle-core": "npm:^2.2.0"
53195327
"@electron/fuses": "npm:^2.1.1"
@@ -5351,7 +5359,6 @@ __metadata:
53515359
eslint-plugin-import: "npm:^2.27.5"
53525360
eslint-plugin-react: "npm:^7.32.2"
53535361
eslint-plugin-tsdoc: "npm:^0.3.0"
5354-
extract-zip: "npm:^2.0.1"
53555362
fork-ts-checker-webpack-plugin: "npm:^8.0.0"
53565363
fs-extra: "npm:^9.1.0"
53575364
husky: "npm:^9.0.11"

0 commit comments

Comments
 (0)