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 2.0.0-beta to 2.0.0

12

esm/src/parser.js

@@ -85,3 +85,3 @@ import Changelog from "./Changelog.js";

.split("\n")
.map((line, index) => {
.map((line, index, allLines) => {
const lineNumber = index + 1;

@@ -109,2 +109,12 @@ if (line.startsWith("---")) {

}
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 [lineNumber, "link", [
line.trim() + "\n" + nextLine.trimEnd(),
]];
}
}
const result = line.match(/^<!--(.*)-->$/);

@@ -111,0 +121,0 @@ if (result) {

9

esm/test/changelog.md

@@ -182,5 +182,8 @@ # Changelog - demo

[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.3.0...v1.0.0
[0.3.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.2.0...v0.3.0
[Unreleased]:
https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0...HEAD
[1.0.0]:
https://github.com/olivierlacan/keep-a-changelog/compare/v0.3.0...v1.0.0
[0.3.0]:
https://github.com/olivierlacan/keep-a-changelog/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.1.0...v0.2.0

@@ -187,0 +190,0 @@ [0.1.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.8...v0.1.0

@@ -9,3 +9,3 @@ {

"name": "keep-a-changelog",
"version": "2.0.0-beta",
"version": "2.0.0",
"description": "Node package to parse and generate changelogs following the [keepachangelog](http://keepachangelog.com/en/1.0.0/) format.",

@@ -12,0 +12,0 @@ "homepage": "https://github.com/oscarotero/keep-a-changelog#readme",

@@ -22,5 +22,5 @@ import { Semver } from "./deps.js";

security(change: Change | string): this;
toString(changelog: Changelog): string;
getCompareLink(changelog: Changelog): string | undefined;
toString(changelog?: Changelog): string;
getCompareLink(changelog?: Changelog): string | undefined;
getLinks(changelog: Changelog): string[];
}

@@ -1,7 +0,8 @@

export default function _default(version: any, date: any, description: any): CustomRelease;
import { Release, Change } from "../../mod.js";
import { Semver } from "../../src/deps.js";
declare class CustomRelease extends Release {
constructor(version: any, date: any, description: any);
maintenance(change: any): CustomRelease;
constructor(version?: Semver | string, date?: Date | string, description?: string);
maintenance(change: string | Change): this;
}
import { Release } from "../../mod.js";
export default function (version?: Semver | string, date?: Date | string, description?: string): CustomRelease;
export {};

@@ -99,3 +99,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

.split("\n")
.map((line, index) => {
.map((line, index, allLines) => {
const lineNumber = index + 1;

@@ -123,2 +123,12 @@ if (line.startsWith("---")) {

}
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 [lineNumber, "link", [
line.trim() + "\n" + nextLine.trimEnd(),
]];
}
}
const result = line.match(/^<!--(.*)-->$/);

@@ -125,0 +135,0 @@ if (result) {

@@ -182,5 +182,8 @@ # Changelog - demo

[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.3.0...v1.0.0
[0.3.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.2.0...v0.3.0
[Unreleased]:
https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0...HEAD
[1.0.0]:
https://github.com/olivierlacan/keep-a-changelog/compare/v0.3.0...v1.0.0
[0.3.0]:
https://github.com/olivierlacan/keep-a-changelog/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.1.0...v0.2.0

@@ -187,0 +190,0 @@ [0.1.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.8...v0.1.0

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