Skip to content

Commit 41f4a7b

Browse files
chore: update tooling
1 parent 7d5b559 commit 41f4a7b

File tree

137 files changed

+8192
-5831
lines changed

Some content is hidden

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

137 files changed

+8192
-5831
lines changed

.cspell.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"version": "0.2",
3+
"language": "en,en-gb",
4+
"words": [
5+
"commitlint",
6+
"chunkhash",
7+
"concat",
8+
"systemjs",
9+
"tapable",
10+
"templatehash",
11+
"blueimp",
12+
"selfclosed",
13+
"nocheck",
14+
"iife",
15+
"appcache",
16+
"subresource",
17+
"startuml",
18+
"autonumber",
19+
"enduml",
20+
"chunksorter",
21+
"urlencode",
22+
"sortmode",
23+
"harddisk",
24+
"Sileghem",
25+
"Bname",
26+
"Bfile",
27+
"webpackconfig",
28+
"specialattribute",
29+
"dircompare"
30+
],
31+
"ignorePaths": [
32+
"CHANGELOG.md",
33+
"coverage",
34+
"package.json",
35+
"**/dist/**",
36+
"**/__snapshots__/**",
37+
"**/fixtures/**",
38+
"package-lock.json",
39+
"node_modules",
40+
"coverage",
41+
"*.log"
42+
]
43+
}

.editorconfig

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
root = true
22

33
[*]
4-
insert_final_newline = true
54
charset = utf-8
65
indent_style = space
76
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
89
trim_trailing_whitespace = true
910

1011
[*.md]

.eslintrc.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
env: {
3+
node: true,
4+
commonjs: true,
5+
es2021: true,
6+
},
7+
extends: "eslint:recommended",
8+
ignorePatterns: ["**/dist/**/*.js", "**/spec/fixtures/**/*.js"],
9+
overrides: [
10+
{
11+
files: [".eslintrc.{js,cjs}"],
12+
parserOptions: {
13+
sourceType: "script",
14+
},
15+
},
16+
{
17+
env: {
18+
browser: true,
19+
es2021: true,
20+
},
21+
files: ["**/examples/**"],
22+
parserOptions: {
23+
sourceType: "script",
24+
},
25+
},
26+
],
27+
parserOptions: {
28+
ecmaVersion: "latest",
29+
},
30+
rules: {},
31+
};

.github/ISSUE_TEMPLATE/bug_report.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
name: Bug report
33
about: Create a 🕷 report to help us improve
4-
54
---
65

76
<!-- If you deleting this template this issue is very likely to be closed -->
@@ -19,8 +18,8 @@ about: Create a 🕷 report to help us improve
1918
<!--
2019
2120
Please provide a minimal example how to reproduce your problem..
22-
Delete all plugins which are unrelated
23-
Delete all loaders which are unrelated
21+
Delete all plugins which are unrelated
22+
Delete all loaders which are unrelated
2423
Delete the production webpack config if your bug happens on develop
2524
Delete the develop webpack config if your bug happens only on production
2625
@@ -30,7 +29,7 @@ Feel free to use this codebox template as a starting point: https://codesandbox.
3029
## Environment 🖥
3130

3231
<!--
33-
To help you we need to know which versions you using otherwise it is impossible to help you.
32+
To help you we need to know which versions you using otherwise it is impossible to help you.
3433
Please run the following commands to see your current versions:
3534
3635
```
@@ -40,4 +39,3 @@ npm ls webpack
4039
npm ls html-webpack-plugin
4140
```
4241
-->
43-

.github/ISSUE_TEMPLATE/feature_request.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
54
---
65

76
**Is your feature request related to a problem? Please describe.**

.github/issue_template.md

+9-13
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@
44

