From 31a1760604ec18935be86d4a51e7d1083a9fbd2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Fri, 21 Mar 2014 12:15:45 +0100
Subject: [PATCH 01/83] Trac: Use normalized bugs URL from package
---
lib/trac.js | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/lib/trac.js b/lib/trac.js
index c94a7bd..dc96883 100644
--- a/lib/trac.js
+++ b/lib/trac.js
@@ -1,9 +1,19 @@
module.exports = function( Release ) {
Release.define({
- trac: function( path ) {
- var tracUrl = "http://bugs." + Release.project + ".com";
+ _tracUrl: function() {
+ var bugs = Release.readPackage().bugs;
+
+ // Unwrap
+ if ( bugs.url ) {
+ bugs = bugs.url;
+ }
+ // Strip trailing slash
+ return bugs.replace( /\/$/, "" );
+ },
+ trac: function( path ) {
+ var tracUrl = Release._tracUrl();
return Release.exec({
command: "curl -s '" + tracUrl + path + "&format=tab'",
silent: true
From d6008804fa47390b47cca74d811844dd382b18bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Fri, 21 Mar 2014 13:15:56 -0400
Subject: [PATCH 02/83] All: Add missing newlines at end of file
---
.gitignore | 2 +-
.travis.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 58c689c..f7873df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
node_modules/grunt
node_modules/grunt-contrib-jshint
-test-release.sh
\ No newline at end of file
+test-release.sh
diff --git a/.travis.yml b/.travis.yml
index 60bbd48..666f7aa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,4 +2,4 @@ language: node_js
node_js:
- "0.8"
before_script:
- - npm install -g grunt-cli
\ No newline at end of file
+ - npm install -g grunt-cli
From 1dd2442f8c3784549ed21dda287be7931b9b1159 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Fri, 21 Mar 2014 18:18:32 +0100
Subject: [PATCH 03/83] Build: Add .editorconfig to avoid missing EOF newline
---
.editorconfig | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 .editorconfig
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..c94db9a
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,11 @@
+# This file is for unifying the coding style for different editors and IDEs
+# editorconfig.org
+
+root = true
+
+[*]
+indent_style = tab
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
From 67055b0040fdb7c82169fdfd3ef3f29d042952b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Fri, 21 Mar 2014 18:21:05 +0100
Subject: [PATCH 04/83] Repo: Set --quiet flag (aka --loglevel warn) for
npm-install
Gets rid of the unnecessary http log, while still outputting a useful
summary and any warnings or errors.
Fixes gh-44
---
lib/repo.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/repo.js b/lib/repo.js
index beb9ef3..ab585e3 100644
--- a/lib/repo.js
+++ b/lib/repo.js
@@ -18,7 +18,7 @@ Release.define({
console.log();
console.log( "Installing dependencies..." );
- Release.exec( "npm install", "Error installing dependencies." );
+ Release.exec( "npm install -q", "Error installing dependencies." );
console.log();
projectRelease = require( Release.dir.repo + "/build/release" );
@@ -26,7 +26,7 @@ Release.define({
if ( projectRelease.dependencies ) {
console.log( "Installing release dependencies..." );
releaseDependencies = projectRelease.dependencies.join( " " );
- Release.exec( "npm install " + releaseDependencies,
+ Release.exec( "npm install -q " + releaseDependencies,
"Error installing release dependencies." );
console.log();
}
From fe0cd503654f4f39286e9030a8489ef5d844e257 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Sat, 22 Mar 2014 14:40:43 +0100
Subject: [PATCH 05/83] Util: Print a stacktrace when aborting
Closes gh-50
---
lib/util.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/util.js b/lib/util.js
index 89852b6..b7338c6 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -30,8 +30,11 @@ Release.define({
},
abort: function( msg ) {
+ var error = new Error();
+ Error.captureStackTrace( error );
console.log( msg.red );
console.log( "Aborting.".red );
+ console.log( error.stack );
process.exit( 1 );
},
From a2e31dc1557ee14365e9bbff2f5ccb366bf57666 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Sat, 22 Mar 2014 16:06:27 +0100
Subject: [PATCH 06/83] Git: Log command when gitLog fails, improves debugging
Closes gh-51
---
lib/git.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/git.js b/lib/git.js
index b21eb69..304b65e 100644
--- a/lib/git.js
+++ b/lib/git.js
@@ -2,11 +2,12 @@ module.exports = function( Release ) {
Release.define({
gitLog: function( format ) {
- var result = Release.exec({
- command: "git log " + Release.prevVersion + ".." + Release.newVersion + " " +
+ var command = "git log " + Release.prevVersion + ".." + Release.newVersion + " " +
"--format='" + format + "'",
- silent: true
- }, "Error getting git log." );
+ result = Release.exec({
+ command: command,
+ silent: true
+ }, "Error getting git log, command was: " + command );
result = result.split( /\r?\n/ );
if ( result[ result.length - 1 ] === "" ) {
From 575fd9949626c9644e6079c3483bdb07eef3a209 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Sat, 22 Mar 2014 16:08:45 +0100
Subject: [PATCH 07/83] All: Replace Release.project with more appropriate
values
Use package name for CDN. Use bugs and repository fields for changelog.
Adds a _packageUrl method that the Trac module can also use.
Fixes gh-49
Closes gh-52
---
lib/bootstrap.js | 12 ++----------
lib/cdn.js | 13 +++++++------
lib/changelog.js | 6 ++----
lib/repo.js | 34 ++++++++++++++++++++++++++++++++++
lib/trac.js | 13 +------------
5 files changed, 46 insertions(+), 32 deletions(-)
diff --git a/lib/bootstrap.js b/lib/bootstrap.js
index cd1b3aa..a38d90e 100644
--- a/lib/bootstrap.js
+++ b/lib/bootstrap.js
@@ -48,7 +48,6 @@ Release.define({
}
console.log();
- console.log( "\tProject: " + Release.project );
console.log( "\tRelease type: " + (Release.preRelease ? "pre-release" : "stable") );
console.log( "\tRemote: " + Release.remote );
console.log( "\tBranch: " + Release.branch );
@@ -71,15 +70,8 @@ Release.define({
process.exit( 1 );
}
- // URL
- if ( /:\/\//.test( remote ) ) {
- Release.project = remote.replace( /.+\/([^\/]+)\.git/, "$1" );
-
- // filesystem or GitHub
- } else {
- Release.project = remote.split( "/" ).pop();
-
- // If it's not a local path, it must be a GitHub repo
+ // If it's not a local path, it must be a GitHub repo
+ if ( !/:\/\//.test( remote ) ) {
if ( !fs.existsSync( remote ) ) {
Release.isTest = !/^jquery\//.test( remote );
remote = "git@github.com:" + remote + ".git";
diff --git a/lib/cdn.js b/lib/cdn.js
index d0bca25..b97f99d 100644
--- a/lib/cdn.js
+++ b/lib/cdn.js
@@ -6,18 +6,19 @@ module.exports = function( Release ) {
testRemote = "git@github.com:jquery/fake-cdn.git";
function projectCdn() {
- var jqueryCdn = Release._cloneCdnRepo() + "/cdn";
- if ( Release.project === "jquery" ) {
+ var npmPackage = Release.readPackage().name,
+ jqueryCdn = Release._cloneCdnRepo() + "/cdn";
+ if ( npmPackage === "jquery" ) {
return jqueryCdn;
}
- if ( Release.project === "qunit" ) {
+ if ( npmPackage === "qunitjs" ) {
return jqueryCdn + "/qunit";
}
- if ( /^jquery-/.test( Release.project ) ) {
- return jqueryCdn + "/" + Release.project.substring( 7 ) +
+ if ( /^jquery-/.test( npmPackage ) ) {
+ return jqueryCdn + "/" + npmPackage.substring( 7 ) +
"/" + Release.newVersion;
}
- return jqueryCdn + "/" + Release.project + "/" + Release.newVersion;
+ return jqueryCdn + "/" + npmPackage + "/" + Release.newVersion;
}
Release.define({
diff --git a/lib/changelog.js b/lib/changelog.js
index 6de9a72..6d29e53 100644
--- a/lib/changelog.js
+++ b/lib/changelog.js
@@ -23,11 +23,9 @@ Release.define({
_generateCommitChangelog: function() {
var commits,
- commitRef = "[%h](http://github.com/jquery/" + Release.project + "/commit/%H)",
+ commitRef = "[%h](" + Release._repositoryUrl() + "/commit/%H)",
fullFormat = "* %s (TICKETREF, " + commitRef + ")",
- ticketUrl = Release.issueTracker === "trac" ?
- "http://bugs." + Release.project + ".com/ticket/" :
- "https://github.com/jquery/" + Release.project + "/issue/";
+ ticketUrl = Release._ticketUrl();
console.log( "Adding commits..." );
Release.chdir( Release.dir.repo );
diff --git a/lib/repo.js b/lib/repo.js
index ab585e3..472dbbb 100644
--- a/lib/repo.js
+++ b/lib/repo.js
@@ -82,6 +82,40 @@ Release.define({
checkRepoState: function() {},
+ // Unwrapped URL field from package.json, no trailing slash
+ _packageUrl: function( field ) {
+ var result = Release.readPackage()[ field ];
+
+ // Make sure it exists
+ if ( !result ) {
+ Release.abort( "Failed to read '" + field + "' URL field from package.json" );
+ }
+
+ // Unwrap
+ if ( result.url ) {
+ result = result.url;
+ }
+
+ // Strip trailing slash
+ return result.replace( /\/$/, "" );
+ },
+
+ _ticketUrl: function() {
+ return Release._packageUrl( "bugs" ) + ( Release.issueTracker === "trac" ?
+
+ // Trac bugs URL is just the host
+ "/ticket/" :
+
+ // GitHub bugs URL is host/user/repo/issues
+ "/" );
+ },
+
+ _repositoryUrl: function() {
+ return Release._packageUrl( "repository" )
+ .replace( /^git/, "https" )
+ .replace( /\.git$/, "" );
+ },
+
_readJSON: function( fileName ) {
var json = fs.readFileSync( Release.dir.repo + "/" + fileName, "utf8" );
Release.packageIndentation = json.match( /\n([\t\s]+)/ )[ 1 ];
diff --git a/lib/trac.js b/lib/trac.js
index dc96883..38aa69e 100644
--- a/lib/trac.js
+++ b/lib/trac.js
@@ -1,19 +1,8 @@
module.exports = function( Release ) {
Release.define({
- _tracUrl: function() {
- var bugs = Release.readPackage().bugs;
-
- // Unwrap
- if ( bugs.url ) {
- bugs = bugs.url;
- }
-
- // Strip trailing slash
- return bugs.replace( /\/$/, "" );
- },
trac: function( path ) {
- var tracUrl = Release._tracUrl();
+ var tracUrl = Release._packageUrl( "bugs" );
return Release.exec({
command: "curl -s '" + tracUrl + path + "&format=tab'",
silent: true
From 2aacd8321be640d00ea1dc3273cb8c9fc3164d46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Wed, 26 Mar 2014 10:37:14 +0100
Subject: [PATCH 08/83] Build: Ignore all *test-release.sh files
---
.gitignore | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index f7873df..5abd6c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
node_modules/grunt
node_modules/grunt-contrib-jshint
-test-release.sh
+*test-release.sh
From 089e3d173c6b584e3812f83a111cb6d3c318983a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Wed, 26 Mar 2014 14:21:39 -0400
Subject: [PATCH 09/83] Util: Allow an error to be passed to Release.abort()
When generating a new stack trace, don't include Release.abort().
Ref gh-53
---
README.md | 5 +++--
lib/util.js | 11 ++++++++---
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 5b22db3..e8fefa4 100644
--- a/README.md
+++ b/README.md
@@ -141,9 +141,10 @@ need to install dependencies which are only necessary for the release.
Defines new properties and methods to add to the `Release` object.
-#### abort( msg )
+#### abort( msg [, error ] )
-Aborts the release and prints the message.
+Aborts the release and prints the message. If an error object is provided, it is
+used for the stack trace, otherwise the current call stack is used.
#### exec( command, options )
diff --git a/lib/util.js b/lib/util.js
index b7338c6..3adf5df 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -29,12 +29,17 @@ Release.define({
process.chdir( directory );
},
- abort: function( msg ) {
- var error = new Error();
- Error.captureStackTrace( error );
+ abort: function( msg, error ) {
+ if ( !error ) {
+ error = new Error( msg );
+ Error.captureStackTrace( error, Release.abort );
+ }
+
console.log( msg.red );
console.log( "Aborting.".red );
+ console.log();
console.log( error.stack );
+
process.exit( 1 );
},
From 2ff24fcc4210033b4629702351692480d50227e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Wed, 26 Mar 2014 09:43:22 -0400
Subject: [PATCH 10/83] Changelog: Use changelogplease for git parsing
Fixes gh-7
Closes gh-53
---
lib/changelog.js | 66 ++-
node_modules/changelogplease/.npmignore | 4 +
node_modules/changelogplease/LICENSE.txt | 20 +
node_modules/changelogplease/README.md | 60 +++
node_modules/changelogplease/index.js | 107 +++++
.../node_modules/git-tools/.npmignore | 3 +
.../node_modules/git-tools/LICENSE-MIT.txt | 20 +
.../node_modules/git-tools/README.md | 265 ++++++++++++
.../node_modules/git-tools/git-tools.js | 396 ++++++++++++++++++
.../node_modules/git-tools/package.json | 32 ++
node_modules/changelogplease/package.json | 41 ++
package.json | 1 +
12 files changed, 975 insertions(+), 40 deletions(-)
create mode 100644 node_modules/changelogplease/.npmignore
create mode 100644 node_modules/changelogplease/LICENSE.txt
create mode 100644 node_modules/changelogplease/README.md
create mode 100644 node_modules/changelogplease/index.js
create mode 100644 node_modules/changelogplease/node_modules/git-tools/.npmignore
create mode 100644 node_modules/changelogplease/node_modules/git-tools/LICENSE-MIT.txt
create mode 100644 node_modules/changelogplease/node_modules/git-tools/README.md
create mode 100644 node_modules/changelogplease/node_modules/git-tools/git-tools.js
create mode 100644 node_modules/changelogplease/node_modules/git-tools/package.json
create mode 100644 node_modules/changelogplease/package.json
diff --git a/lib/changelog.js b/lib/changelog.js
index 6d29e53..cd1dba3 100644
--- a/lib/changelog.js
+++ b/lib/changelog.js
@@ -1,16 +1,20 @@
-var fs = require( "fs" );
+var fs = require( "fs" ),
+ changelogplease = require( "changelogplease" );
module.exports = function( Release ) {
Release.define({
- _generateChangelog: function() {
- var changelogPath = Release.dir.base + "/changelog",
- changelog = Release.changelogShell() +
- Release._generateCommitChangelog() +
- Release._generateIssueChangelog();
-
- fs.writeFileSync( changelogPath, changelog );
- console.log( "Stored changelog in " + changelogPath.cyan + "." );
+ _generateChangelog: function( callback ) {
+ Release._generateCommitChangelog(function( commitChangelog ) {
+ var changelogPath = Release.dir.base + "/changelog",
+ changelog = Release.changelogShell() +
+ commitChangelog +
+ Release._generateIssueChangelog();
+
+ fs.writeFileSync( changelogPath, changelog );
+ console.log( "Stored changelog in " + changelogPath.cyan + "." );
+ callback();
+ });
},
changelogShell: function() {
@@ -21,39 +25,21 @@ Release.define({
return Release.newVersion;
},
- _generateCommitChangelog: function() {
- var commits,
- commitRef = "[%h](" + Release._repositoryUrl() + "/commit/%H)",
- fullFormat = "* %s (TICKETREF, " + commitRef + ")",
- ticketUrl = Release._ticketUrl();
-
+ _generateCommitChangelog: function( callback ) {
console.log( "Adding commits..." );
- Release.chdir( Release.dir.repo );
- commits = Release.gitLog( fullFormat );
-
- console.log( "Adding links to tickets..." );
- return commits
-
- // Add ticket references
- .map(function( commit ) {
- var tickets = [];
-
- commit.replace( /Fix(?:e[sd])? #(\d+)/g, function( match, ticket ) {
- tickets.push( ticket );
- });
-
- return tickets.length ?
- commit.replace( "TICKETREF", tickets.map(function( ticket ) {
- return "[#" + ticket + "](" + ticketUrl + ticket + ")";
- }).join( ", " ) ) :
-
- // Leave TICKETREF token in place so it's easy to find commits without tickets
- commit;
- })
- // Sort commits so that they're grouped by component
- .sort()
- .join( "\n" ) + "\n";
+ changelogplease({
+ ticketUrl: Release._ticketUrl() + "{id}",
+ commitUrl: Release._repositoryUrl() + "/commit/{id}",
+ repo: Release.dir.repo,
+ committish: Release.prevVersion + ".." + Release.newVersion
+ }, function( error, log ) {
+ if ( error ) {
+ Release.abort( "Error generating commit changelog.", error );
+ }
+
+ callback( log );
+ });
},
_generateIssueChangelog: function() {
diff --git a/node_modules/changelogplease/.npmignore b/node_modules/changelogplease/.npmignore
new file mode 100644
index 0000000..36f30bb
--- /dev/null
+++ b/node_modules/changelogplease/.npmignore
@@ -0,0 +1,4 @@
+/node_modules/
+/tests/
+.travis.yml
+Gruntfile.js
diff --git a/node_modules/changelogplease/LICENSE.txt b/node_modules/changelogplease/LICENSE.txt
new file mode 100644
index 0000000..2354819
--- /dev/null
+++ b/node_modules/changelogplease/LICENSE.txt
@@ -0,0 +1,20 @@
+Copyright 2014 Scott González http://scottgonzalez.com
+
+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/node_modules/changelogplease/README.md b/node_modules/changelogplease/README.md
new file mode 100644
index 0000000..b69685b
--- /dev/null
+++ b/node_modules/changelogplease/README.md
@@ -0,0 +1,60 @@
+# Changelog, please
+
+Generate changelogs from git commit messages using node.js. The generated changelogs are written in markdown.
+
+Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).
+
+## Installation
+
+```
+npm install changelogplease
+```
+
+## Usage
+
+```javascript
+var changelog = require( "changelogplease" );
+var parsed = changelog({
+ ticketUrl: "https://github.com/scottgonzalez/changelogplease/issues/{id}",
+ commitUrl: "https://github.com/scottgonzalez/changelogplease/commit/{id}",
+ repo: "/path/to/repo",
+ committish: "1.2.3..1.2.4"
+});
+```
+
+## API
+
+### changelog( options, callback )
+
+* `options` (Object): Options for creating the changelog.
+ * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id.
+ * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash.
+ * `repo` (String): Path to the repository.
+ * `committish` (String): The range of commits for the changelog.
+* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog.
+ * `log` (String): Generated changelog, written in markdown.
+
+### Changelog
+
+`changelog( options, callback )` is a shorthand for the following:
+
+```js
+var Changelog = require( "changelogplease" ).Changelog;
+var instance = new Changelog( options );
+instance.parse( callback );
+```
+
+Changelog generation is tailored to a specific format based on the needs of the various jQuery
+projects. However, the `Changelog` constructor and prototype are exposed to allow flexibility.
+Be aware that these methods are not currently documented because they may change. Feel free to
+submit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't
+feel comfortable hacking in your own changes (or even if you do).
+
+
+## License
+
+Copyright 2014 Scott González. Released under the terms of the MIT license.
+
+---
+
+Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).
diff --git a/node_modules/changelogplease/index.js b/node_modules/changelogplease/index.js
new file mode 100644
index 0000000..1cbf0b3
--- /dev/null
+++ b/node_modules/changelogplease/index.js
@@ -0,0 +1,107 @@
+var Repo = require( "git-tools" );
+
+exports = module.exports = changelog;
+exports.Changelog = Changelog;
+
+function changelog( options, callback ) {
+ var instance = new Changelog( options );
+
+ if ( callback ) {
+ instance.parse( callback );
+ }
+
+ return instance;
+}
+
+function Changelog( options ) {
+ this.options = options;
+ this.repo = new Repo( this.options.repo );
+
+ // Bind all methods to the instance
+ for ( var method in this ) {
+ if ( typeof this[ method ] === "function" ) {
+ this[ method ] = this[ method ].bind( this );
+ }
+ }
+}
+
+Changelog.prototype.parse = function( callback ) {
+ this.getLog(function( error, log ) {
+ if ( error ) {
+ return callback( error );
+ }
+
+ callback( null, this.parseCommits( log ) );
+ }.bind( this ));
+};
+
+Changelog.prototype.ticketUrl = function( id ) {
+ return this.options.ticketUrl.replace( "{id}", id );
+};
+
+Changelog.prototype.getLog = function( callback ) {
+ var commitUrl = this.options.commitUrl.replace( "{id}", "%H" );
+
+ this.repo.exec( "log",
+ "--format=" +
+ "__COMMIT__%n" +
+ "%s (__TICKETREF__, [%h](" + commitUrl + "))%n" +
+ "%b",
+ this.options.committish,
+ callback );
+};
+
+Changelog.prototype.parseCommits = function( commits ) {
+ commits = commits.split( "__COMMIT__\n" );
+ commits.shift();
+
+ return commits
+
+ // Parse each individual commit
+ .map( this.parseCommit )
+
+ // Sort commits so that they're grouped by component
+ .sort()
+ .join( "\n" ) + "\n";
+};
+
+Changelog.prototype.parseCommit = function( commit ) {
+ var ticketUrl = this.ticketUrl;
+ var tickets = [];
+
+ // Sane global exec with iteration over matches
+ commit.replace(
+ /Fix(?:e[sd])? ((?:[a-zA-Z0-9_-]{1,39}\/[a-zA-Z0-9_-]{1,100}#)|#|gh-)(\d+)/g,
+ function( match, refType, ticketId ) {
+ var ticketRef = {
+ url: ticketUrl( ticketId ),
+ label: "#" + ticketId
+ };
+
+ // If the refType has anything before the #, assume it's a GitHub ref
+ if ( /.#$/.test( refType ) ) {
+ refType = refType.replace( /#$/, "" );
+ ticketRef.url = "https://github.com/" + refType + "/issues/" + ticketId;
+ ticketRef.label = refType + ticketRef.label;
+ }
+
+ tickets.push( ticketRef );
+ }
+ );
+
+ // Only keep the summary for the changelog; drop the body
+ var parsed = "* " + commit.split( /\r?\n/ )[ 0 ];
+
+ // Add in ticket references
+ // Leave __TICKETREF__ token in place so it's easy to find commits without tickets
+ if ( tickets.length ) {
+ parsed = parsed.replace( "__TICKETREF__", tickets.map(function( ticket ) {
+ return "[" + ticket.label + "](" + ticket.url + ")";
+ }).join( ", " ) );
+ }
+
+ // Remove cherry pick references
+ parsed = parsed.replace( / \(cherry picked from commit [^)]+\)/, "" );
+
+ return parsed;
+};
diff --git a/node_modules/changelogplease/node_modules/git-tools/.npmignore b/node_modules/changelogplease/node_modules/git-tools/.npmignore
new file mode 100644
index 0000000..3a4259c
--- /dev/null
+++ b/node_modules/changelogplease/node_modules/git-tools/.npmignore
@@ -0,0 +1,3 @@
+/test/
+.jshintrc
+Gruntfile.js
diff --git a/node_modules/changelogplease/node_modules/git-tools/LICENSE-MIT.txt b/node_modules/changelogplease/node_modules/git-tools/LICENSE-MIT.txt
new file mode 100644
index 0000000..b99c1ea
--- /dev/null
+++ b/node_modules/changelogplease/node_modules/git-tools/LICENSE-MIT.txt
@@ -0,0 +1,20 @@
+Copyright 2013 Scott González http://scottgonzalez.com
+
+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/node_modules/changelogplease/node_modules/git-tools/README.md b/node_modules/changelogplease/node_modules/git-tools/README.md
new file mode 100644
index 0000000..ad92887
--- /dev/null
+++ b/node_modules/changelogplease/node_modules/git-tools/README.md
@@ -0,0 +1,265 @@
+# node-git-tools
+
+Tools for parsing data out of git repositories.
+
+Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).
+
+## About
+
+The goal of node-git-tools is to provide a set of tools that can be used to
+easily write custom git commands or other scripts that are tightly integrated
+with git.
+
+I expect the API to grow over time and will happily entertain any feature
+requests. If there is anything you'd like added, just file an issue.
+
+## Installation
+
+```sh
+npm install git-tools
+```
+
+## Usage
+
+```js
+var Repo = require( "git-tools" );
+var repo = new Repo( "path/to/repo" );
+repo.authors(function( error, authors ) {
+ console.log( authors );
+});
+```
+
+
+
+## API
+
+### Repo.clone( options, callback )
+
+Clones a repository and returns the new `Repo` instance.
+
+* `options` (Object): Options for cloning the repository.
+ * `repo` (String): The repository to clone from.
+ * `path` (String): The path to clone into.
+ * extra: Additional options can be provided, as documented below.
+* `callback` (Function; `function( error, repo )`): Function to invoke after cloning the repository.
+ * `repo` (Object): A new `Repo` instance for the cloned repository.
+
+This function accepts arbitrary options to pass to `git clone`.
+For example, to create a bare repository:
+
+```js
+Repo.clone({
+ repo: "git://github.com/scottgonzalez/node-git-tools.git",
+ dir: "/tmp/git-tools",
+ bare: true
+});
+```
+
+Or to create a repo with limited history:
+
+```js
+Repo.clone({
+ repo: "git://github.com/scottgonzalez/node-git-tools.git",
+ dir: "/tmp/git-tools",
+ depth: 5
+});
+```
+
+
+
+### Repo.isRepo( path, callback )
+
+Determines if the specified path is a git repository.
+
+* `path` (String): The path to check.
+* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.
+ * `isRepo` (Boolean): Whether the path is a git repository.
+
+*Note: This is equivalent to creating a `Repo` instance with `path` and calling `isRepo()` on the instance.*
+
+
+
+### activeDays( [committish], callback )
+
+Gets the number of active days (unique days of authorship). Includes activity
+by day, month, year, and the entire history.
+
+* `committish` (String; default: `"master"`): Committish range to analyze.
+* `callback` (Function; `function( error, activeDays )`): Function to invoke after getting active days.
+ * `activeDays` (Object): Summary of active days.
+
+The `activeDays` object has the following form:
+
+```js
+{
+ activeDays: Number,
+ commits: Number,
+ dates: {
+ "YYYY-MM-DD": Number( commits ),
+ ...
+ },
+ years: {
+ "YYYY": {
+ activeDays: Number,
+ commits: Number,
+ months: {
+ "M": {
+ activeDays: Number,
+ commits: Number,
+ days: {
+ "D": {
+ commits: Number
+ },
+ ...
+ }
+ },
+ ...
+ }
+ },
+ ...
+ }
+}
+```
+
+
+
+### age( callback )
+
+Gets the age of the repository.
+
+* `callback` (Function; `function( error, age )`): Function to invoke after getting the age.
+ * `age` (String): The age of the repository.
+
+
+
+### authors( [committish], callback )
+
+Gets all authors, sorted by number of commits.
+
+* `committish` (String; default: `"master"`): Committish range to analyze.
+* `callback` (Function; `function( error, authors )`): Function to invoke after getting authors.
+ * `authors` (Array): All authors, sorted by number of commits.
+
+Each author object contains the following properties:
+
+* `email` (String): Author's email address.
+* `name` (String): Author's name.
+* `commits` (Number): Number of commits.
+* `commitsPercent` (Number): Percentage of commits.
+
+
+
+### blame( options, callback )
+
+Determine what revision and author last modified each line of a file.
+
+* `options` (Object): Options for the blame.
+ * `path` (String): The path to the file to run the blame for.
+ * `committish` (String; default: `"HEAD"`): Revision or range to blame against.
+* `callback` (Function; `function( error, blame )`): Function to invoke after blaming the file.
+ * `blame` (Array): Commit information for each line.
+
+Each blame item contains the following properties:
+
+* `commit`: SHA of commit that most recently modified the line.
+* `path`: Path to the file at the time of the most recent modification to the line.
+* `lineNumber`: Line number within the file.
+* `content`: Contents of the line.
+
+
+
+### branches( callback )
+
+Gets all branches in order of most recent commit.
+
+* `callback` (Function; `function( error, branches )`): Function to invoke after getting branches.
+ * `branches` (Array): All branches, sorted by most recent commit date.
+
+Each branch object contains the following properties:
+
+* `name` (String): Branch name.
+* `sha` (String): SHA-1 of most recent commit.
+* `date` (Date): Author date of most recent commit.
+* `subject` (String): Subject (first line) of most recent commit.
+* `author` (Object): Author of most recent commit.
+ * `email` (String): Author's email address.
+ * `name` (String): Author's name.
+
+
+
+### config( name, callback )
+
+Gets the value of a configuration option.
+
+* `name` (String): The name of the configuration option.
+* `callback` (Function; `function( error, value )`): Function to invoke after getting the configuration option.
+ * `value` (String|null): The value for the configuration option, or `null` if no value is set.
+
+
+
+### currentBranch( callback )
+
+Gets the name of the currently checked out branch, if any.
+
+* `callback` (Function; `function( error, branch )`): Function to invoke after getting the branch.
+ * `branch` (String|null): Branch name, or `null` if in detached HEAD state.
+
+
+
+### isRepo( callback )
+
+Determines if the specified path is a git repository.
+
+* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.
+ * `isRepo` (Boolean): Whether the path is a git repository.
+
+
+
+### remotes( callback )
+
+Gets all remote repositories.
+
+* `callback` (Function; `function( error, remotes )`): Function to invoke after getting the remotes.
+ * `remotes` (Array): All remote repositories.
+
+Each remote object contains the following properties:
+
+* `name` (String): Remote name.
+* `url` (String): URL for the remote repository.
+
+
+
+### resolveCommittish( committish, callback )
+
+Resolves a committish to a SHA1.
+
+* `committish` (String): Any committish to resolve.
+* `callback` (Function; `function( error, sha )`): Function to invoke after resolving the comittish.
+ * `sha`: SHA1 of the resolved committish.
+
+
+
+### tags( callback )
+
+Gets all tags in reverse chronological order.
+
+Lightweight tags are sorted by author date and annotated tags are sorted by tagger date.
+
+* `callback` (Function; `function( error, tags )`): Function to invoke after getting tags.
+ * `tags` (Array): All tags, sorted by date.
+
+Each tag object contains the following properties:
+
+* `name` (String): Tag name.
+* `sha` (String): SHA-1 for the tag. For lightweight tags, this is the SHA-1 of the commit.
+* `date` (Date): Author date for ligthweight tags, tagger date for annotated tags.
+
+
+
+## License
+
+Copyright 2013 Scott González. Released under the terms of the MIT license.
+
+---
+
+Support this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).
diff --git a/node_modules/changelogplease/node_modules/git-tools/git-tools.js b/node_modules/changelogplease/node_modules/git-tools/git-tools.js
new file mode 100644
index 0000000..541ce59
--- /dev/null
+++ b/node_modules/changelogplease/node_modules/git-tools/git-tools.js
@@ -0,0 +1,396 @@
+var spawn = require( "child_process" ).spawn;
+
+function extend( a, b ) {
+ for ( var prop in b ) {
+ a[ prop ] = b[ prop ];
+ }
+
+ return a;
+}
+
+function copy( obj ) {
+ return extend( {}, obj );
+}
+
+function Repo( path ) {
+ this.path = path;
+}
+
+Repo.parsePerson = (function() {
+ var rPerson = /^(\S+)\s(.+)$/;
+ return function( person ) {
+ var matches = rPerson.exec( person );
+ return {
+ email: matches[ 1 ],
+ name: matches[ 2 ]
+ };
+ };
+})();
+
+Repo.clone = function( options, callback ) {
+ var dir = options.dir;
+ var args = [ "clone", options.repo, dir ];
+ options = copy( options );
+ delete options.repo;
+ delete options.dir;
+
+ Object.keys( options ).forEach(function( option ) {
+ args.push( "--" + option );
+
+ var value = options[ option ];
+ if ( value !== true ) {
+ args.push( value );
+ }
+ });
+
+ args.push(function( error ) {
+ if ( error ) {
+ return callback( error );
+ }
+
+ callback( null, new Repo( dir ) );
+ });
+
+ var repo = new Repo( process.cwd() );
+ repo.exec.apply( repo, args );
+};
+
+Repo.isRepo = function( path, callback ) {
+ var repo = new Repo( path );
+ repo.isRepo( callback );
+};
+
+Repo.prototype.exec = function() {
+ var args = [].slice.call( arguments );
+ var callback = args.pop();
+ var stdout = "";
+ var stderr = "";
+ var child = spawn( "git", args, { cwd: this.path } );
+ var hadError = false;
+ child.on( "error", function( error ) {
+ hadError = true;
+ callback( error );
+ });
+ child.stdout.on( "data", function( data ) {
+ stdout += data;
+ });
+ child.stderr.on( "data", function( data ) {
+ stderr += data;
+ });
+ child.on( "close", function( code ) {
+ if ( hadError ) {
+ return;
+ }
+
+ var error;
+ if ( code ) {
+ error = new Error( stderr );
+ error.code = code;
+ return callback( error );
+ }
+
+ callback( null, stdout.trimRight() );
+ });
+};
+
+Repo.prototype.activeDays = function( committish, callback ) {
+ if ( !callback ) {
+ callback = committish;
+ committish = "master";
+ }
+
+ this.exec( "log", "--format=%at", committish, function( error, dates ) {
+ if ( error ) {
+ return callback( error );
+ }
+
+ var dateMap = {
+ activeDays: 0,
+ commits: 0,
+ dates: {},
+ years: {}
+ };
+
+ dates.split( "\n" ).sort().forEach(function( timestamp ) {
+ var date = new Date( timestamp * 1000 );
+ var year = date.getFullYear();
+ var month = date.getMonth() + 1;
+ var day = date.getDate();
+
+ date = year + "-" +
+ (month < 10 ? "0" : "") + month + "-" +
+ (day < 10 ? "0" : "") + day;
+
+ if ( !dateMap.dates[ date ] ) {
+ dateMap.dates[ date ] = 0;
+ }
+ dateMap.commits++;
+ dateMap.dates[ date ]++;
+
+ if ( !dateMap.years[ year ] ) {
+ dateMap.years[ year ] = {
+ activeDays: 0,
+ commits: 0,
+ months: {}
+ };
+ }
+ dateMap.years[ year ].commits++;
+
+ if ( !dateMap.years[ year ].months[ month ] ) {
+ dateMap.years[ year ].months[ month ] = {
+ activeDays: 0,
+ commits: 0,
+ days: {}
+ };
+ }
+ dateMap.years[ year ].months[ month ].commits++;
+
+ if ( !dateMap.years[ year ].months[ month ].days[ day ] ) {
+ dateMap.years[ year ].months[ month ].days[ day ] = {
+ commits: 0
+ };
+ dateMap.activeDays++;
+ dateMap.years[ year ].activeDays++;
+ dateMap.years[ year ].months[ month ].activeDays++;
+ }
+ dateMap.years[ year ].months[ month ].days[ day ].commits++;
+ });
+
+ callback( null, dateMap );
+ });
+};
+
+Repo.prototype.age = function( callback ) {
+ this.exec( "log", "--reverse", "--format=%cr", function( error, stdout ) {
+ if ( error ) {
+ return callback( error );
+ }
+
+ callback( null, stdout.split( "\n" )[ 0 ].replace( /\sago/, "" ) );
+ });
+};
+
+Repo.prototype.authors = function( committish, callback ) {
+ if ( !callback ) {
+ callback = committish;
+ committish = "master";
+ }
+
+ this.exec( "log", "--format=%aE %aN", committish, function( error, data ) {
+ if ( error ) {
+ return callback( error );
+ }
+
+ var authors = data.split( "\n" );
+ var authorMap = {};
+ var totalCommits = 0;
+
+ authors.forEach(function( author ) {
+ if ( !authorMap[ author ] ) {
+ authorMap[ author ] = 0;
+ }
+
+ authorMap[ author ]++;
+ totalCommits++;
+ });
+
+ authors = Object.keys( authorMap ).map(function( author ) {
+ var commits = authorMap[ author ];
+ return extend( Repo.parsePerson( author ), {
+ commits: commits,
+ commitsPercent: (commits * 100 / totalCommits).toFixed( 1 )
+ });
+ }).sort(function( a, b ) {
+ return b.commits - a.commits;
+ });
+
+ callback( null, authors );
+ });
+};
+
+Repo.prototype.blame = function( options, callback ) {
+ var args = [ "blame", "-s" ];
+
+ if ( options.committish ) {
+ args.push( options.committish );
+ }
+
+ args.push( "--", options.path );
+
+ var rBlame = /^(\w+)(\s(\S+))?\s+(\d+)\)\s(.*)$/;
+
+ args.push(function( error, blame ) {
+ if ( error ) {
+ return callback( error );
+ }
+
+ var lines = blame.split( /\r?\n/ );
+ lines = lines.map(function( line ) {
+ var matches = rBlame.exec( line );
+
+ return {
+ commit: matches[ 1 ],
+ path: matches[ 3 ] || options.path,
+ lineNumber: parseInt( matches[ 4 ], 10 ),
+ content: matches[ 5 ]
+ };
+ });
+
+ callback( null, lines );
+ });
+
+ this.exec.apply( this, args );
+};
+
+Repo.prototype.branches = function( callback ) {
+ this.exec( "for-each-ref",
+ "--format=" +
+ "%(refname:short)%0a" +
+ "%(authordate:rfc2822)%0a" +
+ "%(authoremail) %(authorname)%0a" +
+ "%(subject)%0a" +
+ "%(objectname)%0a",
+ "refs/heads",
+ function( error, data ) {
+ if ( error ) {
+ return callback( error );
+ }
+
+ var branches = data.split( "\n\n" ).map(function( branch ) {
+ var lines = branch.split( "\n" );
+ var name = lines[ 0 ];
+ var date = new Date( lines[ 1 ] );
+ var author = Repo.parsePerson( lines[ 2 ] );
+ var subject = lines[ 3 ];
+ var sha = lines[ 4 ];
+
+ return {
+ name: name,
+ sha: sha,
+ date: date,
+ subject: subject,
+ author: author
+ };
+ }).sort(function( a, b ) {
+ return b.date - a.date;
+ });
+
+ callback( null, branches );
+ });
+};
+
+Repo.prototype.config = function( name, callback ) {
+ this.exec( "config --get " + name, function( error, stdout ) {
+ if ( error ) {
+ if ( /^Command failed:\s+$/.test( error.message ) ) {
+ return callback( null, null );
+ }
+
+ return callback( error );
+ }
+
+ callback( null, stdout.trim() );
+ });
+};
+
+Repo.prototype.currentBranch = function( callback ) {
+ this.exec( "rev-parse", "--abbrev-ref", "HEAD", function( error, data ) {
+ if ( error ) {
+ return callback( error );
+ }
+
+ var branch = data === "HEAD" ? null : data;
+ callback( null, branch );
+ });
+};
+
+Repo.prototype.isRepo = function( callback ) {
+ this.exec( "rev-parse", "--git-dir", function( error ) {
+ if ( error ) {
+ if ( error.message.indexOf( "Not a git repository" ) ) {
+ return callback( null, false );
+ }
+
+ // If the path doesn't exist, don't return an error
+ if ( error.code === "ENOENT" ) {
+ return callback( null, false );
+ }
+
+ return callback( error );
+ }
+
+ callback( null, true );
+ });
+};
+
+Repo.prototype.remotes = function( callback ) {
+ this.exec( "remote", "-v", function( error, data ) {
+ if ( error ) {
+ return callback( error );
+ }
+
+ var remotes = data.split( "\n" );
+ var rRemote = /^(\S+)\s(\S+)/;
+ var remoteMap = {};
+
+ remotes.forEach(function( remote ) {
+ var matches = rRemote.exec( remote );
+
+ // New repositories with no remotes will have `origin` but no URL
+ if ( !matches ) {
+ return;
+ }
+
+ var name = matches[ 1 ];
+ var url = matches[ 2 ];
+
+ remoteMap[ name ] = url;
+ });
+
+ remotes = Object.keys( remoteMap ).map(function( remote ) {
+ return {
+ name: remote,
+ url: remoteMap[ remote ]
+ };
+ });
+
+ callback( null, remotes );
+ });
+};
+
+Repo.prototype.resolveCommittish = function( committish, callback ) {
+ this.exec( "rev-parse", committish, callback );
+};
+
+Repo.prototype.tags = function( callback ) {
+ this.exec( "for-each-ref",
+ "--format=" +
+ "%(refname:short)%0a" +
+ "%(authordate)%(taggerdate)%0a" +
+ "%(objectname)%0a",
+ "refs/tags",
+ function( error, data ) {
+ if ( error ) {
+ return callback( error );
+ }
+
+ var tags = data.split( "\n\n" ).map(function( tag ) {
+ var lines = tag.split( "\n" );
+ var name = lines[ 0 ];
+ var date = new Date( lines[ 1 ] );
+ var sha = lines[ 2 ];
+
+ return {
+ name: name,
+ sha: sha,
+ date: date
+ };
+ }).sort(function( a, b ) {
+ return b.date - a.date;
+ });
+
+ callback( null, tags );
+ });
+};
+
+module.exports = Repo;
diff --git a/node_modules/changelogplease/node_modules/git-tools/package.json b/node_modules/changelogplease/node_modules/git-tools/package.json
new file mode 100644
index 0000000..a24419f
--- /dev/null
+++ b/node_modules/changelogplease/node_modules/git-tools/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "git-tools",
+ "version": "0.1.0",
+ "description": "Tools for parsing data out of git repositories.",
+ "keywords": [
+ "git"
+ ],
+ "homepage": "https://github.com/scottgonzalez/node-git-tools",
+ "bugs": {
+ "url": "https://github.com/scottgonzalez/node-git-tools/issues"
+ },
+ "author": {
+ "name": "Scott González",
+ "email": "scott.gonzalez@gmail.com",
+ "url": "http://scottgonzalez.com"
+ },
+ "main": "git-tools.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/scottgonzalez/node-git-tools.git"
+ },
+ "devDependencies": {
+ "grunt": "~0.4.0",
+ "grunt-contrib-jshint": "~0.1.1",
+ "grunt-contrib-nodeunit": "~0.1.2",
+ "rimraf": "~2.1.4"
+ },
+ "readme": "# node-git-tools\n\nTools for parsing data out of git repositories.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## About\n\nThe goal of node-git-tools is to provide a set of tools that can be used to\neasily write custom git commands or other scripts that are tightly integrated\nwith git.\n\nI expect the API to grow over time and will happily entertain any feature\nrequests. If there is anything you'd like added, just file an issue.\n\n## Installation\n\n```sh\nnpm install git-tools\n```\n\n## Usage\n\n```js\nvar Repo = require( \"git-tools\" );\nvar repo = new Repo( \"path/to/repo\" );\nrepo.authors(function( error, authors ) {\n\tconsole.log( authors );\n});\n```\n\n\n\n## API\n\n### Repo.clone( options, callback )\n\nClones a repository and returns the new `Repo` instance.\n\n* `options` (Object): Options for cloning the repository.\n * `repo` (String): The repository to clone from.\n * `path` (String): The path to clone into.\n * extra: Additional options can be provided, as documented below.\n* `callback` (Function; `function( error, repo )`): Function to invoke after cloning the repository.\n * `repo` (Object): A new `Repo` instance for the cloned repository.\n\nThis function accepts arbitrary options to pass to `git clone`.\nFor example, to create a bare repository:\n\n```js\nRepo.clone({\n\trepo: \"git://github.com/scottgonzalez/node-git-tools.git\",\n\tdir: \"/tmp/git-tools\",\n\tbare: true\n});\n```\n\nOr to create a repo with limited history:\n\n```js\nRepo.clone({\n\trepo: \"git://github.com/scottgonzalez/node-git-tools.git\",\n\tdir: \"/tmp/git-tools\",\n\tdepth: 5\n});\n```\n\n\n\n### Repo.isRepo( path, callback )\n\nDetermines if the specified path is a git repository.\n\n* `path` (String): The path to check.\n* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.\n * `isRepo` (Boolean): Whether the path is a git repository.\n\n*Note: This is equivalent to creating a `Repo` instance with `path` and calling `isRepo()` on the instance.*\n\n\n\n### activeDays( [committish], callback )\n\nGets the number of active days (unique days of authorship). Includes activity\nby day, month, year, and the entire history.\n\n* `committish` (String; default: `\"master\"`): Committish range to analyze.\n* `callback` (Function; `function( error, activeDays )`): Function to invoke after getting active days.\n * `activeDays` (Object): Summary of active days.\n\nThe `activeDays` object has the following form:\n\n```js\n{\n\tactiveDays: Number,\n\tcommits: Number,\n\tdates: {\n\t\t\"YYYY-MM-DD\": Number( commits ),\n\t\t...\n\t},\n\tyears: {\n\t\t\"YYYY\": {\n\t\t\tactiveDays: Number,\n\t\t\tcommits: Number,\n\t\t\tmonths: {\n\t\t\t\t\"M\": {\n\t\t\t\t\tactiveDays: Number,\n\t\t\t\t\tcommits: Number,\n\t\t\t\t\tdays: {\n\t\t\t\t\t\t\"D\": {\n\t\t\t\t\t\t\tcommits: Number\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t...\n\t\t\t}\n\t\t},\n\t\t...\n\t}\n}\n```\n\n\n\n### age( callback )\n\nGets the age of the repository.\n\n* `callback` (Function; `function( error, age )`): Function to invoke after getting the age.\n * `age` (String): The age of the repository.\n\n\n\n### authors( [committish], callback )\n\nGets all authors, sorted by number of commits.\n\n* `committish` (String; default: `\"master\"`): Committish range to analyze.\n* `callback` (Function; `function( error, authors )`): Function to invoke after getting authors.\n * `authors` (Array): All authors, sorted by number of commits.\n\nEach author object contains the following properties:\n\n* `email` (String): Author's email address.\n* `name` (String): Author's name.\n* `commits` (Number): Number of commits.\n* `commitsPercent` (Number): Percentage of commits.\n\n\n\n### blame( options, callback )\n\nDetermine what revision and author last modified each line of a file.\n\n* `options` (Object): Options for the blame.\n * `path` (String): The path to the file to run the blame for.\n * `committish` (String; default: `\"HEAD\"`): Revision or range to blame against.\n* `callback` (Function; `function( error, blame )`): Function to invoke after blaming the file.\n * `blame` (Array): Commit information for each line.\n\nEach blame item contains the following properties:\n\n* `commit`: SHA of commit that most recently modified the line.\n* `path`: Path to the file at the time of the most recent modification to the line.\n* `lineNumber`: Line number within the file.\n* `content`: Contents of the line.\n\n\n\n### branches( callback )\n\nGets all branches in order of most recent commit.\n\n* `callback` (Function; `function( error, branches )`): Function to invoke after getting branches.\n * `branches` (Array): All branches, sorted by most recent commit date.\n\nEach branch object contains the following properties:\n\n* `name` (String): Branch name.\n* `sha` (String): SHA-1 of most recent commit.\n* `date` (Date): Author date of most recent commit.\n* `subject` (String): Subject (first line) of most recent commit.\n* `author` (Object): Author of most recent commit.\n * `email` (String): Author's email address.\n * `name` (String): Author's name.\n\n\n\n### config( name, callback )\n\nGets the value of a configuration option.\n\n* `name` (String): The name of the configuration option.\n* `callback` (Function; `function( error, value )`): Function to invoke after getting the configuration option.\n * `value` (String|null): The value for the configuration option, or `null` if no value is set.\n\n\n\n### currentBranch( callback )\n\nGets the name of the currently checked out branch, if any.\n\n* `callback` (Function; `function( error, branch )`): Function to invoke after getting the branch.\n * `branch` (String|null): Branch name, or `null` if in detached HEAD state.\n\n\n\n### isRepo( callback )\n\nDetermines if the specified path is a git repository.\n\n* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.\n * `isRepo` (Boolean): Whether the path is a git repository.\n\n\n\n### remotes( callback )\n\nGets all remote repositories.\n\n* `callback` (Function; `function( error, remotes )`): Function to invoke after getting the remotes.\n * `remotes` (Array): All remote repositories.\n\nEach remote object contains the following properties:\n\n* `name` (String): Remote name.\n* `url` (String): URL for the remote repository.\n\n\n\n### resolveCommittish( committish, callback )\n\nResolves a committish to a SHA1.\n\n* `committish` (String): Any committish to resolve.\n* `callback` (Function; `function( error, sha )`): Function to invoke after resolving the comittish.\n * `sha`: SHA1 of the resolved committish.\n\n\n\n### tags( callback )\n\nGets all tags in reverse chronological order.\n\nLightweight tags are sorted by author date and annotated tags are sorted by tagger date.\n\n* `callback` (Function; `function( error, tags )`): Function to invoke after getting tags.\n * `tags` (Array): All tags, sorted by date.\n\nEach tag object contains the following properties:\n\n* `name` (String): Tag name.\n* `sha` (String): SHA-1 for the tag. For lightweight tags, this is the SHA-1 of the commit.\n* `date` (Date): Author date for ligthweight tags, tagger date for annotated tags.\n\n\n\n## License\n\nCopyright 2013 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n",
+ "readmeFilename": "README.md",
+ "_id": "git-tools@0.1.0",
+ "_from": "git-tools@0.1.0"
+}
diff --git a/node_modules/changelogplease/package.json b/node_modules/changelogplease/package.json
new file mode 100644
index 0000000..cd018ba
--- /dev/null
+++ b/node_modules/changelogplease/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "changelogplease",
+ "version": "1.0.1",
+ "description": "Generate changelogs from git commit messages",
+ "author": {
+ "name": "Scott González",
+ "email": "scott.gonzalez@gmail.com",
+ "url": "http://scottgonzalez.com"
+ },
+ "license": "MIT",
+ "main": "index.js",
+ "homepage": "https://github.com/scottgonzalez/changelogplease",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/scottgonzalez/changelogplease.git"
+ },
+ "bugs": {
+ "url": "https://github.com/scottgonzalez/changelogplease/issues"
+ },
+ "keywords": [
+ "changelog",
+ "release"
+ ],
+ "scripts": {
+ "test": "nodeunit tests"
+ },
+ "dependencies": {
+ "git-tools": "0.1.0"
+ },
+ "devDependencies": {
+ "nodeunit": "0.8.6"
+ },
+ "readme": "# Changelog, please\n\nGenerate changelogs from git commit messages using node.js. The generated changelogs are written in markdown.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## Installation\n\n```\nnpm install changelogplease\n```\n\n## Usage\n\n```javascript\nvar changelog = require( \"changelogplease\" );\nvar parsed = changelog({\n\tticketUrl: \"https://github.com/scottgonzalez/changelogplease/issues/{id}\",\n\tcommitUrl: \"https://github.com/scottgonzalez/changelogplease/commit/{id}\",\n\trepo: \"/path/to/repo\",\n\tcommittish: \"1.2.3..1.2.4\"\n});\n```\n\n## API\n\n### changelog( options, callback )\n\n* `options` (Object): Options for creating the changelog.\n * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id.\n * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash.\n * `repo` (String): Path to the repository.\n * `committish` (String): The range of commits for the changelog.\n* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog.\n * `log` (String): Generated changelog, written in markdown.\n\n### Changelog\n\n`changelog( options, callback )` is a shorthand for the following:\n\n```js\nvar Changelog = require( \"changelogplease\" ).Changelog;\nvar instance = new Changelog( options );\ninstance.parse( callback );\n```\n\nChangelog generation is tailored to a specific format based on the needs of the various jQuery\nprojects. However, the `Changelog` constructor and prototype are exposed to allow flexibility.\nBe aware that these methods are not currently documented because they may change. Feel free to\nsubmit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't\nfeel comfortable hacking in your own changes (or even if you do).\n\n\n## License\n\nCopyright 2014 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n",
+ "readmeFilename": "README.md",
+ "_id": "changelogplease@1.0.1",
+ "dist": {
+ "shasum": "2953e41245f475cd0a3d66b2861e3344166d6c30"
+ },
+ "_from": "changelogplease@1.0.1",
+ "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.0.1.tgz"
+}
diff --git a/package.json b/package.json
index 0926c46..000ec82 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,6 @@
{
"dependencies": {
+ "changelogplease": "1.0.1",
"colors": "0.6.2",
"semver": "2.2.1",
"shelljs": "0.2.6",
From 579c4dad523657d81f05aad49b9362111cb1b259 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Thu, 27 Mar 2014 08:47:09 -0400
Subject: [PATCH 11/83] Changelog: Upgrade to changelogplease 1.1.0
This upgrade keeps commits in chronological order within components.
Ref gh-28
Closes gh-54
---
node_modules/changelogplease/README.md | 10 +++++-
node_modules/changelogplease/index.js | 34 +++++++++++++++----
.../node_modules/git-tools/package.json | 6 +++-
node_modules/changelogplease/package.json | 12 +++----
package.json | 2 +-
5 files changed, 49 insertions(+), 15 deletions(-)
diff --git a/node_modules/changelogplease/README.md b/node_modules/changelogplease/README.md
index b69685b..e00a038 100644
--- a/node_modules/changelogplease/README.md
+++ b/node_modules/changelogplease/README.md
@@ -14,11 +14,18 @@ npm install changelogplease
```javascript
var changelog = require( "changelogplease" );
-var parsed = changelog({
+changelog({
ticketUrl: "https://github.com/scottgonzalez/changelogplease/issues/{id}",
commitUrl: "https://github.com/scottgonzalez/changelogplease/commit/{id}",
repo: "/path/to/repo",
committish: "1.2.3..1.2.4"
+}, function( error, log ) {
+ if ( error ) {
+ console.log( error );
+ return;
+ }
+
+ console.log( log );
});
```
@@ -31,6 +38,7 @@ var parsed = changelog({
* `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash.
* `repo` (String): Path to the repository.
* `committish` (String): The range of commits for the changelog.
+ * `sort` (Boolean, Function): Function for sorting commits. By default commits are sorted alphabetically so they are grouped by component. A value of `false` disables sorting.
* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog.
* `log` (String): Generated changelog, written in markdown.
diff --git a/node_modules/changelogplease/index.js b/node_modules/changelogplease/index.js
index 1cbf0b3..682e311 100644
--- a/node_modules/changelogplease/index.js
+++ b/node_modules/changelogplease/index.js
@@ -51,18 +51,40 @@ Changelog.prototype.getLog = function( callback ) {
callback );
};
+Changelog.prototype.sort = function( commits ) {
+ if ( this.options.sort === false ) {
+ return commits;
+ }
+
+ if ( typeof this.options.sort === "function" ) {
+ return this.options.sort( commits );
+ }
+
+ // Sort commits so that they're grouped by component
+ var component = /^(.+):/;
+ return commits.sort(function( a, b ) {
+ var aMatch = a.match( component ),
+ bMatch = b.match( component );
+
+ if ( aMatch && bMatch) {
+ return aMatch[ 1 ].localeCompare( bMatch[ 1 ] );
+ }
+
+ return a.localeCompare( b );
+ });
+};
+
Changelog.prototype.parseCommits = function( commits ) {
commits = commits.split( "__COMMIT__\n" );
commits.shift();
- return commits
+ // Parse each individual commit
+ commits = commits.map( this.parseCommit );
- // Parse each individual commit
- .map( this.parseCommit )
+ // Sort commits
+ commits = this.sort( commits );
- // Sort commits so that they're grouped by component
- .sort()
- .join( "\n" ) + "\n";
+ return commits.join( "\n" ) + "\n";
};
Changelog.prototype.parseCommit = function( commit ) {
diff --git a/node_modules/changelogplease/node_modules/git-tools/package.json b/node_modules/changelogplease/node_modules/git-tools/package.json
index a24419f..8fb790b 100644
--- a/node_modules/changelogplease/node_modules/git-tools/package.json
+++ b/node_modules/changelogplease/node_modules/git-tools/package.json
@@ -28,5 +28,9 @@
"readme": "# node-git-tools\n\nTools for parsing data out of git repositories.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## About\n\nThe goal of node-git-tools is to provide a set of tools that can be used to\neasily write custom git commands or other scripts that are tightly integrated\nwith git.\n\nI expect the API to grow over time and will happily entertain any feature\nrequests. If there is anything you'd like added, just file an issue.\n\n## Installation\n\n```sh\nnpm install git-tools\n```\n\n## Usage\n\n```js\nvar Repo = require( \"git-tools\" );\nvar repo = new Repo( \"path/to/repo\" );\nrepo.authors(function( error, authors ) {\n\tconsole.log( authors );\n});\n```\n\n\n\n## API\n\n### Repo.clone( options, callback )\n\nClones a repository and returns the new `Repo` instance.\n\n* `options` (Object): Options for cloning the repository.\n * `repo` (String): The repository to clone from.\n * `path` (String): The path to clone into.\n * extra: Additional options can be provided, as documented below.\n* `callback` (Function; `function( error, repo )`): Function to invoke after cloning the repository.\n * `repo` (Object): A new `Repo` instance for the cloned repository.\n\nThis function accepts arbitrary options to pass to `git clone`.\nFor example, to create a bare repository:\n\n```js\nRepo.clone({\n\trepo: \"git://github.com/scottgonzalez/node-git-tools.git\",\n\tdir: \"/tmp/git-tools\",\n\tbare: true\n});\n```\n\nOr to create a repo with limited history:\n\n```js\nRepo.clone({\n\trepo: \"git://github.com/scottgonzalez/node-git-tools.git\",\n\tdir: \"/tmp/git-tools\",\n\tdepth: 5\n});\n```\n\n\n\n### Repo.isRepo( path, callback )\n\nDetermines if the specified path is a git repository.\n\n* `path` (String): The path to check.\n* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.\n * `isRepo` (Boolean): Whether the path is a git repository.\n\n*Note: This is equivalent to creating a `Repo` instance with `path` and calling `isRepo()` on the instance.*\n\n\n\n### activeDays( [committish], callback )\n\nGets the number of active days (unique days of authorship). Includes activity\nby day, month, year, and the entire history.\n\n* `committish` (String; default: `\"master\"`): Committish range to analyze.\n* `callback` (Function; `function( error, activeDays )`): Function to invoke after getting active days.\n * `activeDays` (Object): Summary of active days.\n\nThe `activeDays` object has the following form:\n\n```js\n{\n\tactiveDays: Number,\n\tcommits: Number,\n\tdates: {\n\t\t\"YYYY-MM-DD\": Number( commits ),\n\t\t...\n\t},\n\tyears: {\n\t\t\"YYYY\": {\n\t\t\tactiveDays: Number,\n\t\t\tcommits: Number,\n\t\t\tmonths: {\n\t\t\t\t\"M\": {\n\t\t\t\t\tactiveDays: Number,\n\t\t\t\t\tcommits: Number,\n\t\t\t\t\tdays: {\n\t\t\t\t\t\t\"D\": {\n\t\t\t\t\t\t\tcommits: Number\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t...\n\t\t\t}\n\t\t},\n\t\t...\n\t}\n}\n```\n\n\n\n### age( callback )\n\nGets the age of the repository.\n\n* `callback` (Function; `function( error, age )`): Function to invoke after getting the age.\n * `age` (String): The age of the repository.\n\n\n\n### authors( [committish], callback )\n\nGets all authors, sorted by number of commits.\n\n* `committish` (String; default: `\"master\"`): Committish range to analyze.\n* `callback` (Function; `function( error, authors )`): Function to invoke after getting authors.\n * `authors` (Array): All authors, sorted by number of commits.\n\nEach author object contains the following properties:\n\n* `email` (String): Author's email address.\n* `name` (String): Author's name.\n* `commits` (Number): Number of commits.\n* `commitsPercent` (Number): Percentage of commits.\n\n\n\n### blame( options, callback )\n\nDetermine what revision and author last modified each line of a file.\n\n* `options` (Object): Options for the blame.\n * `path` (String): The path to the file to run the blame for.\n * `committish` (String; default: `\"HEAD\"`): Revision or range to blame against.\n* `callback` (Function; `function( error, blame )`): Function to invoke after blaming the file.\n * `blame` (Array): Commit information for each line.\n\nEach blame item contains the following properties:\n\n* `commit`: SHA of commit that most recently modified the line.\n* `path`: Path to the file at the time of the most recent modification to the line.\n* `lineNumber`: Line number within the file.\n* `content`: Contents of the line.\n\n\n\n### branches( callback )\n\nGets all branches in order of most recent commit.\n\n* `callback` (Function; `function( error, branches )`): Function to invoke after getting branches.\n * `branches` (Array): All branches, sorted by most recent commit date.\n\nEach branch object contains the following properties:\n\n* `name` (String): Branch name.\n* `sha` (String): SHA-1 of most recent commit.\n* `date` (Date): Author date of most recent commit.\n* `subject` (String): Subject (first line) of most recent commit.\n* `author` (Object): Author of most recent commit.\n * `email` (String): Author's email address.\n * `name` (String): Author's name.\n\n\n\n### config( name, callback )\n\nGets the value of a configuration option.\n\n* `name` (String): The name of the configuration option.\n* `callback` (Function; `function( error, value )`): Function to invoke after getting the configuration option.\n * `value` (String|null): The value for the configuration option, or `null` if no value is set.\n\n\n\n### currentBranch( callback )\n\nGets the name of the currently checked out branch, if any.\n\n* `callback` (Function; `function( error, branch )`): Function to invoke after getting the branch.\n * `branch` (String|null): Branch name, or `null` if in detached HEAD state.\n\n\n\n### isRepo( callback )\n\nDetermines if the specified path is a git repository.\n\n* `callback` (Function; `function( error, isRepo )`): Function to invoke after determining if the path is a git repository.\n * `isRepo` (Boolean): Whether the path is a git repository.\n\n\n\n### remotes( callback )\n\nGets all remote repositories.\n\n* `callback` (Function; `function( error, remotes )`): Function to invoke after getting the remotes.\n * `remotes` (Array): All remote repositories.\n\nEach remote object contains the following properties:\n\n* `name` (String): Remote name.\n* `url` (String): URL for the remote repository.\n\n\n\n### resolveCommittish( committish, callback )\n\nResolves a committish to a SHA1.\n\n* `committish` (String): Any committish to resolve.\n* `callback` (Function; `function( error, sha )`): Function to invoke after resolving the comittish.\n * `sha`: SHA1 of the resolved committish.\n\n\n\n### tags( callback )\n\nGets all tags in reverse chronological order.\n\nLightweight tags are sorted by author date and annotated tags are sorted by tagger date.\n\n* `callback` (Function; `function( error, tags )`): Function to invoke after getting tags.\n * `tags` (Array): All tags, sorted by date.\n\nEach tag object contains the following properties:\n\n* `name` (String): Tag name.\n* `sha` (String): SHA-1 for the tag. For lightweight tags, this is the SHA-1 of the commit.\n* `date` (Date): Author date for ligthweight tags, tagger date for annotated tags.\n\n\n\n## License\n\nCopyright 2013 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n",
"readmeFilename": "README.md",
"_id": "git-tools@0.1.0",
- "_from": "git-tools@0.1.0"
+ "dist": {
+ "shasum": "42709aabce667e87ee789f8167dbe0191db9a10b"
+ },
+ "_from": "git-tools@0.1.0",
+ "_resolved": "https://registry.npmjs.org/git-tools/-/git-tools-0.1.0.tgz"
}
diff --git a/node_modules/changelogplease/package.json b/node_modules/changelogplease/package.json
index cd018ba..14cb444 100644
--- a/node_modules/changelogplease/package.json
+++ b/node_modules/changelogplease/package.json
@@ -1,6 +1,6 @@
{
"name": "changelogplease",
- "version": "1.0.1",
+ "version": "1.1.0",
"description": "Generate changelogs from git commit messages",
"author": {
"name": "Scott González",
@@ -30,12 +30,12 @@
"devDependencies": {
"nodeunit": "0.8.6"
},
- "readme": "# Changelog, please\n\nGenerate changelogs from git commit messages using node.js. The generated changelogs are written in markdown.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## Installation\n\n```\nnpm install changelogplease\n```\n\n## Usage\n\n```javascript\nvar changelog = require( \"changelogplease\" );\nvar parsed = changelog({\n\tticketUrl: \"https://github.com/scottgonzalez/changelogplease/issues/{id}\",\n\tcommitUrl: \"https://github.com/scottgonzalez/changelogplease/commit/{id}\",\n\trepo: \"/path/to/repo\",\n\tcommittish: \"1.2.3..1.2.4\"\n});\n```\n\n## API\n\n### changelog( options, callback )\n\n* `options` (Object): Options for creating the changelog.\n * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id.\n * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash.\n * `repo` (String): Path to the repository.\n * `committish` (String): The range of commits for the changelog.\n* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog.\n * `log` (String): Generated changelog, written in markdown.\n\n### Changelog\n\n`changelog( options, callback )` is a shorthand for the following:\n\n```js\nvar Changelog = require( \"changelogplease\" ).Changelog;\nvar instance = new Changelog( options );\ninstance.parse( callback );\n```\n\nChangelog generation is tailored to a specific format based on the needs of the various jQuery\nprojects. However, the `Changelog` constructor and prototype are exposed to allow flexibility.\nBe aware that these methods are not currently documented because they may change. Feel free to\nsubmit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't\nfeel comfortable hacking in your own changes (or even if you do).\n\n\n## License\n\nCopyright 2014 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n",
+ "readme": "# Changelog, please\n\nGenerate changelogs from git commit messages using node.js. The generated changelogs are written in markdown.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## Installation\n\n```\nnpm install changelogplease\n```\n\n## Usage\n\n```javascript\nvar changelog = require( \"changelogplease\" );\nchangelog({\n\tticketUrl: \"https://github.com/scottgonzalez/changelogplease/issues/{id}\",\n\tcommitUrl: \"https://github.com/scottgonzalez/changelogplease/commit/{id}\",\n\trepo: \"/path/to/repo\",\n\tcommittish: \"1.2.3..1.2.4\"\n}, function( error, log ) {\n\tif ( error ) {\n\t\tconsole.log( error );\n\t\treturn;\n\t}\n\n\tconsole.log( log );\n});\n```\n\n## API\n\n### changelog( options, callback )\n\n* `options` (Object): Options for creating the changelog.\n * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id.\n * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash.\n * `repo` (String): Path to the repository.\n * `committish` (String): The range of commits for the changelog.\n * `sort` (Boolean, Function): Function for sorting commits. By default commits are sorted alphabetically so they are grouped by component. A value of `false` disables sorting.\n* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog.\n * `log` (String): Generated changelog, written in markdown.\n\n### Changelog\n\n`changelog( options, callback )` is a shorthand for the following:\n\n```js\nvar Changelog = require( \"changelogplease\" ).Changelog;\nvar instance = new Changelog( options );\ninstance.parse( callback );\n```\n\nChangelog generation is tailored to a specific format based on the needs of the various jQuery\nprojects. However, the `Changelog` constructor and prototype are exposed to allow flexibility.\nBe aware that these methods are not currently documented because they may change. Feel free to\nsubmit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't\nfeel comfortable hacking in your own changes (or even if you do).\n\n\n## License\n\nCopyright 2014 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n",
"readmeFilename": "README.md",
- "_id": "changelogplease@1.0.1",
+ "_id": "changelogplease@1.1.0",
"dist": {
- "shasum": "2953e41245f475cd0a3d66b2861e3344166d6c30"
+ "shasum": "693070250b6ddc93fd87e1634db058e769e4b7d0"
},
- "_from": "changelogplease@1.0.1",
- "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.0.1.tgz"
+ "_from": "changelogplease@1.1.0",
+ "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.1.0.tgz"
}
diff --git a/package.json b/package.json
index 000ec82..016c943 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"dependencies": {
- "changelogplease": "1.0.1",
+ "changelogplease": "1.1.0",
"colors": "0.6.2",
"semver": "2.2.1",
"shelljs": "0.2.6",
From 6bce7751a9a1d558dcf7052619ae6d311bcdf61c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Mon, 31 Mar 2014 21:26:16 +0200
Subject: [PATCH 12/83] CDN: Allow disabling via cdnPublish flag
Fixes gh-55
Closes gh-56
---
README.md | 4 ++++
lib/cdn.js | 1 +
release.js | 14 ++++++++++----
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index e8fefa4..5500c73 100644
--- a/README.md
+++ b/README.md
@@ -235,6 +235,10 @@ The previous release version (used for determining what changed).
The version that will be set in `package.json` after the release.
+#### cdnPublish
+
+Set to `false` to prevent publishing to the jQuery CDN. Defaults to `true`.
+
#### npmPublish
Set to `true` to publish a release via npm. Defaults to `false`.
diff --git a/lib/cdn.js b/lib/cdn.js
index b97f99d..91c49d5 100644
--- a/lib/cdn.js
+++ b/lib/cdn.js
@@ -22,6 +22,7 @@ module.exports = function( Release ) {
}
Release.define({
+ cdnPublish: true,
_cloneCdnRepo: function() {
var local = Release.dir.base + "/codeorigin.jquery.com",
remote = Release.isTest ? testRemote : realRemote;
diff --git a/release.js b/release.js
index 2e41497..8ca8eb8 100644
--- a/release.js
+++ b/release.js
@@ -42,10 +42,16 @@ commonTasks = [
Release.confirmReview,
Release._pushRelease,
- Release._section( "publishing to jQuery CDN" ),
- Release._copyCdnArtifacts,
- Release.confirmReview,
- Release._pushToCdn,
+ function( fn ) {
+ if ( Release.cdnPublish ) {
+ Release._section( "publishing to jQuery CDN" )();
+ Release._walk([
+ Release._copyCdnArtifacts,
+ Release.confirmReview,
+ Release._pushToCdn
+ ], fn );
+ }
+ },
function() {
if ( Release.npmPublish ) {
From d9343ef63f432fc08c0121115bf182844a9a6f29 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Mon, 31 Mar 2014 22:19:48 +0200
Subject: [PATCH 13/83] Release: Fix check for cdnPublish flag
Follow-up to 6bce7751a9a1d558dcf7052619ae6d311bcdf61c, where I missed this.
Ref gh-56
---
release.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/release.js b/release.js
index 8ca8eb8..c0f3f54 100644
--- a/release.js
+++ b/release.js
@@ -50,6 +50,8 @@ commonTasks = [
Release.confirmReview,
Release._pushToCdn
], fn );
+ } else {
+ fn();
}
},
From 85f3b7823d2500dd3d54f76e4cf2462543d9c5aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Mon, 31 Mar 2014 22:29:17 +0200
Subject: [PATCH 14/83] Repo: Only update package.json with nextVersion
Fixes gh-57
Closes gh-58
---
lib/repo.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/repo.js b/lib/repo.js
index 472dbbb..2f54e26 100644
--- a/lib/repo.js
+++ b/lib/repo.js
@@ -259,8 +259,8 @@ Release.define({
Release.exec( "git checkout " + Release.branch,
"Error checking out " + Release.branch + " branch." );
- // Update all JSON versions
- Release._setVersion( Release.nextVersion );
+ // Update only canonical version
+ Release._versionJSON( "package.json", Release.nextVersion );
console.log( "Committing version update..." );
Release.exec( "git commit -am 'Build: Updating the " + Release.branch +
From 0d86e9d5384630ce14ca1ab28189573b762ca6b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Tue, 1 Apr 2014 11:25:37 +0200
Subject: [PATCH 15/83] Readme: What isTest is used for
Closes gh-59
---
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 5500c73..72cb1a7 100644
--- a/README.md
+++ b/README.md
@@ -201,7 +201,8 @@ Saves `package` to `package.json`, preserving indentation style.
#### isTest
-Whether this is a test release.
+Whether this is a test release. Test releases don't publish to npm and use the
+fake-cdn project instead of publishing to the real CDN.
#### project
From ede41d5976cba478f5d0463178ad990e86be94ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Fri, 21 Mar 2014 14:09:02 -0400
Subject: [PATCH 16/83] NPM: Add npmTags() to provide full control over which
tags are used
Fixes gh-29
Fixes gh-30
Closes gh-48
---
README.md | 5 +++++
lib/npm.js | 37 ++++++++++++++++++++++++++++---------
2 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index 72cb1a7..0eab504 100644
--- a/README.md
+++ b/README.md
@@ -114,6 +114,11 @@ the shell, the commit log, and the issue list.
If using Trac, return a different milestone to be used in the queries to
generate a changelog and list of contributors. Defaults to `newVersion`.
+#### npmTags()
+
+An array of tags to apply to the npm release. Every release must contain at least
+one tag.
+
#### issueTracker
Which type of issue tracker is being used for the project. Must be either
diff --git a/lib/npm.js b/lib/npm.js
index c149058..b35940c 100644
--- a/lib/npm.js
+++ b/lib/npm.js
@@ -38,6 +38,16 @@ module.exports = function( Release ) {
}
},
+ npmTags: function() {
+ var tags = [ "beta" ];
+
+ if ( !Release.preRelease ) {
+ tags.push( "latest" );
+ }
+
+ return tags;
+ },
+
_publishNpm: function() {
if ( !Release.npmPublish ) {
return;
@@ -45,20 +55,29 @@ module.exports = function( Release ) {
Release.chdir( Release.dir.repo );
- var npmCommand = "npm publish";
+ var name = Release.readPackage().name,
+ npmTags = Release.npmTags(),
+ npmCommand = "npm publish --tag " + npmTags.pop();
- if ( Release.preRelease ) {
- npmCommand += " --tag beta";
+ if ( Release.isTest ) {
+ console.log( "Actual release would now publish to npm using:" );
+ } else {
+ console.log( "Publishing to npm, running:" );
}
- if ( Release.isTest ) {
- console.log( "Actual release would now publish to npm" );
- console.log( "Would run: " + npmCommand.cyan );
- return;
+ console.log( " " + npmCommand.cyan );
+ if ( !Release.isTest ) {
+ Release.exec( npmCommand );
+ }
+
+ while ( npmTags.length ) {
+ npmCommand = "npm tag " + name + "@" + Release.newVersion + " " + npmTags.pop();
+ console.log( " " + npmCommand.cyan );
+ if ( !Release.isTest ) {
+ Release.exec( npmCommand );
+ }
}
- console.log( "Publishing to npm, running " + npmCommand.cyan );
- Release.exec( npmCommand );
console.log();
}
});
From 88a83a94e5de3c272ddd160deb69c2267f258e8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Mon, 14 Apr 2014 11:30:52 -0400
Subject: [PATCH 17/83] Build: Normalize line endings
---
.gitattributes | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 .gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..b7ca95b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,5 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# JS files must always use LF for tools to work
+*.js eol=lf
From 2ac9706de90458a6bd4cf59d4b366fabac25c4c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Mon, 14 Apr 2014 19:10:49 +0200
Subject: [PATCH 18/83] README: Fix descript of npmTags() as function returning
an array
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 0eab504..cb2d4cf 100644
--- a/README.md
+++ b/README.md
@@ -116,8 +116,8 @@ generate a changelog and list of contributors. Defaults to `newVersion`.
#### npmTags()
-An array of tags to apply to the npm release. Every release must contain at least
-one tag.
+A function that returns an array of tags to apply to the npm release.
+Every release must contain at least one tag.
#### issueTracker
From 54a815dd445ef76704db49cf5b101654741b9205 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Mon, 14 Apr 2014 19:17:59 +0200
Subject: [PATCH 19/83] Utils: Make Release.walk public
---
README.md | 10 ++++++++++
lib/util.js | 4 ++--
release.js | 6 +++---
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index cb2d4cf..685918d 100644
--- a/README.md
+++ b/README.md
@@ -202,6 +202,16 @@ Gets the contents of `package.json` as an object.
Saves `package` to `package.json`, preserving indentation style.
+#### walk( methods, done )
+
+Executes the array of `methods` (minimum one element) step by step. For any
+given method, if that method accepts arguments (`method.length > 0`), it will
+pass a callback that the method needs to execute when done, making the method
+call async. Otherwise the method is assumed to be sync and the next method runs
+immediately.
+
+Once all methods are executed, the `done` callback is executed.
+
### Other Properties
#### isTest
diff --git a/lib/util.js b/lib/util.js
index 3adf5df..c4415a1 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -53,7 +53,7 @@ Release.define({
};
},
- _walk: function( methods, fn ) {
+ walk: function( methods, fn ) {
var method = methods.shift();
function next() {
@@ -61,7 +61,7 @@ Release.define({
return fn();
}
- Release._walk( methods, fn );
+ Release.walk( methods, fn );
}
if ( !method.length ) {
diff --git a/release.js b/release.js
index c0f3f54..1548dbe 100644
--- a/release.js
+++ b/release.js
@@ -45,7 +45,7 @@ commonTasks = [
function( fn ) {
if ( Release.cdnPublish ) {
Release._section( "publishing to jQuery CDN" )();
- Release._walk([
+ Release.walk([
Release._copyCdnArtifacts,
Release.confirmReview,
Release._pushToCdn
@@ -80,10 +80,10 @@ stableTasks = [
Release._gatherContributors
];
-Release._walk( commonTasks, function() {
+Release.walk( commonTasks, function() {
if ( Release.preRelease ) {
return Release.complete();
}
- Release._walk( stableTasks, Release.complete );
+ Release.walk( stableTasks, Release.complete );
});
From e39576dd24efc5991515fb6f23c788be0bd7ebb7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Thu, 17 Apr 2014 14:35:29 -0400
Subject: [PATCH 20/83] Repo: Use valid semver for temp version
Using a valid semver between releases allows users to do an npm install against
a branch.
Ref jquery #15020
Closes gh-61
---
lib/repo.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/repo.js b/lib/repo.js
index 2f54e26..03cc489 100644
--- a/lib/repo.js
+++ b/lib/repo.js
@@ -156,9 +156,9 @@ Release.define({
currentVersion = Release.readPackage().version;
console.log( "Validating current version..." );
- if ( currentVersion.substr( -3, 3 ) !== "pre" ) {
+ if ( currentVersion.substr( -4, 4 ) !== "-pre" ) {
console.log( "The current version is " + currentVersion.red + "." );
- Release.abort( "The version must be a pre version." );
+ Release.abort( "The version must be a pre version, e.g., 1.2.3-pre." );
}
if ( Release.preRelease ) {
@@ -167,7 +167,7 @@ Release.define({
// Note: prevVersion is not currently used for pre-releases.
Release.prevVersion = Release.nextVersion = currentVersion;
} else {
- Release.newVersion = currentVersion.substr( 0, currentVersion.length - 3 );
+ Release.newVersion = currentVersion.substr( 0, currentVersion.length - 4 );
parts = Release.newVersion.split( "." );
major = parseInt( parts[ 0 ], 10 );
minor = parseInt( parts[ 1 ], 10 );
@@ -185,7 +185,7 @@ Release.define({
Release.prevVersion = [ major, minor, patch - 1 ].join( "." );
}
- Release.nextVersion = [ major, minor, patch + 1 ].join( "." ) + "pre";
+ Release.nextVersion = [ major, minor, patch + 1 ].join( "." ) + "-pre";
}
console.log( "We are going from " + Release.prevVersion.cyan +
From 6f185747eed0dc5c2e4ad0b65411d19cbe93fbf2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Fri, 18 Apr 2014 11:22:27 -0400
Subject: [PATCH 21/83] README: Don't hard wrap in prose
---
README.md | 93 ++++++++++++++++---------------------------------------
1 file changed, 26 insertions(+), 67 deletions(-)
diff --git a/README.md b/README.md
index 685918d..7cc4378 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,10 @@
# jQuery Project Release Automation
-This script automates releases for all jQuery projects. It is designed to create
-consistency between projects and reduce the burden of maintaining individual
-release scripts.
+This script automates releases for all jQuery projects. It is designed to create consistency between projects and reduce the burden of maintaining individual release scripts.
## Creating a Release
-Creating a release is as simple as cloning this repository and telling the
-script which project to use. In order to ensure a clean and proper release is
-created, you should always start from a new clone of this repository.
+Creating a release is as simple as cloning this repository and telling the script which project to use. In order to ensure a clean and proper release is created, you should always start from a new clone of this repository.
```sh
git clone git@github.com:jquery/jquery-release.git
@@ -18,13 +14,9 @@ node release.js --remote=jquery/
### Testing the Release Script
-You can do a test run of the release script by using a different remote
-repository. The script is smart enough to detect if you're using an
-official repository and adjust which actions are taken so that undesired
-actions, such as publishing to npm, don't occur for test runs.
+You can do a test run of the release script by using a different remote repository. The script is smart enough to detect if you're using an official repository and adjust which actions are taken so that undesired actions, such as publishing to npm, don't occur for test runs.
-When working on features of this script, adapt the following to simplify
-testing a bit, replacing the paths for `project` and `cdn`:
+When working on features of this script, adapt the following to simplify testing a bit, replacing the paths for `project` and `cdn`:
```bash
#!/bin/sh -e
@@ -50,26 +42,19 @@ rm -rf __release/
node release.js --remote=$project
```
-You need local clones of [fake-project](https://github.com/jquery/fake-project)
-and [fake-cdn](https://github.com/jquery/fake-cdn), then update both variables
-to point to those.
+You need local clones of [fake-project](https://github.com/jquery/fake-project) and [fake-cdn](https://github.com/jquery/fake-cdn), then update both variables to point to those.
-Save as `test-release.sh` in the checkout of this repo, make it executable
-with `chmod +x test-release.sh`, then run with `./test-release.sh`.
+Save as `test-release.sh` in the checkout of this repo, make it executable with `chmod +x test-release.sh`, then run with `./test-release.sh`.
### Full Usage Options
-See the [usage documentation](/docs/usage.txt) for the full set of options.
-You can also run the script with no parameters to see the usage.
+See the [usage documentation](/docs/usage.txt) for the full set of options. You can also run the script with no parameters to see the usage.
## Creating a Project-Specific Release Script
-This script only performs the set of common functionality across all projects.
-Each project may have additional functionality. Any project-specific
-configuration and functionality must be defined in the `build/release.js` file
-inside the project's repository.
+This script only performs the set of common functionality across all projects. Each project may have additional functionality. Any project-specific configuration and functionality must be defined in the `build/release.js` file inside the project's repository.
Here's a minimal example:
@@ -91,54 +76,41 @@ Release.define({
#### checkRepoState()
-Performs any project-specific checks to ensure the repository is in a good state
-to be released. For example, there is a built-in check to ensure that
-AUTHORS.txt is up-to-date.
+Performs any project-specific checks to ensure the repository is in a good state to be released. For example, there is a built-in check to ensure that `AUTHORS.txt` is up-to-date.
-This method has no return value. If a project-specific check fails, the script
-should use `Release.abort()` to prevent the release from continuing.
+This method has no return value. If a project-specific check fails, the script should use `Release.abort()` to prevent the release from continuing.
#### generateArtifacts( callback )
-Generates any release artifacts that should be included in the release. The
-callback must be invoked with an array of files that should be committed before
-creating the tag.
+Generates any release artifacts that should be included in the release. The callback must be invoked with an array of files that should be committed before creating the tag.
#### changelogShell()
-Defines the shell for the changelog. The changelog is created by concatenating
-the shell, the commit log, and the issue list.
+Defines the shell for the changelog. The changelog is created by concatenating the shell, the commit log, and the issue list.
#### tracMilestone()
-If using Trac, return a different milestone to be used in the queries to
-generate a changelog and list of contributors. Defaults to `newVersion`.
+If using Trac, return a different milestone to be used in the queries to generate a changelog and list of contributors. Defaults to `newVersion`.
#### npmTags()
-A function that returns an array of tags to apply to the npm release.
-Every release must contain at least one tag.
+A function that returns an array of tags to apply to the npm release. Every release must contain at least one tag.
#### issueTracker
-Which type of issue tracker is being used for the project. Must be either
-`"trac"` or `"github"`.
+Which type of issue tracker is being used for the project. Must be either `"trac"` or `"github"`.
#### contributorReportId
-If using Trac, this defines which report will produce a list of contributors
-for a specific release.
+If using Trac, this defines which report will produce a list of contributors for a specific release.
-See [docs/trac-contributors.sql](docs/trac-contributors.sql) for the SQL
-necessary to create the Trac report.
+See [docs/trac-contributors.sql](docs/trac-contributors.sql) for the SQL necessary to create the Trac report.
#### exports.dependencies
*Note: This is a property on the `exports` object in `build/release.js`.*
-An array of release-specific dependencies. Dependencies can be listed here
-instead of in `devDependencies` in `package.json` so that contributors don't
-need to install dependencies which are only necessary for the release.
+An array of release-specific dependencies. Dependencies can be listed here instead of in `devDependencies` in `package.json` so that contributors don't need to install dependencies which are only necessary for the release.
### Other Methods
@@ -148,25 +120,21 @@ Defines new properties and methods to add to the `Release` object.
#### abort( msg [, error ] )
-Aborts the release and prints the message. If an error object is provided, it is
-used for the stack trace, otherwise the current call stack is used.
+Aborts the release and prints the message. If an error object is provided, it is used for the stack trace, otherwise the current call stack is used.
#### exec( command, options )
-Executes the given `command`. You can pass `{ silent: true }` to suppress output
-on the command line.
+Executes the given `command`. You can pass `{ silent: true }` to suppress output on the command line.
Returns the output.
#### git( command, errorMessage )
-Executes the given git `command`. If the command fails, the release will be
-aborted and `errorMessage` will be displayed.
+Executes the given git `command`. If the command fails, the release will be aborted and `errorMessage` will be displayed.
#### gitLog( format )
-Gets a git log using the specified format. If the log fails, the release will be
-aborted.
+Gets a git log using the specified format. If the log fails, the release will be aborted.
Returns an array of commits.
@@ -178,15 +146,11 @@ Passes the input to `callback`.
#### confirm( callback )
-Prompts the user to confirm they want to continue with the release script. If
-the user decides not to continue, the release will be aborted and `callback`
-won't be invoked.
+Prompts the user to confirm they want to continue with the release script. If the user decides not to continue, the release will be aborted and `callback` won't be invoked.
#### confirmReview( callback )
-Prompts the user to review the output and confirm they want to continue with the
-release script. If the user decides not to continue, the release will be aborted
-and `callback` won't be invoked.
+Prompts the user to review the output and confirm they want to continue with the release script. If the user decides not to continue, the release will be aborted and `callback` won't be invoked.
#### trac( path )
@@ -204,11 +168,7 @@ Saves `package` to `package.json`, preserving indentation style.
#### walk( methods, done )
-Executes the array of `methods` (minimum one element) step by step. For any
-given method, if that method accepts arguments (`method.length > 0`), it will
-pass a callback that the method needs to execute when done, making the method
-call async. Otherwise the method is assumed to be sync and the next method runs
-immediately.
+Executes the array of `methods` (minimum one element) step by step. For any given method, if that method accepts arguments (`method.length > 0`), it will pass a callback that the method needs to execute when done, making the method call async. Otherwise the method is assumed to be sync and the next method runs immediately.
Once all methods are executed, the `done` callback is executed.
@@ -216,8 +176,7 @@ Once all methods are executed, the `done` callback is executed.
#### isTest
-Whether this is a test release. Test releases don't publish to npm and use the
-fake-cdn project instead of publishing to the real CDN.
+Whether this is a test release. Test releases don't publish to npm and use the fake-cdn project instead of publishing to the real CDN.
#### project
From 80d61ccae91fbd21bd38f3569c7e2d389209e88d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Fri, 18 Apr 2014 11:23:27 -0400
Subject: [PATCH 22/83] README: Note that tests should be from a fresh clone
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 7cc4378..9090eec 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ node release.js --remote=jquery/
### Testing the Release Script
-You can do a test run of the release script by using a different remote repository. The script is smart enough to detect if you're using an official repository and adjust which actions are taken so that undesired actions, such as publishing to npm, don't occur for test runs.
+You can do a test run of the release script by using a different remote repository. **It is recommended to perform tests from a fresh clone of the project being released.** The script is smart enough to detect if you're using an official repository and adjust which actions are taken so that undesired actions, such as publishing to npm, don't occur for test runs.
When working on features of this script, adapt the following to simplify testing a bit, replacing the paths for `project` and `cdn`:
From 705bcf6b850f3c4537e9bff44dfabebf396459e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Fri, 18 Apr 2014 12:29:59 -0400
Subject: [PATCH 23/83] CDN: Fix leftover reference to Release.package
Closes gh-62
---
lib/cdn.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/cdn.js b/lib/cdn.js
index 91c49d5..4b789e8 100644
--- a/lib/cdn.js
+++ b/lib/cdn.js
@@ -40,9 +40,10 @@ module.exports = function( Release ) {
},
_copyCdnArtifacts: function() {
- var targetCdn = projectCdn(),
+ var npmPackage = Release.readPackage().name,
+ targetCdn = projectCdn(),
releaseCdn = Release.dir.repo + "/dist/cdn",
- commitMessage = Release.project + ": Added version " + Release.newVersion;
+ commitMessage = npmPackage + ": Added version " + Release.newVersion;
Release.chdir( Release.dir.base );
console.log( "Copying files from " + releaseCdn.cyan + " to " + targetCdn.cyan + "." );
From ca9ec6808b45b792a4dd20d15de79c73c48ffd97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 6 May 2014 09:05:52 -0400
Subject: [PATCH 24/83] Release: Always generate changelog and contributor list
Fixes gh-28
---
lib/repo.js | 46 ++++++++++++++++++++++------------------------
release.js | 14 +++++++-------
2 files changed, 29 insertions(+), 31 deletions(-)
diff --git a/lib/repo.js b/lib/repo.js
index 03cc489..8d83838 100644
--- a/lib/repo.js
+++ b/lib/repo.js
@@ -161,33 +161,31 @@ Release.define({
Release.abort( "The version must be a pre version, e.g., 1.2.3-pre." );
}
- if ( Release.preRelease ) {
- Release.newVersion = Release.preRelease;
-
- // Note: prevVersion is not currently used for pre-releases.
- Release.prevVersion = Release.nextVersion = currentVersion;
+ Release.newVersion = Release.preRelease ?
+ Release.preRelease :
+ currentVersion.substr( 0, currentVersion.length - 4 );
+
+ parts = Release.newVersion.split( "." );
+ major = parseInt( parts[ 0 ], 10 );
+ minor = parseInt( parts[ 1 ], 10 );
+ patch = parseInt( parts[ 2 ], 10 );
+
+ if ( minor === 0 && patch === 0 ) {
+ Release.abort(
+ "This script is not smart enough to handle major release (eg. 2.0.0)." );
+ } else if ( patch === 0 ) {
+ Release.prevVersion = Release.exec(
+ "git for-each-ref --count=1 --sort=-authordate --format='%(refname:short)' " +
+ "refs/tags/" + [ major, minor - 1 ].join( "." ) + "*"
+ ).trim();
} else {
- Release.newVersion = currentVersion.substr( 0, currentVersion.length - 4 );
- parts = Release.newVersion.split( "." );
- major = parseInt( parts[ 0 ], 10 );
- minor = parseInt( parts[ 1 ], 10 );
- patch = parseInt( parts[ 2 ], 10 );
-
- if ( minor === 0 && patch === 0 ) {
- Release.abort(
- "This script is not smart enough to handle major release (eg. 2.0.0)." );
- } else if ( patch === 0 ) {
- Release.prevVersion = Release.exec(
- "git for-each-ref --count=1 --sort=-authordate --format='%(refname:short)' " +
- "refs/tags/" + [ major, minor - 1 ].join( "." ) + "*"
- ).trim();
- } else {
- Release.prevVersion = [ major, minor, patch - 1 ].join( "." );
- }
-
- Release.nextVersion = [ major, minor, patch + 1 ].join( "." ) + "-pre";
+ Release.prevVersion = [ major, minor, patch - 1 ].join( "." );
}
+ Release.nextVersion = Release.preRelease ?
+ currentVersion :
+ [ major, minor, patch + 1 ].join( "." ) + "-pre";
+
console.log( "We are going from " + Release.prevVersion.cyan +
" to " + Release.newVersion.cyan + "." );
console.log( "After the release, the version will be " + Release.nextVersion.cyan + "." );
diff --git a/release.js b/release.js
index 1548dbe..a44c8aa 100644
--- a/release.js
+++ b/release.js
@@ -38,6 +38,12 @@ commonTasks = [
Release._section( "building release" ),
Release._createReleaseBranch,
+ Release._section( "generating changelog" ),
+ Release._generateChangelog,
+
+ Release._section( "gathering contributors" ),
+ Release._gatherContributors,
+
Release._section( "pushing tag" ),
Release.confirmReview,
Release._pushRelease,
@@ -71,13 +77,7 @@ stableTasks = [
Release._section( "pushing " + Release.branch )();
},
Release.confirmReview,
- Release._pushBranch,
-
- Release._section( "generating changelog" ),
- Release._generateChangelog,
-
- Release._section( "gathering contributors" ),
- Release._gatherContributors
+ Release._pushBranch
];
Release.walk( commonTasks, function() {
From 3269a60246cca471e1700da8d19611686c925bd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Fri, 23 May 2014 10:03:11 -0400
Subject: [PATCH 25/83] Build: Upgrade to changelogplease 1.1.1
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 016c943..f3c1760 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"dependencies": {
- "changelogplease": "1.1.0",
+ "changelogplease": "1.1.1",
"colors": "0.6.2",
"semver": "2.2.1",
"shelljs": "0.2.6",
From bdcf8835240ea20134909b3d32c0ed4ce0221bf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Fri, 23 May 2014 10:04:53 -0400
Subject: [PATCH 26/83] Build: Actually update changelogplease
---
node_modules/changelogplease/index.js | 2 +-
node_modules/changelogplease/package.json | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/node_modules/changelogplease/index.js b/node_modules/changelogplease/index.js
index 682e311..9455ee5 100644
--- a/node_modules/changelogplease/index.js
+++ b/node_modules/changelogplease/index.js
@@ -61,7 +61,7 @@ Changelog.prototype.sort = function( commits ) {
}
// Sort commits so that they're grouped by component
- var component = /^(.+):/;
+ var component = /^([^:]+):/;
return commits.sort(function( a, b ) {
var aMatch = a.match( component ),
bMatch = b.match( component );
diff --git a/node_modules/changelogplease/package.json b/node_modules/changelogplease/package.json
index 14cb444..30a5f79 100644
--- a/node_modules/changelogplease/package.json
+++ b/node_modules/changelogplease/package.json
@@ -1,6 +1,6 @@
{
"name": "changelogplease",
- "version": "1.1.0",
+ "version": "1.1.1",
"description": "Generate changelogs from git commit messages",
"author": {
"name": "Scott González",
@@ -32,10 +32,10 @@
},
"readme": "# Changelog, please\n\nGenerate changelogs from git commit messages using node.js. The generated changelogs are written in markdown.\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n\n## Installation\n\n```\nnpm install changelogplease\n```\n\n## Usage\n\n```javascript\nvar changelog = require( \"changelogplease\" );\nchangelog({\n\tticketUrl: \"https://github.com/scottgonzalez/changelogplease/issues/{id}\",\n\tcommitUrl: \"https://github.com/scottgonzalez/changelogplease/commit/{id}\",\n\trepo: \"/path/to/repo\",\n\tcommittish: \"1.2.3..1.2.4\"\n}, function( error, log ) {\n\tif ( error ) {\n\t\tconsole.log( error );\n\t\treturn;\n\t}\n\n\tconsole.log( log );\n});\n```\n\n## API\n\n### changelog( options, callback )\n\n* `options` (Object): Options for creating the changelog.\n * `ticketUrl` (String): Template for ticket/issue URLs; `{id}` will be replaced with the ticket id.\n * `commitUrl (String)`: Template for commit URLs; `{id}` will be replaced with the commit hash.\n * `repo` (String): Path to the repository.\n * `committish` (String): The range of commits for the changelog.\n * `sort` (Boolean, Function): Function for sorting commits. By default commits are sorted alphabetically so they are grouped by component. A value of `false` disables sorting.\n* `callback` (Function; `function( error, log )`): Function to invoke after generating the changelog.\n * `log` (String): Generated changelog, written in markdown.\n\n### Changelog\n\n`changelog( options, callback )` is a shorthand for the following:\n\n```js\nvar Changelog = require( \"changelogplease\" ).Changelog;\nvar instance = new Changelog( options );\ninstance.parse( callback );\n```\n\nChangelog generation is tailored to a specific format based on the needs of the various jQuery\nprojects. However, the `Changelog` constructor and prototype are exposed to allow flexibility.\nBe aware that these methods are not currently documented because they may change. Feel free to\nsubmit [feature requests](https://github.com/scottgonzalez/changelogplease/issues/new) if you don't\nfeel comfortable hacking in your own changes (or even if you do).\n\n\n## License\n\nCopyright 2014 Scott González. Released under the terms of the MIT license.\n\n---\n\nSupport this project by [donating on Gittip](https://www.gittip.com/scottgonzalez/).\n",
"readmeFilename": "README.md",
- "_id": "changelogplease@1.1.0",
+ "_id": "changelogplease@1.1.1",
"dist": {
- "shasum": "693070250b6ddc93fd87e1634db058e769e4b7d0"
+ "shasum": "2904aae4883e6e0f64bc3e1fc436ba3717c8b22d"
},
- "_from": "changelogplease@1.1.0",
- "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.1.0.tgz"
+ "_from": "changelogplease@1.1.1",
+ "_resolved": "https://registry.npmjs.org/changelogplease/-/changelogplease-1.1.1.tgz"
}
From 4aa089dff608ffeadd1970fc72257feb29182198 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Fri, 23 May 2014 16:07:44 +0200
Subject: [PATCH 27/83] Travis: Run aginst node 0.10
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 666f7aa..6ef04eb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,5 @@
language: node_js
node_js:
- - "0.8"
+ - "0.10"
before_script:
- npm install -g grunt-cli
From af046dcd6ff2d5cc80605c1d92f7f876d361dfc1 Mon Sep 17 00:00:00 2001
From: Timmy Willison
Date: Fri, 23 May 2014 12:25:20 -0400
Subject: [PATCH 28/83] Repo: allow synchronous or asynchronous
Release.checkRepoState
---
README.md | 4 +++-
lib/repo.js | 5 +++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 9090eec..f80b3c2 100644
--- a/README.md
+++ b/README.md
@@ -74,12 +74,14 @@ Release.define({
### Required/Recommended Configuration
-#### checkRepoState()
+#### checkRepoState( [ callback ] )
Performs any project-specific checks to ensure the repository is in a good state to be released. For example, there is a built-in check to ensure that `AUTHORS.txt` is up-to-date.
This method has no return value. If a project-specific check fails, the script should use `Release.abort()` to prevent the release from continuing.
+This method may be synchronous or asynchronous depending on the presence of `callback`. If present, the callback must be invoked.
+
#### generateArtifacts( callback )
Generates any release artifacts that should be included in the release. The callback must be invoked with an array of files that should be committed before creating the tag.
diff --git a/lib/repo.js b/lib/repo.js
index 8d83838..2da5c28 100644
--- a/lib/repo.js
+++ b/lib/repo.js
@@ -36,7 +36,7 @@ Release.define({
console.log();
},
- _checkRepoState: function() {
+ _checkRepoState: function( fn ) {
if ( !Release.issueTracker ) {
Release.abort( "Missing required config: issueTracker." );
}
@@ -53,7 +53,8 @@ Release.define({
}
Release._checkAuthorsTxt();
- Release.checkRepoState();
+
+ Release.walk( [ Release.checkRepoState ], fn );
},
_checkAuthorsTxt: function() {
From 063d12b50961309ff31915b34ca29c4cf25c7263 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 27 May 2014 15:11:56 -0400
Subject: [PATCH 29/83] Build: Add license
Closes gh-65
---
LICENSE.txt | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 LICENSE.txt
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..9b7507d
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,37 @@
+Copyright 2013, 2014 jQuery Foundation and other contributors,
+https://jquery.org/
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/jquery/jquery-release
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+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.
+
+====
+
+All files located in the node_modules directory are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
From 340c3d245f252e1ad95d2861609f70f6892b6dde Mon Sep 17 00:00:00 2001
From: Anne-Gaelle Colom
Date: Wed, 31 Dec 2014 09:13:39 +0000
Subject: [PATCH 30/83] Build: Remove dates from copyright notice
Closes gh-67
---
LICENSE.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/LICENSE.txt b/LICENSE.txt
index 9b7507d..7f899db 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,5 +1,4 @@
-Copyright 2013, 2014 jQuery Foundation and other contributors,
-https://jquery.org/
+Copyright jQuery Foundation and other contributors, https://jquery.org/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
From 643d6ff8d97fa2deb4ec8b8cfd5fed39b741f97e Mon Sep 17 00:00:00 2001
From: Timmy Willison
Date: Wed, 28 Jan 2015 14:32:33 -0800
Subject: [PATCH 31/83] Build: update colors
Close gh-68
---
node_modules/colors/.travis.yml | 6 +
node_modules/colors/MIT-LICENSE.txt | 7 +-
node_modules/colors/ReadMe.md | 150 ++++++--
node_modules/colors/colors.js | 342 ------------------
node_modules/colors/example.html | 76 ----
node_modules/colors/example.js | 77 ----
node_modules/colors/examples/normal-usage.js | 74 ++++
node_modules/colors/examples/safe-string.js | 76 ++++
node_modules/colors/lib/colors.js | 176 +++++++++
node_modules/colors/lib/custom/trap.js | 45 +++
node_modules/colors/lib/custom/zalgo.js | 104 ++++++
.../colors/lib/extendStringPrototype.js | 118 ++++++
node_modules/colors/lib/index.js | 12 +
node_modules/colors/lib/maps/america.js | 12 +
node_modules/colors/lib/maps/rainbow.js | 13 +
node_modules/colors/lib/maps/random.js | 8 +
node_modules/colors/lib/maps/zebra.js | 5 +
node_modules/colors/lib/styles.js | 77 ++++
.../colors/lib/system/supports-colors.js | 61 ++++
node_modules/colors/package.json | 41 ++-
node_modules/colors/safe.js | 9 +
node_modules/colors/screenshots/colors.png | Bin 0 -> 79787 bytes
.../colors/{test.js => tests/basic-test.js} | 32 +-
node_modules/colors/tests/safe-test.js | 45 +++
.../{winston-light.js => generic-logging.js} | 0
node_modules/colors/themes/winston-dark.js | 12 -
package.json | 2 +-
27 files changed, 1005 insertions(+), 575 deletions(-)
create mode 100644 node_modules/colors/.travis.yml
delete mode 100644 node_modules/colors/colors.js
delete mode 100644 node_modules/colors/example.html
delete mode 100644 node_modules/colors/example.js
create mode 100644 node_modules/colors/examples/normal-usage.js
create mode 100644 node_modules/colors/examples/safe-string.js
create mode 100644 node_modules/colors/lib/colors.js
create mode 100644 node_modules/colors/lib/custom/trap.js
create mode 100644 node_modules/colors/lib/custom/zalgo.js
create mode 100644 node_modules/colors/lib/extendStringPrototype.js
create mode 100644 node_modules/colors/lib/index.js
create mode 100644 node_modules/colors/lib/maps/america.js
create mode 100644 node_modules/colors/lib/maps/rainbow.js
create mode 100644 node_modules/colors/lib/maps/random.js
create mode 100644 node_modules/colors/lib/maps/zebra.js
create mode 100644 node_modules/colors/lib/styles.js
create mode 100644 node_modules/colors/lib/system/supports-colors.js
create mode 100644 node_modules/colors/safe.js
create mode 100644 node_modules/colors/screenshots/colors.png
rename node_modules/colors/{test.js => tests/basic-test.js} (57%)
create mode 100644 node_modules/colors/tests/safe-test.js
rename node_modules/colors/themes/{winston-light.js => generic-logging.js} (100%)
delete mode 100644 node_modules/colors/themes/winston-dark.js
diff --git a/node_modules/colors/.travis.yml b/node_modules/colors/.travis.yml
new file mode 100644
index 0000000..ec43125
--- /dev/null
+++ b/node_modules/colors/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "0.11"
+ - "0.10"
+ - "0.8"
+ - "0.6"
\ No newline at end of file
diff --git a/node_modules/colors/MIT-LICENSE.txt b/node_modules/colors/MIT-LICENSE.txt
index 7dca107..3de4e33 100644
--- a/node_modules/colors/MIT-LICENSE.txt
+++ b/node_modules/colors/MIT-LICENSE.txt
@@ -1,7 +1,8 @@
-Copyright (c) 2010
+Original Library
+ - Copyright (c) Marak Squires
-Marak Squires
-Alexis Sellier (cloudhead)
+Additional Functionality
+ - Copyright (c) Sindre Sorhus (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/colors/ReadMe.md b/node_modules/colors/ReadMe.md
index 0eda52d..beb5b14 100644
--- a/node_modules/colors/ReadMe.md
+++ b/node_modules/colors/ReadMe.md
@@ -1,7 +1,8 @@
-# colors.js - get color and style in your node.js console ( and browser ) like what
+# colors.js
-
+## get color and style in your node.js console
+
## Installation
@@ -9,34 +10,105 @@
## colors and styles!
-- bold
-- italic
-- underline
-- inverse
-- yellow
-- cyan
-- white
-- magenta
-- green
-- red
-- grey
-- blue
-- rainbow
-- zebra
-- random
+### text colors
+
+ - black
+ - red
+ - green
+ - yellow
+ - blue
+ - magenta
+ - cyan
+ - white
+ - gray
+ - grey
+
+### background colors
+
+
+
+ - bgBlack
+ - bgRed
+ - bgGreen
+ - bgYellow
+ - bgBlue
+ - bgMagenta
+ - bgCyan
+ - bgWhite
+
+### styles
+
+ - reset
+ - bold
+ - dim
+ - italic
+ - underline
+ - inverse
+ - hidden
+ - strikethrough
+
+### extras
+
+ - rainbow
+ - zebra
+ - america
+ - trap
+ - random
+
## Usage
-``` js
-var colors = require('./colors');
+By popular demand, `colors` now ships with two types of usages!
+
+The super nifty way
+
+```js
+var colors = require('colors');
console.log('hello'.green); // outputs green text
console.log('i like cake and pies'.underline.red) // outputs red underlined text
console.log('inverse the color'.inverse); // inverses the color
-console.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)
+console.log('OMG Rainbows!'.rainbow); // rainbow
+console.log('Run the trap'.trap); // Drops the bass
+
+```
+
+or a slightly less nifty way which doesn't extend `String.prototype`
+
+```js
+var colors = require('colors/safe');
+
+console.log(colors.green('hello')); // outputs green text
+console.log(colors.red.underline('i like cake and pies')) // outputs red underlined text
+console.log(colors.inverse('inverse the color')); // inverses the color
+console.log(colors.rainbow('OMG Rainbows!')); // rainbow
+console.log(colors.trap('Run the trap')); // Drops the bass
+
+```
+
+I prefer the first way. Some people seem to be afraid of extending `String.prototype` and prefer the second way.
+
+If you are writing good code you will never have an issue with the first approach. If you really don't want to touch `String.prototype`, the second usage will not touch `String` native object.
+
+## Disabling Colors
+
+To disable colors you can pass the following arguments in the command line to your application:
+
+```bash
+node myapp.js --no-color
```
-# Creating Custom themes
+## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data)
+
+```js
+var name = 'Marak';
+console.log(colors.green('Hello %s'), name);
+// outputs -> 'Hello Marak'
+```
+
+## Custom themes
+
+### Using standard API
```js
@@ -62,16 +134,34 @@ console.log("this is an error".error);
console.log("this is a warning".warn);
```
+### Using string safe API
-### Contributors
+```js
+var colors = require('colors/safe');
-Marak (Marak Squires)
-Alexis Sellier (cloudhead)
-mmalecki (Maciej Małecki)
-nicoreed (Nico Reed)
-morganrallen (Morgan Allen)
-JustinCampbell (Justin Campbell)
-ded (Dustin Diaz)
+// set single property
+var error = colors.red;
+error('this is red');
+// set theme
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log(colors.error("this is an error"));
+
+// outputs yellow text
+console.log(colors.warn("this is a warning"));
+```
-#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)
+*Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.*
\ No newline at end of file
diff --git a/node_modules/colors/colors.js b/node_modules/colors/colors.js
deleted file mode 100644
index 7a537d8..0000000
--- a/node_modules/colors/colors.js
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
-colors.js
-
-Copyright (c) 2010
-
-Marak Squires
-Alexis Sellier (cloudhead)
-
-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.
-
-*/
-
-var isHeadless = false;
-
-if (typeof module !== 'undefined') {
- isHeadless = true;
-}
-
-if (!isHeadless) {
- var exports = {};
- var module = {};
- var colors = exports;
- exports.mode = "browser";
-} else {
- exports.mode = "console";
-}
-
-//
-// Prototypes the string object to have additional method calls that add terminal colors
-//
-var addProperty = function (color, func) {
- exports[color] = function (str) {
- return func.apply(str);
- };
- String.prototype.__defineGetter__(color, func);
-};
-
-function stylize(str, style) {
-
- var styles;
-
- if (exports.mode === 'console') {
- styles = {
- //styles
- 'bold' : ['\x1B[1m', '\x1B[22m'],
- 'italic' : ['\x1B[3m', '\x1B[23m'],
- 'underline' : ['\x1B[4m', '\x1B[24m'],
- 'inverse' : ['\x1B[7m', '\x1B[27m'],
- 'strikethrough' : ['\x1B[9m', '\x1B[29m'],
- //text colors
- //grayscale
- 'white' : ['\x1B[37m', '\x1B[39m'],
- 'grey' : ['\x1B[90m', '\x1B[39m'],
- 'black' : ['\x1B[30m', '\x1B[39m'],
- //colors
- 'blue' : ['\x1B[34m', '\x1B[39m'],
- 'cyan' : ['\x1B[36m', '\x1B[39m'],
- 'green' : ['\x1B[32m', '\x1B[39m'],
- 'magenta' : ['\x1B[35m', '\x1B[39m'],
- 'red' : ['\x1B[31m', '\x1B[39m'],
- 'yellow' : ['\x1B[33m', '\x1B[39m'],
- //background colors
- //grayscale
- 'whiteBG' : ['\x1B[47m', '\x1B[49m'],
- 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'],
- 'blackBG' : ['\x1B[40m', '\x1B[49m'],
- //colors
- 'blueBG' : ['\x1B[44m', '\x1B[49m'],
- 'cyanBG' : ['\x1B[46m', '\x1B[49m'],
- 'greenBG' : ['\x1B[42m', '\x1B[49m'],
- 'magentaBG' : ['\x1B[45m', '\x1B[49m'],
- 'redBG' : ['\x1B[41m', '\x1B[49m'],
- 'yellowBG' : ['\x1B[43m', '\x1B[49m']
- };
- } else if (exports.mode === 'browser') {
- styles = {
- //styles
- 'bold' : ['', ''],
- 'italic' : ['', ''],
- 'underline' : ['', ''],
- 'inverse' : ['', ''],
- 'strikethrough' : ['', ''],
- //text colors
- //grayscale
- 'white' : ['', ''],
- 'grey' : ['', ''],
- 'black' : ['', ''],
- //colors
- 'blue' : ['', ''],
- 'cyan' : ['', ''],
- 'green' : ['', ''],
- 'magenta' : ['', ''],
- 'red' : ['', ''],
- 'yellow' : ['', ''],
- //background colors
- //grayscale
- 'whiteBG' : ['', ''],
- 'greyBG' : ['', ''],
- 'blackBG' : ['', ''],
- //colors
- 'blueBG' : ['', ''],
- 'cyanBG' : ['', ''],
- 'greenBG' : ['', ''],
- 'magentaBG' : ['', ''],
- 'redBG' : ['', ''],
- 'yellowBG' : ['', '']
- };
- } else if (exports.mode === 'none') {
- return str + '';
- } else {
- console.log('unsupported mode, try "browser", "console" or "none"');
- }
- return styles[style][0] + str + styles[style][1];
-}
-
-function applyTheme(theme) {
-
- //
- // Remark: This is a list of methods that exist
- // on String that you should not overwrite.
- //
- var stringPrototypeBlacklist = [
- '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
- 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
- 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
- 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
- ];
-
- Object.keys(theme).forEach(function (prop) {
- if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
- console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
- }
- else {
- if (typeof(theme[prop]) === 'string') {
- addProperty(prop, function () {
- return exports[theme[prop]](this);
- });
- }
- else {
- addProperty(prop, function () {
- var ret = this;
- for (var t = 0; t < theme[prop].length; t++) {
- ret = exports[theme[prop][t]](ret);
- }
- return ret;
- });
- }
- }
- });
-}
-
-
-//
-// Iterate through all default styles and colors
-//
-var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG'];
-x.forEach(function (style) {
-
- // __defineGetter__ at the least works in more browsers
- // http://robertnyman.com/javascript/javascript-getters-setters.html
- // Object.defineProperty only works in Chrome
- addProperty(style, function () {
- return stylize(this, style);
- });
-});
-
-function sequencer(map) {
- return function () {
- if (!isHeadless) {
- return this.replace(/( )/, '$1');
- }
- var exploded = this.split(""), i = 0;
- exploded = exploded.map(map);
- return exploded.join("");
- };
-}
-
-var rainbowMap = (function () {
- var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
- return function (letter, i, exploded) {
- if (letter === " ") {
- return letter;
- } else {
- return stylize(letter, rainbowColors[i++ % rainbowColors.length]);
- }
- };
-})();
-
-exports.themes = {};
-
-exports.addSequencer = function (name, map) {
- addProperty(name, sequencer(map));
-};
-
-exports.addSequencer('rainbow', rainbowMap);
-exports.addSequencer('zebra', function (letter, i, exploded) {
- return i % 2 === 0 ? letter : letter.inverse;
-});
-
-exports.setTheme = function (theme) {
- if (typeof theme === 'string') {
- try {
- exports.themes[theme] = require(theme);
- applyTheme(exports.themes[theme]);
- return exports.themes[theme];
- } catch (err) {
- console.log(err);
- return err;
- }
- } else {
- applyTheme(theme);
- }
-};
-
-
-addProperty('stripColors', function () {
- return ("" + this).replace(/\x1B\[\d+m/g, '');
-});
-
-// please no
-function zalgo(text, options) {
- var soul = {
- "up" : [
- '̍', '̎', '̄', '̅',
- '̿', '̑', '̆', '̐',
- '͒', '͗', '͑', '̇',
- '̈', '̊', '͂', '̓',
- '̈', '͊', '͋', '͌',
- '̃', '̂', '̌', '͐',
- '̀', '́', '̋', '̏',
- '̒', '̓', '̔', '̽',
- '̉', 'ͣ', 'ͤ', 'ͥ',
- 'ͦ', 'ͧ', 'ͨ', 'ͩ',
- 'ͪ', 'ͫ', 'ͬ', 'ͭ',
- 'ͮ', 'ͯ', '̾', '͛',
- '͆', '̚'
- ],
- "down" : [
- '̖', '̗', '̘', '̙',
- '̜', '̝', '̞', '̟',
- '̠', '̤', '̥', '̦',
- '̩', '̪', '̫', '̬',
- '̭', '̮', '̯', '̰',
- '̱', '̲', '̳', '̹',
- '̺', '̻', '̼', 'ͅ',
- '͇', '͈', '͉', '͍',
- '͎', '͓', '͔', '͕',
- '͖', '͙', '͚', '̣'
- ],
- "mid" : [
- '̕', '̛', '̀', '́',
- '͘', '̡', '̢', '̧',
- '̨', '̴', '̵', '̶',
- '͜', '͝', '͞',
- '͟', '͠', '͢', '̸',
- '̷', '͡', ' ҉'
- ]
- },
- all = [].concat(soul.up, soul.down, soul.mid),
- zalgo = {};
-
- function randomNumber(range) {
- var r = Math.floor(Math.random() * range);
- return r;
- }
-
- function is_char(character) {
- var bool = false;
- all.filter(function (i) {
- bool = (i === character);
- });
- return bool;
- }
-
- function heComes(text, options) {
- var result = '', counts, l;
- options = options || {};
- options["up"] = options["up"] || true;
- options["mid"] = options["mid"] || true;
- options["down"] = options["down"] || true;
- options["size"] = options["size"] || "maxi";
- text = text.split('');
- for (l in text) {
- if (is_char(l)) {
- continue;
- }
- result = result + text[l];
- counts = {"up" : 0, "down" : 0, "mid" : 0};
- switch (options.size) {
- case 'mini':
- counts.up = randomNumber(8);
- counts.min = randomNumber(2);
- counts.down = randomNumber(8);
- break;
- case 'maxi':
- counts.up = randomNumber(16) + 3;
- counts.min = randomNumber(4) + 1;
- counts.down = randomNumber(64) + 3;
- break;
- default:
- counts.up = randomNumber(8) + 1;
- counts.mid = randomNumber(6) / 2;
- counts.down = randomNumber(8) + 1;
- break;
- }
-
- var arr = ["up", "mid", "down"];
- for (var d in arr) {
- var index = arr[d];
- for (var i = 0 ; i <= counts[index]; i++) {
- if (options[index]) {
- result = result + soul[index][randomNumber(soul[index].length)];
- }
- }
- }
- }
- return result;
- }
- return heComes(text);
-}
-
-
-// don't summon zalgo
-addProperty('zalgo', function () {
- return zalgo(this);
-});
diff --git a/node_modules/colors/example.html b/node_modules/colors/example.html
deleted file mode 100644
index 7a2ae60..0000000
--- a/node_modules/colors/example.html
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
- Colors Example
-
-
-
-
-
-
\ No newline at end of file
diff --git a/node_modules/colors/example.js b/node_modules/colors/example.js
deleted file mode 100644
index b1e03a4..0000000
--- a/node_modules/colors/example.js
+++ /dev/null
@@ -1,77 +0,0 @@
-var colors = require('./colors');
-
-//colors.mode = "browser";
-
-var test = colors.red("hopefully colorless output");
-console.log('Rainbows are fun!'.rainbow);
-console.log('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported
-console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported
-//console.log('zalgo time!'.zalgo);
-console.log(test.stripColors);
-console.log("a".grey + " b".black);
-console.log("Zebras are so fun!".zebra);
-console.log('background color attack!'.black.whiteBG)
-
-//
-// Remark: .strikethrough may not work with Mac OS Terminal App
-//
-console.log("This is " + "not".strikethrough + " fun.");
-console.log(colors.rainbow('Rainbows are fun!'));
-console.log(colors.italic('So ') + colors.underline('are') + colors.bold(' styles! ') + colors.inverse('inverse')); // styles not widely supported
-console.log(colors.bold(colors.italic(colors.underline(colors.red('Chains are also cool.'))))); // styles not widely supported
-//console.log(colors.zalgo('zalgo time!'));
-console.log(colors.stripColors(test));
-console.log(colors.grey("a") + colors.black(" b"));
-
-colors.addSequencer("america", function(letter, i, exploded) {
- if(letter === " ") return letter;
- switch(i%3) {
- case 0: return letter.red;
- case 1: return letter.white;
- case 2: return letter.blue;
- }
-});
-
-colors.addSequencer("random", (function() {
- var available = ['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
-
- return function(letter, i, exploded) {
- return letter === " " ? letter : letter[available[Math.round(Math.random() * (available.length - 1))]];
- };
-})());
-
-console.log("AMERICA! F--K YEAH!".america);
-console.log("So apparently I've been to Mars, with all the little green men. But you know, I don't recall.".random);
-
-//
-// Custom themes
-//
-
-// Load theme with JSON literal
-colors.setTheme({
- silly: 'rainbow',
- input: 'grey',
- verbose: 'cyan',
- prompt: 'grey',
- info: 'green',
- data: 'grey',
- help: 'cyan',
- warn: 'yellow',
- debug: 'blue',
- error: 'red'
-});
-
-// outputs red text
-console.log("this is an error".error);
-
-// outputs yellow text
-console.log("this is a warning".warn);
-
-// outputs grey text
-console.log("this is an input".input);
-
-// Load a theme from file
-colors.setTheme('./themes/winston-dark.js');
-
-console.log("this is an input".input);
-
diff --git a/node_modules/colors/examples/normal-usage.js b/node_modules/colors/examples/normal-usage.js
new file mode 100644
index 0000000..2818741
--- /dev/null
+++ b/node_modules/colors/examples/normal-usage.js
@@ -0,0 +1,74 @@
+var colors = require('../lib/index');
+
+console.log("First some yellow text".yellow);
+
+console.log("Underline that text".yellow.underline);
+
+console.log("Make it bold and red".red.bold);
+
+console.log(("Double Raindows All Day Long").rainbow)
+
+console.log("Drop the bass".trap)
+
+console.log("DROP THE RAINBOW BASS".trap.rainbow)
+
+
+console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported
+
+console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse + ' styles! '.yellow.bold); // styles not widely supported
+console.log("Zebras are so fun!".zebra);
+
+//
+// Remark: .strikethrough may not work with Mac OS Terminal App
+//
+console.log("This is " + "not".strikethrough + " fun.");
+
+console.log('Background color attack!'.black.bgWhite)
+console.log('Use random styles on everything!'.random)
+console.log('America, Heck Yeah!'.america)
+
+
+console.log('Setting themes is useful')
+
+//
+// Custom themes
+//
+console.log('Generic logging theme as JSON'.green.bold.underline);
+// Load theme with JSON literal
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log("this is an error".error);
+
+// outputs yellow text
+console.log("this is a warning".warn);
+
+// outputs grey text
+console.log("this is an input".input);
+
+console.log('Generic logging theme as file'.green.bold.underline);
+
+// Load a theme from file
+colors.setTheme(__dirname + '/../themes/generic-logging.js');
+
+// outputs red text
+console.log("this is an error".error);
+
+// outputs yellow text
+console.log("this is a warning".warn);
+
+// outputs grey text
+console.log("this is an input".input);
+
+//console.log("Don't summon".zalgo)
\ No newline at end of file
diff --git a/node_modules/colors/examples/safe-string.js b/node_modules/colors/examples/safe-string.js
new file mode 100644
index 0000000..111b363
--- /dev/null
+++ b/node_modules/colors/examples/safe-string.js
@@ -0,0 +1,76 @@
+var colors = require('../safe');
+
+console.log(colors.yellow("First some yellow text"));
+
+console.log(colors.yellow.underline("Underline that text"));
+
+console.log(colors.red.bold("Make it bold and red"));
+
+console.log(colors.rainbow("Double Raindows All Day Long"))
+
+console.log(colors.trap("Drop the bass"))
+
+console.log(colors.rainbow(colors.trap("DROP THE RAINBOW BASS")));
+
+console.log(colors.bold.italic.underline.red('Chains are also cool.')); // styles not widely supported
+
+
+console.log(colors.green('So ') + colors.underline('are') + ' ' + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); // styles not widely supported
+
+console.log(colors.zebra("Zebras are so fun!"));
+
+console.log("This is " + colors.strikethrough("not") + " fun.");
+
+
+console.log(colors.black.bgWhite('Background color attack!'));
+console.log(colors.random('Use random styles on everything!'))
+console.log(colors.america('America, Heck Yeah!'));
+
+console.log('Setting themes is useful')
+
+//
+// Custom themes
+//
+//console.log('Generic logging theme as JSON'.green.bold.underline);
+// Load theme with JSON literal
+colors.setTheme({
+ silly: 'rainbow',
+ input: 'grey',
+ verbose: 'cyan',
+ prompt: 'grey',
+ info: 'green',
+ data: 'grey',
+ help: 'cyan',
+ warn: 'yellow',
+ debug: 'blue',
+ error: 'red'
+});
+
+// outputs red text
+console.log(colors.error("this is an error"));
+
+// outputs yellow text
+console.log(colors.warn("this is a warning"));
+
+// outputs grey text
+console.log(colors.input("this is an input"));
+
+
+// console.log('Generic logging theme as file'.green.bold.underline);
+
+// Load a theme from file
+colors.setTheme(__dirname + '/../themes/generic-logging.js');
+
+// outputs red text
+console.log(colors.error("this is an error"));
+
+// outputs yellow text
+console.log(colors.warn("this is a warning"));
+
+// outputs grey text
+console.log(colors.input("this is an input"));
+
+// console.log(colors.zalgo("Don't summon him"))
+
+
+
diff --git a/node_modules/colors/lib/colors.js b/node_modules/colors/lib/colors.js
new file mode 100644
index 0000000..59898de
--- /dev/null
+++ b/node_modules/colors/lib/colors.js
@@ -0,0 +1,176 @@
+/*
+
+The MIT License (MIT)
+
+Original Library
+ - Copyright (c) Marak Squires
+
+Additional functionality
+ - Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+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.
+
+*/
+
+var colors = {};
+module['exports'] = colors;
+
+colors.themes = {};
+
+var ansiStyles = colors.styles = require('./styles');
+var defineProps = Object.defineProperties;
+
+colors.supportsColor = require('./system/supports-colors');
+
+if (typeof colors.enabled === "undefined") {
+ colors.enabled = colors.supportsColor;
+}
+
+colors.stripColors = colors.strip = function(str){
+ return ("" + str).replace(/\x1B\[\d+m/g, '');
+};
+
+
+var stylize = colors.stylize = function stylize (str, style) {
+ return ansiStyles[style].open + str + ansiStyles[style].close;
+}
+
+var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
+var escapeStringRegexp = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+ return str.replace(matchOperatorsRe, '\\$&');
+}
+
+function build(_styles) {
+ var builder = function builder() {
+ return applyStyle.apply(builder, arguments);
+ };
+ builder._styles = _styles;
+ // __proto__ is used because we must return a function, but there is
+ // no way to create a function with a different prototype.
+ builder.__proto__ = proto;
+ return builder;
+}
+
+var styles = (function () {
+ var ret = {};
+ ansiStyles.grey = ansiStyles.gray;
+ Object.keys(ansiStyles).forEach(function (key) {
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
+ ret[key] = {
+ get: function () {
+ return build(this._styles.concat(key));
+ }
+ };
+ });
+ return ret;
+})();
+
+var proto = defineProps(function colors() {}, styles);
+
+function applyStyle() {
+ var args = arguments;
+ var argsLen = args.length;
+ var str = argsLen !== 0 && String(arguments[0]);
+ if (argsLen > 1) {
+ for (var a = 1; a < argsLen; a++) {
+ str += ' ' + args[a];
+ }
+ }
+
+ if (!colors.enabled || !str) {
+ return str;
+ }
+
+ var nestedStyles = this._styles;
+
+ var i = nestedStyles.length;
+ while (i--) {
+ var code = ansiStyles[nestedStyles[i]];
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
+ }
+
+ return str;
+}
+
+function applyTheme (theme) {
+ for (var style in theme) {
+ (function(style){
+ colors[style] = function(str){
+ return colors[theme[style]](str);
+ };
+ })(style)
+ }
+}
+
+colors.setTheme = function (theme) {
+ if (typeof theme === 'string') {
+ try {
+ colors.themes[theme] = require(theme);
+ applyTheme(colors.themes[theme]);
+ return colors.themes[theme];
+ } catch (err) {
+ console.log(err);
+ return err;
+ }
+ } else {
+ applyTheme(theme);
+ }
+};
+
+function init() {
+ var ret = {};
+ Object.keys(styles).forEach(function (name) {
+ ret[name] = {
+ get: function () {
+ return build([name]);
+ }
+ };
+ });
+ return ret;
+}
+
+var sequencer = function sequencer (map, str) {
+ var exploded = str.split(""), i = 0;
+ exploded = exploded.map(map);
+ return exploded.join("");
+};
+
+// custom formatter methods
+colors.trap = require('./custom/trap');
+colors.zalgo = require('./custom/zalgo');
+
+// maps
+colors.maps = {};
+colors.maps.america = require('./maps/america');
+colors.maps.zebra = require('./maps/zebra');
+colors.maps.rainbow = require('./maps/rainbow');
+colors.maps.random = require('./maps/random')
+
+for (var map in colors.maps) {
+ (function(map){
+ colors[map] = function (str) {
+ return sequencer(colors.maps[map], str);
+ }
+ })(map)
+}
+
+defineProps(colors, init());
\ No newline at end of file
diff --git a/node_modules/colors/lib/custom/trap.js b/node_modules/colors/lib/custom/trap.js
new file mode 100644
index 0000000..3f09143
--- /dev/null
+++ b/node_modules/colors/lib/custom/trap.js
@@ -0,0 +1,45 @@
+module['exports'] = function runTheTrap (text, options) {
+ var result = "";
+ text = text || "Run the trap, drop the bass";
+ text = text.split('');
+ var trap = {
+ a: ["\u0040", "\u0104", "\u023a", "\u0245", "\u0394", "\u039b", "\u0414"],
+ b: ["\u00df", "\u0181", "\u0243", "\u026e", "\u03b2", "\u0e3f"],
+ c: ["\u00a9", "\u023b", "\u03fe"],
+ d: ["\u00d0", "\u018a", "\u0500" , "\u0501" ,"\u0502", "\u0503"],
+ e: ["\u00cb", "\u0115", "\u018e", "\u0258", "\u03a3", "\u03be", "\u04bc", "\u0a6c"],
+ f: ["\u04fa"],
+ g: ["\u0262"],
+ h: ["\u0126", "\u0195", "\u04a2", "\u04ba", "\u04c7", "\u050a"],
+ i: ["\u0f0f"],
+ j: ["\u0134"],
+ k: ["\u0138", "\u04a0", "\u04c3", "\u051e"],
+ l: ["\u0139"],
+ m: ["\u028d", "\u04cd", "\u04ce", "\u0520", "\u0521", "\u0d69"],
+ n: ["\u00d1", "\u014b", "\u019d", "\u0376", "\u03a0", "\u048a"],
+ o: ["\u00d8", "\u00f5", "\u00f8", "\u01fe", "\u0298", "\u047a", "\u05dd", "\u06dd", "\u0e4f"],
+ p: ["\u01f7", "\u048e"],
+ q: ["\u09cd"],
+ r: ["\u00ae", "\u01a6", "\u0210", "\u024c", "\u0280", "\u042f"],
+ s: ["\u00a7", "\u03de", "\u03df", "\u03e8"],
+ t: ["\u0141", "\u0166", "\u0373"],
+ u: ["\u01b1", "\u054d"],
+ v: ["\u05d8"],
+ w: ["\u0428", "\u0460", "\u047c", "\u0d70"],
+ x: ["\u04b2", "\u04fe", "\u04fc", "\u04fd"],
+ y: ["\u00a5", "\u04b0", "\u04cb"],
+ z: ["\u01b5", "\u0240"]
+ }
+ text.forEach(function(c){
+ c = c.toLowerCase();
+ var chars = trap[c] || [" "];
+ var rand = Math.floor(Math.random() * chars.length);
+ if (typeof trap[c] !== "undefined") {
+ result += trap[c][rand];
+ } else {
+ result += c;
+ }
+ });
+ return result;
+
+}
diff --git a/node_modules/colors/lib/custom/zalgo.js b/node_modules/colors/lib/custom/zalgo.js
new file mode 100644
index 0000000..4dc20c8
--- /dev/null
+++ b/node_modules/colors/lib/custom/zalgo.js
@@ -0,0 +1,104 @@
+// please no
+module['exports'] = function zalgo(text, options) {
+ text = text || " he is here ";
+ var soul = {
+ "up" : [
+ '̍', '̎', '̄', '̅',
+ '̿', '̑', '̆', '̐',
+ '͒', '͗', '͑', '̇',
+ '̈', '̊', '͂', '̓',
+ '̈', '͊', '͋', '͌',
+ '̃', '̂', '̌', '͐',
+ '̀', '́', '̋', '̏',
+ '̒', '̓', '̔', '̽',
+ '̉', 'ͣ', 'ͤ', 'ͥ',
+ 'ͦ', 'ͧ', 'ͨ', 'ͩ',
+ 'ͪ', 'ͫ', 'ͬ', 'ͭ',
+ 'ͮ', 'ͯ', '̾', '͛',
+ '͆', '̚'
+ ],
+ "down" : [
+ '̖', '̗', '̘', '̙',
+ '̜', '̝', '̞', '̟',
+ '̠', '̤', '̥', '̦',
+ '̩', '̪', '̫', '̬',
+ '̭', '̮', '̯', '̰',
+ '̱', '̲', '̳', '̹',
+ '̺', '̻', '̼', 'ͅ',
+ '͇', '͈', '͉', '͍',
+ '͎', '͓', '͔', '͕',
+ '͖', '͙', '͚', '̣'
+ ],
+ "mid" : [
+ '̕', '̛', '̀', '́',
+ '͘', '̡', '̢', '̧',
+ '̨', '̴', '̵', '̶',
+ '͜', '͝', '͞',
+ '͟', '͠', '͢', '̸',
+ '̷', '͡', ' ҉'
+ ]
+ },
+ all = [].concat(soul.up, soul.down, soul.mid),
+ zalgo = {};
+
+ function randomNumber(range) {
+ var r = Math.floor(Math.random() * range);
+ return r;
+ }
+
+ function is_char(character) {
+ var bool = false;
+ all.filter(function (i) {
+ bool = (i === character);
+ });
+ return bool;
+ }
+
+
+ function heComes(text, options) {
+ var result = '', counts, l;
+ options = options || {};
+ options["up"] = options["up"] || true;
+ options["mid"] = options["mid"] || true;
+ options["down"] = options["down"] || true;
+ options["size"] = options["size"] || "maxi";
+ text = text.split('');
+ for (l in text) {
+ if (is_char(l)) {
+ continue;
+ }
+ result = result + text[l];
+ counts = {"up" : 0, "down" : 0, "mid" : 0};
+ switch (options.size) {
+ case 'mini':
+ counts.up = randomNumber(8);
+ counts.min = randomNumber(2);
+ counts.down = randomNumber(8);
+ break;
+ case 'maxi':
+ counts.up = randomNumber(16) + 3;
+ counts.min = randomNumber(4) + 1;
+ counts.down = randomNumber(64) + 3;
+ break;
+ default:
+ counts.up = randomNumber(8) + 1;
+ counts.mid = randomNumber(6) / 2;
+ counts.down = randomNumber(8) + 1;
+ break;
+ }
+
+ var arr = ["up", "mid", "down"];
+ for (var d in arr) {
+ var index = arr[d];
+ for (var i = 0 ; i <= counts[index]; i++) {
+ if (options[index]) {
+ result = result + soul[index][randomNumber(soul[index].length)];
+ }
+ }
+ }
+ }
+ return result;
+ }
+ // don't summon him
+ return heComes(text);
+}
diff --git a/node_modules/colors/lib/extendStringPrototype.js b/node_modules/colors/lib/extendStringPrototype.js
new file mode 100644
index 0000000..b6b5b03
--- /dev/null
+++ b/node_modules/colors/lib/extendStringPrototype.js
@@ -0,0 +1,118 @@
+var colors = require('./colors'),
+ styles = require('./styles');
+
+module['exports'] = function () {
+
+ //
+ // Extends prototype of native string object to allow for "foo".red syntax
+ //
+ var addProperty = function (color, func) {
+ String.prototype.__defineGetter__(color, func);
+ };
+
+ var sequencer = function sequencer (map, str) {
+ return function () {
+ var exploded = this.split(""), i = 0;
+ exploded = exploded.map(map);
+ return exploded.join("");
+ }
+ };
+
+ var stylize = function stylize (str, style) {
+ return styles[style].open + str + styles[style].close;
+ }
+
+ addProperty('strip', function () {
+ return colors.strip(this);
+ });
+
+ addProperty('stripColors', function () {
+ return colors.strip(this);
+ });
+
+ addProperty("trap", function(){
+ return colors.trap(this);
+ });
+
+ addProperty("zalgo", function(){
+ return colors.zalgo(this);
+ });
+
+ addProperty("zebra", function(){
+ return colors.zebra(this);
+ });
+
+ addProperty("rainbow", function(){
+ return colors.rainbow(this);
+ });
+
+ addProperty("random", function(){
+ return colors.random(this);
+ });
+
+ addProperty("america", function(){
+ return colors.america(this);
+ });
+
+ //
+ // Iterate through all default styles and colors
+ //
+ var x = Object.keys(colors.styles);
+ x.forEach(function (style) {
+ addProperty(style, function () {
+ return stylize(this, style);
+ });
+ });
+
+ function applyTheme(theme) {
+ //
+ // Remark: This is a list of methods that exist
+ // on String that you should not overwrite.
+ //
+ var stringPrototypeBlacklist = [
+ '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
+ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
+ 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
+ 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
+ ];
+
+ Object.keys(theme).forEach(function (prop) {
+ if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
+ console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
+ }
+ else {
+ if (typeof(theme[prop]) === 'string') {
+ colors[prop] = colors[theme[prop]];
+ addProperty(prop, function () {
+ return colors[theme[prop]](this);
+ });
+ }
+ else {
+ addProperty(prop, function () {
+ var ret = this;
+ for (var t = 0; t < theme[prop].length; t++) {
+ ret = exports[theme[prop][t]](ret);
+ }
+ return ret;
+ });
+ }
+ }
+ });
+ }
+
+ colors.setTheme = function (theme) {
+ if (typeof theme === 'string') {
+ try {
+ colors.themes[theme] = require(theme);
+ applyTheme(colors.themes[theme]);
+ return colors.themes[theme];
+ } catch (err) {
+ console.log(err);
+ return err;
+ }
+ } else {
+ applyTheme(theme);
+ }
+ };
+
+};
\ No newline at end of file
diff --git a/node_modules/colors/lib/index.js b/node_modules/colors/lib/index.js
new file mode 100644
index 0000000..96d2b84
--- /dev/null
+++ b/node_modules/colors/lib/index.js
@@ -0,0 +1,12 @@
+var colors = require('./colors');
+module['exports'] = colors;
+
+// Remark: By default, colors will add style properties to String.prototype
+//
+// If you don't wish to extend String.prototype you can do this instead and native String will not be touched
+//
+// var colors = require('colors/safe);
+// colors.red("foo")
+//
+//
+var extendStringPrototype = require('./extendStringPrototype')();
\ No newline at end of file
diff --git a/node_modules/colors/lib/maps/america.js b/node_modules/colors/lib/maps/america.js
new file mode 100644
index 0000000..a07d832
--- /dev/null
+++ b/node_modules/colors/lib/maps/america.js
@@ -0,0 +1,12 @@
+var colors = require('../colors');
+
+module['exports'] = (function() {
+ return function (letter, i, exploded) {
+ if(letter === " ") return letter;
+ switch(i%3) {
+ case 0: return colors.red(letter);
+ case 1: return colors.white(letter)
+ case 2: return colors.blue(letter)
+ }
+ }
+})();
\ No newline at end of file
diff --git a/node_modules/colors/lib/maps/rainbow.js b/node_modules/colors/lib/maps/rainbow.js
new file mode 100644
index 0000000..a7ce24e
--- /dev/null
+++ b/node_modules/colors/lib/maps/rainbow.js
@@ -0,0 +1,13 @@
+var colors = require('../colors');
+
+module['exports'] = (function () {
+ var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
+ return function (letter, i, exploded) {
+ if (letter === " ") {
+ return letter;
+ } else {
+ return colors[rainbowColors[i++ % rainbowColors.length]](letter);
+ }
+ };
+})();
+
diff --git a/node_modules/colors/lib/maps/random.js b/node_modules/colors/lib/maps/random.js
new file mode 100644
index 0000000..5cd101f
--- /dev/null
+++ b/node_modules/colors/lib/maps/random.js
@@ -0,0 +1,8 @@
+var colors = require('../colors');
+
+module['exports'] = (function () {
+ var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
+ return function(letter, i, exploded) {
+ return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter);
+ };
+})();
\ No newline at end of file
diff --git a/node_modules/colors/lib/maps/zebra.js b/node_modules/colors/lib/maps/zebra.js
new file mode 100644
index 0000000..bf7dcde
--- /dev/null
+++ b/node_modules/colors/lib/maps/zebra.js
@@ -0,0 +1,5 @@
+var colors = require('../colors');
+
+module['exports'] = function (letter, i, exploded) {
+ return i % 2 === 0 ? letter : colors.inverse(letter);
+};
\ No newline at end of file
diff --git a/node_modules/colors/lib/styles.js b/node_modules/colors/lib/styles.js
new file mode 100644
index 0000000..067d590
--- /dev/null
+++ b/node_modules/colors/lib/styles.js
@@ -0,0 +1,77 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+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.
+
+*/
+
+var styles = {};
+module['exports'] = styles;
+
+var codes = {
+ reset: [0, 0],
+
+ bold: [1, 22],
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29],
+
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+ gray: [90, 39],
+ grey: [90, 39],
+
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49],
+
+ // legacy styles for colors pre v1.0.0
+ blackBG: [40, 49],
+ redBG: [41, 49],
+ greenBG: [42, 49],
+ yellowBG: [43, 49],
+ blueBG: [44, 49],
+ magentaBG: [45, 49],
+ cyanBG: [46, 49],
+ whiteBG: [47, 49]
+
+};
+
+Object.keys(codes).forEach(function (key) {
+ var val = codes[key];
+ var style = styles[key] = [];
+ style.open = '\u001b[' + val[0] + 'm';
+ style.close = '\u001b[' + val[1] + 'm';
+});
\ No newline at end of file
diff --git a/node_modules/colors/lib/system/supports-colors.js b/node_modules/colors/lib/system/supports-colors.js
new file mode 100644
index 0000000..3e008aa
--- /dev/null
+++ b/node_modules/colors/lib/system/supports-colors.js
@@ -0,0 +1,61 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+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.
+
+*/
+
+var argv = process.argv;
+
+module.exports = (function () {
+ if (argv.indexOf('--no-color') !== -1 ||
+ argv.indexOf('--color=false') !== -1) {
+ return false;
+ }
+
+ if (argv.indexOf('--color') !== -1 ||
+ argv.indexOf('--color=true') !== -1 ||
+ argv.indexOf('--color=always') !== -1) {
+ return true;
+ }
+
+ if (process.stdout && !process.stdout.isTTY) {
+ return false;
+ }
+
+ if (process.platform === 'win32') {
+ return true;
+ }
+
+ if ('COLORTERM' in process.env) {
+ return true;
+ }
+
+ if (process.env.TERM === 'dumb') {
+ return false;
+ }
+
+ if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
+ return true;
+ }
+
+ return false;
+})();
\ No newline at end of file
diff --git a/node_modules/colors/package.json b/node_modules/colors/package.json
index 03cd915..f38ef09 100644
--- a/node_modules/colors/package.json
+++ b/node_modules/colors/package.json
@@ -1,12 +1,14 @@
{
"name": "colors",
- "description": "get colors in your node.js console like what",
- "version": "0.6.2",
+ "description": "get colors in your node.js console",
+ "version": "1.0.3",
"author": {
"name": "Marak Squires"
},
"homepage": "https://github.com/Marak/colors.js",
- "bugs": "https://github.com/Marak/colors.js/issues",
+ "bugs": {
+ "url": "https://github.com/Marak/colors.js/issues"
+ },
"keywords": [
"ansi",
"terminal",
@@ -16,12 +18,35 @@
"type": "git",
"url": "http://github.com/Marak/colors.js.git"
},
+ "license": "MIT",
+ "scripts": {
+ "test": "node tests/basic-test.js && node tests/safe-test.js"
+ },
"engines": {
"node": ">=0.1.90"
},
- "main": "colors",
- "readme": "# colors.js - get color and style in your node.js console ( and browser ) like what\n\n
\n\n\n## Installation\n\n npm install colors\n\n## colors and styles!\n\n- bold\n- italic\n- underline\n- inverse\n- yellow\n- cyan\n- white\n- magenta\n- green\n- red\n- grey\n- blue\n- rainbow\n- zebra\n- random\n\n## Usage\n\n``` js\nvar colors = require('./colors');\n\nconsole.log('hello'.green); // outputs green text\nconsole.log('i like cake and pies'.underline.red) // outputs red underlined text\nconsole.log('inverse the color'.inverse); // inverses the color\nconsole.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)\n```\n\n# Creating Custom themes\n\n```js\n\nvar colors = require('colors');\n\ncolors.setTheme({\n silly: 'rainbow',\n input: 'grey',\n verbose: 'cyan',\n prompt: 'grey',\n info: 'green',\n data: 'grey',\n help: 'cyan',\n warn: 'yellow',\n debug: 'blue',\n error: 'red'\n});\n\n// outputs red text\nconsole.log(\"this is an error\".error);\n\n// outputs yellow text\nconsole.log(\"this is a warning\".warn);\n```\n\n\n### Contributors \n\nMarak (Marak Squires)\nAlexis Sellier (cloudhead)\nmmalecki (Maciej Małecki)\nnicoreed (Nico Reed)\nmorganrallen (Morgan Allen)\nJustinCampbell (Justin Campbell)\nded (Dustin Diaz)\n\n\n#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)\n",
- "readmeFilename": "ReadMe.md",
- "_id": "colors@0.6.2",
- "_from": "colors@"
+ "main": "./lib/index",
+ "gitHead": "e9e6557cc0fa26dba1a20b0d45e92de982f4047c",
+ "_id": "colors@1.0.3",
+ "_shasum": "0433f44d809680fdeb60ed260f1b0c262e82a40b",
+ "_from": "colors@1.0.3",
+ "_npmVersion": "2.0.2",
+ "_nodeVersion": "0.11.13",
+ "_npmUser": {
+ "name": "marak",
+ "email": "marak.squires@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "marak",
+ "email": "marak.squires@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "0433f44d809680fdeb60ed260f1b0c262e82a40b",
+ "tarball": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/node_modules/colors/safe.js b/node_modules/colors/safe.js
new file mode 100644
index 0000000..a6a1f3a
--- /dev/null
+++ b/node_modules/colors/safe.js
@@ -0,0 +1,9 @@
+//
+// Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype
+//
+// var colors = require('colors/safe);
+// colors.red("foo")
+//
+//
+var colors = require('./lib/colors');
+module['exports'] = colors;
\ No newline at end of file
diff --git a/node_modules/colors/screenshots/colors.png b/node_modules/colors/screenshots/colors.png
new file mode 100644
index 0000000000000000000000000000000000000000..7200a623590c35e8b4a8e74a8df49a42998ca9c5
GIT binary patch
literal 79787
zcmZ^~V{~RgurB<@wrx#p+nFS9oJ?%nwylXKnAo;$+qP|ebMT#e*1GHNU)@#pRPCx>
ztM}^aXGbW=OCrGH!U6yQ1ZgQTB>(`F0{{Rih6ep7p@odZ0RXV6EJQ^Wq(w!E6&&qM
zEv!ud01cQ*4>!J)?eFi_D~s#S=PfV0x@T*L_4^^4WJQ?}Y8aec5fqtzXle7m#uVf*
zh2b(JIJf+6`=4LlgxlNC-P@1u8_SO!y2l>6$1b|Z+Q%JJ=aBy8*~lm;k%j=`Xlyyh
z4HNR6t6D99APkc~7%>3C99lpTCG_cOY3IA6D^7^ABYQm2ice5@O$K1VQy>6b575#J|Ra2{p#(02es-8l?%)x6@hW+*8TF^>Ju^g+wH64eIt*Cv1bgCV?ARB-QR9Ga
zz3{pqc7=Qg=Xkqfiwuxr%!0X9D
zl>p0sZLYApo!Zm;7+wNss6WNo<_j(ji^K?i-|+<{O8edB@N9iAyliu%2e{3Ef%xIT
zvculPYWbaiuN!63Oo5xlvi3{o&Cj@;FgQcCL2X8Mfq~CF&&r+XKJc@A87*(CK`V$n
z!LIfz_P~11A`N_al6~1+cXy!QBkjjQ^3d?8?m%0i2t(7sy%j?&>#0F~GSV~0?;>cy
zhiaGm4eiJ2U^AcSs79kmV7=kIVfTmbg4SVUoH&R^3*dvPQh&Okf46hi^?au`8~Hs_
zfOmv_LPtIEVj~=*G9ku=lR-d$OTc0GEzSWYdIC?#sL1{n{4D_;v0_XI>#5tXX2&o%
z|5nHJ#RF7&axL3@|9;&8F-L~H)h5bK*h{7LG#l7qdq%@Q06wm;<@k=myX*!D05Gz94d-fcKI$K(qEm+>qskv*iVw6MKf!7{+js5{6@;`XeV`
zlcR8l8WXRMcod+QirA7&N!(#-4diR64Km~4Nnu9K59t_FaL6;efG;7^^J*#
zAS;YPbU9CJN839#TZA!hnVAcoRRTZ;Cpm||A9&j|$^_M7dJjnN{-!op(E9Kqae
zUSi&KPHk4;Z&tyl@USeEq?z#X&r~sWv1KVvvFG&cMBU`Acwa#uJ|99K0w2LoQZR}j
z>>y^afL$h06j9cG>i!>Otofw*1V-5VG((m{ghSkvd`Z|zG)au}4n>YdP_lOEvlD$2
zLlXiM!)c7Hf`-{9y|v->8a3ec#x>ezr$)aFO$=2HTuk^!GzUE6Tp|%BDThpZF~?j(
zFFDqs*CBZs+ezAq-ld;3pGcnA5p5B{5CvnMWAX4Axj48Wxa7D+xuzYrcD*M<|l(BsH}pg?XQQ!P;aP+=&EE@dfSD=8{-E&EbYRwpZ6ESoHkD)B1CDvz_Q
zF<-IDoI6<>u*9{Xv}m%dvMRL@x7u8K%cCzR$kVChFD9$nFLwHMTv-**Al$6tCIb|j
z{&}6amE84LK)74hZ%AmRXZdg6PEc-vLCr3E|Fi_G1bIGWKD!b9zUa^;rFoJL<2uw4c+JdPBm`Sj_%hbCut`uhXWS}
zrz)2Zo2w(Q(f71iFsaz7^6H+;omHw;R<@M3tG3ElcUNH>IiB_&;2vz3L)WgGI<;Od
zai`f%UZ&4wS8}VobwKa!ULXGV)~B$m?qlg|>6?oCKF?MURWBQq3uu#IRXezA!)pp6
zqa5!X2tBZE?QIW1oo?%Hq_4KG)h{QIHV|%*`+&CqkANuQA>reoF33Mndhoh%wQ!~I
zt1vEbohTA0M;J@8#-yRhM4|T~MDRq>@v%}7X^{(&d|0hwb)>3dB#Q5O8F|0-23WS@^JkG7`)e-kAMs_N^^s8B1VskXQX+<
zQ$wwKWAkqMS$(KLW7m-H<5v;LWI&2=R&Nu@XKw5<
z+V#rD_)Mzau+cE59zlAKd_lLVdlu&?>#rw?yU7@u#!|0&%K1)KdDiN!w+D(pU(CNB#Ce;la~hm*4NK)m%9Qel+4{t~z>LnO&qBtc&E&~s8S0)Bvzl(WLZU*_ddOPxGW0Ts
z7oHoD8-X{jwZqltxM`>BqP8>4k#S#O=o3C0UKbvm(hiddQIAlN#4iF6B2-EIXXhk7
zaVE@wsQ;8qg;YnXR*`#_)6mn<4AFY1c3_-5jlz>Kk~cHS`Ez7H-!9P)-;9ssw_);G
zf&`BTPbX#m^Fp(1HtW)_u<0c;#-qrb`-$;UKb0C+-MW!{uF8X{kky~Eg>NP#hsBI~
zt#fM3ny;0SO`2sxADTUn3u|R~Ks(>oN!?<->+Sei4X@&Ai`tOAD*f^y{&kM!_t;Ag
z0?aH*BzVFzzB%`b4T^30&HnZJN8^Ljn5|?pueXCY*SB}bDWo?f8h)th;V?YCgJ`kn
zwHTTXWA9czfx9x3y}9$`(HhPv<+b@h)|d3bX0YosGq^1(-xbbc)@lCkF9+jX+uMoa
z_-Ru;@a_vb8$UF?Ck^gqp4y@ZGBY1DR#PjF_ns+4d_Ow<5av88YEY-}AC9QM#9H%1
zXWsQcoI%e0jfOh=xAR*>eu@2-)RDdScMZ}FBZ;^rVa*WFVGpQG`9z?C!`k@mq2xjP
z+V)}wE&$hsg^Srm+Bz$IMHU^t{vGC1KQn}Vc4w{;usj&
z_#^dvK@tpk>3y&P6O&*Y`{UfQ8^X0@{7{q+yyYSpx8J$yUp#*<&1E=G=
zvO6s}NI0`;J51ITDeal=6IYtN2jgF=9?yrZuwyc#<)9I?!6FmbxxV7`t@)!#
z3?OQV94cRaL_&^XsnD{~HPkszJ>0@mMBB*PX)skNS*u-u;KO7}Yr|~Z^4)eYdmDUg
zfg%R3iSUVRhwzFcMvX*
z)E?(TaLqIOd+zre*JbbM)B_ZbPH}b?;b<@f{0`UMxBaz{KeEkiwq8qx3(FkQY_^;c
zoV-o=U0RzwYoV>x8}cV3XV!i-FX4x^rpsMd{rrRWl6V)NOJ=KnCdi!VZy$$n?Fn1V
z@2S;PFI4BnL=%ZeP=bOwv%j_}$?xWss#~@n*^`tk+1eyy{J%MKiZi@`CE3$yhOAeh4%1BH<{s?s=}z|A@=ACs2@4I^fjNQYh-r#S7|5Gaj-9%K
z*J6f3u}HC8Xe$jh9zNFbyOZvik&(VT&t8vNc~tqAc!T8az{W?x_y}2*%X^v{ftw4dPE(>3qFWLYl;jP|d(a`>raLipAlxMQ#
z{Dpj^fen6t0dpdC-0qYU`x7d~bM0RZ+d9<<
z)~_6|R^YKPZ!qa_Kcf_)CL)`{3nO@?YNVs3F{Kg;E=>+ha7@$>hYoqs%P^*C2>vbL
zOG#VFuM#|SbMqgTqn1BUrOsr|q|e9kN^s9`({Xq+E;td`f3EyC&^1;xTD5$f@SHm;
zCm70}7ap4J8C~R_pcrgixXga1jhp1>^Ll)Ky#hX4-)i2a+}u9VKj9(iBRRv3ArT@S
z!rfD