keep-a-changelog
Advanced tools
Comparing version 2.0.0-beta to 2.0.0
@@ -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) { |
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
446341
11172
0
0