aboutsummaryrefslogtreecommitdiffstats
path: root/build/release/release-notes.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/release/release-notes.js')
-rw-r--r--build/release/release-notes.js34
1 files changed, 18 insertions, 16 deletions
diff --git a/build/release/release-notes.js b/build/release/release-notes.js
index 00cdc8659..f3f6a6ff2 100644
--- a/build/release/release-notes.js
+++ b/build/release/release-notes.js
@@ -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();