Permalink
Browse files

Build: Update jscs and lint files

Ref 10fdad7
Fixes gh-2056
  • Loading branch information...
markelog committed Sep 2, 2015
1 parent fa8a5a9 commit 20ddbe4f594f78f7f1095050aabd91882dde0670
Showing with 8,857 additions and 8,084 deletions.
  1. +9 −2 .jscsrc
  2. +8 −3 Gruntfile.js
  3. +4 −3 build/release.js
  4. +12 −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. +35 −14 build/tasks/build.js
  9. +7 −7 build/tasks/dist.js
  10. +1 −1 build/tasks/install_jsdom.js
  11. +2 −2 build/tasks/promises-aplus-tests.js
  12. +2 −1 build/tasks/sourcemap.js
  13. +7 −6 build/tasks/testswarm.js
  14. +1 −1 package.json
  15. +58 −25 src/ajax.js
  16. +11 −9 src/ajax/jsonp.js
  17. +9 −9 src/ajax/load.js
  18. +2 −2 src/ajax/parseJSON.js
  19. +2 −2 src/ajax/parseXML.js
  20. +9 −9 src/ajax/script.js
  21. +2 −2 src/ajax/var/location.js
  22. +2 −2 src/ajax/var/nonce.js
  23. +3 −3 src/ajax/var/rquery.js
  24. +15 −6 src/ajax/xhr.js
  25. +2 −2 src/attributes.js
  26. +9 −9 src/attributes/attr.js
  27. +18 −16 src/attributes/classes.js
  28. +12 −10 src/attributes/prop.js
  29. +6 −5 src/attributes/support.js
  30. +30 −20 src/attributes/val.js
  31. +15 −7 src/callbacks.js
  32. +36 −26 src/core.js
  33. +10 −5 src/core/access.js
  34. +13 −10 src/core/init.js
  35. +4 −3 src/core/parseHTML.js
  36. +10 −4 src/core/ready.js
  37. +4 −4 src/core/support.js
  38. +4 −3 src/core/var/rsingleTag.js
  39. +42 −23 src/css.js
  40. +5 −3 src/css/addGetHookIf.js
  41. +7 −3 src/css/adjustCSS.js
  42. +3 −2 src/css/curCSS.js
  43. +2 −2 src/css/hiddenVisibleSelectors.js
  44. +3 −2 src/css/showHide.js
  45. +11 −6 src/css/support.js
  46. +2 −2 src/css/var/cssExpand.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. +25 −17 src/data.js
  52. +4 −4 src/data/accepts.js
  53. +4 −4 src/data/support.js
  54. +33 −24 src/deferred.js
  55. +2 −2 src/deprecated.js
  56. +7 −4 src/dimensions.js
  57. +46 −36 src/effects.js
  58. +4 −2 src/effects/Tween.js
  59. +4 −4 src/effects/animatedSelector.js
  60. +94 −59 src/event.js
  61. +4 −4 src/event/ajax.js
  62. +8 −7 src/event/alias.js
  63. +7 −6 src/event/support.js
  64. +3 −3 src/exports/amd.js
  65. +1 −0 src/exports/global.js
  66. +3 −3 src/jquery.js
  67. +46 −40 src/manipulation.js
  68. +4 −4 src/manipulation/_evalUrl.js
  69. +8 −8 src/manipulation/buildFragment.js
  70. +2 −2 src/manipulation/createSafeFragment.js
  71. +3 −3 src/manipulation/getAll.js
  72. +4 −4 src/manipulation/setGlobalEval.js
  73. +5 −4 src/manipulation/support.js
  74. +2 −2 src/manipulation/var/nodeNames.js
  75. +3 −3 src/manipulation/var/rcheckableType.js
  76. +2 −2 src/manipulation/var/rleadingWhitespace.js
  77. +2 −2 src/manipulation/var/rscriptType.js
  78. +2 −2 src/manipulation/var/rtagName.js
  79. +2 −2 src/manipulation/wrapMap.js
  80. +17 −13 src/offset.js
  81. +18 −17 src/queue.js
  82. +3 −3 src/queue/delay.js
  83. +3 −3 src/selector-sizzle.js
  84. +1 −1 src/selector.js
  85. +23 −13 src/serialize.js
  86. +2 −2 src/support.js
  87. +25 −21 src/traversing.js
  88. +12 −12 src/traversing/findFilter.js
  89. +2 −2 src/traversing/var/rneedsContext.js
  90. +3 −2 src/var/class2type.js
  91. +2 −2 src/var/concat.js
  92. +2 −2 src/var/deletedIds.js
  93. +2 −2 src/var/document.js
  94. +2 −2 src/var/documentElement.js
  95. +2 −2 src/var/hasOwn.js
  96. +2 −2 src/var/indexOf.js
  97. +3 −3 src/var/pnum.js
  98. +2 −2 src/var/push.js
  99. +2 −2 src/var/rcssNum.js
  100. +3 −3 src/var/rnotwhite.js
  101. +2 −2 src/var/slice.js
  102. +3 −2 src/var/support.js
  103. +2 −2 src/var/toString.js
  104. +16 −16 src/wrap.js
  105. +1,070 −782 test/data/jquery-1.9.1.js
  106. +6 −6 test/data/readywaitloader.js
  107. +2 −2 test/data/support/csp.js
  108. +25 −24 test/data/testinit.js
  109. +13 −8 test/data/testrunner.js
  110. +3 −3 test/integration/data/gh-1764-fullscreen.js
  111. +13 −11 test/jquery.js
  112. +1 −1 test/node_smoke_tests/document_missing.js
  113. +3 −3 test/promises-aplus-adapter.js
  114. +2 −2 test/promises_aplus_adapter.js
  115. +482 −477 test/unit/ajax.js
  116. +613 −612 test/unit/attributes.js
  117. +65 −65 test/unit/callbacks.js
  118. +499 −495 test/unit/core.js
  119. +466 −462 test/unit/css.js
  120. +321 −315 test/unit/data.js
  121. +215 −215 test/unit/deferred.js
  122. +1 −1 test/unit/deprecated.js
  123. +124 −122 test/unit/dimensions.js
  124. +679 −660 test/unit/effects.js
  125. +954 −948 test/unit/event.js
  126. +4 −4 test/unit/exports.js
  127. +805 −804 test/unit/manipulation.js
  128. +207 −209 test/unit/offset.js
  129. +118 −118 test/unit/queue.js
  130. +5 −5 test/unit/ready.js
  131. +233 −233 test/unit/selector.js
  132. +63 −63 test/unit/serialize.js
  133. +16 −15 test/unit/support.js
  134. +524 −526 test/unit/traversing.js
  135. +346 −182 test/unit/wrap.js
