Skip to content

Commit

Permalink
Merge branch 'main' into feat/pnpm-support
Browse files Browse the repository at this point in the history
  • Loading branch information
goosewobbler authored Apr 24, 2024
2 parents b11d4cd + b298b29 commit 54be47e
Show file tree
Hide file tree
Showing 176 changed files with 7,370 additions and 4,943 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
node: electronjs/node@1.4.1
node: electronjs/node@2.2.1

commands:
install:
Expand Down Expand Up @@ -113,8 +113,8 @@ jobs:
name: Windows Setup
shell: bash
command: |
choco install --no-progress -y wixtoolset
echo 'export PATH=$PATH:"/C/Program Files (x86)/WiX Toolset v3.11/bin"' >> "$BASH_ENV"
choco install --no-progress -y wixtoolset --version=3.14.0
echo 'export PATH=$PATH:"/C/Program Files (x86)/WiX Toolset v3.14/bin"' >> "$BASH_ENV"
cd 'C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\run-script'
npm install node-gyp@9.4.0
- when:
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ packages/*/*/doc
packages/*/*/index.ts
packages/**/bad.js
tmpl
packages/api/core/helper/dynamic-import.js
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'monthly'
2 changes: 1 addition & 1 deletion .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
creds: ${{ secrets.ECOSYSTEM_ISSUE_TRIAGE_GH_APP_CREDS }}
org: electron
- name: Add to Project
uses: dsanders11/project-actions/add-item@a24415515fa60a22f71f9d9d00e36ca82660cde9 # v1.0.1
uses: dsanders11/project-actions/add-item@eb760c48894b5702398529cbb8f6e98378e315d0 # v1.3.0
with:
field: Opened
field-value: ${{ github.event.pull_request.created_at || github.event.issue.created_at }}
Expand Down
38 changes: 30 additions & 8 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
name: API Documentation

on:
workflow_dispatch:
push:
tags:
- v6.**
- v7.**

jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
id: generate-token
with:
creds: ${{ secrets.GH_APP_CREDS }}

- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
submodules: true
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}

- name: Get short SHA for HEAD
id: get-short-sha
run: echo "sha=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT

- name: Use Node.js LTS
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 #v.3.5.1
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 16.x
node-version: 20.x
cache: yarn

- name: Build
Expand All @@ -28,9 +40,19 @@ jobs:
yarn
yarn docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Prepare docs
uses: malept/github-action-gh-pages@f7952a65c4b763dc84b824a530dc38bd375ac91e # tag: v1.4.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
cname: js.electronforge.io
defaultBranch: main
noCommit: true
showUnderscoreFiles: true
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}

- name: Commit docs
uses: dsanders11/github-app-commit-action@48d2ff8c1a855eb15d16afa97ae12616456d7cbc # v1.4.0
with:
fail-on-no-changes: false
message: 'deploy: ${{ steps.get-short-sha.outputs.sha }}'
token: ${{ steps.generate-token.outputs.token }}
2 changes: 1 addition & 1 deletion .github/workflows/semantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: semantic-pull-request
uses: amannn/action-semantic-pull-request@01d5fd8a8ebb9aafe902c40c53f0f4744f7381eb # tag: v5
uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # tag: v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
.nyc_output
*.lcov
/coverage
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"[typescript]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
Expand Down
19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ free to ask constructive questions. (This applies to any open issue.)
The easiest way to test changes to Forge during development is by symlinking your local packages
to a sample Forge project.

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

