Permalink
Browse files

Build: Update jscs and lint files

Fixes gh-2056
  • Loading branch information...
markelog committed Aug 16, 2015
1 parent 7aa46e0 commit 10fdad742a2a6aa9f0e00b3e04fc5264797c53c7
Showing with 8,708 additions and 7,968 deletions.
  1. +5 −1 .jscsrc
  2. +10 −4 Gruntfile.js
  3. +4 −3 build/release.js
  4. +10 −9 build/release/cdn.js
  5. +7 −6 build/release/dist.js
  6. +6 −5 build/release/ensure-sizzle.js
  7. +18 −16 build/release/release-notes.js
  8. +36 −15 build/tasks/build.js
  9. +7 −7 build/tasks/dist.js
  10. +1 −1 build/tasks/install_jsdom.js
  11. +2 −1 build/tasks/sourcemap.js
  12. +7 −6 build/tasks/testswarm.js
  13. +2 −2 package.json
  14. +58 −26 src/ajax.js
  15. +14 −12 src/ajax/jsonp.js
  16. +9 −9 src/ajax/load.js
  17. +2 −2 src/ajax/parseJSON.js
  18. +2 −2 src/ajax/parseXML.js
  19. +9 −8 src/ajax/script.js
  20. +2 −2 src/ajax/var/location.js
  21. +2 −2 src/ajax/var/nonce.js
  22. +3 −3 src/ajax/var/rquery.js
  23. +16 −10 src/ajax/xhr.js
  24. +2 −2 src/attributes.js
  25. +12 −10 src/attributes/attr.js
  26. +20 −18 src/attributes/classes.js
  27. +10 −10 src/attributes/prop.js
  28. +4 −4 src/attributes/support.js
  29. +27 −19 src/attributes/val.js
  30. +15 −7 src/callbacks.js
  31. +29 −21 src/core.js
  32. +10 −5 src/core/access.js
  33. +15 −12 src/core/init.js
  34. +7 −6 src/core/parseHTML.js
  35. +7 −4 src/core/ready.js
  36. +4 −4 src/core/support.js
  37. +4 −3 src/core/var/rsingleTag.js
  38. +31 −20 src/css.js
  39. +5 −3 src/css/addGetHookIf.js
  40. +7 −3 src/css/adjustCSS.js
  41. +4 −3 src/css/curCSS.js
  42. +2 −2 src/css/hiddenVisibleSelectors.js
  43. +3 −2 src/css/showHide.js
  44. +9 −5 src/css/support.js
  45. +2 −2 src/css/var/cssExpand.js
  46. +2 −2 src/css/var/getStyles.js
  47. +4 −2 src/css/var/isHidden.js
  48. +3 −3 src/css/var/rmargin.js
  49. +2 −2 src/css/var/rnumnonpx.js
  50. +2 −2 src/css/var/swap.js
  51. +14 −13 src/data.js
  52. +4 −4 src/data/Data.js
  53. +3 −2 src/data/accepts.js
  54. +2 −2 src/data/var/dataPriv.js
  55. +2 −2 src/data/var/dataUser.js
  56. +33 −24 src/deferred.js
  57. +2 −2 src/deprecated.js
  58. +6 −4 src/dimensions.js
  59. +45 −36 src/effects.js
  60. +4 −2 src/effects/Tween.js
  61. +4 −4 src/effects/animatedSelector.js
  62. +70 −50 src/event.js
  63. +4 −4 src/event/ajax.js
  64. +8 −7 src/event/alias.js
  65. +2 −2 src/event/support.js
  66. +3 −3 src/exports/amd.js
  67. +1 −0 src/exports/global.js
  68. +3 −3 src/jquery.js
  69. +27 −24 src/manipulation.js
  70. +4 −4 src/manipulation/_evalUrl.js
  71. +3 −2 src/manipulation/buildFragment.js
  72. +3 −2 src/manipulation/getAll.js
  73. +2 −2 src/manipulation/setGlobalEval.js
  74. +4 −4 src/manipulation/support.js
  75. +3 −3 src/manipulation/var/rcheckableType.js
  76. +2 −2 src/manipulation/var/rscriptType.js
  77. +2 −2 src/manipulation/var/rtagName.js
  78. +2 −2 src/manipulation/wrapMap.js
  79. +15 −11 src/offset.js
  80. +17 −16 src/queue.js
  81. +3 −3 src/queue/delay.js
  82. +21 −15 src/selector-native.js
  83. +3 −3 src/selector-sizzle.js
  84. +1 −1 src/selector.js
  85. +22 −13 src/serialize.js
  86. +21 −18 src/traversing.js
  87. +12 −12 src/traversing/findFilter.js
  88. +2 −2 src/traversing/var/rneedsContext.js
  89. +2 −2 src/var/arr.js
  90. +3 −2 src/var/class2type.js
  91. +2 −2 src/var/concat.js
  92. +2 −2 src/var/document.js
  93. +2 −2 src/var/documentElement.js
  94. +2 −2 src/var/hasOwn.js
  95. +2 −2 src/var/indexOf.js
  96. +3 −3 src/var/pnum.js
  97. +2 −2 src/var/push.js
  98. +2 −2 src/var/rcssNum.js
  99. +3 −3 src/var/rnotwhite.js
  100. +2 −2 src/var/slice.js
  101. +3 −2 src/var/support.js
  102. +2 −2 src/var/toString.js
  103. +16 −16 src/wrap.js
  104. +1,070 −782 test/data/jquery-1.9.1.js
  105. +6 −6 test/data/readywaitloader.js
  106. +21 −20 test/data/testinit.js
  107. +16 −11 test/data/testrunner.js
  108. +1 −1 test/node_smoke_tests/document_missing.js
  109. +471 −467 test/unit/ajax.js
  110. +610 −610 test/unit/attributes.js
  111. +65 −65 test/unit/callbacks.js
  112. +505 −499 test/unit/core.js
  113. +440 −434 test/unit/css.js
  114. +339 −333 test/unit/data.js
  115. +215 −215 test/unit/deferred.js
  116. +1 −1 test/unit/deprecated.js
  117. +120 −120 test/unit/dimensions.js
  118. +677 −659 test/unit/effects.js
  119. +937 −929 test/unit/event.js
  120. +4 −4 test/unit/exports.js
  121. +788 −789 test/unit/manipulation.js
  122. +207 −209 test/unit/offset.js
  123. +120 −120 test/unit/queue.js
  124. +5 −5 test/unit/ready.js
  125. +229 −229 test/unit/selector.js
  126. +64 −64 test/unit/serialize.js
  127. +9 −7 test/unit/support.js
  128. +522 −524 test/unit/traversing.js
  129. +365 −186 test/unit/wrap.js
