Skip to content

Commit 869ec27

Browse files
authored
fix: moving typed-emitter from devDependency to dependencies (#6889)
1 parent 9c8aba8 commit 869ec27

File tree

9 files changed

+129
-58
lines changed

9 files changed

+129
-58
lines changed

.changeset/purple-impalas-prove.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"electron-updater": patch
3+
---
4+
5+
fix: moving typed-emitter from devDependency to dependencies

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
jobs:
44
build:
55
docker:
6-
- image: circleci/node:14.17@sha256:b1c0b133fc872314dee5b24e34084693f0747850aad6ac0181b70061e198375f
6+
- image: cimg/node:14.19
77
steps:
88
- checkout
99
- restore_cache:
@@ -13,7 +13,7 @@ jobs:
1313
keys:
1414
- v-11.0.0-electron
1515
- run:
16-
command: npm i --prefix=$HOME/.local -g pnpm@6.25.1
16+
command: npm i --prefix=$HOME/.local -g pnpm@7.1.6
1717
- run:
1818
command: pnpm install --frozen-lockfile
1919
- run:
@@ -37,4 +37,4 @@ workflows:
3737
filters:
3838
branches:
3939
ignore:
40-
- docs
40+
- docs

.github/actions/pnpm/action.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@ inputs:
44
version: # id of input
55
description: 'The pnpm version to use'
66
required: false
7-
default: 6.25.1
7+
default: 7.1.6
88

99
runs:
1010
using: 'composite'
1111
steps:
12-
- uses: pnpm/action-setup@v2
12+
- name: Setup pnpm
13+
uses: pnpm/[email protected]
1314
with:
1415
version: ${{ inputs.version }}
1516

16-
- uses: actions/setup-node@v3
17+
- name: Setup node
18+
uses: actions/setup-node@v3
1719
with:
1820
node-version: '14'
1921
cache: 'pnpm'
2022

21-
- name: install dependencies
23+
- name: Install dependencies
2224
run: pnpm install --frozen-lockfile
2325
shell: bash
2426

.github/actions/pretest/action.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,26 @@ inputs:
77
cache-path:
88
description: 'The path to the electron cache'
99
required: true
10+
version:
11+
description: 'The pnpm version to use'
12+
required: false
13+
default: 7.1.6
1014

1115
runs:
1216
using: 'composite'
1317
steps:
14-
- uses: pnpm/action-setup@v2
18+
- name: Setup pnpm
19+
uses: pnpm/[email protected]
1520
with:
16-
version: 6.25.1
21+
version: ${{ inputs.version }}
1722

18-
- uses: actions/setup-node@v3
23+
- name: Setup node
24+
uses: actions/setup-node@v3
1925
with:
2026
node-version: '14'
2127
cache: 'pnpm'
2228

23-
- name: install dependencies
29+
- name: Install dependencies
2430
run: pnpm install --frozen-lockfile
2531
shell: bash
2632

docker/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ DATE=$(date +%m.%y)
77
docker build -t electronuserland/builder:base -t "electronuserland/builder:base-$DATE" docker/base
88

99
# Node 14
10-
docker build --build-arg NODE_VERSION=14.19.1 -t electronuserland/builder:14 -t "electronuserland/builder:14-$DATE" -t electronuserland/builder:latest docker/node
10+
docker build --build-arg NODE_VERSION=14.19.3 -t electronuserland/builder:14 -t "electronuserland/builder:14-$DATE" -t electronuserland/builder:latest docker/node
1111

1212
docker build --build-arg IMAGE_VERSION=14 -t electronuserland/builder:14-wine -t "electronuserland/builder:14-wine-$DATE" -t electronuserland/builder:wine docker/wine
1313
docker build --build-arg IMAGE_VERSION=14-wine -t electronuserland/builder:14-wine-mono -t "electronuserland/builder:14-wine-mono-$DATE" -t electronuserland/builder:wine-mono docker/wine-mono

docker/node/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
FROM electronuserland/builder:base
22

3-
ARG NODE_VERSION 14.17.0
3+
ARG NODE_VERSION 14.19.3
44

55
# this package is used for snapcraft and we should not clear apt list - to avoid apt-get update during snap build
66
RUN curl -L https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz | tar xz -C /usr/local --strip-components=1 && \
77
unlink /usr/local/CHANGELOG.md && unlink /usr/local/LICENSE && unlink /usr/local/README.md && \
88
# https://github.com/npm/npm/issues/4531
99
npm config set unsafe-perm true
10-
RUN npm i -g pnpm@6.25.1
10+
RUN npm i -g pnpm@7.1.6

packages/app-builder-lib/src/targets/MsiTarget.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ export default class MsiTarget extends Target {
224224
result += `>\n`
225225
const shortcutName = commonOptions.shortcutName
226226
if (isCreateDesktopShortcut) {
227-
result += `${fileSpace} <Shortcut Id="desktopShortcut" Directory="DesktopFolder" Name="${xmlAttr(shortcutName)}" WorkingDirectory="APPLICATIONFOLDER" Advertise="yes" Icon="${this.iconId}"/>\n`
227+
result += `${fileSpace} <Shortcut Id="desktopShortcut" Directory="DesktopFolder" Name="${xmlAttr(
228+
shortcutName
229+
)}" WorkingDirectory="APPLICATIONFOLDER" Advertise="yes" Icon="${this.iconId}"/>\n`
228230
}
229231

230232
const hasMenuCategory = commonOptions.menuCategory != null
@@ -233,7 +235,9 @@ export default class MsiTarget extends Target {
233235
if (hasMenuCategory) {
234236
dirs.push(`<Directory Id="${startMenuShortcutDirectoryId}" Name="ProgramMenuFolder:\\${commonOptions.menuCategory}\\"/>`)
235237
}
236-
result += `${fileSpace} <Shortcut Id="startMenuShortcut" Directory="${startMenuShortcutDirectoryId}" Name="${xmlAttr(shortcutName)}" WorkingDirectory="APPLICATIONFOLDER" Advertise="yes" Icon="${this.iconId}">\n`
238+
result += `${fileSpace} <Shortcut Id="startMenuShortcut" Directory="${startMenuShortcutDirectoryId}" Name="${xmlAttr(
239+
shortcutName
240+
)}" WorkingDirectory="APPLICATIONFOLDER" Advertise="yes" Icon="${this.iconId}">\n`
237241
result += `${fileSpace} <ShortcutProperty Key="System.AppUserModel.ID" Value="${xmlAttr(this.packager.appInfo.id)}"/>\n`
238242
result += `${fileSpace} </Shortcut>\n`
239243
}
@@ -275,10 +279,5 @@ function listToString(list: Array<string>, indentLevel: number) {
275279
}
276280

277281
function xmlAttr(str: string) {
278-
return str
279-
.replace(/&/g, "&amp;")
280-
.replace(/</g, "&lt;")
281-
.replace(/>/g, "&gt;")
282-
.replace(/"/g, "&quot;")
283-
.replace(/'/g, "&apos;")
282+
return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;")
284283
}

packages/electron-updater/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
"lazy-val": "^1.0.5",
2424
"lodash.escaperegexp": "^4.1.2",
2525
"lodash.isequal": "^4.5.0",
26-
"semver": "^7.3.5"
26+
"semver": "^7.3.5",
27+
"typed-emitter": "^2.1.0"
2728
},
2829
"devDependencies": {
2930
"@types/fs-extra": "9.0.13",
3031
"@types/js-yaml": "4.0.3",
3132
"@types/lodash.escaperegexp": "4.1.6",
32-
"@types/lodash.isequal": "4.5.5",
33-
"typed-emitter": "^2.1.0"
33+
"@types/lodash.isequal": "4.5.5"
3434
},
3535
"typings": "./out/main.d.ts",
3636
"publishConfig": {

0 commit comments

Comments
 (0)