```sh
Expand Down Expand Up @@ -167,3 +167,20 @@ The `lerna:publish` script will automatically increment the next package version
- Target the `main` branch.
- [Automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes)
against the previous Forge release.

### Adding a new `@electron-forge` package

Occasionally, we add new packages to the `@electron-forge` monorepo. Before publishing, ensure that all
version numbers for both the package itself and its dependencies match the _current_ version of Electron
Forge (e.g. if the current version is `v7.0.0` and you want to add the package in `v7.1.0`, please publish
`v7.0.0` first).

Then, manually publish the package to the current Forge version using `npm publish --access public`.
Once this version is published, you can continue with the normal release process as usual.

> [!NOTE]
> To verify that the publish configuration is correct, first run `npm publish --dry-run`
> before publishing.
We do this manual publish step first to avoid errors with attempting to publish a non existent package
with Lerna.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@ jump right in to Electron development.

---

_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._

---

# Getting Started

Pre-requisities:
Pre-requisites:

- Node 14.17.5 or higher
- Node 16.4.0 or higher
- Git

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

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ feature. Known modules include:

- `@electron/get:*`
- `@electron/osx-sign`
- `@electron/packager`
- `electron-forge:*` (always use this one before filing an issue)
- `electron-installer-debian`
- `electron-installer-dmg`
- `electron-installer-flatpak`
- `electron-installer-redhat`
- `electron-installer-snap:*`
- `electron-packager`
- `electron-rebuild`
- `electron-windows-installer:main`
- `electron-windows-store`
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "6.4.2",
"version": "7.4.0",
"npmClient": "yarn"
}
28 changes: 16 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"private": true,
"license": "MIT",
"engines": {
"node": ">= 14.17.5"
"node": ">= 16.4.0"
},
"scripts": {
"clean": "rimraf dist && lerna exec -- rimraf dist tsconfig.tsbuildinfo",
"build": "tsc -b packages",
"build:watch": "yarn build --watch",
"postbuild": "ts-node tools/test-dist",
"docs": "yarn build && yarn docs:generate",
"docs:generate": "yarn docs:plugin && node --max-old-space-size=8192 -r ts-node/register ./tools/gen-docs.ts",
"docs:generate": "yarn docs:plugin && node --max-old-space-size=16384 -r ts-node/register ./tools/gen-docs.ts",
"docs:plugin": "cd ./tools/doc-plugin && yarn build",
"lerna:publish": "lerna publish --force-publish --conventional-commits --no-changelog --exact",
"lint:js": "prettier --check . && eslint .",
Expand All @@ -23,22 +23,25 @@
"lint:fix": "prettier --write .",
"link:prepare": "lerna exec -- node ../../../tools/silent.js yarn link --silent --no-bin-links --link-folder ../../../.links",
"link:remove": "lerna exec -- node ../../../tools/silent.js yarn unlink --silent --no-bin-links --link-folder ../../../.links",
"test": "xvfb-maybe cross-env NODE_ENV=test TS_NODE_PROJECT='./tsconfig.test.json' TS_NODE_FILES=1 mocha",
"test": "npm run test:clear && xvfb-maybe cross-env NODE_ENV=test TS_NODE_PROJECT='./tsconfig.test.json' TS_NODE_FILES=1 mocha",
"test:fast": "npm run test -- --suite=fast",
"test:slow": "npm run test -- --suite=slow",
"test:clear": "ts-node tools/test-clear",
"postinstall": "rimraf node_modules/.bin/*.ps1 && ts-node ./tools/gen-tsconfigs.ts && ts-node ./tools/gen-ts-glue.ts",
"prepare": "husky install",
"preversion": "yarn build"
},
"dependencies": {
"@aws-sdk/abort-controller": "^3.29.0",
"@aws-sdk/client-s3": "^3.28.0",
"@aws-sdk/client-s3": "^3.461.0",
"@aws-sdk/lib-storage": "^3.28.0",
"@aws-sdk/types": "^3.25.0",
"@doyensec/electronegativity": "^1.9.1",
"@electron/get": "^2.0.0",
"@electron/get": "^3.0.0",
"@electron/osx-sign": "^1.0.5",
"@electron/packager": "^18.3.1",
"@electron/rebuild": "^3.2.10",
"@google-cloud/storage": "^7.5.0",
"@malept/cross-spawn-promise": "^2.0.0",
"@octokit/core": "^3.2.4",
"@octokit/plugin-retry": "^3.0.9",
Expand All @@ -49,7 +52,6 @@
"cross-spawn": "^7.0.3",
"cross-zip": "^4.0.0",
"debug": "^4.3.1",
"electron-packager": "^17.1.2",
"express": "^4.17.1",
"express-ws": "^5.0.2",
"fast-glob": "^3.2.7",
Expand All @@ -60,6 +62,7 @@
"got": "^11.8.5",
"html-webpack-plugin": "^5.5.3",
"interpret": "^3.1.1",
"listr2": "^7.0.2",
"lodash": "^4.17.20",
"log-symbols": "^4.0.0",
"mime-types": "^2.1.25",
Expand All @@ -73,7 +76,7 @@
"source-map-support": "^0.5.13",
"sudo-prompt": "^9.1.1",
"username": "^5.1.0",
"vite": "^4.1.1",
"vite": "^5.0.12",
"webpack": "^5.69.1",
"webpack-dev-server": "^4.0.0",
"webpack-merge": "^5.7.3",
Expand All @@ -84,7 +87,7 @@
},
"devDependencies": {
"@electron/fuses": ">=1.0.0",
"@electron/lint-roller": "^1.6.0",
"@electron/lint-roller": "1.10.1",
"@knodes/typedoc-plugin-monorepo-readmes": "0.22.5",
"@malept/eslint-config": "^2.0.0",
"@types/chai": "^4.2.12",
Expand All @@ -96,6 +99,7 @@
"@types/fetch-mock": "^7.3.1",
"@types/fs-extra": "^9.0.6",
"@types/interpret": "^1.1.1",
"@types/keyv": "^3.1.4",
"@types/listr": "^0.14.2",
"@types/lodash": "^4.14.166",
"@types/mime-types": "^2.1.0",
Expand Down Expand Up @@ -128,9 +132,8 @@
"generate-changelog": "^1.8.0",
"husky": "^7.0.1",
"inquirer": "^8.0.0",
"lerna": "^6.0.1",
"lerna": "^6.6.2",
"lint-staged": "^12.1.7",
"listr2": "^5.0.3",
"minimist": "^1.2.6",
"mocha": "^9.0.1",
"mocha-junit-reporter": "^2.2.1",
Expand All @@ -155,8 +158,8 @@
"electron-installer-redhat": "^3.2.0",
"electron-installer-snap": "^5.2.0",
"electron-windows-store": "^2.1.0",
"electron-winstaller": "^5.0.0",
"electron-wix-msi": "^5.0.0",
"electron-winstaller": "^5.3.0",
"electron-wix-msi": "^5.1.3",
"macos-alias": "^0.2.11"
},
"peerDependencies": {
Expand All @@ -173,6 +176,7 @@
"prettier": {
"singleQuote": true
},
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447",
"workspaces": {
"packages": [
"packages/api/*",
Expand Down
12 changes: 6 additions & 6 deletions packages/api/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@electron-forge/cli",
"version": "6.4.2",
"version": "7.4.0",
"description": "A complete tool for building modern Electron applications",
"repository": "https://github.com/electron/forge",
"author": "Samuel Attard",
Expand All @@ -17,18 +17,18 @@
"mocha": "^9.0.1"
},
"dependencies": {
"@electron-forge/core": "6.4.2",
"@electron-forge/shared-types": "6.4.2",
"@electron/get": "^2.0.0",
"@electron-forge/core": "7.4.0",
"@electron-forge/shared-types": "7.4.0",
"@electron/get": "^3.0.0",
"chalk": "^4.0.0",
"commander": "^4.1.1",
"debug": "^4.3.1",
"fs-extra": "^10.0.0",
"listr2": "^5.0.3",
"listr2": "^7.0.2",
"semver": "^7.2.1"
},
"engines": {
"node": ">= 14.17.5"
"node": ">= 16.4.0"
},
"funding": [
{
Expand Down
3 changes: 2 additions & 1 deletion packages/api/cli/src/electron-forge-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import workingDir from './util/working-dir';
(async () => {
let dir = process.cwd();
program
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version)
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version, '-V, --version', 'Output the current version')
.helpOption('-h, --help', 'Output usage information')
.arguments('[name]')
.action((name) => {
dir = workingDir(dir, name, false);
Expand Down
3 changes: 2 additions & 1 deletion packages/api/cli/src/electron-forge-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import workingDir from './util/working-dir';
(async () => {
let dir = process.cwd();
program
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version)
.version((await fs.readJson(path.resolve(__dirname, '../package.json'))).version, '-V, --version', 'Output the current version')
.arguments('[name]')
.option('-t, --template [name]', 'Name of the Forge template to use')
.option('-c, --copy-ci-files', 'Whether to copy the templated CI files (defaults to false)', false)
.option('-f, --force', 'Whether to overwrite an existing directory (defaults to false)', false)
.helpOption('-h, --help', 'Output usage information')
.action((name) => {
dir = workingDir(dir, name, false);
})
Expand Down
Loading

0 comments on commit 54be47e

Please sign in to comment.