-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add past changelog and changelog build script
- Loading branch information
Showing
5 changed files
with
500 additions
and
15 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,108 @@ | ||
## Change Log | ||
|
||
### [v4.1.0](https://github.com/wyze/eslint-config-wyze/releases/tag/v4.1.0) (2017-02-06) | ||
|
||
* [[`693f225e9e`](https://github.com/wyze/eslint-config-wyze/commit/693f225e9e)] - Upgrade dependencies (Neil Kistner) | ||
|
||
### [v4.0.0](https://github.com/wyze/eslint-config-wyze/releases/tag/v4.0.0) (2017-02-02) | ||
|
||
* [[`c9442c9aaf`](https://github.com/wyze/eslint-config-wyze/commit/c9442c9aaf)] - Update copyright year (Neil Kistner) | ||
* [[`61ee0af2f8`](https://github.com/wyze/eslint-config-wyze/commit/61ee0af2f8)] - Upgrade dependencies (Neil Kistner) | ||
* [[`75077fac51`](https://github.com/wyze/eslint-config-wyze/commit/75077fac51)] - Remove warning for `flowtype/require-variable-type` rule (Neil Kistner) | ||
* [[`d64280b2e5`](https://github.com/wyze/eslint-config-wyze/commit/d64280b2e5)] - Add yarn (Neil Kistner) | ||
* [[`65c785dcd3`](https://github.com/wyze/eslint-config-wyze/commit/65c785dcd3)] - Disallow sudo on Travis (Neil Kistner) | ||
* [[`18c32c394b`](https://github.com/wyze/eslint-config-wyze/commit/18c32c394b)] - Update version of node Travis runs on (Neil Kistner) | ||
* [[`dd039a11c1`](https://github.com/wyze/eslint-config-wyze/commit/dd039a11c1)] - Enable new rules for `eslint-plugin-flowtype` (Neil Kistner) | ||
* [[`0d0f0928fa`](https://github.com/wyze/eslint-config-wyze/commit/0d0f0928fa)] - Upgrade dependencies (Neil Kistner) | ||
* [[`c52a6e1eb9`](https://github.com/wyze/eslint-config-wyze/commit/c52a6e1eb9)] - Fix test for default config (Neil Kistner) | ||
* [[`e13d9eb862`](https://github.com/wyze/eslint-config-wyze/commit/e13d9eb862)] - Properly override rules for `jsx-a11y` (Neil Kistner) | ||
* [[`d7d84101b9`](https://github.com/wyze/eslint-config-wyze/commit/d7d84101b9)] - Fix `no-duplicate-imports` when using Flowtype (Neil Kistner) | ||
* [[`9f7b0ec5e6`](https://github.com/wyze/eslint-config-wyze/commit/9f7b0ec5e6)] - Upgrade dependencies (Neil Kistner) | ||
* [[`dc82480614`](https://github.com/wyze/eslint-config-wyze/commit/dc82480614)] - Enable `eslint-plugin-jsx-a11y` rules (Neil Kistner) | ||
* [[`9aa14d743f`](https://github.com/wyze/eslint-config-wyze/commit/9aa14d743f)] - Fix lint errors and test (Neil Kistner) | ||
* [[`eede092a1b`](https://github.com/wyze/eslint-config-wyze/commit/eede092a1b)] - Split `eslint-plugin-import` rules into their own file (Neil Kistner) | ||
* [[`a9268ab0f9`](https://github.com/wyze/eslint-config-wyze/commit/a9268ab0f9)] - Add override rules for eslint-plugin-jsx-a11y@^3.0.1 (Neil Kistner) | ||
* [[`1b00551e7d`](https://github.com/wyze/eslint-config-wyze/commit/1b00551e7d)] - Upgrade dependencies (Neil Kistner) | ||
* [[`427f28dd8b`](https://github.com/wyze/eslint-config-wyze/commit/427f28dd8b)] - Fix lint error (Neil Kistner) | ||
* [[`83287d13ce`](https://github.com/wyze/eslint-config-wyze/commit/83287d13ce)] - Upgrade dependencies (Neil Kistner) | ||
* [[`5e871333ce`](https://github.com/wyze/eslint-config-wyze/commit/5e871333ce)] - Update readme structure (Neil Kistner) | ||
* [[`b17ffb4481`](https://github.com/wyze/eslint-config-wyze/commit/b17ffb4481)] - Switch from number rule settings to string (Neil Kistner) | ||
* [[`a33ea2b01c`](https://github.com/wyze/eslint-config-wyze/commit/a33ea2b01c)] - Cleanup tests (Neil Kistner) | ||
* [[`9b11043f4e`](https://github.com/wyze/eslint-config-wyze/commit/9b11043f4e)] - Add flow config and rules (Neil Kistner) | ||
* [[`975de4da6b`](https://github.com/wyze/eslint-config-wyze/commit/975de4da6b)] - Remove supliferous `async` keyword in tests (Neil Kistner) | ||
* [[`dabb127771`](https://github.com/wyze/eslint-config-wyze/commit/dabb127771)] - Lint whole project and fix lint errors (Neil Kistner) | ||
* [[`1fdc00695e`](https://github.com/wyze/eslint-config-wyze/commit/1fdc00695e)] - Add back `arrow-parens` override (Neil Kistner) | ||
* [[`9925fc038f`](https://github.com/wyze/eslint-config-wyze/commit/9925fc038f)] - Remove rules implemented in Airbnb (Neil Kistner) | ||
* [[`96d8c799cb`](https://github.com/wyze/eslint-config-wyze/commit/96d8c799cb)] - Add tests for preact config (Neil Kistner) | ||
* [[`23f738ca5a`](https://github.com/wyze/eslint-config-wyze/commit/23f738ca5a)] - Add config for Preact (Neil Kistner) | ||
* [[`d749f02964`](https://github.com/wyze/eslint-config-wyze/commit/d749f02964)] - Make sure we don't run npm@2 on Node v4 (Neil Kistner) | ||
* [[`27c96dd65b`](https://github.com/wyze/eslint-config-wyze/commit/27c96dd65b)] - Upgrade dependencies (Neil Kistner) | ||
* [[`0f51d4f54a`](https://github.com/wyze/eslint-config-wyze/commit/0f51d4f54a)] - Move import plugin definition out of rule file (Neil Kistner) | ||
* [[`c0833d1c9a`](https://github.com/wyze/eslint-config-wyze/commit/c0833d1c9a)] - Use ESLint's parser for ES2017 and remove babel-eslint dependency (Neil Kistner) | ||
|
||
### [v3.0.0](https://github.com/wyze/eslint-config-wyze/releases/tag/v3.0.0) (2016-08-13) | ||
|
||
* [[`e8b0c9cb2c`](https://github.com/wyze/eslint-config-wyze/commit/e8b0c9cb2c)] - Upgrade dependencies (Neil Kistner) | ||
* [[`b330785b93`](https://github.com/wyze/eslint-config-wyze/commit/b330785b93)] - Remove `jsx-pascal-case` rule (in airbnb now) (Neil Kistner) | ||
* [[`93c337d932`](https://github.com/wyze/eslint-config-wyze/commit/93c337d932)] - Upgrade dependencies (Neil Kistner) | ||
* [[`b87beb1aef`](https://github.com/wyze/eslint-config-wyze/commit/b87beb1aef)] - Upgrade ava dependency (Neil Kistner) | ||
* [[`7b397af972`](https://github.com/wyze/eslint-config-wyze/commit/7b397af972)] - Upgrade dependencies (Neil Kistner) | ||
* [[`a54f26c105`](https://github.com/wyze/eslint-config-wyze/commit/a54f26c105)] - Upgrade dependencies (Neil Kistner) | ||
* [[`4dee13fe2c`](https://github.com/wyze/eslint-config-wyze/commit/4dee13fe2c)] - Upgrade dependencies (Neil Kistner) | ||
* [[`12d334ccef`](https://github.com/wyze/eslint-config-wyze/commit/12d334ccef)] - Correct installation instructions (Neil Kistner) | ||
* [[`1059fe9c1e`](https://github.com/wyze/eslint-config-wyze/commit/1059fe9c1e)] - Update AVA (Neil Kistner) | ||
|
||
### [v2.0.0](https://github.com/wyze/eslint-config-wyze/releases/tag/v2.0.0) (2016-05-10) | ||
|
||
* [[`d21123aa10`](https://github.com/wyze/eslint-config-wyze/commit/d21123aa10)] - Update installation instructions (Neil Kistner) | ||
* [[`2050dc6af6`](https://github.com/wyze/eslint-config-wyze/commit/2050dc6af6)] - Add `import/newline-after-import` rule (Neil Kistner) | ||
* [[`f5588135d0`](https://github.com/wyze/eslint-config-wyze/commit/f5588135d0)] - Upgrade dependencies (Neil Kistner) | ||
* [[`673b9f4b90`](https://github.com/wyze/eslint-config-wyze/commit/673b9f4b90)] - Add `max-statements` rule (Neil Kistner) | ||
* [[`f35f830ae4`](https://github.com/wyze/eslint-config-wyze/commit/f35f830ae4)] - Configure some dependencies as peerDependencies (Neil Kistner) | ||
* [[`4d4c4477b1`](https://github.com/wyze/eslint-config-wyze/commit/4d4c4477b1)] - Fixing lint rules (Neil Kistner) | ||
* [[`dbbdd3bce2`](https://github.com/wyze/eslint-config-wyze/commit/dbbdd3bce2)] - Remove `before_install` from Travis-CI (Neil Kistner) | ||
* [[`387143f002`](https://github.com/wyze/eslint-config-wyze/commit/387143f002)] - Enable `import/no-extraneous-dependencies` rule (Neil Kistner) | ||
* [[`ac574c8b36`](https://github.com/wyze/eslint-config-wyze/commit/ac574c8b36)] - Enable Node v6 builds (Neil Kistner) | ||
* [[`6b5ef24b13`](https://github.com/wyze/eslint-config-wyze/commit/6b5ef24b13)] - Add missing peer dependencies (Neil Kistner) | ||
* [[`14ee951e32`](https://github.com/wyze/eslint-config-wyze/commit/14ee951e32)] - Override `eqeqeq` rule to not allow null (Neil Kistner) | ||
* [[`5f6387ac5e`](https://github.com/wyze/eslint-config-wyze/commit/5f6387ac5e)] - Add rules for `eslint-plugin-import` (Neil Kistner) | ||
* [[`6cb4bc0c41`](https://github.com/wyze/eslint-config-wyze/commit/6cb4bc0c41)] - Update tests to pass (Neil Kistner) | ||
* [[`79dd97e6fa`](https://github.com/wyze/eslint-config-wyze/commit/79dd97e6fa)] - Upgrade dependencies (Neil Kistner) | ||
* [[`905dc06584`](https://github.com/wyze/eslint-config-wyze/commit/905dc06584)] - Upgrade dependencies (Neil Kistner) | ||
* [[`5c80f3dcab`](https://github.com/wyze/eslint-config-wyze/commit/5c80f3dcab)] - Upgrade `babel-eslint` package from beta (Neil Kistner) | ||
|
||
### [v1.3.0](https://github.com/wyze/eslint-config-wyze/releases/tag/v1.3.0) (2016-03-16) | ||
|
||
* [[`1189cd9670`](https://github.com/wyze/eslint-config-wyze/commit/1189cd9670)] - Bump dependencies (Neil Kistner) | ||
* [[`1ed2247a10`](https://github.com/wyze/eslint-config-wyze/commit/1ed2247a10)] - Add back `newline-before-return` rule (Neil Kistner) | ||
* [[`deb5718a19`](https://github.com/wyze/eslint-config-wyze/commit/deb5718a19)] - Upgrade ESLint to 2.4.0 (Neil Kistner) | ||
|
||
### [v1.2.1](https://github.com/wyze/eslint-config-wyze/releases/tag/v1.2.1) (2016-03-10) | ||
|
||
* [[`8f613765a0`](https://github.com/wyze/eslint-config-wyze/commit/8f613765a0)] - Remove `newline-before-return` rule (Neil Kistner) | ||
* [[`036964b297`](https://github.com/wyze/eslint-config-wyze/commit/036964b297)] - Readme updates (Neil Kistner) | ||
* [[`b1b927d946`](https://github.com/wyze/eslint-config-wyze/commit/b1b927d946)] - Scripts update (Neil Kistner) | ||
* [[`e89fd0552d`](https://github.com/wyze/eslint-config-wyze/commit/e89fd0552d)] - Bump dependencies (Neil Kistner) | ||
* [[`02b1ce781b`](https://github.com/wyze/eslint-config-wyze/commit/02b1ce781b)] - Pin ESLint to ~2.2.0 (Neil Kistner) | ||
|
||
### [v1.2.0](https://github.com/wyze/eslint-config-wyze/releases/tag/v1.2.0) (2016-03-07) | ||
|
||
* [[`0fb486be40`](https://github.com/wyze/eslint-config-wyze/commit/0fb486be40)] - Bump `babel-eslint` version (Neil Kistner) | ||
* [[`76780b4da1`](https://github.com/wyze/eslint-config-wyze/commit/76780b4da1)] - Add `eslint-plugin-wyze` as peerDep for npm@2 users (Neil Kistner) | ||
* [[`585cccec1f`](https://github.com/wyze/eslint-config-wyze/commit/585cccec1f)] - Setup Travis to work properly with new extends (Neil Kistner) | ||
* [[`23a40ac2d5`](https://github.com/wyze/eslint-config-wyze/commit/23a40ac2d5)] - Proper extends (Neil Kistner) | ||
* [[`e6aa157390`](https://github.com/wyze/eslint-config-wyze/commit/e6aa157390)] - Bump `config-airbnb` and `plugin-react` versions (Neil Kistner) | ||
|
||
### [v1.1.0](https://github.com/wyze/eslint-config-wyze/releases/tag/v1.1.0) (2016-03-05) | ||
|
||
* [[`fdbb169d11`](https://github.com/wyze/eslint-config-wyze/commit/fdbb169d11)] - Enable `newline-before-return` rule (Neil Kistner) | ||
* [[`c5f871d098`](https://github.com/wyze/eslint-config-wyze/commit/c5f871d098)] - Upgrade to eslint 2.3.0 (Neil Kistner) | ||
* [[`a0527248b8`](https://github.com/wyze/eslint-config-wyze/commit/a0527248b8)] - Updating main rule file (Neil Kistner) | ||
* [[`a7ada31d5f`](https://github.com/wyze/eslint-config-wyze/commit/a7ada31d5f)] - Updating tests for ./base (Neil Kistner) | ||
* [[`d894d3f5e3`](https://github.com/wyze/eslint-config-wyze/commit/d894d3f5e3)] - Update `eslint-plugin-wyze` and use recommended config (Neil Kistner) | ||
* [[`0121e9a412`](https://github.com/wyze/eslint-config-wyze/commit/0121e9a412)] - Add `no-multiple-empty-lines` with `maxBOF: 0` (Neil Kistner) | ||
* [[`20c7ee9fac`](https://github.com/wyze/eslint-config-wyze/commit/20c7ee9fac)] - Enable `newline-after-var` rule (Neil Kistner) | ||
|
||
### [v1.0.0](https://github.com/wyze/eslint-config-wyze/releases/tag/v1.0.0) (2016-02-24) | ||
|
||
* [[`0c424e8874`](https://github.com/wyze/eslint-config-wyze/commit/0c424e8874)] - Initial commit (Neil Kistner) |
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
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,84 @@ | ||
const execa = require('execa') | ||
const readFile = require('fs').readFileSync | ||
const readPkg = require('read-pkg') | ||
const writeFile = require('fs').writeFileSync | ||
|
||
/** | ||
* Determines if a version string is beta or not. | ||
* | ||
* @param {String} version - The string to check. | ||
* @return {Boolean} | ||
*/ | ||
const isBeta = version => /-beta\.\d+(\s|$)/.test(version) | ||
|
||
// get version from pkg.json | ||
const getVersionAndUrl = | ||
({ repository: { url }, version }) => { | ||
// Don't generate change log for beta releases | ||
if ( isBeta(version) ) { | ||
process.exit(0) | ||
} | ||
|
||
return { url, version } | ||
} | ||
|
||
// npm run changelog (and grab output) | ||
const getChanges = ({ url, version }) => { | ||
const { stdout } = execa.sync('npm', [ 'run', 'changelog', '--silent' ]) | ||
const changes = stdout.trim().split(' \n') | ||
// Filter beta releases because `changelog-maker` doesn't | ||
.filter(msg => !isBeta(msg)) | ||
|
||
return { changes, url, version } | ||
} | ||
|
||
// modify changelog.md | ||
const updateChangelog = ({ changes, url, version }) => { | ||
const file = 'changelog.md' | ||
const changelog = readFile(file).toString().split('\n') | ||
const date = new Date().toJSON().split('T').shift() | ||
const tag = `v${version}` | ||
const repo = url.replace(/\.?git(?!hub)\+?/g, '') | ||
const header = `### [${tag}](${repo}/releases/tag/${tag}) (${date})` | ||
const formatted = [ header, '', ...changes ] | ||
|
||
writeFile( | ||
file, | ||
[ | ||
...changelog.slice(0, 2), | ||
...formatted, | ||
...changelog.slice(1), | ||
].join('\n') | ||
) | ||
|
||
return formatted | ||
} | ||
|
||
// modify readme.md | ||
const updateReadme = formatted => { | ||
const file = 'readme.md' | ||
const readme = readFile(file).toString().split('\n') | ||
const start = '> [Full Change Log](changelog.md)' | ||
const end = '## License' | ||
|
||
writeFile( | ||
file, | ||
[ | ||
...readme.slice(0, readme.indexOf(start) + 2), | ||
...formatted, | ||
...readme.slice(readme.indexOf(end) - 1), | ||
].join('\n') | ||
) | ||
} | ||
|
||
// git add | ||
const runGitAdd = () => { | ||
execa.sync('git', [ 'add', '--all' ]) | ||
} | ||
|
||
readPkg() | ||
.then(getVersionAndUrl) | ||
.then(getChanges) | ||
.then(updateChangelog) | ||
.then(updateReadme) | ||
.then(runGitAdd) |
Oops, something went wrong.