Skip to content

Commit

Permalink
Test on Node 18 and drop EOL Node 10
Browse files Browse the repository at this point in the history
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...`.
  • Loading branch information
jaylinski committed May 17, 2022
1 parent 9bff03f commit ca9100c
Show file tree
Hide file tree
Showing 9 changed files with 14,759 additions and 18,116 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
matrix:
operating-system: ['ubuntu-latest', 'windows-latest']
# https://nodejs.org/en/about/releases/
node-version: ['10', '12', '14', '16', '17']
node-version: ['12', '14', '16', '18']

steps:
- name: Checkout
Expand All @@ -53,8 +53,6 @@ jobs:
run: npm run test

- name: Test (Integration)
# https://github.com/webpack/webpack/issues/14532
if: ${{ matrix.node-version != '17' }}
run: |
cd ./tests/integration/rollup-test && ./test.sh && cd -
cd ./tests/integration/webpack-babel-test && ./test.sh && cd -
Expand Down
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Supported Environments

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

- Node.js 10+
- Node.js 12+
- Chrome
- Firefox
- Safari 5+
Expand Down
32,807 changes: 14,732 additions & 18,075 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"license": "MIT",
"readmeFilename": "README.markdown",
"engines": {
"node": ">=10"
"node": ">=12"
},
"dependencies": {
"@handlebars/parser": "^1.1.0",
Expand Down Expand Up @@ -51,7 +51,7 @@
"grunt-cli": "^1",
"grunt-contrib-clean": "^1",
"grunt-contrib-concat": "^1",
"grunt-contrib-connect": "^1",
"grunt-contrib-connect": "^3.0.0",
"grunt-contrib-copy": "^1",
"grunt-contrib-requirejs": "^1",
"grunt-contrib-uglify": "^1",
Expand Down
21 changes: 9 additions & 12 deletions tests/integration/webpack-babel-test/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
{
"name": "webpack-babel-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"keywords": [],
"author": "",
"license": "ISC",
"version": "1.0.0",
"private": true,
"scripts": {
"build": "webpack --config webpack.config.js"
},
"dependencies": {
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@roundingwellos/babel-plugin-handlebars-inline-precompile": "^3.0.1",
"babel-loader": "^8.0.6",
"babel-plugin-istanbul": "^5.2.0",
"babel-plugin-istanbul": "^6.1.1",
"handlebars": "file:../../..",
"handlebars-loader": "^1.7.1",
"nyc": "^14.1.1",
"webpack": "^4.39.3",
"webpack-cli": "^3.3.7"
},
"scripts": {
"build": "webpack --config webpack.config.js"
"nyc": "^15.1.0",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2"
}
}
1 change: 1 addition & 0 deletions tests/integration/webpack-babel-test/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ testFiles

module.exports = {
entry: entryPoints,
mode: 'production',
output: {
filename: '[name]',
path: __dirname + '/dist'
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/webpack-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"name": "webpack-test",
"description": "Various tests with Handlebars and multiple webpack versions",
"version": "1.0.0",
"main": "index.js",
"private": true,
"scripts": {
"build": "webpack --config webpack.config.js",
"test": "node dist/main.js"
"build": "webpack --config webpack.config.js"
},
"private": true,
"dependencies": {
"handlebars": "file:../../..",
"handlebars-loader": "^1.7.1"
"handlebars-loader": "^1.7.1",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2"
}
}
25 changes: 7 additions & 18 deletions tests/integration/webpack-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,15 @@

set -e

run_tests () {
for i in dist/*-test.js ; do
echo "----------------------"
echo "-- Running $i"
echo "----------------------"
node "$i"
echo "Success"
done
}

# Cleanup: package-lock and "npm ci" is not working with local dependencies
rm dist package-lock.json -rf
npm install --legacy-peer-deps

# Test with webpack 4
npm install --legacy-peer-deps --no-save webpack@^4 webpack-cli@^3
npm run build
run_tests

# Test with webpack 5
npm install --legacy-peer-deps --no-save webpack@^5 webpack-cli@^4
npm run build
run_tests
for i in dist/*-test.js ; do
echo "----------------------"
echo "-- Running $i"
echo "----------------------"
node "$i"
echo "Success"
done
1 change: 1 addition & 0 deletions tests/integration/webpack-test/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ testFiles

module.exports = {
entry: entryPoints,
mode: 'production',
output: {
filename: '[name]',
path: __dirname + '/dist'
Expand Down

0 comments on commit ca9100c

Please sign in to comment.