jesstelford / version-changelog Goto Github PK
View Code? Open in Web Editor NEWAdd a version & URL to your changelog
Add a version & URL to your changelog
I'm using gitlab with an ssh remote url and it seems that the function githubUrlFromGit
returns undefined
.
Any way to fix it?
It was a little bit concerning that I couldn't find the package sourecode right of the bat from npm registry.
It would be nice if you could update package.json
with the homepage information, it's one click away for users visiting https://www.npmjs.com/package/version-changelog.
For quick reference, see the docs here https://docs.npmjs.com/cli/v6/configuring-npm/package-json#homepage
I tried to run it before hooking up a repository to git, and got the [WARN]: Unable to determine origin URL for adding to changelog
but it left my repo in a changed state. Would be nice if it cleaned up after itself instead.
It seems that you add unnecessary []
characters after each version.
For example:
## [1.0.0][]
Is there a reason for there or is it a bug?
Just was curious since it doesn't adhere to keepachangelog.com.
Also wanted to say that I love this tool, thank you for creating it!
Is it possible to make this module not dependant on Git repository, and instead retrieve version based on package.json
field? This would be useful in cases of monorepos managable with Lerna.
Just wondering if we could add support for custom tag prefixes for the generated github URLs.
The Allhomes monorepo uses .yarnrc
files to prefix custom tags for each package so the harcoded v
prefix means the generated URLs don't work.
I was thinking maybe adding a function like below and replace hardcoded instances of v
with the value returned.
var spawn = require('cross-spawn');
var hasYarn = require('has-yarn');
function getVersionPrefix() {
var versionPrefix = '';
if (hasYarn()) {
versionPrefix = spawn.sync('yarn', ['config', 'get', 'version-tag-prefix']).stdout.toString().trim();
} else {
versionPrefix = spawn.sync('npm', ['config', 'get', 'tag-version-prefix']).stdout.toString().trim();
}
if (!versionPrefix) {
versionPrefix = 'v';
}
return versionPrefix;
}
I am trying to fix a bug with gitlab compare links. While setting up a fork I noticed that the tests wont work (on my machine?).
git clone [email protected]:jesstelford/version-changelog.git
cd version-changelog
npm install
npm run test
node -v
: v10.16.0npm -v
: 6.9.0yarn -v
: 1.16.0uname -opvrsi
: Linux 5.0.0-20-generic #21-Ubuntu SMP Mon Jun 24 09:32:09 UTC 2019 x86_64 x86_64 GNU/Linux Versioning Changelog (prefix source: "default")
- Handles a non-git repo correctly
1) Correctly adds a new version
2) Correctly updates old unreleased sections
3) Correctly handles empty Unreleased section
4) Correctly skips old versions for links
gitlab
5) Correctly adds a new gitlab version
6) Correctly updates old unreleased sections with gitlab urls
bitbucket
7) Correctly adds a new bitbucket version
8) Correctly updates old unreleased sections with bitbucket urls
0 passing (2s)
1 pending
8 failing
1) Versioning Changelog (prefix source: "default")
Correctly adds a new version:
AssertionError [ERR_ASSERTION]: ifError got unwanted exception: '# Changelog\n\n## [Unreleased][]\n\n## [1.0.0][] - 2019-07-17\n- Foo\n\n[Unreleased]: https://github.com/jesstelford/version... == '# Changelog\n\n## [Unreleased][]\n\n## [1.0.0][] - 2019-07-17\n- Foo\n\n[Unreleased]: https://github.com/jesstelford/version...
at /home/philipp/Documents/js/version/test/test.js:59:16
at versionChangelog (index.js:166:5)
at /home/philipp/Documents/js/version/test/test.js:60:16
at versionChangelog (index.js:163:5)
at Context.<anonymous> (test/test.js:47:5)
[...] all error messages look the same
I am almost certain the error is due to a missing 'v' version prefix in the actual result. But I cannot figure out what's wrong.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.