Skip to content

Commit b2f6af2

Browse files
authored
Merge branch 'master' into differentially
2 parents d47e037 + 312938d commit b2f6af2

23 files changed

+254
-164
lines changed

.changeset/blue-icons-push.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
refactor: update package manager detection and improve type handling

.changeset/poor-planes-nail.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
fix(deps): update dependency @electron/universal to v2.0.2

.changeset/purple-tigers-guess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"electron-updater": patch
3+
---
4+
5+
fix: update regex for multipart content-type parsing in multipleRange

.changeset/shaggy-teachers-relax.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"electron-updater": patch
3+
---
4+
5+
fix: allow forceDevUpdateConfig also on Linux

.changeset/three-foxes-confess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
refactor: improve resource directory handling for macOS

.changeset/yellow-icons-dream.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
fix(deps): update dependency @electron/osx-sign to v1.3.3

.github/actions/pretest/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323
- name: Setup python
2424
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
2525
with:
26-
python-version: '3.11'
26+
python-version: '3.13'
2727

2828
- name: Setup node
2929
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4

.github/workflows/docker-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
docker save -o ${{ runner.temp }}/electron-builder-all-${{ env.NODE_TAG }}.tar electronuserland/builder
3535
3636
- name: Bundle all images
37-
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
37+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
3838
with:
3939
name: electron-builder-all-${{ env.NODE_TAG }}
4040
path: ${{ runner.temp }}/electron-builder-all-${{ env.NODE_TAG }}.tar

packages/app-builder-lib/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
"@electron/asar": "3.4.1",
5151
"@electron/fuses": "^1.8.0",
5252
"@electron/notarize": "2.5.0",
53-
"@electron/osx-sign": "1.3.1",
53+
"@electron/osx-sign": "1.3.3",
5454
"@electron/rebuild": "3.7.2",
55-
"@electron/universal": "2.0.1",
55+
"@electron/universal": "2.0.3",
5656
"@malept/flatpak-bundler": "^0.4.0",
5757
"@types/fs-extra": "9.0.13",
5858
"async-exit-hook": "^2.0.1",

packages/app-builder-lib/src/electron/ElectronFramework.ts

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,27 +97,29 @@ async function removeUnusedLanguagesIfNeeded(options: BeforeCopyExtraFilesOption
9797
return
9898
}
9999

100-
const { dir, langFileExt } = getLocalesConfig(options)
100+
const { dirs, langFileExt } = getLocalesConfig(options)
101101
// noinspection SpellCheckingInspection
102-
await asyncPool(MAX_FILE_REQUESTS, await readdir(dir), async file => {
103-
if (!file.endsWith(langFileExt)) {
104-
return
105-
}
102+
const deletedFiles = async (dir: string) => {
103+
await asyncPool(MAX_FILE_REQUESTS, await readdir(dir), async file => {
104+
if (path.extname(file) !== langFileExt) {
105+
return
106+
}
106107

107-
const language = file.substring(0, file.length - langFileExt.length)
108-
if (!wantedLanguages.includes(language)) {
109-
return fs.rm(path.join(dir, file), { recursive: true, force: true })
110-
}
111-
return
112-
})
108+
const language = path.basename(file, langFileExt)
109+
if (!wantedLanguages.includes(language)) {
110+
return fs.rm(path.join(dir, file), { recursive: true, force: true })
111+
}
112+
return
113+
})
114+
}
115+
await Promise.all(dirs.map(deletedFiles))
113116

114117
function getLocalesConfig(options: BeforeCopyExtraFilesOptions) {
115118
const { appOutDir, packager } = options
116119
if (packager.platform === Platform.MAC) {
117-
return { dir: packager.getResourcesDir(appOutDir), langFileExt: ".lproj" }
118-
} else {
119-
return { dir: path.join(packager.getResourcesDir(appOutDir), "..", "locales"), langFileExt: ".pak" }
120+
return { dirs: [packager.getResourcesDir(appOutDir), packager.getMacOsElectronFrameworkResourcesDir(appOutDir)], langFileExt: ".lproj" }
120121
}
122+
return { dirs: [path.join(packager.getResourcesDir(appOutDir), "..", "locales")], langFileExt: ".pak" }
121123
}
122124
}
123125

0 commit comments

Comments
 (0)