3 * jQuery Release Note Generator
6 var fs = require("fs"),
7 http = require("http"),
8 tmpl = require("mustache"),
9 extract = /<a href="\/ticket\/(\d+)" title="View ticket">(.*?)<[^"]+"component">\s*(\S+)/g;
12 version: "1.6.3 RC 1",
13 short_version: "1.6.3rc1",
14 final_version: "1.6.3",
19 host: "bugs.jquery.com",
22 path: "/query?status=closed&resolution=fixed&component=!web&order=component&milestone=" + opts.final_version
26 res.on( "data", function( chunk ) {
30 res.on( "end", function() {
35 while ( (match = extract.exec( file )) ) {
36 if ( "#" + match[1] !== match[2] ) {
39 if ( !cur || cur.name !== cat ) {
40 cur = { name: match[3], niceName: match[3].replace(/^./, function(a){ return a.toUpperCase(); }), bugs: [] };
41 opts.categories.push( cur );
44 cur.bugs.push({ ticket: match[1], title: match[2] });
52 function buildNotes() {
53 console.log( tmpl.to_html( fs.readFileSync("release-notes.txt", "utf8"), opts ) );