Skip to content

Commit 54be47e

Browse files
authored
Merge branch 'main' into feat/pnpm-support
2 parents b11d4cd + b298b29 commit 54be47e

File tree

176 files changed

+7370
-4943
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+7370
-4943
lines changed

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2.1
22

33
orbs:
4-
node: electronjs/node@1.4.1
4+
node: electronjs/node@2.2.1
55

66
commands:
77
install:
@@ -113,8 +113,8 @@ jobs:
113113
name: Windows Setup
114114
shell: bash
115115
command: |
116-
choco install --no-progress -y wixtoolset
117-
echo 'export PATH=$PATH:"/C/Program Files (x86)/WiX Toolset v3.11/bin"' >> "$BASH_ENV"
116+
choco install --no-progress -y wixtoolset --version=3.14.0
117+
echo 'export PATH=$PATH:"/C/Program Files (x86)/WiX Toolset v3.14/bin"' >> "$BASH_ENV"
118118
cd 'C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\run-script'
119119
npm install [email protected]
120120
- when:

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ packages/*/*/doc
66
packages/*/*/index.ts
77
packages/**/bad.js
88
tmpl
9+
packages/api/core/helper/dynamic-import.js

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'github-actions'
4+
directory: '/'
5+
schedule:
6+
interval: 'monthly'

.github/workflows/add-to-project.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
creds: ${{ secrets.ECOSYSTEM_ISSUE_TRIAGE_GH_APP_CREDS }}
2222
org: electron
2323
- name: Add to Project
24-
uses: dsanders11/project-actions/add-item@a24415515fa60a22f71f9d9d00e36ca82660cde9 # v1.0.1
24+
uses: dsanders11/project-actions/add-item@eb760c48894b5702398529cbb8f6e98378e315d0 # v1.3.0
2525
with:
2626
field: Opened
2727
field-value: ${{ github.event.pull_request.created_at || github.event.issue.created_at }}

.github/workflows/gh-pages.yml

+30-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
11
name: API Documentation
22

33
on:
4+
workflow_dispatch:
45
push:
56
tags:
6-
- v6.**
7+
- v7.**
78

89
jobs:
910
deploy:
1011
runs-on: ubuntu-20.04
1112
concurrency:
1213
group: ${{ github.workflow }}-${{ github.ref }}
1314
steps:
14-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0
15+
- name: Generate GitHub App token
16+
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
17+
id: generate-token
18+
with:
19+
creds: ${{ secrets.GH_APP_CREDS }}
20+
21+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
1522
with:
1623
submodules: true
1724
fetch-depth: 0
25+
token: ${{ steps.generate-token.outputs.token }}
26+
27+
- name: Get short SHA for HEAD
28+
id: get-short-sha
29+
run: echo "sha=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT
1830

1931
- name: Use Node.js LTS
20-
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 #v.3.5.1
32+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2133
with:
22-
node-version: 16.x
34+
node-version: 20.x
2335
cache: yarn
2436

2537
- name: Build
@@ -28,9 +40,19 @@ jobs:
2840
yarn
2941
yarn docs
3042
31-
- name: Deploy
32-
uses: peaceiris/actions-gh-pages@v3
43+
- name: Prepare docs
44+
uses: malept/github-action-gh-pages@f7952a65c4b763dc84b824a530dc38bd375ac91e # tag: v1.4.0
3345
with:
34-
github_token: ${{ secrets.GITHUB_TOKEN }}
35-
publish_dir: ./docs
3646
cname: js.electronforge.io
47+
defaultBranch: main
48+
noCommit: true
49+
showUnderscoreFiles: true
50+
env:
51+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
52+
53+
- name: Commit docs
54+
uses: dsanders11/github-app-commit-action@48d2ff8c1a855eb15d16afa97ae12616456d7cbc # v1.4.0
55+
with:
56+
fail-on-no-changes: false
57+
message: 'deploy: ${{ steps.get-short-sha.outputs.sha }}'
58+
token: ${{ steps.generate-token.outputs.token }}

.github/workflows/semantic.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: semantic-pull-request
22-
uses: amannn/action-semantic-pull-request@01d5fd8a8ebb9aafe902c40c53f0f4744f7381eb # tag: v5
22+
uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # tag: v5
2323
env:
2424
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2525
with:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_Store
12
.nyc_output
23
*.lcov
34
/coverage

