Skip to content

Commit 6d26642

Browse files
authored
Merge branch 'master' into wcoments
2 parents b18f791 + de760f6 commit 6d26642

Some content is hidden

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

54 files changed

+11608
-13726
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
22
root: true,
3+
reportUnusedDisableDirectives: true,
34
extends: ["@webpack-contrib/eslint-config-webpack", "prettier"],
45
overrides: [
56
{

.github/ISSUE_TEMPLATE/BUG.md

+19-34
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,33 @@ name: 🐛 Bug Report
33
about: Something went awry and you'd like to tell us about it.
44
---
55

6-
<!--
7-
Issues are so 🔥
6+
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
7+
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
88

9-
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
10-
of Github will appear and pile-drive the close button from a great height
11-
while making animal noises.
9+
### Bug report
1210

13-
👉🏽 Need support, advice, or help? Don't open an issue!
14-
Head to StackOverflow or https://gitter.im/webpack/webpack.
15-
-->
16-
17-
- Operating System:
18-
- Node Version:
19-
- NPM Version:
20-
- webpack Version:
21-
- webpack-dev-middleware Version:
22-
23-
### Expected Behavior
24-
25-
<!-- Remove this section if not reporting a bug or modification request. -->
11+
<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
12+
<!-- https://github.com/webpack/webpack/discussions -->
13+
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
14+
<!-- https://gitter.im/webpack/webpack -->
15+
<!-- Issues which contain questions or support requests will be closed. -->
2616

2717
### Actual Behavior
2818

29-
<!-- Remove this section if not reporting a bug or modification request. -->
30-
31-
### Code
19+
<!-- Explain exactly how it behaves -->
3220

33-
```js
34-
// webpack.config.js
35-
// If your code blocks are over 20 lines, please paste a link to a gist
36-
// (https://gist.github.com).
37-
```
21+
### Expected Behavior
3822

39-
```js
40-
// additional code, HEY YO remove this block if you don't need it
41-
```
23+
<!-- "It should work" is not a helpful explanation -->
24+
<!-- Explain exactly how it should behave -->
4225

4326
### How Do We Reproduce?
4427

45-
<!--
46-
Remove this section if not reporting a bug.
28+
<!-- A great way to do this is to provide your configuration via a GitHub repository -->
29+
<!-- The most helpful is a minimal reproduction with instructions on how to reproduce -->
30+
<!-- Repositories with too many files or large `webpack.config.js` files are not suitable -->
31+
<!-- Please only add small code snippets directly into this issue -->
32+
<!-- https://gist.github.com is a good place for longer code snippets -->
33+
<!-- If your issue is caused by a plugin or loader, please create an issue on the loader/plugin repository instead -->
4734

48-
If your webpack config is over 50 lines long, please provide a URL to a repo
49-
for your beefy 🍖 app that we can use to reproduce.
50-
-->
35+
### Please paste the results of `npx webpack-cli info` here, and mention other relevant information

.github/ISSUE_TEMPLATE/DOCS.md

+8-10
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,8 @@ name: 📚 Documentation
33
about: Are the docs lacking or missing something? Do they need some new 🔥 hotness? Tell us here.
44
---
55

6-
<!--
7-
Issues are so 🔥
8-
9-
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
10-
of Github will appear and pile-drive the close button from a great height
11-
while making animal noises.
12-
13-
👉🏽 Need support, advice, or help? Don't open an issue!
14-
Head to StackOverflow or https://gitter.im/webpack/webpack.
15-
-->
6+
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
7+
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
168

179
Documentation Is:
1810

@@ -25,4 +17,10 @@ Documentation Is:
2517

2618
### Please Explain in Detail...
2719

20+
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
21+
<!-- https://github.com/webpack/webpack/discussions -->
22+
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
23+
<!-- https://gitter.im/webpack/webpack -->
24+
<!-- Issues which contain questions or support requests will be closed. -->
25+
2826
### Your Proposal for Changes

.github/ISSUE_TEMPLATE/FEATURE.md

+10-16
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,17 @@ name: ✨ Feature Request
33
about: Suggest an idea for this project
44
---
55

6-
<!--
7-
Issues are so 🔥
8-
9-
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
10-
of Github will appear and pile-drive the close button from a great height
11-
while making animal noises.
12-
13-
👉🏽 Need support, advice, or help? Don't open an issue!
14-
Head to StackOverflow or https://gitter.im/webpack/webpack.
15-
-->
16-
17-
- Operating System:
18-
- Node Version:
19-
- NPM Version:
20-
- webpack Version:
21-
- webpack-dev-middleware Version:
6+
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
7+
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
228

239
### Feature Proposal
2410

11+
<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
12+
<!-- https://github.com/webpack/webpack/discussions -->
13+
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
14+
<!-- https://gitter.im/webpack/webpack -->
15+
<!-- Issues which contain questions or support requests will be closed. -->
16+
2517
### Feature Use Case
18+
19+
### Please paste the results of `npx webpack-cli info` here, and mention other relevant information

.github/ISSUE_TEMPLATE/MODIFICATION.md

+9-15
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,19 @@ name: 🔧 Modification Request
33
about: Would you like something work differently? Have an alternative approach? This is the template for you.
44
---
55

6-
<!--
7-
Issues are so 🔥
6+
<!-- Please don't delete this template otherwise your issue will be closed immediately -->
7+
<!-- Before creating an issue please make sure you are using the latest version of webpack. -->
88

9-
If you remove or skip this template, you'll make the 🐼 sad and the mighty god
10-
of Github will appear and pile-drive the close button from a great height
11-
while making animal noises.
12-
13-
👉🏽 Need support, advice, or help? Don't open an issue!
14-
Head to StackOverflow or https://gitter.im/webpack/webpack.
15-
-->
9+
### Modification Proposal
1610

17-
- Operating System:
18-
- Node Version:
19-
- NPM Version:
20-
- webpack Version:
21-
- webpack-dev-middleware Version:
11+
<!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. -->
12+
<!-- https://github.com/webpack/webpack/discussions -->
13+
<!-- https://stackoverflow.com/questions/ask?tags=webpack -->
14+
<!-- https://gitter.im/webpack/webpack -->
15+
<!-- Issues which contain questions or support requests will be closed. -->
2216

2317
### Expected Behavior / Situation
2418

2519
### Actual Behavior / Situation
2620

27-
### Modification Proposal
21+
### Please paste the results of `npx webpack-cli info` here, and mention other relevant information

.github/ISSUE_TEMPLATE/SUPPORT.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
name: 🆘 Support, Help, and Advice
3-
about: 👉🏽 Need support, help, or advice? Don't open an issue! Head to StackOverflow or https://gitter.im/webpack/webpack.
3+
about: 👉🏽 Need support, help, or advice? Don't open an issue! Head to https://github.com/webpack/webpack/discussions, StackOverflow or https://gitter.im/webpack/webpack.
44
---
55

66
Hey there! If you need support, help, or advice then this is not the place to ask.
7-
Please visit [StackOverflow](https://stackoverflow.com/questions/tagged/webpack)
7+
Please visit [Discussions](https://github.com/webpack/webpack/discussions), [StackOverflow](https://stackoverflow.com/questions/tagged/webpack)
88
or [the Webpack Gitter](https://gitter.im/webpack/webpack) instead.

.github/PULL_REQUEST_TEMPLATE.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This PR contains a:
1414
- [ ] new **feature**
1515
- [ ] **code refactor**
1616
- [ ] **test update** <!-- if bug or feature is checked, this should be too -->
17+
- [ ] **documentation update**
1718
- [ ] **typo fix**
1819
- [ ] **metadata update**
1920

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "Dependency Review"
2+
on: [pull_request]
3+
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
dependency-review:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: "Checkout Repository"
12+
uses: actions/checkout@v3
13+
- name: "Dependency Review"
14+
uses: actions/dependency-review-action@v3

.github/workflows/nodejs.yml

+27-38
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- master
1111
- next
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
lint:
1518
name: Lint - ${{ matrix.os }} - Node v${{ matrix.node-version }}
@@ -20,87 +23,73 @@ jobs:
2023
strategy:
2124
matrix:
2225
os: [ubuntu-latest]
23-
node-version: [12.x]
26+
node-version: [lts/*]
2427

2528
runs-on: ${{ matrix.os }}
2629

30+
concurrency:
31+
group: lint-${{ matrix.os }}-v${{ matrix.node-version }}-${{ github.ref }}
32+
cancel-in-progress: true
2733
steps:
28-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v3
2935
with:
3036
fetch-depth: 0
3137

3238
- name: Use Node.js ${{ matrix.node-version }}
33-
uses: actions/setup-node@v1
39+
uses: actions/setup-node@v3
3440
with:
3541
node-version: ${{ matrix.node-version }}
36-
37-
- name: Use latest NPM
38-
run: sudo npm i -g npm
42+
cache: "npm"
3943

4044
- name: Install dependencies
4145
run: npm ci
4246

4347
- name: Lint
4448
run: npm run lint
4549

50+
- name: Build types
51+
run: npm run build:types
52+
53+
- name: Check types
54+
run: if [ -n "$(git status types --porcelain)" ]; then echo "Missing types. Update types by running 'npm run build:types'"; exit 1; else echo "All types are valid"; fi
55+
4656
- name: Security audit
4757
run: npm run security
4858

4959
- name: Check commit message
50-
uses: wagoid/commitlint-github-action@v1
60+
uses: wagoid/commitlint-github-action@v4
5161

5262
test:
5363
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
5464

5565
strategy:
5666
matrix:
5767
os: [ubuntu-latest, windows-latest, macos-latest]
58-
node-version: [12.x, 14.x, 16.x]
59-
webpack-version: [4, latest]
68+
node-version: [14.x, 16.x, 18.x, 19.x]
69+
webpack-version: [latest]
6070

6171
runs-on: ${{ matrix.os }}
6272

73+
concurrency:
74+
group: test-${{ matrix.os }}-v${{ matrix.node-version }}-${{ matrix.webpack-version }}-${{ github.ref }}
75+
cancel-in-progress: true
76+
6377
steps:
64-
- uses: actions/checkout@v2
78+
- uses: actions/checkout@v3
6579

6680
- name: Use Node.js ${{ matrix.node-version }}
67-
uses: actions/setup-node@v1
81+
uses: actions/setup-node@v3
6882
with:
6983
node-version: ${{ matrix.node-version }}
70-
71-
- name: Use latest NPM on ubuntu/macos
72-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
73-
run: sudo npm i -g npm
74-
75-
- name: Use latest NPM on windows
76-
if: matrix.os == 'windows-latest'
77-
run: npm i -g npm
78-
79-
- name: Get npm cache directory
80-
id: npm-cache-dir
81-
run: |
82-
echo "::set-output name=dir::$(npm config get cache)"
83-
84-
- name: Cache Node.js modules
85-
id: cache
86-
uses: actions/cache@v2
87-
with:
88-
path: ${{ steps.npm-cache-dir.outputs.dir }}
89-
key: ${{ runner.os }}-${{ matrix.webpack-version }}-node-${{ hashFiles('**/package-lock.json') }}
90-
restore-keys: |
91-
${{ runner.os }}-${{ matrix.webpack-version }}-node-
84+
cache: "npm"
9285

9386
- name: Install dependencies
9487
run: npm ci
9588

96-
- name: Install webpack ${{ matrix.webpack-version }}
97-
if: matrix.webpack-version == '4'
98-
run: npm i webpack@${{ matrix.webpack-version }}
99-
10089
- name: Run tests for webpack version ${{ matrix.webpack-version }}
10190
run: npm run test:coverage -- --ci
10291

10392
- name: Submit coverage data to codecov
104-
uses: codecov/codecov-action@v1
93+
uses: codecov/codecov-action@v3
10594
with:
10695
token: ${{ secrets.CODECOV_TOKEN }}

.husky/.gitignore

-1
This file was deleted.

.husky/commit-msg

100644100755
File mode changed.

.husky/pre-commit

100644100755
File mode changed.

0 commit comments

Comments
 (0)