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.10.2 to 0.10.4

18

bin.js

@@ -14,3 +14,3 @@ #!/usr/bin/env node

},
boolean: ['https', 'init', 'latest-release', 'release', 'quiet'],
boolean: ['https', 'init', 'latest-release', 'quiet'],
});

@@ -44,3 +44,11 @@

const release = changelog.releases.find((release) => {
return !release.date && release.version;
if (release.date) {
return false;
}
if (typeof argv.release === "string") {
return !release.version || argv.release === release.version.toString();
}
return !!release.version;
});

@@ -50,2 +58,8 @@

release.date = new Date();
if (typeof argv.release === "string") {
release.setVersion(argv.release);
}
} else {
console.error("Not found any valid unreleased version");
process.exit(1);
}

@@ -52,0 +66,0 @@ }

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

## [0.10.4] - 2021-03-04
### Fixed
- Allow to pass a version number to `--release` command [#18]
## [0.10.3] - 2021-01-09
### Fixed
- Support for multiline links [#16]
## [0.10.2] - 2020-10-11

@@ -169,3 +177,7 @@ ### Added

[#15]: https://github.com/oscarotero/keep-a-changelog/issues/15
[#16]: https://github.com/oscarotero/keep-a-changelog/issues/16
[#18]: https://github.com/oscarotero/keep-a-changelog/issues/18
[0.10.4]: https://github.com/oscarotero/keep-a-changelog/compare/v0.10.3...v0.10.4
[0.10.3]: https://github.com/oscarotero/keep-a-changelog/compare/v0.10.2...v0.10.3
[0.10.2]: https://github.com/oscarotero/keep-a-changelog/compare/v0.10.1...v0.10.2

@@ -172,0 +184,0 @@ [0.10.1]: https://github.com/oscarotero/keep-a-changelog/compare/v0.10.0...v0.10.1

2

package.json

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

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

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

@@ -99,3 +99,3 @@ const Changelog = require('./Changelog');

.split('\n')
.map((line) => {
.map((line, index, allLines) => {
if (line.startsWith('---')) {

@@ -128,2 +128,10 @@ return ['hr', ['-']];

}
if (line.match(/^\[.*\]\:$/)) {
const nextLine = allLines[index + 1];
if (nextLine && nextLine.match(/\s+http.*$/)) {
// We found a multi-line link: treat it like a single line
allLines[index + 1] = '';
return ['link', [line.trim() + '\n' + nextLine.trimEnd()]];
}
}

@@ -130,0 +138,0 @@ return ['p', [line.trimEnd()]];

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