.vscode/settings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"[typescript]": {
44
"editor.formatOnSave": true,
55
"editor.codeActionsOnSave": {
6-
"source.fixAll.eslint": true
6+
"source.fixAll.eslint": "explicit"
77
},
88
"editor.defaultFormatter": "esbenp.prettier-vscode"
99
},
1010
"[javascript]": {
1111
"editor.formatOnSave": true,
1212
"editor.codeActionsOnSave": {
13-
"source.fixAll.eslint": true
13+
"source.fixAll.eslint": "explicit"
1414
},
1515
"editor.defaultFormatter": "esbenp.prettier-vscode"
1616
},

CONTRIBUTING.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ free to ask constructive questions. (This applies to any open issue.)
4141
The easiest way to test changes to Forge during development is by symlinking your local packages
4242
to a sample Forge project.
4343

44-
To create symlinks your local Forge packages, use the `yarn link:prepare` command after
44+
To create symlinks for your local Forge packages, use the `yarn link:prepare` command after
4545
building Forge.
4646

4747
```sh
@@ -167,3 +167,20 @@ The `lerna:publish` script will automatically increment the next package version
167167
- Target the `main` branch.
168168
- [Automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes)
169169
against the previous Forge release.
170+
171+
### Adding a new `@electron-forge` package
172+
173+
Occasionally, we add new packages to the `@electron-forge` monorepo. Before publishing, ensure that all
174+
version numbers for both the package itself and its dependencies match the _current_ version of Electron
175+
Forge (e.g. if the current version is `v7.0.0` and you want to add the package in `v7.1.0`, please publish
176+
`v7.0.0` first).
177+
178+
Then, manually publish the package to the current Forge version using `npm publish --access public`.
179+
Once this version is published, you can continue with the normal release process as usual.
180+
181+
> [!NOTE]
182+
> To verify that the publish configuration is correct, first run `npm publish --dry-run`
183+
> before publishing.
184+
185+
We do this manual publish step first to avoid errors with attempting to publish a non existent package
186+
with Lerna.

README.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,11 @@ jump right in to Electron development.
2424

2525
---
2626

27-
_Note: The major version bump between v5.0.0 and v6.0.0 contains major breaking API changes and improvements. If you are new to Forge, we highly recommend using the latest version. If using an older version of Forge, we recommend upgrading to v6.0.0 or later._
28-
29-
---
30-
3127
# Getting Started
3228

33-
Pre-requisities:
29+
Pre-requisites:
3430

35-
- Node 14.17.5 or higher
31+
- Node 16.4.0 or higher
3632
- Git
3733

3834
If you have a more recent version of `npm` or `yarn`, you can use
@@ -72,7 +68,7 @@ With these goals in mind, under the hood this project uses, among others:
7268
- [`@electron/rebuild`](https://github.com/electron/rebuild):
7369
Automatically recompiles native Node.js modules against the correct
7470
Electron version.
75-
- [Electron Packager](https://github.com/electron/electron-packager):
71+
- [`@electron/packager`](https://github.com/electron/packager):
7672
Customizes and bundles your Electron app to get it ready for distribution.
7773

7874
## Contributing

SUPPORT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ feature. Known modules include:
1414

1515
- `@electron/get:*`
1616
- `@electron/osx-sign`
17+
- `@electron/packager`
1718
- `electron-forge:*` (always use this one before filing an issue)
1819
- `electron-installer-debian`
1920
- `electron-installer-dmg`
2021
- `electron-installer-flatpak`
2122
- `electron-installer-redhat`
2223
- `electron-installer-snap:*`
23-
- `electron-packager`
2424
- `electron-rebuild`
2525
- `electron-windows-installer:main`
2626
- `electron-windows-store`

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
33
"useWorkspaces": true,
4-
"version": "6.4.2",
4+
"version": "7.4.0",
55
"npmClient": "yarn"
66
}

package.json

+16-12
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"private": true,
55
"license": "MIT",
66
"engines": {
7-
"node": ">= 14.17.5"
7+
"node": ">= 16.4.0"
88
},
99
"scripts": {
1010
"clean": "rimraf dist && lerna exec -- rimraf dist tsconfig.tsbuildinfo",
1111
"build": "tsc -b packages",
1212
"build:watch": "yarn build --watch",
1313
"postbuild": "ts-node tools/test-dist",
1414
"docs": "yarn build && yarn docs:generate",
15-
"docs:generate": "yarn docs:plugin && node --max-old-space-size=8192 -r ts-node/register ./tools/gen-docs.ts",
15+
"docs:generate": "yarn docs:plugin && node --max-old-space-size=16384 -r ts-node/register ./tools/gen-docs.ts",
1616
"docs:plugin": "cd ./tools/doc-plugin && yarn build",
1717
"lerna:publish": "lerna publish --force-publish --conventional-commits --no-changelog --exact",
1818
"lint:js": "prettier --check . && eslint .",
@@ -23,22 +23,25 @@
2323
"lint:fix": "prettier --write .",
2424
"link:prepare": "lerna exec -- node ../../../tools/silent.js yarn link --silent --no-bin-links --link-folder ../../../.links",
2525
"link:remove": "lerna exec -- node ../../../tools/silent.js yarn unlink --silent --no-bin-links --link-folder ../../../.links",
26-
"test": "xvfb-maybe cross-env NODE_ENV=test TS_NODE_PROJECT='./tsconfig.test.json' TS_NODE_FILES=1 mocha",
26+
"test": "npm run test:clear && xvfb-maybe cross-env NODE_ENV=test TS_NODE_PROJECT='./tsconfig.test.json' TS_NODE_FILES=1 mocha",
2727
"test:fast": "npm run test -- --suite=fast",
2828
"test:slow": "npm run test -- --suite=slow",
29+
"test:clear": "ts-node tools/test-clear",
2930
"postinstall": "rimraf node_modules/.bin/*.ps1 && ts-node ./tools/gen-tsconfigs.ts && ts-node ./tools/gen-ts-glue.ts",
3031
"prepare": "husky install",
3132
"preversion": "yarn build"
3233
},
3334
"dependencies": {
3435
"@aws-sdk/abort-controller": "^3.29.0",
35-
"@aws-sdk/client-s3": "^3.28.0",
36+
"@aws-sdk/client-s3": "^3.461.0",
3637
"@aws-sdk/lib-storage": "^3.28.0",
3738
"@aws-sdk/types": "^3.25.0",
3839
"@doyensec/electronegativity": "^1.9.1",
39-
"@electron/get": "^2.0.0",
40+
"@electron/get": "^3.0.0",
4041
"@electron/osx-sign": "^1.0.5",
42+
"@electron/packager": "^18.3.1",
4143
"@electron/rebuild": "^3.2.10",
44+
"@google-cloud/storage": "^7.5.0",
4245
"@malept/cross-spawn-promise": "^2.0.0",
4346
"@octokit/core": "^3.2.4",
4447
"@octokit/plugin-retry": "^3.0.9",
@@ -49,7 +52,6 @@
4952
"cross-spawn": "^7.0.3",
5053
"cross-zip": "^4.0.0",
5154
"debug": "^4.3.1",
52-
"electron-packager": "^17.1.2",
5355
"express": "^4.17.1",
5456
"express-ws": "^5.0.2",
5557
"fast-glob": "^3.2.7",
@@ -60,6 +62,7 @@
6062
"got": "^11.8.5",
6163
"html-webpack-plugin": "^5.5.3",
6264
"interpret": "^3.1.1",
65+
"listr2": "^7.0.2",
6366
"lodash": "^4.17.20",
6467
"log-symbols": "^4.0.0",
6568
"mime-types": "^2.1.25",
@@ -73,7 +76,7 @@
7376
"source-map-support": "^0.5.13",
7477
"sudo-prompt": "^9.1.1",
7578
"username": "^5.1.0",
76-
"vite": "^4.1.1",
79+
"vite": "^5.0.12",
7780
"webpack": "^5.69.1",
7881
"webpack-dev-server": "^4.0.0",
7982
"webpack-merge": "^5.7.3",
@@ -84,7 +87,7 @@
8487
},
8588
"devDependencies": {
8689
"@electron/fuses": ">=1.0.0",
87-
"@electron/lint-roller": "^1.6.0",
90+
"@electron/lint-roller": "1.10.1",
8891
"@knodes/typedoc-plugin-monorepo-readmes": "0.22.5",
8992
"@malept/eslint-config": "^2.0.0",
9093
"@types/chai": "^4.2.12",
@@ -96,6 +99,7 @@
9699
"@types/fetch-mock": "^7.3.1",
97100
"@types/fs-extra": "^9.0.6",
98101
"@types/interpret": "^1.1.1",
102+
"@types/keyv": "^3.1.4",
99103
"@types/listr": "^0.14.2",
100104
"@types/lodash": "^4.14.166",
101105
"@types/mime-types": "^2.1.0",
@@ -128,9 +132,8 @@
128132
"generate-changelog": "^1.8.0",
129133
"husky": "^7.0.1",
130134
"inquirer": "^8.0.0",
131-
"lerna": "^6.0.1",
135+
"lerna": "^6.6.2",
132136
"lint-staged": "^12.1.7",
133-
"listr2": "^5.0.3",
134137
"minimist": "^1.2.6",
135138
"mocha": "^9.0.1",
136139
"mocha-junit-reporter": "^2.2.1",
@@ -155,8 +158,8 @@
155158
"electron-installer-redhat": "^3.2.0",
156159
"electron-installer-snap": "^5.2.0",
157160
"electron-windows-store": "^2.1.0",
158-
"electron-winstaller": "^5.0.0",
159-
"electron-wix-msi": "^5.0.0",
161+
"electron-winstaller": "^5.3.0",
162+
"electron-wix-msi": "^5.1.3",
160163
"macos-alias": "^0.2.11"
161164
},
162165
"peerDependencies": {
@@ -173,6 +176,7 @@
173176
"prettier": {
174177
"singleQuote": true
175178
},
179+
"packageManager": "[email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447",
176180
"workspaces": {
177181
"packages": [
178182
"packages/api/*",

packages/api/cli/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@electron-forge/cli",
3-
"version": "6.4.2",
3+
"version": "7.4.0",
44
"description": "A complete tool for building modern Electron applications",
55
"repository": "https://github.com/electron/forge",
66
"author": "Samuel Attard",
@@ -17,18 +17,18 @@
1717
"mocha": "^9.0.1"
1818
},
1919
"dependencies": {
20-
"@electron-forge/core": "6.4.2",
21-
"@electron-forge/shared-types": "6.4.2",
22-
"@electron/get": "^2.0.0",
20+
"@electron-forge/core": "7.4.0",
21+
"@electron-forge/shared-types": "7.4.0",
22+
"@electron/get": "^3.0.0",
2323
"chalk": "^4.0.0",
2424
"commander": "^4.1.1",
2525
"debug": "^4.3.1",
2626
"fs-extra": "^10.0.0",
27-
"listr2": "^5.0.3",
27+
"listr2": "^7.0.2",
2828
"semver": "^7.2.1"
2929
},
3030
"engines": {
31-
"node": ">= 14.17.5"
31+
"node": ">= 16.4.0"
3232
},
3333
"funding": [
3434
{

packages/api/cli/src/electron-forge-import.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import workingDir from './util/working-dir';
1010
(async () => {
1111
let dir = process.cwd();
1212
program
13-
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version)
13+
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version, '-V, --version', 'Output the current version')
14+
.helpOption('-h, --help', 'Output usage information')
1415
.arguments('[name]')
1516
.action((name) => {
1617
dir = workingDir(dir, name, false);

packages/api/cli/src/electron-forge-init.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ import workingDir from './util/working-dir';
1010
(async () => {
1111
let dir = process.cwd();
1212
program
13-
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version)
13+
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version, '-V, --version', 'Output the current version')
1414
.arguments('[name]')
1515
.option('-t, --template [name]', 'Name of the Forge template to use')
1616
.option('-c, --copy-ci-files', 'Whether to copy the templated CI files (defaults to false)', false)
1717
.option('-f, --force', 'Whether to overwrite an existing directory (defaults to false)', false)
18+
.helpOption('-h, --help', 'Output usage information')
1819
.action((name) => {
1920
dir = workingDir(dir, name, false);
2021
})

0 commit comments

Comments
 (0)