Skip to content

Commit 3030a0d

Browse files
committed
Merge branch 'jquery:main' into master
2 parents e787969 + a12c985 commit 3030a0d

File tree

184 files changed

+98385
-30004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+98385
-30004
lines changed

.csslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"import": false,
88
"important": false,
99
"outline-none": false,
10+
"order-alphabetical": false,
1011
"overqualified-elements": false,
1112
"text-indent": false
1213
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ dist
22
bower_components
33
node_modules
44
.sizecache.json
5+
package-lock.json

.jscsrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@
88
"es3": true,
99

1010
// We want to output all errors
11-
"maxErrors": 1000000
11+
"maxErrors": 1000000,
12+
13+
"excludeFiles": [
14+
"dist/**/*",
15+
"external/**/*",
16+
"ui/vendor/**/*"
17+
]
1218
}

.jshintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/**/*
2+
external/**/*
3+
ui/vendor/**/*

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Max Schnur <max.schnur@gmail.com>
7878
Michael Hollis <hollis21@gmail.com>
7979
Michael Stay <metaweta@gmail.com>
8080
Michael Wu <michaelmwu@gmail.com>
81+
Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
8182
Mike Alsup <malsup@gmail.com>
8283
Milan Broum <midlis@googlemail.com>
8384
Mohamed Cherif Bouchelaghem <cherifbouchelaghem@yahoo.fr> <cherif@cherif.(none)>

.npmignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
demos
2+
tests
3+
.editorconfig
4+
.jscsrc
5+
.jshintrc
6+
.mailmap
7+
.travis.yml
8+
Gruntfile.js
9+
.csslintrc
10+
.gitattributes

.travis.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
sudo: required
2-
dist: trusty
3-
language: node_js
4-
node_js:
5-
- "6"
1+
dist: bionic
2+
language: java
3+
jdk:
4+
- openjdk8
5+
env:
6+
- NODE_VERSION="10"
7+
- NODE_VERSION="14"
8+
install:
9+
- nvm install "$NODE_VERSION"
10+
- npm install
11+
script:
12+
- nvm use "$NODE_VERSION"
13+
- npm test

AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Mani Mishra <manimishra902@gmail.com>
312312
Hannah Methvin <hannahmethvin@gmail.com>
313313
Leonardo Balter <leonardo.balter@gmail.com>
314314
Benjamin Albert <benjamin_a5@yahoo.com>
315-
Michał Gołębiowski <m.goleb@gmail.com>
315+
Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
316316
Alyosha Pushak <alyosha.pushak@gmail.com>
317317
Fahad Ahmad <fahadahmad41@hotmail.com>
318318
Matt Brundage <github@mattbrundage.com>

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ cd jquery-ui
5353
git remote add upstream git://github.com/jquery/jquery-ui.git
5454
```
5555

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

5858
```bash
59-
git pull upstream master
59+
git pull upstream main
6060
```
6161

6262
### Environment: Recommended Setup

Gruntfile.js

Lines changed: 92 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ module.exports = function( grunt ) {
33
"use strict";
44

55
var
6+
glob = require( "glob" ),
7+
68
// files
79
coreFiles = [
810
"core.js",
@@ -16,11 +18,11 @@ var
1618
"effect.js"
1719
],
1820

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

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

@@ -45,9 +47,9 @@ var
4547
"tabs",
4648
"tooltip",
4749
"theme"
48-
].map(function( component ) {
50+
].map( function( component ) {
4951
return "themes/base/" + component + ".css";
50-
}),
52+
} ),
5153

5254
// minified files
5355
minify = {
@@ -92,28 +94,30 @@ function mapMinFile( file ) {
9294
}
9395

9496
function expandFiles( files ) {
95-
return grunt.util._.pluck( grunt.file.expandMapping( files ), "src" ).map(function( values ) {
97+
return grunt.util._.map( grunt.file.expandMapping( files ), "src" ).map( function( values ) {
9698
return values[ 0 ];
97-
});
99+
} );
98100
}
99101

100-
uiFiles.concat( allI18nFiles ).forEach(function( file ) {
102+
uiFiles.concat( allI18nFiles ).forEach( function( file ) {
101103
minify[ file ] = {
102104
options: {
103105
banner: createBanner()
104106
},
105107
files: {}
106108
};
107109
minify[ file ].files[ mapMinFile( file ) ] = file;
108-
});
110+
} );
111+
112+
uiFiles.forEach( function( file ) {
109113

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

115118
// grunt plugins
116119
require( "load-grunt-tasks" )( grunt );
120+
117121
// local testswarm and build tasks
118122
grunt.loadTasks( "build/tasks" );
119123

@@ -122,17 +126,18 @@ function stripDirectory( file ) {
122126
}
123127

124128
function createBanner( files ) {
129+
125130
// strip folders
126131
var fileNames = files && files.map( stripDirectory );
127132
return "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
128133
"<%= grunt.template.today('isoDate') %>\n" +
129134
"<%= pkg.homepage ? '* ' + pkg.homepage + '\\n' : '' %>" +
130-
(files ? "* Includes: " + fileNames.join(", ") + "\n" : "") +
135+
( files ? "* Includes: " + fileNames.join( ", " ) + "\n" : "" ) +
131136
"* Copyright <%= pkg.author.name %>;" +
132-
" Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */\n";
137+
" Licensed <%= _.map(pkg.licenses, 'type').join(', ') %> */\n";
133138
}
134139

135-
grunt.initConfig({
140+
grunt.initConfig( {
136141
pkg: grunt.file.readJSON( "package.json" ),
137142
files: {
138143
dist: "<%= pkg.name %>-<%= pkg.version %>"
@@ -166,7 +171,7 @@ grunt.initConfig({
166171
include: expandFiles( [ "ui/**/*.js", "!ui/core.js", "!ui/i18n/*" ] ),
167172
out: "dist/jquery-ui.js",
168173
wrap: {
169-
start: createBanner( uiFiles ),
174+
start: createBanner( uiFiles )
170175
}
171176
}
172177
}
@@ -198,28 +203,40 @@ grunt.initConfig({
198203
ignore: [
199204
/The text content of element script was not in the required format: Expected space, tab, newline, or slash but found . instead/
200205
] },
201-
src: [ "demos/**/*.html", "tests/**/*.html" ].concat( htmllintBad.map( function( file ) {
202-
return "!" + file;
203-
} ) )
206+
src: glob.sync("{demos,tests}/**/*.html", {
207+
ignore: htmllintBad
208+
} )
204209
},
205210
bad: {
206211
options: {
207212
ignore: [
208213
/Start tag seen without seeing a doctype first/,
209214
/Element head is missing a required instance of child element title/,
210215
/Element object is missing one or more of the following/,
211-
/The codebase attribute on the object element is obsolete/
216+
/The codebase attribute on the object element is obsolete/,
217+
/Consider adding a lang attribute to the html start tag/,
218+
/This document appears to be written in .*. Consider adding lang=".*" \(or variant\) to the html start tag/
212219
]
213220
},
214221
src: htmllintBad
215222
}
216223
},
217224
qunit: {
218-
files: expandFiles( "tests/unit/" + component + "/*.html" ).filter(function( file ) {
225+
files: expandFiles( "tests/unit/" + component + "/*.html" ).filter( function( file ) {
219226
return !( /(all|index|test)\.html$/ ).test( file );
220-
}),
227+
} ),
221228
options: {
222-
inject: false,
229+
puppeteer: {
230+
ignoreDefaultArgs: true,
231+
args: [
232+
"--headless",
233+
"--disable-web-security",
234+
"--allow-file-access-from-files"
235+
]
236+
},
237+
inject: [
238+
require.resolve( "grunt-contrib-qunit/chrome/bridge" )
239+
],
223240
page: {
224241
viewportSize: { width: 700, height: 500 }
225242
}
@@ -248,6 +265,17 @@ grunt.initConfig({
248265
},
249266

250267
bowercopy: {
268+
inlineVendors: {
269+
options: {
270+
clean: true,
271+
destPrefix: "ui/vendor"
272+
},
273+
files: {
274+
"jquery-color/jquery.color.js": "jquery-color/dist/jquery.color.js",
275+
"jquery-color/LICENSE.txt": "jquery-color/LICENSE.txt"
276+
}
277+
},
278+
251279
all: {
252280
options: {
253281
clean: true,
@@ -283,15 +311,6 @@ grunt.initConfig({
283311
"jquery/jquery.js": "jquery-1.x/dist/jquery.js",
284312
"jquery/LICENSE.txt": "jquery-1.x/LICENSE.txt",
285313

286-
"jquery-1.7.0/jquery.js": "jquery-1.7.0/jquery.js",
287-
"jquery-1.7.0/MIT-LICENSE.txt": "jquery-1.7.0/MIT-LICENSE.txt",
288-
289-
"jquery-1.7.1/jquery.js": "jquery-1.7.1/jquery.js",
290-
"jquery-1.7.1/MIT-LICENSE.txt": "jquery-1.7.1/MIT-LICENSE.txt",
291-
292-
"jquery-1.7.2/jquery.js": "jquery-1.7.2/jquery.js",
293-
"jquery-1.7.2/MIT-LICENSE.txt": "jquery-1.7.2/MIT-LICENSE.txt",
294-
295314
"jquery-1.8.0/jquery.js": "jquery-1.8.0/jquery.js",
296315
"jquery-1.8.0/MIT-LICENSE.txt": "jquery-1.8.0/MIT-LICENSE.txt",
297316

@@ -397,11 +416,38 @@ grunt.initConfig({
397416
"jquery-3.1.1/jquery.js": "jquery-3.1.1/dist/jquery.js",
398417
"jquery-3.1.1/LICENSE.txt": "jquery-3.1.1/LICENSE.txt",
399418

419+
"jquery-3.2.0/jquery.js": "jquery-3.2.0/dist/jquery.js",
420+
"jquery-3.2.0/LICENSE.txt": "jquery-3.2.0/LICENSE.txt",
421+
422+
"jquery-3.2.1/jquery.js": "jquery-3.2.1/dist/jquery.js",
423+
"jquery-3.2.1/LICENSE.txt": "jquery-3.2.1/LICENSE.txt",
424+
425+
"jquery-3.3.0/jquery.js": "jquery-3.3.0/dist/jquery.js",
426+
"jquery-3.3.0/LICENSE.txt": "jquery-3.3.0/LICENSE.txt",
427+
428+
"jquery-3.3.1/jquery.js": "jquery-3.3.1/dist/jquery.js",
429+
"jquery-3.3.1/LICENSE.txt": "jquery-3.3.1/LICENSE.txt",
430+
431+
"jquery-3.4.0/jquery.js": "jquery-3.4.0/dist/jquery.js",
432+
"jquery-3.4.0/LICENSE.txt": "jquery-3.4.0/LICENSE.txt",
433+
434+
"jquery-3.4.1/jquery.js": "jquery-3.4.1/dist/jquery.js",
435+
"jquery-3.4.1/LICENSE.txt": "jquery-3.4.1/LICENSE.txt",
436+
437+
"jquery-3.5.0/jquery.js": "jquery-3.5.0/dist/jquery.js",
438+
"jquery-3.5.0/LICENSE.txt": "jquery-3.5.0/LICENSE.txt",
439+
440+
"jquery-3.5.1/jquery.js": "jquery-3.5.1/dist/jquery.js",
441+
"jquery-3.5.1/LICENSE.txt": "jquery-3.5.1/LICENSE.txt",
442+
443+
"jquery-3.6.0/jquery.js": "jquery-3.6.0/dist/jquery.js",
444+
"jquery-3.6.0/LICENSE.txt": "jquery-3.6.0/LICENSE.txt",
445+
400446
"jquery-migrate-1.4.1/jquery-migrate.js": "jquery-migrate-1.4.1/dist/jquery-migrate.js",
401447
"jquery-migrate-1.4.1/LICENSE.txt": "jquery-migrate-1.4.1/LICENSE.txt",
402448

403-
"jquery-migrate-3.0.0/jquery-migrate.js": "jquery-migrate-3.0.0/dist/jquery-migrate.js",
404-
"jquery-migrate-3.0.0/LICENSE.txt": "jquery-migrate-3.0.0/LICENSE.txt"
449+
"jquery-migrate-3.3.2/jquery-migrate.js": "jquery-migrate-3.3.2/dist/jquery-migrate.js",
450+
"jquery-migrate-3.3.2/LICENSE.txt": "jquery-migrate-3.3.2/LICENSE.txt"
405451
}
406452
}
407453
},
@@ -432,43 +478,43 @@ grunt.initConfig({
432478
"Bohdan Ganicky <bohdan.ganicky@gmail.com>"
433479
]
434480
}
435-
});
481+
} );
436482

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

441-
getAuthors({
487+
getAuthors( {
442488
priorAuthors: grunt.config( "authors.prior" )
443489
}, function( error, authors ) {
444490
if ( error ) {
445491
grunt.log.error( error );
446492
return done( false );
447493
}
448494

449-
authors = authors.map(function( author ) {
495+
authors = authors.map( function( author ) {
450496
if ( author.match( /^Jacek Jędrzejewski </ ) ) {
451497
return "Jacek Jędrzejewski (http://jacek.jedrzejewski.name)";
452498
} else if ( author.match( /^Pawel Maruszczyk </ ) ) {
453499
return "Pawel Maruszczyk (http://hrabstwo.net)";
454500
} else {
455501
return author;
456502
}
457-
});
503+
} );
458504

459505
grunt.file.write( "AUTHORS.txt",
460506
"Authors ordered by first contribution\n" +
461507
"A list of current team members is available at http://jqueryui.com/about\n\n" +
462508
authors.join( "\n" ) + "\n" );
463509
done();
464-
});
465-
});
466-
467-
grunt.registerTask( "default", [ "lint", "requirejs", "test" ]);
468-
grunt.registerTask( "jenkins", [ "default", "concat" ]);
469-
grunt.registerTask( "lint", [ "asciilint", "jshint", "jscs", "csslint", "htmllint" ]);
470-
grunt.registerTask( "test", [ "qunit" ]);
471-
grunt.registerTask( "sizer", [ "requirejs:js", "uglify:main", "compare_size:all" ]);
472-
grunt.registerTask( "sizer_all", [ "requirejs:js", "uglify", "compare_size" ]);
510+
} );
511+
} );
512+
513+
grunt.registerTask( "default", [ "lint", "requirejs", "test" ] );
514+
grunt.registerTask( "jenkins", [ "default", "concat" ] );
515+
grunt.registerTask( "lint", [ "asciilint", "jshint", "jscs", "csslint", "htmllint" ] );
516+
grunt.registerTask( "test", [ "qunit" ] );
517+
grunt.registerTask( "sizer", [ "requirejs:js", "uglify:main", "compare_size:all" ] );
518+
grunt.registerTask( "sizer_all", [ "requirejs:js", "uglify", "compare_size" ] );
473519

474520
};

0 commit comments

Comments
 (0)