Skip to content

Commit

Permalink
Merge branch 'jquery:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
uplusware committed May 28, 2021
2 parents e787969 + a12c985 commit 3030a0d
Show file tree
Hide file tree
Showing 184 changed files with 98,385 additions and 30,004 deletions.
1 change: 1 addition & 0 deletions .csslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"import": false,
"important": false,
"outline-none": false,
"order-alphabetical": false,
"overqualified-elements": false,
"text-indent": false
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ dist
bower_components
node_modules
.sizecache.json
package-lock.json
8 changes: 7 additions & 1 deletion .jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
"es3": true,

// We want to output all errors
"maxErrors": 1000000
"maxErrors": 1000000,

"excludeFiles": [
"dist/**/*",
"external/**/*",
"ui/vendor/**/*"
]
}
3 changes: 3 additions & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/**/*
external/**/*
ui/vendor/**/*
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Max Schnur <max.schnur@gmail.com>
Michael Hollis <hollis21@gmail.com>
Michael Stay <metaweta@gmail.com>
Michael Wu <michaelmwu@gmail.com>
Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mike Alsup <malsup@gmail.com>
Milan Broum <midlis@googlemail.com>
Mohamed Cherif Bouchelaghem <cherifbouchelaghem@yahoo.fr> <cherif@cherif.(none)>
Expand Down
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
demos
tests
.editorconfig
.jscsrc
.jshintrc
.mailmap
.travis.yml
Gruntfile.js
.csslintrc
.gitattributes
18 changes: 13 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
sudo: required
dist: trusty
language: node_js
node_js:
- "6"
dist: bionic
language: java
jdk:
- openjdk8
env:
- NODE_VERSION="10"
- NODE_VERSION="14"
install:
- nvm install "$NODE_VERSION"
- npm install
script:
- nvm use "$NODE_VERSION"
- npm test
2 changes: 1 addition & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ Mani Mishra <manimishra902@gmail.com>
Hannah Methvin <hannahmethvin@gmail.com>
Leonardo Balter <leonardo.balter@gmail.com>
Benjamin Albert <benjamin_a5@yahoo.com>
Michał Gołębiowski <m.goleb@gmail.com>
Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
Alyosha Pushak <alyosha.pushak@gmail.com>
Fahad Ahmad <fahadahmad41@hotmail.com>
Matt Brundage <github@mattbrundage.com>
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ cd jquery-ui
git remote add upstream git://github.com/jquery/jquery-ui.git
```

* Get in the habit of pulling in the "upstream" master to stay up to date as jQuery UI receives new commits.
* Get in the habit of pulling in the "upstream" main branch to stay up to date as jQuery UI receives new commits.

```bash
git pull upstream master
git pull upstream main
```

### Environment: Recommended Setup
Expand Down
138 changes: 92 additions & 46 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module.exports = function( grunt ) {
"use strict";

var
glob = require( "glob" ),

// files
coreFiles = [
"core.js",
Expand All @@ -16,11 +18,11 @@ var
"effect.js"
],

uiFiles = coreFiles.map(function( file ) {
uiFiles = coreFiles.map( function( file ) {
return "ui/" + file;
}).concat( expandFiles( "ui/**/*.js" ).filter(function( file ) {
} ).concat( expandFiles( "ui/**/*.js" ).filter( function( file ) {
return coreFiles.indexOf( file.substring( 3 ) ) === -1;
}) ),
} ) ),

allI18nFiles = expandFiles( "ui/i18n/*.js" ),

Expand All @@ -45,9 +47,9 @@ var
"tabs",
"tooltip",
"theme"
].map(function( component ) {
].map( function( component ) {
return "themes/base/" + component + ".css";
}),
} ),

// minified files
minify = {
Expand Down Expand Up @@ -92,28 +94,30 @@ function mapMinFile( file ) {
}

function expandFiles( files ) {
return grunt.util._.pluck( grunt.file.expandMapping( files ), "src" ).map(function( values ) {
return grunt.util._.map( grunt.file.expandMapping( files ), "src" ).map( function( values ) {
return values[ 0 ];
});
} );
}

uiFiles.concat( allI18nFiles ).forEach(function( file ) {
uiFiles.concat( allI18nFiles ).forEach( function( file ) {
minify[ file ] = {
options: {
banner: createBanner()
},
files: {}
};
minify[ file ].files[ mapMinFile( file ) ] = file;
});
} );

uiFiles.forEach( function( file ) {

uiFiles.forEach(function( file ) {
// TODO this doesn't do anything until https://github.com/rwldrn/grunt-compare-size/issues/13
compareFiles[ file ] = [ file, mapMinFile( file ) ];
});
} );

// grunt plugins
require( "load-grunt-tasks" )( grunt );

// local testswarm and build tasks
grunt.loadTasks( "build/tasks" );

Expand All @@ -122,17 +126,18 @@ function stripDirectory( file ) {
}

function createBanner( files ) {

// strip folders
var fileNames = files && files.map( stripDirectory );
return "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today('isoDate') %>\n" +
"<%= pkg.homepage ? '* ' + pkg.homepage + '\\n' : '' %>" +
(files ? "* Includes: " + fileNames.join(", ") + "\n" : "") +
( files ? "* Includes: " + fileNames.join( ", " ) + "\n" : "" ) +
"* Copyright <%= pkg.author.name %>;" +
" Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */\n";
" Licensed <%= _.map(pkg.licenses, 'type').join(', ') %> */\n";
}

grunt.initConfig({
grunt.initConfig( {
pkg: grunt.file.readJSON( "package.json" ),
files: {
dist: "<%= pkg.name %>-<%= pkg.version %>"
Expand Down Expand Up @@ -166,7 +171,7 @@ grunt.initConfig({
include: expandFiles( [ "ui/**/*.js", "!ui/core.js", "!ui/i18n/*" ] ),
out: "dist/jquery-ui.js",
wrap: {
start: createBanner( uiFiles ),
start: createBanner( uiFiles )
}
}
}
Expand Down Expand Up @@ -198,28 +203,40 @@ grunt.initConfig({
ignore: [
/The text content of element “script” was not in the required format: Expected space, tab, newline, or slash but found “.” instead/
] },
src: [ "demos/**/*.html", "tests/**/*.html" ].concat( htmllintBad.map( function( file ) {
return "!" + file;
} ) )
src: glob.sync("{demos,tests}/**/*.html", {
ignore: htmllintBad
} )
},
bad: {
options: {
ignore: [
/Start tag seen without seeing a doctype first/,
/Element “head” is missing a required instance of child element “title”/,
/Element “object” is missing one or more of the following/,
/The “codebase” attribute on the “object” element is obsolete/
/The “codebase” attribute on the “object” element is obsolete/,
/Consider adding a “lang” attribute to the “html” start tag/,
/This document appears to be written in .*. Consider adding “lang=".*"” \(or variant\) to the “html” start tag/
]
},
src: htmllintBad
}
},
qunit: {
files: expandFiles( "tests/unit/" + component + "/*.html" ).filter(function( file ) {
files: expandFiles( "tests/unit/" + component + "/*.html" ).filter( function( file ) {
return !( /(all|index|test)\.html$/ ).test( file );
}),
} ),
options: {
inject: false,
puppeteer: {
ignoreDefaultArgs: true,
args: [
"--headless",
"--disable-web-security",
"--allow-file-access-from-files"
]
},
inject: [
require.resolve( "grunt-contrib-qunit/chrome/bridge" )
],
page: {
viewportSize: { width: 700, height: 500 }
}
Expand Down Expand Up @@ -248,6 +265,17 @@ grunt.initConfig({
},

bowercopy: {
inlineVendors: {
options: {
clean: true,
destPrefix: "ui/vendor"
},
files: {
"jquery-color/jquery.color.js": "jquery-color/dist/jquery.color.js",
"jquery-color/LICENSE.txt": "jquery-color/LICENSE.txt"
}
},

all: {
options: {
clean: true,
Expand Down Expand Up @@ -283,15 +311,6 @@ grunt.initConfig({
"jquery/jquery.js": "jquery-1.x/dist/jquery.js",
"jquery/LICENSE.txt": "jquery-1.x/LICENSE.txt",

"jquery-1.7.0/jquery.js": "jquery-1.7.0/jquery.js",
"jquery-1.7.0/MIT-LICENSE.txt": "jquery-1.7.0/MIT-LICENSE.txt",

"jquery-1.7.1/jquery.js": "jquery-1.7.1/jquery.js",
"jquery-1.7.1/MIT-LICENSE.txt": "jquery-1.7.1/MIT-LICENSE.txt",

"jquery-1.7.2/jquery.js": "jquery-1.7.2/jquery.js",
"jquery-1.7.2/MIT-LICENSE.txt": "jquery-1.7.2/MIT-LICENSE.txt",

"jquery-1.8.0/jquery.js": "jquery-1.8.0/jquery.js",
"jquery-1.8.0/MIT-LICENSE.txt": "jquery-1.8.0/MIT-LICENSE.txt",

Expand Down Expand Up @@ -397,11 +416,38 @@ grunt.initConfig({
"jquery-3.1.1/jquery.js": "jquery-3.1.1/dist/jquery.js",
"jquery-3.1.1/LICENSE.txt": "jquery-3.1.1/LICENSE.txt",

"jquery-3.2.0/jquery.js": "jquery-3.2.0/dist/jquery.js",
"jquery-3.2.0/LICENSE.txt": "jquery-3.2.0/LICENSE.txt",

"jquery-3.2.1/jquery.js": "jquery-3.2.1/dist/jquery.js",
"jquery-3.2.1/LICENSE.txt": "jquery-3.2.1/LICENSE.txt",

"jquery-3.3.0/jquery.js": "jquery-3.3.0/dist/jquery.js",
"jquery-3.3.0/LICENSE.txt": "jquery-3.3.0/LICENSE.txt",

"jquery-3.3.1/jquery.js": "jquery-3.3.1/dist/jquery.js",
"jquery-3.3.1/LICENSE.txt": "jquery-3.3.1/LICENSE.txt",

"jquery-3.4.0/jquery.js": "jquery-3.4.0/dist/jquery.js",
"jquery-3.4.0/LICENSE.txt": "jquery-3.4.0/LICENSE.txt",

"jquery-3.4.1/jquery.js": "jquery-3.4.1/dist/jquery.js",
"jquery-3.4.1/LICENSE.txt": "jquery-3.4.1/LICENSE.txt",

"jquery-3.5.0/jquery.js": "jquery-3.5.0/dist/jquery.js",
"jquery-3.5.0/LICENSE.txt": "jquery-3.5.0/LICENSE.txt",

"jquery-3.5.1/jquery.js": "jquery-3.5.1/dist/jquery.js",
"jquery-3.5.1/LICENSE.txt": "jquery-3.5.1/LICENSE.txt",

"jquery-3.6.0/jquery.js": "jquery-3.6.0/dist/jquery.js",
"jquery-3.6.0/LICENSE.txt": "jquery-3.6.0/LICENSE.txt",

"jquery-migrate-1.4.1/jquery-migrate.js": "jquery-migrate-1.4.1/dist/jquery-migrate.js",
"jquery-migrate-1.4.1/LICENSE.txt": "jquery-migrate-1.4.1/LICENSE.txt",

"jquery-migrate-3.0.0/jquery-migrate.js": "jquery-migrate-3.0.0/dist/jquery-migrate.js",
"jquery-migrate-3.0.0/LICENSE.txt": "jquery-migrate-3.0.0/LICENSE.txt"
"jquery-migrate-3.3.2/jquery-migrate.js": "jquery-migrate-3.3.2/dist/jquery-migrate.js",
"jquery-migrate-3.3.2/LICENSE.txt": "jquery-migrate-3.3.2/LICENSE.txt"
}
}
},
Expand Down Expand Up @@ -432,43 +478,43 @@ grunt.initConfig({
"Bohdan Ganicky <bohdan.ganicky@gmail.com>"
]
}
});
} );

grunt.registerTask( "update-authors", function() {
var getAuthors = require( "grunt-git-authors" ).getAuthors,
done = this.async();

getAuthors({
getAuthors( {
priorAuthors: grunt.config( "authors.prior" )
}, function( error, authors ) {
if ( error ) {
grunt.log.error( error );
return done( false );
}

authors = authors.map(function( author ) {
authors = authors.map( function( author ) {
if ( author.match( /^Jacek Jędrzejewski </ ) ) {
return "Jacek Jędrzejewski (http://jacek.jedrzejewski.name)";
} else if ( author.match( /^Pawel Maruszczyk </ ) ) {
return "Pawel Maruszczyk (http://hrabstwo.net)";
} else {
return author;
}
});
} );

grunt.file.write( "AUTHORS.txt",
"Authors ordered by first contribution\n" +
"A list of current team members is available at http://jqueryui.com/about\n\n" +
authors.join( "\n" ) + "\n" );
done();
});
});

grunt.registerTask( "default", [ "lint", "requirejs", "test" ]);
grunt.registerTask( "jenkins", [ "default", "concat" ]);
grunt.registerTask( "lint", [ "asciilint", "jshint", "jscs", "csslint", "htmllint" ]);
grunt.registerTask( "test", [ "qunit" ]);
grunt.registerTask( "sizer", [ "requirejs:js", "uglify:main", "compare_size:all" ]);
grunt.registerTask( "sizer_all", [ "requirejs:js", "uglify", "compare_size" ]);
} );
} );

grunt.registerTask( "default", [ "lint", "requirejs", "test" ] );
grunt.registerTask( "jenkins", [ "default", "concat" ] );
grunt.registerTask( "lint", [ "asciilint", "jshint", "jscs", "csslint", "htmllint" ] );
grunt.registerTask( "test", [ "qunit" ] );
grunt.registerTask( "sizer", [ "requirejs:js", "uglify:main", "compare_size:all" ] );
grunt.registerTask( "sizer_all", [ "requirejs:js", "uglify", "compare_size" ] );

};

0 comments on commit 3030a0d

Please sign in to comment.