commitizen 2.4.0 → 2.4.4

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.
Files changed (29) hide show
  1. package/README.md +4 -1
  2. package/coverage/coverage.json +1 -1
  3. package/coverage/lcov-report/index.html +18 -18
  4. package/coverage/lcov-report/src/commitizen/adapter.js.html +65 -8
  5. package/coverage/lcov-report/src/commitizen/commit.js.html +1 -1
  6. package/coverage/lcov-report/src/commitizen/configLoader.js.html +1 -1
  7. package/coverage/lcov-report/src/commitizen/index.html +11 -11
  8. package/coverage/lcov-report/src/commitizen/init.js.html +1 -1
  9. package/coverage/lcov-report/src/commitizen/staging.js.html +1 -1
  10. package/coverage/lcov-report/src/commitizen.js.html +1 -1
  11. package/coverage/lcov-report/src/common/index.html +1 -1
  12. package/coverage/lcov-report/src/common/util.js.html +1 -1
  13. package/coverage/lcov-report/src/configLoader/findup.js.html +1 -1
  14. package/coverage/lcov-report/src/configLoader/getContent.js.html +1 -1
  15. package/coverage/lcov-report/src/configLoader/getNormalizedConfig.js.html +14 -11
  16. package/coverage/lcov-report/src/configLoader/index.html +11 -11
  17. package/coverage/lcov-report/src/configLoader/loader.js.html +1 -1
  18. package/coverage/lcov-report/src/configLoader.js.html +1 -1
  19. package/coverage/lcov-report/src/git/add.js.html +1 -1
  20. package/coverage/lcov-report/src/git/commit.js.html +1 -1
  21. package/coverage/lcov-report/src/git/index.html +1 -1
  22. package/coverage/lcov-report/src/git/init.js.html +1 -1
  23. package/coverage/lcov-report/src/git/log.js.html +1 -1
  24. package/coverage/lcov-report/src/git.js.html +1 -1
  25. package/coverage/lcov-report/src/index.html +1 -1
  26. package/coverage/lcov.info +115 -102
  27. package/dist/commitizen/adapter.js +20 -1
  28. package/dist/configLoader/getNormalizedConfig.js +4 -3
  29. package/package.json +6 -7
@@ -84,7 +84,7 @@
84
84
  </div>
85
85
  </div>
86
86
  <div class="footer">
87
- <div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sun Nov 01 2015 06:05:28 GMT+0000 (UTC)</div>
87
+ <div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Nov 09 2015 12:35:36 GMT+0000 (UTC)</div>
88
88
  </div>
89
89
  <script src="../prettify.js"></script>
90
90
  <script>
@@ -47,19 +47,19 @@ FN:8,(anonymous_1)
47
47
  FN:8,sliceIterator
48
48
  FN:8,(anonymous_3)
49
49
  FN:12,_interopRequireDefault
50
- FN:49,addPathToAdapterConfig
51
- FN:57,generateNpmInstallAdapterCommand
52
- FN:99,getNearestNodeModulesDirectory
53
- FN:115,getNearestProjectRootDirectory
54
- FN:122,getNpmInstallStringMappings
55
- FN:129,getPrompter
56
- FN:147,resolveAdapterPath
50
+ FN:53,addPathToAdapterConfig
51
+ FN:76,generateNpmInstallAdapterCommand
52
+ FN:118,getNearestNodeModulesDirectory
53
+ FN:134,getNearestProjectRootDirectory
54
+ FN:141,getNpmInstallStringMappings
55
+ FN:148,getPrompter
56
+ FN:166,resolveAdapterPath
57
57
  FNF:11
58
58
  FNH:11
59
59
  FNDA:1,(anonymous_1)
60
60
  FNDA:0,sliceIterator
61
61
  FNDA:48,(anonymous_3)
62
- FNDA:3,_interopRequireDefault
62
+ FNDA:4,_interopRequireDefault
63
63
  FNDA:11,addPathToAdapterConfig
64
64
  FNDA:12,generateNpmInstallAdapterCommand
65
65
  FNDA:11,getNearestNodeModulesDirectory
@@ -69,7 +69,7 @@ FNDA:3,getPrompter
69
69
  FNDA:6,resolveAdapterPath
70
70
  DA:3,1
71
71
  DA:8,48
