The Wayback Machine - https://web.archive.org/web/20201123153119/https://github.com/shelljs/shelljs/pull/443
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: setup changelog #443

Merged
merged 4 commits into from May 17, 2016
Merged

chore: setup changelog #443

merged 4 commits into from May 17, 2016

Conversation

@levithomason
Copy link
Contributor

@levithomason levithomason commented May 16, 2016

This PR adds the same changelog flow added to shx. Also generates the first changelog.

trim_trailing_whitespace = true

[*.{md,markdown}]
trim_trailing_whitespace = false

This comment has been minimized.

@levithomason

levithomason May 16, 2016
Author Contributor

Standardized editor config options. Added as markdown files use two spaces at the end of a line for a line break, but in all other files, you want whitespace trimmed.

@@ -0,0 +1,494 @@
# Change Log

This comment has been minimized.

@levithomason

levithomason May 16, 2016
Author Contributor

Initial changelog.


>`major` - breaking API changes
>`minor` - backwards-compatible features
>`patch` - backwards-compatible bug fixes

This comment has been minimized.

@levithomason

levithomason May 16, 2016
Author Contributor

Removed previous manual package bumping and committing instructions for npm version command. It bumps package.json, creates tags, and bump commit.

Also, the version suggestions were ambiguous and not semver.org compliant. Updated to match the semver specs.

@@ -23,7 +23,8 @@
"homepage": "http://github.com/shelljs/shelljs",
"main": "./shell.js",
"scripts": {
"test": "node scripts/run-tests"
"test": "node scripts/run-tests",
"changelog": "bash scripts/changelog.sh"

This comment has been minimized.

@levithomason

levithomason May 16, 2016
Author Contributor

I think it is helpful to standardize all scripts to npm scripts.

@@ -0,0 +1,28 @@
#!/usr/bin/env bash

This comment has been minimized.

@levithomason

levithomason May 16, 2016
Author Contributor

Again, copied from shx here. As we round this out, I'll likely release an npm module for this so we don't have to update many scripts.

This comment has been minimized.

@nfischer

nfischer May 16, 2016
Member

@levithomason I completely agree with making this an npm module (this is what ShellJS is for, anyway). I actually ready wrote out a release.js script (translated from your release.sh). If that's fine with you, I can publish that under the ShellJS org (shouldn't be an issue, since it's a derivative work under the MIT license).

This comment has been minimized.

@levithomason

levithomason May 16, 2016
Author Contributor

Absolutely.

This comment has been minimized.

@levithomason

levithomason May 16, 2016
Author Contributor

Actually, let me clarify. I was referring to an npm module for my changelog api, are you thinking of a release script for npm?

This comment has been minimized.

@nfischer

nfischer May 16, 2016
Member

I wrote one out for release.sh at shx to begin with. We could also do one for the changelog. (let me know if you would prefer to not have release.sh transpiled to JS).

I can work on translating changelong.sh as well or instead.

This comment has been minimized.

@levithomason

levithomason May 16, 2016
Author Contributor

Got it. Yea, I think there are two scripts here. Starting with bash > shelljs transpiled versions sounds like a good start. I can see the shelljs release as a shelljs org npm package. You're clear by me if you'd like to get that out the door. If you're gonna do it right away, feel free to update this PR as well.

At some point, I'll likely pull out the generate changelog functionality of said release script and publish my own module. Just so it is easy to generate a changelog for any project.

This comment has been minimized.

@nfischer

nfischer May 16, 2016
Member

@levithomason Here's an initial version, if you'd like to take a look. I believe you and @ariporad should automatically be collaborators, so feel free to make changes.

https://github.com/shelljs/release/blob/master/index.js

I also have a similar one for changelog.js if you'd like to base your module off of that. It still relies on curl, however.

This comment has been minimized.

@levithomason

levithomason May 16, 2016
Author Contributor

echo(" Usage: bash $0 <major|minor|patch>"); should be node. Other than that, the once over looks good.

EDIT
Also, don't think $0 works in shelljs. argv[1] might do it.

This comment has been minimized.

@nfischer

nfischer May 16, 2016
Member

Whoops, missed that one. Will fix.

@levithomason
Copy link
Contributor Author

@levithomason levithomason commented May 16, 2016

This PR brings up a larger point, v1.0.0. Technically, when used in production you are at 1.0. I think we're there and should release a 1.0 as the next release.

The biggest advantage here is that breaking changes are properly noted by the major version number. I'm updating some projects with shelljs right now and I'm not sure what 0.6 to 0.7 may have broke or if it did.

Lastly, we could take a note from facebook/reactjs. They recently went from v0.14.0 to v15.0.0 on the next release. This was because reactjs is in production use all over the place, including facebook.

@ariporad
Copy link
Contributor

@ariporad ariporad commented May 16, 2016

LGTM.

With regards to v1.0.0, semver defines v0 as a beta, so that unstable packages can be developed easily.

I personally think that we need to start progressing to 1.0.0, but I have a few things I want to work out before doing so, I'll create a milestone when I'm off mobile.

@ariporad ariporad mentioned this pull request May 16, 2016
7 of 9 tasks complete
@ariporad
Copy link
Contributor

@ariporad ariporad commented May 16, 2016

Big picture ShellJS discussion in #444.

@levithomason
Copy link
Contributor Author

@levithomason levithomason commented May 16, 2016

@nfischer we good on this PR then? Assuming you'll make script updates on another PR.

@nfischer
Copy link
Member

@nfischer nfischer commented May 17, 2016

LGTM, but why has this not passed CI?

@nfischer nfischer changed the title Setup changelog chore: setup changelog May 17, 2016
@levithomason
Copy link
Contributor Author

@levithomason levithomason commented May 17, 2016

It did pass on my last commit. But the auto changelog commit [ci skip] seems to put the test in permanent suspense?

image

@nfischer
Copy link
Member

@nfischer nfischer commented May 17, 2016

If that's the case, we should probably wait to merge until we can figure that out (don't want to accidentally freeze our CI)

@levithomason
Copy link
Contributor Author

@levithomason levithomason commented May 17, 2016

I just mean only that commit is not reporting for some reason. Tests are still running, and passing as seen here: https://travis-ci.org/shelljs/shelljs/builds/130655225

I'll try to remove that commit and re-add another one to see if that works.

@levithomason levithomason force-pushed the levithomason:feature/changelog branch from 3ffab5e to 2bb193f May 17, 2016
@levithomason
Copy link
Contributor Author

@levithomason levithomason commented May 17, 2016

If this doesn't work, we can actually remove the [ ci skip ] for our setup.

@levithomason levithomason force-pushed the levithomason:feature/changelog branch from 2bb193f to 5160f2e May 17, 2016
@levithomason
Copy link
Contributor Author

@levithomason levithomason commented May 17, 2016

OK, removed the ci skip so the statuses show through on the PR. Tests were still running, but they never reported back. Suppose the extra test for changelog-only commits doesn't hurt.

Just need another sign off now. Hm, I apparently can't merge this?

@nfischer nfischer merged commit 87aaefa into shelljs:master May 17, 2016
3 checks passed
3 checks passed
approvals/lgtm this commit looks good
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@levithomason levithomason deleted the levithomason:feature/changelog branch May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.