Generate static HTML blog content out of markdown
authorisaacs <i@izs.me>
Wed, 20 Jun 2012 17:14:45 +0000 (10:14 -0700)
committerisaacs <i@izs.me>
Thu, 21 Jun 2012 23:18:17 +0000 (16:18 -0700)
166 files changed:
.gitignore
Makefile
doc/blog.html [new file with mode: 0644]
doc/blog/Uncategorized/ldapjs-a-reprise-of-ldap.md
doc/blog/Uncategorized/welcome-to-the-node-blog.md [deleted file]
doc/blog/module/multi-server-continuous-deployment-with-fleet.md
doc/blog/npm/managing-node-js-dependencies-with-shrinkwrap.md
doc/blog/release/node-v0-4-10.md [new file with mode: 0644]
doc/blog/release/node-v0-4-11.md [new file with mode: 0644]
doc/blog/release/node-v0-4-12.md [new file with mode: 0644]
doc/blog/release/node-v0-4-3.md [new file with mode: 0644]
doc/blog/release/node-v0-4-4.md [new file with mode: 0644]
doc/blog/release/node-v0-4-5.md [new file with mode: 0644]
doc/blog/release/node-v0-4-6.md [new file with mode: 0644]
doc/blog/release/node-v0-4-7.md [new file with mode: 0644]
doc/blog/release/node-v0-4-8.md [new file with mode: 0644]
doc/blog/release/node-v0-4-9.md [new file with mode: 0644]
doc/blog/release/node-v0-5-0-unstable.md [new file with mode: 0644]
doc/blog/release/node-v0-5-1.md [new file with mode: 0644]
doc/blog/release/node-v0-5-10.md [new file with mode: 0644]
doc/blog/release/node-v0-5-2.md [new file with mode: 0644]
doc/blog/release/node-v0-5-3.md [new file with mode: 0644]
doc/blog/release/node-v0-5-4.md [new file with mode: 0644]
doc/blog/release/node-v0-5-5.md [new file with mode: 0644]
doc/blog/release/node-v0-5-6.md [new file with mode: 0644]
doc/blog/release/node-v0-5-7-unstable.md [new file with mode: 0644]
doc/blog/release/node-v0-5-8.md [new file with mode: 0644]
doc/blog/release/node-v0-5-9.md [new file with mode: 0644]
doc/blog/release/node-v0-6-0.md [new file with mode: 0644]
doc/blog/release/node-v0-6-1.md [new file with mode: 0644]
doc/blog/release/node-v0-6-10.md [new file with mode: 0644]
doc/blog/release/node-v0-6-2.md [new file with mode: 0644]
doc/blog/release/node-v0-6-3.md [new file with mode: 0644]
doc/blog/release/node-v0-6-4.md [new file with mode: 0644]
doc/blog/release/node-v0-6-5.md [new file with mode: 0644]
doc/blog/release/node-v0-6-6.md [new file with mode: 0644]
doc/blog/release/node-v0-6-7.md [new file with mode: 0644]
doc/blog/release/node-v0-6-8.md [new file with mode: 0644]
doc/blog/release/node-v0-6-9.md [new file with mode: 0644]
doc/blog/release/node-v0-7-0-unstable.md [new file with mode: 0644]
doc/blog/release/node-v0-7-1.md [new file with mode: 0644]
doc/blog/release/node-v0-7-2-unstable.md [new file with mode: 0644]
doc/blog/release/node-v0-7-3.md [new file with mode: 0644]
doc/blog/release/node-version-0-6-19-stable.md [new file with mode: 0644]
doc/blog/release/node-version-0-7-9-unstable.md [new file with mode: 0644]
doc/blog/release/version-0-6-11-stable.md [new file with mode: 0644]
doc/blog/release/version-0-6-12-stable.md [new file with mode: 0644]
doc/blog/release/version-0-6-13-stable.md [new file with mode: 0644]
doc/blog/release/version-0-6-14-stable.md [new file with mode: 0644]
doc/blog/release/version-0-6-15-stable.md [new file with mode: 0644]
doc/blog/release/version-0-6-16-stable.md [new file with mode: 0644]
doc/blog/release/version-0-6-17-stable.md [new file with mode: 0644]
doc/blog/release/version-0-6-18-stable.md [new file with mode: 0644]
doc/blog/release/version-0-7-10-unstable.md [new file with mode: 0644]
doc/blog/release/version-0-7-11-unstable.md [new file with mode: 0644]
doc/blog/release/version-0-7-12.md [new file with mode: 0644]
doc/blog/release/version-0-7-4-unstable.md [new file with mode: 0644]
doc/blog/release/version-0-7-5-unstable.md [new file with mode: 0644]
doc/blog/release/version-0-7-6-unstable.md [new file with mode: 0644]
doc/blog/release/version-0-7-7-unstable.md [new file with mode: 0644]
doc/blog/release/version-0-7-8-unstable.md [new file with mode: 0644]
doc/blog/video/bryan-cantrill-instrumenting-the-real-time-web.md
doc/blog/video/welcome-to-the-node-blog.md
doc/blog/vulnerability/http-server-security-vulnerability-please-upgrade-to-0-6-17.md
tools/blog/README.md [new file with mode: 0644]
tools/blog/generate.js [new file with mode: 0644]
tools/blog/node_modules/.bin/marked [new symlink]
tools/blog/node_modules/ejs/.gitmodules [new file with mode: 0644]
tools/blog/node_modules/ejs/.npmignore [new file with mode: 0644]
tools/blog/node_modules/ejs/History.md [new file with mode: 0644]
tools/blog/node_modules/ejs/Makefile [new file with mode: 0644]
tools/blog/node_modules/ejs/Readme.md [new file with mode: 0644]
tools/blog/node_modules/ejs/benchmark.js [new file with mode: 0644]
tools/blog/node_modules/ejs/ejs.js [new file with mode: 0644]
tools/blog/node_modules/ejs/ejs.min.js [new file with mode: 0644]
tools/blog/node_modules/ejs/examples/client.html [new file with mode: 0644]
tools/blog/node_modules/ejs/examples/list.ejs [new file with mode: 0644]
tools/blog/node_modules/ejs/examples/list.js [new file with mode: 0644]
tools/blog/node_modules/ejs/index.js [new file with mode: 0644]
tools/blog/node_modules/ejs/lib/ejs.js [new file with mode: 0644]
tools/blog/node_modules/ejs/lib/filters.js [new file with mode: 0644]
tools/blog/node_modules/ejs/lib/utils.js [new file with mode: 0644]
tools/blog/node_modules/ejs/package.json [new file with mode: 0644]
tools/blog/node_modules/ejs/support/compile.js [new file with mode: 0644]
tools/blog/node_modules/ejs/test/ejs.test.js [new file with mode: 0644]
tools/blog/node_modules/ejs/test/fixtures/user.ejs [new file with mode: 0644]
tools/blog/node_modules/glob/.npmignore [new file with mode: 0644]
tools/blog/node_modules/glob/.travis.yml [new file with mode: 0644]
tools/blog/node_modules/glob/LICENCE [new file with mode: 0644]
tools/blog/node_modules/glob/README.md [new file with mode: 0644]
tools/blog/node_modules/glob/examples/g.js [new file with mode: 0644]
tools/blog/node_modules/glob/examples/usr-local.js [new file with mode: 0644]
tools/blog/node_modules/glob/glob.js [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/graceful-fs/.npmignore [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/graceful-fs/LICENSE [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/graceful-fs/README.md [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/graceful-fs/graceful-fs.js [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/graceful-fs/package.json [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/inherits/README.md [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/inherits/inherits.js [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/inherits/package.json [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/.travis.yml [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/LICENSE [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/README.md [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/minimatch.js [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/package.json [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/test/basic.js [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/test/brace-expand.js [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/test/caching.js [new file with mode: 0644]
tools/blog/node_modules/glob/node_modules/minimatch/test/defaults.js [new file with mode: 0644]
tools/blog/node_modules/glob/package.json [new file with mode: 0644]
tools/blog/node_modules/glob/test/00-setup.js [new file with mode: 0644]
tools/blog/node_modules/glob/test/bash-comparison.js [new file with mode: 0644]
tools/blog/node_modules/glob/test/cwd-test.js [new file with mode: 0644]
tools/blog/node_modules/glob/test/pause-resume.js [new file with mode: 0644]
tools/blog/node_modules/glob/test/root-nomount.js [new file with mode: 0644]
tools/blog/node_modules/glob/test/root.js [new file with mode: 0644]
tools/blog/node_modules/glob/test/zz-cleanup.js [new file with mode: 0644]
tools/blog/node_modules/marked/.npmignore [new file with mode: 0644]
tools/blog/node_modules/marked/LICENSE [new file with mode: 0644]
tools/blog/node_modules/marked/Makefile [new file with mode: 0644]
tools/blog/node_modules/marked/README.md [new file with mode: 0644]
tools/blog/node_modules/marked/bin/marked [new file with mode: 0755]
tools/blog/node_modules/marked/index.js [new file with mode: 0644]
tools/blog/node_modules/marked/lib/marked.js [new file with mode: 0644]
tools/blog/node_modules/marked/man/marked.1 [new file with mode: 0644]
tools/blog/node_modules/marked/package.json [new file with mode: 0644]
tools/blog/node_modules/mkdirp/.gitignore.orig [new file with mode: 0644]
tools/blog/node_modules/mkdirp/.gitignore.rej [new file with mode: 0644]
tools/blog/node_modules/mkdirp/.npmignore [new file with mode: 0644]
tools/blog/node_modules/mkdirp/.travis.yml [new file with mode: 0644]
tools/blog/node_modules/mkdirp/LICENSE [new file with mode: 0644]
tools/blog/node_modules/mkdirp/README.markdown [new file with mode: 0644]
tools/blog/node_modules/mkdirp/examples/pow.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/examples/pow.js.orig [new file with mode: 0644]
tools/blog/node_modules/mkdirp/examples/pow.js.rej [new file with mode: 0644]
tools/blog/node_modules/mkdirp/index.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/package.json [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/chmod.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/clobber.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/mkdirp.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/perm.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/perm_sync.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/race.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/rel.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/return.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/return_sync.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/root.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/sync.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/umask.js [new file with mode: 0644]
tools/blog/node_modules/mkdirp/test/umask_sync.js [new file with mode: 0644]
tools/blog/node_modules/semver/LICENSE [new file with mode: 0644]
tools/blog/node_modules/semver/README.md [new file with mode: 0644]
tools/blog/node_modules/semver/bin/semver [new file with mode: 0755]
tools/blog/node_modules/semver/package.json [new file with mode: 0644]
tools/blog/node_modules/semver/semver.js [new file with mode: 0644]
tools/blog/node_modules/semver/test.js [new file with mode: 0644]
tools/blog/templates/index.ejs [new file with mode: 0644]
tools/blog/wp-to-markdown.js [new file with mode: 0644]

index 65c4732..f85adda 100644 (file)
@@ -18,6 +18,7 @@ node_g
 # various stuff that VC++ produces/uses
 Debug/
 Release/
+!doc/blog/**
 *.sln
 !nodemsi.sln
 *.suo
@@ -39,6 +40,5 @@ ipch/
 /npm.wxs
 /tools/msvs/npm.wixobj
 email.md
-blog.html
 deps/v8-*
 ./node_modules
index 3eada05..17ab607 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -130,7 +130,13 @@ website_files = \
        out/doc/changelog.html \
        $(doc_images)
 
-doc: program $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/
+doc: program $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ blog
+
+blogclean:
+       rm -rf out/blog
+
+blog: doc/blog out/Release/node tools/blog
+       out/Release/node tools/blog/generate.js doc/blog/ out/blog/ doc/blog.html
 
 $(apidoc_dirs):
        mkdir -p $@
@@ -160,6 +166,9 @@ email.md: ChangeLog tools/email-footer.md
 blog.html: email.md
        cat $< | ./node tools/doc/node_modules/.bin/marked > $@
 
+blog-upload: blog
+       rsync -r out/blog/ node@nodejs.org:~/web/nodejs.org/blog/
+
 website-upload: doc
        rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
        ssh node@nodejs.org '\
@@ -260,4 +269,4 @@ cpplint:
 
 lint: jslint cpplint
 
-.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all program staticlib dynamiclib test test-all website-upload pkg
+.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all program staticlib dynamiclib test test-all website-upload pkg blog blogclean
diff --git a/doc/blog.html b/doc/blog.html
new file mode 100644 (file)
index 0000000..718e554
--- /dev/null
@@ -0,0 +1,209 @@
+<!DOCTYPE html>
+
+<html lang="en">
+<head>
+  <meta charset="utf-8">
+  <link rel="stylesheet" href="http://nodejs.org/pipe.css">
+  <link rel="stylesheet" href="http://nodejs.org/sh_vim-dark.css">
+  <style>
+    #column1 h1 {
+      clear:both;
+    }
+    #column1 li, #content h1 + p {
+      color:inherit;
+      font-family: inherit;
+      font-size: 14px;
+      line-height:24px;
+    }
+    #content #column1 p.meta, #content #column1 p.respond {
+      font-size: 14px;
+      line-height: 24px;
+      color:#690;
+      font-family: inherit;
+    }
+    #content #column1 p.respond {
+      font-style:italic;
+      padding:2em 0;
+    }
+    #column1 a {
+      color: #8c0;
+    }
+    #column2 ul {
+      padding:0;
+    }
+    #column2 {
+      margin-top:-66px!important;
+    }
+    div.post-in-feed {
+      padding-bottom:1em;
+    }
+
+    p.next { float:right; width: 40%; text-align:right; }
+    p.prev { float:left; width:40%; text-align:left; }
+
+    pre { overflow: auto; }
+  </style>
+
+  <title><%= title %></title>
+</head>
+
+<body class="int blog" id="<%= pageid %>">
+  <div id="intro" class="interior">
+    <a href="/" title="Go back to the home page"><img id="logo" src=
+    "http://nodejs.org/logo.png" alt="node.js"></a>
+  </div>
+
+  <div id="content" class="clearfix">
+    <div id="column2" class="interior">
+      <ul>
+        <li><a href="http://nodejs.org/" class="home">Home</a></li>
+
+        <li><a href="http://nodejs.org/#download" class=
+        "download">Download</a></li>
+
+        <li><a href="http://nodejs.org/about/" class="about">About</a></li>
+
+        <li><a href="http://search.npmjs.org/" class="npm">npm
+        Registry</a></li>
+
+        <li><a href="http://nodejs.org/api/" class="docs">Docs</a></li>
+
+        <li><a href="http://blog.nodejs.org/" class="blog current">Blog</a></li>
+
+        <li><a href="http://nodejs.org/community/" class=
+        "community">Community</a></li>
+
+        <li><a href="http://nodejs.org/logos/" class=
+        "logos">Logos</a></li>
+
+        <li><a href="http://jobs.nodejs.org/" class="jobs">Jobs</a></li>
+      </ul>
+
+      <p class="twitter"><a href="http://twitter.com/nodejs">@nodejs</a></p>
+    </div>
+
+    <div id="column1" class="interior">
+      <h1><%- title %></h1>
+      <% if (typeof post !== 'undefined') {
+        // just one post on this page
+        %>
+        <p class="meta"><%=
+          post.author + ' - ' +
+          post.date.toUTCString().replace(/ GMT$/, '')
+          %></p>
+
+          <%- post.content %>
+
+          <p class="respond">Please post feedback and comments on
+            <a href="https://groups.google.com/group/nodejs">the Node.JS 
+              user mailing list</a>.</p>
+
+          <%
+          if (post.next || post.prev) {
+            if (post.prev) {
+              %><p class="prev"><a href="<%=
+                post.prev.permalink
+              %>">&larr; <%=
+                post.prev.title
+              %></a></p>
+              <%
+            }
+            if (post.next) {
+              %><p class="next"><a href="<%=
+                post.next.permalink
+              %>"><%=
+                post.next.title
+              %> &rarr;</a></p>
+              <%
+            }
+          }
+        } else {  // not single post page
+          if (paginated && total > 1 ) {
+            if (page > 0) {
+              // add 1 to all of the displayed numbers, because
+              // humans are not zero-indexed like they ought to be.
+              %>
+              <p class="prev"><a href="<%= uri + (page - 1) %>">
+                &larr; Page <%- page %>
+              </a></p>
+              <%
+            }
+            if (page < total - 1) { %>
+              <p class="next"><a href="<%= uri + (page + 1) %>">
+                Page <%- page + 2 %> &rarr;
+              </a></p>
+              <%
+            }
+          }
+
+          posts.forEach(function(post) {
+            %>
+            <div class="post-in-feed">
+              <h1><a href="<%=
+                post.permalink
+              %>" class="permalink"><%-
+                post.title
+              %></a></h1>
+              <p class="meta"><%=
+                post.author + ' - ' +
+                post.date.toUTCString().replace(/ GMT$/, '')
+              %></p>
+              <%- post.content %>
+            </div>
+            <%
+          });
+
+          if (paginated && total > 1 ) {
+            if (page > 0) {
+              // add 1 to all of the displayed numbers, because
+              // humans are not zero-indexed like they ought to be.
+              %>
+              <p class="prev"><a href="<%= uri + (page - 1) %>">
+                &larr; Page <%- page %>
+              </a></p>
+              <%
+            }
+            if (page < total - 1) { %>
+              <p class="next"><a href="<%= uri + (page + 1) %>">
+                Page <%- page + 2 %> &rarr;
+              </a></p>
+              <%
+            }
+          } // pagination
+        } // not a single post
+        %>
+    </div>
+  </div>
+
+  <div id="footer">
+      <ul class="clearfix">
+          <li><a href="/">Node.js</a></li>
+          <li><a href="/#download">Download</a></li>
+          <li><a href="/about/">About</a></li>
+          <li><a href="http://search.npmjs.org/">npm Registry</a></li>
+          <li><a href="http://nodejs.org/api/">Docs</a></li>
+          <li><a href="http://blog.nodejs.org">Blog</a></li>
+          <li><a href="/community/">Community</a></li>
+          <li><a href="/logos/">Logos</a></li>
+          <li><a href="http://jobs.nodejs.org/">Jobs</a></li>
+          <li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li>
+      </ul>
+
+      <p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/master/LICENSE">license</a>.</p>
+    </div>
+
+  <script src="../sh_main.js"></script>
+  <script src="../sh_javascript.min.js"></script>
+  <script>highlight(undefined, undefined, 'pre');</script>
+  <script>
+    var gaJsHost = (("https:" == document.location.protocol) ?
+    "https://ssl." : "http://www.");
+    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+  </script>
+  <script>
+    try {
+      var pageTracker = _gat._getTracker("UA-10874194-2");
+      pageTracker._trackPageview();
+      } catch(err) {}</script>
+</body>
+</html>
index 3507b61..57d4af7 100644 (file)
@@ -7,6 +7,7 @@ slug: ldapjs-a-reprise-of-ldap
 
 This post has been about 10 years in the making. My first job out of college was at IBM working on the <a title="Tivoli Directory Server" href="http://www-01.ibm.com/software/tivoli/products/directory-server/">Tivoli Directory Server</a>, and at the time I had a preconceived notion that working on anything related to Internet RFCs was about as hot as you could get. I spent a lot of time back then getting "down and dirty" with everything about LDAP: the protocol, performance, storage engines, indexing and querying, caching, customer use cases and patterns, general network server patterns, etc. Basically, I soaked up as much as I possibly could while I was there. On top of that, I listened to all the "gray beards" tell me about the history of LDAP, which was a bizarre marriage of telecommunications conglomerates and graduate students. The point of this blog post is to give you a crash course in LDAP, and explain what makes <a title="ldapjs" href="http://ldapjs.org">ldapjs</a> different. Allow me to be the gray beard for a bit...\r
 <h2>What is LDAP and where did it come from?</h2>\r
+
 Directory services were largely pioneered by the telecommunications companies (e.g., AT&amp;T) to allow fast information retrieval of all the crap you'd expect would be in a telephone book and directory. That is, given a name, or an address, or an area code, or a number, or a foo support looking up customer records, billing information, routing information, etc. The efforts of several telcos came to exist in the <a title="X.500" href="http://en.wikipedia.org/wiki/X.500">X.500</a> standard(s). An X.500 directory is one of the most complicated beasts you can possibly imagine, but on a high note, there's\r
 probably not a thing you can imagine in a directory service that wasn't thought of in there. It is literally the kitchen sink. Oh, and it doesn't run over IP (it's <em>actually</em> on the <a title="OSI Model" href="http://en.wikipedia.org/wiki/OSI_model">OSI</a> model).\r
 \r
@@ -22,6 +23,7 @@ Macro point is that there have actually been very few "fresh" implementations o
 \r
 That said, while there certainly is some wacky stuff in the LDAP protocol itself, it really suffered from poor and buggy implementations more than the fact that LDAP itself was fundamentally flawed. As <a title="Engine Yard LDAP" href="http://www.engineyard.com/blog/2009/ldap-directories-the-forgotten-nosql/">engine yard pointed out a few years back</a>, you can think of LDAP as the original NoSQL store.\r
 <h2>LDAP: The Good Parts</h2>\r
+
 So what's awesome about LDAP? Since it's a directory system it maintains a hierarchy of your data, which as an information management pattern aligns\r
 with _a lot_ of use case (the quintessential example is white pages for people in your company, but subscriptions to SaaS applications, "host groups"\r
 for tracking machines/instances, physical goods tracking, etc., all have use cases that fit that organization scheme). For example, presumably at your job\r
@@ -50,6 +52,7 @@ I could keep going, but the gist is that LDAP has "full" boolean predicate logi
 \r
 Oh, and on top of the technical merits, better or worse, it's an established standard for both administrators and applications (i.e., most "shipped" intranet software has either a local user repository or the ability to leverage an LDAP server somewhere). So there's a lot of compelling reasons to look at leveraging LDAP.\r
 <h2>ldapjs: Why do I care?</h2>\r
+
 As I said earlier, I spent a lot of time at IBM observing how customers used LDAP, and the real items I took away from that experience were:\r
 <ul>\r
        <li>LDAP implementations have suffered a lot from never having been designed from the ground up for a large number of concurrent connections with asynchronous operations.</li>\r
@@ -57,7 +60,6 @@ As I said earlier, I spent a lot of time at IBM observing how customers used LD
        <li>Replication was always a sticking point. LDAP vendors all tried to offer a big multi-master, multi-site replication model. It was a lot of "bolt-on" complexity, done before the <a title="CAP Theorem" href="http://en.wikipedia.org/wiki/CAP_theorem">CAP theorem</a> was written, and certainly before it was accepted as "truth."</li>\r
        <li>Nobody uses all of the protocol. In fact, 20% of the features solve 80% of the use cases (I'm making that number up, but you get the idea).</li>\r
 </ul>\r
-<div>\r
 \r
 For all the good parts of LDAP, those are really damned big failing points, and even I eventually abandoned LDAP for the greener pastures of NoSQL somewhere\r
 along the way. But it always nagged at me that LDAP didn't get it's due because of a lot of implementation problems (to be clear, if I could, I'd change some\r
@@ -70,7 +72,6 @@ Well, in the last year, I went to work for <a title="Joyent" href="http://www.jo
        <li><strong>Replication is hard. CAP is right:</strong> There are a lot of distributed databases out vying to solve exactly this problem. At Joyent we went with <a title="Riak" href="http://www.basho.com/">Riak</a>. Check!</li>\r
        <li><strong>Don't need all of the protocol:</strong> I'm lazy. Let's just skip the stupid things most people don't need. Check!</li>\r
 </ul>\r
-<div>\r
 \r
 So that's the crux of ldapjs right there. Giving you the ability to put LDAP back into your application while nailing those 4 fundamental problems that plague most existing LDAP deployments.\r
 \r
@@ -78,11 +79,6 @@ The obvious question is how it turned out, and the answer is, honestly, better 
 \r
 Within 24 hours of releasing ldapjs on <a title="twitter" href="http://twitter.com/#!/mcavage/status/106767571012952064">Twitter</a>, there was an <a title="github ldapjs address book" href="https://gist.github.com/1173999">implementation of an address book</a> that works with Thunderbird/Evolution, by the end of that weekend there was some <a href="http://i.imgur.com/uR16U.png">slick integration with CouchDB</a>, and ldapjs even got used in one of the <a href="http://twitter.com/#!/jheusala/status/108977708649811970">node knockout apps</a>. Off to a pretty good start!\r
 \r
-</div>\r
-</div>\r
 <h2>The Road Ahead</h2>\r
-<div>\r
-\r
+
 Hopefully you've been motivated to learn a little bit more about LDAP and try out <a href="http://ldapjs.org">ldapjs</a>. The best place to start is probably the <a title="ldapjs guide" href="http://ldapjs.org/guide.html">guide</a>. After that you'll probably need to pick up a book from <a href="http://www.amazon.com/Understanding-Deploying-LDAP-Directory-Services/dp/0672323168">back in the day</a>. ldapjs itself is still in its infancy; there's quite a bit of room to add some slick client-side logic (e.g., connection pools, automatic reconnects), easy to use schema validation, backends, etc. By the time this post is live, there will be experimental <a href="http://en.wikipedia.org/wiki/DTrace">dtrace</a> support if you're running on Mac OS X or preferably Joyent's <a href="http://smartos.org/">SmartOS</a> (shameless plug). And that nagging percentage of the protocol I didn't do will get filled in over time I suspect. If you've got an interest in any of this, send me some pull requests, but most importantly, I just want to see LDAP not just be a skeleton in the closet and get used in places where you should be using it. So get out there and write you some LDAP.\r
-\r
-</div>
diff --git a/doc/blog/Uncategorized/welcome-to-the-node-blog.md b/doc/blog/Uncategorized/welcome-to-the-node-blog.md
deleted file mode 100644 (file)
index 103b8e3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-title: Welcome to the Node blog
-author: ryandahl
-date: Thu Mar 17 2011 20:17:12 GMT-0700 (PDT)
-status: publish
-category: Uncategorized
-slug: welcome-to-the-node-blog
-
-Since Livejournal is disintegrating into Russian spam, I'm moving my technical blog to http://blog.nodejs.org/. I hope to do frequent small posts about what's going on in Node development and include posts from other core Node developers. Please subscribe to the RSS feed.\r
-\r
-To avoid making this post completely devoid of content, here is a new video from a talk I gave at the SF PHP group tastefully produced by <A href="http://marakana.com/forums/java/general/278.html">Marakana</a>:\r
-<iframe width="640" height="360"
-src="http://www.youtube.com/embed/jo_B4LTHi3I" frameborder="0"
-allowfullscreen></iframe>
index 9a764be..7d76ad8 100644 (file)
@@ -15,41 +15,41 @@ slug: multi-server-continuous-deployment-with-fleet
 \r
 <p>To start using fleet, just install the fleet command with <a href="http://npmjs.org">npm</a>: </p>\r
 \r
-<pre style="font-size:1.2em;">$ npm install -g fleet </pre>\r
+<pre style="">npm install -g fleet </pre>\r
 \r
 <p>Then on one of your servers, start a fleet hub. From a fresh directory, give it a passphrase and a port to listen on: </p>\r
 \r
-<pre style="font-size:1.2em;">$ fleet hub --port=7000 --secret=beepboop </pre>\r
+<pre style="">fleet hub --port=7000 --secret=beepboop </pre>\r
 \r
 <p>Now fleet is listening on :7000 for commands and has started a git server on :7001 over http. There's no ssh keys or post commit hooks to configure, just run that command and you're ready to go! </p>\r
 \r
 <p>Next set up some worker drones to run your processes. You can have as many workers as you like on a single server but each worker should be run from a separate directory. Just do: </p>\r
 \r
-<pre style="font-size:1.2em;">$ fleet drone --hub=x.x.x.x:7000 --secret=beepboop </pre>\r
+<pre style="">fleet drone --hub=x.x.x.x:7000 --secret=beepboop </pre>\r
 \r
 <p>where <span class="code">x.x.x.x</span> is the address where the fleet hub is running. Spin up a few of these drones. </p>\r
 \r
 <p>Now navigate to the directory of the app you want to deploy. First set a remote so you don't need to type <span class="code">--hub</span> and <span class="code">--secret</span> all the time. </p>\r
 \r
-<pre style="font-size:1.2em;">$ fleet remote add default --hub=x.x.x.x:7000 --secret=beepboop </pre>\r
+<pre style="">fleet remote add default --hub=x.x.x.x:7000 --secret=beepboop </pre>\r
 \r
 <p>Fleet just created a <span class="code">fleet.json</span> file for you to save your settings. </p>\r
 \r
 <p>From the same app directory, to deploy your code just do: </p>\r
 \r
-<pre style="font-size:1.2em;">$ fleet deploy </pre>\r
+<pre style="">fleet deploy </pre>\r
 \r
 <p>The deploy command does a <span class="code">git push</span> to the fleet hub's git http server and then the hub instructs all the drones to pull from it. Your code gets checked out into a new directory on all the fleet drones every time you deploy. </p>\r
 \r
 <p>Because fleet is designed specifically for managing applications with lots of tiny services, the deploy command isn't tied to running any processes. Starting processes is up to the programmer but it's super simple. Just use the <span class="code">fleet spawn</span> command: </p>\r
 \r
-<pre style="font-size:1.2em;">$ fleet spawn -- node server.js 8080 </pre>\r
+<pre style="">fleet spawn -- node server.js 8080 </pre>\r
 \r
 <p>By default fleet picks a drone at random to run the process on. You can specify which drone you want to run a particular process on with the <span class="code">--drone</span> switch if it matters. </p>\r
 \r
 <p>Start a few processes across all your worker drones and then show what is running with the <span class="code">fleet ps</span> command: </p>\r
 \r
-<pre style="font-size:1.2em;">$ fleet ps\r
+<pre style="">fleet ps\r
 drone#3dfe17b8\r
 ├─┬ pid#1e99f4\r
 │ ├── status:   running\r
@@ -68,7 +68,7 @@ drone#3dfe17b8
 \r
 <p>Fleet has many more commands that you can learn about with its git-style manpage-based help system! Just do <span class="code">fleet help</span> to get a list of all the commands you can run. </p>\r
 \r
-<pre style="font-size:1.2em;">$ fleet help\r
+<pre style="">fleet help\r
 Usage: fleet &lt;command&gt; [&lt;args&gt;]\r
 \r
 The commands are:\r
index cec489a..e162f22 100644 (file)
@@ -5,7 +5,7 @@ status: publish
 category: npm
 slug: managing-node-js-dependencies-with-shrinkwrap
 
-<p><div style="float:right;text-align:center;font-size:x-small;margin:5px;"><a href="http://www.flickr.com/photos/luc_viatour/4247957432/"><img class="size-medium wp-image-652" style="border:1px #000000 solid;" title="Web" src="http://dtrace.org/blogs/dap/files/2012/02/web-300x300.jpg" alt="" width="250" height="250" /></a>\r
+<p><div style="float:right;text-align:center;margin:5px;"><a href="http://www.flickr.com/photos/luc_viatour/4247957432/"><img class="size-medium wp-image-652" style="border:1px #000000 solid;" title="Web" src="http://dtrace.org/blogs/dap/files/2012/02/web-300x300.jpg" alt="" width="250" height="250" /></a>\r
 Photo by Luc Viatour (flickr)</div>Managing dependencies is a fundamental problem in building complex software. The terrific success of github and <a href="http://npmjs.org/">npm</a> have made code reuse especially easy in the Node world, where packages don&#039;t exist in isolation but rather as nodes in a large graph. The software is constantly changing (releasing new versions), and each package has its own constraints about what other packages it requires to run (dependencies). npm keeps track of these constraints, and authors express what kind of changes are compatible using <a href="http://npmjs.org/doc/semver.html">semantic versioning</a>, allowing authors to specify that their package will work with even future versions of its dependencies as long as the semantic versions are assigned properly.\r
 \r
 </p>\r
diff --git a/doc/blog/release/node-v0-4-10.md b/doc/blog/release/node-v0-4-10.md
new file mode 100644 (file)
index 0000000..a7a14d6
--- /dev/null
@@ -0,0 +1,25 @@
+version: 0.4.10
+title: Node v0.4.10
+author: ryandahl
+date: Wed Jul 20 2011 07:36:38 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-4-10
+
+2011.07.19, Version 0.4.10 (stable)\r
+<ul><li>#394 Fix Buffer drops last null character in UTF-8\r
+<li>#829 Backport r8577 from V8 (Ben Noordhuis)\r
+<li>#877 Don't wait for HTTP Agent socket pool to establish connections.\r
+<li>#915 Find kqueue on FreeBSD correctly (Brett Kiefer) \r
+<li>#1085 HTTP: Fix race in abort/dispatch code (Stefan Rusu)\r
+<li>#1274 debugger improvement (Yoshihiro Kikuchi)\r
+<li>#1291 Properly respond to HEAD during end(body) hot path (Reid Burke)\r
+<li>#1304 TLS: Fix race in abort/connection code (Stefan Rusu)\r
+<li>#1360 Allow _ in url hostnames.\r
+<li>Revert 37d529f8 - unbreaks debugger command parsing.\r
+<li>Bring back global execScript\r
+<li>Doc improvements</ul>\r
+\r
+Download: <a href="http://nodejs.org/dist/node-v0.4.10.tar.gz">http://nodejs.org/dist/node-v0.4.10.tar.gz</a>\r
+Website: <a href="http://nodejs.org/docs/v0.4.10">http://nodejs.org/docs/v0.4.10</a>\r
+Documentation: <a href="http://nodejs.org/docs/v0.4.10/api">http://nodejs.org/docs/v0.4.10/api</a>
diff --git a/doc/blog/release/node-v0-4-11.md b/doc/blog/release/node-v0-4-11.md
new file mode 100644 (file)
index 0000000..eca36d3
--- /dev/null
@@ -0,0 +1,39 @@
+version: 0.4.11
+title: Node v0.4.11
+author: ryandahl
+date: Thu Aug 18 2011 01:44:42 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-4-11
+
+2011.08.17, Version 0.4.11 (stable)\r
+<ul><li><a href="http://github.com/joyent/node/issues/738">#738</a> Fix crypto encryption/decryption with Base64. (SAWADA Tadashi)\r
+\r
+<li><a href="http://github.com/joyent/node/issues/1202">#1202</a> net.createConnection defer DNS lookup error events to next tick (Ben Noordhuis)\r
+\r
+<li><a href="http://github.com/joyent/node/issues/1374">#1374</a> fix setting ServerResponse.statusCode in writeHead (Trent Mick)\r
+\r
+<li><a href="http://github.com/joyent/node/issues/1417">#1417</a> Fix http.ClientRequest crashes if end() was called twice\r
+\r
+<li><a href="http://github.com/joyent/node/issues/1497">#1497</a> querystring: Replace 'in' test with 'hasOwnProperty' (isaacs)\r
+\r
+<li><a href="http://github.com/joyent/node/issues/1546">#1546</a> http perf improvement\r
+\r
+<li>fix memleak in libeio (Tom Hughes)\r
+\r
+<li>cmake improvements (Tom Hughes)\r
+\r
+<li>node_net.cc: fix incorrect sizeof() (Tom Hughes)\r
+\r
+<li>Windows/cygwin: no more GetConsoleTitleW errors on XP (Bert Belder)\r
+\r
+<li>Doc improvements (koichik, Logan Smyth, Ben Noordhuis, Arnout Kazemier)</ul>\r
+\r
+\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/node-v0.4.11.tar.gz">http://nodejs.org/dist/node-v0.4.11.tar.gz</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.4.11/">http://nodejs.org/docs/v0.4.11/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.4.11/api/">http://nodejs.org/docs/v0.4.11/api/</a>
diff --git a/doc/blog/release/node-v0-4-12.md b/doc/blog/release/node-v0-4-12.md
new file mode 100644 (file)
index 0000000..0e9aedd
--- /dev/null
@@ -0,0 +1,29 @@
+version: 0.4.12
+title: Node v0.4.12
+author: ryandahl
+date: Thu Sep 15 2011 17:32:07 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-4-12
+
+2011.09.15, Version 0.4.12 (stable)\r
+\r
+<ul>\r
+<li>Improve docs\r
+<li>#1563 overflow in ChildProcess custom_fd.\r
+<li>#1569, parse error on multi-line HTTP headers. (Ben Noordhuis)\r
+<li>#1586 net: Socket write encoding case sensitivity (koichik)\r
+<li>#1610 Remove DigiNotar CA from trusted list (isaacs)\r
+<li>#1624 buffer: Avoid overrun with 'binary' encoding. (koichik)\r
+<li>#1633 buffer: write() should always set _charsWritten. (koichik)\r
+<li>#1707 hasOwnProperty usage security hole in querystring (isaacs)\r
+<li>#1719 Drain OpenSSL error queue\r
+<li>Fix error reporting in net.Server.listen</ul>\r
+\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/node-v0.4.12.tar.gz">http://nodejs.org/dist/node-v0.4.12.tar.gz</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.4.12/">http://nodejs.org/docs/v0.4.12/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.4.12/api/">http://nodejs.org/docs/v0.4.12/api/</a>
diff --git a/doc/blog/release/node-v0-4-3.md b/doc/blog/release/node-v0-4-3.md
new file mode 100644 (file)
index 0000000..e7672f8
--- /dev/null
@@ -0,0 +1,33 @@
+version: 0.4.3
+title: Node v0.4.3
+author: ryandahl
+date: Fri Mar 18 2011 22:17:59 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-4-3
+
+2011.03.18, Version 0.4.3 (stable)\r
+<ul>\r
+<li> Don't decrease server connection counter again if destroy() is called more  than once GH-431 (Andreas Reich, Anders Conbere)\r
+<li> Documentation improvements (koichik)\r
+<li> Fix bug with setMaxListeners GH-682\r
+<li> Start up memory footprint improvement. (Tom Hughes)\r
+<li> Solaris improvements.\r
+<li> Buffer::Length(Buffer*) should not invoke itself recursively GH-759 (Ben Noordhuis)\r
+<li> TLS: Advertise support for client certs GH-774 (Theo Schlossnagle)\r
+<li> HTTP Agent bugs: GH-787, GH-784, GH-803.\r
+<li> Don't call GetMemoryUsage every 5 seconds.\r
+<li> Upgrade V8 to 3.1.8.3\r
+</ul>\r
+\r
+\r
+\r
+Download: http://nodejs.org/dist/node-v0.4.3.tar.gz\r
+\r
+Website: http://nodejs.org/docs/v0.4.3/\r
+\r
+Documentation: http://nodejs.org/docs/v0.4.3/api\r
+\r
+<a href="https://groups.google.com/d/topic/nodejs/JrYQCQtf6lM/discussion">Announcement</a>\r
+\r
+<a href="https://github.com/joyent/node/tree/v0.4.3">commit</a>
diff --git a/doc/blog/release/node-v0-4-4.md b/doc/blog/release/node-v0-4-4.md
new file mode 100644 (file)
index 0000000..6c911cc
--- /dev/null
@@ -0,0 +1,27 @@
+version: 0.4.4
+title: Node v0.4.4
+author: ryandahl
+date: Sat Mar 26 2011 08:58:45 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-4-4
+
+2011.03.26, Version 0.4.4 (stable)\r
+<ul>\r
+<li> CryptoStream.end shouldn't throw if not writable GH-820\r
+<li> Drop out if connection destroyed before connect() GH-819\r
+<li> expose https.Agent\r
+<li> Correctly setsid in tty.open GH-815\r
+<li> Bug fix for failed buffer construction\r
+<li> Added support for removing .once listeners (GH-806)\r
+<li> Upgrade V8 to 3.1.8.5</ul>\r
+\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/node-v0.4.4.tar.gz">http://nodejs.org/dist/node-v0.4.4.tar.gz</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.4.4/">http://nodejs.org/docs/v0.4.4</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.4.4/api/">http://nodejs.org/docs/v0.4.4/api</a>\r
+\r
+<a href="https://groups.google.com/d/topic/nodejs/LlQCYhDEPAc/discussion">announcement</a>
diff --git a/doc/blog/release/node-v0-4-5.md b/doc/blog/release/node-v0-4-5.md
new file mode 100644 (file)
index 0000000..a27c56c
--- /dev/null
@@ -0,0 +1,29 @@
+version: 0.4.5
+title: node v0.4.5
+author: ryandahl
+date: Sat Apr 02 2011 02:04:58 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-4-5
+
+2011.04.01, Version 0.4.5 (stable)\r
+<ul>\r
+<li> Fix listener leak in stream.pipe() (Mikeal Rogers)\r
+<li> Retain buffers in fs.read/write() GH-814 (Jorge Chamorro Bieling)\r
+<li> TLS performance improvements\r
+<li> SlowBuffer.prototype.slice bug GH-843\r
+<li> process.stderr.write should return true\r
+<li> Immediate pause/resume race condition GH-535 (isaacs)\r
+<li> Set default host header properly GH-721 (isaacs)\r
+<li> Upgrade V8 to 3.1.8.8</ul>\r
+\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/node-v0.4.5.tar.gz">http://nodejs.org/dist/node-v0.4.5.tar.gz</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.4.5">http://nodejs.org/docs/v0.4.5</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.4.5/api">http://nodejs.org/docs/v0.4.5/api</a>\r
+\r
+\r
+<a href="https://groups.google.com/d/topic/nodejs/aOC7SRLJhQY/discussion">announcement</a>
diff --git a/doc/blog/release/node-v0-4-6.md b/doc/blog/release/node-v0-4-6.md
new file mode 100644 (file)
index 0000000..0e4e887
--- /dev/null
@@ -0,0 +1,27 @@
+version: 0.4.6
+title: Node v0.4.6
+author: ryandahl
+date: Thu Apr 14 2011 05:00:30 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-4-6
+
+2011.04.13, Version 0.4.6 (stable)\r
+<ul><li> Don't error on ENOTCONN from shutdown() #670\r
+<li> Auto completion of built-in debugger suggests prefix match rather than partial match. (koichik)\r
+<li> circular reference in vm modules. #822 (Jakub Lekstan)\r
+<li> http response.readable should be false after 'end' #867 (Abe Fettig)\r
+<li> Implemenet os.cpus() and os.uptime() on Solaris (Scott McWhirter)\r
+<li> fs.ReadStream: Allow omission of end option for range reads #801 (Felix Geisendörfer)\r
+<li> Buffer.write() with UCS-2 should not be write partial char #916 (koichik)\r
+<Li> Pass secureProtocol through on tls.Server creation (Theo Schlossnagle)\r
+<li> TLS use RC4-SHA by default\r
+<li> Don't strangely drop out of event loop on HTTPS client uploads #892\r
+<li> Doc improvements\r
+<li> Upgrade v8 to 3.1.8.10</ul>\r
+\r
+Download: <a href="http://nodejs.org/dist/node-v0.4.6.tar.gz">http://nodejs.org/dist/node-v0.4.6.tar.gz</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.4.6/">http://nodejs.org/docs/v0.4.6/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.4.6/api/">http://nodejs.org/docs/v0.4.6/api/</a>
diff --git a/doc/blog/release/node-v0-4-7.md b/doc/blog/release/node-v0-4-7.md
new file mode 100644 (file)
index 0000000..38816c8
--- /dev/null
@@ -0,0 +1,23 @@
+version: 0.4.7
+title: Node v0.4.7
+author: ryandahl
+date: Sat Apr 23 2011 00:47:55 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-4-7
+
+2011.04.22, Version 0.4.7 (stable)\r
+<ul><li> Don't emit error on ECONNRESET from read() #670\r
+<li> Fix: Multiple pipes to the same stream were broken #929 (Felix Geisendörfer)\r
+<li> URL parsing/formatting corrections #954 (isaacs)\r
+<li> make it possible to do repl.start('', stream) (Wade Simmons)\r
+<li> Add os.loadavg for SunOS (Robert Mustacchi)\r
+<li> Fix timeouts with floating point numbers #897  (Jorge Chamorro Bieling)\r
+<li> Improve docs.</ul>\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/node-v0.4.7.tar.gz">http://nodejs.org/dist/node-v0.4.7.tar.gz</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.4.7/">http://nodejs.org/docs/v0.4.7/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.4.7/api">http://nodejs.org/docs/v0.4.7/api</a>
diff --git a/doc/blog/release/node-v0-4-8.md b/doc/blog/release/node-v0-4-8.md
new file mode 100644 (file)
index 0000000..b7859ed
--- /dev/null
@@ -0,0 +1,55 @@
+version: 0.4.8
+title: Node v0.4.8
+author: ryandahl
+date: Sat May 21 2011 07:06:00 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-4-8
+
+2011.05.20, Version 0.4.8 (stable)\r
+\r
+* #974 Properly report traceless errors (isaacs)\r
+\r
+* #983 Better JSON.parse error detection in REPL (isaacs)\r
+\r
+* #836 Agent socket errors bubble up to req only if req exists\r
+\r
+* #1041 Fix event listener leak check timing (koichik)\r
+\r
+* #1038 Fix dns.resolve() with 'PTR' throws Error: Unknown type "PTR"\r
+  (koichik)\r
+\r
+* #1073 Share SSL context between server connections (Fedor Indutny)\r
+\r
+* Disable compression with OpenSSL. Improves memory perf.\r
+\r
+* Implement os.totalmem() and os.freemem() for SunOS (Alexandre Marangone)\r
+\r
+* Fix a special characters in URL regression (isaacs)\r
+\r
+* Fix idle timeouts in HTTPS (Felix Geisendörfer)\r
+\r
+* SlowBuffer.write() with 'ucs2' throws ReferenceError. (koichik)\r
+\r
+* http.ServerRequest 'close' sometimes gets an error argument\r
+  (Felix Geisendörfer)\r
+\r
+* Doc improvements\r
+\r
+* cleartextstream.destroy() should close(2) the socket. Previously was being\r
+  mapped to a shutdown(2) syscall.\r
+\r
+* No longer compile out asserts and debug statements in normal build.\r
+\r
+* Debugger improvements.\r
+\r
+* Upgrade V8 to 3.1.8.16.\r
+\r
+\r
+\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.4.8/">http://nodejs.org/docs/v0.4.8/</a>\r
+\r
+Download: <a href="http://nodejs.org/dist/node-v0.4.8.tar.gz">http://nodejs.org/dist/node-v0.4.8.tar.gz</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.4.8/api/">http://nodejs.org/docs/v0.4.8/api/</a>
diff --git a/doc/blog/release/node-v0-4-9.md b/doc/blog/release/node-v0-4-9.md
new file mode 100644 (file)
index 0000000..e2eccf2
--- /dev/null
@@ -0,0 +1,30 @@
+version: 0.4.9
+title: Node v0.4.9
+author: ryandahl
+date: Wed Jun 29 2011 11:41:05 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-4-9
+
+2011.06.29, Version 0.4.9 (stable)<ul>\r
+<li> Improve documentation\r
+<li> #1095 error handling bug in stream.pipe() (Felix Geisendörfer)\r
+<li> #1097 Fix a few leaks in node_crypto.cc (Ben Noordhuis)\r
+<li> #562 #1078 Parse file:// urls properly (Ryan Petrello)\r
+<li> #880 Option to disable SSLv2 (Jérémy Lal)\r
+<li> #1087 Disabling SSL compression disabled with early OpenSSLs.\r
+<li> #1144 debugger: don't allow users to input non-valid commands (Siddharth Mahendraker)\r
+<li> Perf improvement for util.inherits\r
+<li> #1166 Support for signature verification with RSA/DSA public keys (Mark Cavage)\r
+<li> #1177 Remove node_modules lookup optimization to better support nested project structures (Mathias Buus)\r
+<li> #1203 Add missing scope.Close to fs.sendfileSync\r
+<li> #1187 Support multiple 'link' headers\r
+<li> #1196 Fix -e/--eval can't load module from node_modules (Koichi Kobayashi)\r
+<li> Upgrade V8 to 3.1.8.25, upgrade http-parser.</ul>\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/node-v0.4.9.tar.gz">http://nodejs.org/dist/node-v0.4.9.tar.gz</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.4.9">http://nodejs.org/docs/v0.4.9</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.4.9/api">http://nodejs.org/docs/v0.4.9/api</a>
diff --git a/doc/blog/release/node-v0-5-0-unstable.md b/doc/blog/release/node-v0-5-0-unstable.md
new file mode 100644 (file)
index 0000000..883b9a7
--- /dev/null
@@ -0,0 +1,39 @@
+version: 0.5.0
+title: Node v0.5.0 (Unstable)
+author: ryandahl
+date: Wed Jul 06 2011 02:23:17 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-5-0-unstable
+
+2011.07.05, Version 0.5.0 (unstable)\r
+\r
+<li> New non-default libuv backend to support IOCP on Windows. Use <code>--use-uv</code> to enable.\r
+<li> deprecate http.cat\r
+<li> docs improved.\r
+<li> add child_process.fork\r
+<li> add fs.utimes() and fs.futimes() support (Ben Noordhuis)\r
+<li> add process.uptime() (Tom Huges)\r
+<li> add path.relative (Tony Huang)\r
+<li> add os.getNetworkInterfaces()\r
+<li> add remoteAddress and remotePort for client TCP connections (Brian White)\r
+<li> add secureOptions flag, setting ciphers, SSL_OP_CRYPTOPRO_TLSEXT_BUG to TLS (Theo Schlossnagle)\r
+<li> add process.arch (Nathan Rajlich)\r
+<li> add reading/writing of floats and doubles from/to buffers (Brian White)\r
+<li> Allow script to be read from stdin\r
+<li> #477 add Buffer::fill method to do memset (Konstantin Käfer)\r
+<li> #573 Diffie-Hellman support to crypto module (Håvard Stranden)\r
+<li> #695 add 'hex' encoding to buffer (isaacs)\r
+<li> #851 Update how REPLServer uses contexts (Ben Weaver)\r
+<li> #853 add fs.lchow, fs.lchmod, fs.fchmod, fs.fchown (isaacs)\r
+<li> #889 Allow to remove all EventEmitter listeners at once (Felix Geisendörfer)\r
+<li> #926 OpenSSL NPN support (Fedor Indutny)\r
+<li> #955 Change ^C handling in REPL (isaacs)\r
+<li> #979 add support for Unix Domain Sockets to HTTP (Mark Cavage)\r
+<li> #1173 #1170 add AMD, asynchronous module definition (isaacs)\r
+<li> DTrace probes: support X-Forwarded-For (Dave Pacheco) </ul>\r
+Download: <a href="http://nodejs.org/dist/node-v0.5.0.tar.gz">http://nodejs.org/dist/node-v0.5.0.tar.gz</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.5.0/">http://nodejs.org/docs/v0.5.0/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.5.0/api/">http://nodejs.org/docs/v0.5.0/api/</a>
diff --git a/doc/blog/release/node-v0-5-1.md b/doc/blog/release/node-v0-5-1.md
new file mode 100644 (file)
index 0000000..f9799d4
--- /dev/null
@@ -0,0 +1,30 @@
+version: 0.5.1
+title: Node v0.5.1
+author: ryandahl
+date: Thu Jul 14 2011 23:48:08 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-5-1
+
+2011.07.14, Version 0.5.1 (unstable)\r
+<ul><li> #1233 Fix os.totalmem on FreeBSD amd64 (Artem Zaytsev)\r
+<li> #1149 IDNA and Punycode support in url.parse (Jeremy Selier, Ben Noordhuis, isaacs)\r
+<li> Export $CC and $CXX to uv and V8's build systems\r
+<li> Include pthread-win32 static libraries in build (Igor Zinkovsky)\r
+<li> #1199, #1094 Fix fs can't handle large file on 64bit platform (koichik)\r
+<li> #1281 Make require a public member of module (isaacs)\r
+<li> #1303 Stream.pipe returns the destination (Elijah Insua)\r
+<li> #1229 Addons should not -DEV_MULTIPLICITY=0 (Brian White)\r
+<li> libuv backend improvements\r
+<li> Upgrade V8 to 3.4.10</ul>\r
+\r
+\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/v0.5.1/node-v0.5.1.tar.gz">http://nodejs.org/dist/v0.5.1/node-v0.5.1.tar.gz</a>\r
+\r
+Windows Build: <a href="http://nodejs.org/dist/v0.5.1/node.exe">http://nodejs.org/dist/v0.5.1/node.exe</a>\r
+\r
+Documentation: <a href="http://nodejs.org/dist/v0.5.1/docs/api/">http://nodejs.org/dist/v0.5.1/docs/api/</a>\r
+\r
+Website: <a href="http://nodejs.org/dist/v0.5.1/docs">http://nodejs.org/dist/v0.5.1/docs</a>
diff --git a/doc/blog/release/node-v0-5-10.md b/doc/blog/release/node-v0-5-10.md
new file mode 100644 (file)
index 0000000..47fb926
--- /dev/null
@@ -0,0 +1,41 @@
+version: 0.5.10
+title: Node v0.5.10
+author: ryandahl
+date: Fri Oct 21 2011 19:12:31 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-5-10
+
+2011.10.21, Version 0.5.10 (unstable)\r
+<ul><li>Remove cmake build system, support for Cygwin, legacy code base, process.ENV, process.ARGV, process.memoryUsage().vsize, os.openOSHandle</li>\r
+<li>Documentation improvments (Igor Zinkovsky, Bert Belder, Ilya Dmitrichenko, koichik, Maciej Małecki, Guglielmo Ferri, isaacs)</li>\r
+<li>Performance improvements (Daniel Ennis, Bert Belder, Ben Noordhuis) </li>\r
+<li>Long process.title support (Ben Noordhuis)</li>\r
+<li>net: register net.Server callback only once (Simen Brekken)</li>\r
+<li>net: fix connect queue bugs (Ben Noordhuis)</li>\r
+<li>debugger: fix backtrace err handling (Fedor Indutny)</li>\r
+<li>Use getaddrinfo instead of c-ares for dns.lookup</li>\r
+<li>Emit 'end' from crypto streams on close</li>\r
+<li>repl: print out `undefined` (Nathan Rajlich)</li>\r
+<li>#1902 buffer: use NO_NULL_TERMINATION flag (koichik)</li>\r
+<li>#1907 http: Added support for HTTP PATCH verb (Thomas Parslow)</li>\r
+<li>#1644 add GetCPUInfo on windows (Karl Skomski)</li>\r
+<li>#1484, #1834, #1482, #771 Don't use a separate context for the repl.  (isaacs)</li>\r
+<li>#1882 zlib Update 'availOutBefore' value, and test (isaacs)</li>\r
+<li>#1888 child_process.fork: don't modify args (koichik)</li>\r
+<li>#1516 tls: requestCert unusable with Firefox and Chrome (koichik)</li>\r
+<li>#1467 tls: The TLS API is inconsistent with the TCP API (koichik)</li>\r
+<li>#1894 net: fix error handling in listen() (koichik)</li>\r
+<li>#1860 console.error now goes through uv_tty_t</li>\r
+<li>Upgrade V8 to 3.7.0</li>\r
+<li>Upgrade GYP to r1081</li></ul>\r
+\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/v0.5.10/node-v0.5.10.tar.gz">http://nodejs.org/dist/v0.5.10/node-v0.5.10.tar.gz</a>\r
+\r
+Windows Executable: <a href="http://nodejs.org/dist/v0.5.10/node.exe">http://nodejs.org/dist/v0.5.10/node.exe</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.5.10/">http://nodejs.org/docs/v0.5.10/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.5.10/api/">http://nodejs.org/docs/v0.5.10/api/</a>
diff --git a/doc/blog/release/node-v0-5-2.md b/doc/blog/release/node-v0-5-2.md
new file mode 100644 (file)
index 0000000..c44690f
--- /dev/null
@@ -0,0 +1,27 @@
+version: 0.5.2
+title: Node v0.5.2
+author: ryandahl
+date: Fri Jul 22 2011 11:40:22 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-5-2
+
+2011.07.22, Version 0.5.2 (unstable)\r
+<ul><li>libuv improvements; named pipe support\r
+<li>#1242 check for SSL_COMP_get_compression_methods() (Ben Noordhuis)\r
+<li>#1348 remove require.paths (isaacs)\r
+<li>#1349 Delimit NODE_PATH with ; on Windows (isaacs)\r
+<li>#1335 Remove EventEmitter from C++\r
+<li>#1357 Load json files with require() (isaacs)\r
+<li>#1374 fix setting ServerResponse.statusCode in writeHead (Trent Mick)\r
+<li>Fixed: GC was being run too often.\r
+<li>Upgrade V8 to 3.4.14\r
+<li>doc improvements</ul>\r
+\r
+Download: <a href="http://nodejs.org/dist/v0.5.2/node-v0.5.2.tar.gz">http://nodejs.org/dist/v0.5.2/node-v0.5.2.tar.gz</a>\r
+\r
+Windows Executable: <a href="http://nodejs.org/dist/v0.5.2/node.exe">http://nodejs.org/dist/v0.5.2/node.exe</a>\r
+\r
+Website: <a href="http://nodejs.org/dist/v0.5.2/docs/">http://nodejs.org/dist/v0.5.2/docs/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/dist/v0.5.2/docs/api">http://nodejs.org/dist/v0.5.2/docs/api</a>
diff --git a/doc/blog/release/node-v0-5-3.md b/doc/blog/release/node-v0-5-3.md
new file mode 100644 (file)
index 0000000..f84a955
--- /dev/null
@@ -0,0 +1,53 @@
+version: 0.5.3
+title: Node v0.5.3
+author: ryandahl
+date: Tue Aug 02 2011 08:03:06 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-5-3
+
+2011.08.01, Version 0.5.3 (unstable)\r
+\r
+<ul><li>Fix crypto encryption/decryption with Base64. (SAWADA Tadashi)\r
+\r
+<li>#243 Add an optional length argument to Buffer.write() (koichik)\r
+\r
+<li>#657 convert nonbuffer data to string in fs.writeFile/Sync (Daniel Pihlström)\r
+\r
+<li>Add process.features, remove process.useUV (Ben Noordhuis)\r
+\r
+<li>#324 Fix crypto hmac to accept binary keys + add test cases from rfc 2202 and 4231 (Stefan Bühler)\r
+\r
+<li>Add Socket::bytesRead, Socket::bytesWritten (Alexander Uvarov)\r
+\r
+<li>#572 Don't print result of --eval in CLI (Ben Noordhuis)\r
+\r
+<li>#1223 Fix http.ClientRequest crashes if end() was called twice (koichik)\r
+\r
+<li>#1383 Emit 'close' after all connections have closed (Felix Geisendörfer)\r
+\r
+<li>Add sprintf-like util.format() function (Ben Noordhuis)\r
+\r
+<li>Add support for TLS SNI (Fedor Indutny)\r
+\r
+<li>New http agent implementation. Off by default the command line flag <code>--use-http2</code> will enable it. <code>make test-http2</code> will run the tests for the new implementation. (Mikeal Rogers)\r
+\r
+<li>Revert AMD compatibility. (isaacs)\r
+\r
+<li>Windows: improvements, child_process support.\r
+\r
+<li>Remove pkg-config file.\r
+\r
+<li>Fix startup time regressions.\r
+\r
+<li>doc improvements</ul>\r
+\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/v0.5.3/node-v0.5.3.tar.gz">http://nodejs.org/dist/v0.5.3/node-v0.5.3.tar.gz</a>\r
+\r
+Windows Executable: <a href="http://nodejs.org/dist/v0.5.3/node.exe">http://nodejs.org/dist/v0.5.3/node.exe</a>\r
+\r
+Website: <a href="http://nodejs.org/dist/v0.5.3/docs">http://nodejs.org/dist/v0.5.3/docs</a>\r
+\r
+Documentation: <a href="http://nodejs.org/dist/v0.5.3/docs/api">http://nodejs.org/dist/v0.5.3/docs/api</a>
diff --git a/doc/blog/release/node-v0-5-4.md b/doc/blog/release/node-v0-5-4.md
new file mode 100644 (file)
index 0000000..2dd02e1
--- /dev/null
@@ -0,0 +1,36 @@
+version: 0.5.4
+title: Node v0.5.4
+author: ryandahl
+date: Fri Aug 12 2011 08:38:26 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-5-4
+
+2011.08.12, Version 0.5.4 (unstable)\r
+\r
+<ul><li>libuv/Windows compatibility improvements\r
+\r
+<li>Build on Microsoft Visual Studio via GYP. Use generate-projects.bat in the to build sln files. (Peter Bright, Igor Zinkovsky)\r
+\r
+<li>Make Mikeal's HTTP agent client the default. Use old HTTP client with <code>--use-http1</code>\r
+\r
+<li>Fixes https host header default port handling. (Mikeal Rogers)\r
+\r
+<li>#1440 strip byte order marker when loading *.js and *.json files (Ben Noordhuis)\r
+\r
+<li>#1434 Improve util.format() compatibility with browser. (Koichi Kobayashi)\r
+\r
+<li>Provide unchecked uint entry points for integer Buffer.read/writeInt methods. (Robert Mustacchi)\r
+\r
+<li>CMake improvements (Tom Huges)\r
+\r
+<li>Upgrade V8 to 3.5.4.</ul>\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/v0.5.4/node-v0.5.4.tar.gz">http://nodejs.org/dist/v0.5.4/node-v0.5.4.tar.gz</a>\r
+\r
+Windows Executable: <a href="http://nodejs.org/dist/v0.5.4/node.exe">http://nodejs.org/dist/v0.5.4/node.exe</a>\r
+\r
+Website: <a href="http://nodejs.org/dist/v0.5.4/docs">http://nodejs.org/dist/v0.5.4/docs</a>\r
+\r
+Documentation: <a href="http://nodejs.org/dist/v0.5.4/docs/api">http://nodejs.org/dist/v0.5.4/docs/api</a>
diff --git a/doc/blog/release/node-v0-5-5.md b/doc/blog/release/node-v0-5-5.md
new file mode 100644 (file)
index 0000000..886fac9
--- /dev/null
@@ -0,0 +1,40 @@
+version: 0.5.5
+title: Node v0.5.5
+author: bennoordhuis
+date: Fri Aug 26 2011 23:20:10 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-5-5
+
+<p>2011.08.26, Version 0.5.5 (unstable)</p>\r
+<ul>\r
+<li>typed arrays, implementation from Plesk\r
+<li>fix IP multicast on SunOS\r
+<li>fix DNS lookup order: IPv4 first, IPv6 second (--use-uv only)\r
+<li>remove support for UNIX datagram sockets (--use-uv only)\r
+<li>UDP support for Windows (Bert Belder)\r
+<li>#1572 improve tab completion for objects in the REPL (Nathan Rajlich)\r
+<li>#1563 fix buffer overflow in child_process module (reported by Dean McNamee)\r
+<li>#1546 fix performance regression in http module (reported by Brian Geffon)\r
+<li>#1491 add PBKDF2 crypto support (Glen Low)\r
+<li>#1447 remove deprecated http.cat() function (Mikeal Rogers)\r
+<li>#1140 fix incorrect dispatch of vm.runInContext's filename argument<br />\r
+  (Antranig Basman)</p>\r
+<li>#1140 document vm.runInContext() and vm.createContext() (Antranig Basman)\r
+<li>#1428 fix os.freemem() on 64 bits freebsd (Artem Zaytsev)\r
+<li>#1164 make all DNS lookups async, fixes uncatchable exceptions<br />\r
+  (Koichi Kobayashi)</p>\r
+<li>fix incorrect ssl shutdown check (Tom Hughes)\r
+<li>various cmake fixes (Tom Hughes)\r
+<li>improved documentation (Koichi Kobayashi, Logan Smyth, Fedor Indutny,<br />\r
+  Mikeal Rogers, Maciej Małecki, Antranig Basman, Mickaël Delahaye)</p>\r
+<li>upgrade libuv to commit 835782a\r
+<li>upgrade V8 to 3.5.8\r
+</ul>\r
+<p>Download: <a href="http://nodejs.org/dist/node-v0.5.5.tar.gz">http://nodejs.org/dist/node-v0.5.5.tar.gz</a></p>\r
+<p>Windows Executable: <a href="http://nodejs.org/dist/v0.5.5/node.exe">http://nodejs.org/dist/v0.5.5/node.exe</a></p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.5.5/">http://nodejs.org/docs/v0.5.5/</a></p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.5.5/api/">http://nodejs.org/docs/v0.5.5/api/</a></p>\r
+<br /><br />\r
+\r
+<b>Update:</b> The <code>.exe</code> has a bug that results in incompatibility with Windows XP and Server 2003. This has been reported in <a href="https://github.com/joyent/node/issues/1592">issue #1592</a> and fixed. A new binary was made that is compatibile with the older Windows: <a href="http://nodejs.org/dist/v0.5.5/node-186364e.exe">http://nodejs.org/dist/v0.5.5/node-186364e.exe</a>.
diff --git a/doc/blog/release/node-v0-5-6.md b/doc/blog/release/node-v0-5-6.md
new file mode 100644 (file)
index 0000000..ca1a392
--- /dev/null
@@ -0,0 +1,49 @@
+version: 0.5.6
+title: Node v0.5.6 (unstable)
+author: piscisaureus
+date: Fri Sep 09 2011 16:30:39 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-5-6
+
+2011.09.08, Version 0.5.6 (unstable)\r
+<ul>\r
+       <li>#345, #1635, #1648 Documentation improvements (Thomas Shinnick, Abimanyu Raja, AJ ONeal, Koichi Kobayashi, Michael Jackson, Logan Smyth, Ben Noordhuis)</li>\r
+       <li>#650 Improve path parsing on windows (Bert Belder)</li>\r
+       <li>#752 Remove headers sent check in OutgoingMessage.getHeader() (Peter Lyons)</li>\r
+       <li>#1236, #1438, #1506, #1513, #1621, #1640, #1647 Libuv-related bugs fixed (Jorge Chamorro Bieling, Peter Bright, Luis Lavena, Igor Zinkovsky)</li>\r
+       <li>#1296, #1612 crypto: Fix BIO's usage. (Koichi Kobayashi)</li>\r
+       <li>#1345 Correctly set socket.remoteAddress with libuv backend (Bert Belder)</li>\r
+       <li>#1429 Don't clobber quick edit mode on windows (Peter Bright)</li>\r
+       <li>#1503 Make libuv backend default on unix, override with `node --use-legacy`</li>\r
+       <li>#1565 Fix fs.stat for paths ending with \ on windows (Igor Zinkovsky)</li>\r
+       <li>#1568 Fix x509 certificate subject parsing (Koichi Kobayashi)</li>\r
+       <li>#1586 Make socket write encoding case-insensitive (Koichi Kobayashi)</li>\r
+       <li>#1591, #1656, #1657 Implement fs in libuv, remove libeio and pthread-win32 dependency on windows (Igor Zinkovsky, Ben Noordhuis, Ryan Dahl, Isaac Schlueter)</li>\r
+       <li>#1592 Don't load-time link against CreateSymbolicLink on windows (Peter Bright)</li>\r
+       <li>#1601 Improve API consistency when dealing with the socket underlying a HTTP client request (Mikeal Rogers)</li>\r
+       <li>#1610 Remove DigiNotar CA from trusted list (Isaac Schlueter)</li>\r
+       <li>#1617 Added some win32 os functions (Karl Skomski)</li>\r
+       <li>#1624 avoid buffer overrun with 'binary' encoding (Koichi Kobayashi)</li>\r
+       <li>#1633 make Buffer.write() always set _charsWritten (Koichi Kobayashi)</li>\r
+       <li>#1644 Windows: set executables to be console programs (Peter Bright)</li>\r
+       <li>#1651 improve inspection for sparse array (Koichi Kobayashi)</li>\r
+       <li>#1672 set .code='ECONNRESET' on socket hang up errors (Ben Noordhuis)</li>\r
+       <li>Add test case for foaf+ssl client certificate (Niclas Hoyer)</li>\r
+       <li>Added RPATH environment variable to override run-time library paths (Ashok Mudukutore)</li>\r
+       <li>Added TLS client-side session resumption support (Sean Cunningham)</li>\r
+       <li>Added additional properties to getPeerCertificate (Nathan Rixham, Niclas Hoyer)</li>\r
+       <li>Don't eval repl command twice when an error is thrown (Nathan Rajlich)</li>\r
+       <li>Improve util.isDate() (Nathan Rajlich)</li>\r
+       <li>Improvements in libuv backend and bindings, upgrade libuv to bd6066cb349a9b3a1b0d87b146ddaee06db31d10</li>\r
+       <li>Show warning when using lib/sys.js (Maciej Malecki)</li>\r
+       <li>Support plus sign in url protocol (Maciej Malecki)</li>\r
+       <li>Upgrade V8 to 3.6.2</li>\r
+</ul>\r
+Download: <a href="http://nodejs.org/dist/v0.5.6/node-v0.5.6.tar.gz">http://nodejs.org/dist/v0.5.6/node-v0.5.6.tar.gz</a>\r
+\r
+Windows Executable: <a href="http://nodejs.org/dist/v0.5.6/node.exe">http://nodejs.org/dist/v0.5.6/node.exe</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.5.6/">http://nodejs.org/docs/v0.5.6/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.5.6/api/">http://nodejs.org/docs/v0.5.6/api/</a>
diff --git a/doc/blog/release/node-v0-5-7-unstable.md b/doc/blog/release/node-v0-5-7-unstable.md
new file mode 100644 (file)
index 0000000..1b640e7
--- /dev/null
@@ -0,0 +1,35 @@
+version: 0.5.7
+title: Node v0.5.7 (unstable)
+author: ryandahl
+date: Fri Sep 16 2011 18:57:03 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-5-7-unstable
+
+2011.09.16, Version 0.5.7 (unstable)\r
+<ul>\r
+<li>Upgrade V8 to 3.6.4\r
+<li>Improve Windows compatibility\r
+<li>Documentation improvements\r
+<li>Debugger and REPL improvements (Fedor Indutny)\r
+<li>Add legacy API support: net.Stream(fd), process.stdout.writable, process.stdout.fd\r
+<li>Fix mkdir EEXIST handling (isaacs)\r
+<li>Use net_uv instead of net_legacy for stdio\r
+<li>Do not load readline from util.inspect\r
+<li>#1673 Fix bug related to V8 context with accessors (Fedor Indutny)\r
+<li>#1634 util: Fix inspection for Error (koichik)\r
+<li>#1645 fs: Add positioned file writing feature to fs.WriteStream (Thomas Shinnick)\r
+<li>#1637 fs: Unguarded fs.watchFile cache statWatchers checking fixed (Thomas Shinnick)\r
+<li>#1695 Forward customFds to ChildProcess.spawn\r
+<li>#1707 Fix hasOwnProperty security problem in querystring (isaacs)\r
+<li>#1719 Drain OpenSSL error queue</ul>\r
+\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/v0.5.7/node-v0.5.7.tar.gz">http://nodejs.org/dist/v0.5.7/node-v0.5.7.tar.gz</a>\r
+\r
+Windows Executable: <a href="http://nodejs.org/dist/v0.5.7/node.exe">http://nodejs.org/dist/v0.5.7/node.exe</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.5.7/">http://nodejs.org/docs/v0.5.7/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.5.7/api/">http://nodejs.org/docs/v0.5.7/api/</a>
diff --git a/doc/blog/release/node-v0-5-8.md b/doc/blog/release/node-v0-5-8.md
new file mode 100644 (file)
index 0000000..9f0fc14
--- /dev/null
@@ -0,0 +1,26 @@
+version: 0.5.8
+title: Node v0.5.8
+author: ryandahl
+date: Fri Sep 30 2011 16:47:11 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-5-8
+
+2011.09.30, Version 0.5.8 (unstable)<ul><li>zlib bindings (isaacs)\r
+<li>Windows supports TTY ANSI escape codes (Bert Belder)\r
+<li>Debugger improvements (Fedor Indutny)\r
+<li>crypto: look up SSL errors with ERR_print_errors() (Ben Noordhuis)\r
+<li>dns callbacks go through MakeCallback now\r
+<li>Raise an error when a malformed package.json file is found. (Ben Leslie)\r
+<li>buffers: handle bad length argument in constructor (Ben Noordhuis)\r
+<li>#1726, unref process.stdout\r
+<li>Doc improvements (Ben Noordhuis, Fedor Indutny, koichik)\r
+<li>Upgrade libuv to fe18438</ul>\r
+\r
+Download: <a href="http://nodejs.org/dist/v0.5.8/node-v0.5.8.tar.gz">http://nodejs.org/dist/v0.5.8/node-v0.5.8.tar.gz</a>\r
+\r
+Windows Executable: <a href="http://nodejs.org/dist/v0.5.8/node.exe">http://nodejs.org/dist/v0.5.8/node.exe</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.5.8/">http://nodejs.org/docs/v0.5.8/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.5.8/api/">http://nodejs.org/docs/v0.5.8/api/</a>
diff --git a/doc/blog/release/node-v0-5-9.md b/doc/blog/release/node-v0-5-9.md
new file mode 100644 (file)
index 0000000..6e361bc
--- /dev/null
@@ -0,0 +1,27 @@
+version: 0.5.9
+title: Node v0.5.9
+author: ryandahl
+date: Mon Oct 10 2011 19:06:21 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-5-9
+
+2011.10.10, Version 0.5.9 (unstable)\r
+<ul><li>fs.watch interface backed by kqueue, inotify, and ReadDirectoryChangesW (Igor Zinkovsky, Ben Noordhuis)</li>\r
+<li>add dns.resolveTxt (Christian Tellnes)</li>\r
+<li>Remove legacy http library (Ben Noordhuis)</li>\r
+<li>child_process.fork returns and works on Windows. Allows passing handles.  (Igor Zinkovsky, Bert Belder)</li>\r
+<li>#1774 Lint and clean up for --harmony_block_scoping (Tyler Larson, Colton Baker)</li>\r
+<li>#1813 Fix ctrl+c on Windows (Bert Belder)</li>\r
+<li>#1844 unbreak --use-legacy (Ben Noordhuis)</li>\r
+<li>process.stderr now goes through libuv. Both process.stdout and process.stderr are blocking when referencing a TTY.</li>\r
+<li>net_uv performance improvements (Ben Noordhuis, Bert Belder)</li></ul>\r
+\r
+\r
+Download: <a href="http://nodejs.org/dist/v0.5.9/node-v0.5.9.tar.gz">http://nodejs.org/dist/v0.5.9/node-v0.5.9.tar.gz</a>\r
+\r
+Windows Executable: <a href="http://nodejs.org/dist/v0.5.9/node.exe">http://nodejs.org/dist/v0.5.9/node.exe</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.5.9/">http://nodejs.org/docs/v0.5.9/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.5.9/api/">http://nodejs.org/docs/v0.5.9/api/</a>
diff --git a/doc/blog/release/node-v0-6-0.md b/doc/blog/release/node-v0-6-0.md
new file mode 100644 (file)
index 0000000..ea0e713
--- /dev/null
@@ -0,0 +1,80 @@
+version: 0.6.0
+title: Node v0.6.0
+author: ryandahl
+date: Sat Nov 05 2011 02:07:10 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-v0-6-0
+
+We are happy to announce the third stable branch of Node v0.6. We will be freezing JavaScript, C++, and binary interfaces for all v0.6 releases.\r
+\r
+The major differences between v0.4 and v0.6 are<ul>\r
+<li>Native Windows support using I/O Completion Ports for sockets.\r
+<li>Integrated load balancing over multiple processes. <a href="http://nodejs.org/docs/v0.6.0/api/cluster.html">docs</a>\r
+<li>Better support for IPC between Node instances <a href="http://nodejs.org/docs/v0.6.0/api/child_processes.html#child_process.fork">docs</a>\r
+<li>Improved command line debugger <a href="http://nodejs.org/docs/v0.6.0/api/debugger.html">docs</a>\r
+<li>Built-in binding to zlib for compression <a href="http://nodejs.org/docs/v0.6.0/api/zlib.html">docs</a>\r
+<li>Upgrade v8 from 3.1 to 3.6</ul>\r
+\r
+In order to support Windows we reworked much of the core architecture. There was some fear that our work would degrade performance on UNIX systems but this was not the case. Here is a Linux system we benched for demonstration:\r
+\r
+<table><tr> <th></th> <th>v0.4.12 (linux)</th><th>v0.6.0 (linux)</th></tr>\r
+<tr> <td>http_simple.js /bytes/1024</td> <td>5461 r/s</td> <td>6263 r/s</td> </tr>\r
+<tr> <td>io.js read </td> <td>19.75 mB/s</td> <td>26.63 mB/s</td> </tr>\r
+<tr> <td>io.js write </td> <td>21.60 mB/s</td> <td>17.40 mB/s</td> </tr>\r
+<tr> <td>startup.js </td> <td>74.7 ms</td> <td>49.6 ms</td> </tr></table>\r
+\r
+Bigger is better in http and io benchmarks, smaller is better in startup. The http benchmark was done with 600 clients on a 10GE network served from three load generation machines.\r
+\r
+In the last version of Node, v0.4, we could only run Node on Windows with Cygwin. Therefore we've gotten massive improvements by targeting the native APIs. Benchmarks on the same machine:\r
+\r
+<table><tr><th></th><th>v0.4.12 (windows)</th><th>v0.6.0 (windows)</th></tr>\r
+<tr> <td>http_simple.js /bytes/1024</td> <td>3858 r/s</td> <td>5823 r/s</td> </tr>\r
+<tr> <td>io.js read </td> <td>12.41 mB/s</td> <td>26.51 mB/s</td> </tr>\r
+<tr> <td>io.js write </td> <td>12.61 mB/s</td> <td>33.58 mB/s</td> </tr>\r
+<tr> <td>startup.js </td> <td>152.81 ms</td> <td>52.04 ms</td> </tr></table>\r
+\r
+We consider this a good intermediate stage for the Windows port. There is still work to be done. For example, we are not yet providing users with a blessed path for building addon modules in MS Visual Studio.  Work will continue in later releases.\r
+\r
+For users upgrading code bases from v0.4 to v0.6 <a href="https://github.com/joyent/node/wiki/API-changes-between-v0.4-and-v0.6">we've documented</a> most of the issues that you will run into. Most people find the change painless. Despite the long list of changes most core APIs remain untouched. \r
+\r
+Our release cycle will be tightened dramatically now. Expect to see a new stable branch in January. We wish to eventually have our releases in sync with Chrome and V8's 6 week cycle.\r
+\r
+Thank you to everyone who contributed code, tests, docs, or sent in bug reports.\r
+\r
+Here are the changes between v0.5.12 and v0.6.0:\r
+\r
+2011.11.04, Version 0.6.0 (stable)\r
+<ul><li>print undefined on undefined values in REPL (Nathan Rajlich)</li>\r
+<li>doc improvements (koichik, seebees, bnoordhuis, Maciej Małecki, Jacob Kragh)</li>\r
+<li>support native addon loading in windows (Bert Belder)</li>\r
+<li>rename getNetworkInterfaces() to networkInterfaces() (bnoordhuis)</li>\r
+<li>add pending accepts knob for windows (igorzi)</li>\r
+<li>http.request(url.parse(x)) (seebees)</li>\r
+<li>#1929 zlib Respond to 'resume' events properly (isaacs)</li>\r
+<li>stream.pipe: Remove resume and pause events</li>\r
+<li>test fixes for windows (igorzi)</li>\r
+<li>build system improvements (bnoordhuis)</li>\r
+<li>#1936 tls: does not emit 'end' from EncryptedStream (koichik)</li>\r
+<li>#758 tls: add address(), remoteAddress/remotePort</li>\r
+<li>#1399 http: emit Error object after .abort() (bnoordhuis)</li>\r
+<li>#1999 fs: make mkdir() default to 0777 permissions (bnoordhuis)</li>\r
+<li>#2001 fix pipe error codes</li>\r
+<li>#2002 Socket.write should reset timeout timer</li>\r
+<li>stdout and stderr are blocking when associated with file too.</li>\r
+<li>remote debugger support on windows (Bert Belder)</li>\r
+<li>convenience methods for zlib (Matt Robenolt)</li>\r
+<li>process.kill support on windows (igorzi)</li>\r
+<li>process.uptime() support on windows (igorzi)</li>\r
+<li>Return IPv4 addresses before IPv6 addresses from getaddrinfo</li>\r
+<li>util.inspect improvements (Nathan Rajlich)</li>\r
+<li>cluster module api changes</li>\r
+<li>Downgrade V8 to 3.6.6.6</li></ul>\r
+\r
+Download: <a href="http://nodejs.org/dist/v0.6.0/node-v0.6.0.tar.gz">http://nodejs.org/dist/v0.6.0/node-v0.6.0.tar.gz</a>\r
+\r
+Windows Executable: <a href="http://nodejs.org/dist/v0.6.0/node.exe">http://nodejs.org/dist/v0.6.0/node.exe</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.6.0/">http://nodejs.org/docs/v0.6.0/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.6.0/api/">http://nodejs.org/docs/v0.6.0/api/</a>
diff --git a/doc/blog/release/node-v0-6-1.md b/doc/blog/release/node-v0-6-1.md
new file mode 100644 (file)
index 0000000..14a0db4
--- /dev/null
@@ -0,0 +1,33 @@
+version: 0.6.1
+title: Node v0.6.1
+author: ryandahl
+date: Fri Nov 11 2011 15:34:15 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-6-1
+
+2011.11.11, Version 0.6.1 (stable)\r
+<ul><li>doc improvements (Eric Lovett, Ben Noordhuis, Scott Anderson, Yoji SHIDARA)</li>\r
+<li>crypto: make thread-safe (Ben Noordhuis)</li>\r
+<li>fix process.kill error object</li>\r
+<li>debugger: correctly handle source with multi-byte characters (Shigeki Ohtsu)</li>\r
+<li>make stdout and stderr non-destroyable (Igor Zinkovsky)</li>\r
+<li>fs: don't close uninitialized fs.watch handle (Ben Noordhuis)</li>\r
+<li>#2026 fix man page install on BSDs (Ben Noordhuis)</li>\r
+<li>#2040 fix unrecognized errno assert in uv_err_name</li>\r
+<li>#2043 fs: mkdir() should call callback if mode is omitted</li>\r
+<li>#2045 fs: fix fs.realpath on windows to return on error (Benjamin Pasero)</li>\r
+<li>#2047 minor cluster improvements</li>\r
+<li>#2052 readline get window columns correctly</li>\r
+<li>Upgrade V8 to 3.6.6.7</li></ul>\r
+\r
+\r
+Source Code: <a href="http://nodejs.org/dist/v0.6.1/node-v0.6.1.tar.gz">http://nodejs.org/dist/v0.6.1/node-v0.6.1.tar.gz</a>\r
+\r
+Windows Installer: <a href="http://nodejs.org/dist/v0.6.1/node-v0.6.1.msi">http://nodejs.org/dist/v0.6.1/node-v0.6.1.msi</a>\r
+\r
+Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.1/node-v0.6.1.pkg">http://nodejs.org/dist/v0.6.1/node-v0.6.1.pkg</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.6.1/">http://nodejs.org/docs/v0.6.1/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.6.1/api/">http://nodejs.org/docs/v0.6.1/api/</a>
diff --git a/doc/blog/release/node-v0-6-10.md b/doc/blog/release/node-v0-6-10.md
new file mode 100644 (file)
index 0000000..a0ca4e4
--- /dev/null
@@ -0,0 +1,30 @@
+version: 0.6.10
+title: Node v0.6.10
+author: Isaac Schlueter
+date: Thu Feb 02 2012 17:22:03 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-6-10
+
+<p>2012.02.02, Version 0.6.10 (stable)</p>\r
+\r
+<ul>\r
+<li><p>Update V8 to 3.6.6.20</p></li>\r
+<li><p>Add npm msysgit bash shim to msi installer (isaacs)</p></li>\r
+<li><p>buffers: fix intermittent out of bounds error (Ben Noordhuis)</p></li>\r
+<li><p>buffers: honor length argument in base64 decoder (Ben Noordhuis)</p></li>\r
+<li><p>windows: Fix path.exists regression (Bert Belder)</p></li>\r
+<li><p>Make QueryString.parse run faster (Philip Tellis)</p></li>\r
+<li><p>http: avoid freeing http-parser objects too early (koichik)</p></li>\r
+<li><p>timers: add v0.4 compatibility hack (Ben Noordhuis)</p></li>\r
+<li><p>Proper EPERM error code support (Igor Zinkovsky, Brandon Philips)</p></li>\r
+<li><p>dgram: Implement udp multicast methods on windows (Bert Belder)</p></li>\r
+</ul><p>Source Code: <a href="http://nodejs.org/dist/v0.6.10/node-v0.6.10.tar.gz">http://nodejs.org/dist/v0.6.10/node-v0.6.10.tar.gz</a></p>\r
+\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.10/node-v0.6.10.msi">http://nodejs.org/dist/v0.6.10/node-v0.6.10.msi</a></p>\r
+\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.10/node-v0.6.10.pkg">http://nodejs.org/dist/v0.6.10/node-v0.6.10.pkg</a></p>\r
+\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.10/">http://nodejs.org/docs/v0.6.10/</a></p>\r
+\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.10/api/">http://nodejs.org/docs/v0.6.10/api/</a></p>
diff --git a/doc/blog/release/node-v0-6-2.md b/doc/blog/release/node-v0-6-2.md
new file mode 100644 (file)
index 0000000..b405268
--- /dev/null
@@ -0,0 +1,27 @@
+version: 0.6.2
+title: Node v0.6.2
+author: bennoordhuis
+date: Fri Nov 18 2011 15:35:32 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-6-2
+
+<p>2011.11.18, Version 0.6.2 (stable)</p>\r
+<ul>\r
+<li>doc improvements (Artur Adib, Trevor Burnham, Ryan Emery, Trent Mick)</li>\r
+<li>timers: remember extra setTimeout() arguments when timeout==0</li>\r
+<li>punycode: use Mathias Bynens's punycode library, it's more compliant</li>\r
+<li>repl: improved tab completion (Ryan Emery)</li>\r
+<li>buffer: fix range checks in .writeInt() functions (Lukasz Walukiewicz)</li>\r
+<li>tls: make cipher list configurable</li>\r
+<li>addons: make Buffer and ObjectWrap visible to Windows add-ons (Bert Belder)</li>\r
+<li>crypto: add PKCS#1 a.k.a RSA public key verification support</li>\r
+<li>windows: fix stdout writes when redirected to nul</li>\r
+<li>sunos: fix build on Solaris and Illumos</li>\r
+<li>Upgrade V8 to 3.6.6.8</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.6.2/node-v0.6.2.tar.gz">http://nodejs.org/dist/v0.6.2/node-v0.6.2.tar.gz</a></p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.2/node-v0.6.2.msi">http://nodejs.org/dist/v0.6.2/node-v0.6.2.msi</a></p>\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.2/node-v0.6.2.pkg">http://nodejs.org/dist/v0.6.2/node-v0.6.2.pkg</a></p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.2/">http://nodejs.org/docs/v0.6.2/</a></p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.2/api/">http://nodejs.org/docs/v0.6.2/api/</a></p>
diff --git a/doc/blog/release/node-v0-6-3.md b/doc/blog/release/node-v0-6-3.md
new file mode 100644 (file)
index 0000000..559c3d3
--- /dev/null
@@ -0,0 +1,30 @@
+version: 0.6.3
+title: Node v0.6.3
+author: piscisaureus
+date: Fri Nov 25 2011 02:54:08 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-6-3
+
+2011.11.25, Version 0.6.3 (stable)\r
+<ul>\r
+       <li>#2083 Land NPM in Node. It is included in packages/installers and installed on `make install`.</li>\r
+       <li>#2076 Add logos to windows installer.</li>\r
+       <li>#1711 Correctly handle http requests without headers. (Ben Noordhuis, Felix Geisendörfer)</li>\r
+       <li>TLS: expose more openssl SSL context options and constants. (Ben Noordhuis)</li>\r
+       <li>#2177 Windows: don't kill UDP socket when a packet fails to reach its destination. (Bert Belder)</li>\r
+       <li>Windows: support paths longer than 260 characters. (Igor Zinkovsky)</li>\r
+       <li>Windows: correctly resolve drive-relative paths. (Bert Belder)</li>\r
+       <li>#2166 Don't leave file descriptor open after lchmod. (Isaac Schlueter)</li>\r
+       <li>#2084 Add OS X .pkg build script to make file.</li>\r
+       <li>#2160 Documentation improvements. (Ben Noordhuis)</li>\r
+</ul>\r
+Source Code: <a href="http://nodejs.org/dist/v0.6.3/node-v0.6.3.tar.gz">http://nodejs.org/dist/v0.6.3/node-v0.6.3.tar.gz</a>\r
+\r
+Windows Installer: <a href="http://nodejs.org/dist/v0.6.3/node-v0.6.3.msi">http://nodejs.org/dist/v0.6.3/node-v0.6.3.msi</a>\r
+\r
+Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.3/node-v0.6.3.pkg">http://nodejs.org/dist/v0.6.3/node-v0.6.3.pkg</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.6.3/">http://nodejs.org/docs/v0.6.3/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.6.3/api/">http://nodejs.org/docs/v0.6.3/api/</a>
diff --git a/doc/blog/release/node-v0-6-4.md b/doc/blog/release/node-v0-6-4.md
new file mode 100644 (file)
index 0000000..f99f15f
--- /dev/null
@@ -0,0 +1,31 @@
+version: 0.6.4
+title: Node v0.6.4
+author: bennoordhuis
+date: Thu Dec 01 2011 18:20:14 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-6-4
+
+2011.12.02, Version 0.6.4 (stable)\r
+<ul>\r
+<li>doc improvements (Kyle Young, Tim Oxley, Roman Shtylman, Mathias Bynens)</li>\r
+<li>upgrade bundled npm (Isaac Schlueter)</li>\r
+<li>polish Windows installer (Igor Zinkovsky, Isaac Schlueter)</li>\r
+<li>punycode: upgrade to v0.2.1 (Mathias Bynens)</li>\r
+<li>build: add --without-npm flag to configure script</li>\r
+<li>sys: deprecate module some more, print stack trace if NODE_DEBUG=sys</li>\r
+<li>cli: add -p switch, prints result of --eval</li>\r
+<li>#1997: fix Blowfish ECB encryption and decryption (Ingmar Runge)</li>\r
+<li>#2223: fix socket 'close' event being emitted twice</li>\r
+<li>#2224: fix RSS memory usage &gt; 4 GB reporting (Russ Bradberry)</li>\r
+<li>#2225: fix util.inspect() object stringification bug (Nathan Rajlich)</li>\r
+</ul>\r
+Source Code: <a href="http://nodejs.org/dist/v0.6.4/node-v0.6.4.tar.gz">http://nodejs.org/dist/v0.6.4/node-v0.6.4.tar.gz</a>\r
+\r
+Windows Installer: <a href="http://nodejs.org/dist/v0.6.4/node-v0.6.4.msi">http://nodejs.org/dist/v0.6.4/node-v0.6.4.msi</a>\r
+\r
+Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.4/node-v0.6.4.pkg">http://nodejs.org/dist/v0.6.4/node-v0.6.4.pkg</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.6.4/">http://nodejs.org/docs/v0.6.4/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.6.4/api/">http://nodejs.org/docs/v0.6.4/api/</a>
diff --git a/doc/blog/release/node-v0-6-5.md b/doc/blog/release/node-v0-6-5.md
new file mode 100644 (file)
index 0000000..832da74
--- /dev/null
@@ -0,0 +1,21 @@
+version: 0.6.5
+title: Node v0.6.5
+author: ryandahl
+date: Sun Dec 04 2011 00:59:57 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-6-5
+
+2011.12.04, Version 0.6.5 (stable)\r
+<ul><li>npm workaround Windows antivirus software (isaacs)\r
+<li>Upgrade V8 to 3.6.6.11</ul>\r
+\r
+Source Code: <a href="http://nodejs.org/dist/v0.6.5/node-v0.6.5.tar.gz">http://nodejs.org/dist/v0.6.5/node-v0.6.5.tar.gz</a>\r
+\r
+Windows Installer: <a href="http://nodejs.org/dist/v0.6.5/node-v0.6.5.msi">http://nodejs.org/dist/v0.6.5/node-v0.6.5.msi</a>\r
+\r
+Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.5/node-v0.6.5.pkg">http://nodejs.org/dist/v0.6.5/node-v0.6.5.pkg</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.6.5/">http://nodejs.org/docs/v0.6.5/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.6.5/api/">http://nodejs.org/docs/v0.6.5/api/</a>
diff --git a/doc/blog/release/node-v0-6-6.md b/doc/blog/release/node-v0-6-6.md
new file mode 100644 (file)
index 0000000..c52169a
--- /dev/null
@@ -0,0 +1,32 @@
+version: 0.6.6
+title: Node v0.6.6
+author: Isaac Schlueter
+date: Thu Dec 15 2011 11:07:57 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-6-6
+
+2011.12.14, Version 0.6.6 (stable)\r
+\r
+<ul>\r
+<li>npm update to 1.1.0-beta-4 (Isaac Z. Schlueter)</li>\r
+<li>cli: fix output of --help (Ben Noordhuis)</li>\r
+<li>new website</li>\r
+<li>pause/resume semantics for stdin (Isaac Z. Schlueter)</li>\r
+<li>Travis CI integration (Maciej Małecki)</li>\r
+<li>child_process: Fix bug regarding closed stdin (Ben Noordhuis)</li>\r
+<li>Enable upgrades in MSI. (Igor Zinkovsky)</li>\r
+<li>net: Fixes memory leak (Ben Noordhuis)</li>\r
+<li>fs: handle fractional or NaN ReadStream buffer size (Ben Noordhuis)</li>\r
+<li>crypto: fix memory leaks in PBKDF2 error path (Ben Noordhuis)</li>\r
+</ul>\r
+\r
+Source Code: <a href="http://nodejs.org/dist/v0.6.6/node-v0.6.6.tar.gz">http://nodejs.org/dist/v0.6.6/node-v0.6.6.tar.gz</a>\r
+\r
+Windows Installer: <a href="http://nodejs.org/dist/v0.6.6/node-v0.6.6.msi">http://nodejs.org/dist/v0.6.6/node-v0.6.6.msi</a>\r
+\r
+Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.6/node-v0.6.6.pkg">http://nodejs.org/dist/v0.6.6/node-v0.6.6.pkg</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.6.6/">http://nodejs.org/docs/v0.6.6/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.6.6/api/">http://nodejs.org/docs/v0.6.6/api/</a>
diff --git a/doc/blog/release/node-v0-6-7.md b/doc/blog/release/node-v0-6-7.md
new file mode 100644 (file)
index 0000000..0346f51
--- /dev/null
@@ -0,0 +1,41 @@
+version: 0.6.7
+title: Node v0.6.7
+author: Isaac Schlueter
+date: Fri Jan 06 2012 17:54:49 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-6-7
+
+<p>2012.01.06, Version 0.6.7 (stable)</p>\r
+\r
+<ul>\r
+<li><p>V8 hash collision fix (Breaks MIPS) (Bert Belder, Erik Corry)</p></li>\r
+<li><p>Upgrade V8 to 3.6.6.15</p></li>\r
+<li><p>Upgrade npm to 1.1.0-beta-10 (isaacs)</p></li>\r
+<li><p>many doc updates (Ben Noordhuis, Jeremy Martin, koichik, Dave Irvine,\r
+Seong-Rak Choi, Shannen, Adam Malcontenti-Wilson, koichik)</p></li>\r
+<li><p>Fix segfault in <code>node_http_parser.cc</code></p></li>\r
+<li><p>dgram, timers: fix memory leaks (Ben Noordhuis, Yoshihiro Kikuchi)</p></li>\r
+<li><p>repl: fix repl.start not passing the <code>ignoreUndefined</code> arg (Damon Oehlman)</p></li>\r
+<li><p>#1980: Socket.pause null reference when called on a closed Stream (koichik)</p></li>\r
+<li><p>#2263: XMLHttpRequest piped in a writable file stream hang (koichik)</p></li>\r
+<li><p>#2069: http resource leak (koichik)</p></li>\r
+<li><p>buffer.readInt global pollution fix (Phil Sung)</p></li>\r
+<li><p>timers: fix performance regression (Ben Noordhuis)</p></li>\r
+<li><p>#2308, #2246: node swallows openssl error on request (koichik)</p></li>\r
+<li><p>#2114: timers: remove _idleTimeout from item in .unenroll() (James Hartig)</p></li>\r
+<li><p>#2379: debugger: Request backtrace w/o refs (Fedor Indutny)</p></li>\r
+<li><p>simple DTrace ustack helper (Dave Pacheco)</p></li>\r
+<li><p>crypto: rewrite HexDecode without snprintf (Roman Shtylman)</p></li>\r
+<li><p>crypto: don&#8217;t ignore DH init errors (Ben Noordhuis)</p></li>\r
+</ul>\r
+\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.6.7/node-v0.6.7.tar.gz">http://nodejs.org/dist/v0.6.7/node-v0.6.7.tar.gz</a></p>\r
+\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.7/node-v0.6.7.msi">http://nodejs.org/dist/v0.6.7/node-v0.6.7.msi</a></p>\r
+\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.7/node-v0.6.7.pkg">http://nodejs.org/dist/v0.6.7/node-v0.6.7.pkg</a></p>\r
+\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.7/">http://nodejs.org/docs/v0.6.7/</a></p>\r
+\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.7/api/">http://nodejs.org/docs/v0.6.7/api/</a></p>
diff --git a/doc/blog/release/node-v0-6-8.md b/doc/blog/release/node-v0-6-8.md
new file mode 100644 (file)
index 0000000..55de31e
--- /dev/null
@@ -0,0 +1,31 @@
+version: 0.6.8
+title: Node v0.6.8
+author: Isaac Schlueter
+date: Thu Jan 19 2012 19:59:53 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-6-8
+
+<p>2012.01.19, Version 0.6.8 (stable)</p>\r
+\r
+<ul>\r
+<li><p>Update V8 to 3.6.6.19</p></li>\r
+<li><p>Numeric key hash collision fix for V8 (Erik Corry, Fedor Indutny)</p></li>\r
+<li><p>Add missing TTY key translations for F1-F5 on Windows (Brandon Benvie)</p></li>\r
+<li><p>path.extname bugfix with . and .. paths (Bert Belder)</p></li>\r
+<li><p>cluster: don't always kill the master on uncaughtException (Ben Noordhuis)</p></li>\r
+<li><p>Update npm to 1.1.0-2 (isaacs)</p></li>\r
+<li><p>typed arrays: set class name (Ben Noordhuis)</p></li>\r
+<li><p>zlib binding cleanup (isaacs, Bert Belder)</p></li>\r
+<li><p>dgram: use slab memory allocator (Michael Bernstein)</p></li>\r
+<li><p>fix segfault #2473</p></li>\r
+<li><p>#2521 60% improvement in fs.stat on Windows (Igor Zinkovsky)</p></li>\r
+</ul><p>Source Code: <a href="http://nodejs.org/dist/v0.6.8/node-v0.6.8.tar.gz">http://nodejs.org/dist/v0.6.8/node-v0.6.8.tar.gz</a></p>\r
+\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.8/node-v0.6.8.msi">http://nodejs.org/dist/v0.6.8/node-v0.6.8.msi</a></p>\r
+\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.8/node-v0.6.8.pkg">http://nodejs.org/dist/v0.6.8/node-v0.6.8.pkg</a></p>\r
+\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.8/">http://nodejs.org/docs/v0.6.8/</a></p>\r
+\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.8/api/">http://nodejs.org/docs/v0.6.8/api/</a></p>
diff --git a/doc/blog/release/node-v0-6-9.md b/doc/blog/release/node-v0-6-9.md
new file mode 100644 (file)
index 0000000..05d992f
--- /dev/null
@@ -0,0 +1,30 @@
+version: 0.6.9
+title: Node v0.6.9
+author: Isaac Schlueter
+date: Fri Jan 27 2012 16:58:18 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-6-9
+
+<p>2012.01.27, Version 0.6.9 (stable)</p>\r
+\r
+<ul>\r
+<li>\r
+<p>dgram: Bring back missing functionality for Unix (Dan VerWeire,\r
+Roman Shtylman, Ben Noordhuis)</p>\r
+<p>- Note: Windows UDP support not yet complete.</p></li>\r
+<li><p>http: Fix parser memory leak (koichik)</p></li>\r
+<li><p>zlib: Fix #2365 crashes on invalid input (Nicolas LaCasse)</p></li>\r
+<li><p>module: fix --debug-brk on symlinked scripts (Fedor Indutny)</p></li>\r
+<li><p>Documentation Restyling (Matthew Fitzsimmons)</p></li>\r
+<li><p>Update npm to 1.1.0-3 (isaacs)</p></li>\r
+<li><p>Windows: fix regression in stat() calls to C:\ (Bert Belder)</p></li>\r
+</ul><p>Source Code: <a href="http://nodejs.org/dist/v0.6.9/node-v0.6.9.tar.gz">http://nodejs.org/dist/v0.6.9/node-v0.6.9.tar.gz</a></p>\r
+\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.9/node-v0.6.9.msi">http://nodejs.org/dist/v0.6.9/node-v0.6.9.msi</a></p>\r
+\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.9/node-v0.6.9.pkg">http://nodejs.org/dist/v0.6.9/node-v0.6.9.pkg</a></p>\r
+\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.9/">http://nodejs.org/docs/v0.6.9/</a></p>\r
+\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.9/api/">http://nodejs.org/docs/v0.6.9/api/</a></p>
diff --git a/doc/blog/release/node-v0-7-0-unstable.md b/doc/blog/release/node-v0-7-0-unstable.md
new file mode 100644 (file)
index 0000000..3036b92
--- /dev/null
@@ -0,0 +1,29 @@
+version: 0.7.0
+title: Node v0.7.0 (Unstable)
+author: ryandahl
+date: Mon Jan 16 2012 19:58:28 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-7-0-unstable
+
+<strong>This is the first release in the unstable v0.7 series. Almost all users will want to remain using the stable v0.6 releases.</strong>\r
+\r
+2012.01.16, Version 0.7.0 (unstable)\r
+<ul>\r
+<li>Upgrade V8 to 3.8.6\r
+<li>Use GYP build system on unix (Ben Noordhuis)\r
+<li>Experimenetal isolates support (Ben Noordhuis)\r
+<li>Improvements to Cluster API (Andreas Madsen)\r
+<li>Use isolates for internal debugger (Fedor Indutny)\r
+<li>Bug fixes</ul>\r
+\r
+\r
+Source Code: <a href="http://nodejs.org/dist/v0.7.0/node-v0.7.0.tar.gz">http://nodejs.org/dist/v0.7.0/node-v0.7.0.tar.gz</a>\r
+\r
+Windows Installer: <a href="http://nodejs.org/dist/v0.7.0/node-v0.7.0.msi">http://nodejs.org/dist/v0.7.0/node-v0.7.0.msi</a>\r
+\r
+Macintosh Installer: <a href="http://nodejs.org/dist/v0.7.0/node-v0.7.0.pkg">http://nodejs.org/dist/v0.7.0/node-v0.7.0.pkg</a>\r
+\r
+Website: <a href="http://nodejs.org/docs/v0.7.0/">http://nodejs.org/docs/v0.7.0/</a>\r
+\r
+Documentation: <a href="http://nodejs.org/docs/v0.7.0/api/">http://nodejs.org/docs/v0.7.0/api/</a>
diff --git a/doc/blog/release/node-v0-7-1.md b/doc/blog/release/node-v0-7-1.md
new file mode 100644 (file)
index 0000000..efb89d0
--- /dev/null
@@ -0,0 +1,30 @@
+version: 0.7.1
+title: Node v0.7.1
+author: Isaac Schlueter
+date: Mon Jan 23 2012 17:35:59 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-7-1
+
+<p>2012.01.23, Version 0.7.1 (unstable)</p>\r
+\r
+<ul>\r
+<li><p>Update V8 to 3.8.8</p></li>\r
+<li><p>Install node-waf by default (Fedor Indutny)</p></li>\r
+<li><p>crypto: Add ability to turn off PKCS padding (Ingmar Runge)</p></li>\r
+<li><p>v8: implement VirtualMemory class on SunOS (Ben Noordhuis)</p></li>\r
+<li><p>Add cluster.setupMaster (Andreas Madsen)</p></li>\r
+<li><p>move <code>path.exists*</code> to <code>fs.exists*</code> (Maciej Małecki)</p></li>\r
+<li><p>typed arrays: set class name (Ben Noordhuis)</p></li>\r
+<li><p>libuv bug fixes (Igor Zinkovsky, Ben Noordhuis, Dan VerWeire)</p></li>\r
+</ul>\r
+\r
+<p>Source: <a href="http://nodejs.org/dist/v0.7.1/node-v0.7.1.tar.gz">http://nodejs.org/dist/v0.7.1/node-v0.7.1.tar.gz</a></p>\r
+\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.1/node-v0.7.1.msi">http://nodejs.org/dist/v0.7.1/node-v0.7.1.msi</a></p>\r
+\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.7.1/node-v0.7.1.pkg">http://nodejs.org/dist/v0.7.1/node-v0.7.1.pkg</a></p>\r
+\r
+<p>Website: <a href="http://nodejs.org/docs/v0.7.1/">http://nodejs.org/docs/v0.7.1/</a></p>\r
+\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.7.1/api/">http://nodejs.org/docs/v0.7.1/api/</a></p>
diff --git a/doc/blog/release/node-v0-7-2-unstable.md b/doc/blog/release/node-v0-7-2-unstable.md
new file mode 100644 (file)
index 0000000..d5c1f8f
--- /dev/null
@@ -0,0 +1,32 @@
+version: 0.7.2
+title: Node v0.7.2 (unstable)
+author: Isaac Schlueter
+date: Wed Feb 01 2012 13:13:04 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-7-2-unstable
+
+<p>2012.02.01, Version 0.7.2 (unstable)</p>\r
+\r
+<ul>\r
+<li><p>Update V8 to 3.8.9</p></li>\r
+<li><p>Support for sharing streams across Isolates (Igor Zinkovsky)</p></li>\r
+<li><p>#2636 - Fix case where http_parsers are freed too early (koichik)</p></li>\r
+<li><p>url: Support for IPv6 addresses in URLs (Łukasz Walukiewicz)</p></li>\r
+<li><p>child_process: Add disconnect() method to child processes (Andreas Madsen)</p></li>\r
+<li><p>fs: add O_EXCL support, exclusive open file (Ben Noordhuis)</p></li>\r
+<li><p>fs: more specific error messages (Tj Holowaychuk)</p></li>\r
+<li><p>tty: emit 'unknown' key event if key sequence not found (Dan VerWeire, Nathan Rajlich)</p></li>\r
+<li><p>build: compile release build too if BUILDTYPE=Debug (Ben Noordhuis)</p></li>\r
+<li><p>module: fix --debug-brk on symlinked scripts (Fedor Indutny)</p></li>\r
+<li><p>zlib: fix <code>Failed to set dictionary</code> issue (Fedor Indutny)</p></li>\r
+<li><p>waf: predict target arch for OS X (Fedor Indutny)</p></li>\r
+</ul><p>Source Code: <a href="http://nodejs.org/dist/v0.7.2/node-v0.7.2.tar.gz">http://nodejs.org/dist/v0.7.2/node-v0.7.2.tar.gz</a></p>\r
+\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.2/node-v0.7.2.msi">http://nodejs.org/dist/v0.7.2/node-v0.7.2.msi</a></p>\r
+\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.7.2/node-v0.7.2.pkg">http://nodejs.org/dist/v0.7.2/node-v0.7.2.pkg</a></p>\r
+\r
+<p>Website: <a href="http://nodejs.org/docs/v0.7.2/">http://nodejs.org/docs/v0.7.2/</a></p>\r
+\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.7.2/api/">http://nodejs.org/docs/v0.7.2/api/</a></p>
diff --git a/doc/blog/release/node-v0-7-3.md b/doc/blog/release/node-v0-7-3.md
new file mode 100644 (file)
index 0000000..a0d93df
--- /dev/null
@@ -0,0 +1,39 @@
+version: 0.7.3
+title: Node v0.7.3 (unstable)
+author: Isaac Schlueter
+date: Tue Feb 07 2012 17:08:27 GMT-0800 (PST)
+status: publish
+category: release
+slug: node-v0-7-3
+
+<p>2012.02.07, Version 0.7.3 (unstable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>Upgrade V8 to 3.9.2</p>\r
+</li>\r
+<li><p>Revert support for isolates. (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>cluster: Cleanup docs, event handling, and process.disconnect (Andreas Madsen)</p>\r
+</li>\r
+<li><p>gyp_addon: link with node.lib on Windows (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>http: fix case where http-parser is freed twice (koichik)</p>\r
+</li>\r
+<li><p>Windows: disable RTTI and exceptions (Bert Belder)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.7.3/node-v0.7.3.tar.gz">http://nodejs.org/dist/v0.7.3/node-v0.7.3.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.3/node-v0.7.3.msi">http://nodejs.org/dist/v0.7.3/node-v0.7.3.msi</a>\r
+\r
+</p>\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.7.3/node-v0.7.3.pkg">http://nodejs.org/dist/v0.7.3/node-v0.7.3.pkg</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.7.3/">http://nodejs.org/docs/v0.7.3/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.7.3/api/">http://nodejs.org/docs/v0.7.3/api/</a>\r
+</p>
diff --git a/doc/blog/release/node-version-0-6-19-stable.md b/doc/blog/release/node-version-0-6-19-stable.md
new file mode 100644 (file)
index 0000000..3a29556
--- /dev/null
@@ -0,0 +1,61 @@
+version: 0.6.19
+title: Node Version 0.6.19 (stable)
+author: Isaac Schlueter
+date: Wed Jun 06 2012 09:55:37 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-version-0-6-19-stable
+
+<p>2012.06.06 Version 0.6.19 (stable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>npm: upgrade to 1.1.24</p>\r
+</li>\r
+<li><p>fs: no end emit after createReadStream.pause() (Andreas Madsen)</p>\r
+</li>\r
+<li><p>vm: cleanup module memory leakage (Marcel Laverdet)</p>\r
+</li>\r
+<li><p>unix: fix loop starvation under high network load (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>unix: remove abort() in ev_unref() (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>windows/tty: never report error after forcibly aborting line-buffered read (Bert Belder)</p>\r
+</li>\r
+<li><p>windows: skip GetFileAttributes call when opening a file (Bert Belder)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz">http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.19/node-v0.6.19.msi">http://nodejs.org/dist/v0.6.19/node-v0.6.19.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.6.19/x64/">http://nodejs.org/dist/v0.6.19/x64/</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.6.19/node-v0.6.19.pkg">http://nodejs.org/dist/v0.6.19/node-v0.6.19.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.6.19/">http://nodejs.org/dist/v0.6.19/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.19/">http://nodejs.org/docs/v0.6.19/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.19/api/">http://nodejs.org/docs/v0.6.19/api/</a>\r
+</p>\r
+\r
+<p>Shasums:</p>\r
+<pre>ef4f5c1e5f12f6ef3478a794d6a81f59669332f9  node-v0.6.19.msi\r
+781616f33208f532f168633758a648c20e1ea68b  node-v0.6.19.pkg\r
+f6c5cfbadff4788ac3a95f8263a0c2f4e07444b6  node-v0.6.19.tar.gz\r
+10f729ca236825821d97556441fa64f994cb4ca8  node.exe\r
+5b8cd02e5f92ed6512aabdac11766ad8c1abc436  node.exp\r
+20037e4901de605e08e48d0c85531334912844e3  node.lib\r
+c44f62852918d449850014d9b29dd073cb6920a5  node.pdb\r
+04db25c93c5357394941dd2de12cb61959eb82d1  x64/node-v0.6.19.msi\r
+f77c77f2e470cfc9071853af2f277ba91d660b9c  x64/node.exe\r
+fcf26a3f984a3f19804e0567414604b77b1d3bac  x64/node.exp\r
+bfed2a24f253dbac99379d6f22fc8e9e85ade7ed  x64/node.lib\r
+95226c1cc5170ea05c2e54431040f06c3e95e99f  x64/node.pdb</pre>
diff --git a/doc/blog/release/node-version-0-7-9-unstable.md b/doc/blog/release/node-version-0-7-9-unstable.md
new file mode 100644 (file)
index 0000000..cb077d6
--- /dev/null
@@ -0,0 +1,73 @@
+version: 0.7.9
+title: Node Version 0.7.9 (unstable)
+author: Isaac Schlueter
+date: Tue May 29 2012 10:11:45 GMT-0700 (PDT)
+status: publish
+category: release
+slug: node-version-0-7-9-unstable
+
+<p>2012.05.28, Version 0.7.9 (unstable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>Upgrade V8 to 3.11.1</p>\r
+</li>\r
+<li><p>Upgrade npm to 1.1.23</p>\r
+</li>\r
+<li><p>uv: rework reference counting scheme (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>uv: add interface for joining external event loops (Bert Belder)</p>\r
+</li>\r
+<li><p>repl, readline: Handle Ctrl+Z and SIGCONT better (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>fs: 64bit offsets for fs calls (Igor Zinkovsky)</p>\r
+</li>\r
+<li><p>fs: add sync open flags &apos;rs&apos; and &apos;rs+&apos; (Kevin Bowman)</p>\r
+</li>\r
+<li><p>windows: enable creating directory junctions with fs.symlink (Igor Zinkovsky, Bert Belder)</p>\r
+</li>\r
+<li><p>windows: fix fs.lstat to properly detect symlinks. (Igor Zinkovsky)</p>\r
+</li>\r
+<li><p>Fix #3270 Escape url.parse delims (isaacs)</p>\r
+</li>\r
+<li><p>http: make http.get() accept a URL (Adam Malcontenti-Wilson)</p>\r
+</li>\r
+<li><p>Cleanup vm module memory leakage (Marcel Laverdet)</p>\r
+</li>\r
+<li><p>Optimize writing strings with Socket.write (Bert Belder)</p>\r
+</li>\r
+<li><p>add support for CESU-8 and UTF-16LE encodings (koichik)</p>\r
+</li>\r
+<li><p>path: add path.sep to get the path separator. (Yi, EungJun)</p>\r
+</li>\r
+<li><p>net, http: add backlog parameter to .listen() (Erik Dubbelboer)</p>\r
+</li>\r
+<li><p>debugger: support mirroring Date objects (Fedor Indutny)</p>\r
+</li>\r
+<li><p>addon: add AtExit() function (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>net: signal localAddress bind failure in connect (Brian Schroeder)</p>\r
+</li>\r
+<li><p>util: handle non-string return value in .inspect() (Alex Kocharin)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.7.9/node-v0.7.9.tar.gz">http://nodejs.org/dist/v0.7.9/node-v0.7.9.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.9/node-v0.7.9.msi">http://nodejs.org/dist/v0.7.9/node-v0.7.9.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.7.9/x64/">http://nodejs.org/dist/v0.7.9/x64/</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.7.9/node-v0.7.9.pkg">http://nodejs.org/dist/v0.7.9/node-v0.7.9.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.7.9/">http://nodejs.org/dist/v0.7.9/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.7.9/">http://nodejs.org/docs/v0.7.9/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.7.9/api/">http://nodejs.org/docs/v0.7.9/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-6-11-stable.md b/doc/blog/release/version-0-6-11-stable.md
new file mode 100644 (file)
index 0000000..d57068f
--- /dev/null
@@ -0,0 +1,64 @@
+version: 0.6.11
+title: Version 0.6.11 (stable)
+author: Isaac Schlueter
+date: Fri Feb 17 2012 13:32:55 GMT-0800 (PST)
+status: publish
+category: release
+slug: version-0-6-11-stable
+
+<p>2012.02.17 Version 0.6.11 (stable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>http: allow multiple WebSocket RFC6455 headers (Einar Otto Stangvik)</p>\r
+</li>\r
+<li><p>http: allow multiple WWW-Authenticate headers (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>windows: support unicode argv and environment variables (Bert Belder)</p>\r
+</li>\r
+<li><p>tls: mitigate session renegotiation attacks (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>tcp, pipe: don&apos;t assert on uv_accept() errors (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>tls: Allow establishing secure connection on the existing socket (koichik)</p>\r
+</li>\r
+<li><p>dgram: handle close of dgram socket before DNS lookup completes (Seth Fitzsimmons)</p>\r
+</li>\r
+<li><p>windows: Support half-duplex pipes (Igor Zinkovsky)</p>\r
+</li>\r
+<li><p>build: disable omit-frame-pointer on solaris systems (Dave Pacheco)</p>\r
+</li>\r
+<li><p>debugger: fix --debug-brk (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>net: fix large file downloads failing (koichik)</p>\r
+</li>\r
+<li><p>fs: fix ReadStream failure to read from existing fd (Christopher Jeffrey)</p>\r
+</li>\r
+<li><p>net: destroy socket on DNS error (Stefan Rusu)</p>\r
+</li>\r
+<li><p>dtrace: add missing translator (Dave Pacheco)</p>\r
+</li>\r
+<li><p>unix: don&apos;t flush tty on switch to raw mode (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>windows: reset brightness when reverting to default text color (Bert Belder)</p>\r
+</li>\r
+<li><p>npm: update to 1.1.1</p>\r
+\r
+<p>- Update which, fstream, mkdirp, request, and rimraf<br>- Fix #2123 Set path properly for lifecycle scripts on windows<br>- Mark the root as seen, so we don&apos;t recurse into it. Fixes #1838. (Martin Cooper)</p>\r
+\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.6.11/node-v0.6.11.tar.gz">http://nodejs.org/dist/v0.6.11/node-v0.6.11.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.11/node-v0.6.11.msi">http://nodejs.org/dist/v0.6.11/node-v0.6.11.msi</a>\r
+\r
+</p>\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.11/node-v0.6.11.pkg">http://nodejs.org/dist/v0.6.11/node-v0.6.11.pkg</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.11/">http://nodejs.org/docs/v0.6.11/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.11/api/">http://nodejs.org/docs/v0.6.11/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-6-12-stable.md b/doc/blog/release/version-0-6-12-stable.md
new file mode 100644 (file)
index 0000000..bd20ef7
--- /dev/null
@@ -0,0 +1,66 @@
+version: 0.6.12
+title: Version 0.6.12 (stable)
+author: Isaac Schlueter
+date: Fri Mar 02 2012 13:22:49 GMT-0800 (PST)
+status: publish
+category: release
+slug: version-0-6-12-stable
+
+<p>2012.03.02 Version 0.6.12 (stable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>Upgrade V8 to 3.6.6.24</p>\r
+</li>\r
+<li><p>dtrace ustack helper improvements (Dave Pacheco)</p>\r
+</li>\r
+<li><p>API Documentation refactor (isaacs)</p>\r
+</li>\r
+<li><p>#2827 net: fix race write() before and after connect() (koichik)</p>\r
+</li>\r
+<li><p>#2554 #2567 throw if fs args for &apos;start&apos; or &apos;end&apos; are strings (AJ ONeal)</p>\r
+</li>\r
+<li><p>punycode: Update to v1.0.0 (Mathias Bynens)</p>\r
+</li>\r
+<li><p>Make a fat binary for the OS X pkg (isaacs)</p>\r
+</li>\r
+<li><p>Fix hang on accessing process.stdin (isaacs)</p>\r
+</li>\r
+<li><p>repl: make tab completion work on non-objects (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>Fix fs.watch on OS X (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>Fix #2515 nested setTimeouts cause premature process exit (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>windows: fix time conversion in stat (Igor Zinkovsky)</p>\r
+</li>\r
+<li><p>windows: fs: handle EOF in read (Brandon Philips)</p>\r
+</li>\r
+<li><p>windows: avoid IOCP short-circuit on non-ifs lsps (Igor Zinkovsky)</p>\r
+</li>\r
+<li><p>Upgrade npm to 1.1.4 (isaacs)</p>\r
+<p>\r
+- windows fixes<br>\r
+- Bundle nested bundleDependencies properly<br>\r
+- install: support --save with url install targets<br>\r
+- shrinkwrap: behave properly with url-installed modules<br>\r
+- support installing uncompressed tars or single file modules from urls etc.<br>\r
+- don&apos;t run make clean on rebuild<br>\r
+- support HTTPS-over-HTTP proxy tunneling<br>\r
+</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.6.12/node-v0.6.12.tar.gz">http://nodejs.org/dist/v0.6.12/node-v0.6.12.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.12/node-v0.6.12.msi">http://nodejs.org/dist/v0.6.12/node-v0.6.12.msi</a>\r
+\r
+</p>\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.12/node-v0.6.12.pkg">http://nodejs.org/dist/v0.6.12/node-v0.6.12.pkg</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.12/">http://nodejs.org/docs/v0.6.12/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.12/api/">http://nodejs.org/docs/v0.6.12/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-6-13-stable.md b/doc/blog/release/version-0-6-13-stable.md
new file mode 100644 (file)
index 0000000..2561c1d
--- /dev/null
@@ -0,0 +1,50 @@
+version: 0.6.13
+title: Version 0.6.13 (stable)
+author: Isaac Schlueter
+date: Thu Mar 15 2012 10:37:02 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-6-13-stable
+
+<p>2012.03.15 Version 0.6.13 (stable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>Windows: Many libuv test fixes (Bert Belder)</p>\r
+</li>\r
+<li><p>Windows: avoid uv_guess_handle crash in when fd &lt; 0 (Bert Belder)</p>\r
+</li>\r
+<li><p>Map EBUSY and ENOTEMPTY errors (Bert Belder)</p>\r
+</li>\r
+<li><p>Windows: include syscall in fs errors (Bert Belder)</p>\r
+</li>\r
+<li><p>Fix fs.watch ENOSYS on Linux kernel version mismatch (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>Update npm to 1.1.9</p>\r
+<p>\r
+- upgrade node-gyp to 0.3.5 (Nathan Rajlich)<br>\r
+- Fix isaacs/npm#2249 Add cache-max and cache-min configs<br>\r
+- Properly redirect across https/http registry requests<br>\r
+- log config usage if undefined key in set function (Kris Windham)<br>\r
+- Add support for os/cpu fields in package.json (Adam Blackburn)<br>\r
+- Automatically node-gyp packages containing a binding.gyp<br>\r
+- Fix failures unpacking in UNC shares<br>\r
+- Never create un-listable directories<br>\r
+- Handle cases where an optionalDependency fails to build\r
+</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.6.13/node-v0.6.13.tar.gz">http://nodejs.org/dist/v0.6.13/node-v0.6.13.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.13/node-v0.6.13.msi">http://nodejs.org/dist/v0.6.13/node-v0.6.13.msi</a>\r
+\r
+</p>\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.6.13/node-v0.6.13.pkg">http://nodejs.org/dist/v0.6.13/node-v0.6.13.pkg</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.13/">http://nodejs.org/docs/v0.6.13/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.13/api/">http://nodejs.org/docs/v0.6.13/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-6-14-stable.md b/doc/blog/release/version-0-6-14-stable.md
new file mode 100644 (file)
index 0000000..ba51834
--- /dev/null
@@ -0,0 +1,55 @@
+version: 0.6.14
+title: Version 0.6.14 (stable)
+author: Isaac Schlueter
+date: Fri Mar 23 2012 11:22:22 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-6-14-stable
+
+<p>2012.03.22 Version 0.6.14 (stable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>net: don&apos;t crash when queued write fails (Igor Zinkovsky)</p>\r
+</li>\r
+<li><p>sunos: fix EMFILE on process.memoryUsage() (Bryan Cantrill)</p>\r
+</li>\r
+<li><p>crypto: fix compile-time error with openssl 0.9.7e (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>unix: ignore ECONNABORTED errors from accept() (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>Add UV_ENOSPC and mappings to it (Bert Belder)</p>\r
+</li>\r
+<li><p>http-parser: Fix response body is not read (koichik)</p>\r
+</li>\r
+<li><p>Upgrade npm to 1.1.12</p>\r
+<p>\r
+- upgrade node-gyp to 0.3.7<br>\r
+- work around AV-locked directories on Windows<br>\r
+- Fix isaacs/npm#2293 Don&apos;t try to &apos;uninstall&apos; /<br>\r
+- Exclude symbolic links from packages.<br>\r
+- Fix isaacs/npm#2275 Spurious &apos;unresolvable cycle&apos; error.<br>\r
+- Exclude/include dot files as if they were normal files\r
+</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.6.14/node-v0.6.14.tar.gz">http://nodejs.org/dist/v0.6.14/node-v0.6.14.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.14/node-v0.6.14.msi">http://nodejs.org/dist/v0.6.14/node-v0.6.14.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.6.14/x64/">http://nodejs.org/dist/v0.6.14/x64/</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.6.14/node-v0.6.14.pkg">http://nodejs.org/dist/v0.6.14/node-v0.6.14.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.6.14/">http://nodejs.org/dist/v0.6.14/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.14/">http://nodejs.org/docs/v0.6.14/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.14/api/">http://nodejs.org/docs/v0.6.14/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-6-15-stable.md b/doc/blog/release/version-0-6-15-stable.md
new file mode 100644 (file)
index 0000000..e6f0502
--- /dev/null
@@ -0,0 +1,53 @@
+version: 0.6.15
+title: Version 0.6.15 (stable)
+author: Isaac Schlueter
+date: Mon Apr 09 2012 10:39:18 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-6-15-stable
+
+<p>2012.04.09 Version 0.6.15 (stable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>Update npm to 1.1.16</p>\r
+</li>\r
+<li><p>Show licenses in binary installers.</p>\r
+</li>\r
+<li><p>unix: add uv_fs_read64, uv_fs_write64 and uv_fs_ftruncate64 (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>add 64bit offset fs functions (Igor Zinkovsky)</p>\r
+</li>\r
+<li><p>windows: don&apos;t report ENOTSOCK when attempting to bind an udp handle twice (Bert Belder)</p>\r
+</li>\r
+<li><p>windows: backport pipe-connect-to-file fixes from master (Bert Belder)</p>\r
+</li>\r
+<li><p>windows: never call fs event callbacks after closing the watcher (Bert Belder)</p>\r
+</li>\r
+<li><p>fs.readFile: don&apos;t make the callback before the fd is closed (Bert Belder)</p>\r
+</li>\r
+<li><p>windows: use 64bit offsets for uv_fs apis (Igor Zinkovsky)</p>\r
+</li>\r
+<li><p>Fix #2061: segmentation fault on OS X due to stat size mismatch (Ben Noordhuis)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.6.15/node-v0.6.15.tar.gz">http://nodejs.org/dist/v0.6.15/node-v0.6.15.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.15/node-v0.6.15.msi">http://nodejs.org/dist/v0.6.15/node-v0.6.15.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.6.15/x64/">http://nodejs.org/dist/v0.6.15/x64/</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.6.15/node-v0.6.15.pkg">http://nodejs.org/dist/v0.6.15/node-v0.6.15.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.6.15/">http://nodejs.org/dist/v0.6.15/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.15/">http://nodejs.org/docs/v0.6.15/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.15/api/">http://nodejs.org/docs/v0.6.15/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-6-16-stable.md b/doc/blog/release/version-0-6-16-stable.md
new file mode 100644 (file)
index 0000000..69f8b31
--- /dev/null
@@ -0,0 +1,59 @@
+version: 0.6.16
+title: Version 0.6.16 (stable)
+author: Isaac Schlueter
+date: Mon Apr 30 2012 11:13:50 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-6-16-stable
+
+<p>2012.04.30 Version 0.6.16 (stable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>Upgrade V8 to 3.6.6.25</p>\r
+</li>\r
+<li><p>Upgrade npm to 1.1.18</p>\r
+</li>\r
+<li><p>Windows: add mappings for UV_ENOENT (Bert Belder)</p>\r
+</li>\r
+<li><p>linux: add IN_MOVE_SELF to inotify event mask (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>unix: call pipe handle connection cb on accept() error (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>unix: handle EWOULDBLOCK (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>map EWOULDBLOCK to UV_EAGAIN (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>Map ENOMEM to UV_ENOMEM (isaacs)</p>\r
+</li>\r
+<li><p>Child process: support the <code>gid</code> and <code>uid</code> options (Bert Belder)</p>\r
+</li>\r
+<li><p>test: cluster: add worker death event test (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>typo in node_http_parser (isaacs)</p>\r
+</li>\r
+<li><p>http_parser: Eat CRLF between requests, even on connection:close. (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>don&apos;t check return value of unsetenv (Ben Noordhuis)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.6.16/node-v0.6.16.tar.gz">http://nodejs.org/dist/v0.6.16/node-v0.6.16.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.16/node-v0.6.16.msi">http://nodejs.org/dist/v0.6.16/node-v0.6.16.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.6.16/x64/">http://nodejs.org/dist/v0.6.16/x64/</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.6.16/node-v0.6.16.pkg">http://nodejs.org/dist/v0.6.16/node-v0.6.16.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.6.16/">http://nodejs.org/dist/v0.6.16/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.16/">http://nodejs.org/docs/v0.6.16/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.16/api/">http://nodejs.org/docs/v0.6.16/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-6-17-stable.md b/doc/blog/release/version-0-6-17-stable.md
new file mode 100644 (file)
index 0000000..3512e1d
--- /dev/null
@@ -0,0 +1,47 @@
+version: 0.6.17
+title: Version 0.6.17 (stable)
+author: Isaac Schlueter
+date: Fri May 04 2012 13:33:12 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-6-17-stable
+
+<p>2012.05.04 Version 0.6.17 (stable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>Upgrade npm to 1.1.21</p>\r
+</li>\r
+<li><p>uv: Add support for EROFS errors (Ben Noordhuis, Maciej Małecki)</p>\r
+</li>\r
+<li><p>uv: Add support for EIO and ENOSPC errors (Fedor Indutny)</p>\r
+</li>\r
+<li><p>windows: Add support for EXDEV errors (Bert Belder)</p>\r
+</li>\r
+<li><p>http: Fix client memory leaks (isaacs, Vincent Voyer)</p>\r
+</li>\r
+<li><p>fs: fix file descriptor leak in sync functions (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>fs: fix ReadStream / WriteStream double close bug (Ben Noordhuis)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.6.17/node-v0.6.17.tar.gz">http://nodejs.org/dist/v0.6.17/node-v0.6.17.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.17/node-v0.6.17.msi">http://nodejs.org/dist/v0.6.17/node-v0.6.17.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.6.17/x64/">http://nodejs.org/dist/v0.6.17/x64/</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.6.17/node-v0.6.17.pkg">http://nodejs.org/dist/v0.6.17/node-v0.6.17.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.6.17/">http://nodejs.org/dist/v0.6.17/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.17/">http://nodejs.org/docs/v0.6.17/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.17/api/">http://nodejs.org/docs/v0.6.17/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-6-18-stable.md b/doc/blog/release/version-0-6-18-stable.md
new file mode 100644 (file)
index 0000000..0cf179b
--- /dev/null
@@ -0,0 +1,59 @@
+version: 0.6.18
+title: Version 0.6.18 (stable)
+author: Isaac Schlueter
+date: Tue May 15 2012 10:06:13 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-6-18-stable
+
+<p>2012.05.15 Version 0.6.18 (stable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>windows: skip GetFileAttributes call when opening a file (Bert Belder)</p>\r
+</li>\r
+<li><p>crypto: add PKCS12/PFX support (Sambasiva Suda)</p>\r
+</li>\r
+<li><p>#3240: child_process: delete NODE_CHANNEL_FD from env in spawn (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>windows: add test for path.normalize with UNC paths (Bert Belder)</p>\r
+</li>\r
+<li><p>windows: make path.normalize convert all slashes to backslashes (Bert Belder)</p>\r
+</li>\r
+<li><p>fs: Automatically close FSWatcher on error (Bert Belder)</p>\r
+</li>\r
+<li><p>#3258: fs.ReadStream.pause() emits duplicate data event (koichik)</p>\r
+</li>\r
+<li><p>pipe_wrap: don&apos;t assert() on pipe accept errors (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>Better exception output for module load and process.nextTick (Felix Geisendörfer)</p>\r
+</li>\r
+<li><p>zlib: fix error reporting (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>http: Don&apos;t destroy on timeout (isaacs)</p>\r
+</li>\r
+<li><p>#3231: http: Don&apos;t try to emit error on a null&apos;ed req object (isaacs)</p>\r
+</li>\r
+<li><p>#3236: http: Refactor ClientRequest.onSocket (isaacs)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.6.18/node-v0.6.18.tar.gz">http://nodejs.org/dist/v0.6.18/node-v0.6.18.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.6.18/node-v0.6.18.msi">http://nodejs.org/dist/v0.6.18/node-v0.6.18.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.6.18/x64/">http://nodejs.org/dist/v0.6.18/x64/</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.6.18/node-v0.6.18.pkg">http://nodejs.org/dist/v0.6.18/node-v0.6.18.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.6.18/">http://nodejs.org/dist/v0.6.18/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.6.18/">http://nodejs.org/docs/v0.6.18/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.6.18/api/">http://nodejs.org/docs/v0.6.18/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-7-10-unstable.md b/doc/blog/release/version-0-7-10-unstable.md
new file mode 100644 (file)
index 0000000..3e14911
--- /dev/null
@@ -0,0 +1,86 @@
+version: 0.7.10
+title: Version 0.7.10 (unstable)
+author: Isaac Schlueter
+date: Mon Jun 11 2012 09:00:25 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-7-10-unstable
+
+<p>2012.06.11, Version 0.7.10 (unstable)\r
+\r
+</p>\r
+<p>This is the second-to-last release on the 0.7 branch.  Version 0.8.0\r
+will be released some time next week.  As other even-numbered Node\r
+releases before it, the v0.8.x releases will maintain API and binary\r
+compatibility.\r
+\r
+</p>\r
+<p>The major changes are detailed in\r
+<a href="https://github.com/joyent/node/wiki/API-changes-between-v0.6-and-v0.8">https://github.com/joyent/node/wiki/API-changes-between-v0.6-and-v0.8</a>\r
+\r
+</p>\r
+<p>Please try out this release.  There will be very few changes between\r
+this and the v0.8.x release family.  This is the last chance to comment\r
+on the API before it is locked down for stability.\r
+\r
+\r
+</p>\r
+<ul>\r
+<li><p>Roll V8 back to 3.9.24.31</p>\r
+</li>\r
+<li><p>build: x64 target should always pass -m64 (Robert Mustacchi)</p>\r
+</li>\r
+<li><p>add NODE_EXTERN to node::Start (Joel Brandt)</p>\r
+</li>\r
+<li><p>repl: Warn about running npm commands (isaacs)</p>\r
+</li>\r
+<li><p>slab_allocator: fix crash in dtor if V8 is dead (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>slab_allocator: fix leak of Persistent handles (Shigeki Ohtsu)</p>\r
+</li>\r
+<li><p>windows/msi: add node.js prompt to startmenu (Jeroen Janssen)</p>\r
+</li>\r
+<li><p>windows/msi: fix adding node to PATH (Jeroen Janssen)</p>\r
+</li>\r
+<li><p>windows/msi: add start menu links when installing (Jeroen Janssen)</p>\r
+</li>\r
+<li><p>windows: don&apos;t install x64 version into the &apos;program files (x86)&apos; folder (Matt Gollob)</p>\r
+</li>\r
+<li><p>domain: Fix #3379 domain.intercept no longer passes error arg to cb (Marc Harter)</p>\r
+</li>\r
+<li><p>fs: make callbacks run in global context (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>fs: enable fs.realpath on windows (isaacs)</p>\r
+</li>\r
+<li><p>child_process: expose UV_PROCESS_DETACHED as options.detached (Charlie McConnell)</p>\r
+</li>\r
+<li><p>child_process: new stdio API for .spawn() method (Fedor Indutny)</p>\r
+</li>\r
+<li><p>child_process: spawn().ref() and spawn().unref() (Fedor Indutny)</p>\r
+</li>\r
+<li><p>Upgrade npm to 1.1.25</p>\r
+</li>\r
+<ul><li>Enable npm link on windows</li>\r
+<li>Properly remove sh-shim on Windows</li>\r
+<li>Abstract out registry client and logger</li></ul>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.7.10/node-v0.7.10.tar.gz">http://nodejs.org/dist/v0.7.10/node-v0.7.10.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.10/node-v0.7.10.msi">http://nodejs.org/dist/v0.7.10/node-v0.7.10.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.7.10/x64/">http://nodejs.org/dist/v0.7.10/x64/</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.7.10/node-v0.7.10.pkg">http://nodejs.org/dist/v0.7.10/node-v0.7.10.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.7.10/">http://nodejs.org/dist/v0.7.10/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.7.10/">http://nodejs.org/docs/v0.7.10/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.7.10/api/">http://nodejs.org/docs/v0.7.10/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-7-11-unstable.md b/doc/blog/release/version-0-7-11-unstable.md
new file mode 100644 (file)
index 0000000..e8fd71a
--- /dev/null
@@ -0,0 +1,80 @@
+version: 0.7.11
+title: Version 0.7.11 (unstable)
+author: Isaac Schlueter
+date: Fri Jun 15 2012 12:45:20 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-7-11-unstable
+
+<p>This is the most stable 0.7 release yet.  Please try it out.\r
+\r
+</p>\r
+<p>Version 0.8 will be out very soon.  You can follow the remaining issues\r
+on the github issue tracker.\r
+\r
+</p>\r
+<p><a href="https://github.com/joyent/node/issues?milestone=10&amp;state=open">https://github.com/joyent/node/issues?milestone=10&amp;state=open</a>\r
+\r
+</p>\r
+<p>2012.06.15, Version 0.7.11 (unstable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>V8: Upgrade to v3.11.10</p>\r
+</li>\r
+<li><p>npm: Upgrade to 1.1.26</p>\r
+</li>\r
+<li><p>doc: Improve cross-linking in API docs markdown (Ben Kelly)</p>\r
+</li>\r
+<li><p>Fix #3425: removeAllListeners should delete array (Reid Burke)</p>\r
+</li>\r
+<li><p>cluster: don&apos;t silently drop messages when the write queue gets big (Bert Belder)</p>\r
+</li>\r
+<li><p>Add Buffer.concat method (isaacs)</p>\r
+</li>\r
+<li><p>windows: make symlinks tolerant to forward slashes (Bert Belder)</p>\r
+</li>\r
+<li><p>build: Add node.d and node.1 to installer (isaacs)</p>\r
+</li>\r
+<li><p>cluster: rename worker.unqiueID to worker.id (Andreas Madsen)</p>\r
+</li>\r
+<li><p>Windows: Enable ETW events on Windows for existing DTrace probes. (Igor Zinkovsky)</p>\r
+</li>\r
+<li><p>test: bundle node-weak in test/gc so that it doesn&apos;t need to be downloaded (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>Make many tests pass on Windows (Bert Belder)</p>\r
+</li>\r
+<li><p>Fix #3388 Support listening on file descriptors (isaacs)</p>\r
+</li>\r
+<li><p>Fix #3407 Add os.tmpDir() (isaacs)</p>\r
+</li>\r
+<li><p>Unbreak the snapshotted build on Windows (Bert Belder)</p>\r
+</li>\r
+<li><p>Clean up child_process.kill throws (Bert Belder)</p>\r
+</li>\r
+<li><p>crypto: make cipher/decipher accept buffer args (Ben Noordhuis)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.7.11/node-v0.7.11.tar.gz">http://nodejs.org/dist/v0.7.11/node-v0.7.11.tar.gz</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.7.11/node-v0.7.11.pkg">http://nodejs.org/dist/v0.7.11/node-v0.7.11.pkg</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.11/node-v0.7.11-x86.msi">http://nodejs.org/dist/v0.7.11/node-v0.7.11-x86.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Installer: <a href="http://nodejs.org/dist/v0.7.11/node-v0.7.11-x64.msi">http://nodejs.org/dist/v0.7.11/node-v0.7.11-x64.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.7.11/x64/">http://nodejs.org/dist/v0.7.11/x64/</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.7.11/">http://nodejs.org/dist/v0.7.11/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.7.11/">http://nodejs.org/docs/v0.7.11/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.7.11/api/">http://nodejs.org/docs/v0.7.11/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-7-12.md b/doc/blog/release/version-0-7-12.md
new file mode 100644 (file)
index 0000000..91e571d
--- /dev/null
@@ -0,0 +1,56 @@
+version: 0.7.12
+title: Version 0.7.12
+author: Isaac Schlueter
+date: Tue Jun 19 2012 16:31:09 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-7-12
+
+<p>2012.06.19, Version 0.7.12 (unstable)  </p>\r
+<p>This is the last release on the 0.7 branch.  Version 0.8.0 will be released some time later this week, barring any major problems.  </p>\r
+<p>As with other even-numbered Node releases before it, the v0.8.x releases will maintain API and binary compatibility.  </p>\r
+<p>The major changes between v0.6 and v0.8 are detailed in <a href="https://github.com/joyent/node/wiki/API-changes-between-v0.6-and-v0.8">https://github.com/joyent/node/wiki/API-changes-between-v0.6-and-v0.8</a>  </p>\r
+<p>Please try out this release.  There will be very virtually no changes between this and the v0.8.x release family.  This is the last chance to comment before it is locked down for stability.  The API is effectively frozen now.  </p>\r
+<p>This version adds backwards-compatible shims for binary addons that use libeio and libev directly.  If you find that binary modules that could compile on v0.6 can not compile on this version, please let us know. Note that libev is officially deprecated in v0.8, and will be removed in v0.9.  You should be porting your modules to use libuv as soon as possible.  </p>\r
+<p>V8 is on 3.11.10 currently, and will remain on the V8 3.11.x branch for the duration of Node v0.8.x.   </p>\r
+<ul>   <li><p>npm: Upgrade to 1.1.30<br> - Improved &apos;npm init&apos;<br> - Fix the &apos;cb never called&apos; error from &apos;oudated&apos; and &apos;update&apos;<br> - Add --save-bundle|-B config<br> - Fix isaacs/npm#2465: Make npm script and windows shims cygwin-aware<br> - Fix isaacs/npm#2452 Use --save(-dev|-optional) in npm rm<br> - <code>logstream</code> option to replace removed <code>logfd</code> (Rod Vagg)<br> - Read default descriptions from README.md files </p>\r
+  </li> <li><p>Shims to support deprecated <code>ev_*</code> and <code>eio_*</code> methods (Ben Noordhuis)</p>\r
+  </li> <li><p>#3118 net.Socket: Delay pause/resume until after connect (isaacs)</p>\r
+  </li> <li><p>#3465 Add ./configure --no-ifaddrs flag (isaacs)</p>\r
+  </li> <li><p>child_process: add .stdin stream to forks (Fedor Indutny)</p>\r
+  </li> <li><p>build: fix <code>make install DESTDIR=/path</code> (Ben Noordhuis)</p>\r
+  </li> <li><p>tls: fix off-by-one error in renegotiation check (Ben Noordhuis)</p>\r
+  </li> <li><p>crypto: Fix diffie-hellman key generation UTF-8 errors (Fedor Indutny)</p>\r
+  </li> <li><p>node: change the constructor name of process from EventEmitter to process (Andreas Madsen)</p>\r
+  </li> <li><p>net: Prevent property access throws during close (Reid Burke)</p>\r
+  </li> <li><p>querystring: improved speed and code cleanup (Felix Böhm)</p>\r
+  </li> <li><p>sunos: fix assertion errors breaking fs.watch() (Fedor Indutny)</p>\r
+  </li> <li><p>unix: stat: detect sub-second changes (Ben Noordhuis)</p>\r
+  </li> <li><p>add stat() based file watcher (Ben Noordhuis)</p>\r
+  </li> </ul> <p>Source Code: <a href="http://nodejs.org/dist/v0.7.12/node-v0.7.12.tar.gz">http://nodejs.org/dist/v0.7.12/node-v0.7.12.tar.gz</a>  </p>\r
+  <p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.7.12/node-v0.7.12.pkg">http://nodejs.org/dist/v0.7.12/node-v0.7.12.pkg</a>  </p>\r
+  <p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.12/node-v0.7.12-x86.msi">http://nodejs.org/dist/v0.7.12/node-v0.7.12-x86.msi</a>  </p>\r
+  <p>Windows x64 Installer: <a href="http://nodejs.org/dist/v0.7.12/x64/node-v0.7.12-x64.msi">http://nodejs.org/dist/v0.7.12/x64/node-v0.7.12-x64.msi</a>  </p>\r
+  <p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.7.12/x64/">http://nodejs.org/dist/v0.7.12/x64/</a>  </p>\r
+  <p>Other release files: <a href="http://nodejs.org/dist/v0.7.12/">http://nodejs.org/dist/v0.7.12/</a>  </p>\r
+  <p>Website: <a href="http://nodejs.org/docs/v0.7.12/">http://nodejs.org/docs/v0.7.12/</a>  </p>\r
+  <p>Documentation: <a href="http://nodejs.org/docs/v0.7.12/api/">http://nodejs.org/docs/v0.7.12/api/</a> </p>\r
+\r
+<h2>Shasums</h2>\r
+\r
+<pre>ded6a2197b1149b594eb45fea921e8538ba442aa  blog.html\r
+dfabff0923d4b4f1d53bd9831514c1ac8c4b1876  email.md\r
+be313d35511e6d7e43cae5fa2b18f3e0d2275ba1  node-v0.7.12-x86.msi\r
+8f7ba0c8283e3863de32fd5c034f5b599c78f830  node-v0.7.12.pkg\r
+cb570abacbf4eb7e23c3d2620d00dd3080d9c19d  node-v0.7.12.tar.gz\r
+e13a6edfcba1c67ffe794982dd20a222ce8ce40f  node.exe\r
+20906ad76a43eca52795b2a089654a105e11c1e6  node.exp\r
+acbcbb87b6f7f2af34a3ed0abe6131d9e7a237af  node.lib\r
+4013d5b25fe36ae4245433b972818686cd9a2205  node.pdb\r
+6c0a7a2e8ee360e2800156293fb2f6a5c1a57382  npm-1.1.30.tgz\r
+9d23e42e8260fa20001d5618d2583a62792bf63f  npm-1.1.30.zip\r
+840157b2d6f7389ba70b07fc9ddc048b92c501cc  x64/node-v0.7.12-x64.msi\r
+862d42706c21ea83bf73cd827101f0fe598b0cf7  x64/node.exe\r
+de0af95fac083762f99c875f91bab830dc030f71  x64/node.exp\r
+3122bd886dfb96f3b41846cef0bdd7e97326044a  x64/node.lib\r
+e0fa4e42cd19cadf8179e492ca606b7232bbc018  x64/node.pdb</pre>
diff --git a/doc/blog/release/version-0-7-4-unstable.md b/doc/blog/release/version-0-7-4-unstable.md
new file mode 100644 (file)
index 0000000..01bc92a
--- /dev/null
@@ -0,0 +1,50 @@
+version: 0.7.4
+title: Node v0.7.4 (unstable)
+author: Isaac Schlueter
+date: Wed Feb 15 2012 11:38:35 GMT-0800 (PST)
+status: publish
+category: release
+slug: version-0-7-4-unstable
+
+<p>2012.02.14, Version 0.7.4 (unstable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>Upgrade V8 to 3.9.5</p>\r
+</li>\r
+<li><p>Upgrade npm to 1.1.1</p>\r
+</li>\r
+<li><p>build: Detect host_arch better (Karl Skomski)</p>\r
+</li>\r
+<li><p>debugger: export <code>debug_port</code> to <code>process</code> (Fedor Indutny)</p>\r
+</li>\r
+<li><p>api docs: CSS bug fixes (isaacs)</p>\r
+</li>\r
+<li><p>build: use -fPIC for native addons on UNIX (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>Re-add top-level v8::Locker (Marcel Laverdet)</p>\r
+</li>\r
+<li><p>Move images out of the dist tarballs (isaacs)</p>\r
+</li>\r
+<li><p>libuv: Remove uv_export and uv_import (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>build: Support x64 build on Windows (Igor Zinkovsky)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.7.4/node-v0.7.4.tar.gz">http://nodejs.org/dist/v0.7.4/node-v0.7.4.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.4/node-v0.7.4.msi">http://nodejs.org/dist/v0.7.4/node-v0.7.4.msi</a>\r
+\r
+</p>\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.7.4/node-v0.7.4.pkg">http://nodejs.org/dist/v0.7.4/node-v0.7.4.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.7.4/">http://nodejs.org/dist/v0.7.4/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.7.4/">http://nodejs.org/docs/v0.7.4/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.7.4/api/">http://nodejs.org/docs/v0.7.4/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-7-5-unstable.md b/doc/blog/release/version-0-7-5-unstable.md
new file mode 100644 (file)
index 0000000..bc1e604
--- /dev/null
@@ -0,0 +1,62 @@
+version: 0.7.5
+title: Version 0.7.5 (unstable)
+author: Isaac Schlueter
+date: Thu Feb 23 2012 14:45:21 GMT-0800 (PST)
+status: publish
+category: release
+slug: version-0-7-5-unstable
+
+<p>2012.02.23, Version 0.7.5 (unstable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>startup speed improvements (Maciej Małecki)</p>\r
+</li>\r
+<li><p>crypto: add function getDiffieHellman() (Tomasz Buchert)</p>\r
+</li>\r
+<li><p>buffer: support decoding of URL-safe base64 (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>Make QueryString.parse() even faster (Brian White)</p>\r
+</li>\r
+<li><p>url: decode url entities in auth section (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>http: support PURGE request method (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>http: Generate Date headers on responses (Mark Nottingham)</p>\r
+</li>\r
+<li><p>Fix #2762: Add callback to close function. (Mikeal Rogers)</p>\r
+</li>\r
+<li><p>dgram: fix out-of-bound memory read (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>repl: add automatic loading of built-in libs (Brandon Benvie)</p>\r
+</li>\r
+<li><p>repl: remove double calls where possible (Fedor Indutny)</p>\r
+</li>\r
+<li><p>Readline improvements. Related: #2737 #2756 (Colton Baker)</p>\r
+</li>\r
+<li><p>build: disable -fomit-frame-pointer on solaris (Dave Pacheco)</p>\r
+</li>\r
+<li><p>build: arch detection improvements (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>build: Make a fat binary for the OS X <code>make pkg</code>. (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>jslint src/ and lib/ on &apos;make test&apos; (isaacs)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.7.5/node-v0.7.5.tar.gz">http://nodejs.org/dist/v0.7.5/node-v0.7.5.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.5/node-v0.7.5.msi">http://nodejs.org/dist/v0.7.5/node-v0.7.5.msi</a>\r
+\r
+</p>\r
+<p>Macintosh Installer: <a href="http://nodejs.org/dist/v0.7.5/node-v0.7.5.pkg">http://nodejs.org/dist/v0.7.5/node-v0.7.5.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.7.5/">http://nodejs.org/dist/v0.7.5/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.7.5/">http://nodejs.org/docs/v0.7.5/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.7.5/api/">http://nodejs.org/docs/v0.7.5/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-7-6-unstable.md b/doc/blog/release/version-0-7-6-unstable.md
new file mode 100644 (file)
index 0000000..ecf67f3
--- /dev/null
@@ -0,0 +1,72 @@
+version: 0.7.6
+title: Version 0.7.6 (unstable)
+author: Isaac Schlueter
+date: Tue Mar 13 2012 14:12:30 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-7-6-unstable
+
+<p>2012.03.13, Version 0.7.6 (unstable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>Upgrade v8 to 3.9.17</p>\r
+</li>\r
+<li><p>Upgrade npm to 1.1.8</p>\r
+<p>\r
+- Add support for os/cpu fields in package.json (Adam Blackburn)<br>\r
+- Automatically node-gyp packages containing a binding.gyp<br>\r
+- Fix failures unpacking in UNC shares<br>\r
+- Never create un-listable directories<br>\r
+- Handle cases where an optionalDependency fails to build<br>\r
+</p>\r
+</li>\r
+<li><p>events: newListener emit correct fn when using &apos;once&apos; (Roly Fentanes)</p>\r
+</li>\r
+<li><p>url: Ignore empty port component (Łukasz Walukiewicz)</p>\r
+</li>\r
+<li><p>module: replace &apos;children&apos; array (isaacs)</p>\r
+</li>\r
+<li><p>tls: parse multiple values of a key in ssl certificate (Sambasiva Suda)</p>\r
+</li>\r
+<li><p>cluster: support passing of named pipes (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>Windows: include syscall in fs errors (Bert Belder)</p>\r
+</li>\r
+<li><p>http: #2888 Emit end event only once (Igor Zinkovsky)</p>\r
+</li>\r
+<li><p>readline: add multiline support (Rlidwka)</p>\r
+</li>\r
+<li><p>process: add <code>process.hrtime()</code> (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>net, http, https: add localAddress option (Dmitry Nizovtsev)</p>\r
+</li>\r
+<li><p>addon improvements (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>build improvements (Ben Noordhuis, Sadique Ali, T.C. Hollingsworth, Nathan Rajlich)</p>\r
+</li>\r
+<li><p>add support for &quot;SEARCH&quot; request methods (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>expose the zlib and http_parser version in process.versions (Nathan Rajlich)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.7.6/node-v0.7.6.tar.gz">http://nodejs.org/dist/v0.7.6/node-v0.7.6.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.6/node-v0.7.6.msi">http://nodejs.org/dist/v0.7.6/node-v0.7.6.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.7.6/x64/">http://nodejs.org/dist/v0.7.6/x64/</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.7.6/node-v0.7.6.pkg">http://nodejs.org/dist/v0.7.6/node-v0.7.6.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.7.6/">http://nodejs.org/dist/v0.7.6/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.7.6/">http://nodejs.org/docs/v0.7.6/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.7.6/api/">http://nodejs.org/docs/v0.7.6/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-7-7-unstable.md b/doc/blog/release/version-0-7-7-unstable.md
new file mode 100644 (file)
index 0000000..6cdcc23
--- /dev/null
@@ -0,0 +1,71 @@
+version: 0.7.7
+title: Version 0.7.7 (unstable)
+author: Isaac Schlueter
+date: Fri Mar 30 2012 11:56:19 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-7-7-unstable
+
+<p>2012.03.30, Version 0.7.7 (unstable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>Upgrade V8 to 3.9.24.7</p>\r
+</li>\r
+<li><p>Upgrade npm to 1.1.15</p>\r
+</li>\r
+<li><p>Handle Emoji characters properly (Erik Corry, Bert Belder)</p>\r
+</li>\r
+<li><p>readline: migrate ansi/vt100 logic from tty to readline (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>readline: Fix multiline handling (Alex Kocharin)</p>\r
+</li>\r
+<li><p>add a -i/--interactive flag to force the REPL (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>debugger: add breakOnException command (Fedor Indutny)</p>\r
+</li>\r
+<li><p>cluster: kill workers when master dies (Andreas Madsen)</p>\r
+</li>\r
+<li><p>cluster: add graceful disconnect support (Andreas Madsen)</p>\r
+</li>\r
+<li><p>child_process: Separate &apos;close&apos; event from &apos;exit&apos; (Charlie McConnell)</p>\r
+</li>\r
+<li><p>typed arrays: add Uint8ClampedArray (Mikael Bourges-Sevenier)</p>\r
+</li>\r
+<li><p>buffer: Fix byte alignment issues (Ben Noordhuis, Erik Lundin)</p>\r
+</li>\r
+<li><p>tls: fix CryptoStream.setKeepAlive() (Shigeki Ohtsu)</p>\r
+</li>\r
+<li><p>Expose http parse error codes (Felix Geisendörfer)</p>\r
+</li>\r
+<li><p>events: don&apos;t delete the listeners array (Ben Noordhuis, Nathan Rajlich)</p>\r
+</li>\r
+<li><p>process: add process.config to view node&apos;s ./configure settings (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>process: process.execArgv to see node&apos;s arguments (Micheil Smith)</p>\r
+</li>\r
+<li><p>process: fix process.title setter (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>timers: handle negative or non-numeric timeout values (Ben Noordhuis)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.7.7/node-v0.7.7.tar.gz">http://nodejs.org/dist/v0.7.7/node-v0.7.7.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.7/node-v0.7.7.msi">http://nodejs.org/dist/v0.7.7/node-v0.7.7.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.7.7/x64/">http://nodejs.org/dist/v0.7.7/x64/</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.7.7/node-v0.7.7.pkg">http://nodejs.org/dist/v0.7.7/node-v0.7.7.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.7.7/">http://nodejs.org/dist/v0.7.7/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.7.7/">http://nodejs.org/docs/v0.7.7/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.7.7/api/">http://nodejs.org/docs/v0.7.7/api/</a>\r
+</p>
diff --git a/doc/blog/release/version-0-7-8-unstable.md b/doc/blog/release/version-0-7-8-unstable.md
new file mode 100644 (file)
index 0000000..8e87a90
--- /dev/null
@@ -0,0 +1,71 @@
+version: 0.7.8
+title: Version 0.7.8 (unstable)
+author: Isaac Schlueter
+date: Wed Apr 18 2012 10:39:02 GMT-0700 (PDT)
+status: publish
+category: release
+slug: version-0-7-8-unstable
+
+<p>2012.04.18, Version 0.7.8, (unstable)\r
+\r
+</p>\r
+<ul>\r
+<li><p>Upgrade V8 to 3.9.24.9</p>\r
+</li>\r
+<li><p>Upgrade OpenSSL to 1.0.0f</p>\r
+</li>\r
+<li><p>Upgrade npm to 1.1.18</p>\r
+</li>\r
+<li><p>Show licenses in Binary installers</p>\r
+</li>\r
+<li><p>Domains (isaacs)</p>\r
+</li>\r
+<li><p>readline: rename &quot;end&quot; to &quot;close&quot; (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>tcp: make getsockname() return address family as string (Shigeki Ohtsu)</p>\r
+</li>\r
+<li><p>http, https: fix .setTimeout() (ssuda)</p>\r
+</li>\r
+<li><p>os: add cross platform EOL character (Mustansir Golawala)</p>\r
+</li>\r
+<li><p>typed arrays: unexport SizeOfArrayElementForType() (Aaron Jacobs)</p>\r
+</li>\r
+<li><p>net: honor &apos;enable&apos; flag in .setNoDelay() (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>child_process: emit error when .kill fails (Andreas Madsen)</p>\r
+</li>\r
+<li><p>gyp: fix &apos;argument list too long&apos; build error (Ben Noordhuis)</p>\r
+</li>\r
+<li><p>fs.WriteStream: Handle modifications to fs.open (isaacs)</p>\r
+</li>\r
+<li><p>repl, readline: Handle newlines better (Nathan Rajlich, Nathan Friedly)</p>\r
+</li>\r
+<li><p>build: target OSX 10.5 when building on darwin (Nathan Rajlich)</p>\r
+</li>\r
+<li><p>Fix #3052 Handle errors properly in zlib (isaacs)</p>\r
+</li>\r
+<li><p>build: add support for DTrace and postmortem (Dave Pacheco)</p>\r
+</li>\r
+<li><p>core: add reusable Slab allocator (Ben Noordhuis)</p>\r
+</li>\r
+</ul>\r
+<p>Source Code: <a href="http://nodejs.org/dist/v0.7.8/node-v0.7.8.tar.gz">http://nodejs.org/dist/v0.7.8/node-v0.7.8.tar.gz</a>\r
+\r
+</p>\r
+<p>Windows Installer: <a href="http://nodejs.org/dist/v0.7.8/node-v0.7.8.msi">http://nodejs.org/dist/v0.7.8/node-v0.7.8.msi</a>\r
+\r
+</p>\r
+<p>Windows x64 Files: <a href="http://nodejs.org/dist/v0.7.8/x64/">http://nodejs.org/dist/v0.7.8/x64/</a>\r
+\r
+</p>\r
+<p>Macintosh Installer (Universal): <a href="http://nodejs.org/dist/v0.7.8/node-v0.7.8.pkg">http://nodejs.org/dist/v0.7.8/node-v0.7.8.pkg</a>\r
+\r
+</p>\r
+<p>Other release files: <a href="http://nodejs.org/dist/v0.7.8/">http://nodejs.org/dist/v0.7.8/</a>\r
+\r
+</p>\r
+<p>Website: <a href="http://nodejs.org/docs/v0.7.8/">http://nodejs.org/docs/v0.7.8/</a>\r
+\r
+</p>\r
+<p>Documentation: <a href="http://nodejs.org/docs/v0.7.8/api/">http://nodejs.org/docs/v0.7.8/api/</a>\r
+</p>
index 46fe499..0c26cb7 100644 (file)
@@ -14,6 +14,29 @@ This talk was given at Velocity Conf in 2011.
 src="http://www.youtube.com/embed/F5jCXdTYJYc" frameborder="0"
 allowfullscreen></iframe>\r
 \r
-<div id="__ss_8332407"> <strong><a href="http://www.slideshare.net/bcantrill/instrumenting-the-realtime-web" title="Instrumenting the real-time web" target="_blank">Instrumenting the real-time web</a></strong> <div style="width:425px" id="__ss_8332407"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/bcantrill/instrumenting-the-realtime-web" title="Instrumenting the real-time web" target="_blank">Instrumenting the real-time web</a></strong> <object id="__sse8332407" width="425" height="355"> <param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=velocity-110616190636-phpapp02&stripped_title=instrumenting-the-realtime-web&userName=bcantrill" /> <param name="allowFullScreen" value="true"/> <param name="allowScriptAccess" value="always"/> <param name="wmode" value="transparent"/> <embed name="__sse8332407" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=velocity-110616190636-phpapp02&stripped_title=instrumenting-the-realtime-web&userName=bcantrill" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="transparent" width="425" height="355"></embed> </object> <div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/bcantrill" target="_blank">bcantrill</a> </div> </div>
-</div>\r
+  <div style="width:425px" id="__ss_8332407">
+    <strong style="display:block;margin:12px 0 4px"><a href=
+    "http://www.slideshare.net/bcantrill/instrumenting-the-realtime-web"
+    title="Instrumenting the real-time web" target=
+    "_blank">Instrumenting the real-time web</a></strong>
+    <object id="__sse8332407" width="425" height="355">
+      <param name="movie" value=
+      "http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=velocity-110616190636-phpapp02&amp;stripped_title=instrumenting-the-realtime-web&amp;userName=bcantrill">
+      <param name="allowFullScreen" value="true">
+      <param name="allowScriptAccess" value="always">
+      <param name="wmode" value="transparent">
+      <embed name="__sse8332407" src=
+      "http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=velocity-110616190636-phpapp02&amp;stripped_title=instrumenting-the-realtime-web&amp;userName=bcantrill"
+      type="application/x-shockwave-flash" allowscriptaccess=
+      "always" allowfullscreen="true" wmode="transparent" width=
+      "425" height="355">
+    </object>
+
+    <div style="padding:5px 0 12px">
+      View more <a href="http://www.slideshare.net/" target=
+      "_blank">presentations</a> from <a href=
+      "http://www.slideshare.net/bcantrill" target=
+      "_blank">bcantrill</a>
+    </div>
+  </div>
 </td></td></table>
index e1f08c6..3ac3985 100644 (file)
@@ -5,9 +5,9 @@ status: publish
 category: video
 slug: welcome-to-the-node-blog
 
-Since Livejournal is disintegrating into Russian spam, I'm moving my technical blog to http://blog.nodejs.org/. I hope to do frequent small posts about what's going on in Node development and include posts from other core Node developers. Please subscribe to the RSS feed.\r
-\r
-To avoid making this post completely devoid of content, here is a new video from a talk I gave at the SF PHP group tastefully produced by <A href="http://marakana.com/forums/java/general/278.html">Marakana</a>:\r
+Since Livejournal is disintegrating into Russian spam, I'm moving my technical blog to http://blog.nodejs.org/. I hope to do frequent small posts about what's going on in Node development and include posts from other core Node developers. Please subscribe to the RSS feed.
+
+To avoid making this post completely devoid of content, here is a new video from a talk I gave at the SF PHP group tastefully produced by <A href="http://marakana.com/forums/java/general/278.html">Marakana</a>:
 <iframe width="640" height="360"
 src="http://www.youtube.com/embed/jo_B4LTHi3I" frameborder="0"
 allowfullscreen></iframe>
index 219a08b..22a8c71 100644 (file)
@@ -15,13 +15,13 @@ slug: http-server-security-vulnerability-please-upgrade-to-0-6-17
 \r
 <p>A few weeks ago, Matthew Daley found a security vulnerability in Node&apos;s HTTP implementation, and thankfully did the responsible thing and reported it to us via email.  He explained it quite well, so I'll quote him here:</p>\r
 <blockquote>\r
-<p>There is a vulnerability in node&apos;s http_parser binding which allows information disclosure to a remote attacker:\r
+<p>There is a vulnerability in node&apos;s `http_parser` binding which allows information disclosure to a remote attacker:\r
 \r
 </p>\r
-<p>In node::StringPtr::Update, an attempt is made at an optimization on certain inputs (node_http_parser.cc, line 151). The intent is that if the current string pointer plus the current string size is equal to the incoming string pointer, the current string size is just increased to match, as the incoming string lies just beyond the current string pointer. However, the check to see whether or not this can be done is incorrect; &quot;size&quot; is used whereas &quot;size_&quot; should be used. Therefore, an attacker can call Update with a string of certain length and cause the current string to have other data appended to it. In the case of HTTP being parsed out of incoming socket data, this can be incoming data from other sockets.\r
+<p>In node::StringPtr::Update, an attempt is made at an optimization on certain inputs (`node_http_parser.cc`, line 151). The intent is that if the current string pointer plus the current string size is equal to the incoming string pointer, the current string size is just increased to match, as the incoming string lies just beyond the current string pointer. However, the check to see whether or not this can be done is incorrect; &quot;size&quot; is used whereas &quot;size_&quot; should be used. Therefore, an attacker can call Update with a string of certain length and cause the current string to have other data appended to it. In the case of HTTP being parsed out of incoming socket data, this can be incoming data from other sockets.\r
 \r
 </p>\r
-<p>Normally node::StringPtr::Save, which is called after each execution of http_parser, would stop this from being exploitable as it converts strings to non-optimizable heap-based strings. However, this is not done to 0-length strings. An attacker can therefore exploit the mistake by making Update set a 0-length string, and then Update past its boundary, so long as it is done in one http_parser execution. This can be done with an HTTP header with empty value, followed by a continuation with a value of certain length.\r
+<p>Normally node::StringPtr::Save, which is called after each execution of `http_parser`, would stop this from being exploitable as it converts strings to non-optimizable heap-based strings. However, this is not done to 0-length strings. An attacker can therefore exploit the mistake by making Update set a 0-length string, and then Update past its boundary, so long as it is done in one `http_parser` execution. This can be done with an HTTP header with empty value, followed by a continuation with a value of certain length.\r
 \r
 </p>\r
 <p>The <a href="https://gist.github.com/2628868">attached files</a> demonstrate the issue:  </p>\r
diff --git a/tools/blog/README.md b/tools/blog/README.md
new file mode 100644 (file)
index 0000000..52a3be7
--- /dev/null
@@ -0,0 +1,5 @@
+# node-blog-gen
+
+Generates the node blog from the markdown files in doc/blog/.
+
+
diff --git a/tools/blog/generate.js b/tools/blog/generate.js
new file mode 100644 (file)
index 0000000..952553b
--- /dev/null
@@ -0,0 +1,261 @@
+#!/usr/bin/env node
+var fs = require('fs');
+var marked = require('marked');
+var mkdirp = require('mkdirp');
+var glob = require('glob');
+var ejs = require('ejs');
+var path = require('path');
+var semver = require('semver');
+
+var input = path.resolve(process.argv[2]);
+var output = path.resolve(process.argv[3]);
+var template = path.resolve(process.argv[4]);
+
+var config = {
+  postsPerPage: 5
+};
+
+console.error("argv=%j", process.argv)
+
+fs.readFile(template, 'utf8', function(er, contents) {
+  if (er) throw er;
+  template = ejs.compile(contents, template);
+  readInput();
+});
+
+function readInput() {
+  glob(input + '/**/*.md', function(er, files) {
+    if (er) throw er;
+    readFiles(files);
+  });
+}
+
+function readFiles(files) {
+  var n = files.length;
+  var data = { files: {}, feeds: {}, posts: {}};
+
+  files.forEach(function(file) {
+    fs.readFile(file, 'utf8', next(file));
+  });
+
+  function next(file) { return function(er, contents) {
+    if (er) throw er;
+    if (contents) {
+      contents = parseFile(file, contents);
+      if (contents) {
+        data.files[file] = contents
+      }
+    }
+    if (--n === 0) {
+      buildOutput(data);
+    }
+  }}
+}
+
+function parseFile(file, contents) {
+  var c = contents.split('\n\n');
+  var head = c.shift();
+  c = c.join('\n\n');
+  var post = head.split('\n').reduce(function(set, kv) {
+    kv = kv.split(':');
+    var key = kv.shift().trim();
+    var val = kv.join(':').trim();
+    set[key] = val;
+    return set;
+  }, {});
+  if (post.status && post.status !== 'publish') return null;
+  post.body = c;
+  return post;
+}
+
+function buildPermalinks(data) {
+  Object.keys(data.files).forEach(function(k) {
+    data.posts[k] = buildPermalink(k, data.files[k]);
+  });
+}
+
+function buildPermalink(key, post) {
+  var data = {};
+  data.pageid = post.slug;
+  data.title = post.title;
+  data.content = post.content = marked.parse(post.body);
+
+  // Fix for chjj/marked#56
+  data.content = post.content = data.content
+    .replace(/<a href="([^"]+)&lt;\/a&gt;">\1&lt;\/a&gt;/g, '$1');
+
+  data.post = post;
+
+  var d = post.date = new Date(post.date);
+
+  var y = d.getYear() + 1900;
+  var m = d.getMonth() + 1;
+  if (m < 10) m = '0' + m;
+  var d = d.getDate();
+  if (d < 10) d = '0' + d;
+  var uri = '/' + y + '/' + m + '/' + d + '/' + post.slug + '/';
+  post.data = data;
+  post.uri = uri;
+
+  post.permalink = data.permalink = uri;
+  return data;
+}
+
+function writeFile(uri, data) {
+  data.uri = path.join(data.uri);
+  uri = path.join(uri);
+  var contents = template(data);
+  var outdir = path.join(output, uri);
+  mkdirp(outdir, function(er) {
+    if (er) throw er;
+    var file = path.resolve(outdir, 'index.html');
+    fs.writeFile(file, contents, 'utf8', function(er) {
+      if (er) throw er;
+      console.log('wrote: ', data.pageid, path.relative(process.cwd(), file));
+    });
+  });
+}
+
+// sort in reverse chronological order
+// prune out any releases that are not the most recent on their branch.
+function buildFeeds(data) {
+  // first, sort by date.
+  var posts = Object.keys(data.posts).map(function(k) {
+    return data.posts[k].post;
+  }).sort(function(a, b) {
+    a = a.date.getTime();
+    b = b.date.getTime();
+    return (a === b) ? 0 : a > b ? -1 : 1;
+  })
+
+  // separate release posts by release families.
+  var releases = posts.reduce(function(releases, post) {
+    if (post.category !== 'release') return releases;
+    var ver = semver.parse(post.version);
+    if (!ver) return;
+    var major = +ver[1];
+    var minor = +ver[2];
+    var patch = +ver[3];
+    var family = [major, minor];
+    ver = [major, minor, patch, post];
+    if (family[1] % 2) family[1]++;
+    family = family.join('.');
+    post.family = family;
+    releases[family] = releases[family] || [];
+    releases[family].push(post);
+    return releases;
+  }, {});
+
+  // separate by categories.
+  var categories = posts.reduce(function(categories, post) {
+    if (!post.category) return categories;
+    if (!categories[post.category]) {
+      categories[post.category] = [];
+    }
+    categories[post.category].push(post);
+    return categories;
+  }, {});
+
+  // paginate categories.
+  for (var cat in categories) {
+    categories[cat] = paginate(categories[cat], cat);
+  }
+
+  // filter non-latest release notices out of main feeds.
+  var main = posts.filter(function(post) {
+    if (post.version && post.family && post !== releases[post.family][0]) {
+      return false;
+    }
+    return true;
+  });
+
+  // add previous/next based on main feed.
+  main.forEach(function (post, i, posts) {
+    post.next = posts[i - 1];
+    post.prev = posts[i + 1];
+  })
+
+  // paginate each feed.
+  main = paginate(main, '');
+
+  // put previous/next links on orphaned old releases so you can get back
+  for (var family in releases) {
+    releases[family].forEach(function(post, i, family) {
+      if (!post.next) post.next = family[i - 1];
+      if (!post.next) post.next = family[0].next;
+      // if (!post.next) post.next = family[0];
+
+      if (!post.prev) post.prev = family[i + 1];
+      if (!post.prev) post.prev = family[0].prev;
+    });
+    // paginate
+    releases[family] = paginate(releases[family], 'release-' + family);
+  }
+
+  // paginate
+  data.feeds = {
+    main: main,
+    categories: categories,
+    releases: releases
+  };
+}
+
+function paginate(set, title) {
+  var pp = config.postsPerPage || 5
+  var pages = [];
+  for (var i = 0; i < set.length; i += pp) {
+    pages.push(set.slice(i, i + pp));
+  }
+  var id = title.replace(/[^a-zA-Z0-9.]+/g, '-');
+  return { id: id || 'index', pageid: id, posts: set, pages: pages, title: title };
+}
+
+function writePermalinks(data) {
+  Object.keys(data.posts).forEach(function(k) {
+    var post = data.posts[k];
+    writeFile(post.permalink, post);
+  });
+}
+
+function writeFeeds(data) {
+  writeFeed(data.feeds.main);
+
+  for (var feed in data.feeds.categories) {
+    writeFeed(data.feeds.categories[feed]);
+  }
+  for (var feed in data.feeds.releases) {
+    writeFeed(data.feeds.releases[feed]);
+  }
+}
+
+function writeFeed(feed) {
+  var title = feed.title;
+  feed.pages.forEach(function(page, p, pages) {
+    writePaginated(feed.title, page, p, pages.length, feed.id);
+  });
+}
+
+function writePaginated(title, posts, p, total, id) {
+  var uri = '/' + encodeURIComponent(title) + '/';
+  var d = {
+    title: title,
+    page: p,
+    posts: posts,
+    total: total,
+    paginated: true,
+    pageid: id + '-' + p,
+    uri: uri
+  };
+  if (p === 0) {
+    writeFile(uri, d);
+  }
+  writeFile(uri + p, d);
+}
+
+function buildOutput(data) {
+  buildPermalinks(data);
+  buildFeeds(data);
+  writePermalinks(data);
+  writeFeeds(data);
+}
+
diff --git a/tools/blog/node_modules/.bin/marked b/tools/blog/node_modules/.bin/marked
new file mode 120000 (symlink)
index 0000000..3b8ef88
--- /dev/null
@@ -0,0 +1 @@
+/Users/isaacs/dev/js/node-master/tools/blog/node_modules/marked/bin/marked
\ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/.gitmodules b/tools/blog/node_modules/ejs/.gitmodules
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tools/blog/node_modules/ejs/.npmignore b/tools/blog/node_modules/ejs/.npmignore
new file mode 100644 (file)
index 0000000..020ddac
--- /dev/null
@@ -0,0 +1,4 @@
+# ignore any vim files:
+*.sw[a-z]
+vim/.netrwhist
+node_modules
diff --git a/tools/blog/node_modules/ejs/History.md b/tools/blog/node_modules/ejs/History.md
new file mode 100644 (file)
index 0000000..75dc16f
--- /dev/null
@@ -0,0 +1,98 @@
+
+0.7.1 / 2012-03-26 
+==================
+
+  * Fixed exception when using express in production caused by typo. [slaskis]
+
+0.7.0 / 2012-03-24 
+==================
+
+  * Added newline consumption support (`-%>`) [whoatemydomain]
+
+0.6.1 / 2011-12-09 
+==================
+
+  * Fixed `ejs.renderFile()`
+
+0.6.0 / 2011-12-09 
+==================
+
+  * Changed: you no longer need `{ locals: {} }`
+
+0.5.0 / 2011-11-20 
+==================
+
+  * Added express 3.x support
+  * Added ejs.renderFile()
+  * Added 'json' filter
+  * Fixed tests for 0.5.x
+
+0.4.3 / 2011-06-20 
+==================
+
+  * Fixed stacktraces line number when used multiline js expressions [Octave]
+
+0.4.2 / 2011-05-11 
+==================
+
+  * Added client side support
+
+0.4.1 / 2011-04-21 
+==================
+
+  * Fixed error context
+
+0.4.0 / 2011-04-21 
+==================
+
+  * Added; ported jade's error reporting to ejs. [slaskis]
+
+0.3.1 / 2011-02-23 
+==================
+
+  * Fixed optional `compile()` options
+
+0.3.0 / 2011-02-14 
+==================
+
+  * Added 'json' filter [Yuriy Bogdanov]
+  * Use exported version of parse function to allow monkey-patching [Anatoliy Chakkaev]
+
+0.2.1 / 2010-10-07 
+==================
+
+  * Added filter support
+  * Fixed _cache_ option. ~4x performance increase
+
+0.2.0 / 2010-08-05 
+==================
+
+  * Added support for global tag config
+  * Added custom tag support. Closes #5
+  * Fixed whitespace bug. Closes #4
+
+0.1.0 / 2010-08-04
+==================
+
+  * Faster implementation [ashleydev]
+
+0.0.4 / 2010-08-02
+==================
+
+  * Fixed single quotes for content outside of template tags. [aniero]
+  * Changed; `exports.compile()` now expects only "locals"
+
+0.0.3 / 2010-07-15
+==================
+
+  * Fixed single quotes
+
+0.0.2 / 2010-07-09
+==================
+
+  * Fixed newline preservation
+
+0.0.1 / 2010-07-09
+==================
+
+  * Initial release
diff --git a/tools/blog/node_modules/ejs/Makefile b/tools/blog/node_modules/ejs/Makefile
new file mode 100644 (file)
index 0000000..14b9304
--- /dev/null
@@ -0,0 +1,23 @@
+
+SRC = $(shell find lib -name "*.js" -type f)
+UGLIFY_FLAGS = --no-mangle 
+
+all: ejs.min.js
+
+test:
+       @./node_modules/.bin/mocha \
+               --ui exports
+
+ejs.js: $(SRC)
+       @node support/compile.js $^
+
+ejs.min.js: ejs.js
+       @uglifyjs $(UGLIFY_FLAGS) $< > $@ \
+               && du ejs.min.js \
+               && du ejs.js
+
+clean:
+       rm -f ejs.js
+       rm -f ejs.min.js
+
+.PHONY: test
\ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/Readme.md b/tools/blog/node_modules/ejs/Readme.md
new file mode 100644 (file)
index 0000000..8e398fd
--- /dev/null
@@ -0,0 +1,151 @@
+
+# EJS
+
+Embedded JavaScript templates.
+
+## Installation
+
+    $ npm install ejs
+
+## Features
+
+  * Complies with the [Express](http://expressjs.com) view system
+  * Static caching of intermediate JavaScript
+  * Unbuffered code for conditionals etc `<% code %>`
+  * Escapes html by default with `<%= code %>`
+  * Unescaped buffering with `<%- code %>`
+  * Supports tag customization
+  * Filter support for designer-friendly templates
+  * Client-side support
+  * Newline slurping with `<% code -%>` or `<% -%>` or `<%= code -%>` or `<%- code -%>`
+
+## Example
+
+    <% if (user) { %>
+           <h2><%= user.name %></h2>
+    <% } %>
+
+## Usage
+
+    ejs.compile(str, options);
+    // => Function
+
+    ejs.render(str, options);
+    // => str
+
+## Options
+
+  - `cache`           Compiled functions are cached, requires `filename`
+  - `filename`        Used by `cache` to key caches
+  - `scope`           Function execution context
+  - `debug`           Output generated function body
+  - `open`            Open tag, defaulting to "<%"
+  - `close`           Closing tag, defaulting to "%>"
+  - *                 All others are template-local variables
+
+## Custom tags
+
+Custom tags can also be applied globally:
+
+    var ejs = require('ejs');
+    ejs.open = '{{';
+    ejs.close = '}}';
+
+Which would make the following a valid template:
+
+    <h1>{{= title }}</h1>
+
+## Filters
+
+EJS conditionally supports the concept of "filters". A "filter chain"
+is a designer friendly api for manipulating data, without writing JavaScript.
+
+Filters can be applied by supplying the _:_ modifier, so for example if we wish to take the array `[{ name: 'tj' }, { name: 'mape' },  { name: 'guillermo' }]` and output a list of names we can do this simply with filters:
+
+Template:
+
+    <p><%=: users | map:'name' | join %></p>
+
+Output:
+
+    <p>Tj, Mape, Guillermo</p>
+
+Render call:
+
+    ejs.render(str, {
+        users: [
+          { name: 'tj' },
+          { name: 'mape' },
+          { name: 'guillermo' }
+        ]
+    });
+
+Or perhaps capitalize the first user's name for display:
+
+    <p><%=: users | first | capitalize %></p>
+
+## Filter list
+
+Currently these filters are available:
+
+  - first
+  - last
+  - capitalize
+  - downcase
+  - upcase
+  - sort
+  - sort_by:'prop'
+  - size
+  - length
+  - plus:n
+  - minus:n
+  - times:n
+  - divided_by:n
+  - join:'val'
+  - truncate:n
+  - truncate_words:n
+  - replace:pattern,substitution
+  - prepend:val
+  - append:val
+  - map:'prop'
+  - reverse
+  - get:'prop'
+
+## Adding filters
+
+ To add a filter simply add a method to the `.filters` object:
+```js
+ejs.filters.last = function(obj) {
+  return obj[obj.length - 1];
+};
+```
+
+## client-side support
+
+  include `./ejs.js` or `./ejs.min.js` and `require("ejs").compile(str)`.
+
+## License 
+
+(The MIT License)
+
+Copyright (c) 2009-2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/blog/node_modules/ejs/benchmark.js b/tools/blog/node_modules/ejs/benchmark.js
new file mode 100644 (file)
index 0000000..7b267e1
--- /dev/null
@@ -0,0 +1,14 @@
+
+
+var ejs = require('./lib/ejs'),
+    str = '<% if (foo) { %><p><%= foo %></p><% } %>',
+    times = 50000;
+
+console.log('rendering ' + times + ' times');
+
+var start = new Date;
+while (times--) {
+    ejs.render(str, { cache: true, filename: 'test', locals: { foo: 'bar' }});
+}
+
+console.log('took ' + (new Date - start) + 'ms');
\ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/ejs.js b/tools/blog/node_modules/ejs/ejs.js
new file mode 100644 (file)
index 0000000..b0fa93b
--- /dev/null
@@ -0,0 +1,567 @@
+
+// CommonJS require()
+
+function require(p){
+    if ('fs' == p) return {};
+    var path = require.resolve(p)
+      , mod = require.modules[path];
+    if (!mod) throw new Error('failed to require "' + p + '"');
+    if (!mod.exports) {
+      mod.exports = {};
+      mod.call(mod.exports, mod, mod.exports, require.relative(path));
+    }
+    return mod.exports;
+  }
+
+require.modules = {};
+
+require.resolve = function (path){
+    var orig = path
+      , reg = path + '.js'
+      , index = path + '/index.js';
+    return require.modules[reg] && reg
+      || require.modules[index] && index
+      || orig;
+  };
+
+require.register = function (path, fn){
+    require.modules[path] = fn;
+  };
+
+require.relative = function (parent) {
+    return function(p){
+      if ('.' != p.substr(0, 1)) return require(p);
+      
+      var path = parent.split('/')
+        , segs = p.split('/');
+      path.pop();
+      
+      for (var i = 0; i < segs.length; i++) {
+        var seg = segs[i];
+        if ('..' == seg) path.pop();
+        else if ('.' != seg) path.push(seg);
+      }
+
+      return require(path.join('/'));
+    };
+  };
+
+
+require.register("ejs.js", function(module, exports, require){
+
+/*!
+ * EJS
+ * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var utils = require('./utils')
+  , fs = require('fs');
+
+/**
+ * Library version.
+ */
+
+exports.version = '0.6.1';
+
+/**
+ * Filters.
+ * 
+ * @type Object
+ */
+
+var filters = exports.filters = require('./filters');
+
+/**
+ * Intermediate js cache.
+ * 
+ * @type Object
+ */
+
+var cache = {};
+
+/**
+ * Clear intermediate js cache.
+ *
+ * @api public
+ */
+
+exports.clearCache = function(){
+  cache = {};
+};
+
+/**
+ * Translate filtered code into function calls.
+ *
+ * @param {String} js
+ * @return {String}
+ * @api private
+ */
+
+function filtered(js) {
+  return js.substr(1).split('|').reduce(function(js, filter){
+    var parts = filter.split(':')
+      , name = parts.shift()
+      , args = parts.shift() || '';
+    if (args) args = ', ' + args;
+    return 'filters.' + name + '(' + js + args + ')';
+  });
+};
+
+/**
+ * Re-throw the given `err` in context to the
+ * `str` of ejs, `filename`, and `lineno`.
+ *
+ * @param {Error} err
+ * @param {String} str
+ * @param {String} filename
+ * @param {String} lineno
+ * @api private
+ */
+
+function rethrow(err, str, filename, lineno){
+  var lines = str.split('\n')
+    , start = Math.max(lineno - 3, 0)
+    , end = Math.min(lines.length, lineno + 3);
+
+  // Error context
+  var context = lines.slice(start, end).map(function(line, i){
+    var curr = i + start + 1;
+    return (curr == lineno ? ' >> ' : '    ')
+      + curr
+      + '| '
+      + line;
+  }).join('\n');
+
+  // Alter exception message
+  err.path = filename;
+  err.message = (filename || 'ejs') + ':' 
+    + lineno + '\n' 
+    + context + '\n\n' 
+    + err.message;
+  
+  throw err;
+}
+
+/**
+ * Parse the given `str` of ejs, returning the function body.
+ *
+ * @param {String} str
+ * @return {String}
+ * @api public
+ */
+
+var parse = exports.parse = function(str, options){
+  var options = options || {}
+    , open = options.open || exports.open || '<%'
+    , close = options.close || exports.close || '%>';
+
+  var buf = [
+      "var buf = [];"
+    , "\nwith (locals) {"
+    , "\n  buf.push('"
+  ];
+  
+  var lineno = 1;
+
+  for (var i = 0, len = str.length; i < len; ++i) {
+    if (str.slice(i, open.length + i) == open) {
+      i += open.length
+  
+      var prefix, postfix, line = '__stack.lineno=' + lineno;
+      switch (str.substr(i, 1)) {
+        case '=':
+          prefix = "', escape((" + line + ', ';
+          postfix = ")), '";
+          ++i;
+          break;
+        case '-':
+          prefix = "', (" + line + ', ';
+          postfix = "), '";
+          ++i;
+          break;
+        default:
+          prefix = "');" + line + ';';
+          postfix = "; buf.push('";
+      }
+
+      var end = str.indexOf(close, i)
+        , js = str.substring(i, end)
+        , start = i
+        , n = 0;
+
+      while (~(n = js.indexOf("\n", n))) n++, lineno++;
+      if (js.substr(0, 1) == ':') js = filtered(js);
+      buf.push(prefix, js, postfix);
+      i += end - start + close.length - 1;
+
+    } else if (str.substr(i, 1) == "\\") {
+      buf.push("\\\\");
+    } else if (str.substr(i, 1) == "'") {
+      buf.push("\\'");
+    } else if (str.substr(i, 1) == "\r") {
+      buf.push(" ");
+    } else if (str.substr(i, 1) == "\n") {
+      buf.push("\\n");
+      lineno++;
+    } else {
+      buf.push(str.substr(i, 1));
+    }
+  }
+
+  buf.push("');\n}\nreturn buf.join('');");
+  return buf.join('');
+};
+
+/**
+ * Compile the given `str` of ejs into a `Function`.
+ *
+ * @param {String} str
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+var compile = exports.compile = function(str, options){
+  options = options || {};
+  
+  var input = JSON.stringify(str)
+    , filename = options.filename
+        ? JSON.stringify(options.filename)
+        : 'undefined';
+  
+  // Adds the fancy stack trace meta info
+  str = [
+    'var __stack = { lineno: 1, input: ' + input + ', filename: ' + filename + ' };',
+    rethrow.toString(),
+    'try {',
+    exports.parse(str, options),
+    '} catch (err) {',
+    '  rethrow(err, __stack.input, __stack.filename, __stack.lineno);',
+    '}'
+  ].join("\n");
+  
+  if (options.debug) console.log(str);
+  var fn = new Function('locals, filters, escape', str);
+  return function(locals){
+    return fn.call(this, locals, filters, utils.escape);
+  }
+};
+
+/**
+ * Render the given `str` of ejs.
+ *
+ * Options:
+ *
+ *   - `locals`          Local variables object
+ *   - `cache`           Compiled functions are cached, requires `filename`
+ *   - `filename`        Used by `cache` to key caches
+ *   - `scope`           Function execution context
+ *   - `debug`           Output generated function body
+ *   - `open`            Open tag, defaulting to "<%"
+ *   - `close`           Closing tag, defaulting to "%>"
+ *
+ * @param {String} str
+ * @param {Object} options
+ * @return {String}
+ * @api public
+ */
+
+exports.render = function(str, options){
+  var fn
+    , options = options || {};
+
+  if (options.cache) {
+    if (options.filename) {
+      fn = cache[options.filename] || (cache[options.filename] = compile(str, options));
+    } else {
+      throw new Error('"cache" option requires "filename".');
+    }
+  } else {
+    fn = compile(str, options);
+  }
+
+  options.__proto__ = options.locals;
+  return fn.call(options.scope, options);
+};
+
+/**
+ * Render an EJS file at the given `path` and callback `fn(err, str)`.
+ *
+ * @param {String} path
+ * @param {Object|Function} options or callback
+ * @param {Function} fn
+ * @api public
+ */
+
+exports.renderFile = function(path, options, fn){
+  var key = path + ':string';
+
+  if ('function' == typeof options) {
+    fn = options, options = {};
+  }
+
+  options.filename = path;
+
+  try {
+    var str = options.cache
+      ? exports.cache[key] || (exports.cache[key] = fs.readFileSync(path, 'utf8'))
+      : fs.readFileSync(path, 'utf8');
+
+    fn(null, exports.render(str, options));
+  } catch (err) {
+    fn(err);
+  }
+};
+
+// express support
+
+exports.__express = exports.renderFile;
+
+/**
+ * Expose to require().
+ */
+
+if (require.extensions) {
+  require.extensions['.ejs'] = function(module, filename) {
+    source = require('fs').readFileSync(filename, 'utf-8');
+    module._compile(compile(source, {}), filename);
+  };
+} else if (require.registerExtension) {
+  require.registerExtension('.ejs', function(src) {
+    return compile(src, {});
+  });
+}
+
+}); // module: ejs.js
+
+require.register("filters.js", function(module, exports, require){
+
+/*!
+ * EJS - Filters
+ * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * First element of the target `obj`.
+ */
+
+exports.first = function(obj) {
+  return obj[0];
+};
+
+/**
+ * Last element of the target `obj`.
+ */
+
+exports.last = function(obj) {
+  return obj[obj.length - 1];
+};
+
+/**
+ * Capitalize the first letter of the target `str`.
+ */
+
+exports.capitalize = function(str){
+  str = String(str);
+  return str[0].toUpperCase() + str.substr(1, str.length);
+};
+
+/**
+ * Downcase the target `str`.
+ */
+
+exports.downcase = function(str){
+  return String(str).toLowerCase();
+};
+
+/**
+ * Uppercase the target `str`.
+ */
+
+exports.upcase = function(str){
+  return String(str).toUpperCase();
+};
+
+/**
+ * Sort the target `obj`.
+ */
+
+exports.sort = function(obj){
+  return Object.create(obj).sort();
+};
+
+/**
+ * Sort the target `obj` by the given `prop` ascending.
+ */
+
+exports.sort_by = function(obj, prop){
+  return Object.create(obj).sort(function(a, b){
+    a = a[prop], b = b[prop];
+    if (a > b) return 1;
+    if (a < b) return -1;
+    return 0;
+  });
+};
+
+/**
+ * Size or length of the target `obj`.
+ */
+
+exports.size = exports.length = function(obj) {
+  return obj.length;
+};
+
+/**
+ * Add `a` and `b`.
+ */
+
+exports.plus = function(a, b){
+  return Number(a) + Number(b);
+};
+
+/**
+ * Subtract `b` from `a`.
+ */
+
+exports.minus = function(a, b){
+  return Number(a) - Number(b);
+};
+
+/**
+ * Multiply `a` by `b`.
+ */
+
+exports.times = function(a, b){
+  return Number(a) * Number(b);
+};
+
+/**
+ * Divide `a` by `b`.
+ */
+
+exports.divided_by = function(a, b){
+  return Number(a) / Number(b);
+};
+
+/**
+ * Join `obj` with the given `str`.
+ */
+
+exports.join = function(obj, str){
+  return obj.join(str || ', ');
+};
+
+/**
+ * Truncate `str` to `len`.
+ */
+
+exports.truncate = function(str, len){
+  str = String(str);
+  return str.substr(0, len);
+};
+
+/**
+ * Truncate `str` to `n` words.
+ */
+
+exports.truncate_words = function(str, n){
+  var str = String(str)
+    , words = str.split(/ +/);
+  return words.slice(0, n).join(' ');
+};
+
+/**
+ * Replace `pattern` with `substitution` in `str`.
+ */
+
+exports.replace = function(str, pattern, substitution){
+  return String(str).replace(pattern, substitution || '');
+};
+
+/**
+ * Prepend `val` to `obj`.
+ */
+
+exports.prepend = function(obj, val){
+  return Array.isArray(obj)
+    ? [val].concat(obj)
+    : val + obj;
+};
+
+/**
+ * Append `val` to `obj`.
+ */
+
+exports.append = function(obj, val){
+  return Array.isArray(obj)
+    ? obj.concat(val)
+    : obj + val;
+};
+
+/**
+ * Map the given `prop`.
+ */
+
+exports.map = function(arr, prop){
+  return arr.map(function(obj){
+    return obj[prop];
+  });
+};
+
+/**
+ * Reverse the given `obj`.
+ */
+
+exports.reverse = function(obj){
+  return Array.isArray(obj)
+    ? obj.reverse()
+    : String(obj).split('').reverse().join('');
+};
+
+/**
+ * Get `prop` of the given `obj`.
+ */
+
+exports.get = function(obj, prop){
+  return obj[prop];
+};
+
+/**
+ * Packs the given `obj` into json string
+ */
+exports.json = function(obj){
+  return JSON.stringify(obj);
+};
+}); // module: filters.js
+
+require.register("utils.js", function(module, exports, require){
+
+/*!
+ * EJS
+ * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * Escape the given string of `html`.
+ *
+ * @param {String} html
+ * @return {String}
+ * @api private
+ */
+
+exports.escape = function(html){
+  return String(html)
+    .replace(/&(?!\w+;)/g, '&amp;')
+    .replace(/</g, '&lt;')
+    .replace(/>/g, '&gt;')
+    .replace(/"/g, '&quot;');
+};
+}); // module: utils.js
diff --git a/tools/blog/node_modules/ejs/ejs.min.js b/tools/blog/node_modules/ejs/ejs.min.js
new file mode 100644 (file)
index 0000000..b878813
--- /dev/null
@@ -0,0 +1,2 @@
+// CommonJS require()
+function require(p){if("fs"==p)return{};var path=require.resolve(p),mod=require.modules[path];if(!mod)throw new Error('failed to require "'+p+'"');mod.exports||(mod.exports={},mod.call(mod.exports,mod,mod.exports,require.relative(path)));return mod.exports}require.modules={},require.resolve=function(path){var orig=path,reg=path+".js",index=path+"/index.js";return require.modules[reg]&&reg||require.modules[index]&&index||orig},require.register=function(path,fn){require.modules[path]=fn},require.relative=function(parent){return function(p){if("."!=p.substr(0,1))return require(p);var path=parent.split("/"),segs=p.split("/");path.pop();for(var i=0;i<segs.length;i++){var seg=segs[i];".."==seg?path.pop():"."!=seg&&path.push(seg)}return require(path.join("/"))}},require.register("ejs.js",function(module,exports,require){var utils=require("./utils"),fs=require("fs");exports.version="0.6.1";var filters=exports.filters=require("./filters"),cache={};exports.clearCache=function(){cache={}};function filtered(js){return js.substr(1).split("|").reduce(function(js,filter){var parts=filter.split(":"),name=parts.shift(),args=parts.shift()||"";args&&(args=", "+args);return"filters."+name+"("+js+args+")"})}function rethrow(err,str,filename,lineno){var lines=str.split("\n"),start=Math.max(lineno-3,0),end=Math.min(lines.length,lineno+3),context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" >> ":"    ")+curr+"| "+line}).join("\n");err.path=filename,err.message=(filename||"ejs")+":"+lineno+"\n"+context+"\n\n"+err.message;throw err}var parse=exports.parse=function(str,options){var options=options||{},open=options.open||exports.open||"<%",close=options.close||exports.close||"%>",buf=["var buf = [];","\nwith (locals) {","\n  buf.push('"],lineno=1;for(var i=0,len=str.length;i<len;++i)if(str.slice(i,open.length+i)==open){i+=open.length;var prefix,postfix,line="__stack.lineno="+lineno;switch(str.substr(i,1)){case"=":prefix="', escape(("+line+", ",postfix=")), '",++i;break;case"-":prefix="', ("+line+", ",postfix="), '",++i;break;default:prefix="');"+line+";",postfix="; buf.push('"}var end=str.indexOf(close,i),js=str.substring(i,end),start=i,n=0;while(~(n=js.indexOf("\n",n)))n++,lineno++;js.substr(0,1)==":"&&(js=filtered(js)),buf.push(prefix,js,postfix),i+=end-start+close.length-1}else str.substr(i,1)=="\\"?buf.push("\\\\"):str.substr(i,1)=="'"?buf.push("\\'"):str.substr(i,1)=="\r"?buf.push(" "):str.substr(i,1)=="\n"?(buf.push("\\n"),lineno++):buf.push(str.substr(i,1));buf.push("');\n}\nreturn buf.join('');");return buf.join("")},compile=exports.compile=function(str,options){options=options||{};var input=JSON.stringify(str),filename=options.filename?JSON.stringify(options.filename):"undefined";str=["var __stack = { lineno: 1, input: "+input+", filename: "+filename+" };",rethrow.toString(),"try {",exports.parse(str,options),"} catch (err) {","  rethrow(err, __stack.input, __stack.filename, __stack.lineno);","}"].join("\n"),options.debug&&console.log(str);var fn=new Function("locals, filters, escape",str);return function(locals){return fn.call(this,locals,filters,utils.escape)}};exports.render=function(str,options){var fn,options=options||{};if(options.cache)if(options.filename)fn=cache[options.filename]||(cache[options.filename]=compile(str,options));else throw new Error('"cache" option requires "filename".');else fn=compile(str,options);options.__proto__=options.locals;return fn.call(options.scope,options)},exports.renderFile=function(path,options,fn){var key=path+":string";"function"==typeof options&&(fn=options,options={}),options.filename=path;try{var str=options.cache?exports.cache[key]||(exports.cache[key]=fs.readFileSync(path,"utf8")):fs.readFileSync(path,"utf8");fn(null,exports.render(str,options))}catch(err){fn(err)}},exports.__express=exports.renderFile,require.extensions?require.extensions[".ejs"]=function(module,filename){source=require("fs").readFileSync(filename,"utf-8"),module._compile(compile(source,{}),filename)}:require.registerExtension&&require.registerExtension(".ejs",function(src){return compile(src,{})})}),require.register("filters.js",function(module,exports,require){exports.first=function(obj){return obj[0]},exports.last=function(obj){return obj[obj.length-1]},exports.capitalize=function(str){str=String(str);return str[0].toUpperCase()+str.substr(1,str.length)},exports.downcase=function(str){return String(str).toLowerCase()},exports.upcase=function(str){return String(str).toUpperCase()},exports.sort=function(obj){return Object.create(obj).sort()},exports.sort_by=function(obj,prop){return Object.create(obj).sort(function(a,b){a=a[prop],b=b[prop];if(a>b)return 1;if(a<b)return-1;return 0})},exports.size=exports.length=function(obj){return obj.length},exports.plus=function(a,b){return Number(a)+Number(b)},exports.minus=function(a,b){return Number(a)-Number(b)},exports.times=function(a,b){return Number(a)*Number(b)},exports.divided_by=function(a,b){return Number(a)/Number(b)},exports.join=function(obj,str){return obj.join(str||", ")},exports.truncate=function(str,len){str=String(str);return str.substr(0,len)},exports.truncate_words=function(str,n){var str=String(str),words=str.split(/ +/);return words.slice(0,n).join(" ")},exports.replace=function(str,pattern,substitution){return String(str).replace(pattern,substitution||"")},exports.prepend=function(obj,val){return Array.isArray(obj)?[val].concat(obj):val+obj},exports.append=function(obj,val){return Array.isArray(obj)?obj.concat(val):obj+val},exports.map=function(arr,prop){return arr.map(function(obj){return obj[prop]})},exports.reverse=function(obj){return Array.isArray(obj)?obj.reverse():String(obj).split("").reverse().join("")},exports.get=function(obj,prop){return obj[prop]},exports.json=function(obj){return JSON.stringify(obj)}}),require.register("utils.js",function(module,exports,require){exports.escape=function(html){return String(html).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}})
\ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/examples/client.html b/tools/blog/node_modules/ejs/examples/client.html
new file mode 100644 (file)
index 0000000..51ce0b4
--- /dev/null
@@ -0,0 +1,24 @@
+<html>
+  <head>
+    <script src="../ejs.js"></script>
+    <script id="users" type="text/template">
+      <% if (names.length) { %>
+        <ul>
+          <% names.forEach(function(name){ %>
+            <li><%= name %></li>
+          <% }) %>
+        </ul>
+      <% } %>
+    </script>
+    <script>
+      onload = function(){
+        var users = document.getElementById('users').innerHTML;
+        var names = ['loki', 'tobi', 'jane'];
+        var html = require('ejs').render(users, { names: names });
+        document.body.innerHTML = html;
+      }
+    </script>
+  </head>
+  <body>
+  </body>
+</html>
\ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/examples/list.ejs b/tools/blog/node_modules/ejs/examples/list.ejs
new file mode 100644 (file)
index 0000000..d571330
--- /dev/null
@@ -0,0 +1,7 @@
+<% if (names.length) { %>
+  <ul>
+    <% names.forEach(function(name){ %>
+      <li><%= name %></li>
+    <% }) %>
+  </ul>
+<% } %>
\ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/examples/list.js b/tools/blog/node_modules/ejs/examples/list.js
new file mode 100644 (file)
index 0000000..ec614ed
--- /dev/null
@@ -0,0 +1,14 @@
+
+/**
+ * Module dependencies.
+ */
+
+var ejs = require('../')
+  , fs = require('fs')
+  , str = fs.readFileSync(__dirname + '/list.ejs', 'utf8');
+
+var ret = ejs.render(str, {
+  names: ['foo', 'bar', 'baz']
+});
+
+console.log(ret);
\ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/index.js b/tools/blog/node_modules/ejs/index.js
new file mode 100644 (file)
index 0000000..20bf71a
--- /dev/null
@@ -0,0 +1,2 @@
+
+module.exports = require('./lib/ejs');
\ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/lib/ejs.js b/tools/blog/node_modules/ejs/lib/ejs.js
new file mode 100644 (file)
index 0000000..e87b98e
--- /dev/null
@@ -0,0 +1,298 @@
+
+/*!
+ * EJS
+ * Copyright(c) 2012 TJ Holowaychuk <tj@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var utils = require('./utils')
+  , fs = require('fs');
+
+/**
+ * Library version.
+ */
+
+exports.version = '0.7.1';
+
+/**
+ * Filters.
+ * 
+ * @type Object
+ */
+
+var filters = exports.filters = require('./filters');
+
+/**
+ * Intermediate js cache.
+ * 
+ * @type Object
+ */
+
+var cache = {};
+
+/**
+ * Clear intermediate js cache.
+ *
+ * @api public
+ */
+
+exports.clearCache = function(){
+  cache = {};
+};
+
+/**
+ * Translate filtered code into function calls.
+ *
+ * @param {String} js
+ * @return {String}
+ * @api private
+ */
+
+function filtered(js) {
+  return js.substr(1).split('|').reduce(function(js, filter){
+    var parts = filter.split(':')
+      , name = parts.shift()
+      , args = parts.shift() || '';
+    if (args) args = ', ' + args;
+    return 'filters.' + name + '(' + js + args + ')';
+  });
+};
+
+/**
+ * Re-throw the given `err` in context to the
+ * `str` of ejs, `filename`, and `lineno`.
+ *
+ * @param {Error} err
+ * @param {String} str
+ * @param {String} filename
+ * @param {String} lineno
+ * @api private
+ */
+
+function rethrow(err, str, filename, lineno){
+  var lines = str.split('\n')
+    , start = Math.max(lineno - 3, 0)
+    , end = Math.min(lines.length, lineno + 3);
+
+  // Error context
+  var context = lines.slice(start, end).map(function(line, i){
+    var curr = i + start + 1;
+    return (curr == lineno ? ' >> ' : '    ')
+      + curr
+      + '| '
+      + line;
+  }).join('\n');
+
+  // Alter exception message
+  err.path = filename;
+  err.message = (filename || 'ejs') + ':' 
+    + lineno + '\n' 
+    + context + '\n\n' 
+    + err.message;
+  
+  throw err;
+}
+
+/**
+ * Parse the given `str` of ejs, returning the function body.
+ *
+ * @param {String} str
+ * @return {String}
+ * @api public
+ */
+
+var parse = exports.parse = function(str, options){
+  var options = options || {}
+    , open = options.open || exports.open || '<%'
+    , close = options.close || exports.close || '%>';
+
+  var buf = [
+      "var buf = [];"
+    , "\nwith (locals) {"
+    , "\n  buf.push('"
+  ];
+  
+  var lineno = 1;
+
+  var consumeEOL = false;
+  for (var i = 0, len = str.length; i < len; ++i) {
+    if (str.slice(i, open.length + i) == open) {
+      i += open.length
+  
+      var prefix, postfix, line = '__stack.lineno=' + lineno;
+      switch (str.substr(i, 1)) {
+        case '=':
+          prefix = "', escape((" + line + ', ';
+          postfix = ")), '";
+          ++i;
+          break;
+        case '-':
+          prefix = "', (" + line + ', ';
+          postfix = "), '";
+          ++i;
+          break;
+        default:
+          prefix = "');" + line + ';';
+          postfix = "; buf.push('";
+      }
+
+      var end = str.indexOf(close, i)
+        , js = str.substring(i, end)
+        , start = i
+        , n = 0;
+        
+      if ('-' == js[js.length-1]){
+        js = js.substring(0, js.length - 2);
+        consumeEOL = true;
+      }
+        
+      while (~(n = js.indexOf("\n", n))) n++, lineno++;
+      if (js.substr(0, 1) == ':') js = filtered(js);
+      buf.push(prefix, js, postfix);
+      i += end - start + close.length - 1;
+
+    } else if (str.substr(i, 1) == "\\") {
+      buf.push("\\\\");
+    } else if (str.substr(i, 1) == "'") {
+      buf.push("\\'");
+    } else if (str.substr(i, 1) == "\r") {
+      buf.push(" ");
+    } else if (str.substr(i, 1) == "\n") {
+      if (consumeEOL) {
+        consumeEOL = false;
+      } else {
+        buf.push("\\n");
+        lineno++;
+      }
+    } else {
+      buf.push(str.substr(i, 1));
+    }
+  }
+
+  buf.push("');\n}\nreturn buf.join('');");
+  return buf.join('');
+};
+
+/**
+ * Compile the given `str` of ejs into a `Function`.
+ *
+ * @param {String} str
+ * @param {Object} options
+ * @return {Function}
+ * @api public
+ */
+
+var compile = exports.compile = function(str, options){
+  options = options || {};
+  
+  var input = JSON.stringify(str)
+    , filename = options.filename
+        ? JSON.stringify(options.filename)
+        : 'undefined';
+  
+  // Adds the fancy stack trace meta info
+  str = [
+    'var __stack = { lineno: 1, input: ' + input + ', filename: ' + filename + ' };',
+    rethrow.toString(),
+    'try {',
+    exports.parse(str, options),
+    '} catch (err) {',
+    '  rethrow(err, __stack.input, __stack.filename, __stack.lineno);',
+    '}'
+  ].join("\n");
+  
+  if (options.debug) console.log(str);
+  var fn = new Function('locals, filters, escape', str);
+  return function(locals){
+    return fn.call(this, locals, filters, utils.escape);
+  }
+};
+
+/**
+ * Render the given `str` of ejs.
+ *
+ * Options:
+ *
+ *   - `locals`          Local variables object
+ *   - `cache`           Compiled functions are cached, requires `filename`
+ *   - `filename`        Used by `cache` to key caches
+ *   - `scope`           Function execution context
+ *   - `debug`           Output generated function body
+ *   - `open`            Open tag, defaulting to "<%"
+ *   - `close`           Closing tag, defaulting to "%>"
+ *
+ * @param {String} str
+ * @param {Object} options
+ * @return {String}
+ * @api public
+ */
+
+exports.render = function(str, options){
+  var fn
+    , options = options || {};
+
+  if (options.cache) {
+    if (options.filename) {
+      fn = cache[options.filename] || (cache[options.filename] = compile(str, options));
+    } else {
+      throw new Error('"cache" option requires "filename".');
+    }
+  } else {
+    fn = compile(str, options);
+  }
+
+  options.__proto__ = options.locals;
+  return fn.call(options.scope, options);
+};
+
+/**
+ * Render an EJS file at the given `path` and callback `fn(err, str)`.
+ *
+ * @param {String} path
+ * @param {Object|Function} options or callback
+ * @param {Function} fn
+ * @api public
+ */
+
+exports.renderFile = function(path, options, fn){
+  var key = path + ':string';
+
+  if ('function' == typeof options) {
+    fn = options, options = {};
+  }
+
+  options.filename = path;
+
+  try {
+    var str = options.cache
+      ? cache[key] || (cache[key] = fs.readFileSync(path, 'utf8'))
+      : fs.readFileSync(path, 'utf8');
+
+    fn(null, exports.render(str, options));
+  } catch (err) {
+    fn(err);
+  }
+};
+
+// express support
+
+exports.__express = exports.renderFile;
+
+/**
+ * Expose to require().
+ */
+
+if (require.extensions) {
+  require.extensions['.ejs'] = function(module, filename) {
+    source = require('fs').readFileSync(filename, 'utf-8');
+    module._compile(compile(source, {}), filename);
+  };
+} else if (require.registerExtension) {
+  require.registerExtension('.ejs', function(src) {
+    return compile(src, {});
+  });
+}
diff --git a/tools/blog/node_modules/ejs/lib/filters.js b/tools/blog/node_modules/ejs/lib/filters.js
new file mode 100644 (file)
index 0000000..d425c8d
--- /dev/null
@@ -0,0 +1,198 @@
+
+/*!
+ * EJS - Filters
+ * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * First element of the target `obj`.
+ */
+
+exports.first = function(obj) {
+  return obj[0];
+};
+
+/**
+ * Last element of the target `obj`.
+ */
+
+exports.last = function(obj) {
+  return obj[obj.length - 1];
+};
+
+/**
+ * Capitalize the first letter of the target `str`.
+ */
+
+exports.capitalize = function(str){
+  str = String(str);
+  return str[0].toUpperCase() + str.substr(1, str.length);
+};
+
+/**
+ * Downcase the target `str`.
+ */
+
+exports.downcase = function(str){
+  return String(str).toLowerCase();
+};
+
+/**
+ * Uppercase the target `str`.
+ */
+
+exports.upcase = function(str){
+  return String(str).toUpperCase();
+};
+
+/**
+ * Sort the target `obj`.
+ */
+
+exports.sort = function(obj){
+  return Object.create(obj).sort();
+};
+
+/**
+ * Sort the target `obj` by the given `prop` ascending.
+ */
+
+exports.sort_by = function(obj, prop){
+  return Object.create(obj).sort(function(a, b){
+    a = a[prop], b = b[prop];
+    if (a > b) return 1;
+    if (a < b) return -1;
+    return 0;
+  });
+};
+
+/**
+ * Size or length of the target `obj`.
+ */
+
+exports.size = exports.length = function(obj) {
+  return obj.length;
+};
+
+/**
+ * Add `a` and `b`.
+ */
+
+exports.plus = function(a, b){
+  return Number(a) + Number(b);
+};
+
+/**
+ * Subtract `b` from `a`.
+ */
+
+exports.minus = function(a, b){
+  return Number(a) - Number(b);
+};
+
+/**
+ * Multiply `a` by `b`.
+ */
+
+exports.times = function(a, b){
+  return Number(a) * Number(b);
+};
+
+/**
+ * Divide `a` by `b`.
+ */
+
+exports.divided_by = function(a, b){
+  return Number(a) / Number(b);
+};
+
+/**
+ * Join `obj` with the given `str`.
+ */
+
+exports.join = function(obj, str){
+  return obj.join(str || ', ');
+};
+
+/**
+ * Truncate `str` to `len`.
+ */
+
+exports.truncate = function(str, len){
+  str = String(str);
+  return str.substr(0, len);
+};
+
+/**
+ * Truncate `str` to `n` words.
+ */
+
+exports.truncate_words = function(str, n){
+  var str = String(str)
+    , words = str.split(/ +/);
+  return words.slice(0, n).join(' ');
+};
+
+/**
+ * Replace `pattern` with `substitution` in `str`.
+ */
+
+exports.replace = function(str, pattern, substitution){
+  return String(str).replace(pattern, substitution || '');
+};
+
+/**
+ * Prepend `val` to `obj`.
+ */
+
+exports.prepend = function(obj, val){
+  return Array.isArray(obj)
+    ? [val].concat(obj)
+    : val + obj;
+};
+
+/**
+ * Append `val` to `obj`.
+ */
+
+exports.append = function(obj, val){
+  return Array.isArray(obj)
+    ? obj.concat(val)
+    : obj + val;
+};
+
+/**
+ * Map the given `prop`.
+ */
+
+exports.map = function(arr, prop){
+  return arr.map(function(obj){
+    return obj[prop];
+  });
+};
+
+/**
+ * Reverse the given `obj`.
+ */
+
+exports.reverse = function(obj){
+  return Array.isArray(obj)
+    ? obj.reverse()
+    : String(obj).split('').reverse().join('');
+};
+
+/**
+ * Get `prop` of the given `obj`.
+ */
+
+exports.get = function(obj, prop){
+  return obj[prop];
+};
+
+/**
+ * Packs the given `obj` into json string
+ */
+exports.json = function(obj){
+  return JSON.stringify(obj);
+};
\ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/lib/utils.js b/tools/blog/node_modules/ejs/lib/utils.js
new file mode 100644 (file)
index 0000000..8d569d6
--- /dev/null
@@ -0,0 +1,23 @@
+
+/*!
+ * EJS
+ * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * Escape the given string of `html`.
+ *
+ * @param {String} html
+ * @return {String}
+ * @api private
+ */
+
+exports.escape = function(html){
+  return String(html)
+    .replace(/&(?!\w+;)/g, '&amp;')
+    .replace(/</g, '&lt;')
+    .replace(/>/g, '&gt;')
+    .replace(/"/g, '&quot;');
+};
\ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/package.json b/tools/blog/node_modules/ejs/package.json
new file mode 100644 (file)
index 0000000..0458a44
--- /dev/null
@@ -0,0 +1,23 @@
+{
+  "name": "ejs",
+  "description": "Embedded JavaScript templates",
+  "version": "0.7.1",
+  "author": {
+    "name": "TJ Holowaychuk",
+    "email": "tj@vision-media.ca"
+  },
+  "keywords": [
+    "template",
+    "engine",
+    "ejs"
+  ],
+  "devDependencies": {
+    "mocha": "*"
+  },
+  "main": "./lib/ejs.js",
+  "_id": "ejs@0.7.1",
+  "dist": {
+    "shasum": "9ed557b7e65f9f1adf5473060d079141ad7e680b"
+  },
+  "_from": "ejs"
+}
diff --git a/tools/blog/node_modules/ejs/support/compile.js b/tools/blog/node_modules/ejs/support/compile.js
new file mode 100644 (file)
index 0000000..95cafc8
--- /dev/null
@@ -0,0 +1,174 @@
+
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs');
+
+/**
+ * Arguments.
+ */
+
+var args = process.argv.slice(2)
+  , pending = args.length
+  , files = {};
+
+console.log('');
+
+// parse arguments
+
+args.forEach(function(file){
+  var mod = file.replace('lib/', '');
+  fs.readFile(file, 'utf8', function(err, js){
+    if (err) throw err;
+    console.log('  \033[90mcompile : \033[0m\033[36m%s\033[0m', file);
+    files[file] = parse(js);
+    --pending || compile();
+  });
+});
+
+/**
+ * Parse the given `js`.
+ */
+
+function parse(js) {
+  return parseInheritance(parseConditionals(js));
+}
+
+/**
+ * Parse __proto__.
+ */
+
+function parseInheritance(js) {
+  return js
+    .replace(/^ *(\w+)\.prototype\.__proto__ * = *(\w+)\.prototype *;?/gm, function(_, child, parent){
+      return child + '.prototype = new ' + parent + ';\n'
+        + child + '.prototype.constructor = '+ child + ';\n';
+    });
+}
+
+/**
+ * Parse the given `js`, currently supporting:
+ * 
+ *    'if' ['node' | 'browser']
+ *    'end'
+ * 
+ */
+
+function parseConditionals(js) {
+  var lines = js.split('\n')
+    , len = lines.length
+    , buffer = true
+    , browser = false
+    , buf = []
+    , line
+    , cond;
+
+  for (var i = 0; i < len; ++i) {
+    line = lines[i];
+    if (/^ *\/\/ *if *(node|browser)/gm.exec(line)) {
+      cond = RegExp.$1;
+      buffer = browser = 'browser' == cond;
+    } else if (/^ *\/\/ *end/.test(line)) {
+      buffer = true;
+      browser = false;
+    } else if (browser) {
+      buf.push(line.replace(/^( *)\/\//, '$1'));
+    } else if (buffer) {
+      buf.push(line);
+    }
+  }
+
+  return buf.join('\n');
+}
+
+/**
+ * Compile the files.
+ */
+
+function compile() {
+  var buf = '';
+  buf += '\n// CommonJS require()\n\n';
+  buf += browser.require + '\n\n';
+  buf += 'require.modules = {};\n\n';
+  buf += 'require.resolve = ' + browser.resolve + ';\n\n';
+  buf += 'require.register = ' + browser.register + ';\n\n';
+  buf += 'require.relative = ' + browser.relative + ';\n\n';
+  args.forEach(function(file){
+    var js = files[file];
+    file = file.replace('lib/', '');
+    buf += '\nrequire.register("' + file + '", function(module, exports, require){\n';
+    buf += js;
+    buf += '\n}); // module: ' + file + '\n';
+  });
+  fs.writeFile('ejs.js', buf, function(err){
+    if (err) throw err;
+    console.log('  \033[90m create : \033[0m\033[36m%s\033[0m', 'ejs.js');
+    console.log();
+  });
+}
+
+// refactored version of weepy's
+// https://github.com/weepy/brequire/blob/master/browser/brequire.js
+
+var browser = {
+  
+  /**
+   * Require a module.
+   */
+  
+  require: function require(p){
+    if ('fs' == p) return {};
+    var path = require.resolve(p)
+      , mod = require.modules[path];
+    if (!mod) throw new Error('failed to require "' + p + '"');
+    if (!mod.exports) {
+      mod.exports = {};
+      mod.call(mod.exports, mod, mod.exports, require.relative(path));
+    }
+    return mod.exports;
+  },
+  
+  /**
+   * Resolve module path.
+   */
+
+  resolve: function(path){
+    var orig = path
+      , reg = path + '.js'
+      , index = path + '/index.js';
+    return require.modules[reg] && reg
+      || require.modules[index] && index
+      || orig;
+  },
+  
+  /**
+   * Return relative require().
+   */
+
+  relative: function(parent) {
+    return function(p){
+      if ('.' != p.substr(0, 1)) return require(p);
+      
+      var path = parent.split('/')
+        , segs = p.split('/');
+      path.pop();
+      
+      for (var i = 0; i < segs.length; i++) {
+        var seg = segs[i];
+        if ('..' == seg) path.pop();
+        else if ('.' != seg) path.push(seg);
+      }
+
+      return require(path.join('/'));
+    };
+  },
+  
+  /**
+   * Register a module.
+   */
+
+  register: function(path, fn){
+    require.modules[path] = fn;
+  }
+};
\ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/test/ejs.test.js b/tools/blog/node_modules/ejs/test/ejs.test.js
new file mode 100644 (file)
index 0000000..54b8d2d
--- /dev/null
@@ -0,0 +1,329 @@
+
+/**
+ * Module dependencies.
+ */
+
+var ejs = require('../')
+  , assert = require('assert');
+
+module.exports = {
+  'test .version': function(){
+    assert.ok(/^\d+\.\d+\.\d+$/.test(ejs.version), 'Test .version format');
+  },
+  
+  'test html': function(){
+    assert.equal('<p>yay</p>', ejs.render('<p>yay</p>'));
+  },
+
+  'test renderFile': function(){
+    var html = '<h1>tj</h1>',
+      str = '<p><%= name %></p>',
+      options = { name: 'tj', open: '{', close: '}' };
+
+    ejs.renderFile(__dirname + '/fixtures/user.ejs', options, function(err, res){
+      assert.ok(!err);
+      assert.equal(res, html);
+    })
+  },
+  
+  'test buffered code': function(){
+    var html = '<p>tj</p>',
+      str = '<p><%= name %></p>',
+      locals = { name: 'tj' };
+    assert.equal(html, ejs.render(str, { locals: locals }));
+  },
+  
+  'test unbuffered code': function(){
+    var html = '<p>tj</p>',
+      str = '<% if (name) { %><p><%= name %></p><% } %>',
+      locals = { name: 'tj' };
+    assert.equal(html, ejs.render(str, { locals: locals }));
+  },
+  
+  'test `scope` option': function(){
+    var html = '<p>tj</p>',
+      str = '<p><%= this %></p>';
+    assert.equal(html, ejs.render(str, { scope: 'tj' }));
+  },
+  
+  'test escaping': function(){
+    assert.equal('&lt;script&gt;', ejs.render('<%= "<script>" %>'));
+    assert.equal('<script>', ejs.render('<%- "<script>" %>'));
+  },
+  
+  'test newlines': function(){
+    var html = '\n<p>tj</p>\n<p>tj@sencha.com</p>',
+      str = '<% if (name) { %>\n<p><%= name %></p>\n<p><%= email %></p><% } %>',
+      locals = { name: 'tj', email: 'tj@sencha.com' };
+    assert.equal(html, ejs.render(str, { locals: locals }));
+  },
+  
+  'test single quotes': function(){
+    var html = '<p>WAHOO</p>',
+      str = "<p><%= up('wahoo') %></p>",
+      locals = { up: function(str){ return str.toUpperCase(); }};
+    assert.equal(html, ejs.render(str, { locals: locals }));
+  },
+
+  'test single quotes in the html': function(){
+    var html = '<p>WAHOO that\'s cool</p>',
+      str = '<p><%= up(\'wahoo\') %> that\'s cool</p>',
+      locals = { up: function(str){ return str.toUpperCase(); }};
+    assert.equal(html, ejs.render(str, { locals: locals }));
+  },
+
+  'test multiple single quotes': function() {
+    var html = "<p>couldn't shouldn't can't</p>",
+      str = "<p>couldn't shouldn't can't</p>";
+    assert.equal(html, ejs.render(str));
+  },
+
+  'test single quotes inside tags': function() {
+    var html = '<p>string</p>',
+      str = "<p><%= 'string' %></p>";
+    assert.equal(html, ejs.render(str));
+  },
+
+  'test back-slashes in the document': function() {
+    var html = "<p>backslash: '\\'</p>",
+      str = "<p>backslash: '\\'</p>";
+    assert.equal(html, ejs.render(str));
+  },
+  
+  'test double quotes': function(){
+    var html = '<p>WAHOO</p>',
+      str = '<p><%= up("wahoo") %></p>',
+      locals = { up: function(str){ return str.toUpperCase(); }};
+    assert.equal(html, ejs.render(str, { locals: locals }));
+  },
+  
+  'test multiple double quotes': function() {
+    var html = '<p>just a "test" wahoo</p>',
+      str = '<p>just a "test" wahoo</p>';
+    assert.equal(html, ejs.render(str));
+  },
+
+  'test pass options as locals': function(){
+    var html = '<p>foo</p>',
+      str = '<p><%="foo"%></p>';
+    assert.equal(html, ejs.render(str));
+
+    var html = '<p>foo</p>',
+      str = '<p><%=bar%></p>';
+    assert.equal(html, ejs.render(str, { bar: 'foo' }));
+  },
+  
+  'test whitespace': function(){
+    var html = '<p>foo</p>',
+      str = '<p><%="foo"%></p>';
+    assert.equal(html, ejs.render(str));
+
+    var html = '<p>foo</p>',
+      str = '<p><%=bar%></p>';
+    assert.equal(html, ejs.render(str, { locals: { bar: 'foo' }}));
+  },
+  
+  'test custom tags': function(){
+    var html = '<p>foo</p>',
+      str = '<p>{{= "foo" }}</p>';
+
+    assert.equal(html, ejs.render(str, {
+      open: '{{',
+      close: '}}'
+    }));
+
+    var html = '<p>foo</p>',
+      str = '<p><?= "foo" ?></p>';
+
+    assert.equal(html, ejs.render(str, {
+      open: '<?',
+      close: '?>'
+    }));
+  },
+
+  'test custom tags over 2 chars': function(){
+    var html = '<p>foo</p>',
+      str = '<p>{{{{= "foo" }>>}</p>';
+
+    assert.equal(html, ejs.render(str, {
+      open: '{{{{',
+      close: '}>>}'
+    }));
+
+    var html = '<p>foo</p>',
+      str = '<p><??= "foo" ??></p>';
+
+    assert.equal(html, ejs.render(str, {
+      open: '<??',
+      close: '??>'
+    }));
+  },
+  
+  'test global custom tags': function(){
+    var html = '<p>foo</p>',
+      str = '<p>{{= "foo" }}</p>';
+    ejs.open = '{{';
+    ejs.close = '}}';
+    assert.equal(html, ejs.render(str));
+    delete ejs.open;
+    delete ejs.close;
+  },
+  
+  'test iteration': function(){
+    var html = '<p>foo</p>',
+      str = '<% for (var key in items) { %>'
+        + '<p><%= items[key] %></p>'
+        + '<% } %>';
+    assert.equal(html, ejs.render(str, {
+      locals: {
+        items: ['foo']
+      }
+    }));
+    
+    var html = '<p>foo</p>',
+      str = '<% items.forEach(function(item){ %>'
+        + '<p><%= item %></p>'
+        + '<% }) %>';
+    assert.equal(html, ejs.render(str, {
+      locals: {
+        items: ['foo']
+      }
+    }));
+  },
+  
+  'test filter support': function(){
+    var html = 'Zab',
+      str = '<%=: items | reverse | first | reverse | capitalize %>';
+    assert.equal(html, ejs.render(str, {
+      locals: {
+        items: ['foo', 'bar', 'baz']
+      }
+    }));
+  },
+  
+  'test filter argument support': function(){
+    var html = 'tj, guillermo',
+      str = '<%=: users | map:"name" | join:", " %>';
+    assert.equal(html, ejs.render(str, {
+      locals: {
+        users: [
+          { name: 'tj' },
+          { name: 'guillermo' }
+        ]
+      }
+    }));
+  },
+  
+  'test sort_by filter': function(){
+    var html = 'tj',
+      str = '<%=: users | sort_by:"name" | last | get:"name" %>';
+    assert.equal(html, ejs.render(str, {
+      locals: {
+        users: [
+          { name: 'guillermo' },
+          { name: 'tj' },
+          { name: 'mape' }
+        ]
+      }
+    }));
+  },
+  
+  'test custom filters': function(){
+    var html = 'Welcome Tj Holowaychuk',
+      str = '<%=: users | first | greeting %>';
+
+    ejs.filters.greeting = function(user){
+      return 'Welcome ' + user.first + ' ' + user.last + '';
+    };
+
+    assert.equal(html, ejs.render(str, {
+      locals: {
+        users: [
+          { first: 'Tj', last: 'Holowaychuk' }
+        ]
+      }
+    }));
+  },
+
+  'test useful stack traces': function(){  
+    var str = [
+      "A little somethin'",
+      "somethin'",
+      "<% if (name) { %>", // Failing line 
+      "  <p><%= name %></p>",
+      "  <p><%= email %></p>",
+      "<% } %>"
+    ].join("\n");
+    
+    try {
+      ejs.render(str)
+    } catch (err) {
+      assert.ok(~err.message.indexOf("name is not defined"));
+      assert.deepEqual(err.name, "ReferenceError");
+      var lineno = parseInt(err.toString().match(/ejs:(\d+)\n/)[1]);
+      assert.deepEqual(lineno,3, "Error should been thrown on line 3, was thrown on line "+lineno);
+    }
+  },
+  
+  'test useful stack traces multiline': function(){  
+    var str = [
+      "A little somethin'",
+      "somethin'",
+      "<% var some = 'pretty';",
+      "   var multiline = 'javascript';",
+      "%>",
+      "<% if (name) { %>", // Failing line 
+      "  <p><%= name %></p>",
+      "  <p><%= email %></p>",
+      "<% } %>"
+    ].join("\n");
+    
+    try {
+      ejs.render(str)
+    } catch (err) {
+      assert.ok(~err.message.indexOf("name is not defined"));
+      assert.deepEqual(err.name, "ReferenceError");
+      var lineno = parseInt(err.toString().match(/ejs:(\d+)\n/)[1]);
+      assert.deepEqual(lineno, 6, "Error should been thrown on line 3, was thrown on line "+lineno);
+    }
+  },
+  
+  'test slurp' : function() {
+    var expected = 'me\nhere',
+      str = 'me<% %>\nhere';
+    assert.equal(expected, ejs.render(str));
+
+    var expected = 'mehere',
+      str = 'me<% -%>\nhere';
+    assert.equal(expected, ejs.render(str));
+
+    var expected = 'me\nhere',
+      str = 'me<% -%>\n\nhere';
+    assert.equal(expected, ejs.render(str));
+    
+    var expected = 'me inbetween \nhere',
+      str = 'me <%= x %> \nhere';
+    assert.equal(expected, ejs.render(str,{x:'inbetween'}));
+
+    var expected = 'me inbetween here',
+      str = 'me <%= x -%> \nhere';
+    assert.equal(expected, ejs.render(str,{x:'inbetween'}));
+
+    var expected = 'me <p>inbetween</p> here',
+      str = 'me <%- x -%> \nhere';
+    assert.equal(expected, ejs.render(str,{x:'<p>inbetween</p>'}));
+
+    var expected = '\n  Hallo 0\n\n  Hallo 1\n\n',
+      str = '<% for(var i in [1,2]) { %>\n' +
+            '  Hallo <%= i %>\n' +
+            '<% } %>\n';
+    assert.equal(expected, ejs.render(str));
+
+    var expected = '  Hallo 0\n  Hallo 1\n',
+      str = '<% for(var i in [1,2]) { -%>\n' +
+            '  Hallo <%= i %>\n' +
+            '<% } -%>\n';
+    assert.equal(expected, ejs.render(str));
+  }
+  
+};
diff --git a/tools/blog/node_modules/ejs/test/fixtures/user.ejs b/tools/blog/node_modules/ejs/test/fixtures/user.ejs
new file mode 100644 (file)
index 0000000..b312b5d
--- /dev/null
@@ -0,0 +1 @@
+<h1>{= name}</h1>
\ No newline at end of file
diff --git a/tools/blog/node_modules/glob/.npmignore b/tools/blog/node_modules/glob/.npmignore
new file mode 100644 (file)
index 0000000..2af4b71
--- /dev/null
@@ -0,0 +1,2 @@
+.*.swp
+test/a/
diff --git a/tools/blog/node_modules/glob/.travis.yml b/tools/blog/node_modules/glob/.travis.yml
new file mode 100644 (file)
index 0000000..94cd7f6
--- /dev/null
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+  - 0.6
+  - 0.7
diff --git a/tools/blog/node_modules/glob/LICENCE b/tools/blog/node_modules/glob/LICENCE
new file mode 100644 (file)
index 0000000..74489e2
--- /dev/null
@@ -0,0 +1,25 @@
+Copyright (c) Isaac Z. Schlueter
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/tools/blog/node_modules/glob/README.md b/tools/blog/node_modules/glob/README.md
new file mode 100644 (file)
index 0000000..6e27df6
--- /dev/null
@@ -0,0 +1,233 @@
+# Glob
+
+This is a glob implementation in JavaScript.  It uses the `minimatch`
+library to do its matching.
+
+## Attention: node-glob users!
+
+The API has changed dramatically between 2.x and 3.x. This library is
+now 100% JavaScript, and the integer flags have been replaced with an
+options object.
+
+Also, there's an event emitter class, proper tests, and all the other
+things you've come to expect from node modules.
+
+And best of all, no compilation!
+
+## Usage
+
+```javascript
+var glob = require("glob")
+
+// options is optional
+glob("**/*.js", options, function (er, files) {
+  // files is an array of filenames.
+  // If the `nonull` option is set, and nothing
+  // was found, then files is ["**/*.js"]
+  // er is an error object or null.
+})
+```
+
+## Features
+
+Please see the [minimatch
+documentation](https://github.com/isaacs/minimatch) for more details.
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+* [minimatch documentation](https://github.com/isaacs/minimatch)
+
+## glob(pattern, [options], cb)
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* `cb` {Function}
+  * `err` {Error | null}
+  * `matches` {Array<String>} filenames found matching the pattern
+
+Perform an asynchronous glob search.
+
+## glob.sync(pattern, [options]
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* return: {Array<String>} filenames found matching the pattern
+
+Perform a synchronous glob search.
+
+## Class: glob.Glob
+
+Create a Glob object by instanting the `glob.Glob` class.
+
+```javascript
+var Glob = require("glob").Glob
+var mg = new Glob(pattern, options, cb)
+```
+
+It's an EventEmitter, and starts walking the filesystem to find matches
+immediately.
+
+### new glob.Glob(pattern, [options], [cb])
+
+* `pattern` {String} pattern to search for
+* `options` {Object}
+* `cb` {Function} Called when an error occurs, or matches are found
+  * `err` {Error | null}
+  * `matches` {Array<String>} filenames found matching the pattern
+
+Note that if the `sync` flag is set in the options, then matches will
+be immediately available on the `g.found` member.
+
+### Properties
+
+* `minimatch` The minimatch object that the glob uses.
+* `options` The options object passed in.
+* `error` The error encountered.  When an error is encountered, the
+  glob object is in an undefined state, and should be discarded.
+* `aborted` Boolean which is set to true when calling `abort()`.  There
+  is no way at this time to continue a glob search after aborting, but
+  you can re-use the statCache to avoid having to duplicate syscalls.
+
+### Events
+
+* `end` When the matching is finished, this is emitted with all the
+  matches found.  If the `nonull` option is set, and no match was found,
+  then the `matches` list contains the original pattern.  The matches
+  are sorted, unless the `nosort` flag is set.
+* `match` Every time a match is found, this is emitted with the matched.
+* `error` Emitted when an unexpected error is encountered, or whenever
+  any fs error occurs if `options.strict` is set.
+* `abort` When `abort()` is called, this event is raised.
+
+### Methods
+
+* `abort` Stop the search.
+
+### Options
+
+All the options that can be passed to Minimatch can also be passed to
+Glob to change pattern matching behavior.  Also, some have been added,
+or have glob-specific ramifications.
+
+All options are false by default, unless otherwise noted.
+
+All options are added to the glob object, as well.
+
+* `cwd` The current working directory in which to search.  Defaults
+  to `process.cwd()`.
+* `root` The place where patterns starting with `/` will be mounted
+  onto.  Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
+  systems, and `C:\` or some such on Windows.)
+* `nomount` By default, a pattern starting with a forward-slash will be
+  "mounted" onto the root setting, so that a valid filesystem path is
+  returned.  Set this flag to disable that behavior.
+* `mark` Add a `/` character to directory matches.  Note that this
+  requires additional stat calls.
+* `nosort` Don't sort the results.
+* `stat` Set to true to stat *all* results.  This reduces performance
+  somewhat, and is completely unnecessary, unless `readdir` is presumed
+  to be an untrustworthy indicator of file existence.  It will cause
+  ELOOP to be triggered one level sooner in the case of cyclical
+  symbolic links.
+* `silent` When an unusual error is encountered
+  when attempting to read a directory, a warning will be printed to
+  stderr.  Set the `silent` option to true to suppress these warnings.
+* `strict` When an unusual error is encountered
+  when attempting to read a directory, the process will just continue on
+  in search of other matches.  Set the `strict` option to raise an error
+  in these cases.
+* `statCache` A cache of results of filesystem information, to prevent
+  unnecessary stat calls.  While it should not normally be necessary to
+  set this, you may pass the statCache from one glob() call to the
+  options object of another, if you know that the filesystem will not
+  change between calls.  (See "Race Conditions" below.)
+* `sync` Perform a synchronous glob search.
+* `nounique` In some cases, brace-expanded patterns can result in the
+  same file showing up multiple times in the result set.  By default,
+  this implementation prevents duplicates in the result set.
+  Set this flag to disable that behavior.
+* `nonull` Set to never return an empty set, instead returning a set
+  containing the pattern itself.  This is the default in glob(3).
+* `nocase` Perform a case-insensitive match.  Note that case-insensitive
+  filesystems will sometimes result in glob returning results that are
+  case-insensitively matched anyway, since readdir and stat will not
+  raise an error.
+* `debug` Set to enable debug logging in minimatch and glob.
+* `globDebug` Set to enable debug logging in glob, but not minimatch.
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between node-glob and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated.  Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally.  This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything.  Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set.  This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.  **Note that this is different from the way that `**` is
+handled by ruby's `Dir` class.**
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then glob returns the pattern as-provided, rather than
+interpreting the character escapes.  For example,
+`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`.  This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern.  Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity.  Since those two are valid, matching proceeds.
+
+## Windows
+
+**Please only use forward-slashes in glob expressions.**
+
+Though windows uses either `/` or `\` as its path separator, only `/`
+characters are used by this glob implementation.  You must use
+forward-slashes **only** in glob expressions.  Back-slashes will always
+be interpreted as escape characters, not path separators.
+
+Results from absolute patterns such as `/foo/*` are mounted onto the
+root setting using `path.join`.  On windows, this will by default result
+in `/foo/*` matching `C:\foo\bar.txt`.
+
+## Race Conditions
+
+Glob searching, by its very nature, is susceptible to race conditions,
+since it relies on directory walking and such.
+
+As a result, it is possible that a file that exists when glob looks for
+it may have been deleted or modified by the time it returns the result.
+
+As part of its internal implementation, this program caches all stat
+and readdir calls that it makes, in order to cut down on system
+overhead.  However, this also makes it even more susceptible to races,
+especially if the statCache object is reused between glob calls.
+
+Users are thus advised not to use a glob result as a
+guarantee of filesystem state in the face of rapid changes.
+For the vast majority of operations, this is never a problem.
diff --git a/tools/blog/node_modules/glob/examples/g.js b/tools/blog/node_modules/glob/examples/g.js
new file mode 100644 (file)
index 0000000..be122df
--- /dev/null
@@ -0,0 +1,9 @@
+var Glob = require("../").Glob
+
+var pattern = "test/a/**/[cg]/../[cg]"
+console.log(pattern)
+
+var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) {
+  console.log("matches", matches)
+})
+console.log("after")
diff --git a/tools/blog/node_modules/glob/examples/usr-local.js b/tools/blog/node_modules/glob/examples/usr-local.js
new file mode 100644 (file)
index 0000000..327a425
--- /dev/null
@@ -0,0 +1,9 @@
+var Glob = require("../").Glob
+
+var pattern = "{./*/*,/*,/usr/local/*}"
+console.log(pattern)
+
+var mg = new Glob(pattern, {mark: true}, function (er, matches) {
+  console.log("matches", matches)
+})
+console.log("after")
diff --git a/tools/blog/node_modules/glob/glob.js b/tools/blog/node_modules/glob/glob.js
new file mode 100644 (file)
index 0000000..0e71358
--- /dev/null
@@ -0,0 +1,601 @@
+// Approach:
+//
+// 1. Get the minimatch set
+// 2. For each pattern in the set, PROCESS(pattern)
+// 3. Store matches per-set, then uniq them
+//
+// PROCESS(pattern)
+// Get the first [n] items from pattern that are all strings
+// Join these together.  This is PREFIX.
+//   If there is no more remaining, then stat(PREFIX) and
+//   add to matches if it succeeds.  END.
+// readdir(PREFIX) as ENTRIES
+//   If fails, END
+//   If pattern[n] is GLOBSTAR
+//     // handle the case where the globstar match is empty
+//     // by pruning it out, and testing the resulting pattern
+//     PROCESS(pattern[0..n] + pattern[n+1 .. $])
+//     // handle other cases.
+//     for ENTRY in ENTRIES (not dotfiles)
+//       // attach globstar + tail onto the entry
+//       PROCESS(pattern[0..n] + ENTRY + pattern[n .. $])
+//
+//   else // not globstar
+//     for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
+//       Test ENTRY against pattern[n+1]
+//       If fails, continue
+//       If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
+//
+// Caveat:
+//   Cache all stats and readdirs results to minimize syscall.  Since all
+//   we ever care about is existence and directory-ness, we can just keep
+//   `true` for files, and [children,...] for directories, or `false` for
+//   things that don't exist.
+
+
+
+module.exports = glob
+
+var fs = require("graceful-fs")
+, minimatch = require("minimatch")
+, Minimatch = minimatch.Minimatch
+, inherits = require("inherits")
+, EE = require("events").EventEmitter
+, path = require("path")
+, isDir = {}
+, assert = require("assert").ok
+, EOF = {}
+
+function glob (pattern, options, cb) {
+  if (typeof options === "function") cb = options, options = {}
+  if (!options) options = {}
+
+  if (typeof options === "number") {
+    deprecated()
+    return
+  }
+
+  var g = new Glob(pattern, options, cb)
+  return g.sync ? g.found : g
+}
+
+glob.fnmatch = deprecated
+
+function deprecated () {
+  throw new Error("glob's interface has changed. Please see the docs.")
+}
+
+glob.sync = globSync
+function globSync (pattern, options) {
+  if (typeof options === "number") {
+    deprecated()
+    return
+  }
+
+  options = options || {}
+  options.sync = true
+  return glob(pattern, options)
+}
+
+
+glob.Glob = Glob
+inherits(Glob, EE)
+function Glob (pattern, options, cb) {
+  if (!(this instanceof Glob)) {
+    return new Glob(pattern, options, cb)
+  }
+
+  if (typeof cb === "function") {
+    this.on("error", cb)
+    this.on("end", function (matches) {
+      // console.error("cb with matches", matches)
+      cb(null, matches)
+    })
+  }
+
+  options = options || {}
+
+  this.maxDepth = options.maxDepth || 1000
+  this.maxLength = options.maxLength || Infinity
+  this.statCache = options.statCache || {}
+
+  this.changedCwd = false
+  var cwd = process.cwd()
+  if (!options.hasOwnProperty("cwd")) this.cwd = cwd
+  else {
+    this.cwd = options.cwd
+    this.changedCwd = path.resolve(options.cwd) !== cwd
+  }
+
+  this.root = options.root || path.resolve(this.cwd, "/")
+  this.root = path.resolve(this.root)
+
+  this.nomount = !!options.nomount
+
+  if (!pattern) {
+    throw new Error("must provide pattern")
+  }
+
+  // base-matching: just use globstar for that.
+  if (options.matchBase && -1 === pattern.indexOf("/")) {
+    if (options.noglobstar) {
+      throw new Error("base matching requires globstar")
+    }
+    pattern = "**/" + pattern
+  }
+
+  this.dot = !!options.dot
+  this.mark = !!options.mark
+  this.sync = !!options.sync
+  this.nounique = !!options.nounique
+  this.nonull = !!options.nonull
+  this.nosort = !!options.nosort
+  this.nocase = !!options.nocase
+  this.stat = !!options.stat
+  this.debug = !!options.debug || !!options.globDebug
+  this.silent = !!options.silent
+
+  var mm = this.minimatch = new Minimatch(pattern, options)
+  this.options = mm.options
+  pattern = this.pattern = mm.pattern
+
+  this.error = null
+  this.aborted = false
+
+  EE.call(this)
+
+  // process each pattern in the minimatch set
+  var n = this.minimatch.set.length
+
+  // The matches are stored as {<filename>: true,...} so that
+  // duplicates are automagically pruned.
+  // Later, we do an Object.keys() on these.
+  // Keep them as a list so we can fill in when nonull is set.
+  this.matches = new Array(n)
+
+  this.minimatch.set.forEach(iterator.bind(this))
+  function iterator (pattern, i, set) {
+    this._process(pattern, 0, i, function (er) {
+      if (er) this.emit("error", er)
+      if (-- n <= 0) this._finish()
+    })
+  }
+}
+
+Glob.prototype._finish = function () {
+  assert(this instanceof Glob)
+
+  var nou = this.nounique
+  , all = nou ? [] : {}
+
+  for (var i = 0, l = this.matches.length; i < l; i ++) {
+    var matches = this.matches[i]
+    if (this.debug) console.error("matches[%d] =", i, matches)
+    // do like the shell, and spit out the literal glob
+    if (!matches) {
+      if (this.nonull) {
+        var literal = this.minimatch.globSet[i]
+        if (nou) all.push(literal)
+        else nou[literal] = true
+      }
+    } else {
+      // had matches
+      var m = Object.keys(matches)
+      if (nou) all.push.apply(all, m)
+      else m.forEach(function (m) {
+        all[m] = true
+      })
+    }
+  }
+
+  if (!nou) all = Object.keys(all)
+
+  if (!this.nosort) {
+    all = all.sort(this.nocase ? alphasorti : alphasort)
+  }
+
+  if (this.mark) {
+    // at *some* point we statted all of these
+    all = all.map(function (m) {
+      var sc = this.statCache[m]
+      if (!sc) return m
+      if (m.slice(-1) !== "/" && (Array.isArray(sc) || sc === 2)) {
+        return m + "/"
+      }
+      if (m.slice(-1) === "/") {
+        return m.replace(/\/$/, "")
+      }
+      return m
+    }, this)
+  }
+
+  if (this.debug) console.error("emitting end", all)
+
+  EOF = this.found = all
+  this.emitMatch(EOF)
+}
+
+function alphasorti (a, b) {
+  a = a.toLowerCase()
+  b = b.toLowerCase()
+  return alphasort(a, b)
+}
+
+function alphasort (a, b) {
+  return a > b ? 1 : a < b ? -1 : 0
+}
+
+Glob.prototype.abort = function () {
+  this.aborted = true
+  this.emit("abort")
+}
+
+Glob.prototype.pause = function () {
+  if (this.paused) return
+  if (this.sync)
+    this.emit("error", new Error("Can't pause/resume sync glob"))
+  this.paused = true
+  this.emit("pause")
+}
+
+Glob.prototype.resume = function () {
+  if (!this.paused) return
+  if (this.sync)
+    this.emit("error", new Error("Can't pause/resume sync glob"))
+  this.paused = false
+  this.emit("resume")
+}
+
+
+Glob.prototype.emitMatch = function (m) {
+  if (!this.paused) {
+    this.emit(m === EOF ? "end" : "match", m)
+    return
+  }
+
+  if (!this._emitQueue) {
+    this._emitQueue = []
+    this.once("resume", function () {
+      var q = this._emitQueue
+      this._emitQueue = null
+      q.forEach(function (m) {
+        this.emitMatch(m)
+      }, this)
+    })
+  }
+
+  this._emitQueue.push(m)
+
+  //this.once("resume", this.emitMatch.bind(this, m))
+}
+
+
+
+Glob.prototype._process = function (pattern, depth, index, cb_) {
+  assert(this instanceof Glob)
+
+  var cb = function cb (er, res) {
+    assert(this instanceof Glob)
+    if (this.paused) {
+      if (!this._processQueue) {
+        this._processQueue = []
+        this.once("resume", function () {
+          var q = this._processQueue
+          this._processQueue = null
+          q.forEach(function (cb) { cb() })
+        })
+      }
+      this._processQueue.push(cb_.bind(this, er, res))
+    } else {
+      cb_.call(this, er, res)
+    }
+  }.bind(this)
+
+  if (this.aborted) return cb()
+
+  if (depth > this.maxDepth) return cb()
+
+  // Get the first [n] parts of pattern that are all strings.
+  var n = 0
+  while (typeof pattern[n] === "string") {
+    n ++
+  }
+  // now n is the index of the first one that is *not* a string.
+
+  // see if there's anything else
+  var prefix
+  switch (n) {
+    // if not, then this is rather simple
+    case pattern.length:
+      prefix = pattern.join("/")
+      this._stat(prefix, function (exists, isDir) {
+        // either it's there, or it isn't.
+        // nothing more to do, either way.
+        if (exists) {
+          if (prefix.charAt(0) === "/" && !this.nomount) {
+            prefix = path.join(this.root, prefix)
+          }
+          this.matches[index] = this.matches[index] || {}
+          this.matches[index][prefix] = true
+          this.emitMatch(prefix)
+        }
+        return cb()
+      })
+      return
+
+    case 0:
+      // pattern *starts* with some non-trivial item.
+      // going to readdir(cwd), but not include the prefix in matches.
+      prefix = null
+      break
+
+    default:
+      // pattern has some string bits in the front.
+      // whatever it starts with, whether that's "absolute" like /foo/bar,
+      // or "relative" like "../baz"
+      prefix = pattern.slice(0, n)
+      prefix = prefix.join("/")
+      break
+  }
+
+  // get the list of entries.
+  var read
+  if (prefix === null) read = "."
+  else if (isAbsolute(prefix)) {
+    read = prefix = path.join("/", prefix)
+    if (this.debug) console.error('absolute: ', prefix, this.root, pattern)
+  } else read = prefix
+
+  if (this.debug) console.error('readdir(%j)', read, this.cwd, this.root)
+  return this._readdir(read, function (er, entries) {
+    if (er) {
+      // not a directory!
+      // this means that, whatever else comes after this, it can never match
+      return cb()
+    }
+
+    // globstar is special
+    if (pattern[n] === minimatch.GLOBSTAR) {
+      // test without the globstar, and with every child both below
+      // and replacing the globstar.
+      var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ]
+      entries.forEach(function (e) {
+        if (e.charAt(0) === "." && !this.dot) return
+        // instead of the globstar
+        s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)))
+        // below the globstar
+        s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n)))
+      }, this)
+
+      // now asyncForEach over this
+      var l = s.length
+      , errState = null
+      s.forEach(function (gsPattern) {
+        this._process(gsPattern, depth + 1, index, function (er) {
+          if (errState) return
+          if (er) return cb(errState = er)
+          if (--l <= 0) return cb()
+        })
+      }, this)
+
+      return
+    }
+
+    // not a globstar
+    // It will only match dot entries if it starts with a dot, or if
+    // dot is set.  Stuff like @(.foo|.bar) isn't allowed.
+    var pn = pattern[n]
+    if (typeof pn === "string") {
+      var found = entries.indexOf(pn) !== -1
+      entries = found ? entries[pn] : []
+    } else {
+      var rawGlob = pattern[n]._glob
+      , dotOk = this.dot || rawGlob.charAt(0) === "."
+
+      entries = entries.filter(function (e) {
+        return (e.charAt(0) !== "." || dotOk) &&
+               (typeof pattern[n] === "string" && e === pattern[n] ||
+                e.match(pattern[n]))
+      })
+    }
+
+    // If n === pattern.length - 1, then there's no need for the extra stat
+    // *unless* the user has specified "mark" or "stat" explicitly.
+    // We know that they exist, since the readdir returned them.
+    if (n === pattern.length - 1 &&
+        !this.mark &&
+        !this.stat) {
+      entries.forEach(function (e) {
+        if (prefix) {
+          if (prefix !== "/") e = prefix + "/" + e
+          else e = prefix + e
+        }
+        if (e.charAt(0) === "/" && !this.nomount) {
+          e = path.join(this.root, e)
+        }
+
+        this.matches[index] = this.matches[index] || {}
+        this.matches[index][e] = true
+        this.emitMatch(e)
+      }, this)
+      return cb.call(this)
+    }
+
+
+    // now test all the remaining entries as stand-ins for that part
+    // of the pattern.
+    var l = entries.length
+    , errState = null
+    if (l === 0) return cb() // no matches possible
+    entries.forEach(function (e) {
+      var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))
+      this._process(p, depth + 1, index, function (er) {
+        if (errState) return
+        if (er) return cb(errState = er)
+        if (--l === 0) return cb.call(this)
+      })
+    }, this)
+  })
+
+}
+
+Glob.prototype._stat = function (f, cb) {
+  assert(this instanceof Glob)
+  var abs = f
+  if (f.charAt(0) === "/") {
+    abs = path.join(this.root, f)
+  } else if (this.changedCwd) {
+    abs = path.resolve(this.cwd, f)
+  }
+  if (this.debug) console.error('stat', [this.cwd, f, '=', abs])
+  if (f.length > this.maxLength) {
+    var er = new Error("Path name too long")
+    er.code = "ENAMETOOLONG"
+    er.path = f
+    return this._afterStat(f, abs, cb, er)
+  }
+
+  if (this.statCache.hasOwnProperty(f)) {
+    var exists = this.statCache[f]
+    , isDir = exists && (Array.isArray(exists) || exists === 2)
+    if (this.sync) return cb.call(this, !!exists, isDir)
+    return process.nextTick(cb.bind(this, !!exists, isDir))
+  }
+
+  if (this.sync) {
+    var er, stat
+    try {
+      stat = fs.statSync(abs)
+    } catch (e) {
+      er = e
+    }
+    this._afterStat(f, abs, cb, er, stat)
+  } else {
+    fs.stat(abs, this._afterStat.bind(this, f, abs, cb))
+  }
+}
+
+Glob.prototype._afterStat = function (f, abs, cb, er, stat) {
+  var exists
+  assert(this instanceof Glob)
+  if (er || !stat) {
+    exists = false
+  } else {
+    exists = stat.isDirectory() ? 2 : 1
+  }
+  this.statCache[f] = this.statCache[f] || exists
+  cb.call(this, !!exists, exists === 2)
+}
+
+Glob.prototype._readdir = function (f, cb) {
+  assert(this instanceof Glob)
+  var abs = f
+  if (f.charAt(0) === "/") {
+    abs = path.join(this.root, f)
+  } else if (isAbsolute(f)) {
+    abs = f
+  } else if (this.changedCwd) {
+    abs = path.resolve(this.cwd, f)
+  }
+
+  if (this.debug) console.error('readdir', [this.cwd, f, abs])
+  if (f.length > this.maxLength) {
+    var er = new Error("Path name too long")
+    er.code = "ENAMETOOLONG"
+    er.path = f
+    return this._afterReaddir(f, abs, cb, er)
+  }
+
+  if (this.statCache.hasOwnProperty(f)) {
+    var c = this.statCache[f]
+    if (Array.isArray(c)) {
+      if (this.sync) return cb.call(this, null, c)
+      return process.nextTick(cb.bind(this, null, c))
+    }
+
+    if (!c || c === 1) {
+      // either ENOENT or ENOTDIR
+      var code = c ? "ENOTDIR" : "ENOENT"
+      , er = new Error((c ? "Not a directory" : "Not found") + ": " + f)
+      er.path = f
+      er.code = code
+      if (this.debug) console.error(f, er)
+      if (this.sync) return cb.call(this, er)
+      return process.nextTick(cb.bind(this, er))
+    }
+
+    // at this point, c === 2, meaning it's a dir, but we haven't
+    // had to read it yet, or c === true, meaning it's *something*
+    // but we don't have any idea what.  Need to read it, either way.
+  }
+
+  if (this.sync) {
+    var er, entries
+    try {
+      entries = fs.readdirSync(abs)
+    } catch (e) {
+      er = e
+    }
+    return this._afterReaddir(f, abs, cb, er, entries)
+  }
+
+  fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb))
+}
+
+Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) {
+  assert(this instanceof Glob)
+  if (entries && !er) {
+    this.statCache[f] = entries
+    // if we haven't asked to stat everything for suresies, then just
+    // assume that everything in there exists, so we can avoid
+    // having to stat it a second time.  This also gets us one step
+    // further into ELOOP territory.
+    if (!this.mark && !this.stat) {
+      entries.forEach(function (e) {
+        if (f === "/") e = f + e
+        else e = f + "/" + e
+        this.statCache[e] = true
+      }, this)
+    }
+
+    return cb.call(this, er, entries)
+  }
+
+  // now handle errors, and cache the information
+  if (er) switch (er.code) {
+    case "ENOTDIR": // totally normal. means it *does* exist.
+      this.statCache[f] = 1
+      return cb.call(this, er)
+    case "ENOENT": // not terribly unusual
+    case "ELOOP":
+    case "ENAMETOOLONG":
+    case "UNKNOWN":
+      this.statCache[f] = false
+      return cb.call(this, er)
+    default: // some unusual error.  Treat as failure.
+      this.statCache[f] = false
+      if (this.strict) this.emit("error", er)
+      if (!this.silent) console.error("glob error", er)
+      return cb.call(this, er)
+  }
+}
+
+var isAbsolute = process.platform === "win32" ? absWin : absUnix
+
+function absWin (p) {
+  if (absUnix(p)) return true
+  // pull off the device/UNC bit from a windows path.
+  // from node's lib/path.js
+  var splitDeviceRe =
+        /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/
+    , result = splitDeviceRe.exec(p)
+    , device = result[1] || ''
+    , isUnc = device && device.charAt(1) !== ':'
+    , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
+
+  return isAbsolute
+}
+
+function absUnix (p) {
+  return p.charAt(0) === "/" || p === ""
+}
diff --git a/tools/blog/node_modules/glob/node_modules/graceful-fs/.npmignore b/tools/blog/node_modules/glob/node_modules/graceful-fs/.npmignore
new file mode 100644 (file)
index 0000000..c2658d7
--- /dev/null
@@ -0,0 +1 @@
+node_modules/
diff --git a/tools/blog/node_modules/glob/node_modules/graceful-fs/LICENSE b/tools/blog/node_modules/glob/node_modules/graceful-fs/LICENSE
new file mode 100644 (file)
index 0000000..05a4010
--- /dev/null
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/blog/node_modules/glob/node_modules/graceful-fs/README.md b/tools/blog/node_modules/glob/node_modules/graceful-fs/README.md
new file mode 100644 (file)
index 0000000..7d2e681
--- /dev/null
@@ -0,0 +1,5 @@
+Just like node's `fs` module, but it does an incremental back-off when
+EMFILE is encountered.
+
+Useful in asynchronous situations where one needs to try to open lots
+and lots of files.
diff --git a/tools/blog/node_modules/glob/node_modules/graceful-fs/graceful-fs.js b/tools/blog/node_modules/glob/node_modules/graceful-fs/graceful-fs.js
new file mode 100644 (file)
index 0000000..ecbda31
--- /dev/null
@@ -0,0 +1,275 @@
+// this keeps a queue of opened file descriptors, and will make
+// fs operations wait until some have closed before trying to open more.
+
+var fs = require("fs")
+
+// there is such a thing as TOO graceful.
+if (fs.open === gracefulOpen) return
+
+var queue = []
+  , curOpen = 0
+  , constants = require("constants")
+
+
+exports = module.exports = fs
+
+
+fs.MIN_MAX_OPEN = 64
+fs.MAX_OPEN = 1024
+
+var originalOpen = fs.open
+  , originalOpenSync = fs.openSync
+  , originalClose = fs.close
+  , originalCloseSync = fs.closeSync
+
+
+// prevent EMFILE errors
+function OpenReq (path, flags, mode, cb) {
+  this.path = path
+  this.flags = flags
+  this.mode = mode
+  this.cb = cb
+}
+
+function noop () {}
+
+fs.open = gracefulOpen
+
+function gracefulOpen (path, flags, mode, cb) {
+  if (typeof mode === "function") cb = mode, mode = null
+  if (typeof cb !== "function") cb = noop
+
+  if (curOpen >= fs.MAX_OPEN) {
+    queue.push(new OpenReq(path, flags, mode, cb))
+    setTimeout(flush)
+    return
+  }
+  open(path, flags, mode, function (er, fd) {
+    if (er && er.code === "EMFILE" && curOpen > fs.MIN_MAX_OPEN) {
+      // that was too many.  reduce max, get back in queue.
+      // this should only happen once in a great while, and only
+      // if the ulimit -n is set lower than 1024.
+      fs.MAX_OPEN = curOpen - 1
+      return fs.open(path, flags, mode, cb)
+    }
+    cb(er, fd)
+  })
+}
+
+function open (path, flags, mode, cb) {
+  cb = cb || noop
+  curOpen ++
+  originalOpen.call(fs, path, flags, mode, function (er, fd) {
+    if (er) {
+      onclose()
+    }
+
+    cb(er, fd)
+  })
+}
+
+fs.openSync = function (path, flags, mode) {
+  curOpen ++
+  return originalOpenSync.call(fs, path, flags, mode)
+}
+
+function onclose () {
+  curOpen --
+  flush()
+}
+
+function flush () {
+  while (curOpen < fs.MAX_OPEN) {
+    var req = queue.shift()
+    if (!req) break
+    open(req.path, req.flags || "r", req.mode || 0777, req.cb)
+  }
+  if (queue.length === 0) return
+}
+
+fs.close = function (fd, cb) {
+  cb = cb || noop
+  originalClose.call(fs, fd, function (er) {
+    onclose()
+    cb(er)
+  })
+}
+
+fs.closeSync = function (fd) {
+  onclose()
+  return originalCloseSync.call(fs, fd)
+}
+
+
+// (re-)implement some things that are known busted or missing.
+
+var constants = require("constants")
+
+// lchmod, broken prior to 0.6.2
+// back-port the fix here.
+if (constants.hasOwnProperty('O_SYMLINK') &&
+    process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
+  fs.lchmod = function (path, mode, callback) {
+    callback = callback || noop
+    fs.open( path
+           , constants.O_WRONLY | constants.O_SYMLINK
+           , mode
+           , function (err, fd) {
+      if (err) {
+        callback(err)
+        return
+      }
+      // prefer to return the chmod error, if one occurs,
+      // but still try to close, and report closing errors if they occur.
+      fs.fchmod(fd, mode, function (err) {
+        fs.close(fd, function(err2) {
+          callback(err || err2)
+        })
+      })
+    })
+  }
+
+  fs.lchmodSync = function (path, mode) {
+    var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
+
+    // prefer to return the chmod error, if one occurs,
+    // but still try to close, and report closing errors if they occur.
+    var err, err2
+    try {
+      var ret = fs.fchmodSync(fd, mode)
+    } catch (er) {
+      err = er
+    }
+    try {
+      fs.closeSync(fd)
+    } catch (er) {
+      err2 = er
+    }
+    if (err || err2) throw (err || err2)
+    return ret
+  }
+}
+
+
+// lstat on windows, missing from early 0.5 versions
+// replacing with stat isn't quite perfect, but good enough to get by.
+if (process.platform === "win32" && !process.binding("fs").lstat) {
+  fs.lstat = fs.stat
+  fs.lstatSync = fs.statSync
+}
+
+
+// lutimes implementation, or no-op
+if (!fs.lutimes) {
+  if (constants.hasOwnProperty("O_SYMLINK")) {
+    fs.lutimes = function (path, at, mt, cb) {
+      fs.open(path, constants.O_SYMLINK, function (er, fd) {
+        cb = cb || noop
+        if (er) return cb(er)
+        fs.futimes(fd, at, mt, function (er) {
+          fs.close(fd, function (er2) {
+            return cb(er || er2)
+          })
+        })
+      })
+    }
+
+    fs.lutimesSync = function (path, at, mt) {
+      var fd = fs.openSync(path, constants.O_SYMLINK)
+        , err
+        , err2
+        , ret
+
+      try {
+        var ret = fs.futimesSync(fd, at, mt)
+      } catch (er) {
+        err = er
+      }
+      try {
+        fs.closeSync(fd)
+      } catch (er) {
+        err2 = er
+      }
+      if (err || err2) throw (err || err2)
+      return ret
+    }
+
+  } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
+    // maybe utimensat will be bound soonish?
+    fs.lutimes = function (path, at, mt, cb) {
+      fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
+    }
+
+    fs.lutimesSync = function (path, at, mt) {
+      return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
+    }
+
+  } else {
+    fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
+    fs.lutimesSync = function () {}
+  }
+}
+
+
+// https://github.com/isaacs/node-graceful-fs/issues/4
+// Chown should not fail on einval or eperm if non-root.
+
+fs.chown = chownFix(fs.chown)
+fs.fchown = chownFix(fs.fchown)
+fs.lchown = chownFix(fs.lchown)
+
+fs.chownSync = chownFixSync(fs.chownSync)
+fs.fchownSync = chownFixSync(fs.fchownSync)
+fs.lchownSync = chownFixSync(fs.lchownSync)
+
+function chownFix (orig) {
+  if (!orig) return orig
+  return function (target, uid, gid, cb) {
+    return orig.call(fs, target, uid, gid, function (er, res) {
+      if (chownErOk(er)) er = null
+      cb(er, res)
+    })
+  }
+}
+
+function chownFixSync (orig) {
+  if (!orig) return orig
+  return function (target, uid, gid) {
+    try {
+      return orig.call(fs, target, uid, gid)
+    } catch (er) {
+      if (!chownErOk(er)) throw er
+    }
+  }
+}
+
+function chownErOk (er) {
+  // if there's no getuid, or if getuid() is something other than 0,
+  // and the error is EINVAL or EPERM, then just ignore it.
+  // This specific case is a silent failure in cp, install, tar,
+  // and most other unix tools that manage permissions.
+  // When running as root, or if other types of errors are encountered,
+  // then it's strict.
+  if (!er || (!process.getuid || process.getuid() !== 0)
+      && (er.code === "EINVAL" || er.code === "EPERM")) return true
+}
+
+
+
+// on Windows, A/V software can lock the directory, causing this
+// to fail with an EACCES or EPERM if the directory contains newly
+// created files.  Try again on failure, for up to 1 second.
+if (process.platform === "win32") {
+  var rename_ = fs.rename
+  fs.rename = function rename (from, to, cb) {
+    var start = Date.now()
+    rename_(from, to, function CB (er) {
+      if (er
+          && (er.code === "EACCES" || er.code === "EPERM")
+          && Date.now() - start < 1000) {
+        return rename_(from, to, CB)
+      }
+      cb(er)
+    })
+  }
+}
diff --git a/tools/blog/node_modules/glob/node_modules/graceful-fs/package.json b/tools/blog/node_modules/glob/node_modules/graceful-fs/package.json
new file mode 100644 (file)
index 0000000..36f3584
--- /dev/null
@@ -0,0 +1,22 @@
+{
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me",
+    "url": "http://blog.izs.me"
+  },
+  "name": "graceful-fs",
+  "description": "Just like node's `fs` module, but it does an incremental back-off when EMFILE is encountered.",
+  "version": "1.1.8",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/node-graceful-fs.git"
+  },
+  "main": "graceful-fs.js",
+  "engines": {
+    "node": ">=0.4.0"
+  },
+  "devDependencies": {},
+  "readme": "Just like node's `fs` module, but it does an incremental back-off when\nEMFILE is encountered.\n\nUseful in asynchronous situations where one needs to try to open lots\nand lots of files.\n",
+  "_id": "graceful-fs@1.1.8",
+  "_from": "graceful-fs@~1.1.2"
+}
diff --git a/tools/blog/node_modules/glob/node_modules/inherits/README.md b/tools/blog/node_modules/glob/node_modules/inherits/README.md
new file mode 100644 (file)
index 0000000..b2beaed
--- /dev/null
@@ -0,0 +1,51 @@
+A dead simple way to do inheritance in JS.
+
+    var inherits = require("inherits")
+
+    function Animal () {
+      this.alive = true
+    }
+    Animal.prototype.say = function (what) {
+      console.log(what)
+    }
+
+    inherits(Dog, Animal)
+    function Dog () {
+      Dog.super.apply(this)
+    }
+    Dog.prototype.sniff = function () {
+      this.say("sniff sniff")
+    }
+    Dog.prototype.bark = function () {
+      this.say("woof woof")
+    }
+
+    inherits(Chihuahua, Dog)
+    function Chihuahua () {
+      Chihuahua.super.apply(this)
+    }
+    Chihuahua.prototype.bark = function () {
+      this.say("yip yip")
+    }
+
+    // also works
+    function Cat () {
+      Cat.super.apply(this)
+    }
+    Cat.prototype.hiss = function () {
+      this.say("CHSKKSS!!")
+    }
+    inherits(Cat, Animal, {
+      meow: function () { this.say("miao miao") }
+    })
+    Cat.prototype.purr = function () {
+      this.say("purr purr")
+    }
+
+
+    var c = new Chihuahua
+    assert(c instanceof Chihuahua)
+    assert(c instanceof Dog)
+    assert(c instanceof Animal)
+
+The actual function is laughably small.  10-lines small.
diff --git a/tools/blog/node_modules/glob/node_modules/inherits/inherits.js b/tools/blog/node_modules/glob/node_modules/inherits/inherits.js
new file mode 100644 (file)
index 0000000..061b396
--- /dev/null
@@ -0,0 +1,29 @@
+module.exports = inherits
+
+function inherits (c, p, proto) {
+  proto = proto || {}
+  var e = {}
+  ;[c.prototype, proto].forEach(function (s) {
+    Object.getOwnPropertyNames(s).forEach(function (k) {
+      e[k] = Object.getOwnPropertyDescriptor(s, k)
+    })
+  })
+  c.prototype = Object.create(p.prototype, e)
+  c.super = p
+}
+
+//function Child () {
+//  Child.super.call(this)
+//  console.error([this
+//                ,this.constructor
+//                ,this.constructor === Child
+//                ,this.constructor.super === Parent
+//                ,Object.getPrototypeOf(this) === Child.prototype
+//                ,Object.getPrototypeOf(Object.getPrototypeOf(this))
+//                 === Parent.prototype
+//                ,this instanceof Child
+//                ,this instanceof Parent])
+//}
+//function Parent () {}
+//inherits(Child, Parent)
+//new Child
diff --git a/tools/blog/node_modules/glob/node_modules/inherits/package.json b/tools/blog/node_modules/glob/node_modules/inherits/package.json
new file mode 100644 (file)
index 0000000..6435eb6
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "name": "inherits",
+  "description": "A dead simple way to do inheritance in JS.",
+  "version": "1.0.0",
+  "keywords": [
+    "inheritance",
+    "class",
+    "klass",
+    "oop",
+    "object-oriented"
+  ],
+  "main": "./inherits.js",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/isaacs/inherits"
+  },
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me",
+    "url": "http://blog.izs.me/"
+  },
+  "readme": "A dead simple way to do inheritance in JS.\n\n    var inherits = require(\"inherits\")\n\n    function Animal () {\n      this.alive = true\n    }\n    Animal.prototype.say = function (what) {\n      console.log(what)\n    }\n\n    inherits(Dog, Animal)\n    function Dog () {\n      Dog.super.apply(this)\n    }\n    Dog.prototype.sniff = function () {\n      this.say(\"sniff sniff\")\n    }\n    Dog.prototype.bark = function () {\n      this.say(\"woof woof\")\n    }\n\n    inherits(Chihuahua, Dog)\n    function Chihuahua () {\n      Chihuahua.super.apply(this)\n    }\n    Chihuahua.prototype.bark = function () {\n      this.say(\"yip yip\")\n    }\n\n    // also works\n    function Cat () {\n      Cat.super.apply(this)\n    }\n    Cat.prototype.hiss = function () {\n      this.say(\"CHSKKSS!!\")\n    }\n    inherits(Cat, Animal, {\n      meow: function () { this.say(\"miao miao\") }\n    })\n    Cat.prototype.purr = function () {\n      this.say(\"purr purr\")\n    }\n\n\n    var c = new Chihuahua\n    assert(c instanceof Chihuahua)\n    assert(c instanceof Dog)\n    assert(c instanceof Animal)\n\nThe actual function is laughably small.  10-lines small.\n",
+  "_id": "inherits@1.0.0",
+  "_from": "inherits@1"
+}
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/.travis.yml b/tools/blog/node_modules/glob/node_modules/minimatch/.travis.yml
new file mode 100644 (file)
index 0000000..f1d0f13
--- /dev/null
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+  - 0.4
+  - 0.6
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/LICENSE b/tools/blog/node_modules/glob/node_modules/minimatch/LICENSE
new file mode 100644 (file)
index 0000000..05a4010
--- /dev/null
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/README.md b/tools/blog/node_modules/glob/node_modules/minimatch/README.md
new file mode 100644 (file)
index 0000000..6fd07d2
--- /dev/null
@@ -0,0 +1,218 @@
+# minimatch
+
+A minimal matching utility.
+
+[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)
+
+
+This is the matching library used internally by npm.
+
+Eventually, it will replace the C binding in node-glob.
+
+It works by converting glob expressions into JavaScript `RegExp`
+objects.
+
+## Usage
+
+```javascript
+var minimatch = require("minimatch")
+
+minimatch("bar.foo", "*.foo") // true!
+minimatch("bar.foo", "*.bar") // false!
+```
+
+## Features
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+
+### Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated.  Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally.  This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything.  Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set.  This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.  **Note that this is different from the way that `**` is
+handled by ruby's `Dir` class.**
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then minimatch.match returns the pattern as-provided, rather than
+interpreting the character escapes.  For example,
+`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`.  This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern.  Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity.  Since those two are valid, matching proceeds.
+
+
+## Minimatch Class
+
+Create a minimatch object by instanting the `minimatch.Minimatch` class.
+
+```javascript
+var Minimatch = require("minimatch").Minimatch
+var mm = new Minimatch(pattern, options)
+```
+
+### Properties
+
+* `pattern` The original pattern the minimatch object represents.
+* `options` The options supplied to the constructor.
+* `set` A 2-dimensional array of regexp or string expressions.
+  Each row in the
+  array corresponds to a brace-expanded pattern.  Each item in the row
+  corresponds to a single path-part.  For example, the pattern
+  `{a,b/c}/d` would expand to a set of patterns like:
+
+        [ [ a, d ]
+        , [ b, c, d ] ]
+
+    If a portion of the pattern doesn't have any "magic" in it
+    (that is, it's something like `"foo"` rather than `fo*o?`), then it
+    will be left as a string rather than converted to a regular
+    expression.
+
+* `regexp` Created by the `makeRe` method.  A single regular expression
+  expressing the entire pattern.  This is useful in cases where you wish
+  to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+* `negate` True if the pattern is negated.
+* `comment` True if the pattern is a comment.
+* `empty` True if the pattern is `""`.
+
+### Methods
+
+* `makeRe` Generate the `regexp` member if necessary, and return it.
+  Will return `false` if the pattern is invalid.
+* `match(fname)` Return true if the filename matches the pattern, or
+  false otherwise.
+* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
+  filename, and match it against a single row in the `regExpSet`.  This
+  method is mainly for internal use, but is exposed so that it can be
+  used by a glob-walker that needs to avoid excessive filesystem calls.
+
+All other methods are internal, and will be called as necessary.
+
+## Functions
+
+The top-level exported function has a `cache` property, which is an LRU
+cache set to store 100 items.  So, calling these methods repeatedly
+with the same pattern and options will use the same Minimatch object,
+saving the cost of parsing it multiple times.
+
+### minimatch(path, pattern, options)
+
+Main export.  Tests a path against the pattern using the options.
+
+```javascript
+var isJS = minimatch(file, "*.js", { matchBase: true })
+```
+
+### minimatch.filter(pattern, options)
+
+Returns a function that tests its
+supplied argument, suitable for use with `Array.filter`.  Example:
+
+```javascript
+var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
+```
+
+### minimatch.match(list, pattern, options)
+
+Match against the list of
+files, in the style of fnmatch or glob.  If nothing is matched, and
+options.nonull is set, then return a list containing the pattern itself.
+
+```javascript
+var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
+```
+
+### minimatch.makeRe(pattern, options)
+
+Make a regular expression object from the pattern.
+
+## Options
+
+All options are `false` by default.
+
+### debug
+
+Dump a ton of stuff to stderr.
+
+### nobrace
+
+Do not expand `{a,b}` and `{1..3}` brace sets.
+
+### noglobstar
+
+Disable `**` matching against multiple folder names.
+
+### dot
+
+Allow patterns to match filenames starting with a period, even if
+the pattern does not explicitly have a period in that spot.
+
+Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
+is set.
+
+### noext
+
+Disable "extglob" style patterns like `+(a|b)`.
+
+### nocase
+
+Perform a case-insensitive match.
+
+### nonull
+
+When a match is not found by `minimatch.match`, return a list containing
+the pattern itself.  When set, an empty list is returned if there are
+no matches.
+
+### matchBase
+
+If set, then patterns without slashes will be matched
+against the basename of the path if it contains slashes.  For example,
+`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
+
+### nocomment
+
+Suppress the behavior of treating `#` at the start of a pattern as a
+comment.
+
+### nonegate
+
+Suppress the behavior of treating a leading `!` character as negation.
+
+### flipNegate
+
+Returns from negate expressions the same as if they were not negated.
+(Ie, true on a hit, false on a miss.)
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/minimatch.js b/tools/blog/node_modules/glob/node_modules/minimatch/minimatch.js
new file mode 100644 (file)
index 0000000..0087359
--- /dev/null
@@ -0,0 +1,1052 @@
+;(function (require, exports, module, platform) {
+
+if (module) module.exports = minimatch
+else exports.minimatch = minimatch
+
+if (!require) {
+  require = function (id) {
+    switch (id) {
+      case "path": return { basename: function (f) {
+        f = f.split(/[\/\\]/)
+        var e = f.pop()
+        if (!e) e = f.pop()
+        return e
+      }}
+      case "lru-cache": return function LRUCache () {
+        // not quite an LRU, but still space-limited.
+        var cache = {}
+        var cnt = 0
+        this.set = function (k, v) {
+          cnt ++
+          if (cnt >= 100) cache = {}
+          cache[k] = v
+        }
+        this.get = function (k) { return cache[k] }
+      }
+    }
+  }
+}
+
+minimatch.Minimatch = Minimatch
+
+var LRU = require("lru-cache")
+  , cache = minimatch.cache = new LRU(100)
+  , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+
+var path = require("path")
+  // any single thing other than /
+  // don't need to escape / when using new RegExp()
+  , qmark = "[^/]"
+
+  // * => any number of characters
+  , star = qmark + "*?"
+
+  // ** when dots are allowed.  Anything goes, except .. and .
+  // not (^ or / followed by one or two dots followed by $ or /),
+  // followed by anything, any number of times.
+  , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?"
+
+  // not a ^ or / followed by a dot,
+  // followed by anything, any number of times.
+  , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?"
+
+  // characters that need to be escaped in RegExp.
+  , reSpecials = charSet("().*{}+?[]^$\\!")
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+  return s.split("").reduce(function (set, c) {
+    set[c] = true
+    return set
+  }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
+
+minimatch.monkeyPatch = monkeyPatch
+function monkeyPatch () {
+  var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")
+  var orig = desc.value
+  desc.value = function (p) {
+    if (p instanceof Minimatch) return p.match(this)
+    return orig.call(this, p)
+  }
+  Object.defineProperty(String.prototype, desc)
+}
+
+minimatch.filter = filter
+function filter (pattern, options) {
+  options = options || {}
+  return function (p, i, list) {
+    return minimatch(p, pattern, options)
+  }
+}
+
+function ext (a, b) {
+  a = a || {}
+  b = b || {}
+  var t = {}
+  Object.keys(b).forEach(function (k) {
+    t[k] = b[k]
+  })
+  Object.keys(a).forEach(function (k) {
+    t[k] = a[k]
+  })
+  return t
+}
+
+minimatch.defaults = function (def) {
+  if (!def || !Object.keys(def).length) return minimatch
+
+  var orig = minimatch
+
+  var m = function minimatch (p, pattern, options) {
+    return orig.minimatch(p, pattern, ext(def, options))
+  }
+
+  m.Minimatch = function Minimatch (pattern, options) {
+    return new orig.Minimatch(pattern, ext(def, options))
+  }
+
+  return m
+}
+
+Minimatch.defaults = function (def) {
+  if (!def || !Object.keys(def).length) return Minimatch
+  return minimatch.defaults(def).Minimatch
+}
+
+
+function minimatch (p, pattern, options) {
+  if (typeof pattern !== "string") {
+    throw new TypeError("glob pattern string required")
+  }
+
+  if (!options) options = {}
+
+  // shortcut: comments match nothing.
+  if (!options.nocomment && pattern.charAt(0) === "#") {
+    return false
+  }
+
+  // "" only matches ""
+  if (pattern.trim() === "") return p === ""
+
+  return new Minimatch(pattern, options).match(p)
+}
+
+function Minimatch (pattern, options) {
+  if (!(this instanceof Minimatch)) {
+    return new Minimatch(pattern, options, cache)
+  }
+
+  if (typeof pattern !== "string") {
+    throw new TypeError("glob pattern string required")
+  }
+
+  if (!options) options = {}
+  pattern = pattern.trim()
+
+  // lru storage.
+  // these things aren't particularly big, but walking down the string
+  // and turning it into a regexp can get pretty costly.
+  var cacheKey = pattern + "\n" + Object.keys(options).filter(function (k) {
+    return options[k]
+  }).join(":")
+  var cached = minimatch.cache.get(cacheKey)
+  if (cached) return cached
+  minimatch.cache.set(cacheKey, this)
+
+  this.options = options
+  this.set = []
+  this.pattern = pattern
+  this.regexp = null
+  this.negate = false
+  this.comment = false
+  this.empty = false
+
+  // make the set of regexps etc.
+  this.make()
+}
+
+Minimatch.prototype.make = make
+function make () {
+  // don't do it more than once.
+  if (this._made) return
+
+  var pattern = this.pattern
+  var options = this.options
+
+  // empty patterns and comments match nothing.
+  if (!options.nocomment && pattern.charAt(0) === "#") {
+    this.comment = true
+    return
+  }
+  if (!pattern) {
+    this.empty = true
+    return
+  }
+
+  // step 1: figure out negation, etc.
+  this.parseNegate()
+
+  // step 2: expand braces
+  var set = this.globSet = this.braceExpand()
+
+  if (options.debug) console.error(this.pattern, set)
+
+  // step 3: now we have a set, so turn each one into a series of path-portion
+  // matching patterns.
+  // These will be regexps, except in the case of "**", which is
+  // set to the GLOBSTAR object for globstar behavior,
+  // and will not contain any / characters
+  set = this.globParts = set.map(function (s) {
+    return s.split(slashSplit)
+  })
+
+  if (options.debug) console.error(this.pattern, set)
+
+  // glob --> regexps
+  set = set.map(function (s, si, set) {
+    return s.map(this.parse, this)
+  }, this)
+
+  if (options.debug) console.error(this.pattern, set)
+
+  // filter out everything that didn't compile properly.
+  set = set.filter(function (s) {
+    return -1 === s.indexOf(false)
+  })
+
+  if (options.debug) console.error(this.pattern, set)
+
+  this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+  var pattern = this.pattern
+    , negate = false
+    , options = this.options
+    , negateOffset = 0
+
+  if (options.nonegate) return
+
+  for ( var i = 0, l = pattern.length
+      ; i < l && pattern.charAt(i) === "!"
+      ; i ++) {
+    negate = !negate
+    negateOffset ++
+  }
+
+  if (negateOffset) this.pattern = pattern.substr(negateOffset)
+  this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+  return new Minimatch(pattern, options).braceExpand()
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+function braceExpand (pattern, options) {
+  options = options || this.options
+  pattern = typeof pattern === "undefined"
+    ? this.pattern : pattern
+
+  if (typeof pattern === "undefined") {
+    throw new Error("undefined pattern")
+  }
+
+  if (options.nobrace ||
+      !pattern.match(/\{.*\}/)) {
+    // shortcut. no need to expand.
+    return [pattern]
+  }
+
+  var escaping = false
+
+  // examples and comments refer to this crazy pattern:
+  // a{b,c{d,e},{f,g}h}x{y,z}
+  // expected:
+  // abxy
+  // abxz
+  // acdxy
+  // acdxz
+  // acexy
+  // acexz
+  // afhxy
+  // afhxz
+  // aghxy
+  // aghxz
+
+  // everything before the first \{ is just a prefix.
+  // So, we pluck that off, and work with the rest,
+  // and then prepend it to everything we find.
+  if (pattern.charAt(0) !== "{") {
+    // console.error(pattern)
+    var prefix = null
+    for (var i = 0, l = pattern.length; i < l; i ++) {
+      var c = pattern.charAt(i)
+      // console.error(i, c)
+      if (c === "\\") {
+        escaping = !escaping
+      } else if (c === "{" && !escaping) {
+        prefix = pattern.substr(0, i)
+        break
+      }
+    }
+
+    // actually no sets, all { were escaped.
+    if (prefix === null) {
+      // console.error("no sets")
+      return [pattern]
+    }
+
+    var tail = braceExpand(pattern.substr(i), options)
+    return tail.map(function (t) {
+      return prefix + t
+    })
+  }
+
+  // now we have something like:
+  // {b,c{d,e},{f,g}h}x{y,z}
+  // walk through the set, expanding each part, until
+  // the set ends.  then, we'll expand the suffix.
+  // If the set only has a single member, then'll put the {} back
+
+  // first, handle numeric sets, since they're easier
+  var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/)
+  if (numset) {
+    // console.error("numset", numset[1], numset[2])
+    var suf = braceExpand(pattern.substr(numset[0].length), options)
+      , start = +numset[1]
+      , end = +numset[2]
+      , inc = start > end ? -1 : 1
+      , set = []
+    for (var i = start; i != (end + inc); i += inc) {
+      // append all the suffixes
+      for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+        set.push(i + suf[ii])
+      }
+    }
+    return set
+  }
+
+  // ok, walk through the set
+  // We hope, somewhat optimistically, that there
+  // will be a } at the end.
+  // If the closing brace isn't found, then the pattern is
+  // interpreted as braceExpand("\\" + pattern) so that
+  // the leading \{ will be interpreted literally.
+  var i = 1 // skip the \{
+    , depth = 1
+    , set = []
+    , member = ""
+    , sawEnd = false
+    , escaping = false
+
+  function addMember () {
+    set.push(member)
+    member = ""
+  }
+
+  // console.error("Entering for")
+  FOR: for (i = 1, l = pattern.length; i < l; i ++) {
+    var c = pattern.charAt(i)
+    // console.error("", i, c)
+
+    if (escaping) {
+      escaping = false
+      member += "\\" + c
+    } else {
+      switch (c) {
+        case "\\":
+          escaping = true
+          continue
+
+        case "{":
+          depth ++
+          member += "{"
+          continue
+
+        case "}":
+          depth --
+          // if this closes the actual set, then we're done
+          if (depth === 0) {
+            addMember()
+            // pluck off the close-brace
+            i ++
+            break FOR
+          } else {
+            member += c
+            continue
+          }
+
+        case ",":
+          if (depth === 1) {
+            addMember()
+          } else {
+            member += c
+          }
+          continue
+
+        default:
+          member += c
+          continue
+      } // switch
+    } // else
+  } // for
+
+  // now we've either finished the set, and the suffix is
+  // pattern.substr(i), or we have *not* closed the set,
+  // and need to escape the leading brace
+  if (depth !== 0) {
+    // console.error("didn't close", pattern)
+    return braceExpand("\\" + pattern, options)
+  }
+
+  // x{y,z} -> ["xy", "xz"]
+  // console.error("set", set)
+  // console.error("suffix", pattern.substr(i))
+  var suf = braceExpand(pattern.substr(i), options)
+  // ["b", "c{d,e}","{f,g}h"] ->
+  //   [["b"], ["cd", "ce"], ["fh", "gh"]]
+  var addBraces = set.length === 1
+  // console.error("set pre-expanded", set)
+  set = set.map(function (p) {
+    return braceExpand(p, options)
+  })
+  // console.error("set expanded", set)
+
+
+  // [["b"], ["cd", "ce"], ["fh", "gh"]] ->
+  //   ["b", "cd", "ce", "fh", "gh"]
+  set = set.reduce(function (l, r) {
+    return l.concat(r)
+  })
+
+  if (addBraces) {
+    set = set.map(function (s) {
+      return "{" + s + "}"
+    })
+  }
+
+  // now attach the suffixes.
+  var ret = []
+  for (var i = 0, l = set.length; i < l; i ++) {
+    for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+      ret.push(set[i] + suf[ii])
+    }
+  }
+  return ret
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion.  Otherwise, any series
+// of * is equivalent to a single *.  Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+  var options = this.options
+
+  // shortcuts
+  if (!options.noglobstar && pattern === "**") return GLOBSTAR
+  if (pattern === "") return ""
+
+  var re = ""
+    , hasMagic = false
+    , escaping = false
+    // ? => one single character
+    , patternListStack = []
+    , plType
+    , stateChar
+    , inClass = false
+    , reClassStart = -1
+    , classStart = -1
+    // . and .. never match anything that doesn't start with .,
+    // even when options.dot is set.
+    , patternStart = pattern.charAt(0) === "." ? "" // anything
+      // not (start or / followed by . or .. followed by / or end)
+      : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
+      : "(?!\\.)"
+
+  function clearStateChar () {
+    if (stateChar) {
+      // we had some state-tracking character
+      // that wasn't consumed by this pass.
+      switch (stateChar) {
+        case "*":
+          re += star
+          hasMagic = true
+          break
+        case "?":
+          re += qmark
+          hasMagic = true
+          break
+        default:
+          re += "\\"+stateChar
+          break
+      }
+      stateChar = false
+    }
+  }
+
+  for ( var i = 0, len = pattern.length, c
+      ; (i < len) && (c = pattern.charAt(i))
+      ; i ++ ) {
+
+    if (options.debug) {
+      console.error("%s\t%s %s %j", pattern, i, re, c)
+    }
+
+    // skip over any that are escaped.
+    if (escaping && reSpecials[c]) {
+      re += "\\" + c
+      escaping = false
+      continue
+    }
+
+    SWITCH: switch (c) {
+      case "/":
+        // completely not allowed, even escaped.
+        // Should already be path-split by now.
+        return false
+
+      case "\\":
+        clearStateChar()
+        escaping = true
+        continue
+
+      // the various stateChar values
+      // for the "extglob" stuff.
+      case "?":
+      case "*":
+      case "+":
+      case "@":
+      case "!":
+        if (options.debug) {
+          console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
+        }
+
+        // all of those are literals inside a class, except that
+        // the glob [!a] means [^a] in regexp
+        if (inClass) {
+          if (c === "!" && i === classStart + 1) c = "^"
+          re += c
+          continue
+        }
+
+        // if we already have a stateChar, then it means
+        // that there was something like ** or +? in there.
+        // Handle the stateChar, then proceed with this one.
+        clearStateChar()
+        stateChar = c
+        // if extglob is disabled, then +(asdf|foo) isn't a thing.
+        // just clear the statechar *now*, rather than even diving into
+        // the patternList stuff.
+        if (options.noext) clearStateChar()
+        continue
+
+      case "(":
+        if (inClass) {
+          re += "("
+          continue
+        }
+
+        if (!stateChar) {
+          re += "\\("
+          continue
+        }
+
+        plType = stateChar
+        patternListStack.push({ type: plType
+                              , start: i - 1
+                              , reStart: re.length })
+        // negation is (?:(?!js)[^/]*)
+        re += stateChar === "!" ? "(?:(?!" : "(?:"
+        stateChar = false
+        continue
+
+      case ")":
+        if (inClass || !patternListStack.length) {
+          re += "\\)"
+          continue
+        }
+
+        hasMagic = true
+        re += ")"
+        plType = patternListStack.pop().type
+        // negation is (?:(?!js)[^/]*)
+        // The others are (?:<pattern>)<type>
+        switch (plType) {
+          case "!":
+            re += "[^/]*?)"
+            break
+          case "?":
+          case "+":
+          case "*": re += plType
+          case "@": break // the default anyway
+        }
+        continue
+
+      case "|":
+        if (inClass || !patternListStack.length || escaping) {
+          re += "\\|"
+          escaping = false
+          continue
+        }
+
+        re += "|"
+        continue
+
+      // these are mostly the same in regexp and glob
+      case "[":
+        // swallow any state-tracking char before the [
+        clearStateChar()
+
+        if (inClass) {
+          re += "\\" + c
+          continue
+        }
+
+        inClass = true
+        classStart = i
+        reClassStart = re.length
+        re += c
+        continue
+
+      case "]":
+        //  a right bracket shall lose its special
+        //  meaning and represent itself in
+        //  a bracket expression if it occurs
+        //  first in the list.  -- POSIX.2 2.8.3.2
+        if (i === classStart + 1 || !inClass) {
+          re += "\\" + c
+          escaping = false
+          continue
+        }
+
+        // finish up the class.
+        hasMagic = true
+        inClass = false
+        re += c
+        continue
+
+      default:
+        // swallow any state char that wasn't consumed
+        clearStateChar()
+
+        if (escaping) {
+          // no need
+          escaping = false
+        } else if (reSpecials[c]
+                   && !(c === "^" && inClass)) {
+          re += "\\"
+        }
+
+        re += c
+
+    } // switch
+  } // for
+
+
+  // handle the case where we left a class open.
+  // "[abc" is valid, equivalent to "\[abc"
+  if (inClass) {
+    // split where the last [ was, and escape it
+    // this is a huge pita.  We now have to re-walk
+    // the contents of the would-be class to re-translate
+    // any characters that were passed through as-is
+    var cs = pattern.substr(classStart + 1)
+      , sp = this.parse(cs, SUBPARSE)
+    re = re.substr(0, reClassStart) + "\\[" + sp[0]
+    hasMagic = hasMagic || sp[1]
+  }
+
+  // handle the case where we had a +( thing at the *end*
+  // of the pattern.
+  // each pattern list stack adds 3 chars, and we need to go through
+  // and escape any | chars that were passed through as-is for the regexp.
+  // Go through and escape them, taking care not to double-escape any
+  // | chars that were already escaped.
+  var pl
+  while (pl = patternListStack.pop()) {
+    var tail = re.slice(pl.reStart + 3)
+    // maybe some even number of \, then maybe 1 \, followed by a |
+    tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
+      if (!$2) {
+        // the | isn't already escaped, so escape it.
+        $2 = "\\"
+      }
+
+      // need to escape all those slashes *again*, without escaping the
+      // one that we need for escaping the | character.  As it works out,
+      // escaping an even number of slashes can be done by simply repeating
+      // it exactly after itself.  That's why this trick works.
+      //
+      // I am sorry that you have to see this.
+      return $1 + $1 + $2 + "|"
+    })
+
+    // console.error("tail=%j\n   %s", tail, tail)
+    var t = pl.type === "*" ? star
+          : pl.type === "?" ? qmark
+          : "\\" + pl.type
+
+    hasMagic = true
+    re = re.slice(0, pl.reStart)
+       + t + "\\("
+       + tail
+  }
+
+  // handle trailing things that only matter at the very end.
+  clearStateChar()
+  if (escaping) {
+    // trailing \\
+    re += "\\\\"
+  }
+
+  // only need to apply the nodot start if the re starts with
+  // something that could conceivably capture a dot
+  var addPatternStart = false
+  switch (re.charAt(0)) {
+    case ".":
+    case "[":
+    case "(": addPatternStart = true
+  }
+
+  // if the re is not "" at this point, then we need to make sure
+  // it doesn't match against an empty path part.
+  // Otherwise a/* will match a/, which it should not.
+  if (re !== "" && hasMagic) re = "(?=.)" + re
+
+  if (addPatternStart) re = patternStart + re
+
+  // parsing just a piece of a larger pattern.
+  if (isSub === SUBPARSE) {
+    return [ re, hasMagic ]
+  }
+
+  // skip the regexp for non-magical patterns
+  // unescape anything in it, though, so that it'll be
+  // an exact match against a file etc.
+  if (!hasMagic) {
+    return globUnescape(pattern)
+  }
+
+  var flags = options.nocase ? "i" : ""
+    , regExp = new RegExp("^" + re + "$", flags)
+
+  regExp._glob = pattern
+  regExp._src = re
+
+  return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+  return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+  if (this.regexp || this.regexp === false) return this.regexp
+
+  // at this point, this.set is a 2d array of partial
+  // pattern strings, or "**".
+  //
+  // It's better to use .match().  This function shouldn't
+  // be used, really, but it's pretty convenient sometimes,
+  // when you just want to work with a regex.
+  var set = this.set
+
+  if (!set.length) return this.regexp = false
+  var options = this.options
+
+  var twoStar = options.noglobstar ? star
+      : options.dot ? twoStarDot
+      : twoStarNoDot
+    , flags = options.nocase ? "i" : ""
+
+  var re = set.map(function (pattern) {
+    return pattern.map(function (p) {
+      return (p === GLOBSTAR) ? twoStar
+           : (typeof p === "string") ? regExpEscape(p)
+           : p._src
+    }).join("\\\/")
+  }).join("|")
+
+  // must match entire pattern
+  // ending in a * or ** will make it less strict.
+  re = "^" + re + "$"
+
+  // can match anything, as long as it's not this.
+  if (this.negate) re = "^(?!" + re + ").*$"
+
+  try {
+    return this.regexp = new RegExp(re, flags)
+  } catch (ex) {
+    return this.regexp = false
+  }
+}
+
+minimatch.match = function (list, pattern, options) {
+  var mm = new Minimatch(pattern, options)
+  list = list.filter(function (f) {
+    return mm.match(f)
+  })
+  if (options.nonull && !list.length) {
+    list.push(pattern)
+  }
+  return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+  // console.error("match", f, this.pattern)
+  // short-circuit in the case of busted things.
+  // comments, etc.
+  if (this.comment) return false
+  if (this.empty) return f === ""
+
+  if (f === "/" && partial) return true
+
+  var options = this.options
+
+  // windows: need to use /, not \
+  // On other platforms, \ is a valid (albeit bad) filename char.
+  if (platform === "win32") {
+    f = f.split("\\").join("/")
+  }
+
+  // treat the test path as a set of pathparts.
+  f = f.split(slashSplit)
+  if (options.debug) {
+    console.error(this.pattern, "split", f)
+  }
+
+  // just ONE of the pattern sets in this.set needs to match
+  // in order for it to be valid.  If negating, then just one
+  // match means that we have failed.
+  // Either way, return on the first hit.
+
+  var set = this.set
+  // console.error(this.pattern, "set", set)
+
+  for (var i = 0, l = set.length; i < l; i ++) {
+    var pattern = set[i]
+    var hit = this.matchOne(f, pattern, partial)
+    if (hit) {
+      if (options.flipNegate) return true
+      return !this.negate
+    }
+  }
+
+  // didn't get any hits.  this is success if it's a negative
+  // pattern, failure otherwise.
+  if (options.flipNegate) return false
+  return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+  var options = this.options
+
+  if (options.debug) {
+    console.error("matchOne",
+                  { "this": this
+                  , file: file
+                  , pattern: pattern })
+  }
+
+  if (options.matchBase && pattern.length === 1) {
+    file = path.basename(file.join("/")).split("/")
+  }
+
+  if (options.debug) {
+    console.error("matchOne", file.length, pattern.length)
+  }
+
+  for ( var fi = 0
+          , pi = 0
+          , fl = file.length
+          , pl = pattern.length
+      ; (fi < fl) && (pi < pl)
+      ; fi ++, pi ++ ) {
+
+    if (options.debug) {
+      console.error("matchOne loop")
+    }
+    var p = pattern[pi]
+      , f = file[fi]
+
+    if (options.debug) {
+      console.error(pattern, p, f)
+    }
+
+    // should be impossible.
+    // some invalid regexp stuff in the set.
+    if (p === false) return false
+
+    if (p === GLOBSTAR) {
+      // "**"
+      // a/**/b/**/c would match the following:
+      // a/b/x/y/z/c
+      // a/x/y/z/b/c
+      // a/b/x/b/x/c
+      // a/b/c
+      // To do this, take the rest of the pattern after
+      // the **, and see if it would match the file remainder.
+      // If so, return success.
+      // If not, the ** "swallows" a segment, and try again.
+      // This is recursively awful.
+      // a/b/x/y/z/c
+      // - a matches a
+      // - doublestar
+      //   - matchOne(b/x/y/z/c, b/**/c)
+      //     - b matches b
+      //     - doublestar
+      //       - matchOne(x/y/z/c, c) -> no
+      //       - matchOne(y/z/c, c) -> no
+      //       - matchOne(z/c, c) -> no
+      //       - matchOne(c, c) yes, hit
+      var fr = fi
+        , pr = pi + 1
+      if (pr === pl) {
+        // a ** at the end will just swallow the rest.
+        // We have found a match.
+        // however, it will not swallow /.x, unless
+        // options.dot is set.
+        // . and .. are *never* matched by **, for explosively
+        // exponential reasons.
+        for ( ; fi < fl; fi ++) {
+          if (file[fi] === "." || file[fi] === ".." ||
+              (!options.dot && file[fi].charAt(0) === ".")) return false
+        }
+        return true
+      }
+
+      // ok, let's see if we can swallow whatever we can.
+      WHILE: while (fr < fl) {
+        var swallowee = file[fr]
+        if (swallowee === "." || swallowee === ".." ||
+            (!options.dot && swallowee.charAt(0) === ".")) {
+          // console.error("dot detected!")
+          break WHILE
+        }
+
+        // XXX remove this slice.  Just pass the start index.
+        if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+          // found a match.
+          return true
+        } else {
+          // ** swallows a segment, and continue.
+          fr ++
+        }
+      }
+      // no match was found.
+      // However, in partial mode, we can't say this is necessarily over.
+      // If there's more *pattern* left, then 
+      if (partial) {
+        // ran out of file
+        // console.error("\n>>> no match, partial?", file, fr, pattern, pr)
+        if (fr === fl) return true
+      }
+      return false
+    }
+
+    // something other than **
+    // non-magic patterns just have to match exactly
+    // patterns with magic have been turned into regexps.
+    var hit
+    if (typeof p === "string") {
+      if (options.nocase) {
+        hit = f.toLowerCase() === p.toLowerCase()
+      } else {
+        hit = f === p
+      }
+      if (options.debug) {
+        console.error("string match", p, f, hit)
+      }
+    } else {
+      hit = f.match(p)
+      if (options.debug) {
+        console.error("pattern match", p, f, hit)
+      }
+    }
+
+    if (!hit) return false
+  }
+
+  // Note: ending in / means that we'll get a final ""
+  // at the end of the pattern.  This can only match a
+  // corresponding "" at the end of the file.
+  // If the file ends in /, then it can only match a
+  // a pattern that ends in /, unless the pattern just
+  // doesn't have any more for it. But, a/b/ should *not*
+  // match "a/b/*", even though "" matches against the
+  // [^/]*? pattern, except in partial mode, where it might
+  // simply not be reached yet.
+  // However, a/b/ should still satisfy a/*
+
+  // now either we fell off the end of the pattern, or we're done.
+  if (fi === fl && pi === pl) {
+    // ran out of pattern and filename at the same time.
+    // an exact hit!
+    return true
+  } else if (fi === fl) {
+    // ran out of file, but still had pattern left.
+    // this is ok if we're doing the match as part of
+    // a glob fs traversal.
+    return partial
+  } else if (pi === pl) {
+    // ran out of pattern, still have file left.
+    // this is only acceptable if we're on the very last
+    // empty segment of a file with a trailing slash.
+    // a/* should match a/b/
+    var emptyFileEnd = (fi === fl - 1) && (file[fi] === "")
+    return emptyFileEnd
+  }
+
+  // should be unreachable.
+  throw new Error("wtf?")
+}
+
+
+// replace stuff like \* with *
+function globUnescape (s) {
+  return s.replace(/\\(.)/g, "$1")
+}
+
+
+function regExpEscape (s) {
+  return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
+}
+
+})( typeof require === "function" ? require : null,
+    this,
+    typeof module === "object" ? module : null,
+    typeof process === "object" ? process.platform : "win32"
+  )
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore
new file mode 100644 (file)
index 0000000..07e6e47
--- /dev/null
@@ -0,0 +1 @@
+/node_modules
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS
new file mode 100644 (file)
index 0000000..d8e2061
--- /dev/null
@@ -0,0 +1,5 @@
+# Authors, sorted by whether or not they are me
+Isaac Z. Schlueter <i@izs.me>
+Carlos Brito Lage <carlos@carloslage.net>
+Marko Mikulicic <marko.mikulicic@isti.cnr.it>
+Trent Mick <trentm@gmail.com>
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE
new file mode 100644 (file)
index 0000000..05a4010
--- /dev/null
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md
new file mode 100644 (file)
index 0000000..f342b51
--- /dev/null
@@ -0,0 +1,26 @@
+# lru cache
+
+A cache object that deletes the least-recently-used items.
+
+Usage:
+
+    var LRU = require("lru-cache")
+      , cache = LRU(10, // max length. default = Infinity
+                    // calculate how "big" each item is
+                    //
+                    // defaults to function(){return 1}, ie, just limit
+                    // the item count, without any knowledge as to their
+                    // relative size.
+                    function (item) { return item.length })
+
+    cache.set("key", "value")
+    cache.get("key") // "value"
+
+    cache.reset()    // empty the cache
+
+If you put more stuff in it, then items will fall out.
+
+If you try to put an oversized thing in it, then it'll fall out right
+away.
+
+RTFS for more info.
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
new file mode 100644 (file)
index 0000000..1bd4e58
--- /dev/null
@@ -0,0 +1,156 @@
+;(function () { // closure for web browsers
+
+if (module) {
+  module.exports = LRUCache
+} else {
+  // just set the global for non-node platforms.
+  ;(function () { return this })().LRUCache = LRUCache
+}
+
+function hOP (obj, key) {
+  return Object.prototype.hasOwnProperty.call(obj, key)
+}
+
+function naiveLength () { return 1 }
+
+function LRUCache (maxLength, lengthCalculator) {
+  if (!(this instanceof LRUCache)) {
+    return new LRUCache(maxLength, lengthCalculator)
+  }
+
+  if (typeof lengthCalculator !== "function") {
+    lengthCalculator = naiveLength
+  }
+  if (!maxLength || !(typeof maxLength === "number") || maxLength <= 0 ) {
+    maxLength = Infinity
+  }
+
+
+  var cache = {} // hash of items by key
+    , lruList = {} // list of items in order of use recency
+    , lru = 0 // least recently used
+    , mru = 0 // most recently used
+    , length = 0 // number of items in the list
+    , itemCount = 0
+
+
+  // resize the cache when the maxLength changes.
+  Object.defineProperty(this, "maxLength",
+    { set : function (mL) {
+        if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity
+        maxLength = mL
+        // if it gets above double maxLength, trim right away.
+        // otherwise, do it whenever it's convenient.
+        if (length > maxLength) trim()
+      }
+    , get : function () { return maxLength }
+    , enumerable : true
+    })
+
+  // resize the cache when the lengthCalculator changes.
+  Object.defineProperty(this, "lengthCalculator",
+    { set : function (lC) {
+        if (typeof lC !== "function") {
+          lengthCalculator = naiveLength
+          length = itemCount
+          Object.keys(cache).forEach(function (key) {
+            cache[key].length = 1
+          })
+        } else {
+          lengthCalculator = lC
+          length = 0
+          Object.keys(cache).forEach(function (key) {
+            cache[key].length = lengthCalculator(cache[key].value)
+            length += cache[key].length
+          })
+        }
+
+        if (length > maxLength) trim()
+      }
+    , get : function () { return lengthCalculator }
+    , enumerable : true
+    })
+
+  Object.defineProperty(this, "length",
+    { get : function () { return length }
+    , enumerable : true
+    })
+
+
+  Object.defineProperty(this, "itemCount",
+    { get : function () { return itemCount }
+    , enumerable : true
+    })
+
+  this.reset = function () {
+    cache = {}
+    lruList = {}
+    lru = 0
+    mru = 0
+    length = 0
+    itemCount = 0
+  }
+
+  // Provided for debugging/dev purposes only. No promises whatsoever that
+  // this API stays stable.
+  this.dump = function () {
+    return cache
+  }
+
+  this.set = function (key, value) {
+    if (hOP(cache, key)) {
+      this.get(key)
+      cache[key].value = value
+      return
+    }
+
+    var hit = {key:key, value:value, lu:mru++, length:lengthCalculator(value)}
+
+    // oversized objects fall out of cache automatically.
+    if (hit.length > maxLength) return
+
+    length += hit.length
+    lruList[hit.lu] = cache[key] = hit
+    itemCount ++
+
+    if (length > maxLength) trim()
+  }
+
+  this.get = function (key) {
+    if (!hOP(cache, key)) return
+    var hit = cache[key]
+    delete lruList[hit.lu]
+    if (hit.lu === lru) lruWalk()
+    hit.lu = mru ++
+    lruList[hit.lu] = hit
+    return hit.value
+  }
+
+  this.del = function (key) {
+    if (!hOP(cache, key)) return
+    var hit = cache[key]
+    delete cache[key]
+    delete lruList[hit.lu]
+    if (hit.lu === lru) lruWalk()
+    length -= hit.length
+    itemCount --
+  }
+
+  function lruWalk () {
+    // lru has been deleted, hop up to the next hit.
+    lru = Object.keys(lruList)[0]
+  }
+
+  function trim () {
+    if (length <= maxLength) return
+    var prune = Object.keys(lruList)
+    for (var i = 0; i < prune.length && length > maxLength; i ++) {
+      length -= lruList[prune[i]].length
+      delete cache[ lruList[prune[i]].key ]
+      delete lruList[prune[i]]
+    }
+    lruWalk()
+  }
+}
+
+})()
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json
new file mode 100644 (file)
index 0000000..ff30591
--- /dev/null
@@ -0,0 +1,45 @@
+{
+  "name": "lru-cache",
+  "description": "A cache object that deletes the least-recently-used items.",
+  "version": "1.1.0",
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me"
+  },
+  "scripts": {
+    "test": "tap test"
+  },
+  "main": "lib/lru-cache.js",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/node-lru-cache.git"
+  },
+  "devDependencies": {
+    "tap": ""
+  },
+  "license": {
+    "type": "MIT",
+    "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE"
+  },
+  "contributors": [
+    {
+      "name": "Isaac Z. Schlueter",
+      "email": "i@izs.me"
+    },
+    {
+      "name": "Carlos Brito Lage",
+      "email": "carlos@carloslage.net"
+    },
+    {
+      "name": "Marko Mikulicic",
+      "email": "marko.mikulicic@isti.cnr.it"
+    },
+    {
+      "name": "Trent Mick",
+      "email": "trentm@gmail.com"
+    }
+  ],
+  "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\nUsage:\n\n    var LRU = require(\"lru-cache\")\n      , cache = LRU(10, // max length. default = Infinity\n                    // calculate how \"big\" each item is\n                    //\n                    // defaults to function(){return 1}, ie, just limit\n                    // the item count, without any knowledge as to their\n                    // relative size.\n                    function (item) { return item.length })\n\n    cache.set(\"key\", \"value\")\n    cache.get(\"key\") // \"value\"\n\n    cache.reset()    // empty the cache\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\nRTFS for more info.\n",
+  "_id": "lru-cache@1.1.0",
+  "_from": "lru-cache@~1"
+}
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js
new file mode 100644 (file)
index 0000000..6af0edf
--- /dev/null
@@ -0,0 +1,171 @@
+var test = require("tap").test
+  , LRU = require("../")
+
+test("basic", function (t) {
+  var cache = new LRU(10)
+  cache.set("key", "value")
+  t.equal(cache.get("key"), "value")
+  t.equal(cache.get("nada"), undefined)
+  t.equal(cache.length, 1)
+  t.equal(cache.maxLength, 10)
+  t.end()
+})
+
+test("least recently set", function (t) {
+  var cache = new LRU(2)
+  cache.set("a", "A")
+  cache.set("b", "B")
+  cache.set("c", "C")
+  t.equal(cache.get("c"), "C")
+  t.equal(cache.get("b"), "B")
+  t.equal(cache.get("a"), undefined)
+  t.end()
+})
+
+test("lru recently gotten", function (t) {
+  var cache = new LRU(2)
+  cache.set("a", "A")
+  cache.set("b", "B")
+  cache.get("a")
+  cache.set("c", "C")
+  t.equal(cache.get("c"), "C")
+  t.equal(cache.get("b"), undefined)
+  t.equal(cache.get("a"), "A")
+  t.end()
+})
+
+test("del", function (t) {
+  var cache = new LRU(2)
+  cache.set("a", "A")
+  cache.del("a")
+  t.equal(cache.get("a"), undefined)
+  t.end()
+})
+
+test("maxLength", function (t) {
+  var cache = new LRU(3)
+
+  // test changing the maxLength, verify that the LRU items get dropped.
+  cache.maxLength = 100
+  for (var i = 0; i < 100; i ++) cache.set(i, i)
+  t.equal(cache.length, 100)
+  for (var i = 0; i < 100; i ++) {
+    t.equal(cache.get(i), i)
+  }
+  cache.maxLength = 3
+  t.equal(cache.length, 3)
+  for (var i = 0; i < 97; i ++) {
+    t.equal(cache.get(i), undefined)
+  }
+  for (var i = 98; i < 100; i ++) {
+    t.equal(cache.get(i), i)
+  }
+
+  // now remove the maxLength restriction, and try again.
+  cache.maxLength = "hello"
+  for (var i = 0; i < 100; i ++) cache.set(i, i)
+  t.equal(cache.length, 100)
+  for (var i = 0; i < 100; i ++) {
+    t.equal(cache.get(i), i)
+  }
+  // should trigger an immediate resize
+  cache.maxLength = 3
+  t.equal(cache.length, 3)
+  for (var i = 0; i < 97; i ++) {
+    t.equal(cache.get(i), undefined)
+  }
+  for (var i = 98; i < 100; i ++) {
+    t.equal(cache.get(i), i)
+  }
+  t.end()
+})
+
+test("reset", function (t) {
+  var cache = new LRU(10)
+  cache.set("a", "A")
+  cache.set("b", "B")
+  cache.reset()
+  t.equal(cache.length, 0)
+  t.equal(cache.maxLength, 10)
+  t.equal(cache.get("a"), undefined)
+  t.equal(cache.get("b"), undefined)
+  t.end()
+})
+
+
+// Note: `<cache>.dump()` is a debugging tool only. No guarantees are made
+// about the format/layout of the response.
+test("dump", function (t) {
+  var cache = new LRU(10)
+  var d = cache.dump();
+  t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache")
+  cache.set("a", "A")
+  var d = cache.dump()  // { a: { key: "a", value: "A", lu: 0 } }
+  t.ok(d.a)
+  t.equal(d.a.key, "a")
+  t.equal(d.a.value, "A")
+  t.equal(d.a.lu, 0)
+
+  cache.set("b", "B")
+  cache.get("b")
+  d = cache.dump()
+  t.ok(d.b)
+  t.equal(d.b.key, "b")
+  t.equal(d.b.value, "B")
+  t.equal(d.b.lu, 2)
+
+  t.end()
+})
+
+
+test("basic with weighed length", function (t) {
+  var cache = new LRU(100, function (item) { return item.size } )
+  cache.set("key", {val: "value", size: 50})
+  t.equal(cache.get("key").val, "value")
+  t.equal(cache.get("nada"), undefined)
+  t.equal(cache.lengthCalculator(cache.get("key")), 50)
+  t.equal(cache.length, 50)
+  t.equal(cache.maxLength, 100)
+  t.end()
+})
+
+
+test("weighed length item too large", function (t) {
+  var cache = new LRU(10, function (item) { return item.size } )
+  t.equal(cache.maxLength, 10)
+
+  // should fall out immediately
+  cache.set("key", {val: "value", size: 50})
+
+  t.equal(cache.length, 0)
+  t.equal(cache.get("key"), undefined)
+  t.end()
+})
+
+test("least recently set with weighed length", function (t) {
+  var cache = new LRU(8, function (item) { return item.length })
+  cache.set("a", "A")
+  cache.set("b", "BB")
+  cache.set("c", "CCC")
+  cache.set("d", "DDDD")
+  t.equal(cache.get("d"), "DDDD")
+  t.equal(cache.get("c"), "CCC")
+  t.equal(cache.get("b"), undefined)
+  t.equal(cache.get("a"), undefined)
+  t.end()
+})
+
+test("lru recently gotten with weighed length", function (t) {
+  var cache = new LRU(8, function (item) { return item.length })
+  cache.set("a", "A")
+  cache.set("b", "BB")
+  cache.set("c", "CCC")
+  cache.get("a")
+  cache.get("b")
+  cache.set("d", "DDDD")
+  t.equal(cache.get("c"), undefined)
+  t.equal(cache.get("d"), "DDDD")
+  t.equal(cache.get("b"), "BB")
+  t.equal(cache.get("a"), "A")
+  t.end()
+})
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/package.json b/tools/blog/node_modules/glob/node_modules/minimatch/package.json
new file mode 100644 (file)
index 0000000..b42082d
--- /dev/null
@@ -0,0 +1,36 @@
+{
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me",
+    "url": "http://blog.izs.me"
+  },
+  "name": "minimatch",
+  "description": "A minimal matching utility.",
+  "version": "0.2.5",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/minimatch.git"
+  },
+  "main": "minimatch.js",
+  "scripts": {
+    "test": "tap test"
+  },
+  "engines": {
+    "node": "*"
+  },
+  "dependencies": {
+    "lru-cache": "~1"
+  },
+  "devDependencies": {
+    "tap": ""
+  },
+  "licenses": [
+    {
+      "type": "MIT",
+      "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
+    }
+  ],
+  "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated.  Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally.  This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything.  Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set.  This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.  **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes.  For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`.  This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern.  Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity.  Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n  Each row in the\n  array corresponds to a brace-expanded pattern.  Each item in the row\n  corresponds to a single path-part.  For example, the pattern\n  `{a,b/c}/d` would expand to a set of patterns like:\n\n        [ [ a, d ]\n        , [ b, c, d ] ]\n\n    If a portion of the pattern doesn't have any \"magic\" in it\n    (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n    will be left as a string rather than converted to a regular\n    expression.\n\n* `regexp` Created by the `makeRe` method.  A single regular expression\n  expressing the entire pattern.  This is useful in cases where you wish\n  to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n  Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n  false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n  filename, and match it against a single row in the `regExpSet`.  This\n  method is mainly for internal use, but is exposed so that it can be\n  used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items.  So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export.  Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`.  Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob.  If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself.  When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes.  For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",
+  "_id": "minimatch@0.2.5",
+  "_from": "minimatch@0.2"
+}
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/test/basic.js b/tools/blog/node_modules/glob/node_modules/minimatch/test/basic.js
new file mode 100644 (file)
index 0000000..cf1778a
--- /dev/null
@@ -0,0 +1,273 @@
+// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
+//
+// TODO: Some of these tests do very bad things with backslashes, and will
+// most likely fail badly on windows.  They should probably be skipped.
+
+var tap = require("tap")
+  , globalBefore = Object.keys(global)
+  , mm = require("../")
+  , files = [ "a", "b", "c", "d", "abc"
+            , "abd", "abe", "bb", "bcd"
+            , "ca", "cb", "dd", "de"
+            , "bdir/", "bdir/cfile"]
+  , next = files.concat([ "a-b", "aXb"
+                        , ".x", ".y" ])
+
+tap.test("basic tests", function (t) {
+  var start = Date.now()
+
+  // [ pattern, [matches], MM opts, files, TAP opts]
+  ; [ "http://www.bashcookbook.com/bashinfo" +
+      "/source/bash-1.14.7/tests/glob-test"
+    , ["a*", ["a", "abc", "abd", "abe"]]
+    , ["X*", ["X*"], {nonull: true}]
+
+    // allow null glob expansion
+    , ["X*", []]
+
+    // isaacs: Slightly different than bash/sh/ksh
+    // \\* is not un-escaped to literal "*" in a failed match,
+    // but it does make it get treated as a literal star
+    , ["\\*", ["\\*"], {nonull: true}]
+    , ["\\**", ["\\**"], {nonull: true}]
+    , ["\\*\\*", ["\\*\\*"], {nonull: true}]
+
+    , ["b*/", ["bdir/"]]
+    , ["c*", ["c", "ca", "cb"]]
+    , ["**", files]
+
+    , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
+    , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
+
+    , "legendary larry crashes bashes"
+    , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
+      , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
+    , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
+      , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
+
+    , "character classes"
+    , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
+    , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
+       "bdir/", "ca", "cb", "dd", "de"]]
+    , ["a*[^c]", ["abd", "abe"]]
+    , function () { files.push("a-b", "aXb") }
+    , ["a[X-]b", ["a-b", "aXb"]]
+    , function () { files.push(".x", ".y") }
+    , ["[^a-c]*", ["d", "dd", "de"]]
+    , function () { files.push("a*b/", "a*b/ooo") }
+    , ["a\\*b/*", ["a*b/ooo"]]
+    , ["a\\*?/*", ["a*b/ooo"]]
+    , ["*\\\\!*", [], {null: true}, ["echo !7"]]
+    , ["*\\!*", ["echo !7"], null, ["echo !7"]]
+    , ["*.\\*", ["r.*"], null, ["r.*"]]
+    , ["a[b]c", ["abc"]]
+    , ["a[\\b]c", ["abc"]]
+    , ["a?c", ["abc"]]
+    , ["a\\*c", [], {null: true}, ["abc"]]
+    , ["", [""], { null: true }, [""]]
+
+    , "http://www.opensource.apple.com/source/bash/bash-23/" +
+      "bash/tests/glob-test"
+    , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
+    , ["*/man*/bash.*", ["man/man1/bash.1"]]
+    , ["man/man1/bash.1", ["man/man1/bash.1"]]
+    , ["a***c", ["abc"], null, ["abc"]]
+    , ["a*****?c", ["abc"], null, ["abc"]]
+    , ["?*****??", ["abc"], null, ["abc"]]
+    , ["*****??", ["abc"], null, ["abc"]]
+    , ["?*****?c", ["abc"], null, ["abc"]]
+    , ["?***?****c", ["abc"], null, ["abc"]]
+    , ["?***?****?", ["abc"], null, ["abc"]]
+    , ["?***?****", ["abc"], null, ["abc"]]
+    , ["*******c", ["abc"], null, ["abc"]]
+    , ["*******?", ["abc"], null, ["abc"]]
+    , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["[-abc]", ["-"], null, ["-"]]
+    , ["[abc-]", ["-"], null, ["-"]]
+    , ["\\", ["\\"], null, ["\\"]]
+    , ["[\\\\]", ["\\"], null, ["\\"]]
+    , ["[[]", ["["], null, ["["]]
+    , ["[", ["["], null, ["["]]
+    , ["[*", ["[abc"], null, ["[abc"]]
+    , "a right bracket shall lose its special meaning and\n" +
+      "represent itself in a bracket expression if it occurs\n" +
+      "first in the list.  -- POSIX.2 2.8.3.2"
+    , ["[]]", ["]"], null, ["]"]]
+    , ["[]-]", ["]"], null, ["]"]]
+    , ["[a-\z]", ["p"], null, ["p"]]
+    , ["??**********?****?", [], { null: true }, ["abc"]]
+    , ["??**********?****c", [], { null: true }, ["abc"]]
+    , ["?************c****?****", [], { null: true }, ["abc"]]
+    , ["*c*?**", [], { null: true }, ["abc"]]
+    , ["a*****c*?**", [], { null: true }, ["abc"]]
+    , ["a********???*******", [], { null: true }, ["abc"]]
+    , ["[]", [], { null: true }, ["a"]]
+    , ["[abc", [], { null: true }, ["["]]
+
+    , "nocase tests"
+    , ["XYZ", ["xYz"], { nocase: true, null: true }
+      , ["xYz", "ABC", "IjK"]]
+    , ["ab*", ["ABC"], { nocase: true, null: true }
+      , ["xYz", "ABC", "IjK"]]
+    , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
+      , ["xYz", "ABC", "IjK"]]
+
+    // [ pattern, [matches], MM opts, files, TAP opts]
+    , "onestar/twostar"
+    , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
+    , ["{/?,*}", ["/a", "bb"], {null: true}
+      , ["/a", "/b/b", "/a/b/c", "bb"]]
+
+    , "dots should not match unless requested"
+    , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
+
+    // .. and . can only match patterns starting with .,
+    // even when options.dot is set.
+    , function () {
+        files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
+      }
+    , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
+    , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
+    , ["a/*/b", ["a/c/b"], {dot:false}]
+    , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
+
+
+    // this also tests that changing the options needs
+    // to change the cache key, even if the pattern is
+    // the same!
+    , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
+      , [ ".a/.d", "a/.d", "a/b"]]
+
+    , "paren sets cannot contain slashes"
+    , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
+
+    // brace sets trump all else.
+    //
+    // invalid glob pattern.  fails on bash4 and bsdglob.
+    // however, in this implementation, it's easier just
+    // to do the intuitive thing, and let brace-expansion
+    // actually come before parsing any extglob patterns,
+    // like the documentation seems to say.
+    //
+    // XXX: if anyone complains about this, either fix it
+    // or tell them to grow up and stop complaining.
+    //
+    // bash/bsdglob says this:
+    // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
+    // but we do this instead:
+    , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
+
+    // test partial parsing in the presence of comment/negation chars
+    , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
+    , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
+
+    // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
+    , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
+      , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
+      , {}
+      , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
+
+
+    // crazy nested {,,} and *(||) tests.
+    , function () {
+        files = [ "a", "b", "c", "d"
+                , "ab", "ac", "ad"
+                , "bc", "cb"
+                , "bc,d", "c,db", "c,d"
+                , "d)", "(b|c", "*(b|c"
+                , "b|c", "b|cc", "cb|c"
+                , "x(a|b|c)", "x(a|c)"
+                , "(a|b|c)", "(a|c)"]
+      }
+    , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
+    , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
+    // a
+    // *(b|c)
+    // *(b|d)
+    , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
+    , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
+
+
+    // test various flag settings.
+    , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
+      , { noext: true } ]
+    , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
+      , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
+    , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
+
+
+    // begin channelling Boole and deMorgan...
+    , "negation tests"
+    , function () {
+        files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
+      }
+
+    // anything that is NOT a* matches.
+    , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
+
+    // anything that IS !a* matches.
+    , ["!a*", ["!ab", "!abc"], {nonegate: true}]
+
+    // anything that IS a* matches
+    , ["!!a*", ["a!b"]]
+
+    // anything that is NOT !a* matches
+    , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
+
+    // negation nestled within a pattern
+    , function () {
+        files = [ "foo.js"
+                , "foo.bar"
+                // can't match this one without negative lookbehind.
+                , "foo.js.js"
+                , "blar.js"
+                , "foo."
+                , "boo.js.boo" ]
+      }
+    , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
+
+    ].forEach(function (c) {
+      if (typeof c === "function") return c()
+      if (typeof c === "string") return t.comment(c)
+
+      var pattern = c[0]
+        , expect = c[1].sort(alpha)
+        , options = c[2] || {}
+        , f = c[3] || files
+        , tapOpts = c[4] || {}
+
+      // options.debug = true
+      var m = new mm.Minimatch(pattern, options)
+      var r = m.makeRe()
+      tapOpts.re = String(r) || JSON.stringify(r)
+      tapOpts.files = JSON.stringify(f)
+      tapOpts.pattern = pattern
+      tapOpts.set = m.set
+      tapOpts.negated = m.negate
+
+      var actual = mm.match(f, pattern, options)
+      actual.sort(alpha)
+
+      t.equivalent( actual, expect
+                  , JSON.stringify(pattern) + " " + JSON.stringify(expect)
+                  , tapOpts )
+    })
+
+  t.comment("time=" + (Date.now() - start) + "ms")
+  t.end()
+})
+
+tap.test("global leak test", function (t) {
+  var globalAfter = Object.keys(global)
+  t.equivalent(globalAfter, globalBefore, "no new globals, please")
+  t.end()
+})
+
+function alpha (a, b) {
+  return a > b ? 1 : -1
+}
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/test/brace-expand.js b/tools/blog/node_modules/glob/node_modules/minimatch/test/brace-expand.js
new file mode 100644 (file)
index 0000000..7ee278a
--- /dev/null
@@ -0,0 +1,33 @@
+var tap = require("tap")
+  , minimatch = require("../")
+
+tap.test("brace expansion", function (t) {
+  // [ pattern, [expanded] ]
+  ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}"
+      , [ "abxy"
+        , "abxz"
+        , "acdxy"
+        , "acdxz"
+        , "acexy"
+        , "acexz"
+        , "afhxy"
+        , "afhxz"
+        , "aghxy"
+        , "aghxz" ] ]
+    , [ "a{1..5}b"
+      , [ "a1b"
+        , "a2b"
+        , "a3b"
+        , "a4b"
+        , "a5b" ] ]
+    , [ "a{b}c", ["a{b}c"] ]
+  ].forEach(function (tc) {
+    var p = tc[0]
+      , expect = tc[1]
+    t.equivalent(minimatch.braceExpand(p), expect, p)
+  })
+  console.error("ending")
+  t.end()
+})
+
+
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/test/caching.js b/tools/blog/node_modules/glob/node_modules/minimatch/test/caching.js
new file mode 100644 (file)
index 0000000..0fec4b0
--- /dev/null
@@ -0,0 +1,14 @@
+var Minimatch = require("../minimatch.js").Minimatch
+var tap = require("tap")
+tap.test("cache test", function (t) {
+  var mm1 = new Minimatch("a?b")
+  var mm2 = new Minimatch("a?b")
+  t.equal(mm1, mm2, "should get the same object")
+  // the lru should drop it after 100 entries
+  for (var i = 0; i < 100; i ++) {
+    new Minimatch("a"+i)
+  }
+  mm2 = new Minimatch("a?b")
+  t.notEqual(mm1, mm2, "cache should have dropped")
+  t.end()
+})
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/test/defaults.js b/tools/blog/node_modules/glob/node_modules/minimatch/test/defaults.js
new file mode 100644 (file)
index 0000000..25f1f60
--- /dev/null
@@ -0,0 +1,274 @@
+// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
+//
+// TODO: Some of these tests do very bad things with backslashes, and will
+// most likely fail badly on windows.  They should probably be skipped.
+
+var tap = require("tap")
+  , globalBefore = Object.keys(global)
+  , mm = require("../")
+  , files = [ "a", "b", "c", "d", "abc"
+            , "abd", "abe", "bb", "bcd"
+            , "ca", "cb", "dd", "de"
+            , "bdir/", "bdir/cfile"]
+  , next = files.concat([ "a-b", "aXb"
+                        , ".x", ".y" ])
+
+tap.test("basic tests", function (t) {
+  var start = Date.now()
+
+  // [ pattern, [matches], MM opts, files, TAP opts]
+  ; [ "http://www.bashcookbook.com/bashinfo" +
+      "/source/bash-1.14.7/tests/glob-test"
+    , ["a*", ["a", "abc", "abd", "abe"]]
+    , ["X*", ["X*"], {nonull: true}]
+
+    // allow null glob expansion
+    , ["X*", []]
+
+    // isaacs: Slightly different than bash/sh/ksh
+    // \\* is not un-escaped to literal "*" in a failed match,
+    // but it does make it get treated as a literal star
+    , ["\\*", ["\\*"], {nonull: true}]
+    , ["\\**", ["\\**"], {nonull: true}]
+    , ["\\*\\*", ["\\*\\*"], {nonull: true}]
+
+    , ["b*/", ["bdir/"]]
+    , ["c*", ["c", "ca", "cb"]]
+    , ["**", files]
+
+    , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
+    , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
+
+    , "legendary larry crashes bashes"
+    , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
+      , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
+    , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
+      , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
+
+    , "character classes"
+    , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
+    , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
+       "bdir/", "ca", "cb", "dd", "de"]]
+    , ["a*[^c]", ["abd", "abe"]]
+    , function () { files.push("a-b", "aXb") }
+    , ["a[X-]b", ["a-b", "aXb"]]
+    , function () { files.push(".x", ".y") }
+    , ["[^a-c]*", ["d", "dd", "de"]]
+    , function () { files.push("a*b/", "a*b/ooo") }
+    , ["a\\*b/*", ["a*b/ooo"]]
+    , ["a\\*?/*", ["a*b/ooo"]]
+    , ["*\\\\!*", [], {null: true}, ["echo !7"]]
+    , ["*\\!*", ["echo !7"], null, ["echo !7"]]
+    , ["*.\\*", ["r.*"], null, ["r.*"]]
+    , ["a[b]c", ["abc"]]
+    , ["a[\\b]c", ["abc"]]
+    , ["a?c", ["abc"]]
+    , ["a\\*c", [], {null: true}, ["abc"]]
+    , ["", [""], { null: true }, [""]]
+
+    , "http://www.opensource.apple.com/source/bash/bash-23/" +
+      "bash/tests/glob-test"
+    , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
+    , ["*/man*/bash.*", ["man/man1/bash.1"]]
+    , ["man/man1/bash.1", ["man/man1/bash.1"]]
+    , ["a***c", ["abc"], null, ["abc"]]
+    , ["a*****?c", ["abc"], null, ["abc"]]
+    , ["?*****??", ["abc"], null, ["abc"]]
+    , ["*****??", ["abc"], null, ["abc"]]
+    , ["?*****?c", ["abc"], null, ["abc"]]
+    , ["?***?****c", ["abc"], null, ["abc"]]
+    , ["?***?****?", ["abc"], null, ["abc"]]
+    , ["?***?****", ["abc"], null, ["abc"]]
+    , ["*******c", ["abc"], null, ["abc"]]
+    , ["*******?", ["abc"], null, ["abc"]]
+    , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+    , ["[-abc]", ["-"], null, ["-"]]
+    , ["[abc-]", ["-"], null, ["-"]]
+    , ["\\", ["\\"], null, ["\\"]]
+    , ["[\\\\]", ["\\"], null, ["\\"]]
+    , ["[[]", ["["], null, ["["]]
+    , ["[", ["["], null, ["["]]
+    , ["[*", ["[abc"], null, ["[abc"]]
+    , "a right bracket shall lose its special meaning and\n" +
+      "represent itself in a bracket expression if it occurs\n" +
+      "first in the list.  -- POSIX.2 2.8.3.2"
+    , ["[]]", ["]"], null, ["]"]]
+    , ["[]-]", ["]"], null, ["]"]]
+    , ["[a-\z]", ["p"], null, ["p"]]
+    , ["??**********?****?", [], { null: true }, ["abc"]]
+    , ["??**********?****c", [], { null: true }, ["abc"]]
+    , ["?************c****?****", [], { null: true }, ["abc"]]
+    , ["*c*?**", [], { null: true }, ["abc"]]
+    , ["a*****c*?**", [], { null: true }, ["abc"]]
+    , ["a********???*******", [], { null: true }, ["abc"]]
+    , ["[]", [], { null: true }, ["a"]]
+    , ["[abc", [], { null: true }, ["["]]
+
+    , "nocase tests"
+    , ["XYZ", ["xYz"], { nocase: true, null: true }
+      , ["xYz", "ABC", "IjK"]]
+    , ["ab*", ["ABC"], { nocase: true, null: true }
+      , ["xYz", "ABC", "IjK"]]
+    , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
+      , ["xYz", "ABC", "IjK"]]
+
+    // [ pattern, [matches], MM opts, files, TAP opts]
+    , "onestar/twostar"
+    , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
+    , ["{/?,*}", ["/a", "bb"], {null: true}
+      , ["/a", "/b/b", "/a/b/c", "bb"]]
+
+    , "dots should not match unless requested"
+    , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
+
+    // .. and . can only match patterns starting with .,
+    // even when options.dot is set.
+    , function () {
+        files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
+      }
+    , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
+    , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
+    , ["a/*/b", ["a/c/b"], {dot:false}]
+    , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
+
+
+    // this also tests that changing the options needs
+    // to change the cache key, even if the pattern is
+    // the same!
+    , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
+      , [ ".a/.d", "a/.d", "a/b"]]
+
+    , "paren sets cannot contain slashes"
+    , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
+
+    // brace sets trump all else.
+    //
+    // invalid glob pattern.  fails on bash4 and bsdglob.
+    // however, in this implementation, it's easier just
+    // to do the intuitive thing, and let brace-expansion
+    // actually come before parsing any extglob patterns,
+    // like the documentation seems to say.
+    //
+    // XXX: if anyone complains about this, either fix it
+    // or tell them to grow up and stop complaining.
+    //
+    // bash/bsdglob says this:
+    // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
+    // but we do this instead:
+    , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
+
+    // test partial parsing in the presence of comment/negation chars
+    , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
+    , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
+
+    // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
+    , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
+      , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
+      , {}
+      , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
+
+
+    // crazy nested {,,} and *(||) tests.
+    , function () {
+        files = [ "a", "b", "c", "d"
+                , "ab", "ac", "ad"
+                , "bc", "cb"
+                , "bc,d", "c,db", "c,d"
+                , "d)", "(b|c", "*(b|c"
+                , "b|c", "b|cc", "cb|c"
+                , "x(a|b|c)", "x(a|c)"
+                , "(a|b|c)", "(a|c)"]
+      }
+    , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
+    , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
+    // a
+    // *(b|c)
+    // *(b|d)
+    , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
+    , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
+
+
+    // test various flag settings.
+    , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
+      , { noext: true } ]
+    , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
+      , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
+    , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
+
+
+    // begin channelling Boole and deMorgan...
+    , "negation tests"
+    , function () {
+        files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
+      }
+
+    // anything that is NOT a* matches.
+    , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
+
+    // anything that IS !a* matches.
+    , ["!a*", ["!ab", "!abc"], {nonegate: true}]
+
+    // anything that IS a* matches
+    , ["!!a*", ["a!b"]]
+
+    // anything that is NOT !a* matches
+    , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
+
+    // negation nestled within a pattern
+    , function () {
+        files = [ "foo.js"
+                , "foo.bar"
+                // can't match this one without negative lookbehind.
+                , "foo.js.js"
+                , "blar.js"
+                , "foo."
+                , "boo.js.boo" ]
+      }
+    , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
+
+    ].forEach(function (c) {
+      if (typeof c === "function") return c()
+      if (typeof c === "string") return t.comment(c)
+
+      var pattern = c[0]
+        , expect = c[1].sort(alpha)
+        , options = c[2] || {}
+        , f = c[3] || files
+        , tapOpts = c[4] || {}
+
+      // options.debug = true
+      var Class = mm.defaults(options).Minimatch
+      var m = new Class(pattern, {})
+      var r = m.makeRe()
+      tapOpts.re = String(r) || JSON.stringify(r)
+      tapOpts.files = JSON.stringify(f)
+      tapOpts.pattern = pattern
+      tapOpts.set = m.set
+      tapOpts.negated = m.negate
+
+      var actual = mm.match(f, pattern, options)
+      actual.sort(alpha)
+
+      t.equivalent( actual, expect
+                  , JSON.stringify(pattern) + " " + JSON.stringify(expect)
+                  , tapOpts )
+    })
+
+  t.comment("time=" + (Date.now() - start) + "ms")
+  t.end()
+})
+
+tap.test("global leak test", function (t) {
+  var globalAfter = Object.keys(global)
+  t.equivalent(globalAfter, globalBefore, "no new globals, please")
+  t.end()
+})
+
+function alpha (a, b) {
+  return a > b ? 1 : -1
+}
diff --git a/tools/blog/node_modules/glob/package.json b/tools/blog/node_modules/glob/package.json
new file mode 100644 (file)
index 0000000..2fddfd4
--- /dev/null
@@ -0,0 +1,35 @@
+{
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me",
+    "url": "http://blog.izs.me/"
+  },
+  "name": "glob",
+  "description": "This is a glob implementation in JavaScript.  It uses the `minimatch` library to do its matching.",
+  "version": "3.1.10",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/node-glob.git"
+  },
+  "main": "glob.js",
+  "engines": {
+    "node": "*"
+  },
+  "dependencies": {
+    "minimatch": "0.2",
+    "graceful-fs": "~1.1.2",
+    "inherits": "1"
+  },
+  "devDependencies": {
+    "tap": "~0.2.3",
+    "mkdirp": "0",
+    "rimraf": "1"
+  },
+  "scripts": {
+    "test": "tap test/*.js"
+  },
+  "license": "BSD",
+  "readme": "# Glob\n\nThis is a glob implementation in JavaScript.  It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n  // files is an array of filenames.\n  // If the `nonull` option is set, and nothing\n  // was found, then files is [\"**/*.js\"]\n  // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n  * `err` {Error | null}\n  * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options]\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n  * `err` {Error | null}\n  * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered.  When an error is encountered, the\n  glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`.  There\n  is no way at this time to continue a glob search after aborting, but\n  you can re-use the statCache to avoid having to duplicate syscalls.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n  matches found.  If the `nonull` option is set, and no match was found,\n  then the `matches` list contains the original pattern.  The matches\n  are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n  any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior.  Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search.  Defaults\n  to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n  onto.  Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n  systems, and `C:\\` or some such on Windows.)\n* `nomount` By default, a pattern starting with a forward-slash will be\n  \"mounted\" onto the root setting, so that a valid filesystem path is\n  returned.  Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches.  Note that this\n  requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results.  This reduces performance\n  somewhat, and is completely unnecessary, unless `readdir` is presumed\n  to be an untrustworthy indicator of file existence.  It will cause\n  ELOOP to be triggered one level sooner in the case of cyclical\n  symbolic links.\n* `silent` When an unusual error is encountered\n  when attempting to read a directory, a warning will be printed to\n  stderr.  Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n  when attempting to read a directory, the process will just continue on\n  in search of other matches.  Set the `strict` option to raise an error\n  in these cases.\n* `statCache` A cache of results of filesystem information, to prevent\n  unnecessary stat calls.  While it should not normally be necessary to\n  set this, you may pass the statCache from one glob() call to the\n  options object of another, if you know that the filesystem will not\n  change between calls.  (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n  same file showing up multiple times in the result set.  By default,\n  this implementation prevents duplicates in the result set.\n  Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n  containing the pattern itself.  This is the default in glob(3).\n* `nocase` Perform a case-insensitive match.  Note that case-insensitive\n  filesystems will sometimes result in glob returning results that are\n  case-insensitively matched anyway, since readdir and stat will not\n  raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated.  Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally.  This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything.  Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set.  This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.  **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes.  For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`.  This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern.  Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity.  Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation.  You must use\nforward-slashes **only** in glob expressions.  Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`.  On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead.  However, this also makes it even more susceptible to races,\nespecially if the statCache object is reused between glob calls.\n\nUsers are thus advised not to use a glob result as a\nguarantee of filesystem state in the face of rapid changes.\nFor the vast majority of operations, this is never a problem.\n",
+  "_id": "glob@3.1.10",
+  "_from": "glob"
+}
diff --git a/tools/blog/node_modules/glob/test/00-setup.js b/tools/blog/node_modules/glob/test/00-setup.js
new file mode 100644 (file)
index 0000000..2b60643
--- /dev/null
@@ -0,0 +1,61 @@
+// just a little pre-run script to set up the fixtures.
+// zz-finish cleans it up
+
+var mkdirp = require("mkdirp")
+var path = require("path")
+var i = 0
+var tap = require("tap")
+var fs = require("fs")
+var rimraf = require("rimraf")
+
+var files =
+[ "a/.abcdef/x/y/z/a"
+, "a/abcdef/g/h"
+, "a/abcfed/g/h"
+, "a/b/c/d"
+, "a/bc/e/f"
+, "a/c/d/c/b"
+, "a/cb/e/f"
+]
+
+var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c")
+var symlinkFrom = "../.."
+
+files = files.map(function (f) {
+  return path.resolve(__dirname, f)
+})
+
+tap.test("remove fixtures", function (t) {
+  rimraf(path.resolve(__dirname, "a"), function (er) {
+    t.ifError(er, "remove fixtures")
+    t.end()
+  })
+})
+
+files.forEach(function (f) {
+  tap.test(f, function (t) {
+    var d = path.dirname(f)
+    mkdirp(d, 0755, function (er) {
+      if (er) {
+        t.fail(er)
+        return t.bailout()
+      }
+      fs.writeFile(f, "i like tests", function (er) {
+        t.ifError(er, "make file")
+        t.end()
+      })
+    })
+  })
+})
+
+tap.test("symlinky", function (t) {
+  var d = path.dirname(symlinkTo)
+  console.error("mkdirp", d)
+  mkdirp(d, 0755, function (er) {
+    t.ifError(er)
+    fs.symlink(symlinkFrom, symlinkTo, function (er) {
+      t.ifError(er, "make symlink")
+      t.end()
+    })
+  })
+})
diff --git a/tools/blog/node_modules/glob/test/bash-comparison.js b/tools/blog/node_modules/glob/test/bash-comparison.js
new file mode 100644 (file)
index 0000000..fbadc31
--- /dev/null
@@ -0,0 +1,119 @@
+// basic test
+// show that it does the same thing by default as the shell.
+var tap = require("tap")
+, child_process = require("child_process")
+
+// put more patterns here.
+, globs =
+  [
+  "test/a/*/+(c|g)/./d"
+  ,"test/a/**/[cg]/../[cg]"
+  ,"test/a/{b,c,d,e,f}/**/g"
+  ,"test/a/b/**"
+  ,"test/**/g"
+  ,"test/a/abc{fed,def}/g/h"
+  ,"test/a/abc{fed/g,def}/**/"
+  ,"test/a/abc{fed/g,def}/**///**/"
+  ,"test/**/a/**/"
+  ,"test/+(a|b|c)/a{/,bc*}/**"
+  ,"test/*/*/*/f"
+  ,"test/**/f"
+  ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
+  ,"{./*/*,/usr/local/*}"
+  ,"{/*,*}" // evil owl face!  how you taunt me!
+  ]
+, glob = require("../")
+, path = require("path")
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+process.chdir(path.resolve(__dirname, ".."))
+
+function alphasort (a, b) {
+  a = a.toLowerCase()
+  b = b.toLowerCase()
+  return a > b ? 1 : a < b ? -1 : 0
+}
+
+globs.forEach(function (pattern) {
+  var echoOutput
+  tap.test(pattern, function (t) {
+    var bashPattern = pattern
+    , cmd = "shopt -s globstar && " +
+            "shopt -s extglob && " +
+            "shopt -s nullglob && " +
+            // "shopt >&2; " +
+            "eval \'for i in " + bashPattern + "; do echo $i; done\'"
+    , cp = child_process.spawn("bash", ["-c",cmd])
+    , out = []
+    , globResult
+    cp.stdout.on("data", function (c) {
+      out.push(c)
+    })
+    cp.stderr.on("data", function (c) {
+      process.stderr.write(c)
+    })
+    cp.stdout.on("close", function () {
+      echoOutput = flatten(out)
+      if (!echoOutput) echoOutput = []
+      else {
+        echoOutput = echoOutput.split(/\r*\n/).map(function (m) {
+          // Bash is a oddly inconsistent with slashes in the
+          // the results.  This implementation is a bit more
+          // normalized.  Account for this in the test results.
+          return m.replace(/\/+/g, "/").replace(/\/$/, "")
+        }).sort(alphasort).reduce(function (set, f) {
+          if (f !== set[set.length - 1]) set.push(f)
+          return set
+        }, []).sort(alphasort)
+      }
+      next()
+    })
+
+    glob(pattern, function (er, matches) {
+      // sort and unpark, just to match the shell results
+      matches = matches.map(function (m) {
+        return m.replace(/\/+/g, "/").replace(/\/$/, "")
+      }).sort(alphasort).reduce(function (set, f) {
+        if (f !== set[set.length - 1]) set.push(f)
+        return set
+      }, []).sort(alphasort)
+
+      t.ifError(er, pattern + " should not error")
+      globResult = matches
+      next()
+    })
+
+    function next () {
+      if (!echoOutput || !globResult) return
+
+      t.deepEqual(globResult, echoOutput, "should match shell")
+      t.end()
+    }
+  })
+
+  tap.test(pattern + " sync", function (t) {
+    var matches = glob.sync(pattern).map(function (m) {
+        return m.replace(/\/+/g, "/").replace(/\/$/, "")
+      }).sort(alphasort).reduce(function (set, f) {
+        if (f !== set[set.length - 1]) set.push(f)
+        return set
+      }, []).sort(alphasort)
+
+    t.deepEqual(matches, echoOutput, "should match shell")
+    t.end()
+  })
+})
+
+function flatten (chunks) {
+  var s = 0
+  chunks.forEach(function (c) { s += c.length })
+  var out = new Buffer(s)
+  s = 0
+  chunks.forEach(function (c) {
+    c.copy(out, s)
+    s += c.length
+  })
+
+  return out.toString().trim()
+}
diff --git a/tools/blog/node_modules/glob/test/cwd-test.js b/tools/blog/node_modules/glob/test/cwd-test.js
new file mode 100644 (file)
index 0000000..352c27e
--- /dev/null
@@ -0,0 +1,55 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing cwd and searching for **/d", function (t) {
+  var glob = require('../')
+  var path = require('path')
+  t.test('.', function (t) {
+    glob('**/d', function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
+      t.end()
+    })
+  })
+
+  t.test('a', function (t) {
+    glob('**/d', {cwd:path.resolve('a')}, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [ 'b/c/d', 'c/d' ])
+      t.end()
+    })
+  })
+
+  t.test('a/b', function (t) {
+    glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [ 'c/d' ])
+      t.end()
+    })
+  })
+
+  t.test('a/b/', function (t) {
+    glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [ 'c/d' ])
+      t.end()
+    })
+  })
+
+  t.test('.', function (t) {
+    glob('**/d', {cwd: process.cwd()}, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
+      t.end()
+    })
+  })
+
+  t.test('cd -', function (t) {
+    process.chdir(origCwd)
+    t.end()
+  })
+
+  t.end()
+})
diff --git a/tools/blog/node_modules/glob/test/pause-resume.js b/tools/blog/node_modules/glob/test/pause-resume.js
new file mode 100644 (file)
index 0000000..481d1aa
--- /dev/null
@@ -0,0 +1,98 @@
+// show that no match events happen while paused.
+var tap = require("tap")
+, child_process = require("child_process")
+// just some gnarly pattern with lots of matches
+, pattern = "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
+, glob = require("../")
+, Glob = glob.Glob
+, path = require("path")
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+process.chdir(path.resolve(__dirname, ".."))
+
+function alphasort (a, b) {
+  a = a.toLowerCase()
+  b = b.toLowerCase()
+  return a > b ? 1 : a < b ? -1 : 0
+}
+
+function cleanResults (m) {
+  // normalize discrepancies in ordering, duplication,
+  // and ending slashes.
+  return m.map(function (m) {
+    return m.replace(/\/+/g, "/").replace(/\/$/, "")
+  }).sort(alphasort).reduce(function (set, f) {
+    if (f !== set[set.length - 1]) set.push(f)
+    return set
+  }, []).sort(alphasort)
+}
+
+function flatten (chunks) {
+  var s = 0
+  chunks.forEach(function (c) { s += c.length })
+  var out = new Buffer(s)
+  s = 0
+  chunks.forEach(function (c) {
+    c.copy(out, s)
+    s += c.length
+  })
+
+  return out.toString().trim()
+}
+var bashResults
+tap.test("get bash output", function (t) {
+  var bashPattern = pattern
+  , cmd = "shopt -s globstar && " +
+          "shopt -s extglob && " +
+          "shopt -s nullglob && " +
+          // "shopt >&2; " +
+          "eval \'for i in " + bashPattern + "; do echo $i; done\'"
+  , cp = child_process.spawn("bash", ["-c",cmd])
+  , out = []
+  , globResult
+  cp.stdout.on("data", function (c) {
+    out.push(c)
+  })
+  cp.stderr.on("data", function (c) {
+    process.stderr.write(c)
+  })
+  cp.stdout.on("close", function () {
+    bashResults = flatten(out)
+    if (!bashResults) return t.fail("Didn't get results from bash")
+    else {
+      bashResults = cleanResults(bashResults.split(/\r*\n/))
+    }
+    t.ok(bashResults.length, "got some results")
+    t.end()
+  })
+})
+
+var globResults = []
+tap.test("use a Glob object, and pause/resume it", function (t) {
+  var g = new Glob(pattern)
+  , paused = false
+  , res = []
+
+  g.on("match", function (m) {
+    t.notOk(g.paused, "must not be paused")
+    globResults.push(m)
+    g.pause()
+    t.ok(g.paused, "must be paused")
+    setTimeout(g.resume.bind(g), 1)
+  })
+
+  g.on("end", function (matches) {
+    t.pass("reached glob end")
+    globResults = cleanResults(globResults)
+    matches = cleanResults(matches)
+    t.deepEqual(matches, globResults,
+      "end event matches should be the same as match events")
+
+    t.deepEqual(matches, bashResults,
+      "glob matches should be the same as bash results")
+
+    t.end()
+  })
+})
+
diff --git a/tools/blog/node_modules/glob/test/root-nomount.js b/tools/blog/node_modules/glob/test/root-nomount.js
new file mode 100644 (file)
index 0000000..3ac5979
--- /dev/null
@@ -0,0 +1,39 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing root and searching for /b*/**", function (t) {
+  var glob = require('../')
+  var path = require('path')
+  t.test('.', function (t) {
+    glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [])
+      t.end()
+    })
+  })
+
+  t.test('a', function (t) {
+    glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+      t.end()
+    })
+  })
+
+  t.test('root=a, cwd=a/b', function (t) {
+    glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+      t.end()
+    })
+  })
+
+  t.test('cd -', function (t) {
+    process.chdir(origCwd)
+    t.end()
+  })
+
+  t.end()
+})
diff --git a/tools/blog/node_modules/glob/test/root.js b/tools/blog/node_modules/glob/test/root.js
new file mode 100644 (file)
index 0000000..5ccdd0e
--- /dev/null
@@ -0,0 +1,43 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing root and searching for /b*/**", function (t) {
+  var glob = require('../')
+  var path = require('path')
+  t.test('.', function (t) {
+    glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [])
+      t.end()
+    })
+  })
+
+  t.test('a', function (t) {
+    glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
+        return path.join(path.resolve('a'), m)
+      }))
+      t.end()
+    })
+  })
+
+  t.test('root=a, cwd=a/b', function (t) {
+    glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
+        return path.join(path.resolve('a'), m)
+      }))
+      t.end()
+    })
+  })
+
+  t.test('cd -', function (t) {
+    process.chdir(origCwd)
+    t.end()
+  })
+
+  t.end()
+})
diff --git a/tools/blog/node_modules/glob/test/zz-cleanup.js b/tools/blog/node_modules/glob/test/zz-cleanup.js
new file mode 100644 (file)
index 0000000..e085f0f
--- /dev/null
@@ -0,0 +1,11 @@
+// remove the fixtures
+var tap = require("tap")
+, rimraf = require("rimraf")
+, path = require("path")
+
+tap.test("cleanup fixtures", function (t) {
+  rimraf(path.resolve(__dirname, "a"), function (er) {
+    t.ifError(er, "removed")
+    t.end()
+  })
+})
diff --git a/tools/blog/node_modules/marked/.npmignore b/tools/blog/node_modules/marked/.npmignore
new file mode 100644 (file)
index 0000000..3fb773c
--- /dev/null
@@ -0,0 +1,2 @@
+.git*
+test/
diff --git a/tools/blog/node_modules/marked/LICENSE b/tools/blog/node_modules/marked/LICENSE
new file mode 100644 (file)
index 0000000..4059747
--- /dev/null
@@ -0,0 +1,19 @@
+Copyright (c) 2011-2012, Christopher Jeffrey (https://github.com/chjj/)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/blog/node_modules/marked/Makefile b/tools/blog/node_modules/marked/Makefile
new file mode 100644 (file)
index 0000000..7690400
--- /dev/null
@@ -0,0 +1,9 @@
+all:
+       @cp lib/marked.js marked.js
+       @uglifyjs -o marked.min.js marked.js
+
+clean:
+       @rm marked.js
+       @rm marked.min.js
+
+.PHONY: clean all
diff --git a/tools/blog/node_modules/marked/README.md b/tools/blog/node_modules/marked/README.md
new file mode 100644 (file)
index 0000000..c10495a
--- /dev/null
@@ -0,0 +1,125 @@
+# marked
+
+A full-featured markdown parser and compiler, written in javascript.
+Built for speed.
+
+## Benchmarks
+
+node v0.4.x
+
+``` bash
+$ node test --bench
+marked completed in 12071ms.
+showdown (reuse converter) completed in 27387ms.
+showdown (new converter) completed in 75617ms.
+markdown-js completed in 70069ms.
+```
+
+node v0.6.x
+
+``` bash
+$ node test --bench
+marked completed in 6448ms.
+marked (gfm) completed in 7357ms.
+marked (pedantic) completed in 6092ms.
+discount completed in 7314ms.
+showdown (reuse converter) completed in 16018ms.
+showdown (new converter) completed in 18234ms.
+markdown-js completed in 24270ms.
+```
+
+__Marked is now faster than Discount, which is written in C.__
+
+For those feeling skeptical: These benchmarks run the entire markdown test suite
+1000 times. The test suite tests every feature. It doesn't cater to specific
+aspects.
+
+## Install
+
+``` bash
+$ npm install marked
+```
+
+## Another Javascript Markdown Parser
+
+The point of marked was to create a markdown compiler where it was possible to
+frequently parse huge chunks of markdown without having to worry about
+caching the compiled output somehow...or blocking for an unnecesarily long time.
+
+marked is very concise and still implements all markdown features. It is also
+now fully compatible with the client-side.
+
+marked more or less passes the official markdown test suite in its
+entirety. This is important because a surprising number of markdown compilers
+cannot pass more than a few tests. It was very difficult to get marked as
+compliant as it is. It could have cut corners in several areas for the sake
+of performance, but did not in order to be exactly what you expect in terms
+of a markdown rendering. In fact, this is why marked could be considered at a
+disadvantage in the benchmarks above.
+
+Along with implementing every markdown feature, marked also implements
+[GFM features](http://github.github.com/github-flavored-markdown/).
+
+## Options
+
+marked has 4 different switches which change behavior.
+
+- __pedantic__: Conform to obscure parts of `markdown.pl` as much as possible.
+  Don't fix any of the original markdown bugs or poor behavior.
+- __gfm__: Enable github flavored markdown (enabled by default).
+- __sanitize__: Sanitize the output. Ignore any HTML that has been input.
+- __highlight__: A callback to highlight code blocks.
+
+None of the above are mutually exclusive/inclusive.
+
+## Usage
+
+``` js
+// Set default options
+marked.setOptions({
+  gfm: true,
+  pedantic: false,
+  sanitize: true,
+  // callback for code highlighter
+  highlight: function(code, lang) {
+    if (lang === 'js') {
+      return javascriptHighlighter(code);
+    }
+    return code;
+  }
+});
+console.log(marked('i am using __markdown__.'));
+```
+
+You also have direct access to the lexer and parser if you so desire.
+
+``` js
+var tokens = marked.lexer(text);
+console.log(marked.parser(tokens));
+```
+
+``` bash
+$ node
+> require('marked').lexer('> i am using marked.')
+[ { type: 'blockquote_start' },
+  { type: 'paragraph',
+    text: 'i am using marked.' },
+  { type: 'blockquote_end' },
+  links: {} ]
+```
+
+## CLI
+
+``` bash
+$ marked -o hello.html
+hello world
+^D
+$ cat hello.html
+<p>hello world</p>
+```
+
+## License
+
+Copyright (c) 2011-2012, Christopher Jeffrey. (MIT License)
+
+See LICENSE for more info.
diff --git a/tools/blog/node_modules/marked/bin/marked b/tools/blog/node_modules/marked/bin/marked
new file mode 100755 (executable)
index 0000000..c27b9e2
--- /dev/null
@@ -0,0 +1,127 @@
+#!/usr/bin/env node
+
+/**
+ * Marked CLI
+ * Copyright (c) 2011-2012, Christopher Jeffrey (MIT License)
+ */
+
+var fs = require('fs')
+  , util = require('util')
+  , marked = require('../');
+
+/**
+ * Man Page
+ */
+
+var help = function() {
+  var spawn = require('child_process').spawn;
+
+  var options = {
+    cwd: process.cwd(),
+    env: process.env,
+    setsid: false,
+    customFds: [0, 1, 2]
+  };
+
+  spawn('man',
+    [__dirname + '/../man/marked.1'],
+    options);
+};
+
+/**
+ * Main
+ */
+
+var main = function(argv) {
+  var files = []
+    , options = {}
+    , data = ''
+    , input
+    , output
+    , arg
+    , tokens;
+
+  var getarg = function() {
+    var arg = argv.shift();
+    arg = arg.split('=');
+    if (arg.length > 1) {
+      argv.unshift(arg.slice(1).join('='));
+    }
+    return arg[0];
+  };
+
+  while (argv.length) {
+    arg = getarg();
+    switch (arg) {
+      case '-o':
+      case '--output':
+        output = argv.shift();
+        break;
+      case '-i':
+      case '--input':
+        input = argv.shift();
+        break;
+      case '-t':
+      case '--tokens':
+        tokens = true;
+        break;
+      case '--gfm':
+        options.gfm = true;
+        break;
+      case '--sanitize':
+        options.sanitize = true;
+        break;
+      case '--pedantic':
+        options.pedantic = true;
+        break;
+      case '-h':
+      case '--help':
+        return help();
+      default:
+        files.push(arg);
+        break;
+    }
+  }
+
+  if (!input) {
+    if (files.length <= 2) {
+      var stdin = process.stdin;
+
+      stdin.setEncoding('utf8');
+      stdin.resume();
+
+      stdin.on('data', function(text) {
+        data += text;
+      });
+
+      stdin.on('end', write);
+
+      return;
+    }
+    input = files.pop();
+  }
+
+  data = fs.readFileSync(input, 'utf8');
+  write();
+
+  function write() {
+    marked.setOptions(options);
+
+    data = tokens
+      ? JSON.stringify(marked.lexer(data), null, 2)
+      : marked(data);
+
+    if (!output) {
+      process.stdout.write(data + '\n');
+    } else {
+      fs.writeFileSync(output, data);
+    }
+  }
+};
+
+if (!module.parent) {
+  process.title = 'marked';
+  main(process.argv.slice());
+} else {
+  module.exports = main;
+}
diff --git a/tools/blog/node_modules/marked/index.js b/tools/blog/node_modules/marked/index.js
new file mode 100644 (file)
index 0000000..a12f905
--- /dev/null
@@ -0,0 +1 @@
+module.exports = require('./lib/marked');
diff --git a/tools/blog/node_modules/marked/lib/marked.js b/tools/blog/node_modules/marked/lib/marked.js
new file mode 100644 (file)
index 0000000..9156bf3
--- /dev/null
@@ -0,0 +1,791 @@
+/**
+ * marked - A markdown parser (https://github.com/chjj/marked)
+ * Copyright (c) 2011-2012, Christopher Jeffrey. (MIT Licensed)
+ */
+
+;(function() {
+
+/**
+ * Block-Level Grammar
+ */
+
+var block = {
+  newline: /^\n+/,
+  code: /^( {4}[^\n]+\n*)+/,
+  fences: noop,
+  hr: /^( *[-*_]){3,} *(?:\n+|$)/,
+  heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,
+  lheading: /^([^\n]+)\n *(=|-){3,} *\n*/,
+  blockquote: /^( *>[^\n]+(\n[^\n]+)*\n*)+/,
+  list: /^( *)(bull) [^\0]+?(?:hr|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
+  html: /^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,
+  def: /^ *\[([^\]]+)\]: *([^\s]+)(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,
+  paragraph: /^([^\n]+\n?(?!body))+\n*/,
+  text: /^[^\n]+/
+};
+
+block.bullet = /(?:[*+-]|\d+\.)/;
+block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;
+block.item = replace(block.item, 'gm')
+  (/bull/g, block.bullet)
+  ();
+
+block.list = replace(block.list)
+  (/bull/g, block.bullet)
+  ('hr', /\n+(?=(?: *[-*_]){3,} *(?:\n+|$))/)
+  ();
+
+block.html = replace(block.html)
+  ('comment', /<!--[^\0]*?-->/)
+  ('closed', /<(tag)[^\0]+?<\/\1>/)
+  ('closing', /<tag(?!:\/|@)\b(?:"[^"]*"|'[^']*'|[^'">])*?>/)
+  (/tag/g, tag())
+  ();
+
+block.paragraph = (function() {
+  var paragraph = block.paragraph.source
+    , body = [];
+
+  (function push(rule) {
+    rule = block[rule] ? block[rule].source : rule;
+    body.push(rule.replace(/(^|[^\[])\^/g, '$1'));
+    return push;
+  })
+  ('hr')
+  ('heading')
+  ('lheading')
+  ('blockquote')
+  ('<' + tag())
+  ('def');
+
+  return new
+    RegExp(paragraph.replace('body', body.join('|')));
+})();
+
+block.normal = {
+  fences: block.fences,
+  paragraph: block.paragraph
+};
+
+block.gfm = {
+  fences: /^ *``` *(\w+)? *\n([^\0]+?)\s*``` *(?:\n+|$)/,
+  paragraph: /^/
+};
+
+block.gfm.paragraph = replace(block.paragraph)
+  ('(?!', '(?!' + block.gfm.fences.source.replace(/(^|[^\[])\^/g, '$1') + '|')
+  ();
+
+/**
+ * Block Lexer
+ */
+
+block.lexer = function(src) {
+  var tokens = [];
+
+  tokens.links = {};
+
+  src = src
+    .replace(/\r\n|\r/g, '\n')
+    .replace(/\t/g, '    ');
+
+  return block.token(src, tokens, true);
+};
+
+block.token = function(src, tokens, top) {
+  var src = src.replace(/^ +$/gm, '')
+    , next
+    , loose
+    , cap
+    , item
+    , space
+    , i
+    , l;
+
+  while (src) {
+    // newline
+    if (cap = block.newline.exec(src)) {
+      src = src.substring(cap[0].length);
+      if (cap[0].length > 1) {
+        tokens.push({
+          type: 'space'
+        });
+      }
+    }
+
+    // code
+    if (cap = block.code.exec(src)) {
+      src = src.substring(cap[0].length);
+      cap = cap[0].replace(/^ {4}/gm, '');
+      tokens.push({
+        type: 'code',
+        text: !options.pedantic
+          ? cap.replace(/\n+$/, '')
+          : cap
+      });
+      continue;
+    }
+
+    // fences (gfm)
+    if (cap = block.fences.exec(src)) {
+      src = src.substring(cap[0].length);
+      tokens.push({
+        type: 'code',
+        lang: cap[1],
+        text: cap[2]
+      });
+      continue;
+    }
+
+    // heading
+    if (cap = block.heading.exec(src)) {
+      src = src.substring(cap[0].length);
+      tokens.push({
+        type: 'heading',
+        depth: cap[1].length,
+        text: cap[2]
+      });
+      continue;
+    }
+
+    // lheading
+    if (cap = block.lheading.exec(src)) {
+      src = src.substring(cap[0].length);
+      tokens.push({
+        type: 'heading',
+        depth: cap[2] === '=' ? 1 : 2,
+        text: cap[1]
+      });
+      continue;
+    }
+
+    // hr
+    if (cap = block.hr.exec(src)) {
+      src = src.substring(cap[0].length);
+      tokens.push({
+        type: 'hr'
+      });
+      continue;
+    }
+
+    // blockquote
+    if (cap = block.blockquote.exec(src)) {
+      src = src.substring(cap[0].length);
+
+      tokens.push({
+        type: 'blockquote_start'
+      });
+
+      cap = cap[0].replace(/^ *> ?/gm, '');
+
+      // Pass `top` to keep the current
+      // "toplevel" state. This is exactly
+      // how markdown.pl works.
+      block.token(cap, tokens, top);
+
+      tokens.push({
+        type: 'blockquote_end'
+      });
+
+      continue;
+    }
+
+    // list
+    if (cap = block.list.exec(src)) {
+      src = src.substring(cap[0].length);
+
+      tokens.push({
+        type: 'list_start',
+        ordered: isFinite(cap[2])
+      });
+
+      // Get each top-level item.
+      cap = cap[0].match(block.item);
+
+      next = false;
+      l = cap.length;
+      i = 0;
+
+      for (; i < l; i++) {
+        item = cap[i];
+
+        // Remove the list item's bullet
+        // so it is seen as the next token.
+        space = item.length;
+        item = item.replace(/^ *([*+-]|\d+\.) +/, '');
+
+        // Outdent whatever the
+        // list item contains. Hacky.
+        if (~item.indexOf('\n ')) {
+          space -= item.length;
+          item = !options.pedantic
+            ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')
+            : item.replace(/^ {1,4}/gm, '');
+        }
+
+        // Determine whether item is loose or not.
+        // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/
+        // for discount behavior.
+        loose = next || /\n\n(?!\s*$)/.test(item);
+        if (i !== l - 1) {
+          next = item[item.length-1] === '\n';
+          if (!loose) loose = next;
+        }
+
+        tokens.push({
+          type: loose
+            ? 'loose_item_start'
+            : 'list_item_start'
+        });
+
+        // Recurse.
+        block.token(item, tokens);
+
+        tokens.push({
+          type: 'list_item_end'
+        });
+      }
+
+      tokens.push({
+        type: 'list_end'
+      });
+
+      continue;
+    }
+
+    // html
+    if (cap = block.html.exec(src)) {
+      src = src.substring(cap[0].length);
+      tokens.push({
+        type: 'html',
+        pre: cap[1] === 'pre',
+        text: cap[0]
+      });
+      continue;
+    }
+
+    // def
+    if (top && (cap = block.def.exec(src))) {
+      src = src.substring(cap[0].length);
+      tokens.links[cap[1].toLowerCase()] = {
+        href: cap[2],
+        title: cap[3]
+      };
+      continue;
+    }
+
+    // top-level paragraph
+    if (top && (cap = block.paragraph.exec(src))) {
+      src = src.substring(cap[0].length);
+      tokens.push({
+        type: 'paragraph',
+        text: cap[0]
+      });
+      continue;
+    }
+
+    // text
+    if (cap = block.text.exec(src)) {
+      // Top-level should never reach here.
+      src = src.substring(cap[0].length);
+      tokens.push({
+        type: 'text',
+        text: cap[0]
+      });
+      continue;
+    }
+  }
+
+  return tokens;
+};
+
+/**
+ * Inline Processing
+ */
+
+var inline = {
+  escape: /^\\([\\`*{}\[\]()#+\-.!_>])/,
+  autolink: /^<([^ >]+(@|:\/)[^ >]+)>/,
+  url: noop,
+  tag: /^<!--[^\0]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,
+  link: /^!?\[(inside)\]\(href\)/,
+  reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/,
+  nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,
+  strong: /^__([^\0]+?)__(?!_)|^\*\*([^\0]+?)\*\*(?!\*)/,
+  em: /^\b_((?:__|[^\0])+?)_\b|^\*((?:\*\*|[^\0])+?)\*(?!\*)/,
+  code: /^(`+)([^\0]*?[^`])\1(?!`)/,
+  br: /^ {2,}\n(?!\s*$)/,
+  text: /^[^\0]+?(?=[\\<!\[_*`]| {2,}\n|$)/
+};
+
+inline._linkInside = /(?:\[[^\]]*\]|[^\]]|\](?=[^\[]*\]))*/;
+inline._linkHref = /\s*<?([^\s]*?)>?(?:\s+['"]([^\0]*?)['"])?\s*/;
+
+inline.link = replace(inline.link)
+  ('inside', inline._linkInside)
+  ('href', inline._linkHref)
+  ();
+
+inline.reflink = replace(inline.reflink)
+  ('inside', inline._linkInside)
+  ();
+
+inline.normal = {
+  url: inline.url,
+  strong: inline.strong,
+  em: inline.em,
+  text: inline.text
+};
+
+inline.pedantic = {
+  strong: /^__(?=\S)([^\0]*?\S)__(?!_)|^\*\*(?=\S)([^\0]*?\S)\*\*(?!\*)/,
+  em: /^_(?=\S)([^\0]*?\S)_(?!_)|^\*(?=\S)([^\0]*?\S)\*(?!\*)/
+};
+
+inline.gfm = {
+  url: /^(https?:\/\/[^\s]+[^.,:;"')\]\s])/,
+  text: /^[^\0]+?(?=[\\<!\[_*`]|https?:\/\/| {2,}\n|$)/
+};
+
+/**
+ * Inline Lexer
+ */
+
+inline.lexer = function(src) {
+  var out = ''
+    , links = tokens.links
+    , link
+    , text
+    , href
+    , cap;
+
+  while (src) {
+    // escape
+    if (cap = inline.escape.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += cap[1];
+      continue;
+    }
+
+    // autolink
+    if (cap = inline.autolink.exec(src)) {
+      src = src.substring(cap[0].length);
+      if (cap[2] === '@') {
+        text = cap[1][6] === ':'
+          ? mangle(cap[1].substring(7))
+          : mangle(cap[1]);
+        href = mangle('mailto:') + text;
+      } else {
+        text = escape(cap[1]);
+        href = text;
+      }
+      out += '<a href="'
+        + href
+        + '">'
+        + text
+        + '</a>';
+      continue;
+    }
+
+    // url (gfm)
+    if (cap = inline.url.exec(src)) {
+      src = src.substring(cap[0].length);
+      text = escape(cap[1]);
+      href = text;
+      out += '<a href="'
+        + href
+        + '">'
+        + text
+        + '</a>';
+      continue;
+    }
+
+    // tag
+    if (cap = inline.tag.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += options.sanitize
+        ? escape(cap[0])
+        : cap[0];
+      continue;
+    }
+
+    // link
+    if (cap = inline.link.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += outputLink(cap, {
+        href: cap[2],
+        title: cap[3]
+      });
+      continue;
+    }
+
+    // reflink, nolink
+    if ((cap = inline.reflink.exec(src))
+        || (cap = inline.nolink.exec(src))) {
+      src = src.substring(cap[0].length);
+      link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
+      link = links[link.toLowerCase()];
+      if (!link || !link.href) {
+        out += cap[0][0];
+        src = cap[0].substring(1) + src;
+        continue;
+      }
+      out += outputLink(cap, link);
+      continue;
+    }
+
+    // strong
+    if (cap = inline.strong.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += '<strong>'
+        + inline.lexer(cap[2] || cap[1])
+        + '</strong>';
+      continue;
+    }
+
+    // em
+    if (cap = inline.em.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += '<em>'
+        + inline.lexer(cap[2] || cap[1])
+        + '</em>';
+      continue;
+    }
+
+    // code
+    if (cap = inline.code.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += '<code>'
+        + escape(cap[2], true)
+        + '</code>';
+      continue;
+    }
+
+    // br
+    if (cap = inline.br.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += '<br>';
+      continue;
+    }
+
+    // text
+    if (cap = inline.text.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += escape(cap[0]);
+      continue;
+    }
+  }
+
+  return out;
+};
+
+function outputLink(cap, link) {
+  if (cap[0][0] !== '!') {
+    return '<a href="'
+      + escape(link.href)
+      + '"'
+      + (link.title
+      ? ' title="'
+      + escape(link.title)
+      + '"'
+      : '')
+      + '>'
+      + inline.lexer(cap[1])
+      + '</a>';
+  } else {
+    return '<img src="'
+      + escape(link.href)
+      + '" alt="'
+      + escape(cap[1])
+      + '"'
+      + (link.title
+      ? ' title="'
+      + escape(link.title)
+      + '"'
+      : '')
+      + '>';
+  }
+}
+
+/**
+ * Parsing
+ */
+
+var tokens
+  , token;
+
+function next() {
+  return token = tokens.pop();
+}
+
+function tok() {
+  switch (token.type) {
+    case 'space': {
+      return '';
+    }
+    case 'hr': {
+      return '<hr>\n';
+    }
+    case 'heading': {
+      return '<h'
+        + token.depth
+        + '>'
+        + inline.lexer(token.text)
+        + '</h'
+        + token.depth
+        + '>\n';
+    }
+    case 'code': {
+      if (options.highlight) {
+        token.code = options.highlight(token.text, token.lang);
+        if (token.code != null && token.code !== token.text) {
+          token.escaped = true;
+          token.text = token.code;
+        }
+      }
+
+      if (!token.escaped) {
+        token.text = escape(token.text, true);
+      }
+
+      return '<pre><code'
+        + (token.lang
+        ? ' class="lang-'
+        + token.lang
+        + '"'
+        : '')
+        + '>'
+        + token.text
+        + '</code></pre>\n';
+    }
+    case 'blockquote_start': {
+      var body = '';
+
+      while (next().type !== 'blockquote_end') {
+        body += tok();
+      }
+
+      return '<blockquote>\n'
+        + body
+        + '</blockquote>\n';
+    }
+    case 'list_start': {
+      var type = token.ordered ? 'ol' : 'ul'
+        , body = '';
+
+      while (next().type !== 'list_end') {
+        body += tok();
+      }
+
+      return '<'
+        + type
+        + '>\n'
+        + body
+        + '</'
+        + type
+        + '>\n';
+    }
+    case 'list_item_start': {
+      var body = '';
+
+      while (next().type !== 'list_item_end') {
+        body += token.type === 'text'
+          ? parseText()
+          : tok();
+      }
+
+      return '<li>'
+        + body
+        + '</li>\n';
+    }
+    case 'loose_item_start': {
+      var body = '';
+
+      while (next().type !== 'list_item_end') {
+        body += tok();
+      }
+
+      return '<li>'
+        + body
+        + '</li>\n';
+    }
+    case 'html': {
+      if (options.sanitize) {
+        return inline.lexer(token.text);
+      }
+      return !token.pre && !options.pedantic
+        ? inline.lexer(token.text)
+        : token.text;
+    }
+    case 'paragraph': {
+      return '<p>'
+        + inline.lexer(token.text)
+        + '</p>\n';
+    }
+    case 'text': {
+      return '<p>'
+        + parseText()
+        + '</p>\n';
+    }
+  }
+}
+
+function parseText() {
+  var body = token.text
+    , top;
+
+  while ((top = tokens[tokens.length-1])
+         && top.type === 'text') {
+    body += '\n' + next().text;
+  }
+
+  return inline.lexer(body);
+}
+
+function parse(src) {
+  tokens = src.reverse();
+
+  var out = '';
+  while (next()) {
+    out += tok();
+  }
+
+  tokens = null;
+  token = null;
+
+  return out;
+}
+
+/**
+ * Helpers
+ */
+
+function escape(html, encode) {
+  return html
+    .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&amp;')
+    .replace(/</g, '&lt;')
+    .replace(/>/g, '&gt;')
+    .replace(/"/g, '&quot;')
+    .replace(/'/g, '&#39;');
+}
+
+function mangle(text) {
+  var out = ''
+    , l = text.length
+    , i = 0
+    , ch;
+
+  for (; i < l; i++) {
+    ch = text.charCodeAt(i);
+    if (Math.random() > 0.5) {
+      ch = 'x' + ch.toString(16);
+    }
+    out += '&#' + ch + ';';
+  }
+
+  return out;
+}
+
+function tag() {
+  var tag = '(?!(?:'
+    + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'
+    + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'
+    + '|span|br|wbr|ins|del|img)\\b)\\w+';
+
+  return tag;
+}
+
+function replace(regex, opt) {
+  regex = regex.source;
+  opt = opt || '';
+  return function self(name, val) {
+    if (!name) return new RegExp(regex, opt);
+    regex = regex.replace(name, val.source || val);
+    return self;
+  };
+}
+
+function noop() {}
+noop.exec = noop;
+
+/**
+ * Marked
+ */
+
+function marked(src, opt) {
+  setOptions(opt);
+  return parse(block.lexer(src));
+}
+
+/**
+ * Options
+ */
+
+var options
+  , defaults;
+
+function setOptions(opt) {
+  if (!opt) opt = defaults;
+  if (options === opt) return;
+  options = opt;
+
+  if (options.gfm) {
+    block.fences = block.gfm.fences;
+    block.paragraph = block.gfm.paragraph;
+    inline.text = inline.gfm.text;
+    inline.url = inline.gfm.url;
+  } else {
+    block.fences = block.normal.fences;
+    block.paragraph = block.normal.paragraph;
+    inline.text = inline.normal.text;
+    inline.url = inline.normal.url;
+  }
+
+  if (options.pedantic) {
+    inline.em = inline.pedantic.em;
+    inline.strong = inline.pedantic.strong;
+  } else {
+    inline.em = inline.normal.em;
+    inline.strong = inline.normal.strong;
+  }
+}
+
+marked.options =
+marked.setOptions = function(opt) {
+  defaults = opt;
+  setOptions(opt);
+  return marked;
+};
+
+marked.setOptions({
+  gfm: true,
+  pedantic: false,
+  sanitize: false,
+  highlight: null
+});
+
+/**
+ * Expose
+ */
+
+marked.parser = function(src, opt) {
+  setOptions(opt);
+  return parse(src);
+};
+
+marked.lexer = function(src, opt) {
+  setOptions(opt);
+  return block.lexer(src);
+};
+
+marked.parse = marked;
+
+if (typeof module !== 'undefined') {
+  module.exports = marked;
+} else {
+  this.marked = marked;
+}
+
+}).call(function() {
+  return this || (typeof window !== 'undefined' ? window : global);
+}());
diff --git a/tools/blog/node_modules/marked/man/marked.1 b/tools/blog/node_modules/marked/man/marked.1
new file mode 100644 (file)
index 0000000..672e336
--- /dev/null
@@ -0,0 +1,49 @@
+.ds q \N'34'
+.TH marked 1
+.SH NAME
+marked \- a javascript markdown parser
+.SH SYNOPSIS
+.nf
+.B marked [\-o output] [\-i input] [\-th]
+.fi
+.SH DESCRIPTION
+.B marked
+is a full-featured javascript markdown parser, built for speed. It also includes
+multiple GFM features.
+.SH OPTIONS
+.TP
+.BI \-o,\ \-\-output\ [output]
+Specify file output. If none is specified, write to stdout.
+.TP
+.BI \-i,\ \-\-input\ [input]
+Specify file input, otherwise use last argument as input file. If no input file
+is specified, read from stdin.
+.TP
+.BI \-t,\ \-\-tokens
+Output a token stream instead of html.
+.TP
+.BI \-\-pedantic
+Conform to obscure parts of markdown.pl as much as possible. Don't fix original
+markdown bugs.
+.TP
+.BI \-\-gfm
+Enable github flavored markdown.
+.TP
+.BI \-\-sanitize
+Sanitize output. Ignore any HTML input.
+.TP
+.BI \-h,\ \-\-help
+Display help information.
+.SH EXAMPLES
+.TP
+cat in.md | marked > out.html
+.TP
+echo "hello *world*" | marked
+.TP
+marked -o out.html in.md
+.TP
+marked --output="hello world.html" -i in.md
+.SH BUGS
+Please report any bugs to https://github.com/chjj/marked.
+.SH LICENSE
+Copyright (c) 2011-2012, Christopher Jeffrey (MIT License)
diff --git a/tools/blog/node_modules/marked/package.json b/tools/blog/node_modules/marked/package.json
new file mode 100644 (file)
index 0000000..4d7f866
--- /dev/null
@@ -0,0 +1,40 @@
+{
+  "name": "marked",
+  "description": "A full-featured markdown parser and compiler, written in javascript. Built for speed.",
+  "author": {
+    "name": "Christopher Jeffrey"
+  },
+  "version": "0.2.5",
+  "main": "./lib/marked.js",
+  "bin": {
+    "marked": "./bin/marked"
+  },
+  "man": [
+    "./man/marked.1"
+  ],
+  "preferGlobal": false,
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/chjj/marked.git"
+  },
+  "homepage": "https://github.com/chjj/marked",
+  "bugs": {
+    "url": "http://github.com/chjj/marked/issues"
+  },
+  "keywords": [
+    "markdown",
+    "markup",
+    "html"
+  ],
+  "tags": [
+    "markdown",
+    "markup",
+    "html"
+  ],
+  "readme": "# marked\n\nA full-featured markdown parser and compiler, written in javascript.\nBuilt for speed.\n\n## Benchmarks\n\nnode v0.4.x\n\n``` bash\n$ node test --bench\nmarked completed in 12071ms.\nshowdown (reuse converter) completed in 27387ms.\nshowdown (new converter) completed in 75617ms.\nmarkdown-js completed in 70069ms.\n```\n\nnode v0.6.x\n\n``` bash\n$ node test --bench\nmarked completed in 6448ms.\nmarked (gfm) completed in 7357ms.\nmarked (pedantic) completed in 6092ms.\ndiscount completed in 7314ms.\nshowdown (reuse converter) completed in 16018ms.\nshowdown (new converter) completed in 18234ms.\nmarkdown-js completed in 24270ms.\n```\n\n__Marked is now faster than Discount, which is written in C.__\n\nFor those feeling skeptical: These benchmarks run the entire markdown test suite\n1000 times. The test suite tests every feature. It doesn't cater to specific\naspects.\n\n## Install\n\n``` bash\n$ npm install marked\n```\n\n## Another Javascript Markdown Parser\n\nThe point of marked was to create a markdown compiler where it was possible to\nfrequently parse huge chunks of markdown without having to worry about\ncaching the compiled output somehow...or blocking for an unnecesarily long time.\n\nmarked is very concise and still implements all markdown features. It is also\nnow fully compatible with the client-side.\n\nmarked more or less passes the official markdown test suite in its\nentirety. This is important because a surprising number of markdown compilers\ncannot pass more than a few tests. It was very difficult to get marked as\ncompliant as it is. It could have cut corners in several areas for the sake\nof performance, but did not in order to be exactly what you expect in terms\nof a markdown rendering. In fact, this is why marked could be considered at a\ndisadvantage in the benchmarks above.\n\nAlong with implementing every markdown feature, marked also implements\n[GFM features](http://github.github.com/github-flavored-markdown/).\n\n## Options\n\nmarked has 4 different switches which change behavior.\n\n- __pedantic__: Conform to obscure parts of `markdown.pl` as much as possible.\n  Don't fix any of the original markdown bugs or poor behavior.\n- __gfm__: Enable github flavored markdown (enabled by default).\n- __sanitize__: Sanitize the output. Ignore any HTML that has been input.\n- __highlight__: A callback to highlight code blocks.\n\nNone of the above are mutually exclusive/inclusive.\n\n## Usage\n\n``` js\n// Set default options\nmarked.setOptions({\n  gfm: true,\n  pedantic: false,\n  sanitize: true,\n  // callback for code highlighter\n  highlight: function(code, lang) {\n    if (lang === 'js') {\n      return javascriptHighlighter(code);\n    }\n    return code;\n  }\n});\nconsole.log(marked('i am using __markdown__.'));\n```\n\nYou also have direct access to the lexer and parser if you so desire.\n\n``` js\nvar tokens = marked.lexer(text);\nconsole.log(marked.parser(tokens));\n```\n\n``` bash\n$ node\n> require('marked').lexer('> i am using marked.')\n[ { type: 'blockquote_start' },\n  { type: 'paragraph',\n    text: 'i am using marked.' },\n  { type: 'blockquote_end' },\n  links: {} ]\n```\n\n## CLI\n\n``` bash\n$ marked -o hello.html\nhello world\n^D\n$ cat hello.html\n<p>hello world</p>\n```\n\n## License\n\nCopyright (c) 2011-2012, Christopher Jeffrey. (MIT License)\n\nSee LICENSE for more info.\n",
+  "_id": "marked@0.2.5",
+  "dist": {
+    "shasum": "611829a0ca7735d5728dfa02147f2e61f0776500"
+  },
+  "_from": "marked"
+}
diff --git a/tools/blog/node_modules/mkdirp/.gitignore.orig b/tools/blog/node_modules/mkdirp/.gitignore.orig
new file mode 100644 (file)
index 0000000..9303c34
--- /dev/null
@@ -0,0 +1,2 @@
+node_modules/
+npm-debug.log
\ No newline at end of file
diff --git a/tools/blog/node_modules/mkdirp/.gitignore.rej b/tools/blog/node_modules/mkdirp/.gitignore.rej
new file mode 100644 (file)
index 0000000..69244ff
--- /dev/null
@@ -0,0 +1,5 @@
+--- /dev/null
++++ .gitignore
+@@ -0,0 +1,2 @@
++node_modules/
++npm-debug.log
\ No newline at end of file
diff --git a/tools/blog/node_modules/mkdirp/.npmignore b/tools/blog/node_modules/mkdirp/.npmignore
new file mode 100644 (file)
index 0000000..9303c34
--- /dev/null
@@ -0,0 +1,2 @@
+node_modules/
+npm-debug.log
\ No newline at end of file
diff --git a/tools/blog/node_modules/mkdirp/.travis.yml b/tools/blog/node_modules/mkdirp/.travis.yml
new file mode 100644 (file)
index 0000000..f1d0f13
--- /dev/null
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+  - 0.4
+  - 0.6
diff --git a/tools/blog/node_modules/mkdirp/LICENSE b/tools/blog/node_modules/mkdirp/LICENSE
new file mode 100644 (file)
index 0000000..432d1ae
--- /dev/null
@@ -0,0 +1,21 @@
+Copyright 2010 James Halliday (mail@substack.net)
+
+This project is free software released under the MIT/X11 license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/blog/node_modules/mkdirp/README.markdown b/tools/blog/node_modules/mkdirp/README.markdown
new file mode 100644 (file)
index 0000000..40de04f
--- /dev/null
@@ -0,0 +1,61 @@
+mkdirp
+======
+
+Like `mkdir -p`, but in node.js!
+
+[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)
+
+example
+=======
+
+pow.js
+------
+    var mkdirp = require('mkdirp');
+    
+    mkdirp('/tmp/foo/bar/baz', function (err) {
+        if (err) console.error(err)
+        else console.log('pow!')
+    });
+
+Output
+    pow!
+
+And now /tmp/foo/bar/baz exists, huzzah!
+
+methods
+=======
+
+var mkdirp = require('mkdirp');
+
+mkdirp(dir, mode, cb)
+---------------------
+
+Create a new directory and any necessary subdirectories at `dir` with octal
+permission string `mode`.
+
+If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+
+`cb(err, made)` fires with the error or the first directory `made`
+that had to be created, if any.
+
+mkdirp.sync(dir, mode)
+----------------------
+
+Synchronously create a new directory and any necessary subdirectories at `dir`
+with octal permission string `mode`.
+
+If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+
+Returns the first directory that had to be created, if any.
+
+install
+=======
+
+With [npm](http://npmjs.org) do:
+
+    npm install mkdirp
+
+license
+=======
+
+MIT/X11
diff --git a/tools/blog/node_modules/mkdirp/examples/pow.js b/tools/blog/node_modules/mkdirp/examples/pow.js
new file mode 100644 (file)
index 0000000..e692421
--- /dev/null
@@ -0,0 +1,6 @@
+var mkdirp = require('mkdirp');
+
+mkdirp('/tmp/foo/bar/baz', function (err) {
+    if (err) console.error(err)
+    else console.log('pow!')
+});
diff --git a/tools/blog/node_modules/mkdirp/examples/pow.js.orig b/tools/blog/node_modules/mkdirp/examples/pow.js.orig
new file mode 100644 (file)
index 0000000..7741462
--- /dev/null
@@ -0,0 +1,6 @@
+var mkdirp = require('mkdirp');
+
+mkdirp('/tmp/foo/bar/baz', 0755, function (err) {
+    if (err) console.error(err)
+    else console.log('pow!')
+});
diff --git a/tools/blog/node_modules/mkdirp/examples/pow.js.rej b/tools/blog/node_modules/mkdirp/examples/pow.js.rej
new file mode 100644 (file)
index 0000000..81e7f43
--- /dev/null
@@ -0,0 +1,19 @@
+--- examples/pow.js
++++ examples/pow.js
+@@ -1,6 +1,15 @@
+-var mkdirp = require('mkdirp').mkdirp;
++var mkdirp = require('../').mkdirp,
++    mkdirpSync = require('../').mkdirpSync;
+ mkdirp('/tmp/foo/bar/baz', 0755, function (err) {
+     if (err) console.error(err)
+     else console.log('pow!')
+ });
++
++try {
++  mkdirpSync('/tmp/bar/foo/baz', 0755);
++  console.log('double pow!');
++}
++catch (ex) {
++  console.log(ex);
++}
\ No newline at end of file
diff --git a/tools/blog/node_modules/mkdirp/index.js b/tools/blog/node_modules/mkdirp/index.js
new file mode 100644 (file)
index 0000000..874b310
--- /dev/null
@@ -0,0 +1,94 @@
+var path = require('path');
+var fs = require('fs');
+
+module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
+
+function mkdirP (p, mode, f, made) {
+    if (typeof mode === 'function' || mode === undefined) {
+        f = mode;
+        mode = 0777 & (~process.umask());
+    }
+    if (!made) made = null;
+
+    var cb = f || function () {};
+    if (typeof mode === 'string') mode = parseInt(mode, 8);
+    p = path.resolve(p);
+
+    fs.mkdir(p, mode, function (er) {
+        if (!er) {
+            made = made || p;
+            return cb(null, made);
+        }
+        switch (er.code) {
+            case 'ENOENT':
+                mkdirP(path.dirname(p), mode, function (er, made) {
+                    if (er) cb(er, made);
+                    else mkdirP(p, mode, cb, made);
+                });
+                break;
+
+            case 'EISDIR':
+            case 'EPERM':
+                // Operation not permitted or already is a dir.
+                // This is the error you get when trying to mkdir('c:/')
+                // on windows, or mkdir('/') on unix.  Make sure it's a
+                // dir by falling through to the EEXIST case.
+            case 'EROFS':
+                // a read-only file system.
+                // However, the dir could already exist, in which case
+                // the EROFS error will be obscuring a EEXIST!
+                // Fallthrough to that case.
+            case 'EEXIST':
+                fs.stat(p, function (er2, stat) {
+                    // if the stat fails, then that's super weird.
+                    // let the original error be the failure reason.
+                    if (er2 || !stat.isDirectory()) cb(er, made)
+                    else cb(null, made);
+                });
+                break;
+
+            default:
+                cb(er, made);
+                break;
+        }
+    });
+}
+
+mkdirP.sync = function sync (p, mode, made) {
+    if (mode === undefined) {
+        mode = 0777 & (~process.umask());
+    }
+    if (!made) made = null;
+
+    if (typeof mode === 'string') mode = parseInt(mode, 8);
+    p = path.resolve(p);
+
+    try {
+        fs.mkdirSync(p, mode);
+        made = made || p;
+    }
+    catch (err0) {
+        switch (err0.code) {
+            case 'ENOENT' :
+                made = sync(path.dirname(p), mode, made);
+                sync(p, mode, made);
+                break;
+
+            case 'EEXIST' :
+                var stat;
+                try {
+                    stat = fs.statSync(p);
+                }
+                catch (err1) {
+                    throw err0;
+                }
+                if (!stat.isDirectory()) throw err0;
+                break;
+            default :
+                throw err0
+                break;
+        }
+    }
+
+    return made;
+};
diff --git a/tools/blog/node_modules/mkdirp/package.json b/tools/blog/node_modules/mkdirp/package.json
new file mode 100644 (file)
index 0000000..a77bede
--- /dev/null
@@ -0,0 +1,32 @@
+{
+  "name": "mkdirp",
+  "description": "mkdirp ======",
+  "version": "0.3.3",
+  "author": {
+    "name": "James Halliday",
+    "email": "mail@substack.net",
+    "url": "http://substack.net"
+  },
+  "main": "./index",
+  "keywords": [
+    "mkdir",
+    "directory"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "http://github.com/substack/node-mkdirp.git"
+  },
+  "scripts": {
+    "test": "tap test/*.js"
+  },
+  "devDependencies": {
+    "tap": "~0.2.4"
+  },
+  "license": "MIT/X11",
+  "engines": {
+    "node": "*"
+  },
+  "readme": "mkdirp\n======\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\nexample\n=======\n\npow.js\n------\n    var mkdirp = require('mkdirp');\n    \n    mkdirp('/tmp/foo/bar/baz', function (err) {\n        if (err) console.error(err)\n        else console.log('pow!')\n    });\n\nOutput\n    pow!\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\nmethods\n=======\n\nvar mkdirp = require('mkdirp');\n\nmkdirp(dir, mode, cb)\n---------------------\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\nmkdirp.sync(dir, mode)\n----------------------\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n    npm install mkdirp\n\nlicense\n=======\n\nMIT/X11\n",
+  "_id": "mkdirp@0.3.3",
+  "_from": "mkdirp"
+}
diff --git a/tools/blog/node_modules/mkdirp/test/chmod.js b/tools/blog/node_modules/mkdirp/test/chmod.js
new file mode 100644 (file)
index 0000000..520dcb8
--- /dev/null
@@ -0,0 +1,38 @@
+var mkdirp = require('../').mkdirp;
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+var ps = [ '', 'tmp' ];
+
+for (var i = 0; i < 25; i++) {
+    var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    ps.push(dir);
+}
+
+var file = ps.join('/');
+
+test('chmod-pre', function (t) {
+    var mode = 0744
+    mkdirp(file, mode, function (er) {
+        t.ifError(er, 'should not error');
+        fs.stat(file, function (er, stat) {
+            t.ifError(er, 'should exist');
+            t.ok(stat && stat.isDirectory(), 'should be directory');
+            t.equal(stat && stat.mode & 0777, mode, 'should be 0744');
+            t.end();
+        });
+    });
+});
+
+test('chmod', function (t) {
+    var mode = 0755
+    mkdirp(file, mode, function (er) {
+        t.ifError(er, 'should not error');
+        fs.stat(file, function (er, stat) {
+            t.ifError(er, 'should exist');
+            t.ok(stat && stat.isDirectory(), 'should be directory');
+            t.end();
+        });
+    });
+});
diff --git a/tools/blog/node_modules/mkdirp/test/clobber.js b/tools/blog/node_modules/mkdirp/test/clobber.js
new file mode 100644 (file)
index 0000000..0eb7099
--- /dev/null
@@ -0,0 +1,37 @@
+var mkdirp = require('../').mkdirp;
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+var ps = [ '', 'tmp' ];
+
+for (var i = 0; i < 25; i++) {
+    var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    ps.push(dir);
+}
+
+var file = ps.join('/');
+
+// a file in the way
+var itw = ps.slice(0, 3).join('/');
+
+
+test('clobber-pre', function (t) {
+    console.error("about to write to "+itw)
+    fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.');
+
+    fs.stat(itw, function (er, stat) {
+        t.ifError(er)
+        t.ok(stat && stat.isFile(), 'should be file')
+        t.end()
+    })
+})
+
+test('clobber', function (t) {
+    t.plan(2);
+    mkdirp(file, 0755, function (err) {
+        t.ok(err);
+        t.equal(err.code, 'ENOTDIR');
+        t.end();
+    });
+});
diff --git a/tools/blog/node_modules/mkdirp/test/mkdirp.js b/tools/blog/node_modules/mkdirp/test/mkdirp.js
new file mode 100644 (file)
index 0000000..b07cd70
--- /dev/null
@@ -0,0 +1,28 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('woo', function (t) {
+    t.plan(2);
+    var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    
+    var file = '/tmp/' + [x,y,z].join('/');
+    
+    mkdirp(file, 0755, function (err) {
+        if (err) t.fail(err);
+        else path.exists(file, function (ex) {
+            if (!ex) t.fail('file not created')
+            else fs.stat(file, function (err, stat) {
+                if (err) t.fail(err)
+                else {
+                    t.equal(stat.mode & 0777, 0755);
+                    t.ok(stat.isDirectory(), 'target not a directory');
+                    t.end();
+                }
+            })
+        })
+    });
+});
diff --git a/tools/blog/node_modules/mkdirp/test/perm.js b/tools/blog/node_modules/mkdirp/test/perm.js
new file mode 100644 (file)
index 0000000..23a7abb
--- /dev/null
@@ -0,0 +1,32 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('async perm', function (t) {
+    t.plan(2);
+    var file = '/tmp/' + (Math.random() * (1<<30)).toString(16);
+    
+    mkdirp(file, 0755, function (err) {
+        if (err) t.fail(err);
+        else path.exists(file, function (ex) {
+            if (!ex) t.fail('file not created')
+            else fs.stat(file, function (err, stat) {
+                if (err) t.fail(err)
+                else {
+                    t.equal(stat.mode & 0777, 0755);
+                    t.ok(stat.isDirectory(), 'target not a directory');
+                    t.end();
+                }
+            })
+        })
+    });
+});
+
+test('async root perm', function (t) {
+    mkdirp('/tmp', 0755, function (err) {
+        if (err) t.fail(err);
+        t.end();
+    });
+    t.end();
+});
diff --git a/tools/blog/node_modules/mkdirp/test/perm_sync.js b/tools/blog/node_modules/mkdirp/test/perm_sync.js
new file mode 100644 (file)
index 0000000..f685f60
--- /dev/null
@@ -0,0 +1,39 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('sync perm', function (t) {
+    t.plan(2);
+    var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json';
+    
+    mkdirp.sync(file, 0755);
+    path.exists(file, function (ex) {
+        if (!ex) t.fail('file not created')
+        else fs.stat(file, function (err, stat) {
+            if (err) t.fail(err)
+            else {
+                t.equal(stat.mode & 0777, 0755);
+                t.ok(stat.isDirectory(), 'target not a directory');
+                t.end();
+            }
+        })
+    });
+});
+
+test('sync root perm', function (t) {
+    t.plan(1);
+    
+    var file = '/tmp';
+    mkdirp.sync(file, 0755);
+    path.exists(file, function (ex) {
+        if (!ex) t.fail('file not created')
+        else fs.stat(file, function (err, stat) {
+            if (err) t.fail(err)
+            else {
+                t.ok(stat.isDirectory(), 'target not a directory');
+                t.end();
+            }
+        })
+    });
+});
diff --git a/tools/blog/node_modules/mkdirp/test/race.js b/tools/blog/node_modules/mkdirp/test/race.js
new file mode 100644 (file)
index 0000000..96a0447
--- /dev/null
@@ -0,0 +1,41 @@
+var mkdirp = require('../').mkdirp;
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('race', function (t) {
+    t.plan(4);
+    var ps = [ '', 'tmp' ];
+    
+    for (var i = 0; i < 25; i++) {
+        var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+        ps.push(dir);
+    }
+    var file = ps.join('/');
+    
+    var res = 2;
+    mk(file, function () {
+        if (--res === 0) t.end();
+    });
+    
+    mk(file, function () {
+        if (--res === 0) t.end();
+    });
+    
+    function mk (file, cb) {
+        mkdirp(file, 0755, function (err) {
+            if (err) t.fail(err);
+            else path.exists(file, function (ex) {
+                if (!ex) t.fail('file not created')
+                else fs.stat(file, function (err, stat) {
+                    if (err) t.fail(err)
+                    else {
+                        t.equal(stat.mode & 0777, 0755);
+                        t.ok(stat.isDirectory(), 'target not a directory');
+                        if (cb) cb();
+                    }
+                })
+            })
+        });
+    }
+});
diff --git a/tools/blog/node_modules/mkdirp/test/rel.js b/tools/blog/node_modules/mkdirp/test/rel.js
new file mode 100644 (file)
index 0000000..7985824
--- /dev/null
@@ -0,0 +1,32 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('rel', function (t) {
+    t.plan(2);
+    var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    
+    var cwd = process.cwd();
+    process.chdir('/tmp');
+    
+    var file = [x,y,z].join('/');
+    
+    mkdirp(file, 0755, function (err) {
+        if (err) t.fail(err);
+        else path.exists(file, function (ex) {
+            if (!ex) t.fail('file not created')
+            else fs.stat(file, function (err, stat) {
+                if (err) t.fail(err)
+                else {
+                    process.chdir(cwd);
+                    t.equal(stat.mode & 0777, 0755);
+                    t.ok(stat.isDirectory(), 'target not a directory');
+                    t.end();
+                }
+            })
+        })
+    });
+});
diff --git a/tools/blog/node_modules/mkdirp/test/return.js b/tools/blog/node_modules/mkdirp/test/return.js
new file mode 100644 (file)
index 0000000..bce68e5
--- /dev/null
@@ -0,0 +1,25 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('return value', function (t) {
+    t.plan(4);
+    var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+    var file = '/tmp/' + [x,y,z].join('/');
+
+    // should return the first dir created.
+    // By this point, it would be profoundly surprising if /tmp didn't
+    // already exist, since every other test makes things in there.
+    mkdirp(file, function (err, made) {
+        t.ifError(err);
+        t.equal(made, '/tmp/' + x);
+        mkdirp(file, function (err, made) {
+          t.ifError(err);
+          t.equal(made, null);
+        });
+    });
+});
diff --git a/tools/blog/node_modules/mkdirp/test/return_sync.js b/tools/blog/node_modules/mkdirp/test/return_sync.js
new file mode 100644 (file)
index 0000000..7c222d3
--- /dev/null
@@ -0,0 +1,24 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('return value', function (t) {
+    t.plan(2);
+    var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+    var file = '/tmp/' + [x,y,z].join('/');
+
+    // should return the first dir created.
+    // By this point, it would be profoundly surprising if /tmp didn't
+    // already exist, since every other test makes things in there.
+    // Note that this will throw on failure, which will fail the test.
+    var made = mkdirp.sync(file);
+    t.equal(made, '/tmp/' + x);
+
+    // making the same file again should have no effect.
+    made = mkdirp.sync(file);
+    t.equal(made, null);
+});
diff --git a/tools/blog/node_modules/mkdirp/test/root.js b/tools/blog/node_modules/mkdirp/test/root.js
new file mode 100644 (file)
index 0000000..97ad7a2
--- /dev/null
@@ -0,0 +1,18 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('root', function (t) {
+    // '/' on unix, 'c:/' on windows.
+    var file = path.resolve('/');
+
+    mkdirp(file, 0755, function (err) {
+        if (err) throw err
+        fs.stat(file, function (er, stat) {
+            if (er) throw er
+            t.ok(stat.isDirectory(), 'target is a directory');
+            t.end();
+        })
+    });
+});
diff --git a/tools/blog/node_modules/mkdirp/test/sync.js b/tools/blog/node_modules/mkdirp/test/sync.js
new file mode 100644 (file)
index 0000000..7530cad
--- /dev/null
@@ -0,0 +1,32 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('sync', function (t) {
+    t.plan(2);
+    var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+    var file = '/tmp/' + [x,y,z].join('/');
+
+    try {
+        mkdirp.sync(file, 0755);
+    } catch (err) {
+        t.fail(err);
+        return t.end();
+    }
+
+    path.exists(file, function (ex) {
+        if (!ex) t.fail('file not created')
+        else fs.stat(file, function (err, stat) {
+            if (err) t.fail(err)
+            else {
+                t.equal(stat.mode & 0777, 0755);
+                t.ok(stat.isDirectory(), 'target not a directory');
+                t.end();
+            }
+        });
+    });
+});
diff --git a/tools/blog/node_modules/mkdirp/test/umask.js b/tools/blog/node_modules/mkdirp/test/umask.js
new file mode 100644 (file)
index 0000000..64ccafe
--- /dev/null
@@ -0,0 +1,28 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('implicit mode from umask', function (t) {
+    t.plan(2);
+    var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    
+    var file = '/tmp/' + [x,y,z].join('/');
+    
+    mkdirp(file, function (err) {
+        if (err) t.fail(err);
+        else path.exists(file, function (ex) {
+            if (!ex) t.fail('file not created')
+            else fs.stat(file, function (err, stat) {
+                if (err) t.fail(err)
+                else {
+                    t.equal(stat.mode & 0777, 0777 & (~process.umask()));
+                    t.ok(stat.isDirectory(), 'target not a directory');
+                    t.end();
+                }
+            })
+        })
+    });
+});
diff --git a/tools/blog/node_modules/mkdirp/test/umask_sync.js b/tools/blog/node_modules/mkdirp/test/umask_sync.js
new file mode 100644 (file)
index 0000000..35bd5cb
--- /dev/null
@@ -0,0 +1,32 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('umask sync modes', function (t) {
+    t.plan(2);
+    var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+    var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+    var file = '/tmp/' + [x,y,z].join('/');
+
+    try {
+        mkdirp.sync(file);
+    } catch (err) {
+        t.fail(err);
+        return t.end();
+    }
+
+    path.exists(file, function (ex) {
+        if (!ex) t.fail('file not created')
+        else fs.stat(file, function (err, stat) {
+            if (err) t.fail(err)
+            else {
+                t.equal(stat.mode & 0777, (0777 & (~process.umask())));
+                t.ok(stat.isDirectory(), 'target not a directory');
+                t.end();
+            }
+        });
+    });
+});
diff --git a/tools/blog/node_modules/semver/LICENSE b/tools/blog/node_modules/semver/LICENSE
new file mode 100644 (file)
index 0000000..05a4010
--- /dev/null
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/blog/node_modules/semver/README.md b/tools/blog/node_modules/semver/README.md
new file mode 100644 (file)
index 0000000..6fa37a3
--- /dev/null
@@ -0,0 +1,119 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Usage
+
+    $ npm install semver
+
+    semver.valid('1.2.3') // true
+    semver.valid('a.b.c') // false
+    semver.clean('  =v1.2.3   ') // '1.2.3'
+    semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+    semver.gt('1.2.3', '9.8.7') // false
+    semver.lt('1.2.3', '9.8.7') // true
+
+As a command-line utility:
+
+    $ semver -h
+
+    Usage: semver -v <version> [-r <range>]
+    Test if version(s) satisfy the supplied range(s),
+    and sort them.
+
+    Multiple versions or ranges may be supplied.
+
+    Program exits successfully if any valid version satisfies
+    all supplied ranges, and prints all satisfying versions.
+
+    If no versions are valid, or ranges are not satisfied,
+    then exits failure.
+
+    Versions are printed in ascending order, so supplying
+    multiple versions to the utility will just sort them.
+
+## Versions
+
+A version is the following things, in this order:
+
+* a number (Major)
+* a period
+* a number (minor)
+* a period
+* a number (patch)
+* OPTIONAL: a hyphen, followed by a number (build)
+* OPTIONAL: a collection of pretty much any non-whitespace characters
+  (tag)
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Comparisons
+
+The ordering of versions is done using the following algorithm, given
+two versions and asked to find the greater of the two:
+
+* If the majors are numerically different, then take the one
+  with a bigger major number. `2.3.4 > 1.3.4`
+* If the minors are numerically different, then take the one
+  with the bigger minor number. `2.3.4 > 2.2.4`
+* If the patches are numerically different, then take the one with the
+  bigger patch number. `2.3.4 > 2.3.3`
+* If only one of them has a build number, then take the one with the
+  build number.  `2.3.4-0 > 2.3.4`
+* If they both have build numbers, and the build numbers are numerically
+  different, then take the one with the bigger build number.
+  `2.3.4-10 > 2.3.4-9`
+* If only one of them has a tag, then take the one without the tag.
+  `2.3.4 > 2.3.4-beta`
+* If they both have tags, then take the one with the lexicographically
+  larger tag.  `2.3.4-beta > 2.3.4-alpha`
+* At this point, they're equal.
+
+## Ranges
+
+The following range styles are supported:
+
+* `>1.2.3` Greater than a specific version.
+* `<1.2.3` Less than
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+* `~1.2.3` := `>=1.2.3 <1.3.0`
+* `~1.2` := `>=1.2.0 <2.0.0`
+* `~1` := `>=1.0.0 <2.0.0`
+* `1.2.x` := `>=1.2.0 <1.3.0`
+* `1.x` := `>=1.0.0 <2.0.0`
+
+Ranges can be joined with either a space (which implies "and") or a
+`||` (which implies "or").
+
+## Functions
+
+* valid(v): Return the parsed version, or null if it's not valid.
+* inc(v, release): Return the version incremented by the release type
+  (major, minor, patch, or build), or null if it's not valid.
+
+### Comparison
+
+* gt(v1, v2): `v1 > v2`
+* gte(v1, v2): `v1 >= v2`
+* lt(v1, v2): `v1 < v2`
+* lte(v1, v2): `v1 <= v2`
+* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,
+  even if they're not the exact same string.  You already know how to
+  compare strings.
+* neq(v1, v2): `v1 != v2` The opposite of eq.
+* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call
+  the corresponding function above.  `"==="` and `"!=="` do simple
+  string comparison, but are included for completeness.  Throws if an
+  invalid comparison string is provided.
+* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if
+  v2 is greater.  Sorts in ascending order if passed to Array.sort().
+* rcompare(v1, v2): The reverse of compare.  Sorts an array of versions
+  in descending order when passed to Array.sort().
+
+
+### Ranges
+
+* validRange(range): Return the valid range or null if it's not valid
+* satisfies(version, range): Return true if the version satisfies the
+  range.
+* maxSatisfying(versions, range): Return the highest version in the list
+  that satisfies the range, or null if none of them do.
diff --git a/tools/blog/node_modules/semver/bin/semver b/tools/blog/node_modules/semver/bin/semver
new file mode 100755 (executable)
index 0000000..3e6afb4
--- /dev/null
@@ -0,0 +1,71 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+var argv = process.argv.slice(2)
+  , versions = []
+  , range = []
+  , gt = []
+  , lt = []
+  , eq = []
+  , semver = require("../semver")
+
+main()
+
+function main () {
+  if (!argv.length) return help()
+  while (argv.length) {
+    var a
+    switch (a = argv.shift()) {
+      case "-v": case "--version":
+        versions.push(argv.shift())
+        break
+      case "-r": case "--range":
+        range.push(argv.shift())
+        break
+      case "-h": case "--help": case "-?":
+        return help()
+      default:
+        versions.push(a)
+        break
+    }
+  }
+
+  versions = versions.filter(semver.valid)
+  for (var i = 0, l = range.length; i < l ; i ++) {
+    versions = versions.filter(function (v) {
+      return semver.satisfies(v, range[i])
+    })
+    if (!versions.length) return fail()
+  }
+  return success(versions)
+}
+
+function fail () { process.exit(1) }
+
+function success () {
+  versions.sort(semver.compare)
+    .map(semver.clean)
+    .forEach(function (v,i,_) { console.log(v) })
+}
+
+function help () {
+  console.log(["Usage: semver -v <version> [-r <range>]"
+              ,"Test if version(s) satisfy the supplied range(s),"
+              ,"and sort them."
+              ,""
+              ,"Multiple versions or ranges may be supplied."
+              ,""
+              ,"Program exits successfully if any valid version satisfies"
+              ,"all supplied ranges, and prints all satisfying versions."
+              ,""
+              ,"If no versions are valid, or ranges are not satisfied,"
+              ,"then exits failure."
+              ,""
+              ,"Versions are printed in ascending order, so supplying"
+              ,"multiple versions to the utility will just sort them."
+              ].join("\n"))
+}
+
+
diff --git a/tools/blog/node_modules/semver/package.json b/tools/blog/node_modules/semver/package.json
new file mode 100644 (file)
index 0000000..6d89400
--- /dev/null
@@ -0,0 +1,26 @@
+{
+  "name": "semver",
+  "version": "1.0.14",
+  "description": "The semantic version parser used by npm.",
+  "main": "semver.js",
+  "scripts": {
+    "test": "tap test.js"
+  },
+  "devDependencies": {
+    "tap": "0.x >=0.0.4"
+  },
+  "license": {
+    "type": "MIT",
+    "url": "https://github.com/isaacs/semver/raw/master/LICENSE"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/node-semver.git"
+  },
+  "bin": {
+    "semver": "./bin/semver"
+  },
+  "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n    $ npm install semver\n\n    semver.valid('1.2.3') // true\n    semver.valid('a.b.c') // false\n    semver.clean('  =v1.2.3   ') // '1.2.3'\n    semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n    semver.gt('1.2.3', '9.8.7') // false\n    semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n    $ semver -h\n\n    Usage: semver -v <version> [-r <range>]\n    Test if version(s) satisfy the supplied range(s),\n    and sort them.\n\n    Multiple versions or ranges may be supplied.\n\n    Program exits successfully if any valid version satisfies\n    all supplied ranges, and prints all satisfying versions.\n\n    If no versions are valid, or ranges are not satisfied,\n    then exits failure.\n\n    Versions are printed in ascending order, so supplying\n    multiple versions to the utility will just sort them.\n\n## Versions\n\nA version is the following things, in this order:\n\n* a number (Major)\n* a period\n* a number (minor)\n* a period\n* a number (patch)\n* OPTIONAL: a hyphen, followed by a number (build)\n* OPTIONAL: a collection of pretty much any non-whitespace characters\n  (tag)\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Comparisons\n\nThe ordering of versions is done using the following algorithm, given\ntwo versions and asked to find the greater of the two:\n\n* If the majors are numerically different, then take the one\n  with a bigger major number. `2.3.4 > 1.3.4`\n* If the minors are numerically different, then take the one\n  with the bigger minor number. `2.3.4 > 2.2.4`\n* If the patches are numerically different, then take the one with the\n  bigger patch number. `2.3.4 > 2.3.3`\n* If only one of them has a build number, then take the one with the\n  build number.  `2.3.4-0 > 2.3.4`\n* If they both have build numbers, and the build numbers are numerically\n  different, then take the one with the bigger build number.\n  `2.3.4-10 > 2.3.4-9`\n* If only one of them has a tag, then take the one without the tag.\n  `2.3.4 > 2.3.4-beta`\n* If they both have tags, then take the one with the lexicographically\n  larger tag.  `2.3.4-beta > 2.3.4-alpha`\n* At this point, they're equal.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3 <1.3.0`\n* `~1.2` := `>=1.2.0 <2.0.0`\n* `~1` := `>=1.0.0 <2.0.0`\n* `1.2.x` := `>=1.2.0 <1.3.0`\n* `1.x` := `>=1.0.0 <2.0.0`\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n  (major, minor, patch, or build), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n  even if they're not the exact same string.  You already know how to\n  compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n  the corresponding function above.  `\"===\"` and `\"!==\"` do simple\n  string comparison, but are included for completeness.  Throws if an\n  invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n  v2 is greater.  Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare.  Sorts an array of versions\n  in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n  range.\n* maxSatisfying(versions, range): Return the highest version in the list\n  that satisfies the range, or null if none of them do.\n",
+  "_id": "semver@1.0.14",
+  "_from": "semver"
+}
diff --git a/tools/blog/node_modules/semver/semver.js b/tools/blog/node_modules/semver/semver.js
new file mode 100644 (file)
index 0000000..8090e0c
--- /dev/null
@@ -0,0 +1,305 @@
+;(function (exports) { // nothing in here is node-specific.
+
+// See http://semver.org/
+// This implementation is a *hair* less strict in that it allows
+// v1.2.3 things, and also tags that don't begin with a char.
+
+var semver = "\\s*[v=]*\\s*([0-9]+)"                // major
+           + "\\.([0-9]+)"                  // minor
+           + "\\.([0-9]+)"                  // patch
+           + "(-[0-9]+-?)?"                 // build
+           + "([a-zA-Z-][a-zA-Z0-9-\.:]*)?" // tag
+  , exprComparator = "^((<|>)?=?)\s*("+semver+")$|^$"
+  , xRangePlain = "[v=]*([0-9]+|x|X|\\*)"
+                + "(?:\\.([0-9]+|x|X|\\*)"
+                + "(?:\\.([0-9]+|x|X|\\*)"
+                + "([a-zA-Z-][a-zA-Z0-9-\.:]*)?)?)?"
+  , xRange = "((?:<|>)=?)?\\s*" + xRangePlain
+  , exprSpermy = "(?:~>?)"+xRange
+  , expressions = exports.expressions =
+    { parse : new RegExp("^\\s*"+semver+"\\s*$")
+    , parsePackage : new RegExp("^\\s*([^\/]+)[-@](" +semver+")\\s*$")
+    , parseRange : new RegExp(
+        "^\\s*(" + semver + ")\\s+-\\s+(" + semver + ")\\s*$")
+    , validComparator : new RegExp("^"+exprComparator+"$")
+    , parseXRange : new RegExp("^"+xRange+"$")
+    , parseSpermy : new RegExp("^"+exprSpermy+"$")
+    }
+
+
+Object.getOwnPropertyNames(expressions).forEach(function (i) {
+  exports[i] = function (str) {
+    return ("" + (str || "")).match(expressions[i])
+  }
+})
+
+exports.rangeReplace = ">=$1 <=$7"
+exports.clean = clean
+exports.compare = compare
+exports.rcompare = rcompare
+exports.satisfies = satisfies
+exports.gt = gt
+exports.gte = gte
+exports.lt = lt
+exports.lte = lte
+exports.eq = eq
+exports.neq = neq
+exports.cmp = cmp
+exports.inc = inc
+
+exports.valid = valid
+exports.validPackage = validPackage
+exports.validRange = validRange
+exports.maxSatisfying = maxSatisfying
+
+exports.replaceStars = replaceStars
+exports.toComparators = toComparators
+
+function stringify (version) {
+  var v = version
+  return [v[1]||'', v[2]||'', v[3]||''].join(".") + (v[4]||'') + (v[5]||'')
+}
+
+function clean (version) {
+  version = exports.parse(version)
+  if (!version) return version
+  return stringify(version)
+}
+
+function valid (version) {
+  if (typeof version !== "string") return null
+  return exports.parse(version) && version.trim().replace(/^[v=]+/, '')
+}
+
+function validPackage (version) {
+  if (typeof version !== "string") return null
+  return version.match(expressions.parsePackage) && version.trim()
+}
+
+// range can be one of:
+// "1.0.3 - 2.0.0" range, inclusive, like ">=1.0.3 <=2.0.0"
+// ">1.0.2" like 1.0.3 - 9999.9999.9999
+// ">=1.0.2" like 1.0.2 - 9999.9999.9999
+// "<2.0.0" like 0.0.0 - 1.9999.9999
+// ">1.0.2 <2.0.0" like 1.0.3 - 1.9999.9999
+var starExpression = /(<|>)?=?\s*\*/g
+  , starReplace = ""
+  , compTrimExpression = new RegExp("((<|>)?=?)\\s*("
+                                    +semver+"|"+xRangePlain+")", "g")
+  , compTrimReplace = "$1$3"
+
+function toComparators (range) {
+  var ret = (range || "").trim()
+    .replace(expressions.parseRange, exports.rangeReplace)
+    .replace(compTrimExpression, compTrimReplace)
+    .split(/\s+/)
+    .join(" ")
+    .split("||")
+    .map(function (orchunk) {
+      return orchunk
+        .split(" ")
+        .map(replaceXRanges)
+        .map(replaceSpermies)
+        .map(replaceStars)
+        .join(" ").trim()
+    })
+    .map(function (orchunk) {
+      return orchunk
+        .trim()
+        .split(/\s+/)
+        .filter(function (c) { return c.match(expressions.validComparator) })
+    })
+    .filter(function (c) { return c.length })
+  return ret
+}
+
+function replaceStars (stars) {
+  return stars.trim().replace(starExpression, starReplace)
+}
+
+// "2.x","2.x.x" --> ">=2.0.0- <2.1.0-"
+// "2.3.x" --> ">=2.3.0- <2.4.0-"
+function replaceXRanges (ranges) {
+  return ranges.split(/\s+/)
+               .map(replaceXRange)
+               .join(" ")
+}
+
+function replaceXRange (version) {
+  return version.trim().replace(expressions.parseXRange,
+                                function (v, gtlt, M, m, p, t) {
+    var anyX = !M || M.toLowerCase() === "x" || M === "*"
+               || !m || m.toLowerCase() === "x" || m === "*"
+               || !p || p.toLowerCase() === "x" || p === "*"
+      , ret = v
+
+    if (gtlt && anyX) {
+      // just replace x'es with zeroes
+      ;(!M || M === "*" || M.toLowerCase() === "x") && (M = 0)
+      ;(!m || m === "*" || m.toLowerCase() === "x") && (m = 0)
+      ;(!p || p === "*" || p.toLowerCase() === "x") && (p = 0)
+      ret = gtlt + M+"."+m+"."+p+"-"
+    } else if (!M || M === "*" || M.toLowerCase() === "x") {
+      ret = "*" // allow any
+    } else if (!m || m === "*" || m.toLowerCase() === "x") {
+      // append "-" onto the version, otherwise
+      // "1.x.x" matches "2.0.0beta", since the tag
+      // *lowers* the version value
+      ret = ">="+M+".0.0- <"+(+M+1)+".0.0-"
+    } else if (!p || p === "*" || p.toLowerCase() === "x") {
+      ret = ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-"
+    }
+    //console.error("parseXRange", [].slice.call(arguments), ret)
+    return ret
+  })
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceSpermies (version) {
+  return version.trim().replace(expressions.parseSpermy,
+                                function (v, gtlt, M, m, p, t) {
+    if (gtlt) throw new Error(
+      "Using '"+gtlt+"' with ~ makes no sense. Don't do it.")
+
+    if (!M || M.toLowerCase() === "x") {
+      return ""
+    }
+    // ~1 == >=1.0.0- <2.0.0-
+    if (!m || m.toLowerCase() === "x") {
+      return ">="+M+".0.0- <"+(+M+1)+".0.0-"
+    }
+    // ~1.2 == >=1.2.0- <1.3.0-
+    if (!p || p.toLowerCase() === "x") {
+      return ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-"
+    }
+    // ~1.2.3 == >=1.2.3- <1.3.0-
+    t = t || "-"
+    return ">="+M+"."+m+"."+p+t+" <"+M+"."+(+m+1)+".0-"
+  })
+}
+
+function validRange (range) {
+  range = replaceStars(range)
+  var c = toComparators(range)
+  return (c.length === 0)
+       ? null
+       : c.map(function (c) { return c.join(" ") }).join("||")
+}
+
+// returns the highest satisfying version in the list, or undefined
+function maxSatisfying (versions, range) {
+  return versions
+    .filter(function (v) { return satisfies(v, range) })
+    .sort(compare)
+    .pop()
+}
+function satisfies (version, range) {
+  version = valid(version)
+  if (!version) return false
+  range = toComparators(range)
+  for (var i = 0, l = range.length ; i < l ; i ++) {
+    var ok = false
+    for (var j = 0, ll = range[i].length ; j < ll ; j ++) {
+      var r = range[i][j]
+        , gtlt = r.charAt(0) === ">" ? gt
+               : r.charAt(0) === "<" ? lt
+               : false
+        , eq = r.charAt(!!gtlt) === "="
+        , sub = (!!eq) + (!!gtlt)
+      if (!gtlt) eq = true
+      r = r.substr(sub)
+      r = (r === "") ? r : valid(r)
+      ok = (r === "") || (eq && r === version) || (gtlt && gtlt(version, r))
+      if (!ok) break
+    }
+    if (ok) return true
+  }
+  return false
+}
+
+// return v1 > v2 ? 1 : -1
+function compare (v1, v2) {
+  var g = gt(v1, v2)
+  return g === null ? 0 : g ? 1 : -1
+}
+
+function rcompare (v1, v2) {
+  return compare(v2, v1)
+}
+
+function lt (v1, v2) { return gt(v2, v1) }
+function gte (v1, v2) { return !lt(v1, v2) }
+function lte (v1, v2) { return !gt(v1, v2) }
+function eq (v1, v2) { return gt(v1, v2) === null }
+function neq (v1, v2) { return gt(v1, v2) !== null }
+function cmp (v1, c, v2) {
+  switch (c) {
+    case ">": return gt(v1, v2)
+    case "<": return lt(v1, v2)
+    case ">=": return gte(v1, v2)
+    case "<=": return lte(v1, v2)
+    case "==": return eq(v1, v2)
+    case "!=": return neq(v1, v2)
+    case "===": return v1 === v2
+    case "!==": return v1 !== v2
+    default: throw new Error("Y U NO USE VALID COMPARATOR!? "+c)
+  }
+}
+
+// return v1 > v2
+function num (v) {
+  return v === undefined ? -1 : parseInt((v||"0").replace(/[^0-9]+/g, ''), 10)
+}
+function gt (v1, v2) {
+  v1 = exports.parse(v1)
+  v2 = exports.parse(v2)
+  if (!v1 || !v2) return false
+
+  for (var i = 1; i < 5; i ++) {
+    v1[i] = num(v1[i])
+    v2[i] = num(v2[i])
+    if (v1[i] > v2[i]) return true
+    else if (v1[i] !== v2[i]) return false
+  }
+  // no tag is > than any tag, or use lexicographical order.
+  var tag1 = v1[5] || ""
+    , tag2 = v2[5] || ""
+
+  // kludge: null means they were equal.  falsey, and detectable.
+  // embarrassingly overclever, though, I know.
+  return tag1 === tag2 ? null
+         : !tag1 ? true
+         : !tag2 ? false
+         : tag1 > tag2
+}
+
+function inc (version, release) {
+  version = exports.parse(version)
+  if (!version) return null
+
+  var parsedIndexLookup =
+    { 'major': 1
+    , 'minor': 2
+    , 'patch': 3
+    , 'build': 4 }
+  var incIndex = parsedIndexLookup[release]
+  if (incIndex === undefined) return null
+
+  var current = num(version[incIndex])
+  version[incIndex] = current === -1 ? 1 : current + 1
+
+  for (var i = incIndex + 1; i < 5; i ++) {
+    if (num(version[i]) !== -1) version[i] = "0"
+  }
+
+  if (version[4]) version[4] = "-" + version[4]
+  version[5] = ""
+
+  return stringify(version)
+}
+})(typeof exports === "object" ? exports : semver = {})
diff --git a/tools/blog/node_modules/semver/test.js b/tools/blog/node_modules/semver/test.js
new file mode 100644 (file)
index 0000000..65ff8a9
--- /dev/null
@@ -0,0 +1,405 @@
+var tap = require("tap")
+  , test = tap.test
+  , semver = require("./semver.js")
+  , eq = semver.eq
+  , gt = semver.gt
+  , lt = semver.lt
+  , neq = semver.neq
+  , cmp = semver.cmp
+  , gte = semver.gte
+  , lte = semver.lte
+  , satisfies = semver.satisfies
+  , validRange = semver.validRange
+  , inc = semver.inc
+  , replaceStars = semver.replaceStars
+  , toComparators = semver.toComparators
+
+tap.plan(8)
+
+test("\ncomparison tests", function (t) {
+; [ ["0.0.0", "0.0.0foo"]
+  , ["0.0.1", "0.0.0"]
+  , ["1.0.0", "0.9.9"]
+  , ["0.10.0", "0.9.0"]
+  , ["0.99.0", "0.10.0"]
+  , ["2.0.0", "1.2.3"]
+  , ["v0.0.0", "0.0.0foo"]
+  , ["v0.0.1", "0.0.0"]
+  , ["v1.0.0", "0.9.9"]
+  , ["v0.10.0", "0.9.0"]
+  , ["v0.99.0", "0.10.0"]
+  , ["v2.0.0", "1.2.3"]
+  , ["0.0.0", "v0.0.0foo"]
+  , ["0.0.1", "v0.0.0"]
+  , ["1.0.0", "v0.9.9"]
+  , ["0.10.0", "v0.9.0"]
+  , ["0.99.0", "v0.10.0"]
+  , ["2.0.0", "v1.2.3"]
+  , ["1.2.3", "1.2.3-asdf"]
+  , ["1.2.3-4", "1.2.3"]
+  , ["1.2.3-4-foo", "1.2.3"]
+  , ["1.2.3-5", "1.2.3-5-foo"]
+  , ["1.2.3-5", "1.2.3-4"]
+  , ["1.2.3-5-foo", "1.2.3-5-Foo"]
+  ].forEach(function (v) {
+    var v0 = v[0]
+      , v1 = v[1]
+    t.ok(gt(v0, v1), "gt('"+v0+"', '"+v1+"')")
+    t.ok(lt(v1, v0), "lt('"+v1+"', '"+v0+"')")
+    t.ok(!gt(v1, v0), "!gt('"+v1+"', '"+v0+"')")
+    t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')")
+    t.ok(eq(v0, v0), "eq('"+v0+"', '"+v0+"')")
+    t.ok(eq(v1, v1), "eq('"+v1+"', '"+v1+"')")
+    t.ok(neq(v0, v1), "neq('"+v0+"', '"+v1+"')")
+    t.ok(cmp(v1, "==", v1), "cmp('"+v1+"' == '"+v1+"')")
+    t.ok(cmp(v0, ">=", v1), "cmp('"+v0+"' >= '"+v1+"')")
+    t.ok(cmp(v1, "<=", v0), "cmp('"+v1+"' <= '"+v0+"')")
+    t.ok(cmp(v0, "!=", v1), "cmp('"+v0+"' != '"+v1+"')")
+  })
+  t.end()
+})
+
+test("\nequality tests", function (t) {
+; [ ["1.2.3", "v1.2.3"]
+  , ["1.2.3", "=1.2.3"]
+  , ["1.2.3", "v 1.2.3"]
+  , ["1.2.3", "= 1.2.3"]
+  , ["1.2.3", " v1.2.3"]
+  , ["1.2.3", " =1.2.3"]
+  , ["1.2.3", " v 1.2.3"]
+  , ["1.2.3", " = 1.2.3"]
+  , ["1.2.3-0", "v1.2.3-0"]
+  , ["1.2.3-0", "=1.2.3-0"]
+  , ["1.2.3-0", "v 1.2.3-0"]
+  , ["1.2.3-0", "= 1.2.3-0"]
+  , ["1.2.3-0", " v1.2.3-0"]
+  , ["1.2.3-0", " =1.2.3-0"]
+  , ["1.2.3-0", " v 1.2.3-0"]
+  , ["1.2.3-0", " = 1.2.3-0"]
+  , ["1.2.3-01", "v1.2.3-1"]
+  , ["1.2.3-01", "=1.2.3-1"]
+  , ["1.2.3-01", "v 1.2.3-1"]
+  , ["1.2.3-01", "= 1.2.3-1"]
+  , ["1.2.3-01", " v1.2.3-1"]
+  , ["1.2.3-01", " =1.2.3-1"]
+  , ["1.2.3-01", " v 1.2.3-1"]
+  , ["1.2.3-01", " = 1.2.3-1"]
+  , ["1.2.3beta", "v1.2.3beta"]
+  , ["1.2.3beta", "=1.2.3beta"]
+  , ["1.2.3beta", "v 1.2.3beta"]
+  , ["1.2.3beta", "= 1.2.3beta"]
+  , ["1.2.3beta", " v1.2.3beta"]
+  , ["1.2.3beta", " =1.2.3beta"]
+  , ["1.2.3beta", " v 1.2.3beta"]
+  , ["1.2.3beta", " = 1.2.3beta"]
+  ].forEach(function (v) {
+    var v0 = v[0]
+      , v1 = v[1]
+    t.ok(eq(v0, v1), "eq('"+v0+"', '"+v1+"')")
+    t.ok(!neq(v0, v1), "!neq('"+v0+"', '"+v1+"')")
+    t.ok(cmp(v0, "==", v1), "cmp("+v0+"=="+v1+")")
+    t.ok(!cmp(v0, "!=", v1), "!cmp("+v0+"!="+v1+")")
+    t.ok(!cmp(v0, "===", v1), "!cmp("+v0+"==="+v1+")")
+    t.ok(cmp(v0, "!==", v1), "cmp("+v0+"!=="+v1+")")
+    t.ok(!gt(v0, v1), "!gt('"+v0+"', '"+v1+"')")
+    t.ok(gte(v0, v1), "gte('"+v0+"', '"+v1+"')")
+    t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')")
+    t.ok(lte(v0, v1), "lte('"+v0+"', '"+v1+"')")
+  })
+  t.end()
+})
+
+
+test("\nrange tests", function (t) {
+; [ ["1.0.0 - 2.0.0", "1.2.3"]
+  , ["1.0.0", "1.0.0"]
+  , [">=*", "0.2.4"]
+  , ["", "1.0.0"]
+  , ["*", "1.2.3"]
+  , ["*", "v1.2.3-foo"]
+  , [">=1.0.0", "1.0.0"]
+  , [">=1.0.0", "1.0.1"]
+  , [">=1.0.0", "1.1.0"]
+  , [">1.0.0", "1.0.1"]
+  , [">1.0.0", "1.1.0"]
+  , ["<=2.0.0", "2.0.0"]
+  , ["<=2.0.0", "1.9999.9999"]
+  , ["<=2.0.0", "0.2.9"]
+  , ["<2.0.0", "1.9999.9999"]
+  , ["<2.0.0", "0.2.9"]
+  , [">= 1.0.0", "1.0.0"]
+  , [">=  1.0.0", "1.0.1"]
+  , [">=   1.0.0", "1.1.0"]
+  , ["> 1.0.0", "1.0.1"]
+  , [">  1.0.0", "1.1.0"]
+  , ["<=   2.0.0", "2.0.0"]
+  , ["<= 2.0.0", "1.9999.9999"]
+  , ["<=  2.0.0", "0.2.9"]
+  , ["<    2.0.0", "1.9999.9999"]
+  , ["<\t2.0.0", "0.2.9"]
+  , [">=0.1.97", "v0.1.97"]
+  , [">=0.1.97", "0.1.97"]
+  , ["0.1.20 || 1.2.4", "1.2.4"]
+  , [">=0.2.3 || <0.0.1", "0.0.0"]
+  , [">=0.2.3 || <0.0.1", "0.2.3"]
+  , [">=0.2.3 || <0.0.1", "0.2.4"]
+  , ["||", "1.3.4"]
+  , ["2.x.x", "2.1.3"]
+  , ["1.2.x", "1.2.3"]
+  , ["1.2.x || 2.x", "2.1.3"]
+  , ["1.2.x || 2.x", "1.2.3"]
+  , ["x", "1.2.3"]
+  , ["2.*.*", "2.1.3"]
+  , ["1.2.*", "1.2.3"]
+  , ["1.2.* || 2.*", "2.1.3"]
+  , ["1.2.* || 2.*", "1.2.3"]
+  , ["*", "1.2.3"]
+  , ["2", "2.1.2"]
+  , ["2.3", "2.3.1"]
+  , ["~2.4", "2.4.0"] // >=2.4.0 <2.5.0
+  , ["~2.4", "2.4.5"]
+  , ["~>3.2.1", "3.2.2"] // >=3.2.1 <3.3.0
+  , ["~1", "1.2.3"] // >=1.0.0 <2.0.0
+  , ["~>1", "1.2.3"]
+  , ["~> 1", "1.2.3"]
+  , ["~1.0", "1.0.2"] // >=1.0.0 <1.1.0
+  , ["~ 1.0", "1.0.2"]
+  , [">=1", "1.0.0"]
+  , [">= 1", "1.0.0"]
+  , ["<1.2", "1.1.1"]
+  , ["< 1.2", "1.1.1"]
+  , ["1", "1.0.0beta"]
+  , ["~v0.5.4-pre", "0.5.5"]
+  , ["~v0.5.4-pre", "0.5.4"]
+  , ["=0.7.x", "0.7.2"]
+  , [">=0.7.x", "0.7.2"]
+  , ["=0.7.x", "0.7.0-asdf"]
+  , [">=0.7.x", "0.7.0-asdf"]
+  , ["<=0.7.x", "0.6.2"]
+  ].forEach(function (v) {
+    t.ok(satisfies(v[1], v[0]), v[0]+" satisfied by "+v[1])
+  })
+  t.end()
+})
+
+test("\nnegative range tests", function (t) {
+; [ ["1.0.0 - 2.0.0", "2.2.3"]
+  , ["1.0.0", "1.0.1"]
+  , [">=1.0.0", "0.0.0"]
+  , [">=1.0.0", "0.0.1"]
+  , [">=1.0.0", "0.1.0"]
+  , [">1.0.0", "0.0.1"]
+  , [">1.0.0", "0.1.0"]
+  , ["<=2.0.0", "3.0.0"]
+  , ["<=2.0.0", "2.9999.9999"]
+  , ["<=2.0.0", "2.2.9"]
+  , ["<2.0.0", "2.9999.9999"]
+  , ["<2.0.0", "2.2.9"]
+  , [">=0.1.97", "v0.1.93"]
+  , [">=0.1.97", "0.1.93"]
+  , ["0.1.20 || 1.2.4", "1.2.3"]
+  , [">=0.2.3 || <0.0.1", "0.0.3"]
+  , [">=0.2.3 || <0.0.1", "0.2.2"]
+  , ["2.x.x", "1.1.3"]
+  , ["2.x.x", "3.1.3"]
+  , ["1.2.x", "1.3.3"]
+  , ["1.2.x || 2.x", "3.1.3"]
+  , ["1.2.x || 2.x", "1.1.3"]
+  , ["2.*.*", "1.1.3"]
+  , ["2.*.*", "3.1.3"]
+  , ["1.2.*", "1.3.3"]
+  , ["1.2.* || 2.*", "3.1.3"]
+  , ["1.2.* || 2.*", "1.1.3"]
+  , ["2", "1.1.2"]
+  , ["2.3", "2.4.1"]
+  , ["~2.4", "2.5.0"] // >=2.4.0 <2.5.0
+  , ["~2.4", "2.3.9"]
+  , ["~>3.2.1", "3.3.2"] // >=3.2.1 <3.3.0
+  , ["~>3.2.1", "3.2.0"] // >=3.2.1 <3.3.0
+  , ["~1", "0.2.3"] // >=1.0.0 <2.0.0
+  , ["~>1", "2.2.3"]
+  , ["~1.0", "1.1.0"] // >=1.0.0 <1.1.0
+  , ["<1", "1.0.0"]
+  , [">=1.2", "1.1.1"]
+  , ["1", "2.0.0beta"]
+  , ["~v0.5.4-beta", "0.5.4-alpha"]
+  , ["<1", "1.0.0beta"]
+  , ["< 1", "1.0.0beta"]
+  , ["=0.7.x", "0.8.2"]
+  , [">=0.7.x", "0.6.2"]
+  , ["<=0.7.x", "0.7.2"]
+  ].forEach(function (v) {
+    t.ok(!satisfies(v[1], v[0]), v[0]+" not satisfied by "+v[1])
+  })
+  t.end()
+})
+
+test("\nincrement versions test", function (t) {
+; [ [ "1.2.3",   "major", "2.0.0"   ]
+  , [ "1.2.3",   "minor", "1.3.0"   ]
+  , [ "1.2.3",   "patch", "1.2.4"   ]
+  , [ "1.2.3",   "build", "1.2.3-1" ]
+  , [ "1.2.3-4", "build", "1.2.3-5" ]
+  , [ "1.2.3tag",    "major", "2.0.0"   ]
+  , [ "1.2.3-tag",   "major", "2.0.0"   ]
+  , [ "1.2.3tag",    "build", "1.2.3-1" ]
+  , [ "1.2.3-tag",   "build", "1.2.3-1" ]
+  , [ "1.2.3-4-tag", "build", "1.2.3-5" ]
+  , [ "1.2.3-4tag",  "build", "1.2.3-5" ]
+  , [ "1.2.3", "fake",  null ]
+  , [ "fake",  "major", null ]
+  ].forEach(function (v) {
+    t.equal(inc(v[0], v[1]), v[2], "inc("+v[0]+", "+v[1]+") === "+v[2])
+  })
+
+  t.end()
+})
+
+test("\nreplace stars test", function (t) {
+; [ [ "", "" ]
+  , [ "*", "" ]
+  , [ "> *", "" ]
+  , [ "<*", "" ]
+  , [ " >=  *", "" ]
+  , [ "* || 1.2.3", " || 1.2.3" ]
+  ].forEach(function (v) {
+    t.equal(replaceStars(v[0]), v[1], "replaceStars("+v[0]+") === "+v[1])
+  })
+
+  t.end()
+})
+
+test("\nvalid range test", function (t) {
+; [ ["1.0.0 - 2.0.0", ">=1.0.0 <=2.0.0"]
+  , ["1.0.0", "1.0.0"]
+  , [">=*", ""]
+  , ["", ""]
+  , ["*", ""]
+  , ["*", ""]
+  , [">=1.0.0", ">=1.0.0"]
+  , [">1.0.0", ">1.0.0"]
+  , ["<=2.0.0", "<=2.0.0"]
+  , ["1", ">=1.0.0- <2.0.0-"]
+  , ["<=2.0.0", "<=2.0.0"]
+  , ["<=2.0.0", "<=2.0.0"]
+  , ["<2.0.0", "<2.0.0"]
+  , ["<2.0.0", "<2.0.0"]
+  , [">= 1.0.0", ">=1.0.0"]
+  , [">=  1.0.0", ">=1.0.0"]
+  , [">=   1.0.0", ">=1.0.0"]
+  , ["> 1.0.0", ">1.0.0"]
+  , [">  1.0.0", ">1.0.0"]
+  , ["<=   2.0.0", "<=2.0.0"]
+  , ["<= 2.0.0", "<=2.0.0"]
+  , ["<=  2.0.0", "<=2.0.0"]
+  , ["<    2.0.0", "<2.0.0"]
+  , ["<        2.0.0", "<2.0.0"]
+  , [">=0.1.97", ">=0.1.97"]
+  , [">=0.1.97", ">=0.1.97"]
+  , ["0.1.20 || 1.2.4", "0.1.20||1.2.4"]
+  , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
+  , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
+  , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
+  , ["||", "||"]
+  , ["2.x.x", ">=2.0.0- <3.0.0-"]
+  , ["1.2.x", ">=1.2.0- <1.3.0-"]
+  , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"]
+  , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"]
+  , ["x", ""]
+  , ["2.*.*", null]
+  , ["1.2.*", null]
+  , ["1.2.* || 2.*", null]
+  , ["1.2.* || 2.*", null]
+  , ["*", ""]
+  , ["2", ">=2.0.0- <3.0.0-"]
+  , ["2.3", ">=2.3.0- <2.4.0-"]
+  , ["~2.4", ">=2.4.0- <2.5.0-"]
+  , ["~2.4", ">=2.4.0- <2.5.0-"]
+  , ["~>3.2.1", ">=3.2.1- <3.3.0-"]
+  , ["~1", ">=1.0.0- <2.0.0-"]
+  , ["~>1", ">=1.0.0- <2.0.0-"]
+  , ["~> 1", ">=1.0.0- <2.0.0-"]
+  , ["~1.0", ">=1.0.0- <1.1.0-"]
+  , ["~ 1.0", ">=1.0.0- <1.1.0-"]
+  , ["<1", "<1.0.0-"]
+  , ["< 1", "<1.0.0-"]
+  , [">=1", ">=1.0.0-"]
+  , [">= 1", ">=1.0.0-"]
+  , ["<1.2", "<1.2.0-"]
+  , ["< 1.2", "<1.2.0-"]
+  , ["1", ">=1.0.0- <2.0.0-"]
+  ].forEach(function (v) {
+    t.equal(validRange(v[0]), v[1], "validRange("+v[0]+") === "+v[1])
+  })
+
+  t.end()
+})
+
+test("\ncomparators test", function (t) {
+; [ ["1.0.0 - 2.0.0", [[">=1.0.0", "<=2.0.0"]] ]
+  , ["1.0.0", [["1.0.0"]] ]
+  , [">=*", [[">=0.0.0-"]] ]
+  , ["", [[""]]]
+  , ["*", [[""]] ]
+  , ["*", [[""]] ]
+  , [">=1.0.0", [[">=1.0.0"]] ]
+  , [">=1.0.0", [[">=1.0.0"]] ]
+  , [">=1.0.0", [[">=1.0.0"]] ]
+  , [">1.0.0", [[">1.0.0"]] ]
+  , [">1.0.0", [[">1.0.0"]] ]
+  , ["<=2.0.0", [["<=2.0.0"]] ]
+  , ["1", [[">=1.0.0-", "<2.0.0-"]] ]
+  , ["<=2.0.0", [["<=2.0.0"]] ]
+  , ["<=2.0.0", [["<=2.0.0"]] ]
+  , ["<2.0.0", [["<2.0.0"]] ]
+  , ["<2.0.0", [["<2.0.0"]] ]
+  , [">= 1.0.0", [[">=1.0.0"]] ]
+  , [">=  1.0.0", [[">=1.0.0"]] ]
+  , [">=   1.0.0", [[">=1.0.0"]] ]
+  , ["> 1.0.0", [[">1.0.0"]] ]
+  , [">  1.0.0", [[">1.0.0"]] ]
+  , ["<=   2.0.0", [["<=2.0.0"]] ]
+  , ["<= 2.0.0", [["<=2.0.0"]] ]
+  , ["<=  2.0.0", [["<=2.0.0"]] ]
+  , ["<    2.0.0", [["<2.0.0"]] ]
+  , ["<\t2.0.0", [["<2.0.0"]] ]
+  , [">=0.1.97", [[">=0.1.97"]] ]
+  , [">=0.1.97", [[">=0.1.97"]] ]
+  , ["0.1.20 || 1.2.4", [["0.1.20"], ["1.2.4"]] ]
+  , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
+  , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
+  , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
+  , ["||", [[""], [""]] ]
+  , ["2.x.x", [[">=2.0.0-", "<3.0.0-"]] ]
+  , ["1.2.x", [[">=1.2.0-", "<1.3.0-"]] ]
+  , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
+  , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
+  , ["x", [[""]] ]
+  , ["2.*.*", [[">=2.0.0-", "<3.0.0-"]] ]
+  , ["1.2.*", [[">=1.2.0-", "<1.3.0-"]] ]
+  , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
+  , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
+  , ["*", [[""]] ]
+  , ["2", [[">=2.0.0-", "<3.0.0-"]] ]
+  , ["2.3", [[">=2.3.0-", "<2.4.0-"]] ]
+  , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ]
+  , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ]
+  , ["~>3.2.1", [[">=3.2.1-", "<3.3.0-"]] ]
+  , ["~1", [[">=1.0.0-", "<2.0.0-"]] ]
+  , ["~>1", [[">=1.0.0-", "<2.0.0-"]] ]
+  , ["~> 1", [[">=1.0.0-", "<2.0.0-"]] ]
+  , ["~1.0", [[">=1.0.0-", "<1.1.0-"]] ]
+  , ["~ 1.0", [[">=1.0.0-", "<1.1.0-"]] ]
+  , ["<1", [["<1.0.0-"]] ]
+  , ["< 1", [["<1.0.0-"]] ]
+  , [">=1", [[">=1.0.0-"]] ]
+  , [">= 1", [[">=1.0.0-"]] ]
+  , ["<1.2", [["<1.2.0-"]] ]
+  , ["< 1.2", [["<1.2.0-"]] ]
+  , ["1", [[">=1.0.0-", "<2.0.0-"]] ]
+  ].forEach(function (v) {
+    t.equivalent(toComparators(v[0]), v[1], "toComparators("+v[0]+") === "+JSON.stringify(v[1]))
+  })
+
+  t.end()
+})
diff --git a/tools/blog/templates/index.ejs b/tools/blog/templates/index.ejs
new file mode 100644 (file)
index 0000000..0db16e5
--- /dev/null
@@ -0,0 +1 @@
+This is some ejs
diff --git a/tools/blog/wp-to-markdown.js b/tools/blog/wp-to-markdown.js
new file mode 100644 (file)
index 0000000..65ec2d5
--- /dev/null
@@ -0,0 +1,189 @@
+var sax = require('sax');
+var fs = require('fs');
+var parser = sax.parser(false, { lowercase: true });
+var assert = require('assert');
+var mkdirp = require('mkdirp');
+var url = require('url');
+
+var input = fs.createReadStream(process.argv[2]);
+input.on('data', function(c) {
+  parser.write(c.toString());
+});
+input.on('end', parser.end.bind(parser));
+
+var post = null;
+var author = null;
+var authors = {};
+mkdirp.sync('out');
+
+parser.onopentag = function (tag) {
+  switch (tag.name) {
+    case 'wp:author':
+      assert(author === null);
+      author = {};
+      author.text = '';
+      return;
+
+    case 'wp:author_login':
+      assert(author);
+      author.field = 'login';
+      author.text = '';
+      return;
+
+    case 'wp:author_display_name':
+      assert(author);
+      author.field = 'name';
+      author.text = '';
+      return
+
+    case 'wp:author_first_name':
+      assert(author);
+      author.field = 'first_name';
+      author.text = '';
+      return;
+
+    case 'wp:author_last_name':
+      assert(author);
+      author.field = 'last_name';
+      author.text = '';
+      return;
+
+    case 'item':
+      assert(post === null);
+      post = {};
+      post.text = '';
+      return;
+
+    case 'title':
+      if (post === null) return;
+      post.field = 'title';
+      return
+
+    case 'pubDate':
+    case 'wp:post_date':
+      post.field = 'date';
+      return;
+
+    case 'dc:creator':
+      post.field = 'author';
+      return;
+
+    case 'wp:status':
+      post.field = 'status';
+      return;
+
+    case 'category':
+      post.field = 'category';
+      return;
+
+    case 'content:encoded':
+      post.field = 'body';
+      return;
+
+    case 'link':
+      if (post) post.field = 'link';
+      return;
+
+    default:
+      if (post) post.field = null;
+      if (author) author.field = null;
+      return;
+  }
+};
+
+parser.onclosetag = function (tagName, tag) {
+  switch (tagName) {
+    case 'wp:author':
+      assert(author);
+      finishAuthor();
+      return;
+    case 'item':
+      assert(post);
+      finishPost();
+      return;
+    default:
+      if (post && post.field || author && author.field) finishField();
+      return;
+  }
+};
+
+parser.ontext = parser.oncdata = function (text) {
+  if (author) {
+    if (author.field) author.text += text;
+    else author.text = '';
+  } else if (post) {
+    if (post.field) post.text += text;
+    else post.field = '';
+  }
+};
+
+function finishField() {
+  if (post && post.field) {
+    post[post.field] = post.text;
+    post.field = null;
+    post.text = '';
+  } else if (author && author.field) {
+    author[author.field] = author.text;
+    author.field = null;
+    author.text = '';
+  }
+}
+
+function finishPost() {
+  // don't port drafts.
+  if (post.status === 'draft') {
+    return post = null;
+  }
+  post.date = new Date(post.date);
+
+  if (post.link) {
+    post.slug =
+      url.parse(post.link)
+        .pathname
+        .replace(/\/+$/, '')
+        .split('/')
+        .pop();
+  }
+  if (!post.slug) {
+    post.slug =
+      (post.title + '-' + post.date.toISOString())
+        .replace(/[^a-z0-9]+/gi, '-')
+        .replace(/^-|-$/g, '')
+        .toLowerCase();
+  }
+  post.slug = post.slug || '-';
+
+  delete post.text
+  delete post.link
+  delete post.field
+  post.author = authors[post.author] || post.author;
+
+  post.body = post.body || '';
+
+  // actually write it!
+  var output = [];
+  Object.keys(post)
+  .filter(function (f) { return f !== 'body' }).forEach(function (k) {
+    output.push(k + ': ' + post[k]);
+  })
+  output = output.join('\n') + '\n\n' + post.body.trim() + '\n';
+
+  var f = 'out/' + post.category + '/' + post.slug + '.md';
+  console.log(f, post.title);
+  mkdirp.sync('out/' + post.category)
+  fs.writeFileSync(f, output, 'utf8');
+
+  post = null;
+}
+
+function finishAuthor () {
+  author.name = author.name ||
+                (author.first_name + ' ' + author.last_name) ||
+                author.login;
+  delete author.first_name
+  delete author.last_name
+  delete author.text
+  delete author.field
+  authors[author.login] = author.name
+  author = null;
+}