View
11 .jscsrc
@@ -1,6 +1,13 @@
{
"preset": "jquery",
"excludeFiles": [ "external", "src/intro.js", "src/outro.js",
"test/node_smoke_tests/lib/ensure_iterability.js" ]
// 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",
"node_modules",
"test/node_smoke_tests/lib/ensure_iterability.js"
]
}
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": {
@@ -107,7 +107,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"
],
build: "build"
},
testswarm: {
@@ -160,7 +165,7 @@ module.exports = function( grunt ) {
}
}
}
});
} );
// Load grunt tasks from NPM packages
require( "load-grunt-tasks" )( grunt );
View
@@ -10,7 +10,7 @@ module.exports = function( Release ) {
npmTags = Release.npmTags,
createTag = Release._createTag;
Release.define({
Release.define( {
npmPublish: true,
issueTracker: "github",
/**
@@ -48,6 +48,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();
@@ -59,9 +60,9 @@ module.exports = function( Release ) {
dist: function( callback ) {
cdn.makeArchives( Release, function() {
dist( Release, callback );
});
} );
}
});
} );
};
module.exports.dependencies = [
View
@@ -33,13 +33,14 @@ function makeReleaseCopies( Release ) {
var version = Release.newVersion.replace( "-compat", "" );
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, version ),
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"]
@@ -51,7 +52,7 @@ function makeReleaseCopies( Release ) {
} else if ( builtFile !== releaseFile ) {
shell.cp( "-f", builtFile, releaseFile );
}
});
} );
}
function makeArchives( Release, callback ) {
@@ -80,28 +81,30 @@ 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, version );
});
} );
sum = Release.exec(
// Read jQuery files
"md5sum " + files.join( " " ).replace( rcompat, "." ),
"Error retrieving md5sum"
);
fs.writeFileSync( "./" + md5file, sum );
files.push( md5file );
files.forEach(function( file ) {
files.forEach( function( file ) {
// For Google, read jquery.js, write jquery-compat.js
archiver.append( fs.createReadStream( file.replace( rcompat, "." ) ),
{ name: path.basename( file ) } );
});
} );
archiver.finalize();
}
@@ -114,9 +117,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-compat-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-compat-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 20ddbe4

Please sign in to comment.