Skip to content

Commit a1665a4

Browse files
authoredMar 24, 2022
Build: Update dependencies
Closes gh-458
1 parent 5ee8f69 commit a1665a4

File tree

5 files changed

+5960
-970
lines changed

5 files changed

+5960
-970
lines changed
 

‎.eslintrc-browser.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323

2424
"rules": {
2525
"one-var": [ "error", { "var": "always" } ],
26-
"strict": [ "error", "function" ]
26+
"strict": [ "error", "function" ],
27+
28+
// Support: IE <=9 only, Android <=4.0 only
29+
// Allow square bracket notation for ES3 reserved words
30+
"dot-notation": [ "error", { "allowKeywords": false } ]
2731
}
2832
}

‎Gruntfile.js

+20-6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ module.exports = function( grunt ) {
66

77
const gzip = require( "gzip-js" );
88

9+
const oldNode = /^v10\./.test( process.version );
10+
911
const karmaFilesExceptJQuery = [
1012
"external/npo/npo.js",
1113
"dist/jquery-migrate.min.js",
@@ -31,6 +33,13 @@ module.exports = function( grunt ) {
3133
{ pattern: "test/**/*.@(js|json|css|jpg|html|xml)", included: false, served: true }
3234
];
3335

36+
// Support: Node.js <12
37+
// Skip running tasks that dropped support for Node.js 10
38+
// in this Node version.
39+
function runIfNewNode( task ) {
40+
return oldNode ? "print_old_node_message:" + task : task;
41+
}
42+
3443
// Project configuration.
3544
grunt.initConfig( {
3645
pkg: grunt.file.readJSON( "package.json" ),
@@ -141,17 +150,17 @@ module.exports = function( grunt ) {
141150
sourceMapName: "dist/jquery-migrate.min.map",
142151
report: "min",
143152
output: {
144-
"ascii_only": true,
153+
ascii_only: true,
145154

146155
// Support: Android 4.0 only
147156
// UglifyJS 3 breaks Android 4.0 if this option is not enabled.
148-
// This is in lieu of setting ie8 for all of mangle, compress, and output
149-
"ie8": true
157+
// This is in lieu of setting ie for all of mangle, compress, and output
158+
ie: true
150159
},
151160
banner: "/*! jQuery Migrate v<%= pkg.version %>" +
152161
" | (c) <%= pkg.author.name %> | jquery.org/license */",
153162
compress: {
154-
"hoist_funs": false,
163+
hoist_funs: false,
155164
loops: false,
156165

157166
// Support: IE <11
@@ -230,6 +239,11 @@ module.exports = function( grunt ) {
230239
// Integrate jQuery migrate specific tasks
231240
grunt.loadTasks( "build/tasks" );
232241

242+
grunt.registerTask( "print_old_node_message", ( ...args ) => {
243+
var task = args.join( ":" );
244+
grunt.log.writeln( "Old Node.js detected, running the task \"" + task + "\" skipped..." );
245+
} );
246+
233247
// Just an alias
234248
grunt.registerTask( "test", [
235249
"karma:main",
@@ -242,8 +256,8 @@ module.exports = function( grunt ) {
242256
// would run the dist target first which would point to errors in the built
243257
// file, making it harder to fix them. We want to check the built file only
244258
// if we already know the source files pass the linter.
245-
"eslint:dev",
246-
"eslint:dist"
259+
runIfNewNode( "eslint:dev" ),
260+
runIfNewNode( "eslint:dist" )
247261
] );
248262

249263
grunt.registerTask( "default-no-test", [

‎package-lock.json

+5,917-944
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,30 @@
2626
"jquery": ">=3 <4"
2727
},
2828
"devDependencies": {
29-
"chalk": "4.1.1",
29+
"chalk": "5.0.1",
3030
"commitplease": "3.2.0",
3131
"enquirer": "2.3.6",
32-
"eslint": "7.25.0",
32+
"eslint": "8.11.0",
3333
"eslint-config-jquery": "3.0.0",
34-
"eslint-plugin-import": "2.22.1",
35-
"grunt": "1.4.0",
36-
"grunt-cli": "1.4.2",
34+
"eslint-plugin-import": "2.25.4",
35+
"grunt": "1.4.1",
36+
"grunt-cli": "1.4.3",
3737
"grunt-compare-size": "0.4.2",
3838
"grunt-contrib-uglify": "5.0.1",
3939
"grunt-contrib-watch": "1.1.0",
40-
"grunt-eslint": "23.0.0",
41-
"grunt-karma": "4.0.0",
40+
"grunt-eslint": "24.0.0",
41+
"grunt-karma": "4.0.2",
4242
"grunt-npmcopy": "0.2.0",
4343
"gzip-js": "0.3.2",
44-
"karma": "6.3.16",
44+
"karma": "6.3.17",
4545
"karma-browserstack-launcher": "1.6.0",
46-
"karma-chrome-launcher": "3.1.0",
47-
"karma-firefox-launcher": "2.1.0",
46+
"karma-chrome-launcher": "3.1.1",
47+
"karma-firefox-launcher": "2.1.2",
4848
"karma-qunit": "4.1.2",
4949
"load-grunt-tasks": "5.1.0",
5050
"native-promise-only": "0.8.1",
51-
"qunit": "2.15.0",
52-
"rollup": "2.47.0",
51+
"qunit": "2.18.0",
52+
"rollup": "2.70.1",
5353
"testswarm": "1.1.2"
5454
},
5555
"keywords": [

‎test/unit/jquery/ajax.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ QUnit.test( "jQuery.ajax() deprecations on jqXHR", function( assert ) {
1919
} )
2020
.complete( function() {
2121
assert.ok( true, "ajax complete" );
22-
} )
23-
.catch( jQuery.noop );
22+
} )[ "catch" ]( jQuery.noop );
2423
} ).then( function() {
2524
done();
2625
} );
@@ -45,7 +44,7 @@ QUnit.test( "jQuery.ajax() deprecations on jqXHR", function( assert ) {
4544
url: url( "null.json" ),
4645
crossDomain: crossDomain,
4746
dataType: "json"
48-
} ).catch( jQuery.noop );
47+
} )[ "catch" ]( jQuery.noop );
4948
}
5049
);
5150
},
@@ -57,7 +56,7 @@ QUnit.test( "jQuery.ajax() deprecations on jqXHR", function( assert ) {
5756
url: url( "null.json?callback=?" ),
5857
crossDomain: crossDomain,
5958
dataType: "json"
60-
} ).catch( jQuery.noop );
59+
} )[ "catch" ]( jQuery.noop );
6160
}
6261
);
6362
},
@@ -70,7 +69,7 @@ QUnit.test( "jQuery.ajax() deprecations on jqXHR", function( assert ) {
7069
crossDomain: crossDomain,
7170
data: "callback=?",
7271
dataType: "json"
73-
} ).catch( jQuery.noop );
72+
} )[ "catch" ]( jQuery.noop );
7473
}
7574
);
7675
},
@@ -82,7 +81,7 @@ QUnit.test( "jQuery.ajax() deprecations on jqXHR", function( assert ) {
8281
url: url( "null.json?callback=?" ),
8382
crossDomain: crossDomain,
8483
dataType: "jsonp"
85-
} ).catch( jQuery.noop );
84+
} )[ "catch" ]( jQuery.noop );
8685
}
8786
);
8887
},
@@ -95,7 +94,7 @@ QUnit.test( "jQuery.ajax() deprecations on jqXHR", function( assert ) {
9594
crossDomain: crossDomain,
9695
data: "callback=?",
9796
dataType: "jsonp"
98-
} ).catch( jQuery.noop );
97+
} )[ "catch" ]( jQuery.noop );
9998
}
10099
);
101100
}

0 commit comments

Comments
 (0)
Please sign in to comment.