72
- DA:12,3
72
+ DA:12,4
73
73
  DA:14,1
74
74
  DA:16,1
75
75
  DA:18,1
@@ -78,61 +78,69 @@ DA:22,1
78
78
  DA:24,1
79
79
  DA:26,1
80
80
  DA:28,1
81
- DA:29,1
82
81
  DA:30,1
83
- DA:31,1
84
82
  DA:32,1
85
83
  DA:33,1
86
84
  DA:34,1
87
- DA:49,1
88
- DA:50,11
89
- DA:51,11
90
- DA:57,1
91
- DA:60,12
92
- DA:63,12
93
- DA:64,12
94
- DA:65,12
95
- DA:67,12
96
- DA:68,12
97
- DA:69,48
98
- DA:71,48
99
- DA:72,48
100
- DA:74,48
101
- DA:75,14
102
- DA:79,0
103
- DA:80,0
85
+ DA:35,1
86
+ DA:36,1
87
+ DA:37,1
88
+ DA:38,1
89
+ DA:53,1
90
+ DA:55,11
91
+ DA:63,11
92
+ DA:64,11
93
+ DA:65,11
94
+ DA:66,11
95
+ DA:67,11
96
+ DA:68,11
97
+ DA:70,11
98
+ DA:76,1
99
+ DA:79,12
104
100
  DA:82,12
105
101
  DA:83,12
106
- DA:84,0
102
+ DA:84,12
103
+ DA:86,12
107
104
  DA:87,12
108
- DA:88,0
109
- DA:93,12
110
- DA:99,1
111
- DA:102,11
112
- DA:105,11
113
- DA:106,11
114
- DA:108,0
115
- DA:115,1
116
- DA:116,11
117
- DA:122,1
118
- DA:123,12
119
- DA:129,1
120
- DA:131,3
121
- DA:134,2
122
- DA:136,2
123
- DA:137,2
124
- DA:139,0
125
- DA:147,1
126
- DA:148,6
127
- DA:151,6
128
- DA:154,6
129
- DA:157,3
130
- DA:158,3
131
- DA:161,1
132
- DA:163,4
133
- DA:165,2
134
- LF:64
135
- LH:58
105
+ DA:88,48
106
+ DA:90,48
107
+ DA:91,48
108
+ DA:93,48
109
+ DA:94,14
110
+ DA:98,0
111
+ DA:99,0
112
+ DA:101,12
113
+ DA:102,12
114
+ DA:103,0
115
+ DA:106,12
116
+ DA:107,0
117
+ DA:112,12
118
+ DA:118,1
119
+ DA:121,11
120
+ DA:124,11
121
+ DA:125,11
122
+ DA:127,0
123
+ DA:134,1
124
+ DA:135,11
125
+ DA:141,1
126
+ DA:142,12
127
+ DA:148,1
128
+ DA:150,3
129
+ DA:153,2
130
+ DA:155,2
131
+ DA:156,2
132
+ DA:158,0
133
+ DA:166,1
134
+ DA:167,6
135
+ DA:170,6
136
+ DA:173,6
137
+ DA:176,3
138
+ DA:177,3
139
+ DA:180,1
140
+ DA:182,4
141
+ DA:184,2
142
+ LF:72
143
+ LH:66
136
144
  BRDA:8,1,0,0
137
145
  BRDA:8,1,1,0
138
146
  BRDA:8,2,0,0
@@ -148,40 +156,42 @@ BRDA:8,6,1,0
148
156
  BRDA:8,7,0,0
149
157
  BRDA:8,7,1,0
150
158
  BRDA:12,8,0,0
