From d856fba8bfeb3ce79ab71de926d067ddeecb0762 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 19 Feb 2018 14:42:20 -0600 Subject: [PATCH 1/9] Publish lifecycle --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b1faf8dec..ee8820bcbd 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "scripts": { "test": "node test", "bench": "node test --bench", - "build": "uglifyjs lib/marked.js -cm --comments /Copyright/ -o marked.min.js" + "build": "uglifyjs lib/marked.js -cm --comments /Copyright/ -o marked.min.js", + "preversion": "npm run build" } } From c6114e81d3f9e5eac7a19dd36b1d6148f627ec4c Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 19 Feb 2018 15:13:29 -0600 Subject: [PATCH 2/9] Create file for releasing instructions --- RELEASE.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..f6789e5245 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,31 @@ +# Releasing Marked + +## Versioning + +We follow [semantic versioning](https://semver.org) where the following sequence is true `[major].[minor].[patch]` (further, while in beta you may see something like this `0.[major|minor].[minor|patch]`). Therefore, consider the following implications of the relase you are preparing: + +1. **Major:** There is at least one change that has been made which is not deemed as backward compatible. While in beta, the major will remain at zero; thereby, alterting consumers to the potentially volatile nature of the package. +2. **Minor:** There is at least one new feature added to the release. While in beta, the minor will tend be more analagous to a `major` release. For example, we plan to release `0.4.0` once we have fixed most, if not all, known issues related to the CommonMark and GFM specifications because the architecture changes planned during `0.4.0` will most likely introduce breaking changes. +3. **Patch:** No breaking changes. Should fix a defect found in a feature. While in beta, the patch will tend to be more analagous to a `minor` release. + +## Release process + +**Master is always shippable:** We try to merge PRs in such a way that `master` is the only branch to really be concerned about *and* `master` can always be released. This allows smoother flow between new fetures, bug fixes, and so on. (Almost a continuous deployment setup, without automation.) + +**Version naming:** relatively standard [major].[minor].[patch] where `major` releases represent known breaking changes to the previous release, `minor` represent additions of new funcitonality without breaking changes, and `patch` releases represent changes meant to fix previously released functionality with no new functionality. Note: When the major is a zero, it means the library is still in a beta state wherein the `major` does not get updated; therefore, `minor` releases may introduce breaking changes, and `patch` releases may contain new features. + +### Release process + +- [ ] Fork `markedjs/marked` -> clone the library locally +- [ ] Make sure you are on the `master` branch +- [ ] Create release branch from `master` (`release-##.##.##`) +- [ ] Run tests using NPM command: `$ npm test` +- [ ] Run NPM command to update `package.json` version: `$ npm version [major|minor|patch]` (updates `package.json` and creates `min` file) +- [ ] Publish pack to NPM: `$ npm publish` +- [ ] Commit changes locally -> Submit PR to `origina/master` +- [ ] Merge PR (only time where submitter should be "allowed" to merge his or her own) +- [ ] Navigate to the "Releases" tab on the project main page -> "Draft new release" + - Add version number matching the one in the `package.json` file after publishing the release + - Make sure `master` is the branch from which the release will be made + - Add notes regarding what users should expect from the release + - Click "Publish release" \ No newline at end of file From 54f5936825b30cb93b8c517c87c6b29d20cd9a25 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 19 Feb 2018 15:27:02 -0600 Subject: [PATCH 3/9] Updating checklist --- RELEASE.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index f6789e5245..469398c199 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -16,14 +16,12 @@ We follow [semantic versioning](https://semver.org) where the following sequence ### Release process -- [ ] Fork `markedjs/marked` -> clone the library locally -- [ ] Make sure you are on the `master` branch +- [ ] Fork `markedjs/marked` -> clone the library locally -> Make sure you are on the `master` branch - [ ] Create release branch from `master` (`release-##.##.##`) -- [ ] Run tests using NPM command: `$ npm test` -- [ ] Run NPM command to update `package.json` version: `$ npm version [major|minor|patch]` (updates `package.json` and creates `min` file) -- [ ] Publish pack to NPM: `$ npm publish` -- [ ] Commit changes locally -> Submit PR to `origina/master` -- [ ] Merge PR (only time where submitter should be "allowed" to merge his or her own) +- [ ] `$ npm test` (run tests) +- [ ] `$ npm version [major|minor|patch]` (updates `package.json` and creates `min` file) +- [ ] `$ npm publish` (publish to NPM) +- [ ] Commit changes locally -> Submit PR to `origina/master` -> Merge PR - [ ] Navigate to the "Releases" tab on the project main page -> "Draft new release" - Add version number matching the one in the `package.json` file after publishing the release - Make sure `master` is the branch from which the release will be made From df8c1fe033b101af5a8201846c763a81f089650a Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 19 Feb 2018 15:28:49 -0600 Subject: [PATCH 4/9] Make 3 NPM commands sub-bullets --- RELEASE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 469398c199..f7d94bd671 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -18,9 +18,9 @@ We follow [semantic versioning](https://semver.org) where the following sequence - [ ] Fork `markedjs/marked` -> clone the library locally -> Make sure you are on the `master` branch - [ ] Create release branch from `master` (`release-##.##.##`) -- [ ] `$ npm test` (run tests) -- [ ] `$ npm version [major|minor|patch]` (updates `package.json` and creates `min` file) -- [ ] `$ npm publish` (publish to NPM) + - `$ npm test` (run tests) + - `$ npm version [major|minor|patch]` (updates `package.json` and creates `min` file) + - `$ npm publish` (publish to NPM) - [ ] Commit changes locally -> Submit PR to `origina/master` -> Merge PR - [ ] Navigate to the "Releases" tab on the project main page -> "Draft new release" - Add version number matching the one in the `package.json` file after publishing the release From dbf5e43a65d2fab378dfd29e248a189bf984465e Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 19 Feb 2018 15:30:38 -0600 Subject: [PATCH 5/9] Moving content around a bit --- RELEASE.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index f7d94bd671..c99b1c4f69 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,5 +1,7 @@ # Releasing Marked +**Master is always shippable:** We try to merge PRs in such a way that `master` is the only branch to really be concerned about *and* `master` can always be released. This allows smoother flow between new fetures, bug fixes, and so on. (Almost a continuous deployment setup, without automation.) + ## Versioning We follow [semantic versioning](https://semver.org) where the following sequence is true `[major].[minor].[patch]` (further, while in beta you may see something like this `0.[major|minor].[minor|patch]`). Therefore, consider the following implications of the relase you are preparing: @@ -10,12 +12,6 @@ We follow [semantic versioning](https://semver.org) where the following sequence ## Release process -**Master is always shippable:** We try to merge PRs in such a way that `master` is the only branch to really be concerned about *and* `master` can always be released. This allows smoother flow between new fetures, bug fixes, and so on. (Almost a continuous deployment setup, without automation.) - -**Version naming:** relatively standard [major].[minor].[patch] where `major` releases represent known breaking changes to the previous release, `minor` represent additions of new funcitonality without breaking changes, and `patch` releases represent changes meant to fix previously released functionality with no new functionality. Note: When the major is a zero, it means the library is still in a beta state wherein the `major` does not get updated; therefore, `minor` releases may introduce breaking changes, and `patch` releases may contain new features. - -### Release process - - [ ] Fork `markedjs/marked` -> clone the library locally -> Make sure you are on the `master` branch - [ ] Create release branch from `master` (`release-##.##.##`) - `$ npm test` (run tests) From 080d473a64ca714f3e2a9c998cfb980f6fd23856 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 19 Feb 2018 15:35:06 -0600 Subject: [PATCH 6/9] Ediitng --- RELEASE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index c99b1c4f69..185405727c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -4,10 +4,10 @@ ## Versioning -We follow [semantic versioning](https://semver.org) where the following sequence is true `[major].[minor].[patch]` (further, while in beta you may see something like this `0.[major|minor].[minor|patch]`). Therefore, consider the following implications of the relase you are preparing: +We follow [semantic versioning](https://semver.org) where the following sequence is true `[major].[minor].[patch]` (further, while in beta, you may see this `0.[major|minor].[minor|patch]`); therefore, consider the following implications of the release you are preparing: -1. **Major:** There is at least one change that has been made which is not deemed as backward compatible. While in beta, the major will remain at zero; thereby, alterting consumers to the potentially volatile nature of the package. -2. **Minor:** There is at least one new feature added to the release. While in beta, the minor will tend be more analagous to a `major` release. For example, we plan to release `0.4.0` once we have fixed most, if not all, known issues related to the CommonMark and GFM specifications because the architecture changes planned during `0.4.0` will most likely introduce breaking changes. +1. **Major:** There is at least one change not deemed backward compatible. While in beta, the major will remain at zero; thereby, alerting consumers to the potentially volatile nature of the package. +2. **Minor:** There is at least one new feature added to the release. While in beta, the minor will tend to be more analagous to a `major` release. For example, we plan to release `0.4.0` once we have fixed most, if not all, known issues related to the CommonMark and GFM specifications because the architecture changes planned during `0.4.0` will most likely introduce breaking changes. 3. **Patch:** No breaking changes. Should fix a defect found in a feature. While in beta, the patch will tend to be more analagous to a `minor` release. ## Release process From 794d94494bcd2376803a79f99149fd0d89ed539d Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 19 Feb 2018 15:52:59 -0600 Subject: [PATCH 7/9] Fix typo --- RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 185405727c..4da0981bc4 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -17,7 +17,7 @@ We follow [semantic versioning](https://semver.org) where the following sequence - `$ npm test` (run tests) - `$ npm version [major|minor|patch]` (updates `package.json` and creates `min` file) - `$ npm publish` (publish to NPM) -- [ ] Commit changes locally -> Submit PR to `origina/master` -> Merge PR +- [ ] Commit changes locally -> Submit PR to `origin/master` -> Merge PR - [ ] Navigate to the "Releases" tab on the project main page -> "Draft new release" - Add version number matching the one in the `package.json` file after publishing the release - Make sure `master` is the branch from which the release will be made From 3670bfaac31b7a7296bf818ffa137e264e9eeffd Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 19 Feb 2018 16:33:04 -0600 Subject: [PATCH 8/9] Create PR Template and update RELEASE based on feedback --- .github/PULL_REQUEST_TEMPLATE.md | 25 +++++++++++++++++++++++++ RELEASE.md | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..2b3fd9522c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,25 @@ +## Description + + + +- Fixes #### +- Fixes list issues fixed by this PR +- Fixes will automatically close them once merged + +## Review + +### Submitter + +- [ ] All tests pass (CI should take care of this, once in place). +- [ ] All lint checks pass (CI should take care of this, once in place). +- Tests + - [ ] Test(s) exist to ensure functionaly works (if no new tests added, list which tests cover this funcitonality). + - [ ] No tests required for this PR. +- If release: + - [ ] Version in `package.json` has been updated (see [RELEASE.md](RELEASE.md)). + - [ ] The `marked.min.js` has been updated; or, + - [ ] release does not change library. + +### Reviewer + +?? \ No newline at end of file diff --git a/RELEASE.md b/RELEASE.md index 4da0981bc4..7042562e43 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -18,6 +18,8 @@ We follow [semantic versioning](https://semver.org) where the following sequence - `$ npm version [major|minor|patch]` (updates `package.json` and creates `min` file) - `$ npm publish` (publish to NPM) - [ ] Commit changes locally -> Submit PR to `origin/master` -> Merge PR + - `package.json` should, at minimum, have an updated version number. + - If the release contains changes to the library (most likely) you should also see a new `marked.min.js` file. - [ ] Navigate to the "Releases" tab on the project main page -> "Draft new release" - Add version number matching the one in the `package.json` file after publishing the release - Make sure `master` is the branch from which the release will be made From ad98c9805840a8254feba8b40930e54b6f0fb295 Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 19 Feb 2018 16:36:35 -0600 Subject: [PATCH 9/9] Typos and allowing for no release PRs --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2b3fd9522c..7ac3428787 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,9 +13,9 @@ - [ ] All tests pass (CI should take care of this, once in place). - [ ] All lint checks pass (CI should take care of this, once in place). - Tests - - [ ] Test(s) exist to ensure functionaly works (if no new tests added, list which tests cover this funcitonality). + - [ ] Test(s) exist to ensure functionality works (if no new tests added, list which tests cover this functionality). - [ ] No tests required for this PR. -- If release: +- [ ] Is release: - [ ] Version in `package.json` has been updated (see [RELEASE.md](RELEASE.md)). - [ ] The `marked.min.js` has been updated; or, - [ ] release does not change library.