#!/usr/bin/env node /* * jQuery Release Note Generator */ var http = require("http"), extract = /(.*?)<[^"]+"component">\s*(\S+)/g, version = process.argv[2]; if ( !/^\d+\.\d+/.test( version ) ) { console.error( "Invalid version number: " + version ); process.exit( 1 ); } http.request({ host: "bugs.jquery.com", port: 80, method: "GET", path: "/query?status=closed&resolution=fixed&max=400&component=!web&order=component&milestone=" + version }, function( res ) { var data = []; res.on( "data", function( chunk ) { data.push( chunk ); }); res.on( "end", function() { var match, cur, cat, file = data.join(""); while ( (match = extract.exec( file )) ) { if ( "#" + match[1] !== match[2] ) { cat = match[3]; if ( !cur || cur !== cat ) { if ( cur ) { console.log(""); } cur = cat; console.log( "

" + cat.charAt(0).toUpperCase() + cat.slice(1) + "

" ); console.log("
"); } }); }).end();