Test on Node 18 and drop EOL Node 10

* Updated lock-file to fix https://github.com/npm/cli/issues/4859.
* Updated integration-tests to webpack 5 to fix
  https://github.com/webpack/webpack/issues/14532.
* Added `mode` to webpack-integration-tests to avoid
  the warning `The 'mode' option has not been set...`.
* Replaced outdated `grunt-bg-shell`-package to get rid of
  coffee-script warnings
This commit is contained in:
Jakob Linskeseder
2022-05-17 21:15:53 +02:00
committed by Jay Linski
parent 903ca504b5
commit 785a63e0a8
11 changed files with 578 additions and 3155 deletions
+1 -3
View File
@@ -58,7 +58,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
@@ -78,8 +78,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 -
+5 -7
View File
@@ -111,11 +111,9 @@ module.exports = function(grunt) {
}
},
bgShell: {
shell: {
integrationTests: {
cmd: './tests/integration/run-integration-tests.sh',
bg: false,
fail: true
command: './tests/integration/run-integration-tests.sh'
}
},
@@ -139,7 +137,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-bg-shell');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-webpack');
grunt.task.loadTasks('tasks');
@@ -156,7 +154,7 @@ module.exports = function(grunt) {
// Requires secret properties from .travis.yaml
grunt.registerTask('extensive-tests-and-publish-to-aws', [
'default',
'bgShell:integrationTests',
'shell:integrationTests',
'metrics',
'publish-to-aws'
]);
@@ -176,6 +174,6 @@ module.exports = function(grunt) {
);
grunt.registerTask('integration-tests', [
'default',
'bgShell:integrationTests'
'shell:integrationTests'
]);
};
+1 -1
View File
@@ -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+
+542 -3102
View File
File diff suppressed because it is too large Load Diff
+4 -5
View File
@@ -17,7 +17,7 @@
"license": "MIT",
"readmeFilename": "README.markdown",
"engines": {
"node": ">=10"
"node": ">=12"
},
"dependencies": {
"@handlebars/parser": "^1.1.0",
@@ -30,7 +30,7 @@
},
"devDependencies": {
"@definitelytyped/dtslint": "^0.0.100",
"@playwright/test": "^1.17.1",
"@playwright/test": "^1.27.1",
"aws-sdk": "^2.1.49",
"babel-loader": "^5.0.0",
"babel-runtime": "^5.1.10",
@@ -47,15 +47,15 @@
"fs-extra": "^8.1.0",
"grunt": "^1.0.4",
"grunt-babel": "^5.0.0",
"grunt-bg-shell": "^2.3.3",
"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",
"grunt-contrib-watch": "^1.1.0",
"grunt-shell": "^4.0.0",
"grunt-webpack": "^1.0.8",
"husky": "^3.1.0",
"lint-staged": "^9.5.0",
@@ -106,7 +106,6 @@
"files": [
"bin",
"dist/*.js",
"dist/amd/**/*.js",
"dist/cjs/**/*.js",
"lib",
"release-notes.md",
+1 -1
View File
@@ -14,7 +14,7 @@ cd "$( dirname "$( readlink -f "$0" )" )" || exit 1
unset npm_config_prefix
echo "Handlebars should be able to run in various versions of NodeJS"
for node_version_to_test in 10 11 12 13 14 15 16 17; do
for node_version_to_test in 12 14 16 18; do
rm target node_modules package-lock.json -rf
mkdir target
@@ -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"
}
}
@@ -10,6 +10,7 @@ testFiles
module.exports = {
entry: entryPoints,
mode: 'production',
output: {
filename: '[name]',
path: __dirname + '/dist'
+6 -6
View File
@@ -2,14 +2,14 @@
"name": "webpack-test",
"description": "Various tests with Handlebars and multiple webpack versions",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"build": "webpack --config webpack.config.js",
"test": "node dist/main.js"
},
"private": true,
"scripts": {
"build": "webpack --config webpack.config.js"
},
"dependencies": {
"handlebars": "file:../../..",
"handlebars-loader": "^1.7.1"
"handlebars-loader": "^1.7.1",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2"
}
}
+7 -18
View File
@@ -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
@@ -10,6 +10,7 @@ testFiles
module.exports = {
entry: entryPoints,
mode: 'production',
output: {
filename: '[name]',
path: __dirname + '/dist'