Skip to content

Build: Update dependencies #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .eslintrc-browser.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@

"rules": {
"one-var": [ "error", { "var": "always" } ],
"strict": [ "error", "function" ]
"strict": [ "error", "function" ],

// Support: IE <=9 only, Android <=4.0 only
// Allow square bracket notation for ES3 reserved words
"dot-notation": [ "error", { "allowKeywords": false } ]
}
}
26 changes: 20 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ module.exports = function( grunt ) {

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

const oldNode = /^v10\./.test( process.version );

const karmaFilesExceptJQuery = [
"external/npo/npo.js",
"dist/jquery-migrate.min.js",
Expand All @@ -31,6 +33,13 @@ module.exports = function( grunt ) {
{ pattern: "test/**/*.@(js|json|css|jpg|html|xml)", included: false, served: true }
];

// Support: Node.js <12
// Skip running tasks that dropped support for Node.js 10
// in this Node version.
function runIfNewNode( task ) {
return oldNode ? "print_old_node_message:" + task : task;
}

// Project configuration.
grunt.initConfig( {
pkg: grunt.file.readJSON( "package.json" ),
Expand Down Expand Up @@ -141,17 +150,17 @@ module.exports = function( grunt ) {
sourceMapName: "dist/jquery-migrate.min.map",
report: "min",
output: {
"ascii_only": true,
ascii_only: true,

// Support: Android 4.0 only
// UglifyJS 3 breaks Android 4.0 if this option is not enabled.
// This is in lieu of setting ie8 for all of mangle, compress, and output
"ie8": true
// This is in lieu of setting ie for all of mangle, compress, and output
ie: true
},
banner: "/*! jQuery Migrate v<%= pkg.version %>" +
" | (c) <%= pkg.author.name %> | jquery.org/license */",
compress: {
"hoist_funs": false,
hoist_funs: false,
loops: false,

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

grunt.registerTask( "print_old_node_message", ( ...args ) => {
var task = args.join( ":" );
grunt.log.writeln( "Old Node.js detected, running the task \"" + task + "\" skipped..." );
} );

// Just an alias
grunt.registerTask( "test", [
"karma:main",
Expand All @@ -242,8 +256,8 @@ module.exports = function( grunt ) {
// would run the dist target first which would point to errors in the built
// file, making it harder to fix them. We want to check the built file only
// if we already know the source files pass the linter.
"eslint:dev",
"eslint:dist"
runIfNewNode( "eslint:dev" ),
runIfNewNode( "eslint:dist" )
] );

grunt.registerTask( "default-no-test", [
Expand Down
Loading