Skip to content

Commit

Permalink
Merge branch 'main' into fix-vscode-debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
VerteDinde authored Feb 7, 2024
2 parents 9d7d4a0 + 4a010d6 commit 5025ee0
Show file tree
Hide file tree
Showing 397 changed files with 16,544 additions and 10,381 deletions.
171 changes: 171 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
version: 2.1

orbs:
node: electronjs/[email protected]

commands:
install:
steps:
- run: git config --global core.autocrlf input
- node/install:
node-version: '18.15.0'
- checkout
run-lint-and-build:
steps:
- node/install-packages
- run:
name: 'Lint codebase'
command: |
yarn lint
yarn syncpack
- run:
name: 'Build Electron Forge'
command: |
yarn build
run-fast-tests:
steps:
- node/install-packages:
with-cache: false
- attach_workspace:
at: .
- run:
name: 'Run fast tests'
command: |
yarn test:fast
run-slow-tests:
steps:
- node/install-packages:
with-cache: false
- attach_workspace:
at: .
- run:
name: 'Run slow tests'
command: |
echo $(circleci tests glob "packages/**/*_spec_slow.ts")
TEST_GLOB=$(circleci tests glob "packages/**/*_spec_slow.ts" | circleci tests split --split-by=timings)
yarn test $TEST_GLOB
jobs:
lint-and-build:
executor: node/linux
steps:
- install
- run-lint-and-build
- persist_to_workspace:
root: .
paths:
- packages/*/*/dist/*

fast-tests:
parameters:
executor:
type: string
arch:
type: enum
enum: ['x64', 'arm64']
executor: << parameters.executor >>
steps:
- install
- when:
condition:
equal: [node/linux, << parameters.executor >>]
steps:
- run:
name: Linux specific setup
command: |
sudo apt-get update
sudo apt-get install -y \
--no-install-recommends \
xvfb \
libnss3 \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libgdk-pixbuf2.0-dev \
libgtk-3-0 \
libgbm1
sudo add-apt-repository -y ppa:alexlarsson/flatpak
- run-fast-tests
- store_test_results:
path: ./reports/
slow-tests:
parameters:
executor:
type: string
arch:
type: enum
enum: ['x64', 'arm64']
executor: << parameters.executor >>
parallelism: 2
steps:
- install
- when:
condition:
equal: [node/windows, << parameters.executor >>]
steps:
- run:
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"
cd 'C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\run-script'
npm install [email protected]
- when:
condition:
equal: [node/linux, << parameters.executor >>]
steps:
- run:
name: Linux specific setup
command: |
sudo apt-get update
sudo apt-get install -y \
--no-install-recommends \
xvfb \
libnss3 \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libgdk-pixbuf2.0-dev \
libgtk-3-0 \
libgbm1
- run-slow-tests
- run:
when: always # the report is generated on pass or fail
name: Make test report paths relative
command: |
if [ -e ./reports/out/test_output.xml ]; then
sed -i.bak "s|`pwd`/||g" ./reports/out/test_output.xml
fi
- store_test_results:
path: ./reports/

workflows:
tests:
jobs:
- lint-and-build
- fast-tests:
requires:
- lint-and-build
matrix:
parameters:
executor: [node/windows, node/linux, node/macos]
arch: [x64, arm64]
exclude:
- executor: node/windows
arch: arm64
- executor: node/linux
arch: arm64
- slow-tests:
requires:
- lint-and-build
matrix:
parameters:
executor: [node/windows, node/linux, node/macos]
arch: [x64, arm64]
exclude:
- executor: node/windows
arch: arm64
- executor: node/linux
arch: arm64
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
40 changes: 36 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"plugins": ["mocha"],
"plugins": ["mocha", "import"],
"env": {
"mocha": true
},
Expand All @@ -17,13 +17,38 @@
"vars": "all"
}
],
"mocha/no-exclusive-tests": "error"
"mocha/no-exclusive-tests": "error",
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true,
"allowSeparatedGroups": true,
"ignoreCase": true
}
],
"import/no-named-as-default": "error"
},
"overrides": [
{
"files": ["**/*.ts"],
"extends": ["@malept/eslint-config/src/typescript"],
"parserOptions": {
"project": ["./tsconfig.base.json"]
},
"rules": {
"no-throw-literal": "off",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
Expand All @@ -36,16 +61,23 @@
}
},
{
"files": ["packages/*/*/test/**/*_spec*.ts"],
"files": ["ci/**/*.js"],
"rules": {
"node/no-unpublished-require": "off"
}
},
{
"files": ["packages/*/*/test/**/*_spec*.ts", "packages/*/*/test/fixture/**/*.ts"],
"rules": {
"global-require": "off",
"import/no-dynamic-require": "off",
"node/no-extraneous-import": "off",
"node/no-unpublished-import": "off",
"node/no-unpublished-require": "off"
}
},
{
"files": ["packages/api/cli/src/**/*.ts", "tools/*.{js,ts}"],
"files": ["packages/api/cli/src/**/*.ts", "packages/external/create-electron-app/src/**/*.ts", "tools/*.{js,ts}"],
"rules": {
"no-process-exit": "off",
"node/shebang": [
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @electron/wg-ecosystem
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
attributes:
label: Pre-flight checklist
options:
- label: I have read the [contribution documentation](https:/electron-userland/electron-forge/blob/master/CONTRIBUTING.md) for this project.
- label: I have read the [contribution documentation](https:/electron/forge/blob/main/CONTRIBUTING.md) for this project.
required: true
- label: I agree to follow the [code of conduct](https:/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
attributes:
label: Pre-flight checklist
options:
- label: I have read the [contribution documentation](https:/electron-userland/electron-forge/blob/master/CONTRIBUTING.md) for this project.
- label: I have read the [contribution documentation](https:/electron/forge/blob/main/CONTRIBUTING.md) for this project.
required: true
- label: I agree to follow the [code of conduct](https:/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
required: true
Expand Down
39 changes: 1 addition & 38 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,6 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
# Check the npm registry for updates every weekday
schedule:
interval: 'daily'
ignore: # Everything not annotated here is documented in tools/update-dependencies.js
# @aws-sdk/* upgrades too often, do this manually
- dependency-name: '@aws-sdk/abort-controller'
- dependency-name: '@aws-sdk/client-s3'
- dependency-name: '@aws-sdk/lib-storage'
- dependency-name: '@aws-sdk/types'
- dependency-name: '@types/node-fetch'
- dependency-name: 'chalk'
- dependency-name: commander
- dependency-name: electron-osx-sign
- dependency-name: eslint-plugin-mocha
- dependency-name: find-up
- dependency-name: log-symbols
- dependency-name: node-fetch
- dependency-name: ora
- dependency-name: username
- package-ecosystem: 'npm'
directory: '/packages/template/typescript/tmpl'
# Check the npm registry for updates every weekday
schedule:
interval: 'daily'
- package-ecosystem: 'npm'
directory: '/packages/template/typescript-webpack/tmpl'
# Check the npm registry for updates every weekday
schedule:
interval: 'daily'
- package-ecosystem: 'npm'
directory: '/packages/template/webpack/tmpl'
# Check the npm registry for updates every weekday
schedule:
interval: 'daily'
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
# Check for updates to GitHub Actions every weekday
interval: 'daily'
interval: 'monthly'
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Thanks for filing a pull request!
Please check off all of the steps as they are completed by replacing [ ] with [x].
-->

- [ ] I have read the [contribution documentation](https:/electron-userland/electron-forge/blob/master/CONTRIBUTING.md) for this project.
- [ ] I agree to follow the [code of conduct](https:/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project follows, as appropriate.
- [ ] I have read the [contribution documentation](https:/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [ ] I agree to follow the [code of conduct](https:/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project follows, as appropriate.
- [ ] The changes are appropriately documented (if applicable).
- [ ] The changes have sufficient test coverage (if applicable).
- [ ] The testsuite passes successfully on my local machine (if applicable).
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Add to Ecosystem WG Project

on:
issues:
types:
- opened
pull_request_target:
types:
- opened

permissions: {}

jobs:
add-to-project:
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
id: generate-token
with:
creds: ${{ secrets.ECOSYSTEM_ISSUE_TRIAGE_GH_APP_CREDS }}
org: electron
- name: Add to Project
uses: dsanders11/project-actions/add-item@82e99438bd44a14ad18d92d036dbc25cbfb9a8c4 # v1.2.0
with:
field: Opened
field-value: ${{ github.event.pull_request.created_at || github.event.issue.created_at }}
project-number: 89
token: ${{ steps.generate-token.outputs.token }}
Loading

0 comments on commit 5025ee0

Please sign in to comment.