-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
7 changed files
with
513 additions
and
448 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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
const Q = require(`q`); | ||
const parserOpts = require(`./parser-opts`); | ||
const writerOpts = require(`./writer-opts`); | ||
|
||
module.exports = Q.all([parserOpts, writerOpts]) | ||
.spread((parserOpts, writerOpts) => { | ||
return {parserOpts, writerOpts}; | ||
}); | ||
module.exports = Q.all([parserOpts, writerOpts]).spread((parserOpts, writerOpts) => { | ||
return { parserOpts, writerOpts }; | ||
}); |
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 |
---|---|---|
@@ -1,38 +1,34 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
module.exports = { | ||
whatBump: (commits) => { | ||
let level = 2; | ||
let breakings = 0; | ||
let features = 0; | ||
whatBump: commits => { | ||
let level = 2; | ||
let breakings = 0; | ||
let features = 0; | ||
|
||
commits.forEach(commit => { | ||
if (commit.notes.length > 0) { | ||
breakings += commit.notes.length; | ||
level = 0; | ||
} else if (commit.type === `feat`) { | ||
features += 1; | ||
if (level === 2) { | ||
level = 1; | ||
} | ||
} | ||
}); | ||
commits.forEach(commit => { | ||
if (commit.notes.length > 0) { | ||
breakings += commit.notes.length; | ||
level = 0; | ||
} else if (commit.type === `feat`) { | ||
features += 1; | ||
if (level === 2) { | ||
level = 1; | ||
} | ||
} | ||
}); | ||
|
||
return { | ||
level: level, | ||
reason: `There are ${breakings} BREAKING CHANGES and ${features} features` | ||
}; | ||
}, | ||
return { | ||
level: level, | ||
reason: `There are ${breakings} BREAKING CHANGES and ${features} features` | ||
}; | ||
}, | ||
|
||
parserOpts: { | ||
headerPattern: /^(\w*)(?:\((.*)\))?\: (.*)$/, | ||
headerCorrespondence: [ | ||
`type`, | ||
`scope`, | ||
`subject` | ||
], | ||
noteKeywords: `BREAKING CHANGE`, | ||
revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./, | ||
revertCorrespondence: [`header`, `hash`] | ||
} | ||
parserOpts: { | ||
headerPattern: /^(\w*)(?:\((.*)\))?\: (.*)$/, | ||
headerCorrespondence: [`type`, `scope`, `subject`], | ||
noteKeywords: `BREAKING CHANGE`, | ||
revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./, | ||
revertCorrespondence: [`header`, `hash`] | ||
} | ||
}; |
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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
const Q = require(`q`); | ||
const conventionalChangelog = require(`./conventional-changelog`); | ||
const parserOpts = require(`./parser-opts`); | ||
const recommendedBumpOpts = require(`./conventional-recommended-bump`); | ||
const writerOpts = require(`./writer-opts`); | ||
|
||
module.exports = Q.all([conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts]) | ||
.spread((conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts) => { | ||
return {conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts}; | ||
}); | ||
module.exports = Q.all([conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts]).spread( | ||
(conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts) => { | ||
return { conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts }; | ||
} | ||
); |
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
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 |
---|---|---|
@@ -1,13 +1,9 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
module.exports = { | ||
headerPattern: /^(\w*)(?:\((.*)\))?\: (.*)$/, | ||
headerCorrespondence: [ | ||
`type`, | ||
`scope`, | ||
`subject` | ||
], | ||
noteKeywords: [`BREAKING CHANGE`, `BREAKING CHANGES`], | ||
revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./, | ||
revertCorrespondence: [`header`, `hash`] | ||
headerPattern: /^(\w*)(?:\((.*)\))?\: (.*)$/, | ||
headerCorrespondence: [`type`, `scope`, `subject`], | ||
noteKeywords: [`BREAKING CHANGE`, `BREAKING CHANGES`], | ||
revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./, | ||
revertCorrespondence: [`header`, `hash`] | ||
}; |
Oops, something went wrong.