151
- BRDA:12,8,1,3
152
- BRDA:12,9,0,3
153
- BRDA:12,9,1,3
154
- BRDA:74,10,0,14
155
- BRDA:74,10,1,34
156
- BRDA:83,11,0,0
157
- BRDA:83,11,1,12
158
- BRDA:83,12,0,12
159
- BRDA:83,12,1,0
160
- BRDA:87,13,0,0
161
- BRDA:87,13,1,12
162
- BRDA:105,14,0,11
163
- BRDA:105,14,1,0
164
- BRDA:105,15,0,11
165
- BRDA:105,15,1,11
166
- BRDA:123,16,0,1
167
- BRDA:123,16,1,11
168
- BRDA:123,17,0,12
169
- BRDA:123,17,1,1
170
- BRDA:123,18,0,11
171
- BRDA:123,18,1,1
172
- BRDA:123,19,0,1
173
- BRDA:123,19,1,11
174
- BRDA:123,20,0,1
175
- BRDA:123,20,1,11
176
- BRDA:136,21,0,2
177
- BRDA:136,21,1,0
178
- BRDA:136,22,0,2
179
- BRDA:136,22,1,2
180
- BRDA:136,22,2,2
181
- BRDA:154,23,0,3
182
- BRDA:154,23,1,1
183
- BRF:47
184
- BRH:42
159
+ BRDA:12,8,1,4
160
+ BRDA:12,9,0,4
161
+ BRDA:12,9,1,4
162
+ BRDA:67,10,0,11
163
+ BRDA:67,10,1,0
164
+ BRDA:93,11,0,14
165
+ BRDA:93,11,1,34
166
+ BRDA:102,12,0,0
167
+ BRDA:102,12,1,12
168
+ BRDA:102,13,0,12
169
+ BRDA:102,13,1,0
170
+ BRDA:106,14,0,0
171
+ BRDA:106,14,1,12
172
+ BRDA:124,15,0,11
173
+ BRDA:124,15,1,0
174
+ BRDA:124,16,0,11
175
+ BRDA:124,16,1,11
176
+ BRDA:142,17,0,1
177
+ BRDA:142,17,1,11
178
+ BRDA:142,18,0,12
179
+ BRDA:142,18,1,1
180
+ BRDA:142,19,0,11
181
+ BRDA:142,19,1,1
182
+ BRDA:142,20,0,1
183
+ BRDA:142,20,1,11
184
+ BRDA:142,21,0,1
185
+ BRDA:142,21,1,11
186
+ BRDA:155,22,0,2
187
+ BRDA:155,22,1,0
188
+ BRDA:155,23,0,2
189
+ BRDA:155,23,1,2
190
+ BRDA:155,23,2,2
191
+ BRDA:173,24,0,3
192
+ BRDA:173,24,1,1
193
+ BRF:49
194
+ BRH:43
185
195
  end_of_record
186
196
  TN:
187
197
  SF:/home/travis/build/commitizen/cz-cli/src/common/util.js
@@ -583,13 +593,14 @@ DA:10,1
583
593
  DA:12,46
584
594
  DA:17,14
585
595
  DA:18,3
586
- DA:22,11
587
- DA:23,0
588
- DA:25,11
589
- DA:29,32
590
- DA:32,1
591
- LF:11
592
- LH:10
596
+ DA:19,11
597
+ DA:23,1
598
+ DA:24,0
599
+ DA:26,1
600
+ DA:30,32
601
+ DA:33,1
602
+ LF:12
603
+ LH:11
593
604
  BRDA:12,1,0,14
594
605
  BRDA:12,1,1,32
595
606
  BRDA:12,2,0,46
@@ -598,10 +609,12 @@ BRDA:17,3,0,3
598
609
  BRDA:17,3,1,11
599
610
  BRDA:17,4,0,14
600
611
  BRDA:17,4,1,3
601
- BRDA:22,5,0,0
602
- BRDA:22,5,1,11
603
- BRF:10
604
- BRH:9
612
+ BRDA:19,5,0,1
613
+ BRDA:19,5,1,10
614
+ BRDA:23,6,0,0
615
+ BRDA:23,6,1,1
616
+ BRF:12
617
+ BRH:11
605
618
  end_of_record
606
619
  TN:
607
620
  SF:/home/travis/build/commitizen/cz-cli/src/configLoader/loader.js
@@ -20,6 +20,10 @@ var _findNodeModules = require('find-node-modules');
20
20
 
21
21
  var _findNodeModules2 = _interopRequireDefault(_findNodeModules);
22
22
 
23
+ var _lodash = require('lodash');
24
+
25
+ var _lodash2 = _interopRequireDefault(_lodash);
26
+
23
27
  var _commonUtil = require('../common/util');
24
28
 
25
29
  exports.addPathToAdapterConfig = addPathToAdapterConfig;
@@ -44,8 +48,23 @@ exports.resolveAdapterPath = resolveAdapterPath;
44
48
  * Must be passed an absolute path to the cli's root