55
- We realize there is a lot of data requested here. We ask only that you do your best to provide as much information as possible so we can better help you.
66
- Support questions are better asked in one of the following locations:
7-
- [Stack Overflow](http://stackoverflow.com/questions/tagged/html-webpack-plugin)
7+
- [Stack Overflow](http://stackoverflow.com/questions/tagged/html-webpack-plugin)
88
- Ensure the issue isn't already reported.
99
- Should be reproducible with the latest version of `html-webpack-plugin`.
10-
- (Ensure `npm ls html-webpack-plugin` matches ![](https://img.shields.io/npm/v/html-webpack-plugin.svg))
11-
12-
*Delete the above section and the instructions in the sections below before submitting*
10+
- (Ensure `npm ls html-webpack-plugin` matches ![](https://img.shields.io/npm/v/html-webpack-plugin.svg))
1311

12+
_Delete the above section and the instructions in the sections below before submitting_
1413

1514
## Description
1615

1716
If this is a feature request, explain why it should be added. Specific use-cases are best.
1817

19-
For bug reports, please provide as much *relevant* info as possible.
18+
For bug reports, please provide as much _relevant_ info as possible.
2019

2120
### Error Message & Stack Trace
2221

@@ -50,23 +49,20 @@ module.exports = {
5049
Copy your template file:
5150

5251
```html
53-
<!DOCTYPE html>
52+
<!doctype html>
5453
<html>
55-
<head>
56-
<title>My App</title>
57-
</head>
58-
<body>
59-
</body>
54+
<head>
55+
<title>My App</title>
56+
</head>
57+
<body></body>
6058
</html>
6159
```
6260

63-
6461
## Relevant Links
6562

6663
- If your project is public, link to the repo so we can investigate directly.
6764
- **BONUS POINTS:** Create a [minimal reproduction](http://stackoverflow.com/help/mcve) and upload it to GitHub. This will get you the fastest support.
6865

69-
7066
## Environment
7167

7268
Tell us which operating system you are using, as well as which versions of Node.js, npm, webpack, and html-webpack-plugin. Run the following to get it quickly:

.github/lock.yml

-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ lockComment: false
1111

1212
# Number of days of inactivity before a closed issue or pull request is locked
1313
daysUntilLock: 30
14-

.github/stale.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ staleLabel: wontfix
1111
# Comment to post when marking an issue as stale. Set to `false` to disable
1212
markComment: >
1313
**This issue had no activity for at least half a year.**
14-
It's subject to automatic issue closing if there is no activity in the next 15 days.
14+
It's subject to automatic issue closing if there is no activity in the next 15 days.
1515
# Comment to post when closing a stale issue. Set to `false` to disable
16-
closeComment: false
16+
closeComment: false

.github/workflows/main.yml

+67-15
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,86 @@ on:
77
branches:
88
- main
99
jobs:
10+
lint:
11+
name: Lint - ${{ matrix.os }} - Node v${{ matrix.node-version }}
12+
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest]
19+
node-version: [lts/*]
20+
21+
runs-on: ${{ matrix.os }}
22+
23+
concurrency:
24+
group: lint-${{ matrix.os }}-v${{ matrix.node-version }}-${{ github.ref }}
25+
cancel-in-progress: true
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Use Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
cache: "npm"
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Lint
42+
run: npm run lint
43+
44+
- name: Security audit
45+
run: npm run security -- --only=prod
46+
47+
- name: Check commit message
48+
uses: wagoid/commitlint-github-action@v5
49+
1050
build:
1151
name: test Node ${{ matrix.node }} Webpack ${{ matrix.webpack }} ${{ matrix.os }}
1252
timeout-minutes: 15
1353

1454
runs-on: ${{ matrix.os }}
55+
56+
concurrency:
57+
group: test-${{ matrix.os }}-v${{ matrix.node-version }}-${{ matrix.webpack-version }}-${{ github.ref }}
58+
cancel-in-progress: true
59+
1560
strategy:
1661
matrix:
17-
node: ['10.x', '12.x', '14.x', '16.x', '18.x', '20.x']
62+
node: ["10.x", "12.x", "14.x", "16.x", "18.x", "20.x"]
1863
os: [ubuntu-latest, windows-latest, macOS-latest]
19-
webpack: ['5']
64+
webpack: [latest]
2065

2166
steps:
22-
- name: LF
23-
run: git config --global core.autocrlf false
67+
- name: Setup Git
68+
if: matrix.os == 'windows-latest'
69+
run: git config --global core.autocrlf input
2470

25-
- name: Checkout repo
26-
uses: actions/checkout@v2
71+
- uses: actions/checkout@v4
2772

28-
- name: Use Node ${{ matrix.node }}
29-
uses: actions/setup-node@v1
73+
- name: Use Node.js ${{ matrix.node-version }}
74+
uses: actions/setup-node@v4
3075
with:
31-
node-version: ${{ matrix.node }}
76+
node-version: ${{ matrix.node-version }}
77+
cache: "npm"
3278

33-
- name: Install Dependencies
34-
run: npm install --ignore-scripts --force --legacy-peer-deps
79+
- name: Install dependencies
80+
run: npm ci
3581

36-
- name: Install Webpack ${{ matrix.webpack }}
37-
run: npm install --ignore-scripts --force --legacy-peer-deps webpack@${{ matrix.webpack }}
82+
- name: Install webpack ${{ matrix.webpack-version }}
83+
if: matrix.webpack-version != 'latest'
84+
run: npm i webpack@${{ matrix.webpack-version }}
3885

39-
- name: Test
40-
run: npm test -- --forceExit || npm test -- --forceExit || npm test -- --forceExit
86+
- name: Run tests for webpack version ${{ matrix.webpack-version }}
87+
run: npm run test:coverage -- --ci
88+
89+
- name: Submit coverage data to codecov
90+
uses: codecov/codecov-action@v4
91+
with:
92+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
npm-debug.*.log
55
yarn.lock
66
npm-debug.log.*
7+
/.idea/
8+
.eslintcache
9+
.cspellcache

.husky/commit-msg

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no-install commitlint --edit $1

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no-install lint-staged

.prettierignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/coverage
2+
/dist
3+
/node_modules
4+
/spec/fixtures
5+
CHANGELOG.md
6+
examples/*/dist

0 commit comments

Comments
 (0)