Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: jquery/jquery
base: 3.0.0
head repository: jquery/jquery
compare: 3.1.0
  • 9 commits
  • 59 files changed
  • 7 comments
  • 3 contributors
Commits on Jun 22, 2016
* Bump eslint-config-jquery package to 0.1.4 version

* Add subtask "dist" to "eslint" task and add it to the build task list

* Make gitignore globs more flexible for the "dist" folder

Fixes gh-3169
Showing with 18,480 additions and 355 deletions.
  1. +2 −0 .jshintignore → .eslintignore
  2. +7 −0 .eslintrc
  3. +4 −1 .gitignore
  4. +0 −10 .jscsrc
  5. +0 −14 .jshintrc
  6. +2 −2 .npmignore
  7. +22 −35 Gruntfile.js
  8. +5 −0 build/release.js
  9. +9 −2 build/tasks/build.js
  10. +1 −3 build/tasks/lib/spawn_test.js
  11. +5 −5 build/tasks/promises_aplus_tests.js
  12. +17 −0 dist/.eslintrc
  13. +10,074 −0 dist/jquery.js
  14. +4 −0 dist/jquery.min.js
  15. +1 −0 dist/jquery.min.map
  16. +7,966 −0 dist/jquery.slim.js
  17. +4 −0 dist/jquery.slim.min.js
  18. +1 −0 dist/jquery.slim.min.map
  19. +4 −4 package.json
  20. +6 −18 src/{.jshintrc → .eslintrc}
  21. +1 −0 src/ajax.js
  22. +5 −0 src/attributes/val.js
  23. +9 −7 src/core.js
  24. +10 −1 src/core/ready.js
  25. +13 −0 src/core/readyException.js
  26. +6 −2 src/css/adjustCSS.js
  27. +0 −1 src/data/var/acceptData.js
  28. +1 −1 src/deferred.js
  29. +9 −7 src/effects.js
  30. +1 −1 src/exports/global.js
  31. +6 −0 src/manipulation.js
  32. +3 −1 src/selector.js
  33. +0 −1 src/traversing/findFilter.js
  34. +3 −3 src/wrapper.js
  35. +24 −21 test/{.jshintrc → .eslintrc}
  36. +28 −29 test/data/testinit.js
  37. +7 −0 test/node_smoke_tests/.eslintrc
  38. +0 −14 test/node_smoke_tests/.jshintrc
  39. +0 −2 test/node_smoke_tests/iterable_with_symbol_polyfill.js
  40. +0 −2 test/node_smoke_tests/lib/ensure_iterability_es6.js
  41. +4 −0 test/promises_aplus_adapters/.eslintrc
  42. +2 −4 test/{promises_aplus_adapter_deferred.js → promises_aplus_adapters/deferred.js}
  43. +2 −4 test/{promises_aplus_adapter_when.js → promises_aplus_adapters/when.js}
  44. +4 −4 test/unit/ajax.js
  45. +4 −4 test/unit/attributes.js
  46. +62 −13 test/unit/core.js
  47. +16 −16 test/unit/css.js
  48. +3 −3 test/unit/data.js
  49. +5 −5 test/unit/deferred.js
  50. +2 −2 test/unit/deprecated.js
  51. +3 −3 test/unit/dimensions.js
  52. +3 −3 test/unit/effects.js
  53. +20 −19 test/unit/event.js
  54. +9 −9 test/unit/manipulation.js
  55. +57 −55 test/unit/offset.js
  56. +1 −1 test/unit/queue.js
  57. +15 −15 test/unit/selector.js
  58. +7 −7 test/unit/serialize.js
  59. +1 −1 test/unit/wrap.js
@@ -1,4 +1,6 @@
external
node_modules
*.min.js
test/data/jquery-1.9.1.js
test/data/badcall.js
test/data/badjson.js
@@ -0,0 +1,7 @@
{
"extends": "eslint-config-jquery",
"root": true,
"env": {
"node": true
}
}
@@ -10,7 +10,10 @@

npm-debug.log