View
@@ -1,6 +1,10 @@
{
"preset": "jquery",
// remove after https://github.com/jscs-dev/node-jscs/issues/1685
// and https://github.com/jscs-dev/node-jscs/issues/1686
"requireCapitalizedComments": null,
"excludeFiles": [ "external", "src/intro.js", "src/outro.js",
"test/node_smoke_tests/lib/ensure_iterability.js" ]
"test/node_smoke_tests/lib/ensure_iterability.js", "node_modules" ]
}
View
@@ -20,7 +20,7 @@ module.exports = function( grunt ) {
// But our modules can
delete srcHintOptions.onevar;
grunt.initConfig({
grunt.initConfig( {
pkg: grunt.file.readJSON( "package.json" ),
dst: readOptionalJSON( "dist/.destination.json" ),
"compare_size": {
@@ -53,6 +53,7 @@ module.exports = function( grunt ) {
"core",
"selector"
],
// Exclude specified modules if the module matching the key is removed
removeWith: {
ajax: [ "manipulation/_evalUrl", "event/ajax" ],
@@ -108,7 +109,12 @@ module.exports = function( grunt ) {
gruntfile: "Gruntfile.js",
// Check parts of tests that pass
test: [ "test/data/testrunner.js", "test/unit/animation.js", "test/unit/tween.js" ],
test: [
"test/data/testrunner.js",
"test/unit/animation.js",
"test/unit/tween.js",
"test/unit/wrap.js"
],
release: [ "build/*.js", "!build/release-notes.js" ],
tasks: "build/tasks/*.js"
},
@@ -162,7 +168,7 @@ module.exports = function( grunt ) {
}
}
}
});
} );
// Load grunt tasks from NPM packages
require( "load-grunt-tasks" )( grunt );
@@ -177,7 +183,7 @@ module.exports = function( grunt ) {
grunt.registerTask( "test", [ "test_fast", "promises_aplus_tests" ] );
// Short list as a high frequency watch task
grunt.registerTask( "dev", [ "build:*:*", "lint", "uglify", "remove_map_comment", "dist:*" ] );
grunt.registerTask( "dev", [ "build:*:*", "uglify", "remove_map_comment", "dist:*" ] );
grunt.registerTask( "default", [ "dev", "test_fast", "compare_size" ] );
};
View
@@ -9,7 +9,7 @@ module.exports = function( Release ) {
npmTags = Release.npmTags;
Release.define({
Release.define( {
npmPublish: true,
issueTracker: "github",
/**
@@ -36,6 +36,7 @@ module.exports = function( Release ) {
* for publishing the distribution repo instead
*/
npmTags: function() {
// origRepo is not defined if dist was skipped
Release.dir.repo = Release.dir.origRepo || Release.dir.repo;
return npmTags();
@@ -47,9 +48,9 @@ module.exports = function( Release ) {
dist: function( callback ) {
cdn.makeArchives( Release, function() {
dist( Release, callback );
});
} );
}
});
} );
};
module.exports.dependencies = [
View
@@ -29,13 +29,14 @@ var
function makeReleaseCopies( Release ) {
shell.mkdir( "-p", cdnFolder );
Object.keys( releaseFiles ).forEach(function( key ) {
Object.keys( releaseFiles ).forEach( function( key ) {
var text,
builtFile = releaseFiles[ key ],
unpathedFile = key.replace( /VER/g, Release.newVersion ),
releaseFile = cdnFolder + "/" + unpathedFile;
if ( /\.map$/.test( releaseFile ) ) {
// Map files need to reference the new uncompressed name;
// assume that all files reside in the same directory.
// "file":"jquery.min.js","sources":["jquery.js"]
@@ -47,7 +48,7 @@ function makeReleaseCopies( Release ) {
} else if ( builtFile !== releaseFile ) {
shell.cp( "-f", builtFile, releaseFile );
}
});
} );
}
function makeArchives( Release, callback ) {
@@ -75,23 +76,23 @@ function makeArchives( Release, callback ) {
output.on( "error", function( err ) {
throw err;
});
} );
archiver.pipe( output );
files = files.map(function( item ) {
files = files.map( function( item ) {
return "dist" + ( rver.test( item ) ? "/cdn" : "" ) + "/" +
item.replace( rver, Release.newVersion );
});
} );
sum = Release.exec( "md5sum " + files.join( " " ), "Error retrieving md5sum" );
fs.writeFileSync( md5file, sum );
files.push( md5file );
files.forEach(function( file ) {
files.forEach( function( file ) {
archiver.append( fs.createReadStream( file ),
{ name: path.basename( file ) } );
});
} );
archiver.finalize();
}
@@ -104,9 +105,9 @@ function makeArchives( Release, callback ) {
makeArchive( "mscdn", msFilesCDN, callback );
}
buildGoogleCDN(function() {
buildGoogleCDN( function() {
buildMicrosoftCDN( callback );
});
} );
}
module.exports = {
View
@@ -5,6 +5,7 @@ module.exports = function( Release, complete ) {
shell = require( "shelljs" ),
pkg = require( Release.dir.repo + "/package.json" ),
distRemote = Release.remote.replace( "jquery.git", "jquery-dist.git" ),
// These files are included with the distribution
files = [
"src",
@@ -34,15 +35,15 @@ module.exports = function( Release, complete ) {
* Generate bower file for jquery-dist
*/
function generateBower() {
return JSON.stringify({
return JSON.stringify( {
name: pkg.name,
main: pkg.main,
license: "MIT",
ignore: [
"package.json"
],
keywords: pkg.keywords
}, null, 2);
}, null, 2 );
}
/**
@@ -57,14 +58,14 @@ module.exports = function( Release, complete ) {
"dist/jquery.js",
"dist/jquery.min.js",
"dist/jquery.min.map"
].forEach(function( file ) {
].forEach( function( file ) {
shell.cp( Release.dir.repo + "/" + file, distFolder );
});
} );
// Copy other files
files.forEach(function( file ) {
files.forEach( function( file ) {
shell.cp( "-r", Release.dir.repo + "/" + file, Release.dir.dist );
});
} );
// Write generated bower file
fs.writeFileSync( Release.dir.dist + "/bower.json", generateBower() );
@@ -8,7 +8,7 @@ var fs = require( "fs" ),
* @param {Function(string)} callback
*/
function getLatestSizzle( callback ) {
npm.load(function( err, npm ) {
npm.load( function( err, npm ) {
if ( err ) {
throw err;
}
@@ -17,8 +17,8 @@ function getLatestSizzle( callback ) {
throw err;
}
callback( Object.keys( info )[ 0 ] );
});
});
} );
} );
}
/**
@@ -29,11 +29,12 @@ function getLatestSizzle( callback ) {
function ensureSizzle( Release, callback ) {
console.log();
console.log( "Checking Sizzle version..." );
getLatestSizzle(function( latest ) {
getLatestSizzle( function( latest ) {
var match = rversion.exec( fs.readFileSync( sizzleLoc, "utf8" ) ),
version = match ? match[ 1 ] : "Not Found";
if ( version !== latest ) {
// colors is inherited from jquery-release
console.log(
"The Sizzle version in the src folder (" + version.red +
@@ -44,7 +45,7 @@ function ensureSizzle( Release, callback ) {
console.log( "Sizzle is latest (" + latest.green + ")" );
callback();
}
});
} );
}
module.exports = ensureSizzle;
@@ -3,16 +3,16 @@
* jQuery Release Note Generator
*/
var http = require("http"),
var http = require( "http" ),
extract = /<a href="\/ticket\/(\d+)" title="View ticket">(.*?)<[^"]+"component">\s*(\S+)/g,
version = process.argv[2];
version = process.argv[ 2 ];
if ( !/^\d+\.\d+/.test( version ) ) {
console.error( "Invalid version number: " + version );
process.exit( 1 );
}
http.request({
http.request( {
host: "bugs.jquery.com",
port: 80,
method: "GET",
@@ -23,34 +23,36 @@ http.request({
res.on( "data", function( chunk ) {
data.push( chunk );
});
} );
res.on( "end", function() {
var match, cur, cat,
file = data.join("");
file = data.join( "" );
while ( (match = extract.exec( file )) ) {
if ( "#" + match[1] !== match[2] ) {
cat = match[3];
while ( ( match = extract.exec( file ) ) ) {
if ( "#" + match[ 1 ] !== match[ 2 ] ) {
cat = match[ 3 ];
if ( !cur || cur !== cat ) {
if ( cur ) {
console.log("</ul>");
console.log( "</ul>" );
}
cur = cat;
console.log( "<h3>" + cat.charAt(0).toUpperCase() + cat.slice(1) + "</h3>" );
console.log("<ul>");
console.log(
"<h3>" + cat.charAt( 0 ).toUpperCase() + cat.slice( 1 ) + "</h3>"
);
console.log( "<ul>" );
}
console.log(
" <li><a href=\"http://bugs.jquery.com/ticket/" + match[1] + "\">#" +
match[1] + ": " + match[2] + "</a></li>"
" <li><a href=\"http://bugs.jquery.com/ticket/" + match[ 1 ] + "\">#" +
match[ 1 ] + ": " + match[ 2 ] + "</a></li>"
);
}
}
if ( cur ) {
console.log("</ul>");
console.log( "</ul>" );
}
});
}).end();
} );
} ).end();
Oops, something went wrong.

0 comments on commit 10fdad7

Please sign in to comment.