45
49
  */
46
50
  function addPathToAdapterConfig(sh, cliPath, repoPath, adapterNpmName) {
51
+
52
+ var commitizenAdapterConfig = {
53
+ config: {
54
+ commitizen: {
55
+ path: './node_modules/' + adapterNpmName
56
+ }
57
+ }
58
+ };
59
+
47
60
  var packageJsonPath = _path2['default'].join(getNearestProjectRootDirectory(), 'package.json');
48
- sh.exec(cliPath + '/node_modules/.bin/json -I -f ' + packageJsonPath + ' -e \'if(!this.config) {this.config={};}; if(!this.config.commitizen) { this.config.commitizen={};}; this.config.commitizen.path="./node_modules/' + adapterNpmName + '"\'');
61
+ var packageJsonString = _fs2['default'].readFileSync(packageJsonPath);
62
+ var packageJsonContent = JSON.parse(packageJsonString);
63
+ var newPackageJsonContent = '';
64
+ if (_lodash2['default'].get(packageJsonContent, 'config.commitizen.path') !== adapterNpmName) {
65
+ newPackageJsonContent = _lodash2['default'].merge(packageJsonContent, commitizenAdapterConfig);
66
+ }
67
+ _fs2['default'].writeFileSync(packageJsonPath, JSON.stringify(newPackageJsonContent));
49
68
  }
50
69
 
51
70
  /**
@@ -16,11 +16,12 @@ function getNormalizedConfig(config, content) {
16
16
  // Use the npm config key, be good citizens
17
17
  if (content.config && content.config.commitizen) {
18
18
  return content.config.commitizen;
19
- } else {
20
-
19
+ } else if (content.czConfig) {
21
20
  // Old method, will be deprecated in 3.0.0
21
+
22
+ // Suppress during test
22
23
  if (typeof global.it !== 'function') {
23
- console.error("\n********\nWARNING: You are using czConfig in your package.json. czConfig will be deprecated in Commitizen 3. \nPlease use this instead:\n{\n \"config\": {\n \"commitizen\": {\n \"path\": \"./path/to/adapter\"\n }\n }\n}\nFor more information, see: http://commitizen.github.io/cz-cli/\n********\n");
24
+ console.error("\n********\nWARNING: This repository's package.json is using czConfig. czConfig will be deprecated in Commitizen 3. \nPlease use this instead:\n{\n \"config\": {\n \"commitizen\": {\n \"path\": \"./path/to/adapter\"\n }\n }\n}\nFor more information, see: http://commitizen.github.io/cz-cli/\n********\n");
24
25
  }
25
26
  return content.czConfig;
26
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commitizen",
3
- "version": "2.4.0",
3
+ "version": "2.4.4",
4
4
  "description": "Git commit, but play nice with conventions.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -45,28 +45,27 @@
45
45
  "author": "Jim Cummins <jimthedev@gmail.com> (https://github.com/jimthedev)",
46
46
  "license": "MIT",
47
47
  "devDependencies": {
48
- "chai": "3.4.0",
48
+ "chai": "3.4.1",
49
49
  "codecov.io": "0.1.6",
50
50
  "ghooks": "0.3.2",
51
51
  "istanbul": "0.3.22",
52
- "lodash": "3.10.1",
53
52
  "mocha": "2.3.3",
54
53
  "semantic-release": "^4.3.5"
55
54
  },
56
55
  "dependencies": {
57
- "babel": "5.8.23",
56
+ "babel": "5.8.29",
58
57
  "chalk": "1.1.1",
59
58
  "cz-conventional-changelog": "1.1.4",
60
- "dedent": "0.4.0",
59
+ "dedent": "0.6.0",
61
60
  "find-node-modules": "1.0.1",
62
61
  "glob": "5.0.15",
63
62
  "gulp": "3.9.0",
64
63
  "gulp-git": "1.6.0",
65
64
  "inquirer": "0.11.0",
66
- "json": "9.0.3",
65
+ "lodash": "3.10.1",
67
66
  "minimist": "1.2.0",
68
67
  "node-uuid": "1.4.3",
69
- "nodemon": "1.7.3",
68
+ "nodemon": "1.8.1",
70
69
  "rimraf": "2.4.3",
71
70
  "semver": "5.0.3",
72
71
  "shelljs": "0.5.3",