/dist
# Ignore everything in dist folder except for eslint config
/dist/*
!/dist/.eslintrc

/node_modules

/test/node_smoke_tests/lib/ensure_iterability.js
10 .jscsrc

This file was deleted.

This file was deleted.

@@ -1,5 +1,5 @@
.jshintignore
.jshintrc
.eslintignore
.eslintrc

/.editorconfig
/.gitattributes
@@ -14,7 +14,6 @@ module.exports = function( grunt ) {

var fs = require( "fs" ),
gzip = require( "gzip-js" ),
srcHintOptions = readOptionalJSON( "src/.jshintrc" ),

// Skip jsdom-related tests in Node.js 0.10 & 0.12
runJsdomTests = !/^v0/.test( process.version );
@@ -103,34 +102,15 @@ module.exports = function( grunt ) {
src: [ "package.json" ]
}
},
jshint: {
all: {
src: [
"src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/**/*.js"
],
options: {
jshintrc: true
}
eslint: {
options: {

// See https://github.com/sindresorhus/grunt-eslint/issues/119
quiet: true
},
dist: {
src: "dist/jquery.js",
options: srcHintOptions
}
},
jscs: {
src: "src",
gruntfile: "Gruntfile.js",

// Check parts of tests that pass
test: [
"test/data/testrunner.js",
"test/unit/animation.js",
"test/unit/basic.js",
"test/unit/support.js",
"test/unit/tween.js",
"test/unit/wrap.js"
],
build: "build"
all: ".",
dist: "dist/jquery.js",
dev: [ "src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/**/*.js" ]
},
testswarm: {
tests: [
@@ -164,7 +144,7 @@ module.exports = function( grunt ) {
]
},
watch: {
files: [ "<%= jshint.all.src %>" ],
files: [ "<%= eslint.dev %>" ],
tasks: [ "dev" ]
},
uglify: {
@@ -201,7 +181,7 @@ module.exports = function( grunt ) {
// Integrate jQuery specific tasks
grunt.loadTasks( "build/tasks" );

grunt.registerTask( "lint", [ "jsonlint", "jshint", "jscs" ] );
grunt.registerTask( "lint", [ "jsonlint", "eslint:all" ] );

// Don't run Node-related tests in Node.js < 1.0.0 as they require an old
// jsdom version that needs compiling, making it harder for people to compile
@@ -213,9 +193,16 @@ module.exports = function( grunt ) {
) );

// Short list as a high frequency watch task
grunt.registerTask( "dev", [ "build:*:*", "lint", "uglify", "remove_map_comment", "dist:*" ] );

grunt.registerTask( "default", [ "dev", "test_fast", "compare_size" ] );

grunt.registerTask( "precommit_lint", [ "newer:jsonlint", "newer:jshint:all", "newer:jscs" ] );
grunt.registerTask( "dev", [
"build:*:*",
"newer:eslint:dev",
"uglify",
"remove_map_comment",
"dist:*"
]
);

grunt.registerTask( "default", [ "dev", "eslint:dist", "test_fast", "compare_size" ] );

grunt.registerTask( "precommit_lint", [ "newer:jsonlint", "newer:eslint:all" ] );
};
@@ -21,13 +21,15 @@ module.exports = function( Release ) {
Release.define( {
npmPublish: true,
issueTracker: "github",

/**
* Ensure the repo is in a proper state before release
* @param {Function} callback
*/
checkRepoState: function( callback ) {
ensureSizzle( Release, callback );
},

/**
* Set the version in the src folder for distributing AMD
*/
@@ -37,6 +39,7 @@ module.exports = function( Release ) {
contents = contents.replace( /@VERSION/g, Release.newVersion );
fs.writeFileSync( corePath, contents, "utf8" );
},

/**
* Generates any release artifacts that should be included in the release.
* The callback must be invoked with an array of files that should be
@@ -54,6 +57,7 @@ module.exports = function( Release ) {
Release._setSrcVersion();
callback( files );
},

/**
* Acts as insertion point for restoring Release.dir.repo
* It was changed to reuse npm publish code in jquery-release
@@ -65,6 +69,7 @@ module.exports = function( Release ) {
Release.dir.repo = Release.dir.origRepo || Release.dir.repo;
return npmTags();
},

/**
* Publish to distribution repo and npm
* @param {Function} callback
@@ -38,7 +38,7 @@ module.exports = function( grunt ) {
// Avoid breaking semicolons inserted by r.js
skipSemiColonInsertion: true,
wrap: {
start: wrapper[ 0 ].replace( /\/\*jshint .* \*\/\n/, "" ),
start: wrapper[ 0 ].replace( /\/\*eslint .* \*\/\n/, "" ),
end: globals.replace(
/\/\*\s*ExcludeStart\s*\*\/[\w\W]*?\/\*\s*ExcludeEnd\s*\*\//ig,
""
@@ -64,7 +64,12 @@ module.exports = function( grunt ) {
// Convert var modules
if ( /.\/var\//.test( path.replace( process.cwd(), "" ) ) ) {
contents = contents
.replace( /define\([\w\W]*?return/, "var " + ( /var\/([\w-]+)/.exec( name )[ 1 ] ) + " =" )
.replace(
/define\([\w\W]*?return/,
"var " +
( /var\/([\w-]+)/.exec( name )[ 1 ] ) +
" ="
)
.replace( rdefineEnd, "" );

// Sizzle treatment
@@ -130,6 +135,7 @@ module.exports = function( grunt ) {
excluded = [],
included = [],
version = grunt.config( "pkg.version" ),

/**
* Recursively calls the excluder to remove on all modules in the list
* @param {Array} list
@@ -167,6 +173,7 @@ module.exports = function( grunt ) {
} );
}
},

/**
* Adds the specified module to the excluded or included list, depending on the flag
* @param {String} flag A module path relative to
@@ -1,5 +1,3 @@
/* jshint node: true */

"use strict";

// Run Node with provided parameters: the first one being the Grunt
@@ -13,4 +11,4 @@ module.exports = function spawnTest( done ) {
.on( "close", function( code ) {
done( code === 0 );
} );
} ;
};
@@ -5,19 +5,19 @@ module.exports = function( grunt ) {
var spawnTest = require( "./lib/spawn_test.js" );

grunt.registerTask( "promises_aplus_tests",
[ "promises_aplus_tests_deferred", "promises_aplus_tests_when" ] );
[ "promises_aplus_tests:deferred", "promises_aplus_tests:when" ] );

grunt.registerTask( "promises_aplus_tests_deferred", function() {
grunt.registerTask( "promises_aplus_tests:deferred", function() {
spawnTest( this.async(),
"./node_modules/.bin/promises-aplus-tests",
"test/promises_aplus_adapter_deferred.js"
"test/promises_aplus_adapters/deferred.js"
);
} );

grunt.registerTask( "promises_aplus_tests_when", function() {
grunt.registerTask( "promises_aplus_tests:when", function() {
spawnTest( this.async(),
"./node_modules/.bin/promises-aplus-tests",
"test/promises_aplus_adapter_when.js"
"test/promises_aplus_adapters/when.js"
);
} );
};
@@ -0,0 +1,17 @@
{
"extends": "../src/.eslintrc",
"rules": {
// That is okay for built version
"no-multiple-empty-lines": "off",

// Because sizze is not compatible to jquery code style
"lines-around-comment": "off",
"space-in-parens": "off",
"camelcase": "off",
"computed-property-spacing": "off",
"max-len": "off",
"dot-notation": "off",
"semi-spacing": "off",
"brace-style": "off"
}
}

Showing you all comments on commits in this comparison.

@mgol

This comment has been minimized.

Copy link
Member

@mgol mgol commented on 58c6ca9 Jun 16, 2016

@markelog Could we change that to:

/dist/*
!/dist/.eslintrc

? I was relying on dist contents being out of the repo, putting there some test HTMLs so that I can check various things manually when needed. :-)

@markelog

This comment has been minimized.

Copy link
Member Author

@markelog markelog commented on 58c6ca9 Jun 17, 2016

Totally, will do that with #3169

@thomaswelton

This comment has been minimized.

Copy link

@thomaswelton thomaswelton commented on ad6a94c Feb 16, 2017

@mgol catch is a reserved word in IE9 doing a search this is the only instance in the codebase where .catch is used.
This is causing an error to be thrown when running in quirks mode.

@mgol

This comment has been minimized.

Copy link
Member Author

@mgol mgol commented on ad6a94c Feb 16, 2017

It's fine. If IE 9 didn't allow properties named as reserved words, there would be a parse error and jQuery wouldn't even load. We have an extensive test suite and we'd see it failed in such a spectacular way.

It works as it should: https://jsbin.com/zoyale/edit?html,js,output

@thomaswelton

This comment has been minimized.

Copy link

@thomaswelton thomaswelton commented on ad6a94c Feb 16, 2017

If IE9 is in quirks mode your jsbin throws the same error

@mgol

This comment has been minimized.

Copy link
Member Author

@mgol mgol commented on ad6a94c Feb 16, 2017

We don't support quirks mode and never have. Use the standard DOCTYPE.

@thomaswelton

This comment has been minimized.

Copy link

@thomaswelton thomaswelton commented on ad6a94c Feb 16, 2017

We do. However I've just noticed this when debugging a site in IE9 that was in quirks mode.