Skip to content

Commit fd075b4

Browse files
authored
Upgrade dependencies: Electron 35, Sentry 5, TypeScript 5.8, esbuild 0.25 (#188)
1 parent 2ec176c commit fd075b4

8 files changed

Lines changed: 2223 additions & 1033 deletions

File tree

.github/workflows/build.yml

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v3
20-
- uses: pnpm/action-setup@v2
19+
- uses: actions/checkout@v4
20+
- uses: pnpm/action-setup@v4
2121
with:
22-
version: 8.5.1
22+
version: 9
2323
- name: Setup Node.js
24-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2525
with:
26-
node-version: 20.10.x
26+
node-version: 22.x
2727
cache: pnpm
2828
- name: Install
2929
run: pnpm install
@@ -39,7 +39,7 @@ jobs:
3939
outputs:
4040
config: ${{ steps.filter.outputs.config }}
4141
steps:
42-
- uses: actions/checkout@v3
42+
- uses: actions/checkout@v4
4343
if: ${{ github.event_name == 'push' }}
4444
- uses: dorny/paths-filter@v2
4545
id: filter
@@ -58,29 +58,25 @@ jobs:
5858
runs-on: ${{ matrix.os }}
5959
strategy:
6060
matrix:
61-
os: [ macOS-latest, macOS-12, ubuntu-latest, windows-latest ]
62-
arch: [ x64, arm64 ]
63-
# Publishing artifacts for multiple Windows architectures has
64-
# a bug which can cause the wrong architecture to be downloaded
65-
# for an update, so until that is fixed, only build Windows x64
66-
exclude:
67-
- os: windows-latest
68-
arch: arm64
69-
# Only build arm64 builds on M1 and x86 builds on Intel Mac
70-
- os: macOS-latest
71-
arch: x64
72-
- os: macOS-12
73-
arch: arm64
61+
include:
62+
- os: macos-latest
63+
arch: arm64
64+
- os: ubuntu-latest
65+
arch: x64
66+
- os: ubuntu-latest
67+
arch: arm64
68+
- os: windows-latest
69+
arch: x64
7470

7571
steps:
76-
- uses: actions/checkout@v3
77-
- uses: pnpm/action-setup@v2
72+
- uses: actions/checkout@v4
73+
- uses: pnpm/action-setup@v4
7874
with:
79-
version: 8.5.1
75+
version: 9
8076
- name: Setup Node.js
81-
uses: actions/setup-node@v3
77+
uses: actions/setup-node@v4
8278
with:
83-
node-version: 20.10.x
79+
node-version: 22.x
8480
cache: pnpm
8581
- name: Setup Python
8682
uses: actions/setup-python@v5
@@ -96,7 +92,7 @@ jobs:
9692
fileName: 'windows-certificate.pfx'
9793
encodedString: ${{ secrets.WINDOWS_CODESIGN_CERTIFICATE }}
9894
- name: Generate MacOS code signing certificate
99-
if: matrix.os == 'macOS-latest' || matrix.os == 'macOS-12'
95+
if: matrix.os == 'macos-latest'
10096
run: ./scripts/add-macos-cert.sh
10197
env:
10298
MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}

.github/workflows/publish.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,25 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
os: [ macOS-latest, macOS-12, ubuntu-latest, windows-latest ]
14-
arch: [ x64, arm64 ]
15-
# Publishing artifacts for multiple Windows architectures has
16-
# a bug which can cause the wrong architecture to be downloaded
17-
# for an update, so until that is fixed, only build Windows x64
18-
exclude:
19-
- os: windows-latest
20-
arch: arm64
21-
# Only build arm64 builds on M1 and x86 builds on Intel Mac
22-
- os: macOS-latest
23-
arch: x64
24-
- os: macOS-12
25-
arch: arm64
13+
include:
14+
- os: macos-latest
15+
arch: arm64
16+
- os: ubuntu-latest
17+
arch: x64
18+
- os: ubuntu-latest
19+
arch: arm64
20+
- os: windows-latest
21+
arch: x64
2622

2723
steps:
28-
- uses: actions/checkout@v3
29-
- uses: pnpm/action-setup@v2
24+
- uses: actions/checkout@v4
25+
- uses: pnpm/action-setup@v4
3026
with:
31-
version: 8.5.1
27+
version: 9
3228
- name: Setup Node.js
33-
uses: actions/setup-node@v3
29+
uses: actions/setup-node@v4
3430
with:
35-
node-version: 20.10.x
31+
node-version: 22.x
3632
cache: pnpm
3733
- name: Setup Python
3834
uses: actions/setup-python@v5
@@ -50,7 +46,7 @@ jobs:
5046
fileName: 'windows-certificate.pfx'
5147
encodedString: ${{ secrets.WINDOWS_CODESIGN_CERTIFICATE }}
5248
- name: Generate MacOS code signing certificate
53-
if: matrix.os == 'macOS-latest' || matrix.os == 'macOS-12'
49+
if: matrix.os == 'macos-latest'
5450
run: ./scripts/add-macos-cert.sh
5551
env:
5652
MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}

