Skip to content

Commit 25042b6

Browse files
committed
Merge branch 'release/4.1.3'
2 parents 518480e + 3fba67c commit 25042b6

34 files changed

+2450
-2515
lines changed

.eslintrc.cjs

+2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ const specialConfig = {
8989
files: [
9090
'**/*.config.js',
9191
'**/*.config.cjs',
92+
'**/*.config.mjs',
9293
'**/*.config.*.js',
9394
'**/*.config.*.cjs',
95+
'**/*.config.*.mjs',
9496
],
9597
rules: {
9698
...baseConfig.rules,

.github/ISSUE_TEMPLATE.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 👉 [Please follow one of these issue templates](https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/issues/new/choose) 👈
2+
3+
Note: to keep the backlog clean and actionable, issues may be immediately closed if they do not follow one of the above issue templates.

.github/ISSUE_TEMPLATE/bug.yml

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Bug Report 🪲
2+
description: Create a bug report to help us improve
3+
title: '[Bug]: '
4+
labels: ['Bug Report']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
# Please follow these steps first:
10+
- type: markdown
11+
attributes:
12+
value: |
13+
## Troubleshoot
14+
If the boilerplate is not behaving the way you expect, we'd ask you to look at the [README](https://github.com/Devtography/electron-react-typescript-webpack-boilerplate#readme) and search the issue tracker before submitting the issue. Please make reasonable efforts to troubleshoot and rule out issues with your code, the configuration, or any 3rd party libraries you might be using.
15+
- type: markdown
16+
attributes:
17+
value: |
18+
## Ask for help through appropriate channels
19+
If you feel unsure about the cause of the problem, consider asking for help on for example [StackOverflow](https://stackoverflow.com/questions/ask) or our [Discussions section](https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/discussions) before posting a bug report. This issue tracker is not a help forum.
20+
- type: markdown
21+
attributes:
22+
value: |
23+
## Make a minimal reproduction
24+
To file the report, you will need a GitHub repository with a minimal (but complete) example and simple/clear steps on how to reproduce the bug. If all your tests fail with a strange error, can you find a way to show us with just one? If you have many extra configuration options in your config files, can you simplify them?
25+
26+
The simpler you can make it, the more likely we are to successfully verify and fix the bug.
27+
- type: markdown
28+
attributes:
29+
value: |
30+
:bangbang: Bug reports without a minimal reproduction will be rejected. :bangbang:
31+
32+
---
33+
34+
- type: input
35+
id: version
36+
attributes:
37+
label: Version
38+
description: |
39+
The version of ERTW boilerplate you are using.
40+
Is it the [latest](https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/releases)? Test and see if the bug has already been fixed.
41+
placeholder: ex. 4.1.2
42+
validations:
43+
required: true
44+
- type: textarea
45+
id: reproduction
46+
attributes:
47+
label: Steps to reproduce
48+
description: Please link to a repository with a minimal reproduction and describe accurately how we can reproduce/verify the bug.
49+
placeholder: |
50+
Example steps (replace with your own):
51+
1. Clone my repo at https://github.com/<username>/example
52+
2. npm ci
53+
3. npm test
54+
4. You should see the error comes up
55+
validations:
56+
required: true
57+
- type: textarea
58+
id: expected
59+
attributes:
60+
label: Expected behaviour
61+
description: A description of what you expect to happen.
62+
placeholder: I expect to see X or Y
63+
validations:
64+
required: true
65+
- type: textarea
66+
id: what-happened
67+
attributes:
68+
label: Actual behaviour
69+
description: A clear and concise description of the unexpected behaviour.
70+
placeholder: A bug happened!
71+
validations:
72+
required: true
73+
- type: textarea
74+
id: context
75+
attributes:
76+
label: Additional context
77+
description: Anything else that might be relevant.
78+
validations:
79+
required: true
80+
- type: textarea
81+
id: envinfo
82+
attributes:
83+
label: Environment
84+
description: |
85+
Please paste the output of running `npx envinfo --system --binaries --npmPackages`
86+
placeholder: |
87+
System:
88+
OS: Linux 5.4 Ubuntu 20.04.4 LTS (Focal Fossa)
89+
CPU: (4) x64 Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
90+
Memory: 5.10 GB / 7.77 GB
91+
Container: Yes
92+
Shell: 5.0.17 - /bin/bash
93+
Binaries:
94+
Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
95+
Yarn: 1.22.15 - /opt/yarn/stable/bin/yarn
96+
npm: 8.19.1 - ~/.nvm/versions/node/v16.17.0/bin/npm
97+
npmPackages:
98+
@types/jest: ^28.1.6 => 28.1.6
99+
@types/react: ^18.0.17 => 18.0.17
100+
@types/react-dom: ^18.0.6 => 18.0.6
101+
@typescript-eslint/eslint-plugin: ^5.33.0 => 5.33.0
102+
@typescript-eslint/parser: ^5.33.0 => 5.33.0
103+
cross-env: ^7.0.3 => 7.0.3
104+
electron: ^20.0.2 => 20.0.2
105+
eslint: ^8.22.0 => 8.22.0
106+
eslint-config-airbnb: ^19.0.4 => 19.0.4
107+
eslint-config-airbnb-typescript: ^17.0.0 => 17.0.0
108+
eslint-import-resolver-typescript: ^3.4.1 => 3.4.1
109+
eslint-plugin-import: ^2.26.0 => 2.26.0
110+
eslint-plugin-jest: ^26.8.2 => 26.8.2
111+
eslint-plugin-jsx-a11y: ^6.6.1 => 6.6.1
112+
eslint-plugin-react: ^7.30.1 => 7.30.1
113+
eslint-plugin-react-hooks: ^4.6.0 => 4.6.0
114+
jest: ^28.1.3 => 28.1.3
115+
react: ^18.2.0 => 18.2.0
116+
react-dom: ^18.2.0 => 18.2.0
117+
ts-jest: ^28.0.7 => 28.0.7
118+
typescript: ^4.7.4 => 4.7.4
119+
render: Shell
120+
validations:
121+
required: true
122+

.github/ISSUE_TEMPLATE/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/ISSUE_TEMPLATE/feature.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Feature Proposal 🚀
2+
description: Submit a proposal for a new feature
3+
title: '[Feature]: '
4+
labels: [':rocket: Feature Request']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
### Thank you for taking the time to suggest a new feature!
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: '🚀 Feature Proposal'
14+
description: A clear and concise description of what the feature is.
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: solution
19+
attributes:
20+
label: Motivation
21+
description: Outline your motivation for the proposal. How will it make the boilerplate better?
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: example
26+
attributes:
27+
label: Example
28+
description: Describe how this feature would be used.
29+
validations:
30+
required: false
31+
- type: textarea
32+
id: extra
33+
attributes:
34+
label: Pitch
35+
description: Why does this feature belong in the boilerplate?
36+
validations:
37+
required: true
38+
- type: markdown
39+
attributes:
40+
value: |
41+
Common proposals that do not typically make it into the boilerplate:
42+
43+
- Experimental features
44+
- Uncommon features/settings for Electron apps development

.github/ISSUE_TEMPLATE/question.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Questions / Help 💬'
2+
description: If you have question, please check StackOverflow first for the relevant package(s) in concern
3+
title: '[Please read the message below]'
4+
labels: [':speech_balloon: Question']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
## Questions and Help 💬
10+
11+
This issue tracker is reserved for bug reports and feature proposals.
12+
13+
For anything else, such as questions or getting help, please see:
14+
15+
- [Discussions](https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/discussions)
16+
- [StackOverflow](https://stackoverflow.com) for whichever package(s) in concern
17+
18+
If you're having questions about the boilerplate or want to ask for help, start a thread in [Discussions](https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/discussions) instead.
19+
- type: checkboxes
20+
id: no-post
21+
attributes:
22+
label: Please do not submit this issue.
23+
description: |
24+
:bangbang: This issue will be closed. :bangbang:
25+
options:
26+
- label: I understand
27+
required: true

.github/PULL_REQUEST_TEMPLATE.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. -->
2+
3+
<!-- Please remember to update CHANGELOG.md at the root of the project if you have not done so. -->
4+
5+
## Summary
6+
7+
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
8+
9+
## Test plan
10+
11+
<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. -->

.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: daily

.github/workflows/build.yml

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Build app package
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
os:
7+
required: true
8+
type: string
9+
test-only:
10+
required: false
11+
type: boolean
12+
13+
jobs:
14+
setup-matrix:
15+
runs-on: ${{ inputs.os }}
16+
outputs:
17+
node_versions: ${{ steps.generate-matrix.outputs.node_versions }}
18+
steps:
19+
- name: Generate matrix
20+
id: generate-matrix
21+
run: |
22+
if [ "${{ inputs.test-only }}" = "true" ]; then
23+
VERSIONS='["14.x", "16.x"]'
24+
else
25+
VERSIONS='["16.x"]'
26+
fi
27+
echo ::set-output name=node_versions::"$VERSIONS"
28+
shell: bash
29+
30+
build-app-package:
31+
needs: setup-matrix
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
node-version: ${{ fromJSON(needs.setup-matrix.outputs.node_versions) }}
36+
name: Build app package with Node v${{ matrix.node-version }} on ${{ inputs.os }}
37+
runs-on: ${{ inputs.os }}
38+
39+
steps:
40+
- uses: actions/checkout@v3
41+
42+
- name: Use Node.js ${{ matrix.node-version }}
43+
uses: actions/setup-node@v3
44+
with:
45+
node-version: ${{ matrix.node-version }}
46+
cache: npm
47+
48+
- name: Prepare Webpack bundle cache
49+
id: cache-webpack-bundles
50+
uses: actions/cache@v3
51+
with:
52+
path: ./dist
53+
key: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-webpack-${{ inputs.os }}
54+
55+
- name: Install
56+
run: npm ci
57+
58+
- if: ${{ steps.cache-webpack-bundles.outputs.cache-hit != 'true' }}
59+
name: Run webpack
60+
run: npm run prod
61+
62+
- if: ${{ inputs.os == 'ubuntu-latest' }}
63+
name: Build app package on ${{ inputs.os }}
64+
run: |
65+
echo "Build on Linux is not yet supported."
66+
exit 1
67+
68+
- if: ${{ inputs.os == 'macos-latest' }}
69+
name: Build Windows & mac app packages on ${{ inputs.os }}
70+
run: |
71+
if [ "${{ inputs.test-only }}" = "true" ]; then
72+
npm run build:mac -- --publish never
73+
npm run build:win -- --publish never
74+
else
75+
npm run build:mac
76+
npm run build:win
77+
fi
78+
79+
- if: ${{ inputs.os == 'windows-latest' }}
80+
name: Build Windows app package on ${{ inputs.os }}
81+
run: |
82+
if [ "${{ inputs.test-only }}" = "true" ]; then
83+
npm run build:win -- --publish never
84+
else
85+
npm run build:win
86+
fi
87+
shell: bash

.github/workflows/close-stale.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Close stale issues and PRs
2+
3+
on:
4+
schedule:
5+
- cron: '0 23 * * *'
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
11+
jobs:
12+
stale:
13+
name: Close month old issues and PRs
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/stale@v6
17+
with:
18+
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
19+
stale-pr-message: 'This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
20+
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issus is still relevant, linking to this one.'
21+
close-pr-message: 'This PR was closed because it has been stalled for 14 days with no activity. Please open a new PR if the issue is still relevant, linking to this one.'
22+
days-before-issue-stale: 30
23+
days-before-pr-stale: 90
24+
days-before-issue-close: 7
25+
days-before-pr-close: 14
26+
exempt-all-milestones: true
27+
exempt-issue-labels: Pinned
28+
exempt-draft-pr: true

.github/workflows/issues.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'Close issues'
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
7+
jobs:
8+
questions:
9+
name: Questions
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Close issue
13+
uses: peter-evans/close-issue@v2
14+
if: "${{ github.event.label.name == ':speech_ballon: Question' }}"
15+
with:
16+
comment: Please note this issue tracker is not a help forum. We recommend using [Discussions](https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/discussions) for questions.
17+
bug-without-repro:
18+
name: Bug reports without reproductions
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Close issue
22+
uses: peter-evans/close-issue@v2
23+
if: "${{ github.event.label.name == 'Needs Reproduction' }}"
24+
with:
25+
comment: As noted in the [Bug Report template](https://github.com/Devtography/electron-react-typescript-webpack-boilerplate/blob/develop/.github/ISSUE_TEMPLATE/bug.yml), all bug reports require a minimal reproduction. Please open a new issue providing one. Read more at https://stackoverflow.com/help/minimal-reproducible-example.

0 commit comments

Comments
 (0)