conventional-changelog 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ <a name"0.0.17"></a>
2
+ ### 0.0.17 (2015-04-03)
3
+
4
+
5
+ #### Bump deps
6
+
7
+
1
8
  <a name"0.0.16"></a>
2
9
  ### 0.0.16 (2015-03-19)
3
10
 
package/README.md CHANGED
@@ -1,22 +1,26 @@
1
- conventional-changelog
2
- ----------------------
1
+ # [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coverall-image]][coverall-url]
2
+
3
+ > Generate a changelog from git metadata, using the AngularJS commit conventions
4
+
5
+
6
+ ## Install
3
7
 
4
8
  ```sh
5
9
  $ npm install conventional-changelog
6
10
  ```
7
11
 
8
- Generate a changelog from git metadata, using the AngularJS commit conventions.
9
-
10
12
  - [Synopsis of Conventions in CONVENTIONS.md](https://github.com/ajoslin/conventional-changelog/blob/master/CONVENTIONS.md)
11
13
  - [Full Convention Spec on Google Docs](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/)
12
14
 
13
15
  Adapted from code originally written by @vojtajina and @btford in [grunt-conventional-changelog](https://github.com/btford/grunt-conventional-changelog).
14
16
 
17
+
15
18
  ## Example output
16
19
 
17
20
  - https://github.com/ajoslin/conventional-changelog/blob/master/CHANGELOG.md
18
21
  - https://github.com/karma-runner/karma/blob/master/CHANGELOG.md
19
22
 
23
+
20
24
  ## Roadmap
21
25
 
22
26
  - Make it return a stream
@@ -24,6 +28,7 @@ Adapted from code originally written by @vojtajina and @btford in [grunt-convent
24
28
  - Add configurable subjects & sections
25
29
  - Split up this repo into smaller modules [#22](https://github.com/ajoslin/conventional-changelog/issues/22)
26
30
 
31
+
27
32
  ## Documentation
28
33
 
29
34
  Simple usage:
@@ -75,6 +80,17 @@ By default, calls the callback with a string containing a changelog from the pre
75
80
 
76
81
  * `warn` `{function()}` - What warn function to use. For example, `{warn: grunt.log.writeln}`. By default, uses `console.warn`.
77
82
 
83
+
78
84
  ## License
79
85
 
80
86
  BSD
87
+
88
+
89
+ [npm-image]: https://badge.fury.io/js/conventional-changelog.svg
90
+ [npm-url]: https://npmjs.org/package/conventional-changelog
91
+ [travis-image]: https://travis-ci.org/ajoslin/conventional-changelog.svg?branch=master
92
+ [travis-url]: https://travis-ci.org/ajoslin/conventional-changelog
93
+ [daviddm-image]: https://david-dm.org/ajoslin/conventional-changelog.svg?theme=shields.io
94
+ [daviddm-url]: https://david-dm.org/ajoslin/conventional-changelog
95
+ [coverall-image]: https://coveralls.io/repos/ajoslin/conventional-changelog/badge.svg
96
+ [coverall-url]: https://coveralls.io/r/ajoslin/conventional-changelog
package/index.js CHANGED
@@ -1,7 +1,8 @@
1
+ 'use strict';
1
2
  var fs = require('fs');
2
3
  var git = require('./lib/git');
3
4
  var writeLog = require('./lib/writeLog');
4
- var extend = require('lodash.assign');
5
+ var extend = require('lodash').assign;
5
6
 
6
7
  function generate(options, done) {
7
8
  function getChangelogCommits() {
package/lib/Writer.js CHANGED
@@ -1,17 +1,18 @@
1
+ 'use strict';
1
2
  var dateFormat = require('dateformat');
2
- var extend = require('lodash.assign');
3
+ var extend = require('lodash').assign;
3
4
  var fs = require('fs');
4
5
  var normalizeData = require('normalize-package-data');
5
6
  var parseGithubUrl = require('github-url-from-git');
6
- var partial = require('lodash.partial');
7
- var template = require('lodash.template');
7
+ var partial = require('lodash').partial;
8
+ var template = require('lodash').template;
8
9
  var url = require('url');
9
10
 
10
11
  /*
11
12
  * NOTE:
12
- * We use lodash.template a lot in the not-the-most-efficient manner, for the sake
13
+ * We use lodash.template a lot in the not-the-most-efficient manner, for the sake
13
14
  * of clarity.
14
- * The difference between compiling a template once and in a function is neglible
15
+ * The difference between compiling a template once and in a function is negligible
15
16
  * for our library.
16
17
  */
17
18
 
@@ -49,8 +50,8 @@ var issueTemplate = function(repository, issue) {
49
50
  template('[#<%= issue %>](<%= repository %>/issues/<%= issue %>)') :
50
51
  template('#<%= issue %>');
51
52
  return templateFn({
52
- repository: repository,
53
- issue: issue
53
+ repository: repository,
54
+ issue: issue
54
55
  });
55
56
  };
56
57
  var commitTemplate = function(repository, commit) {
@@ -58,7 +59,7 @@ var commitTemplate = function(repository, commit) {
58
59
  template('[<%= commit %>](<%= repository %>/commit/<%= commit %>)') :
59
60
  template('<%= commit %>');
60
61
  return templateFn({
61
- repository: repository,
62
+ repository: repository,
62
63
  commit: commit.substring(0,8) // no need to show super long hash in log
63
64
  });
64
65
  };
@@ -84,7 +85,7 @@ function getPackageRepository(pkgData) {
84
85
  }
85
86
 
86
87
  return url.indexOf('github') > -1 ?
87
- parseGithubUrl(url) :
88
+ parseGithubUrl(url) :
88
89
  parseNonGithubUrl(url);
89
90
  }
90
91
 
package/lib/git.js CHANGED
@@ -1,7 +1,8 @@
1
- var extend = require('lodash.assign');
1
+ 'use strict';
2
+ var extend = require('lodash').assign;
2
3
  var cp = require('child_process');
3
4
  var es = require('event-stream');
4
- var template = require('lodash.template');
5
+ var template = require('lodash').template;
5
6
 
6
7
  var COMMIT_PATTERN = /^(\w*)(\(([\w\$\.\-\* ]*)\))?\: (.*)$/;
7
8
  var MAX_SUBJECT_LENGTH = 80;
package/lib/writeLog.js CHANGED
@@ -1,3 +1,4 @@
1
+ 'use strict';
1
2
  var es = require('event-stream');
2
3
  var Writer = require('./Writer');
3
4
 
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "conventional-changelog",
3
- "version": "0.0.16",
4
- "description": "Generate a markdown changelog from git commit metadata",
3
+ "version": "0.0.17",
4
+ "description": "Generate a changelog from git metadata, using the AngularJS commit conventions",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
+ "coverage": "istanbul cover _mocha -- -R spec && rm -rf ./coverage",
7
8
  "lint": "jshint lib test index.js --exclude node_modules",
8
- "test": "npm run-script lint && mocha test/*.js index.js lib/*.js --no-colors"
9
+ "test": "npm run-script lint && mocha --no-colors"
9
10
  },
10
11
  "files": [
11
12
  "index.js",
@@ -33,18 +34,16 @@
33
34
  ],
34
35
  "dependencies": {
35
36
  "dateformat": "^1.0.11",
36
- "event-stream": "^3.1.7",
37
+ "event-stream": "^3.3.0",
37
38
  "github-url-from-git": "^1.4.0",
38
- "lodash.assign": "^2.4.1",
39
- "lodash.partial": "^3.0.0",
40
- "lodash.template": "^3.3.0",
39
+ "lodash": "^3.6.0",
41
40
  "normalize-package-data": "^1.0.3"
42
41
  },
43
42
  "devDependencies": {
44
- "chai": "^2.0.0",
45
- "jshint": "^2.6.0",
46
- "mocha": "*",
47
- "shelljs": "^0.3.0",
48
- "sinon": "^1.12.2"
43
+ "chai": "^2.2.0",
44
+ "coveralls": "^2.11.2",
45
+ "istanbul": "^0.3.13",
46
+ "jshint": "^2.6.3",
47
+ "mocha": "*"
49
48
  }
50
49
  }
@@ -1,4 +1,6 @@
1
- var changelog = require('../index');
1
+ 'use strict';
2
+ var changelog = require('../');
3
+ var expect = require('chai').expect;
2
4
 
3
5
  describe('changelog', function() {
4
6
  it('should generate a changelog', function(done) {
package/test/git.spec.js CHANGED
@@ -1,3 +1,5 @@
1
+ 'use strict';
2
+ var expect = require('chai').expect;
1
3
  var git = require('../lib/git');
2
4
 
3
5
  describe('git', function() {
@@ -1,3 +1,5 @@
1
+ 'use strict';
2
+ var expect = require('chai').expect;
1
3
  var writeLog = require('../lib/writeLog');
2
4
 
3
5
  describe('writeLog', function() {
@@ -1,3 +1,5 @@
1
+ 'use strict';
2
+ var expect = require('chai').expect;
1
3
  var dateFormat = require('dateformat');
2
4
  var es = require('event-stream');
3
5
  var Writer = require('../lib/Writer');
@@ -21,7 +23,7 @@ describe('Writer', function() {
21
23
 
22
24
  if (mode === 'repo') {
23
25
  return new Writer(stream, {
24
- repository: 'github.com/user/repo',
26
+ repository: 'github.com/user/repo'
25
27
  });
26
28
  } else if (mode === 'package.json') {
27
29
  return new Writer(stream, {});
package/test/_globals.js DELETED
@@ -1,14 +0,0 @@
1
- var sinon = require('sinon');
2
- var chai = require('chai');
3
-
4
- global.expect = chai.expect;
5
-
6
- global.sinon = null;
7
-
8
- beforeEach(function() {
9
- global.sinon = sinon.sandbox.create();
10
- });
11
-
12
- afterEach(function() {
13
- global.sinon.restore();
14
- });