Skip to content

Commit ca9100c

Browse files
committed
Test on Node 18 and drop EOL Node 10
Updated lock-file to fix npm/cli#4859. Updated integration-tests to webpack 5 to fix webpack/webpack#14532. Added `mode` to webpack-integration-tests to avoid the warning `The 'mode' option has not been set...`.
1 parent 9bff03f commit ca9100c

File tree

9 files changed

+14759
-18116
lines changed

9 files changed

+14759
-18116
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
matrix:
3434
operating-system: ['ubuntu-latest', 'windows-latest']
3535
# https://nodejs.org/en/about/releases/
36-
node-version: ['10', '12', '14', '16', '17']
36+
node-version: ['12', '14', '16', '18']
3737

3838
steps:
3939
- name: Checkout
@@ -53,8 +53,6 @@ jobs:
5353
run: npm run test
5454

5555
- name: Test (Integration)
56-
# https://github.com/webpack/webpack/issues/14532
57-
if: ${{ matrix.node-version != '17' }}
5856
run: |
5957
cd ./tests/integration/rollup-test && ./test.sh && cd -
6058
cd ./tests/integration/webpack-babel-test && ./test.sh && cd -

README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Supported Environments
8181

8282
Handlebars has been designed to work in any ECMAScript 3 environment. This includes
8383

84-
- Node.js 10+
84+
- Node.js 12+
8585
- Chrome
8686
- Firefox
8787
- Safari 5+

package-lock.json

Lines changed: 14732 additions & 18075 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"license": "MIT",
1818
"readmeFilename": "README.markdown",
1919
"engines": {
20-
"node": ">=10"
20+
"node": ">=12"
2121
},
2222
"dependencies": {
2323
"@handlebars/parser": "^1.1.0",
@@ -51,7 +51,7 @@
5151
"grunt-cli": "^1",
5252
"grunt-contrib-clean": "^1",
5353
"grunt-contrib-concat": "^1",
54-
"grunt-contrib-connect": "^1",
54+
"grunt-contrib-connect": "^3.0.0",
5555
"grunt-contrib-copy": "^1",
5656
"grunt-contrib-requirejs": "^1",
5757
"grunt-contrib-uglify": "^1",
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
{
22
"name": "webpack-babel-test",
3-
"version": "1.0.0",
43
"description": "",
5-
"main": "index.js",
6-
"keywords": [],
7-
"author": "",
8-
"license": "ISC",
4+
"version": "1.0.0",
5+
"private": true,
6+
"scripts": {
7+
"build": "webpack --config webpack.config.js"
8+
},
99
"dependencies": {
1010
"@babel/core": "^7.5.5",
1111
"@babel/preset-env": "^7.5.5",
1212
"@roundingwellos/babel-plugin-handlebars-inline-precompile": "^3.0.1",
1313
"babel-loader": "^8.0.6",
14-
"babel-plugin-istanbul": "^5.2.0",
14+
"babel-plugin-istanbul": "^6.1.1",
1515
"handlebars": "file:../../..",
1616
"handlebars-loader": "^1.7.1",
17-
"nyc": "^14.1.1",
18-
"webpack": "^4.39.3",
19-
"webpack-cli": "^3.3.7"
20-
},
21-
"scripts": {
22-
"build": "webpack --config webpack.config.js"
17+
"nyc": "^15.1.0",
18+
"webpack": "^5.72.1",
19+
"webpack-cli": "^4.9.2"
2320
}
2421
}

tests/integration/webpack-babel-test/webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ testFiles
1010

1111
module.exports = {
1212
entry: entryPoints,
13+
mode: 'production',
1314
output: {
1415
filename: '[name]',
1516
path: __dirname + '/dist'

tests/integration/webpack-test/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"name": "webpack-test",
33
"description": "Various tests with Handlebars and multiple webpack versions",
44
"version": "1.0.0",
5-
"main": "index.js",
5+
"private": true,
66
"scripts": {
7-
"build": "webpack --config webpack.config.js",
8-
"test": "node dist/main.js"
7+
"build": "webpack --config webpack.config.js"
98
},
10-
"private": true,
119
"dependencies": {
1210
"handlebars": "file:../../..",
13-
"handlebars-loader": "^1.7.1"
11+
"handlebars-loader": "^1.7.1",
12+
"webpack": "^5.72.1",
13+
"webpack-cli": "^4.9.2"
1414
}
1515
}

tests/integration/webpack-test/test.sh

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,15 @@
22

33
set -e
44

5-
run_tests () {
6-
for i in dist/*-test.js ; do
7-
echo "----------------------"
8-
echo "-- Running $i"
9-
echo "----------------------"
10-
node "$i"
11-
echo "Success"
12-
done
13-
}
14-
155
# Cleanup: package-lock and "npm ci" is not working with local dependencies
166
rm dist package-lock.json -rf
177
npm install --legacy-peer-deps
18-
19-
# Test with webpack 4
20-
npm install --legacy-peer-deps --no-save webpack@^4 webpack-cli@^3
218
npm run build
22-
run_tests
239

24-
# Test with webpack 5
25-
npm install --legacy-peer-deps --no-save webpack@^5 webpack-cli@^4
26-
npm run build
27-
run_tests
10+
for i in dist/*-test.js ; do
11+
echo "----------------------"
12+
echo "-- Running $i"
13+
echo "----------------------"
14+
node "$i"
15+
echo "Success"
16+
done

tests/integration/webpack-test/webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ testFiles
1010

1111
module.exports = {
1212
entry: entryPoints,
13+
mode: 'production',
1314
output: {
1415
filename: '[name]',
1516
path: __dirname + '/dist'

0 commit comments

Comments
 (0)