forked from atlassian/cz-lerna-changelog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4f0cbd3
Showing
6 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["es2015"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git | ||
node_modules | ||
|
||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
sudo: false | ||
language: node_js | ||
cache: | ||
directories: | ||
- node_modules | ||
notifications: | ||
email: false | ||
node_js: | ||
- '4' | ||
before_install: | ||
- npm i -g npm@^2.0.0 | ||
before_script: | ||
- npm prune | ||
after_success: | ||
- npm run semantic-release | ||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# cz-conventional-changelog | ||
|
||
Status: | ||
[](https://www.npmjs.org/package/cz-conventional-changelog) | ||
[](http://npm-stat.com/charts.html?package=cz-conventional-changelog&from=2015-08-01) | ||
[](https://travis-ci.org/commitizen/cz-conventional-changelog) | ||
|
||
Part of the [commitizen](https://github.com/commitizen/cz-cli) family. Prompts for [conventional changelog](https://github.com/stevemao/conventional-changelog-angular/blob/master/index.js) standard. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "cz-lerna-changelog", | ||
"version": "0.0.0-semantically-released.0", | ||
"description": "Commitizen adapter following the conventional-changelog format.", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"build": "babel src -d lib", | ||
"commit": "git-cz", | ||
"test": "echo 'Tests need to be setup!'", | ||
"prepublish": "npm run build", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jpnelson/cz-lerna-changelog.git" | ||
}, | ||
"author": "Joshua Nelson <[email protected]>", | ||
"dependencies": { | ||
"cz-conventional-changelog": "jpnelson/cz-conventional-changelog#fe629d0f", | ||
"lerna": "jpnelson/lerna#8c0e5a44" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "6.8.0", | ||
"babel-preset-es2015": "6.6.0", | ||
"commitizen": "1.0.5", | ||
"semantic-release": "^4.3.5" | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import prompt from 'cz-conventional-changelog/prompt'; | ||
|
||
import UpdatedCommand from 'lerna/lib/commands/UpdatedCommand'; | ||
import PackageUtilities from 'lerna/lib/PackageUtilities'; | ||
|
||
module.exports = { | ||
prompter: function(cz, commit) { | ||
const updatedCommand = new UpdatedCommand([], {}); | ||
|
||
// We can't use updatedCommand.run() as this will exit TODO: PR to add an option to run specifying whether it'd exit | ||
updatedCommand.runValidations(); | ||
updatedCommand.runPreparations(); | ||
updatedCommand.initialize(() => { | ||
updatedCommand.execute(() => { | ||
const updatedPackages = updatedCommand.updates.map((update) => update.package.name); | ||
const defaults = { | ||
packages: updatedPackages.join(',') | ||
}; | ||
|
||
//var packages = answers.packages.trim(); | ||
//packages = packages ? '[' + packages + ']' : ''; | ||
|
||
prompt(cz, (head, body, footer) => { | ||
var packages = answers.packages.trim(); | ||
packages = packages ? '[' + packages + ']' : ''; | ||
|
||
commit(head + '\n\n' + body + '\n\n' + footer); | ||
|
||
}); | ||
}); | ||
}); | ||
} | ||
}; |