forge.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ module.exports = {
8383
config: {
8484
name: 'Replit',
8585
icon: './assets/logo.icns',
86-
overwrite: false,
87-
// Set a different path for each architecture to avoid conflicts when uploading
88-
dmgPath: process.arch === 'arm64' ? 'Replit.dmg' : 'Replit-Intel.dmg',
86+
overwrite: true,
8987
additionalDMGOptions: {
9088
'background-color': '#0E1525',
9189
},

package.json

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Replit Desktop App",
66
"productName": "Replit",
77
"scripts": {
8-
"build": "rimraf dist && esbuild src/main.ts src/preload.ts --target=es2015 --platform=node --format=cjs --packages=external --minify --bundle --outdir=dist",
8+
"build": "rimraf dist && esbuild src/main.ts src/preload.ts --target=es2020 --platform=node --format=cjs --packages=external --minify --bundle --outdir=dist",
99
"ts:check": "tsc --noEmit",
1010
"ts:watch": "tsc --noEmit -w",
1111
"lint": "eslint -c .eslintrc.js --ext .ts ./src",
@@ -22,40 +22,47 @@
2222
"main": "./dist/main.js",
2323
"engines": {
2424
"pnpm": ">=8.5.1",
25-
"node": "^20.10.0"
25+
"node": ">=20.10.0"
26+
},
27+
"pnpm": {
28+
"onlyBuiltDependencies": [
29+
"electron",
30+
"electron-winstaller",
31+
"esbuild"
32+
]
2633
},
2734
"prettier": {
2835
"trailingComma": "all",
2936
"singleQuote": true
3037
},
3138
"devDependencies": {
32-
"@electron-forge/cli": "^7.4.0",
33-
"@electron-forge/maker-deb": "^7.4.0",
34-
"@electron-forge/maker-dmg": "^7.4.0",
35-
"@electron-forge/maker-squirrel": "^7.4.0",
36-
"@electron-forge/maker-zip": "^7.4.0",
37-
"@electron-forge/publisher-github": "^7.4.0",
38-
"@types/eslint": "^8.44.2",
39-
"@types/node": "^20.10.0",
40-
"@typescript-eslint/eslint-plugin": "^6.4.1",
41-
"@typescript-eslint/parser": "^4.33.0",
39+
"@electron-forge/cli": "^7.11.0",
40+
"@electron-forge/maker-deb": "^7.11.0",
41+
"@electron-forge/maker-dmg": "^7.11.0",
42+
"@electron-forge/maker-squirrel": "^7.11.0",
43+
"@electron-forge/maker-zip": "^7.11.0",
44+
"@electron-forge/publisher-github": "^7.11.0",
45+
"@types/eslint": "^8.56.10",
46+
"@types/node": "^22.0.0",
47+
"@typescript-eslint/eslint-plugin": "^7.0.0",
48+
"@typescript-eslint/parser": "^7.0.0",
4249
"cpy": "^9.0.1",
4350
"cross-env": "^7.0.3",
44-
"electron": "^30.0.3",
45-
"electron-winstaller": "^5.3.1",
46-
"esbuild": "^0.18.6",
47-
"eslint": "^8.47.0",
48-
"eslint-config-prettier": "^9.0.0",
49-
"eslint-plugin-prettier": "^5.0.0",
51+
"electron": "~35.7.5",
52+
"electron-winstaller": "^5.4.0",
53+
"esbuild": "^0.25.0",
54+
"eslint": "^8.57.0",
55+
"eslint-config-prettier": "^9.1.0",
56+
"eslint-plugin-prettier": "^5.5.0",
5057
"npm-run-all": "^4.1.5",
51-
"prettier": "^3.0.2",
52-
"rimraf": "^5.0.1",
53-
"typescript": "^4.9.5"
58+
"prettier": "^3.8.0",
59+
"rimraf": "^6.0.0",
60+
"typescript": "^5.8.0"
5461
},
5562
"dependencies": {
56-
"@sentry/electron": "^4.5.0",
57-
"electron-log": "5.1.4",
63+
"@sentry/electron": "^5.0.0",
64+
"electron-log": "^5.4.0",
5865
"electron-squirrel-startup": "^1.0.0",
59-
"electron-store": "^8.1.0"
66+
"electron-store": "^8.2.0"
6067
}
6168
}

0 commit comments

Comments
 (0)