Socket
Socket
Sign inDemoInstall

keep-a-changelog

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keep-a-changelog - npm Package Compare versions

Comparing version 0.6.6 to 0.6.7

7

CHANGELOG.md

@@ -8,2 +8,8 @@ # Changelog

## [0.6.7] - 2018-11-29
### Fixed
- Fixed the links sorting to compare issues numerically instead alphabetically
## [0.6.6] - 2018-11-29

@@ -137,2 +143,3 @@

[0.6.7]: https://github.com/oscarotero/keep-a-changelog/compare/v0.6.6...v0.6.7
[0.6.6]: https://github.com/oscarotero/keep-a-changelog/compare/v0.6.5...v0.6.6

@@ -139,0 +146,0 @@ [0.6.5]: https://github.com/oscarotero/keep-a-changelog/compare/v0.6.4...v0.6.5

2

package.json

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/oscarotero/keep-a-changelog#readme",
"version": "0.6.6",
"version": "0.6.7",
"main": "src/index.js",

@@ -8,0 +8,0 @@ "bin": {

@@ -75,3 +75,3 @@ const Release = require('./Release');

t.push('');
links.sort();
links.sort(compare);
links.forEach(link => t.push(link));

@@ -100,1 +100,16 @@ }

module.exports = Changelog;
function compare(a, b) {
if (a === b) {
return 0;
}
const reg = /^\[#(\d+)\]:/;
const aNumber = a.match(reg);
const bNumber = b.match(reg);
if (aNumber && bNumber) {
return parseInt(aNumber[1]) - parseInt(bNumber[1]);
}
return a < b ? -1 : 1;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc